@angular/material
Version:
Angular Material
10 lines • 41.6 kB
JavaScript
/**
* @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/common"),require("@angular/core"),require("@angular/cdk/bidi"),require("@angular/cdk/coercion"),require("rxjs/Subject"),require("@angular/platform-browser"),require("@angular/cdk/platform"),require("@angular/cdk/keycodes"),require("@angular/cdk/scrolling"),require("@angular/animations"),require("rxjs/observable/merge"),require("@angular/cdk/rxjs")):"function"==typeof define&&define.amd?define(["exports","@angular/cdk/a11y","@angular/cdk/overlay","@angular/common","@angular/core","@angular/cdk/bidi","@angular/cdk/coercion","rxjs/Subject","@angular/platform-browser","@angular/cdk/platform","@angular/cdk/keycodes","@angular/cdk/scrolling","@angular/animations","rxjs/observable/merge","@angular/cdk/rxjs"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.sidenav=t.ng.material.sidenav||{}),t.ng.cdk.a11y,t.ng.cdk.overlay,t.ng.common,t.ng.core,t.ng.cdk.bidi,t.ng.cdk.coercion,t.Rx,t.ng.platformBrowser,t.ng.cdk.platform,t.ng.cdk.keycodes,t.ng.cdk.scrolling,t.ng.animations,t.Rx.Observable,t.ng.cdk.rxjs)}(this,function(t,e,n,r,o,i,a,s,c,d,p,l,u,m,h){"use strict";function f(t,e){function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function g(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 y(t,e){for(var n=Array(t),r=0;r<t;r++)n[r]=e(r);return n}function _(t){window.getComputedStyle(t).getPropertyValue("opacity")}function b(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){throw Error("A drawer was already declared for 'position=\""+t+"\"'")}var v=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])},D=(new o.InjectionToken("md-compatibility-mode"),function(){function t(){}return t.decorators=[{type:o.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"}]}],t.ctorParameters=function(){return[]},t}()),C=function(){function t(){}return t.decorators=[{type:o.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"}]}],t.ctorParameters=function(){return[]},t}(),k=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{declarations:[D,C],exports:[D,C]}]}],t.ctorParameters=function(){return[]},t}(),x=new o.InjectionToken("mat-sanity-checks"),E=function(){function t(t){this._hasDoneGlobalChecks=!1,this._document="object"==typeof document&&document?document:null,t&&!this._hasDoneGlobalChecks&&o.isDevMode()&&(this._checkDoctype(),this._checkTheme(),this._hasDoneGlobalChecks=!0)}return t.prototype._checkDoctype=function(){this._document&&!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(this._document&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==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(t)}},t.decorators=[{type:o.NgModule,args:[{imports:[k,i.BidiModule],exports:[k,i.BidiModule],providers:[{provide:x,useValue:!0}]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[x]}]}]},t}(),O=new o.InjectionToken("MAT_DATE_LOCALE"),I=function(){function t(){this._localeChanges=new s.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}(),P="undefined"!=typeof Intl,S={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"]},T=y(31,function(t){return String(t+1)}),R={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},M=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,A=(function(t){function e(e){var n=t.call(this)||this;return n.useUtcForDisplay=!0,t.prototype.setLocale.call(n,e),n}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(P){var n=new Intl.DateTimeFormat(this.locale,{month:t});return y(12,function(t){return e._stripDirectionalityCharacters(n.format(new Date(2017,t,1)))})}return S[t]},e.prototype.getDateNames=function(){var t=this;if(P){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return y(31,function(n){return t._stripDirectionalityCharacters(e.format(new Date(2017,0,n+1)))})}return T},e.prototype.getDayOfWeekNames=function(t){var e=this;if(P){var n=new Intl.DateTimeFormat(this.locale,{weekday:t});return y(7,function(t){return e._stripDirectionalityCharacters(n.format(new Date(2017,0,t+1)))})}return R[t]},e.prototype.getYearName=function(t){if(P){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(P){this.useUtcForDisplay&&(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),e=g({},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(M.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.decorators=[{type:o.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[O]}]}]}}(I),new o.InjectionToken("mat-date-formats"),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&&o.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),e}f(e,t),e.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},e.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},e.decorators=[{type:o.Injectable}],e.ctorParameters=function(){return[]}}(c.HammerGestureConfig),{});A.FADING_IN=0,A.VISIBLE=1,A.FADING_OUT=2,A.HIDDEN=3,A[A.FADING_IN]="FADING_IN",A[A.VISIBLE]="VISIBLE",A[A.FADING_OUT]="FADING_OUT",A[A.HIDDEN]="HIDDEN";var F=function(){function t(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=A.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),j=function(){function t(t,e,n){this._ngZone=e,this._isPointerDown=!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("touchstart",this.onTouchstart.bind(this)),this._triggerEvents.set("mouseup",this.onPointerUp.bind(this)),this._triggerEvents.set("touchend",this.onPointerUp.bind(this)),this._triggerEvents.set("mouseleave",this.onPointerLeave.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();n.centered&&(t=o.left+o.width/2,e=o.top+o.height/2);var i=n.radius||b(t,e,o),a=1/(n.speedFactor||1)*450,s=t-o.left,c=e-o.top,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=s-i+"px",d.style.top=c-i+"px",d.style.height=2*i+"px",d.style.width=2*i+"px",d.style.backgroundColor=n.color||null,d.style.transitionDuration=a+"ms",this._containerElement.appendChild(d),_(d),d.style.transform="scale(1)";var p=new F(this,d,n);return p.state=A.FADING_IN,this._activeRipples.add(p),this.runTimeoutOutsideZone(function(){p.state=A.VISIBLE,n.persistent||r._isPointerDown||p.fadeOut()},a),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=A.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=A.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._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this.rippleConfig))},t.prototype.onPointerUp=function(){this._isPointerDown=!1,this._activeRipples.forEach(function(t){t.config.persistent||t.state!==A.VISIBLE||t.fadeOut()})},t.prototype.onPointerLeave=function(){this._isPointerDown&&this.onPointerUp()},t.prototype.onTouchstart=function(t){if(!this.rippleDisabled){var e=t.touches[0],n=e.clientX,r=e.clientY;this._isPointerDown=!0,this.fadeInRipple(n,r,this.rippleConfig)}},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t}(),N=new o.InjectionToken("mat-ripple-global-options"),B=(function(){function t(t,e,n,r){this.radius=0,this.speedFactor=1,this._rippleRenderer=new j(t,e,n),this._globalOptions=r||{},this._updateRippleRenderer()}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.decorators=[{type:o.Directive,args:[{selector:"[mat-ripple], [matRipple]",exportAs:"matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:o.NgZone},{type:d.Platform},{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[N]}]}]},t.propDecorators={trigger:[{type:o.Input,args:["matRippleTrigger"]}],centered:[{type:o.Input,args:["matRippleCentered"]}],disabled:[{type:o.Input,args:["matRippleDisabled"]}],radius:[{type:o.Input,args:["matRippleRadius"]}],speedFactor:[{type:o.Input,args:["matRippleSpeedFactor"]}],color:[{type:o.Input,args:["matRippleColor"]}],unbounded:[{type:o.Input,args:["matRippleUnbounded"]}]}}(),function(){function t(){}return t}()),W=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 f(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}(B),V=0,z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+V++,e}return f(e,t),e.decorators=[{type:o.Component,args:[{selector:"mat-optgroup",exportAs:"matOptgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }}</label><ng-content select="mat-option"></ng-content>',encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:o.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],e.ctorParameters=function(){return[]},e.propDecorators={label:[{type:o.Input}]},e}(W),L=0,G=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),U=(function(){function t(t,e,n){this._element=t,this._changeDetectorRef=e,this.group=n,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="mat-option-"+L++,this.onSelectionChange=new o.EventEmitter}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=a.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!==p.ENTER&&t.keyCode!==p.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 G(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.decorators=[{type:o.Component,args:[{selector:"mat-option",exportAs:"matOption",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><span class="mat-option-text"><ng-content></ng-content></span><div class="mat-option-ripple" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disabled || disableRipple"></div>',encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:o.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:o.ChangeDetectorRef},{type:z,decorators:[{type:o.Optional}]}]},t.propDecorators={value:[{type:o.Input}],disabled:[{type:o.Input}],onSelectionChange:[{type:o.Output}]}}(),new o.InjectionToken("mat-placeholder-global-options"),function(){function t(t,e){this.type=t,this.animationFinished=e}return t}()),Y=function(){function t(t,e){this._changeDetectorRef=t,this._container=e,this._margins={left:0,right:0}}return t.prototype.ngAfterContentInit=function(){var t=this;this._container._contentMargins.subscribe(function(e){t._margins=e,t._changeDetectorRef.markForCheck()})},t.decorators=[{type:o.Component,args:[{selector:"mat-drawer-content",template:"<ng-content></ng-content>",host:{class:"mat-drawer-content","[style.marginLeft.px]":"_margins.left","[style.marginRight.px]":"_margins.right"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:o.ChangeDetectorRef},{type:q,decorators:[{type:o.Inject,args:[o.forwardRef(function(){return q})]}]}]},t}(),H=function(){function t(t,e,n){var r=this;this._elementRef=t,this._focusTrapFactory=e,this._doc=n,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new o.EventEmitter,this._isAnimating=!1,this._animationState="void",this.onOpen=new o.EventEmitter,this.onClose=new o.EventEmitter,this.onPositionChanged=new o.EventEmitter,this.onAlignChanged=new o.EventEmitter,this._modeChanged=new s.Subject,this.onOpen.subscribe(function(){r._doc&&(r._elementFocusedBeforeDrawerWasOpened=r._doc.activeElement),r._isFocusTrapEnabled&&r._focusTrap&&r._focusTrap.focusInitialElementWhenReady()}),this.onClose.subscribe(function(){return r._restoreFocus()})}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onAlignChanged.emit(),this.onPositionChanged.emit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"align",{get:function(){return this.position},set:function(t){this.position=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode=t,this._modeChanged.next()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableClose",{get:function(){return this._disableClose},set:function(t){this._disableClose=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isFocusTrapEnabled",{get:function(){return this.opened&&"side"!==this.mode},enumerable:!0,configurable:!0}),t.prototype._restoreFocus=function(){var t=this._doc&&this._doc.activeElement;t&&this._elementRef.nativeElement.contains(t)&&(this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement?this._elementFocusedBeforeDrawerWasOpened.focus():this._elementRef.nativeElement.blur()),this._elementFocusedBeforeDrawerWasOpened=null},t.prototype.ngAfterContentInit=function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._focusTrap.enabled=this._isFocusTrapEnabled,this._enableAnimations=!0},t.prototype.ngOnDestroy=function(){this._focusTrap&&this._focusTrap.destroy()},Object.defineProperty(t.prototype,"opened",{get:function(){return this._opened},set:function(t){this.toggle(a.coerceBooleanProperty(t))},enumerable:!0,configurable:!0}),t.prototype.open=function(){return this.toggle(!0)},t.prototype.close=function(){return this.toggle(!1)},t.prototype.toggle=function(t){var e=this;return void 0===t&&(t=!this.opened),this._isAnimating||(this._opened=t,this._animationState=t?this._enableAnimations?"open":"open-instant":"void",this._currentTogglePromise=new Promise(function(n){h.first.call(t?e.onOpen:e.onClose).subscribe(n)}),this._focusTrap&&(this._focusTrap.enabled=this._isFocusTrapEnabled)),this._currentTogglePromise},t.prototype.handleKeydown=function(t){t.keyCode!==p.ESCAPE||this.disableClose||(this.close(),t.stopPropagation())},t.prototype._onAnimationStart=function(t){this._isAnimating=!0,this._animationStarted.emit(t)},t.prototype._onAnimationEnd=function(t){var e=this,n=t.fromState,r=t.toState;0===r.indexOf("open")&&"void"===n?this.onOpen.emit(new U("open",!0)):"void"===r&&0===n.indexOf("open")&&this.onClose.emit(new U("close",!0)),Promise.resolve().then(function(){e._isAnimating=!1,e._currentTogglePromise=null})},Object.defineProperty(t.prototype,"_width",{get:function(){return this._elementRef.nativeElement?this._elementRef.nativeElement.offsetWidth||0:0},enumerable:!0,configurable:!0}),t.decorators=[{type:o.Component,args:[{selector:"mat-drawer",exportAs:"matDrawer",template:"<ng-content></ng-content>",animations:[u.trigger("transform",[u.state("open, open-instant",u.style({transform:"translate3d(0, 0, 0)",visibility:"visible"})),u.state("void",u.style({visibility:"hidden"})),u.transition("void => open-instant",u.animate("0ms")),u.transition("void <=> open, open-instant => void",u.animate("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])],host:{class:"mat-drawer","[@transform]":"_animationState","(@transform.start)":"_onAnimationStart($event)","(@transform.done)":"_onAnimationEnd($event)","(keydown)":"handleKeydown($event)","[attr.align]":"null","[class.mat-drawer-end]":'position === "end"',"[class.mat-drawer-over]":'mode === "over"',"[class.mat-drawer-push]":'mode === "push"',"[class.mat-drawer-side]":'mode === "side"',tabIndex:"-1"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:o.ElementRef},{type:e.FocusTrapFactory},{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[c.DOCUMENT]}]}]},t.propDecorators={position:[{type:o.Input}],align:[{type:o.Input}],mode:[{type:o.Input}],disableClose:[{type:o.Input}],onOpen:[{type:o.Output,args:["open"]}],onClose:[{type:o.Output,args:["close"]}],onPositionChanged:[{type:o.Output,args:["positionChanged"]}],onAlignChanged:[{type:o.Output,args:["align-changed"]}],opened:[{type:o.Input}]},t}(),q=function(){function t(t,e,n,r,i){var a=this;this._dir=t,this._element=e,this._renderer=n,this._ngZone=r,this._changeDetectorRef=i,this.backdropClick=new o.EventEmitter,this._destroyed=new s.Subject,this._contentMargins=new s.Subject,null!=t&&h.takeUntil.call(t.change,this._destroyed).subscribe(function(){return a._validateDrawers()})}return Object.defineProperty(t.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;h.startWith.call(this._drawers.changes,null).subscribe(function(){t._validateDrawers(),t._drawers.forEach(function(e){t._watchDrawerToggle(e),t._watchDrawerPosition(e),t._watchDrawerMode(e)}),(!t._drawers.length||t._isDrawerOpen(t._start)||t._isDrawerOpen(t._end))&&t._updateContentMargins(),t._changeDetectorRef.markForCheck()})},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},t.prototype.open=function(){this._drawers.forEach(function(t){return t.open()})},t.prototype.close=function(){this._drawers.forEach(function(t){return t.close()})},t.prototype._watchDrawerToggle=function(t){var e=this;h.RxChain.from(t._animationStarted).call(h.takeUntil,this._drawers.changes).call(h.filter,function(t){return t.fromState!==t.toState}).subscribe(function(t){"open-instant"!==t.toState&&e._renderer.addClass(e._element.nativeElement,"mat-drawer-transition"),e._updateContentMargins(),e._changeDetectorRef.markForCheck()}),"side"!==t.mode&&h.takeUntil.call(m.merge(t.onOpen,t.onClose),this._drawers.changes).subscribe(function(){return e._setContainerClass(t.opened)})},t.prototype._watchDrawerPosition=function(t){var e=this;t&&h.takeUntil.call(t.onPositionChanged,this._drawers.changes).subscribe(function(){h.first.call(e._ngZone.onMicrotaskEmpty.asObservable()).subscribe(function(){e._validateDrawers()})})},t.prototype._watchDrawerMode=function(t){var e=this;t&&h.takeUntil.call(t._modeChanged,m.merge(this._drawers.changes,this._destroyed)).subscribe(function(){e._updateContentMargins(),e._changeDetectorRef.markForCheck()})},t.prototype._setContainerClass=function(t){t?this._renderer.addClass(this._element.nativeElement,"mat-drawer-opened"):this._renderer.removeClass(this._element.nativeElement,"mat-drawer-opened")},t.prototype._validateDrawers=function(){var t=this;this._start=this._end=null,this._drawers.forEach(function(e){"end"==e.position?(null!=t._end&&w("end"),
t._end=e):(null!=t._start&&w("start"),t._start=e)}),this._right=this._left=null,null==this._dir||"ltr"==this._dir.value?(this._left=this._start,this._right=this._end):(this._left=this._end,this._right=this._start)},t.prototype._onBackdropClicked=function(){this.backdropClick.emit(),this._closeModalDrawer()},t.prototype._closeModalDrawer=function(){[this._start,this._end].filter(function(t){return t&&!t.disableClose&&"side"!==t.mode}).forEach(function(t){return t.close()})},t.prototype._isShowingBackdrop=function(){return this._isDrawerOpen(this._start)&&"side"!=this._start.mode||this._isDrawerOpen(this._end)&&"side"!=this._end.mode},t.prototype._isDrawerOpen=function(t){return null!=t&&t.opened},t.prototype._updateContentMargins=function(){var t=0,e=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._width;else if("push"==this._left.mode){var n=this._left._width;t+=n,e-=n}if(this._right&&this._right.opened)if("side"==this._right.mode)e+=this._right._width;else if("push"==this._right.mode){var n=this._right._width;e+=n,t-=n}this._contentMargins.next({left:t,right:e})},t.decorators=[{type:o.Component,args:[{selector:"mat-drawer-container",exportAs:"matDrawerContainer",template:'<div class="mat-drawer-backdrop" (click)="_onBackdropClicked()" [class.mat-drawer-shown]="_isShowingBackdrop()"></div><ng-content select="mat-drawer"></ng-content><ng-content select="mat-drawer-content"></ng-content><mat-drawer-content *ngIf="!_content" cdkScrollable><ng-content></ng-content></mat-drawer-content>',styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;min-width:5vw;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-opened:not(.mat-drawer-side),.mat-drawer.mat-drawer-opening:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],host:{class:"mat-drawer-container"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:i.Directionality,decorators:[{type:o.Optional}]},{type:o.ElementRef},{type:o.Renderer2},{type:o.NgZone},{type:o.ChangeDetectorRef}]},t.propDecorators={_drawers:[{type:o.ContentChildren,args:[H]}],_content:[{type:o.ContentChild,args:[Y]}],backdropClick:[{type:o.Output}]},t}(),Z=function(t){function e(e,n){return t.call(this,e,n)||this}return f(e,t),e.decorators=[{type:o.Component,args:[{selector:"mat-sidenav-content",template:"<ng-content></ng-content>",host:{class:"mat-drawer-content mat-sidenav-content","[style.marginLeft.px]":"_margins.left","[style.marginRight.px]":"_margins.right"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1}]}],e.ctorParameters=function(){return[{type:o.ChangeDetectorRef},{type:$,decorators:[{type:o.Inject,args:[o.forwardRef(function(){return $})]}]}]},e}(Y),J=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._fixedInViewport=!1,e._fixedTopGap=0,e._fixedBottomGap=0,e}return f(e,t),Object.defineProperty(e.prototype,"fixedInViewport",{get:function(){return this._fixedInViewport},set:function(t){this._fixedInViewport=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fixedTopGap",{get:function(){return this._fixedTopGap},set:function(t){this._fixedTopGap=a.coerceNumberProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fixedBottomGap",{get:function(){return this._fixedBottomGap},set:function(t){this._fixedBottomGap=a.coerceNumberProperty(t)},enumerable:!0,configurable:!0}),e.decorators=[{type:o.Component,args:[{selector:"mat-sidenav",exportAs:"matSidenav",template:"<ng-content></ng-content>",animations:[u.trigger("transform",[u.state("open, open-instant",u.style({transform:"translate3d(0, 0, 0)",visibility:"visible"})),u.state("void",u.style({visibility:"hidden"})),u.transition("void => open-instant",u.animate("0ms")),u.transition("void <=> open, open-instant => void",u.animate("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])],host:{class:"mat-drawer mat-sidenav",tabIndex:"-1","[@transform]":"_animationState","(@transform.start)":"_onAnimationStart($event)","(@transform.done)":"_onAnimationEnd($event)","(keydown)":"handleKeydown($event)","[attr.align]":"null","[class.mat-drawer-end]":'position === "end"',"[class.mat-drawer-over]":'mode === "over"',"[class.mat-drawer-push]":'mode === "push"',"[class.mat-drawer-side]":'mode === "side"',"[class.mat-sidenav-fixed]":"fixedInViewport","[style.top.px]":"fixedInViewport ? fixedTopGap : null","[style.bottom.px]":"fixedInViewport ? fixedBottomGap : null"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1}]}],e.ctorParameters=function(){return[]},e.propDecorators={fixedInViewport:[{type:o.Input}],fixedTopGap:[{type:o.Input}],fixedBottomGap:[{type:o.Input}]},e}(H),$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.decorators=[{type:o.Component,args:[{selector:"mat-sidenav-container",exportAs:"matSidenavContainer",template:'<div class="mat-drawer-backdrop" (click)="_onBackdropClicked()" [class.mat-drawer-shown]="_isShowingBackdrop()"></div><ng-content select="mat-sidenav"></ng-content><ng-content select="mat-sidenav-content"></ng-content><mat-sidenav-content *ngIf="!_content" cdkScrollable><ng-content></ng-content></mat-sidenav-content>',styles:[".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;min-width:5vw;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-opened:not(.mat-drawer-side),.mat-drawer.mat-drawer-opening:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],host:{class:"mat-drawer-container mat-sidenav-container"},changeDetection:o.ChangeDetectionStrategy.OnPush,encapsulation:o.ViewEncapsulation.None,preserveWhitespaces:!1}]}],e.ctorParameters=function(){return[]},e.propDecorators={_drawers:[{type:o.ContentChildren,args:[J]}],_content:[{type:o.ContentChild,args:[Z]}]},e}(q),K=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{imports:[r.CommonModule,E,e.A11yModule,n.OverlayModule,l.ScrollDispatchModule],exports:[E,H,q,Y,J,$,Z],declarations:[H,q,Y,J,$,Z]}]}],t.ctorParameters=function(){return[]},t}();t.MatSidenavModule=K,t.throwMatDuplicatedDrawerError=w,t.MatDrawerToggleResult=U,t.MatDrawerContent=Y,t.MatDrawer=H,t.MatDrawerContainer=q,t.MatSidenavContent=Z,t.MatSidenav=J,t.MatSidenavContainer=$,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/material-sidenav.umd.min.js.map