@camaradesuk/m3e-angular 0.2.0-alpha.6 → 0.2.0-alpha.8

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,27 +1,34 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, ElementRef, model, input, computed, Input, Directive, effect, forwardRef, output, contentChildren, ChangeDetectorRef, NgZone, afterNextRender, DestroyRef, ChangeDetectionStrategy, Component, Injectable, booleanAttribute, signal, ANIMATION_MODULE_TYPE, afterRenderEffect, viewChild, PLATFORM_ID, ViewEncapsulation, APP_ID, TemplateRef, ViewContainerRef, untracked, linkedSignal, isDevMode, afterEveryRender, Renderer2, QueryList, Injector, ViewChildren, ContentChildren, HostAttributeToken, contentChild } from '@angular/core';
3
- import * as i1$1 from '@angular/material/button';
2
+ import { InjectionToken, inject, ElementRef, model, input, computed, Input, Directive, effect, forwardRef, output, contentChildren, ChangeDetectorRef, NgZone, afterNextRender, DestroyRef, ChangeDetectionStrategy, Component, Injectable, booleanAttribute, signal, ANIMATION_MODULE_TYPE, afterRenderEffect, viewChild, PLATFORM_ID, ViewEncapsulation, APP_ID, TemplateRef, ViewContainerRef, untracked, linkedSignal, isDevMode, afterEveryRender, Renderer2, QueryList, Injector, ViewChildren, ContentChildren, contentChild, HostAttributeToken } from '@angular/core';
3
+ import * as i1$2 from '@angular/material/button';
4
4
  import { MatIconButton, MatButton, MatFabButton, MatButtonModule } from '@angular/material/button';
5
5
  import { gsap } from 'gsap';
6
6
  import { MatMenuTrigger, MatMenu } from '@angular/material/menu';
7
7
  import { SelectionModel } from '@angular/cdk/collections';
8
8
  import { NG_VALUE_ACCESSOR, AbstractControl } from '@angular/forms';
9
9
  import { MediaMatcher } from '@angular/cdk/layout';
10
+ import * as i1$1 from '@angular/material/core';
10
11
  import { MATERIAL_ANIMATIONS, MatRipple } from '@angular/material/core';
11
12
  import { toSignal } from '@angular/core/rxjs-interop';
12
13
  import { merge, map, ReplaySubject, Subject } from 'rxjs';
13
14
  import { isPlatformBrowser, DOCUMENT, NgTemplateOutlet } from '@angular/common';
14
15
  import { MorphSVGPlugin } from 'gsap/MorphSVGPlugin';
15
16
  import { CustomEase } from 'gsap/CustomEase';
16
- import { FocusMonitor, InteractivityChecker, addAriaReferencedId, removeAriaReferencedId, _IdGenerator, InputModalityDetector, AriaDescriber } from '@angular/cdk/a11y';
17
- import { Directionality } from '@angular/cdk/bidi';
18
- import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
19
- import { TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
17
+ import { FocusMonitor, InteractivityChecker, addAriaReferencedId, removeAriaReferencedId, _IdGenerator, InputModalityDetector, AriaDescriber, FocusKeyManager } from '@angular/cdk/a11y';
18
+ import { Directionality, Dir } from '@angular/cdk/bidi';
19
+ import { Overlay, CdkConnectedOverlay, CdkOverlayOrigin, OverlayConfig } from '@angular/cdk/overlay';
20
+ import { TemplatePortal, DomPortal, CdkPortalOutlet } from '@angular/cdk/portal';
20
21
  import { MatToolbar } from '@angular/material/toolbar';
21
22
  import { MatDrawer, MatDrawerContainer, MatDrawerContent } from '@angular/material/sidenav';
22
23
  import * as i1 from '@angular/material/badge';
23
24
  import { MatBadge } from '@angular/material/badge';
24
25
  import { CdkStep, CdkStepper, CdkStepHeader } from '@angular/cdk/stepper';
26
+ import { Menu, MenuItem } from '@angular/aria/menu';
27
+ import { MatIcon } from '@angular/material/icon';
28
+ import { Combobox, ComboboxPopup, ComboboxWidget } from '@angular/aria/combobox';
29
+ import { Listbox, Option } from '@angular/aria/listbox';
30
+ import { MatFormField, MatLabel } from '@angular/material/form-field';
31
+ import { MatInput } from '@angular/material/input';
25
32
  import { CdkDialogContainer, DialogRef, Dialog } from '@angular/cdk/dialog';
26
33
  import { MatDialogState, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
27
34
 
@@ -423,6 +430,9 @@ const MAT_EXP_ICON_BUTTON_OPTIONS = _iconButtonOptions.token;
423
430
  const provideMatExpIconButtonOptions = _iconButtonOptions.provide;
424
431
  const injectMatExpIconButtonOptions = _iconButtonOptions.inject;
425
432
 
433
+ /** @internal Shared open-state contract for Expressive triggers and button styling. */
434
+ const MAT_EXP_MENU_OPEN_STATE = new InjectionToken('MAT_EXP_MENU_OPEN_STATE');
435
+
426
436
  /**
427
437
  * Directive to style the Angular Material Icon Button component with latest Material 3 Design System Expressive styles.
428
438
  */
@@ -500,8 +510,9 @@ class MatExpIconButton {
500
510
  this.buttonGroup?._onButtonClick(this);
501
511
  }
502
512
  matMenu = inject(MatMenuTrigger, { optional: true });
513
+ expressiveMenu = inject(MAT_EXP_MENU_OPEN_STATE, { optional: true, self: true });
503
514
  get isMenuOpen() {
504
- return this.matMenu?.menuOpen ?? false;
515
+ return this.expressiveMenu?.() ?? this.matMenu?.menuOpen ?? false;
505
516
  }
506
517
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpIconButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
507
518
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.3", type: MatExpIconButton, isStandalone: true, selector: "[matExpIconButton]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange", shape: "shapeChange", toggle: "toggleChange", value: "valueChange" }, host: { listeners: { "click": "_onButtonClick()" }, properties: { "attr.data-size": "size()", "attr.data-shape": "shape()", "attr.data-appearance": "appearance", "attr.data-state": "state()", "attr.data-toggle": "toggle()", "attr.data-width": "width()", "attr.data-menu-open": "isMenuOpen", "attr.aria-pressed": "ariaPressed()", "class": "matExpIconButtonClass" } }, exportAs: ["matExpIconButton"], ngImport: i0 });
@@ -1011,8 +1022,9 @@ class MatExpButton {
1011
1022
  this.buttonGroup?._onButtonClick(this);
1012
1023
  }
1013
1024
  matMenu = inject(MatMenuTrigger, { optional: true });
1025
+ expressiveMenu = inject(MAT_EXP_MENU_OPEN_STATE, { optional: true, self: true });
1014
1026
  get isMenuOpen() {
1015
- return this.matMenu?.menuOpen ?? false;
1027
+ return this.expressiveMenu?.() ?? this.matMenu?.menuOpen ?? false;
1016
1028
  }
1017
1029
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1018
1030
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.3", type: MatExpButton, isStandalone: true, selector: "[matExpButton]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, toggle: { classPropertyName: "toggle", publicName: "toggle", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange", shape: "shapeChange", toggle: "toggleChange", value: "valueChange" }, host: { listeners: { "click": "_onButtonClick()" }, properties: { "attr.data-size": "size()", "attr.data-shape": "shape()", "attr.data-state": "state()", "attr.data-toggle": "toggle()", "attr.data-menu-open": "isMenuOpen", "attr.aria-pressed": "ariaPressed()", "class": "matExpButtonClass" } }, exportAs: ["matExpButton"], ngImport: i0 });
@@ -1115,13 +1127,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
1115
1127
  args: [{ providedIn: 'root' }]
1116
1128
  }] });
1117
1129
 
1118
- const options$7 = matExpCreateOptions({ color: 'primary', motion: true });
1130
+ const options$8 = matExpCreateOptions({ color: 'primary', motion: true });
1119
1131
  /** Injector-scoped FAB menu defaults. */
1120
- const MAT_EXP_FAB_MENU_OPTIONS = options$7.token;
1132
+ const MAT_EXP_FAB_MENU_OPTIONS = options$8.token;
1121
1133
  /** Override FAB menu defaults without configuring each trigger separately. */
1122
- const provideMatExpFabMenuOptions = options$7.provide;
1134
+ const provideMatExpFabMenuOptions = options$8.provide;
1123
1135
  /** @internal */
1124
- const injectMatExpFabMenuOptions = options$7.inject;
1136
+ const injectMatExpFabMenuOptions = options$8.inject;
1125
1137
 
1126
1138
  /** Configures the official web adaptation: a FAB opening a native Material menu. */
1127
1139
  class MatExpFabMenu {
@@ -1157,8 +1169,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
1157
1169
  }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }] } });
1158
1170
 
1159
1171
  /**
1160
- * Builds a `Signal<boolean>` that reactively tracks whether the given `MatMenuTrigger`'s menu
1161
- * is currently open, fed by its `menuOpened`/`menuClosed` outputs.
1172
+ * Tracks an Expressive trigger on this host, or the given Material trigger through
1173
+ * its `menuOpened`/`menuClosed` outputs.
1162
1174
  *
1163
1175
  * This is the single implementation shared by every button-family directive that renders a
1164
1176
  * `data-menu-open` host attribute (`MatExpButton`, `MatExpIconButton`,
@@ -1166,10 +1178,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
1166
1178
  * work only because Angular Material's own state changes triggered change detection.
1167
1179
  *
1168
1180
  * Must be called within an injection context (e.g. a field initializer or the constructor of a
1169
- * directive/component). Returns a signal that is always `false` when `matMenuTrigger` is
1170
- * `null`/`undefined` (no menu attached to this host).
1181
+ * directive/component). Returns a false signal when neither trigger is attached.
1171
1182
  */
1172
1183
  function injectIsMenuOpenSignal(matMenuTrigger) {
1184
+ const expressive = inject(MAT_EXP_MENU_OPEN_STATE, { optional: true, self: true });
1185
+ if (expressive)
1186
+ return expressive;
1173
1187
  if (!matMenuTrigger) {
1174
1188
  return signal(false);
1175
1189
  }
@@ -2285,11 +2299,11 @@ const MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS = {
2285
2299
  touchGestures: true,
2286
2300
  disabled: false,
2287
2301
  };
2288
- const options$6 = matExpCreateOptions(MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS);
2289
- const MAT_EXP_RICH_TOOLTIP_OPTIONS = options$6.token;
2290
- const provideMatExpRichTooltipOptions = options$6.provide;
2302
+ const options$7 = matExpCreateOptions(MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS);
2303
+ const MAT_EXP_RICH_TOOLTIP_OPTIONS = options$7.token;
2304
+ const provideMatExpRichTooltipOptions = options$7.provide;
2291
2305
  /** @internal */
2292
- const injectMatExpRichTooltipOptions = options$6.inject;
2306
+ const injectMatExpRichTooltipOptions = options$7.inject;
2293
2307
 
2294
2308
  // Web adaptation: a brief opacity entrance; M3 tooltip guidance mandates no spring choreography.
2295
2309
  const ENTER_DURATION_SECONDS = 0.15;
@@ -2784,13 +2798,13 @@ const MAT_EXP_TOOLBAR_DEFAULT_OPTIONS = {
2784
2798
  appearance: 'standard',
2785
2799
  alignment: 'auto',
2786
2800
  };
2787
- const options$5 = matExpCreateOptions(MAT_EXP_TOOLBAR_DEFAULT_OPTIONS);
2801
+ const options$6 = matExpCreateOptions(MAT_EXP_TOOLBAR_DEFAULT_OPTIONS);
2788
2802
  /** Defaults for the toolbar directive. Prefer the merging provider function. */
2789
- const MAT_EXP_TOOLBAR_OPTIONS = options$5.token;
2803
+ const MAT_EXP_TOOLBAR_OPTIONS = options$6.token;
2790
2804
  /** Override toolbar defaults at any injector level. */
2791
- const provideMatExpToolbarOptions = options$5.provide;
2805
+ const provideMatExpToolbarOptions = options$6.provide;
2792
2806
  /** @internal */
2793
- const injectMatExpToolbarOptions = options$5.inject;
2807
+ const injectMatExpToolbarOptions = options$6.inject;
2794
2808
 
2795
2809
  // Custom playfulMotionScheme.defaultSpatialSpec from the official article,
2796
2810
  // not a named Expressive preset or a toolbar-specific token.
@@ -3090,11 +3104,11 @@ const MAT_EXP_LIST_DEFAULT_OPTIONS = {
3090
3104
  appearance: 'segmented',
3091
3105
  textWrap: 'wrap',
3092
3106
  };
3093
- const options$4 = matExpCreateOptions(MAT_EXP_LIST_DEFAULT_OPTIONS);
3094
- const MAT_EXP_LIST_OPTIONS = options$4.token;
3095
- const provideMatExpListOptions = options$4.provide;
3107
+ const options$5 = matExpCreateOptions(MAT_EXP_LIST_DEFAULT_OPTIONS);
3108
+ const MAT_EXP_LIST_OPTIONS = options$5.token;
3109
+ const provideMatExpListOptions = options$5.provide;
3096
3110
  /** @internal */
3097
- const injectMatExpListOptions = options$4.inject;
3111
+ const injectMatExpListOptions = options$5.inject;
3098
3112
 
3099
3113
  /**
3100
3114
  * Opt-in Expressive presentation. Material owns interaction, focus and forms.
@@ -3166,11 +3180,11 @@ const MAT_EXP_SEARCH_DEFAULT_OPTIONS = {
3166
3180
  clearLabel: 'Clear search',
3167
3181
  closeOnBackdrop: true,
3168
3182
  };
3169
- const options$3 = matExpCreateOptions(MAT_EXP_SEARCH_DEFAULT_OPTIONS);
3170
- const MAT_EXP_SEARCH_OPTIONS = options$3.token;
3171
- const provideMatExpSearchOptions = options$3.provide;
3183
+ const options$4 = matExpCreateOptions(MAT_EXP_SEARCH_DEFAULT_OPTIONS);
3184
+ const MAT_EXP_SEARCH_OPTIONS = options$4.token;
3185
+ const provideMatExpSearchOptions = options$4.provide;
3172
3186
  /** @internal */
3173
- const injectMatExpSearchOptions = options$3.inject;
3187
+ const injectMatExpSearchOptions = options$4.inject;
3174
3188
 
3175
3189
  /** Marks a native result button or link for Arrow/Home/End navigation. Keep its native semantics. */
3176
3190
  class MatExpSearchResult {
@@ -3918,11 +3932,11 @@ const MAT_EXP_NAVIGATION_RAIL_DEFAULT_OPTIONS = {
3918
3932
  collapsedLayout: 'stacked',
3919
3933
  peek: false,
3920
3934
  };
3921
- const options$2 = matExpCreateOptions(MAT_EXP_NAVIGATION_RAIL_DEFAULT_OPTIONS);
3922
- const MAT_EXP_NAVIGATION_RAIL_OPTIONS = options$2.token;
3923
- const provideMatExpNavigationRailOptions = options$2.provide;
3935
+ const options$3 = matExpCreateOptions(MAT_EXP_NAVIGATION_RAIL_DEFAULT_OPTIONS);
3936
+ const MAT_EXP_NAVIGATION_RAIL_OPTIONS = options$3.token;
3937
+ const provideMatExpNavigationRailOptions = options$3.provide;
3924
3938
  /** @internal */
3925
- const injectMatExpNavigationRailOptions = options$2.inject;
3939
+ const injectMatExpNavigationRailOptions = options$3.inject;
3926
3940
 
3927
3941
  /** Hover intent before a pointer peek opens, and grace before it closes (SyRF timings). */
3928
3942
  const PEEK_OPEN_DELAY = 120;
@@ -3960,6 +3974,22 @@ class MatExpNavigationRail {
3960
3974
  _wasPeeking = false;
3961
3975
  _peekOpenTimer;
3962
3976
  _peekCloseTimer;
3977
+ /**
3978
+ * Where a mouse or pen pointer entered the drawer, until it first really moves there. Hover
3979
+ * intent starts on that movement, so a rail that scrolls or resizes under a still pointer never
3980
+ * peeks, and each entry opens at most one hover peek (after Escape, a new peek needs a new entry).
3981
+ */
3982
+ _hoverEntry = null;
3983
+ /**
3984
+ * The mouse or pen pointer's position at its current and previous moves anywhere in the
3985
+ * document, recorded in the capture phase so content that stops propagation cannot hide them.
3986
+ * NaN until known.
3987
+ */
3988
+ _pointerX = NaN;
3989
+ _pointerY = NaN;
3990
+ _previousPointerX = NaN;
3991
+ _previousPointerY = NaN;
3992
+ _zone = inject(NgZone);
3963
3993
  /** The last element focused inside the panel, for a peek that hides it as it ends. */
3964
3994
  _peekFocus = null;
3965
3995
  _rescuingPeekFocus = false;
@@ -4007,10 +4037,10 @@ class MatExpNavigationRail {
4007
4037
  collapsedLayout = input(this._options.collapsedLayout, /* @ts-ignore */
4008
4038
  ...(ngDevMode ? [{ debugName: "collapsedLayout" }] : /* istanbul ignore next */ []));
4009
4039
  /**
4010
- * Peek: while collapsed, hovering the rail (mouse or pen, after 120ms) or moving keyboard focus
4011
- * into it shows the expanded rail as a non-modal overlay; leaving it (200ms grace for the
4012
- * pointer), focus leaving it or Escape ends the peek. `expanded` does not change. Has no effect
4013
- * with `hideOnCollapse`. @default false
4040
+ * Peek: while collapsed, hovering the rail (a mouse or pen moving over it, then 120ms) or moving
4041
+ * keyboard focus into it shows the expanded rail as a non-modal overlay; leaving it (200ms grace
4042
+ * for the pointer), focus leaving it or Escape ends the peek. `expanded` does not change. Has no
4043
+ * effect with `hideOnCollapse`. @default false
4014
4044
  */
4015
4045
  peek = input(this._options.peek, { ...(ngDevMode ? { debugName: "peek" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
4016
4046
  /** Whether peek applies now: enabled, collapsed and not hidden. */
@@ -4132,7 +4162,33 @@ class MatExpNavigationRail {
4132
4162
  this._wasPeeking = peeking;
4133
4163
  });
4134
4164
  afterEveryRender(() => this._syncTabStop());
4135
- inject(DestroyRef).onDestroy(() => {
4165
+ // Pointer movement is listened to natively, outside Angular's zone: only the first move after
4166
+ // an entry does any work, so moves must not run change detection.
4167
+ const destroyRef = inject(DestroyRef);
4168
+ afterNextRender(() => {
4169
+ const drawer = this._drawerElement().nativeElement;
4170
+ const onMove = (event) => this._onPointerMove(event);
4171
+ // Tracked even while peek is off (two number writes per move), so the first hover after
4172
+ // turning it on still knows where the pointer came from.
4173
+ const track = (event) => {
4174
+ if (event.pointerType !== 'mouse' && event.pointerType !== 'pen')
4175
+ return;
4176
+ this._previousPointerX = this._pointerX;
4177
+ this._previousPointerY = this._pointerY;
4178
+ this._pointerX = event.clientX;
4179
+ this._pointerY = event.clientY;
4180
+ };
4181
+ const capture = { capture: true, passive: true };
4182
+ this._zone.runOutsideAngular(() => {
4183
+ drawer.addEventListener('pointermove', onMove, { passive: true });
4184
+ this._document.addEventListener('pointermove', track, capture);
4185
+ });
4186
+ destroyRef.onDestroy(() => {
4187
+ drawer.removeEventListener('pointermove', onMove);
4188
+ this._document.removeEventListener('pointermove', track, capture);
4189
+ });
4190
+ });
4191
+ destroyRef.onDestroy(() => {
4136
4192
  this._clearPeekTimers();
4137
4193
  if (this._wasModal)
4138
4194
  this._restoreFocus();
@@ -4270,7 +4326,10 @@ class MatExpNavigationRail {
4270
4326
  }
4271
4327
  this._endPeek();
4272
4328
  }
4273
- /** @internal Mouse or pen hover opens a peek after a short intent delay. Touch never peeks. */
4329
+ /**
4330
+ * @internal Mouse or pen hover opens a peek after a short intent delay, counted from the
4331
+ * pointer's first movement over the rail. Touch never peeks.
4332
+ */
4274
4333
  _onPointerEnter(event) {
4275
4334
  if (event.pointerType !== 'mouse' && event.pointerType !== 'pen')
4276
4335
  return;
@@ -4278,16 +4337,40 @@ class MatExpNavigationRail {
4278
4337
  this._peekCloseTimer = undefined;
4279
4338
  if (!this._canPeek() || this._peekRequested() || this._peekOpenTimer !== undefined)
4280
4339
  return;
4340
+ this._hoverEntry = { x: event.clientX, y: event.clientY };
4341
+ }
4342
+ _onPointerMove(event) {
4343
+ const entry = this._hoverEntry;
4344
+ if (!entry || (event.pointerType !== 'mouse' && event.pointerType !== 'pen'))
4345
+ return;
4346
+ // WebKit refreshes hover after a scroll with a move that repeats the pointer's last position
4347
+ // with no movement. A real move comes from somewhere else, though WebKit may report no
4348
+ // movement for it either, so compare with the previous position (or the entry point).
4349
+ const known = !Number.isNaN(this._previousPointerX);
4350
+ const fromX = known ? this._previousPointerX : entry.x;
4351
+ const fromY = known ? this._previousPointerY : entry.y;
4352
+ const moved = (event.movementX ?? 0) !== 0 ||
4353
+ (event.movementY ?? 0) !== 0 ||
4354
+ event.clientX !== fromX ||
4355
+ event.clientY !== fromY;
4356
+ if (!moved)
4357
+ return;
4358
+ this._hoverEntry = null;
4359
+ if (!this._canPeek() || this._peekRequested() || this._peekOpenTimer !== undefined)
4360
+ return;
4361
+ // Scheduled from the out-of-zone listener: re-enter the zone to open, so zone-based apps that
4362
+ // ignore changes made outside it still render the peek.
4281
4363
  this._peekOpenTimer = setTimeout(() => {
4282
4364
  this._peekOpenTimer = undefined;
4283
4365
  if (this._canPeek())
4284
- this._peekRequested.set(true);
4366
+ this._zone.run(() => this._peekRequested.set(true));
4285
4367
  }, PEEK_OPEN_DELAY);
4286
4368
  }
4287
4369
  /** @internal */
4288
4370
  _onPointerLeave(event) {
4289
4371
  if (event.pointerType !== 'mouse' && event.pointerType !== 'pen')
4290
4372
  return;
4373
+ this._hoverEntry = null;
4291
4374
  clearTimeout(this._peekOpenTimer);
4292
4375
  this._peekOpenTimer = undefined;
4293
4376
  if (!this.peeking() || this._peekCloseTimer !== undefined)
@@ -4538,6 +4621,7 @@ class MatExpNavigationRail {
4538
4621
  this._peekRequested.set(false);
4539
4622
  }
4540
4623
  _clearPeekTimers() {
4624
+ this._hoverEntry = null;
4541
4625
  clearTimeout(this._peekOpenTimer);
4542
4626
  clearTimeout(this._peekCloseTimer);
4543
4627
  this._peekOpenTimer = this._peekCloseTimer = undefined;
@@ -5190,16 +5274,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
5190
5274
  }]
5191
5275
  }], ctorParameters: () => [], propDecorators: { _row: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }], _indicator: [{ type: i0.ViewChild, args: ['indicator', { isSignal: true }] }], _children: [{ type: i0.ViewChild, args: ['children', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
5192
5276
 
5193
- const options$1 = matExpCreateOptions({
5277
+ const options$2 = matExpCreateOptions({
5194
5278
  motion: 'system',
5195
5279
  closeLabel: 'Close dialog',
5196
5280
  adaptiveWidth: undefined,
5197
5281
  compactActions: 'header',
5198
5282
  });
5199
- const MAT_EXP_DIALOG_OPTIONS = options$1.token;
5200
- const provideMatExpDialogOptions = options$1.provide;
5283
+ const MAT_EXP_DIALOG_OPTIONS = options$2.token;
5284
+ const provideMatExpDialogOptions = options$2.provide;
5201
5285
  /** @internal */
5202
- const injectMatExpDialogOptions = options$1.inject;
5286
+ const injectMatExpDialogOptions = options$2.inject;
5203
5287
  /** @internal Context is supplied at open time, not inferred from consumer DOM. */
5204
5288
  const MAT_EXP_DIALOG_CONTEXT = new InjectionToken('MatExpDialog context');
5205
5289
  /**
@@ -5578,11 +5662,11 @@ const MAT_EXP_STEPPER_DEFAULT_OPTIONS = {
5578
5662
  completedLabel: 'Completed',
5579
5663
  errorLabel: 'Has errors',
5580
5664
  };
5581
- const options = matExpCreateOptions(MAT_EXP_STEPPER_DEFAULT_OPTIONS);
5582
- const MAT_EXP_STEPPER_OPTIONS = options.token;
5583
- const provideMatExpStepperOptions = options.provide;
5665
+ const options$1 = matExpCreateOptions(MAT_EXP_STEPPER_DEFAULT_OPTIONS);
5666
+ const MAT_EXP_STEPPER_OPTIONS = options$1.token;
5667
+ const provideMatExpStepperOptions = options$1.provide;
5584
5668
  /** @internal */
5585
- const injectMatExpStepperOptions = options.inject;
5669
+ const injectMatExpStepperOptions = options$1.inject;
5586
5670
 
5587
5671
  /**
5588
5672
  * Mirrors CDK gating for reactive and signal-form step controls. CDK marks the current step as
@@ -5927,6 +6011,2244 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
5927
6011
  args: [CdkStepHeader]
5928
6012
  }], _viewport: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }], _indicator: [{ type: i0.ViewChild, args: ['indicator', { isSignal: true }] }], _headers: [{ type: i0.ViewChild, args: ['headers', { isSignal: true }] }], _measure: [{ type: i0.ViewChild, args: ['measure', { isSignal: true }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }] } });
5929
6013
 
6014
+ const MAT_EXP_MENU_DEFAULT_OPTIONS = {
6015
+ color: 'standard',
6016
+ density: 0,
6017
+ separation: 'divider',
6018
+ motion: true,
6019
+ filterLabel: 'Filter options',
6020
+ emptyLabel: 'No matching options',
6021
+ };
6022
+ const options = matExpCreateOptions(MAT_EXP_MENU_DEFAULT_OPTIONS);
6023
+ const MAT_EXP_MENU_OPTIONS = options.token;
6024
+ const provideMatExpMenuOptions = options.provide;
6025
+ const injectMatExpMenuOptions = options.inject;
6026
+
6027
+ /** Lazy authored menu content. Named context values come from matExpMenuTriggerData. */
6028
+ class MatExpMenuContent {
6029
+ /** @internal */
6030
+ template = inject(TemplateRef);
6031
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6032
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.3", type: MatExpMenuContent, isStandalone: true, selector: "ng-template[matExpMenuContent]", ngImport: i0 });
6033
+ }
6034
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuContent, decorators: [{
6035
+ type: Directive,
6036
+ args: [{ selector: 'ng-template[matExpMenuContent]' }]
6037
+ }] });
6038
+ /** @internal Context for authored items, supplied by their rendered menu surface. */
6039
+ const MAT_EXP_MENU_SURFACE = new InjectionToken('MatExpMenuSurface');
6040
+
6041
+ /** @internal Capture rendered positions before updating the filtered collection. */
6042
+ function snapshotMenuRects(elements) {
6043
+ return new Map(elements.map((element) => [element, element.getBoundingClientRect()]));
6044
+ }
6045
+ /**
6046
+ * @internal GSAP rendering with the real M3 Expressive fast spatial/effects springs.
6047
+ * Analytical position and velocity survive interrupted presence, shape and FLIP
6048
+ * transitions. The 0.8 entry/exit scale is a web adaptation, not a normative token.
6049
+ * The caller supplies transform-origin and retains the panel until exit completes.
6050
+ */
6051
+ function createMenuMotion(panel, media) {
6052
+ let destroyed = false;
6053
+ let ticking = false;
6054
+ let completion;
6055
+ let exitTimer;
6056
+ const cancelExitTimer = () => {
6057
+ clearTimeout(exitTimer);
6058
+ exitTimer = undefined;
6059
+ };
6060
+ const springs = new Map();
6061
+ const saved = new Map();
6062
+ const remember = (element, properties) => {
6063
+ let styles = saved.get(element);
6064
+ if (!styles)
6065
+ saved.set(element, (styles = new Map()));
6066
+ for (const property of properties) {
6067
+ if (!styles.has(property))
6068
+ styles.set(property, [
6069
+ element.style.getPropertyValue(property),
6070
+ element.style.getPropertyPriority(property),
6071
+ ]);
6072
+ }
6073
+ };
6074
+ const channel = (element, property, initial) => {
6075
+ let channels = springs.get(element);
6076
+ if (!channels)
6077
+ springs.set(element, (channels = new Map()));
6078
+ let spring = channels.get(property);
6079
+ if (!spring) {
6080
+ spring = {
6081
+ element,
6082
+ property,
6083
+ value: initial,
6084
+ velocity: 0,
6085
+ from: initial,
6086
+ fromVelocity: 0,
6087
+ target: initial,
6088
+ started: 0,
6089
+ active: false,
6090
+ config: property === 'opacity' ? FAST_EFFECTS_SPRING : FAST_SPATIAL_SPRING,
6091
+ };
6092
+ channels.set(property, spring);
6093
+ }
6094
+ return spring;
6095
+ };
6096
+ const each = (action) => {
6097
+ for (const channels of springs.values())
6098
+ for (const spring of channels.values())
6099
+ action(spring);
6100
+ };
6101
+ const write = (spring) => {
6102
+ if (spring.property === 'borderRadius') {
6103
+ // GSAP's shorthand expansion drops autoRound; address corners directly
6104
+ // so interrupted springs retain visible subpixel position and velocity.
6105
+ const radius = `${spring.value}px`;
6106
+ gsap.set(spring.element, {
6107
+ autoRound: false,
6108
+ borderTopLeftRadius: radius,
6109
+ borderTopRightRadius: radius,
6110
+ borderBottomRightRadius: radius,
6111
+ borderBottomLeftRadius: radius,
6112
+ });
6113
+ }
6114
+ else
6115
+ gsap.set(spring.element, { [spring.property]: spring.value });
6116
+ };
6117
+ const settled = (spring) => Math.abs(spring.value - spring.target) < 0.0001 && Math.abs(spring.velocity) < 0.001;
6118
+ const finish = (spring) => {
6119
+ spring.value = spring.target;
6120
+ spring.velocity = 0;
6121
+ spring.active = false;
6122
+ write(spring);
6123
+ };
6124
+ const sample = (spring, now) => {
6125
+ if (!spring.active)
6126
+ return;
6127
+ const state = sampleDampedSpring(spring.from, spring.target, spring.fromVelocity, Math.max(0, now - spring.started), spring.config);
6128
+ spring.value = state.value;
6129
+ spring.velocity = state.velocity;
6130
+ if (spring.property === 'opacity' && (spring.value < 0 || spring.value > 1)) {
6131
+ spring.value = Math.max(0, Math.min(1, spring.value));
6132
+ spring.velocity = 0;
6133
+ }
6134
+ if (settled(spring))
6135
+ finish(spring);
6136
+ };
6137
+ // Wake before recording start times: adding a ticker can synchronously render.
6138
+ // Use monotonic elapsed time rather than GSAP's lag-smoothed ticker time, so
6139
+ // long rendering gaps cannot prolong filtering or leave an exiting popup mounted.
6140
+ const now = () => {
6141
+ if (!ticking)
6142
+ gsap.ticker.wake();
6143
+ return performance.now() / 1000;
6144
+ };
6145
+ const retarget = (spring, target, animate, time, from, config) => {
6146
+ sample(spring, time);
6147
+ if (config)
6148
+ spring.config = config;
6149
+ if (from !== undefined)
6150
+ spring.value = from;
6151
+ spring.target = target;
6152
+ spring.from = spring.value;
6153
+ spring.fromVelocity = spring.velocity;
6154
+ spring.started = time;
6155
+ spring.active = animate && !media.matches && !settled(spring);
6156
+ if (!spring.active)
6157
+ finish(spring);
6158
+ else
6159
+ write(spring);
6160
+ };
6161
+ remember(panel, ['transform', 'translate', 'rotate', 'scale', 'opacity', 'border-radius']);
6162
+ const scale = channel(panel, 'scale', 0.8);
6163
+ const opacity = channel(panel, 'opacity', 0);
6164
+ write(scale);
6165
+ write(opacity);
6166
+ const stop = () => {
6167
+ if (ticking)
6168
+ gsap.ticker.remove(tick);
6169
+ ticking = false;
6170
+ };
6171
+ const flush = () => {
6172
+ let active = false;
6173
+ each((spring) => {
6174
+ active ||= spring.active;
6175
+ });
6176
+ if (active && !ticking) {
6177
+ ticking = true;
6178
+ gsap.ticker.add(tick);
6179
+ }
6180
+ else if (!active)
6181
+ stop();
6182
+ if (!scale.active && !opacity.active && completion) {
6183
+ const callback = completion;
6184
+ completion = undefined;
6185
+ cancelExitTimer();
6186
+ callback();
6187
+ }
6188
+ };
6189
+ const tick = () => {
6190
+ const time = performance.now() / 1000;
6191
+ each((spring) => {
6192
+ if (spring.active) {
6193
+ sample(spring, time);
6194
+ write(spring);
6195
+ }
6196
+ });
6197
+ flush();
6198
+ };
6199
+ // Browsers may suspend animation frames. Exit disposal must still progress; sample the same springs, without truncating
6200
+ // their response or changing the shared GSAP scheduler.
6201
+ const pollExit = () => {
6202
+ exitTimer = undefined;
6203
+ if (destroyed || !completion)
6204
+ return;
6205
+ // Schedule first so completion or reopening can cancel the next poll.
6206
+ exitTimer = setTimeout(pollExit, 100);
6207
+ tick();
6208
+ };
6209
+ const settle = () => {
6210
+ each(finish);
6211
+ stop();
6212
+ flush();
6213
+ };
6214
+ const preferenceChanged = () => {
6215
+ if (media.matches && !destroyed)
6216
+ settle();
6217
+ };
6218
+ media.addEventListener('change', preferenceChanged);
6219
+ return {
6220
+ settle() {
6221
+ if (!destroyed)
6222
+ settle();
6223
+ },
6224
+ setOpen(open, animate = true, complete, spatial = FAST_SPATIAL_SPRING) {
6225
+ if (destroyed)
6226
+ return;
6227
+ cancelExitTimer();
6228
+ const time = now();
6229
+ completion = complete;
6230
+ retarget(scale, open ? 1 : 0.8, animate, time, undefined, spatial);
6231
+ retarget(opacity, Number(open), animate, time);
6232
+ flush();
6233
+ if (!open && completion && !destroyed)
6234
+ exitTimer = setTimeout(pollExit, 100);
6235
+ },
6236
+ setActive(active, animate = true) {
6237
+ if (destroyed)
6238
+ return;
6239
+ const style = panel.ownerDocument.defaultView?.getComputedStyle(panel);
6240
+ const initial = parseFloat(style?.borderRadius || style?.borderTopLeftRadius || '0') || 0;
6241
+ retarget(channel(panel, 'borderRadius', initial), active ? 16 : 8, animate, now());
6242
+ flush();
6243
+ },
6244
+ relocate(before, elements, animate = true, spatial = FAST_SPATIAL_SPRING, maxTravel) {
6245
+ if (destroyed)
6246
+ return;
6247
+ const time = now();
6248
+ const retained = new Set(elements);
6249
+ // Preserve velocities before clearing old translations to measure final
6250
+ // layout. FLIP rebases position into the new layout's coordinates only.
6251
+ for (const [element, channels] of springs) {
6252
+ if (element === panel)
6253
+ continue;
6254
+ for (const spring of channels.values()) {
6255
+ sample(spring, time);
6256
+ if (!retained.has(element) || !animate || media.matches)
6257
+ finish(spring);
6258
+ }
6259
+ gsap.set(element, { x: 0, y: 0 });
6260
+ }
6261
+ if (!animate || media.matches) {
6262
+ flush();
6263
+ return;
6264
+ }
6265
+ const after = snapshotMenuRects(elements);
6266
+ for (const element of elements) {
6267
+ const previous = before.get(element);
6268
+ const next = after.get(element);
6269
+ const dx = previous ? previous.left - next.left : 0;
6270
+ const dy = previous ? previous.top - next.top : 0;
6271
+ const limit = maxTravel ? Math.max(0, maxTravel(element)) : Number.POSITIVE_INFINITY;
6272
+ const rebased = Math.abs(dx) > limit || Math.abs(dy) > limit;
6273
+ const x = Math.max(-limit, Math.min(limit, dx));
6274
+ const y = Math.max(-limit, Math.min(limit, dy));
6275
+ if (previous && x === 0 && y === 0 && !springs.has(element))
6276
+ continue;
6277
+ remember(element, ['transform', 'translate', 'rotate', 'scale', 'opacity']);
6278
+ retarget(channel(element, 'x', x), 0, true, time, x, spatial);
6279
+ retarget(channel(element, 'y', y), 0, true, time, y, spatial);
6280
+ // Large list changes start near the destination and fade into that slot,
6281
+ // rather than sending readable text through newly inserted neighbours.
6282
+ retarget(channel(element, 'opacity', previous ? 1 : 0), 1, true, time, rebased ? 0 : undefined);
6283
+ }
6284
+ flush();
6285
+ },
6286
+ destroy() {
6287
+ if (destroyed)
6288
+ return;
6289
+ destroyed = true;
6290
+ completion = undefined;
6291
+ cancelExitTimer();
6292
+ stop();
6293
+ springs.clear();
6294
+ media.removeEventListener('change', preferenceChanged);
6295
+ for (const [element, styles] of saved) {
6296
+ gsap.set(element, { clearProps: [...styles.keys()].join(',') });
6297
+ for (const [property, [value, priority]] of styles) {
6298
+ if (value)
6299
+ element.style.setProperty(property, value, priority);
6300
+ }
6301
+ }
6302
+ saved.clear();
6303
+ },
6304
+ };
6305
+ }
6306
+
6307
+ /** @internal Rendering and Aria interaction surface; consumers use MatExpMenu. */
6308
+ class MatExpMenuSurface {
6309
+ owner = input.required(/* @ts-ignore */
6310
+ ...(ngDevMode ? [{ debugName: "owner" }] : /* istanbul ignore next */ []));
6311
+ items = input([], /* @ts-ignore */
6312
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
6313
+ root = input(false, /* @ts-ignore */
6314
+ ...(ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []));
6315
+ parentOrigin = input(/* @ts-ignore */
6316
+ ...(ngDevMode ? [undefined, { debugName: "parentOrigin" }] : /* istanbul ignore next */ []));
6317
+ parentMenu = input(/* @ts-ignore */
6318
+ ...(ngDevMode ? [undefined, { debugName: "parentMenu" }] : /* istanbul ignore next */ []));
6319
+ _menu = viewChild('menu', /* @ts-ignore */
6320
+ ...(ngDevMode ? [{ debugName: "_menu" }] : /* istanbul ignore next */ []));
6321
+ _shown = signal(false, /* @ts-ignore */
6322
+ ...(ngDevMode ? [{ debugName: "_shown" }] : /* istanbul ignore next */ []));
6323
+ _scrollable = signal(false, /* @ts-ignore */
6324
+ ...(ngDevMode ? [{ debugName: "_scrollable" }] : /* istanbul ignore next */ []));
6325
+ _focused = signal(true, /* @ts-ignore */
6326
+ ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
6327
+ _surface = viewChild.required('surface', /* @ts-ignore */
6328
+ ...(ngDevMode ? [{ debugName: "_surface" }] : /* istanbul ignore next */ []));
6329
+ _list = viewChild.required('list', /* @ts-ignore */
6330
+ ...(ngDevMode ? [{ debugName: "_list" }] : /* istanbul ignore next */ []));
6331
+ _input = viewChild('filter', /* @ts-ignore */
6332
+ ...(ngDevMode ? [{ debugName: "_input" }] : /* istanbul ignore next */ []));
6333
+ _host = inject(ElementRef);
6334
+ _overlay = inject(Overlay);
6335
+ _direction = inject(Directionality);
6336
+ _document = inject(DOCUMENT);
6337
+ _id = inject(_IdGenerator).getId('mat-exp-menu-panel-');
6338
+ _menuId = computed(() => this.root() && !this.owner().filterable() ? this.owner()._id : this._id, /* @ts-ignore */
6339
+ ...(ngDevMode ? [{ debugName: "_menuId" }] : /* istanbul ignore next */ []));
6340
+ _groups = computed(() => {
6341
+ const query = this.root() ? this.owner().query().trim().toLocaleLowerCase() : '';
6342
+ const groups = [];
6343
+ let loose = [];
6344
+ const flush = () => {
6345
+ if (loose.length) {
6346
+ groups.push({ id: 'items-' + groups.length, items: loose });
6347
+ loose = [];
6348
+ }
6349
+ };
6350
+ const matches = (item) => !query ||
6351
+ [item.label, item.supportingText, item.trailingText]
6352
+ .filter(Boolean)
6353
+ .join(' ')
6354
+ .toLocaleLowerCase()
6355
+ .includes(query);
6356
+ for (const entry of this.items()) {
6357
+ if (entry.type === 'group') {
6358
+ flush();
6359
+ const items = entry.items.filter(matches);
6360
+ if (items.length)
6361
+ groups.push({ id: entry.id, label: entry.label, items });
6362
+ }
6363
+ else if (matches(entry))
6364
+ loose.push(entry);
6365
+ }
6366
+ flush();
6367
+ return groups;
6368
+ }, /* @ts-ignore */
6369
+ ...(ngDevMode ? [{ debugName: "_groups" }] : /* istanbul ignore next */ []));
6370
+ _count = computed(() => this._groups().reduce((sum, group) => sum + group.items.length, 0), /* @ts-ignore */
6371
+ ...(ngDevMode ? [{ debugName: "_count" }] : /* istanbul ignore next */ []));
6372
+ _contentInjector = Injector.create({
6373
+ providers: [{ provide: MAT_EXP_MENU_SURFACE, useValue: this }],
6374
+ parent: inject(Injector),
6375
+ });
6376
+ _authoredItems = signal([], /* @ts-ignore */
6377
+ ...(ngDevMode ? [{ debugName: "_authoredItems" }] : /* istanbul ignore next */ []));
6378
+ _focusOptions = new QueryList();
6379
+ _keys = new FocusKeyManager(this._focusOptions)
6380
+ .withWrap()
6381
+ .withHomeAndEnd()
6382
+ .withTypeAhead()
6383
+ .skipPredicate(() => false);
6384
+ _focusMonitor = inject(FocusMonitor);
6385
+ _inputModality = inject(InputModalityDetector);
6386
+ _submenus = new Map();
6387
+ _contentCount = computed(() => this.owner()._content() ? this._authoredItems().length : this._count(), /* @ts-ignore */
6388
+ ...(ngDevMode ? [{ debugName: "_contentCount" }] : /* istanbul ignore next */ []));
6389
+ _resetPending = false;
6390
+ _motion;
6391
+ _overlayRef;
6392
+ _observer;
6393
+ _before;
6394
+ _wasOpen = false;
6395
+ _typeaheadDeadline = 0;
6396
+ _lastFocusedElement;
6397
+ _keyboardNavigation = false;
6398
+ _keyboardFocusedElement;
6399
+ _pointerPosition;
6400
+ _keyboardCapture = (event) => {
6401
+ if (event.isComposing ||
6402
+ event.target.closest('.mat-exp-menu-surface') !==
6403
+ this._surface().nativeElement)
6404
+ return;
6405
+ this._keyboardNavigation = true;
6406
+ this._markKeyboardFocus(this._document.activeElement);
6407
+ if (this._resetPending &&
6408
+ !this.owner()._content() &&
6409
+ (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
6410
+ this._resetPending = false;
6411
+ event.preventDefault();
6412
+ event.stopImmediatePropagation();
6413
+ this._menu()?.element.dispatchEvent(new KeyboardEvent('keydown', {
6414
+ key: event.key === 'ArrowDown' ? 'Home' : 'End',
6415
+ bubbles: true,
6416
+ }));
6417
+ }
6418
+ };
6419
+ _pointerMove = (event) => {
6420
+ const previous = this._pointerPosition;
6421
+ const moved = previous ? previous.x !== event.clientX || previous.y !== event.clientY : true;
6422
+ const resumeHover = moved && this._keyboardNavigation;
6423
+ if (moved) {
6424
+ this._keyboardNavigation = false;
6425
+ this._markKeyboardFocus(null);
6426
+ }
6427
+ this._pointerPosition = { x: event.clientX, y: event.clientY };
6428
+ if (resumeHover) {
6429
+ // mouseover precedes mousemove. Replay the hover after real movement proves
6430
+ // this is pointer input, not a row scrolling underneath a stationary mouse.
6431
+ event.target.dispatchEvent(new MouseEvent('mouseover', {
6432
+ bubbles: true,
6433
+ clientX: event.clientX,
6434
+ clientY: event.clientY,
6435
+ }));
6436
+ }
6437
+ };
6438
+ _hoverCapture = (event) => {
6439
+ const previous = this._pointerPosition;
6440
+ if (this._keyboardNavigation &&
6441
+ (!previous || (previous.x === event.clientX && previous.y === event.clientY))) {
6442
+ // Scrolling can put another row under a stationary pointer. Let Aria handle
6443
+ // deliberate hover, but don't let synthetic hover undo keyboard navigation.
6444
+ event.stopPropagation();
6445
+ return;
6446
+ }
6447
+ this._keyboardNavigation = false;
6448
+ this._markKeyboardFocus(null);
6449
+ this._pointerPosition = { x: event.clientX, y: event.clientY };
6450
+ };
6451
+ _pointerDown = (event) => {
6452
+ if (event.target.closest('.mat-exp-menu-surface') !==
6453
+ this._surface().nativeElement)
6454
+ return;
6455
+ this._keyboardNavigation = false;
6456
+ this._markKeyboardFocus(null);
6457
+ this._pointerPosition = { x: event.clientX, y: event.clientY };
6458
+ };
6459
+ // WebKit can retain pointer :focus-visible heuristics during arrow navigation.
6460
+ // Mark only this surface's actual focused row; never a merely active ancestor.
6461
+ _markKeyboardFocus(element) {
6462
+ const item = element instanceof HTMLElement ? element.closest('.mat-exp-menu-item') : null;
6463
+ const next = this._keyboardNavigation &&
6464
+ item?.closest('.mat-exp-menu-surface') === this._surface().nativeElement
6465
+ ? item
6466
+ : undefined;
6467
+ if (next === this._keyboardFocusedElement)
6468
+ return;
6469
+ this._keyboardFocusedElement?.removeAttribute('data-keyboard-focus');
6470
+ this._keyboardFocusedElement = next;
6471
+ next?.setAttribute('data-keyboard-focus', 'true');
6472
+ }
6473
+ constructor() {
6474
+ const host = this._host.nativeElement;
6475
+ host.addEventListener('keydown', this._keyboardCapture, true);
6476
+ host.addEventListener('mouseover', this._hoverCapture, true);
6477
+ host.addEventListener('mousemove', this._pointerMove, true);
6478
+ host.addEventListener('pointerdown', this._pointerDown, true);
6479
+ afterEveryRender(() => {
6480
+ if (this.owner()._content())
6481
+ this._syncAuthoredOrder();
6482
+ });
6483
+ afterRenderEffect(() => {
6484
+ const aria = this._menu();
6485
+ const open = this.root() || (!!aria?.parent() && !!aria.visible());
6486
+ const animate = this.owner().motion();
6487
+ untracked(() => {
6488
+ if (open === this._wasOpen) {
6489
+ if (!animate)
6490
+ this._motion?.settle();
6491
+ return;
6492
+ }
6493
+ this._wasOpen = open;
6494
+ if (open)
6495
+ this._enter();
6496
+ else
6497
+ this._exit(() => {
6498
+ this._shown.set(false);
6499
+ this._overlayRef?.detach();
6500
+ });
6501
+ });
6502
+ });
6503
+ afterRenderEffect(() => {
6504
+ this._groups();
6505
+ this.owner().maxHeight();
6506
+ this.owner().density();
6507
+ untracked(() => {
6508
+ if (!this._shown())
6509
+ return;
6510
+ this._measure();
6511
+ this._repairRemovedFocus();
6512
+ if (this._before) {
6513
+ this._motion?.relocate(this._before, this._itemElements(), this.owner().motion());
6514
+ this._before = undefined;
6515
+ }
6516
+ this._overlayRef?.updatePosition();
6517
+ });
6518
+ });
6519
+ inject(DestroyRef).onDestroy(() => {
6520
+ host.removeEventListener('keydown', this._keyboardCapture, true);
6521
+ host.removeEventListener('mouseover', this._hoverCapture, true);
6522
+ host.removeEventListener('mousemove', this._pointerMove, true);
6523
+ host.removeEventListener('pointerdown', this._pointerDown, true);
6524
+ this._keyboardFocusedElement?.removeAttribute('data-keyboard-focus');
6525
+ this._keys.destroy();
6526
+ this._contentInjector.destroy();
6527
+ this._motion?.destroy();
6528
+ this._observer?.disconnect();
6529
+ this._overlayRef?.dispose();
6530
+ });
6531
+ }
6532
+ _syncAuthoredOrder() {
6533
+ const sorted = [...this._authoredItems()].sort((a, b) => a._element.compareDocumentPosition(b._element) & 2 ? 1 : -1);
6534
+ const current = this._focusOptions.toArray();
6535
+ if (current.length === sorted.length &&
6536
+ current.every((option, index) => option.item === sorted[index]))
6537
+ return;
6538
+ const active = this._keys.activeItem?.item;
6539
+ this._focusOptions.reset(sorted.map((item) => ({
6540
+ item,
6541
+ focus: (origin) => item.focus(origin),
6542
+ getLabel: () => item.getLabel(),
6543
+ })));
6544
+ this._focusOptions.notifyOnChanges();
6545
+ if (active)
6546
+ this._keys.updateActiveItem(sorted.indexOf(active));
6547
+ sorted.forEach((item, index) => {
6548
+ item._element.setAttribute('data-first', String(index === 0));
6549
+ item._element.setAttribute('data-last', String(index === sorted.length - 1));
6550
+ });
6551
+ this._repairRemovedFocus();
6552
+ if (this._shown())
6553
+ this._measure();
6554
+ }
6555
+ _registerItem(item) {
6556
+ this._authoredItems.update((items) => [...items, item]);
6557
+ }
6558
+ _removeItem(item) {
6559
+ this._authoredItems.update((items) => items.filter((candidate) => candidate !== item));
6560
+ }
6561
+ _isSubmenuItem(element) {
6562
+ return this._submenus.has(element);
6563
+ }
6564
+ _registerSubmenu(element, trigger) {
6565
+ this._submenus.set(element, trigger);
6566
+ }
6567
+ _removeSubmenu(element) {
6568
+ this._submenus.delete(element);
6569
+ }
6570
+ _activateItem(item) {
6571
+ const index = this._focusOptions.toArray().findIndex((option) => option.item === item);
6572
+ this._keys.updateActiveItem(index);
6573
+ this.owner()._closeChild(item._element);
6574
+ }
6575
+ _hoverItem(item) {
6576
+ if (this._keyboardNavigation || item.disabled())
6577
+ return;
6578
+ item.focus('mouse');
6579
+ this._submenus.get(item._element)?._openFromHover();
6580
+ }
6581
+ _authoredKeydown(item, event) {
6582
+ if (event.isComposing)
6583
+ return;
6584
+ event.stopPropagation();
6585
+ const parent = this.owner()._parentMenu;
6586
+ const rtl = this._direction.value === 'rtl';
6587
+ if (event.key === 'Escape' || (parent && event.key === (rtl ? 'ArrowRight' : 'ArrowLeft'))) {
6588
+ event.preventDefault();
6589
+ this.owner().close('escape');
6590
+ return;
6591
+ }
6592
+ if (event.key === 'Tab') {
6593
+ this.owner()._closeTree('tab');
6594
+ return;
6595
+ }
6596
+ if (event.key === (rtl ? 'ArrowLeft' : 'ArrowRight')) {
6597
+ const trigger = this._submenus.get(item._element);
6598
+ if (trigger) {
6599
+ event.preventDefault();
6600
+ trigger.openMenu();
6601
+ }
6602
+ return;
6603
+ }
6604
+ if (event.key === 'Enter' || (event.key === ' ' && !this._keys.isTyping())) {
6605
+ if (item.disabled())
6606
+ event.preventDefault();
6607
+ else if (event.key === ' ' && item._element.tagName === 'A') {
6608
+ event.preventDefault();
6609
+ item._element.click();
6610
+ }
6611
+ return;
6612
+ }
6613
+ if (event.key === ' ' && this._keys.isTyping())
6614
+ event.preventDefault();
6615
+ this._keys.setFocusOrigin('keyboard').onKeydown(event);
6616
+ }
6617
+ _resetActiveItem() {
6618
+ this._resetPending = true;
6619
+ if (this.owner()._content())
6620
+ this._keys.updateActiveItem(-1);
6621
+ }
6622
+ _focusFirst(origin = 'program') {
6623
+ this._keyboardNavigation =
6624
+ origin === 'keyboard' ||
6625
+ (origin === 'program' && this._inputModality.mostRecentModality === 'keyboard');
6626
+ if (this.root() && this.owner().filterable())
6627
+ this._input()?.nativeElement.focus();
6628
+ else if (this.owner()._content()) {
6629
+ this._keys.setFocusOrigin(origin).setFirstItemActive();
6630
+ if (!this._keys.activeItem)
6631
+ this._menu()?.element.focus();
6632
+ }
6633
+ else {
6634
+ const element = this._itemElements()[0] ?? this._menu()?.element;
6635
+ if (element)
6636
+ this._focusMonitor.focusVia(element, origin, { preventScroll: true });
6637
+ }
6638
+ }
6639
+ _exit(done) {
6640
+ this._surface().nativeElement.inert = true;
6641
+ this._motion?.setOpen(false, this.owner().motion(), done);
6642
+ if (!this._motion)
6643
+ done();
6644
+ }
6645
+ _selected(id) {
6646
+ if (this.root())
6647
+ this.owner()._selectId(id);
6648
+ }
6649
+ _selectionClick(item, event) {
6650
+ if (item.disabled) {
6651
+ event.preventDefault();
6652
+ event.stopPropagation();
6653
+ return;
6654
+ }
6655
+ if (item.type === 'checkbox' || item.type === 'radio') {
6656
+ event.stopPropagation();
6657
+ this.owner()._select(item);
6658
+ }
6659
+ }
6660
+ _itemKeydown(item, event) {
6661
+ if (event.isComposing ||
6662
+ event.repeat ||
6663
+ event.altKey ||
6664
+ event.ctrlKey ||
6665
+ event.metaKey ||
6666
+ event.shiftKey)
6667
+ return;
6668
+ const now = Date.now();
6669
+ const typingSpace = event.key === ' ' && now < this._typeaheadDeadline;
6670
+ if (event.key.length === 1 && (event.key !== ' ' || typingSpace)) {
6671
+ // Aria owns the search buffer and navigation, but has no public isTyping
6672
+ // signal. Mirror only its public timeout so a space within a multiword
6673
+ // search reaches Aria instead of activating a persistent selection item.
6674
+ this._typeaheadDeadline = now + (this._menu()?.typeaheadDelay() ?? 500);
6675
+ return;
6676
+ }
6677
+ if (item.disabled && (event.key === 'Enter' || event.key === ' ')) {
6678
+ event.preventDefault();
6679
+ event.stopPropagation();
6680
+ }
6681
+ else if ((item.type === 'checkbox' || item.type === 'radio') &&
6682
+ (event.key === 'Enter' || event.key === ' ')) {
6683
+ // Leave native button activation intact; Aria retains every navigation key.
6684
+ event.stopPropagation();
6685
+ }
6686
+ }
6687
+ _keydown(event) {
6688
+ if (event.isComposing)
6689
+ return;
6690
+ const menu = event.target.closest('[ngMenu]');
6691
+ if (menu && menu !== this._menu()?.element)
6692
+ return;
6693
+ if (event.key === 'Escape' && this.root()) {
6694
+ // Dismiss the popup without allowing a search input's native Escape
6695
+ // behavior to clear its query while the animated surface remains mounted.
6696
+ event.preventDefault();
6697
+ event.stopPropagation();
6698
+ this.owner().close('escape');
6699
+ }
6700
+ if (event.key === 'Tab')
6701
+ this.owner()._closeTree('tab');
6702
+ }
6703
+ _filter(event) {
6704
+ this._before = snapshotMenuRects(this._itemElements());
6705
+ this.owner().query.set(event.target.value);
6706
+ }
6707
+ _filterKeydown(event) {
6708
+ if (event.isComposing)
6709
+ return;
6710
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
6711
+ event.preventDefault();
6712
+ const items = this._itemElements();
6713
+ if (items.length)
6714
+ this._menu()?.element.dispatchEvent(new KeyboardEvent('keydown', {
6715
+ key: event.key === 'ArrowDown' ? 'Home' : 'End',
6716
+ bubbles: true,
6717
+ }));
6718
+ }
6719
+ }
6720
+ _focusIn(event) {
6721
+ const target = event.target;
6722
+ if (target.closest('.mat-exp-menu-surface') === this._surface().nativeElement) {
6723
+ this._lastFocusedElement = target;
6724
+ this._markKeyboardFocus(target);
6725
+ target.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
6726
+ this._focused.set(true);
6727
+ this._motion?.setActive(true, this.owner().motion());
6728
+ }
6729
+ else {
6730
+ this._focused.set(false);
6731
+ this._motion?.setActive(false, this.owner().motion());
6732
+ }
6733
+ }
6734
+ _focusOut(event) {
6735
+ this._markKeyboardFocus(null);
6736
+ const next = event.relatedTarget;
6737
+ if (next instanceof HTMLElement &&
6738
+ next.closest('.mat-exp-menu-surface') !== this._surface().nativeElement) {
6739
+ this._focused.set(false);
6740
+ this._motion?.setActive(false, this.owner().motion());
6741
+ }
6742
+ }
6743
+ _pointerOut(event) {
6744
+ const next = event.relatedTarget;
6745
+ const surface = next instanceof HTMLElement ? next.closest('.mat-exp-menu-surface') : null;
6746
+ if (surface && surface !== this._surface().nativeElement) {
6747
+ this._focused.set(false);
6748
+ this._motion?.setActive(false, this.owner().motion());
6749
+ }
6750
+ }
6751
+ _pointer(event) {
6752
+ const own = event.target.closest('.mat-exp-menu-surface') ===
6753
+ this._surface().nativeElement;
6754
+ this._focused.set(own);
6755
+ this._motion?.setActive(own, this.owner().motion());
6756
+ }
6757
+ _enter() {
6758
+ const surface = this._surface().nativeElement;
6759
+ const win = this._document.defaultView;
6760
+ if (!win)
6761
+ return;
6762
+ const focusSubmenu = !this.root() && this._document.activeElement === this.parentOrigin();
6763
+ if (focusSubmenu)
6764
+ this._keyboardNavigation =
6765
+ this.parentOrigin()?.getAttribute('data-keyboard-focus') === 'true';
6766
+ this._shown.set(true);
6767
+ this._host.nativeElement.style.display = 'block';
6768
+ surface.inert = false;
6769
+ if (!this.root()) {
6770
+ const origin = this.parentOrigin();
6771
+ const parent = this.parentMenu();
6772
+ if (!origin || !parent)
6773
+ return;
6774
+ if (!this._overlayRef) {
6775
+ const offset = this._direction.value === 'rtl' ? -4 : 4;
6776
+ const strategy = this._overlay
6777
+ .position()
6778
+ .flexibleConnectedTo(origin)
6779
+ .withPositions([
6780
+ { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: offset },
6781
+ {
6782
+ originX: 'start',
6783
+ originY: 'top',
6784
+ overlayX: 'end',
6785
+ overlayY: 'top',
6786
+ offsetX: -offset,
6787
+ },
6788
+ {
6789
+ originX: 'end',
6790
+ originY: 'bottom',
6791
+ overlayX: 'start',
6792
+ overlayY: 'bottom',
6793
+ offsetX: offset,
6794
+ },
6795
+ {
6796
+ originX: 'start',
6797
+ originY: 'bottom',
6798
+ overlayX: 'end',
6799
+ overlayY: 'bottom',
6800
+ offsetX: -offset,
6801
+ },
6802
+ ])
6803
+ .withViewportMargin(8)
6804
+ .withFlexibleDimensions(false)
6805
+ .withPush(false)
6806
+ .withTransformOriginOn('.mat-exp-menu-surface')
6807
+ .withPopoverLocation({ type: 'parent', element: parent.element });
6808
+ this._overlayRef = this._overlay.create({
6809
+ positionStrategy: strategy,
6810
+ usePopover: true,
6811
+ direction: this._direction.value,
6812
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
6813
+ });
6814
+ }
6815
+ if (!this._overlayRef.hasAttached())
6816
+ this._overlayRef.attach(new DomPortal(this._host));
6817
+ }
6818
+ this._motion ??= createMenuMotion(surface, win.matchMedia('(prefers-reduced-motion: reduce)'));
6819
+ this._motion.setOpen(true, this.owner().motion());
6820
+ if (!this._observer && typeof ResizeObserver !== 'undefined') {
6821
+ this._observer = new ResizeObserver(() => this._measure());
6822
+ this._observer.observe(this._list().nativeElement);
6823
+ }
6824
+ this._measure();
6825
+ if (focusSubmenu)
6826
+ this._menu()
6827
+ ?.element.querySelector('[data-active="true"]')
6828
+ ?.focus({ preventScroll: true });
6829
+ }
6830
+ _measure() {
6831
+ const list = this._list().nativeElement;
6832
+ // scrollHeight includes transient FLIP translations. Measure flow boxes so
6833
+ // a ResizeObserver callback during reflow cannot latch a false scrollbar.
6834
+ const height = Array.from(list.children).reduce((total, child) => child instanceof HTMLElement &&
6835
+ child.matches('.mat-exp-menu-group, .mat-exp-menu-separator, .mat-exp-menu-empty')
6836
+ ? total + child.offsetHeight
6837
+ : total, 0);
6838
+ this._scrollable.set(height > list.clientHeight + 1);
6839
+ if (this.root())
6840
+ this.owner()._updatePosition();
6841
+ }
6842
+ _repairRemovedFocus() {
6843
+ const previous = this._lastFocusedElement;
6844
+ if (!previous ||
6845
+ previous.isConnected ||
6846
+ !this.owner().isOpen() ||
6847
+ this._surface().nativeElement.inert)
6848
+ return;
6849
+ this._lastFocusedElement = undefined;
6850
+ const current = this._document.activeElement;
6851
+ // Removing a focused node leaves the document body active. A still-connected
6852
+ // input or outside control owns its focus; data changes must not take it back.
6853
+ if (current && current !== this._document.body && current.isConnected)
6854
+ return;
6855
+ const menu = this._menu()?.element;
6856
+ if (this._itemElements().length) {
6857
+ // Use Aria's public keyboard surface so its active item and DOM focus agree.
6858
+ if (this.owner()._content())
6859
+ this._keys.setFirstItemActive();
6860
+ else
6861
+ menu?.dispatchEvent(new KeyboardEvent('keydown', { key: 'Home', bubbles: true }));
6862
+ }
6863
+ else {
6864
+ (this._input()?.nativeElement ?? menu)?.focus({ preventScroll: true });
6865
+ }
6866
+ }
6867
+ _itemElements() {
6868
+ return Array.from(this._list().nativeElement.querySelectorAll('.mat-exp-menu-item')).filter((element) => element.closest('[ngMenu]') === this._menu()?.element);
6869
+ }
6870
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuSurface, deps: [], target: i0.ɵɵFactoryTarget.Component });
6871
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpMenuSurface, isStandalone: true, selector: "mat-exp-menu-surface", inputs: { owner: { classPropertyName: "owner", publicName: "owner", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null }, parentOrigin: { classPropertyName: "parentOrigin", publicName: "parentOrigin", isSignal: true, isRequired: false, transformFunction: null }, parentMenu: { classPropertyName: "parentMenu", publicName: "parentMenu", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "_shown() ? \"block\" : \"none\"" } }, viewQueries: [{ propertyName: "_menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }, { propertyName: "_surface", first: true, predicate: ["surface"], descendants: true, isSignal: true }, { propertyName: "_list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "_input", first: true, predicate: ["filter"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- The surface delegates keyboard and pointer events from its focusable descendants. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n #surface\n class=\"mat-exp-menu-surface\"\n [class]=\"owner().panelClass()\"\n [attr.data-color]=\"owner().color()\"\n [attr.data-density]=\"owner().density()\"\n [attr.data-separation]=\"owner().separation()\"\n [attr.data-scrollable]=\"_scrollable()\"\n [attr.data-focused]=\"_focused()\"\n [attr.role]=\"root() && owner().filterable() ? 'dialog' : null\"\n [attr.id]=\"root() && owner().filterable() ? owner()._id : null\"\n [attr.aria-label]=\"\n root() && owner().filterable() ? (owner().ariaLabel() ?? owner().label()) : null\n \"\n (keydown)=\"_keydown($event)\"\n (focusin)=\"_focusIn($event)\"\n (focusout)=\"_focusOut($event)\"\n (blur)=\"_focusOut($event)\"\n (focus)=\"_focusIn($event)\"\n (mouseover)=\"_pointer($event)\"\n (mouseout)=\"_pointerOut($event)\"\n>\n @if (root() && owner().filterable()) {\n <div class=\"mat-exp-menu-filter\">\n <label [for]=\"owner()._id + '-filter'\">{{ owner().filterLabel() }}</label>\n <input\n #filter\n type=\"search\"\n autocomplete=\"off\"\n [id]=\"owner()._id + '-filter'\"\n [value]=\"owner().query()\"\n [attr.aria-controls]=\"_menuId()\"\n (input)=\"_filter($event)\"\n (keydown)=\"_filterKeydown($event)\"\n />\n </div>\n }\n <div\n ngMenu\n tabindex=\"-1\"\n #menu=\"ngMenu\"\n #list\n class=\"mat-exp-menu-list\"\n [attr.role]=\"_contentCount() ? 'menu' : 'group'\"\n [id]=\"_menuId()\"\n [attr.aria-label]=\"owner().ariaLabel() ?? owner().label()\"\n [attr.aria-labelledby]=\"owner().ariaLabelledby() || null\"\n [attr.aria-describedby]=\"owner().ariaDescribedby() || null\"\n [softDisabled]=\"true\"\n [style.max-height.px]=\"owner().maxHeight()\"\n (itemSelected)=\"_selected($event)\"\n (keydown)=\"_keydown($event)\"\n >\n @if (root() && owner()._content(); as content) {\n <div class=\"mat-exp-menu-group\" role=\"group\">\n <ng-container\n [ngTemplateOutlet]=\"content.template\"\n [ngTemplateOutletContext]=\"owner()._triggerData()\"\n [ngTemplateOutletInjector]=\"_contentInjector\"\n />\n </div>\n } @else {\n @for (group of _groups(); track group.id; let gi = $index) {\n @if (gi > 0) {\n <div class=\"mat-exp-menu-separator\" role=\"separator\"></div>\n }\n <div class=\"mat-exp-menu-group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div class=\"mat-exp-menu-group-label\" aria-hidden=\"true\">{{ group.label }}</div>\n }\n @for (item of group.items; track item.id; let first = $first; let last = $last) {\n @if (item.children?.length) {\n <button\n type=\"button\"\n ngMenuItem\n #origin\n class=\"mat-exp-menu-item\"\n matRipple\n [value]=\"item.id\"\n [searchTerm]=\"item.label\"\n [attr.aria-label]=\"owner()._itemTemplate() ? item.label : null\"\n [attr.aria-description]=\"\n [item.supportingText, item.trailingText, item.badge].join(' ').trim() || null\n \"\n [disabled]=\"!!item.disabled\"\n [matRippleDisabled]=\"!!item.disabled || !owner().motion()\"\n [submenu]=\"child._menu()\"\n [attr.data-first]=\"first\"\n [attr.data-last]=\"last\"\n (click)=\"_selectionClick(item, $event)\"\n (keydown)=\"_itemKeydown(item, $event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n <mat-icon\n class=\"mat-exp-menu-trailing-icon mat-exp-menu-submenu-arrow\"\n aria-hidden=\"true\"\n >chevron_right</mat-icon\n >\n </button>\n <mat-exp-menu-surface\n #child\n [owner]=\"owner()\"\n [items]=\"item.children!\"\n [parentOrigin]=\"origin\"\n [parentMenu]=\"menu\"\n />\n } @else {\n <button\n type=\"button\"\n ngMenuItem\n class=\"mat-exp-menu-item\"\n matRipple\n [value]=\"item.id\"\n [searchTerm]=\"item.label\"\n [attr.aria-label]=\"owner()._itemTemplate() ? item.label : null\"\n [attr.aria-description]=\"\n [item.supportingText, item.trailingText, item.badge].join(' ').trim() || null\n \"\n [disabled]=\"!!item.disabled\"\n [role]=\"\n item.type === 'checkbox'\n ? 'menuitemcheckbox'\n : item.type === 'radio'\n ? 'menuitemradio'\n : 'menuitem'\n \"\n [attr.aria-checked]=\"\n item.type === 'checkbox' || item.type === 'radio'\n ? owner().value().includes(item.id)\n : null\n \"\n [attr.data-first]=\"first\"\n [attr.data-last]=\"last\"\n [matRippleDisabled]=\"!!item.disabled || !owner().motion()\"\n (click)=\"_selectionClick(item, $event)\"\n (keydown)=\"_itemKeydown(item, $event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </button>\n }\n }\n </div>\n }\n }\n @if (!_contentCount()) {\n <div class=\"mat-exp-menu-empty\" role=\"presentation\">{{ owner().emptyLabel() }}</div>\n }\n </div>\n @if (root() && owner().filterable()) {\n <div class=\"mat-exp-menu-status\" role=\"status\" aria-live=\"polite\">\n {{ _count() }} {{ owner().filterLabel() }}\n </div>\n }\n</div>\n<ng-template #content let-item>\n @if (owner()._itemTemplate(); as custom) {\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item, selected: owner().value().includes(item.id) }\"\n />\n } @else {\n @if (item.icon) {\n <mat-icon class=\"mat-exp-menu-leading\" aria-hidden=\"true\">{{ item.icon }}</mat-icon>\n }\n <span class=\"mat-exp-menu-text\">\n <span class=\"mat-exp-menu-label\">{{ item.label }}</span>\n @if (item.supportingText) {\n <span class=\"mat-exp-menu-supporting\" aria-hidden=\"true\">{{ item.supportingText }}</span>\n }\n </span>\n @if (item.badge) {\n <span class=\"mat-exp-menu-badge\" aria-hidden=\"true\">{{ item.badge }}</span>\n }\n @if (item.trailingText) {\n <span class=\"mat-exp-menu-trailing-text\" aria-hidden=\"true\">{{ item.trailingText }}</span>\n }\n @if (item.trailingIcon) {\n <mat-icon class=\"mat-exp-menu-trailing-icon\" aria-hidden=\"true\">{{\n item.trailingIcon\n }}</mat-icon>\n }\n @if (item.type === 'checkbox' || item.type === 'radio') {\n <span class=\"mat-exp-menu-check\" aria-hidden=\"true\">{{\n owner().value().includes(item.id) ? '\u2713' : ''\n }}</span>\n }\n }\n</ng-template>\n", styles: [".mat-exp-menu-surface{--_menu-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));--_menu-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));--_menu-support: var(--mat-exp-menu-supporting-color, var(--mat-sys-on-surface-variant));--_menu-icon: var(--mat-exp-menu-icon-color, var(--mat-sys-on-surface-variant));--_menu-interactive-icon: var(--_menu-icon);--_menu-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary-container));--_menu-on-selected: var( --mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary-container) );--_menu-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));--_menu-disabled: var(--mat-exp-menu-disabled-content-color, var(--mat-sys-on-surface));--_menu-target-height: 3rem;--_menu-block-padding: .5rem;display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(var(--mat-exp-menu-min-width, 7rem),100vw - 1rem);max-inline-size:min(var(--mat-exp-menu-max-width, 24rem),100vw - 1rem);max-block-size:calc(100dvh - 1rem);border-radius:var(--mat-exp-menu-container-shape, 1rem);background:var(--_menu-surface);color:var(--_menu-label);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2));font-family:var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));font-size:var(--mat-exp-menu-label-size, .875rem);font-weight:var(--mat-exp-menu-label-weight, 500);line-height:var(--mat-exp-menu-label-line-height, 1.25rem);letter-spacing:var(--mat-exp-menu-label-tracking, .00625rem);text-align:start;isolation:isolate}.mat-exp-menu-surface[data-focused=false]{border-radius:var(--mat-exp-menu-inactive-shape, .5rem)}.mat-exp-menu-surface[data-color=vibrant]{--_menu-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));--_menu-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));--_menu-support: var(--mat-exp-menu-supporting-color, var(--mat-sys-on-tertiary-container));--_menu-icon: var(--mat-exp-menu-icon-color, var(--mat-sys-on-tertiary-container));--_menu-interactive-icon: var(--mat-exp-menu-interactive-icon-color, var(--mat-sys-tertiary));--_menu-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));--_menu-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));--_menu-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container));--_menu-disabled: var( --mat-exp-menu-disabled-content-color, var(--mat-sys-on-tertiary-container) )}.mat-exp-menu-surface[data-density=\"-1\"]{--_menu-target-height: 2.75rem;--_menu-block-padding: .375rem}.mat-exp-menu-surface[data-density=\"-2\"]{--_menu-target-height: 2.5rem;--_menu-block-padding: .25rem}.mat-exp-menu-surface[data-density=\"-3\"]{--_menu-target-height: 2.25rem;--_menu-block-padding: .125rem}.mat-exp-menu-list{box-sizing:border-box;min-block-size:0;min-inline-size:0;overflow-y:hidden;overflow-x:hidden;overscroll-behavior:contain;border-radius:inherit;padding:0;scrollbar-color:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--_menu-surface)}.mat-exp-menu-surface:not([data-separation=gap]),.mat-exp-menu-surface[data-scrollable=true]{overflow:hidden}.mat-exp-menu-surface[data-scrollable=true]>.mat-exp-menu-list{overflow-y:scroll;scrollbar-gutter:stable}@supports selector(::-webkit-scrollbar){.mat-exp-menu-list{scrollbar-color:auto;scrollbar-width:auto}}.mat-exp-menu-list::-webkit-scrollbar-button{display:none}.mat-exp-menu-list::-webkit-scrollbar{width:var(--mat-exp-menu-scrollbar-width, .75rem)}.mat-exp-menu-list::-webkit-scrollbar-track{margin-block:.25rem;background:var(--_menu-surface)}.mat-exp-menu-list::-webkit-scrollbar-thumb{border:3px solid var(--_menu-surface);border-radius:.75rem;background:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline))}.mat-exp-menu-group{display:flow-root;padding:var(--mat-exp-menu-group-padding, .125rem);min-inline-size:0;border-radius:var(--mat-exp-menu-group-shape, .5rem);background:var(--_menu-surface)}.mat-exp-menu-separator{box-sizing:border-box;block-size:var(--mat-exp-menu-gap, .125rem);flex:0 0 auto;border-block-start:1px solid var(--mat-exp-menu-divider-color, var(--mat-sys-outline-variant))}.mat-exp-menu-group-label{display:flex;align-items:center;box-sizing:border-box;min-block-size:var(--mat-exp-menu-group-label-height, 2rem);padding-inline:var(--mat-exp-menu-item-inline-padding, 1rem);padding-block:.25rem;color:var(--_menu-support);overflow-wrap:anywhere}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true]){background:transparent;box-shadow:none}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-list{display:flex;flex-direction:column;gap:0;padding:0;overflow:visible}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-list>.mat-exp-menu-group{flex-shrink:0;padding:var(--mat-exp-menu-group-padding, .125rem);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2))}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-list>.mat-exp-menu-separator{block-size:var(--mat-exp-menu-gap, .125rem);border:0}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-filter{margin-block-end:var(--mat-exp-menu-gap, .125rem);border-radius:var(--mat-exp-menu-group-shape, .5rem)}.mat-exp-menu-item{--_menu-item-background: transparent;--_menu-item-foreground: var(--_menu-label);--_menu-item-support: var(--_menu-support);--_menu-item-icon: var(--_menu-icon);--_menu-item-layer: var(--_menu-state);--_menu-item-opacity: 1;--_menu-container-opacity: 1;--_menu-state-opacity: 0;--mat-ripple-color: color-mix(in srgb, var(--_menu-item-layer) 10%, transparent);position:relative;display:flex;align-items:center;box-sizing:border-box;inline-size:100%;min-inline-size:0;min-block-size:var(--mat-exp-menu-item-target-height, var(--_menu-target-height));gap:var(--mat-exp-menu-item-gap, .75rem);margin:0;padding-block:var(--mat-exp-menu-item-block-padding, var(--_menu-block-padding));padding-inline:var(--mat-exp-menu-item-inline-padding, 1rem);border:0;border-radius:var(--mat-exp-menu-item-shape, .25rem);outline:none;background:transparent;color:var(--_menu-item-foreground);font:inherit;letter-spacing:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;isolation:isolate}.mat-exp-menu-item:before,.mat-exp-menu-item:after{position:absolute;inset:.125rem 0;z-index:-1;border-radius:inherit;pointer-events:none;content:\"\"}.mat-exp-menu-item:before{background:var(--_menu-item-background);opacity:var(--_menu-container-opacity)}.mat-exp-menu-item:after{background:var(--_menu-item-layer);opacity:var(--_menu-state-opacity)}.mat-exp-menu-item[data-first=true]{border-start-start-radius:var(--mat-exp-menu-item-outer-shape, .75rem);border-start-end-radius:var(--mat-exp-menu-item-outer-shape, .75rem)}.mat-exp-menu-item[data-last=true]{border-end-start-radius:var(--mat-exp-menu-item-outer-shape, .75rem);border-end-end-radius:var(--mat-exp-menu-item-outer-shape, .75rem)}.mat-exp-menu-item:where(:hover,[aria-expanded=true]):not([aria-disabled=true]){--_menu-state-opacity: .08;--_menu-item-icon: var(--_menu-interactive-icon)}.mat-exp-menu-item:where(:focus-visible,[data-keyboard-focus=true],:active):not([aria-disabled=true]){--_menu-state-opacity: .1;--_menu-item-icon: var(--_menu-interactive-icon)}.mat-exp-menu-item[aria-checked=true]{--_menu-item-background: var(--_menu-selected);--_menu-item-foreground: var(--_menu-on-selected);--_menu-item-support: var(--_menu-on-selected);--_menu-item-icon: var(--_menu-on-selected);--_menu-item-layer: var(--_menu-on-selected);border-radius:var(--mat-exp-menu-selected-shape, .75rem)}.mat-exp-menu-item[aria-disabled=true]{--_menu-item-foreground: var(--_menu-disabled);--_menu-item-support: var(--_menu-disabled);--_menu-item-icon: var(--_menu-disabled);--_menu-item-opacity: .38;cursor:default}.mat-exp-menu-item[aria-disabled=true][aria-checked=true]{--_menu-item-foreground: var(--_menu-on-selected);--_menu-item-support: var(--_menu-on-selected);--_menu-item-icon: var(--_menu-on-selected);--_menu-container-opacity: .38}.mat-exp-menu-item:where(:focus-visible,[data-keyboard-focus=true]){outline:var(--mat-exp-menu-focus-width, 3px) solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:var(--mat-exp-menu-focus-offset, -3px)}.mat-exp-menu-item>*{opacity:var(--_menu-item-opacity)}.mat-exp-menu-surface[data-color=vibrant] .mat-exp-menu-item[aria-disabled=true][aria-checked=true]{--_menu-container-opacity: 1}.mat-exp-menu-leading,.mat-exp-menu-trailing-icon,.mat-exp-menu-check{flex:none;inline-size:var(--mat-exp-menu-icon-size, 1.25rem);block-size:var(--mat-exp-menu-icon-size, 1.25rem);font-size:var(--mat-exp-menu-icon-size, 1.25rem);line-height:1;color:var(--_menu-item-icon)}.mat-exp-menu-submenu-arrow:dir(rtl){transform:scaleX(-1)}.mat-exp-menu-text{display:flex;flex:1;flex-direction:column;min-inline-size:0;overflow-wrap:anywhere}.mat-exp-menu-label{color:var(--_menu-item-foreground)}.mat-exp-menu-supporting{color:var(--_menu-item-support);font-family:var(--mat-exp-menu-supporting-font, var(--mat-sys-body-small-font, sans-serif));font-size:var(--mat-exp-menu-supporting-size, .75rem);font-weight:var(--mat-exp-menu-supporting-weight, 400);line-height:var(--mat-exp-menu-supporting-line-height, 1rem);letter-spacing:var(--mat-exp-menu-supporting-tracking, .025rem)}.mat-exp-menu-trailing-text{flex:0 1 auto;min-inline-size:0;color:var(--_menu-item-support);overflow-wrap:anywhere;text-align:end}.mat-exp-menu-badge{display:inline-flex;flex:none;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1rem;padding-inline:.25rem;border-radius:var(--mat-exp-menu-badge-shape, 1rem);background:var(--mat-exp-menu-badge-color, var(--mat-sys-error));color:var(--mat-exp-menu-badge-text-color, var(--mat-sys-on-error));font:var(--mat-sys-label-small)}.mat-exp-menu-filter{display:flex;flex:none;flex-direction:column;box-sizing:border-box;min-inline-size:0;padding:.5rem 1rem;border-radius:inherit;background:var(--_menu-surface);color:var(--_menu-support)}.mat-exp-menu-filter input{box-sizing:border-box;inline-size:100%;min-inline-size:0;min-block-size:3rem;padding:.5rem;border:1px solid var(--mat-exp-menu-filter-outline-color, var(--mat-sys-outline));border-radius:.25rem;background:transparent;color:var(--_menu-label);caret-color:var(--mat-sys-primary);font:inherit}.mat-exp-menu-filter input:focus-visible{outline:3px solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:-3px}.mat-exp-menu-filter input::placeholder{color:var(--_menu-support);opacity:1}.mat-exp-menu-empty{padding:1rem;color:var(--_menu-support);overflow-wrap:anywhere}.mat-exp-menu-status{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(forced-colors:active){.mat-exp-menu-list{scrollbar-color:auto}.mat-exp-menu-list::-webkit-scrollbar-track{background:Canvas}.mat-exp-menu-list::-webkit-scrollbar-thumb{border-color:Canvas;background:CanvasText}.mat-exp-menu-surface,.mat-exp-menu-group,.mat-exp-menu-filter{border:1px solid CanvasText}.mat-exp-menu-item[aria-checked=true]{--_menu-item-background: Highlight;--_menu-item-foreground: HighlightText;--_menu-item-support: HighlightText;--_menu-item-icon: HighlightText;forced-color-adjust:none}.mat-exp-menu-item[aria-disabled=true]{--_menu-item-foreground: GrayText;--_menu-item-support: GrayText;--_menu-item-icon: GrayText;--_menu-item-opacity: 1;--_menu-container-opacity: 1}.mat-exp-menu-item:where(:focus-visible,[data-keyboard-focus=true]),.mat-exp-menu-filter input:focus-visible{outline-color:Highlight}.mat-exp-menu-item[aria-checked=true]:where(:focus-visible,[data-keyboard-focus=true]){outline-color:CanvasText}.mat-exp-menu-separator{border-block-start-color:CanvasText}}@media(prefers-reduced-motion:reduce){.mat-exp-menu-item .mat-ripple-element{transition:none!important}}.mat-exp-menu-authored-item>mat-icon{flex:none;width:1.25rem;height:1.25rem;font-size:1.25rem;color:var(--_menu-item-icon)}.mat-exp-menu-authored-item[aria-disabled=true]{color:color-mix(in srgb,var(--_menu-item-foreground) 38%,transparent)}.mat-exp-menu-authored-item[aria-disabled=true]>*{opacity:1}.mat-exp-menu-authored-item[aria-disabled=true]>mat-icon{color:color-mix(in srgb,var(--_menu-item-icon) 38%,transparent)}.mat-exp-menu-authored-item[aria-disabled=true]>:is(.mat-exp-menu-text,.mat-exp-menu-label,.mat-exp-menu-supporting,.mat-exp-menu-trailing-text,.mat-exp-menu-leading,.mat-exp-menu-trailing-icon,.mat-exp-menu-check,.mat-exp-menu-badge){opacity:var(--_menu-item-opacity)}.mat-exp-menu-authored-item[aria-disabled=true]>.mat-exp-menu-text{color:var(--_menu-item-foreground)}.mat-exp-menu-authored-item[aria-disabled=true]>mat-icon:is(.mat-exp-menu-leading,.mat-exp-menu-trailing-icon,.mat-exp-menu-check){color:var(--_menu-item-icon)}\n"], dependencies: [{ kind: "component", type: MatExpMenuSurface, selector: "mat-exp-menu-surface", inputs: ["owner", "items", "root", "parentOrigin", "parentMenu"] }, { kind: "directive", type: Menu, selector: "[ngMenu]", inputs: ["id", "wrap", "typeaheadDelay", "disabled", "softDisabled", "expansionDelay"], outputs: ["itemSelected"], exportAs: ["ngMenu"] }, { kind: "directive", type: MenuItem, selector: "[ngMenuItem]", inputs: ["id", "value", "disabled", "searchTerm", "role", "submenu"], outputs: ["searchTermChange"], exportAs: ["ngMenuItem"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6872
+ }
6873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuSurface, decorators: [{
6874
+ type: Component,
6875
+ args: [{ selector: 'mat-exp-menu-surface', imports: [Menu, MenuItem, NgTemplateOutlet, MatIcon, MatRipple], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { '[style.display]': '_shown() ? "block" : "none"' }, template: "<!-- The surface delegates keyboard and pointer events from its focusable descendants. -->\n<!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n<div\n #surface\n class=\"mat-exp-menu-surface\"\n [class]=\"owner().panelClass()\"\n [attr.data-color]=\"owner().color()\"\n [attr.data-density]=\"owner().density()\"\n [attr.data-separation]=\"owner().separation()\"\n [attr.data-scrollable]=\"_scrollable()\"\n [attr.data-focused]=\"_focused()\"\n [attr.role]=\"root() && owner().filterable() ? 'dialog' : null\"\n [attr.id]=\"root() && owner().filterable() ? owner()._id : null\"\n [attr.aria-label]=\"\n root() && owner().filterable() ? (owner().ariaLabel() ?? owner().label()) : null\n \"\n (keydown)=\"_keydown($event)\"\n (focusin)=\"_focusIn($event)\"\n (focusout)=\"_focusOut($event)\"\n (blur)=\"_focusOut($event)\"\n (focus)=\"_focusIn($event)\"\n (mouseover)=\"_pointer($event)\"\n (mouseout)=\"_pointerOut($event)\"\n>\n @if (root() && owner().filterable()) {\n <div class=\"mat-exp-menu-filter\">\n <label [for]=\"owner()._id + '-filter'\">{{ owner().filterLabel() }}</label>\n <input\n #filter\n type=\"search\"\n autocomplete=\"off\"\n [id]=\"owner()._id + '-filter'\"\n [value]=\"owner().query()\"\n [attr.aria-controls]=\"_menuId()\"\n (input)=\"_filter($event)\"\n (keydown)=\"_filterKeydown($event)\"\n />\n </div>\n }\n <div\n ngMenu\n tabindex=\"-1\"\n #menu=\"ngMenu\"\n #list\n class=\"mat-exp-menu-list\"\n [attr.role]=\"_contentCount() ? 'menu' : 'group'\"\n [id]=\"_menuId()\"\n [attr.aria-label]=\"owner().ariaLabel() ?? owner().label()\"\n [attr.aria-labelledby]=\"owner().ariaLabelledby() || null\"\n [attr.aria-describedby]=\"owner().ariaDescribedby() || null\"\n [softDisabled]=\"true\"\n [style.max-height.px]=\"owner().maxHeight()\"\n (itemSelected)=\"_selected($event)\"\n (keydown)=\"_keydown($event)\"\n >\n @if (root() && owner()._content(); as content) {\n <div class=\"mat-exp-menu-group\" role=\"group\">\n <ng-container\n [ngTemplateOutlet]=\"content.template\"\n [ngTemplateOutletContext]=\"owner()._triggerData()\"\n [ngTemplateOutletInjector]=\"_contentInjector\"\n />\n </div>\n } @else {\n @for (group of _groups(); track group.id; let gi = $index) {\n @if (gi > 0) {\n <div class=\"mat-exp-menu-separator\" role=\"separator\"></div>\n }\n <div class=\"mat-exp-menu-group\" role=\"group\" [attr.aria-label]=\"group.label || null\">\n @if (group.label) {\n <div class=\"mat-exp-menu-group-label\" aria-hidden=\"true\">{{ group.label }}</div>\n }\n @for (item of group.items; track item.id; let first = $first; let last = $last) {\n @if (item.children?.length) {\n <button\n type=\"button\"\n ngMenuItem\n #origin\n class=\"mat-exp-menu-item\"\n matRipple\n [value]=\"item.id\"\n [searchTerm]=\"item.label\"\n [attr.aria-label]=\"owner()._itemTemplate() ? item.label : null\"\n [attr.aria-description]=\"\n [item.supportingText, item.trailingText, item.badge].join(' ').trim() || null\n \"\n [disabled]=\"!!item.disabled\"\n [matRippleDisabled]=\"!!item.disabled || !owner().motion()\"\n [submenu]=\"child._menu()\"\n [attr.data-first]=\"first\"\n [attr.data-last]=\"last\"\n (click)=\"_selectionClick(item, $event)\"\n (keydown)=\"_itemKeydown(item, $event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n <mat-icon\n class=\"mat-exp-menu-trailing-icon mat-exp-menu-submenu-arrow\"\n aria-hidden=\"true\"\n >chevron_right</mat-icon\n >\n </button>\n <mat-exp-menu-surface\n #child\n [owner]=\"owner()\"\n [items]=\"item.children!\"\n [parentOrigin]=\"origin\"\n [parentMenu]=\"menu\"\n />\n } @else {\n <button\n type=\"button\"\n ngMenuItem\n class=\"mat-exp-menu-item\"\n matRipple\n [value]=\"item.id\"\n [searchTerm]=\"item.label\"\n [attr.aria-label]=\"owner()._itemTemplate() ? item.label : null\"\n [attr.aria-description]=\"\n [item.supportingText, item.trailingText, item.badge].join(' ').trim() || null\n \"\n [disabled]=\"!!item.disabled\"\n [role]=\"\n item.type === 'checkbox'\n ? 'menuitemcheckbox'\n : item.type === 'radio'\n ? 'menuitemradio'\n : 'menuitem'\n \"\n [attr.aria-checked]=\"\n item.type === 'checkbox' || item.type === 'radio'\n ? owner().value().includes(item.id)\n : null\n \"\n [attr.data-first]=\"first\"\n [attr.data-last]=\"last\"\n [matRippleDisabled]=\"!!item.disabled || !owner().motion()\"\n (click)=\"_selectionClick(item, $event)\"\n (keydown)=\"_itemKeydown(item, $event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </button>\n }\n }\n </div>\n }\n }\n @if (!_contentCount()) {\n <div class=\"mat-exp-menu-empty\" role=\"presentation\">{{ owner().emptyLabel() }}</div>\n }\n </div>\n @if (root() && owner().filterable()) {\n <div class=\"mat-exp-menu-status\" role=\"status\" aria-live=\"polite\">\n {{ _count() }} {{ owner().filterLabel() }}\n </div>\n }\n</div>\n<ng-template #content let-item>\n @if (owner()._itemTemplate(); as custom) {\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item, selected: owner().value().includes(item.id) }\"\n />\n } @else {\n @if (item.icon) {\n <mat-icon class=\"mat-exp-menu-leading\" aria-hidden=\"true\">{{ item.icon }}</mat-icon>\n }\n <span class=\"mat-exp-menu-text\">\n <span class=\"mat-exp-menu-label\">{{ item.label }}</span>\n @if (item.supportingText) {\n <span class=\"mat-exp-menu-supporting\" aria-hidden=\"true\">{{ item.supportingText }}</span>\n }\n </span>\n @if (item.badge) {\n <span class=\"mat-exp-menu-badge\" aria-hidden=\"true\">{{ item.badge }}</span>\n }\n @if (item.trailingText) {\n <span class=\"mat-exp-menu-trailing-text\" aria-hidden=\"true\">{{ item.trailingText }}</span>\n }\n @if (item.trailingIcon) {\n <mat-icon class=\"mat-exp-menu-trailing-icon\" aria-hidden=\"true\">{{\n item.trailingIcon\n }}</mat-icon>\n }\n @if (item.type === 'checkbox' || item.type === 'radio') {\n <span class=\"mat-exp-menu-check\" aria-hidden=\"true\">{{\n owner().value().includes(item.id) ? '\u2713' : ''\n }}</span>\n }\n }\n</ng-template>\n", styles: [".mat-exp-menu-surface{--_menu-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));--_menu-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));--_menu-support: var(--mat-exp-menu-supporting-color, var(--mat-sys-on-surface-variant));--_menu-icon: var(--mat-exp-menu-icon-color, var(--mat-sys-on-surface-variant));--_menu-interactive-icon: var(--_menu-icon);--_menu-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary-container));--_menu-on-selected: var( --mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary-container) );--_menu-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));--_menu-disabled: var(--mat-exp-menu-disabled-content-color, var(--mat-sys-on-surface));--_menu-target-height: 3rem;--_menu-block-padding: .5rem;display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(var(--mat-exp-menu-min-width, 7rem),100vw - 1rem);max-inline-size:min(var(--mat-exp-menu-max-width, 24rem),100vw - 1rem);max-block-size:calc(100dvh - 1rem);border-radius:var(--mat-exp-menu-container-shape, 1rem);background:var(--_menu-surface);color:var(--_menu-label);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2));font-family:var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));font-size:var(--mat-exp-menu-label-size, .875rem);font-weight:var(--mat-exp-menu-label-weight, 500);line-height:var(--mat-exp-menu-label-line-height, 1.25rem);letter-spacing:var(--mat-exp-menu-label-tracking, .00625rem);text-align:start;isolation:isolate}.mat-exp-menu-surface[data-focused=false]{border-radius:var(--mat-exp-menu-inactive-shape, .5rem)}.mat-exp-menu-surface[data-color=vibrant]{--_menu-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));--_menu-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));--_menu-support: var(--mat-exp-menu-supporting-color, var(--mat-sys-on-tertiary-container));--_menu-icon: var(--mat-exp-menu-icon-color, var(--mat-sys-on-tertiary-container));--_menu-interactive-icon: var(--mat-exp-menu-interactive-icon-color, var(--mat-sys-tertiary));--_menu-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));--_menu-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));--_menu-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container));--_menu-disabled: var( --mat-exp-menu-disabled-content-color, var(--mat-sys-on-tertiary-container) )}.mat-exp-menu-surface[data-density=\"-1\"]{--_menu-target-height: 2.75rem;--_menu-block-padding: .375rem}.mat-exp-menu-surface[data-density=\"-2\"]{--_menu-target-height: 2.5rem;--_menu-block-padding: .25rem}.mat-exp-menu-surface[data-density=\"-3\"]{--_menu-target-height: 2.25rem;--_menu-block-padding: .125rem}.mat-exp-menu-list{box-sizing:border-box;min-block-size:0;min-inline-size:0;overflow-y:hidden;overflow-x:hidden;overscroll-behavior:contain;border-radius:inherit;padding:0;scrollbar-color:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--_menu-surface)}.mat-exp-menu-surface:not([data-separation=gap]),.mat-exp-menu-surface[data-scrollable=true]{overflow:hidden}.mat-exp-menu-surface[data-scrollable=true]>.mat-exp-menu-list{overflow-y:scroll;scrollbar-gutter:stable}@supports selector(::-webkit-scrollbar){.mat-exp-menu-list{scrollbar-color:auto;scrollbar-width:auto}}.mat-exp-menu-list::-webkit-scrollbar-button{display:none}.mat-exp-menu-list::-webkit-scrollbar{width:var(--mat-exp-menu-scrollbar-width, .75rem)}.mat-exp-menu-list::-webkit-scrollbar-track{margin-block:.25rem;background:var(--_menu-surface)}.mat-exp-menu-list::-webkit-scrollbar-thumb{border:3px solid var(--_menu-surface);border-radius:.75rem;background:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline))}.mat-exp-menu-group{display:flow-root;padding:var(--mat-exp-menu-group-padding, .125rem);min-inline-size:0;border-radius:var(--mat-exp-menu-group-shape, .5rem);background:var(--_menu-surface)}.mat-exp-menu-separator{box-sizing:border-box;block-size:var(--mat-exp-menu-gap, .125rem);flex:0 0 auto;border-block-start:1px solid var(--mat-exp-menu-divider-color, var(--mat-sys-outline-variant))}.mat-exp-menu-group-label{display:flex;align-items:center;box-sizing:border-box;min-block-size:var(--mat-exp-menu-group-label-height, 2rem);padding-inline:var(--mat-exp-menu-item-inline-padding, 1rem);padding-block:.25rem;color:var(--_menu-support);overflow-wrap:anywhere}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true]){background:transparent;box-shadow:none}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-list{display:flex;flex-direction:column;gap:0;padding:0;overflow:visible}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-list>.mat-exp-menu-group{flex-shrink:0;padding:var(--mat-exp-menu-group-padding, .125rem);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2))}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-list>.mat-exp-menu-separator{block-size:var(--mat-exp-menu-gap, .125rem);border:0}.mat-exp-menu-surface[data-separation=gap]:not([data-scrollable=true])>.mat-exp-menu-filter{margin-block-end:var(--mat-exp-menu-gap, .125rem);border-radius:var(--mat-exp-menu-group-shape, .5rem)}.mat-exp-menu-item{--_menu-item-background: transparent;--_menu-item-foreground: var(--_menu-label);--_menu-item-support: var(--_menu-support);--_menu-item-icon: var(--_menu-icon);--_menu-item-layer: var(--_menu-state);--_menu-item-opacity: 1;--_menu-container-opacity: 1;--_menu-state-opacity: 0;--mat-ripple-color: color-mix(in srgb, var(--_menu-item-layer) 10%, transparent);position:relative;display:flex;align-items:center;box-sizing:border-box;inline-size:100%;min-inline-size:0;min-block-size:var(--mat-exp-menu-item-target-height, var(--_menu-target-height));gap:var(--mat-exp-menu-item-gap, .75rem);margin:0;padding-block:var(--mat-exp-menu-item-block-padding, var(--_menu-block-padding));padding-inline:var(--mat-exp-menu-item-inline-padding, 1rem);border:0;border-radius:var(--mat-exp-menu-item-shape, .25rem);outline:none;background:transparent;color:var(--_menu-item-foreground);font:inherit;letter-spacing:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;isolation:isolate}.mat-exp-menu-item:before,.mat-exp-menu-item:after{position:absolute;inset:.125rem 0;z-index:-1;border-radius:inherit;pointer-events:none;content:\"\"}.mat-exp-menu-item:before{background:var(--_menu-item-background);opacity:var(--_menu-container-opacity)}.mat-exp-menu-item:after{background:var(--_menu-item-layer);opacity:var(--_menu-state-opacity)}.mat-exp-menu-item[data-first=true]{border-start-start-radius:var(--mat-exp-menu-item-outer-shape, .75rem);border-start-end-radius:var(--mat-exp-menu-item-outer-shape, .75rem)}.mat-exp-menu-item[data-last=true]{border-end-start-radius:var(--mat-exp-menu-item-outer-shape, .75rem);border-end-end-radius:var(--mat-exp-menu-item-outer-shape, .75rem)}.mat-exp-menu-item:where(:hover,[aria-expanded=true]):not([aria-disabled=true]){--_menu-state-opacity: .08;--_menu-item-icon: var(--_menu-interactive-icon)}.mat-exp-menu-item:where(:focus-visible,[data-keyboard-focus=true],:active):not([aria-disabled=true]){--_menu-state-opacity: .1;--_menu-item-icon: var(--_menu-interactive-icon)}.mat-exp-menu-item[aria-checked=true]{--_menu-item-background: var(--_menu-selected);--_menu-item-foreground: var(--_menu-on-selected);--_menu-item-support: var(--_menu-on-selected);--_menu-item-icon: var(--_menu-on-selected);--_menu-item-layer: var(--_menu-on-selected);border-radius:var(--mat-exp-menu-selected-shape, .75rem)}.mat-exp-menu-item[aria-disabled=true]{--_menu-item-foreground: var(--_menu-disabled);--_menu-item-support: var(--_menu-disabled);--_menu-item-icon: var(--_menu-disabled);--_menu-item-opacity: .38;cursor:default}.mat-exp-menu-item[aria-disabled=true][aria-checked=true]{--_menu-item-foreground: var(--_menu-on-selected);--_menu-item-support: var(--_menu-on-selected);--_menu-item-icon: var(--_menu-on-selected);--_menu-container-opacity: .38}.mat-exp-menu-item:where(:focus-visible,[data-keyboard-focus=true]){outline:var(--mat-exp-menu-focus-width, 3px) solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:var(--mat-exp-menu-focus-offset, -3px)}.mat-exp-menu-item>*{opacity:var(--_menu-item-opacity)}.mat-exp-menu-surface[data-color=vibrant] .mat-exp-menu-item[aria-disabled=true][aria-checked=true]{--_menu-container-opacity: 1}.mat-exp-menu-leading,.mat-exp-menu-trailing-icon,.mat-exp-menu-check{flex:none;inline-size:var(--mat-exp-menu-icon-size, 1.25rem);block-size:var(--mat-exp-menu-icon-size, 1.25rem);font-size:var(--mat-exp-menu-icon-size, 1.25rem);line-height:1;color:var(--_menu-item-icon)}.mat-exp-menu-submenu-arrow:dir(rtl){transform:scaleX(-1)}.mat-exp-menu-text{display:flex;flex:1;flex-direction:column;min-inline-size:0;overflow-wrap:anywhere}.mat-exp-menu-label{color:var(--_menu-item-foreground)}.mat-exp-menu-supporting{color:var(--_menu-item-support);font-family:var(--mat-exp-menu-supporting-font, var(--mat-sys-body-small-font, sans-serif));font-size:var(--mat-exp-menu-supporting-size, .75rem);font-weight:var(--mat-exp-menu-supporting-weight, 400);line-height:var(--mat-exp-menu-supporting-line-height, 1rem);letter-spacing:var(--mat-exp-menu-supporting-tracking, .025rem)}.mat-exp-menu-trailing-text{flex:0 1 auto;min-inline-size:0;color:var(--_menu-item-support);overflow-wrap:anywhere;text-align:end}.mat-exp-menu-badge{display:inline-flex;flex:none;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1rem;padding-inline:.25rem;border-radius:var(--mat-exp-menu-badge-shape, 1rem);background:var(--mat-exp-menu-badge-color, var(--mat-sys-error));color:var(--mat-exp-menu-badge-text-color, var(--mat-sys-on-error));font:var(--mat-sys-label-small)}.mat-exp-menu-filter{display:flex;flex:none;flex-direction:column;box-sizing:border-box;min-inline-size:0;padding:.5rem 1rem;border-radius:inherit;background:var(--_menu-surface);color:var(--_menu-support)}.mat-exp-menu-filter input{box-sizing:border-box;inline-size:100%;min-inline-size:0;min-block-size:3rem;padding:.5rem;border:1px solid var(--mat-exp-menu-filter-outline-color, var(--mat-sys-outline));border-radius:.25rem;background:transparent;color:var(--_menu-label);caret-color:var(--mat-sys-primary);font:inherit}.mat-exp-menu-filter input:focus-visible{outline:3px solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:-3px}.mat-exp-menu-filter input::placeholder{color:var(--_menu-support);opacity:1}.mat-exp-menu-empty{padding:1rem;color:var(--_menu-support);overflow-wrap:anywhere}.mat-exp-menu-status{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(forced-colors:active){.mat-exp-menu-list{scrollbar-color:auto}.mat-exp-menu-list::-webkit-scrollbar-track{background:Canvas}.mat-exp-menu-list::-webkit-scrollbar-thumb{border-color:Canvas;background:CanvasText}.mat-exp-menu-surface,.mat-exp-menu-group,.mat-exp-menu-filter{border:1px solid CanvasText}.mat-exp-menu-item[aria-checked=true]{--_menu-item-background: Highlight;--_menu-item-foreground: HighlightText;--_menu-item-support: HighlightText;--_menu-item-icon: HighlightText;forced-color-adjust:none}.mat-exp-menu-item[aria-disabled=true]{--_menu-item-foreground: GrayText;--_menu-item-support: GrayText;--_menu-item-icon: GrayText;--_menu-item-opacity: 1;--_menu-container-opacity: 1}.mat-exp-menu-item:where(:focus-visible,[data-keyboard-focus=true]),.mat-exp-menu-filter input:focus-visible{outline-color:Highlight}.mat-exp-menu-item[aria-checked=true]:where(:focus-visible,[data-keyboard-focus=true]){outline-color:CanvasText}.mat-exp-menu-separator{border-block-start-color:CanvasText}}@media(prefers-reduced-motion:reduce){.mat-exp-menu-item .mat-ripple-element{transition:none!important}}.mat-exp-menu-authored-item>mat-icon{flex:none;width:1.25rem;height:1.25rem;font-size:1.25rem;color:var(--_menu-item-icon)}.mat-exp-menu-authored-item[aria-disabled=true]{color:color-mix(in srgb,var(--_menu-item-foreground) 38%,transparent)}.mat-exp-menu-authored-item[aria-disabled=true]>*{opacity:1}.mat-exp-menu-authored-item[aria-disabled=true]>mat-icon{color:color-mix(in srgb,var(--_menu-item-icon) 38%,transparent)}.mat-exp-menu-authored-item[aria-disabled=true]>:is(.mat-exp-menu-text,.mat-exp-menu-label,.mat-exp-menu-supporting,.mat-exp-menu-trailing-text,.mat-exp-menu-leading,.mat-exp-menu-trailing-icon,.mat-exp-menu-check,.mat-exp-menu-badge){opacity:var(--_menu-item-opacity)}.mat-exp-menu-authored-item[aria-disabled=true]>.mat-exp-menu-text{color:var(--_menu-item-foreground)}.mat-exp-menu-authored-item[aria-disabled=true]>mat-icon:is(.mat-exp-menu-leading,.mat-exp-menu-trailing-icon,.mat-exp-menu-check){color:var(--_menu-item-icon)}\n"] }]
6876
+ }], ctorParameters: () => [], propDecorators: { owner: [{ type: i0.Input, args: [{ isSignal: true, alias: "owner", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], parentOrigin: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentOrigin", required: false }] }], parentMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentMenu", required: false }] }], _menu: [{ type: i0.ViewChild, args: ['menu', { isSignal: true }] }], _surface: [{ type: i0.ViewChild, args: ['surface', { isSignal: true }] }], _list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }], _input: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }] } });
6877
+
6878
+ /** Customize noninteractive item content while retaining the item's single action and semantics. */
6879
+ class MatExpMenuItemTemplate {
6880
+ /** @internal */
6881
+ template = inject(TemplateRef);
6882
+ static ngTemplateContextGuard(_directive, _context) {
6883
+ return true;
6884
+ }
6885
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuItemTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6886
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.3", type: MatExpMenuItemTemplate, isStandalone: true, selector: "ng-template[matExpMenuItemTemplate]", ngImport: i0 });
6887
+ }
6888
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuItemTemplate, decorators: [{
6889
+ type: Directive,
6890
+ args: [{ selector: 'ng-template[matExpMenuItemTemplate]' }]
6891
+ }] });
6892
+ /** A reusable Expressive menu definition, opened by a button or context trigger. */
6893
+ class MatExpMenu {
6894
+ _destroyRef = inject(DestroyRef);
6895
+ _options = injectMatExpMenuOptions();
6896
+ _overlay = inject(Overlay);
6897
+ _view = inject(ViewContainerRef);
6898
+ _document = inject(DOCUMENT);
6899
+ _direction = inject(Directionality);
6900
+ _browser = isPlatformBrowser(inject(PLATFORM_ID));
6901
+ _portal = viewChild.required('portal', /* @ts-ignore */
6902
+ ...(ngDevMode ? [{ debugName: "_portal" }] : /* istanbul ignore next */ []));
6903
+ _surface = viewChild(MatExpMenuSurface, /* @ts-ignore */
6904
+ ...(ngDevMode ? [{ debugName: "_surface" }] : /* istanbul ignore next */ []));
6905
+ _overlayRef;
6906
+ _origin;
6907
+ _point;
6908
+ _pendingFocus = false;
6909
+ /** @internal Opening identity guards deferred authored callbacks. */
6910
+ _openingId = 0;
6911
+ /** @internal */
6912
+ _parentMenu;
6913
+ _childMenu;
6914
+ /** @internal */
6915
+ _content = contentChild(MatExpMenuContent, /* @ts-ignore */
6916
+ ...(ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []));
6917
+ _session;
6918
+ _triggerOwner = signal(undefined, /* @ts-ignore */
6919
+ ...(ngDevMode ? [{ debugName: "_triggerOwner" }] : /* istanbul ignore next */ []));
6920
+ _data = signal({}, /* @ts-ignore */
6921
+ ...(ngDevMode ? [{ debugName: "_data" }] : /* istanbul ignore next */ []));
6922
+ /** Context supplied by the trigger that owns the current opening. @internal */
6923
+ _triggerData = this._data.asReadonly();
6924
+ /** Entries; each ID must be unique throughout the menu tree. @default [] */
6925
+ items = input([], /* @ts-ignore */
6926
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
6927
+ /** Accessible name for the menu or searchable menu dialog. @default 'Actions' */
6928
+ label = input('Actions', /* @ts-ignore */
6929
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
6930
+ /** Optional Material-style accessible name overriding label. */
6931
+ ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
6932
+ ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
6933
+ ariaDescribedby = input(undefined, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
6934
+ /** Classes placed on the rendered surface. */
6935
+ panelClass = input([], /* @ts-ignore */
6936
+ ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
6937
+ /** Preferred horizontal alignment; viewport fallbacks remain enabled. */
6938
+ xPosition = input('after', /* @ts-ignore */
6939
+ ...(ngDevMode ? [{ debugName: "xPosition" }] : /* istanbul ignore next */ []));
6940
+ /** Preferred vertical alignment; viewport fallbacks remain enabled. */
6941
+ yPosition = input('below', /* @ts-ignore */
6942
+ ...(ngDevMode ? [{ debugName: "yPosition" }] : /* istanbul ignore next */ []));
6943
+ /** Align with the trigger's edge instead of leaving the default 4px gap. */
6944
+ overlapTrigger = input(false, { ...(ngDevMode ? { debugName: "overlapTrigger" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
6945
+ /** Classes on the CDK overlay pane. */
6946
+ overlayPanelClass = input([], /* @ts-ignore */
6947
+ ...(ngDevMode ? [{ debugName: "overlayPanelClass" }] : /* istanbul ignore next */ []));
6948
+ /** Whether to show a dismissible backdrop. Defaults to outside-pointer dismissal. */
6949
+ hasBackdrop = input(false, { ...(ngDevMode ? { debugName: "hasBackdrop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
6950
+ /** Backdrop classes, used only when hasBackdrop is true. */
6951
+ backdropClass = input('cdk-overlay-transparent-backdrop', /* @ts-ignore */
6952
+ ...(ngDevMode ? [{ debugName: "backdropClass" }] : /* istanbul ignore next */ []));
6953
+ /** Standard surface or vibrant tertiary palette. @default 'standard' */
6954
+ color = input(this._options.color, /* @ts-ignore */
6955
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6956
+ /** Explicit web density; font sizes remain unchanged. @default 0 */
6957
+ density = input(this._options.density, /* @ts-ignore */
6958
+ ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
6959
+ /** Separation between groups. Overflowing menus automatically use dividers. @default 'divider' */
6960
+ separation = input(this._options.separation, /* @ts-ignore */
6961
+ ...(ngDevMode ? [{ debugName: "separation" }] : /* istanbul ignore next */ []));
6962
+ /** Enable Expressive motion. Reduced motion always takes precedence. @default true */
6963
+ motion = input(this._options.motion, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
6964
+ /** Add a search field outside the menu's command navigation. @default false */
6965
+ filterable = input(false, { ...(ngDevMode ? { debugName: "filterable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
6966
+ /** Localized search-field label. @default 'Filter options' */
6967
+ filterLabel = input(this._options.filterLabel, /* @ts-ignore */
6968
+ ...(ngDevMode ? [{ debugName: "filterLabel" }] : /* istanbul ignore next */ []));
6969
+ /** Localized empty-results message. @default 'No matching options' */
6970
+ emptyLabel = input(this._options.emptyLabel, /* @ts-ignore */
6971
+ ...(ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []));
6972
+ /** Maximum scroll viewport height in CSS pixels, also constrained by the window. @default 480 */
6973
+ maxHeight = input(480, /* @ts-ignore */
6974
+ ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
6975
+ /** Selected checkbox/radio IDs. @default [] */
6976
+ value = model([], /* @ts-ignore */
6977
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
6978
+ /** Filter query, retained when the menu closes. @default '' */
6979
+ query = model('', /* @ts-ignore */
6980
+ ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
6981
+ /** Emitted for an enabled command or selection. Submenu expansion does not emit. */
6982
+ itemSelected = output();
6983
+ /** Emitted after opening is requested. */
6984
+ opened = output();
6985
+ /** Emitted when the menu is dismissed. */
6986
+ closed = output();
6987
+ _open = signal(false, /* @ts-ignore */
6988
+ ...(ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []));
6989
+ /** Whether the menu accepts interaction, excluding its exit transition. */
6990
+ isOpen = this._open.asReadonly();
6991
+ /** @internal */
6992
+ _id = inject(_IdGenerator).getId('mat-exp-menu-');
6993
+ /** ID of the rendered root menu or searchable dialog. */
6994
+ get panelId() {
6995
+ return this._id;
6996
+ }
6997
+ /** @internal */
6998
+ _itemTemplate = contentChild(MatExpMenuItemTemplate, /* @ts-ignore */
6999
+ ...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
7000
+ constructor() {
7001
+ afterRenderEffect(() => {
7002
+ const surface = this._surface();
7003
+ if (surface?._shown() && this._pendingFocus && this.isOpen()) {
7004
+ this._pendingFocus = false;
7005
+ surface._focusFirst();
7006
+ this._overlayRef?.updatePosition();
7007
+ }
7008
+ });
7009
+ inject(DestroyRef).onDestroy(() => {
7010
+ this._overlayRef?.dispose();
7011
+ this._document.defaultView?.removeEventListener('popstate', this._back);
7012
+ });
7013
+ }
7014
+ /** Open beside an element, or at viewport coordinates for a context menu. */
7015
+ open(origin, point, options) {
7016
+ if (!this._browser)
7017
+ return;
7018
+ if (this._content() && (this.items().length || this.filterable()))
7019
+ throw new Error('MatExpMenu authored content cannot be combined with items or filterable.');
7020
+ for (let parent = options?.parent; parent; parent = parent._parentMenu) {
7021
+ if (parent === this)
7022
+ throw new Error('MatExpMenu cannot contain a trigger for itself or an ancestor.');
7023
+ }
7024
+ if (this.isOpen()) {
7025
+ if (this._origin === origin &&
7026
+ this._triggerOwner() === options?.trigger &&
7027
+ this._point?.x === point?.x &&
7028
+ this._point?.y === point?.y) {
7029
+ if (options?.parent &&
7030
+ options.focus !== false &&
7031
+ !this._overlayRef?.overlayElement.contains(this._document.activeElement))
7032
+ this.focusFirstItem('keyboard');
7033
+ return;
7034
+ }
7035
+ // Moving a shared menu must not briefly restore focus to the previous trigger.
7036
+ if (this._session)
7037
+ this._session = { ...this._session, restoreFocus: false };
7038
+ else
7039
+ this._session = { restoreFocus: false };
7040
+ this.close();
7041
+ }
7042
+ this._overlayRef?.dispose();
7043
+ this._openingId++;
7044
+ this._origin = origin;
7045
+ this._point = point ? { ...point } : undefined;
7046
+ this._session = options;
7047
+ this._parentMenu = options?.parent;
7048
+ if (this._parentMenu) {
7049
+ this._parentMenu._closeChild();
7050
+ this._parentMenu._childMenu = this;
7051
+ }
7052
+ this._triggerOwner.set(options?.trigger);
7053
+ this._data.set(options?.data ?? {});
7054
+ const x = this.xPosition() === 'after' ? 'start' : 'end';
7055
+ const otherX = x === 'start' ? 'end' : 'start';
7056
+ const below = this.yPosition() === 'below';
7057
+ const candidate = (horizontal, down) => ({
7058
+ originX: horizontal,
7059
+ overlayX: horizontal,
7060
+ originY: this.overlapTrigger() ? (down ? 'top' : 'bottom') : down ? 'bottom' : 'top',
7061
+ overlayY: down ? 'top' : 'bottom',
7062
+ offsetY: point || this.overlapTrigger() ? 0 : down ? 4 : -4,
7063
+ });
7064
+ const position = this._overlay
7065
+ .position()
7066
+ .flexibleConnectedTo(point ?? origin)
7067
+ .withPositions([
7068
+ candidate(x, below),
7069
+ candidate(x, !below),
7070
+ candidate(otherX, below),
7071
+ candidate(otherX, !below),
7072
+ ])
7073
+ .withViewportMargin(8)
7074
+ .withPush(true)
7075
+ .withFlexibleDimensions(false)
7076
+ .withTransformOriginOn('.mat-exp-menu-surface');
7077
+ const parentElement = this._parentMenu?._surface()?._menu()?.element;
7078
+ if (parentElement) {
7079
+ const offset = this._direction.value === 'rtl' ? -4 : 4;
7080
+ position
7081
+ .withPositions([
7082
+ { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: offset },
7083
+ { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -offset },
7084
+ {
7085
+ originX: 'end',
7086
+ originY: 'bottom',
7087
+ overlayX: 'start',
7088
+ overlayY: 'bottom',
7089
+ offsetX: offset,
7090
+ },
7091
+ {
7092
+ originX: 'start',
7093
+ originY: 'bottom',
7094
+ overlayX: 'end',
7095
+ overlayY: 'bottom',
7096
+ offsetX: -offset,
7097
+ },
7098
+ ])
7099
+ .withPopoverLocation({ type: 'parent', element: parentElement });
7100
+ }
7101
+ const ref = this._overlay.create({
7102
+ positionStrategy: position,
7103
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
7104
+ direction: this._direction.value,
7105
+ usePopover: true,
7106
+ panelClass: this.overlayPanelClass(),
7107
+ hasBackdrop: !parentElement && this.hasBackdrop(),
7108
+ backdropClass: this.backdropClass(),
7109
+ });
7110
+ this._overlayRef = ref;
7111
+ this._open.set(true);
7112
+ this._pendingFocus = options?.focus !== false;
7113
+ ref.attach(new TemplatePortal(this._portal(), this._view));
7114
+ ref.outsidePointerEvents().subscribe((event) => {
7115
+ if (!ref.overlayElement.contains(event.target) &&
7116
+ !origin.contains(event.target))
7117
+ this.close('outside');
7118
+ });
7119
+ ref.backdropClick().subscribe(() => this.close('outside'));
7120
+ this._document.defaultView?.addEventListener('popstate', this._back);
7121
+ this.opened.emit();
7122
+ options?.opened?.();
7123
+ }
7124
+ /** Dismiss the menu; Escape/selection/programmatic dismissal restore trigger focus. */
7125
+ close(reason = 'programmatic') {
7126
+ if (!this.isOpen())
7127
+ return;
7128
+ this._closeChild();
7129
+ if (this._parentMenu?._childMenu === this)
7130
+ this._parentMenu._childMenu = undefined;
7131
+ this._parentMenu = undefined;
7132
+ const session = this._session;
7133
+ this._session = undefined;
7134
+ this._open.set(false);
7135
+ this._triggerOwner.set(undefined);
7136
+ this._document.defaultView?.removeEventListener('popstate', this._back);
7137
+ if (session?.restoreFocus !== false && reason !== 'outside' && this._origin?.isConnected)
7138
+ this._origin.focus({ preventScroll: true });
7139
+ const ref = this._overlayRef;
7140
+ const done = () => {
7141
+ ref?.dispose();
7142
+ if (this._overlayRef === ref)
7143
+ this._overlayRef = undefined;
7144
+ };
7145
+ const surface = this._surface();
7146
+ if (surface)
7147
+ surface._exit(done);
7148
+ else
7149
+ done();
7150
+ if (!this._destroyRef.destroyed)
7151
+ this.closed.emit(reason);
7152
+ session?.closed?.();
7153
+ }
7154
+ /** Close descendants without stealing focus from a newly active sibling. @internal */
7155
+ _closeChild(exceptOrigin) {
7156
+ const child = this._childMenu;
7157
+ if (!child || child._origin === exceptOrigin)
7158
+ return;
7159
+ this._childMenu = undefined;
7160
+ if (child._session)
7161
+ child._session.restoreFocus = false;
7162
+ child.close();
7163
+ }
7164
+ /** Close the entire authored menu chain after activation or Tab. @internal */
7165
+ _closeTree(reason) {
7166
+ if (this._parentMenu?.isOpen())
7167
+ this._parentMenu._closeTree(reason);
7168
+ else
7169
+ this.close(reason);
7170
+ }
7171
+ /** Focus the first item, or the filter field in a searchable menu. */
7172
+ focusFirstItem(origin) {
7173
+ if (this.isOpen())
7174
+ this._surface()?._focusFirst(origin);
7175
+ }
7176
+ /** Reset keyboard navigation so the next forward step starts at the first item. */
7177
+ resetActiveItem() {
7178
+ this._surface()?._resetActiveItem();
7179
+ }
7180
+ /** Whether a particular trigger owns this opening. @internal */
7181
+ _isOpenFor(trigger) {
7182
+ return this.isOpen() && this._triggerOwner() === trigger;
7183
+ }
7184
+ /** @internal */
7185
+ _updatePosition() {
7186
+ this._overlayRef?.updatePosition();
7187
+ }
7188
+ /** @internal */
7189
+ _select(item) {
7190
+ if (item.disabled || item.children?.length)
7191
+ return;
7192
+ if (item.type === 'checkbox') {
7193
+ this.value.update((values) => values.includes(item.id) ? values.filter((id) => id !== item.id) : [...values, item.id]);
7194
+ }
7195
+ else if (item.type === 'radio') {
7196
+ const peers = new Set(this._allItems()
7197
+ .filter((candidate) => candidate.type === 'radio' &&
7198
+ (candidate.radioGroup ?? '') === (item.radioGroup ?? ''))
7199
+ .map((candidate) => candidate.id));
7200
+ this.value.update((values) => [...values.filter((id) => !peers.has(id)), item.id]);
7201
+ }
7202
+ this.itemSelected.emit(item);
7203
+ if (item.type !== 'checkbox')
7204
+ this._closeTree('selection');
7205
+ }
7206
+ /** @internal Aria dispatches nested command values through the root menu. */
7207
+ _selectId(id) {
7208
+ const item = this._allItems().find((candidate) => candidate.id === id);
7209
+ if (item)
7210
+ this._select(item);
7211
+ }
7212
+ _allItems() {
7213
+ const result = [];
7214
+ const visit = (entries) => {
7215
+ for (const entry of entries) {
7216
+ if (entry.type === 'group')
7217
+ visit(entry.items);
7218
+ else {
7219
+ result.push(entry);
7220
+ if (entry.children)
7221
+ visit(entry.children);
7222
+ }
7223
+ }
7224
+ };
7225
+ visit(this.items());
7226
+ return result;
7227
+ }
7228
+ _back = () => this.close('escape');
7229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
7230
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.3", type: MatExpMenu, isStandalone: true, selector: "mat-exp-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, overlapTrigger: { classPropertyName: "overlapTrigger", publicName: "overlapTrigger", isSignal: true, isRequired: false, transformFunction: null }, overlayPanelClass: { classPropertyName: "overlayPanelClass", publicName: "overlayPanelClass", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, backdropClass: { classPropertyName: "backdropClass", publicName: "backdropClass", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, separation: { classPropertyName: "separation", publicName: "separation", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", query: "queryChange", itemSelected: "itemSelected", opened: "opened", closed: "closed" }, queries: [{ propertyName: "_content", first: true, predicate: MatExpMenuContent, descendants: true, isSignal: true }, { propertyName: "_itemTemplate", first: true, predicate: MatExpMenuItemTemplate, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_portal", first: true, predicate: ["portal"], descendants: true, isSignal: true }, { propertyName: "_surface", first: true, predicate: MatExpMenuSurface, descendants: true, isSignal: true }], exportAs: ["matExpMenu"], ngImport: i0, template: '<ng-template #portal><mat-exp-menu-surface [owner]="this" [items]="items()" [root]="true" /></ng-template>', isInline: true, dependencies: [{ kind: "component", type: MatExpMenuSurface, selector: "mat-exp-menu-surface", inputs: ["owner", "items", "root", "parentOrigin", "parentMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7231
+ }
7232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenu, decorators: [{
7233
+ type: Component,
7234
+ args: [{
7235
+ selector: 'mat-exp-menu',
7236
+ exportAs: 'matExpMenu',
7237
+ imports: [MatExpMenuSurface],
7238
+ template: '<ng-template #portal><mat-exp-menu-surface [owner]="this" [items]="items()" [root]="true" /></ng-template>',
7239
+ changeDetection: ChangeDetectionStrategy.OnPush,
7240
+ }]
7241
+ }], ctorParameters: () => [], propDecorators: { _portal: [{ type: i0.ViewChild, args: ['portal', { isSignal: true }] }], _surface: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatExpMenuSurface), { isSignal: true }] }], _content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MatExpMenuContent), { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], xPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "xPosition", required: false }] }], yPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "yPosition", required: false }] }], overlapTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlapTrigger", required: false }] }], overlayPanelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayPanelClass", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], backdropClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClass", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], separation: [{ type: i0.Input, args: [{ isSignal: true, alias: "separation", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], _itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MatExpMenuItemTemplate), { isSignal: true }] }] } });
7242
+
7243
+ /** Opens an Expressive menu from an existing native button or Material button. */
7244
+ class MatExpMenuTrigger {
7245
+ /** Menu definition opened by this button. */
7246
+ matExpMenuTriggerFor = input.required(/* @ts-ignore */
7247
+ ...(ngDevMode ? [{ debugName: "matExpMenuTriggerFor" }] : /* istanbul ignore next */ []));
7248
+ /** Context passed to lazily rendered content for this opening. */
7249
+ // The scoped template binding coexists with Material; the member keeps its familiar name.
7250
+ // eslint-disable-next-line @angular-eslint/no-input-rename
7251
+ menuData = input({}, { ...(ngDevMode ? { debugName: "menuData" } : /* istanbul ignore next */ {}), alias: 'matExpMenuTriggerData' });
7252
+ /** Restore this trigger's focus on keyboard/command/programmatic dismissal. */
7253
+ restoreFocus = input(true, { ...(ngDevMode ? { debugName: "restoreFocus" } : /* istanbul ignore next */ {}),
7254
+ // eslint-disable-next-line @angular-eslint/no-input-rename
7255
+ alias: 'matExpMenuTriggerRestoreFocus',
7256
+ transform: booleanAttribute });
7257
+ /** Emitted only when this trigger opens its associated menu. */
7258
+ menuOpened = output();
7259
+ /** Emitted only when this trigger's opening closes or transfers to another trigger. */
7260
+ menuClosed = output();
7261
+ _destroyRef = inject(DestroyRef);
7262
+ _parentSurface = inject(MAT_EXP_MENU_SURFACE, { optional: true });
7263
+ _focusMonitor = inject(FocusMonitor);
7264
+ /** Associated Expressive panel. */
7265
+ get menu() {
7266
+ return this.matExpMenuTriggerFor();
7267
+ }
7268
+ /** Whether this trigger owns the currently open panel. */
7269
+ get menuOpen() {
7270
+ return this.menu._isOpenFor(this);
7271
+ }
7272
+ _element = inject(ElementRef).nativeElement;
7273
+ constructor() {
7274
+ // A menu button inside a form must not accidentally submit it. Preserve an
7275
+ // explicitly chosen native type, as Angular Aria's own trigger does.
7276
+ if (!this._element.hasAttribute('type'))
7277
+ this._element.type = 'button';
7278
+ this._parentSurface?._registerSubmenu(this._element, this);
7279
+ inject(DestroyRef).onDestroy(() => this._parentSurface?._removeSubmenu(this._element));
7280
+ effect((onCleanup) => {
7281
+ const menu = this.matExpMenuTriggerFor();
7282
+ onCleanup(() => {
7283
+ if (menu._isOpenFor(this))
7284
+ menu.close();
7285
+ });
7286
+ });
7287
+ }
7288
+ /** Open and focus the first item (or filter field in searchable menus). */
7289
+ openMenu() {
7290
+ this._open(true);
7291
+ }
7292
+ /** @internal */
7293
+ _openFromHover() {
7294
+ this._open(false);
7295
+ }
7296
+ _open(focus) {
7297
+ if (this._disabled())
7298
+ return;
7299
+ this.menu.open(this._element, undefined, {
7300
+ trigger: this,
7301
+ focus,
7302
+ parent: this._parentSurface?.owner(),
7303
+ data: this.menuData(),
7304
+ restoreFocus: this.restoreFocus(),
7305
+ opened: () => {
7306
+ if (!this._destroyRef.destroyed)
7307
+ this.menuOpened.emit();
7308
+ },
7309
+ closed: () => {
7310
+ if (!this._destroyRef.destroyed)
7311
+ this.menuClosed.emit();
7312
+ },
7313
+ });
7314
+ }
7315
+ /** Existing shorthand retained for compatibility. */
7316
+ open() {
7317
+ this.openMenu();
7318
+ }
7319
+ /** Close this trigger's opening without affecting another trigger's shared menu. */
7320
+ closeMenu() {
7321
+ if (this.menuOpen)
7322
+ this.menu.close();
7323
+ }
7324
+ /** Toggle this trigger's opening; take ownership when another trigger opened the panel. */
7325
+ toggleMenu() {
7326
+ if (this.menuOpen)
7327
+ this.closeMenu();
7328
+ else
7329
+ this.openMenu();
7330
+ }
7331
+ /** Reposition this trigger's open overlay against the current viewport. */
7332
+ updatePosition() {
7333
+ if (this.menuOpen)
7334
+ this.menu._updatePosition();
7335
+ }
7336
+ /** Focus the trigger with an optional CDK focus origin. */
7337
+ focus(origin, options) {
7338
+ if (origin)
7339
+ this._focusMonitor.focusVia(this._element, origin, options);
7340
+ else
7341
+ this._element.focus(options);
7342
+ }
7343
+ /** @internal */
7344
+ _click() {
7345
+ if (!this._disabled())
7346
+ this.toggleMenu();
7347
+ }
7348
+ /** @internal */
7349
+ _keydown(event) {
7350
+ if (this._parentSurface)
7351
+ return;
7352
+ if ((event.key === 'ArrowDown' || event.key === 'ArrowUp') && !this._disabled()) {
7353
+ event.preventDefault();
7354
+ this.open();
7355
+ }
7356
+ }
7357
+ _disabled() {
7358
+ return this._element.disabled || this._element.getAttribute('aria-disabled') === 'true';
7359
+ }
7360
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
7361
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.3", type: MatExpMenuTrigger, isStandalone: true, selector: "button[matExpMenuTriggerFor]", inputs: { matExpMenuTriggerFor: { classPropertyName: "matExpMenuTriggerFor", publicName: "matExpMenuTriggerFor", isSignal: true, isRequired: true, transformFunction: null }, menuData: { classPropertyName: "menuData", publicName: "matExpMenuTriggerData", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "matExpMenuTriggerRestoreFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuOpened: "menuOpened", menuClosed: "menuClosed" }, host: { listeners: { "click": "_click()", "keydown": "_keydown($event)" }, properties: { "attr.aria-haspopup": "matExpMenuTriggerFor().filterable() ? \"dialog\" : \"menu\"", "attr.aria-expanded": "menuOpen", "attr.aria-controls": "menuOpen ? menu.panelId : null", "attr.data-menu-open": "menuOpen" }, classAttribute: "mat-exp-menu-trigger" }, providers: [
7362
+ {
7363
+ provide: MAT_EXP_MENU_OPEN_STATE,
7364
+ useFactory: () => {
7365
+ const trigger = inject(MatExpMenuTrigger);
7366
+ return computed(() => trigger.menuOpen);
7367
+ },
7368
+ },
7369
+ ], exportAs: ["matExpMenuTrigger"], ngImport: i0 });
7370
+ }
7371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuTrigger, decorators: [{
7372
+ type: Directive,
7373
+ args: [{
7374
+ selector: 'button[matExpMenuTriggerFor]',
7375
+ exportAs: 'matExpMenuTrigger',
7376
+ providers: [
7377
+ {
7378
+ provide: MAT_EXP_MENU_OPEN_STATE,
7379
+ useFactory: () => {
7380
+ const trigger = inject(MatExpMenuTrigger);
7381
+ return computed(() => trigger.menuOpen);
7382
+ },
7383
+ },
7384
+ ],
7385
+ host: {
7386
+ class: 'mat-exp-menu-trigger',
7387
+ '[attr.aria-haspopup]': 'matExpMenuTriggerFor().filterable() ? "dialog" : "menu"',
7388
+ '[attr.aria-expanded]': 'menuOpen',
7389
+ '[attr.aria-controls]': 'menuOpen ? menu.panelId : null',
7390
+ '[attr.data-menu-open]': 'menuOpen',
7391
+ '(click)': '_click()',
7392
+ '(keydown)': '_keydown($event)',
7393
+ },
7394
+ }]
7395
+ }], ctorParameters: () => [], propDecorators: { matExpMenuTriggerFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "matExpMenuTriggerFor", required: true }] }], menuData: [{ type: i0.Input, args: [{ isSignal: true, alias: "matExpMenuTriggerData", required: false }] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "matExpMenuTriggerRestoreFocus", required: false }] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }] } });
7396
+ /** Right-click and keyboard context-menu support for a focusable target. */
7397
+ class MatExpMenuContextTrigger {
7398
+ /** Menu definition opened for the target. */
7399
+ matExpMenuContextFor = input.required(/* @ts-ignore */
7400
+ ...(ngDevMode ? [{ debugName: "matExpMenuContextFor" }] : /* istanbul ignore next */ []));
7401
+ _element = inject(ElementRef).nativeElement;
7402
+ /** @internal */
7403
+ _context(event) {
7404
+ event.preventDefault();
7405
+ this.matExpMenuContextFor().open(this._element, { x: event.clientX, y: event.clientY });
7406
+ }
7407
+ /** @internal */
7408
+ _keydown(event) {
7409
+ if (event.key === 'ContextMenu' || (event.shiftKey && event.key === 'F10')) {
7410
+ event.preventDefault();
7411
+ this.matExpMenuContextFor().open(this._element);
7412
+ }
7413
+ }
7414
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuContextTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
7415
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.3", type: MatExpMenuContextTrigger, isStandalone: true, selector: "[matExpMenuContextFor]", inputs: { matExpMenuContextFor: { classPropertyName: "matExpMenuContextFor", publicName: "matExpMenuContextFor", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "tabindex": "0" }, listeners: { "contextmenu": "_context($event)", "keydown": "_keydown($event)" } }, exportAs: ["matExpMenuContextTrigger"], ngImport: i0 });
7416
+ }
7417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuContextTrigger, decorators: [{
7418
+ type: Directive,
7419
+ args: [{
7420
+ selector: '[matExpMenuContextFor]',
7421
+ exportAs: 'matExpMenuContextTrigger',
7422
+ host: { tabindex: '0', '(contextmenu)': '_context($event)', '(keydown)': '_keydown($event)' },
7423
+ }]
7424
+ }], propDecorators: { matExpMenuContextFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "matExpMenuContextFor", required: true }] }] } });
7425
+
7426
+ /** An authored action on its original native button or link. */
7427
+ class MatExpMenuItemDirective {
7428
+ /** Disabled items remain focusable for discovery but cannot activate. */
7429
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7430
+ disableRipple = input(false, { ...(ngDevMode ? { debugName: "disableRipple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7431
+ /** Choice roles require authored aria-checked/state; checkboxes remain open after activation. */
7432
+ role = input('menuitem', /* @ts-ignore */
7433
+ ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
7434
+ /** @internal */
7435
+ _element = inject(ElementRef).nativeElement;
7436
+ _surface = inject(MAT_EXP_MENU_SURFACE);
7437
+ _focusMonitor = inject(FocusMonitor);
7438
+ _ripple = inject(MatRipple);
7439
+ _captureClick = (event) => {
7440
+ if (this.disabled()) {
7441
+ event.preventDefault();
7442
+ event.stopImmediatePropagation();
7443
+ }
7444
+ };
7445
+ constructor() {
7446
+ if (this._element.tagName === 'BUTTON' && !this._element.hasAttribute('type'))
7447
+ this._element.setAttribute('type', 'button');
7448
+ this._element.addEventListener('click', this._captureClick, true);
7449
+ this._surface._registerItem(this);
7450
+ effect(() => {
7451
+ if (this._element.tagName === 'BUTTON')
7452
+ // Preserve keyboard discovery; aria-disabled and the capture guard block activation.
7453
+ this._element.disabled = false;
7454
+ this._ripple.disabled =
7455
+ this.disabled() || this.disableRipple() || !this._surface.owner().motion();
7456
+ });
7457
+ inject(DestroyRef).onDestroy(() => {
7458
+ this._element.removeEventListener('click', this._captureClick, true);
7459
+ this._surface._removeItem(this);
7460
+ this._focusMonitor.stopMonitoring(this._element);
7461
+ });
7462
+ }
7463
+ focus(origin = 'program', options) {
7464
+ this._focusMonitor.focusVia(this._element, origin, options);
7465
+ }
7466
+ getLabel() {
7467
+ const clone = this._element.cloneNode(true);
7468
+ clone.querySelectorAll('mat-icon, [aria-hidden="true"]').forEach((node) => node.remove());
7469
+ return clone.textContent?.trim() ?? '';
7470
+ }
7471
+ /** @internal */
7472
+ _focus() {
7473
+ this._surface._activateItem(this);
7474
+ }
7475
+ /** @internal */
7476
+ _hover() {
7477
+ this._surface._hoverItem(this);
7478
+ }
7479
+ /** @internal */
7480
+ _click(event) {
7481
+ event.stopPropagation();
7482
+ if (this.role() !== 'menuitemcheckbox' && !this._surface._isSubmenuItem(this._element)) {
7483
+ // Run authored click/routerLink handlers before disposing their view.
7484
+ const menu = this._surface.owner();
7485
+ const opening = menu._openingId;
7486
+ queueMicrotask(() => {
7487
+ if (menu._openingId === opening)
7488
+ menu._closeTree('selection');
7489
+ });
7490
+ }
7491
+ }
7492
+ /** @internal */
7493
+ _keydown(event) {
7494
+ this._surface._authoredKeydown(this, event);
7495
+ }
7496
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
7497
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.3", type: MatExpMenuItemDirective, isStandalone: true, selector: "button[matExpMenuItem], a[matExpMenuItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tabindex": "-1" }, listeners: { "click": "_click($event)", "keydown": "_keydown($event)", "focus": "_focus()", "mouseover": "_hover()" }, properties: { "attr.role": "role()", "attr.aria-disabled": "disabled() || null" }, classAttribute: "mat-exp-menu-item mat-exp-menu-authored-item" }, exportAs: ["matExpMenuItem"], hostDirectives: [{ directive: i1$1.MatRipple }], ngImport: i0 });
7498
+ }
7499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpMenuItemDirective, decorators: [{
7500
+ type: Directive,
7501
+ args: [{
7502
+ selector: 'button[matExpMenuItem], a[matExpMenuItem]',
7503
+ exportAs: 'matExpMenuItem',
7504
+ hostDirectives: [MatRipple],
7505
+ host: {
7506
+ class: 'mat-exp-menu-item mat-exp-menu-authored-item',
7507
+ tabindex: '-1',
7508
+ '[attr.role]': 'role()',
7509
+ '[attr.aria-disabled]': 'disabled() || null',
7510
+ '(click)': '_click($event)',
7511
+ '(keydown)': '_keydown($event)',
7512
+ '(focus)': '_focus()',
7513
+ '(mouseover)': '_hover()',
7514
+ },
7515
+ }]
7516
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }] } });
7517
+
7518
+ /** @internal Browser-rendered origin width, including later layout changes. */
7519
+ function injectOriginWidth(origin) {
7520
+ const width = signal(0, /* @ts-ignore */
7521
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
7522
+ afterRenderEffect((onCleanup) => {
7523
+ const element = origin()?.nativeElement;
7524
+ if (!element)
7525
+ return;
7526
+ const update = () => width.set(element.getBoundingClientRect().width);
7527
+ update();
7528
+ const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(update);
7529
+ observer?.observe(element);
7530
+ onCleanup(() => observer?.disconnect());
7531
+ });
7532
+ return width.asReadonly();
7533
+ }
7534
+
7535
+ /** Editable single-choice field with independent query and confirmed value. */
7536
+ class MatExpAutocomplete {
7537
+ options = input([], /* @ts-ignore */
7538
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
7539
+ label = input('Choose an option', /* @ts-ignore */
7540
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
7541
+ placeholder = input('Type to filter', /* @ts-ignore */
7542
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7543
+ emptyLabel = input('No matching options', /* @ts-ignore */
7544
+ ...(ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []));
7545
+ color = input('standard', /* @ts-ignore */
7546
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
7547
+ density = input(0, /* @ts-ignore */
7548
+ ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
7549
+ motion = input(true, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7550
+ filterMotion = input('fast', /* @ts-ignore */
7551
+ ...(ngDevMode ? [{ debugName: "filterMotion" }] : /* istanbul ignore next */ []));
7552
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7553
+ rtl = input(false, { ...(ngDevMode ? { debugName: "rtl" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7554
+ value = model(null, /* @ts-ignore */
7555
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
7556
+ query = model('', /* @ts-ignore */
7557
+ ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
7558
+ selected = output();
7559
+ opened = output();
7560
+ closed = output();
7561
+ _pressed = signal(null, /* @ts-ignore */
7562
+ ...(ngDevMode ? [{ debugName: "_pressed" }] : /* istanbul ignore next */ []));
7563
+ _expanded = signal(false, /* @ts-ignore */
7564
+ ...(ngDevMode ? [{ debugName: "_expanded" }] : /* istanbul ignore next */ []));
7565
+ _present = signal(false, /* @ts-ignore */
7566
+ ...(ngDevMode ? [{ debugName: "_present" }] : /* istanbul ignore next */ []));
7567
+ _closingMatches = signal(null, /* @ts-ignore */
7568
+ ...(ngDevMode ? [{ debugName: "_closingMatches" }] : /* istanbul ignore next */ []));
7569
+ _selection = computed(() => {
7570
+ // Aria reconciles selection against rendered options. Supply a fresh model
7571
+ // when filtering recreates the confirmed option, using its public input.
7572
+ this._matches();
7573
+ return this.value() === null ? [] : [this.value()];
7574
+ }, /* @ts-ignore */
7575
+ ...(ngDevMode ? [{ debugName: "_selection" }] : /* istanbul ignore next */ []));
7576
+ _matches = computed(() => {
7577
+ const closing = this._closingMatches();
7578
+ if (closing)
7579
+ return closing;
7580
+ const query = this.query().trim().toLocaleLowerCase();
7581
+ return this.options().filter((option) => option.toLocaleLowerCase().includes(query));
7582
+ }, /* @ts-ignore */
7583
+ ...(ngDevMode ? [{ debugName: "_matches" }] : /* istanbul ignore next */ []));
7584
+ _classes = computed(() => [
7585
+ 'mat-exp-autocomplete-surface',
7586
+ 'mat-exp-autocomplete-panel',
7587
+ `mat-exp-autocomplete-panel-${this.color()}`,
7588
+ `mat-exp-autocomplete-density${this.density()}`,
7589
+ ].join(' '), /* @ts-ignore */
7590
+ ...(ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []));
7591
+ _positions = [
7592
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
7593
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
7594
+ ];
7595
+ _document = inject(DOCUMENT);
7596
+ _host = inject(ElementRef);
7597
+ _input = viewChild('input', /* @ts-ignore */
7598
+ ...(ngDevMode ? [{ debugName: "_input" }] : /* istanbul ignore next */ []));
7599
+ _originElement = viewChild('origin', { ...(ngDevMode ? { debugName: "_originElement" } : /* istanbul ignore next */ {}), read: (ElementRef) });
7600
+ _popupWidth = injectOriginWidth(this._originElement);
7601
+ _panel = viewChild('panel', /* @ts-ignore */
7602
+ ...(ngDevMode ? [{ debugName: "_panel" }] : /* istanbul ignore next */ []));
7603
+ _listbox = viewChild('listbox', /* @ts-ignore */
7604
+ ...(ngDevMode ? [{ debugName: "_listbox" }] : /* istanbul ignore next */ []));
7605
+ _overlay = viewChild(CdkConnectedOverlay, /* @ts-ignore */
7606
+ ...(ngDevMode ? [{ debugName: "_overlay" }] : /* istanbul ignore next */ []));
7607
+ _motion;
7608
+ _motionPanel;
7609
+ _above = false;
7610
+ _lastOpen;
7611
+ _lastAnimate;
7612
+ _lastFilterMotion;
7613
+ _before;
7614
+ constructor() {
7615
+ effect(() => {
7616
+ this.query();
7617
+ this.options();
7618
+ if (this._expanded() && !this._before)
7619
+ this._before = this._snapshotRows();
7620
+ });
7621
+ afterRenderEffect(() => {
7622
+ const panel = this._panel()?.nativeElement;
7623
+ const open = this._expanded();
7624
+ const animate = this.motion();
7625
+ const filterMotion = this.filterMotion();
7626
+ const edge = this.rtl() ? 'right' : 'left';
7627
+ if (panel)
7628
+ panel.style.transformOrigin = `${edge} ${this._above ? 'bottom' : 'top'}`;
7629
+ this._matches();
7630
+ if (this.disabled() && open)
7631
+ this.close();
7632
+ if (panel !== this._motionPanel) {
7633
+ this._motion?.destroy();
7634
+ this._motion = undefined;
7635
+ this._motionPanel = panel;
7636
+ this._lastOpen = undefined;
7637
+ if (panel && this._document.defaultView) {
7638
+ this._motion = createMenuMotion(panel, this._document.defaultView.matchMedia('(prefers-reduced-motion: reduce)'));
7639
+ }
7640
+ }
7641
+ if (this._motion && (open !== this._lastOpen || animate !== this._lastAnimate)) {
7642
+ this._lastOpen = open;
7643
+ this._lastAnimate = animate;
7644
+ this._motion.setOpen(open, animate, open
7645
+ ? undefined
7646
+ : () => {
7647
+ if (!this._expanded()) {
7648
+ this._present.set(false);
7649
+ this.closed.emit();
7650
+ }
7651
+ });
7652
+ }
7653
+ if (panel &&
7654
+ this._lastFilterMotion !== undefined &&
7655
+ this._lastFilterMotion !== filterMotion) {
7656
+ this._before ??= this._snapshotRows();
7657
+ }
7658
+ this._lastFilterMotion = filterMotion;
7659
+ if (this._before && panel) {
7660
+ // Resolve virtual-focus scrolling first. Scroll/overlay movement is not
7661
+ // option rearrangement and must not turn into a large inverse transform.
7662
+ this._scrollActiveIntoView();
7663
+ const bounds = panel.getBoundingClientRect();
7664
+ const dy = bounds.top - this._before.top - (panel.scrollTop - this._before.scrollTop);
7665
+ const dx = bounds.left - this._before.left;
7666
+ const before = new Map([...this._before.rows].map(([row, rect]) => [
7667
+ row,
7668
+ new DOMRect(rect.x + dx, rect.y + dy, rect.width, rect.height),
7669
+ ]));
7670
+ this._motion?.relocate(before, this._rows(), animate && filterMotion !== 'off', filterMotion === 'standard' ? DEFAULT_SPATIAL_SPRING : FAST_SPATIAL_SPRING, (row) => Math.max(0, ((row.parentElement?.clientHeight ?? row.offsetHeight) - row.offsetHeight) / 2 - 1));
7671
+ this._before = undefined;
7672
+ this._overlay()?.overlayRef?.updatePosition();
7673
+ }
7674
+ });
7675
+ afterRenderEffect(() => {
7676
+ this._popupWidth();
7677
+ this._overlay()?.overlayRef?.updatePosition();
7678
+ this._scrollActiveIntoView();
7679
+ });
7680
+ inject(DestroyRef).onDestroy(() => this._motion?.destroy());
7681
+ }
7682
+ get isOpen() {
7683
+ return this._expanded();
7684
+ }
7685
+ open() {
7686
+ if (this.disabled())
7687
+ return;
7688
+ const wasOpen = this._expanded();
7689
+ this._closingMatches.set(null);
7690
+ this._present.set(true);
7691
+ this._expanded.set(true);
7692
+ if (!wasOpen)
7693
+ this.opened.emit();
7694
+ }
7695
+ close() {
7696
+ this._pressed.set(null);
7697
+ if (this._expanded())
7698
+ this._closingMatches.set(this._matches());
7699
+ this._expanded.set(false);
7700
+ }
7701
+ _expand(open) {
7702
+ if (open)
7703
+ this.open();
7704
+ else
7705
+ this.close();
7706
+ }
7707
+ _edit(query) {
7708
+ this._before = this._snapshotRows();
7709
+ this.query.set(query);
7710
+ this.open();
7711
+ }
7712
+ _choose(option) {
7713
+ if (this.disabled() || !this._expanded())
7714
+ return;
7715
+ this.value.set(option);
7716
+ this.close();
7717
+ this.query.set(option);
7718
+ this.selected.emit(option);
7719
+ this._input()?.nativeElement.focus({ preventScroll: true });
7720
+ }
7721
+ _key(event) {
7722
+ if (event.key === 'Enter' && this._expanded()) {
7723
+ const active = this._listbox()?.activeDescendant();
7724
+ const option = active ? this._document.getElementById(active) : null;
7725
+ const value = option?.dataset['value'];
7726
+ if (value !== undefined) {
7727
+ event.preventDefault();
7728
+ this._choose(value);
7729
+ }
7730
+ }
7731
+ else if (event.key === 'Escape' || event.key === 'Tab')
7732
+ this.close();
7733
+ }
7734
+ _outside(event) {
7735
+ const target = event.target;
7736
+ if (target &&
7737
+ !this._host.nativeElement.contains(target) &&
7738
+ !this._panel()?.nativeElement.contains(target))
7739
+ this.close();
7740
+ }
7741
+ _origin(above) {
7742
+ this._above = above;
7743
+ const panel = this._panel()?.nativeElement;
7744
+ if (panel)
7745
+ panel.style.transformOrigin = `${this.rtl() ? 'right' : 'left'} ${above ? 'bottom' : 'top'}`;
7746
+ }
7747
+ _scrollActiveIntoView() {
7748
+ const panel = this._panel()?.nativeElement;
7749
+ const activeId = this._listbox()?.activeDescendant();
7750
+ if (!panel || !activeId || !this._expanded())
7751
+ return;
7752
+ const option = this._document.getElementById(activeId);
7753
+ if (!option || !panel.contains(option))
7754
+ return;
7755
+ const top = option.offsetTop;
7756
+ const bottom = top + option.offsetHeight;
7757
+ if (top < panel.scrollTop)
7758
+ panel.scrollTop = top;
7759
+ else if (bottom > panel.scrollTop + panel.clientHeight)
7760
+ panel.scrollTop = bottom - panel.clientHeight;
7761
+ }
7762
+ _snapshotRows() {
7763
+ const panel = this._panel()?.nativeElement;
7764
+ const bounds = panel?.getBoundingClientRect();
7765
+ return {
7766
+ rows: snapshotMenuRects(this._rows()),
7767
+ scrollTop: panel?.scrollTop ?? 0,
7768
+ top: bounds?.top ?? 0,
7769
+ left: bounds?.left ?? 0,
7770
+ };
7771
+ }
7772
+ _rows() {
7773
+ return Array.from(this._panel()?.nativeElement.querySelectorAll('.mat-exp-autocomplete-row') ?? []);
7774
+ }
7775
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
7776
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpAutocomplete, isStandalone: true, selector: "mat-exp-autocomplete", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, filterMotion: { classPropertyName: "filterMotion", publicName: "filterMotion", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rtl: { classPropertyName: "rtl", publicName: "rtl", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", query: "queryChange", selected: "selected", opened: "opened", closed: "closed" }, host: { listeners: { "document:pointerdown": "_outside($event)", "document:pointerup": "_pressed.set(null)", "document:pointercancel": "_pressed.set(null)" } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "_originElement", first: true, predicate: ["origin"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "_listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }, { propertyName: "_overlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"mat-exp-autocomplete-field\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n>\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ label() }}</mat-label>\n <input\n #input\n matInput\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [value]=\"query()\"\n (valueChange)=\"_edit($event)\"\n [expanded]=\"_expanded()\"\n (expandedChange)=\"_expand($event)\"\n [preserveContent]=\"true\"\n (focus)=\"open()\"\n (click)=\"open()\"\n (keydown)=\"_key($event)\"\n />\n </mat-form-field>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"_present()\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayWidth]=\"_popupWidth()\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n (positionChange)=\"_origin($event.connectionPair.overlayY === 'bottom')\"\n >\n <div\n #panel\n ngComboboxWidget\n ngListbox\n #listbox=\"ngListbox\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [value]=\"_selection()\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [softDisabled]=\"false\"\n [class]=\"_classes()\"\n [attr.aria-label]=\"label() + ' suggestions'\"\n [attr.aria-hidden]=\"!_expanded() ? 'true' : null\"\n [attr.inert]=\"!_expanded() ? '' : null\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n >\n @for (option of _matches(); track option) {\n <!-- The input owns keyboard focus and activation through aria-activedescendant. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n ngOption\n matRipple\n [matRippleDisabled]=\"!motion()\"\n #item=\"ngOption\"\n [value]=\"option\"\n [label]=\"option\"\n [attr.data-value]=\"option\"\n class=\"mat-exp-autocomplete-option\"\n [class.mat-exp-autocomplete-selected]=\"value() === option\"\n [class.mat-exp-autocomplete-active]=\"item.active()\"\n [class.mat-exp-autocomplete-pressed]=\"_pressed() === option\"\n (pointerdown)=\"$event.button === 0 && !disabled() && _pressed.set(option)\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerleave)=\"_pressed.set(null)\"\n (click)=\"_choose(option)\"\n >\n <span class=\"mat-exp-autocomplete-row\"\n ><span>{{ option }}</span>\n <mat-icon class=\"mat-exp-autocomplete-check\" aria-hidden=\"true\">{{\n value() === option ? 'check' : ''\n }}</mat-icon>\n </span>\n </div>\n } @empty {\n <div\n ngOption\n value=\"\"\n [label]=\"emptyLabel()\"\n disabled\n class=\"mat-exp-autocomplete-option\"\n >\n {{ emptyLabel() }}\n </div>\n }\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [".mat-exp-autocomplete-panel[role=listbox]{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));--city-selected: var( --mat-exp-menu-selected-container-color, var(--mat-sys-tertiary-container) );--city-on-selected: var( --mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary-container) );--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));--city-target: 48px;--mat-autocomplete-container-shape: var(--mat-exp-menu-container-shape, 16px);--mat-autocomplete-background-color: var(--city-surface);--mat-autocomplete-container-elevation-shadow: var(--mat-exp-menu-elevation, var(--mat-sys-level2));--mat-option-label-text-color: var(--city-label);--mat-option-selected-state-label-text-color: var(--city-on-selected);--mat-option-selected-state-layer-color: transparent;--mat-option-hover-state-layer-color: transparent;--mat-option-focus-state-layer-color: transparent;--mat-option-label-text-font: var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));--mat-option-label-text-size: var(--mat-exp-menu-label-size, 14px);--mat-option-label-text-weight: var(--mat-exp-menu-label-weight, 500);--mat-option-label-text-line-height: var(--mat-exp-menu-label-line-height, 20px);--mat-option-label-text-tracking: var(--mat-exp-menu-label-tracking, .1px);border-radius:var(--mat-exp-menu-container-shape, 16px)!important;max-block-size:18rem;padding:2px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:auto;scrollbar-width:auto;scrollbar-color:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--city-surface);clip-path:inset(0 round var(--mat-exp-menu-container-shape, 16px))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-panel-vibrant{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));--city-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));--city-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-1{--city-target: 44px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-2{--city-target: 40px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-3{--city-target: 36px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-no-motion{animation:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option{--city-row-shape: var(--mat-exp-menu-item-shape, 4px);--city-row-state: var(--city-state);position:relative;isolation:isolate;min-block-size:var(--city-target);padding-inline:16px;border-radius:var(--city-row-shape);background:transparent}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:first-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:last-child{--city-row-shape: var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:only-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:before,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:after{content:\"\";position:absolute;inset:2px 0;z-index:-1;border-radius:var(--city-row-shape);pointer-events:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):hover:after{background:color-mix(in srgb,var(--city-row-state) 8%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active:after,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):active:after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{--city-row-shape: var(--mat-exp-menu-selected-shape, 12px);--city-row-state: var(--city-on-selected);color:var(--city-on-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:var(--city-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active{outline:var(--mat-exp-menu-focus-width, 3px) solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:var(--mat-exp-menu-focus-offset, -3px)}@supports selector(::-webkit-scrollbar){.mat-exp-autocomplete-panel[role=listbox]{scrollbar-color:auto;scrollbar-width:auto}}.mat-exp-autocomplete-panel::-webkit-scrollbar{width:var(--mat-exp-menu-scrollbar-width, 12px)}.mat-exp-autocomplete-panel::-webkit-scrollbar-button{display:none}.mat-exp-autocomplete-panel::-webkit-scrollbar-track{margin-block:4px;background:var(--city-surface)}.mat-exp-autocomplete-panel::-webkit-scrollbar-thumb{border:3px solid var(--city-surface);border-radius:12px;background:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline))}.mat-exp-autocomplete-row{display:flex;align-items:center;justify-content:space-between;gap:12px;inline-size:100%}.mat-exp-autocomplete-check{inline-size:20px;block-size:20px;font-size:20px;line-height:20px;flex-shrink:0}@media(prefers-reduced-motion:reduce){.mat-exp-autocomplete-panel[role=listbox]{animation:none}}@media(forced-colors:active){.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-active{outline-color:Highlight}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:SelectedItemText}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:SelectedItem;forced-color-adjust:none}}mat-exp-autocomplete{display:block}.mat-exp-autocomplete-field{inline-size:min(100%,22rem)}.mat-exp-autocomplete-field mat-form-field{inline-size:100%}.mat-exp-autocomplete-surface{box-sizing:border-box;inline-size:100%;background:var(--city-surface);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2));transform-origin:left top}.mat-exp-autocomplete-surface .mat-exp-autocomplete-option{box-sizing:border-box;display:flex;align-items:center;overflow:hidden;cursor:pointer;color:var(--city-label);font-family:var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));font-size:var(--mat-exp-menu-label-size, 14px);font-weight:var(--mat-exp-menu-label-weight, 500);line-height:var(--mat-exp-menu-label-line-height, 20px);letter-spacing:var(--mat-exp-menu-label-tracking, .1px)}.mat-exp-autocomplete-surface .mat-exp-autocomplete-option[aria-disabled=true]{cursor:default;opacity:.38}.mat-exp-autocomplete-surface .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:var(--city-on-selected)}.mat-exp-autocomplete-surface.mat-exp-autocomplete-panel[role=listbox]{clip-path:none}.mat-exp-autocomplete-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-pressed:not([aria-disabled=true]):after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}\n"], dependencies: [{ kind: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["disabled", "readonly", "softDisabled", "alwaysExpanded", "tabindex", "expanded", "value", "inlineSuggestion"], outputs: ["expandedChange", "valueChange"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxPopup, selector: "ng-template[ngComboboxPopup]", inputs: ["combobox", "popupType"], exportAs: ["ngComboboxPopup"] }, { kind: "directive", type: ComboboxWidget, selector: "[ngComboboxWidget]", inputs: ["activeDescendant"], exportAs: ["ngComboboxWidget"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "tabindex", "value"], outputs: ["valueChange"], exportAs: ["ngListbox"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "directive", type: Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
7777
+ }
7778
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpAutocomplete, decorators: [{
7779
+ type: Component,
7780
+ args: [{ selector: 'mat-exp-autocomplete', imports: [
7781
+ Combobox,
7782
+ ComboboxPopup,
7783
+ ComboboxWidget,
7784
+ Listbox,
7785
+ Option,
7786
+ Dir,
7787
+ CdkConnectedOverlay,
7788
+ CdkOverlayOrigin,
7789
+ MatFormField,
7790
+ MatLabel,
7791
+ MatInput,
7792
+ MatIcon,
7793
+ MatRipple,
7794
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
7795
+ '(document:pointerdown)': '_outside($event)',
7796
+ '(document:pointerup)': '_pressed.set(null)',
7797
+ '(document:pointercancel)': '_pressed.set(null)',
7798
+ }, template: "<div\n class=\"mat-exp-autocomplete-field\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n>\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ label() }}</mat-label>\n <input\n #input\n matInput\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n autocomplete=\"off\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [value]=\"query()\"\n (valueChange)=\"_edit($event)\"\n [expanded]=\"_expanded()\"\n (expandedChange)=\"_expand($event)\"\n [preserveContent]=\"true\"\n (focus)=\"open()\"\n (click)=\"open()\"\n (keydown)=\"_key($event)\"\n />\n </mat-form-field>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"_present()\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayWidth]=\"_popupWidth()\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n (positionChange)=\"_origin($event.connectionPair.overlayY === 'bottom')\"\n >\n <div\n #panel\n ngComboboxWidget\n ngListbox\n #listbox=\"ngListbox\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [value]=\"_selection()\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [softDisabled]=\"false\"\n [class]=\"_classes()\"\n [attr.aria-label]=\"label() + ' suggestions'\"\n [attr.aria-hidden]=\"!_expanded() ? 'true' : null\"\n [attr.inert]=\"!_expanded() ? '' : null\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n >\n @for (option of _matches(); track option) {\n <!-- The input owns keyboard focus and activation through aria-activedescendant. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n ngOption\n matRipple\n [matRippleDisabled]=\"!motion()\"\n #item=\"ngOption\"\n [value]=\"option\"\n [label]=\"option\"\n [attr.data-value]=\"option\"\n class=\"mat-exp-autocomplete-option\"\n [class.mat-exp-autocomplete-selected]=\"value() === option\"\n [class.mat-exp-autocomplete-active]=\"item.active()\"\n [class.mat-exp-autocomplete-pressed]=\"_pressed() === option\"\n (pointerdown)=\"$event.button === 0 && !disabled() && _pressed.set(option)\"\n (mousedown)=\"$event.preventDefault()\"\n (pointerleave)=\"_pressed.set(null)\"\n (click)=\"_choose(option)\"\n >\n <span class=\"mat-exp-autocomplete-row\"\n ><span>{{ option }}</span>\n <mat-icon class=\"mat-exp-autocomplete-check\" aria-hidden=\"true\">{{\n value() === option ? 'check' : ''\n }}</mat-icon>\n </span>\n </div>\n } @empty {\n <div\n ngOption\n value=\"\"\n [label]=\"emptyLabel()\"\n disabled\n class=\"mat-exp-autocomplete-option\"\n >\n {{ emptyLabel() }}\n </div>\n }\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [".mat-exp-autocomplete-panel[role=listbox]{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));--city-selected: var( --mat-exp-menu-selected-container-color, var(--mat-sys-tertiary-container) );--city-on-selected: var( --mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary-container) );--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));--city-target: 48px;--mat-autocomplete-container-shape: var(--mat-exp-menu-container-shape, 16px);--mat-autocomplete-background-color: var(--city-surface);--mat-autocomplete-container-elevation-shadow: var(--mat-exp-menu-elevation, var(--mat-sys-level2));--mat-option-label-text-color: var(--city-label);--mat-option-selected-state-label-text-color: var(--city-on-selected);--mat-option-selected-state-layer-color: transparent;--mat-option-hover-state-layer-color: transparent;--mat-option-focus-state-layer-color: transparent;--mat-option-label-text-font: var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));--mat-option-label-text-size: var(--mat-exp-menu-label-size, 14px);--mat-option-label-text-weight: var(--mat-exp-menu-label-weight, 500);--mat-option-label-text-line-height: var(--mat-exp-menu-label-line-height, 20px);--mat-option-label-text-tracking: var(--mat-exp-menu-label-tracking, .1px);border-radius:var(--mat-exp-menu-container-shape, 16px)!important;max-block-size:18rem;padding:2px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:auto;scrollbar-width:auto;scrollbar-color:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--city-surface);clip-path:inset(0 round var(--mat-exp-menu-container-shape, 16px))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-panel-vibrant{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));--city-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));--city-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-1{--city-target: 44px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-2{--city-target: 40px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-3{--city-target: 36px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-no-motion{animation:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option{--city-row-shape: var(--mat-exp-menu-item-shape, 4px);--city-row-state: var(--city-state);position:relative;isolation:isolate;min-block-size:var(--city-target);padding-inline:16px;border-radius:var(--city-row-shape);background:transparent}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:first-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:last-child{--city-row-shape: var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:only-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:before,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:after{content:\"\";position:absolute;inset:2px 0;z-index:-1;border-radius:var(--city-row-shape);pointer-events:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):hover:after{background:color-mix(in srgb,var(--city-row-state) 8%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active:after,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):active:after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{--city-row-shape: var(--mat-exp-menu-selected-shape, 12px);--city-row-state: var(--city-on-selected);color:var(--city-on-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:var(--city-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active{outline:var(--mat-exp-menu-focus-width, 3px) solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:var(--mat-exp-menu-focus-offset, -3px)}@supports selector(::-webkit-scrollbar){.mat-exp-autocomplete-panel[role=listbox]{scrollbar-color:auto;scrollbar-width:auto}}.mat-exp-autocomplete-panel::-webkit-scrollbar{width:var(--mat-exp-menu-scrollbar-width, 12px)}.mat-exp-autocomplete-panel::-webkit-scrollbar-button{display:none}.mat-exp-autocomplete-panel::-webkit-scrollbar-track{margin-block:4px;background:var(--city-surface)}.mat-exp-autocomplete-panel::-webkit-scrollbar-thumb{border:3px solid var(--city-surface);border-radius:12px;background:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline))}.mat-exp-autocomplete-row{display:flex;align-items:center;justify-content:space-between;gap:12px;inline-size:100%}.mat-exp-autocomplete-check{inline-size:20px;block-size:20px;font-size:20px;line-height:20px;flex-shrink:0}@media(prefers-reduced-motion:reduce){.mat-exp-autocomplete-panel[role=listbox]{animation:none}}@media(forced-colors:active){.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-active{outline-color:Highlight}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:SelectedItemText}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:SelectedItem;forced-color-adjust:none}}mat-exp-autocomplete{display:block}.mat-exp-autocomplete-field{inline-size:min(100%,22rem)}.mat-exp-autocomplete-field mat-form-field{inline-size:100%}.mat-exp-autocomplete-surface{box-sizing:border-box;inline-size:100%;background:var(--city-surface);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2));transform-origin:left top}.mat-exp-autocomplete-surface .mat-exp-autocomplete-option{box-sizing:border-box;display:flex;align-items:center;overflow:hidden;cursor:pointer;color:var(--city-label);font-family:var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));font-size:var(--mat-exp-menu-label-size, 14px);font-weight:var(--mat-exp-menu-label-weight, 500);line-height:var(--mat-exp-menu-label-line-height, 20px);letter-spacing:var(--mat-exp-menu-label-tracking, .1px)}.mat-exp-autocomplete-surface .mat-exp-autocomplete-option[aria-disabled=true]{cursor:default;opacity:.38}.mat-exp-autocomplete-surface .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:var(--city-on-selected)}.mat-exp-autocomplete-surface.mat-exp-autocomplete-panel[role=listbox]{clip-path:none}.mat-exp-autocomplete-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-pressed:not([aria-disabled=true]):after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}\n"] }]
7799
+ }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], filterMotion: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMotion", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], rtl: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtl", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], selected: [{ type: i0.Output, args: ["selected"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], _input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], _originElement: [{ type: i0.ViewChild, args: ['origin', { ...{
7800
+ read: (ElementRef),
7801
+ }, isSignal: true }] }], _panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], _listbox: [{ type: i0.ViewChild, args: ['listbox', { isSignal: true }] }], _overlay: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }] } });
7802
+
7803
+ /** Fixed single/multiple choice with Angular forms integration and an Expressive popup. */
7804
+ class MatExpSelect {
7805
+ options = input([], /* @ts-ignore */
7806
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
7807
+ multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7808
+ label = input('Choose an option', /* @ts-ignore */
7809
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
7810
+ placeholder = input('Select an option', /* @ts-ignore */
7811
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7812
+ emptyLabel = input('No options available', /* @ts-ignore */
7813
+ ...(ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []));
7814
+ color = input('standard', /* @ts-ignore */
7815
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
7816
+ density = input(0, /* @ts-ignore */
7817
+ ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
7818
+ motion = input(true, { ...(ngDevMode ? { debugName: "motion" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7819
+ /** Popup spatial spring. Off settles immediately; reduced motion always takes precedence. */
7820
+ popupMotion = input('fast', /* @ts-ignore */
7821
+ ...(ngDevMode ? [{ debugName: "popupMotion" }] : /* istanbul ignore next */ []));
7822
+ rtl = input(false, { ...(ngDevMode ? { debugName: "rtl" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7823
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7824
+ /** Accessible required state. Apply Angular Validators.required for form validation. */
7825
+ required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
7826
+ compareWith = input(Object.is, /* @ts-ignore */
7827
+ ...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
7828
+ valueChange = output();
7829
+ /** Emitted once when a user interaction changes the confirmed selection. */
7830
+ selectionChange = output();
7831
+ opened = output();
7832
+ /** Emitted after the popup's exit completes. */
7833
+ closed = output();
7834
+ _value = signal(null, /* @ts-ignore */
7835
+ ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
7836
+ /** Two-way selection. Use a scalar for single mode, an array for multiple mode. */
7837
+ get value() {
7838
+ return this._value();
7839
+ }
7840
+ set value(value) {
7841
+ this._value.set(value);
7842
+ }
7843
+ _expanded = signal(false, /* @ts-ignore */
7844
+ ...(ngDevMode ? [{ debugName: "_expanded" }] : /* istanbul ignore next */ []));
7845
+ _present = signal(false, /* @ts-ignore */
7846
+ ...(ngDevMode ? [{ debugName: "_present" }] : /* istanbul ignore next */ []));
7847
+ _pressed = signal(null, /* @ts-ignore */
7848
+ ...(ngDevMode ? [{ debugName: "_pressed" }] : /* istanbul ignore next */ []));
7849
+ _formDisabled = signal(false, /* @ts-ignore */
7850
+ ...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
7851
+ _disabled = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
7852
+ ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
7853
+ _closingOptions = signal(null, /* @ts-ignore */
7854
+ ...(ngDevMode ? [{ debugName: "_closingOptions" }] : /* istanbul ignore next */ []));
7855
+ _renderedOptions = computed(() => this._closingOptions() ?? this.options(), /* @ts-ignore */
7856
+ ...(ngDevMode ? [{ debugName: "_renderedOptions" }] : /* istanbul ignore next */ []));
7857
+ _indices = computed(() => {
7858
+ const value = this._value();
7859
+ const selected = this.multiple()
7860
+ ? Array.isArray(value)
7861
+ ? value
7862
+ : []
7863
+ : value === null
7864
+ ? []
7865
+ : [value];
7866
+ return this._renderedOptions().flatMap((option, index) => selected.some((item) => this.compareWith()(option.value, item)) ? [index] : []);
7867
+ }, /* @ts-ignore */
7868
+ ...(ngDevMode ? [{ debugName: "_indices" }] : /* istanbul ignore next */ []));
7869
+ _display = computed(() => {
7870
+ const value = this._value();
7871
+ const selected = this.multiple()
7872
+ ? Array.isArray(value)
7873
+ ? value
7874
+ : []
7875
+ : value === null
7876
+ ? []
7877
+ : [value];
7878
+ return this.options()
7879
+ .filter((option) => selected.some((item) => this.compareWith()(option.value, item)))
7880
+ .map((option) => option.label)
7881
+ .join(', ');
7882
+ }, /* @ts-ignore */
7883
+ ...(ngDevMode ? [{ debugName: "_display" }] : /* istanbul ignore next */ []));
7884
+ _classes = computed(() => [
7885
+ 'mat-exp-select-surface',
7886
+ 'mat-exp-autocomplete-panel',
7887
+ `mat-exp-autocomplete-panel-${this.color()}`,
7888
+ `mat-exp-autocomplete-density${this.density()}`,
7889
+ ].join(' '), /* @ts-ignore */
7890
+ ...(ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []));
7891
+ _positions = [
7892
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
7893
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
7894
+ ];
7895
+ _document = inject(DOCUMENT);
7896
+ _host = inject(ElementRef);
7897
+ _destroy = inject(DestroyRef);
7898
+ _changeDetector = inject(ChangeDetectorRef);
7899
+ _trigger = viewChild('trigger', /* @ts-ignore */
7900
+ ...(ngDevMode ? [{ debugName: "_trigger" }] : /* istanbul ignore next */ []));
7901
+ _originElement = viewChild('origin', { ...(ngDevMode ? { debugName: "_originElement" } : /* istanbul ignore next */ {}), read: (ElementRef) });
7902
+ _popupWidth = injectOriginWidth(this._originElement);
7903
+ _panel = viewChild('panel', /* @ts-ignore */
7904
+ ...(ngDevMode ? [{ debugName: "_panel" }] : /* istanbul ignore next */ []));
7905
+ _surface = viewChild('surface', /* @ts-ignore */
7906
+ ...(ngDevMode ? [{ debugName: "_surface" }] : /* istanbul ignore next */ []));
7907
+ _listbox = viewChild('listbox', /* @ts-ignore */
7908
+ ...(ngDevMode ? [{ debugName: "_listbox" }] : /* istanbul ignore next */ []));
7909
+ _overlay = viewChild(CdkConnectedOverlay, /* @ts-ignore */
7910
+ ...(ngDevMode ? [{ debugName: "_overlay" }] : /* istanbul ignore next */ []));
7911
+ _motion;
7912
+ _motionSurface;
7913
+ _removeListeners;
7914
+ _lastOpen;
7915
+ _lastAnimate;
7916
+ _lastPopupMotion;
7917
+ _above = false;
7918
+ _initial;
7919
+ _pendingKey;
7920
+ _typeaheadUntil = 0;
7921
+ _userEvent = 0;
7922
+ _pendingValues;
7923
+ _onChange = () => {
7924
+ /* Forms callbacks are optional until registered. */
7925
+ };
7926
+ _onTouched = () => {
7927
+ /* Forms callbacks are optional until registered. */
7928
+ };
7929
+ constructor() {
7930
+ afterRenderEffect(() => {
7931
+ const panel = this._panel()?.nativeElement;
7932
+ const surface = this._surface()?.nativeElement;
7933
+ const open = this._expanded();
7934
+ const popupMotion = this.popupMotion();
7935
+ const animate = this.motion() && popupMotion !== 'off';
7936
+ if (this._disabled() && open)
7937
+ this.close();
7938
+ if (surface !== this._motionSurface) {
7939
+ this._removeListeners?.();
7940
+ this._motion?.destroy();
7941
+ this._motion = undefined;
7942
+ this._motionSurface = surface;
7943
+ this._lastOpen = undefined;
7944
+ if (panel && surface && this._document.defaultView) {
7945
+ this._motion = createMenuMotion(surface, this._document.defaultView.matchMedia('(prefers-reduced-motion: reduce)'));
7946
+ const capture = (event) => this._capture(event);
7947
+ const finish = () => this._finishSelection();
7948
+ const resize = typeof ResizeObserver === 'undefined'
7949
+ ? undefined
7950
+ : new ResizeObserver(() => this._scrollActiveIntoView());
7951
+ resize?.observe(panel);
7952
+ panel.addEventListener('keydown', finish);
7953
+ panel.addEventListener('click', finish);
7954
+ panel.addEventListener('keydown', capture, true);
7955
+ panel.addEventListener('click', capture, true);
7956
+ this._removeListeners = () => {
7957
+ resize?.disconnect();
7958
+ panel.removeEventListener('keydown', finish);
7959
+ panel.removeEventListener('click', finish);
7960
+ panel.removeEventListener('keydown', capture, true);
7961
+ panel.removeEventListener('click', capture, true);
7962
+ };
7963
+ }
7964
+ }
7965
+ if (surface)
7966
+ surface.style.transformOrigin = `${this.rtl() ? 'right' : 'left'} ${this._above ? 'bottom' : 'top'}`;
7967
+ if (this._motion &&
7968
+ (open !== this._lastOpen ||
7969
+ animate !== this._lastAnimate ||
7970
+ popupMotion !== this._lastPopupMotion)) {
7971
+ this._lastOpen = open;
7972
+ this._lastAnimate = animate;
7973
+ this._lastPopupMotion = popupMotion;
7974
+ this._motion.setOpen(open, animate, open
7975
+ ? undefined
7976
+ : () => {
7977
+ if (!this._expanded() && !this._destroy.destroyed) {
7978
+ this._present.set(false);
7979
+ this.closed.emit();
7980
+ }
7981
+ }, popupMotion === 'standard' ? DEFAULT_SPATIAL_SPRING : FAST_SPATIAL_SPRING);
7982
+ }
7983
+ if (open && this._listbox()) {
7984
+ if (this._initial) {
7985
+ const options = this._renderedOptions();
7986
+ const candidates = options.flatMap((option, index) => (option.disabled ? [] : [index]));
7987
+ const selected = this._indices().find((index) => !options[index]?.disabled);
7988
+ const index = selected ?? (this._initial === 'last' ? candidates.at(-1) : candidates[0]);
7989
+ if (index !== undefined)
7990
+ this._listbox().gotoIndex(index);
7991
+ this._initial = undefined;
7992
+ }
7993
+ if (this._pendingKey) {
7994
+ panel?.dispatchEvent(new KeyboardEvent('keydown', this._pendingKey));
7995
+ this._pendingKey = undefined;
7996
+ }
7997
+ }
7998
+ });
7999
+ afterRenderEffect(() => {
8000
+ this._popupWidth();
8001
+ this._panel();
8002
+ this._listbox()?.activeDescendant();
8003
+ this.options();
8004
+ this._expanded();
8005
+ this._overlay()?.overlayRef?.updatePosition();
8006
+ this._scrollActiveIntoView();
8007
+ });
8008
+ this._destroy.onDestroy(() => {
8009
+ this._removeListeners?.();
8010
+ this._motion?.destroy();
8011
+ });
8012
+ }
8013
+ get isOpen() {
8014
+ return this._expanded();
8015
+ }
8016
+ open() {
8017
+ if (this._disabled())
8018
+ return;
8019
+ const wasOpen = this._expanded();
8020
+ this._closingOptions.set(null);
8021
+ this._present.set(true);
8022
+ this._expanded.set(true);
8023
+ this.focus();
8024
+ if (!wasOpen) {
8025
+ this._initial ??= 'first';
8026
+ this._typeaheadUntil = 0;
8027
+ this.opened.emit();
8028
+ }
8029
+ }
8030
+ close() {
8031
+ if (this._expanded())
8032
+ this._closingOptions.set(this.options());
8033
+ this._expanded.set(false);
8034
+ this._pressed.set(null);
8035
+ }
8036
+ focus() {
8037
+ if (!this._disabled())
8038
+ this._trigger()?.nativeElement.focus({ preventScroll: true });
8039
+ }
8040
+ writeValue(value) {
8041
+ this._value.set(value ?? null);
8042
+ this._changeDetector.markForCheck();
8043
+ }
8044
+ registerOnChange(fn) {
8045
+ this._onChange = fn;
8046
+ }
8047
+ registerOnTouched(fn) {
8048
+ this._onTouched = fn;
8049
+ }
8050
+ setDisabledState(disabled) {
8051
+ this._formDisabled.set(disabled);
8052
+ this._changeDetector.markForCheck();
8053
+ }
8054
+ _expand(open) {
8055
+ if (open)
8056
+ this.open();
8057
+ else
8058
+ this.close();
8059
+ }
8060
+ _key(event) {
8061
+ if (this._disabled() || event.isComposing || event.altKey || event.ctrlKey || event.metaKey)
8062
+ return;
8063
+ if (event.key === 'Escape' || event.key === 'Tab') {
8064
+ this.close();
8065
+ return;
8066
+ }
8067
+ if (!this._expanded() && !event.repeat) {
8068
+ if (event.key === 'ArrowUp' || event.key === 'Home' || event.key === 'End') {
8069
+ event.preventDefault();
8070
+ this._initial = event.key === 'Home' ? 'first' : 'last';
8071
+ this.open();
8072
+ }
8073
+ else if (event.key.length === 1 && event.key !== ' ') {
8074
+ event.preventDefault();
8075
+ this._pendingKey = event;
8076
+ this.open();
8077
+ }
8078
+ }
8079
+ }
8080
+ _blur() {
8081
+ queueMicrotask(() => {
8082
+ if (this._destroy.destroyed)
8083
+ return;
8084
+ const active = this._document.activeElement;
8085
+ if (!this._host.nativeElement.contains(active) &&
8086
+ !this._panel()?.nativeElement.contains(active)) {
8087
+ this.close();
8088
+ this._onTouched();
8089
+ this._changeDetector.markForCheck();
8090
+ }
8091
+ });
8092
+ }
8093
+ _outside(event) {
8094
+ const target = event.target;
8095
+ if (target &&
8096
+ !this._host.nativeElement.contains(target) &&
8097
+ !this._panel()?.nativeElement.contains(target))
8098
+ this.close();
8099
+ }
8100
+ _press(index) {
8101
+ if (!this._disabled() && !this._renderedOptions()[index]?.disabled)
8102
+ this._pressed.set(index);
8103
+ }
8104
+ _release() {
8105
+ this._pressed.set(null);
8106
+ }
8107
+ _listValueChanged(value) {
8108
+ // Aria also reconciles values when options disappear. Only a real event
8109
+ // transaction may notify forms; one range/select-all event emits once.
8110
+ if (this._userEvent)
8111
+ this._pendingValues = value;
8112
+ }
8113
+ _origin(above) {
8114
+ this._above = above;
8115
+ const surface = this._surface()?.nativeElement;
8116
+ if (surface)
8117
+ surface.style.transformOrigin = `${this.rtl() ? 'right' : 'left'} ${above ? 'bottom' : 'top'}`;
8118
+ }
8119
+ _capture(event) {
8120
+ if (!this._expanded() || this._disabled() || ('isComposing' in event && event.isComposing)) {
8121
+ event.preventDefault();
8122
+ event.stopImmediatePropagation();
8123
+ return;
8124
+ }
8125
+ if (!this.multiple()) {
8126
+ let index;
8127
+ if (event.type === 'click') {
8128
+ const option = event.target.closest('[data-option-index]');
8129
+ if (option)
8130
+ index = Number(option.dataset['optionIndex']);
8131
+ }
8132
+ else {
8133
+ const key = event;
8134
+ const ordinary = !key.altKey && !key.ctrlKey && !key.metaKey && !key.shiftKey && !key.repeat;
8135
+ const typing = Date.now() < this._typeaheadUntil;
8136
+ if (ordinary && (key.key === 'Enter' || (key.key === ' ' && !typing))) {
8137
+ const active = this._listbox()?.activeDescendant();
8138
+ const option = active ? this._document.getElementById(active) : null;
8139
+ if (option?.dataset['optionIndex'] !== undefined)
8140
+ index = Number(option.dataset['optionIndex']);
8141
+ }
8142
+ else if (ordinary && key.key.length === 1)
8143
+ this._typeaheadUntil = Date.now() + (this._listbox()?.typeaheadDelay() ?? 500);
8144
+ }
8145
+ if (index !== undefined) {
8146
+ event.preventDefault();
8147
+ event.stopImmediatePropagation();
8148
+ const option = this._renderedOptions()[index];
8149
+ if (option && !option.disabled) {
8150
+ this._commit(option.value);
8151
+ this.close();
8152
+ this.focus();
8153
+ }
8154
+ }
8155
+ return;
8156
+ }
8157
+ this._userEvent++;
8158
+ this._pendingValues = undefined;
8159
+ }
8160
+ _finishSelection() {
8161
+ // A browser can checkpoint microtasks between capture and bubble listeners.
8162
+ // Finish in a later bubble listener instead, after Aria emits all changes for
8163
+ // this event (including select-all), but before any asynchronous reconciliation.
8164
+ if (!this._userEvent)
8165
+ return;
8166
+ const selected = this._pendingValues;
8167
+ this._userEvent = 0;
8168
+ this._pendingValues = undefined;
8169
+ if (selected && this._expanded() && !this._disabled()) {
8170
+ const options = this._renderedOptions();
8171
+ this._commit([...selected]
8172
+ .sort((a, b) => a - b)
8173
+ .flatMap((index) => (options[index] ? [options[index].value] : [])));
8174
+ }
8175
+ }
8176
+ _scrollActiveIntoView() {
8177
+ const panel = this._panel()?.nativeElement;
8178
+ const activeId = this._listbox()?.activeDescendant();
8179
+ if (!panel || !activeId || !this._expanded())
8180
+ return;
8181
+ const option = this._document.getElementById(activeId);
8182
+ if (!option || !panel.contains(option) || !panel.clientHeight)
8183
+ return;
8184
+ // Rect differences remain correct regardless of the option's offset parent.
8185
+ // Divide out the shared entrance scale before writing layout scroll pixels.
8186
+ const panelRect = panel.getBoundingClientRect();
8187
+ const optionRect = option.getBoundingClientRect();
8188
+ const scale = panel.offsetHeight ? panelRect.height / panel.offsetHeight : 1;
8189
+ if (!scale)
8190
+ return;
8191
+ const top = (optionRect.top - panelRect.top) / scale - panel.clientTop;
8192
+ const bottom = top + optionRect.height / scale;
8193
+ if (top < 0)
8194
+ panel.scrollTop += top;
8195
+ else if (bottom > panel.clientHeight)
8196
+ panel.scrollTop += bottom - panel.clientHeight;
8197
+ // Overlay attachment can initially constrain the panel to a few pixels.
8198
+ // Its ResizeObserver repeats this measurement once final bounds are applied.
8199
+ }
8200
+ _commit(next) {
8201
+ const previous = this._value();
8202
+ const compare = this.compareWith();
8203
+ const same = this.multiple()
8204
+ ? Array.isArray(previous) &&
8205
+ Array.isArray(next) &&
8206
+ previous.length === next.length &&
8207
+ previous.every((item, index) => compare(item, next[index]))
8208
+ : previous === null || next === null
8209
+ ? previous === next
8210
+ : compare(previous, next);
8211
+ if (same)
8212
+ return;
8213
+ this._value.set(next);
8214
+ this._onChange(next);
8215
+ this.valueChange.emit(next);
8216
+ this.selectionChange.emit(next);
8217
+ // Native capture and Aria's deferred keyboard relay do not mark the
8218
+ // consumer template that displays its non-signal FormControl value.
8219
+ this._changeDetector.markForCheck();
8220
+ }
8221
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
8222
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpSelect, isStandalone: true, selector: "mat-exp-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, popupMotion: { classPropertyName: "popupMotion", publicName: "popupMotion", isSignal: true, isRequired: false, transformFunction: null }, rtl: { classPropertyName: "rtl", publicName: "rtl", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", selectionChange: "selectionChange", opened: "opened", closed: "closed" }, host: { listeners: { "document:pointerdown": "_outside($event)", "document:pointerup": "_release()", "document:pointercancel": "_release()" } }, providers: [
8223
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MatExpSelect), multi: true },
8224
+ ], viewQueries: [{ propertyName: "_trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "_originElement", first: true, predicate: ["origin"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "_surface", first: true, predicate: ["surface"], descendants: true, isSignal: true }, { propertyName: "_listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }, { propertyName: "_overlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"mat-exp-select-field\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n>\n <span class=\"mat-exp-select-label\"\n >{{ label() }}\n @if (required()) {\n <span aria-hidden=\"true\"> *</span>\n }\n </span>\n <div\n #trigger\n ngCombobox\n #combobox=\"ngCombobox\"\n class=\"mat-exp-select-trigger\"\n [disabled]=\"_disabled()\"\n [softDisabled]=\"false\"\n [expanded]=\"_expanded()\"\n (expandedChange)=\"_expand($event)\"\n [preserveContent]=\"true\"\n [attr.aria-label]=\"label()\"\n [attr.aria-autocomplete]=\"'none'\"\n [attr.aria-required]=\"required()\"\n (keydown)=\"_key($event)\"\n (focusout)=\"_blur()\"\n >\n <span class=\"mat-exp-select-value\" [class.mat-exp-select-placeholder]=\"!_display()\">{{\n _display() || placeholder()\n }}</span>\n <mat-icon aria-hidden=\"true\">{{ _expanded() ? 'arrow_drop_up' : 'arrow_drop_down' }}</mat-icon>\n </div>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"_present()\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayWidth]=\"_popupWidth()\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n (positionChange)=\"_origin($event.connectionPair.overlayY === 'bottom')\"\n >\n <div #surface class=\"mat-exp-select-popup\">\n <div\n #panel\n ngComboboxWidget\n ngListbox\n #listbox=\"ngListbox\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [value]=\"_indices()\"\n (valueChange)=\"_listValueChanged($event)\"\n [multi]=\"multiple()\"\n [softDisabled]=\"false\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [class]=\"_classes()\"\n [attr.aria-label]=\"label() + ' options'\"\n [attr.aria-hidden]=\"!_expanded() ? 'true' : null\"\n [attr.inert]=\"!_expanded() ? '' : null\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n >\n @for (option of _renderedOptions(); track $index; let index = $index) {\n <div\n ngOption\n matRipple\n #item=\"ngOption\"\n [value]=\"index\"\n [label]=\"option.label\"\n [disabled]=\"!!option.disabled\"\n [attr.data-option-index]=\"index\"\n [matRippleDisabled]=\"!motion() || !!option.disabled\"\n class=\"mat-exp-autocomplete-option\"\n [class.mat-exp-autocomplete-selected]=\"_indices().includes(index)\"\n [class.mat-exp-autocomplete-active]=\"item.active()\"\n [class.mat-exp-select-pressed]=\"_pressed() === index\"\n (pointerdown)=\"_press(index)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <span class=\"mat-exp-autocomplete-row\"\n ><span>{{ option.label }}</span>\n <mat-icon class=\"mat-exp-autocomplete-check\" aria-hidden=\"true\">{{\n _indices().includes(index) ? 'check' : ''\n }}</mat-icon>\n </span>\n </div>\n } @empty {\n <div\n ngOption\n [value]=\"-1\"\n [label]=\"emptyLabel()\"\n disabled\n class=\"mat-exp-autocomplete-option\"\n >\n {{ emptyLabel() }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [".mat-exp-autocomplete-panel[role=listbox]{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));--city-selected: var( --mat-exp-menu-selected-container-color, var(--mat-sys-tertiary-container) );--city-on-selected: var( --mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary-container) );--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));--city-target: 48px;--mat-autocomplete-container-shape: var(--mat-exp-menu-container-shape, 16px);--mat-autocomplete-background-color: var(--city-surface);--mat-autocomplete-container-elevation-shadow: var(--mat-exp-menu-elevation, var(--mat-sys-level2));--mat-option-label-text-color: var(--city-label);--mat-option-selected-state-label-text-color: var(--city-on-selected);--mat-option-selected-state-layer-color: transparent;--mat-option-hover-state-layer-color: transparent;--mat-option-focus-state-layer-color: transparent;--mat-option-label-text-font: var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));--mat-option-label-text-size: var(--mat-exp-menu-label-size, 14px);--mat-option-label-text-weight: var(--mat-exp-menu-label-weight, 500);--mat-option-label-text-line-height: var(--mat-exp-menu-label-line-height, 20px);--mat-option-label-text-tracking: var(--mat-exp-menu-label-tracking, .1px);border-radius:var(--mat-exp-menu-container-shape, 16px)!important;max-block-size:18rem;padding:2px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:auto;scrollbar-width:auto;scrollbar-color:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--city-surface);clip-path:inset(0 round var(--mat-exp-menu-container-shape, 16px))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-panel-vibrant{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));--city-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));--city-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-1{--city-target: 44px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-2{--city-target: 40px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-3{--city-target: 36px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-no-motion{animation:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option{--city-row-shape: var(--mat-exp-menu-item-shape, 4px);--city-row-state: var(--city-state);position:relative;isolation:isolate;min-block-size:var(--city-target);padding-inline:16px;border-radius:var(--city-row-shape);background:transparent}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:first-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:last-child{--city-row-shape: var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:only-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:before,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:after{content:\"\";position:absolute;inset:2px 0;z-index:-1;border-radius:var(--city-row-shape);pointer-events:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):hover:after{background:color-mix(in srgb,var(--city-row-state) 8%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active:after,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):active:after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{--city-row-shape: var(--mat-exp-menu-selected-shape, 12px);--city-row-state: var(--city-on-selected);color:var(--city-on-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:var(--city-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active{outline:var(--mat-exp-menu-focus-width, 3px) solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:var(--mat-exp-menu-focus-offset, -3px)}@supports selector(::-webkit-scrollbar){.mat-exp-autocomplete-panel[role=listbox]{scrollbar-color:auto;scrollbar-width:auto}}.mat-exp-autocomplete-panel::-webkit-scrollbar{width:var(--mat-exp-menu-scrollbar-width, 12px)}.mat-exp-autocomplete-panel::-webkit-scrollbar-button{display:none}.mat-exp-autocomplete-panel::-webkit-scrollbar-track{margin-block:4px;background:var(--city-surface)}.mat-exp-autocomplete-panel::-webkit-scrollbar-thumb{border:3px solid var(--city-surface);border-radius:12px;background:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline))}.mat-exp-autocomplete-row{display:flex;align-items:center;justify-content:space-between;gap:12px;inline-size:100%}.mat-exp-autocomplete-check{inline-size:20px;block-size:20px;font-size:20px;line-height:20px;flex-shrink:0}@media(prefers-reduced-motion:reduce){.mat-exp-autocomplete-panel[role=listbox]{animation:none}}@media(forced-colors:active){.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-active{outline-color:Highlight}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:SelectedItemText}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:SelectedItem;forced-color-adjust:none}}mat-exp-select{display:block}.mat-exp-select-field{inline-size:min(100%,22rem)}.mat-exp-select-label{display:block;margin-block-end:4px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-small)}.mat-exp-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-block-size:48px;box-sizing:border-box;padding:12px 16px;border:1px solid var(--mat-sys-outline);border-radius:4px;cursor:pointer;background:var(--mat-sys-surface);color:var(--mat-sys-on-surface);font:var(--mat-sys-body-large)}.mat-exp-select-trigger:focus-visible{outline:3px solid var(--mat-sys-secondary);outline-offset:2px}.mat-exp-select-trigger[aria-disabled=true]{opacity:.38;cursor:default}.mat-exp-select-trigger mat-icon{flex-shrink:0}.mat-exp-select-value{overflow-wrap:anywhere}.mat-exp-select-placeholder{color:var(--mat-sys-on-surface-variant)}.mat-exp-select-popup{inline-size:100%;overflow:hidden;border-radius:var(--mat-exp-menu-container-shape, 16px);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2))}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox]{box-sizing:border-box;inline-size:100%;max-block-size:min(18rem,100dvh - 16px);background:var(--city-surface);box-shadow:none;clip-path:none}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option{box-sizing:border-box;display:flex;align-items:center;cursor:pointer;color:var(--city-label);font-family:var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));font-size:var(--mat-exp-menu-label-size, 14px);font-weight:var(--mat-exp-menu-label-weight, 500);line-height:var(--mat-exp-menu-label-line-height, 20px);letter-spacing:var(--mat-exp-menu-label-tracking, .1px)}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:var(--city-on-selected)}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true]{cursor:default}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true] .mat-exp-autocomplete-row{opacity:.38}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true]:not(:has(.mat-exp-autocomplete-row)){opacity:.38}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true].mat-exp-autocomplete-selected:before{opacity:.38}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-select-pressed:not([aria-disabled=true]):after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-panel-vibrant .mat-exp-autocomplete-option[aria-disabled=true].mat-exp-autocomplete-selected:before{opacity:1}\n"], dependencies: [{ kind: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["disabled", "readonly", "softDisabled", "alwaysExpanded", "tabindex", "expanded", "value", "inlineSuggestion"], outputs: ["expandedChange", "valueChange"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxPopup, selector: "ng-template[ngComboboxPopup]", inputs: ["combobox", "popupType"], exportAs: ["ngComboboxPopup"] }, { kind: "directive", type: ComboboxWidget, selector: "[ngComboboxWidget]", inputs: ["activeDescendant"], exportAs: ["ngComboboxWidget"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "tabindex", "value"], outputs: ["valueChange"], exportAs: ["ngListbox"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "directive", type: Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8225
+ }
8226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpSelect, decorators: [{
8227
+ type: Component,
8228
+ args: [{ selector: 'mat-exp-select', imports: [
8229
+ Combobox,
8230
+ ComboboxPopup,
8231
+ ComboboxWidget,
8232
+ Listbox,
8233
+ Option,
8234
+ Dir,
8235
+ CdkConnectedOverlay,
8236
+ CdkOverlayOrigin,
8237
+ MatIcon,
8238
+ MatRipple,
8239
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
8240
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MatExpSelect), multi: true },
8241
+ ], host: {
8242
+ '(document:pointerdown)': '_outside($event)',
8243
+ '(document:pointerup)': '_release()',
8244
+ '(document:pointercancel)': '_release()',
8245
+ }, template: "<div\n class=\"mat-exp-select-field\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n>\n <span class=\"mat-exp-select-label\"\n >{{ label() }}\n @if (required()) {\n <span aria-hidden=\"true\"> *</span>\n }\n </span>\n <div\n #trigger\n ngCombobox\n #combobox=\"ngCombobox\"\n class=\"mat-exp-select-trigger\"\n [disabled]=\"_disabled()\"\n [softDisabled]=\"false\"\n [expanded]=\"_expanded()\"\n (expandedChange)=\"_expand($event)\"\n [preserveContent]=\"true\"\n [attr.aria-label]=\"label()\"\n [attr.aria-autocomplete]=\"'none'\"\n [attr.aria-required]=\"required()\"\n (keydown)=\"_key($event)\"\n (focusout)=\"_blur()\"\n >\n <span class=\"mat-exp-select-value\" [class.mat-exp-select-placeholder]=\"!_display()\">{{\n _display() || placeholder()\n }}</span>\n <mat-icon aria-hidden=\"true\">{{ _expanded() ? 'arrow_drop_up' : 'arrow_drop_down' }}</mat-icon>\n </div>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"_present()\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayWidth]=\"_popupWidth()\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n (positionChange)=\"_origin($event.connectionPair.overlayY === 'bottom')\"\n >\n <div #surface class=\"mat-exp-select-popup\">\n <div\n #panel\n ngComboboxWidget\n ngListbox\n #listbox=\"ngListbox\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [value]=\"_indices()\"\n (valueChange)=\"_listValueChanged($event)\"\n [multi]=\"multiple()\"\n [softDisabled]=\"false\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [class]=\"_classes()\"\n [attr.aria-label]=\"label() + ' options'\"\n [attr.aria-hidden]=\"!_expanded() ? 'true' : null\"\n [attr.inert]=\"!_expanded() ? '' : null\"\n [dir]=\"rtl() ? 'rtl' : 'ltr'\"\n >\n @for (option of _renderedOptions(); track $index; let index = $index) {\n <div\n ngOption\n matRipple\n #item=\"ngOption\"\n [value]=\"index\"\n [label]=\"option.label\"\n [disabled]=\"!!option.disabled\"\n [attr.data-option-index]=\"index\"\n [matRippleDisabled]=\"!motion() || !!option.disabled\"\n class=\"mat-exp-autocomplete-option\"\n [class.mat-exp-autocomplete-selected]=\"_indices().includes(index)\"\n [class.mat-exp-autocomplete-active]=\"item.active()\"\n [class.mat-exp-select-pressed]=\"_pressed() === index\"\n (pointerdown)=\"_press(index)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <span class=\"mat-exp-autocomplete-row\"\n ><span>{{ option.label }}</span>\n <mat-icon class=\"mat-exp-autocomplete-check\" aria-hidden=\"true\">{{\n _indices().includes(index) ? 'check' : ''\n }}</mat-icon>\n </span>\n </div>\n } @empty {\n <div\n ngOption\n [value]=\"-1\"\n [label]=\"emptyLabel()\"\n disabled\n class=\"mat-exp-autocomplete-option\"\n >\n {{ emptyLabel() }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n </ng-template>\n</div>\n", styles: [".mat-exp-autocomplete-panel[role=listbox]{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-surface-container-low));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-surface));--city-selected: var( --mat-exp-menu-selected-container-color, var(--mat-sys-tertiary-container) );--city-on-selected: var( --mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary-container) );--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-surface));--city-target: 48px;--mat-autocomplete-container-shape: var(--mat-exp-menu-container-shape, 16px);--mat-autocomplete-background-color: var(--city-surface);--mat-autocomplete-container-elevation-shadow: var(--mat-exp-menu-elevation, var(--mat-sys-level2));--mat-option-label-text-color: var(--city-label);--mat-option-selected-state-label-text-color: var(--city-on-selected);--mat-option-selected-state-layer-color: transparent;--mat-option-hover-state-layer-color: transparent;--mat-option-focus-state-layer-color: transparent;--mat-option-label-text-font: var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));--mat-option-label-text-size: var(--mat-exp-menu-label-size, 14px);--mat-option-label-text-weight: var(--mat-exp-menu-label-weight, 500);--mat-option-label-text-line-height: var(--mat-exp-menu-label-line-height, 20px);--mat-option-label-text-tracking: var(--mat-exp-menu-label-tracking, .1px);border-radius:var(--mat-exp-menu-container-shape, 16px)!important;max-block-size:18rem;padding:2px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:auto;scrollbar-width:auto;scrollbar-color:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline)) var(--city-surface);clip-path:inset(0 round var(--mat-exp-menu-container-shape, 16px))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-panel-vibrant{--city-surface: var(--mat-exp-menu-container-color, var(--mat-sys-tertiary-container));--city-label: var(--mat-exp-menu-label-color, var(--mat-sys-on-tertiary-container));--city-selected: var(--mat-exp-menu-selected-container-color, var(--mat-sys-tertiary));--city-on-selected: var(--mat-exp-menu-selected-content-color, var(--mat-sys-on-tertiary));--city-state: var(--mat-exp-menu-state-layer-color, var(--mat-sys-on-tertiary-container))}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-1{--city-target: 44px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-2{--city-target: 40px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-density-3{--city-target: 36px}.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-no-motion{animation:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option{--city-row-shape: var(--mat-exp-menu-item-shape, 4px);--city-row-state: var(--city-state);position:relative;isolation:isolate;min-block-size:var(--city-target);padding-inline:16px;border-radius:var(--city-row-shape);background:transparent}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:first-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:last-child{--city-row-shape: var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-shape, 4px) var(--mat-exp-menu-item-outer-shape, 12px) var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:only-child{--city-row-shape: var(--mat-exp-menu-item-outer-shape, 12px)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:before,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:after{content:\"\";position:absolute;inset:2px 0;z-index:-1;border-radius:var(--city-row-shape);pointer-events:none}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):hover:after{background:color-mix(in srgb,var(--city-row-state) 8%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active:after,.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]):active:after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{--city-row-shape: var(--mat-exp-menu-selected-shape, 12px);--city-row-state: var(--city-on-selected);color:var(--city-on-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:var(--city-selected)}.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option:not([aria-disabled=true]).mat-exp-autocomplete-active{outline:var(--mat-exp-menu-focus-width, 3px) solid var(--mat-exp-menu-focus-color, var(--mat-sys-secondary));outline-offset:var(--mat-exp-menu-focus-offset, -3px)}@supports selector(::-webkit-scrollbar){.mat-exp-autocomplete-panel[role=listbox]{scrollbar-color:auto;scrollbar-width:auto}}.mat-exp-autocomplete-panel::-webkit-scrollbar{width:var(--mat-exp-menu-scrollbar-width, 12px)}.mat-exp-autocomplete-panel::-webkit-scrollbar-button{display:none}.mat-exp-autocomplete-panel::-webkit-scrollbar-track{margin-block:4px;background:var(--city-surface)}.mat-exp-autocomplete-panel::-webkit-scrollbar-thumb{border:3px solid var(--city-surface);border-radius:12px;background:var(--mat-exp-menu-scrollbar-color, var(--mat-sys-outline))}.mat-exp-autocomplete-row{display:flex;align-items:center;justify-content:space-between;gap:12px;inline-size:100%}.mat-exp-autocomplete-check{inline-size:20px;block-size:20px;font-size:20px;line-height:20px;flex-shrink:0}@media(prefers-reduced-motion:reduce){.mat-exp-autocomplete-panel[role=listbox]{animation:none}}@media(forced-colors:active){.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-active{outline-color:Highlight}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:SelectedItemText}.mat-exp-autocomplete-panel .mat-exp-autocomplete-option.mat-exp-autocomplete-selected:before{background:SelectedItem;forced-color-adjust:none}}mat-exp-select{display:block}.mat-exp-select-field{inline-size:min(100%,22rem)}.mat-exp-select-label{display:block;margin-block-end:4px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-small)}.mat-exp-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;min-block-size:48px;box-sizing:border-box;padding:12px 16px;border:1px solid var(--mat-sys-outline);border-radius:4px;cursor:pointer;background:var(--mat-sys-surface);color:var(--mat-sys-on-surface);font:var(--mat-sys-body-large)}.mat-exp-select-trigger:focus-visible{outline:3px solid var(--mat-sys-secondary);outline-offset:2px}.mat-exp-select-trigger[aria-disabled=true]{opacity:.38;cursor:default}.mat-exp-select-trigger mat-icon{flex-shrink:0}.mat-exp-select-value{overflow-wrap:anywhere}.mat-exp-select-placeholder{color:var(--mat-sys-on-surface-variant)}.mat-exp-select-popup{inline-size:100%;overflow:hidden;border-radius:var(--mat-exp-menu-container-shape, 16px);box-shadow:var(--mat-exp-menu-elevation, var(--mat-sys-level2))}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox]{box-sizing:border-box;inline-size:100%;max-block-size:min(18rem,100dvh - 16px);background:var(--city-surface);box-shadow:none;clip-path:none}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option{box-sizing:border-box;display:flex;align-items:center;cursor:pointer;color:var(--city-label);font-family:var(--mat-exp-menu-label-font, var(--mat-sys-label-large-font, sans-serif));font-size:var(--mat-exp-menu-label-size, 14px);font-weight:var(--mat-exp-menu-label-weight, 500);line-height:var(--mat-exp-menu-label-line-height, 20px);letter-spacing:var(--mat-exp-menu-label-tracking, .1px)}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-autocomplete-selected{color:var(--city-on-selected)}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true]{cursor:default}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true] .mat-exp-autocomplete-row{opacity:.38}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true]:not(:has(.mat-exp-autocomplete-row)){opacity:.38}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option[aria-disabled=true].mat-exp-autocomplete-selected:before{opacity:.38}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox] .mat-exp-autocomplete-option.mat-exp-select-pressed:not([aria-disabled=true]):after{background:color-mix(in srgb,var(--city-row-state) 10%,transparent)}.mat-exp-select-surface.mat-exp-autocomplete-panel[role=listbox].mat-exp-autocomplete-panel-vibrant .mat-exp-autocomplete-option[aria-disabled=true].mat-exp-autocomplete-selected:before{opacity:1}\n"] }]
8246
+ }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], popupMotion: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupMotion", required: false }] }], rtl: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtl", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], value: [{
8247
+ type: Input
8248
+ }], _trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], _originElement: [{ type: i0.ViewChild, args: ['origin', { ...{
8249
+ read: (ElementRef),
8250
+ }, isSignal: true }] }], _panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], _surface: [{ type: i0.ViewChild, args: ['surface', { isSignal: true }] }], _listbox: [{ type: i0.ViewChild, args: ['listbox', { isSignal: true }] }], _overlay: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }] } });
8251
+
5930
8252
  /** A Material-shaped reference whose completion follows the owned spring lifecycle. */
5931
8253
  class MatExpDialogRef {
5932
8254
  _cdk;
@@ -6661,7 +8983,7 @@ class MatExpDialogLayout {
6661
8983
  <ng-container [ngTemplateOutlet]="actions.template" />
6662
8984
  </div>
6663
8985
  }
6664
- `, isInline: true, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8986
+ `, isInline: true, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6665
8987
  }
6666
8988
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogLayout, decorators: [{
6667
8989
  type: Component,
@@ -6710,7 +9032,7 @@ class MatExpDialogConfirmation {
6710
9032
  <button matButton [matExpDialogClose]="true">{{ _data.confirmLabel }}</button>
6711
9033
  </ng-template>
6712
9034
  </mat-exp-dialog-layout>
6713
- `, isInline: true, dependencies: [{ kind: "component", type: MatExpDialogLayout, selector: "mat-exp-dialog-layout", exportAs: ["matExpDialogLayout"] }, { kind: "directive", type: MatExpDialogActions, selector: "ng-template[matExpDialogActions]", exportAs: ["matExpDialogActions"] }, { kind: "directive", type: MatExpDialogClose, selector: "[matExpDialogClose]", inputs: ["matExpDialogClose", "type"], exportAs: ["matExpDialogClose"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9035
+ `, isInline: true, dependencies: [{ kind: "component", type: MatExpDialogLayout, selector: "mat-exp-dialog-layout", exportAs: ["matExpDialogLayout"] }, { kind: "directive", type: MatExpDialogActions, selector: "ng-template[matExpDialogActions]", exportAs: ["matExpDialogActions"] }, { kind: "directive", type: MatExpDialogClose, selector: "[matExpDialogClose]", inputs: ["matExpDialogClose", "type"], exportAs: ["matExpDialogClose"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6714
9036
  }
6715
9037
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogConfirmation, decorators: [{
6716
9038
  type: Component,
@@ -6900,5 +9222,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
6900
9222
  * Generated bundle index. Do not edit.
6901
9223
  */
6902
9224
 
6903
- export { ButtonAdapter, IconButtonAdapter, MAT_EXP_BUTTON_DEFAULT_OPTIONS, MAT_EXP_BUTTON_GROUP, MAT_EXP_BUTTON_GROUP_DEFAULT_OPTIONS, MAT_EXP_BUTTON_GROUP_OPTIONS, MAT_EXP_BUTTON_GROUP_VALUE_ACCESSOR, MAT_EXP_BUTTON_OPTIONS, MAT_EXP_DIALOG_OPTIONS, MAT_EXP_FAB_MENU_OPTIONS, MAT_EXP_ICON_BUTTON_DEFAULT_OPTIONS, MAT_EXP_ICON_BUTTON_OPTIONS, MAT_EXP_LIST_DEFAULT_OPTIONS, MAT_EXP_LIST_OPTIONS, MAT_EXP_LOADING_INDICATOR_DEFAULT_OPTIONS, MAT_EXP_LOADING_INDICATOR_OPTIONS, MAT_EXP_LOADING_INDICATOR_SHAPES, MAT_EXP_LOADING_INDICATOR_VIEW_BOX, MAT_EXP_NAVIGATION_RAIL_OPTIONS, MAT_EXP_PROGRESS_INDICATOR_DEFAULT_OPTIONS, MAT_EXP_PROGRESS_INDICATOR_OPTIONS, MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS, MAT_EXP_RICH_TOOLTIP_OPTIONS, MAT_EXP_SEARCH_DEFAULT_OPTIONS, MAT_EXP_SEARCH_OPTIONS, MAT_EXP_SPLIT_BUTTON_DEFAULT_OPTIONS, MAT_EXP_SPLIT_BUTTON_OPTIONS, MAT_EXP_STEPPER_OPTIONS, MAT_EXP_TOOLBAR_OPTIONS, MatExpButton, MatExpButtonGroup, MatExpDialog, MatExpDialogActions, MatExpDialogClose, MatExpDialogLayout, MatExpDialogRef, MatExpFabMenu, MatExpFabMenuButton, MatExpFabMenuTrigger, MatExpIconButton, MatExpList, MatExpListItem, MatExpListMediaDirective, MatExpLoadingIndicator, MatExpNavigationRail, MatExpNavigationRailGroup, MatExpNavigationRailItem, MatExpNavigationRailSection, MatExpProgressIndicator, MatExpRichTooltip, MatExpRichTooltipTrigger, MatExpSearch, MatExpSearchResult, MatExpSelectableButtonChange, MatExpSplitButton, MatExpStep, MatExpStepper, MatExpToolbar, MatExpToolbarItem, bindButtonGroupChildren, injectMatExpButtonGroupOptions, injectMatExpButtonOptions, injectMatExpFabMenuOptions, injectMatExpIconButtonOptions, injectMatExpLoadingIndicatorOptions, injectMatExpProgressIndicatorOptions, injectMatExpRichTooltipOptions, injectMatExpSearchOptions, injectMatExpSplitButtonOptions, provideMatExpButtonGroupOptions, provideMatExpButtonOptions, provideMatExpDialogOptions, provideMatExpFabMenuOptions, provideMatExpIconButtonOptions, provideMatExpListOptions, provideMatExpLoadingIndicatorOptions, provideMatExpNavigationRailOptions, provideMatExpProgressIndicatorOptions, provideMatExpRichTooltipOptions, provideMatExpSearchOptions, provideMatExpSplitButtonOptions, provideMatExpStepperOptions, provideMatExpToolbarOptions, toButtonGroupChild };
9225
+ export { ButtonAdapter, IconButtonAdapter, MAT_EXP_BUTTON_DEFAULT_OPTIONS, MAT_EXP_BUTTON_GROUP, MAT_EXP_BUTTON_GROUP_DEFAULT_OPTIONS, MAT_EXP_BUTTON_GROUP_OPTIONS, MAT_EXP_BUTTON_GROUP_VALUE_ACCESSOR, MAT_EXP_BUTTON_OPTIONS, MAT_EXP_DIALOG_OPTIONS, MAT_EXP_FAB_MENU_OPTIONS, MAT_EXP_ICON_BUTTON_DEFAULT_OPTIONS, MAT_EXP_ICON_BUTTON_OPTIONS, MAT_EXP_LIST_DEFAULT_OPTIONS, MAT_EXP_LIST_OPTIONS, MAT_EXP_LOADING_INDICATOR_DEFAULT_OPTIONS, MAT_EXP_LOADING_INDICATOR_OPTIONS, MAT_EXP_LOADING_INDICATOR_SHAPES, MAT_EXP_LOADING_INDICATOR_VIEW_BOX, MAT_EXP_MENU_DEFAULT_OPTIONS, MAT_EXP_MENU_OPTIONS, MAT_EXP_MENU_SURFACE, MAT_EXP_NAVIGATION_RAIL_OPTIONS, MAT_EXP_PROGRESS_INDICATOR_DEFAULT_OPTIONS, MAT_EXP_PROGRESS_INDICATOR_OPTIONS, MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS, MAT_EXP_RICH_TOOLTIP_OPTIONS, MAT_EXP_SEARCH_DEFAULT_OPTIONS, MAT_EXP_SEARCH_OPTIONS, MAT_EXP_SPLIT_BUTTON_DEFAULT_OPTIONS, MAT_EXP_SPLIT_BUTTON_OPTIONS, MAT_EXP_STEPPER_OPTIONS, MAT_EXP_TOOLBAR_OPTIONS, MatExpAutocomplete, MatExpButton, MatExpButtonGroup, MatExpDialog, MatExpDialogActions, MatExpDialogClose, MatExpDialogLayout, MatExpDialogRef, MatExpFabMenu, MatExpFabMenuButton, MatExpFabMenuTrigger, MatExpIconButton, MatExpList, MatExpListItem, MatExpListMediaDirective, MatExpLoadingIndicator, MatExpMenu, MatExpMenuContent, MatExpMenuContextTrigger, MatExpMenuItemDirective, MatExpMenuItemTemplate, MatExpMenuTrigger, MatExpNavigationRail, MatExpNavigationRailGroup, MatExpNavigationRailItem, MatExpNavigationRailSection, MatExpProgressIndicator, MatExpRichTooltip, MatExpRichTooltipTrigger, MatExpSearch, MatExpSearchResult, MatExpSelect, MatExpSelectableButtonChange, MatExpSplitButton, MatExpStep, MatExpStepper, MatExpToolbar, MatExpToolbarItem, bindButtonGroupChildren, injectMatExpButtonGroupOptions, injectMatExpButtonOptions, injectMatExpFabMenuOptions, injectMatExpIconButtonOptions, injectMatExpLoadingIndicatorOptions, injectMatExpMenuOptions, injectMatExpProgressIndicatorOptions, injectMatExpRichTooltipOptions, injectMatExpSearchOptions, injectMatExpSplitButtonOptions, provideMatExpButtonGroupOptions, provideMatExpButtonOptions, provideMatExpDialogOptions, provideMatExpFabMenuOptions, provideMatExpIconButtonOptions, provideMatExpListOptions, provideMatExpLoadingIndicatorOptions, provideMatExpMenuOptions, provideMatExpNavigationRailOptions, provideMatExpProgressIndicatorOptions, provideMatExpRichTooltipOptions, provideMatExpSearchOptions, provideMatExpSplitButtonOptions, provideMatExpStepperOptions, provideMatExpToolbarOptions, toButtonGroupChild };
6904
9226
  //# sourceMappingURL=camaradesuk-m3e-angular.mjs.map