UNPKG

@angular/material

Version:
11 lines (10 loc) 35.5 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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),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/cdk/scrolling"),require("@angular/cdk/platform"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/rxjs")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/cdk/a11y","@angular/cdk/bidi","@angular/platform-browser","@angular/cdk/coercion","rxjs/Subject","@angular/cdk/keycodes","@angular/cdk/scrolling","@angular/cdk/platform","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/rxjs"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material["progress-bar"]=e.ng.material["progress-bar"]||{}),e.ng.core,e.ng.common,e.ng.cdk.a11y,e.ng.cdk.bidi,e.ng.platformBrowser,e.ng.cdk.coercion,e.Rx,e.ng.cdk.keycodes,e.ng.cdk.scrolling,e.ng.cdk.platform,e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.cdk.rxjs)}(this,function(e,t,r,n,o,a,i,s,c,p,l,u,d,m){"use strict";function f(e,t){function r(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function g(e,t){return Error('The "'+e+'-" prefix cannot be used in ng-material v1 compatibility mode. It was used on an "'+t.toLowerCase()+'" element.')}function h(e){return e||new P}function b(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var n=0,o=t;n<o.length;n++){var a=o[n];if(null!=a)for(var i in a)a.hasOwnProperty(i)&&(e[i]=a[i])}return e}function y(e,t){for(var r=Array(e),n=0;n<e;n++)r[n]=t(n);return r}function v(e){window.getComputedStyle(e).getPropertyValue("opacity")}function _(e,t,r){var n=Math.max(Math.abs(e-r.left),Math.abs(e-r.right)),o=Math.max(Math.abs(t-r.top),Math.abs(t-r.bottom));return Math.sqrt(n*n+o*o)}function D(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=100),Math.max(t,Math.min(r,e))}var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},w=function(){function e(){}return e}();w.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",w.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",w.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",w.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";var C=function(){function e(){}return e}();C.COMPLEX="375ms",C.ENTERING="225ms",C.EXITING="195ms";var I=new t.InjectionToken("md-compatibility-mode"),R=function(){function e(e,t){if(!e)throw g("mat",t.nativeElement.nodeName)}return e}();R.decorators=[{type:t.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"}]}],R.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[I]}]},{type:t.ElementRef}]};var M=function(){function e(e,t){if(e)throw g("md",t.nativeElement.nodeName)}return e}();M.decorators=[{type:t.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"}]}],M.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[I]}]},{type:t.ElementRef}]};var E=function(){function e(){}return e}();E.decorators=[{type:t.NgModule,args:[{declarations:[R,M],exports:[R,M]}]}],E.ctorParameters=function(){return[]};var x=function(){function e(){}return e}();x.decorators=[{type:t.NgModule,args:[{providers:[{provide:I,useValue:!0}]}]}],x.ctorParameters=function(){return[]};var O=new t.InjectionToken("md-sanity-checks"),T=function(){function e(e,r){this._document=e,this._hasDoneGlobalChecks=!1,r&&!this._hasDoneGlobalChecks&&e&&t.isDevMode()&&(this._checkDoctype(),this._checkTheme(),this._hasDoneGlobalChecks=!0)}return e.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.")},e.prototype._checkTheme=function(){if("function"==typeof getComputedStyle){var e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e),"none"!==getComputedStyle(e).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(e)}},e}();T.decorators=[{type:t.NgModule,args:[{imports:[E,o.BidiModule],exports:[E,o.BidiModule],providers:[{provide:O,useValue:!0}]}]}],T.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[O]}]}]};var P=function(){function e(){this._listeners=[]}return e.prototype.notify=function(e,t){for(var r=0,n=this._listeners;r<n.length;r++){(0,n[r])(e,t)}},e.prototype.listen=function(e){var t=this;return this._listeners.push(e),function(){t._listeners=t._listeners.filter(function(t){return e!==t})}},e}();P.decorators=[{type:t.Injectable}],P.ctorParameters=function(){return[]};var S=(new t.Optional,new t.SkipSelf,new t.InjectionToken("MAT_DATE_LOCALE")),N={provide:S,useExisting:t.LOCALE_ID},j=function(){function e(){this._localeChanges=new s.Subject}return Object.defineProperty(e.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),e.prototype.getYear=function(e){},e.prototype.getMonth=function(e){},e.prototype.getDate=function(e){},e.prototype.getDayOfWeek=function(e){},e.prototype.getMonthNames=function(e){},e.prototype.getDateNames=function(){},e.prototype.getDayOfWeekNames=function(e){},e.prototype.getYearName=function(e){},e.prototype.getFirstDayOfWeek=function(){},e.prototype.getNumDaysInMonth=function(e){},e.prototype.clone=function(e){},e.prototype.createDate=function(e,t,r){},e.prototype.today=function(){},e.prototype.parse=function(e,t){},e.prototype.format=function(e,t){},e.prototype.addCalendarYears=function(e,t){},e.prototype.addCalendarMonths=function(e,t){},e.prototype.addCalendarDays=function(e,t){},e.prototype.toIso8601=function(e){},e.prototype.fromIso8601=function(e){},e.prototype.isDateInstance=function(e){},e.prototype.isValid=function(e){},e.prototype.setLocale=function(e){this.locale=e,this._localeChanges.next()},e.prototype.compareDate=function(e,t){return this.getYear(e)-this.getYear(t)||this.getMonth(e)-this.getMonth(t)||this.getDate(e)-this.getDate(t)},e.prototype.sameDate=function(e,t){return e&&t?!this.compareDate(e,t):e==t},e.prototype.clampDate=function(e,t,r){return t&&this.compareDate(e,t)<0?t:r&&this.compareDate(e,r)>0?r:e},e}(),F="undefined"!=typeof Intl,A={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"]},L=y(31,function(e){return String(e+1)}),V={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},z=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,Y=function(e){function t(t){var r=e.call(this)||this;return r.useUtcForDisplay=!0,e.prototype.setLocale.call(r,t),r}return f(t,e),t.prototype.getYear=function(e){return e.getFullYear()},t.prototype.getMonth=function(e){return e.getMonth()},t.prototype.getDate=function(e){return e.getDate()},t.prototype.getDayOfWeek=function(e){return e.getDay()},t.prototype.getMonthNames=function(e){var t=this;if(F){var r=new Intl.DateTimeFormat(this.locale,{month:e});return y(12,function(e){return t._stripDirectionalityCharacters(r.format(new Date(2017,e,1)))})}return A[e]},t.prototype.getDateNames=function(){var e=this;if(F){var t=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return y(31,function(r){return e._stripDirectionalityCharacters(t.format(new Date(2017,0,r+1)))})}return L},t.prototype.getDayOfWeekNames=function(e){var t=this;if(F){var r=new Intl.DateTimeFormat(this.locale,{weekday:e});return y(7,function(e){return t._stripDirectionalityCharacters(r.format(new Date(2017,0,e+1)))})}return V[e]},t.prototype.getYearName=function(e){if(F){var t=new Intl.DateTimeFormat(this.locale,{year:"numeric"});return this._stripDirectionalityCharacters(t.format(e))}return String(this.getYear(e))},t.prototype.getFirstDayOfWeek=function(){return 0},t.prototype.getNumDaysInMonth=function(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))},t.prototype.clone=function(e){return this.createDate(this.getYear(e),this.getMonth(e),this.getDate(e))},t.prototype.createDate=function(e,t,r){if(t<0||t>11)throw Error('Invalid month index "'+t+'". Month index has to be between 0 and 11.');if(r<1)throw Error('Invalid date "'+r+'". Date has to be greater than 0.');var n=this._createDateWithOverflow(e,t,r);if(n.getMonth()!=t)throw Error('Invalid date "'+r+'" for month with index "'+t+'".');return n},t.prototype.today=function(){return new Date},t.prototype.parse=function(e){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null},t.prototype.format=function(e,t){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");if(F){this.useUtcForDisplay&&(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),t=b({},t,{timeZone:"utc"}));var r=new Intl.DateTimeFormat(this.locale,t);return this._stripDirectionalityCharacters(r.format(e))}return this._stripDirectionalityCharacters(e.toDateString())},t.prototype.addCalendarYears=function(e,t){return this.addCalendarMonths(e,12*t)},t.prototype.addCalendarMonths=function(e,t){var r=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(r)!=((this.getMonth(e)+t)%12+12)%12&&(r=this._createDateWithOverflow(this.getYear(r),this.getMonth(r),0)),r},t.prototype.addCalendarDays=function(e,t){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+t)},t.prototype.toIso8601=function(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")},t.prototype.fromIso8601=function(e){if(z.test(e)){var t=new Date(e);if(this.isValid(t))return t}return null},t.prototype.isDateInstance=function(e){return e instanceof Date},t.prototype.isValid=function(e){return!isNaN(e.getTime())},t.prototype._createDateWithOverflow=function(e,t,r){var n=new Date(e,t,r);return e>=0&&e<100&&n.setFullYear(this.getYear(n)-1900),n},t.prototype._2digit=function(e){return("00"+e).slice(-2)},t.prototype._stripDirectionalityCharacters=function(e){return e.replace(/[\u200e\u200f]/g,"")},t}(j);Y.decorators=[{type:t.Injectable}],Y.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[S]}]}]};var q=new t.InjectionToken("md-date-formats"),W={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"}}},X=function(){function e(){}return e}();X.decorators=[{type:t.NgModule,args:[{providers:[{provide:j,useClass:Y},N]}]}],X.ctorParameters=function(){return[]};var U=function(){function e(){}return e}();U.decorators=[{type:t.NgModule,args:[{imports:[X],providers:[{provide:q,useValue:W}]}]}],U.ctorParameters=function(){return[]};var H=(new t.InjectionToken("md-error-global-options"),function(e){function r(){var r=e.call(this)||this;return r._hammer="undefined"!=typeof window?window.Hammer:null,r.events=r._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!r._hammer&&t.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),r}return f(r,e),r.prototype.buildHammer=function(e){var t=new this._hammer(e),r=new this._hammer.Pan,n=new this._hammer.Swipe,o=new this._hammer.Press,a=this._createRecognizer(r,{event:"slide",threshold:0},n),i=this._createRecognizer(o,{event:"longpress",time:500});return r.recognizeWith(n),t.add([n,o,r,a,i]),t},r.prototype._createRecognizer=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=new e.constructor(t);return r.push(e),r.forEach(function(e){return o.recognizeWith(e)}),o},r}(a.HammerGestureConfig));H.decorators=[{type:t.Injectable}],H.ctorParameters=function(){return[]};var B=function(){function e(){}return e}();B.decorators=[{type:t.Directive,args:[{selector:"[md-line], [mat-line], [mdLine], [matLine]",host:{class:"mat-line"}}]}],B.ctorParameters=function(){return[]};var G=function(){function e(){}return e}();G.decorators=[{type:t.NgModule,args:[{imports:[T],exports:[B,T],declarations:[B]}]}],G.ctorParameters=function(){return[]};var Z={};Z.FADING_IN=0,Z.VISIBLE=1,Z.FADING_OUT=2,Z.HIDDEN=3,Z[Z.FADING_IN]="FADING_IN",Z[Z.VISIBLE]="VISIBLE",Z[Z.FADING_OUT]="FADING_OUT",Z[Z.HIDDEN]="HIDDEN";var J=function(){function e(e,t,r){this._renderer=e,this.element=t,this.config=r,this.state=Z.HIDDEN}return e.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},e}(),K=function(){function e(e,t,r,n){this._ngZone=t,this._ruler=r,this._isMousedown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this.rippleConfig={},this.rippleDisabled=!1,n.isBrowser&&(this._containerElement=e.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 e.prototype.fadeInRipple=function(e,t,r){var n=this;void 0===r&&(r={});var o=this._containerElement.getBoundingClientRect();if(r.centered)e=o.left+o.width/2,t=o.top+o.height/2;else{var a=this._ruler.getViewportScrollPosition();e-=a.left,t-=a.top}var i=r.radius||_(e,t,o),s=1/(r.speedFactor||1)*450,c=e-o.left,p=t-o.top,l=document.createElement("div");l.classList.add("mat-ripple-element"),l.style.left=c-i+"px",l.style.top=p-i+"px",l.style.height=2*i+"px",l.style.width=2*i+"px",l.style.backgroundColor=r.color||null,l.style.transitionDuration=s+"ms",this._containerElement.appendChild(l),v(l),l.style.transform="scale(1)";var u=new J(this,l,r);return u.state=Z.FADING_IN,this._activeRipples.add(u),this.runTimeoutOutsideZone(function(){u.state=Z.VISIBLE,r.persistent||n._isMousedown||u.fadeOut()},s),u},e.prototype.fadeOutRipple=function(e){if(this._activeRipples.delete(e)){var t=e.element;t.style.transitionDuration="400ms",t.style.opacity="0",e.state=Z.FADING_OUT,this.runTimeoutOutsideZone(function(){e.state=Z.HIDDEN,t.parentNode.removeChild(t)},400)}},e.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(e){return e.fadeOut()})},e.prototype.setTriggerElement=function(e){var t=this;this._triggerElement&&this._triggerEvents.forEach(function(e,r){t._triggerElement.removeEventListener(r,e)}),e&&this._ngZone.runOutsideAngular(function(){t._triggerEvents.forEach(function(t,r){return e.addEventListener(r,t)})}),this._triggerElement=e},e.prototype.onMousedown=function(e){this.rippleDisabled||(this._isMousedown=!0,this.fadeInRipple(e.pageX,e.pageY,this.rippleConfig))},e.prototype.onMouseup=function(){this._isMousedown=!1,this._activeRipples.forEach(function(e){e.config.persistent||e.state!==Z.VISIBLE||e.fadeOut()})},e.prototype.onMouseLeave=function(){this._isMousedown&&this.onMouseup()},e.prototype.runTimeoutOutsideZone=function(e,t){void 0===t&&(t=0),this._ngZone.runOutsideAngular(function(){return setTimeout(e,t)})},e}(),$=new t.InjectionToken("md-ripple-global-options"),Q=function(){function e(e,t,r,n,o){this.radius=0,this.speedFactor=1,this._rippleRenderer=new K(e,t,r,n),this._globalOptions=o||{},this._updateRippleRenderer()}return Object.defineProperty(e.prototype,"_matRippleTrigger",{get:function(){return this.trigger},set:function(e){this.trigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_matRippleCentered",{get:function(){return this.centered},set:function(e){this.centered=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_matRippleDisabled",{get:function(){return this.disabled},set:function(e){this.disabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_matRippleRadius",{get:function(){return this.radius},set:function(e){this.radius=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_matRippleSpeedFactor",{get:function(){return this.speedFactor},set:function(e){this.speedFactor=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_matRippleColor",{get:function(){return this.color},set:function(e){this.color=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_matRippleUnbounded",{get:function(){return this.unbounded},set:function(e){this.unbounded=e},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){(e.trigger||e._matRippleTrigger)&&this.trigger&&this._rippleRenderer.setTriggerElement(this.trigger),this._updateRippleRenderer()},e.prototype.ngOnDestroy=function(){this._rippleRenderer.setTriggerElement(null)},e.prototype.launch=function(e,t,r){return void 0===r&&(r=this.rippleConfig),this._rippleRenderer.fadeInRipple(e,t,r)},e.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(e.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}),e.prototype._updateRippleRenderer=function(){this._rippleRenderer.rippleDisabled=this._globalOptions.disabled||this.disabled,this._rippleRenderer.rippleConfig=this.rippleConfig},e}();Q.decorators=[{type:t.Directive,args:[{selector:"[md-ripple], [mat-ripple], [mdRipple], [matRipple]",exportAs:"mdRipple, matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],Q.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:p.ViewportRuler},{type:l.Platform},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[$]}]}]},Q.propDecorators={trigger:[{type:t.Input,args:["mdRippleTrigger"]}],centered:[{type:t.Input,args:["mdRippleCentered"]}],disabled:[{type:t.Input,args:["mdRippleDisabled"]}],radius:[{type:t.Input,args:["mdRippleRadius"]}],speedFactor:[{type:t.Input,args:["mdRippleSpeedFactor"]}],color:[{type:t.Input,args:["mdRippleColor"]}],unbounded:[{type:t.Input,args:["mdRippleUnbounded"]}],_matRippleTrigger:[{type:t.Input,args:["matRippleTrigger"]}],_matRippleCentered:[{type:t.Input,args:["matRippleCentered"]}],_matRippleDisabled:[{type:t.Input,args:["matRippleDisabled"]}],_matRippleRadius:[{type:t.Input,args:["matRippleRadius"]}],_matRippleSpeedFactor:[{type:t.Input,args:["matRippleSpeedFactor"]}],_matRippleColor:[{type:t.Input,args:["matRippleColor"]}],_matRippleUnbounded:[{type:t.Input,args:["matRippleUnbounded"]}]};var ee=function(){function e(){}return e}();ee.decorators=[{type:t.NgModule,args:[{imports:[T,l.PlatformModule,p.ScrollDispatchModule],exports:[Q,T],declarations:[Q],providers:[p.VIEWPORT_RULER_PROVIDER]}]}],ee.ctorParameters=function(){return[]};var te=function(){function e(){this.state="unchecked",this.disabled=!1}return e}();te.decorators=[{type:t.Component,args:[{encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.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"}}]}],te.ctorParameters=function(){return[]},te.propDecorators={state:[{type:t.Input}],disabled:[{type:t.Input}]};var re=function(){function e(){}return e}();re.decorators=[{type:t.NgModule,args:[{exports:[te],declarations:[te]}]}],re.ctorParameters=function(){return[]};var ne=function(){function e(){}return e}(),oe=function(e){return function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t)||this;return n._disabled=!1,n}return f(t,e),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),t}(e)}(ne),ae=0,ie=function(e){function t(){var t=e.apply(this,arguments)||this;return t._labelId="mat-optgroup-label-"+ae++,t}return f(t,e),t}(oe);ie.decorators=[{type:t.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:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],ie.ctorParameters=function(){return[]},ie.propDecorators={label:[{type:t.Input}]};var se=0,ce=function(){function e(e,t){void 0===t&&(t=!1),this.source=e,this.isUserInput=t}return e}(),pe=function(){function e(e,r,n){this._element=e,this._changeDetectorRef=r,this.group=n,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="md-option-"+se++,this.onSelectionChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"multiple",{get:function(){return this._multiple},set:function(e){e!==this._multiple&&(this._multiple=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.group&&this.group.disabled||this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(e){this._disableRipple=e,this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewValue",{get:function(){return(this._getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),e.prototype.select=function(){this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},e.prototype.deselect=function(){this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},e.prototype.focus=function(){var e=this._getHostElement();"function"==typeof e.focus&&e.focus()},e.prototype.setActiveStyles=function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())},e.prototype.setInactiveStyles=function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())},e.prototype.getLabel=function(){return this.viewValue},e.prototype._handleKeydown=function(e){e.keyCode!==c.ENTER&&e.keyCode!==c.SPACE||(this._selectViaInteraction(),e.preventDefault())},e.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},e.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},e.prototype._getHostElement=function(){return this._element.nativeElement},e.prototype._emitSelectionChangeEvent=function(e){void 0===e&&(e=!1),this.onSelectionChange.emit(new ce(this,e))},e.countGroupLabelsBeforeOption=function(e,t,r){if(r.length){for(var n=t.toArray(),o=r.toArray(),a=0,i=0;i<e+1;i++)n[i].group&&n[i].group===o[a]&&a++;return a}return 0},e}();pe.decorators=[{type:t.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:t.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush,viewProviders:[{provide:I,useValue:!0}]}]}],pe.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ie,decorators:[{type:t.Optional}]}]},pe.propDecorators={value:[{type:t.Input}],disabled:[{type:t.Input}],onSelectionChange:[{type:t.Output}]};var le=function(){function e(){}return e}();le.decorators=[{type:t.NgModule,args:[{imports:[ee,r.CommonModule,re],exports:[pe,ie],declarations:[pe,ie]}]}],le.ctorParameters=function(){return[]};var ue=(new t.InjectionToken("md-placeholder-global-options"),function(){function e(){}return e}());ue.decorators=[{type:t.NgModule,args:[{imports:[n.A11yModule],exports:[n.A11yModule]}]}],ue.ctorParameters=function(){return[]};var de=function(){function e(){this.color="primary",this._value=0,this._bufferValue=0,this.mode="determinate"}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=D(e||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferValue",{get:function(){return this._bufferValue},set:function(e){this._bufferValue=D(e||0)},enumerable:!0,configurable:!0}),e.prototype._primaryTransform=function(){return{transform:"scaleX("+this.value/100+")"}},e.prototype._bufferTransform=function(){if("buffer"==this.mode){return{transform:"scaleX("+this.bufferValue/100+")"}}},e}();de.decorators=[{type:t.Component,args:[{selector:"md-progress-bar, mat-progress-bar",host:{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","[attr.aria-valuenow]":"value","[attr.mode]":"mode","[class.mat-primary]":'color == "primary"',"[class.mat-accent]":'color == "accent"',"[class.mat-warn]":'color == "warn"',class:"mat-progress-bar"},template:'<div class="mat-progress-bar-background mat-progress-bar-element"></div><div class="mat-progress-bar-buffer mat-progress-bar-element" [ngStyle]="_bufferTransform()"></div><div class="mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element" [ngStyle]="_primaryTransform()"></div><div class="mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element"></div>', styles:[".mat-progress-bar{display:block;height:5px;overflow:hidden;position:relative;transform:translateZ(0);transition:opacity 250ms linear;width:100%}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{background-repeat:repeat-x;background-size:10px 4px;display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:'';display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{animation:mat-progress-bar-primary-indeterminate-translate 2s infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{animation:mat-progress-bar-primary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{animation:mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{animation:mat-progress-bar-secondary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(.5,0,.70173,.49582);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);transform:translateX(83.67142%)}100%{transform:translateX(200.61106%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(.08)}36.65%{animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);transform:scaleX(.08)}69.15%{animation-timing-function:cubic-bezier(.06,.11,.6,1);transform:scaleX(.66148)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:translateX(37.65191%)}48.35%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:translateX(84.38617%)}100%{transform:translateX(160.27778%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:scaleX(.08)}19.15%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:scaleX(.4571)}44.15%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:scaleX(.72796)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-10px)}}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1}]}],de.ctorParameters=function(){return[]},de.propDecorators={color:[{type:t.Input}],value:[{type:t.Input}],bufferValue:[{type:t.Input}],mode:[{type:t.Input}]};var me=function(){function e(){}return e}();me.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,T],exports:[de,T],declarations:[de]}]}],me.ctorParameters=function(){return[]},e.MdProgressBarModule=me,e.MdProgressBar=de,e.MatProgressBar=de,e.MatProgressBarModule=me,Object.defineProperty(e,"__esModule",{value:!0})}); //# sourceMappingURL=material-progress-bar.umd.min.js.map