UNPKG

@angular/material

Version:
10 lines 38.6 kB
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/coercion"),require("@angular/core"),require("@angular/forms"),require("@angular/cdk/bidi"),require("rxjs/Subject"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/cdk/platform"),require("@angular/cdk/keycodes"),require("@angular/cdk/a11y"),require("@angular/cdk/observers")):"function"==typeof define&&define.amd?define(["exports","@angular/cdk/coercion","@angular/core","@angular/forms","@angular/cdk/bidi","rxjs/Subject","@angular/platform-browser","@angular/common","@angular/cdk/platform","@angular/cdk/keycodes","@angular/cdk/a11y","@angular/cdk/observers"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.checkbox=e.ng.material.checkbox||{}),e.ng.cdk.coercion,e.ng.core,e.ng.forms,e.ng.cdk.bidi,e.Rx,e.ng.platformBrowser,e.ng.common,e.ng.cdk.platform,e.ng.cdk.keycodes,e.ng.cdk.a11y,e.ng.cdk.observers)}(this,function(e,t,n,r,i,o,a,c,s,d,l,p){"use strict";function u(e,t){function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e){return function(e){function n(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t)||this;return r._disabled=!1,r}return u(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=t.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),n}(e)}function h(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 r=0,i=t;r<i.length;r++){var o=i[r];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(e[a]=o[a])}return e}function f(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t(r);return n}function g(e){window.getComputedStyle(e).getPropertyValue("opacity")}function b(e,t,n){var r=Math.max(Math.abs(e-n.left),Math.abs(e-n.right)),i=Math.max(Math.abs(t-n.top),Math.abs(t-n.bottom));return Math.sqrt(r*r+i*i)}var k=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])},y=(new n.InjectionToken("md-compatibility-mode"),function(){function e(){}return e.decorators=[{type:n.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"}]}],e.ctorParameters=function(){return[]},e}()),_=function(){function e(){}return e.decorators=[{type:n.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"}]}],e.ctorParameters=function(){return[]},e}(),x=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[y,_],exports:[y,_]}]}],e.ctorParameters=function(){return[]},e}(),v=new n.InjectionToken("mat-sanity-checks"),C=function(){function e(e){this._hasDoneGlobalChecks=!1,this._document="object"==typeof document&&document?document:null,e&&!this._hasDoneGlobalChecks&&n.isDevMode()&&(this._checkDoctype(),this._checkTheme(),this._hasDoneGlobalChecks=!0)}return e.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.")},e.prototype._checkTheme=function(){if(this._document&&"function"==typeof getComputedStyle){var e=this._document.createElement("div");e.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(e);var t=getComputedStyle(e);t&&"none"!==t.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(e)}},e.decorators=[{type:n.NgModule,args:[{imports:[x,i.BidiModule],exports:[x,i.BidiModule],providers:[{provide:v,useValue:!0}]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[v]}]}]},e}(),D=new n.InjectionToken("MAT_DATE_LOCALE"),I=function(){function e(){this._localeChanges=new o.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}(),w="undefined"!=typeof Intl,R={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"]},E=f(31,function(e){return String(e+1)}),O={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}))?)?$/,T=(function(e){function t(t){var n=e.call(this)||this;return n.useUtcForDisplay=!0,e.prototype.setLocale.call(n,t),n}u(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(w){var n=new Intl.DateTimeFormat(this.locale,{month:e});return f(12,function(e){return t._stripDirectionalityCharacters(n.format(new Date(2017,e,1)))})}return R[e]},t.prototype.getDateNames=function(){var e=this;if(w){var t=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return f(31,function(n){return e._stripDirectionalityCharacters(t.format(new Date(2017,0,n+1)))})}return E},t.prototype.getDayOfWeekNames=function(e){var t=this;if(w){var n=new Intl.DateTimeFormat(this.locale,{weekday:e});return f(7,function(e){return t._stripDirectionalityCharacters(n.format(new Date(2017,0,e+1)))})}return O[e]},t.prototype.getYearName=function(e){if(w){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 r=this._createDateWithOverflow(e,t,n);if(r.getMonth()!=t)throw Error('Invalid date "'+n+'" for month with index "'+t+'".');return r},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(w){this.useUtcForDisplay&&(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),t=h({},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(M.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 r=new Date(e,t,n);return e>=0&&e<100&&r.setFullYear(this.getYear(r)-1900),r},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:[D]}]}]}}(I),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}u(t,e),t.prototype.buildHammer=function(e){var t=new this._hammer(e),n=new this._hammer.Pan,r=new this._hammer.Swipe,i=new this._hammer.Press,o=this._createRecognizer(n,{event:"slide",threshold:0},r),a=this._createRecognizer(i,{event:"longpress",time:500});return n.recognizeWith(r),t.add([r,i,n,o,a]),t},t.prototype._createRecognizer=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=new e.constructor(t);return n.push(e),n.forEach(function(e){return i.recognizeWith(e)}),i},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]}}(a.HammerGestureConfig),{});T.FADING_IN=0,T.VISIBLE=1,T.FADING_OUT=2,T.HIDDEN=3,T[T.FADING_IN]="FADING_IN",T[T.VISIBLE]="VISIBLE",T[T.FADING_OUT]="FADING_OUT",T[T.HIDDEN]="HIDDEN";var P=function(){function e(e,t,n){this._renderer=e,this.element=t,this.config=n,this.state=T.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 r=this;void 0===n&&(n={});var i=this._containerElement.getBoundingClientRect();n.centered&&(e=i.left+i.width/2,t=i.top+i.height/2);var o=n.radius||b(e,t,i),a=1/(n.speedFactor||1)*450,c=e-i.left,s=t-i.top,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=c-o+"px",d.style.top=s-o+"px",d.style.height=2*o+"px",d.style.width=2*o+"px",d.style.backgroundColor=n.color||null,d.style.transitionDuration=a+"ms",this._containerElement.appendChild(d),g(d),d.style.transform="scale(1)";var l=new P(this,d,n);return l.state=T.FADING_IN,this._activeRipples.add(l),this.runTimeoutOutsideZone(function(){l.state=T.VISIBLE,n.persistent||r._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=T.FADING_OUT,this.runTimeoutOutsideZone(function(){e.state=T.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!==T.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,r=t.clientY;this._isPointerDown=!0,this.fadeInRipple(n,r,this.rippleConfig)}},e.prototype.runTimeoutOutsideZone=function(e,t){void 0===t&&(t=0),this._ngZone.runOutsideAngular(function(){return setTimeout(e,t)})},e}(),A=new n.InjectionToken("mat-ripple-global-options"),F=function(){function e(e,t,n,r){this.radius=0,this.speedFactor=1,this._rippleRenderer=new S(e,t,n),this._globalOptions=r||{},this._updateRippleRenderer()}return 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:s.Platform},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[A]}]}]},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"]}]},e}(),N=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[C,s.PlatformModule],exports:[F,C],declarations:[F]}]}],e.ctorParameters=function(){return[]},e}(),j=function(){function e(){}return e}(),L=m(j),V=0,q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._labelId="mat-optgroup-label-"+V++,t}return u(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}(L),U=0,z=function(){function e(e,t){void 0===t&&(t=!1),this.source=e,this.isUserInput=t}return e}(),Y=(function(){function e(e,t,r){this._element=e,this._changeDetectorRef=t,this.group=r,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="mat-option-"+U++,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=t.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 z(this,e))},e.countGroupLabelsBeforeOption=function(e,t,n){if(n.length){for(var r=t.toArray(),i=n.toArray(),o=0,a=0;a<e+1;a++)r[a].group&&r[a].group===i[o]&&o++;return o}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:q,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),B={provide:r.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return J}),multi:!0},H={};H.Init=0,H.Checked=1,H.Unchecked=2,H.Indeterminate=3,H[H.Init]="Init",H[H.Checked]="Checked",H[H.Unchecked]="Unchecked",H[H.Indeterminate]="Indeterminate";var W=function(){function e(){}return e}(),G=function(){function e(e,t){this._renderer=e,this._elementRef=t}return e}(),X=function(e,t){return void 0===t&&(t=0),function(e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return i._tabIndex=t,i}return u(n,e),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this.disabled?-1:this._tabIndex},set:function(e){this._tabIndex=null!=e?e:t},enumerable:!0,configurable:!0}),n}(e)}(function(e,t){return function(e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return i.color=t,i}return u(n,e),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(e){var n=e||t;n!==this._color&&(this._color&&this._renderer.removeClass(this._elementRef.nativeElement,"mat-"+this._color),n&&this._renderer.addClass(this._elementRef.nativeElement,"mat-"+n),this._color=n)},enumerable:!0,configurable:!0}),n}(e)}(function(e){return function(e){function n(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t)||this;return r._disableRipple=!1,r}return u(n,e),Object.defineProperty(n.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(e){this._disableRipple=t.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),n}(e)}(m(G)),"accent")),J=function(e){function r(t,r,i,o,a){var c=e.call(this,t,r)||this;return c._changeDetectorRef=i,c._focusMonitor=o,c.ariaLabel="",c.ariaLabelledby=null,c._uniqueId="mat-checkbox-"+ ++Y,c.id=c._uniqueId,c.labelPosition="after",c.name=null,c.change=new n.EventEmitter,c.indeterminateChange=new n.EventEmitter,c.onTouched=function(){},c._currentAnimationClass="",c._currentCheckState=H.Init,c._checked=!1,c._indeterminate=!1,c._controlValueAccessorChangeFn=function(){},c.tabIndex=parseInt(a)||0,c}return u(r,e),Object.defineProperty(r.prototype,"inputId",{get:function(){return(this.id||this._uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=t.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"align",{get:function(){return"after"==this.labelPosition?"start":"end"},set:function(e){this.labelPosition="start"==e?"after":"before"},enumerable:!0,configurable:!0}),r.prototype.ngAfterViewInit=function(){var e=this;this._focusMonitor.monitor(this._inputElement.nativeElement,this._renderer,!1).subscribe(function(t){return e._onInputFocusChange(t)})},r.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._inputElement.nativeElement)},Object.defineProperty(r.prototype,"checked",{get:function(){return this._checked},set:function(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(e){var t=e!=this._indeterminate;this._indeterminate=e,t&&(this._indeterminate?this._transitionCheckState(H.Indeterminate):this._transitionCheckState(this.checked?H.Checked:H.Unchecked),this.indeterminateChange.emit(this._indeterminate))},enumerable:!0,configurable:!0}),r.prototype._isRippleDisabled=function(){return this.disableRipple||this.disabled},r.prototype._onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},r.prototype.writeValue=function(e){this.checked=!!e},r.prototype.registerOnChange=function(e){this._controlValueAccessorChangeFn=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck()},r.prototype._transitionCheckState=function(e){var t=this._currentCheckState,n=this._renderer,r=this._elementRef;t!==e&&(this._currentAnimationClass.length>0&&n.removeClass(r.nativeElement,this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(t,e),this._currentCheckState=e,this._currentAnimationClass.length>0&&n.addClass(r.nativeElement,this._currentAnimationClass))},r.prototype._emitChangeEvent=function(){var e=new W;e.source=this,e.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(e)},r.prototype._onInputFocusChange=function(e){this._focusRipple||"keyboard"!==e?e||(this._removeFocusRipple(),this.onTouched()):this._focusRipple=this._ripple.launch(0,0,{persistent:!0,centered:!0})},r.prototype.toggle=function(){this.checked=!this.checked},r.prototype._onInputClick=function(e){var t=this;e.stopPropagation(),this._removeFocusRipple(),this.disabled||(this._indeterminate&&Promise.resolve().then(function(){t._indeterminate=!1,t.indeterminateChange.emit(t._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?H.Checked:H.Unchecked),this._emitChangeEvent())},r.prototype.focus=function(){this._focusMonitor.focusVia(this._inputElement.nativeElement,"keyboard")},r.prototype._onInteractionEvent=function(e){e.stopPropagation()},r.prototype._getAnimationClassForCheckStateTransition=function(e,t){var n="";switch(e){case H.Init:if(t===H.Checked)n="unchecked-checked";else{if(t!=H.Indeterminate)return"";n="unchecked-indeterminate"}break;case H.Unchecked:n=t===H.Checked?"unchecked-checked":"unchecked-indeterminate";break;case H.Checked:n=t===H.Unchecked?"checked-unchecked":"checked-indeterminate";break;case H.Indeterminate:n=t===H.Checked?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+n},r.prototype._removeFocusRipple=function(){this._focusRipple&&(this._focusRipple.fadeOut(),this._focusRipple=null)},r.decorators=[{type:n.Component,args:[{selector:"mat-checkbox",template:'<label [attr.for]="inputId" class="mat-checkbox-layout" #label><div class="mat-checkbox-inner-container" [class.mat-checkbox-inner-container-no-side-margin]="!checkboxLabel.textContent || !checkboxLabel.textContent.trim()"><input #input class="mat-checkbox-input cdk-visually-hidden" type="checkbox" [id]="inputId" [required]="required" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [indeterminate]="indeterminate" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" (change)="_onInteractionEvent($event)" (click)="_onInputClick($event)"><div matRipple class="mat-checkbox-ripple" [matRippleTrigger]="label" [matRippleDisabled]="_isRippleDisabled()" [matRippleCentered]="true"></div><div class="mat-checkbox-frame"></div><div class="mat-checkbox-background"><svg version="1.1" focusable="false" class="mat-checkbox-checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" xml:space="preserve"><path class="mat-checkbox-checkmark-path" fill="none" stroke="white" d="M4.1,12.7 9,17.6 20.3,6.3"/></svg><div class="mat-checkbox-mixedmark"></div></div></div><span class="mat-checkbox-label" #checkboxLabel (cdkObserveContent)="_onLabelTextChange()"><span style="display:none">&nbsp;</span><ng-content></ng-content></span></label>', styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.91026}50%{animation-timing-function:cubic-bezier(0,0,.2,.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0,0,0,1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(.4,0,1,1);stroke-dashoffset:0}to{stroke-dashoffset:-22.91026}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0,0,.2,.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(.14,0,0,1);opacity:1;transform:rotate(0)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}100%,32.8%{opacity:0;transform:scaleX(0)}}.mat-checkbox-checkmark,.mat-checkbox-mixedmark{width:calc(100% - 4px)}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow 280ms cubic-bezier(.4,0,.2,1);cursor:pointer}.mat-checkbox-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-inner-container{display:inline-block;height:20px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:20px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0,0,.2,.1);border-width:2px;border-style:solid}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0,0,.2,.1),opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.91026;stroke-dasharray:22.91026;stroke-width:2.66667px}.mat-checkbox-mixedmark{height:2px;opacity:0;transform:scaleX(0) rotate(0)}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0s mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0s mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0s mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:.5s linear 0s mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0s mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:.3s linear 0s mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-ripple{position:absolute;left:-15px;top:-15px;right:-15px;bottom:-15px;border-radius:50%;z-index:1;pointer-events:none}"],exportAs:"matCheckbox",host:{class:"mat-checkbox","[id]":"id","[class.mat-checkbox-indeterminate]":"indeterminate","[class.mat-checkbox-checked]":"checked","[class.mat-checkbox-disabled]":"disabled","[class.mat-checkbox-label-before]":'labelPosition == "before"'},providers:[B],inputs:["disabled","disableRipple","color","tabIndex"],encapsulation:n.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:n.ChangeDetectionStrategy.OnPush}]}],r.ctorParameters=function(){return[{type:n.Renderer2},{type:n.ElementRef},{type:n.ChangeDetectorRef},{type:l.FocusMonitor},{type:void 0,decorators:[{type:n.Attribute,args:["tabindex"]}]}]},r.propDecorators={ariaLabel:[{type:n.Input,args:["aria-label"]}],ariaLabelledby:[{type:n.Input,args:["aria-labelledby"]}],id:[{type:n.Input}],required:[{type:n.Input}],align:[{type:n.Input}],labelPosition:[{type:n.Input}],name:[{type:n.Input}],change:[{type:n.Output}],indeterminateChange:[{type:n.Output}],value:[{type:n.Input}],_inputElement:[{type:n.ViewChild,args:["input"]}],_ripple:[{type:n.ViewChild,args:[F]}],checked:[{type:n.Input}],indeterminate:[{type:n.Input}]},r}(X),Z=r.CheckboxRequiredValidator,K={provide:r.NG_VALIDATORS,useExisting:n.forwardRef(function(){return $}),multi:!0},$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.decorators=[{type:n.Directive,args:[{selector:"mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]",providers:[K],host:{"[attr.required]":'required ? "" : null'}}]}],t.ctorParameters=function(){return[]},t}(Z),Q=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[c.CommonModule,N,C,p.ObserversModule,l.A11yModule],exports:[J,$,C],declarations:[J,$]}]}],e.ctorParameters=function(){return[]},e}();e.MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR=B,e.TransitionCheckState=H,e.MatCheckboxChange=W,e.MatCheckboxBase=G,e._MatCheckboxMixinBase=X,e.MatCheckbox=J,e.MatCheckboxModule=Q,e._MatCheckboxRequiredValidator=Z,e.MAT_CHECKBOX_REQUIRED_VALIDATOR=K,e.MatCheckboxRequiredValidator=$,Object.defineProperty(e,"__esModule",{value:!0})}); //# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/material-checkbox.umd.min.js.map