{"version":3,"file":"autocomplete.es5.js","sources":["../../packages/material/esm5/autocomplete/autocomplete.js","../../packages/material/esm5/autocomplete/autocomplete-trigger.js","../../packages/material/esm5/autocomplete/autocomplete-module.js","../../packages/material/esm5/autocomplete/index.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Component, ContentChildren, ElementRef, Input, TemplateRef, ViewChild, ViewEncapsulation, ChangeDetectorRef, ChangeDetectionStrategy, EventEmitter, Output, } from '@angular/core';\nimport { MatOption, MatOptgroup } from '@angular/material/core';\nimport { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\n/**\n * Autocomplete IDs need to be unique across components, so this counter exists outside of\n * the component definition.\n */\nvar _uniqueAutocompleteIdCounter = 0;\n/**\n * Event object that is emitted when an autocomplete option is selected\n */\nvar MatAutocompleteSelectedEvent = (function () {\n /**\n * @param {?} source\n * @param {?} option\n */\n function MatAutocompleteSelectedEvent(source, option) {\n this.source = source;\n this.option = option;\n }\n return MatAutocompleteSelectedEvent;\n}());\nexport { MatAutocompleteSelectedEvent };\nfunction MatAutocompleteSelectedEvent_tsickle_Closure_declarations() {\n /** @type {?} */\n MatAutocompleteSelectedEvent.prototype.source;\n /** @type {?} */\n MatAutocompleteSelectedEvent.prototype.option;\n}\nvar MatAutocomplete = (function () {\n /**\n * @param {?} _changeDetectorRef\n * @param {?} _elementRef\n */\n function MatAutocomplete(_changeDetectorRef, _elementRef) {\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n /**\n * Whether the autocomplete panel should be visible, depending on option length.\n */\n this.showPanel = false;\n this._isOpen = false;\n /**\n * Function that maps an option's control value to its display value in the trigger.\n */\n this.displayWith = null;\n /**\n * Event that is emitted whenever an option from the list is selected.\n */\n this.optionSelected = new EventEmitter();\n this._classList = {};\n /**\n * Unique ID to be used by autocomplete trigger's \"aria-owns\" property.\n */\n this.id = \"mat-autocomplete-\" + _uniqueAutocompleteIdCounter++;\n }\n Object.defineProperty(MatAutocomplete.prototype, \"isOpen\", {\n /**\n * Whether the autocomplete panel is open.\n * @return {?}\n */\n get: function () {\n return this._isOpen && this.showPanel;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatAutocomplete.prototype, \"classList\", {\n /**\n * Takes classes set on the host md-autocomplete element and applies them to the panel\n * inside the overlay container to allow for easy styling.\n * @param {?} classList\n * @return {?}\n */\n set: function (classList) {\n var _this = this;\n if (classList && classList.length) {\n classList.split(' ').forEach(function (className) { return _this._classList[className.trim()] = true; });\n this._elementRef.nativeElement.className = '';\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n MatAutocomplete.prototype.ngAfterContentInit = function () {\n this._keyManager = new ActiveDescendantKeyManager(this.options).withWrap();\n // Set the initial visibiity state.\n this._setVisibility();\n };\n /**\n * Sets the panel scrollTop. This allows us to manually scroll to display options\n * above or below the fold, as they are not actually being focused when active.\n * @param {?} scrollTop\n * @return {?}\n */\n MatAutocomplete.prototype._setScrollTop = function (scrollTop) {\n if (this.panel) {\n this.panel.nativeElement.scrollTop = scrollTop;\n }\n };\n /**\n * Returns the panel's scrollTop.\n * @return {?}\n */\n MatAutocomplete.prototype._getScrollTop = function () {\n return this.panel ? this.panel.nativeElement.scrollTop : 0;\n };\n /**\n * Panel should hide itself when the option list is empty.\n * @return {?}\n */\n MatAutocomplete.prototype._setVisibility = function () {\n this.showPanel = !!this.options.length;\n this._classList['mat-autocomplete-visible'] = this.showPanel;\n this._classList['mat-autocomplete-hidden'] = !this.showPanel;\n this._changeDetectorRef.markForCheck();\n };\n /**\n * Emits the `select` event.\n * @param {?} option\n * @return {?}\n */\n MatAutocomplete.prototype._emitSelectEvent = function (option) {\n var /** @type {?} */ event = new MatAutocompleteSelectedEvent(this, option);\n this.optionSelected.emit(event);\n };\n MatAutocomplete.decorators = [\n { type: Component, args: [{selector: 'mat-autocomplete',\n template: \"
\",\n styles: [\".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative}.mat-autocomplete-panel:not([class*=mat-elevation-z]){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}\"],\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'matAutocomplete',\n host: {\n 'class': 'mat-autocomplete'\n }\n },] },\n ];\n /**\n * @nocollapse\n */\n MatAutocomplete.ctorParameters = function () { return [\n { type: ChangeDetectorRef, },\n { type: ElementRef, },\n ]; };\n MatAutocomplete.propDecorators = {\n 'template': [{ type: ViewChild, args: [TemplateRef,] },],\n 'panel': [{ type: ViewChild, args: ['panel',] },],\n 'options': [{ type: ContentChildren, args: [MatOption, { descendants: true },] },],\n 'optionGroups': [{ type: ContentChildren, args: [MatOptgroup,] },],\n 'displayWith': [{ type: Input },],\n 'optionSelected': [{ type: Output },],\n 'classList': [{ type: Input, args: ['class',] },],\n };\n return MatAutocomplete;\n}());\nexport { MatAutocomplete };\nfunction MatAutocomplete_tsickle_Closure_declarations() {\n /** @type {?} */\n MatAutocomplete.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatAutocomplete.ctorParameters;\n /** @type {?} */\n MatAutocomplete.propDecorators;\n /**\n * Manages active item in option list based on key events.\n * @type {?}\n */\n MatAutocomplete.prototype._keyManager;\n /**\n * Whether the autocomplete panel should be visible, depending on option length.\n * @type {?}\n */\n MatAutocomplete.prototype.showPanel;\n /** @type {?} */\n MatAutocomplete.prototype._isOpen;\n /**\n * \\@docs-private\n * @type {?}\n */\n MatAutocomplete.prototype.template;\n /**\n * Element for the panel containing the autocomplete options.\n * @type {?}\n */\n MatAutocomplete.prototype.panel;\n /**\n * \\@docs-private\n * @type {?}\n */\n MatAutocomplete.prototype.options;\n /**\n * \\@docs-private\n * @type {?}\n */\n MatAutocomplete.prototype.optionGroups;\n /**\n * Function that maps an option's control value to its display value in the trigger.\n * @type {?}\n */\n MatAutocomplete.prototype.displayWith;\n /**\n * Event that is emitted whenever an option from the list is selected.\n * @type {?}\n */\n MatAutocomplete.prototype.optionSelected;\n /** @type {?} */\n MatAutocomplete.prototype._classList;\n /**\n * Unique ID to be used by autocomplete trigger's \"aria-owns\" property.\n * @type {?}\n */\n MatAutocomplete.prototype.id;\n /** @type {?} */\n MatAutocomplete.prototype._changeDetectorRef;\n /** @type {?} */\n MatAutocomplete.prototype._elementRef;\n}\n//# sourceMappingURL=autocomplete.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Directionality } from '@angular/cdk/bidi';\nimport { DOWN_ARROW, ENTER, ESCAPE, UP_ARROW, TAB } from '@angular/cdk/keycodes';\nimport { Overlay, OverlayConfig, } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { filter, first, RxChain, switchMap, doOperator, delay } from '@angular/cdk/rxjs';\nimport { ChangeDetectorRef, Directive, ElementRef, forwardRef, Host, Inject, InjectionToken, Input, NgZone, Optional, ViewContainerRef, } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatOption } from '@angular/material/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { DOCUMENT } from '@angular/platform-browser';\nimport { Subject } from 'rxjs/Subject';\nimport { fromEvent } from 'rxjs/observable/fromEvent';\nimport { merge } from 'rxjs/observable/merge';\nimport { of as observableOf } from 'rxjs/observable/of';\n/**\n * The height of each autocomplete option.\n */\nexport var AUTOCOMPLETE_OPTION_HEIGHT = 48;\n/**\n * The total height of the autocomplete panel.\n */\nexport var AUTOCOMPLETE_PANEL_HEIGHT = 256;\n/**\n * Injection token that determines the scroll handling while the autocomplete panel is open.\n */\nexport var MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken('mat-autocomplete-scroll-strategy');\n/**\n * \\@docs-private\n * @param {?} overlay\n * @return {?}\n */\nexport function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return function () { return overlay.scrollStrategies.reposition(); };\n}\n/**\n * \\@docs-private\n */\nexport var MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * \\@docs-private\n */\nexport var MAT_AUTOCOMPLETE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return MatAutocompleteTrigger; }),\n multi: true\n};\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @return {?}\n */\nexport function getMatAutocompleteMissingPanelError() {\n return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' +\n 'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n 'you\\'re attempting to open it after the ngAfterContentInit hook.');\n}\nvar MatAutocompleteTrigger = (function () {\n /**\n * @param {?} _element\n * @param {?} _overlay\n * @param {?} _viewContainerRef\n * @param {?} _zone\n * @param {?} _changeDetectorRef\n * @param {?} _scrollStrategy\n * @param {?} _dir\n * @param {?} _formField\n * @param {?} _document\n */\n function MatAutocompleteTrigger(_element, _overlay, _viewContainerRef, _zone, _changeDetectorRef, _scrollStrategy, _dir, _formField, _document) {\n this._element = _element;\n this._overlay = _overlay;\n this._viewContainerRef = _viewContainerRef;\n this._zone = _zone;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollStrategy = _scrollStrategy;\n this._dir = _dir;\n this._formField = _formField;\n this._document = _document;\n this._panelOpen = false;\n /**\n * Whether or not the placeholder state is being overridden.\n */\n this._manuallyFloatingPlaceholder = false;\n /**\n * Stream of escape keyboard events.\n */\n this._escapeEventStream = new Subject();\n /**\n * View -> model callback called when value changes\n */\n this._onChange = function () { };\n /**\n * View -> model callback called when autocomplete has been touched\n */\n this._onTouched = function () { };\n }\n /**\n * @return {?}\n */\n MatAutocompleteTrigger.prototype.ngOnDestroy = function () {\n this._destroyPanel();\n this._escapeEventStream.complete();\n };\n Object.defineProperty(MatAutocompleteTrigger.prototype, \"panelOpen\", {\n /**\n * @return {?}\n */\n get: function () {\n return this._panelOpen && this.autocomplete.showPanel;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Opens the autocomplete suggestion panel.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype.openPanel = function () {\n this._attachOverlay();\n this._floatPlaceholder();\n };\n /**\n * Closes the autocomplete suggestion panel.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype.closePanel = function () {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n this._closingActionsSubscription.unsubscribe();\n }\n this._resetPlaceholder();\n if (this._panelOpen) {\n this.autocomplete._isOpen = this._panelOpen = false;\n // We need to trigger change detection manually, because\n // `fromEvent` doesn't seem to do it at the proper time.\n // This ensures that the placeholder is reset when the\n // user clicks outside.\n this._changeDetectorRef.detectChanges();\n }\n };\n Object.defineProperty(MatAutocompleteTrigger.prototype, \"panelClosingActions\", {\n /**\n * A stream of actions that should close the autocomplete panel, including\n * when an option is selected, on blur, and when TAB is pressed.\n * @return {?}\n */\n get: function () {\n return merge(this.optionSelections, this.autocomplete._keyManager.tabOut, this._escapeEventStream, this._outsideClickStream);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatAutocompleteTrigger.prototype, \"optionSelections\", {\n /**\n * Stream of autocomplete option selections.\n * @return {?}\n */\n get: function () {\n return merge.apply(void 0, this.autocomplete.options.map(function (option) { return option.onSelectionChange; }));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatAutocompleteTrigger.prototype, \"activeOption\", {\n /**\n * The currently active option, coerced to MatOption type.\n * @return {?}\n */\n get: function () {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MatAutocompleteTrigger.prototype, \"_outsideClickStream\", {\n /**\n * Stream of clicks outside of the autocomplete panel.\n * @return {?}\n */\n get: function () {\n var _this = this;\n if (!this._document) {\n return observableOf(null);\n }\n return RxChain.from(merge(fromEvent(this._document, 'click'), fromEvent(this._document, 'touchend'))).call(filter, function (event) {\n var /** @type {?} */ clickTarget = (event.target);\n var /** @type {?} */ formField = _this._formField ?\n _this._formField._elementRef.nativeElement : null;\n return _this._panelOpen &&\n clickTarget !== _this._element.nativeElement &&\n (!formField || !formField.contains(clickTarget)) &&\n (!!_this._overlayRef && !_this._overlayRef.overlayElement.contains(clickTarget));\n }).result();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the autocomplete's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param {?} value New value to be written to the model.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype.writeValue = function (value) {\n var _this = this;\n Promise.resolve(null).then(function () { return _this._setTriggerValue(value); });\n };\n /**\n * Saves a callback function to be invoked when the autocomplete's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param {?} fn Callback to be triggered when the value changes.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype.registerOnChange = function (fn) {\n this._onChange = fn;\n };\n /**\n * Saves a callback function to be invoked when the autocomplete is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param {?} fn Callback to be triggered when the component has been touched.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype.registerOnTouched = function (fn) {\n this._onTouched = fn;\n };\n /**\n * @param {?} event\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._handleKeydown = function (event) {\n var /** @type {?} */ keyCode = event.keyCode;\n if (keyCode === ESCAPE && this.panelOpen) {\n this._resetActiveItem();\n this._escapeEventStream.next();\n event.stopPropagation();\n }\n else if (this.activeOption && keyCode === ENTER && this.panelOpen) {\n this.activeOption._selectViaInteraction();\n this._resetActiveItem();\n event.preventDefault();\n }\n else {\n var /** @type {?} */ prevActiveItem = this.autocomplete._keyManager.activeItem;\n var /** @type {?} */ isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n if (this.panelOpen || keyCode === TAB) {\n this.autocomplete._keyManager.onKeydown(event);\n }\n else if (isArrowKey) {\n this.openPanel();\n }\n if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n this._scrollToOption();\n }\n }\n };\n /**\n * @param {?} event\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._handleInput = function (event) {\n // We need to ensure that the input is focused, because IE will fire the `input`\n // event on focus/blur/load if the input has a placeholder. See:\n // https://connect.microsoft.com/IE/feedback/details/885747/\n if (document.activeElement === event.target) {\n this._onChange(((event.target)).value);\n this.openPanel();\n }\n };\n /**\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._handleFocus = function () {\n if (!this._element.nativeElement.readOnly) {\n this._attachOverlay();\n this._floatPlaceholder(true);\n }\n };\n /**\n * In \"auto\" mode, the placeholder will animate down as soon as focus is lost.\n * This causes the value to jump when selecting an option with the mouse.\n * This method manually floats the placeholder until the panel can be closed.\n * @param {?=} shouldAnimate Whether the placeholder should be animated when it is floated.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._floatPlaceholder = function (shouldAnimate) {\n if (shouldAnimate === void 0) { shouldAnimate = false; }\n if (this._formField && this._formField.floatPlaceholder === 'auto') {\n if (shouldAnimate) {\n this._formField._animateAndLockPlaceholder();\n }\n else {\n this._formField.floatPlaceholder = 'always';\n }\n this._manuallyFloatingPlaceholder = true;\n }\n };\n /**\n * If the placeholder has been manually elevated, return it to its normal state.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._resetPlaceholder = function () {\n if (this._manuallyFloatingPlaceholder) {\n this._formField.floatPlaceholder = 'auto';\n this._manuallyFloatingPlaceholder = false;\n }\n };\n /**\n * Given that we are not actually focusing active options, we must manually adjust scroll\n * to reveal options below the fold. First, we find the offset of the option from the top\n * of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n * the panel height + the option height, so the active option will be just visible at the\n * bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n * will become the offset. If that offset is visible within the panel already, the scrollTop is\n * not adjusted.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._scrollToOption = function () {\n var /** @type {?} */ activeOptionIndex = this.autocomplete._keyManager.activeItemIndex || 0;\n var /** @type {?} */ labelCount = MatOption.countGroupLabelsBeforeOption(activeOptionIndex, this.autocomplete.options, this.autocomplete.optionGroups);\n var /** @type {?} */ optionOffset = (activeOptionIndex + labelCount) * AUTOCOMPLETE_OPTION_HEIGHT;\n var /** @type {?} */ panelTop = this.autocomplete._getScrollTop();\n if (optionOffset < panelTop) {\n // Scroll up to reveal selected option scrolled above the panel top\n this.autocomplete._setScrollTop(optionOffset);\n }\n else if (optionOffset + AUTOCOMPLETE_OPTION_HEIGHT > panelTop + AUTOCOMPLETE_PANEL_HEIGHT) {\n // Scroll down to reveal selected option scrolled below the panel bottom\n var /** @type {?} */ newScrollTop = optionOffset - AUTOCOMPLETE_PANEL_HEIGHT + AUTOCOMPLETE_OPTION_HEIGHT;\n this.autocomplete._setScrollTop(Math.max(0, newScrollTop));\n }\n };\n /**\n * This method listens to a stream of panel closing actions and resets the\n * stream every time the option list changes.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._subscribeToClosingActions = function () {\n var _this = this;\n var /** @type {?} */ firstStable = first.call(this._zone.onStable.asObservable());\n var /** @type {?} */ optionChanges = RxChain.from(this.autocomplete.options.changes)\n .call(doOperator, function () { return _this._positionStrategy.recalculateLastPosition(); })\n .call(delay, 0)\n .result();\n // When the zone is stable initially, and when the option list changes...\n return RxChain.from(merge(firstStable, optionChanges))\n .call(switchMap, function () {\n _this._resetActiveItem();\n _this.autocomplete._setVisibility();\n return _this.panelClosingActions;\n })\n .call(first)\n .subscribe(function (event) { return _this._setValueAndClose(event); });\n };\n /**\n * Destroys the autocomplete suggestion panel.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._destroyPanel = function () {\n if (this._overlayRef) {\n this.closePanel();\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n };\n /**\n * @param {?} value\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._setTriggerValue = function (value) {\n var /** @type {?} */ toDisplay = this.autocomplete && this.autocomplete.displayWith ?\n this.autocomplete.displayWith(value) :\n value;\n // Simply falling back to an empty string if the display value is falsy does not work properly.\n // The display value can also be the number zero and shouldn't fall back to an empty string.\n var /** @type {?} */ inputValue = toDisplay != null ? toDisplay : '';\n // If it's used within a `MatFormField`, we should set it through the property so it can go\n // through change detection.\n if (this._formField) {\n this._formField._control.value = inputValue;\n }\n else {\n this._element.nativeElement.value = inputValue;\n }\n };\n /**\n * This method closes the panel, and if a value is specified, also sets the associated\n * control to that value. It will also mark the control as dirty if this interaction\n * stemmed from the user.\n * @param {?} event\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._setValueAndClose = function (event) {\n if (event && event.source) {\n this._clearPreviousSelectedOption(event.source);\n this._setTriggerValue(event.source.value);\n this._onChange(event.source.value);\n this._element.nativeElement.focus();\n this.autocomplete._emitSelectEvent(event.source);\n }\n this.closePanel();\n };\n /**\n * Clear any previous selected option and emit a selection change event for this option\n * @param {?} skip\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._clearPreviousSelectedOption = function (skip) {\n this.autocomplete.options.forEach(function (option) {\n if (option != skip && option.selected) {\n option.deselect();\n }\n });\n };\n /**\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._attachOverlay = function () {\n if (!this.autocomplete) {\n throw getMatAutocompleteMissingPanelError();\n }\n if (!this._overlayRef) {\n this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef);\n this._overlayRef = this._overlay.create(this._getOverlayConfig());\n }\n else {\n /** Update the panel width, in case the host width has changed */\n this._overlayRef.getConfig().width = this._getHostWidth();\n this._overlayRef.updateSize();\n }\n if (this._overlayRef && !this._overlayRef.hasAttached()) {\n this._overlayRef.attach(this._portal);\n this._closingActionsSubscription = this._subscribeToClosingActions();\n }\n this.autocomplete._setVisibility();\n this.autocomplete._isOpen = this._panelOpen = true;\n };\n /**\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._getOverlayConfig = function () {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPosition(),\n scrollStrategy: this._scrollStrategy(),\n width: this._getHostWidth(),\n direction: this._dir ? this._dir.value : 'ltr'\n });\n };\n /**\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._getOverlayPosition = function () {\n this._positionStrategy = this._overlay.position().connectedTo(this._getConnectedElement(), { originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' })\n .withFallbackPosition({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' });\n return this._positionStrategy;\n };\n /**\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._getConnectedElement = function () {\n return this._formField ? this._formField._connectionContainerRef : this._element;\n };\n /**\n * Returns the width of the input element, so the panel width can match it.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._getHostWidth = function () {\n return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n };\n /**\n * Reset active item to -1 so arrow events will activate the correct options.\n * @return {?}\n */\n MatAutocompleteTrigger.prototype._resetActiveItem = function () {\n this.autocomplete._keyManager.setActiveItem(-1);\n };\n MatAutocompleteTrigger.decorators = [\n { type: Directive, args: [{\n selector: \"input[matAutocomplete], textarea[matAutocomplete]\",\n host: {\n 'role': 'combobox',\n 'autocomplete': 'off',\n 'aria-autocomplete': 'list',\n '[attr.aria-activedescendant]': 'activeOption?.id',\n '[attr.aria-expanded]': 'panelOpen.toString()',\n '[attr.aria-owns]': 'autocomplete?.id',\n // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n // a little earlier. This avoids issues where IE delays the focusing of the input.\n '(focusin)': '_handleFocus()',\n '(blur)': '_onTouched()',\n '(input)': '_handleInput($event)',\n '(keydown)': '_handleKeydown($event)',\n },\n providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR]\n },] },\n ];\n /**\n * @nocollapse\n */\n MatAutocompleteTrigger.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: Overlay, },\n { type: ViewContainerRef, },\n { type: NgZone, },\n { type: ChangeDetectorRef, },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY,] },] },\n { type: Directionality, decorators: [{ type: Optional },] },\n { type: MatFormField, decorators: [{ type: Optional }, { type: Host },] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] },] },\n ]; };\n MatAutocompleteTrigger.propDecorators = {\n 'autocomplete': [{ type: Input, args: ['matAutocomplete',] },],\n };\n return MatAutocompleteTrigger;\n}());\nexport { MatAutocompleteTrigger };\nfunction MatAutocompleteTrigger_tsickle_Closure_declarations() {\n /** @type {?} */\n MatAutocompleteTrigger.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatAutocompleteTrigger.ctorParameters;\n /** @type {?} */\n MatAutocompleteTrigger.propDecorators;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._overlayRef;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._portal;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._panelOpen;\n /**\n * Strategy that is used to position the panel.\n * @type {?}\n */\n MatAutocompleteTrigger.prototype._positionStrategy;\n /**\n * Whether or not the placeholder state is being overridden.\n * @type {?}\n */\n MatAutocompleteTrigger.prototype._manuallyFloatingPlaceholder;\n /**\n * The subscription for closing actions (some are bound to document).\n * @type {?}\n */\n MatAutocompleteTrigger.prototype._closingActionsSubscription;\n /**\n * Stream of escape keyboard events.\n * @type {?}\n */\n MatAutocompleteTrigger.prototype._escapeEventStream;\n /**\n * View -> model callback called when value changes\n * @type {?}\n */\n MatAutocompleteTrigger.prototype._onChange;\n /**\n * View -> model callback called when autocomplete has been touched\n * @type {?}\n */\n MatAutocompleteTrigger.prototype._onTouched;\n /** @type {?} */\n MatAutocompleteTrigger.prototype.autocomplete;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._element;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._overlay;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._viewContainerRef;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._zone;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._changeDetectorRef;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._scrollStrategy;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._dir;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._formField;\n /** @type {?} */\n MatAutocompleteTrigger.prototype._document;\n}\n//# sourceMappingURL=autocomplete-trigger.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { MatOptionModule, MatCommonModule } from '@angular/material/core';\nimport { MatAutocomplete } from './autocomplete';\nimport { MatAutocompleteTrigger, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER, } from './autocomplete-trigger';\nvar MatAutocompleteModule = (function () {\n function MatAutocompleteModule() {\n }\n MatAutocompleteModule.decorators = [\n { type: NgModule, args: [{\n imports: [MatOptionModule, OverlayModule, MatCommonModule, CommonModule],\n exports: [MatAutocomplete, MatOptionModule, MatAutocompleteTrigger, MatCommonModule],\n declarations: [MatAutocomplete, MatAutocompleteTrigger],\n providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER],\n },] },\n ];\n /**\n * @nocollapse\n */\n MatAutocompleteModule.ctorParameters = function () { return []; };\n return MatAutocompleteModule;\n}());\nexport { MatAutocompleteModule };\nfunction MatAutocompleteModule_tsickle_Closure_declarations() {\n /** @type {?} */\n MatAutocompleteModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatAutocompleteModule.ctorParameters;\n}\n//# sourceMappingURL=autocomplete-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MatAutocompleteSelectedEvent, MatAutocomplete, MatAutocompleteModule, AUTOCOMPLETE_OPTION_HEIGHT, AUTOCOMPLETE_PANEL_HEIGHT, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_PROVIDER, MAT_AUTOCOMPLETE_VALUE_ACCESSOR, getMatAutocompleteMissingPanelError, MatAutocompleteTrigger } from './public-api';\n//# sourceMappingURL=index.js.map"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;;AAIA,IAAI,4BAA4B,GAAG,CAAC,CAAC;;;;AAIrC,IAAI,4BAA4B,IAAI,YAAY;;;;;IAK5C,SAAS,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;IACD,OAAO,4BAA4B,CAAC;CACvC,EAAE,CAAC,CAAC;AACL,AACA,AAMA,IAAI,eAAe,IAAI,YAAY;;;;;IAK/B,SAAS,eAAe,CAAC,kBAAkB,EAAE,WAAW,EAAE;QACtD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;;;QAI/B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;;;;QAIrB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