@angular/material
Version:
Angular Material
9 lines • 29.2 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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/cdk/collections"),require("@angular/cdk/a11y"),require("@angular/cdk/coercion"),require("@angular/animations"),require("@angular/cdk/bidi"),require("rxjs/Subject"),require("@angular/platform-browser"),require("@angular/cdk/platform"),require("@angular/cdk/keycodes"),require("@angular/cdk/rxjs"),require("rxjs/observable/merge"),require("rxjs/Subscription")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/core","@angular/cdk/collections","@angular/cdk/a11y","@angular/cdk/coercion","@angular/animations","@angular/cdk/bidi","rxjs/Subject","@angular/platform-browser","@angular/cdk/platform","@angular/cdk/keycodes","@angular/cdk/rxjs","rxjs/observable/merge","rxjs/Subscription"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.expansion=e.ng.material.expansion||{}),e.ng.common,e.ng.core,e.ng.cdk.collections,e.ng.cdk.a11y,e.ng.cdk.coercion,e.ng.animations,e.ng.cdk.bidi,e.Rx,e.ng.platformBrowser,e.ng.cdk.platform,e.ng.cdk.keycodes,e.ng.cdk.rxjs,e.Rx.Observable,e.Rx)}(this,function(e,t,n,o,r,i,a,s,p,c,l,d,u,h,g){"use strict";function f(e,t){function n(){this.constructor=e}D(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e){return function(e){function t(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=e.apply(this,t)||this;return o._disabled=!1,o}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)}function y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var o=0,r=t;o<r.length;o++){var i=r[o];if(null!=i)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}function b(e,t){for(var n=Array(e),o=0;o<e;o++)n[o]=t(o);return n}function _(e){window.getComputedStyle(e).getPropertyValue("opacity")}function x(e,t,n){var o=Math.max(Math.abs(e-n.left),Math.abs(e-n.right)),r=Math.max(Math.abs(t-n.top),Math.abs(t-n.bottom));return Math.sqrt(o*o+r*r)}var D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},v=(new n.InjectionToken("md-compatibility-mode"),new n.InjectionToken("mat-sanity-checks"),new n.InjectionToken("MAT_DATE_LOCALE")),w=function(){function e(){this._localeChanges=new p.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,n){},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,n){return t&&this.compareDate(e,t)<0?t:n&&this.compareDate(e,n)>0?n:e},e}(),E="undefined"!=typeof Intl,I={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"]},C=b(31,function(e){return String(e+1)}),k={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},O=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,R=(function(e){function t(t){var n=e.call(this)||this;return n.useUtcForDisplay=!0,e.prototype.setLocale.call(n,t),n}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(E){var n=new Intl.DateTimeFormat(this.locale,{month:e});return b(12,function(e){return t._stripDirectionalityCharacters(n.format(new Date(2017,e,1)))})}return I[e]},t.prototype.getDateNames=function(){var e=this;if(E){var t=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return b(31,function(n){return e._stripDirectionalityCharacters(t.format(new Date(2017,0,n+1)))})}return C},t.prototype.getDayOfWeekNames=function(e){var t=this;if(E){var n=new Intl.DateTimeFormat(this.locale,{weekday:e});return b(7,function(e){return t._stripDirectionalityCharacters(n.format(new Date(2017,0,e+1)))})}return k[e]},t.prototype.getYearName=function(e){if(E){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,n){if(t<0||t>11)throw Error('Invalid month index "'+t+'". 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 o=this._createDateWithOverflow(e,t,n);if(o.getMonth()!=t)throw Error('Invalid date "'+n+'" for month with index "'+t+'".');return o},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(E){this.useUtcForDisplay&&(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),t=y({},t,{timeZone:"utc"}));var n=new Intl.DateTimeFormat(this.locale,t);return this._stripDirectionalityCharacters(n.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 n=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(n)!=((this.getMonth(e)+t)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},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(O.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,n){var o=new Date(e,t,n);return e>=0&&e<100&&o.setFullYear(this.getYear(o)-1900),o},t.prototype._2digit=function(e){return("00"+e).slice(-2)},t.prototype._stripDirectionalityCharacters=function(e){return e.replace(/[\u200e\u200f]/g,"")},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[v]}]}]}}(w),new n.InjectionToken("mat-date-formats"),function(e){function t(){var t=e.call(this)||this;return t._hammer="undefined"!=typeof window?window.Hammer:null,t.events=t._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!t._hammer&&n.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),t}f(t,e),t.prototype.buildHammer=function(e){var t=new this._hammer(e),n=new this._hammer.Pan,o=new this._hammer.Swipe,r=new this._hammer.Press,i=this._createRecognizer(n,{event:"slide",threshold:0},o),a=this._createRecognizer(r,{event:"longpress",time:500});return n.recognizeWith(o),t.add([o,r,n,i,a]),t},t.prototype._createRecognizer=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=new e.constructor(t);return n.push(e),n.forEach(function(e){return r.recognizeWith(e)}),r},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]}}(c.HammerGestureConfig),{});R.FADING_IN=0,R.VISIBLE=1,R.FADING_OUT=2,R.HIDDEN=3,R[R.FADING_IN]="FADING_IN",R[R.VISIBLE]="VISIBLE",R[R.FADING_OUT]="FADING_OUT",R[R.HIDDEN]="HIDDEN";var P=function(){function e(e,t,n){this._renderer=e,this.element=t,this.config=n,this.state=R.HIDDEN}return e.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},e}(),S=function(){function e(e,t,n){this._ngZone=t,this._isPointerDown=!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("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 e.prototype.fadeInRipple=function(e,t,n){var o=this;void 0===n&&(n={});var r=this._containerElement.getBoundingClientRect();n.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);var i=n.radius||x(e,t,r),a=1/(n.speedFactor||1)*450,s=e-r.left,p=t-r.top,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=s-i+"px",c.style.top=p-i+"px",c.style.height=2*i+"px",c.style.width=2*i+"px",c.style.backgroundColor=n.color||null,c.style.transitionDuration=a+"ms",this._containerElement.appendChild(c),_(c),c.style.transform="scale(1)";var l=new P(this,c,n);return l.state=R.FADING_IN,this._activeRipples.add(l),this.runTimeoutOutsideZone(function(){l.state=R.VISIBLE,n.persistent||o._isPointerDown||l.fadeOut()},a),l},e.prototype.fadeOutRipple=function(e){if(this._activeRipples.delete(e)){var t=e.element;t.style.transitionDuration="400ms",t.style.opacity="0",e.state=R.FADING_OUT,this.runTimeoutOutsideZone(function(){e.state=R.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,n){t._triggerElement.removeEventListener(n,e)}),e&&this._ngZone.runOutsideAngular(function(){t._triggerEvents.forEach(function(t,n){return e.addEventListener(n,t)})}),this._triggerElement=e},e.prototype.onMousedown=function(e){this.rippleDisabled||(this._isPointerDown=!0,this.fadeInRipple(e.clientX,e.clientY,this.rippleConfig))},e.prototype.onPointerUp=function(){this._isPointerDown=!1,this._activeRipples.forEach(function(e){e.config.persistent||e.state!==R.VISIBLE||e.fadeOut()})},e.prototype.onPointerLeave=function(){this._isPointerDown&&this.onPointerUp()},e.prototype.onTouchstart=function(e){if(!this.rippleDisabled){var t=e.touches[0],n=t.clientX,o=t.clientY;this._isPointerDown=!0,this.fadeInRipple(n,o,this.rippleConfig)}},e.prototype.runTimeoutOutsideZone=function(e,t){void 0===t&&(t=0),this._ngZone.runOutsideAngular(function(){return setTimeout(e,t)})},e}(),M=new n.InjectionToken("mat-ripple-global-options"),T=(function(){function e(e,t,n,o){this.radius=0,this.speedFactor=1,this._rippleRenderer=new S(e,t,n),this._globalOptions=o||{},this._updateRippleRenderer()}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,n){return void 0===n&&(n=this.rippleConfig),this._rippleRenderer.fadeInRipple(e,t,n)},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.decorators=[{type:n.Directive,args:[{selector:"[mat-ripple], [matRipple]",exportAs:"matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:l.Platform},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[M]}]}]},e.propDecorators={trigger:[{type:n.Input,args:["matRippleTrigger"]}],centered:[{type:n.Input,args:["matRippleCentered"]}],disabled:[{type:n.Input,args:["matRippleDisabled"]}],radius:[{type:n.Input,args:["matRippleRadius"]}],speedFactor:[{type:n.Input,args:["matRippleSpeedFactor"]}],color:[{type:n.Input,args:["matRippleColor"]}],unbounded:[{type:n.Input,args:["matRippleUnbounded"]}]}}(),function(){function e(){}return e}()),A=m(T),j=0,F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._labelId="mat-optgroup-label-"+j++,t}return f(t,e),t.decorators=[{type:n.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:n.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:n.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],t.ctorParameters=function(){return[]},t.propDecorators={label:[{type:n.Input}]},t}(A),N=0,H=function(){function e(e,t){void 0===t&&(t=!1),this.source=e,this.isUserInput=t}return e}(),U=(function(){function e(e,t,o){this._element=e,this._changeDetectorRef=t,this.group=o,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="mat-option-"+N++,this.onSelectionChange=new n.EventEmitter}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!==d.ENTER&&e.keyCode!==d.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 H(this,e))},e.countGroupLabelsBeforeOption=function(e,t,n){if(n.length){for(var o=t.toArray(),r=n.toArray(),i=0,a=0;a<e+1;a++)o[a].group&&o[a].group===r[i]&&i++;return i}return 0},e.decorators=[{type:n.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:n.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:n.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.ChangeDetectorRef},{type:F,decorators:[{type:n.Optional}]}]},e.propDecorators={value:[{type:n.Input}],disabled:[{type:n.Input}],onSelectionChange:[{type:n.Output}]}}(),new n.InjectionToken("mat-placeholder-global-options"),0),Y=function(){function e(){this.id="cdk-accordion-"+U++,this._multi=!1,this._hideToggle=!1,this.displayMode="default"}return Object.defineProperty(e.prototype,"multi",{get:function(){return this._multi},set:function(e){this._multi=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideToggle",{get:function(){return this._hideToggle},set:function(e){this._hideToggle=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.decorators=[{type:n.Directive,args:[{selector:"cdk-accordion, [cdk-accordion]",exportAs:"cdkAccordion"}]}],e.ctorParameters=function(){return[]},e.propDecorators={multi:[{type:n.Input}],hideToggle:[{type:n.Input}],displayMode:[{type:n.Input}]},e}(),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.decorators=[{type:n.Directive,args:[{selector:"mat-accordion",exportAs:"matAccordion",host:{class:"mat-accordion"}}]}],t.ctorParameters=function(){return[]},t}(Y),q=0,L=function(){function e(e,t,o){var r=this;this.accordion=e,this._changeDetectorRef=t,this._expansionDispatcher=o,this.closed=new n.EventEmitter,this.opened=new n.EventEmitter,this.destroyed=new n.EventEmitter,this.id="cdk-accordion-child-"+q++,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=o.listen(function(e,t){r.accordion&&!r.accordion.multi&&r.accordion.id===t&&r.id!==e&&(r.expanded=!1)})}return Object.defineProperty(e.prototype,"expanded",{get:function(){return this._expanded},set:function(e){if(this._expanded!==e){if(this._expanded=e,e){this.opened.emit();var t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.destroyed.emit(),this._removeUniqueSelectionListener()},e.prototype.toggle=function(){this.expanded=!this.expanded},e.prototype.close=function(){this.expanded=!1},e.prototype.open=function(){this.expanded=!0},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:Y,decorators:[{type:n.Optional}]},{type:n.ChangeDetectorRef},{type:o.UniqueSelectionDispatcher}]},e.propDecorators={closed:[{type:n.Output}],opened:[{type:n.Output}],destroyed:[{type:n.Output}],expanded:[{type:n.Input}]},e}(),V=function(e){function t(t,n,o){return e.call(this,t,n,o)||this}return f(t,e),t}(L),z=m(V),B=function(e){function t(t,n,o){var r=e.call(this,t,n,o)||this;return r.hideToggle=!1,r._inputChanges=new p.Subject,r.accordion=t,r}return f(t,e),t.prototype._getHideToggle=function(){return this.accordion?this.accordion.hideToggle:this.hideToggle},t.prototype._hasSpacing=function(){return!!this.accordion&&"default"===(this.expanded?this.accordion.displayMode:this._getExpandedState())},t.prototype._getExpandedState=function(){return this.expanded?"expanded":"collapsed"},t.prototype.ngOnChanges=function(e){this._inputChanges.next(e)},t.prototype.ngOnDestroy=function(){this._inputChanges.complete()},t.decorators=[{type:n.Component,args:[{styles:[".mat-expansion-panel{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);box-sizing:content-box;display:block;margin:0;transition:margin 225ms cubic-bezier(.4,0,.2,1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-expansion-panel-content{overflow:hidden}.mat-expansion-panel-body{margin:0 24px 16px;overflow:auto}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion .mat-expansion-panel-spacing:first-child{margin-top:0}.mat-accordion .mat-expansion-panel-spacing:last-child{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button{margin-left:0;margin-right:8px}"],selector:"mat-expansion-panel",exportAs:"matExpansionPanel",template:'<ng-content select="mat-expansion-panel-header"></ng-content><div [class.mat-expanded]="expanded" class="mat-expansion-panel-content" [@bodyExpansion]="_getExpandedState()" [id]="id"><div class="mat-expansion-panel-body"><ng-content></ng-content></div><ng-content select="mat-action-row"></ng-content></div>',encapsulation:n.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:n.ChangeDetectionStrategy.OnPush,inputs:["disabled","expanded"],host:{class:"mat-expansion-panel","[class.mat-expanded]":"expanded","[class.mat-expansion-panel-spacing]":"_hasSpacing()"},providers:[{provide:L,useExisting:n.forwardRef(function(){return t})}],animations:[a.trigger("bodyExpansion",[a.state("collapsed",a.style({height:"0px",visibility:"hidden"})),a.state("expanded",a.style({height:"*",visibility:"visible"})),a.transition("expanded <=> collapsed",a.animate("225ms cubic-bezier(0.4,0.0,0.2,1)"))])]}]}],t.ctorParameters=function(){return[{type:W,decorators:[{type:n.Optional},{type:n.Host}]},{type:n.ChangeDetectorRef},{type:o.UniqueSelectionDispatcher}]},t.propDecorators={hideToggle:[{type:n.Input}]},t}(z),G=function(){function e(){}return e.decorators=[{type:n.Directive,args:[{selector:"mat-action-row",host:{class:"mat-action-row"}}]}],e.ctorParameters=function(){return[]},e}(),J=function(){function e(e,t,n,o,r){var i=this;this.panel=t,this._element=n,this._focusMonitor=o,this._changeDetectorRef=r,this._parentChangeSubscription=g.Subscription.EMPTY,this._parentChangeSubscription=h.merge(t.opened,t.closed,u.filter.call(t._inputChanges,function(e){return!(!e.hideToggle&&!e.disabled)})).subscribe(function(){return i._changeDetectorRef.markForCheck()}),o.monitor(n.nativeElement,e,!1)}return e.prototype._toggle=function(){this.panel.disabled||this.panel.toggle()},e.prototype._isExpanded=function(){return this.panel.expanded},e.prototype._getExpandedState=function(){return this.panel._getExpandedState()},e.prototype._getPanelId=function(){return this.panel.id},e.prototype._showToggle=function(){return!this.panel.hideToggle&&!this.panel.disabled},e.prototype._keyup=function(e){switch(e.keyCode){case d.SPACE:case d.ENTER:e.preventDefault(),this._toggle();break;default:return}},e.prototype.ngOnDestroy=function(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element.nativeElement)},e.decorators=[{type:n.Component,args:[{selector:"mat-expansion-panel-header",styles:[".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:0}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-description,.mat-expansion-panel-header-title{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-description,[dir=rtl] .mat-expansion-panel-header-title{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:'';display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}"],template:'<span class="mat-content"><ng-content select="mat-panel-title"></ng-content><ng-content select="mat-panel-description"></ng-content><ng-content></ng-content></span><span [@indicatorRotate]="_getExpandedState()" *ngIf="_showToggle()" class="mat-expansion-indicator"></span>',encapsulation:n.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:n.ChangeDetectionStrategy.OnPush,host:{class:"mat-expansion-panel-header",role:"button","[attr.tabindex]":"panel.disabled ? -1 : 0","[attr.aria-controls]":"_getPanelId()","[attr.aria-expanded]":"_isExpanded()","[attr.aria-disabled]":"panel.disabled","[class.mat-expanded]":"_isExpanded()","(click)":"_toggle()","(keyup)":"_keyup($event)","[@expansionHeight]":"{\n value: _getExpandedState(),\n params: {\n collapsedHeight: collapsedHeight,\n expandedHeight: expandedHeight\n }\n }"},animations:[a.trigger("indicatorRotate",[a.state("collapsed",a.style({transform:"rotate(0deg)"})),a.state("expanded",a.style({transform:"rotate(180deg)"})),a.transition("expanded <=> collapsed",a.animate("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),a.trigger("expansionHeight",[a.state("collapsed",a.style({height:"{{collapsedHeight}}"}),{params:{collapsedHeight:"48px"}}),a.state("expanded",a.style({height:"{{expandedHeight}}"}),{params:{expandedHeight:"64px"}}),a.transition("expanded <=> collapsed",a.animate("225ms cubic-bezier(0.4,0.0,0.2,1)"))])]}]}],e.ctorParameters=function(){return[{type:n.Renderer2},{type:B,decorators:[{type:n.Host}]},{type:n.ElementRef},{type:r.FocusMonitor},{type:n.ChangeDetectorRef}]},e.propDecorators={expandedHeight:[{type:n.Input}],collapsedHeight:[{type:n.Input}]},e}(),Z=function(){function e(){}return e.decorators=[{type:n.Directive,args:[{selector:"mat-panel-description",host:{class:"mat-expansion-panel-header-description"}}]}],e.ctorParameters=function(){return[]},e}(),$=function(){function e(){}return e.decorators=[{type:n.Directive,args:[{selector:"mat-panel-title",host:{class:"mat-expansion-panel-header-title"}}]}],e.ctorParameters=function(){return[]},e}(),K=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,r.A11yModule],exports:[Y,W,B,G,J,$,Z],declarations:[Y,W,B,G,J,$,Z],providers:[o.UNIQUE_SELECTION_DISPATCHER_PROVIDER]}]}],e.ctorParameters=function(){return[]},e}();e.CdkAccordion=Y,e.MatAccordion=W,e.AccordionItem=L,e.MatExpansionPanel=B,e.MatExpansionPanelActionRow=G,e.MatExpansionPanelHeader=J,e.MatExpansionPanelDescription=Z,e.MatExpansionPanelTitle=$,e.MatExpansionModule=K,e.ɵc15="225ms cubic-bezier(0.4,0.0,0.2,1)",e.ɵa15=V,e.ɵb15=z,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/material-expansion.umd.min.js.map