@camaradesuk/m3e-angular 0.1.0-alpha.5 → 0.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
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, isDevMode, Renderer2, Injector, HostAttributeToken, contentChild } 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, isDevMode, Renderer2, QueryList, Injector, ViewChildren, ContentChildren, HostAttributeToken, contentChild } from '@angular/core';
3
3
  import * as i1 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
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
+ import { NG_VALUE_ACCESSOR, AbstractControl } from '@angular/forms';
9
9
  import { MediaMatcher } from '@angular/cdk/layout';
10
10
  import { MATERIAL_ANIMATIONS, MatRipple } from '@angular/material/core';
11
11
  import { toSignal } from '@angular/core/rxjs-interop';
@@ -19,6 +19,7 @@ import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
19
19
  import { TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
20
20
  import { MatToolbar } from '@angular/material/toolbar';
21
21
  import { MatDrawer, MatDrawerContainer, MatDrawerContent } from '@angular/material/sidenav';
22
+ import { CdkStep, CdkStepper, CdkStepHeader } from '@angular/cdk/stepper';
22
23
  import { CdkDialogContainer, DialogRef, Dialog } from '@angular/cdk/dialog';
23
24
  import { MatDialogState, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
24
25
 
@@ -94,6 +95,10 @@ const injectMatExpButtonGroupOptions = _buttonGroupOptions.inject;
94
95
  const FAST_SPATIAL_SPRING = { dampingRatio: 0.6, stiffness: 800 };
95
96
  /** Critically damped fast effects motion, without overshoot. @internal */
96
97
  const FAST_EFFECTS_SPRING = { dampingRatio: 1, stiffness: 3800 };
98
+ /** Default spatial motion for partial-surface layout changes, with slight overshoot. @internal */
99
+ const DEFAULT_SPATIAL_SPRING = { dampingRatio: 0.8, stiffness: 380 };
100
+ /** Critically damped default effects motion, without overshoot. @internal */
101
+ const DEFAULT_EFFECTS_SPRING = { dampingRatio: 1, stiffness: 1600 };
97
102
 
98
103
  /** Unit-mass spring sampled from position and velocity at an arbitrary time.
99
104
  * Supports damping ratios from 0 through 1 (underdamped or critical) and positive stiffness.
@@ -1108,13 +1113,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
1108
1113
  args: [{ providedIn: 'root' }]
1109
1114
  }] });
1110
1115
 
1111
- const options$6 = matExpCreateOptions({ color: 'primary', motion: true });
1116
+ const options$7 = matExpCreateOptions({ color: 'primary', motion: true });
1112
1117
  /** Injector-scoped FAB menu defaults. */
1113
- const MAT_EXP_FAB_MENU_OPTIONS = options$6.token;
1118
+ const MAT_EXP_FAB_MENU_OPTIONS = options$7.token;
1114
1119
  /** Override FAB menu defaults without configuring each trigger separately. */
1115
- const provideMatExpFabMenuOptions = options$6.provide;
1120
+ const provideMatExpFabMenuOptions = options$7.provide;
1116
1121
  /** @internal */
1117
- const injectMatExpFabMenuOptions = options$6.inject;
1122
+ const injectMatExpFabMenuOptions = options$7.inject;
1118
1123
 
1119
1124
  /** Configures the official web adaptation: a FAB opening a native Material menu. */
1120
1125
  class MatExpFabMenu {
@@ -2278,11 +2283,11 @@ const MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS = {
2278
2283
  touchGestures: true,
2279
2284
  disabled: false,
2280
2285
  };
2281
- const options$5 = matExpCreateOptions(MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS);
2282
- const MAT_EXP_RICH_TOOLTIP_OPTIONS = options$5.token;
2283
- const provideMatExpRichTooltipOptions = options$5.provide;
2286
+ const options$6 = matExpCreateOptions(MAT_EXP_RICH_TOOLTIP_DEFAULT_OPTIONS);
2287
+ const MAT_EXP_RICH_TOOLTIP_OPTIONS = options$6.token;
2288
+ const provideMatExpRichTooltipOptions = options$6.provide;
2284
2289
  /** @internal */
2285
- const injectMatExpRichTooltipOptions = options$5.inject;
2290
+ const injectMatExpRichTooltipOptions = options$6.inject;
2286
2291
 
2287
2292
  // Web adaptation: a brief opacity entrance; M3 tooltip guidance mandates no spring choreography.
2288
2293
  const ENTER_DURATION_SECONDS = 0.15;
@@ -2777,13 +2782,13 @@ const MAT_EXP_TOOLBAR_DEFAULT_OPTIONS = {
2777
2782
  appearance: 'standard',
2778
2783
  alignment: 'auto',
2779
2784
  };
2780
- const options$4 = matExpCreateOptions(MAT_EXP_TOOLBAR_DEFAULT_OPTIONS);
2785
+ const options$5 = matExpCreateOptions(MAT_EXP_TOOLBAR_DEFAULT_OPTIONS);
2781
2786
  /** Defaults for the toolbar directive. Prefer the merging provider function. */
2782
- const MAT_EXP_TOOLBAR_OPTIONS = options$4.token;
2787
+ const MAT_EXP_TOOLBAR_OPTIONS = options$5.token;
2783
2788
  /** Override toolbar defaults at any injector level. */
2784
- const provideMatExpToolbarOptions = options$4.provide;
2789
+ const provideMatExpToolbarOptions = options$5.provide;
2785
2790
  /** @internal */
2786
- const injectMatExpToolbarOptions = options$4.inject;
2791
+ const injectMatExpToolbarOptions = options$5.inject;
2787
2792
 
2788
2793
  // Custom playfulMotionScheme.defaultSpatialSpec from the official article,
2789
2794
  // not a named Expressive preset or a toolbar-specific token.
@@ -3083,11 +3088,11 @@ const MAT_EXP_LIST_DEFAULT_OPTIONS = {
3083
3088
  appearance: 'segmented',
3084
3089
  textWrap: 'wrap',
3085
3090
  };
3086
- const options$3 = matExpCreateOptions(MAT_EXP_LIST_DEFAULT_OPTIONS);
3087
- const MAT_EXP_LIST_OPTIONS = options$3.token;
3088
- const provideMatExpListOptions = options$3.provide;
3091
+ const options$4 = matExpCreateOptions(MAT_EXP_LIST_DEFAULT_OPTIONS);
3092
+ const MAT_EXP_LIST_OPTIONS = options$4.token;
3093
+ const provideMatExpListOptions = options$4.provide;
3089
3094
  /** @internal */
3090
- const injectMatExpListOptions = options$3.inject;
3095
+ const injectMatExpListOptions = options$4.inject;
3091
3096
 
3092
3097
  /**
3093
3098
  * Opt-in Expressive presentation. Material owns interaction, focus and forms.
@@ -3159,11 +3164,11 @@ const MAT_EXP_SEARCH_DEFAULT_OPTIONS = {
3159
3164
  clearLabel: 'Clear search',
3160
3165
  closeOnBackdrop: true,
3161
3166
  };
3162
- const options$2 = matExpCreateOptions(MAT_EXP_SEARCH_DEFAULT_OPTIONS);
3163
- const MAT_EXP_SEARCH_OPTIONS = options$2.token;
3164
- const provideMatExpSearchOptions = options$2.provide;
3167
+ const options$3 = matExpCreateOptions(MAT_EXP_SEARCH_DEFAULT_OPTIONS);
3168
+ const MAT_EXP_SEARCH_OPTIONS = options$3.token;
3169
+ const provideMatExpSearchOptions = options$3.provide;
3165
3170
  /** @internal */
3166
- const injectMatExpSearchOptions = options$2.inject;
3171
+ const injectMatExpSearchOptions = options$3.inject;
3167
3172
 
3168
3173
  /** Marks a native result button or link for Arrow/Home/End navigation. Keep its native semantics. */
3169
3174
  class MatExpSearchResult {
@@ -3893,11 +3898,11 @@ const MAT_EXP_NAVIGATION_RAIL_DEFAULT_OPTIONS = {
3893
3898
  alignment: 'top',
3894
3899
  ariaLabel: 'Primary navigation',
3895
3900
  };
3896
- const options$1 = matExpCreateOptions(MAT_EXP_NAVIGATION_RAIL_DEFAULT_OPTIONS);
3897
- const MAT_EXP_NAVIGATION_RAIL_OPTIONS = options$1.token;
3898
- const provideMatExpNavigationRailOptions = options$1.provide;
3901
+ const options$2 = matExpCreateOptions(MAT_EXP_NAVIGATION_RAIL_DEFAULT_OPTIONS);
3902
+ const MAT_EXP_NAVIGATION_RAIL_OPTIONS = options$2.token;
3903
+ const provideMatExpNavigationRailOptions = options$2.provide;
3899
3904
  /** @internal */
3900
- const injectMatExpNavigationRailOptions = options$1.inject;
3905
+ const injectMatExpNavigationRailOptions = options$2.inject;
3901
3906
 
3902
3907
  /**
3903
3908
  * Expressive navigation layout. Project destinations directly, a menu/FAB in
@@ -4297,6 +4302,740 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
4297
4302
  }]
4298
4303
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], expandedOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedOnly", required: false }] }] } });
4299
4304
 
4305
+ const options$1 = matExpCreateOptions({
4306
+ motion: 'system',
4307
+ closeLabel: 'Close dialog',
4308
+ });
4309
+ const MAT_EXP_DIALOG_OPTIONS = options$1.token;
4310
+ const provideMatExpDialogOptions = options$1.provide;
4311
+ /** @internal */
4312
+ const injectMatExpDialogOptions = options$1.inject;
4313
+ /** @internal Context is supplied at open time, not inferred from consumer DOM. */
4314
+ const MAT_EXP_DIALOG_CONTEXT = new InjectionToken('MatExpDialog context');
4315
+ /**
4316
+ * @internal Content that animates its own size (the stepper) asks the dialog to follow the
4317
+ * content directly instead of running a second, competing resize spring.
4318
+ */
4319
+ const MAT_EXP_DIALOG_SIZING = new InjectionToken('MatExpDialog sizing');
4320
+
4321
+ /**
4322
+ * AndroidX ExpressiveMotionTokens v0_14_0 values. The role assignment is our web
4323
+ * interpretation, not a Material stepper specification: content offset and panel height are
4324
+ * partial-surface spatial changes, the selection indicator is a small component, and opacity is
4325
+ * an effect that must not overshoot. Outgoing content leaves faster than incoming content settles.
4326
+ * @internal
4327
+ */
4328
+ const STEPPER_SPRINGS = {
4329
+ content: DEFAULT_SPATIAL_SPRING,
4330
+ height: DEFAULT_SPATIAL_SPRING,
4331
+ indicator: FAST_SPATIAL_SPRING,
4332
+ enter: DEFAULT_EFFECTS_SPRING,
4333
+ exit: FAST_EFFECTS_SPRING,
4334
+ };
4335
+ /** Shared-axis travel in CSS pixels; Material's shared-axis pattern uses about 30dp. @internal */
4336
+ const STEPPER_SHARED_AXIS_OFFSET = 30;
4337
+ /**
4338
+ * Incoming content starts fading in once outgoing opacity falls below this, as in Material's
4339
+ * shared-axis sequencing: the old step clears before the new one appears. Position moves at once.
4340
+ * @internal
4341
+ */
4342
+ const STEPPER_ENTER_AFTER_OPACITY = 0.03;
4343
+ /**
4344
+ * @internal One analytically sampled spring. Retargeting starts from the current position and
4345
+ * velocity, so interrupted motion never jumps or restarts.
4346
+ */
4347
+ class StepperSpring {
4348
+ _config;
4349
+ _tolerance;
4350
+ _range;
4351
+ value;
4352
+ velocity = 0;
4353
+ active = false;
4354
+ _from;
4355
+ _target;
4356
+ _initialVelocity = 0;
4357
+ _time = 0;
4358
+ constructor(value, _config, _tolerance, _range = [-Infinity, Infinity]) {
4359
+ this._config = _config;
4360
+ this._tolerance = _tolerance;
4361
+ this._range = _range;
4362
+ this.value = this._from = this._target = value;
4363
+ }
4364
+ get target() {
4365
+ return this._target;
4366
+ }
4367
+ /** Spring toward a new target from the current state. */
4368
+ to(target) {
4369
+ this._from = this.value;
4370
+ this._initialVelocity = this.velocity;
4371
+ this._target = target;
4372
+ this._time = 0;
4373
+ this.active = this.value !== target || this.velocity !== 0;
4374
+ }
4375
+ /** Settle immediately at a value. */
4376
+ jump(value) {
4377
+ this.value = this._from = this._target = value;
4378
+ this.velocity = this._initialVelocity = 0;
4379
+ this._time = 0;
4380
+ this.active = false;
4381
+ }
4382
+ /** Advance by seconds of elapsed time. */
4383
+ advance(seconds) {
4384
+ if (!this.active)
4385
+ return;
4386
+ this._time += seconds;
4387
+ const sample = sampleDampedSpring(this._from, this._target, this._initialVelocity, this._time, this._config);
4388
+ const [min, max] = this._range;
4389
+ const value = Math.max(min, Math.min(max, sample.value));
4390
+ this.value = value;
4391
+ // A clamped channel has physically stopped against its bound.
4392
+ this.velocity = value === sample.value ? sample.velocity : 0;
4393
+ if (Math.abs(this.value - this._target) < this._tolerance &&
4394
+ Math.abs(this.velocity) < this._tolerance * 10)
4395
+ this.jump(this._target);
4396
+ }
4397
+ }
4398
+ /**
4399
+ * @internal Browser-only controller for the sidebar stepper. The component owns state and DOM
4400
+ * structure; this owns only inline geometry during motion and restores it on settle or destroy.
4401
+ */
4402
+ function createStepperMotion(options) {
4403
+ const clock = options.clock ?? gsap.ticker;
4404
+ const { viewport, indicator } = options;
4405
+ const height = new StepperSpring(0, STEPPER_SPRINGS.height, 0.5, [0, Infinity]);
4406
+ const box = {
4407
+ x: new StepperSpring(0, STEPPER_SPRINGS.indicator, 0.5),
4408
+ y: new StepperSpring(0, STEPPER_SPRINGS.indicator, 0.5),
4409
+ width: new StepperSpring(0, STEPPER_SPRINGS.indicator, 0.5, [0, Infinity]),
4410
+ height: new StepperSpring(0, STEPPER_SPRINGS.indicator, 0.5, [0, Infinity]),
4411
+ };
4412
+ const panes = new Map();
4413
+ /** Out-of-flow, invisible panes waiting for the template to hide them. */
4414
+ const parked = new Set();
4415
+ let indicatorPlaced = false;
4416
+ let leaving = null;
4417
+ let incoming = null;
4418
+ let settled;
4419
+ let sizing = false;
4420
+ let running = false;
4421
+ let destroyed = false;
4422
+ const springs = () => [
4423
+ height,
4424
+ ...Object.values(box),
4425
+ ...[...panes.values()].flatMap((pane) => [pane.offset, pane.opacity]),
4426
+ ];
4427
+ const setSizing = (active) => {
4428
+ if (sizing === active)
4429
+ return;
4430
+ sizing = active;
4431
+ options.sizing?.(active);
4432
+ };
4433
+ const resetPane = (pane) => {
4434
+ if (!pane)
4435
+ return;
4436
+ panes.delete(pane);
4437
+ parked.delete(pane);
4438
+ for (const property of ['position', 'top', 'left', 'right', 'transform', 'opacity'])
4439
+ pane.style.removeProperty(property);
4440
+ };
4441
+ /**
4442
+ * Keep a pane out of flow and invisible until the template hides it. Returning it to flow
4443
+ * first would let the viewport (and an enclosing dialog) grow for one frame.
4444
+ */
4445
+ const parkPane = (pane) => {
4446
+ if (!pane)
4447
+ return;
4448
+ panes.delete(pane);
4449
+ pane.style.removeProperty('transform');
4450
+ if (pane.style.position !== 'absolute')
4451
+ Object.assign(pane.style, { position: 'absolute', top: '0', left: '0', right: '0' });
4452
+ pane.style.opacity = '0';
4453
+ parked.add(pane);
4454
+ };
4455
+ const write = () => {
4456
+ if (height.active || panes.size)
4457
+ viewport.style.height = `${height.value}px`;
4458
+ const horizontal = options.axis() === 'x';
4459
+ const sign = horizontal && options.rtl() ? -1 : 1;
4460
+ for (const [pane, motion] of panes) {
4461
+ const offset = motion.offset.value * sign;
4462
+ pane.style.transform = horizontal
4463
+ ? `translate3d(${offset}px, 0, 0)`
4464
+ : `translate3d(0, ${offset}px, 0)`;
4465
+ pane.style.opacity = String(motion.opacity.value);
4466
+ }
4467
+ if (indicatorPlaced) {
4468
+ indicator.style.transform = `translate3d(${box.x.value}px, ${box.y.value}px, 0)`;
4469
+ indicator.style.width = `${box.width.value}px`;
4470
+ indicator.style.height = `${box.height.value}px`;
4471
+ }
4472
+ };
4473
+ const settle = () => {
4474
+ viewport.style.removeProperty('height');
4475
+ viewport.removeAttribute('data-animating');
4476
+ if (leaving !== incoming)
4477
+ parkPane(leaving);
4478
+ resetPane(incoming);
4479
+ leaving = incoming = null;
4480
+ height.jump(viewport.getBoundingClientRect().height);
4481
+ setSizing(false);
4482
+ const done = settled;
4483
+ settled = undefined;
4484
+ done?.();
4485
+ };
4486
+ const tick = (_time, deltaMs) => {
4487
+ if (destroyed)
4488
+ return;
4489
+ // A hidden tab can pause the ticker; analytic springs simply settle on resume.
4490
+ const seconds = Math.min(deltaMs / 1000, 0.1);
4491
+ for (const pane of panes.values())
4492
+ if (pane.after && pane.after.value <= STEPPER_ENTER_AFTER_OPACITY) {
4493
+ pane.after = undefined;
4494
+ pane.opacity.to(1);
4495
+ }
4496
+ for (const spring of springs())
4497
+ spring.advance(seconds);
4498
+ write();
4499
+ const contentActive = height.active ||
4500
+ [...panes.values()].some((pane) => pane.offset.active || pane.opacity.active || pane.after !== undefined);
4501
+ if (!contentActive && (leaving || incoming || sizing))
4502
+ settle();
4503
+ if (!springs().some((spring) => spring.active))
4504
+ stop();
4505
+ };
4506
+ const start = () => {
4507
+ if (running || destroyed)
4508
+ return;
4509
+ running = true;
4510
+ clock.add(tick);
4511
+ };
4512
+ const stop = () => {
4513
+ if (!running)
4514
+ return;
4515
+ running = false;
4516
+ clock.remove(tick);
4517
+ };
4518
+ /** Measure the natural, layout-capped viewport height without painting it. */
4519
+ const naturalHeight = () => {
4520
+ const previous = viewport.style.height;
4521
+ viewport.style.removeProperty('height');
4522
+ const value = viewport.getBoundingClientRect().height;
4523
+ viewport.style.height = previous;
4524
+ return value;
4525
+ };
4526
+ const finishNow = () => {
4527
+ for (const spring of springs())
4528
+ spring.jump(spring.target);
4529
+ write();
4530
+ stop();
4531
+ settle();
4532
+ };
4533
+ return {
4534
+ /** Record rendered geometry before Angular swaps the visible step. */
4535
+ capture() {
4536
+ if (!height.active)
4537
+ height.jump(viewport.getBoundingClientRect().height);
4538
+ },
4539
+ /**
4540
+ * Start a direction-aware transition after the incoming pane is rendered in flow and the
4541
+ * outgoing pane is still rendered (inert). `done` runs once motion settles or is skipped.
4542
+ */
4543
+ transition(outgoing, next, forward, done) {
4544
+ const scroll = viewport.scrollTop;
4545
+ // Rapid navigation: anything other than the two current panes stops immediately.
4546
+ for (const pane of [...panes.keys()])
4547
+ if (pane !== outgoing && pane !== next)
4548
+ parkPane(pane);
4549
+ // A previously parked pane starts clean; an in-flight one keeps its motion state below.
4550
+ if (!panes.has(next))
4551
+ resetPane(next);
4552
+ // The superseded completion is dropped: the component already chose the new leaving pane.
4553
+ leaving = outgoing;
4554
+ incoming = next;
4555
+ settled = done;
4556
+ if (options.disabled()) {
4557
+ parkPane(outgoing);
4558
+ viewport.scrollTop = 0;
4559
+ finishNow();
4560
+ return;
4561
+ }
4562
+ const direction = forward ? 1 : -1;
4563
+ let exiting;
4564
+ if (outgoing) {
4565
+ if (outgoing.style.position !== 'absolute') {
4566
+ Object.assign(outgoing.style, {
4567
+ position: 'absolute',
4568
+ top: `${-scroll}px`,
4569
+ left: '0',
4570
+ right: '0',
4571
+ });
4572
+ }
4573
+ const motion = panes.get(outgoing) ?? {
4574
+ offset: new StepperSpring(0, STEPPER_SPRINGS.content, 0.1),
4575
+ opacity: new StepperSpring(1, STEPPER_SPRINGS.exit, 0.002, [0, 1]),
4576
+ };
4577
+ panes.set(outgoing, motion);
4578
+ motion.offset.to(-direction * STEPPER_SHARED_AXIS_OFFSET);
4579
+ motion.opacity.to(0);
4580
+ motion.after = undefined;
4581
+ exiting = motion.opacity;
4582
+ }
4583
+ // An interrupted outgoing pane returns from its current offset, opacity and velocity.
4584
+ for (const property of ['position', 'top', 'left', 'right'])
4585
+ next.style.removeProperty(property);
4586
+ const motion = panes.get(next) ?? {
4587
+ offset: new StepperSpring(direction * STEPPER_SHARED_AXIS_OFFSET, STEPPER_SPRINGS.content, 0.1),
4588
+ opacity: new StepperSpring(0, STEPPER_SPRINGS.enter, 0.002, [0, 1]),
4589
+ };
4590
+ panes.set(next, motion);
4591
+ motion.offset.to(0);
4592
+ if (exiting && exiting.value > STEPPER_ENTER_AFTER_OPACITY) {
4593
+ // Hold the current opacity (and its momentum toward zero ends) until the old step clears.
4594
+ motion.opacity.to(motion.opacity.value);
4595
+ motion.after = exiting;
4596
+ }
4597
+ else {
4598
+ motion.after = undefined;
4599
+ motion.opacity.to(1);
4600
+ }
4601
+ viewport.scrollTop = 0;
4602
+ viewport.setAttribute('data-animating', '');
4603
+ height.to(naturalHeight());
4604
+ setSizing(true);
4605
+ write();
4606
+ start();
4607
+ },
4608
+ /**
4609
+ * Move the selection indicator to a header. `animate` springs to a new selection; a layout
4610
+ * sync retargets an indicator already in flight and otherwise settles in place.
4611
+ */
4612
+ indicate(header, animate) {
4613
+ if (!header || !header.offsetParent)
4614
+ return;
4615
+ const target = {
4616
+ x: header.offsetLeft,
4617
+ y: header.offsetTop,
4618
+ width: header.offsetWidth,
4619
+ height: header.offsetHeight,
4620
+ };
4621
+ const moving = Object.values(box).some((spring) => spring.active);
4622
+ const instant = !indicatorPlaced || options.disabled() || (!animate && !moving);
4623
+ for (const key of ['x', 'y', 'width', 'height']) {
4624
+ if (instant)
4625
+ box[key].jump(target[key]);
4626
+ else if (box[key].target !== target[key])
4627
+ box[key].to(target[key]);
4628
+ }
4629
+ indicatorPlaced = true;
4630
+ indicator.style.visibility = 'visible';
4631
+ write();
4632
+ if (!instant)
4633
+ start();
4634
+ },
4635
+ /** Active content resized outside a step change (validation, async data, uploads). */
4636
+ contentResized() {
4637
+ if (destroyed)
4638
+ return;
4639
+ const target = naturalHeight();
4640
+ if (leaving || incoming) {
4641
+ if (Math.abs(target - height.target) > 0.5)
4642
+ height.to(target);
4643
+ return;
4644
+ }
4645
+ const current = height.value;
4646
+ if (options.disabled() || !current || Math.abs(target - current) <= 0.5) {
4647
+ height.jump(target);
4648
+ return;
4649
+ }
4650
+ // The observer runs before paint: hold the previous height, then spring to the new one.
4651
+ viewport.setAttribute('data-animating', '');
4652
+ height.to(target);
4653
+ setSizing(true);
4654
+ write();
4655
+ start();
4656
+ },
4657
+ /**
4658
+ * Release parked panes once hidden, and un-park the selected pane when the selection changed
4659
+ * without a transition (CDK reselects silently when the selected step is removed).
4660
+ */
4661
+ sync(selected) {
4662
+ for (const pane of [...parked])
4663
+ if (pane.hidden || (pane === selected && pane !== leaving && !panes.has(pane)))
4664
+ resetPane(pane);
4665
+ },
4666
+ /** Reduced motion was requested mid-flight: settle everything immediately. */
4667
+ finish: finishNow,
4668
+ destroy() {
4669
+ destroyed = true;
4670
+ stop();
4671
+ setSizing(false);
4672
+ for (const pane of [...panes.keys(), ...parked])
4673
+ resetPane(pane);
4674
+ viewport.style.removeProperty('height');
4675
+ viewport.removeAttribute('data-animating');
4676
+ settled = undefined;
4677
+ },
4678
+ };
4679
+ }
4680
+
4681
+ /** @internal */
4682
+ const MAT_EXP_STEPPER_DEFAULT_OPTIONS = {
4683
+ layout: 'auto',
4684
+ motion: 'system',
4685
+ ariaLabel: 'Steps',
4686
+ optionalLabel: 'Optional',
4687
+ completedLabel: 'Completed',
4688
+ errorLabel: 'Has errors',
4689
+ };
4690
+ const options = matExpCreateOptions(MAT_EXP_STEPPER_DEFAULT_OPTIONS);
4691
+ const MAT_EXP_STEPPER_OPTIONS = options.token;
4692
+ const provideMatExpStepperOptions = options.provide;
4693
+ /** @internal */
4694
+ const injectMatExpStepperOptions = options.inject;
4695
+
4696
+ /**
4697
+ * Mirrors CDK gating for reactive and signal-form step controls. CDK marks the current step as
4698
+ * interacted before checking, so `current` counts as interacted here.
4699
+ */
4700
+ function incomplete(step, current) {
4701
+ const interacted = current || step.interacted;
4702
+ const control = step.stepControl;
4703
+ if (!control)
4704
+ return !(step._completedOverride() ?? interacted);
4705
+ const state = control instanceof AbstractControl
4706
+ ? control
4707
+ : control();
4708
+ const invalid = typeof state.invalid === 'function' ? state.invalid() : state.invalid;
4709
+ const pending = typeof state.pending === 'function' ? state.pending() : state.pending;
4710
+ return invalid || pending || !interacted;
4711
+ }
4712
+ /** Width of the stepper itself below which `layout="auto"` uses the horizontal step list. */
4713
+ const SIDEBAR_MIN_WIDTH = 600;
4714
+ /**
4715
+ * One step of a `mat-exp-stepper`. Inherits every `cdk-step` input: `label`, `stepControl`,
4716
+ * `optional`, `editable`, `completed`, `hasError`, `errorMessage` and `aria-label`.
4717
+ */
4718
+ class MatExpStep extends CdkStep {
4719
+ /** Short secondary text under the label, such as the value chosen in this step. @default '' */
4720
+ summary = input('', /* @ts-ignore */
4721
+ ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
4722
+ /** @internal */
4723
+ _controlEvents;
4724
+ /** @internal */
4725
+ _observedControl;
4726
+ /** @internal */
4727
+ ngOnChanges() {
4728
+ super.ngOnChanges();
4729
+ if (this._observedControl === this.stepControl)
4730
+ return;
4731
+ this._observedControl = this.stepControl;
4732
+ this._controlEvents?.unsubscribe();
4733
+ // Reactive form validity is not a signal; refresh header state when it changes.
4734
+ if (this.stepControl instanceof AbstractControl)
4735
+ this._controlEvents = this.stepControl.events.subscribe(() => this._stepper._stateChanged());
4736
+ }
4737
+ /** @internal */
4738
+ ngOnDestroy() {
4739
+ this._controlEvents?.unsubscribe();
4740
+ }
4741
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpStep, deps: null, target: i0.ɵɵFactoryTarget.Component });
4742
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.3", type: MatExpStep, isStandalone: true, selector: "mat-exp-step", inputs: { summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: CdkStep, useExisting: MatExpStep }], exportAs: ["matExpStep"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content /></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4743
+ }
4744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpStep, decorators: [{
4745
+ type: Component,
4746
+ args: [{
4747
+ selector: 'mat-exp-step',
4748
+ exportAs: 'matExpStep',
4749
+ template: '<ng-template><ng-content /></ng-template>',
4750
+ providers: [{ provide: CdkStep, useExisting: MatExpStep }],
4751
+ encapsulation: ViewEncapsulation.None,
4752
+ changeDetection: ChangeDetectionStrategy.OnPush,
4753
+ }]
4754
+ }], propDecorators: { summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }] } });
4755
+ /**
4756
+ * A CDK stepper with a persistent step list beside the active content. Works on its own or
4757
+ * inside a `MatExpDialog`; applications keep owning form state, validation and actions.
4758
+ * A library composition of Material primitives, not an official Material 3 stepper spec.
4759
+ */
4760
+ class MatExpStepper extends CdkStepper {
4761
+ /** @internal */
4762
+ _steps = undefined;
4763
+ /** @internal */
4764
+ _stepHeader = undefined;
4765
+ /** Steps belonging to this stepper, in order. */
4766
+ steps = new QueryList();
4767
+ /** @internal */
4768
+ _options = injectMatExpStepperOptions();
4769
+ /** @internal */
4770
+ _document = inject(DOCUMENT);
4771
+ /** @internal */
4772
+ _injector = inject(Injector);
4773
+ /** @internal */
4774
+ _browser = isPlatformBrowser(inject(PLATFORM_ID));
4775
+ /** @internal */
4776
+ _direction = inject(Directionality, { optional: true });
4777
+ /** @internal */
4778
+ _dialogSizing = inject(MAT_EXP_DIALOG_SIZING, { optional: true });
4779
+ /** @internal */
4780
+ _viewport = viewChild.required('viewport', /* @ts-ignore */
4781
+ ...(ngDevMode ? [{ debugName: "_viewport" }] : /* istanbul ignore next */ []));
4782
+ /** @internal */
4783
+ _indicator = viewChild.required('indicator', /* @ts-ignore */
4784
+ ...(ngDevMode ? [{ debugName: "_indicator" }] : /* istanbul ignore next */ []));
4785
+ /** @internal */
4786
+ _headers = viewChild.required('headers', /* @ts-ignore */
4787
+ ...(ngDevMode ? [{ debugName: "_headers" }] : /* istanbul ignore next */ []));
4788
+ /** @internal Zero-height, full-width probe: width changes only, never content height. */
4789
+ _measure = viewChild.required('measure', /* @ts-ignore */
4790
+ ...(ngDevMode ? [{ debugName: "_measure" }] : /* istanbul ignore next */ []));
4791
+ /** @internal */
4792
+ _motion;
4793
+ /** @internal */
4794
+ _reducedMotion;
4795
+ /** @internal */
4796
+ _observer;
4797
+ /** @internal */
4798
+ _observedPane;
4799
+ /** Visible heading above the step list; also names it. @default '' */
4800
+ heading = input('', /* @ts-ignore */
4801
+ ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
4802
+ /** Accessible step list name when `heading` is empty. @default 'Steps' */
4803
+ ariaLabel = input(this._options.ariaLabel, /* @ts-ignore */
4804
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
4805
+ /** Step list placement. `auto` switches by the stepper's own width. @default 'auto' */
4806
+ layout = input(this._options.layout, /* @ts-ignore */
4807
+ ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
4808
+ /** Motion policy; the OS reduced-motion preference always wins. @default 'system' */
4809
+ motion = input(this._options.motion, /* @ts-ignore */
4810
+ ...(ngDevMode ? [{ debugName: "motion" }] : /* istanbul ignore next */ []));
4811
+ /** @internal */
4812
+ _labels = this._options;
4813
+ /** @internal */
4814
+ _headingId = inject(_IdGenerator).getId('mat-exp-stepper-heading-');
4815
+ /** @internal Index of the step whose content is animating out, or -1. */
4816
+ _leaving = signal(-1, /* @ts-ignore */
4817
+ ...(ngDevMode ? [{ debugName: "_leaving" }] : /* istanbul ignore next */ []));
4818
+ /** @internal */
4819
+ _width = signal(Infinity, /* @ts-ignore */
4820
+ ...(ngDevMode ? [{ debugName: "_width" }] : /* istanbul ignore next */ []));
4821
+ /** @internal */
4822
+ _count = signal(0, /* @ts-ignore */
4823
+ ...(ngDevMode ? [{ debugName: "_count" }] : /* istanbul ignore next */ []));
4824
+ /** @internal */
4825
+ _layout = computed(() => {
4826
+ const layout = this.layout();
4827
+ if (layout !== 'auto')
4828
+ return layout;
4829
+ return this._width() < SIDEBAR_MIN_WIDTH ? 'horizontal' : 'sidebar';
4830
+ }, /* @ts-ignore */
4831
+ ...(ngDevMode ? [{ debugName: "_layout" }] : /* istanbul ignore next */ []));
4832
+ /** Whether the first step is selected. */
4833
+ isFirst = computed(() => this.selectedIndex === 0, /* @ts-ignore */
4834
+ ...(ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []));
4835
+ /** Whether the last step is selected. */
4836
+ isLast = computed(() => this.selectedIndex === this._count() - 1, /* @ts-ignore */
4837
+ ...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
4838
+ constructor() {
4839
+ super();
4840
+ effect(() => {
4841
+ this.orientation = this._layout() === 'sidebar' ? 'vertical' : 'horizontal';
4842
+ });
4843
+ const selection = this.selectionChange.subscribe((event) => this._beforeSelection(event));
4844
+ inject(DestroyRef).onDestroy(() => selection.unsubscribe());
4845
+ if (!this._browser)
4846
+ return;
4847
+ afterNextRender(() => this._createMotion());
4848
+ // Selection can change without selectionChange (CDK reselects when the selected step is
4849
+ // removed); never leave a selected or hidden pane with parked motion styles.
4850
+ afterRenderEffect(() => {
4851
+ this._leaving();
4852
+ // The selectedIndex getter reads CDK's internal signal, so this effect tracks it.
4853
+ const selected = this.selectedIndex;
4854
+ this._motion?.sync(this._pane(selected));
4855
+ });
4856
+ }
4857
+ /** @internal */
4858
+ ngAfterContentInit() {
4859
+ super.ngAfterContentInit();
4860
+ this.steps.changes.subscribe(() => this._count.set(this.steps.length));
4861
+ this._count.set(this.steps.length);
4862
+ }
4863
+ /** @internal */
4864
+ ngOnDestroy() {
4865
+ this._observer?.disconnect();
4866
+ this._reducedMotion?.removeEventListener('change', this._onPreference);
4867
+ this._motion?.destroy();
4868
+ super.ngOnDestroy();
4869
+ }
4870
+ /** Move forward; in linear mode an invalid current step reveals its errors instead. */
4871
+ next() {
4872
+ this._select(Math.min(this.selectedIndex + 1, this.steps.length - 1));
4873
+ }
4874
+ /** @internal Header activation, gated exactly like CDK selection. */
4875
+ _select(index) {
4876
+ const before = this.selectedIndex;
4877
+ this.selectedIndex = index;
4878
+ if (this.selectedIndex === before && index > before)
4879
+ this._revealErrors();
4880
+ }
4881
+ /** @internal */
4882
+ _onHeaderKeydown(event) {
4883
+ if ((event.key === 'Enter' || event.key === ' ') && !this._modified(event)) {
4884
+ event.preventDefault();
4885
+ this._select(this._getFocusIndex() ?? this.selectedIndex);
4886
+ return;
4887
+ }
4888
+ this._onKeydown(event);
4889
+ }
4890
+ /** @internal */
4891
+ _state(step, index) {
4892
+ if (index === this.selectedIndex)
4893
+ return 'active';
4894
+ if (step.hasError)
4895
+ return 'error';
4896
+ return step.completed ? 'done' : 'pending';
4897
+ }
4898
+ /** @internal Whether activating this header would be refused by linear/editable gating. */
4899
+ _isBlocked(index) {
4900
+ if (index === this.selectedIndex)
4901
+ return false;
4902
+ const steps = this.steps.toArray();
4903
+ const gated = this.linear &&
4904
+ steps
4905
+ .slice(0, index)
4906
+ .some((step, i) => !step.optional &&
4907
+ !step._completedOverride() &&
4908
+ incomplete(step, i === this.selectedIndex));
4909
+ return gated || (index < this.selectedIndex && !steps[index].editable);
4910
+ }
4911
+ /** @internal */
4912
+ _stepDescription(step, index) {
4913
+ const ids = [];
4914
+ if (step.summary())
4915
+ ids.push(this._getStepLabelId(index) + '-summary');
4916
+ if (step.hasError && step.errorMessage)
4917
+ ids.push(this._getStepLabelId(index) + '-error');
4918
+ return ids.join(' ') || null;
4919
+ }
4920
+ /** @internal */
4921
+ _modified(event) {
4922
+ return event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
4923
+ }
4924
+ /** @internal Mark the blocking step as touched and focus its first invalid control. */
4925
+ _revealErrors() {
4926
+ const step = this.selected;
4927
+ const control = step?.stepControl;
4928
+ if (control instanceof AbstractControl)
4929
+ control.markAllAsTouched();
4930
+ this._stateChanged();
4931
+ if (!this._browser)
4932
+ return;
4933
+ afterNextRender(() => {
4934
+ const pane = this._pane(this.selectedIndex);
4935
+ pane
4936
+ ?.querySelector('input[aria-invalid="true"], textarea[aria-invalid="true"], [aria-invalid="true"][tabindex], .ng-invalid:is(input, textarea, select)')
4937
+ ?.focus();
4938
+ }, { injector: this._injector });
4939
+ }
4940
+ /** @internal */
4941
+ _pane(index) {
4942
+ return index < 0 ? null : this._document.getElementById(this._getStepContentId(index));
4943
+ }
4944
+ /** @internal */
4945
+ _header(index) {
4946
+ return this._document.getElementById(this._getStepLabelId(index));
4947
+ }
4948
+ /** @internal Runs synchronously before CDK updates the selected index. */
4949
+ _beforeSelection(event) {
4950
+ if (!this._motion)
4951
+ return;
4952
+ const from = event.previouslySelectedIndex;
4953
+ const to = event.selectedIndex;
4954
+ const active = this._document.activeElement;
4955
+ const headers = this._headers().nativeElement;
4956
+ const scope = this._elementRef.nativeElement.closest('[role="dialog"], [role="alertdialog"]') ??
4957
+ this._elementRef.nativeElement;
4958
+ // Tabs keep focus on the step list; elsewhere focus follows the new content.
4959
+ const moveFocus = !!active && !headers.contains(active) && scope.contains(active);
4960
+ this._motion.capture();
4961
+ this._leaving.set(from);
4962
+ afterNextRender({
4963
+ write: () => {
4964
+ const next = this._pane(to);
4965
+ if (!next || !this._motion || this.selectedIndex !== to)
4966
+ return;
4967
+ this._motion.transition(this._pane(from), next, to > from, () => this._leaving.set(-1));
4968
+ this._motion.indicate(this._header(to), true);
4969
+ this._observe(next);
4970
+ if (moveFocus)
4971
+ next.focus({ preventScroll: true });
4972
+ },
4973
+ }, { injector: this._injector });
4974
+ }
4975
+ /** @internal */
4976
+ _onPreference = () => {
4977
+ if (this._reducedMotion?.matches)
4978
+ this._motion?.finish();
4979
+ };
4980
+ /** @internal */
4981
+ _createMotion() {
4982
+ const measure = this._measure().nativeElement;
4983
+ // Resolve `auto` before first paint; the observer only reports later changes.
4984
+ this._width.set(measure.getBoundingClientRect().width);
4985
+ const win = this._document.defaultView;
4986
+ this._reducedMotion = win.matchMedia('(prefers-reduced-motion: reduce)');
4987
+ this._reducedMotion.addEventListener('change', this._onPreference);
4988
+ this._motion = createStepperMotion({
4989
+ viewport: this._viewport().nativeElement,
4990
+ indicator: this._indicator().nativeElement,
4991
+ disabled: () => this.motion() === 'none' || !!this._reducedMotion?.matches,
4992
+ axis: () => (this._layout() === 'sidebar' ? 'y' : 'x'),
4993
+ rtl: () => this._direction?.value === 'rtl',
4994
+ sizing: (active) => this._dialogSizing?.follow(active),
4995
+ });
4996
+ this._observer = new ResizeObserver((entries) => {
4997
+ for (const entry of entries) {
4998
+ if (entry.target === measure)
4999
+ this._width.set(entry.contentRect.width);
5000
+ else if (entry.target === this._observedPane)
5001
+ this._motion?.contentResized();
5002
+ }
5003
+ this._motion?.indicate(this._header(this.selectedIndex), false);
5004
+ });
5005
+ // Never observe the host: animated viewport height resizes it inside observer callbacks.
5006
+ this._observer.observe(measure);
5007
+ this._observer.observe(this._headers().nativeElement);
5008
+ const pane = this._pane(this.selectedIndex);
5009
+ if (pane)
5010
+ this._observe(pane);
5011
+ this._motion.indicate(this._header(this.selectedIndex), false);
5012
+ }
5013
+ /** @internal */
5014
+ _observe(pane) {
5015
+ if (this._observedPane === pane)
5016
+ return;
5017
+ if (this._observedPane)
5018
+ this._observer?.unobserve(this._observedPane);
5019
+ this._observedPane = pane;
5020
+ this._observer?.observe(pane);
5021
+ }
5022
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
5023
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpStepper, isStandalone: true, selector: "mat-exp-stepper", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-layout": "_layout()" }, classAttribute: "mat-exp-stepper" }, providers: [{ provide: CdkStepper, useExisting: MatExpStepper }], queries: [{ propertyName: "_steps", predicate: MatExpStep, descendants: true }], viewQueries: [{ propertyName: "_viewport", first: true, predicate: ["viewport"], descendants: true, isSignal: true }, { propertyName: "_indicator", first: true, predicate: ["indicator"], descendants: true, isSignal: true }, { propertyName: "_headers", first: true, predicate: ["headers"], descendants: true, isSignal: true }, { propertyName: "_measure", first: true, predicate: ["measure"], descendants: true, isSignal: true }, { propertyName: "_stepHeader", predicate: CdkStepHeader, descendants: true }], exportAs: ["matExpStepper"], usesInheritance: true, ngImport: i0, template: "<span #measure class=\"mat-exp-stepper-measure\" aria-hidden=\"true\"></span>\n<div class=\"mat-exp-stepper-sidebar\">\n @if (heading()) {\n <p class=\"mat-exp-stepper-heading\" [id]=\"_headingId\">{{ heading() }}</p>\n }\n <div\n #headers\n class=\"mat-exp-stepper-headers\"\n role=\"tablist\"\n [attr.aria-orientation]=\"_layout() === 'sidebar' ? 'vertical' : 'horizontal'\"\n [attr.aria-label]=\"heading() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"heading() ? _headingId : null\"\n >\n <span #indicator class=\"mat-exp-stepper-selection\" aria-hidden=\"true\"></span>\n @for (step of steps; track step; let i = $index, last = $last) {\n @let state = _state(step, i);\n <button\n type=\"button\"\n cdkStepHeader\n class=\"mat-exp-step-header\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"i === selectedIndex\"\n [attr.aria-disabled]=\"_isBlocked(i) || null\"\n [attr.aria-describedby]=\"_stepDescription(step, i)\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n [attr.tabindex]=\"_getFocusIndex() === i ? 0 : -1\"\n [attr.data-state]=\"state\"\n [attr.data-last]=\"last || null\"\n (click)=\"_select(i)\"\n (keydown)=\"_onHeaderKeydown($event)\"\n >\n <span class=\"mat-exp-step-indicator\" aria-hidden=\"true\">\n @switch (state) {\n @case ('done') {\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path\n fill=\"currentColor\"\n d=\"M9.55 18 3.85 12.3l1.43-1.42 4.27 4.27 9.17-9.18 1.43 1.43z\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M11 15V5h2v10zm0 4v-2h2v2z\" />\n </svg>\n }\n @default {\n {{ i + 1 }}\n }\n }\n </span>\n <span class=\"mat-exp-step-text\">\n <span class=\"mat-exp-step-label\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional) {\n <span class=\"mat-exp-step-optional\">{{ _labels.optionalLabel }}</span>\n }\n </span>\n @if (step.summary()) {\n <span\n class=\"mat-exp-step-summary\"\n aria-hidden=\"true\"\n [id]=\"_getStepLabelId(i) + '-summary'\"\n >{{ step.summary() }}</span\n >\n }\n @if (step.hasError && step.errorMessage) {\n <span\n class=\"mat-exp-step-error\"\n aria-hidden=\"true\"\n [id]=\"_getStepLabelId(i) + '-error'\"\n >{{ step.errorMessage }}</span\n >\n }\n @if (state === 'done') {\n <span class=\"cdk-visually-hidden\">, {{ _labels.completedLabel }}</span>\n } @else if (state === 'error') {\n <span class=\"cdk-visually-hidden\">, {{ _labels.errorLabel }}</span>\n }\n </span>\n </button>\n }\n </div>\n</div>\n<div class=\"mat-exp-stepper-main\">\n <div #viewport class=\"mat-exp-stepper-viewport\">\n @for (step of steps; track step; let i = $index) {\n <div\n class=\"mat-exp-step-content\"\n role=\"tabpanel\"\n tabindex=\"-1\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [hidden]=\"i !== selectedIndex && i !== _leaving()\"\n [attr.inert]=\"i !== selectedIndex ? '' : null\"\n [attr.aria-hidden]=\"i !== selectedIndex ? 'true' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n <ng-content select=\"[matExpStepperActions]\" />\n</div>\n", styles: [".mat-exp-stepper{--_mat-exp-stepper-indicator-size: 2rem;--_mat-exp-stepper-header-padding: .75rem;--_mat-exp-stepper-header-gap: .25rem;--_mat-exp-stepper-divider: var(--mat-exp-stepper-divider-color, var(--mat-sys-outline-variant));position:relative;display:grid;grid-template-columns:var(--mat-exp-stepper-sidebar-width, 17rem) minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-height:0;max-height:100%;box-sizing:border-box;color:var(--mat-sys-on-surface)}.mat-exp-stepper-measure{position:absolute;inset-inline:0;top:0;height:0;visibility:hidden;pointer-events:none}.mat-exp-stepper-sidebar{min-height:0;overflow:auto;padding:1.5rem 1rem;background:var(--mat-exp-stepper-sidebar-color, var(--mat-sys-surface-container));border-inline-end:1px solid var(--_mat-exp-stepper-divider)}.mat-exp-stepper-heading{margin:0 .75rem 1rem;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-title-small)}.mat-exp-stepper-headers{position:relative;display:flex;flex-direction:column;gap:var(--_mat-exp-stepper-header-gap)}.mat-exp-stepper-selection{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;border-radius:var(--mat-exp-stepper-selection-shape, 1.25rem);background:var(--mat-exp-stepper-selection-color, var(--mat-sys-secondary-container))}.mat-exp-step-header{position:relative;display:grid;grid-template-columns:var(--_mat-exp-stepper-indicator-size) minmax(0,1fr);column-gap:.75rem;align-items:start;width:100%;margin:0;padding:var(--_mat-exp-stepper-header-padding);border:0;border-radius:var(--mat-exp-stepper-selection-shape, 1.25rem);background:transparent;color:var(--mat-sys-on-surface);font:inherit;text-align:start;cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent}.mat-exp-step-header:before{content:\"\";position:absolute;inset:0;border-radius:inherit;background:currentColor;opacity:0;pointer-events:none}.mat-exp-step-header:hover:before{opacity:.08}.mat-exp-step-header:focus-visible{outline:3px solid var(--mat-sys-secondary);outline-offset:2px}.mat-exp-step-header:focus-visible:before{opacity:.1}.mat-exp-step-header[aria-selected=true]{color:var(--mat-sys-on-secondary-container)}.mat-exp-step-header[aria-disabled=true]{cursor:not-allowed}.mat-exp-step-header[aria-disabled=true]:hover:before{opacity:0}.mat-exp-step-header:not([data-last]):after{content:\"\";position:absolute;inset-inline-start:calc(var(--_mat-exp-stepper-header-padding) + var(--_mat-exp-stepper-indicator-size) / 2 - 1px);top:calc(var(--_mat-exp-stepper-header-padding) + var(--_mat-exp-stepper-indicator-size) + .25rem);bottom:calc(-1 * (var(--_mat-exp-stepper-header-gap) + var(--_mat-exp-stepper-header-padding)) + .25rem);width:2px;border-radius:1px;background:var(--mat-exp-stepper-connector-color, var(--mat-sys-outline-variant))}.mat-exp-step-indicator{position:relative;box-sizing:border-box;display:grid;place-items:center;width:var(--_mat-exp-stepper-indicator-size);height:var(--_mat-exp-stepper-indicator-size);border:1px solid var(--mat-sys-outline);border-radius:50%;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-large)}[data-state=done]>.mat-exp-step-indicator{border-color:transparent;background:var(--mat-sys-secondary-container);color:var(--mat-sys-on-secondary-container)}[data-state=active]>.mat-exp-step-indicator{border-color:transparent;border-radius:.625rem;background:var(--mat-sys-primary);color:var(--mat-sys-on-primary)}[data-state=error]>.mat-exp-step-indicator{border-color:transparent;background:var(--mat-sys-error);color:var(--mat-sys-on-error)}.mat-exp-step-text{position:relative;display:flex;flex-direction:column;gap:.125rem;min-width:0;padding-block:.25rem 0}.mat-exp-step-label{font:var(--mat-sys-title-medium);overflow-wrap:anywhere}.mat-exp-step-optional{display:inline-block;margin-inline-start:.375rem;padding:0 .375rem;border:1px solid var(--mat-sys-outline-variant);border-radius:.5rem;font:var(--mat-sys-label-small);vertical-align:middle}.mat-exp-step-summary,.mat-exp-step-error{overflow:hidden;font:var(--mat-sys-body-medium);text-overflow:ellipsis;white-space:nowrap}.mat-exp-step-summary{color:var(--mat-sys-on-surface-variant)}[aria-selected=true] .mat-exp-step-summary{color:inherit}.mat-exp-step-error{color:var(--mat-exp-stepper-error-text-color, var(--mat-sys-on-error-container))}.mat-exp-stepper-main{display:flex;flex-direction:column;min-width:0;min-height:0}.mat-exp-stepper-viewport{position:relative;flex:1 1 auto;box-sizing:border-box;min-height:0;overflow:auto;overscroll-behavior:contain}.mat-exp-stepper-viewport[data-animating]{overflow:hidden}.mat-exp-step-content{box-sizing:border-box;padding:2rem 2.25rem;outline:none}.mat-exp-step-content[hidden]{display:none!important}.mat-exp-step-content:focus-visible{outline:2px solid var(--mat-sys-secondary);outline-offset:-2px}.mat-exp-step-content>:first-child{margin-top:0}.mat-exp-step-content>:last-child{margin-bottom:0}.mat-exp-stepper-main>[matExpStepperActions]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem;padding:1rem 1.5rem;border-top:1px solid var(--_mat-exp-stepper-divider)}.mat-exp-stepper[data-layout=horizontal]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.mat-exp-stepper[data-layout=horizontal]>.mat-exp-stepper-sidebar{padding:.5rem .75rem;overflow:auto hidden;border-inline-end:0;border-block-end:1px solid var(--_mat-exp-stepper-divider);scrollbar-width:none}.mat-exp-stepper[data-layout=horizontal] .mat-exp-stepper-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.mat-exp-stepper[data-layout=horizontal] .mat-exp-stepper-headers{flex-direction:row;align-items:center;width:max-content}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header{grid-template-columns:var(--_mat-exp-stepper-indicator-size) auto;align-items:center;width:auto;padding:.375rem}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header[aria-selected=true]{padding-inline-end:1rem}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header:after{display:none}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header:not([aria-selected=true]){column-gap:0}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header:not([aria-selected=true]) .mat-exp-step-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-text{padding:0}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-summary,.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-optional{display:none}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-content{padding:1.5rem 1rem}.mat-exp-dialog-panel mat-exp-dialog-layout>.mat-exp-dialog-body:has(>.mat-exp-stepper){display:flex;flex-direction:column;padding:0;overflow:hidden}.mat-exp-dialog-panel mat-exp-dialog-layout>.mat-exp-dialog-body:has(>.mat-exp-stepper)>.mat-exp-stepper{flex:0 1 auto;border-block:1px solid var(--_mat-exp-stepper-divider)}.mat-exp-dialog-panel mat-exp-dialog-layout:has(>.mat-exp-dialog-body>.mat-exp-stepper)>.mat-exp-dialog-actions{padding:1rem 1.5rem}@media(min-width:600px){.mat-exp-dialog-panel.mat-exp-dialog-adaptive:has(mat-exp-stepper){width:min(var(--mat-exp-stepper-dialog-width, 55rem),100% - 32px);max-width:calc(100% - 32px)}}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:has(>.mat-exp-dialog-body>.mat-exp-stepper){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]:has(>.mat-exp-dialog-body>.mat-exp-stepper)>.mat-exp-dialog-body>.mat-exp-stepper{flex:1 1 auto;border-block-end:0}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:has(>.mat-exp-dialog-body>.mat-exp-stepper)>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:.75rem 1rem max(.75rem,env(safe-area-inset-bottom,0px));border-top:1px solid var(--_mat-exp-stepper-divider, var(--mat-sys-outline-variant))}}@media(forced-colors:active){.mat-exp-stepper-selection{display:none}.mat-exp-step-header[aria-selected=true]{outline:2px solid Highlight;outline-offset:-2px}.mat-exp-step-indicator{border-color:CanvasText}[data-state=active]>.mat-exp-step-indicator{forced-color-adjust:none;background:Highlight;color:HighlightText}[data-state=error]>.mat-exp-step-indicator{border:2px dashed CanvasText}}\n"], dependencies: [{ kind: "directive", type: CdkStepHeader, selector: "[cdkStepHeader]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5024
+ }
5025
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpStepper, decorators: [{
5026
+ type: Component,
5027
+ args: [{ selector: 'mat-exp-stepper', exportAs: 'matExpStepper', imports: [CdkStepHeader, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: CdkStepper, useExisting: MatExpStepper }], host: {
5028
+ class: 'mat-exp-stepper',
5029
+ '[attr.data-layout]': '_layout()',
5030
+ }, template: "<span #measure class=\"mat-exp-stepper-measure\" aria-hidden=\"true\"></span>\n<div class=\"mat-exp-stepper-sidebar\">\n @if (heading()) {\n <p class=\"mat-exp-stepper-heading\" [id]=\"_headingId\">{{ heading() }}</p>\n }\n <div\n #headers\n class=\"mat-exp-stepper-headers\"\n role=\"tablist\"\n [attr.aria-orientation]=\"_layout() === 'sidebar' ? 'vertical' : 'horizontal'\"\n [attr.aria-label]=\"heading() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"heading() ? _headingId : null\"\n >\n <span #indicator class=\"mat-exp-stepper-selection\" aria-hidden=\"true\"></span>\n @for (step of steps; track step; let i = $index, last = $last) {\n @let state = _state(step, i);\n <button\n type=\"button\"\n cdkStepHeader\n class=\"mat-exp-step-header\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"i === selectedIndex\"\n [attr.aria-disabled]=\"_isBlocked(i) || null\"\n [attr.aria-describedby]=\"_stepDescription(step, i)\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"step.ariaLabelledby || null\"\n [attr.tabindex]=\"_getFocusIndex() === i ? 0 : -1\"\n [attr.data-state]=\"state\"\n [attr.data-last]=\"last || null\"\n (click)=\"_select(i)\"\n (keydown)=\"_onHeaderKeydown($event)\"\n >\n <span class=\"mat-exp-step-indicator\" aria-hidden=\"true\">\n @switch (state) {\n @case ('done') {\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path\n fill=\"currentColor\"\n d=\"M9.55 18 3.85 12.3l1.43-1.42 4.27 4.27 9.17-9.18 1.43 1.43z\"\n />\n </svg>\n }\n @case ('error') {\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M11 15V5h2v10zm0 4v-2h2v2z\" />\n </svg>\n }\n @default {\n {{ i + 1 }}\n }\n }\n </span>\n <span class=\"mat-exp-step-text\">\n <span class=\"mat-exp-step-label\">\n @if (step.stepLabel) {\n <ng-container [ngTemplateOutlet]=\"step.stepLabel.template\" />\n } @else {\n {{ step.label }}\n }\n @if (step.optional) {\n <span class=\"mat-exp-step-optional\">{{ _labels.optionalLabel }}</span>\n }\n </span>\n @if (step.summary()) {\n <span\n class=\"mat-exp-step-summary\"\n aria-hidden=\"true\"\n [id]=\"_getStepLabelId(i) + '-summary'\"\n >{{ step.summary() }}</span\n >\n }\n @if (step.hasError && step.errorMessage) {\n <span\n class=\"mat-exp-step-error\"\n aria-hidden=\"true\"\n [id]=\"_getStepLabelId(i) + '-error'\"\n >{{ step.errorMessage }}</span\n >\n }\n @if (state === 'done') {\n <span class=\"cdk-visually-hidden\">, {{ _labels.completedLabel }}</span>\n } @else if (state === 'error') {\n <span class=\"cdk-visually-hidden\">, {{ _labels.errorLabel }}</span>\n }\n </span>\n </button>\n }\n </div>\n</div>\n<div class=\"mat-exp-stepper-main\">\n <div #viewport class=\"mat-exp-stepper-viewport\">\n @for (step of steps; track step; let i = $index) {\n <div\n class=\"mat-exp-step-content\"\n role=\"tabpanel\"\n tabindex=\"-1\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [hidden]=\"i !== selectedIndex && i !== _leaving()\"\n [attr.inert]=\"i !== selectedIndex ? '' : null\"\n [attr.aria-hidden]=\"i !== selectedIndex ? 'true' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"step.content\" />\n </div>\n }\n </div>\n <ng-content select=\"[matExpStepperActions]\" />\n</div>\n", styles: [".mat-exp-stepper{--_mat-exp-stepper-indicator-size: 2rem;--_mat-exp-stepper-header-padding: .75rem;--_mat-exp-stepper-header-gap: .25rem;--_mat-exp-stepper-divider: var(--mat-exp-stepper-divider-color, var(--mat-sys-outline-variant));position:relative;display:grid;grid-template-columns:var(--mat-exp-stepper-sidebar-width, 17rem) minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-height:0;max-height:100%;box-sizing:border-box;color:var(--mat-sys-on-surface)}.mat-exp-stepper-measure{position:absolute;inset-inline:0;top:0;height:0;visibility:hidden;pointer-events:none}.mat-exp-stepper-sidebar{min-height:0;overflow:auto;padding:1.5rem 1rem;background:var(--mat-exp-stepper-sidebar-color, var(--mat-sys-surface-container));border-inline-end:1px solid var(--_mat-exp-stepper-divider)}.mat-exp-stepper-heading{margin:0 .75rem 1rem;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-title-small)}.mat-exp-stepper-headers{position:relative;display:flex;flex-direction:column;gap:var(--_mat-exp-stepper-header-gap)}.mat-exp-stepper-selection{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;border-radius:var(--mat-exp-stepper-selection-shape, 1.25rem);background:var(--mat-exp-stepper-selection-color, var(--mat-sys-secondary-container))}.mat-exp-step-header{position:relative;display:grid;grid-template-columns:var(--_mat-exp-stepper-indicator-size) minmax(0,1fr);column-gap:.75rem;align-items:start;width:100%;margin:0;padding:var(--_mat-exp-stepper-header-padding);border:0;border-radius:var(--mat-exp-stepper-selection-shape, 1.25rem);background:transparent;color:var(--mat-sys-on-surface);font:inherit;text-align:start;cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent}.mat-exp-step-header:before{content:\"\";position:absolute;inset:0;border-radius:inherit;background:currentColor;opacity:0;pointer-events:none}.mat-exp-step-header:hover:before{opacity:.08}.mat-exp-step-header:focus-visible{outline:3px solid var(--mat-sys-secondary);outline-offset:2px}.mat-exp-step-header:focus-visible:before{opacity:.1}.mat-exp-step-header[aria-selected=true]{color:var(--mat-sys-on-secondary-container)}.mat-exp-step-header[aria-disabled=true]{cursor:not-allowed}.mat-exp-step-header[aria-disabled=true]:hover:before{opacity:0}.mat-exp-step-header:not([data-last]):after{content:\"\";position:absolute;inset-inline-start:calc(var(--_mat-exp-stepper-header-padding) + var(--_mat-exp-stepper-indicator-size) / 2 - 1px);top:calc(var(--_mat-exp-stepper-header-padding) + var(--_mat-exp-stepper-indicator-size) + .25rem);bottom:calc(-1 * (var(--_mat-exp-stepper-header-gap) + var(--_mat-exp-stepper-header-padding)) + .25rem);width:2px;border-radius:1px;background:var(--mat-exp-stepper-connector-color, var(--mat-sys-outline-variant))}.mat-exp-step-indicator{position:relative;box-sizing:border-box;display:grid;place-items:center;width:var(--_mat-exp-stepper-indicator-size);height:var(--_mat-exp-stepper-indicator-size);border:1px solid var(--mat-sys-outline);border-radius:50%;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-large)}[data-state=done]>.mat-exp-step-indicator{border-color:transparent;background:var(--mat-sys-secondary-container);color:var(--mat-sys-on-secondary-container)}[data-state=active]>.mat-exp-step-indicator{border-color:transparent;border-radius:.625rem;background:var(--mat-sys-primary);color:var(--mat-sys-on-primary)}[data-state=error]>.mat-exp-step-indicator{border-color:transparent;background:var(--mat-sys-error);color:var(--mat-sys-on-error)}.mat-exp-step-text{position:relative;display:flex;flex-direction:column;gap:.125rem;min-width:0;padding-block:.25rem 0}.mat-exp-step-label{font:var(--mat-sys-title-medium);overflow-wrap:anywhere}.mat-exp-step-optional{display:inline-block;margin-inline-start:.375rem;padding:0 .375rem;border:1px solid var(--mat-sys-outline-variant);border-radius:.5rem;font:var(--mat-sys-label-small);vertical-align:middle}.mat-exp-step-summary,.mat-exp-step-error{overflow:hidden;font:var(--mat-sys-body-medium);text-overflow:ellipsis;white-space:nowrap}.mat-exp-step-summary{color:var(--mat-sys-on-surface-variant)}[aria-selected=true] .mat-exp-step-summary{color:inherit}.mat-exp-step-error{color:var(--mat-exp-stepper-error-text-color, var(--mat-sys-on-error-container))}.mat-exp-stepper-main{display:flex;flex-direction:column;min-width:0;min-height:0}.mat-exp-stepper-viewport{position:relative;flex:1 1 auto;box-sizing:border-box;min-height:0;overflow:auto;overscroll-behavior:contain}.mat-exp-stepper-viewport[data-animating]{overflow:hidden}.mat-exp-step-content{box-sizing:border-box;padding:2rem 2.25rem;outline:none}.mat-exp-step-content[hidden]{display:none!important}.mat-exp-step-content:focus-visible{outline:2px solid var(--mat-sys-secondary);outline-offset:-2px}.mat-exp-step-content>:first-child{margin-top:0}.mat-exp-step-content>:last-child{margin-bottom:0}.mat-exp-stepper-main>[matExpStepperActions]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem;padding:1rem 1.5rem;border-top:1px solid var(--_mat-exp-stepper-divider)}.mat-exp-stepper[data-layout=horizontal]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.mat-exp-stepper[data-layout=horizontal]>.mat-exp-stepper-sidebar{padding:.5rem .75rem;overflow:auto hidden;border-inline-end:0;border-block-end:1px solid var(--_mat-exp-stepper-divider);scrollbar-width:none}.mat-exp-stepper[data-layout=horizontal] .mat-exp-stepper-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.mat-exp-stepper[data-layout=horizontal] .mat-exp-stepper-headers{flex-direction:row;align-items:center;width:max-content}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header{grid-template-columns:var(--_mat-exp-stepper-indicator-size) auto;align-items:center;width:auto;padding:.375rem}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header[aria-selected=true]{padding-inline-end:1rem}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header:after{display:none}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header:not([aria-selected=true]){column-gap:0}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-header:not([aria-selected=true]) .mat-exp-step-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-text{padding:0}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-summary,.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-optional{display:none}.mat-exp-stepper[data-layout=horizontal] .mat-exp-step-content{padding:1.5rem 1rem}.mat-exp-dialog-panel mat-exp-dialog-layout>.mat-exp-dialog-body:has(>.mat-exp-stepper){display:flex;flex-direction:column;padding:0;overflow:hidden}.mat-exp-dialog-panel mat-exp-dialog-layout>.mat-exp-dialog-body:has(>.mat-exp-stepper)>.mat-exp-stepper{flex:0 1 auto;border-block:1px solid var(--_mat-exp-stepper-divider)}.mat-exp-dialog-panel mat-exp-dialog-layout:has(>.mat-exp-dialog-body>.mat-exp-stepper)>.mat-exp-dialog-actions{padding:1rem 1.5rem}@media(min-width:600px){.mat-exp-dialog-panel.mat-exp-dialog-adaptive:has(mat-exp-stepper){width:min(var(--mat-exp-stepper-dialog-width, 55rem),100% - 32px);max-width:calc(100% - 32px)}}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:has(>.mat-exp-dialog-body>.mat-exp-stepper){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]:has(>.mat-exp-dialog-body>.mat-exp-stepper)>.mat-exp-dialog-body>.mat-exp-stepper{flex:1 1 auto;border-block-end:0}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:has(>.mat-exp-dialog-body>.mat-exp-stepper)>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:.75rem 1rem max(.75rem,env(safe-area-inset-bottom,0px));border-top:1px solid var(--_mat-exp-stepper-divider, var(--mat-sys-outline-variant))}}@media(forced-colors:active){.mat-exp-stepper-selection{display:none}.mat-exp-step-header[aria-selected=true]{outline:2px solid Highlight;outline-offset:-2px}.mat-exp-step-indicator{border-color:CanvasText}[data-state=active]>.mat-exp-step-indicator{forced-color-adjust:none;background:Highlight;color:HighlightText}[data-state=error]>.mat-exp-step-indicator{border:2px dashed CanvasText}}\n"] }]
5031
+ }], ctorParameters: () => [], propDecorators: { _steps: [{
5032
+ type: ContentChildren,
5033
+ args: [MatExpStep, { descendants: true }]
5034
+ }], _stepHeader: [{
5035
+ type: ViewChildren,
5036
+ args: [CdkStepHeader]
5037
+ }], _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 }] }] } });
5038
+
4300
5039
  /** A Material-shaped reference whose completion follows the owned spring lifecycle. */
4301
5040
  class MatExpDialogRef {
4302
5041
  _cdk;
@@ -4451,17 +5190,6 @@ class MatExpDialogRef {
4451
5190
  }
4452
5191
  }
4453
5192
 
4454
- const options = matExpCreateOptions({
4455
- motion: 'system',
4456
- closeLabel: 'Close dialog',
4457
- });
4458
- const MAT_EXP_DIALOG_OPTIONS = options.token;
4459
- const provideMatExpDialogOptions = options.provide;
4460
- /** @internal */
4461
- const injectMatExpDialogOptions = options.inject;
4462
- /** @internal Context is supplied at open time, not inferred from consumer DOM. */
4463
- const MAT_EXP_DIALOG_CONTEXT = new InjectionToken('MatExpDialog context');
4464
-
4465
5193
  /** @internal Passive visual copy; never join application forms or activate embedded content. */
4466
5194
  function createDialogOriginSnapshot(source) {
4467
5195
  const document = source.ownerDocument;
@@ -4565,10 +5293,14 @@ function createDialogMotion(host, surface, content, backdrop, options, opened, c
4565
5293
  else
4566
5294
  element.setAttribute('style', value);
4567
5295
  };
5296
+ // Once shown, never re-hide the host to measure: a hidden subtree drops keyboard focus.
5297
+ let shown = false;
4568
5298
  const reset = () => {
4569
5299
  restore(host);
4570
5300
  restore(surface);
4571
5301
  restore(content);
5302
+ if (shown)
5303
+ host.style.visibility = 'visible';
4572
5304
  };
4573
5305
  const fullScreen = () => options.mode === 'adaptive' && compact.matches;
4574
5306
  const read = () => {
@@ -4737,6 +5469,7 @@ function createDialogMotion(host, surface, content, backdrop, options, opened, c
4737
5469
  host.style.visibility = 'visible';
4738
5470
  if (backdrop)
4739
5471
  backdrop.style.opacity = '1';
5472
+ shown = true;
4740
5473
  if (wasOpening)
4741
5474
  opened();
4742
5475
  };
@@ -4779,9 +5512,23 @@ function createDialogMotion(host, surface, content, backdrop, options, opened, c
4779
5512
  onComplete: finish,
4780
5513
  });
4781
5514
  };
5515
+ // While content drives its own size, the auto-sized surface already tracks it exactly.
5516
+ let following = false;
5517
+ let releasing = false;
4782
5518
  const retarget = () => {
4783
5519
  if (phase === 'destroyed')
4784
5520
  return;
5521
+ if ((following || releasing) && (phase === 'open' || phase === 'resizing')) {
5522
+ releasing = false;
5523
+ timeline?.kill();
5524
+ timeline = undefined;
5525
+ phase = 'open';
5526
+ if (backdrop)
5527
+ backdrop.style.opacity = '1';
5528
+ anchor = target = current = read();
5529
+ velocity = zeroVelocity();
5530
+ return;
5531
+ }
4785
5532
  const next = read();
4786
5533
  if (phase === 'open' &&
4787
5534
  ['x', 'y', 'width', 'height', 'radius'].every((key) => Math.abs(next[key] - current[key]) < 0.1)) {
@@ -4820,6 +5567,19 @@ function createDialogMotion(host, surface, content, backdrop, options, opened, c
4820
5567
  play();
4821
5568
  },
4822
5569
  retarget: schedule,
5570
+ follow(active) {
5571
+ if (following === active)
5572
+ return;
5573
+ following = active;
5574
+ // The final content frame may still be pending observation; treat it as followed too.
5575
+ releasing = !active;
5576
+ if (releasing)
5577
+ win.requestAnimationFrame(() => win.requestAnimationFrame(() => {
5578
+ releasing = false;
5579
+ }));
5580
+ if (active && phase === 'resizing')
5581
+ retarget();
5582
+ },
4823
5583
  destroy() {
4824
5584
  phase = 'destroyed';
4825
5585
  restoreSource();
@@ -4845,6 +5605,7 @@ class MatExpDialogContainer extends CdkDialogContainer {
4845
5605
  _motion;
4846
5606
  _closing = false;
4847
5607
  _destroyed = false;
5608
+ _following = false;
4848
5609
  _captureInitialFocus() {
4849
5610
  /* Capture after the spring completes. */
4850
5611
  }
@@ -4861,6 +5622,8 @@ class MatExpDialogContainer extends CdkDialogContainer {
4861
5622
  this.opened.complete();
4862
5623
  }
4863
5624
  }), () => this.exited.next());
5625
+ if (this._following)
5626
+ this._motion.follow(true);
4864
5627
  if (!this._closing &&
4865
5628
  this._config.autoFocus !== false &&
4866
5629
  !host.contains(host.ownerDocument.activeElement))
@@ -4882,6 +5645,11 @@ class MatExpDialogContainer extends CdkDialogContainer {
4882
5645
  this.exited.next();
4883
5646
  });
4884
5647
  }
5648
+ /** Follow content that animates its own size, without a competing surface spring. */
5649
+ followContentSize(active) {
5650
+ this._following = active;
5651
+ this._motion?.follow(active);
5652
+ }
4885
5653
  retarget() {
4886
5654
  this._motion?.retarget();
4887
5655
  }
@@ -5154,6 +5922,12 @@ class MatExpDialog {
5154
5922
  return [
5155
5923
  { provide: MatExpDialogRef, useValue: ref },
5156
5924
  { provide: MAT_DIALOG_DATA, useValue: effective.data },
5925
+ {
5926
+ provide: MAT_EXP_DIALOG_SIZING,
5927
+ useValue: {
5928
+ follow: (active) => container.followContentSize(active),
5929
+ },
5930
+ },
5157
5931
  ];
5158
5932
  },
5159
5933
  });
@@ -5190,5 +5964,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
5190
5964
  * Generated bundle index. Do not edit.
5191
5965
  */
5192
5966
 
5193
- 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_TOOLBAR_OPTIONS, MatExpButton, MatExpButtonGroup, MatExpDialog, MatExpDialogActions, MatExpDialogClose, MatExpDialogLayout, MatExpDialogRef, MatExpFabMenu, MatExpFabMenuButton, MatExpFabMenuTrigger, MatExpIconButton, MatExpList, MatExpListItem, MatExpListMediaDirective, MatExpLoadingIndicator, MatExpNavigationRail, MatExpNavigationRailItem, MatExpNavigationRailSection, MatExpProgressIndicator, MatExpRichTooltip, MatExpRichTooltipTrigger, MatExpSearch, MatExpSearchResult, MatExpSelectableButtonChange, MatExpSplitButton, MatExpToolbar, MatExpToolbarItem, bindButtonGroupChildren, injectMatExpButtonGroupOptions, injectMatExpButtonOptions, injectMatExpFabMenuOptions, injectMatExpIconButtonOptions, injectMatExpLoadingIndicatorOptions, injectMatExpProgressIndicatorOptions, injectMatExpRichTooltipOptions, injectMatExpSearchOptions, injectMatExpSplitButtonOptions, provideMatExpButtonGroupOptions, provideMatExpButtonOptions, provideMatExpDialogOptions, provideMatExpFabMenuOptions, provideMatExpIconButtonOptions, provideMatExpListOptions, provideMatExpLoadingIndicatorOptions, provideMatExpNavigationRailOptions, provideMatExpProgressIndicatorOptions, provideMatExpRichTooltipOptions, provideMatExpSearchOptions, provideMatExpSplitButtonOptions, provideMatExpToolbarOptions, toButtonGroupChild };
5967
+ 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, 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 };
5194
5968
  //# sourceMappingURL=camaradesuk-m3e-angular.mjs.map