{"version":3,"file":"dialog.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog-animations.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog-config.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog-container.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog-container.html","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog-ref.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog-content-directives.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/dialog/dialog.module.ts"],"sourcesContent":["import {\n  animate,\n  animateChild,\n  AnimationTriggerMetadata,\n  group,\n  query,\n  state,\n  style,\n  transition,\n  trigger,\n} from '@angular/animations';\n\n/**\n * Default parameters for the animation for backwards compatibility.\n * @docs-private\n */\nexport const sbbDialogAnimationsDefaultParams = {\n  params: { enterAnimationDuration: '150ms', exitAnimationDuration: '75ms' },\n};\n\n/**\n * Animations used by SbbDialog.\n * @docs-private\n */\nexport const sbbDialogAnimations: {\n  readonly dialogContainer: AnimationTriggerMetadata;\n} = {\n  /** Animation that is applied on the dialog container by default. */\n  dialogContainer: trigger('dialogContainer', [\n    // Note: The `enter` animation transitions to `transform: none`, because for some reason\n    // specifying the transform explicitly, causes IE both to blur the dialog content and\n    // decimate the animation performance. Leaving it as `none` solves both issues.\n    state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),\n    state('enter', style({ transform: 'none' })),\n    transition(\n      '* => enter',\n      group([\n        animate(\n          '{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)',\n          style({ transform: 'none', opacity: 1 }),\n        ),\n        query('@*', animateChild(), { optional: true }),\n      ]),\n      sbbDialogAnimationsDefaultParams,\n    ),\n    transition(\n      '* => void, * => exit',\n      group([\n        animate('{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),\n        query('@*', animateChild(), { optional: true }),\n      ]),\n      sbbDialogAnimationsDefaultParams,\n    ),\n  ]),\n};\n","import { ScrollStrategy } from '@angular/cdk/overlay';\nimport { Injector, ViewContainerRef } from '@angular/core';\n\nimport { sbbDialogAnimationsDefaultParams } from './dialog-animations';\n\n/** Valid ARIA roles for a dialog element. */\nexport type SbbDialogRole = 'dialog' | 'alertdialog';\n\n/** Possible overrides for a dialog's position. */\nexport interface SbbDialogPosition {\n  /** Override for the dialog's top position. */\n  top?: string;\n\n  /** Override for the dialog's bottom position. */\n  bottom?: string;\n\n  /** Override for the dialog's left position. */\n  left?: string;\n\n  /** Override for the dialog's right position. */\n  right?: string;\n}\n\n/**\n * Configuration for opening a modal dialog with the SbbDialog service.\n */\nexport class SbbDialogConfig<D = any> {\n  /**\n   * Where the attached component should live in Angular's *logical* component tree.\n   * This affects what is available for injection and the change detection order for the\n   * component instantiated inside of the dialog. This does not affect where the dialog\n   * content will be rendered.\n   */\n  viewContainerRef?: ViewContainerRef;\n\n  /**\n   * Injector used for the instantiation of the component to be attached. If provided,\n   * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n   */\n  injector?: Injector;\n\n  /** ID for the dialog. If omitted, a unique one will be generated. */\n  id?: string;\n\n  /** The ARIA role of the dialog element. */\n  role?: SbbDialogRole = 'dialog';\n\n  /** Custom class for the overlay pane. */\n  panelClass?: string | string[] = '';\n\n  /** Whether the dialog has a backdrop. */\n  hasBackdrop?: boolean = true;\n\n  /** Custom class for the backdrop. */\n  backdropClass?: string | string[] = '';\n\n  /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n  disableClose?: boolean = false;\n\n  /** Width of the dialog. */\n  width?: string = '';\n\n  /** Height of the dialog. */\n  height?: string = '';\n\n  /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n  minWidth?: number | string;\n\n  /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n  minHeight?: number | string;\n\n  /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n  maxWidth?: number | string = '80vw';\n\n  /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n  maxHeight?: number | string = '96vh';\n\n  /** Position overrides. */\n  position?: SbbDialogPosition;\n\n  /** Data being injected into the child component. */\n  data?: D | null = null;\n\n  /** ID of the element that describes the dialog. */\n  ariaDescribedBy?: string | null = null;\n\n  /** ID of the element that labels the dialog. */\n  ariaLabelledBy?: string | null = null;\n\n  /** Aria label to assign to the dialog element. */\n  ariaLabel?: string | null = null;\n\n  /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n  ariaModal?: boolean = true;\n\n  /** Whether the dialog should focus the first focusable element on open. */\n  autoFocus?: boolean = true;\n\n  /**\n   * Whether the dialog should restore focus to the\n   * previously-focused element, after it's closed.\n   */\n  restoreFocus?: boolean = true;\n\n  /** Whether to wait for the opening animation to finish before trapping focus. */\n  delayFocusTrap?: boolean = false;\n\n  /** Scroll strategy to be used for the dialog. */\n  scrollStrategy?: ScrollStrategy;\n\n  /**\n   * Whether the dialog should close when the user goes backwards/forwards in history.\n   * Note that this usually doesn't include clicking on links (unless the user is using\n   * the `HashLocationStrategy`).\n   */\n  closeOnNavigation?: boolean = true;\n\n  /** Duration of the enter animation. Has to be a valid CSS value (e.g. 100ms). */\n  enterAnimationDuration?: string = sbbDialogAnimationsDefaultParams.params.enterAnimationDuration;\n\n  /** Duration of the exit animation. Has to be a valid CSS value (e.g. 50ms). */\n  exitAnimationDuration?: string = sbbDialogAnimationsDefaultParams.params.exitAnimationDuration;\n\n  // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\n}\n","import { AnimationEvent } from '@angular/animations';\nimport { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  EventEmitter,\n  HostListener,\n  ViewEncapsulation,\n} from '@angular/core';\n\nimport { sbbDialogAnimations, sbbDialogAnimationsDefaultParams } from './dialog-animations';\nimport { SbbDialogConfig } from './dialog-config';\n\n/** Event that captures the state of dialog container animations. */\ninterface DialogAnimationEvent {\n  state: 'opened' | 'opening' | 'closing' | 'closed';\n  totalTime: number;\n}\n\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\n@Component({\n  selector: 'sbb-dialog-container',\n  templateUrl: 'dialog-container.html',\n  styleUrls: ['dialog.css'],\n  encapsulation: ViewEncapsulation.None,\n  // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  animations: [sbbDialogAnimations.dialogContainer],\n  host: {\n    class: 'sbb-dialog-container',\n    tabindex: '-1',\n    '[id]': '_config.id',\n    '[attr.role]': '_config.role',\n    '[attr.aria-modal]': '_config.ariaModal',\n    '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n    '[attr.aria-label]': '_config.ariaLabel',\n    '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n    '[@dialogContainer]': `_getAnimationState()`,\n  },\n  imports: [CdkPortalOutlet],\n})\nexport class SbbDialogContainer extends CdkDialogContainer<SbbDialogConfig> {\n  /** Emits when an animation state changes. */\n  _animationStateChanged: EventEmitter<DialogAnimationEvent> =\n    new EventEmitter<DialogAnimationEvent>();\n\n  /** State of the animation. */\n  _state: 'void' | 'enter' | 'exit' = 'enter';\n\n  /** Callback, invoked whenever an animation on the host completes. */\n  @HostListener('@dialogContainer.done', ['$event'])\n  _onAnimationDone({ toState, totalTime }: AnimationEvent) {\n    if (toState === 'enter') {\n      this._openAnimationDone(totalTime);\n    } else if (toState === 'exit') {\n      this._animationStateChanged.next({ state: 'closed', totalTime });\n    }\n  }\n\n  /** Callback, invoked when an animation on the host starts. */\n  @HostListener('@dialogContainer.start', ['$event'])\n  _onAnimationStart({ toState, totalTime }: AnimationEvent) {\n    if (toState === 'enter') {\n      this._animationStateChanged.next({ state: 'opening', totalTime });\n    } else if (toState === 'exit' || toState === 'void') {\n      this._animationStateChanged.next({ state: 'closing', totalTime });\n    }\n  }\n\n  /** Starts the dialog exit animation. */\n  _startExitAnimation(): void {\n    this._state = 'exit';\n\n    // Mark the container for check so it can react if the\n    // view container is using OnPush change detection.\n    this._changeDetectorRef.markForCheck();\n  }\n\n  /** Initializes the dialog container with the attached content. */\n  protected override _captureInitialFocus(): void {\n    if (!this._config.delayFocusTrap) {\n      this._trapFocus();\n    }\n  }\n\n  _getAnimationState() {\n    return {\n      value: this._state,\n      params: {\n        // See https://github.com/angular/components/commit/575332c9296c28776376f4b4f7fb39c9743761aa\n        'enterAnimationDuration': // prettier-ignore\n          this._config.enterAnimationDuration || sbbDialogAnimationsDefaultParams.params.enterAnimationDuration,\n        'exitAnimationDuration': // prettier-ignore\n          this._config.exitAnimationDuration || sbbDialogAnimationsDefaultParams.params.exitAnimationDuration,\n      },\n    };\n  }\n\n  /**\n   * Callback for when the open dialog animation has finished. Intended to\n   * be called by sub-classes that use different animation implementations.\n   */\n  protected _openAnimationDone(totalTime: number) {\n    if (this._config.delayFocusTrap) {\n      this._trapFocus();\n    }\n\n    this._animationStateChanged.next({ state: 'opened', totalTime });\n  }\n}\n","<ng-template cdkPortalOutlet></ng-template>\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { DialogRef } from '@angular/cdk/dialog';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { ComponentRef } from '@angular/core';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\nimport { SbbDialogConfig, SbbDialogPosition } from './dialog-config';\nimport { SbbDialogContainer } from './dialog-container';\n\n/** Possible states of the lifecycle of a dialog. */\nexport enum SbbDialogState {\n  OPEN,\n  CLOSING,\n  CLOSED,\n}\n\n/**\n * Reference to a dialog opened via the SbbDialog service.\n */\nexport class SbbDialogRef<T, R = any> {\n  /** The instance of component opened into the dialog. */\n  componentInstance: T;\n\n  /**\n   * `ComponentRef` of the component opened into the dialog. Will be\n   * null when the dialog is opened using a `TemplateRef`.\n   */\n  readonly componentRef: ComponentRef<T> | null;\n\n  /** Whether the user is allowed to close the dialog. */\n  disableClose: boolean | undefined;\n\n  /** Unique ID for the dialog. */\n  id: string;\n\n  /** Subject for notifying the user that the dialog has finished opening. */\n  private readonly _afterOpened = new Subject<void>();\n\n  /** Subject for notifying the user that the dialog has started closing. */\n  private readonly _beforeClosed = new Subject<R | undefined>();\n\n  /** Result to be passed to afterClosed. */\n  private _result: R | undefined;\n\n  /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n  private _closeFallbackTimeout: any;\n\n  /** Current state of the dialog. */\n  private _state = SbbDialogState.OPEN;\n\n  // TODO(crisbeto): we shouldn't have to declare this property, because `DialogRef.close`\n  // already has a second `options` parameter that we can use. The problem is that internal tests\n  // have assertions like `expect(SbbDialogRef.close).toHaveBeenCalledWith(foo)` which will break,\n  // because it'll be called with two arguments by things like `SbbDialogClose`.\n  /** Interaction that caused the dialog to close. */\n  private _closeInteractionType: FocusOrigin | undefined;\n\n  constructor(\n    public ref: DialogRef<R, T>,\n    config: SbbDialogConfig,\n    public _containerInstance: SbbDialogContainer,\n  ) {\n    this.disableClose = config.disableClose;\n    this.id = ref.id;\n\n    // Emit when opening animation completes\n    _containerInstance._animationStateChanged\n      .pipe(\n        filter((event) => event.state === 'opened'),\n        take(1),\n      )\n      .subscribe(() => {\n        this._afterOpened.next();\n        this._afterOpened.complete();\n      });\n\n    // Dispose overlay when closing animation is complete\n    _containerInstance._animationStateChanged\n      .pipe(\n        filter((event) => event.state === 'closed'),\n        take(1),\n      )\n      .subscribe(() => {\n        clearTimeout(this._closeFallbackTimeout);\n        this._finishDialogClose();\n      });\n\n    ref.overlayRef.detachments().subscribe(() => {\n      this._beforeClosed.next(this._result);\n      this._beforeClosed.complete();\n      this._finishDialogClose();\n    });\n\n    merge(\n      this.backdropClick(),\n      this.keydownEvents().pipe(\n        filter((event) => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)),\n      ),\n    ).subscribe((event) => {\n      if (!this.disableClose) {\n        event.preventDefault();\n        _closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');\n      }\n    });\n  }\n\n  /**\n   * Close the dialog.\n   * @param dialogResult Optional result to return to the dialog opener.\n   */\n  close(dialogResult?: R): void {\n    this._result = dialogResult;\n\n    // Transition the backdrop in parallel to the dialog.\n    this._containerInstance._animationStateChanged\n      .pipe(\n        filter((event) => event.state === 'closing'),\n        take(1),\n      )\n      .subscribe((event) => {\n        this._beforeClosed.next(dialogResult);\n        this._beforeClosed.complete();\n        this.ref.overlayRef.detachBackdrop();\n\n        // The logic that disposes of the overlay depends on the exit animation completing, however\n        // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n        // timeout which will clean everything up if the animation hasn't fired within the specified\n        // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n        // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n        this._closeFallbackTimeout = setTimeout(\n          () => this._finishDialogClose(),\n          event.totalTime + 100,\n        );\n      });\n\n    this._state = SbbDialogState.CLOSING;\n    this._containerInstance._startExitAnimation();\n  }\n\n  /**\n   * Gets an observable that is notified when the dialog is finished opening.\n   */\n  afterOpened(): Observable<void> {\n    return this._afterOpened;\n  }\n\n  /**\n   * Gets an observable that is notified when the dialog is finished closing.\n   */\n  afterClosed(): Observable<R | undefined> {\n    return this.ref.closed;\n  }\n\n  /**\n   * Gets an observable that is notified when the dialog has started closing.\n   */\n  beforeClosed(): Observable<R | undefined> {\n    return this._beforeClosed;\n  }\n\n  /**\n   * Gets an observable that emits when the overlay's backdrop has been clicked.\n   */\n  backdropClick(): Observable<MouseEvent> {\n    return this.ref.backdropClick;\n  }\n\n  /**\n   * Gets an observable that emits when keydown events are targeted on the overlay.\n   */\n  keydownEvents(): Observable<KeyboardEvent> {\n    return this.ref.keydownEvents;\n  }\n\n  /**\n   * Updates the dialog's position.\n   * @param position New dialog position.\n   */\n  updatePosition(position?: SbbDialogPosition): this {\n    const strategy = this.ref.config.positionStrategy as GlobalPositionStrategy;\n\n    if (position && (position.left || position.right)) {\n      position.left ? strategy.left(position.left) : strategy.right(position.right);\n    } else {\n      strategy.centerHorizontally();\n    }\n\n    if (position && (position.top || position.bottom)) {\n      position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n    } else {\n      strategy.centerVertically();\n    }\n\n    this.ref.updatePosition();\n\n    return this;\n  }\n\n  /**\n   * Updates the dialog's width and height.\n   * @param width New width of the dialog.\n   * @param height New height of the dialog.\n   */\n  updateSize(width: string = '', height: string = ''): this {\n    this.ref.updateSize(width, height);\n    return this;\n  }\n\n  /** Add a CSS class or an array of classes to the overlay pane. */\n  addPanelClass(classes: string | string[]): this {\n    this.ref.addPanelClass(classes);\n    return this;\n  }\n\n  /** Remove a CSS class or an array of classes from the overlay pane. */\n  removePanelClass(classes: string | string[]): this {\n    this.ref.removePanelClass(classes);\n    return this;\n  }\n\n  /** Gets the current state of the dialog's lifecycle. */\n  getState(): SbbDialogState {\n    return this._state;\n  }\n\n  /**\n   * Finishes the dialog close by updating the state of the dialog\n   * and disposing the overlay.\n   */\n  private _finishDialogClose() {\n    this._state = SbbDialogState.CLOSED;\n    this.ref.close(this._result, { focusOrigin: this._closeInteractionType });\n    this.componentInstance = null!;\n  }\n}\n\n/**\n * Closes the dialog with the specified interaction type. This is currently not part of\n * `SbbDialogRef` as that would conflict with custom dialog ref mocks provided in tests.\n * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.\n */\n// TODO: Move this back into `SbbDialogRef` when we provide an official mock dialog ref.\nexport function _closeDialogVia<R>(ref: SbbDialogRef<R>, interactionType: FocusOrigin, result?: R) {\n  (ref as unknown as { _closeInteractionType: FocusOrigin })._closeInteractionType =\n    interactionType;\n  return ref.close(result);\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { Dialog, DialogConfig } from '@angular/cdk/dialog';\nimport {\n  createBlockScrollStrategy,\n  createGlobalPositionStrategy,\n  Overlay,\n  ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentType } from '@angular/cdk/portal';\nimport {\n  ComponentRef,\n  inject,\n  Injectable,\n  InjectionToken,\n  Injector,\n  OnDestroy,\n  TemplateRef,\n  Type,\n} from '@angular/core';\nimport { defer, Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\nimport { SbbDialogConfig } from './dialog-config';\nimport { SbbDialogContainer } from './dialog-container';\nimport { SbbDialogRef } from './dialog-ref';\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nexport const SBB_DIALOG_DATA = new InjectionToken<any>('SbbDialogData');\n\n/** Injection token that can be used to specify default dialog options. */\nexport const SBB_DIALOG_DEFAULT_OPTIONS = new InjectionToken<SbbDialogConfig>(\n  'sbb-dialog-default-options',\n);\n\n/** Injection token that determines the scroll handling while the dialog is open. */\nexport const SBB_DIALOG_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n  'sbb-dialog-scroll-strategy',\n  {\n    providedIn: 'root',\n    factory: () => {\n      const injector = inject(Injector);\n      return () => createBlockScrollStrategy(injector);\n    },\n  },\n);\n\n/**\n * Base class for dialog services. The base dialog service allows\n * for arbitrary dialog refs and dialog container components.\n */\n@Injectable({ providedIn: 'root' })\n// tslint:disable-next-line: class-name naming-convention\nexport abstract class _SbbDialogBase<\n  C extends SbbDialogContainer,\n  F extends SbbDialogRef<any> = SbbDialogRef<any>,\n> implements OnDestroy {\n  private readonly _openDialogsAtThisLevel: F[] = [];\n  private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n  private readonly _afterOpenedAtThisLevel = new Subject<F>();\n  private _scrollStrategy: () => ScrollStrategy;\n  protected _idGenerator: _IdGenerator = inject(_IdGenerator);\n  protected _idPrefix: string = 'sbb-dialog-';\n  private _dialog: Dialog;\n  private _injector = inject(Injector);\n  /** Keeps track of the currently-open dialogs. */\n  get openDialogs(): F[] {\n    return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n  }\n\n  /** Stream that emits when a dialog has been opened. */\n  get afterOpened(): Subject<F> {\n    return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n  }\n\n  private _getAfterAllClosed(): Subject<void> {\n    const parent = this._parentDialog;\n    return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n  }\n\n  // TODO (jelbourn): tighten the typing right-hand side of this expression.\n  /**\n   * Stream that emits when all open dialog have finished closing.\n   * Will emit on subscribe if there are no open dialogs to begin with.\n   */\n  readonly afterAllClosed: Observable<void> = defer(() =>\n    this.openDialogs.length\n      ? this._getAfterAllClosed()\n      : this._getAfterAllClosed().pipe(startWith(undefined)),\n  ) as Observable<any>;\n\n  constructor(\n    private _overlay: Overlay,\n    injector: Injector,\n    private _defaultOptions: SbbDialogConfig | null,\n    private _parentDialog: _SbbDialogBase<C, F> | null,\n    scrollStrategy: any,\n    private _dialogRefConstructor: Type<F>,\n    private _dialogContainerType: Type<C>,\n    private _dialogDataToken: InjectionToken<any>,\n  ) {\n    this._scrollStrategy = scrollStrategy;\n    this._dialog = injector.get(Dialog);\n  }\n\n  /**\n   * Opens a modal dialog containing the given template.\n   * @param componentOrTemplateRef Component type or TemplateRef to instantiate as the dialog content.\n   * @param config Extra configuration options.\n   * @returns Reference to the newly-opened dialog.\n   */\n  open<T, D = any, R = any>(\n    componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n    config?: SbbDialogConfig<D>,\n  ): SbbDialogRef<T, R> {\n    let dialogRef: F;\n    config = { ...(this._defaultOptions || new SbbDialogConfig()), ...config };\n    config.id = config.id || this._idGenerator.getId(this._idPrefix);\n    config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();\n    config.backdropClass = config.backdropClass || 'sbb-overlay-background';\n\n    const cdkRef = this._dialog.open<R, D, T>(componentOrTemplateRef, {\n      ...config,\n      positionStrategy: createGlobalPositionStrategy(this._injector)\n        .centerHorizontally()\n        .centerVertically(),\n      // Disable closing since we need to sync it up to the animation ourselves.\n      disableClose: true,\n      // Disable closing on destroy, because this service cleans up its open dialogs as well.\n      // We want to do the cleanup here, rather than the CDK service, because the CDK destroys\n      // the dialogs immediately whereas we want it to wait for the animations to finish.\n      closeOnDestroy: false,\n      // Disable closing on detachments so that we can sync up the animation.\n      closeOnOverlayDetachments: false,\n      container: {\n        type: this._dialogContainerType,\n        providers: () => [\n          // Provide our config as the CDK config as well since it has the same interface as the\n          // CDK one, but it contains the actual values passed in by the user for things like\n          // `disableClose` which we disable for the CDK dialog since we handle it ourselves.\n          { provide: SbbDialogConfig, useValue: config },\n          { provide: DialogConfig, useValue: config },\n        ],\n      },\n      templateContext: () => ({ dialogRef, lightboxRef: dialogRef }),\n      providers: (ref, cdkConfig, dialogContainer) => {\n        dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);\n        dialogRef.updatePosition(config?.position);\n        return [\n          { provide: this._dialogContainerType, useValue: dialogContainer },\n          { provide: this._dialogDataToken, useValue: cdkConfig.data },\n          { provide: this._dialogRefConstructor, useValue: dialogRef },\n        ];\n      },\n    });\n\n    // This can't be assigned in the `providers` callback, because\n    // the instance hasn't been assigned to the CDK ref yet.\n    (dialogRef! as { componentRef: ComponentRef<T> }).componentRef = cdkRef.componentRef!;\n    dialogRef!.componentInstance = cdkRef.componentInstance!;\n\n    this.openDialogs.push(dialogRef!);\n    this.afterOpened.next(dialogRef!);\n\n    dialogRef!.afterClosed().subscribe(() => {\n      const index = this.openDialogs.indexOf(dialogRef);\n\n      if (index > -1) {\n        this.openDialogs.splice(index, 1);\n\n        if (!this.openDialogs.length) {\n          this._getAfterAllClosed().next();\n        }\n      }\n    });\n\n    return dialogRef!;\n  }\n\n  /**\n   * Closes all of the currently-open dialogs.\n   */\n  closeAll(): void {\n    this._closeDialogs(this.openDialogs);\n  }\n\n  /**\n   * Finds an open dialog by its id.\n   * @param id ID to use when looking up the dialog.\n   */\n  getDialogById(id: string): F | undefined {\n    return this.openDialogs.find((dialog) => dialog.id === id);\n  }\n\n  ngOnDestroy() {\n    // Only close the dialogs at this level on destroy\n    // since the parent service may still be active.\n    this._closeDialogs(this._openDialogsAtThisLevel);\n    this._afterAllClosedAtThisLevel.complete();\n    this._afterOpenedAtThisLevel.complete();\n  }\n\n  /** Closes all of the dialogs in an array. */\n  private _closeDialogs(dialogs: F[]) {\n    let i = dialogs.length;\n\n    while (i--) {\n      dialogs[i].close();\n    }\n  }\n}\n\n/**\n * Service to open modal dialogs.\n */\n@Injectable({ providedIn: 'root' })\nexport class SbbDialog extends _SbbDialogBase<SbbDialogContainer> {\n  constructor(...args: unknown[]);\n  constructor() {\n    const overlay = inject(Overlay);\n    const injector = inject(Injector);\n    const defaultOptions = inject<SbbDialogConfig>(SBB_DIALOG_DEFAULT_OPTIONS, { optional: true });\n    const scrollStrategy = inject(SBB_DIALOG_SCROLL_STRATEGY);\n    const parentDialog = inject(SbbDialog, { optional: true, skipSelf: true })!;\n\n    super(\n      overlay,\n      injector,\n      defaultOptions,\n      parentDialog,\n      scrollStrategy,\n      SbbDialogRef,\n      SbbDialogContainer,\n      SBB_DIALOG_DATA,\n    );\n  }\n}\n","// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265\n/// <reference types=\"@angular/localize/init\" />\n\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  Directive,\n  ElementRef,\n  HostListener,\n  inject,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  SimpleChanges,\n} from '@angular/core';\nimport { SbbIconModule } from '@sbb-esta/angular/icon';\n\nimport { SbbDialog } from './dialog';\nimport { SbbDialogRef, _closeDialogVia } from './dialog-ref';\n\n/**\n * Button that will close the current dialog.\n */\n@Directive({\n  selector: '[sbb-dialog-close], [sbbDialogClose]',\n  exportAs: 'sbbDialogClose',\n  host: {\n    '[attr.aria-label]': 'ariaLabel || null',\n    '[attr.type]': 'type',\n  },\n})\nexport class SbbDialogClose implements OnInit, OnChanges {\n  private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n  protected _dialogRef: SbbDialogRef<any> = inject<SbbDialogRef<any>>(SbbDialogRef, {\n    optional: true,\n  })!;\n  protected _dialog: SbbDialog = inject(SbbDialog);\n\n  /** Screenreader label for the button. */\n  @Input('aria-label')\n  ariaLabel: string = $localize`:Aria label to close a dialog@@sbbDialogCloseDialog:Close dialog`;\n\n  /** Default to \"button\" to prevents accidental form submits. */\n  @Input() type: 'submit' | 'button' | 'reset' = 'button';\n\n  /** Dialog close input. */\n  @Input('sbb-dialog-close') dialogResult: any;\n\n  @Input('sbbDialogClose') _sbbDialogClose: any;\n\n  /**\n   * Callback which is called before closing.\n   * If returning true, dialog can close.\n   * If returning false, dialog cannot close.\n   */\n  _canCloseInterceptor: () => boolean = () => true;\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  ngOnInit() {\n    if (!this._dialogRef) {\n      // When this directive is included in a dialog via TemplateRef (rather than being\n      // in a Component), the DialogRef isn't available via injection because embedded\n      // views cannot be given a custom injector. Instead, we look up the DialogRef by\n      // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n      // be resolved at constructor time.\n      this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n    }\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    const proxiedChange = changes['_sbbDialogClose'] || changes['_sbbDialogCloseResult'];\n\n    if (proxiedChange) {\n      this.dialogResult = proxiedChange.currentValue;\n    }\n  }\n\n  @HostListener('click', ['$event'])\n  _onButtonClick(event: MouseEvent) {\n    if (!this._canCloseInterceptor()) {\n      return;\n    }\n    // Determinate the focus origin using the click event, because using the FocusMonitor will\n    // result in incorrect origins. Most of the time, close buttons will be auto focused in the\n    // dialog, and therefore clicking the button won't result in a focus change. This means that\n    // the FocusMonitor won't detect any origin change, and will always output `program`.\n    _closeDialogVia(\n      this._dialogRef,\n      event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse',\n      this.dialogResult,\n    );\n  }\n}\n\n/**\n * Base class for dialog title.\n */\n@Directive()\n// tslint:disable-next-line: class-name naming-convention\nexport class _SbbDialogTitleBase implements OnInit, OnDestroy {\n  protected _dialogRef: SbbDialogRef<any> = inject<SbbDialogRef<any>>(SbbDialogRef, {\n    optional: true,\n  })!;\n  protected _dialog: SbbDialog = inject(SbbDialog);\n  private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n  private _changeDetectorRef = inject(ChangeDetectorRef);\n\n  /** Unique id for the dialog title. If none is supplied, it will be auto-generated. */\n  @Input() id = inject(_IdGenerator).getId('sbb-dialog-title-');\n\n  /** Arial label for the close button. */\n  @Input()\n  closeAriaLabel: string =\n    $localize`:Aria label to close a dialog@@sbbDialogCloseDialog:Close dialog`;\n\n  /** Whether the close button is enabled for the dialog. */\n  _closeEnabled: boolean = true;\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  ngOnInit() {\n    if (!this._dialogRef) {\n      // When this directive is included in a dialog via TemplateRef (rather than being\n      // in a Component), the DialogRef isn't available via injection because embedded\n      // views cannot be given a custom injector. Instead, we look up the DialogRef by\n      // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n      // be resolved at constructor time.\n      this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n    }\n\n    if (this._dialogRef) {\n      Promise.resolve().then(() => {\n        const container = this._dialogRef._containerInstance;\n\n        if (!container) {\n          return;\n        }\n        if (container._config.disableClose) {\n          this._closeEnabled = false;\n          this._changeDetectorRef.markForCheck();\n        }\n        // Note: we null check the queue, because there are some internal\n        // tests that are mocking out `SbbDialogRef` incorrectly.\n        this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id);\n      });\n    }\n  }\n\n  ngOnDestroy() {\n    // Note: we null check because there are some internal\n    // tests that are mocking out `MatDialogRef` incorrectly.\n    const instance = this._dialogRef?._containerInstance;\n\n    if (instance) {\n      Promise.resolve().then(() => {\n        instance._removeAriaLabelledBy?.(this.id);\n      });\n    }\n  }\n}\n\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\n@Component({\n  selector: 'sbb-dialog-title, [sbb-dialog-title], [sbbDialogTitle]',\n  exportAs: 'sbbDialogTitle',\n  template: `\n    <ng-content></ng-content>\n    @if (_closeEnabled) {\n      <button\n        [sbb-dialog-close]=\"undefined\"\n        class=\"sbb-dialog-title-close-button sbb-button-reset-frameless\"\n        [aria-label]=\"closeAriaLabel\"\n      >\n        <sbb-icon svgIcon=\"cross-small\"></sbb-icon>\n      </button>\n    }\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    class: 'sbb-dialog-title',\n    '[id]': 'id',\n  },\n  imports: [SbbDialogClose, SbbIconModule],\n})\nexport class SbbDialogTitle extends _SbbDialogTitleBase {}\n\n/**\n * Scrollable content container of a dialog.\n */\n@Directive({\n  selector: `[sbb-dialog-content], sbb-dialog-content, [sbbDialogContent]`,\n  host: { class: 'sbb-dialog-content sbb-scrollbar' },\n  hostDirectives: [CdkScrollable],\n})\nexport class SbbDialogContent {}\n\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\n@Directive({\n  selector: `[sbb-dialog-actions], sbb-dialog-actions, [sbbDialogActions]`,\n  host: {\n    class: 'sbb-dialog-actions',\n    '[class.sbb-dialog-actions-align-start]': 'align === \"start\"',\n    '[class.sbb-dialog-actions-align-center]': 'align === \"center\"',\n    '[class.sbb-dialog-actions-align-end]': 'align === \"end\"',\n  },\n})\nexport class SbbDialogActions {\n  /**\n   * Horizontal alignment of action buttons.\n   */\n  @Input() align?: 'start' | 'center' | 'end' = 'end';\n}\n\n// TODO(crisbeto): this utility shouldn't be necessary anymore, because the dialog ref is provided\n// both to component and template dialogs through DI. We need to keep it around, because there are\n// some internal wrappers around `SbbDialog` that happened to work by accident, because we had this\n// fallback logic in place.\n/**\n * Finds the closest SbbDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element: ElementRef<HTMLElement>, openDialogs: SbbDialogRef<any>[]) {\n  let parent: HTMLElement | null = element.nativeElement.parentElement;\n\n  while (\n    parent &&\n    !parent.classList.contains('sbb-dialog-container') &&\n    !parent.classList.contains('sbb-lightbox-container')\n  ) {\n    parent = parent.parentElement;\n  }\n\n  return parent ? openDialogs.find((dialog) => dialog.id === parent!.id) : null;\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\nimport { SbbIconModule } from '@sbb-esta/angular/icon';\n\nimport { SbbDialog } from './dialog';\nimport { SbbDialogContainer } from './dialog-container';\nimport {\n  SbbDialogActions,\n  SbbDialogClose,\n  SbbDialogContent,\n  SbbDialogTitle,\n} from './dialog-content-directives';\n\n@NgModule({\n  imports: [\n    DialogModule,\n    OverlayModule,\n    PortalModule,\n    SbbCommonModule,\n    SbbIconModule,\n    SbbDialogContainer,\n    SbbDialogClose,\n    SbbDialogTitle,\n    SbbDialogActions,\n    SbbDialogContent,\n  ],\n  exports: [SbbDialogContainer, SbbDialogClose, SbbDialogTitle, SbbDialogContent, SbbDialogActions],\n  providers: [SbbDialog],\n})\nexport class SbbDialogModule {}\n"],"names":["sbbDialogAnimationsDefaultParams","params","enterAnimationDuration","exitAnimationDuration","sbbDialogAnimations","dialogContainer","trigger","state","style","opacity","transform","transition","group","animate","query","animateChild","optional","SbbDialogConfig","viewContainerRef","injector","id","role","panelClass","hasBackdrop","backdropClass","disableClose","width","height","minWidth","minHeight","maxWidth","maxHeight","position","data","ariaDescribedBy","ariaLabelledBy","ariaLabel","ariaModal","autoFocus","restoreFocus","delayFocusTrap","scrollStrategy","closeOnNavigation","SbbDialogContainer","CdkDialogContainer","_animationStateChanged","EventEmitter","_state","_onAnimationDone","toState","totalTime","_openAnimationDone","next","_onAnimationStart","_startExitAnimation","_changeDetectorRef","markForCheck","_captureInitialFocus","_config","_trapFocus","_getAnimationState","value","deps","target","i0","ɵɵFactoryTarget","Component","isStandalone","selector","host","attributes","listeners","properties","classAttribute","usesInheritance","ngImport","template","styles","dependencies","kind","type","CdkPortalOutlet","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","decorators","args","animations","class","tabindex","imports","HostListener","SbbDialogState","SbbDialogRef","ref","_containerInstance","componentInstance","componentRef","_afterOpened","Subject","_beforeClosed","_result","_closeFallbackTimeout","OPEN","_closeInteractionType","constructor","config","pipe","filter","event","take","subscribe","complete","clearTimeout","_finishDialogClose","overlayRef","detachments","merge","backdropClick","keydownEvents","keyCode","ESCAPE","hasModifierKey","preventDefault","_closeDialogVia","close","dialogResult","detachBackdrop","setTimeout","CLOSING","afterOpened","afterClosed","closed","beforeClosed","updatePosition","strategy","positionStrategy","left","right","centerHorizontally","top","bottom","centerVertically","updateSize","addPanelClass","classes","removePanelClass","getState","CLOSED","focusOrigin","interactionType","result","SBB_DIALOG_DATA","InjectionToken","SBB_DIALOG_DEFAULT_OPTIONS","SBB_DIALOG_SCROLL_STRATEGY","providedIn","factory","inject","Injector","createBlockScrollStrategy","_SbbDialogBase","_overlay","_defaultOptions","_parentDialog","_dialogRefConstructor","_dialogContainerType","_dialogDataToken","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_scrollStrategy","_idGenerator","_IdGenerator","_idPrefix","_dialog","_injector","openDialogs","_getAfterAllClosed","parent","afterAllClosed","defer","length","startWith","undefined","get","Dialog","open","componentOrTemplateRef","dialogRef","getId","cdkRef","createGlobalPositionStrategy","closeOnDestroy","closeOnOverlayDetachments","container","providers","provide","useValue","DialogConfig","templateContext","lightboxRef","cdkConfig","push","index","indexOf","splice","closeAll","_closeDialogs","getDialogById","find","dialog","ngOnDestroy","dialogs","i","Injectable","ɵprov","ɵɵngDeclareInjectable","minVersion","version","SbbDialog","overlay","Overlay","defaultOptions","parentDialog","skipSelf","SbbDialogClose","_elementRef","ElementRef","_dialogRef","$localize","_sbbDialogClose","_canCloseInterceptor","ngOnInit","getClosestDialog","ngOnChanges","changes","proxiedChange","currentValue","_onButtonClick","screenX","screenY","Directive","inputs","exportAs","usesOnChanges","Input","_SbbDialogTitleBase","ChangeDetectorRef","closeAriaLabel","_closeEnabled","Promise","resolve","then","_addAriaLabelledBy","instance","_removeAriaLabelledBy","SbbDialogTitle","ɵcmp","ɵɵngDeclareComponent","isInline","SbbIconModule","i1","SbbIcon","OnPush","SbbDialogContent","hostDirectives","directive","i2","CdkScrollable","SbbDialogActions","align","element","nativeElement","parentElement","classList","contains","SbbDialogModule","NgModule","ɵmod","ɵɵngDeclareNgModule","DialogModule","OverlayModule","PortalModule","SbbCommonModule","exports","ɵinj","ɵɵngDeclareInjector"],"mappings":";;;;;;;;;;;;;;;;;AAgBO,MAAMA,gCAAgC,GAAG;AAC9CC,EAAAA,MAAM,EAAE;AAAEC,IAAAA,sBAAsB,EAAE,OAAO;AAAEC,IAAAA,qBAAqB,EAAE;AAAQ;CAC3E;AAMM,MAAMC,mBAAmB,GAE5B;EAEFC,eAAe,EAAEC,OAAO,CAAC,iBAAiB,EAAE,CAI1CC,KAAK,CAAC,YAAY,EAAEC,KAAK,CAAC;AAAEC,IAAAA,OAAO,EAAE,CAAC;AAAEC,IAAAA,SAAS,EAAE;GAAc,CAAC,CAAC,EACnEH,KAAK,CAAC,OAAO,EAAEC,KAAK,CAAC;AAAEE,IAAAA,SAAS,EAAE;AAAQ,GAAA,CAAC,CAAC,EAC5CC,UAAU,CACR,YAAY,EACZC,KAAK,CAAC,CACJC,OAAO,CACL,uDAAuD,EACvDL,KAAK,CAAC;AAAEE,IAAAA,SAAS,EAAE,MA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