UNPKG

@angular/material

Version:
11 lines (10 loc) 41.1 kB
/** * @license * Copyright Google Inc. 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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/a11y"),require("@angular/cdk/overlay"),require("@angular/cdk/platform"),require("@angular/common"),require("@angular/core"),require("@angular/cdk/bidi"),require("@angular/platform-browser"),require("@angular/cdk/coercion"),require("rxjs/Subject"),require("@angular/cdk/keycodes"),require("@angular/cdk/scrolling"),require("@angular/cdk/portal"),require("@angular/cdk/rxjs"),require("@angular/animations")):"function"==typeof define&&define.amd?define(["exports","@angular/cdk/a11y","@angular/cdk/overlay","@angular/cdk/platform","@angular/common","@angular/core","@angular/cdk/bidi","@angular/platform-browser","@angular/cdk/coercion","rxjs/Subject","@angular/cdk/keycodes","@angular/cdk/scrolling","@angular/cdk/portal","@angular/cdk/rxjs","@angular/animations"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.tooltip=t.ng.material.tooltip||{}),t.ng.cdk.a11y,t.ng.cdk.overlay,t.ng.cdk.platform,t.ng.common,t.ng.core,t.ng.cdk.bidi,t.ng.platformBrowser,t.ng.cdk.coercion,t.Rx,t.ng.cdk.keycodes,t.ng.cdk.scrolling,t.ng.cdk.portal,t.ng.cdk.rxjs,t.ng.animations)}(this,function(t,e,o,n,i,r,a,s,p,l,c,u,d,h,m){"use strict";function f(t,e){function o(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function g(t,e){return Error('The "'+t+'-" prefix cannot be used in ng-material v1 compatibility mode. It was used on an "'+e.toLowerCase()+'" element.')}function y(t){return t||new N}function b(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var n=0,i=e;n<i.length;n++){var r=i[n];if(null!=r)for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a])}return t}function _(t,e){for(var o=Array(t),n=0;n<t;n++)o[n]=e(n);return o}function v(t){window.getComputedStyle(t).getPropertyValue("opacity")}function D(t,e,o){var n=Math.max(Math.abs(t-o.left),Math.abs(t-o.right)),i=Math.max(Math.abs(e-o.top),Math.abs(e-o.bottom));return Math.sqrt(n*n+i*i)}function I(t){return Error('Tooltip position "'+t+'" is invalid.')}function C(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:mt})}}var T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},O=function(){function t(){}return t}();O.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",O.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",O.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",O.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";var R=function(){function t(){}return t}();R.COMPLEX="375ms",R.ENTERING="225ms",R.EXITING="195ms";var w=new r.InjectionToken("md-compatibility-mode"),k=function(){function t(t,e){if(!t)throw g("mat",e.nativeElement.nodeName)}return t}();k.decorators=[{type:r.Directive,args:[{selector:"\n [mat-button],\n [mat-fab],\n [mat-icon-button],\n [mat-mini-fab],\n [mat-raised-button],\n [matCardSubtitle],\n [matCardTitle],\n [matCellDef],\n [matColumnDef],\n [matDialogActions],\n [matDialogClose],\n [matDialogContent],\n [matDialogTitle],\n [matHeaderCellDef],\n [matHeaderRowDef],\n [matLine],\n [matRowDef],\n [matStepLabel],\n [matStepperNext],\n [matStepperPrevious],\n [matTabLabel],\n [matTabLink],\n [matTabNav],\n [matTooltip],\n [matInput],\n [matPrefix],\n [matSuffix],\n mat-autocomplete,\n mat-button-toggle,\n mat-button-toggle,\n mat-button-toggle-group,\n mat-card,\n mat-card-actions,\n mat-card-content,\n mat-card-footer,\n mat-card-header,\n mat-card-subtitle,\n mat-card-title,\n mat-card-title-group,\n mat-cell,\n mat-checkbox,\n mat-chip,\n mat-dialog-actions,\n mat-dialog-container,\n mat-dialog-content,\n mat-divider,\n mat-error,\n mat-grid-list,\n mat-grid-tile,\n mat-grid-tile-footer,\n mat-grid-tile-header,\n mat-header-cell,\n mat-header-row,\n mat-hint,\n mat-horizontal-stepper,\n mat-icon,\n mat-input-container,\n mat-form-field,\n mat-list,\n mat-list-item,\n mat-menu,\n mat-nav-list,\n mat-option,\n mat-placeholder,\n mat-progress-bar,\n mat-pseudo-checkbox,\n mat-radio-button,\n mat-radio-group,\n mat-row,\n mat-select,\n mat-sidenav,\n mat-sidenav-container,\n mat-slider,\n mat-spinner,\n mat-step,\n mat-tab,\n mat-table,\n mat-tab-group,\n mat-toolbar,\n mat-vertical-stepper"}]}],k.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[w]}]},{type:r.ElementRef}]};var E=function(){function t(t,e){if(t)throw g("md",e.nativeElement.nodeName)}return t}();E.decorators=[{type:r.Directive,args:[{selector:"\n [md-button],\n [md-fab],\n [md-icon-button],\n [md-mini-fab],\n [md-raised-button],\n [mdCardSubtitle],\n [mdCardTitle],\n [mdCellDef],\n [mdColumnDef],\n [mdDialogActions],\n [mdDialogClose],\n [mdDialogContent],\n [mdDialogTitle],\n [mdHeaderCellDef],\n [mdHeaderRowDef],\n [mdLine],\n [mdRowDef],\n [mdStepLabel],\n [mdStepperNext],\n [mdStepperPrevious],\n [mdTabLabel],\n [mdTabLink],\n [mdTabNav],\n [mdTooltip],\n [mdInput],\n [mdPrefix],\n [mdSuffix],\n md-autocomplete,\n md-button-toggle,\n md-button-toggle,\n md-button-toggle-group,\n md-card,\n md-card-actions,\n md-card-content,\n md-card-footer,\n md-card-header,\n md-card-subtitle,\n md-card-title,\n md-card-title-group,\n md-cell,\n md-checkbox,\n md-chip,\n md-dialog-actions,\n md-dialog-container,\n md-dialog-content,\n md-divider,\n md-error,\n md-grid-list,\n md-grid-tile,\n md-grid-tile-footer,\n md-grid-tile-header,\n md-header-cell,\n md-header-row,\n md-hint,\n md-horizontal-stepper,\n md-icon,\n md-input-container,\n md-form-field,\n md-list,\n md-list-item,\n md-menu,\n md-nav-list,\n md-option,\n md-placeholder,\n md-progress-bar,\n md-pseudo-checkbox,\n md-radio-button,\n md-radio-group,\n md-row,\n md-select,\n md-sidenav,\n md-sidenav-container,\n md-slider,\n md-spinner,\n md-step,\n md-tab,\n md-table,\n md-tab-group,\n md-toolbar,\n md-vertical-stepper"}]}],E.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[w]}]},{type:r.ElementRef}]};var M=function(){function t(){}return t}();M.decorators=[{type:r.NgModule,args:[{declarations:[k,E],exports:[k,E]}]}],M.ctorParameters=function(){return[]};var P=function(){function t(){}return t}();P.decorators=[{type:r.NgModule,args:[{providers:[{provide:w,useValue:!0}]}]}],P.ctorParameters=function(){return[]};var S=new r.InjectionToken("md-sanity-checks"),x=function(){function t(t,e){this._document=t,this._hasDoneGlobalChecks=!1,e&&!this._hasDoneGlobalChecks&&t&&r.isDevMode()&&(this._checkDoctype(),this._checkTheme(),this._hasDoneGlobalChecks=!0)}return t.prototype._checkDoctype=function(){this._document.doctype||console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkTheme=function(){if("function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t),"none"!==getComputedStyle(t).display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t}();x.decorators=[{type:r.NgModule,args:[{imports:[M,a.BidiModule],exports:[M,a.BidiModule],providers:[{provide:S,useValue:!0}]}]}],x.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[s.DOCUMENT]}]},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[S]}]}]};var N=function(){function t(){this._listeners=[]}return t.prototype.notify=function(t,e){for(var o=0,n=this._listeners;o<n.length;o++){(0,n[o])(t,e)}},t.prototype.listen=function(t){var e=this;return this._listeners.push(t),function(){e._listeners=e._listeners.filter(function(e){return t!==e})}},t}();N.decorators=[{type:r.Injectable}],N.ctorParameters=function(){return[]};var A=(new r.Optional,new r.SkipSelf,new r.InjectionToken("MAT_DATE_LOCALE")),L={provide:A,useExisting:r.LOCALE_ID},j=function(){function t(){this._localeChanges=new l.Subject}return Object.defineProperty(t.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),t.prototype.getYear=function(t){},t.prototype.getMonth=function(t){},t.prototype.getDate=function(t){},t.prototype.getDayOfWeek=function(t){},t.prototype.getMonthNames=function(t){},t.prototype.getDateNames=function(){},t.prototype.getDayOfWeekNames=function(t){},t.prototype.getYearName=function(t){},t.prototype.getFirstDayOfWeek=function(){},t.prototype.getNumDaysInMonth=function(t){},t.prototype.clone=function(t){},t.prototype.createDate=function(t,e,o){},t.prototype.today=function(){},t.prototype.parse=function(t,e){},t.prototype.format=function(t,e){},t.prototype.addCalendarYears=function(t,e){},t.prototype.addCalendarMonths=function(t,e){},t.prototype.addCalendarDays=function(t,e){},t.prototype.toIso8601=function(t){},t.prototype.fromIso8601=function(t){},t.prototype.isDateInstance=function(t){},t.prototype.isValid=function(t){},t.prototype.setLocale=function(t){this.locale=t,this._localeChanges.next()},t.prototype.compareDate=function(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)},t.prototype.sameDate=function(t,e){return t&&e?!this.compareDate(t,e):t==e},t.prototype.clampDate=function(t,e,o){return e&&this.compareDate(t,e)<0?e:o&&this.compareDate(t,o)>0?o:t},t}(),F="undefined"!=typeof Intl,V={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},Y=_(31,function(t){return String(t+1)}),H={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},U=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,W=function(t){function e(e){var o=t.call(this)||this;return o.useUtcForDisplay=!0,t.prototype.setLocale.call(o,e),o}return f(e,t),e.prototype.getYear=function(t){return t.getFullYear()},e.prototype.getMonth=function(t){return t.getMonth()},e.prototype.getDate=function(t){return t.getDate()},e.prototype.getDayOfWeek=function(t){return t.getDay()},e.prototype.getMonthNames=function(t){var e=this;if(F){var o=new Intl.DateTimeFormat(this.locale,{month:t});return _(12,function(t){return e._stripDirectionalityCharacters(o.format(new Date(2017,t,1)))})}return V[t]},e.prototype.getDateNames=function(){var t=this;if(F){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return _(31,function(o){return t._stripDirectionalityCharacters(e.format(new Date(2017,0,o+1)))})}return Y},e.prototype.getDayOfWeekNames=function(t){var e=this;if(F){var o=new Intl.DateTimeFormat(this.locale,{weekday:t});return _(7,function(t){return e._stripDirectionalityCharacters(o.format(new Date(2017,0,t+1)))})}return H[t]},e.prototype.getYearName=function(t){if(F){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric"});return this._stripDirectionalityCharacters(e.format(t))}return String(this.getYear(t))},e.prototype.getFirstDayOfWeek=function(){return 0},e.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},e.prototype.clone=function(t){return this.createDate(this.getYear(t),this.getMonth(t),this.getDate(t))},e.prototype.createDate=function(t,e,o){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(o<1)throw Error('Invalid date "'+o+'". Date has to be greater than 0.');var n=this._createDateWithOverflow(t,e,o);if(n.getMonth()!=e)throw Error('Invalid date "'+o+'" for month with index "'+e+'".');return n},e.prototype.today=function(){return new Date},e.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},e.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(F){this.useUtcForDisplay&&(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),e=b({},e,{timeZone:"utc"}));var o=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(o.format(t))}return this._stripDirectionalityCharacters(t.toDateString())},e.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},e.prototype.addCalendarMonths=function(t,e){var o=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(o)!=((this.getMonth(t)+e)%12+12)%12&&(o=this._createDateWithOverflow(this.getYear(o),this.getMonth(o),0)),o},e.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},e.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},e.prototype.fromIso8601=function(t){if(U.test(t)){var e=new Date(t);if(this.isValid(e))return e}return null},e.prototype.isDateInstance=function(t){return t instanceof Date},e.prototype.isValid=function(t){return!isNaN(t.getTime())},e.prototype._createDateWithOverflow=function(t,e,o){var n=new Date(t,e,o);return t>=0&&t<100&&n.setFullYear(this.getYear(n)-1900),n},e.prototype._2digit=function(t){return("00"+t).slice(-2)},e.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},e}(j);W.decorators=[{type:r.Injectable}],W.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[A]}]}]};var G=new r.InjectionToken("md-date-formats"),z={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},B=function(){function t(){}return t}();B.decorators=[{type:r.NgModule,args:[{providers:[{provide:j,useClass:W},L]}]}],B.ctorParameters=function(){return[]};var q=function(){function t(){}return t}();q.decorators=[{type:r.NgModule,args:[{imports:[B],providers:[{provide:G,useValue:z}]}]}],q.ctorParameters=function(){return[]};var Z=(new r.InjectionToken("md-error-global-options"),function(t){function e(){var e=t.call(this)||this;return e._hammer="undefined"!=typeof window?window.Hammer:null,e.events=e._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!e._hammer&&r.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),e}return f(e,t),e.prototype.buildHammer=function(t){var e=new this._hammer(t),o=new this._hammer.Pan,n=new this._hammer.Swipe,i=new this._hammer.Press,r=this._createRecognizer(o,{event:"slide",threshold:0},n),a=this._createRecognizer(i,{event:"longpress",time:500});return o.recognizeWith(n),e.add([n,i,o,r,a]),e},e.prototype._createRecognizer=function(t,e){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];var i=new t.constructor(e);return o.push(t),o.forEach(function(t){return i.recognizeWith(t)}),i},e}(s.HammerGestureConfig));Z.decorators=[{type:r.Injectable}],Z.ctorParameters=function(){return[]};var J=function(){function t(){}return t}();J.decorators=[{type:r.Directive,args:[{selector:"[md-line], [mat-line], [mdLine], [matLine]",host:{class:"mat-line"}}]}],J.ctorParameters=function(){return[]};var X=function(){function t(){}return t}();X.decorators=[{type:r.NgModule,args:[{imports:[x],exports:[J,x],declarations:[J]}]}],X.ctorParameters=function(){return[]};var K={};K.FADING_IN=0,K.VISIBLE=1,K.FADING_OUT=2,K.HIDDEN=3,K[K.FADING_IN]="FADING_IN",K[K.VISIBLE]="VISIBLE",K[K.FADING_OUT]="FADING_OUT",K[K.HIDDEN]="HIDDEN";var $=function(){function t(t,e,o){this._renderer=t,this.element=e,this.config=o,this.state=K.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),Q=function(){function t(t,e,o,n){this._ngZone=e,this._ruler=o,this._isMousedown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this.rippleConfig={},this.rippleDisabled=!1,n.isBrowser&&(this._containerElement=t.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown.bind(this)),this._triggerEvents.set("mouseup",this.onMouseup.bind(this)),this._triggerEvents.set("mouseleave",this.onMouseLeave.bind(this)),this.setTriggerElement(this._containerElement))}return t.prototype.fadeInRipple=function(t,e,o){var n=this;void 0===o&&(o={});var i=this._containerElement.getBoundingClientRect();if(o.centered)t=i.left+i.width/2,e=i.top+i.height/2;else{var r=this._ruler.getViewportScrollPosition();t-=r.left,e-=r.top}var a=o.radius||D(t,e,i),s=1/(o.speedFactor||1)*450,p=t-i.left,l=e-i.top,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=p-a+"px",c.style.top=l-a+"px",c.style.height=2*a+"px",c.style.width=2*a+"px",c.style.backgroundColor=o.color||null,c.style.transitionDuration=s+"ms",this._containerElement.appendChild(c),v(c),c.style.transform="scale(1)";var u=new $(this,c,o);return u.state=K.FADING_IN,this._activeRipples.add(u),this.runTimeoutOutsideZone(function(){u.state=K.VISIBLE,o.persistent||n._isMousedown||u.fadeOut()},s),u},t.prototype.fadeOutRipple=function(t){if(this._activeRipples.delete(t)){var e=t.element;e.style.transitionDuration="400ms",e.style.opacity="0",t.state=K.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=K.HIDDEN,e.parentNode.removeChild(e)},400)}},t.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(t){return t.fadeOut()})},t.prototype.setTriggerElement=function(t){var e=this;this._triggerElement&&this._triggerEvents.forEach(function(t,o){e._triggerElement.removeEventListener(o,t)}),t&&this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(e,o){return t.addEventListener(o,e)})}),this._triggerElement=t},t.prototype.onMousedown=function(t){this.rippleDisabled||(this._isMousedown=!0,this.fadeInRipple(t.pageX,t.pageY,this.rippleConfig))},t.prototype.onMouseup=function(){this._isMousedown=!1,this._activeRipples.forEach(function(t){t.config.persistent||t.state!==K.VISIBLE||t.fadeOut()})},t.prototype.onMouseLeave=function(){this._isMousedown&&this.onMouseup()},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t}(),tt=new r.InjectionToken("md-ripple-global-options"),et=function(){function t(t,e,o,n,i){this.radius=0,this.speedFactor=1,this._rippleRenderer=new Q(t,e,o,n),this._globalOptions=i||{},this._updateRippleRenderer()}return Object.defineProperty(t.prototype,"_matRippleTrigger",{get:function(){return this.trigger},set:function(t){this.trigger=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matRippleCentered",{get:function(){return this.centered},set:function(t){this.centered=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matRippleDisabled",{get:function(){return this.disabled},set:function(t){this.disabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matRippleRadius",{get:function(){return this.radius},set:function(t){this.radius=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matRippleSpeedFactor",{get:function(){return this.speedFactor},set:function(t){this.speedFactor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matRippleColor",{get:function(){return this.color},set:function(t){this.color=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matRippleUnbounded",{get:function(){return this.unbounded},set:function(t){this.unbounded=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){(t.trigger||t._matRippleTrigger)&&this.trigger&&this._rippleRenderer.setTriggerElement(this.trigger),this._updateRippleRenderer()},t.prototype.ngOnDestroy=function(){this._rippleRenderer.setTriggerElement(null)},t.prototype.launch=function(t,e,o){return void 0===o&&(o=this.rippleConfig),this._rippleRenderer.fadeInRipple(t,e,o)},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1),radius:this.radius,color:this.color}},enumerable:!0,configurable:!0}),t.prototype._updateRippleRenderer=function(){this._rippleRenderer.rippleDisabled=this._globalOptions.disabled||this.disabled,this._rippleRenderer.rippleConfig=this.rippleConfig},t}();et.decorators=[{type:r.Directive,args:[{selector:"[md-ripple], [mat-ripple], [mdRipple], [matRipple]",exportAs:"mdRipple, matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],et.ctorParameters=function(){return[{type:r.ElementRef},{type:r.NgZone},{type:u.ViewportRuler},{type:n.Platform},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[tt]}]}]},et.propDecorators={trigger:[{type:r.Input,args:["mdRippleTrigger"]}],centered:[{type:r.Input,args:["mdRippleCentered"]}],disabled:[{type:r.Input,args:["mdRippleDisabled"]}],radius:[{type:r.Input,args:["mdRippleRadius"]}],speedFactor:[{type:r.Input,args:["mdRippleSpeedFactor"]}],color:[{type:r.Input,args:["mdRippleColor"]}],unbounded:[{type:r.Input,args:["mdRippleUnbounded"]}],_matRippleTrigger:[{type:r.Input,args:["matRippleTrigger"]}],_matRippleCentered:[{type:r.Input,args:["matRippleCentered"]}],_matRippleDisabled:[{type:r.Input,args:["matRippleDisabled"]}],_matRippleRadius:[{type:r.Input,args:["matRippleRadius"]}],_matRippleSpeedFactor:[{type:r.Input,args:["matRippleSpeedFactor"]}],_matRippleColor:[{type:r.Input,args:["matRippleColor"]}],_matRippleUnbounded:[{type:r.Input,args:["matRippleUnbounded"]}]};var ot=function(){function t(){}return t}();ot.decorators=[{type:r.NgModule,args:[{imports:[x,n.PlatformModule,u.ScrollDispatchModule],exports:[et,x],declarations:[et],providers:[u.VIEWPORT_RULER_PROVIDER]}]}],ot.ctorParameters=function(){return[]};var nt=function(){function t(){this.state="unchecked",this.disabled=!1}return t}();nt.decorators=[{type:r.Component,args:[{encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,selector:"md-pseudo-checkbox, mat-pseudo-checkbox",styles:[".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:9px;left:2px;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:5px;left:3px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],template:"",host:{class:"mat-pseudo-checkbox","[class.mat-pseudo-checkbox-indeterminate]":'state === "indeterminate"',"[class.mat-pseudo-checkbox-checked]":'state === "checked"',"[class.mat-pseudo-checkbox-disabled]":"disabled"}}]}],nt.ctorParameters=function(){return[]},nt.propDecorators={state:[{type:r.Input}],disabled:[{type:r.Input}]};var it=function(){function t(){}return t}();it.decorators=[{type:r.NgModule,args:[{exports:[nt],declarations:[nt]}]}],it.ctorParameters=function(){return[]};var rt=function(){function t(){}return t}(),at=function(t){return function(t){function e(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var n=t.apply(this,e)||this;return n._disabled=!1,n}return f(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=p.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}(rt),st=0,pt=function(t){function e(){var e=t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+st++,e}return f(e,t),e}(at);pt.decorators=[{type:r.Component,args:[{selector:"md-optgroup, mat-optgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }}</label><ng-content select="md-option, mat-option"></ng-content>',encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],pt.ctorParameters=function(){return[]},pt.propDecorators={label:[{type:r.Input}]};var lt=0,ct=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),ut=function(){function t(t,e,o){this._element=t,this._changeDetectorRef=e,this.group=o,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="md-option-"+lt++,this.onSelectionChange=new r.EventEmitter}return Object.defineProperty(t.prototype,"multiple",{get:function(){return this._multiple},set:function(t){t!==this._multiple&&(this._multiple=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=p.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=t,this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewValue",{get:function(){return(this._getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),t.prototype.select=function(){this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.deselect=function(){this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.focus=function(){var t=this._getHostElement();"function"==typeof t.focus&&t.focus()},t.prototype.setActiveStyles=function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())},t.prototype.setInactiveStyles=function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())},t.prototype.getLabel=function(){return this.viewValue},t.prototype._handleKeydown=function(t){t.keyCode!==c.ENTER&&t.keyCode!==c.SPACE||(this._selectViaInteraction(),t.preventDefault())},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new ct(this,t))},t.countGroupLabelsBeforeOption=function(t,e,o){if(o.length){for(var n=e.toArray(),i=o.toArray(),r=0,a=0;a<t+1;a++)n[a].group&&n[a].group===i[r]&&r++;return r}return 0},t}();ut.decorators=[{type:r.Component,args:[{selector:"md-option, mat-option",host:{role:"option","[attr.tabindex]":"_getTabIndex()","[class.mat-selected]":"selected","[class.mat-option-multiple]":"multiple","[class.mat-active]":"active","[id]":"id","[attr.aria-selected]":"selected.toString()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},template:'<span *ngIf="multiple"><mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="selected ? \'checked\' : \'\'" [disabled]="disabled"></mat-pseudo-checkbox></span><ng-content></ng-content><div class="mat-option-ripple" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disabled || disableRipple"></div>',encapsulation:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,viewProviders:[{provide:w,useValue:!0}]}]}],ut.ctorParameters=function(){return[{type:r.ElementRef},{type:r.ChangeDetectorRef},{type:pt,decorators:[{type:r.Optional}]}]},ut.propDecorators={value:[{type:r.Input}],disabled:[{type:r.Input}],onSelectionChange:[{type:r.Output}]};var dt=function(){function t(){}return t}();dt.decorators=[{type:r.NgModule,args:[{imports:[ot,i.CommonModule,it],exports:[ut,pt],declarations:[ut,pt]}]}],dt.ctorParameters=function(){return[]};var ht=(new r.InjectionToken("md-placeholder-global-options"),function(){function t(){}return t}());ht.decorators=[{type:r.NgModule,args:[{imports:[e.A11yModule],exports:[e.A11yModule]}]}],ht.ctorParameters=function(){return[]};var mt=20,ft=new r.InjectionToken("md-tooltip-scroll-strategy"),gt={provide:ft,deps:[o.Overlay],useFactory:C},yt=function(){function t(t,e,o,n,i,r,a,s,p,l){var c=this;this._overlay=e,this._elementRef=o,this._scrollDispatcher=n,this._viewContainerRef=i,this._ngZone=r,this._platform=a,this._ariaDescriber=s,this._scrollStrategy=p,this._dir=l,this._position="below",this._disabled=!1,this.showDelay=0,this.hideDelay=0,this._message="",a.IOS||(this._enterListener=t.listen(o.nativeElement,"mouseenter",function(){return c.show()}),this._leaveListener=t.listen(o.nativeElement,"mouseleave",function(){return c.hide()}))}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._tooltipInstance&&this._disposeTooltip())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=p.coerceBooleanProperty(t),this._disabled&&this.hide(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_positionDeprecated",{get:function(){return this._position},set:function(t){this._position=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},set:function(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?(""+t).trim():"",this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltipClass",{get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_deprecatedMessage",{get:function(){return this.message},set:function(t){this.message=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matMessage",{get:function(){return this.message},set:function(t){this.message=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matPosition",{get:function(){return this.position},set:function(t){this.position=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matDisabled",{get:function(){return this.disabled}, set:function(t){this.disabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matHideDelay",{get:function(){return this.hideDelay},set:function(t){this.hideDelay=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matShowDelay",{get:function(){return this.showDelay},set:function(t){this.showDelay=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_matClass",{get:function(){return this.tooltipClass},set:function(t){this.tooltipClass=t},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._tooltipInstance&&this._disposeTooltip(),this._platform.IOS||(this._enterListener(),this._leaveListener()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message)},t.prototype.show=function(t){void 0===t&&(t=this.showDelay),!this.disabled&&this.message&&(this._tooltipInstance||this._createTooltip(),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(this._position,t))},t.prototype.hide=function(t){void 0===t&&(t=this.hideDelay),this._tooltipInstance&&this._tooltipInstance.hide(t)},t.prototype.toggle=function(){this._isTooltipVisible()?this.hide():this.show()},t.prototype._isTooltipVisible=function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()},t.prototype._handleKeydown=function(t){this._isTooltipVisible()&&t.keyCode===c.ESCAPE&&(t.stopPropagation(),this.hide(0))},t.prototype._createTooltip=function(){var t=this,e=this._createOverlay(),o=new d.ComponentPortal(bt,this._viewContainerRef);this._tooltipInstance=e.attach(o).instance,this._tooltipInstance.afterHidden().subscribe(function(){t._tooltipInstance&&t._disposeTooltip()})},t.prototype._createOverlay=function(){var t=this,e=this._getOrigin(),n=this._getOverlayPosition(),i=this._overlay.position().connectedTo(this._elementRef,e,n);i.withScrollableContainers(this._scrollDispatcher.getScrollContainers(this._elementRef)),i.onPositionChange.subscribe(function(e){e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance&&t._tooltipInstance.isVisible()&&t.hide(0)});var r=new o.OverlayConfig({direction:this._dir?this._dir.value:"ltr",positionStrategy:i,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()});return this._overlayRef=this._overlay.create(r),this._overlayRef},t.prototype._disposeTooltip=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._tooltipInstance=null},t.prototype._getOrigin=function(){if("above"==this.position||"below"==this.position)return{originX:"center",originY:"above"==this.position?"top":"bottom"};var t=!this._dir||"ltr"==this._dir.value;if("left"==this.position||"before"==this.position&&t||"after"==this.position&&!t)return{originX:"start",originY:"center"};if("right"==this.position||"after"==this.position&&t||"before"==this.position&&!t)return{originX:"end",originY:"center"};throw I(this.position)},t.prototype._getOverlayPosition=function(){if("above"==this.position)return{overlayX:"center",overlayY:"bottom"};if("below"==this.position)return{overlayX:"center",overlayY:"top"};var t=!this._dir||"ltr"==this._dir.value;if("left"==this.position||"before"==this.position&&t||"after"==this.position&&!t)return{overlayX:"end",overlayY:"center"};if("right"==this.position||"after"==this.position&&t||"before"==this.position&&!t)return{overlayX:"start",overlayY:"center"};throw I(this.position)},t.prototype._updateTooltipMessage=function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),h.first.call(this._ngZone.onMicrotaskEmpty.asObservable()).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))},t.prototype._setTooltipClass=function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())},t}();yt.decorators=[{type:r.Directive,args:[{selector:"[md-tooltip], [mdTooltip], [mat-tooltip], [matTooltip]",host:{"(longpress)":"show()","(focus)":"show()","(blur)":"hide(0)","(keydown)":"_handleKeydown($event)","(touchend)":"hide(1500)"},exportAs:"mdTooltip, matTooltip"}]}],yt.ctorParameters=function(){return[{type:r.Renderer2},{type:o.Overlay},{type:r.ElementRef},{type:u.ScrollDispatcher},{type:r.ViewContainerRef},{type:r.NgZone},{type:n.Platform},{type:e.AriaDescriber},{type:void 0,decorators:[{type:r.Inject,args:[ft]}]},{type:a.Directionality,decorators:[{type:r.Optional}]}]},yt.propDecorators={position:[{type:r.Input,args:["mdTooltipPosition"]}],disabled:[{type:r.Input,args:["mdTooltipDisabled"]}],_positionDeprecated:[{type:r.Input,args:["tooltip-position"]}],showDelay:[{type:r.Input,args:["mdTooltipShowDelay"]}],hideDelay:[{type:r.Input,args:["mdTooltipHideDelay"]}],message:[{type:r.Input,args:["mdTooltip"]}],tooltipClass:[{type:r.Input,args:["mdTooltipClass"]}],_deprecatedMessage:[{type:r.Input,args:["md-tooltip"]}],_matMessage:[{type:r.Input,args:["matTooltip"]}],_matPosition:[{type:r.Input,args:["matTooltipPosition"]}],_matDisabled:[{type:r.Input,args:["matTooltipDisabled"]}],_matHideDelay:[{type:r.Input,args:["matTooltipHideDelay"]}],_matShowDelay:[{type:r.Input,args:["matTooltipShowDelay"]}],_matClass:[{type:r.Input,args:["matTooltipClass"]}]};var bt=function(){function t(t,e){this._dir=t,this._changeDetectorRef=e,this._visibility="initial",this._closeOnInteraction=!1,this._transformOrigin="bottom",this._onHide=new l.Subject}return t.prototype.show=function(t,e){var o=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._setTransformOrigin(t),this._showTimeoutId=setTimeout(function(){o._visibility="visible",o._markForCheck()},e)},t.prototype.hide=function(t){var e=this;this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._markForCheck()},t)},t.prototype.afterHidden=function(){return this._onHide.asObservable()},t.prototype.isVisible=function(){return"visible"===this._visibility},t.prototype._setTransformOrigin=function(t){var e=!this._dir||"ltr"==this._dir.value;switch(t){case"before":this._transformOrigin=e?"right":"left";break;case"after":this._transformOrigin=e?"left":"right";break;case"left":this._transformOrigin="right";break;case"right":this._transformOrigin="left";break;case"above":this._transformOrigin="bottom";break;case"below":this._transformOrigin="top";break;default:throw I(t)}},t.prototype._animationStart=function(){this._closeOnInteraction=!1},t.prototype._animationDone=function(t){var e=this,o=t.toState;"hidden"!==o||this.isVisible()||this._onHide.next(),"visible"!==o&&"hidden"!==o||Promise.resolve().then(function(){return e._closeOnInteraction=!0})},t.prototype._handleBodyInteraction=function(){this._closeOnInteraction&&this.hide(0)},t.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},t}();bt.decorators=[{type:r.Component,args:[{selector:"md-tooltip-component, 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:r.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,animations:[m.trigger("state",[m.state("initial, void, hidden",m.style({transform:"scale(0)"})),m.state("visible",m.style({transform:"scale(1)"})),m.transition("* => visible",m.animate("150ms cubic-bezier(0.0, 0.0, 0.2, 1)")),m.transition("* => hidden",m.animate("150ms cubic-bezier(0.4, 0.0, 1, 1)"))])],host:{"[style.zoom]":'_visibility === "visible" ? 1 : null',"(body:click)":"this._handleBodyInteraction()","aria-hidden":"true"}}]}],bt.ctorParameters=function(){return[{type:a.Directionality,decorators:[{type:r.Optional}]},{type:r.ChangeDetectorRef}]};var _t=function(){function t(){}return t}();_t.decorators=[{type:r.NgModule,args:[{imports:[i.CommonModule,o.OverlayModule,x,n.PlatformModule,e.A11yModule],exports:[yt,bt,x],declarations:[yt,bt],entryComponents:[bt],providers:[gt,e.ARIA_DESCRIBER_PROVIDER]}]}],_t.ctorParameters=function(){return[]},t.MdTooltipModule=_t,t.TOUCHEND_HIDE_DELAY=1500,t.SCROLL_THROTTLE_MS=mt,t.TOOLTIP_PANEL_CLASS="mat-tooltip-panel",t.getMdTooltipInvalidPositionError=I,t.MD_TOOLTIP_SCROLL_STRATEGY=ft,t.MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY=C,t.MD_TOOLTIP_SCROLL_STRATEGY_PROVIDER=gt,t.MdTooltip=yt,t.TooltipComponent=bt,t.MatTooltip=yt,t.MatTooltipModule=_t,t.MAT_TOOLTIP_SCROLL_STRATEGY=ft,t.MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER=gt,t.MAT_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY=C,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=material-tooltip.umd.min.js.map