{"version":3,"sources":["node_modules/@angular/cdk/fesm2022/dialog.mjs","node_modules/@angular/material/fesm2022/dialog.mjs","node_modules/@angular/material/fesm2022/toolbar.mjs","node_modules/@angular/cdk/fesm2022/drag-drop.mjs","node_modules/@covalent/core/fesm2020/covalent-core-dialogs.mjs"],"sourcesContent":["import * as i1 from '@angular/cdk/a11y';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayConfig, OverlayRef, OverlayModule } from '@angular/cdk/overlay';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport * as i3 from '@angular/cdk/portal';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, InjectionToken, Injector, TemplateRef, Injectable, SkipSelf, NgModule } from '@angular/core';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { Subject, defer, of } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { startWith } from 'rxjs/operators';\n\n/** Configuration for opening a modal dialog. */\nfunction CdkDialogContainer_ng_template_0_Template(rf, ctx) {}\nclass DialogConfig {\n constructor() {\n /** The ARIA role of the dialog element. */\n this.role = 'dialog';\n /** Optional CSS class or classes applied to the overlay panel. */\n this.panelClass = '';\n /** Whether the dialog has a backdrop. */\n this.hasBackdrop = true;\n /** Optional CSS class or classes applied to the overlay backdrop. */\n this.backdropClass = '';\n /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n this.disableClose = false;\n /** Width of the dialog. */\n this.width = '';\n /** Height of the dialog. */\n this.height = '';\n /** Data being injected into the child component. */\n this.data = null;\n /** ID of the element that describes the dialog. */\n this.ariaDescribedBy = null;\n /** ID of the element that labels the dialog. */\n this.ariaLabelledBy = null;\n /** Dialog label applied via `aria-label` */\n this.ariaLabel = null;\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n this.ariaModal = true;\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n this.autoFocus = 'first-tabbable';\n /**\n * Whether the dialog should restore focus to the previously-focused element upon closing.\n * Has the following behavior based on the type that is passed in:\n * - `boolean` - when true, will return focus to the element that was focused before the dialog\n * was opened, otherwise won't restore focus at all.\n * - `string` - focus will be restored to the first element that matches the CSS selector.\n * - `HTMLElement` - focus will be restored to the specific element.\n */\n this.restoreFocus = true;\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history. This does not apply to navigation via anchor element unless using URL-hash based\n * routing (`HashLocationStrategy` in the Angular router).\n */\n this.closeOnNavigation = true;\n /**\n * Whether the dialog should close when the dialog service is destroyed. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead.\n */\n this.closeOnDestroy = true;\n /**\n * Whether the dialog should close when the underlying overlay is detached. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead. E.g. an\n * external detachment can happen as a result of a scroll strategy triggering it or when the\n * browser location changes.\n */\n this.closeOnOverlayDetachments = true;\n }\n}\nfunction throwDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\nlet CdkDialogContainer = /*#__PURE__*/(() => {\n class CdkDialogContainer extends BasePortalOutlet {\n constructor(_elementRef, _focusTrapFactory, _document, _config, _interactivityChecker, _ngZone, _overlayRef, _focusMonitor) {\n super();\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n this._config = _config;\n this._interactivityChecker = _interactivityChecker;\n this._ngZone = _ngZone;\n this._overlayRef = _overlayRef;\n this._focusMonitor = _focusMonitor;\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n this._elementFocusedBeforeDialogWasOpened = null;\n /**\n * Type of interaction that led to the dialog being closed. This is used to determine\n * whether the focus style will be applied when returning focus to its original location\n * after the dialog is closed.\n */\n this._closeInteractionType = null;\n /**\n * Queue of the IDs of the dialog's label element, based on their definition order. The first\n * ID will be used as the `aria-labelledby` value. We use a queue here to handle the case\n * where there are two or more titles in the DOM at a time and the first one is destroyed while\n * the rest are present.\n */\n this._ariaLabelledByQueue = [];\n /**\n * Attaches a DOM portal to the dialog container.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = portal => {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachDomPortal(portal);\n this._contentAttached();\n return result;\n };\n this._document = _document;\n if (this._config.ariaLabelledBy) {\n this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);\n }\n }\n _contentAttached() {\n this._initializeFocusTrap();\n this._handleBackdropClicks();\n this._captureInitialFocus();\n }\n /**\n * Can be used by child classes to customize the initial focus\n * capturing behavior (e.g. if it's tied to an animation).\n */\n _captureInitialFocus() {\n this._trapFocus();\n }\n ngOnDestroy() {\n this._restoreFocus();\n }\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal(portal) {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._contentAttached();\n return result;\n }\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal(portal) {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._contentAttached();\n return result;\n }\n // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n /** Captures focus if it isn't already inside the dialog. */\n _recaptureFocus() {\n if (!this._containsFocus()) {\n this._trapFocus();\n }\n }\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n _forceFocus(element, options) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n element.removeEventListener('blur', callback);\n element.removeEventListener('mousedown', callback);\n element.removeAttribute('tabindex');\n };\n element.addEventListener('blur', callback);\n element.addEventListener('mousedown', callback);\n });\n }\n element.focus(options);\n }\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n _focusByCssSelector(selector, options) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(selector);\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n * cannot be moved then focus will go to the dialog container.\n */\n _trapFocus() {\n const element = this._elementRef.nativeElement;\n // If were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty when setting focus when autoFocus isn't set to\n // dialog. If the element inside the dialog can't be focused, then the container is focused\n // so the user can't tab into other elements behind it.\n switch (this._config.autoFocus) {\n case false:\n case 'dialog':\n // Ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (!this._containsFocus()) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady().then(focusedSuccessfully => {\n // If we weren't able to find a focusable element in the dialog, then focus the dialog\n // container instead.\n if (!focusedSuccessfully) {\n this._focusDialogContainer();\n }\n });\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this._config.autoFocus);\n break;\n }\n }\n /** Restores focus to the element that was focused before the dialog opened. */\n _restoreFocus() {\n const focusConfig = this._config.restoreFocus;\n let focusTargetElement = null;\n if (typeof focusConfig === 'string') {\n focusTargetElement = this._document.querySelector(focusConfig);\n } else if (typeof focusConfig === 'boolean') {\n focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n } else if (focusConfig) {\n focusTargetElement = focusConfig;\n }\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this._config.restoreFocus && focusTargetElement && typeof focusTargetElement.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n // Make sure that focus is still inside the dialog or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (!activeElement || activeElement === this._document.body || activeElement === element || element.contains(activeElement)) {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n this._closeInteractionType = null;\n } else {\n focusTargetElement.focus();\n }\n }\n }\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n /** Focuses the dialog container. */\n _focusDialogContainer() {\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n this._elementRef.nativeElement.focus();\n }\n }\n /** Returns whether focus is inside the dialog. */\n _containsFocus() {\n const element = this._elementRef.nativeElement;\n const activeElement = _getFocusedElementPierceShadowDom();\n return element === activeElement || element.contains(activeElement);\n }\n /** Sets up the focus trap. */\n _initializeFocusTrap() {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n // Save the previously focused element. This element will be re-focused\n // when the dialog closes.\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n }\n }\n /** Sets up the listener that handles clicks on the dialog backdrop. */\n _handleBackdropClicks() {\n // Clicking on the backdrop will move focus out of dialog.\n // Recapture it if closing via the backdrop is disabled.\n this._overlayRef.backdropClick().subscribe(() => {\n if (this._config.disableClose) {\n this._recaptureFocus();\n }\n });\n }\n static {\n this.ɵfac = function CdkDialogContainer_Factory(t) {\n return new (t || CdkDialogContainer)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusTrapFactory), i0.ɵɵdirectiveInject(DOCUMENT, 8), i0.ɵɵdirectiveInject(DialogConfig), i0.ɵɵdirectiveInject(i1.InteractivityChecker), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.OverlayRef), i0.ɵɵdirectiveInject(i1.FocusMonitor));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: CdkDialogContainer,\n selectors: [[\"cdk-dialog-container\"]],\n viewQuery: function CdkDialogContainer_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(CdkPortalOutlet, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._portalOutlet = _t.first);\n }\n },\n hostAttrs: [\"tabindex\", \"-1\", 1, \"cdk-dialog-container\"],\n hostVars: 6,\n hostBindings: function CdkDialogContainer_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx._config.id || null)(\"role\", ctx._config.role)(\"aria-modal\", ctx._config.ariaModal)(\"aria-labelledby\", ctx._config.ariaLabel ? null : ctx._ariaLabelledByQueue[0])(\"aria-label\", ctx._config.ariaLabel)(\"aria-describedby\", ctx._config.ariaDescribedBy || null);\n }\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 1,\n vars: 0,\n consts: [[\"cdkPortalOutlet\", \"\"]],\n template: function CdkDialogContainer_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, CdkDialogContainer_ng_template_0_Template, 0, 0, \"ng-template\", 0);\n }\n },\n dependencies: [i3.CdkPortalOutlet],\n styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"],\n encapsulation: 2\n });\n }\n }\n return CdkDialogContainer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nclass DialogRef {\n constructor(overlayRef, config) {\n this.overlayRef = overlayRef;\n this.config = config;\n /** Emits when the dialog has been closed. */\n this.closed = new Subject();\n this.disableClose = config.disableClose;\n this.backdropClick = overlayRef.backdropClick();\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id; // By the time the dialog is created we are guaranteed to have an ID.\n this.keydownEvents.subscribe(event => {\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined, {\n focusOrigin: 'keyboard'\n });\n }\n });\n this.backdropClick.subscribe(() => {\n if (!this.disableClose) {\n this.close(undefined, {\n focusOrigin: 'mouse'\n });\n }\n });\n this._detachSubscription = overlayRef.detachments().subscribe(() => {\n // Check specifically for `false`, because we want `undefined` to be treated like `true`.\n if (config.closeOnOverlayDetachments !== false) {\n this.close();\n }\n });\n }\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(result, options) {\n if (this.containerInstance) {\n const closedSubject = this.closed;\n this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n // Drop the detach subscription first since it can be triggered by the\n // `dispose` call and override the result of this closing sequence.\n this._detachSubscription.unsubscribe();\n this.overlayRef.dispose();\n closedSubject.next(result);\n closedSubject.complete();\n this.componentInstance = this.containerInstance = null;\n }\n }\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition() {\n this.overlayRef.updatePosition();\n return this;\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 = '', height = '') {\n this.overlayRef.updateSize({\n width,\n height\n });\n return this;\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n this.overlayRef.addPanelClass(classes);\n return this;\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n this.overlayRef.removePanelClass(classes);\n return this;\n }\n}\n\n/** Injection token for the Dialog's ScrollStrategy. */\nconst DIALOG_SCROLL_STRATEGY = /*#__PURE__*/new InjectionToken('DialogScrollStrategy');\n/** Injection token for the Dialog's Data. */\nconst DIALOG_DATA = /*#__PURE__*/new InjectionToken('DialogData');\n/** Injection token that can be used to provide default options for the dialog module. */\nconst DEFAULT_DIALOG_CONFIG = /*#__PURE__*/new InjectionToken('DefaultDialogConfig');\n/** @docs-private */\nfunction DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nconst DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY\n};\n\n/** Unique id for the created dialog. */\nlet uniqueId = 0;\nlet Dialog = /*#__PURE__*/(() => {\n class Dialog {\n /** Keeps track of the currently-open dialogs. */\n get openDialogs() {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n /** Stream that emits when a dialog has been opened. */\n get afterOpened() {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n constructor(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy) {\n this._overlay = _overlay;\n this._injector = _injector;\n this._defaultOptions = _defaultOptions;\n this._parentDialog = _parentDialog;\n this._overlayContainer = _overlayContainer;\n this._openDialogsAtThisLevel = [];\n this._afterAllClosedAtThisLevel = new Subject();\n this._afterOpenedAtThisLevel = new Subject();\n this._ariaHiddenElements = new Map();\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 this.afterAllClosed = defer(() => this.openDialogs.length ? this._getAfterAllClosed() : this._getAfterAllClosed().pipe(startWith(undefined)));\n this._scrollStrategy = scrollStrategy;\n }\n open(componentOrTemplateRef, config) {\n const defaults = this._defaultOptions || new DialogConfig();\n config = {\n ...defaults,\n ...config\n };\n config.id = config.id || `cdk-dialog-${uniqueId++}`;\n if (config.id && this.getDialogById(config.id) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n const overlayConfig = this._getOverlayConfig(config);\n const overlayRef = this._overlay.create(overlayConfig);\n const dialogRef = new DialogRef(overlayRef, config);\n const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n dialogRef.containerInstance = dialogContainer;\n this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this._hideNonDialogContentFromAssistiveTechnology();\n }\n this.openDialogs.push(dialogRef);\n dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n return dialogRef;\n }\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n reverseForEach(this.openDialogs, dialog => dialog.close());\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) {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n ngOnDestroy() {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this._openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n if (dialog.config.closeOnDestroy === false) {\n this._removeOpenDialog(dialog, false);\n }\n });\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n this._openDialogsAtThisLevel = [];\n }\n /**\n * Creates an overlay config from a dialog config.\n * @param config The dialog configuration.\n * @returns The overlay configuration.\n */\n _getOverlayConfig(config) {\n const state = new OverlayConfig({\n positionStrategy: config.positionStrategy || this._overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n panelClass: config.panelClass,\n hasBackdrop: config.hasBackdrop,\n direction: config.direction,\n minWidth: config.minWidth,\n minHeight: config.minHeight,\n maxWidth: config.maxWidth,\n maxHeight: config.maxHeight,\n width: config.width,\n height: config.height,\n disposeOnNavigation: config.closeOnNavigation\n });\n if (config.backdropClass) {\n state.backdropClass = config.backdropClass;\n }\n return state;\n }\n /**\n * Attaches a dialog container to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n _attachContainer(overlay, dialogRef, config) {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers = [{\n provide: DialogConfig,\n useValue: config\n }, {\n provide: DialogRef,\n useValue: dialogRef\n }, {\n provide: OverlayRef,\n useValue: overlay\n }];\n let containerType;\n if (config.container) {\n if (typeof config.container === 'function') {\n containerType = config.container;\n } else {\n containerType = config.container.type;\n providers.push(...config.container.providers(config));\n }\n } else {\n containerType = CdkDialogContainer;\n }\n const containerPortal = new ComponentPortal(containerType, config.viewContainerRef, Injector.create({\n parent: userInjector || this._injector,\n providers\n }), config.componentFactoryResolver);\n const containerRef = overlay.attach(containerPortal);\n return containerRef.instance;\n }\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param config Configuration used to open the dialog.\n */\n _attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config) {\n if (componentOrTemplateRef instanceof TemplateRef) {\n const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);\n let context = {\n $implicit: config.data,\n dialogRef\n };\n if (config.templateContext) {\n context = {\n ...context,\n ...(typeof config.templateContext === 'function' ? config.templateContext() : config.templateContext)\n };\n }\n dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, context, injector));\n } else {\n const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector, config.componentFactoryResolver));\n dialogRef.componentRef = contentRef;\n dialogRef.componentInstance = contentRef.instance;\n }\n }\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom\n * dialog injector, if the user didn't provide a custom one.\n * @returns The custom injector that can be used inside the dialog.\n */\n _createInjector(config, dialogRef, dialogContainer, fallbackInjector) {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers = [{\n provide: DIALOG_DATA,\n useValue: config.data\n }, {\n provide: DialogRef,\n useValue: dialogRef\n }];\n if (config.providers) {\n if (typeof config.providers === 'function') {\n providers.push(...config.providers(dialogRef, config, dialogContainer));\n } else {\n providers.push(...config.providers);\n }\n }\n if (config.direction && (!userInjector || !userInjector.get(Directionality, null, {\n optional: true\n }))) {\n providers.push({\n provide: Directionality,\n useValue: {\n value: config.direction,\n change: of()\n }\n });\n }\n return Injector.create({\n parent: userInjector || fallbackInjector,\n providers\n });\n }\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n * @param emitEvent Whether to emit an event if this is the last dialog.\n */\n _removeOpenDialog(dialogRef, emitEvent) {\n const index = this.openDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n this._ariaHiddenElements.clear();\n if (emitEvent) {\n this._getAfterAllClosed().next();\n }\n }\n }\n }\n /** Hides all of the content that isn't an overlay from assistive technology. */\n _hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n if (sibling !== overlayContainer && sibling.nodeName !== 'SCRIPT' && sibling.nodeName !== 'STYLE' && !sibling.hasAttribute('aria-live')) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n _getAfterAllClosed() {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n static {\n this.ɵfac = function Dialog_Factory(t) {\n return new (t || Dialog)(i0.ɵɵinject(i1$1.Overlay), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(DEFAULT_DIALOG_CONFIG, 8), i0.ɵɵinject(Dialog, 12), i0.ɵɵinject(i1$1.OverlayContainer), i0.ɵɵinject(DIALOG_SCROLL_STRATEGY));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Dialog,\n factory: Dialog.ɵfac\n });\n }\n }\n return Dialog;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach(items, callback) {\n let i = items.length;\n while (i--) {\n callback(items[i]);\n }\n}\nlet DialogModule = /*#__PURE__*/(() => {\n class DialogModule {\n static {\n this.ɵfac = function DialogModule_Factory(t) {\n return new (t || DialogModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DialogModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [Dialog, DIALOG_SCROLL_STRATEGY_PROVIDER],\n imports: [OverlayModule, PortalModule, A11yModule,\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule]\n });\n }\n }\n return DialogModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError };\n","import * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { EventEmitter, Component, Optional, Inject, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injectable, ANIMATION_MODULE_TYPE as ANIMATION_MODULE_TYPE$1, SkipSelf, Directive, Input, NgModule } from '@angular/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular/cdk/dialog';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i4 from '@angular/cdk/portal';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { Subject, merge, defer } from 'rxjs';\nimport { filter, take, startWith } from 'rxjs/operators';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { MatCommonModule } from '@angular/material/core';\nimport { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';\n\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nfunction MatDialogContainer_ng_template_2_Template(rf, ctx) {}\nclass MatDialogConfig {\n constructor() {\n /** The ARIA role of the dialog element. */\n this.role = 'dialog';\n /** Custom class for the overlay pane. */\n this.panelClass = '';\n /** Whether the dialog has a backdrop. */\n this.hasBackdrop = true;\n /** Custom class for the backdrop. */\n this.backdropClass = '';\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n this.disableClose = false;\n /** Width of the dialog. */\n this.width = '';\n /** Height of the dialog. */\n this.height = '';\n /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n this.maxWidth = '80vw';\n /** Data being injected into the child component. */\n this.data = null;\n /** ID of the element that describes the dialog. */\n this.ariaDescribedBy = null;\n /** ID of the element that labels the dialog. */\n this.ariaLabelledBy = null;\n /** Aria label to assign to the dialog element. */\n this.ariaLabel = null;\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n this.ariaModal = true;\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n this.autoFocus = 'first-tabbable';\n /**\n * Whether the dialog should restore focus to the\n * previously-focused element, after it's closed.\n */\n this.restoreFocus = true;\n /** Whether to wait for the opening animation to finish before trapping focus. */\n this.delayFocusTrap = true;\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 this.closeOnNavigation = true;\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\n }\n}\n\n/** Class added when the dialog is open. */\nconst OPEN_CLASS = 'mdc-dialog--open';\n/** Class added while the dialog is opening. */\nconst OPENING_CLASS = 'mdc-dialog--opening';\n/** Class added while the dialog is closing. */\nconst CLOSING_CLASS = 'mdc-dialog--closing';\n/** Duration of the opening animation in milliseconds. */\nconst OPEN_ANIMATION_DURATION = 150;\n/** Duration of the closing animation in milliseconds. */\nconst CLOSE_ANIMATION_DURATION = 75;\n/**\n * Base class for the `MatDialogContainer`. The base class does not implement\n * animations as these are left to implementers of the dialog container.\n */\n// tslint:disable-next-line:validate-decorators\nlet _MatDialogContainerBase = /*#__PURE__*/(() => {\n class _MatDialogContainerBase extends CdkDialogContainer {\n constructor(elementRef, focusTrapFactory, _document, dialogConfig, interactivityChecker, ngZone, overlayRef, focusMonitor) {\n super(elementRef, focusTrapFactory, _document, dialogConfig, interactivityChecker, ngZone, overlayRef, focusMonitor);\n /** Emits when an animation state changes. */\n this._animationStateChanged = new EventEmitter();\n }\n _captureInitialFocus() {\n if (!this._config.delayFocusTrap) {\n this._trapFocus();\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 _openAnimationDone(totalTime) {\n if (this._config.delayFocusTrap) {\n this._trapFocus();\n }\n this._animationStateChanged.next({\n state: 'opened',\n totalTime\n });\n }\n static {\n this.ɵfac = function _MatDialogContainerBase_Factory(t) {\n return new (t || _MatDialogContainerBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusTrapFactory), i0.ɵɵdirectiveInject(DOCUMENT, 8), i0.ɵɵdirectiveInject(MatDialogConfig), i0.ɵɵdirectiveInject(i1.InteractivityChecker), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.OverlayRef), i0.ɵɵdirectiveInject(i1.FocusMonitor));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: _MatDialogContainerBase,\n selectors: [[\"ng-component\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 0,\n vars: 0,\n template: function _MatDialogContainerBase_Template(rf, ctx) {},\n encapsulation: 2\n });\n }\n }\n return _MatDialogContainerBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TRANSITION_DURATION_PROPERTY = '--mat-dialog-transition-duration';\n// TODO(mmalerba): Remove this function after animation durations are required\n// to be numbers.\n/**\n * Converts a CSS time string to a number in ms. If the given time is already a\n * number, it is assumed to be in ms.\n */\nfunction parseCssTime(time) {\n if (time == null) {\n return null;\n }\n if (typeof time === 'number') {\n return time;\n }\n if (time.endsWith('ms')) {\n return coerceNumberProperty(time.substring(0, time.length - 2));\n }\n if (time.endsWith('s')) {\n return coerceNumberProperty(time.substring(0, time.length - 1)) * 1000;\n }\n if (time === '0') {\n return 0;\n }\n return null; // anything else is invalid.\n}\n/**\n * Internal component that wraps user-provided dialog content in a MDC dialog.\n * @docs-private\n */\nlet MatDialogContainer = /*#__PURE__*/(() => {\n class MatDialogContainer extends _MatDialogContainerBase {\n constructor(elementRef, focusTrapFactory, document, dialogConfig, checker, ngZone, overlayRef, _animationMode, focusMonitor) {\n super(elementRef, focusTrapFactory, document, dialogConfig, checker, ngZone, overlayRef, focusMonitor);\n this._animationMode = _animationMode;\n /** Whether animations are enabled. */\n this._animationsEnabled = this._animationMode !== 'NoopAnimations';\n /** Host element of the dialog container component. */\n this._hostElement = this._elementRef.nativeElement;\n /** Duration of the dialog open animation. */\n this._enterAnimationDuration = this._animationsEnabled ? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION : 0;\n /** Duration of the dialog close animation. */\n this._exitAnimationDuration = this._animationsEnabled ? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION : 0;\n /** Current timer for dialog animations. */\n this._animationTimer = null;\n /**\n * Completes the dialog open by clearing potential animation classes, trapping\n * focus and emitting an opened event.\n */\n this._finishDialogOpen = () => {\n this._clearAnimationClasses();\n this._openAnimationDone(this._enterAnimationDuration);\n };\n /**\n * Completes the dialog close by clearing potential animation classes, restoring\n * focus and emitting a closed event.\n */\n this._finishDialogClose = () => {\n this._clearAnimationClasses();\n this._animationStateChanged.emit({\n state: 'closed',\n totalTime: this._exitAnimationDuration\n });\n };\n }\n _contentAttached() {\n // Delegate to the original dialog-container initialization (i.e. saving the\n // previous element, setting up the focus trap and moving focus to the container).\n super._contentAttached();\n // Note: Usually we would be able to use the MDC dialog foundation here to handle\n // the dialog animation for us, but there are a few reasons why we just leverage\n // their styles and not use the runtime foundation code:\n // 1. Foundation does not allow us to disable animations.\n // 2. Foundation contains unnecessary features we don't need and aren't\n // tree-shakeable. e.g. background scrim, keyboard event handlers for ESC button.\n // 3. Foundation uses unnecessary timers for animations to work around limitations\n // in React's `setState` mechanism.\n // https://github.com/material-components/material-components-web/pull/3682.\n this._startOpenAnimation();\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._animationTimer !== null) {\n clearTimeout(this._animationTimer);\n }\n }\n /** Starts the dialog open animation if enabled. */\n _startOpenAnimation() {\n this._animationStateChanged.emit({\n state: 'opening',\n totalTime: this._enterAnimationDuration\n });\n if (this._animationsEnabled) {\n this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._enterAnimationDuration}ms`);\n // We need to give the `setProperty` call from above some time to be applied.\n // One would expect that the open class is added once the animation finished, but MDC\n // uses the open class in combination with the opening class to start the animation.\n this._requestAnimationFrame(() => this._hostElement.classList.add(OPENING_CLASS, OPEN_CLASS));\n this._waitForAnimationToComplete(this._enterAnimationDuration, this._finishDialogOpen);\n } else {\n this._hostElement.classList.add(OPEN_CLASS);\n // Note: We could immediately finish the dialog opening here with noop animations,\n // but we defer until next tick so that consumers can subscribe to `afterOpened`.\n // Executing this immediately would mean that `afterOpened` emits synchronously\n // on `dialog.open` before the consumer had a change to subscribe to `afterOpened`.\n Promise.resolve().then(() => this._finishDialogOpen());\n }\n }\n /**\n * Starts the exit animation of the dialog if enabled. This method is\n * called by the dialog ref.\n */\n _startExitAnimation() {\n this._animationStateChanged.emit({\n state: 'closing',\n totalTime: this._exitAnimationDuration\n });\n this._hostElement.classList.remove(OPEN_CLASS);\n if (this._animationsEnabled) {\n this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._exitAnimationDuration}ms`);\n // We need to give the `setProperty` call from above some time to be applied.\n this._requestAnimationFrame(() => this._hostElement.classList.add(CLOSING_CLASS));\n this._waitForAnimationToComplete(this._exitAnimationDuration, this._finishDialogClose);\n } else {\n // This subscription to the `OverlayRef#backdropClick` observable in the `DialogRef` is\n // set up before any user can subscribe to the backdrop click. The subscription triggers\n // the dialog close and this method synchronously. If we'd synchronously emit the `CLOSED`\n // animation state event if animations are disabled, the overlay would be disposed\n // immediately and all other subscriptions to `DialogRef#backdropClick` would be silently\n // skipped. We work around this by waiting with the dialog close until the next tick when\n // all subscriptions have been fired as expected. This is not an ideal solution, but\n // there doesn't seem to be any other good way. Alternatives that have been considered:\n // 1. Deferring `DialogRef.close`. This could be a breaking change due to a new microtask.\n // Also this issue is specific to the MDC implementation where the dialog could\n // technically be closed synchronously. In the non-MDC one, Angular animations are used\n // and closing always takes at least a tick.\n // 2. Ensuring that user subscriptions to `backdropClick`, `keydownEvents` in the dialog\n // ref are first. This would solve the issue, but has the risk of memory leaks and also\n // doesn't solve the case where consumers call `DialogRef.close` in their subscriptions.\n // Based on the fact that this is specific to the MDC-based implementation of the dialog\n // animations, the defer is applied here.\n Promise.resolve().then(() => this._finishDialogClose());\n }\n }\n /** Clears all dialog animation classes. */\n _clearAnimationClasses() {\n this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);\n }\n _waitForAnimationToComplete(duration, callback) {\n if (this._animationTimer !== null) {\n clearTimeout(this._animationTimer);\n }\n // Note that we want this timer to run inside the NgZone, because we want\n // the related events like `afterClosed` to be inside the zone as well.\n this._animationTimer = setTimeout(callback, duration);\n }\n /** Runs a callback in `requestAnimationFrame`, if available. */\n _requestAnimationFrame(callback) {\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame === 'function') {\n requestAnimationFrame(callback);\n } else {\n callback();\n }\n });\n }\n static {\n this.ɵfac = function MatDialogContainer_Factory(t) {\n return new (t || MatDialogContainer)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusTrapFactory), i0.ɵɵdirectiveInject(DOCUMENT, 8), i0.ɵɵdirectiveInject(MatDialogConfig), i0.ɵɵdirectiveInject(i1.InteractivityChecker), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.OverlayRef), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), i0.ɵɵdirectiveInject(i1.FocusMonitor));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatDialogContainer,\n selectors: [[\"mat-dialog-container\"]],\n hostAttrs: [\"tabindex\", \"-1\", 1, \"mat-mdc-dialog-container\", \"mdc-dialog\"],\n hostVars: 8,\n hostBindings: function MatDialogContainer_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"id\", ctx._config.id);\n i0.ɵɵattribute(\"aria-modal\", ctx._config.ariaModal)(\"role\", ctx._config.role)(\"aria-labelledby\", ctx._config.ariaLabel ? null : ctx._ariaLabelledByQueue[0])(\"aria-label\", ctx._config.ariaLabel)(\"aria-describedby\", ctx._config.ariaDescribedBy || null);\n i0.ɵɵclassProp(\"_mat-animation-noopable\", !ctx._animationsEnabled);\n }\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 0,\n consts: [[1, \"mdc-dialog__container\"], [1, \"mat-mdc-dialog-surface\", \"mdc-dialog__surface\"], [\"cdkPortalOutlet\", \"\"]],\n template: function MatDialogContainer_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1);\n i0.ɵɵtemplate(2, MatDialogContainer_ng_template_2_Template, 0, 0, \"ng-template\", 2);\n i0.ɵɵelementEnd()();\n }\n },\n dependencies: [i4.CdkPortalOutlet],\n styles: [\".mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto;outline:0}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:\\\"\\\";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__container .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{--mdc-dialog-container-elevation-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);--mdc-dialog-container-shadow-color:#000;--mdc-dialog-container-shape:4px;--mdc-dialog-container-elevation: var(--mdc-dialog-container-elevation-shadow);outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, 4px)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87))}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6))}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"],\n encapsulation: 2\n });\n }\n }\n return MatDialogContainer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Reference to a dialog opened via the MatDialog service.\n */\nclass MatDialogRef {\n constructor(_ref, config, _containerInstance) {\n this._ref = _ref;\n this._containerInstance = _containerInstance;\n /** Subject for notifying the user that the dialog has finished opening. */\n this._afterOpened = new Subject();\n /** Subject for notifying the user that the dialog has started closing. */\n this._beforeClosed = new Subject();\n /** Current state of the dialog. */\n this._state = 0 /* MatDialogState.OPEN */;\n this.disableClose = config.disableClose;\n this.id = _ref.id;\n // Emit when opening animation completes\n _containerInstance._animationStateChanged.pipe(filter(event => event.state === 'opened'), take(1)).subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n // Dispose overlay when closing animation is complete\n _containerInstance._animationStateChanged.pipe(filter(event => event.state === 'closed'), take(1)).subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._finishDialogClose();\n });\n _ref.overlayRef.detachments().subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n this._finishDialogClose();\n });\n merge(this.backdropClick(), this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)))).subscribe(event => {\n if (!this.disableClose) {\n event.preventDefault();\n _closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');\n }\n });\n }\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult) {\n this._result = dialogResult;\n // Transition the backdrop in parallel to the dialog.\n this._containerInstance._animationStateChanged.pipe(filter(event => event.state === 'closing'), take(1)).subscribe(event => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._ref.overlayRef.detachBackdrop();\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(() => this._finishDialogClose(), event.totalTime + 100);\n });\n this._state = 1 /* MatDialogState.CLOSING */;\n this._containerInstance._startExitAnimation();\n }\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened() {\n return this._afterOpened;\n }\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed() {\n return this._ref.closed;\n }\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed() {\n return this._beforeClosed;\n }\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick() {\n return this._ref.backdropClick;\n }\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents() {\n return this._ref.keydownEvents;\n }\n /**\n * Updates the dialog's position.\n * @param position New dialog position.\n */\n updatePosition(position) {\n let strategy = this._ref.config.positionStrategy;\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 if (position && (position.top || position.bottom)) {\n position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n } else {\n strategy.centerVertically();\n }\n this._ref.updatePosition();\n return this;\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 = '', height = '') {\n this._ref.updateSize(width, height);\n return this;\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n this._ref.addPanelClass(classes);\n return this;\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n this._ref.removePanelClass(classes);\n return this;\n }\n /** Gets the current state of the dialog's lifecycle. */\n getState() {\n return this._state;\n }\n /**\n * Finishes the dialog close by updating the state of the dialog\n * and disposing the overlay.\n */\n _finishDialogClose() {\n this._state = 2 /* MatDialogState.CLOSED */;\n this._ref.close(this._result, {\n focusOrigin: this._closeInteractionType\n });\n this.componentInstance = null;\n }\n}\n/**\n * Closes the dialog with the specified interaction type. This is currently not part of\n * `MatDialogRef` 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 `MatDialogRef` when we provide an official mock dialog ref.\nfunction _closeDialogVia(ref, interactionType, result) {\n ref._closeInteractionType = interactionType;\n return ref.close(result);\n}\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nconst MAT_DIALOG_DATA = /*#__PURE__*/new InjectionToken('MatMdcDialogData');\n/** Injection token that can be used to specify default dialog options. */\nconst MAT_DIALOG_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('mat-mdc-dialog-default-options');\n/** Injection token that determines the scroll handling while the dialog is open. */\nconst MAT_DIALOG_SCROLL_STRATEGY = /*#__PURE__*/new InjectionToken('mat-mdc-dialog-scroll-strategy');\n/** @docs-private */\nfunction MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nconst MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY\n};\n/** @docs-private */\nfunction MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n/**\n * Base class for dialog services. The base dialog service allows\n * for arbitrary dialog refs and dialog container components.\n */\nlet _MatDialogBase = /*#__PURE__*/(() => {\n class _MatDialogBase {\n /** Keeps track of the currently-open dialogs. */\n get openDialogs() {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n /** Stream that emits when a dialog has been opened. */\n get afterOpened() {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n _getAfterAllClosed() {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n constructor(_overlay, injector, _defaultOptions, _parentDialog,\n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 15.0.0\n */\n _overlayContainer, scrollStrategy, _dialogRefConstructor, _dialogContainerType, _dialogDataToken,\n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 14.0.0\n */\n _animationMode) {\n this._overlay = _overlay;\n this._defaultOptions = _defaultOptions;\n this._parentDialog = _parentDialog;\n this._dialogRefConstructor = _dialogRefConstructor;\n this._dialogContainerType = _dialogContainerType;\n this._dialogDataToken = _dialogDataToken;\n this._openDialogsAtThisLevel = [];\n this._afterAllClosedAtThisLevel = new Subject();\n this._afterOpenedAtThisLevel = new Subject();\n this._idPrefix = 'mat-dialog-';\n this.dialogConfigClass = MatDialogConfig;\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 this.afterAllClosed = defer(() => this.openDialogs.length ? this._getAfterAllClosed() : this._getAfterAllClosed().pipe(startWith(undefined)));\n this._scrollStrategy = scrollStrategy;\n this._dialog = injector.get(Dialog);\n }\n open(componentOrTemplateRef, config) {\n let dialogRef;\n config = {\n ...(this._defaultOptions || new MatDialogConfig()),\n ...config\n };\n config.id = config.id || `${this._idPrefix}${uniqueId++}`;\n config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();\n const cdkRef = this._dialog.open(componentOrTemplateRef, {\n ...config,\n positionStrategy: this._overlay.position().global().centerHorizontally().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 // The Material dialog ref handles this manually.\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 {\n provide: this.dialogConfigClass,\n useValue: config\n }, {\n provide: DialogConfig,\n useValue: config\n }]\n },\n templateContext: () => ({\n dialogRef\n }),\n providers: (ref, cdkConfig, dialogContainer) => {\n dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);\n dialogRef.updatePosition(config?.position);\n return [{\n provide: this._dialogContainerType,\n useValue: dialogContainer\n }, {\n provide: this._dialogDataToken,\n useValue: cdkConfig.data\n }, {\n provide: this._dialogRefConstructor,\n useValue: dialogRef\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.componentRef = cdkRef.componentRef;\n dialogRef.componentInstance = cdkRef.componentInstance;\n this.openDialogs.push(dialogRef);\n this.afterOpened.next(dialogRef);\n dialogRef.afterClosed().subscribe(() => {\n const index = this.openDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n if (!this.openDialogs.length) {\n this._getAfterAllClosed().next();\n }\n }\n });\n return dialogRef;\n }\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n this._closeDialogs(this.openDialogs);\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) {\n return this.openDialogs.find(dialog => dialog.id === id);\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 _closeDialogs(dialogs) {\n let i = dialogs.length;\n while (i--) {\n dialogs[i].close();\n }\n }\n static {\n this.ɵfac = function _MatDialogBase_Factory(t) {\n i0.ɵɵinvalidFactory();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: _MatDialogBase,\n factory: _MatDialogBase.ɵfac\n });\n }\n }\n return _MatDialogBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Service to open Material Design modal dialogs.\n */\nlet MatDialog = /*#__PURE__*/(() => {\n class MatDialog extends _MatDialogBase {\n constructor(overlay, injector,\n /**\n * @deprecated `_location` parameter to be removed.\n * @breaking-change 10.0.0\n */\n location, defaultOptions, scrollStrategy, parentDialog,\n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 15.0.0\n */\n overlayContainer,\n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 14.0.0\n */\n animationMode) {\n super(overlay, injector, defaultOptions, parentDialog, overlayContainer, scrollStrategy, MatDialogRef, MatDialogContainer, MAT_DIALOG_DATA, animationMode);\n this._idPrefix = 'mat-mdc-dialog-';\n }\n static {\n this.ɵfac = function MatDialog_Factory(t) {\n return new (t || MatDialog)(i0.ɵɵinject(i1$1.Overlay), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i2.Location, 8), i0.ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8), i0.ɵɵinject(MAT_DIALOG_SCROLL_STRATEGY), i0.ɵɵinject(MatDialog, 12), i0.ɵɵinject(i1$1.OverlayContainer), i0.ɵɵinject(ANIMATION_MODULE_TYPE$1, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MatDialog,\n factory: MatDialog.ɵfac\n });\n }\n }\n return MatDialog;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Counter used to generate unique IDs for dialog elements. */\nlet dialogElementUid = 0;\n/**\n * Button that will close the current dialog.\n */\nlet MatDialogClose = /*#__PURE__*/(() => {\n class MatDialogClose {\n constructor(\n // The dialog title directive is always used in combination with a `MatDialogRef`.\n // tslint:disable-next-line: lightweight-tokens\n dialogRef, _elementRef, _dialog) {\n this.dialogRef = dialogRef;\n this._elementRef = _elementRef;\n this._dialog = _dialog;\n /** Default to \"button\" to prevents accidental form submits. */\n this.type = 'button';\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 ngOnChanges(changes) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n _onButtonClick(event) {\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(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);\n }\n static {\n this.ɵfac = function MatDialogClose_Factory(t) {\n return new (t || MatDialogClose)(i0.ɵɵdirectiveInject(MatDialogRef, 8), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MatDialog));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatDialogClose,\n selectors: [[\"\", \"mat-dialog-close\", \"\"], [\"\", \"matDialogClose\", \"\"]],\n hostVars: 2,\n hostBindings: function MatDialogClose_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function MatDialogClose_click_HostBindingHandler($event) {\n return ctx._onButtonClick($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-label\", ctx.ariaLabel || null)(\"type\", ctx.type);\n }\n },\n inputs: {\n ariaLabel: [i0.ɵɵInputFlags.None, \"aria-label\", \"ariaLabel\"],\n type: \"type\",\n dialogResult: [i0.ɵɵInputFlags.None, \"mat-dialog-close\", \"dialogResult\"],\n _matDialogClose: [i0.ɵɵInputFlags.None, \"matDialogClose\", \"_matDialogClose\"]\n },\n exportAs: [\"matDialogClose\"],\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return MatDialogClose;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\nlet MatDialogTitle = /*#__PURE__*/(() => {\n class MatDialogTitle {\n constructor(\n // The dialog title directive is always used in combination with a `MatDialogRef`.\n // tslint:disable-next-line: lightweight-tokens\n _dialogRef, _elementRef, _dialog) {\n this._dialogRef = _dialogRef;\n this._elementRef = _elementRef;\n this._dialog = _dialog;\n this.id = `mat-mdc-dialog-title-${dialogElementUid++}`;\n }\n ngOnInit() {\n if (!this._dialogRef) {\n this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n }\n if (this._dialogRef) {\n Promise.resolve().then(() => {\n // Note: we null check the queue, because there are some internal\n // tests that are mocking out `MatDialogRef` incorrectly.\n this._dialogRef._containerInstance?._ariaLabelledByQueue?.push(this.id);\n });\n }\n }\n ngOnDestroy() {\n // Note: we null check the queue, because there are some internal\n // tests that are mocking out `MatDialogRef` incorrectly.\n const queue = this._dialogRef?._containerInstance?._ariaLabelledByQueue;\n if (queue) {\n Promise.resolve().then(() => {\n const index = queue.indexOf(this.id);\n if (index > -1) {\n queue.splice(index, 1);\n }\n });\n }\n }\n static {\n this.ɵfac = function MatDialogTitle_Factory(t) {\n return new (t || MatDialogTitle)(i0.ɵɵdirectiveInject(MatDialogRef, 8), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MatDialog));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatDialogTitle,\n selectors: [[\"\", \"mat-dialog-title\", \"\"], [\"\", \"matDialogTitle\", \"\"]],\n hostAttrs: [1, \"mat-mdc-dialog-title\", \"mdc-dialog__title\"],\n hostVars: 1,\n hostBindings: function MatDialogTitle_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"id\", ctx.id);\n }\n },\n inputs: {\n id: \"id\"\n },\n exportAs: [\"matDialogTitle\"]\n });\n }\n }\n return MatDialogTitle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Scrollable content container of a dialog.\n */\nlet MatDialogContent = /*#__PURE__*/(() => {\n class MatDialogContent {\n static {\n this.ɵfac = function MatDialogContent_Factory(t) {\n return new (t || MatDialogContent)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatDialogContent,\n selectors: [[\"\", \"mat-dialog-content\", \"\"], [\"mat-dialog-content\"], [\"\", \"matDialogContent\", \"\"]],\n hostAttrs: [1, \"mat-mdc-dialog-content\", \"mdc-dialog__content\"]\n });\n }\n }\n return MatDialogContent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\nlet MatDialogActions = /*#__PURE__*/(() => {\n class MatDialogActions {\n constructor() {\n /**\n * Horizontal alignment of action buttons.\n */\n this.align = 'start';\n }\n static {\n this.ɵfac = function MatDialogActions_Factory(t) {\n return new (t || MatDialogActions)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatDialogActions,\n selectors: [[\"\", \"mat-dialog-actions\", \"\"], [\"mat-dialog-actions\"], [\"\", \"matDialogActions\", \"\"]],\n hostAttrs: [1, \"mat-mdc-dialog-actions\", \"mdc-dialog__actions\"],\n hostVars: 4,\n hostBindings: function MatDialogActions_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-dialog-actions-align-center\", ctx.align === \"center\")(\"mat-mdc-dialog-actions-align-end\", ctx.align === \"end\");\n }\n },\n inputs: {\n align: \"align\"\n }\n });\n }\n }\n return MatDialogActions;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Finds the closest MatDialogRef 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, openDialogs) {\n let parent = element.nativeElement.parentElement;\n while (parent && !parent.classList.contains('mat-mdc-dialog-container')) {\n parent = parent.parentElement;\n }\n return parent ? openDialogs.find(dialog => dialog.id === parent.id) : null;\n}\nlet MatDialogModule = /*#__PURE__*/(() => {\n class MatDialogModule {\n static {\n this.ɵfac = function MatDialogModule_Factory(t) {\n return new (t || MatDialogModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatDialogModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER],\n imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatDialogModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Default parameters for the animation for backwards compatibility.\n * @docs-private\n */\nconst _defaultParams = {\n params: {\n enterAnimationDuration: '150ms',\n exitAnimationDuration: '75ms'\n }\n};\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nconst matDialogAnimations = {\n /** Animation that is applied on the dialog container by default. */\n dialogContainer: /*#__PURE__*/trigger('dialogContainer', [\n /*#__PURE__*/\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', /*#__PURE__*/style({\n opacity: 0,\n transform: 'scale(0.7)'\n })), /*#__PURE__*/state('enter', /*#__PURE__*/style({\n transform: 'none'\n })), /*#__PURE__*/transition('* => enter', /*#__PURE__*/group([/*#__PURE__*/animate('{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)', /*#__PURE__*/style({\n transform: 'none',\n opacity: 1\n })), /*#__PURE__*/query('@*', /*#__PURE__*/animateChild(), {\n optional: true\n })]), _defaultParams), /*#__PURE__*/transition('* => void, * => exit', /*#__PURE__*/group([/*#__PURE__*/animate('{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)', /*#__PURE__*/style({\n opacity: 0\n })), /*#__PURE__*/query('@*', /*#__PURE__*/animateChild(), {\n optional: true\n })]), _defaultParams)])\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContainer, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogTitle, _MatDialogBase, _MatDialogContainerBase, _closeDialogVia, _defaultParams, matDialogAnimations };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, ContentChildren, NgModule } from '@angular/core';\nimport { mixinColor, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\n\n// Boilerplate for applying mixins to MatToolbar.\n/** @docs-private */\nconst _c0 = [\"*\", [[\"mat-toolbar-row\"]]];\nconst _c1 = [\"*\", \"mat-toolbar-row\"];\nconst _MatToolbarBase = /*#__PURE__*/mixinColor(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n});\nlet MatToolbarRow = /*#__PURE__*/(() => {\n class MatToolbarRow {\n static {\n this.ɵfac = function MatToolbarRow_Factory(t) {\n return new (t || MatToolbarRow)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatToolbarRow,\n selectors: [[\"mat-toolbar-row\"]],\n hostAttrs: [1, \"mat-toolbar-row\"],\n exportAs: [\"matToolbarRow\"]\n });\n }\n }\n return MatToolbarRow;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatToolbar = /*#__PURE__*/(() => {\n class MatToolbar extends _MatToolbarBase {\n constructor(elementRef, _platform, document) {\n super(elementRef);\n this._platform = _platform;\n // TODO: make the document a required param when doing breaking changes.\n this._document = document;\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._checkToolbarMixedModes();\n this._toolbarRows.changes.subscribe(() => this._checkToolbarMixedModes());\n }\n }\n /**\n * Throws an exception when developers are attempting to combine the different toolbar row modes.\n */\n _checkToolbarMixedModes() {\n if (this._toolbarRows.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n // Check if there are any other DOM nodes that can display content but aren't inside of\n // a element.\n const isCombinedUsage = Array.from(this._elementRef.nativeElement.childNodes).filter(node => !(node.classList && node.classList.contains('mat-toolbar-row'))).filter(node => node.nodeType !== (this._document ? this._document.COMMENT_NODE : 8)).some(node => !!(node.textContent && node.textContent.trim()));\n if (isCombinedUsage) {\n throwToolbarMixedModesError();\n }\n }\n }\n static {\n this.ɵfac = function MatToolbar_Factory(t) {\n return new (t || MatToolbar)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.Platform), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatToolbar,\n selectors: [[\"mat-toolbar\"]],\n contentQueries: function MatToolbar_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatToolbarRow, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._toolbarRows = _t);\n }\n },\n hostAttrs: [1, \"mat-toolbar\"],\n hostVars: 4,\n hostBindings: function MatToolbar_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-toolbar-multiple-rows\", ctx._toolbarRows.length > 0)(\"mat-toolbar-single-row\", ctx._toolbarRows.length === 0);\n }\n },\n inputs: {\n color: \"color\"\n },\n exportAs: [\"matToolbar\"],\n features: [i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c1,\n decls: 2,\n vars: 0,\n template: function MatToolbar_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵprojection(0);\n i0.ɵɵprojection(1, 1);\n }\n },\n styles: [\".mat-toolbar{background:var(--mat-toolbar-container-background-color);color:var(--mat-toolbar-container-text-color)}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font);font-size:var(--mat-toolbar-title-text-size);line-height:var(--mat-toolbar-title-text-line-height);font-weight:var(--mat-toolbar-title-text-weight);letter-spacing:var(--mat-toolbar-title-text-tracking);margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatToolbar;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Throws an exception when attempting to combine the different toolbar row modes.\n * @docs-private\n */\nfunction throwToolbarMixedModesError() {\n throw Error('MatToolbar: Attempting to combine different toolbar modes. ' + 'Either specify multiple `` elements explicitly or just place content ' + 'inside of a `` for a single row.');\n}\nlet MatToolbarModule = /*#__PURE__*/(() => {\n class MatToolbarModule {\n static {\n this.ɵfac = function MatToolbarModule_Factory(t) {\n return new (t || MatToolbarModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatToolbarModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatToolbarModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatToolbar, MatToolbarModule, MatToolbarRow, throwToolbarMixedModesError };\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, Directive, Optional, SkipSelf, Input, EventEmitter, Self, ContentChildren, ContentChild, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';\nimport { coerceBooleanProperty, coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';\nimport { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';\nimport { takeUntil, map, take, startWith, tap, switchMap } from 'rxjs/operators';\nimport * as i1$1 from '@angular/cdk/bidi';\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nfunction extendStyles(dest, source, importantProperties) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n const value = source[key];\n if (value) {\n dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n } else {\n dest.removeProperty(key);\n }\n }\n }\n return dest;\n}\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nfunction toggleNativeDragInteractions(element, enable) {\n const userSelect = enable ? '' : 'none';\n extendStyles(element.style, {\n 'touch-action': enable ? '' : 'none',\n '-webkit-user-drag': enable ? '' : 'none',\n '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n 'user-select': userSelect,\n '-ms-user-select': userSelect,\n '-webkit-user-select': userSelect,\n '-moz-user-select': userSelect\n });\n}\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nfunction toggleVisibility(element, enable, importantProperties) {\n extendStyles(element.style, {\n position: enable ? '' : 'fixed',\n top: enable ? '' : '0',\n opacity: enable ? '' : '0',\n left: enable ? '' : '-999em'\n }, importantProperties);\n}\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nfunction combineTransforms(transform, initialTransform) {\n return initialTransform && initialTransform != 'none' ? transform + ' ' + initialTransform : transform;\n}\n\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value) {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nfunction getTransformTransitionDurationInMs(element) {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) + parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n}\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle, name) {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\n}\n\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nfunction getMutableClientRect(element) {\n const clientRect = element.getBoundingClientRect();\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height,\n x: clientRect.x,\n y: clientRect.y\n };\n}\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect, x, y) {\n const {\n top,\n bottom,\n left,\n right\n } = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\n}\n/**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nfunction adjustClientRect(clientRect, top, left) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n}\n/**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nfunction isPointerNearClientRect(rect, threshold, pointerX, pointerY) {\n const {\n top,\n right,\n bottom,\n left,\n width,\n height\n } = rect;\n const xThreshold = width * threshold;\n const yThreshold = height * threshold;\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold && pointerX > left - xThreshold && pointerX < right + xThreshold;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nclass ParentPositionTracker {\n constructor(_document) {\n this._document = _document;\n /** Cached positions of the scrollable parent elements. */\n this.positions = new Map();\n }\n /** Clears the cached positions. */\n clear() {\n this.positions.clear();\n }\n /** Caches the positions. Should be called at the beginning of a drag sequence. */\n cache(elements) {\n this.clear();\n this.positions.set(this._document, {\n scrollPosition: this.getViewportScrollPosition()\n });\n elements.forEach(element => {\n this.positions.set(element, {\n scrollPosition: {\n top: element.scrollTop,\n left: element.scrollLeft\n },\n clientRect: getMutableClientRect(element)\n });\n });\n }\n /** Handles scrolling while a drag is taking place. */\n handleScroll(event) {\n const target = _getEventTarget(event);\n const cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop;\n let newLeft;\n if (target === this._document) {\n const viewportScrollPosition = this.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n } else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n const topDifference = scrollPosition.top - newTop;\n const leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach((position, node) => {\n if (position.clientRect && target !== node && target.contains(node)) {\n adjustClientRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return {\n top: topDifference,\n left: leftDifference\n };\n }\n /**\n * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n * if the element is offset by something like the `BlockScrollStrategy`.\n */\n getViewportScrollPosition() {\n return {\n top: window.scrollY,\n left: window.scrollX\n };\n }\n}\n\n/** Creates a deep clone of an element. */\nfunction deepCloneNode(node) {\n const clone = node.cloneNode(true);\n const descendantsWithId = clone.querySelectorAll('[id]');\n const nodeName = node.nodeName.toLowerCase();\n // Remove the `id` to avoid having multiple elements with the same id on the page.\n clone.removeAttribute('id');\n for (let i = 0; i < descendantsWithId.length; i++) {\n descendantsWithId[i].removeAttribute('id');\n }\n if (nodeName === 'canvas') {\n transferCanvasData(node, clone);\n } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n transferInputData(node, clone);\n }\n transferData('canvas', node, clone, transferCanvasData);\n transferData('input, textarea, select', node, clone, transferInputData);\n return clone;\n}\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData(selector, node, clone, callback) {\n const descendantElements = node.querySelectorAll(selector);\n if (descendantElements.length) {\n const cloneElements = clone.querySelectorAll(selector);\n for (let i = 0; i < descendantElements.length; i++) {\n callback(descendantElements[i], cloneElements[i]);\n }\n }\n}\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n/** Transfers the data of one input element to another. */\nfunction transferInputData(source, clone) {\n // Browsers throw an error when assigning the value of a file input programmatically.\n if (clone.type !== 'file') {\n clone.value = source.value;\n }\n // Radio button `name` attributes must be unique for radio button groups\n // otherwise original radio buttons can lose their checked state\n // once the clone is inserted in the DOM.\n if (clone.type === 'radio' && clone.name) {\n clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n }\n}\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source, clone) {\n const context = clone.getContext('2d');\n if (context) {\n // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n // We can't do much about it so just ignore the error.\n try {\n context.drawImage(source, 0, 0);\n } catch {}\n }\n}\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true\n});\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false\n});\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = /*#__PURE__*/new Set([\n// Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n'position']);\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nclass DragRef {\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._toggleNativeDragInteractions();\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, newValue));\n }\n }\n constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._config = _config;\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n /** CSS `transform` that is applied to the element while it's being dragged. */\n this._activeTransform = {\n x: 0,\n y: 0\n };\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n this._hasStartedDragging = false;\n /** Emits when the item is being moved. */\n this._moveEvents = new Subject();\n /** Subscription to pointer movement events. */\n this._pointerMoveSubscription = Subscription.EMPTY;\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n this._pointerUpSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being scrolled. */\n this._scrollSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being resized. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Cached reference to the boundary element. */\n this._boundaryElement = null;\n /** Whether the native dragging interactions have been enabled on the root element. */\n this._nativeInteractionsEnabled = true;\n /** Elements that can be used to drag the draggable item. */\n this._handles = [];\n /** Registered handles that are currently disabled. */\n this._disabledHandles = new Set();\n /** Layout direction of the item. */\n this._direction = 'ltr';\n /**\n * Amount of milliseconds to wait after the user has put their\n * pointer down before starting to drag the element.\n */\n this.dragStartDelay = 0;\n this._disabled = false;\n /** Emits as the drag sequence is being prepared. */\n this.beforeStarted = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new Subject();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new Subject();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new Subject();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new Subject();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new Subject();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new Subject();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = this._moveEvents;\n /** Handler for the `mousedown`/`touchstart` events. */\n this._pointerDown = event => {\n this.beforeStarted.next();\n // Delegate the event based on whether it started from a handle or the element itself.\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n this._initializeDragSequence(targetHandle, event);\n }\n } else if (!this.disabled) {\n this._initializeDragSequence(this._rootElement, event);\n }\n };\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n this._pointerMove = event => {\n const pointerPosition = this._getPointerPositionOnPage(event);\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (isOverThreshold) {\n const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n const container = this._dropContainer;\n if (!isDelayElapsed) {\n this._endDragSequence(event);\n return;\n }\n // Prevent other drag sequences from starting while something in the container is still\n // being dragged. This can happen while we're waiting for the drop animation to finish\n // and can cause errors, because some elements might still be moving around.\n if (!container || !container.isDragging() && !container.isReceiving()) {\n // Prevent the default action as soon as the dragging sequence is considered as\n // \"started\" since waiting for the next event can allow the device to begin scrolling.\n event.preventDefault();\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence(event));\n }\n }\n return;\n }\n // We prevent the default action down here so that we know that dragging has started. This is\n // important for touch devices where doing this too early can unnecessarily block scrolling,\n // if there's a dragging delay.\n event.preventDefault();\n const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n this._hasMoved = true;\n this._lastKnownPointerPosition = pointerPosition;\n this._updatePointerDirectionDelta(constrainedPointerPosition);\n if (this._dropContainer) {\n this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n } else {\n // If there's a position constraint function, we want the element's top/left to be at the\n // specific position on the page. Use the initial position as a reference if that's the case.\n const offset = this.constrainPosition ? this._initialClientRect : this._pickupPositionOnPage;\n const activeTransform = this._activeTransform;\n activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n }\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEvents.observers.length) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition: constrainedPointerPosition,\n event,\n distance: this._getDragDistance(constrainedPointerPosition),\n delta: this._pointerDirectionDelta\n });\n });\n }\n };\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n this._pointerUp = event => {\n this._endDragSequence(event);\n };\n /** Handles a native `dragstart` event. */\n this._nativeDragStart = event => {\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n event.preventDefault();\n }\n } else if (!this.disabled) {\n // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n // but some cases like dragging of links can slip through (see #24403).\n event.preventDefault();\n }\n };\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document);\n _dragDropRegistry.registerDragItem(this);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._placeholder;\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._rootElement;\n }\n /**\n * Gets the currently-visible element that represents the drag item.\n * While dragging this is the placeholder, otherwise it's the root element.\n */\n getVisibleElement() {\n return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n }\n /** Registers the handles that can be used to drag the element. */\n withHandles(handles) {\n this._handles = handles.map(handle => coerceElement(handle));\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n this._toggleNativeDragInteractions();\n // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n // the set, rather than iterate over it and filter out the destroyed handles, because while\n // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n // use an array internally which may throw an error.\n const disabledHandles = new Set();\n this._disabledHandles.forEach(handle => {\n if (this._handles.indexOf(handle) > -1) {\n disabledHandles.add(handle);\n }\n });\n this._disabledHandles = disabledHandles;\n return this;\n }\n /**\n * Registers the template that should be used for the drag preview.\n * @param template Template that from which to stamp out the preview.\n */\n withPreviewTemplate(template) {\n this._previewTemplate = template;\n return this;\n }\n /**\n * Registers the template that should be used for the drag placeholder.\n * @param template Template that from which to stamp out the placeholder.\n */\n withPlaceholderTemplate(template) {\n this._placeholderTemplate = template;\n return this;\n }\n /**\n * Sets an alternate drag root element. The root element is the element that will be moved as\n * the user is dragging. Passing an alternate root element is useful when trying to enable\n * dragging on an element that you might not have access to.\n */\n withRootElement(rootElement) {\n const element = coerceElement(rootElement);\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.addEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n });\n this._initialTransform = undefined;\n this._rootElement = element;\n }\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n this._ownerSVGElement = this._rootElement.ownerSVGElement;\n }\n return this;\n }\n /**\n * Element to which the draggable's position will be constrained.\n */\n withBoundaryElement(boundaryElement) {\n this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n this._resizeSubscription.unsubscribe();\n if (boundaryElement) {\n this._resizeSubscription = this._viewportRuler.change(10).subscribe(() => this._containInsideBoundaryOnResize());\n }\n return this;\n }\n /** Sets the parent ref that the ref is nested in. */\n withParent(parent) {\n this._parentDragRef = parent;\n return this;\n }\n /** Removes the dragging functionality from the DOM element. */\n dispose() {\n this._removeRootElementListeners(this._rootElement);\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this.isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._rootElement?.remove();\n }\n this._anchor?.remove();\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this.beforeStarted.complete();\n this.started.complete();\n this.released.complete();\n this.ended.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this._moveEvents.complete();\n this._handles = [];\n this._disabledHandles.clear();\n this._dropContainer = undefined;\n this._resizeSubscription.unsubscribe();\n this._parentPositions.clear();\n this._boundaryElement = this._rootElement = this._ownerSVGElement = this._placeholderTemplate = this._previewTemplate = this._anchor = this._parentDragRef = null;\n }\n /** Checks whether the element is currently being dragged. */\n isDragging() {\n return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._rootElement.style.transform = this._initialTransform || '';\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n }\n /**\n * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n * @param handle Handle element that should be disabled.\n */\n disableHandle(handle) {\n if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n this._disabledHandles.add(handle);\n toggleNativeDragInteractions(handle, true);\n }\n }\n /**\n * Enables a handle, if it has been disabled.\n * @param handle Handle element to be enabled.\n */\n enableHandle(handle) {\n if (this._disabledHandles.has(handle)) {\n this._disabledHandles.delete(handle);\n toggleNativeDragInteractions(handle, this.disabled);\n }\n }\n /** Sets the layout direction of the draggable item. */\n withDirection(direction) {\n this._direction = direction;\n return this;\n }\n /** Sets the container that the item is part of. */\n _withDropContainer(container) {\n this._dropContainer = container;\n }\n /**\n * Gets the current position in pixels the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n return {\n x: position.x,\n y: position.y\n };\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform.x = value.x;\n this._passiveTransform.y = value.y;\n if (!this._dropContainer) {\n this._applyRootElementTransform(value.x, value.y);\n }\n return this;\n }\n /**\n * Sets the container into which to insert the preview element.\n * @param value Container into which to insert the preview.\n */\n withPreviewContainer(value) {\n this._previewContainer = value;\n return this;\n }\n /** Updates the item's sort order based on the last-known pointer position. */\n _sortFromLastPointerPosition() {\n const position = this._lastKnownPointerPosition;\n if (position && this._dropContainer) {\n this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n }\n }\n /** Unsubscribes from the global subscriptions. */\n _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n }\n /** Destroys the preview element and its ViewRef. */\n _destroyPreview() {\n this._preview?.remove();\n this._previewRef?.destroy();\n this._preview = this._previewRef = null;\n }\n /** Destroys the placeholder element and its ViewRef. */\n _destroyPlaceholder() {\n this._placeholder?.remove();\n this._placeholderRef?.destroy();\n this._placeholder = this._placeholderRef = null;\n }\n /**\n * Clears subscriptions and stops the dragging sequence.\n * @param event Browser event object that ended the sequence.\n */\n _endDragSequence(event) {\n // Note that here we use `isDragging` from the service, rather than from `this`.\n // The difference is that the one from the service reflects whether a dragging sequence\n // has been initiated, whereas the one on `this` includes whether the user has passed\n // the minimum dragging threshold.\n if (!this._dragDropRegistry.isDragging(this)) {\n return;\n }\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;\n }\n if (!this._hasStartedDragging) {\n return;\n }\n this.released.next({\n source: this,\n event\n });\n if (this._dropContainer) {\n // Stop scrolling immediately, instead of waiting for the animation to finish.\n this._dropContainer._stopScrolling();\n this._animatePreviewToPlaceholder().then(() => {\n this._cleanupDragArtifacts(event);\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n });\n } else {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n const pointerPosition = this._getPointerPositionOnPage(event);\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => {\n this.ended.next({\n source: this,\n distance: this._getDragDistance(pointerPosition),\n dropPoint: pointerPosition,\n event\n });\n });\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n }\n }\n /** Starts the dragging sequence. */\n _startDragSequence(event) {\n if (isTouchEvent(event)) {\n this._lastTouchEventTime = Date.now();\n }\n this._toggleNativeDragInteractions();\n const dropContainer = this._dropContainer;\n if (dropContainer) {\n const element = this._rootElement;\n const parent = element.parentNode;\n const placeholder = this._placeholder = this._createPlaceholderElement();\n const anchor = this._anchor = this._anchor || this._document.createComment('');\n // Needs to happen before the root element is moved.\n const shadowRoot = this._getShadowRoot();\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, element);\n // There's no risk of transforms stacking when inside a drop container so\n // we can keep the initial transform up to date any time dragging starts.\n this._initialTransform = element.style.transform || '';\n // Create the preview after the initial transform has\n // been cached, because it can be affected by the transform.\n this._preview = this._createPreviewElement();\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n toggleVisibility(element, false, dragImportantProperties);\n this._document.body.appendChild(parent.replaceChild(placeholder, element));\n this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);\n this.started.next({\n source: this,\n event\n }); // Emit before notifying the container.\n dropContainer.start();\n this._initialContainer = dropContainer;\n this._initialIndex = dropContainer.getItemIndex(this);\n } else {\n this.started.next({\n source: this,\n event\n });\n this._initialContainer = this._initialIndex = undefined;\n }\n // Important to run after we've called `start` on the parent container\n // so that it has had time to resolve its scrollable parents.\n this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n }\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n _initializeDragSequence(referenceElement, event) {\n // Stop propagation if the item is inside another\n // draggable so we don't start multiple drag sequences.\n if (this._parentDragRef) {\n event.stopPropagation();\n }\n const isDragging = this.isDragging();\n const isTouchSequence = isTouchEvent(event);\n const isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;\n const rootElement = this._rootElement;\n const target = _getEventTarget(event);\n const isSyntheticEvent = !isTouchSequence && this._lastTouchEventTime && this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n const isFakeEvent = isTouchSequence ? isFakeTouchstartFromScreenReader(event) : isFakeMousedownFromScreenReader(event);\n // If the event started from an element with the native HTML drag&drop, it'll interfere\n // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n // events from firing on touch devices.\n if (target && target.draggable && event.type === 'mousedown') {\n event.preventDefault();\n }\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n return;\n }\n // If we've got handles, we need to disable the tap highlight on the entire root element,\n // otherwise iOS will still add it, even though all the drag interactions on the handle\n // are disabled.\n if (this._handles.length) {\n const rootStyles = rootElement.style;\n this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n rootStyles.webkitTapHighlightColor = 'transparent';\n }\n this._hasStartedDragging = this._hasMoved = false;\n // Avoid multiple subscriptions and memory leaks when multi touch\n // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n this._removeSubscriptions();\n this._initialClientRect = this._rootElement.getBoundingClientRect();\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n if (this._boundaryElement) {\n this._boundaryRect = getMutableClientRect(this._boundaryElement);\n }\n // If we have a custom preview we can't know ahead of time how large it'll be so we position\n // it next to the cursor. The exception is when the consumer has opted into making the preview\n // the same size as the root element, in which case we do know the size.\n const previewTemplate = this._previewTemplate;\n this._pickupPositionInElement = previewTemplate && previewTemplate.template && !previewTemplate.matchSize ? {\n x: 0,\n y: 0\n } : this._getPointerPositionInElement(this._initialClientRect, referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = this._lastKnownPointerPosition = this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = {\n x: 0,\n y: 0\n };\n this._pointerPositionAtLastDirectionChange = {\n x: pointerPosition.x,\n y: pointerPosition.y\n };\n this._dragStartTime = Date.now();\n this._dragDropRegistry.startDragging(this, event);\n }\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n _cleanupDragArtifacts(event) {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n toggleVisibility(this._rootElement, true, dragImportantProperties);\n this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._initialClientRect = this._boundaryRect = this._previewRect = this._initialTransform = undefined;\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const container = this._dropContainer;\n const currentIndex = container.getItemIndex(this);\n const pointerPosition = this._getPointerPositionOnPage(event);\n const distance = this._getDragDistance(pointerPosition);\n const isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);\n this.ended.next({\n source: this,\n distance,\n dropPoint: pointerPosition,\n event\n });\n this.dropped.next({\n item: this,\n currentIndex,\n previousIndex: this._initialIndex,\n container: container,\n previousContainer: this._initialContainer,\n isPointerOverContainer,\n distance,\n dropPoint: pointerPosition,\n event\n });\n container.drop(this, currentIndex, this._initialIndex, this._initialContainer, isPointerOverContainer, distance, pointerPosition, event);\n this._dropContainer = this._initialContainer;\n });\n }\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n _updateActiveDropContainer({\n x,\n y\n }, {\n x: rawX,\n y: rawY\n }) {\n // Drop container that draggable has been moved into.\n let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n // If we couldn't find a new container to move the item into, and the item has left its\n // initial container, check whether the it's over the initial container. This handles the\n // case where two containers are connected one way and the user tries to undo dragging an\n // item into a new container.\n if (!newContainer && this._dropContainer !== this._initialContainer && this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.next({\n item: this,\n container: this._dropContainer\n });\n this._dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this._dropContainer = newContainer;\n this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&\n // If we're re-entering the initial container and sorting is disabled,\n // put item the into its starting index to begin with.\n newContainer.sortingDisabled ? this._initialIndex : undefined);\n this.entered.next({\n item: this,\n container: newContainer,\n currentIndex: newContainer.getItemIndex(this)\n });\n });\n }\n // Dragging may have been interrupted as a result of the events above.\n if (this.isDragging()) {\n this._dropContainer._startScrollingIfNecessary(rawX, rawY);\n this._dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n if (this.constrainPosition) {\n this._applyPreviewTransform(x, y);\n } else {\n this._applyPreviewTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n }\n }\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n _createPreviewElement() {\n const previewConfig = this._previewTemplate;\n const previewClass = this.previewClass;\n const previewTemplate = previewConfig ? previewConfig.template : null;\n let preview;\n if (previewTemplate && previewConfig) {\n // Measure the element before we've inserted the preview\n // since the insertion could throw off the measurement.\n const rootRect = previewConfig.matchSize ? this._initialClientRect : null;\n const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect);\n } else {\n preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n } else {\n preview = deepCloneNode(this._rootElement);\n matchElementSize(preview, this._initialClientRect);\n if (this._initialTransform) {\n preview.style.transform = this._initialTransform;\n }\n }\n extendStyles(preview.style, {\n // It's important that we disable the pointer events on the preview, because\n // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n 'pointer-events': 'none',\n // We have to reset the margin, because it can throw off positioning relative to the viewport.\n 'margin': '0',\n 'position': 'fixed',\n 'top': '0',\n 'left': '0',\n 'z-index': `${this._config.zIndex || 1000}`\n }, dragImportantProperties);\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._direction);\n if (previewClass) {\n if (Array.isArray(previewClass)) {\n previewClass.forEach(className => preview.classList.add(className));\n } else {\n preview.classList.add(previewClass);\n }\n }\n return preview;\n }\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n _animatePreviewToPlaceholder() {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n const placeholderRect = this._placeholder.getBoundingClientRect();\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n // Move the preview to the placeholder position.\n this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n if (duration === 0) {\n return Promise.resolve();\n }\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = event => {\n if (!event || _getEventTarget(event) === this._preview && event.propertyName === 'transform') {\n this._preview?.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n };\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n /** Creates an element that will be shown instead of the current element while dragging. */\n _createPlaceholderElement() {\n const placeholderConfig = this._placeholderTemplate;\n const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n let placeholder;\n if (placeholderTemplate) {\n this._placeholderRef = placeholderConfig.viewContainer.createEmbeddedView(placeholderTemplate, placeholderConfig.context);\n this._placeholderRef.detectChanges();\n placeholder = getRootNode(this._placeholderRef, this._document);\n } else {\n placeholder = deepCloneNode(this._rootElement);\n }\n // Stop pointer events on the preview so the user can't\n // interact with it while the preview is animating.\n placeholder.style.pointerEvents = 'none';\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n _getPointerPositionInElement(elementRect, referenceElement, event) {\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n const scrollPosition = this._getViewportScrollPosition();\n const x = point.pageX - referenceRect.left - scrollPosition.left;\n const y = point.pageY - referenceRect.top - scrollPosition.top;\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n }\n /** Determines the point of the page that was touched by the user. */\n _getPointerPositionOnPage(event) {\n const scrollPosition = this._getViewportScrollPosition();\n const point = isTouchEvent(event) ?\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n // throwing an error. The value returned here will be incorrect, but since this only\n // breaks inside a developer tool and the value is only used for secondary information,\n // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n event.touches[0] || event.changedTouches[0] || {\n pageX: 0,\n pageY: 0\n } : event;\n const x = point.pageX - scrollPosition.left;\n const y = point.pageY - scrollPosition.top;\n // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n // coordinate system\n if (this._ownerSVGElement) {\n const svgMatrix = this._ownerSVGElement.getScreenCTM();\n if (svgMatrix) {\n const svgPoint = this._ownerSVGElement.createSVGPoint();\n svgPoint.x = x;\n svgPoint.y = y;\n return svgPoint.matrixTransform(svgMatrix.inverse());\n }\n }\n return {\n x,\n y\n };\n }\n /** Gets the pointer position on the page, accounting for any position constraints. */\n _getConstrainedPointerPosition(point) {\n const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n let {\n x,\n y\n } = this.constrainPosition ? this.constrainPosition(point, this, this._initialClientRect, this._pickupPositionInElement) : point;\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y - (this.constrainPosition ? this._pickupPositionInElement.y : 0);\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x - (this.constrainPosition ? this._pickupPositionInElement.x : 0);\n }\n if (this._boundaryRect) {\n // If not using a custom constrain we need to account for the pickup position in the element\n // otherwise we do not need to do this, as it has already been accounted for\n const {\n x: pickupX,\n y: pickupY\n } = !this.constrainPosition ? this._pickupPositionInElement : {\n x: 0,\n y: 0\n };\n const boundaryRect = this._boundaryRect;\n const {\n width: previewWidth,\n height: previewHeight\n } = this._getPreviewRect();\n const minY = boundaryRect.top + pickupY;\n const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n const minX = boundaryRect.left + pickupX;\n const maxX = boundaryRect.right - (previewWidth - pickupX);\n x = clamp$1(x, minX, maxX);\n y = clamp$1(y, minY, maxY);\n }\n return {\n x,\n y\n };\n }\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n _updatePointerDirectionDelta(pointerPositionOnPage) {\n const {\n x,\n y\n } = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n return delta;\n }\n /** Toggles the native drag interactions, based on how many handles are registered. */\n _toggleNativeDragInteractions() {\n if (!this._rootElement || !this._handles) {\n return;\n }\n const shouldEnable = this._handles.length > 0 || !this.isDragging();\n if (shouldEnable !== this._nativeInteractionsEnabled) {\n this._nativeInteractionsEnabled = shouldEnable;\n toggleNativeDragInteractions(this._rootElement, shouldEnable);\n }\n }\n /** Removes the manually-added event listeners from the root element. */\n _removeRootElementListeners(element) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.removeEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n }\n /**\n * Applies a `transform` to the root element, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyRootElementTransform(x, y) {\n const transform = getTransform(x, y);\n const styles = this._rootElement.style;\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n // Should be excluded none because none + translate3d(x, y, x) is invalid css\n if (this._initialTransform == null) {\n this._initialTransform = styles.transform && styles.transform != 'none' ? styles.transform : '';\n }\n // Preserve the previous `transform` value, if there was one. Note that we apply our own\n // transform before the user's, because things like rotation can affect which direction\n // the element will be translated towards.\n styles.transform = combineTransforms(transform, this._initialTransform);\n }\n /**\n * Applies a `transform` to the preview, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyPreviewTransform(x, y) {\n // Only apply the initial transform if the preview is a clone of the original element, otherwise\n // it could be completely different and the transform might not make sense anymore.\n const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n const transform = getTransform(x, y);\n this._preview.style.transform = combineTransforms(transform, initialTransform);\n }\n /**\n * Gets the distance that the user has dragged during the current drag sequence.\n * @param currentPosition Current position of the user's pointer.\n */\n _getDragDistance(currentPosition) {\n const pickupPosition = this._pickupPositionOnPage;\n if (pickupPosition) {\n return {\n x: currentPosition.x - pickupPosition.x,\n y: currentPosition.y - pickupPosition.y\n };\n }\n return {\n x: 0,\n y: 0\n };\n }\n /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n _cleanupCachedDimensions() {\n this._boundaryRect = this._previewRect = undefined;\n this._parentPositions.clear();\n }\n /**\n * Checks whether the element is still inside its boundary after the viewport has been resized.\n * If not, the position is adjusted so that the element fits again.\n */\n _containInsideBoundaryOnResize() {\n let {\n x,\n y\n } = this._passiveTransform;\n if (x === 0 && y === 0 || this.isDragging() || !this._boundaryElement) {\n return;\n }\n // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n const elementRect = this._rootElement.getBoundingClientRect();\n const boundaryRect = this._boundaryElement.getBoundingClientRect();\n // It's possible that the element got hidden away after dragging (e.g. by switching to a\n // different tab). Don't do anything in this case so we don't clear the user's position.\n if (boundaryRect.width === 0 && boundaryRect.height === 0 || elementRect.width === 0 && elementRect.height === 0) {\n return;\n }\n const leftOverflow = boundaryRect.left - elementRect.left;\n const rightOverflow = elementRect.right - boundaryRect.right;\n const topOverflow = boundaryRect.top - elementRect.top;\n const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n // If the element has become wider than the boundary, we can't\n // do much to make it fit so we just anchor it to the left.\n if (boundaryRect.width > elementRect.width) {\n if (leftOverflow > 0) {\n x += leftOverflow;\n }\n if (rightOverflow > 0) {\n x -= rightOverflow;\n }\n } else {\n x = 0;\n }\n // If the element has become taller than the boundary, we can't\n // do much to make it fit so we just anchor it to the top.\n if (boundaryRect.height > elementRect.height) {\n if (topOverflow > 0) {\n y += topOverflow;\n }\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n }\n } else {\n y = 0;\n }\n if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n this.setFreeDragPosition({\n y,\n x\n });\n }\n }\n /** Gets the drag start delay, based on the event type. */\n _getDragStartDelay(event) {\n const value = this.dragStartDelay;\n if (typeof value === 'number') {\n return value;\n } else if (isTouchEvent(event)) {\n return value.touch;\n }\n return value ? value.mouse : 0;\n }\n /** Updates the internal state of the draggable element when scrolling has occurred. */\n _updateOnScroll(event) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n const target = _getEventTarget(event);\n // ClientRect dimensions are based on the scroll position of the page and its parent\n // node so we have to update the cached boundary ClientRect if the user has scrolled.\n if (this._boundaryRect && target !== this._boundaryElement && target.contains(this._boundaryElement)) {\n adjustClientRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n }\n this._pickupPositionOnPage.x += scrollDifference.left;\n this._pickupPositionOnPage.y += scrollDifference.top;\n // If we're in free drag mode, we have to update the active transform, because\n // it isn't relative to the viewport like the preview inside a drop list.\n if (!this._dropContainer) {\n this._activeTransform.x -= scrollDifference.left;\n this._activeTransform.y -= scrollDifference.top;\n this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n }\n }\n }\n /** Gets the scroll position of the viewport. */\n _getViewportScrollPosition() {\n return this._parentPositions.positions.get(this._document)?.scrollPosition || this._parentPositions.getViewportScrollPosition();\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (this._cachedShadowRoot === undefined) {\n this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n }\n return this._cachedShadowRoot;\n }\n /** Gets the element into which the drag preview should be inserted. */\n _getPreviewInsertionPoint(initialParent, shadowRoot) {\n const previewContainer = this._previewContainer || 'global';\n if (previewContainer === 'parent') {\n return initialParent;\n }\n if (previewContainer === 'global') {\n const documentRef = this._document;\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n return shadowRoot || documentRef.fullscreenElement || documentRef.webkitFullscreenElement || documentRef.mozFullScreenElement || documentRef.msFullscreenElement || documentRef.body;\n }\n return coerceElement(previewContainer);\n }\n /** Lazily resolves and returns the dimensions of the preview. */\n _getPreviewRect() {\n // Cache the preview element rect if we haven't cached it already or if\n // we cached it too early before the element dimensions were computed.\n if (!this._previewRect || !this._previewRect.width && !this._previewRect.height) {\n this._previewRect = this._preview ? this._preview.getBoundingClientRect() : this._initialClientRect;\n }\n return this._previewRect;\n }\n /** Gets a handle that is the target of an event. */\n _getTargetHandle(event) {\n return this._handles.find(handle => {\n return event.target && (event.target === handle || handle.contains(event.target));\n });\n }\n}\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\n}\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp$1(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event) {\n // This function is called for every pixel that the user has dragged so we need it to be\n // as fast as possible. Since we only bind mouse events and touch events, we can assume\n // that if the event's name starts with `t`, it's a touch event.\n return event.type[0] === 't';\n}\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nfunction getRootNode(viewRef, _document) {\n const rootNodes = viewRef.rootNodes;\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0];\n }\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nfunction matchElementSize(target, sourceRect) {\n target.style.width = `${sourceRect.width}px`;\n target.style.height = `${sourceRect.height}px`;\n target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nfunction moveItemInArray(array, fromIndex, toIndex) {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n if (from === to) {\n return;\n }\n const target = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = target;\n}\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nfunction transferArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nfunction copyArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n}\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value, max) {\n return Math.max(0, Math.min(max, value));\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nclass SingleAxisSortStrategy {\n constructor(_element, _dragDropRegistry) {\n this._element = _element;\n this._dragDropRegistry = _dragDropRegistry;\n /** Cache of the dimensions of all the items inside the container. */\n this._itemPositions = [];\n /** Direction in which the list is oriented. */\n this.orientation = 'vertical';\n /**\n * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n this._previousSwap = {\n drag: null,\n delta: 0,\n overlaps: false\n };\n }\n /**\n * To be called when the drag sequence starts.\n * @param items Items that are currently in the list.\n */\n start(items) {\n this.withItems(items);\n }\n /**\n * To be called when an item is being sorted.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n sort(item, pointerX, pointerY, pointerDelta) {\n const siblings = this._itemPositions;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n if (newIndex === -1 && siblings.length > 0) {\n return null;\n }\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n // How many pixels the item's placeholder should be offset.\n const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n // How many pixels all the other items should be offset.\n const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem ? item.getPlaceholderElement() : sibling.drag.getRootElement();\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n // Round the transforms since some browsers will\n // blur the elements, for sub-pixel transforms.\n elementToOffset.style.transform = combineTransforms(`translate3d(${Math.round(sibling.offset)}px, 0, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = combineTransforms(`translate3d(0, ${Math.round(sibling.offset)}px, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n // Note that it's important that we do this after the client rects have been adjusted.\n this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n return {\n previousIndex: currentIndex,\n currentIndex: newIndex\n };\n }\n /**\n * Called when an item is being moved into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n const newIndex = index == null || index < 0 ?\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n this._getItemIndexFromPointerPosition(item, pointerX, pointerY) : index;\n const activeDraggables = this._activeDraggables;\n const currentIndex = activeDraggables.indexOf(item);\n const placeholder = item.getPlaceholderElement();\n let newPositionReference = activeDraggables[newIndex];\n // If the item at the new position is the same as the item that is being dragged,\n // it means that we're trying to restore the item to its initial position. In this\n // case we should use the next item from the list as the reference.\n if (newPositionReference === item) {\n newPositionReference = activeDraggables[newIndex + 1];\n }\n // If we didn't find a new position reference, it means that either the item didn't start off\n // in this container, or that the item requested to be inserted at the end of the list.\n if (!newPositionReference && (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) && this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n newPositionReference = activeDraggables[0];\n }\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\n }\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement.insertBefore(placeholder, element);\n activeDraggables.splice(newIndex, 0, item);\n } else {\n coerceElement(this._element).appendChild(placeholder);\n activeDraggables.push(item);\n }\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n // Note that usually `start` is called together with `enter` when an item goes into a new\n // container. This will cache item positions, but we need to refresh them since the amount\n // of items has changed.\n this._cacheItemPositions();\n }\n /** Sets the items that are currently part of the list. */\n withItems(items) {\n this._activeDraggables = items.slice();\n this._cacheItemPositions();\n }\n /** Assigns a sort predicate to the strategy. */\n withSortPredicate(predicate) {\n this._sortPredicate = predicate;\n }\n /** Resets the strategy to its initial state before dragging was started. */\n reset() {\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => {\n const rootElement = item.getRootElement();\n if (rootElement) {\n const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n rootElement.style.transform = initialTransform || '';\n }\n });\n this._itemPositions = [];\n this._activeDraggables = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n }\n /**\n * Gets a snapshot of items currently in the list.\n * Can include items that we dragged in from another list.\n */\n getActiveItemsSnapshot() {\n return this._activeDraggables;\n }\n /** Gets the index of a specific item. */\n getItemIndex(item) {\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this.direction === 'rtl' ? this._itemPositions.slice().reverse() : this._itemPositions;\n return items.findIndex(currentItem => currentItem.drag === item);\n }\n /** Used to notify the strategy that the scroll position has changed. */\n updateOnScroll(topDifference, leftDifference) {\n // Since we know the amount that the user has scrolled we can shift all of the\n // client rectangles ourselves. This is cheaper than re-measuring everything and\n // we can avoid inconsistent behavior where we might be measuring the element before\n // its position has changed.\n this._itemPositions.forEach(({\n clientRect\n }) => {\n adjustClientRect(clientRect, topDifference, leftDifference);\n });\n // We need two loops for this, because we want all of the cached\n // positions to be up-to-date before we re-sort the item.\n this._itemPositions.forEach(({\n drag\n }) => {\n if (this._dragDropRegistry.isDragging(drag)) {\n // We need to re-sort the item manually, because the pointer move\n // events won't be dispatched while the user is scrolling.\n drag._sortFromLastPointerPosition();\n }\n });\n }\n /** Refreshes the position cache of the items and sibling containers. */\n _cacheItemPositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._itemPositions = this._activeDraggables.map(drag => {\n const elementToMeasure = drag.getVisibleElement();\n return {\n drag,\n offset: 0,\n initialTransform: elementToMeasure.style.transform || '',\n clientRect: getMutableClientRect(elementToMeasure)\n };\n }).sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left : a.clientRect.top - b.clientRect.top;\n });\n }\n /**\n * Gets the offset in pixels by which the item that is being dragged should be moved.\n * @param currentPosition Current position of the item.\n * @param newPosition Position of the item where the current item should be moved.\n * @param delta Direction in which the user is moving.\n */\n _getItemOffsetPx(currentPosition, newPosition, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n let itemOffset = isHorizontal ? newPosition.left - currentPosition.left : newPosition.top - currentPosition.top;\n // Account for differences in the item width/height.\n if (delta === -1) {\n itemOffset += isHorizontal ? newPosition.width - currentPosition.width : newPosition.height - currentPosition.height;\n }\n return itemOffset;\n }\n /**\n * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n * @param currentIndex Index of the item currently being dragged.\n * @param siblings All of the items in the list.\n * @param delta Direction in which the user is moving.\n */\n _getSiblingOffsetPx(currentIndex, siblings, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const currentPosition = siblings[currentIndex].clientRect;\n const immediateSibling = siblings[currentIndex + delta * -1];\n let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n if (immediateSibling) {\n const start = isHorizontal ? 'left' : 'top';\n const end = isHorizontal ? 'right' : 'bottom';\n // Get the spacing between the start of the current item and the end of the one immediately\n // after it in the direction in which the user is dragging, or vice versa. We add it to the\n // offset in order to push the element to where it will be when it's inline and is influenced\n // by the `margin` of its siblings.\n if (delta === -1) {\n siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n } else {\n siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n }\n }\n return siblingOffset;\n }\n /**\n * Checks if pointer is entering in the first position\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n */\n _shouldEnterAsFirstChild(pointerX, pointerY) {\n if (!this._activeDraggables.length) {\n return false;\n }\n const itemPositions = this._itemPositions;\n const isHorizontal = this.orientation === 'horizontal';\n // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n if (reversed) {\n const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n } else {\n const firstItemRect = itemPositions[0].clientRect;\n return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n }\n }\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n _getItemIndexFromPointerPosition(item, pointerX, pointerY, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const index = this._itemPositions.findIndex(({\n drag,\n clientRect\n }) => {\n // Skip the item itself.\n if (drag === item) {\n return false;\n }\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n // If the user is still hovering over the same item as last time, their cursor hasn't left\n // the item after we made the swap, and they didn't change the direction in which they're\n // dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag && this._previousSwap.overlaps && direction === this._previousSwap.delta) {\n return false;\n }\n }\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right) : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n });\n return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n }\n}\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nclass DropListRef {\n constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {\n this._dragDropRegistry = _dragDropRegistry;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n /** Whether starting a dragging sequence from this container is disabled. */\n this.disabled = false;\n /** Whether sorting items within the list is disabled. */\n this.sortingDisabled = false;\n /**\n * Whether auto-scrolling the view when the user\n * moves their pointer close to the edges is disabled.\n */\n this.autoScrollDisabled = false;\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n this.autoScrollStep = 2;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Function that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits right before dragging has started. */\n this.beforeStarted = new Subject();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new Subject();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new Subject();\n /** Emits when the user drops an item inside the container. */\n this.dropped = new Subject();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new Subject();\n /** Emits when a dragging sequence is started in a list connected to the current one. */\n this.receivingStarted = new Subject();\n /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n this.receivingStopped = new Subject();\n /** Whether an item in the list is being dragged. */\n this._isDragging = false;\n /** Draggable items in the container. */\n this._draggables = [];\n /** Drop lists that are connected to the current one. */\n this._siblings = [];\n /** Connected siblings that currently have a dragged item. */\n this._activeSiblings = new Set();\n /** Subscription to the window being scrolled. */\n this._viewportScrollSubscription = Subscription.EMPTY;\n /** Vertical direction in which the list is currently scrolling. */\n this._verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n /** Horizontal direction in which the list is currently scrolling. */\n this._horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n /** Used to signal to the current auto-scroll sequence when to stop. */\n this._stopScrollTimers = new Subject();\n /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n this._cachedShadowRoot = null;\n /** Starts the interval that'll auto-scroll the element. */\n this._startScrollInterval = () => {\n this._stopScrolling();\n interval(0, animationFrameScheduler).pipe(takeUntil(this._stopScrollTimers)).subscribe(() => {\n const node = this._scrollNode;\n const scrollStep = this.autoScrollStep;\n if (this._verticalScrollDirection === 1 /* AutoScrollVerticalDirection.UP */) {\n node.scrollBy(0, -scrollStep);\n } else if (this._verticalScrollDirection === 2 /* AutoScrollVerticalDirection.DOWN */) {\n node.scrollBy(0, scrollStep);\n }\n if (this._horizontalScrollDirection === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n node.scrollBy(-scrollStep, 0);\n } else if (this._horizontalScrollDirection === 2 /* AutoScrollHorizontalDirection.RIGHT */) {\n node.scrollBy(scrollStep, 0);\n }\n });\n };\n this.element = coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document);\n this._sortStrategy = new SingleAxisSortStrategy(this.element, _dragDropRegistry);\n this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n }\n /** Removes the drop list functionality from the DOM element. */\n dispose() {\n this._stopScrolling();\n this._stopScrollTimers.complete();\n this._viewportScrollSubscription.unsubscribe();\n this.beforeStarted.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this.sorted.complete();\n this.receivingStarted.complete();\n this.receivingStopped.complete();\n this._activeSiblings.clear();\n this._scrollNode = null;\n this._parentPositions.clear();\n this._dragDropRegistry.removeDropContainer(this);\n }\n /** Whether an item from this list is currently being dragged. */\n isDragging() {\n return this._isDragging;\n }\n /** Starts dragging an item. */\n start() {\n this._draggingStarted();\n this._notifyReceivingSiblings();\n }\n /**\n * Attempts to move an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n this._draggingStarted();\n // If sorting is disabled, we want the item to return to its starting\n // position if the user is returning it to its initial container.\n if (index == null && this.sortingDisabled) {\n index = this._draggables.indexOf(item);\n }\n this._sortStrategy.enter(item, pointerX, pointerY, index);\n // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n // can change when the sort strategy moves the item around inside `enter`.\n this._cacheParentPositions();\n // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n this._notifyReceivingSiblings();\n this.entered.next({\n item,\n container: this,\n currentIndex: this.getItemIndex(item)\n });\n }\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item) {\n this._reset();\n this.exited.next({\n item,\n container: this\n });\n }\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousIndex Index of the item when dragging started.\n * @param previousContainer Container from which the item got dragged in.\n * @param isPointerOverContainer Whether the user's pointer was over the\n * container when the item was dropped.\n * @param distance Distance the user has dragged since the start of the dragging sequence.\n * @param event Event that triggered the dropping sequence.\n *\n * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n */\n drop(item, currentIndex, previousIndex, previousContainer, isPointerOverContainer, distance, dropPoint, event = {}) {\n this._reset();\n this.dropped.next({\n item,\n currentIndex,\n previousIndex,\n container: this,\n previousContainer,\n isPointerOverContainer,\n distance,\n dropPoint,\n event\n });\n }\n /**\n * Sets the draggable items that are a part of this list.\n * @param items Items that are a part of this list.\n */\n withItems(items) {\n const previousItems = this._draggables;\n this._draggables = items;\n items.forEach(item => item._withDropContainer(this));\n if (this.isDragging()) {\n const draggedItems = previousItems.filter(item => item.isDragging());\n // If all of the items being dragged were removed\n // from the list, abort the current drag sequence.\n if (draggedItems.every(item => items.indexOf(item) === -1)) {\n this._reset();\n } else {\n this._sortStrategy.withItems(this._draggables);\n }\n }\n return this;\n }\n /** Sets the layout direction of the drop list. */\n withDirection(direction) {\n this._sortStrategy.direction = direction;\n return this;\n }\n /**\n * Sets the containers that are connected to this one. When two or more containers are\n * connected, the user will be allowed to transfer items between them.\n * @param connectedTo Other containers that the current containers should be connected to.\n */\n connectedTo(connectedTo) {\n this._siblings = connectedTo.slice();\n return this;\n }\n /**\n * Sets the orientation of the container.\n * @param orientation New orientation for the container.\n */\n withOrientation(orientation) {\n // TODO(crisbeto): eventually we should be constructing the new sort strategy here based on\n // the new orientation. For now we can assume that it'll always be `SingleAxisSortStrategy`.\n this._sortStrategy.orientation = orientation;\n return this;\n }\n /**\n * Sets which parent elements are can be scrolled while the user is dragging.\n * @param elements Elements that can be scrolled.\n */\n withScrollableParents(elements) {\n const element = coerceElement(this.element);\n // We always allow the current element to be scrollable\n // so we need to ensure that it's in the array.\n this._scrollableElements = elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n return this;\n }\n /** Gets the scrollable parents that are registered with this drop container. */\n getScrollableParents() {\n return this._scrollableElements;\n }\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item) {\n return this._isDragging ? this._sortStrategy.getItemIndex(item) : this._draggables.indexOf(item);\n }\n /**\n * Whether the list is able to receive the item that\n * is currently being dragged inside a connected drop list.\n */\n isReceiving() {\n return this._activeSiblings.size > 0;\n }\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item, pointerX, pointerY, pointerDelta) {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled || !this._clientRect || !isPointerNearClientRect(this._clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n if (result) {\n this.sorted.next({\n previousIndex: result.previousIndex,\n currentIndex: result.currentIndex,\n container: this,\n item\n });\n }\n }\n /**\n * Checks whether the user's pointer is close to the edges of either the\n * viewport or the drop list and starts the auto-scroll sequence.\n * @param pointerX User's pointer position along the x axis.\n * @param pointerY User's pointer position along the y axis.\n */\n _startScrollingIfNecessary(pointerX, pointerY) {\n if (this.autoScrollDisabled) {\n return;\n }\n let scrollNode;\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Check whether we should start scrolling any of the parent containers.\n this._parentPositions.positions.forEach((position, element) => {\n // We have special handling for the `document` below. Also this would be\n // nicer with a for...of loop, but it requires changing a compiler flag.\n if (element === this._document || !position.clientRect || scrollNode) {\n return;\n }\n if (isPointerNearClientRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, pointerX, pointerY);\n if (verticalScrollDirection || horizontalScrollDirection) {\n scrollNode = element;\n }\n }\n });\n // Otherwise check if we can start scrolling the viewport.\n if (!verticalScrollDirection && !horizontalScrollDirection) {\n const {\n width,\n height\n } = this._viewportRuler.getViewportSize();\n const clientRect = {\n width,\n height,\n top: 0,\n right: width,\n bottom: height,\n left: 0\n };\n verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);\n scrollNode = window;\n }\n if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection || horizontalScrollDirection !== this._horizontalScrollDirection || scrollNode !== this._scrollNode)) {\n this._verticalScrollDirection = verticalScrollDirection;\n this._horizontalScrollDirection = horizontalScrollDirection;\n this._scrollNode = scrollNode;\n if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n this._ngZone.runOutsideAngular(this._startScrollInterval);\n } else {\n this._stopScrolling();\n }\n }\n }\n /** Stops any currently-running auto-scroll sequences. */\n _stopScrolling() {\n this._stopScrollTimers.next();\n }\n /** Starts the dragging sequence within the list. */\n _draggingStarted() {\n const styles = coerceElement(this.element).style;\n this.beforeStarted.next();\n this._isDragging = true;\n // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n // scrolling. The browser seems to round the value based on the snapping points which means\n // that we can't increment/decrement the scroll position.\n this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n styles.scrollSnapType = styles.msScrollSnapType = 'none';\n this._sortStrategy.start(this._draggables);\n this._cacheParentPositions();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n }\n /** Caches the positions of the configured scrollable parents. */\n _cacheParentPositions() {\n const element = coerceElement(this.element);\n this._parentPositions.cache(this._scrollableElements);\n // The list element is always in the `scrollableElements`\n // so we can take advantage of the cached `ClientRect`.\n this._clientRect = this._parentPositions.positions.get(element).clientRect;\n }\n /** Resets the container to its initial state. */\n _reset() {\n this._isDragging = false;\n const styles = coerceElement(this.element).style;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n this._siblings.forEach(sibling => sibling._stopReceiving(this));\n this._sortStrategy.reset();\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\n }\n /**\n * Checks whether the user's pointer is positioned over the container.\n * @param x Pointer position along the X axis.\n * @param y Pointer position along the Y axis.\n */\n _isOverContainer(x, y) {\n return this._clientRect != null && isInsideClientRect(this._clientRect, x, y);\n }\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item, x, y) {\n return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n }\n /**\n * Checks whether the drop list can receive the passed-in item.\n * @param item Item that is being dragged into the list.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReceive(item, x, y) {\n if (!this._clientRect || !isInsideClientRect(this._clientRect, x, y) || !this.enterPredicate(item, this)) {\n return false;\n }\n const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y);\n // If there's no element at the pointer position, then\n // the client rect is probably scrolled out of the view.\n if (!elementFromPoint) {\n return false;\n }\n const nativeElement = coerceElement(this.element);\n // The `ClientRect`, that we're using to find the container over which the user is\n // hovering, doesn't give us any information on whether the element has been scrolled\n // out of the view or whether it's overlapping with other containers. This means that\n // we could end up transferring the item into a container that's invisible or is positioned\n // below another one. We use the result from `elementFromPoint` to get the top-most element\n // at the pointer position and to find whether it's one of the intersecting drop containers.\n return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);\n }\n /**\n * Called by one of the connected drop lists when a dragging sequence has started.\n * @param sibling Sibling in which dragging has started.\n */\n _startReceiving(sibling, items) {\n const activeSiblings = this._activeSiblings;\n if (!activeSiblings.has(sibling) && items.every(item => {\n // Note that we have to add an exception to the `enterPredicate` for items that started off\n // in this drop list. The drag ref has logic that allows an item to return to its initial\n // container, if it has left the initial container and none of the connected containers\n // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n })) {\n activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\n this.receivingStarted.next({\n initiator: sibling,\n receiver: this,\n items\n });\n }\n }\n /**\n * Called by a connected drop list when dragging has stopped.\n * @param sibling Sibling whose dragging has stopped.\n */\n _stopReceiving(sibling) {\n this._activeSiblings.delete(sibling);\n this._viewportScrollSubscription.unsubscribe();\n this.receivingStopped.next({\n initiator: sibling,\n receiver: this\n });\n }\n /**\n * Starts listening to scroll events on the viewport.\n * Used for updating the internal state of the list.\n */\n _listenToScrollEvents() {\n this._viewportScrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(event => {\n if (this.isDragging()) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n }\n } else if (this.isReceiving()) {\n this._cacheParentPositions();\n }\n });\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (!this._cachedShadowRoot) {\n const shadowRoot = _getShadowRoot(coerceElement(this.element));\n this._cachedShadowRoot = shadowRoot || this._document;\n }\n return this._cachedShadowRoot;\n }\n /** Notifies any siblings that may potentially receive the item. */\n _notifyReceivingSiblings() {\n const draggedItems = this._sortStrategy.getActiveItemsSnapshot().filter(item => item.isDragging());\n this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n }\n}\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect, pointerY) {\n const {\n top,\n bottom,\n height\n } = clientRect;\n const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n return 1 /* AutoScrollVerticalDirection.UP */;\n } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n return 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n return 0 /* AutoScrollVerticalDirection.NONE */;\n}\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect, pointerX) {\n const {\n left,\n right,\n width\n } = clientRect;\n const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n return 1 /* AutoScrollHorizontalDirection.LEFT */;\n } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n return 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n return 0 /* AutoScrollHorizontalDirection.NONE */;\n}\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(element, clientRect, pointerX, pointerY) {\n const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Note that we here we do some extra checks for whether the element is actually scrollable in\n // a certain direction and we only assign the scroll direction if it is. We do this so that we\n // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n if (computedVertical) {\n const scrollTop = element.scrollTop;\n if (computedVertical === 1 /* AutoScrollVerticalDirection.UP */) {\n if (scrollTop > 0) {\n verticalScrollDirection = 1 /* AutoScrollVerticalDirection.UP */;\n }\n } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n verticalScrollDirection = 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n }\n if (computedHorizontal) {\n const scrollLeft = element.scrollLeft;\n if (computedHorizontal === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n if (scrollLeft > 0) {\n horizontalScrollDirection = 1 /* AutoScrollHorizontalDirection.LEFT */;\n }\n } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n horizontalScrollDirection = 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n }\n return [verticalScrollDirection, horizontalScrollDirection];\n}\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false,\n capture: true\n});\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\nlet DragDropRegistry = /*#__PURE__*/(() => {\n class DragDropRegistry {\n constructor(_ngZone, _document) {\n this._ngZone = _ngZone;\n /** Registered drop container instances. */\n this._dropInstances = new Set();\n /** Registered drag item instances. */\n this._dragInstances = new Set();\n /** Drag item instances that are currently being dragged. */\n this._activeDragInstances = [];\n /** Keeps track of the event listeners that we've bound to the `document`. */\n this._globalListeners = new Map();\n /**\n * Predicate function to check if an item is being dragged. Moved out into a property,\n * because it'll be called a lot and we don't want to create a new function every time.\n */\n this._draggingPredicate = item => item.isDragging();\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerMove = new Subject();\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerUp = new Subject();\n /**\n * Emits when the viewport has been scrolled while the user is dragging an item.\n * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n * @breaking-change 13.0.0\n */\n this.scroll = new Subject();\n /**\n * Event listener that will prevent the default browser action while the user is dragging.\n * @param event Event whose default action should be prevented.\n */\n this._preventDefaultWhileDragging = event => {\n if (this._activeDragInstances.length > 0) {\n event.preventDefault();\n }\n };\n /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n this._persistentTouchmoveListener = event => {\n if (this._activeDragInstances.length > 0) {\n // Note that we only want to prevent the default action after dragging has actually started.\n // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n // but it could be pushed back if the user has set up a drag delay or threshold.\n if (this._activeDragInstances.some(this._draggingPredicate)) {\n event.preventDefault();\n }\n this.pointerMove.next(event);\n }\n };\n this._document = _document;\n }\n /** Adds a drop container to the registry. */\n registerDropContainer(drop) {\n if (!this._dropInstances.has(drop)) {\n this._dropInstances.add(drop);\n }\n }\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag) {\n this._dragInstances.add(drag);\n // The `touchmove` event gets bound once, ahead of time, because WebKit\n // won't preventDefault on a dynamically-added `touchmove` listener.\n // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active,\n // because newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n });\n }\n }\n /** Removes a drop container from the registry. */\n removeDropContainer(drop) {\n this._dropInstances.delete(drop);\n }\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n }\n }\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag, event) {\n // Do not process the same drag twice to avoid memory leaks and redundant listeners\n if (this._activeDragInstances.indexOf(drag) > -1) {\n return;\n }\n this._activeDragInstances.push(drag);\n if (this._activeDragInstances.length === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners.set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: e => this.pointerUp.next(e),\n options: true\n }).set('scroll', {\n handler: e => this.scroll.next(e),\n // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n // the document. See https://github.com/angular/components/issues/17144.\n options: true\n })\n // Preventing the default action on `mousemove` isn't enough to disable text selection\n // on Safari so we need to prevent the selection event as well. Alternatively this can\n // be done by setting `user-select: none` on the `body`, however it has causes a style\n // recalculation which can be expensive on pages with a lot of elements.\n .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions\n });\n // We don't have to bind a move event for touch drag sequences, because\n // we already have a persistent global one bound from `registerDragItem`.\n if (!isTouchEvent) {\n this._globalListeners.set('mousemove', {\n handler: e => this.pointerMove.next(e),\n options: activeCapturingEventOptions\n });\n }\n this._ngZone.runOutsideAngular(() => {\n this._globalListeners.forEach((config, name) => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n /** Stops dragging a drag item instance. */\n stopDragging(drag) {\n const index = this._activeDragInstances.indexOf(drag);\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n }\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag) {\n return this._activeDragInstances.indexOf(drag) > -1;\n }\n /**\n * Gets a stream that will emit when any element on the page is scrolled while an item is being\n * dragged.\n * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n * Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n * be used to include an additional top-level listener at the shadow root level.\n */\n scrolled(shadowRoot) {\n const streams = [this.scroll];\n if (shadowRoot && shadowRoot !== this._document) {\n // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n // because we want to guarantee that the event is bound outside of the `NgZone`. With\n // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n streams.push(new Observable(observer => {\n return this._ngZone.runOutsideAngular(() => {\n const eventOptions = true;\n const callback = event => {\n if (this._activeDragInstances.length) {\n observer.next(event);\n }\n };\n shadowRoot.addEventListener('scroll', callback, eventOptions);\n return () => {\n shadowRoot.removeEventListener('scroll', callback, eventOptions);\n };\n });\n }));\n }\n return merge(...streams);\n }\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n /** Clears out the global event listeners from the `document`. */\n _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }\n static {\n this.ɵfac = function DragDropRegistry_Factory(t) {\n return new (t || DragDropRegistry)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDropRegistry,\n factory: DragDropRegistry.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDropRegistry;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5\n};\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\nlet DragDrop = /*#__PURE__*/(() => {\n class DragDrop {\n constructor(_document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n }\n /**\n * Turns an element into a draggable item.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\n createDrag(element, config = DEFAULT_CONFIG) {\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);\n }\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n createDropList(element) {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);\n }\n static {\n this.ɵfac = function DragDrop_Factory(t) {\n return new (t || DragDrop)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ViewportRuler), i0.ɵɵinject(DragDropRegistry));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDrop,\n factory: DragDrop.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDrop;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nconst CDK_DRAG_PARENT = /*#__PURE__*/new InjectionToken('CDK_DRAG_PARENT');\n\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nfunction assertElementNode(node, name) {\n if (node.nodeType !== 1) {\n throw Error(`${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`);\n }\n}\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_HANDLE = /*#__PURE__*/new InjectionToken('CdkDragHandle');\n/** Handle that can be used to drag a CdkDrag instance. */\nlet CdkDragHandle = /*#__PURE__*/(() => {\n class CdkDragHandle {\n /** Whether starting to drag through this handle is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._stateChanges.next(this);\n }\n constructor(element, parentDrag) {\n this.element = element;\n /** Emits when the state of the handle has changed. */\n this._stateChanges = new Subject();\n this._disabled = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n this._parentDrag = parentDrag;\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n static {\n this.ɵfac = function CdkDragHandle_Factory(t) {\n return new (t || CdkDragHandle)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragHandle,\n selectors: [[\"\", \"cdkDragHandle\", \"\"]],\n hostAttrs: [1, \"cdk-drag-handle\"],\n inputs: {\n disabled: [i0.ɵɵInputFlags.None, \"cdkDragHandleDisabled\", \"disabled\"]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_HANDLE,\n useExisting: CdkDragHandle\n }])]\n });\n }\n }\n return CdkDragHandle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PLACEHOLDER = /*#__PURE__*/new InjectionToken('CdkDragPlaceholder');\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\nlet CdkDragPlaceholder = /*#__PURE__*/(() => {\n class CdkDragPlaceholder {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static {\n this.ɵfac = function CdkDragPlaceholder_Factory(t) {\n return new (t || CdkDragPlaceholder)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPlaceholder,\n selectors: [[\"ng-template\", \"cdkDragPlaceholder\", \"\"]],\n inputs: {\n data: \"data\"\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PLACEHOLDER,\n useExisting: CdkDragPlaceholder\n }])]\n });\n }\n }\n return CdkDragPlaceholder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PREVIEW = /*#__PURE__*/new InjectionToken('CdkDragPreview');\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\nlet CdkDragPreview = /*#__PURE__*/(() => {\n class CdkDragPreview {\n /** Whether the preview should preserve the same size as the item that is being dragged. */\n get matchSize() {\n return this._matchSize;\n }\n set matchSize(value) {\n this._matchSize = coerceBooleanProperty(value);\n }\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._matchSize = false;\n }\n static {\n this.ɵfac = function CdkDragPreview_Factory(t) {\n return new (t || CdkDragPreview)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPreview,\n selectors: [[\"ng-template\", \"cdkDragPreview\", \"\"]],\n inputs: {\n data: \"data\",\n matchSize: \"matchSize\"\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PREVIEW,\n useExisting: CdkDragPreview\n }])]\n });\n }\n }\n return CdkDragPreview;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nconst CDK_DRAG_CONFIG = /*#__PURE__*/new InjectionToken('CDK_DRAG_CONFIG');\nconst DRAG_HOST_CLASS = 'cdk-drag';\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST = /*#__PURE__*/new InjectionToken('CdkDropList');\n/** Element that can be moved inside a CdkDropList container. */\nlet CdkDrag = /*#__PURE__*/(() => {\n class CdkDrag {\n static {\n this._dragInstances = [];\n }\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || this.dropContainer && this.dropContainer.disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._dragRef.disabled = this._disabled;\n }\n constructor(/** Element that the draggable is attached to. */\n element, /** Droppable container that the draggable is a part of. */\n dropContainer,\n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n _document, _ngZone, _viewContainerRef, config, _dir, dragDrop, _changeDetectorRef, _selfHandle, _parentDrag) {\n this.element = element;\n this.dropContainer = dropContainer;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._selfHandle = _selfHandle;\n this._parentDrag = _parentDrag;\n this._destroyed = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new EventEmitter();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new EventEmitter();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new EventEmitter();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new EventEmitter();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new EventEmitter();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new EventEmitter();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = new Observable(observer => {\n const subscription = this._dragRef.moved.pipe(map(movedEvent => ({\n source: this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance\n }))).subscribe(observer);\n return () => {\n subscription.unsubscribe();\n };\n });\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null ? config.pointerDirectionChangeThreshold : 5,\n zIndex: config?.zIndex\n });\n this._dragRef.data = this;\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(this);\n if (config) {\n this._assignDefaults(config);\n }\n // Note that usually the container is assigned when the drop list is picks up the item, but in\n // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n // where there are no items on the first change detection pass, but the items get picked up as\n // soon as the user triggers another pass by dragging. This is a problem, because the item would\n // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n // is too late since the two modes save different kinds of information. We work around it by\n // assigning the drop container both from here and the list.\n if (dropContainer) {\n this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\n }\n this._syncInputs(this._dragRef);\n this._handleEvents(this._dragRef);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._dragRef.getPlaceholderElement();\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._dragRef.getRootElement();\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._dragRef.reset();\n }\n /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n return this._dragRef.getFreeDragPosition();\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._dragRef.setFreeDragPosition(value);\n }\n ngAfterViewInit() {\n // Normally this isn't in the zone, but it can cause major performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this._ngZone.runOutsideAngular(() => {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n this._updateRootElement();\n this._setupHandlesListener();\n if (this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n });\n });\n }\n ngOnChanges(changes) {\n const rootSelectorChange = changes['rootElementSelector'];\n const positionChange = changes['freeDragPosition'];\n // We don't have to react to the first change since it's being\n // handled in `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n // Skip the first change since it's being handled in `ngAfterViewInit`.\n if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n }\n ngOnDestroy() {\n if (this.dropContainer) {\n this.dropContainer.removeItem(this);\n }\n const index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n this._ngZone.runOutsideAngular(() => {\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n });\n }\n /** Syncs the root element with the `DragRef`. */\n _updateRootElement() {\n const element = this.element.nativeElement;\n let rootElement = element;\n if (this.rootElementSelector) {\n rootElement = element.closest !== undefined ? element.closest(this.rootElementSelector) :\n // Comment tag doesn't have closest method, so use parent's one.\n element.parentElement?.closest(this.rootElementSelector);\n }\n if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n assertElementNode(rootElement, 'cdkDrag');\n }\n this._dragRef.withRootElement(rootElement || element);\n }\n /** Gets the boundary element, based on the `boundaryElement` value. */\n _getBoundaryElement() {\n const boundary = this.boundaryElement;\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.element.nativeElement.closest(boundary);\n }\n return coerceElement(boundary);\n }\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n _syncInputs(ref) {\n ref.beforeStarted.subscribe(() => {\n if (!ref.isDragging()) {\n const dir = this._dir;\n const dragStartDelay = this.dragStartDelay;\n const placeholder = this._placeholderTemplate ? {\n template: this._placeholderTemplate.templateRef,\n context: this._placeholderTemplate.data,\n viewContainer: this._viewContainerRef\n } : null;\n const preview = this._previewTemplate ? {\n template: this._previewTemplate.templateRef,\n context: this._previewTemplate.data,\n matchSize: this._previewTemplate.matchSize,\n viewContainer: this._viewContainerRef\n } : null;\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.dragStartDelay = typeof dragStartDelay === 'object' && dragStartDelay ? dragStartDelay : coerceNumberProperty(dragStartDelay);\n ref.constrainPosition = this.constrainPosition;\n ref.previewClass = this.previewClass;\n ref.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(placeholder).withPreviewTemplate(preview).withPreviewContainer(this.previewContainer || 'global');\n if (dir) {\n ref.withDirection(dir.value);\n }\n }\n });\n // This only needs to be resolved once.\n ref.beforeStarted.pipe(take(1)).subscribe(() => {\n // If we managed to resolve a parent through DI, use it.\n if (this._parentDrag) {\n ref.withParent(this._parentDrag._dragRef);\n return;\n }\n // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n // the item was projected into another item by something like `ngTemplateOutlet`.\n let parent = this.element.nativeElement.parentElement;\n while (parent) {\n if (parent.classList.contains(DRAG_HOST_CLASS)) {\n ref.withParent(CdkDrag._dragInstances.find(drag => {\n return drag.element.nativeElement === parent;\n })?._dragRef || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n }\n /** Handles the events from the underlying `DragRef`. */\n _handleEvents(ref) {\n ref.started.subscribe(startEvent => {\n this.started.emit({\n source: this,\n event: startEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.released.subscribe(releaseEvent => {\n this.released.emit({\n source: this,\n event: releaseEvent.event\n });\n });\n ref.ended.subscribe(endEvent => {\n this.ended.emit({\n source: this,\n distance: endEvent.distance,\n dropPoint: endEvent.dropPoint,\n event: endEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(enterEvent => {\n this.entered.emit({\n container: enterEvent.container.data,\n item: this,\n currentIndex: enterEvent.currentIndex\n });\n });\n ref.exited.subscribe(exitEvent => {\n this.exited.emit({\n container: exitEvent.container.data,\n item: this\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n item: this,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n });\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n dragStartDelay,\n constrainPosition,\n previewClass,\n boundaryElement,\n draggingDisabled,\n rootElementSelector,\n previewContainer\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n if (constrainPosition) {\n this.constrainPosition = constrainPosition;\n }\n if (previewClass) {\n this.previewClass = previewClass;\n }\n if (boundaryElement) {\n this.boundaryElement = boundaryElement;\n }\n if (rootElementSelector) {\n this.rootElementSelector = rootElementSelector;\n }\n if (previewContainer) {\n this.previewContainer = previewContainer;\n }\n }\n /** Sets up the listener that syncs the handles with the drag ref. */\n _setupHandlesListener() {\n // Listen for any newly-added handles.\n this._handles.changes.pipe(startWith(this._handles),\n // Sync the new handles with the DragRef.\n tap(handles => {\n const childHandleElements = handles.filter(handle => handle._parentDrag === this).map(handle => handle.element);\n // Usually handles are only allowed to be a descendant of the drag element, but if\n // the consumer defined a different drag root, we should allow the drag element\n // itself to be a handle too.\n if (this._selfHandle && this.rootElementSelector) {\n childHandleElements.push(this.element);\n }\n this._dragRef.withHandles(childHandleElements);\n }),\n // Listen if the state of any of the handles changes.\n switchMap(handles => {\n return merge(...handles.map(item => {\n return item._stateChanges.pipe(startWith(item));\n }));\n }), takeUntil(this._destroyed)).subscribe(handleInstance => {\n // Enabled/disable the handle that changed in the DragRef.\n const dragRef = this._dragRef;\n const handle = handleInstance.element.nativeElement;\n handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n });\n }\n static {\n this.ɵfac = function CdkDrag_Factory(t) {\n return new (t || CdkDrag)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DROP_LIST, 12), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(CDK_DRAG_HANDLE, 10), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDrag,\n selectors: [[\"\", \"cdkDrag\", \"\"]],\n contentQueries: function CdkDrag_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_PREVIEW, 5);\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_PLACEHOLDER, 5);\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_HANDLE, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previewTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._placeholderTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._handles = _t);\n }\n },\n hostAttrs: [1, \"cdk-drag\"],\n hostVars: 4,\n hostBindings: function CdkDrag_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"cdk-drag-disabled\", ctx.disabled)(\"cdk-drag-dragging\", ctx._dragRef.isDragging());\n }\n },\n inputs: {\n data: [i0.ɵɵInputFlags.None, \"cdkDragData\", \"data\"],\n lockAxis: [i0.ɵɵInputFlags.None, \"cdkDragLockAxis\", \"lockAxis\"],\n rootElementSelector: [i0.ɵɵInputFlags.None, \"cdkDragRootElement\", \"rootElementSelector\"],\n boundaryElement: [i0.ɵɵInputFlags.None, \"cdkDragBoundary\", \"boundaryElement\"],\n dragStartDelay: [i0.ɵɵInputFlags.None, \"cdkDragStartDelay\", \"dragStartDelay\"],\n freeDragPosition: [i0.ɵɵInputFlags.None, \"cdkDragFreeDragPosition\", \"freeDragPosition\"],\n disabled: [i0.ɵɵInputFlags.None, \"cdkDragDisabled\", \"disabled\"],\n constrainPosition: [i0.ɵɵInputFlags.None, \"cdkDragConstrainPosition\", \"constrainPosition\"],\n previewClass: [i0.ɵɵInputFlags.None, \"cdkDragPreviewClass\", \"previewClass\"],\n previewContainer: [i0.ɵɵInputFlags.None, \"cdkDragPreviewContainer\", \"previewContainer\"]\n },\n outputs: {\n started: \"cdkDragStarted\",\n released: \"cdkDragReleased\",\n ended: \"cdkDragEnded\",\n entered: \"cdkDragEntered\",\n exited: \"cdkDragExited\",\n dropped: \"cdkDragDropped\",\n moved: \"cdkDragMoved\"\n },\n exportAs: [\"cdkDrag\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PARENT,\n useExisting: CdkDrag\n }]), i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return CdkDrag;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST_GROUP = /*#__PURE__*/new InjectionToken('CdkDropListGroup');\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\nlet CdkDropListGroup = /*#__PURE__*/(() => {\n class CdkDropListGroup {\n constructor() {\n /** Drop lists registered inside the group. */\n this._items = new Set();\n this._disabled = false;\n }\n /** Whether starting a dragging sequence from inside this group is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n ngOnDestroy() {\n this._items.clear();\n }\n static {\n this.ɵfac = function CdkDropListGroup_Factory(t) {\n return new (t || CdkDropListGroup)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropListGroup,\n selectors: [[\"\", \"cdkDropListGroup\", \"\"]],\n inputs: {\n disabled: [i0.ɵɵInputFlags.None, \"cdkDropListGroupDisabled\", \"disabled\"]\n },\n exportAs: [\"cdkDropListGroup\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DROP_LIST_GROUP,\n useExisting: CdkDropListGroup\n }])]\n });\n }\n }\n return CdkDropListGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n/** Container that wraps a set of draggable items. */\nlet CdkDropList = /*#__PURE__*/(() => {\n class CdkDropList {\n /** Keeps track of the drop lists that are currently on the page. */\n static {\n this._dropLists = [];\n }\n /** Whether starting a dragging sequence from this container is disabled. */\n get disabled() {\n return this._disabled || !!this._group && this._group.disabled;\n }\n set disabled(value) {\n // Usually we sync the directive and ref state right before dragging starts, in order to have\n // a single point of failure and to avoid having to use setters for everything. `disabled` is\n // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n // the user in a disabled state, so we also need to sync it as it's being set.\n this._dropListRef.disabled = this._disabled = coerceBooleanProperty(value);\n }\n constructor(/** Element that the drop list is attached to. */\n element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {\n this.element = element;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._dir = _dir;\n this._group = _group;\n /** Emits when the list has been destroyed. */\n this._destroyed = new Subject();\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n this.connectedTo = [];\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n this.id = `cdk-drop-list-${_uniqueIdCounter++}`;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits when the user drops an item inside the container. */\n this.dropped = new EventEmitter();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new EventEmitter();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new EventEmitter();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new EventEmitter();\n /**\n * Keeps track of the items that are registered with this container. Historically we used to\n * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n * well which means that we can't handle cases like dragging the headers of a `mat-table`\n * correctly. What we do instead is to have the items register themselves with the container\n * and then we sort them based on their position in the DOM.\n */\n this._unsortedItems = new Set();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n if (config) {\n this._assignDefaults(config);\n }\n this._dropListRef.enterPredicate = (drag, drop) => {\n return this.enterPredicate(drag.data, drop.data);\n };\n this._dropListRef.sortPredicate = (index, drag, drop) => {\n return this.sortPredicate(index, drag.data, drop.data);\n };\n this._setupInputSyncSubscription(this._dropListRef);\n this._handleEvents(this._dropListRef);\n CdkDropList._dropLists.push(this);\n if (_group) {\n _group._items.add(this);\n }\n }\n /** Registers an items with the drop list. */\n addItem(item) {\n this._unsortedItems.add(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Removes an item from the drop list. */\n removeItem(item) {\n this._unsortedItems.delete(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Gets the registered items in the list, sorted by their position in the DOM. */\n getSortedItems() {\n return Array.from(this._unsortedItems).sort((a, b) => {\n const documentPosition = a._dragRef.getVisibleElement().compareDocumentPosition(b._dragRef.getVisibleElement());\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n }\n ngOnDestroy() {\n const index = CdkDropList._dropLists.indexOf(this);\n if (index > -1) {\n CdkDropList._dropLists.splice(index, 1);\n }\n if (this._group) {\n this._group._items.delete(this);\n }\n this._unsortedItems.clear();\n this._dropListRef.dispose();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n _setupInputSyncSubscription(ref) {\n if (this._dir) {\n this._dir.change.pipe(startWith(this._dir.value), takeUntil(this._destroyed)).subscribe(value => ref.withDirection(value));\n }\n ref.beforeStarted.subscribe(() => {\n const siblings = coerceArray(this.connectedTo).map(drop => {\n if (typeof drop === 'string') {\n const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n }\n return correspondingDropList;\n }\n return drop;\n });\n if (this._group) {\n this._group._items.forEach(drop => {\n if (siblings.indexOf(drop) === -1) {\n siblings.push(drop);\n }\n });\n }\n // Note that we resolve the scrollable parents here so that we delay the resolution\n // as long as possible, ensuring that the element is in its final place in the DOM.\n if (!this._scrollableParentsResolved) {\n const scrollableParents = this._scrollDispatcher.getAncestorScrollContainers(this.element).map(scrollable => scrollable.getElementRef().nativeElement);\n this._dropListRef.withScrollableParents(scrollableParents);\n // Only do this once since it involves traversing the DOM and the parents\n // shouldn't be able to change without the drop list being destroyed.\n this._scrollableParentsResolved = true;\n }\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.sortingDisabled = coerceBooleanProperty(this.sortingDisabled);\n ref.autoScrollDisabled = coerceBooleanProperty(this.autoScrollDisabled);\n ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n ref.connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef)).withOrientation(this.orientation);\n });\n }\n /** Handles events from the underlying DropListRef. */\n _handleEvents(ref) {\n ref.beforeStarted.subscribe(() => {\n this._syncItemsWithRef();\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(event => {\n this.entered.emit({\n container: this,\n item: event.item.data,\n currentIndex: event.currentIndex\n });\n });\n ref.exited.subscribe(event => {\n this.exited.emit({\n container: this,\n item: event.item.data\n });\n this._changeDetectorRef.markForCheck();\n });\n ref.sorted.subscribe(event => {\n this.sorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n container: this,\n item: event.item.data\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n item: dropEvent.item.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n // Mark for check since all of these events run outside of change\n // detection and we're not guaranteed for something else to have triggered it.\n this._changeDetectorRef.markForCheck();\n });\n merge(ref.receivingStarted, ref.receivingStopped).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n draggingDisabled,\n sortingDisabled,\n listAutoScrollDisabled,\n listOrientation\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n this.orientation = listOrientation || 'vertical';\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n }\n /** Syncs up the registered drag items with underlying drop list ref. */\n _syncItemsWithRef() {\n this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n }\n static {\n this.ɵfac = function CdkDropList_Factory(t) {\n return new (t || CdkDropList)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ScrollDispatcher), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(CDK_DROP_LIST_GROUP, 12), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropList,\n selectors: [[\"\", \"cdkDropList\", \"\"], [\"cdk-drop-list\"]],\n hostAttrs: [1, \"cdk-drop-list\"],\n hostVars: 7,\n hostBindings: function CdkDropList_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id);\n i0.ɵɵclassProp(\"cdk-drop-list-disabled\", ctx.disabled)(\"cdk-drop-list-dragging\", ctx._dropListRef.isDragging())(\"cdk-drop-list-receiving\", ctx._dropListRef.isReceiving());\n }\n },\n inputs: {\n connectedTo: [i0.ɵɵInputFlags.None, \"cdkDropListConnectedTo\", \"connectedTo\"],\n data: [i0.ɵɵInputFlags.None, \"cdkDropListData\", \"data\"],\n orientation: [i0.ɵɵInputFlags.None, \"cdkDropListOrientation\", \"orientation\"],\n id: \"id\",\n lockAxis: [i0.ɵɵInputFlags.None, \"cdkDropListLockAxis\", \"lockAxis\"],\n disabled: [i0.ɵɵInputFlags.None, \"cdkDropListDisabled\", \"disabled\"],\n sortingDisabled: [i0.ɵɵInputFlags.None, \"cdkDropListSortingDisabled\", \"sortingDisabled\"],\n enterPredicate: [i0.ɵɵInputFlags.None, \"cdkDropListEnterPredicate\", \"enterPredicate\"],\n sortPredicate: [i0.ɵɵInputFlags.None, \"cdkDropListSortPredicate\", \"sortPredicate\"],\n autoScrollDisabled: [i0.ɵɵInputFlags.None, \"cdkDropListAutoScrollDisabled\", \"autoScrollDisabled\"],\n autoScrollStep: [i0.ɵɵInputFlags.None, \"cdkDropListAutoScrollStep\", \"autoScrollStep\"]\n },\n outputs: {\n dropped: \"cdkDropListDropped\",\n entered: \"cdkDropListEntered\",\n exited: \"cdkDropListExited\",\n sorted: \"cdkDropListSorted\"\n },\n exportAs: [\"cdkDropList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([\n // Prevent child drop lists from picking up the same group as their parent.\n {\n provide: CDK_DROP_LIST_GROUP,\n useValue: undefined\n }, {\n provide: CDK_DROP_LIST,\n useExisting: CdkDropList\n }])]\n });\n }\n }\n return CdkDropList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DRAG_DROP_DIRECTIVES = [CdkDropList, CdkDropListGroup, CdkDrag, CdkDragHandle, CdkDragPreview, CdkDragPlaceholder];\nlet DragDropModule = /*#__PURE__*/(() => {\n class DragDropModule {\n static {\n this.ɵfac = function DragDropModule_Factory(t) {\n return new (t || DragDropModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DragDropModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DragDrop],\n imports: [CdkScrollableModule]\n });\n }\n }\n return DragDropModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, moveItemInArray, transferArrayItem };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ContentChildren, ElementRef, ViewChild, Injectable, Inject, EventEmitter, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i2$1 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport * as i1 from '@angular/material/dialog';\nimport { MatDialogConfig, MatDialogModule } from '@angular/material/dialog';\nimport * as i5 from '@angular/material/input';\nimport { MatInputModule } from '@angular/material/input';\nimport * as i3 from '@angular/material/button';\nimport { MatButtonModule } from '@angular/material/button';\nimport { RIGHT_ARROW, LEFT_ARROW } from '@angular/cdk/keycodes';\nimport { Subject, fromEvent, takeUntil, merge } from 'rxjs';\nimport * as i4 from '@angular/material/form-field';\nimport * as i2$2 from '@angular/cdk/drag-drop';\nimport * as i2$3 from '@angular/material/toolbar';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport * as i3$1 from '@angular/material/tooltip';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport * as i4$1 from '@angular/material/icon';\nimport { MatIconModule } from '@angular/material/icon';\nconst _c0 = [[[\"\", \"tdDialogTitle\", \"\"]], [[\"\", \"tdDialogContent\", \"\"]], [[\"\", \"tdDialogActions\", \"\"]]];\nconst _c1 = [\"[tdDialogTitle]\", \"[tdDialogContent]\", \"[tdDialogActions]\"];\nfunction TdDialogComponent_h3_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"h3\", 4);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n }\n}\nfunction TdDialogComponent_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 5);\n i0.ɵɵprojection(1, 1);\n i0.ɵɵelementEnd();\n }\n}\nfunction TdDialogComponent_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵelement(1, \"span\", 7);\n i0.ɵɵprojection(2, 2);\n i0.ɵɵelementEnd();\n }\n}\nfunction TdAlertDialogComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 5);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.title, \" \");\n }\n}\nfunction TdConfirmDialogComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.title, \" \");\n }\n}\nconst _c2 = \".td-dialog-message[_ngcontent-%COMP%]{word-break:break-word}\";\nconst _c3 = [\"input\"];\nconst _c4 = [\"closeBtn\"];\nconst _c5 = [\"acceptBtn\"];\nfunction TdPromptDialogComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.title, \" \");\n }\n}\nconst _c6 = [\"*\"];\nlet TdDialogTitleDirective = /*#__PURE__*/(() => {\n class TdDialogTitleDirective {}\n TdDialogTitleDirective.ɵfac = function TdDialogTitleDirective_Factory(t) {\n return new (t || TdDialogTitleDirective)();\n };\n TdDialogTitleDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TdDialogTitleDirective,\n selectors: [[\"\", \"tdDialogTitle\", \"\"]]\n });\n return TdDialogTitleDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdDialogContentDirective = /*#__PURE__*/(() => {\n class TdDialogContentDirective {}\n TdDialogContentDirective.ɵfac = function TdDialogContentDirective_Factory(t) {\n return new (t || TdDialogContentDirective)();\n };\n TdDialogContentDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TdDialogContentDirective,\n selectors: [[\"\", \"tdDialogContent\", \"\"]]\n });\n return TdDialogContentDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdDialogActionsDirective = /*#__PURE__*/(() => {\n class TdDialogActionsDirective {}\n TdDialogActionsDirective.ɵfac = function TdDialogActionsDirective_Factory(t) {\n return new (t || TdDialogActionsDirective)();\n };\n TdDialogActionsDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TdDialogActionsDirective,\n selectors: [[\"\", \"tdDialogActions\", \"\"]]\n });\n return TdDialogActionsDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdDialogComponent = /*#__PURE__*/(() => {\n class TdDialogComponent {\n ngAfterContentInit() {\n if (this.dialogTitle.length > 1) {\n throw new Error('Duplicate td-dialog-title component at in td-dialog.');\n }\n if (this.dialogContent.length > 1) {\n throw new Error('Duplicate td-dialog-content component at in td-dialog.');\n }\n if (this.dialogActions.length > 1) {\n throw new Error('Duplicate td-dialog-actions component at in td-dialog.');\n }\n }\n }\n TdDialogComponent.ɵfac = function TdDialogComponent_Factory(t) {\n return new (t || TdDialogComponent)();\n };\n TdDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TdDialogComponent,\n selectors: [[\"td-dialog\"]],\n contentQueries: function TdDialogComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TdDialogTitleDirective, 5);\n i0.ɵɵcontentQuery(dirIndex, TdDialogContentDirective, 5);\n i0.ɵɵcontentQuery(dirIndex, TdDialogActionsDirective, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dialogTitle = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dialogContent = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dialogActions = _t);\n }\n },\n ngContentSelectors: _c1,\n decls: 4,\n vars: 3,\n consts: [[1, \"td-dialog-wrapper\"], [\"class\", \"td-dialog-title\", 4, \"ngIf\"], [\"class\", \"td-dialog-content\", 4, \"ngIf\"], [\"class\", \"td-dialog-actions\", 4, \"ngIf\"], [1, \"td-dialog-title\"], [1, \"td-dialog-content\"], [1, \"td-dialog-actions\"], [1, \"td-dialog-spacer\"]],\n template: function TdDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, TdDialogComponent_h3_1_Template, 2, 0, \"h3\", 1)(2, TdDialogComponent_div_2_Template, 2, 0, \"div\", 2)(3, TdDialogComponent_div_3_Template, 3, 0, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.dialogTitle.length > 0);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.dialogContent.length > 0);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.dialogActions.length > 0);\n }\n },\n dependencies: [i2.NgIf],\n styles: [\".td-dialog-title[_ngcontent-%COMP%]{margin-top:0;margin-bottom:20px}.td-dialog-content[_ngcontent-%COMP%]{margin-bottom:16px}.td-dialog-actions[_ngcontent-%COMP%]{position:relative;top:16px;left:16px} [dir=rtl] .td-dialog-actions{right:16px;left:auto}[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .td-dialog-actions[_ngcontent-%COMP%]{flex-direction:row;box-sizing:border-box;display:flex}[_nghost-%COMP%] .td-dialog-actions[_ngcontent-%COMP%] .td-dialog-spacer[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] .td-dialog-actions[_ngcontent-%COMP%] button{text-transform:uppercase;margin-left:8px;padding-left:8px;padding-right:8px;min-width:64px}[dir=rtl] [_nghost-%COMP%] .td-dialog-actions[_ngcontent-%COMP%] button{margin-right:8px;margin-left:inherit}\"]\n });\n return TdDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdAlertDialogComponent = /*#__PURE__*/(() => {\n class TdAlertDialogComponent {\n constructor(_dialogRef) {\n this._dialogRef = _dialogRef;\n this.closeButton = 'CLOSE';\n }\n close() {\n this._dialogRef.close();\n }\n }\n TdAlertDialogComponent.ɵfac = function TdAlertDialogComponent_Factory(t) {\n return new (t || TdAlertDialogComponent)(i0.ɵɵdirectiveInject(i1.MatDialogRef));\n };\n TdAlertDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TdAlertDialogComponent,\n selectors: [[\"td-alert-dialog\"]],\n decls: 8,\n vars: 3,\n consts: [[\"tdDialogTitle\", \"\", 4, \"ngIf\"], [\"tdDialogContent\", \"\"], [1, \"td-dialog-message\"], [\"tdDialogActions\", \"\"], [\"mat-button\", \"\", \"color\", \"accent\", 3, \"click\"], [\"tdDialogTitle\", \"\"]],\n template: function TdAlertDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"td-dialog\");\n i0.ɵɵtemplate(1, TdAlertDialogComponent_div_1_Template, 2, 1, \"div\", 0);\n i0.ɵɵelementStart(2, \"div\", 1)(3, \"span\", 2);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(5, \"div\", 3)(6, \"button\", 4);\n i0.ɵɵlistener(\"click\", function TdAlertDialogComponent_Template_button_click_6_listener() {\n return ctx.close();\n });\n i0.ɵɵtext(7);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.title);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx.message);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate1(\" \", ctx.closeButton, \" \");\n }\n },\n dependencies: [i2.NgIf, i3.MatButton, TdDialogComponent, TdDialogTitleDirective, TdDialogActionsDirective, TdDialogContentDirective],\n styles: [\".td-dialog-message[_ngcontent-%COMP%]{word-break:break-word}\"]\n });\n return TdAlertDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdConfirmDialogComponent = /*#__PURE__*/(() => {\n class TdConfirmDialogComponent {\n constructor(_dialogRef) {\n this._dialogRef = _dialogRef;\n this.cancelButton = 'CANCEL';\n this.acceptButton = 'ACCEPT';\n this.isDestructive = false;\n }\n cancel() {\n this._dialogRef.close(false);\n }\n accept() {\n this._dialogRef.close(true);\n }\n }\n TdConfirmDialogComponent.ɵfac = function TdConfirmDialogComponent_Factory(t) {\n return new (t || TdConfirmDialogComponent)(i0.ɵɵdirectiveInject(i1.MatDialogRef));\n };\n TdConfirmDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TdConfirmDialogComponent,\n selectors: [[\"td-confirm-dialog\"]],\n decls: 12,\n vars: 5,\n consts: [[\"closeBtn\", \"\"], [\"acceptBtn\", \"\"], [\"tdDialogTitle\", \"\", 4, \"ngIf\"], [\"tdDialogContent\", \"\"], [1, \"td-dialog-message\"], [\"tdDialogActions\", \"\"], [\"mat-button\", \"\", 3, \"keydown.arrowright\", \"click\"], [\"mat-button\", \"\", 3, \"keydown.arrowleft\", \"click\", \"color\"], [\"tdDialogTitle\", \"\"]],\n template: function TdConfirmDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"td-dialog\");\n i0.ɵɵtemplate(1, TdConfirmDialogComponent_div_1_Template, 2, 1, \"div\", 2);\n i0.ɵɵelementStart(2, \"div\", 3)(3, \"span\", 4);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(5, \"div\", 5)(6, \"button\", 6, 0);\n i0.ɵɵlistener(\"keydown.arrowright\", function TdConfirmDialogComponent_Template_button_keydown_arrowright_6_listener() {\n i0.ɵɵrestoreView(_r1);\n const acceptBtn_r3 = i0.ɵɵreference(10);\n return i0.ɵɵresetView(acceptBtn_r3.focus());\n })(\"click\", function TdConfirmDialogComponent_Template_button_click_6_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.cancel());\n });\n i0.ɵɵtext(8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"button\", 7, 1);\n i0.ɵɵlistener(\"keydown.arrowleft\", function TdConfirmDialogComponent_Template_button_keydown_arrowleft_9_listener() {\n i0.ɵɵrestoreView(_r1);\n const closeBtn_r4 = i0.ɵɵreference(7);\n return i0.ɵɵresetView(closeBtn_r4.focus());\n })(\"click\", function TdConfirmDialogComponent_Template_button_click_9_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.accept());\n });\n i0.ɵɵtext(11);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.title);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx.message);\n i0.ɵɵadvance(4);\n i0.ɵɵtextInterpolate1(\" \", ctx.cancelButton, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"color\", ctx.isDestructive ? \"warn\" : \"accent\");\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx.acceptButton, \" \");\n }\n },\n dependencies: [i2.NgIf, i3.MatButton, TdDialogComponent, TdDialogTitleDirective, TdDialogActionsDirective, TdDialogContentDirective],\n styles: [_c2]\n });\n return TdConfirmDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdPromptDialogComponent = /*#__PURE__*/(() => {\n class TdPromptDialogComponent {\n constructor(_ngZone, _dialogRef) {\n this._ngZone = _ngZone;\n this._dialogRef = _dialogRef;\n this.cancelButton = 'CANCEL';\n this.acceptButton = 'ACCEPT';\n this._destroy$ = new Subject();\n }\n ngAfterViewInit() {\n this._ngZone.runOutsideAngular(() => {\n // Note: `element.focus()` causes re-layout and this may lead to frame drop on slower devices.\n // `Promise` is a microtask and microtask are executed within the current rendering frame.\n // Animation tasks are executed within the next rendering frame.\n // We focus input once everything is rendered and good to go.\n requestAnimationFrame(() => this._input.nativeElement.focus());\n fromEvent(this._input.nativeElement, 'focus').pipe(takeUntil(this._destroy$)).subscribe(() => {\n // This is executed when the input is focused, selects all text.\n this._input.nativeElement.select();\n });\n fromEvent(this._closeBtn.nativeElement, 'keydown').pipe(takeUntil(this._destroy$)).subscribe(event => {\n if (event.keyCode === RIGHT_ARROW) {\n this._acceptBtn.nativeElement.focus();\n }\n });\n fromEvent(this._acceptBtn.nativeElement, 'keydown').pipe(takeUntil(this._destroy$)).subscribe(event => {\n if (event.keyCode === LEFT_ARROW) {\n this._closeBtn.nativeElement.focus();\n }\n });\n });\n }\n ngOnDestroy() {\n this._destroy$.next();\n }\n cancel() {\n this._dialogRef.close();\n }\n accept() {\n this._dialogRef.close(this.value);\n }\n }\n TdPromptDialogComponent.ɵfac = function TdPromptDialogComponent_Factory(t) {\n return new (t || TdPromptDialogComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1.MatDialogRef));\n };\n TdPromptDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TdPromptDialogComponent,\n selectors: [[\"td-prompt-dialog\"]],\n viewQuery: function TdPromptDialogComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 7, ElementRef);\n i0.ɵɵviewQuery(_c5, 7, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._input = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._closeBtn = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._acceptBtn = _t.first);\n }\n },\n decls: 18,\n vars: 6,\n consts: [[\"form\", \"ngForm\"], [\"input\", \"\"], [\"closeBtn\", \"\"], [\"acceptBtn\", \"\"], [\"tdDialogTitle\", \"\", 4, \"ngIf\"], [\"tdDialogContent\", \"\"], [1, \"td-dialog-message\"], [\"novalidate\", \"\"], [1, \"td-dialog-input-wrapper\"], [1, \"td-dialog-input\"], [\"matInput\", \"\", \"name\", \"value\", \"required\", \"\", 3, \"keydown.enter\", \"ngModelChange\", \"ngModel\"], [\"tdDialogActions\", \"\"], [\"mat-button\", \"\", 3, \"click\"], [\"mat-button\", \"\", \"color\", \"accent\", 3, \"click\", \"disabled\"], [\"tdDialogTitle\", \"\"]],\n template: function TdPromptDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"td-dialog\");\n i0.ɵɵtemplate(1, TdPromptDialogComponent_div_1_Template, 2, 1, \"div\", 4);\n i0.ɵɵelementStart(2, \"div\", 5)(3, \"span\", 6);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"form\", 7, 0)(7, \"div\", 8)(8, \"mat-form-field\", 9)(9, \"input\", 10, 1);\n i0.ɵɵlistener(\"keydown.enter\", function TdPromptDialogComponent_Template_input_keydown_enter_9_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const form_r3 = i0.ɵɵreference(6);\n $event.preventDefault();\n return i0.ɵɵresetView(form_r3.valid && ctx.accept());\n });\n i0.ɵɵtwoWayListener(\"ngModelChange\", function TdPromptDialogComponent_Template_input_ngModelChange_9_listener($event) {\n i0.ɵɵrestoreView(_r1);\n i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()()()()();\n i0.ɵɵelementStart(11, \"div\", 11)(12, \"button\", 12, 2);\n i0.ɵɵlistener(\"click\", function TdPromptDialogComponent_Template_button_click_12_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.cancel());\n });\n i0.ɵɵtext(14);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(15, \"button\", 13, 3);\n i0.ɵɵlistener(\"click\", function TdPromptDialogComponent_Template_button_click_15_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.accept());\n });\n i0.ɵɵtext(17);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const form_r3 = i0.ɵɵreference(6);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.title);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx.message);\n i0.ɵɵadvance(5);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx.value);\n i0.ɵɵadvance(5);\n i0.ɵɵtextInterpolate1(\" \", ctx.cancelButton, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", !form_r3.valid);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx.acceptButton, \" \");\n }\n },\n dependencies: [i2$1.ɵNgNoValidate, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.RequiredValidator, i2$1.NgModel, i2$1.NgForm, i2.NgIf, i4.MatFormField, i5.MatInput, i3.MatButton, TdDialogComponent, TdDialogTitleDirective, TdDialogActionsDirective, TdDialogContentDirective],\n styles: [\".td-dialog-input-wrapper[_ngcontent-%COMP%]{flex-direction:row;box-sizing:border-box;display:flex}.td-dialog-input-wrapper[_ngcontent-%COMP%] .td-dialog-input[_ngcontent-%COMP%]{flex:1;box-sizing:border-box}.td-dialog-message[_ngcontent-%COMP%]{word-break:break-word}\"]\n });\n return TdPromptDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdDialogService = /*#__PURE__*/(() => {\n class TdDialogService {\n constructor(_document, _dialogService, _dragDrop, rendererFactory) {\n this._document = _document;\n this._dialogService = _dialogService;\n this._dragDrop = _dragDrop;\n this.rendererFactory = rendererFactory;\n this._renderer2 = rendererFactory.createRenderer(undefined, null);\n }\n /**\n * params:\n * - component: ComponentType\n * - config: MatDialogConfig\n * Wrapper function over the open() method in MatDialog.\n * Opens a modal dialog containing the given component.\n */\n open(component, config) {\n return this._dialogService.open(component, config);\n }\n /**\n * Wrapper function over the closeAll() method in MatDialog.\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n this._dialogService.closeAll();\n }\n /**\n * params:\n * - config: IAlertConfig {\n * message: string;\n * title?: string;\n * viewContainerRef?: ViewContainerRef;\n * closeButton?: string;\n * }\n *\n * Opens an alert dialog with the provided config.\n * Returns an MatDialogRef object.\n */\n openAlert(config) {\n const dialogConfig = this._createConfig(config);\n const dialogRef = this._dialogService.open(TdAlertDialogComponent, dialogConfig);\n const alertDialogComponent = dialogRef.componentInstance;\n alertDialogComponent.title = config.title;\n alertDialogComponent.message = config.message;\n if (config.closeButton) {\n alertDialogComponent.closeButton = config.closeButton;\n }\n return dialogRef;\n }\n /**\n * params:\n * - config: IConfirmConfig {\n * message: string;\n * title?: string;\n * viewContainerRef?: ViewContainerRef;\n * acceptButton?: string;\n * cancelButton?: string;\n * isDestructive?: boolean;\n * }\n *\n * Opens a confirm dialog with the provided config.\n * Returns an MatDialogRef object.\n */\n openConfirm(config) {\n const dialogConfig = this._createConfig(config);\n const dialogRef = this._dialogService.open(TdConfirmDialogComponent, dialogConfig);\n const confirmDialogComponent = dialogRef.componentInstance;\n confirmDialogComponent.title = config.title;\n confirmDialogComponent.message = config.message;\n if (config.acceptButton) {\n confirmDialogComponent.acceptButton = config.acceptButton;\n }\n if (config.isDestructive) {\n confirmDialogComponent.isDestructive = config.isDestructive;\n }\n if (config.cancelButton) {\n confirmDialogComponent.cancelButton = config.cancelButton;\n }\n return dialogRef;\n }\n /**\n * params:\n * - config: IPromptConfig {\n * message: string;\n * title?: string;\n * value?: string;\n * viewContainerRef?: ViewContainerRef;\n * acceptButton?: string;\n * cancelButton?: string;\n * }\n *\n * Opens a prompt dialog with the provided config.\n * Returns an MatDialogRef object.\n */\n openPrompt(config) {\n const dialogConfig = this._createConfig(config);\n const dialogRef = this._dialogService.open(TdPromptDialogComponent, dialogConfig);\n const promptDialogComponent = dialogRef.componentInstance;\n promptDialogComponent.title = config.title;\n promptDialogComponent.message = config.message;\n promptDialogComponent.value = config.value;\n if (config.acceptButton) {\n promptDialogComponent.acceptButton = config.acceptButton;\n }\n if (config.cancelButton) {\n promptDialogComponent.cancelButton = config.cancelButton;\n }\n return dialogRef;\n }\n /**\n * Opens a draggable dialog containing the given component.\n */\n openDraggable({\n component,\n config,\n dragHandleSelectors,\n draggableClass\n }) {\n const matDialogRef = this._dialogService.open(component, config);\n const dragRefSubject = new Subject();\n const CDK_OVERLAY_PANE_SELECTOR = '.cdk-overlay-pane';\n const CDK_OVERLAY_CONTAINER_SELECTOR = '.cdk-overlay-container';\n matDialogRef.afterOpened().subscribe(() => {\n const dialogElement = this._document.getElementById(matDialogRef.id);\n const draggableElement = this._dragDrop.createDrag(dialogElement);\n if (draggableClass) {\n const childComponent = dialogElement.firstElementChild;\n this._renderer2.addClass(childComponent, draggableClass);\n }\n if (dragHandleSelectors && dragHandleSelectors.length) {\n const dragHandles = dragHandleSelectors.reduce((acc, curr) => [...acc, ...Array.from(dialogElement.querySelectorAll(curr))], []);\n if (dragHandles.length > 0) {\n draggableElement.withHandles(dragHandles);\n }\n }\n const rootElement = dialogElement.closest(CDK_OVERLAY_PANE_SELECTOR);\n if (rootElement) {\n draggableElement.withRootElement(rootElement);\n }\n const boundaryElement = dialogElement.closest(CDK_OVERLAY_CONTAINER_SELECTOR);\n if (boundaryElement) {\n draggableElement.withBoundaryElement(boundaryElement);\n }\n dragRefSubject.next(draggableElement);\n });\n return {\n matDialogRef,\n dragRefSubject\n };\n }\n _createConfig(config) {\n const dialogConfig = new MatDialogConfig();\n dialogConfig.width = '400px';\n Object.assign(dialogConfig, config);\n return dialogConfig;\n }\n }\n TdDialogService.ɵfac = function TdDialogService_Factory(t) {\n return new (t || TdDialogService)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i1.MatDialog), i0.ɵɵinject(i2$2.DragDrop), i0.ɵɵinject(i0.RendererFactory2));\n };\n TdDialogService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TdDialogService,\n factory: TdDialogService.ɵfac\n });\n return TdDialogService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TdWindowDialogComponent = /*#__PURE__*/(() => {\n class TdWindowDialogComponent {\n constructor() {\n this.docked = false;\n this.dockToggled = new EventEmitter();\n this.closed = new EventEmitter();\n this.toolbarHeight = 56;\n }\n toggleDockedState() {\n this.dockToggled.emit(this.docked);\n }\n }\n TdWindowDialogComponent.ɵfac = function TdWindowDialogComponent_Factory(t) {\n return new (t || TdWindowDialogComponent)();\n };\n TdWindowDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TdWindowDialogComponent,\n selectors: [[\"td-window-dialog\"]],\n inputs: {\n toolbarColor: \"toolbarColor\",\n docked: \"docked\",\n title: \"title\",\n toggleDockedStateLabel: \"toggleDockedStateLabel\",\n closeLabel: \"closeLabel\"\n },\n outputs: {\n dockToggled: \"dockToggled\",\n closed: \"closed\"\n },\n ngContentSelectors: _c6,\n decls: 9,\n vars: 11,\n consts: [[1, \"td-window-dialog-toolbar\", 3, \"color\"], [\"layout\", \"row\", \"layout-align\", \"start center\", \"flex\", \"\"], [\"flex\", \"\", 1, \"mat-title\", \"td-window-dialog-title\", \"truncate\"], [\"mat-icon-button\", \"\", 1, \"td-window-dialog-close\", 3, \"click\", \"matTooltip\"]],\n template: function TdWindowDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"mat-toolbar\", 0)(1, \"mat-toolbar-row\")(2, \"div\", 1)(3, \"span\", 2);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"button\", 3);\n i0.ɵɵlistener(\"click\", function TdWindowDialogComponent_Template_button_click_5_listener() {\n return ctx.closed.emit();\n });\n i0.ɵɵelementStart(6, \"mat-icon\");\n i0.ɵɵtext(7, \"close\");\n i0.ɵɵelementEnd()()()()();\n i0.ɵɵprojection(8);\n }\n if (rf & 2) {\n let tmp_5_0;\n i0.ɵɵstyleProp(\"min-height\", ctx.toolbarHeight, \"px\")(\"cursor\", ctx.docked ? \"inherit\" : \"move\");\n i0.ɵɵproperty(\"color\", ctx.toolbarColor);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"height\", ctx.toolbarHeight, \"px\");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate1(\" \", ctx.title, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"matTooltip\", (tmp_5_0 = ctx.closeLabel) !== null && tmp_5_0 !== undefined ? tmp_5_0 : \"\");\n i0.ɵɵattribute(\"data-test\", \"close-button\");\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"aria-label\", ctx.closeLabel);\n }\n },\n dependencies: [i3.MatButton, i2$3.MatToolbar, i2$3.MatToolbarRow, i3$1.MatTooltip, i4$1.MatIcon],\n styles: [\"[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.td-window-dialog-toolbar[_ngcontent-%COMP%]{background:none}.td-window-dialog-title[_ngcontent-%COMP%]{margin-bottom:0}.td-window-dialog-close[_ngcontent-%COMP%]{margin-right:-8px} .td-window-dialog .mat-dialog-container{padding:0}\"],\n changeDetection: 0\n });\n return TdWindowDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TD_DIALOGS = [TdAlertDialogComponent, TdConfirmDialogComponent, TdPromptDialogComponent, TdDialogComponent, TdDialogTitleDirective, TdDialogActionsDirective, TdDialogContentDirective, TdWindowDialogComponent, TdAlertDialogComponent, TdConfirmDialogComponent, TdPromptDialogComponent];\nlet CovalentDialogsModule = /*#__PURE__*/(() => {\n class CovalentDialogsModule {}\n CovalentDialogsModule.ɵfac = function CovalentDialogsModule_Factory(t) {\n return new (t || CovalentDialogsModule)();\n };\n CovalentDialogsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: CovalentDialogsModule\n });\n CovalentDialogsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [TdDialogService],\n imports: [FormsModule, CommonModule, MatDialogModule, MatInputModule, MatButtonModule, MatToolbarModule, MatTooltipModule, MatIconModule]\n });\n return CovalentDialogsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar corners = /*#__PURE__*/function (corners) {\n corners[\"topRight\"] = \"topRight\";\n corners[\"bottomRight\"] = \"bottomRight\";\n corners[\"bottomLeft\"] = \"bottomLeft\";\n corners[\"topLeft\"] = \"topLeft\";\n return corners;\n}(corners || {});\nvar cursors = /*#__PURE__*/function (cursors) {\n cursors[\"nesw\"] = \"nesw-resize\";\n cursors[\"nwse\"] = \"nwse-resize\";\n return cursors;\n}(cursors || {});\nvar verticalAlignment = /*#__PURE__*/function (verticalAlignment) {\n verticalAlignment[\"top\"] = \"top\";\n verticalAlignment[\"bottom\"] = \"bottom\";\n return verticalAlignment;\n}(verticalAlignment || {});\nvar horizontalAlignment = /*#__PURE__*/function (horizontalAlignment) {\n horizontalAlignment[\"right\"] = \"right\";\n horizontalAlignment[\"left\"] = \"left\";\n return horizontalAlignment;\n}(horizontalAlignment || {});\nconst cornerWidth = '16px';\nconst offset = '0px';\nconst minWidth = 200;\nconst minHeight = 200;\nfunction getPixels(sizeString) {\n return parseFloat((sizeString || '').replace('px', ''));\n}\nfunction clamp(min, num, max) {\n return Math.min(Math.max(num, min), max);\n}\nclass ResizableDraggableDialog {\n constructor(_document, _renderer2, _dialogRef, _dragRef) {\n this._document = _document;\n this._renderer2 = _renderer2;\n this._dialogRef = _dialogRef;\n this._dragRef = _dragRef;\n this.cornerElements = [];\n this.pointerDownSubs = [];\n this._initialPositionReset();\n this._attachCorners();\n }\n attach() {\n this.detach();\n this._attachCorners();\n }\n detach() {\n this.pointerDownSubs.forEach(sub => sub.unsubscribe());\n this.pointerDownSubs = [];\n this.cornerElements.forEach(elem => this._renderer2.removeChild(this._getDialogWrapper(), elem));\n this.cornerElements = [];\n }\n _getDialogWrapper() {\n return (this._document.getElementById(this._dialogRef.id) || {}).parentElement;\n }\n _getViewportDimensions() {\n return this._getDialogWrapper()?.parentElement?.getBoundingClientRect();\n }\n _getDialogWrapperDimensions() {\n const wrapper = this._getDialogWrapper();\n if (!wrapper) {\n return {\n width: 0,\n height: 0\n };\n }\n const dimensions = getComputedStyle(wrapper);\n return {\n width: getPixels(dimensions.width),\n height: getPixels(dimensions.height)\n };\n }\n _initialPositionReset() {\n const viewportWidth = this._getViewportDimensions()?.right ?? 0;\n const viewportHeight = this._getViewportDimensions()?.bottom ?? 0;\n const {\n width,\n height\n } = this._getDialogWrapperDimensions();\n const wrapperStyle = this._getDialogWrapper()?.style;\n const originalDialogRight = wrapperStyle?.marginRight;\n const originalDialogLeft = wrapperStyle?.marginLeft;\n const originalDialogBottom = wrapperStyle?.marginBottom;\n const originalDialogTop = wrapperStyle?.marginTop;\n let x;\n if (originalDialogLeft) {\n x = getPixels(originalDialogLeft);\n } else if (originalDialogRight) {\n x = viewportWidth - getPixels(originalDialogRight) - width;\n } else {\n x = (viewportWidth - width) / 2;\n }\n let y;\n if (originalDialogTop) {\n y = getPixels(originalDialogTop);\n } else if (originalDialogBottom) {\n y = viewportHeight - getPixels(originalDialogBottom) - height;\n } else {\n y = (viewportHeight - height) / 2;\n }\n // use drag ref's mechanisms for positioning instead of the dialog's\n this._dialogRef.updatePosition({\n top: '0px',\n right: '0px',\n bottom: '0px',\n left: '0px'\n });\n this._dragRef.setFreeDragPosition({\n x,\n y\n });\n }\n _attachCorners() {\n Object.values(corners).forEach(corner => {\n const element = this._renderer2.createElement('div');\n this.cornerElements = [...this.cornerElements, element];\n this._renderer2.setStyle(element, 'position', 'absolute');\n this._renderer2.setStyle(element, 'width', cornerWidth);\n this._renderer2.setStyle(element, 'height', cornerWidth);\n this._renderer2.appendChild(this._getDialogWrapper(), element);\n let cursor;\n let topBottom;\n let rightLeft;\n if (corner === corners.topRight) {\n cursor = cursors.nesw;\n topBottom = verticalAlignment.top;\n rightLeft = horizontalAlignment.right;\n } else if (corner === corners.bottomRight) {\n cursor = cursors.nwse;\n topBottom = verticalAlignment.bottom;\n rightLeft = horizontalAlignment.right;\n const icon = this._renderer2.createElement('i');\n this._renderer2.addClass(icon, 'material-icons');\n this._renderer2.appendChild(icon, this._renderer2.createText('filter_list'));\n this._renderer2.appendChild(element, icon);\n this._renderer2.setStyle(icon, 'transform', `rotate(${315}deg) translate(0px, ${offset})`);\n this._renderer2.setStyle(icon, 'font-size', cornerWidth);\n } else if (corner === corners.bottomLeft) {\n cursor = cursors.nesw;\n topBottom = verticalAlignment.bottom;\n rightLeft = horizontalAlignment.left;\n } else {\n cursor = cursors.nwse;\n topBottom = verticalAlignment.top;\n rightLeft = horizontalAlignment.left;\n }\n this._renderer2.setStyle(element, topBottom, offset);\n this._renderer2.setStyle(element, rightLeft, offset);\n this._renderer2.setStyle(element, 'cursor', cursor);\n const pointerDownSub = fromEvent(element, 'pointerdown').subscribe(event => {\n this._handleMouseDown(event, corner);\n });\n this.pointerDownSubs = [...this.pointerDownSubs, pointerDownSub];\n });\n }\n _handleMouseDown(event, corner) {\n this._renderer2.setStyle(this._document.body, 'user-select', 'none');\n const {\n width: originalWidth,\n height: originalHeight\n } = this._getDialogWrapperDimensions();\n const originalMouseX = event.pageX;\n const originalMouseY = event.pageY;\n const {\n x: currentTransformX,\n y: currentTransformY\n } = this._dragRef.getFreeDragPosition();\n const wrapper = this._getDialogWrapper()?.getBoundingClientRect();\n const distanceFromBottom = wrapper?.bottom ?? 0;\n const distanceFromRight = wrapper?.right ?? 0;\n const viewportWidth = this._getViewportDimensions()?.right ?? 0;\n const viewportHeight = this._getViewportDimensions()?.bottom ?? 0;\n const mouseMoveSub = fromEvent(window, 'pointermove').subscribe(e => {\n e.preventDefault(); // prevent highlighting of text when dragging\n const yDelta = clamp(0, e.pageY, viewportHeight) - originalMouseY;\n const xDelta = clamp(0, e.pageX, viewportWidth) - originalMouseX;\n let newHeight;\n let newWidth;\n let newTransformY = 0;\n let newTransformX = 0;\n // top right\n if (corner === corners.topRight) {\n newHeight = clamp(minHeight, originalHeight - yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth + xDelta, viewportWidth);\n newTransformY = clamp(0, currentTransformY + yDelta, distanceFromBottom - newHeight);\n newTransformX = currentTransformX;\n }\n // bottom right\n else if (corner === corners.bottomRight) {\n newHeight = clamp(minHeight, originalHeight + yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth + xDelta, viewportWidth);\n newTransformY = currentTransformY;\n newTransformX = currentTransformX;\n }\n // bottom left\n else if (corner === corners.bottomLeft) {\n newHeight = clamp(minHeight, originalHeight + yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth - xDelta, viewportWidth);\n newTransformY = currentTransformY;\n newTransformX = clamp(0, currentTransformX + xDelta, distanceFromRight - newWidth);\n }\n // top left\n else {\n newHeight = clamp(minHeight, originalHeight - yDelta, viewportHeight);\n newWidth = clamp(minWidth, originalWidth - xDelta, viewportWidth);\n newTransformX = clamp(0, currentTransformX + xDelta, distanceFromRight - newWidth);\n newTransformY = clamp(0, currentTransformY + yDelta, distanceFromBottom - newHeight);\n }\n this._dialogRef.updateSize(`${newWidth}px`, `${newHeight}px`);\n this._dragRef.setFreeDragPosition({\n x: newTransformX,\n y: newTransformY\n });\n });\n const mouseUpSub = merge(fromEvent(window, 'pointerup'), fromEvent(window, 'pointercancel')).subscribe(() => {\n this._renderer2.removeStyle(this._document.body, 'user-select');\n mouseMoveSub.unsubscribe();\n mouseUpSub.unsubscribe();\n });\n }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CovalentDialogsModule, ResizableDraggableDialog, TdAlertDialogComponent, TdConfirmDialogComponent, TdDialogActionsDirective, TdDialogComponent, TdDialogContentDirective, TdDialogService, TdDialogTitleDirective, TdPromptDialogComponent, TdWindowDialogComponent };\n"],"mappings":"ioCAgBA,SAASA,GAA0CC,EAAIC,EAAK,CAAC,CAC7D,IAAMC,GAAN,KAAmB,CACjB,aAAc,CAEZ,KAAK,KAAO,SAEZ,KAAK,WAAa,GAElB,KAAK,YAAc,GAEnB,KAAK,cAAgB,GAErB,KAAK,aAAe,GAEpB,KAAK,MAAQ,GAEb,KAAK,OAAS,GAEd,KAAK,KAAO,KAE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3B,QAAS,CAACC,GAAaC,GAAcC,GAAiBC,GAAgBC,GAAiBC,GAAkBC,GAAkBC,EAAa,CAC1I,CAAC,EACMX,CACT,GAAG","names":["CdkDialogContainer_ng_template_0_Template","rf","ctx","DialogConfig","CdkDialogContainer","BasePortalOutlet","_elementRef","_focusTrapFactory","_document","_config","_interactivityChecker","_ngZone","_overlayRef","_focusMonitor","portal","result","element","options","callback","selector","elementToFocus","focusedSuccessfully","focusConfig","focusTargetElement","activeElement","_getFocusedElementPierceShadowDom","t","ɵɵdirectiveInject","ElementRef","FocusTrapFactory","DOCUMENT","DialogConfig","InteractivityChecker","NgZone","OverlayRef","FocusMonitor","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","CdkPortalOutlet","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵattribute","ɵɵInheritDefinitionFeature","ɵɵtemplate","CdkDialogContainer_ng_template_0_Template","DialogRef","overlayRef","config","Subject","event","hasModifierKey","closedSubject","width","height","classes","DIALOG_SCROLL_STRATEGY","InjectionToken","DIALOG_DATA","DEFAULT_DIALOG_CONFIG","DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","overlay","DIALOG_SCROLL_STRATEGY_PROVIDER","Overlay","uniqueId","Dialog","_overlay","_injector","_defaultOptions","_parentDialog","_overlayContainer","scrollStrategy","defer","startWith","componentOrTemplateRef","defaults","__spreadValues","overlayConfig","dialogRef","dialogContainer","reverseForEach","dialog","id","state","OverlayConfig","userInjector","providers","containerType","containerPortal","ComponentPortal","Injector","TemplateRef","injector","context","TemplatePortal","contentRef","fallbackInjector","Directionality","of","emitEvent","index","previousValue","overlayContainer","siblings","i","sibling","parent","ɵɵinject","OverlayContainer","ɵɵdefineInjectable","items","DialogModule","ɵɵdefineNgModule","ɵɵdefineInjector","OverlayModule","PortalModule","A11yModule","MatDialogContainer_ng_template_2_Template","rf","ctx","MatDialogConfig","OPEN_CLASS","OPENING_CLASS","CLOSING_CLASS","OPEN_ANIMATION_DURATION","CLOSE_ANIMATION_DURATION","_MatDialogContainerBase","CdkDialogContainer","elementRef","focusTrapFactory","_document","dialogConfig","interactivityChecker","ngZone","overlayRef","focusMonitor","EventEmitter","totalTime","t","ɵɵdirectiveInject","ElementRef","FocusTrapFactory","DOCUMENT","InteractivityChecker","NgZone","OverlayRef","FocusMonitor","ɵɵdefineComponent","ɵɵInheritDefinitionFeature","TRANSITION_DURATION_PROPERTY","parseCssTime","time","coerceNumberProperty","MatDialogContainer","document","checker","_animationMode","duration","callback","ANIMATION_MODULE_TYPE","ɵɵhostProperty","ɵɵattribute","ɵɵclassProp","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","CdkPortalOutlet","MatDialogRef","_ref","config","_containerInstance","Subject","filter","event","take","merge","hasModifierKey","_closeDialogVia","dialogResult","position","strategy","width","height","classes","ref","interactionType","result","MAT_DIALOG_DATA","InjectionToken","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY","overlay","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","Overlay","uniqueId","_MatDialogBase","parent","_overlay","injector","_defaultOptions","_parentDialog","_overlayContainer","scrollStrategy","_dialogRefConstructor","_dialogContainerType","_dialogDataToken","_animationMode","Subject","MatDialogConfig","defer","startWith","Dialog","componentOrTemplateRef","config","dialogRef","__spreadValues","cdkRef","__spreadProps","DialogConfig","ref","cdkConfig","dialogContainer","index","id","dialog","dialogs","i","t","ɵɵinvalidFactory","ɵɵdefineInjectable","MatDialog","overlay","location","defaultOptions","parentDialog","overlayContainer","animationMode","MatDialogRef","MatDialogContainer","MAT_DIALOG_DATA","ɵɵinject","Overlay","Injector","Location","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","OverlayContainer","ANIMATION_MODULE_TYPE","dialogElementUid","MatDialogClose","_elementRef","_dialog","getClosestDialog","changes","proxiedChange","event","_closeDialogVia","ɵɵdirectiveInject","ElementRef","ɵɵdefineDirective","rf","ctx","ɵɵlistener","$event","ɵɵattribute","InputFlags","ɵɵNgOnChangesFeature","MatDialogTitle","_dialogRef","queue","ɵɵhostProperty","MatDialogContent","MatDialogActions","ɵɵclassProp","element","openDialogs","MatDialogModule","ɵɵdefineNgModule","ɵɵdefineInjector","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","DialogModule","OverlayModule","PortalModule","MatCommonModule","_defaultParams","matDialogAnimations","trigger","state","style","transition","group","animate","query","animateChild","_c0","_c1","_MatToolbarBase","mixinColor","_elementRef","MatToolbarRow","t","ɵɵdefineDirective","MatToolbar","elementRef","_platform","document","ɵɵdirectiveInject","ElementRef","Platform","DOCUMENT","ɵɵdefineComponent","rf","ctx","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","ɵɵInheritDefinitionFeature","ɵɵprojectionDef","ɵɵprojection","MatToolbarModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","extendStyles","dest","source","importantProperties","key","value","toggleNativeDragInteractions","element","enable","userSelect","toggleVisibility","combineTransforms","transform","initialTransform","parseCssTimeUnitsToMs","multiplier","getTransformTransitionDurationInMs","computedStyle","transitionedProperties","parseCssPropertyValue","property","prop","propertyIndex","rawDurations","rawDelays","name","part","getMutableClientRect","clientRect","isInsideClientRect","x","y","top","bottom","left","right","adjustClientRect","isPointerNearClientRect","rect","threshold","pointerX","pointerY","width","height","xThreshold","yThreshold","ParentPositionTracker","_document","elements","event","target","_getEventTarget","cachedPosition","scrollPosition","newTop","newLeft","viewportScrollPosition","topDifference","leftDifference","position","node","deepCloneNode","clone","descendantsWithId","nodeName","i","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","context","passiveEventListenerOptions","normalizePassiveListenerOptions","activeEventListenerOptions","MOUSE_EVENT_IGNORE_TIME","dragImportantProperties","DragRef","newValue","coerceBooleanProperty","handle","_config","_ngZone","_viewportRuler","_dragDropRegistry","Subject","Subscription","targetHandle","pointerPosition","distanceX","distanceY","isDelayElapsed","container","constrainedPointerPosition","offset","activeTransform","handles","coerceElement","disabledHandles","template","rootElement","boundaryElement","parent","direction","isTouchEvent","dropContainer","placeholder","anchor","shadowRoot","referenceElement","isDragging","isTouchSequence","isAuxiliaryMouseButton","isSyntheticEvent","isFakeEvent","isFakeTouchstartFromScreenReader","isFakeMousedownFromScreenReader","rootStyles","scrollEvent","previewTemplate","currentIndex","distance","isPointerOverContainer","rawX","rawY","newContainer","previewConfig","previewClass","preview","rootRect","viewRef","getRootNode","matchElementSize","getTransform","className","placeholderRect","duration","resolve","handler","timeout","placeholderConfig","placeholderTemplate","elementRect","handleElement","referenceRect","point","svgMatrix","svgPoint","dropContainerLock","pickupX","pickupY","boundaryRect","previewWidth","previewHeight","minY","maxY","minX","maxX","clamp$1","pointerPositionOnPage","delta","positionSinceLastChange","changeX","changeY","shouldEnable","styles","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","scrollDifference","_getShadowRoot","initialParent","previewContainer","documentRef","min","max","rootNodes","wrapper","sourceRect","moveItemInArray","array","fromIndex","toIndex","from","clamp","to","transferArrayItem","currentArray","targetArray","targetIndex","clamp","value","max","SingleAxisSortStrategy","_element","_dragDropRegistry","items","item","pointerX","pointerY","pointerDelta","siblings","newIndex","isHorizontal","currentIndex","currentItem","siblingAtNewPosition","currentPosition","newPosition","delta","itemOffset","siblingOffset","oldOrder","moveItemInArray","sibling","index","isDraggedItem","offset","elementToOffset","combineTransforms","adjustClientRect","isInsideClientRect","activeDraggables","placeholder","newPositionReference","element","coerceElement","predicate","rootElement","initialTransform","p","topDifference","leftDifference","clientRect","drag","elementToMeasure","getMutableClientRect","a","b","immediateSibling","start","end","itemPositions","lastItemRect","firstItemRect","direction","DROP_PROXIMITY_THRESHOLD","SCROLL_PROXIMITY_THRESHOLD","DropListRef","_document","_ngZone","_viewportRuler","Subject","Subscription","interval","animationFrameScheduler","takeUntil","node","scrollStep","ParentPositionTracker","previousIndex","previousContainer","isPointerOverContainer","distance","dropPoint","event","previousItems","connectedTo","orientation","elements","isPointerNearClientRect","result","scrollNode","verticalScrollDirection","horizontalScrollDirection","position","getElementScrollDirections","width","height","getVerticalScrollDirection","getHorizontalScrollDirection","styles","x","y","elementFromPoint","nativeElement","activeSiblings","scrollDifference","shadowRoot","_getShadowRoot","draggedItems","top","bottom","yThreshold","left","right","xThreshold","computedVertical","computedHorizontal","scrollTop","scrollLeft","activeCapturingEventOptions","normalizePassiveListenerOptions","DragDropRegistry","drop","isTouchEvent","e","config","name","streams","Observable","observer","callback","merge","instance","t","ɵɵinject","NgZone","DOCUMENT","ɵɵdefineInjectable","DEFAULT_CONFIG","DragDrop","DragRef","ViewportRuler","CDK_DRAG_PARENT","InjectionToken","CDK_DRAG_HANDLE","InjectionToken","CdkDragHandle","value","coerceBooleanProperty","element","parentDrag","Subject","t","ɵɵdirectiveInject","ElementRef","CDK_DRAG_PARENT","ɵɵdefineDirective","InputFlags","ɵɵProvidersFeature","CDK_DRAG_PLACEHOLDER","CdkDragPlaceholder","templateRef","TemplateRef","CDK_DRAG_PREVIEW","CDK_DRAG_CONFIG","InjectionToken","DRAG_HOST_CLASS","CDK_DROP_LIST","CdkDrag","value","coerceBooleanProperty","element","dropContainer","_document","_ngZone","_viewContainerRef","config","_dir","dragDrop","_changeDetectorRef","_selfHandle","_parentDrag","Subject","EventEmitter","Observable","observer","subscription","map","movedEvent","take","takeUntil","changes","rootSelectorChange","positionChange","index","rootElement","boundary","coerceElement","ref","dir","dragStartDelay","placeholder","preview","coerceNumberProperty","parent","drag","startEvent","releaseEvent","endEvent","enterEvent","exitEvent","dropEvent","lockAxis","constrainPosition","previewClass","boundaryElement","draggingDisabled","rootElementSelector","previewContainer","startWith","tap","handles","childHandleElements","handle","switchMap","merge","item","handleInstance","dragRef","t","ɵɵdirectiveInject","ElementRef","DOCUMENT","NgZone","ViewContainerRef","Directionality","DragDrop","ChangeDetectorRef","CDK_DRAG_HANDLE","CDK_DRAG_PARENT","ɵɵdefineDirective","rf","ctx","dirIndex","ɵɵcontentQuery","CDK_DRAG_PREVIEW","CDK_DRAG_PLACEHOLDER","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","InputFlags","ɵɵProvidersFeature","ɵɵNgOnChangesFeature","CDK_DROP_LIST_GROUP","CdkDropListGroup","_uniqueIdCounter","CdkDropList","_scrollDispatcher","_group","drop","a","b","siblings","coerceArray","correspondingDropList","list","scrollableParents","scrollable","event","sortingDisabled","listAutoScrollDisabled","listOrientation","ScrollDispatcher","ɵɵattribute","DragDropModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","DragDrop","CdkScrollableModule","_c0","_c1","TdDialogComponent_h3_1_Template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","TdDialogComponent_div_2_Template","TdDialogComponent_div_3_Template","ɵɵelement","TdAlertDialogComponent_div_1_Template","ɵɵtext","ctx_r0","ɵɵnextContext","ɵɵadvance","ɵɵtextInterpolate1","TdConfirmDialogComponent_div_1_Template","ctx_r1","_c2","_c3","_c4","_c5","TdPromptDialogComponent_div_1_Template","TdDialogTitleDirective","ɵɵdefineDirective","TdDialogContentDirective","TdDialogActionsDirective","TdDialogComponent","ɵɵdefineComponent","rf","ctx","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","_c1","ɵɵprojectionDef","_c0","ɵɵelementStart","ɵɵtemplate","TdDialogComponent_h3_1_Template","TdDialogComponent_div_2_Template","TdDialogComponent_div_3_Template","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","NgIf","TdAlertDialogComponent","_dialogRef","ɵɵdirectiveInject","MatDialogRef","TdAlertDialogComponent_div_1_Template","ɵɵtext","ɵɵlistener","ɵɵtextInterpolate","ɵɵtextInterpolate1","MatButton","TdConfirmDialogComponent","_r1","ɵɵgetCurrentView","TdConfirmDialogComponent_div_1_Template","ɵɵrestoreView","acceptBtn_r3","ɵɵreference","ɵɵresetView","closeBtn_r4","_c2","TdPromptDialogComponent","_ngZone","Subject","fromEvent","takeUntil","event","NgZone","ɵɵviewQuery","_c3","_c4","ElementRef","_c5","TdPromptDialogComponent_div_1_Template","$event","form_r3","ɵɵtwoWayListener","ɵɵtwoWayBindingSet","ɵɵtwoWayProperty","ɵNgNoValidate","DefaultValueAccessor","NgControlStatus","NgControlStatusGroup","RequiredValidator","NgModel","NgForm","MatFormField","MatInput","TdDialogService","_document","_dialogService","_dragDrop","rendererFactory","component","config","dialogConfig","dialogRef","alertDialogComponent","confirmDialogComponent","promptDialogComponent","dragHandleSelectors","draggableClass","matDialogRef","dragRefSubject","CDK_OVERLAY_PANE_SELECTOR","CDK_OVERLAY_CONTAINER_SELECTOR","dialogElement","draggableElement","childComponent","dragHandles","acc","curr","rootElement","boundaryElement","MatDialogConfig","ɵɵinject","DOCUMENT","MatDialog","DragDrop","RendererFactory2","ɵɵdefineInjectable","CovalentDialogsModule","ɵɵdefineNgModule","ɵɵdefineInjector","TdDialogService","FormsModule","CommonModule","MatDialogModule","MatInputModule","MatButtonModule","MatToolbarModule","MatTooltipModule","MatIconModule"],"x_google_ignoreList":[0,1,2,3,4]}