{"version":3,"file":"bottom-sheet.mjs","sources":["../../../../../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.html","../../../../../../src/material/bottom-sheet/bottom-sheet-module.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-config.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../../../../../src/material/bottom-sheet/bottom-sheet.ts","../../../../../../src/material/bottom-sheet/public-api.ts","../../../../../../src/material/bottom-sheet/index.ts","../../../../../../src/material/bottom-sheet/bottom-sheet_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n  animate,\n  state,\n  style,\n  transition,\n  trigger,\n  AnimationTriggerMetadata,\n  group,\n  query,\n  animateChild,\n} from '@angular/animations';\nimport {AnimationCurves, AnimationDurations} from '@angular/material/core';\n\n/** Animations used by the Material bottom sheet. */\nexport const matBottomSheetAnimations: {\n  readonly bottomSheetState: AnimationTriggerMetadata;\n} = {\n  /** Animation that shows and hides a bottom sheet. */\n  bottomSheetState: trigger('state', [\n    state('void, hidden', style({transform: 'translateY(100%)'})),\n    state('visible', style({transform: 'translateY(0%)'})),\n    transition(\n      'visible => void, visible => hidden',\n      group([\n        animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`),\n        query('@*', animateChild(), {optional: true}),\n      ]),\n    ),\n    transition(\n      'void => visible',\n      group([\n        animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`),\n        query('@*', animateChild(), {optional: true}),\n      ]),\n    ),\n  ]),\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationEvent} from '@angular/animations';\nimport {CdkDialogContainer, DialogConfig} from '@angular/cdk/dialog';\nimport {FocusMonitor, FocusTrapFactory, InteractivityChecker} from '@angular/cdk/a11y';\nimport {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Inject,\n  NgZone,\n  OnDestroy,\n  Optional,\n  ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {matBottomSheetAnimations} from './bottom-sheet-animations';\n\n/**\n * Internal component that wraps user-provided bottom sheet content.\n * @docs-private\n */\n@Component({\n  selector: 'mat-bottom-sheet-container',\n  templateUrl: 'bottom-sheet-container.html',\n  styleUrls: ['bottom-sheet-container.css'],\n  // In Ivy embedded views will be change detected from their declaration place, rather than where\n  // they were stamped out. This means that we can't have the bottom sheet container be OnPush,\n  // because it might cause the sheets that were opened from a template not to be out of date.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  animations: [matBottomSheetAnimations.bottomSheetState],\n  host: {\n    'class': 'mat-bottom-sheet-container',\n    'tabindex': '-1',\n    '[attr.role]': '_config.role',\n    '[attr.aria-modal]': '_config.ariaModal',\n    '[attr.aria-label]': '_config.ariaLabel',\n    '[@state]': '_animationState',\n    '(@state.start)': '_onAnimationStart($event)',\n    '(@state.done)': '_onAnimationDone($event)',\n  },\n})\nexport class MatBottomSheetContainer extends CdkDialogContainer implements OnDestroy {\n  private _breakpointSubscription: Subscription;\n\n  /** The state of the bottom sheet animations. */\n  _animationState: 'void' | 'visible' | 'hidden' = 'void';\n\n  /** Emits whenever the state of the animation changes. */\n  _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n  /** Whether the component has been destroyed. */\n  private _destroyed: boolean;\n\n  constructor(\n    elementRef: ElementRef,\n    focusTrapFactory: FocusTrapFactory,\n    @Optional() @Inject(DOCUMENT) document: any,\n    config: DialogConfig,\n    checker: InteractivityChecker,\n    ngZone: NgZone,\n    overlayRef: OverlayRef,\n    breakpointObserver: BreakpointObserver,\n    private _changeDetectorRef: ChangeDetectorRef,\n    focusMonitor?: FocusMonitor,\n  ) {\n    super(\n      elementRef,\n      focusTrapFactory,\n      document,\n      config,\n      checker,\n      ngZone,\n      overlayRef,\n      focusMonitor,\n    );\n\n    this._breakpointSubscription = breakpointObserver\n      .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n      .subscribe(() => {\n        this._toggleClass(\n          'mat-bottom-sheet-container-medium',\n          breakpointObserver.isMatched(Breakpoints.Medium),\n        );\n        this._toggleClass(\n          'mat-bottom-sheet-container-large',\n          breakpointObserver.isMatched(Breakpoints.Large),\n        );\n        this._toggleClass(\n          'mat-bottom-sheet-container-xlarge',\n          breakpointObserver.isMatched(Breakpoints.XLarge),\n        );\n      });\n  }\n\n  /** Begin animation of bottom sheet entrance into view. */\n  enter(): void {\n    if (!this._destroyed) {\n      this._animationState = 'visible';\n      this._changeDetectorRef.detectChanges();\n    }\n  }\n\n  /** Begin animation of the bottom sheet exiting from view. */\n  exit(): void {\n    if (!this._destroyed) {\n      this._animationState = 'hidden';\n      this._changeDetectorRef.markForCheck();\n    }\n  }\n\n  override ngOnDestroy() {\n    super.ngOnDestroy();\n    this._breakpointSubscription.unsubscribe();\n    this._destroyed = true;\n  }\n\n  _onAnimationDone(event: AnimationEvent) {\n    if (event.toState === 'visible') {\n      this._trapFocus();\n    }\n\n    this._animationStateChanged.emit(event);\n  }\n\n  _onAnimationStart(event: AnimationEvent) {\n    this._animationStateChanged.emit(event);\n  }\n\n  protected override _captureInitialFocus(): void {}\n\n  private _toggleClass(cssClass: string, add: boolean) {\n    this._elementRef.nativeElement.classList.toggle(cssClass, add);\n  }\n}\n","<ng-template cdkPortalOutlet></ng-template>\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DialogModule} from '@angular/cdk/dialog';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n@NgModule({\n  imports: [DialogModule, MatCommonModule, PortalModule],\n  exports: [MatBottomSheetContainer, MatCommonModule],\n  declarations: [MatBottomSheetContainer],\n})\nexport class MatBottomSheetModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\nimport {InjectionToken, ViewContainerRef} from '@angular/core';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Injection token that can be used to access the data that was passed in to a bottom sheet. */\nexport const MAT_BOTTOM_SHEET_DATA = new InjectionToken<any>('MatBottomSheetData');\n\n/**\n * Configuration used when opening a bottom sheet.\n */\nexport class MatBottomSheetConfig<D = any> {\n  /** The view container to place the overlay for the bottom sheet into. */\n  viewContainerRef?: ViewContainerRef;\n\n  /** Extra CSS classes to be added to the bottom sheet container. */\n  panelClass?: string | string[];\n\n  /** Text layout direction for the bottom sheet. */\n  direction?: Direction;\n\n  /** Data being injected into the child component. */\n  data?: D | null = null;\n\n  /** Whether the bottom sheet has a backdrop. */\n  hasBackdrop?: boolean = true;\n\n  /** Custom class for the backdrop. */\n  backdropClass?: string;\n\n  /** Whether the user can use escape or clicking outside to close the bottom sheet. */\n  disableClose?: boolean = false;\n\n  /** Aria label to assign to the bottom sheet element. */\n  ariaLabel?: string | null = null;\n\n  /** Whether this is a modal bottom sheet. Used to set the `aria-modal` attribute. */\n  ariaModal?: boolean = true;\n\n  /**\n   * Whether the bottom sheet 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  // Note that this is set to 'dialog' by default, because while the a11y recommendations\n  // are to focus the first focusable element, doing so prevents screen readers from reading out the\n  // rest of the bottom sheet content.\n  /**\n   * Where the bottom sheet should focus on open.\n   * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n   * AutoFocusTarget instead.\n   */\n  autoFocus?: AutoFocusTarget | string | boolean = 'dialog';\n\n  /**\n   * Whether the bottom sheet should restore focus to the\n   * previously-focused element, after it's closed.\n   */\n  restoreFocus?: boolean = true;\n\n  /** Scroll strategy to be used for the bottom sheet. */\n  scrollStrategy?: ScrollStrategy;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DialogRef} from '@angular/cdk/dialog';\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {merge, Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n/**\n * Reference to a bottom sheet dispatched from the bottom sheet service.\n */\nexport class MatBottomSheetRef<T = any, R = any> {\n  /** Instance of the component making up the content of the bottom sheet. */\n  get instance(): T {\n    return this._ref.componentInstance!;\n  }\n\n  /**\n   * Instance of the component into which the bottom sheet content is projected.\n   * @docs-private\n   */\n  containerInstance: MatBottomSheetContainer;\n\n  /** Whether the user is allowed to close the bottom sheet. */\n  disableClose: boolean | undefined;\n\n  /** Subject for notifying the user that the bottom sheet has opened and appeared. */\n  private readonly _afterOpened = new Subject<void>();\n\n  /** Result to be passed down to the `afterDismissed` stream. */\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: number;\n\n  constructor(\n    private _ref: DialogRef<R, T>,\n    config: MatBottomSheetConfig,\n    containerInstance: MatBottomSheetContainer,\n  ) {\n    this.containerInstance = containerInstance;\n    this.disableClose = config.disableClose;\n\n    // Emit when opening animation completes\n    containerInstance._animationStateChanged\n      .pipe(\n        filter(event => event.phaseName === 'done' && event.toState === 'visible'),\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.phaseName === 'done' && event.toState === 'hidden'),\n        take(1),\n      )\n      .subscribe(() => {\n        clearTimeout(this._closeFallbackTimeout);\n        this._ref.close(this._result);\n      });\n\n    _ref.overlayRef.detachments().subscribe(() => {\n      this._ref.close(this._result);\n    });\n\n    merge(\n      this.backdropClick(),\n      this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE)),\n    ).subscribe(event => {\n      if (\n        !this.disableClose &&\n        (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))\n      ) {\n        event.preventDefault();\n        this.dismiss();\n      }\n    });\n  }\n\n  /**\n   * Dismisses the bottom sheet.\n   * @param result Data to be passed back to the bottom sheet opener.\n   */\n  dismiss(result?: R): void {\n    if (!this.containerInstance) {\n      return;\n    }\n\n    // Transition the backdrop in parallel to the bottom sheet.\n    this.containerInstance._animationStateChanged\n      .pipe(\n        filter(event => event.phaseName === 'start'),\n        take(1),\n      )\n      .subscribe(event => {\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 fired.\n        this._closeFallbackTimeout = setTimeout(() => {\n          this._ref.close(this._result);\n        }, event.totalTime + 100);\n\n        this._ref.overlayRef.detachBackdrop();\n      });\n\n    this._result = result;\n    this.containerInstance.exit();\n    this.containerInstance = null!;\n  }\n\n  /** Gets an observable that is notified when the bottom sheet is finished closing. */\n  afterDismissed(): Observable<R | undefined> {\n    return this._ref.closed;\n  }\n\n  /** Gets an observable that is notified when the bottom sheet has opened and appeared. */\n  afterOpened(): Observable<void> {\n    return this._afterOpened;\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Dialog} from '@angular/cdk/dialog';\nimport {Overlay} from '@angular/cdk/overlay';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {\n  Injectable,\n  Optional,\n  SkipSelf,\n  TemplateRef,\n  InjectionToken,\n  Inject,\n  OnDestroy,\n  Injector,\n} from '@angular/core';\nimport {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheetModule} from './bottom-sheet-module';\nimport {MatBottomSheetRef} from './bottom-sheet-ref';\n\n/** Injection token that can be used to specify default bottom sheet options. */\nexport const MAT_BOTTOM_SHEET_DEFAULT_OPTIONS = new InjectionToken<MatBottomSheetConfig>(\n  'mat-bottom-sheet-default-options',\n);\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({providedIn: MatBottomSheetModule})\nexport class MatBottomSheet implements OnDestroy {\n  private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;\n  private _dialog: Dialog;\n\n  /** Reference to the currently opened bottom sheet. */\n  get _openedBottomSheetRef(): MatBottomSheetRef<any> | null {\n    const parent = this._parentBottomSheet;\n    return parent ? parent._openedBottomSheetRef : this._bottomSheetRefAtThisLevel;\n  }\n\n  set _openedBottomSheetRef(value: MatBottomSheetRef<any> | null) {\n    if (this._parentBottomSheet) {\n      this._parentBottomSheet._openedBottomSheetRef = value;\n    } else {\n      this._bottomSheetRefAtThisLevel = value;\n    }\n  }\n\n  constructor(\n    private _overlay: Overlay,\n    injector: Injector,\n    @Optional() @SkipSelf() private _parentBottomSheet: MatBottomSheet,\n    @Optional()\n    @Inject(MAT_BOTTOM_SHEET_DEFAULT_OPTIONS)\n    private _defaultOptions?: MatBottomSheetConfig,\n  ) {\n    this._dialog = injector.get(Dialog);\n  }\n\n  /**\n   * Opens a bottom sheet containing the given component.\n   * @param component Type of the component to load into the bottom sheet.\n   * @param config Extra configuration options.\n   * @returns Reference to the newly-opened bottom sheet.\n   */\n  open<T, D = any, R = any>(\n    component: ComponentType<T>,\n    config?: MatBottomSheetConfig<D>,\n  ): MatBottomSheetRef<T, R>;\n\n  /**\n   * Opens a bottom sheet containing the given template.\n   * @param template TemplateRef to instantiate as the bottom sheet content.\n   * @param config Extra configuration options.\n   * @returns Reference to the newly-opened bottom sheet.\n   */\n  open<T, D = any, R = any>(\n    template: TemplateRef<T>,\n    config?: MatBottomSheetConfig<D>,\n  ): MatBottomSheetRef<T, R>;\n\n  open<T, D = any, R = any>(\n    componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n    config?: MatBottomSheetConfig<D>,\n  ): MatBottomSheetRef<T, R> {\n    const _config = {...(this._defaultOptions || new MatBottomSheetConfig()), ...config};\n    let ref: MatBottomSheetRef<T, R>;\n\n    this._dialog.open<R, D, T>(componentOrTemplateRef, {\n      ..._config,\n      // Disable closing since we need to sync it up to the animation ourselves.\n      disableClose: true,\n      // Disable closing on detachments so that we can sync up the animation.\n      closeOnOverlayDetachments: false,\n      maxWidth: '100%',\n      container: MatBottomSheetContainer,\n      scrollStrategy: _config.scrollStrategy || this._overlay.scrollStrategies.block(),\n      positionStrategy: this._overlay.position().global().centerHorizontally().bottom('0'),\n      templateContext: () => ({bottomSheetRef: ref}),\n      providers: (cdkRef, _cdkConfig, container) => {\n        ref = new MatBottomSheetRef(cdkRef, _config, container as MatBottomSheetContainer);\n        return [\n          {provide: MatBottomSheetRef, useValue: ref},\n          {provide: MAT_BOTTOM_SHEET_DATA, useValue: _config.data},\n        ];\n      },\n    });\n\n    // When the bottom sheet is dismissed, clear the reference to it.\n    ref!.afterDismissed().subscribe(() => {\n      // Clear the bottom sheet ref if it hasn't already been replaced by a newer one.\n      if (this._openedBottomSheetRef === ref) {\n        this._openedBottomSheetRef = null;\n      }\n    });\n\n    if (this._openedBottomSheetRef) {\n      // If a bottom sheet is already in view, dismiss it and enter the\n      // new bottom sheet after exit animation is complete.\n      this._openedBottomSheetRef.afterDismissed().subscribe(() => ref.containerInstance?.enter());\n      this._openedBottomSheetRef.dismiss();\n    } else {\n      // If no bottom sheet is in view, enter the new bottom sheet.\n      ref!.containerInstance.enter();\n    }\n\n    this._openedBottomSheetRef = ref!;\n    return ref!;\n  }\n\n  /**\n   * Dismisses the currently-visible bottom sheet.\n   * @param result Data to pass to the bottom sheet instance.\n   */\n  dismiss<R = any>(result?: R): void {\n    if (this._openedBottomSheetRef) {\n      this._openedBottomSheetRef.dismiss(result);\n    }\n  }\n\n  ngOnDestroy() {\n    if (this._bottomSheetRefAtThisLevel) {\n      this._bottomSheetRefAtThisLevel.dismiss();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './bottom-sheet-module';\nexport * from './bottom-sheet';\nexport * from './bottom-sheet-config';\nexport * from './bottom-sheet-container';\nexport * from './bottom-sheet-animations';\nexport * from './bottom-sheet-ref';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index.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