text: /**
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  (function (global, factory) {
  	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/core'), require('@angular/material/core'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('@angular/cdk/portal'), require('rxjs/operators/take'), require('rxjs/observable/merge'), require('@angular/cdk/scrolling'), require('rxjs/Subject')) :
  	typeof define === 'function' && define.amd ? define(['exports', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/platform', '@angular/common', '@angular/core', '@angular/material/core', '@angular/animations', '@angular/cdk/bidi', '@angular/cdk/coercion', '@angular/cdk/keycodes', '@angular/cdk/portal', 'rxjs/operators/take', 'rxjs/observable/merge', '@angular/cdk/scrolling', 'rxjs/Subject'], factory) :
  	(factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.tooltip = global.ng.material.tooltip || {}),global.ng.cdk.a11y,global.ng.cdk.overlay,global.ng.cdk.platform,global.ng.common,global.ng.core,global.ng.material.core,global.ng.animations,global.ng.cdk.bidi,global.ng.cdk.coercion,global.ng.cdk.keycodes,global.ng.cdk.portal,global.Rx.operators,global.Rx.Observable,global.ng.cdk.scrolling,global.Rx));
  }(this, (function (exports,_angular_cdk_a11y,_angular_cdk_overlay,_angular_cdk_platform,_angular_common,_angular_core,_angular_material_core,_angular_animations,_angular_cdk_bidi,_angular_cdk_coercion,_angular_cdk_keycodes,_angular_cdk_portal,rxjs_operators_take,rxjs_observable_merge,_angular_cdk_scrolling,rxjs_Subject) { 'use strict';
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes} checked by tsc
   */
  
  /**
   * Time in ms to delay before changing the tooltip visibility to hidden
   */
  var TOUCHEND_HIDE_DELAY = 1500;
  /**
   * Time in ms to throttle repositioning after scroll events.
   */
  var SCROLL_THROTTLE_MS = 20;
  /**
   * CSS class that will be attached to the overlay panel.
   */
  var TOOLTIP_PANEL_CLASS = 'mat-tooltip-panel';
  /**
   * Creates an error to be thrown if the user supplied an invalid tooltip position.
   * @param {?} position
   * @return {?}
   */
  function getMatTooltipInvalidPositionError(position) {
      return Error("Tooltip position \"" + position + "\" is invalid.");
  }
  /**
   * Injection token that determines the scroll handling while a tooltip is visible.
   */
  var MAT_TOOLTIP_SCROLL_STRATEGY = new _angular_core.InjectionToken('mat-tooltip-scroll-strategy');
  /**
   * \@docs-private
   * @param {?} overlay
   * @return {?}
   */
  function MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
      return function () { return overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS }); };
  }
  /**
   * \@docs-private
   */
  var MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER = {
      provide: MAT_TOOLTIP_SCROLL_STRATEGY,
      deps: [_angular_cdk_overlay.Overlay],
      useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY
  };
  /**
   * Directive that attaches a material design tooltip to the host element. Animates the showing and
   * hiding of a tooltip provided position (defaults to below the element).
   *
   * https://material.google.com/components/tooltips.html
   */
  var MatTooltip = /** @class */ (function () {
      function MatTooltip(_overlay, _elementRef, _scrollDispatcher, _viewContainerRef, _ngZone, _platform, _ariaDescriber, _focusMonitor, _scrollStrategy, _dir) {
          var _this = this;
          this._overlay = _overlay;
          this._elementRef = _elementRef;
          this._scrollDispatcher = _scrollDispatcher;
          this._viewContainerRef = _viewContainerRef;
          this._ngZone = _ngZone;
          this._platform = _platform;
          this._ariaDescriber = _ariaDescriber;
          this._focusMonitor = _focusMonitor;
          this._scrollStrategy = _scrollStrategy;
          this._dir = _dir;
          this._position = 'below';
          this._disabled = false;
          /**
           * The default delay in ms before showing the tooltip after show is called
           */
          this.showDelay = 0;
          /**
           * The default delay in ms before hiding the tooltip after hide is called
           */
          this.hideDelay = 0;
          this._message = '';
          this._manualListeners = new Map();
          var /** @type {?} */ element = _elementRef.nativeElement;
          // The mouse events shouldn't be bound on iOS devices, because
          // they can prevent the first tap from firing its click event.
          if (!_platform.IOS) {
              this._manualListeners.set('mouseenter', function () { return _this.show(); });
              this._manualListeners.set('mouseleave', function () { return _this.hide(); });
              this._manualListeners
                  .forEach(function (listener, event) { return _elementRef.nativeElement.addEventListener(event, listener); });
          }
          else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
              // When we bind a gesture event on an element (in this case `longpress`), HammerJS
              // will add some inline styles by default, including `user-select: none`. This is
              // problematic on iOS, because it will prevent users from typing in inputs. If
              // we're on iOS and the tooltip is attached on an input or textarea, we clear
              // the `user-select` to avoid these issues.
              element.style.webkitUserSelect = element.style.userSelect = '';
          }
          _focusMonitor.monitor(element, false).subscribe(function (origin) {
              // Note that the focus monitor runs outside the Angular zone.
              if (!origin) {
                  _ngZone.run(function () { return _this.hide(0); });
              }
              else if (origin !== 'program') {
                  _ngZone.run(function () { return _this.show(); });
              }
          });
      }
      Object.defineProperty(MatTooltip.prototype, "position", {
          get: /**
           * Allows the user to define the position of the tooltip relative to the parent element
           * @return {?}
           */
          function () { return this._position; },
          set: /**
           * @param {?} value
           * @return {?}
           */
          function (value) {
              if (value !== this._position) {
                  this._position = value;
                  // TODO(andrewjs): When the overlay's position can be dynamically changed, do not destroy
                  // the tooltip.
                  if (this._tooltipInstance) {
                      this._disposeTooltip();
                  }
              }
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MatTooltip.prototype, "disabled", {
          get: /**
           * Disables the display of the tooltip.
           * @return {?}
           */
          function () { return this._disabled; },
          set: /**
           * @param {?} value
           * @return {?}
           */
          function (value) {
              this._disabled = _angular_cdk_coercion.coerceBooleanProperty(value);
              // If tooltip is disabled, hide immediately.
              if (this._disabled) {
                  this.hide(0);
              }
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MatTooltip.prototype, "_positionDeprecated", {
          get: /**
           * @deprecated
           * @return {?}
           */
          function () { return this._position; },
          set: /**
           * @param {?} value
           * @return {?}
           */
          function (value) { this._position = value; },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MatTooltip.prototype, "message", {
          get: /**
           * The message to be displayed in the tooltip
           * @return {?}
           */
          function () { return this._message; },
          set: /**
           * @param {?} value
           * @return {?}
           */
          function (value) {
              this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message);
              // If the message is not a string (e.g. number), convert it to a string and trim it.
              this._message = value != null ? ("" + value).trim() : '';
              if (!this._message && this._isTooltipVisible()) {
                  this.hide(0);
              }
              else {
                  this._updateTooltipMessage();
                  this._ariaDescriber.describe(this._elementRef.nativeElement, this.message);
              }
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MatTooltip.prototype, "tooltipClass", {
          get: /**
           * Classes to be passed to the tooltip. Supports the same syntax as `ngClass`.
           * @return {?}
           */
          function () { return this._tooltipClass; },
          set: /**
           * @param {?} value
           * @return {?}
           */
          function (value) {
              this._tooltipClass = value;
              if (this._tooltipInstance) {
                  this._setTooltipClass(this._tooltipClass);
              }
          },
          enumerable: true,
          configurable: true
      });
      /**
       * Dispose the tooltip when destroyed.
       */
      /**
       * Dispose the tooltip when destroyed.
       * @return {?}
       */
      MatTooltip.prototype.ngOnDestroy = /**
       * Dispose the tooltip when destroyed.
       * @return {?}
       */
      function () {
          var _this = this;
          if (this._tooltipInstance) {
              this._disposeTooltip();
          }
          // Clean up the event listeners set in the constructor
          if (!this._platform.IOS) {
              this._manualListeners.forEach(function (listener, event) {
                  _this._elementRef.nativeElement.removeEventListener(event, listener);
              });
              this._manualListeners.clear();
          }
          this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.message);
          this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
      };
      /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
      /**
       * Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input
       * @param {?=} delay
       * @return {?}
       */
      MatTooltip.prototype.show = /**
       * Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input
       * @param {?=} delay
       * @return {?}
       */
      function (delay) {
          if (delay === void 0) { delay = this.showDelay; }
          if (this.disabled || !this.message) {
              return;
          }
          if (!this._tooltipInstance) {
              this._createTooltip();
          }
          this._setTooltipClass(this._tooltipClass);
          this._updateTooltipMessage(); /** @type {?} */
          ((this._tooltipInstance)).show(this._position, delay);
      };
      /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */
      /**
       * Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input
       * @param {?=} delay
       * @return {?}
       */
      MatTooltip.prototype.hide = /**
       * Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input
       * @param {?=} delay
       * @return {?}
       */
      function (delay) {
          if (delay === void 0) { delay = this.hideDelay; }
          if (this._tooltipInstance) {
              this._tooltipInstance.hide(delay);
          }
      };
      /** Shows/hides the tooltip */
      /**
       * Shows/hides the tooltip
       * @return {?}
       */
      MatTooltip.prototype.toggle = /**
       * Shows/hides the tooltip
       * @return {?}
       */
      function () {
          this._isTooltipVisible() ? this.hide() : this.show();
      };
      /** Returns true if the tooltip is currently visible to the user */
      /**
       * Returns true if the tooltip is currently visible to the user
       * @return {?}
       */
      MatTooltip.prototype._isTooltipVisible = /**
       * Returns true if the tooltip is currently visible to the user
       * @return {?}
       */
      function () {
          return !!this._tooltipInstance && this._tooltipInstance.isVisible();
      };
      /** Handles the keydown events on the host element. */
      /**
       * Handles the keydown events on the host element.
       * @param {?} e
       * @return {?}
       */
      MatTooltip.prototype._handleKeydown = /**
       * Handles the keydown events on the host element.
       * @param {?} e
       * @return {?}
       */
      function (e) {
          if (this._isTooltipVisible() && e.keyCode === _angular_cdk_keycodes.ESCAPE) {
              e.stopPropagation();
              this.hide(0);
          }
      };
      /**
       * Create the tooltip to display
       * @return {?}
       */
      MatTooltip.prototype._createTooltip = /**
       * Create the tooltip to display
       * @return {?}
       */
      function () {
          var _this = this;
          var /** @type {?} */ overlayRef = this._createOverlay();
          var /** @type {?} */ portal = new _angular_cdk_portal.ComponentPortal(TooltipComponent, this._viewContainerRef);
          this._tooltipInstance = overlayRef.attach(portal).instance;
          // Dispose of the tooltip when the overlay is detached.
          rxjs_observable_merge.merge(/** @type {?} */ ((this._tooltipInstance)).afterHidden(), overlayRef.detachments()).subscribe(function () {
              // Check first if the tooltip has already been removed through this components destroy.
              if (_this._tooltipInstance) {
                  _this._disposeTooltip();
              }
          });
      };
      /**
       * Create the overlay config and position strategy
       * @return {?}
       */
      MatTooltip.prototype._createOverlay = /**
       * Create the overlay config and position strategy
       * @return {?}
       */
      function () {
          var _this = this;
          var /** @type {?} */ origin = this._getOrigin();
          var /** @type {?} */ overlay = this._getOverlayPosition();
          // Create connected position strategy that listens for scroll events to reposition.
          var /** @type {?} */ strategy = this._overlay
              .position()
              .connectedTo(this._elementRef, origin.main, overlay.main)
              .withFallbackPosition(origin.fallback, overlay.fallback);
          var /** @type {?} */ scrollableAncestors = this._scrollDispatcher
              .getAncestorScrollContainers(this._elementRef);
          strategy.withScrollableContainers(scrollableAncestors);
          strategy.onPositionChange.subscribe(function (change) {
              if (_this._tooltipInstance) {
                  if (change.scrollableViewProperties.isOverlayClipped && _this._tooltipInstance.isVisible()) {
                      // After position changes occur and the overlay is clipped by
                      // a parent scrollable then close the tooltip.
                      // After position changes occur and the overlay is clipped by
                      // a parent scrollable then close the tooltip.
                      _this._ngZone.run(function () { return _this.hide(0); });
                  }
                  else {
                      // Otherwise recalculate the origin based on the new position.
                      // Otherwise recalculate the origin based on the new position.
                      _this._tooltipInstance._setTransformOrigin(change.connectionPair);
                  }
              }
          });
          var /** @type {?} */ config = new _angular_cdk_overlay.OverlayConfig({
              direction: this._dir ? this._dir.value : 'ltr',
              positionStrategy: strategy,
              panelClass: TOOLTIP_PANEL_CLASS,
              scrollStrategy: this._scrollStrategy()
          });
          this._overlayRef = this._overlay.create(config);
          return this._overlayRef;
      };
      /**
       * Disposes the current tooltip and the overlay it is attached to
       * @return {?}
       */
      MatTooltip.prototype._disposeTooltip = /**
       * Disposes the current tooltip and the overlay it is attached to
       * @return {?}
       */
      function () {
          if (this._overlayRef) {
              this._overlayRef.dispose();
              this._overlayRef = null;
          }
          this._tooltipInstance = null;
      };
      /**
       * Returns the origin position and a fallback position based on the user's position preference.
       * The fallback position is the inverse of the origin (e.g. 'below' -> 'above').
       */
      /**
       * Returns the origin position and a fallback position based on the user's position preference.
       * The fallback position is the inverse of the origin (e.g. 'below' -> 'above').
       * @return {?}
       */
      MatTooltip.prototype._getOrigin = /**
       * Returns the origin position and a fallback position based on the user's position preference.
       * The fallback position is the inverse of the origin (e.g. 'below' -> 'above').
       * @return {?}
       */
      function () {
          var /** @type {?} */ isDirectionLtr = !this._dir || this._dir.value == 'ltr';
          var /** @type {?} */ position;
          if (this.position == 'above' || this.position == 'below') {
              position = { originX: 'center', originY: this.position == 'above' ? 'top' : 'bottom' };
          }
          else if (this.position == 'left' ||
              this.position == 'before' && isDirectionLtr ||
              this.position == 'after' && !isDirectionLtr) {
              position = { originX: 'start', originY: 'center' };
          }
          else if (this.position == 'right' ||
              this.position == 'after' && isDirectionLtr ||
              this.position == 'before' && !isDirectionLtr) {
              position = { originX: 'end', originY: 'center' };
          }
          else {
              throw getMatTooltipInvalidPositionError(this.position);
          }
          var _a = this._invertPosition(position.originX, position.originY), x = _a.x, y = _a.y;
          return {
              main: position,
              fallback: { originX: x, originY: y }
          };
      };
      /** Returns the overlay position and a fallback position based on the user's preference */
      /**
       * Returns the overlay position and a fallback position based on the user's preference
       * @return {?}
       */
      MatTooltip.prototype._getOverlayPosition = /**
       * Returns the overlay position and a fallback position based on the user's preference
       * @return {?}
       */
      function () {
          var /** @type {?} */ isLtr = !this._dir || this._dir.value == 'ltr';
          var /** @type {?} */ position;
          if (this.position == 'above') {
              position = { overlayX: 'center', overlayY: 'bottom' };
          }
          else if (this.position == 'below') {
              position = { overlayX: 'center', overlayY: 'top' };
          }
          else if (this.position == 'left' ||
              this.position == 'before' && isLtr ||
              this.position == 'after' && !isLtr) {
              position = { overlayX: 'end', overlayY: 'center' };
          }
          else if (this.position == 'right' ||
              this.position == 'after' && isLtr ||
              this.position == 'before' && !isLtr) {
              position = { overlayX: 'start', overlayY: 'center' };
          }
          else {
              throw getMatTooltipInvalidPositionError(this.position);
          }
          var _a = this._invertPosition(position.overlayX, position.overlayY), x = _a.x, y = _a.y;
          return {
              main: position,
              fallback: { overlayX: x, overlayY: y }
          };
      };
      /**
       * Updates the tooltip message and repositions the overlay according to the new message length
       * @return {?}
       */
      MatTooltip.prototype._updateTooltipMessage = /**
       * Updates the tooltip message and repositions the overlay according to the new message length
       * @return {?}
       */
      function () {
          var _this = this;
          // Must wait for the message to be painted to the tooltip so that the overlay can properly
          // calculate the correct positioning based on the size of the text.
          if (this._tooltipInstance) {
              this._tooltipInstance.message = this.message;
              this._tooltipInstance._markForCheck();
              this._ngZone.onMicrotaskEmpty.asObservable().pipe(rxjs_operators_take.take(1)).subscribe(function () {
                  if (_this._tooltipInstance) {
                      /** @type {?} */ ((_this._overlayRef)).updatePosition();
                  }
              });
          }
      };
      /**
       * Updates the tooltip class
       * @param {?} tooltipClass
       * @return {?}
       */
      MatTooltip.prototype._setTooltipClass = /**
       * Updates the tooltip class
       * @param {?} tooltipClass
       * @return {?}
       */
      function (tooltipClass) {
          if (this._tooltipInstance) {
              this._tooltipInstance.tooltipClass = tooltipClass;
              this._tooltipInstance._markForCheck();
          }
      };
      /**
       * Inverts an overlay position.
       * @param {?} x
       * @param {?} y
       * @return {?}
       */
      MatTooltip.prototype._invertPosition = /**
       * Inverts an overlay position.
       * @param {?} x
       * @param {?} y
       * @return {?}
       */
      function (x, y) {
          if (this.position === 'above' || this.position === 'below') {
              if (y === 'top') {
                  y = 'bottom';
              }
              else if (y === 'bottom') {
                  y = 'top';
              }
          }
          else {
              if (x === 'end') {
                  x = 'start';
              }
              else if (x === 'start') {
                  x = 'end';
              }
          }
          return { x: x, y: y };
      };
      MatTooltip.decorators = [
          { type: _angular_core.Directive, args: [{
                      selector: '[mat-tooltip], [matTooltip]',
                      exportAs: 'matTooltip',
                      host: {
                          '(longpress)': 'show()',
                          '(keydown)': '_handleKeydown($event)',
                          '(touchend)': 'hide(' + TOUCHEND_HIDE_DELAY + ')',
                      },
                  },] },
      ];
      /** @nocollapse */
      MatTooltip.ctorParameters = function () { return [
          { type: _angular_cdk_overlay.Overlay, },
          { type: _angular_core.ElementRef, },
          { type: _angular_cdk_scrolling.ScrollDispatcher, },
          { type: _angular_core.ViewContainerRef, },
          { type: _angular_core.NgZone, },
          { type: _angular_cdk_platform.Platform, },
          { type: _angular_cdk_a11y.AriaDescriber, },
          { type: _angular_cdk_a11y.FocusMonitor, },
          { type: undefined, decorators: [{ type: _angular_core.Inject, args: [MAT_TOOLTIP_SCROLL_STRATEGY,] },] },
          { type: _angular_cdk_bidi.Directionality, decorators: [{ type: _angular_core.Optional },] },
      ]; };
      MatTooltip.propDecorators = {
          "position": [{ type: _angular_core.Input, args: ['matTooltipPosition',] },],
          "disabled": [{ type: _angular_core.Input, args: ['matTooltipDisabled',] },],
          "_positionDeprecated": [{ type: _angular_core.Input, args: ['tooltip-position',] },],
          "showDelay": [{ type: _angular_core.Input, args: ['matTooltipShowDelay',] },],
          "hideDelay": [{ type: _angular_core.Input, args: ['matTooltipHideDelay',] },],
          "message": [{ type: _angular_core.Input, args: ['matTooltip',] },],
          "tooltipClass": [{ type: _angular_core.Input, args: ['matTooltipClass',] },],
      };
      return MatTooltip;
  }());
  /**
   * Internal component that wraps the tooltip's content.
   * \@docs-private
   */
  var TooltipComponent = /** @class */ (function () {
      function TooltipComponent(_changeDetectorRef) {
          this._changeDetectorRef = _changeDetectorRef;
          /**
           * Property watched by the animation framework to show or hide the tooltip
           */
          this._visibility = 'initial';
          /**
           * Whether interactions on the page should close the tooltip
           */
          this._closeOnInteraction = false;
          /**
           * The transform origin used in the animation for showing and hiding the tooltip
           */
          this._transformOrigin = 'bottom';
          /**
           * Subject for notifying that the tooltip has been hidden from the view
           */
          this._onHide = new rxjs_Subject.Subject();
      }
      /**
       * Shows the tooltip with an animation originating from the provided origin
       * @param position Position of the tooltip.
       * @param delay Amount of milliseconds to the delay showing the tooltip.
       */
      /**
       * Shows the tooltip with an animation originating from the provided origin
       * @param {?} position Position of the tooltip.
       * @param {?} delay Amount of milliseconds to the delay showing the tooltip.
       * @return {?}
       */
      TooltipComponent.prototype.show = /**
       * Shows the tooltip with an animation originating from the provided origin
       * @param {?} position Position of the tooltip.
       * @param {?} delay Amount of milliseconds to the delay showing the tooltip.
       * @return {?}
       */
      function (position, delay) {
          var _this = this;
          // Cancel the delayed hide if it is scheduled
          if (this._hideTimeoutId) {
              clearTimeout(this._hideTimeoutId);
          }
          // Body interactions should cancel the tooltip if there is a delay in showing.
          this._closeOnInteraction = true;
          this._position = position;
          this._showTimeoutId = setTimeout(function () {
              _this._visibility = 'visible';
              // Mark for check so if any parent component has set the
              // ChangeDetectionStrategy to OnPush it will be checked anyways
              // Mark for check so if any parent component has set the
              // ChangeDetectionStrategy to OnPush it will be checked anyways
              _this._markForCheck();
          }, delay);
      };
      /**
       * Begins the animation to hide the tooltip after the provided delay in ms.
       * @param delay Amount of milliseconds to delay showing the tooltip.
       */
      /**
       * Begins the animation to hide the tooltip after the provided delay in ms.
       * @param {?} delay Amount of milliseconds to delay showing the tooltip.
       * @return {?}
       */
      TooltipComponent.prototype.hide = /**
       * Begins the animation to hide the tooltip after the provided delay in ms.
       * @param {?} delay Amount of milliseconds to delay showing the tooltip.
       * @return {?}
       */
      function (delay) {
          var _this = this;
          // Cancel the delayed show if it is scheduled
          if (this._showTimeoutId) {
              clearTimeout(this._showTimeoutId);
          }
          this._hideTimeoutId = setTimeout(function () {
              _this._visibility = 'hidden';
              // Mark for check so if any parent component has set the
              // ChangeDetectionStrategy to OnPush it will be checked anyways
              // Mark for check so if any parent component has set the
              // ChangeDetectionStrategy to OnPush it will be checked anyways
              _this._markForCheck();
          }, delay);
      };
      /** Returns an observable that notifies when the tooltip has been hidden from view. */
      /**
       * Returns an observable that notifies when the tooltip has been hidden from view.
       * @return {?}
       */
      TooltipComponent.prototype.afterHidden = /**
       * Returns an observable that notifies when the tooltip has been hidden from view.
       * @return {?}
       */
      function () {
          return this._onHide.asObservable();
      };
      /** Whether the tooltip is being displayed. */
      /**
       * Whether the tooltip is being displayed.
       * @return {?}
       */
      TooltipComponent.prototype.isVisible = /**
       * Whether the tooltip is being displayed.
       * @return {?}
       */
      function () {
          return this._visibility === 'visible';
      };
      /** Sets the tooltip transform origin according to the position of the tooltip overlay. */
      /**
       * Sets the tooltip transform origin according to the position of the tooltip overlay.
       * @param {?} overlayPosition
       * @return {?}
       */
      TooltipComponent.prototype._setTransformOrigin = /**
       * Sets the tooltip transform origin according to the position of the tooltip overlay.
       * @param {?} overlayPosition
       * @return {?}
       */
      function (overlayPosition) {
          var /** @type {?} */ axis = (this._position === 'above' || this._position === 'below') ? 'Y' : 'X';
          var /** @type {?} */ position = axis == 'X' ? overlayPosition.overlayX : overlayPosition.overlayY;
          if (position === 'top' || position === 'bottom') {
              this._transformOrigin = position;
          }
          else if (position === 'start') {
              this._transformOrigin = 'left';
          }
          else if (position === 'end') {
              this._transformOrigin = 'right';
          }
          else {
              throw getMatTooltipInvalidPositionError(this._position);
          }
      };
      /**
       * @return {?}
       */
      TooltipComponent.prototype._animationStart = /**
       * @return {?}
       */
      function () {
          this._closeOnInteraction = false;
      };
      /**
       * @param {?} event
       * @return {?}
       */
      TooltipComponent.prototype._animationDone = /**
       * @param {?} event
       * @return {?}
       */
      function (event) {
          var _this = this;
          var /** @type {?} */ toState = /** @type {?} */ (event.toState);
          if (toState === 'hidden' && !this.isVisible()) {
              this._onHide.next();
          }
          if (toState === 'visible' || toState === 'hidden') {
              // Note: as of Angular 4.3, the animations module seems to fire the `start` callback before
              // the end if animations are disabled. Make this call async to ensure that it still fires
              // at the appropriate time.
              Promise.resolve().then(function () { return _this._closeOnInteraction = true; });
          }
      };
      /**
       * Interactions on the HTML body should close the tooltip immediately as defined in the
       * material design spec.
       * https://material.google.com/components/tooltips.html#tooltips-interaction
       */
      /**
       * Interactions on the HTML body should close the tooltip immediately as defined in the
       * material design spec.
       * https://material.google.com/components/tooltips.html#tooltips-interaction
       * @return {?}
       */
      TooltipComponent.prototype._handleBodyInteraction = /**
       * Interactions on the HTML body should close the tooltip immediately as defined in the
       * material design spec.
       * https://material.google.com/components/tooltips.html#tooltips-interaction
       * @return {?}
       */
      function () {
          if (this._closeOnInteraction) {
              this.hide(0);
          }
      };
      /**
       * Marks that the tooltip needs to be checked in the next change detection run.
       * Mainly used for rendering the initial text before positioning a tooltip, which
       * can be problematic in components with OnPush change detection.
       */
      /**
       * Marks that the tooltip needs to be checked in the next change detection run.
       * Mainly used for rendering the initial text before positioning a tooltip, which
       * can be problematic in components with OnPush change detection.
       * @return {?}
       */
      TooltipComponent.prototype._markForCheck = /**
       * Marks that the tooltip needs to be checked in the next change detection run.
       * Mainly used for rendering the initial text before positioning a tooltip, which
       * can be problematic in components with OnPush change detection.
       * @return {?}
       */
      function () {
          this._changeDetectorRef.markForCheck();
      };
      TooltipComponent.decorators = [
          { type: _angular_core.Component, args: [{selector: 'mat-tooltip-component',
                      template: "<div class=\"mat-tooltip\" [ngClass]=\"tooltipClass\" [style.transform-origin]=\"_transformOrigin\" [@state]=\"_visibility\" (@state.start)=\"_animationStart()\" (@state.done)=\"_animationDone($event)\">{{message}}</div>",
                      styles: [".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}"],
                      encapsulation: _angular_core.ViewEncapsulation.None,
                      preserveWhitespaces: false,
                      changeDetection: _angular_core.ChangeDetectionStrategy.OnPush,
                      animations: [
                          _angular_animations.trigger('state', [
                              _angular_animations.state('initial, void, hidden', _angular_animations.style({ transform: 'scale(0)' })),
                              _angular_animations.state('visible', _angular_animations.style({ transform: 'scale(1)' })),
                              _angular_animations.transition('* => visible', _angular_animations.animate('150ms cubic-bezier(0.0, 0.0, 0.2, 1)')),
                              _angular_animations.transition('* => hidden', _angular_animations.animate('150ms cubic-bezier(0.4, 0.0, 1, 1)')),
                          ])
                      ],
                      host: {
                          // Forces the element to have a layout in IE and Edge. This fixes issues where the element
                          // won't be rendered if the animations are disabled or there is no web animations polyfill.
                          '[style.zoom]': '_visibility === "visible" ? 1 : null',
                          '(body:click)': 'this._handleBodyInteraction()',
                          'aria-hidden': 'true',
                      }
                  },] },
      ];
      /** @nocollapse */
      TooltipComponent.ctorParameters = function () { return [
          { type: _angular_core.ChangeDetectorRef, },
      ]; };
      return TooltipComponent;
  }());
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes} checked by tsc
   */
  
  var MatTooltipModule = /** @class */ (function () {
      function MatTooltipModule() {
      }
      MatTooltipModule.decorators = [
          { type: _angular_core.NgModule, args: [{
                      imports: [
                          _angular_common.CommonModule,
                          _angular_cdk_overlay.OverlayModule,
                          _angular_material_core.MatCommonModule,
                          _angular_cdk_platform.PlatformModule,
                          _angular_cdk_a11y.A11yModule,
                      ],
                      exports: [MatTooltip, TooltipComponent, _angular_material_core.MatCommonModule],
                      declarations: [MatTooltip, TooltipComponent],
                      entryComponents: [TooltipComponent],
                      providers: [MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER, _angular_cdk_a11y.ARIA_DESCRIBER_PROVIDER],
                  },] },
      ];
      /** @nocollapse */
      MatTooltipModule.ctorParameters = function () { return []; };
      return MatTooltipModule;
  }());
  
  exports.MatTooltipModule = MatTooltipModule;
  exports.TOUCHEND_HIDE_DELAY = TOUCHEND_HIDE_DELAY;
  exports.SCROLL_THROTTLE_MS = SCROLL_THROTTLE_MS;
  exports.TOOLTIP_PANEL_CLASS = TOOLTIP_PANEL_CLASS;
  exports.getMatTooltipInvalidPositionError = getMatTooltipInvalidPositionError;
  exports.MAT_TOOLTIP_SCROLL_STRATEGY = MAT_TOOLTIP_SCROLL_STRATEGY;
  exports.MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY = MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY;
  exports.MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER = MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER;
  exports.MatTooltip = MatTooltip;
  exports.TooltipComponent = TooltipComponent;
  
  Object.defineProperty(exports, '__esModule', { value: true });
  
  })));
  //# sourceMappingURL=material-tooltip.umd.js.map
  