@angular/material
Version:
Angular Material
10 lines • 36.5 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/core"),require("@angular/common"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/a11y"),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/rxjs"),require("rxjs/observable/defer"),require("@angular/animations"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/a11y","@angular/cdk/bidi","@angular/cdk/coercion","rxjs/Subject","@angular/platform-browser","@angular/cdk/platform","@angular/cdk/keycodes","@angular/cdk/rxjs","rxjs/observable/defer","@angular/animations","rxjs/observable/of"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.dialog=t.ng.material.dialog||{}),t.ng.core,t.ng.common,t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.cdk.a11y,t.ng.cdk.bidi,t.ng.cdk.coercion,t.Rx,t.ng.platformBrowser,t.ng.cdk.platform,t.ng.cdk.keycodes,t.ng.cdk.rxjs,t.Rx.Observable,t.ng.animations,t.Rx.Observable)}(this,function(t,e,n,o,r,i,a,s,l,c,p,u,d,h,m,g){"use strict";function f(t,e){function n(){this.constructor=t}k(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function y(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 o=0,r=e;o<r.length;o++){var i=r[o];if(null!=i)for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])}return t}function b(t,e){for(var n=Array(t),o=0;o<t;o++)n[o]=e(o);return n}function _(t){window.getComputedStyle(t).getPropertyValue("opacity")}function v(t,e,n){var o=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(o*o+r*r)}function D(){throw Error("Attempting to attach dialog content after content is already attached")}function C(t){return function(){return t.scrollStrategies.block()}}function w(t){return y(new z,t)}var k=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])},O=(new e.InjectionToken("md-compatibility-mode"),function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"\n [mat-button],\n [mat-fab],\n [mat-icon-button],\n [mat-mini-fab],\n [mat-raised-button],\n [matCardSubtitle],\n [matCardTitle],\n [matCellDef],\n [matColumnDef],\n [matDialogActions],\n [matDialogClose],\n [matDialogContent],\n [matDialogTitle],\n [matHeaderCellDef],\n [matHeaderRowDef],\n [matLine],\n [matRowDef],\n [matStepLabel],\n [matStepperNext],\n [matStepperPrevious],\n [matTabLabel],\n [matTabLink],\n [matTabNav],\n [matTooltip],\n [matInput],\n [matPrefix],\n [matSuffix],\n mat-autocomplete,\n mat-button-toggle,\n mat-button-toggle,\n mat-button-toggle-group,\n mat-card,\n mat-card-actions,\n mat-card-content,\n mat-card-footer,\n mat-card-header,\n mat-card-subtitle,\n mat-card-title,\n mat-card-title-group,\n mat-cell,\n mat-checkbox,\n mat-chip,\n mat-dialog-actions,\n mat-dialog-container,\n mat-dialog-content,\n mat-divider,\n mat-error,\n mat-grid-list,\n mat-grid-tile,\n mat-grid-tile-footer,\n mat-grid-tile-header,\n mat-header-cell,\n mat-header-row,\n mat-hint,\n mat-horizontal-stepper,\n mat-icon,\n mat-input-container,\n mat-form-field,\n mat-list,\n mat-list-item,\n mat-menu,\n mat-nav-list,\n mat-option,\n mat-placeholder,\n mat-progress-bar,\n mat-pseudo-checkbox,\n mat-radio-button,\n mat-radio-group,\n mat-row,\n mat-select,\n mat-sidenav,\n mat-sidenav-container,\n mat-slider,\n mat-spinner,\n mat-step,\n mat-tab,\n mat-table,\n mat-tab-group,\n mat-toolbar,\n mat-vertical-stepper"}]}],t.ctorParameters=function(){return[]},t}()),I=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"\n [md-button],\n [md-fab],\n [md-icon-button],\n [md-mini-fab],\n [md-raised-button],\n [mdCardSubtitle],\n [mdCardTitle],\n [mdCellDef],\n [mdColumnDef],\n [mdDialogActions],\n [mdDialogClose],\n [mdDialogContent],\n [mdDialogTitle],\n [mdHeaderCellDef],\n [mdHeaderRowDef],\n [mdLine],\n [mdRowDef],\n [mdStepLabel],\n [mdStepperNext],\n [mdStepperPrevious],\n [mdTabLabel],\n [mdTabLink],\n [mdTabNav],\n [mdTooltip],\n [mdInput],\n [mdPrefix],\n [mdSuffix],\n md-autocomplete,\n md-button-toggle,\n md-button-toggle,\n md-button-toggle-group,\n md-card,\n md-card-actions,\n md-card-content,\n md-card-footer,\n md-card-header,\n md-card-subtitle,\n md-card-title,\n md-card-title-group,\n md-cell,\n md-checkbox,\n md-chip,\n md-dialog-actions,\n md-dialog-container,\n md-dialog-content,\n md-divider,\n md-error,\n md-grid-list,\n md-grid-tile,\n md-grid-tile-footer,\n md-grid-tile-header,\n md-header-cell,\n md-header-row,\n md-hint,\n md-horizontal-stepper,\n md-icon,\n md-input-container,\n md-form-field,\n md-list,\n md-list-item,\n md-menu,\n md-nav-list,\n md-option,\n md-placeholder,\n md-progress-bar,\n md-pseudo-checkbox,\n md-radio-button,\n md-radio-group,\n md-row,\n md-select,\n md-sidenav,\n md-sidenav-container,\n md-slider,\n md-spinner,\n md-step,\n md-tab,\n md-table,\n md-tab-group,\n md-toolbar,\n md-vertical-stepper"}]}],t.ctorParameters=function(){return[]},t}(),R=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[O,I],exports:[O,I]}]}],t.ctorParameters=function(){return[]},t}(),T=new e.InjectionToken("mat-sanity-checks"),x=function(){function t(t){this._hasDoneGlobalChecks=!1,this._document="object"==typeof document&&document?document:null,t&&!this._hasDoneGlobalChecks&&e.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:e.NgModule,args:[{imports:[R,a.BidiModule],exports:[R,a.BidiModule],providers:[{provide:T,useValue:!0}]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[T]}]}]},t}(),S=new e.InjectionToken("MAT_DATE_LOCALE"),A=function(){function t(){this._localeChanges=new l.Subject}return Object.defineProperty(t.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),t.prototype.getYear=function(t){},t.prototype.getMonth=function(t){},t.prototype.getDate=function(t){},t.prototype.getDayOfWeek=function(t){},t.prototype.getMonthNames=function(t){},t.prototype.getDateNames=function(){},t.prototype.getDayOfWeekNames=function(t){},t.prototype.getYearName=function(t){},t.prototype.getFirstDayOfWeek=function(){},t.prototype.getNumDaysInMonth=function(t){},t.prototype.clone=function(t){},t.prototype.createDate=function(t,e,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}(),E="undefined"!=typeof Intl,P={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"]},M=b(31,function(t){return String(t+1)}),j={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},F=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,L=(function(t){function n(e){var n=t.call(this)||this;return n.useUtcForDisplay=!0,t.prototype.setLocale.call(n,e),n}f(n,t),n.prototype.getYear=function(t){return t.getFullYear()},n.prototype.getMonth=function(t){return t.getMonth()},n.prototype.getDate=function(t){return t.getDate()},n.prototype.getDayOfWeek=function(t){return t.getDay()},n.prototype.getMonthNames=function(t){var e=this;if(E){var n=new Intl.DateTimeFormat(this.locale,{month:t});return b(12,function(t){return e._stripDirectionalityCharacters(n.format(new Date(2017,t,1)))})}return P[t]},n.prototype.getDateNames=function(){var t=this;if(E){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return b(31,function(n){return t._stripDirectionalityCharacters(e.format(new Date(2017,0,n+1)))})}return M},n.prototype.getDayOfWeekNames=function(t){var e=this;if(E){var n=new Intl.DateTimeFormat(this.locale,{weekday:t});return b(7,function(t){return e._stripDirectionalityCharacters(n.format(new Date(2017,0,t+1)))})}return j[t]},n.prototype.getYearName=function(t){if(E){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric"});return this._stripDirectionalityCharacters(e.format(t))}return String(this.getYear(t))},n.prototype.getFirstDayOfWeek=function(){return 0},n.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},n.prototype.clone=function(t){return this.createDate(this.getYear(t),this.getMonth(t),this.getDate(t))},n.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 o=this._createDateWithOverflow(t,e,n);if(o.getMonth()!=e)throw Error('Invalid date "'+n+'" for month with index "'+e+'".');return o},n.prototype.today=function(){return new Date},n.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},n.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(E){this.useUtcForDisplay&&(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),e=y({},e,{timeZone:"utc"}));var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(n.format(t))}return this._stripDirectionalityCharacters(t.toDateString())},n.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},n.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},n.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},n.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},n.prototype.fromIso8601=function(t){if(F.test(t)){var e=new Date(t);if(this.isValid(e))return e}return null},n.prototype.isDateInstance=function(t){return t instanceof Date},n.prototype.isValid=function(t){return!isNaN(t.getTime())},n.prototype._createDateWithOverflow=function(t,e,n){var o=new Date(t,e,n);return t>=0&&t<100&&o.setFullYear(this.getYear(o)-1900),o},n.prototype._2digit=function(t){return("00"+t).slice(-2)},n.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[S]}]}]}}(A),new e.InjectionToken("mat-date-formats"),function(t){function n(){var n=t.call(this)||this;return n._hammer="undefined"!=typeof window?window.Hammer:null,n.events=n._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!n._hammer&&e.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),n}f(n,t),n.prototype.buildHammer=function(t){var e=new this._hammer(t),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),e.add([o,r,n,i,a]),e},n.prototype._createRecognizer=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=new t.constructor(e);return n.push(t),n.forEach(function(t){return r.recognizeWith(t)}),r},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[]}}(c.HammerGestureConfig),{});L.FADING_IN=0,L.VISIBLE=1,L.FADING_OUT=2,L.HIDDEN=3,L[L.FADING_IN]="FADING_IN",L[L.VISIBLE]="VISIBLE",L[L.FADING_OUT]="FADING_OUT",L[L.HIDDEN]="HIDDEN";var N=function(){function t(t,e,n){this._renderer=t,this.element=e,this.config=n,this.state=L.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),B=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 o=this;void 0===n&&(n={});var r=this._containerElement.getBoundingClientRect();n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var i=n.radius||v(t,e,r),a=1/(n.speedFactor||1)*450,s=t-r.left,l=e-r.top,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=s-i+"px",c.style.top=l-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 p=new N(this,c,n);return p.state=L.FADING_IN,this._activeRipples.add(p),this.runTimeoutOutsideZone(function(){p.state=L.VISIBLE,n.persistent||o._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=L.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=L.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!==L.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,o=e.clientY;this._isPointerDown=!0,this.fadeInRipple(n,o,this.rippleConfig)}},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t}(),H=new e.InjectionToken("mat-ripple-global-options"),W=(function(){function t(t,e,n,o){this.radius=0,this.speedFactor=1,this._rippleRenderer=new B(t,e,n),this._globalOptions=o||{},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:e.Directive,args:[{selector:"[mat-ripple], [matRipple]",exportAs:"matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:p.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[H]}]}]},t.propDecorators={trigger:[{type:e.Input,args:["matRippleTrigger"]}],centered:[{type:e.Input,args:["matRippleCentered"]}],disabled:[{type:e.Input,args:["matRippleDisabled"]}],radius:[{type:e.Input,args:["matRippleRadius"]}],speedFactor:[{type:e.Input,args:["matRippleSpeedFactor"]}],color:[{type:e.Input,args:["matRippleColor"]}],unbounded:[{type:e.Input,args:["matRippleUnbounded"]}]}}(),function(){function t(){}return t}()),Y=function(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t.apply(this,e)||this;return o._disabled=!1,o}return f(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=s.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}(W),V=0,G=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+V++,e}return f(n,t),n.decorators=[{type:e.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:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],n.ctorParameters=function(){return[]},n.propDecorators={label:[{type:e.Input}]},n}(Y),q=0,U=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),z=(function(){function t(t,n,o){this._element=t,this._changeDetectorRef=n,this.group=o,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="mat-option-"+q++,this.onSelectionChange=new e.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=s.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!==u.ENTER&&t.keyCode!==u.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 U(this,t))},t.countGroupLabelsBeforeOption=function(t,e,n){if(n.length){for(var o=e.toArray(),r=n.toArray(),i=0,a=0;a<t+1;a++)o[a].group&&o[a].group===r[i]&&i++;return i}return 0},t.decorators=[{type:e.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:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:G,decorators:[{type:e.Optional}]}]},t.propDecorators={value:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]}}(),new e.InjectionToken("mat-placeholder-global-options"),function(){function t(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.direction="ltr",this.ariaDescribedBy=null}return t}()),J=function(t){function n(n,o,r,i){var a=t.call(this)||this;return a._elementRef=n,a._focusTrapFactory=o,a._changeDetectorRef=r,a._document=i,a._elementFocusedBeforeDialogWasOpened=null,a._state="enter",a._animationStateChanged=new e.EventEmitter,a._ariaLabelledBy=null,a._isAnimating=!1,a}return f(n,t),n.prototype.attachComponentPortal=function(t){return this._portalHost.hasAttached()&&D(),this._savePreviouslyFocusedElement(),this._portalHost.attachComponentPortal(t)},n.prototype.attachTemplatePortal=function(t){return this._portalHost.hasAttached()&&D(),this._savePreviouslyFocusedElement(),this._portalHost.attachTemplatePortal(t)},n.prototype._trapFocus=function(){var t=this;this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)),this._focusTrap.focusInitialElementWhenReady().then(function(e){e||t._elementRef.nativeElement.focus()})},n.prototype._restoreFocus=function(){var t=this._elementFocusedBeforeDialogWasOpened;t&&"function"==typeof t.focus&&t.focus(),this._focusTrap&&this._focusTrap.destroy()},n.prototype._savePreviouslyFocusedElement=function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)},n.prototype._onAnimationDone=function(t){"enter"===t.toState?this._trapFocus():"exit"===t.toState&&this._restoreFocus(),this._animationStateChanged.emit(t),this._isAnimating=!1},n.prototype._onAnimationStart=function(t){this._isAnimating=!0,this._animationStateChanged.emit(t)},n.prototype._startExitAnimation=function(){this._state="exit",this._changeDetectorRef.markForCheck()},n.decorators=[{type:e.Component,args:[{selector:"mat-dialog-container",template:"<ng-template cdkPortalHost></ng-template>",styles:[".mat-dialog-container{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);display:block;padding:24px;border-radius:2px;box-sizing:border-box;overflow:auto;max-width:80vw;outline:0;width:100%;height:100%}@media screen and (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch;-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:12px 0;display:flex;flex-wrap:wrap}.mat-dialog-actions:last-child{margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.Default,animations:[m.trigger("slideDialog",[m.state("enter",m.style({transform:"none",opacity:1})),m.state("void",m.style({transform:"translate3d(0, 25%, 0) scale(0.9)",opacity:0})),m.state("exit",m.style({transform:"translate3d(0, 25%, 0)",opacity:0})),m.transition("* => *",m.animate("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])],host:{class:"mat-dialog-container",tabindex:"-1","[attr.role]":"_config?.role","[attr.aria-labelledby]":"_ariaLabelledBy","[attr.aria-describedby]":"_config?.ariaDescribedBy || null","[@slideDialog]":"_state","(@slideDialog.start)":"_onAnimationStart($event)","(@slideDialog.done)":"_onAnimationDone($event)"}}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:i.FocusTrapFactory},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[c.DOCUMENT]}]}]},n.propDecorators={_portalHost:[{type:e.ViewChild,args:[r.PortalHostDirective]}]},n}(r.BasePortalHost),Z=0,K=function(){function t(t,e,n){void 0===n&&(n="mat-dialog-"+Z++);var o=this;this._overlayRef=t,this._containerInstance=e,this.id=n,this.disableClose=this._containerInstance._config.disableClose,this._afterOpen=new l.Subject,this._afterClosed=new l.Subject,this._beforeClose=new l.Subject,d.RxChain.from(e._animationStateChanged).call(d.filter,function(t){return"done"===t.phaseName&&"enter"===t.toState}).call(d.first).subscribe(function(){o._afterOpen.next(),o._afterOpen.complete()}),d.RxChain.from(e._animationStateChanged).call(d.filter,function(t){return"done"===t.phaseName&&"exit"===t.toState}).call(d.first).subscribe(function(){o._overlayRef.dispose(),o._afterClosed.next(o._result),o._afterClosed.complete(),o.componentInstance=null})}return t.prototype.close=function(t){var e=this;this._result=t,d.RxChain.from(this._containerInstance._animationStateChanged).call(d.filter,function(t){return"start"===t.phaseName}).call(d.first).subscribe(function(){e._beforeClose.next(t),e._beforeClose.complete(),e._overlayRef.detachBackdrop()}),this._containerInstance._startExitAnimation()},t.prototype.afterOpen=function(){return this._afterOpen.asObservable()},t.prototype.afterClosed=function(){return this._afterClosed.asObservable()},t.prototype.beforeClose=function(){return this._beforeClose.asObservable()},t.prototype.backdropClick=function(){return this._overlayRef.backdropClick()},t.prototype.updatePosition=function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this},t.prototype.updateSize=function(t,e){return void 0===t&&(t="auto"),void 0===e&&(e="auto"),this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this},t.prototype._isAnimating=function(){return this._containerInstance._isAnimating},t.prototype._getPositionStrategy=function(){return this._overlayRef.getConfig().positionStrategy},t}(),$=new e.InjectionToken("MatDialogData"),X=new e.InjectionToken("mat-dialog-scroll-strategy"),Q={provide:X,deps:[o.Overlay],useFactory:C},tt=function(){function t(t,e,n,o,r){var i=this;this._overlay=t,this._injector=e,this._scrollStrategy=o,this._parentDialog=r,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new l.Subject,this._afterOpenAtThisLevel=new l.Subject,this._boundKeydown=this._handleKeydown.bind(this),this.afterAllClosed=h.defer(function(){return i.openDialogs.length?i._afterAllClosed:d.startWith.call(i._afterAllClosed,void 0)}),!r&&n&&n.subscribe(function(){return i.closeAll()})}return Object.defineProperty(t.prototype,"openDialogs",{get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterOpen",{get:function(){return this._parentDialog?this._parentDialog.afterOpen:this._afterOpenAtThisLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_afterAllClosed",{get:function(){var t=this._parentDialog;return t?t._afterAllClosed:this._afterAllClosedAtThisLevel},enumerable:!0,configurable:!0}),t.prototype.open=function(t,e){var n=this,o=this.openDialogs.find(function(t){return t._isAnimating()});if(o)return o;if(e=w(e),e.id&&this.getDialogById(e.id))throw Error('Dialog with id "'+e.id+'" exists already. The dialog id must be unique.');var r=this._createOverlay(e),i=this._attachDialogContainer(r,e),a=this._attachDialogContent(t,i,r,e);return this.openDialogs.length||document.addEventListener("keydown",this._boundKeydown),this.openDialogs.push(a),a.afterClosed().subscribe(function(){return n._removeOpenDialog(a)}),this.afterOpen.next(a),a},t.prototype.closeAll=function(){for(var t=this.openDialogs.length;t--;)this.openDialogs[t].close()},t.prototype.getDialogById=function(t){return this.openDialogs.find(function(e){return e.id===t})},t.prototype._createOverlay=function(t){
var e=this._getOverlayConfig(t);return this._overlay.create(e)},t.prototype._getOverlayConfig=function(t){var e=new o.OverlayConfig({positionStrategy:this._overlay.position().global(),scrollStrategy:this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction});return t.backdropClass&&(e.backdropClass=t.backdropClass),e},t.prototype._attachDialogContainer=function(t,e){var n=new r.ComponentPortal(J,e.viewContainerRef),o=t.attach(n);return o.instance._config=e,o.instance},t.prototype._attachDialogContent=function(t,n,o,i){var a=new K(o,n,i.id);if(i.hasBackdrop&&o.backdropClick().subscribe(function(){a.disableClose||a.close()}),t instanceof e.TemplateRef)n.attachTemplatePortal(new r.TemplatePortal(t,null,{$implicit:i.data,dialogRef:a}));else{var s=this._createInjector(i,a,n),l=n.attachComponentPortal(new r.ComponentPortal(t,void 0,s));a.componentInstance=l.instance}return a.updateSize(i.width,i.height).updatePosition(i.position),a},t.prototype._createInjector=function(t,e,n){var o=t&&t.viewContainerRef&&t.viewContainerRef.injector,i=new WeakMap;return i.set(K,e),i.set(J,n),i.set($,t.data),i.set(a.Directionality,{value:t.direction,change:g.of()}),new r.PortalInjector(o||this._injector,i)},t.prototype._removeOpenDialog=function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._afterAllClosed.next(),document.removeEventListener("keydown",this._boundKeydown)))},t.prototype._handleKeydown=function(t){var e=this.openDialogs[this.openDialogs.length-1],n=!!e&&!e.disableClose;t.keyCode===u.ESCAPE&&n&&e.close()},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:o.Overlay},{type:e.Injector},{type:n.Location,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[X]}]},{type:t,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]},t}(),et=0,nt=function(){function t(t){this.dialogRef=t,this.ariaLabel="Close dialog"}return t.prototype.ngOnChanges=function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)},t.decorators=[{type:e.Directive,args:[{selector:"button[mat-dialog-close], button[matDialogClose]",exportAs:"matDialogClose",host:{"(click)":"dialogRef.close(dialogResult)","[attr.aria-label]":"ariaLabel",type:"button"}}]}],t.ctorParameters=function(){return[{type:K}]},t.propDecorators={ariaLabel:[{type:e.Input,args:["aria-label"]}],dialogResult:[{type:e.Input,args:["mat-dialog-close"]}],_matDialogClose:[{type:e.Input,args:["matDialogClose"]}]},t}(),ot=function(){function t(t){this._container=t,this.id="mat-dialog-title-"+et++}return t.prototype.ngOnInit=function(){var t=this;this._container&&!this._container._ariaLabelledBy&&Promise.resolve().then(function(){return t._container._ariaLabelledBy=t.id})},t.decorators=[{type:e.Directive,args:[{selector:"[mat-dialog-title], [matDialogTitle]",exportAs:"matDialogTitle",host:{class:"mat-dialog-title","[id]":"id"}}]}],t.ctorParameters=function(){return[{type:J,decorators:[{type:e.Optional}]}]},t.propDecorators={id:[{type:e.Input}]},t}(),rt=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-dialog-content], mat-dialog-content, [matDialogContent]",host:{class:"mat-dialog-content"}}]}],t.ctorParameters=function(){return[]},t}(),it=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",host:{class:"mat-dialog-actions"}}]}],t.ctorParameters=function(){return[]},t}(),at=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,o.OverlayModule,r.PortalModule,i.A11yModule,x],exports:[J,nt,ot,rt,it,x],declarations:[J,nt,ot,it,rt],providers:[tt,Q],entryComponents:[J]}]}],t.ctorParameters=function(){return[]},t}();t.MatDialogModule=at,t.MAT_DIALOG_DATA=$,t.MAT_DIALOG_SCROLL_STRATEGY=X,t.MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY=C,t.MAT_DIALOG_SCROLL_STRATEGY_PROVIDER=Q,t.MatDialog=tt,t.throwMatDialogContentAlreadyAttachedError=D,t.MatDialogContainer=J,t.MatDialogClose=nt,t.MatDialogTitle=ot,t.MatDialogContent=rt,t.MatDialogActions=it,t.MatDialogConfig=z,t.MatDialogRef=K,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/material-dialog.umd.min.js.map