UNPKG

@angular/material

Version:
11 lines (10 loc) 39.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/core"),require("@angular/cdk/a11y"),require("@angular/cdk/bidi"),require("@angular/platform-browser"),require("@angular/cdk/coercion"),require("rxjs/Subject"),require("@angular/cdk/keycodes"),require("@angular/common"),require("@angular/cdk/scrolling"),require("@angular/cdk/platform"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/rxjs"),require("@angular/http"),require("rxjs/Observable"),require("rxjs/observable/forkJoin"),require("rxjs/observable/of"),require("rxjs/observable/throw")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/cdk/a11y","@angular/cdk/bidi","@angular/platform-browser","@angular/cdk/coercion","rxjs/Subject","@angular/cdk/keycodes","@angular/common","@angular/cdk/scrolling","@angular/cdk/platform","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/rxjs","@angular/http","rxjs/Observable","rxjs/observable/forkJoin","rxjs/observable/of","rxjs/observable/throw"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.icon=t.ng.material.icon||{}),t.ng.core,t.ng.cdk.a11y,t.ng.cdk.bidi,t.ng.platformBrowser,t.ng.cdk.coercion,t.Rx,t.ng.cdk.keycodes,t.ng.common,t.ng.cdk.scrolling,t.ng.cdk.platform,t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.cdk.rxjs,t.ng.http,t.Rx,t.Rx.Observable,t.Rx.Observable,t.Rx.Observable)}(this,function(t,e,n,r,o,i,a,s,c,l,u,p,d,m,h,f,g,y,v){"use strict";function b(t,e){function n(){this.constructor=t}F(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _(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 I(t){return t||new Y}function C(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var r=0,o=e;r<o.length;r++){var i=o[r];if(null!=i)for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])}return t}function D(t,e){for(var n=Array(t),r=0;r<t;r++)n[r]=e(r);return n}function R(t){window.getComputedStyle(t).getPropertyValue("opacity")}function S(t,e,n){var r=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),o=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(r*r+o*o)}function w(t){return Error('Unable to find icon with the name "'+t+'"')}function E(){return Error("Could not find Http provider for use with Angular Material icons. Please include the HttpModule from @angular/http in your app imports.")}function k(t){return Error("The URL provided to MdIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was \""+t+'".')}function x(t,e,n){return t||new Dt(e,n)}function M(t){return t.cloneNode(!0)}function O(t,e){return t+":"+e}var F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},N=function(){function t(){}return t}();N.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",N.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",N.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",N.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";var T=function(){function t(){}return t}();T.COMPLEX="375ms",T.ENTERING="225ms",T.EXITING="195ms";var P=new e.InjectionToken("md-compatibility-mode"),A=function(){function t(t,e){if(!t)throw _("mat",e.nativeElement.nodeName)}return t}();A.decorators=[{type:e.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"}]}],A.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[P]}]},{type:e.ElementRef}]};var j=function(){function t(t,e){if(t)throw _("md",e.nativeElement.nodeName)}return t}();j.decorators=[{type:e.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"}]}],j.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[P]}]},{type:e.ElementRef}]};var L=function(){function t(){}return t}();L.decorators=[{type:e.NgModule,args:[{declarations:[A,j],exports:[A,j]}]}],L.ctorParameters=function(){return[]};var U=function(){function t(){}return t}();U.decorators=[{type:e.NgModule,args:[{providers:[{provide:P,useValue:!0}]}]}],U.ctorParameters=function(){return[]};var V=new e.InjectionToken("md-sanity-checks"),z=function(){function t(t,n){this._document=t,this._hasDoneGlobalChecks=!1,n&&!this._hasDoneGlobalChecks&&t&&e.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}();z.decorators=[{type:e.NgModule,args:[{imports:[L,r.BidiModule],exports:[L,r.BidiModule],providers:[{provide:V,useValue:!0}]}]}],z.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[o.DOCUMENT]}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[V]}]}]};var Y=function(){function t(){this._listeners=[]}return t.prototype.notify=function(t,e){for(var n=0,r=this._listeners;n<r.length;n++){(0,r[n])(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}();Y.decorators=[{type:e.Injectable}],Y.ctorParameters=function(){return[]};var H=(new e.Optional,new e.SkipSelf,new e.InjectionToken("MAT_DATE_LOCALE")),W={provide:H,useExisting:e.LOCALE_ID},B=function(){function t(){this._localeChanges=new a.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,n){},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,n){return e&&this.compareDate(t,e)<0?e:n&&this.compareDate(t,n)>0?n:t},t}(),q="undefined"!=typeof Intl,G={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"]},J=D(31,function(t){return String(t+1)}),Z={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},X=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,K=function(t){function e(e){var n=t.call(this)||this;return n.useUtcForDisplay=!0,t.prototype.setLocale.call(n,e),n}return b(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(q){var n=new Intl.DateTimeFormat(this.locale,{month:t});return D(12,function(t){return e._stripDirectionalityCharacters(n.format(new Date(2017,t,1)))})}return G[t]},e.prototype.getDateNames=function(){var t=this;if(q){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return D(31,function(n){return t._stripDirectionalityCharacters(e.format(new Date(2017,0,n+1)))})}return J},e.prototype.getDayOfWeekNames=function(t){var e=this;if(q){var n=new Intl.DateTimeFormat(this.locale,{weekday:t});return D(7,function(t){return e._stripDirectionalityCharacters(n.format(new Date(2017,0,t+1)))})}return Z[t]},e.prototype.getYearName=function(t){if(q){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,n){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var r=this._createDateWithOverflow(t,e,n);if(r.getMonth()!=e)throw Error('Invalid date "'+n+'" for month with index "'+e+'".');return r},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(q){this.useUtcForDisplay&&(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),e=C({},e,{timeZone:"utc"}));var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(n.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 n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},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(X.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,n){var r=new Date(t,e,n);return t>=0&&t<100&&r.setFullYear(this.getYear(r)-1900),r},e.prototype._2digit=function(t){return("00"+t).slice(-2)},e.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},e}(B);K.decorators=[{type:e.Injectable}],K.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[H]}]}]};var $=new e.InjectionToken("md-date-formats"),Q={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"}}},tt=function(){function t(){}return t}();tt.decorators=[{type:e.NgModule,args:[{providers:[{provide:B,useClass:K},W]}]}],tt.ctorParameters=function(){return[]};var et=function(){function t(){}return t}();et.decorators=[{type:e.NgModule,args:[{imports:[tt],providers:[{provide:$,useValue:Q}]}]}],et.ctorParameters=function(){return[]};var nt=(new e.InjectionToken("md-error-global-options"),function(t){function n(){var n=t.call(this)||this;return n._hammer="undefined"!=typeof window?window.Hammer:null,n.events=n._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!n._hammer&&e.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),n}return b(n,t),n.prototype.buildHammer=function(t){var e=new this._hammer(t),n=new this._hammer.Pan,r=new this._hammer.Swipe,o=new this._hammer.Press,i=this._createRecognizer(n,{event:"slide",threshold:0},r),a=this._createRecognizer(o,{event:"longpress",time:500});return n.recognizeWith(r),e.add([r,o,n,i,a]),e},n.prototype._createRecognizer=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=new t.constructor(e);return n.push(t),n.forEach(function(t){return o.recognizeWith(t)}),o},n}(o.HammerGestureConfig));nt.decorators=[{type:e.Injectable}],nt.ctorParameters=function(){return[]};var rt=function(){function t(){}return t}();rt.decorators=[{type:e.Directive,args:[{selector:"[md-line], [mat-line], [mdLine], [matLine]",host:{class:"mat-line"}}]}],rt.ctorParameters=function(){return[]};var ot=function(){function t(){}return t}();ot.decorators=[{type:e.NgModule,args:[{imports:[z],exports:[rt,z],declarations:[rt]}]}],ot.ctorParameters=function(){return[]};var it={};it.FADING_IN=0,it.VISIBLE=1,it.FADING_OUT=2,it.HIDDEN=3,it[it.FADING_IN]="FADING_IN",it[it.VISIBLE]="VISIBLE",it[it.FADING_OUT]="FADING_OUT",it[it.HIDDEN]="HIDDEN";var at=function(){function t(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=it.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),st=function(){function t(t,e,n,r){this._ngZone=e,this._ruler=n,this._isMousedown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this.rippleConfig={},this.rippleDisabled=!1,r.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,n){var r=this;void 0===n&&(n={});var o=this._containerElement.getBoundingClientRect();if(n.centered)t=o.left+o.width/2,e=o.top+o.height/2;else{var i=this._ruler.getViewportScrollPosition();t-=i.left,e-=i.top}var a=n.radius||S(t,e,o),s=1/(n.speedFactor||1)*450,c=t-o.left,l=e-o.top,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=c-a+"px",u.style.top=l-a+"px",u.style.height=2*a+"px",u.style.width=2*a+"px",u.style.backgroundColor=n.color||null,u.style.transitionDuration=s+"ms",this._containerElement.appendChild(u),R(u),u.style.transform="scale(1)";var p=new at(this,u,n);return p.state=it.FADING_IN,this._activeRipples.add(p),this.runTimeoutOutsideZone(function(){p.state=it.VISIBLE,n.persistent||r._isMousedown||p.fadeOut()},s),p},t.prototype.fadeOutRipple=function(t){if(this._activeRipples.delete(t)){var e=t.element;e.style.transitionDuration="400ms",e.style.opacity="0",t.state=it.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=it.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,n){e._triggerElement.removeEventListener(n,t)}),t&&this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(e,n){return t.addEventListener(n,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!==it.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}(),ct=new e.InjectionToken("md-ripple-global-options"),lt=function(){function t(t,e,n,r,o){this.radius=0,this.speedFactor=1,this._rippleRenderer=new st(t,e,n,r),this._globalOptions=o||{},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,n){return void 0===n&&(n=this.rippleConfig),this._rippleRenderer.fadeInRipple(t,e,n)},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}();lt.decorators=[{type:e.Directive,args:[{selector:"[md-ripple], [mat-ripple], [mdRipple], [matRipple]",exportAs:"mdRipple, matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],lt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:l.ViewportRuler},{type:u.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[ct]}]}]},lt.propDecorators={trigger:[{type:e.Input,args:["mdRippleTrigger"]}],centered:[{type:e.Input,args:["mdRippleCentered"]}],disabled:[{type:e.Input,args:["mdRippleDisabled"]}],radius:[{type:e.Input,args:["mdRippleRadius"]}],speedFactor:[{type:e.Input,args:["mdRippleSpeedFactor"]}],color:[{type:e.Input,args:["mdRippleColor"]}],unbounded:[{type:e.Input,args:["mdRippleUnbounded"]}],_matRippleTrigger:[{type:e.Input,args:["matRippleTrigger"]}],_matRippleCentered:[{type:e.Input,args:["matRippleCentered"]}],_matRippleDisabled:[{type:e.Input,args:["matRippleDisabled"]}],_matRippleRadius:[{type:e.Input,args:["matRippleRadius"]}],_matRippleSpeedFactor:[{type:e.Input,args:["matRippleSpeedFactor"]}],_matRippleColor:[{type:e.Input,args:["matRippleColor"]}],_matRippleUnbounded:[{type:e.Input,args:["matRippleUnbounded"]}]};var ut=function(){function t(){}return t}();ut.decorators=[{type:e.NgModule,args:[{imports:[z,u.PlatformModule,l.ScrollDispatchModule],exports:[lt,z],declarations:[lt],providers:[l.VIEWPORT_RULER_PROVIDER]}]}],ut.ctorParameters=function(){return[]};var pt=function(){function t(){this.state="unchecked",this.disabled=!1}return t}();pt.decorators=[{type:e.Component,args:[{encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.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"}}]}],pt.ctorParameters=function(){return[]},pt.propDecorators={state:[{type:e.Input}],disabled:[{type:e.Input}]};var dt=function(){function t(){}return t}();dt.decorators=[{type:e.NgModule,args:[{exports:[pt],declarations:[pt]}]}],dt.ctorParameters=function(){return[]};var mt=function(){function t(){}return t}(),ht=function(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,e)||this;return r._disabled=!1,r}return b(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}(mt),ft=0,gt=function(t){function e(){var e=t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+ft++,e}return b(e,t),e}(ht);gt.decorators=[{type:e.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:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],gt.ctorParameters=function(){return[]},gt.propDecorators={label:[{type:e.Input}]};var yt=0,vt=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),bt=function(){function t(t,n,r){this._element=t,this._changeDetectorRef=n,this.group=r,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="md-option-"+yt++,this.onSelectionChange=new e.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=i.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!==s.ENTER&&t.keyCode!==s.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 vt(this,t))},t.countGroupLabelsBeforeOption=function(t,e,n){if(n.length){for(var r=e.toArray(),o=n.toArray(),i=0,a=0;a<t+1;a++)r[a].group&&r[a].group===o[i]&&i++;return i}return 0},t}();bt.decorators=[{type:e.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:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,viewProviders:[{provide:P,useValue:!0}]}]}],bt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:gt,decorators:[{type:e.Optional}]}]},bt.propDecorators={value:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]};var _t=function(){function t(){}return t}();_t.decorators=[{type:e.NgModule,args:[{imports:[ut,c.CommonModule,dt],exports:[bt,gt],declarations:[bt,gt]}]}],_t.ctorParameters=function(){return[]};var It=(new e.InjectionToken("md-placeholder-global-options"),function(){function t(){}return t}());It.decorators=[{type:e.NgModule,args:[{imports:[n.A11yModule],exports:[n.A11yModule]}]}],It.ctorParameters=function(){return[]};var Ct=function(){function t(t){this.url=t,this.svgElement=null}return t}(),Dt=function(){function t(t,e){this._http=t,this._sanitizer=e,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons"}return t.prototype.addSvgIcon=function(t,e){return this.addSvgIconInNamespace("",t,e)},t.prototype.addSvgIconInNamespace=function(t,e,n){var r=O(t,e);return this._svgIconConfigs.set(r,new Ct(n)),this},t.prototype.addSvgIconSet=function(t){return this.addSvgIconSetInNamespace("",t)},t.prototype.addSvgIconSetInNamespace=function(t,e){var n=new Ct(e),r=this._iconSetConfigs.get(t);return r?r.push(n):this._iconSetConfigs.set(t,[n]),this},t.prototype.registerFontClassAlias=function(t,e){return void 0===e&&(e=t),this._fontCssClassesByAlias.set(t,e),this},t.prototype.classNameForFontAlias=function(t){return this._fontCssClassesByAlias.get(t)||t},t.prototype.setDefaultFontSetClass=function(t){return this._defaultFontSetClass=t,this},t.prototype.getDefaultFontSetClass=function(){return this._defaultFontSetClass},t.prototype.getSvgIconFromUrl=function(t){var n=this,r=this._sanitizer.sanitize(e.SecurityContext.RESOURCE_URL,t);if(!r)throw k(t);var o=this._cachedIconsByUrl.get(r);return o?y.of(M(o)):m.RxChain.from(this._loadSvgIconFromConfig(new Ct(r))).call(m.doOperator,function(t){return n._cachedIconsByUrl.set(r,t)}).call(m.map,function(t){return M(t)}).result()},t.prototype.getNamedSvgIcon=function(t,e){void 0===e&&(e="");var n=O(e,t),r=this._svgIconConfigs.get(n);if(r)return this._getSvgFromConfig(r);var o=this._iconSetConfigs.get(e) ;return o?this._getSvgFromIconSetConfigs(t,o):v._throw(w(n))},t.prototype._getSvgFromConfig=function(t){return t.svgElement?y.of(M(t.svgElement)):m.RxChain.from(this._loadSvgIconFromConfig(t)).call(m.doOperator,function(e){return t.svgElement=e}).call(m.map,function(t){return M(t)}).result()},t.prototype._getSvgFromIconSetConfigs=function(t,n){var r=this,o=this._extractIconWithNameFromAnySet(t,n);if(o)return y.of(o);var i=n.filter(function(t){return!t.svgElement}).map(function(t){return m.RxChain.from(r._loadSvgIconSetFromConfig(t)).call(m.catchOperator,function(n){var o=r._sanitizer.sanitize(e.SecurityContext.RESOURCE_URL,t.url);return console.log("Loading icon set URL: "+o+" failed: "+n),y.of(null)}).call(m.doOperator,function(e){e&&(t.svgElement=e)}).result()});return m.map.call(g.forkJoin.call(f.Observable,i),function(){var e=r._extractIconWithNameFromAnySet(t,n);if(!e)throw w(t);return e})},t.prototype._extractIconWithNameFromAnySet=function(t,e){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.svgElement){var o=this._extractSvgIconFromSet(r.svgElement,t);if(o)return o}}return null},t.prototype._loadSvgIconFromConfig=function(t){var e=this;return m.map.call(this._fetchUrl(t.url),function(t){return e._createSvgElementForSingleIcon(t)})},t.prototype._loadSvgIconSetFromConfig=function(t){var e=this;return m.map.call(this._fetchUrl(t.url),function(t){return e._svgElementFromString(t)})},t.prototype._createSvgElementForSingleIcon=function(t){var e=this._svgElementFromString(t);return this._setSvgAttributes(e),e},t.prototype._extractSvgIconFromSet=function(t,e){var n=t.querySelector("#"+e);if(!n)return null;if("svg"===n.tagName.toLowerCase())return this._setSvgAttributes(n.cloneNode(!0));if("symbol"===n.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(n));var r=this._svgElementFromString("<svg></svg>");return r.appendChild(n.cloneNode(!0)),this._setSvgAttributes(r)},t.prototype._svgElementFromString=function(t){var e=document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n},t.prototype._toSvgElement=function(t){for(var e=this._svgElementFromString("<svg></svg>"),n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===Node.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e},t.prototype._setSvgAttributes=function(t){return t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),t},t.prototype._fetchUrl=function(t){var n=this;if(!this._http)throw E();var r=this._sanitizer.sanitize(e.SecurityContext.RESOURCE_URL,t);if(!r)throw k(t);var o=this._inProgressUrlFetches.get(r);if(o)return o;var i=m.RxChain.from(this._http.get(r)).call(m.map,function(t){return t.text()}).call(m.finallyOperator,function(){return n._inProgressUrlFetches.delete(r)}).call(m.share).result();return this._inProgressUrlFetches.set(r,i),i},t}();Dt.decorators=[{type:e.Injectable}],Dt.ctorParameters=function(){return[{type:h.Http,decorators:[{type:e.Optional}]},{type:o.DomSanitizer}]};var Rt={provide:Dt,deps:[[new e.Optional,new e.SkipSelf,Dt],[new e.Optional,h.Http],o.DomSanitizer],useFactory:x},St=function(){function t(t,e){this._renderer=t,this._elementRef=e}return t}(),wt=function(t,e){return function(t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(this,n)||this;return o.color=e,o}return b(n,t),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){var n=t||e;n!==this._color&&(this._color&&this._renderer.removeClass(this._elementRef.nativeElement,"mat-"+this._color),n&&this._renderer.addClass(this._elementRef.nativeElement,"mat-"+n),this._color=n)},enumerable:!0,configurable:!0}),n}(t)}(St),Et=function(t){function e(e,n,r,o){var i=t.call(this,e,n)||this;return i._mdIconRegistry=r,o||e.setAttribute(n.nativeElement,"aria-hidden","true"),i}return b(e,t),e.prototype._splitIconName=function(t){if(!t)return["",""];var e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error('Invalid icon name: "'+t+'"')}},e.prototype.ngOnChanges=function(t){var e=this;if(t.svgIcon)if(this.svgIcon){var n=this._splitIconName(this.svgIcon),r=n[0],o=n[1];m.first.call(this._mdIconRegistry.getNamedSvgIcon(o,r)).subscribe(function(t){return e._setSvgElement(t)},function(t){return console.log("Error retrieving icon: "+t.message)})}else this._clearSvgElement();this._usingFontIcon()&&this._updateFontIconClasses()},e.prototype.ngOnInit=function(){this._usingFontIcon()&&this._updateFontIconClasses()},e.prototype._usingFontIcon=function(){return!this.svgIcon},e.prototype._setSvgElement=function(t){this._clearSvgElement(),this._renderer.appendChild(this._elementRef.nativeElement,t)},e.prototype._clearSvgElement=function(){for(var t=this._elementRef.nativeElement,e=t.childNodes.length,n=0;n<e;n++)this._renderer.removeChild(t,t.childNodes[n])},e.prototype._updateFontIconClasses=function(){if(this._usingFontIcon()){var t=this._elementRef.nativeElement,e=this.fontSet?this._mdIconRegistry.classNameForFontAlias(this.fontSet):this._mdIconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&this._renderer.removeClass(t,this._previousFontSetClass),e&&this._renderer.addClass(t,e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&this._renderer.removeClass(t,this._previousFontIconClass),this.fontIcon&&this._renderer.addClass(t,this.fontIcon),this._previousFontIconClass=this.fontIcon)}},e}(wt);Et.decorators=[{type:e.Component,args:[{template:"<ng-content></ng-content>",selector:"md-icon, mat-icon",styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}"],inputs:["color"],host:{role:"img",class:"mat-icon"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],Et.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:Dt},{type:void 0,decorators:[{type:e.Attribute,args:["aria-hidden"]}]}]},Et.propDecorators={svgIcon:[{type:e.Input}],fontSet:[{type:e.Input}],fontIcon:[{type:e.Input}]};var kt=function(){function t(){}return t}();kt.decorators=[{type:e.NgModule,args:[{imports:[z],exports:[Et,z],declarations:[Et],providers:[Rt]}]}],kt.ctorParameters=function(){return[]},t.MdIconModule=kt,t.MdIconBase=St,t._MdIconMixinBase=wt,t.MdIcon=Et,t.getMdIconNameNotFoundError=w,t.getMdIconNoHttpProviderError=E,t.getMdIconFailedToSanitizeError=k,t.MdIconRegistry=Dt,t.ICON_REGISTRY_PROVIDER_FACTORY=x,t.ICON_REGISTRY_PROVIDER=Rt,t.MatIcon=Et,t.MatIconBase=St,t.MatIconModule=kt,t.MatIconRegistry=Dt,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=material-icon.umd.min.js.map