text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@angular/animations"),require("rxjs/operators/take"),require("@progress/kendo-angular-l10n"),require("@angular/common")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@angular/animations","rxjs/operators/take","@progress/kendo-angular-l10n","@angular/common"],e):"object"==typeof exports?exports.KendoAngularNotification=e(require("tslib"),require("@angular/core"),require("@angular/animations"),require("rxjs/operators/take"),require("@progress/kendo-angular-l10n"),require("@angular/common")):t.KendoAngularNotification=e(t.tslib,t["@angular/core"],t["@angular/animations"],t["rxjs/operators/take"],t["@progress/kendo-angular-l10n"],t["@angular/common"])}(this,function(t,e,i,n,o,a){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1);e.NotificationComponent=n.NotificationComponent;var o=i(8);e.NotificationService=o.NotificationService;var a=i(10);e.NotificationModule=a.NotificationModule},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),o=i(3),a=i(4),r=i(5),s=i(6),c=i(7),p=function(){function t(t,e,i,n){var a=this;this.cdr=t,this.element=e,this.builder=i,this.close=new o.EventEmitter,this.width=null,this.height=null,this.animating=!1,this.defaultHideAfter=5e3,this.animationEnd=new o.EventEmitter,this.rtl=!1,this.dynamicRTLSubscription=n.changes.subscribe(function(t){var e=t.rtl;a.rtl=e,a.direction=a.rtl?"rtl":"ltr"})}return Object.defineProperty(t.prototype,"containerClass",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.notificationClasses=function(){return(this.type?this.typeClass():"")+"\n            "+(this.closable?"k-notification-closable":"")},t.prototype.ngOnInit=function(){clearTimeout(this.hideTimeout)},t.prototype.ngOnDestroy=function(){clearTimeout(this.hideTimeout),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe()},t.prototype.ngAfterViewInit=function(){var t=this;this.closable||this.animation||this.setHideTimeout(),!this.closable&&this.animation&&this.animationEnd.pipe(r.take(1)).subscribe(function(){return t.setHideTimeout()})},t.prototype.ngAfterContentInit=function(){this.animation&&this.animate(this.animation)},t.prototype.typeClass=function(){return{none:"",success:"k-notification-success",warning:"k-notification-warning",error:"k-notification-error",info:"k-notification-info"}[this.type.style]},t.prototype.typeIconClass=function(){return{none:"",success:"k-i-success",warning:"k-i-warning",error:"k-i-error",info:"k-i-info"}[this.type.style]},t.prototype.onCloseClick=function(){clearTimeout(this.hideTimeout),this.hide()},t.prototype.hide=function(t){var e=this;return this.animation?(this.animate(this.animation,!0),void this.animationEnd.subscribe(function(){e.emitClose(t)})):void this.emitClose(t)},t.prototype.setHideTimeout=function(){var t=this,e=this.hideAfter||this.defaultHideAfter;this.hideTimeout=window.setTimeout(function(){return t.onCloseClick()},e)},t.prototype.emitClose=function(t){t&&t.destroy(),this.close.emit()},t.prototype.play=function(t,e){var i=this,n=this.builder.build(t);this.animating=!0;var o=n.create(e);o.onDone(function(){i.animating=!1,i.animationEnd.emit(),o&&(o.destroy(),o=null)}),o.play()},t.prototype.animate=function(t,e){var i=this.element.nativeElement,n=t.duration,o=i.offsetHeight,a="slide"===t.type?this.slideAnimation(o,n,e):this.fadeAnimation(n,e);this.play(a,i)},t.prototype.slideAnimation=function(t,e,i){return i?s.slideCloseAnimation(t,e):s.slideAnimation(t,e)},t.prototype.fadeAnimation=function(t,e){return e?s.fadeCloseAnimation(t):s.fadeAnimation(t)},n.__decorate([o.ViewChild("container",{read:o.ViewContainerRef}),n.__metadata("design:type",Object)],t.prototype,"container",void 0),n.__decorate([o.Input(),n.__metadata("design:type",o.TemplateRef)],t.prototype,"templateRef",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"templateString",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],t.prototype,"width",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],t.prototype,"height",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],t.prototype,"hideAfter",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"closable",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],t.prototype,"type",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],t.prototype,"animation",void 0),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String)],t.prototype,"direction",void 0),n.__decorate([o.HostBinding("class.k-notification-container"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],t.prototype,"containerClass",null),n.__decorate([o.HostBinding("class.k-notification-container-animating"),n.__metadata("design:type",Boolean)],t.prototype,"animating",void 0),t=n.__decorate([o.Component({selector:"kendo-notification",template:'\n    <div class="k-widget k-notification"\n        [ngClass]="notificationClasses()"\n        [style.height.px]="height"\n        [style.width.px]="width">\n        <div class="k-notification-wrap">\n            <span *ngIf="type && type.icon && type.style !== \'none\'" class="k-icon" [ngClass]="typeIconClass()"></span>\n\n            <div class="k-notification-content">\n                <ng-template\n                    [ngIf]="templateRef"\n                    [ngTemplateOutlet]="templateRef">\n                </ng-template>\n                <ng-template\n                    [ngIf]="templateString">\n                    {{ templateString }}\n                </ng-template>\n                <ng-container #container></ng-container>\n            </div>\n\n            <a *ngIf="closable" class="k-icon k-i-close" title="Close" (click)="onCloseClick()"></a>\n        </div>\n    </div>\n  ',providers:[c.LocalizationService,{provide:c.L10N_PREFIX,useValue:"kendo.notification"}]}),n.__metadata("design:paramtypes",[o.ChangeDetectorRef,o.ElementRef,a.AnimationBuilder,c.LocalizationService])],t)}();e.NotificationComponent=p},function(e,i){e.exports=t},function(t,i){t.exports=e},function(t,e){t.exports=i},function(t,e){t.exports=n},function(t,e,i){"use strict";function n(t,e){return[s.style({overflow:"hidden",height:0}),s.animate(e+"ms ease-in",s.style({height:t+"px"}))]}function o(t,e){return[s.style({height:t+"px"}),s.animate(e+"ms ease-in",s.style({overflow:"hidden",height:0}))]}function a(t){return[s.style({opacity:0}),s.animate(t+"ms ease-in",s.style({opacity:1}))]}function r(t){return[s.style({opacity:1}),s.animate(t+"ms ease-in",s.style({opacity:0}))]}Object.defineProperty(e,"__esModule",{value:!0});var s=i(4);e.slideAnimation=n,e.slideCloseAnimation=o,e.fadeAnimation=a,e.fadeCloseAnimation=r},function(t,e){t.exports=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),o=i(3),a=i(9),r=function(){function t(t,e,i){this.resolver=t,this.appRef=e,this.injector=i,this.notificationContainers=[],this.position={horizontal:"right",vertical:"top"}}return t.prototype.show=function(t){if(!t)throw new Error("NotificationSettings settings are required");var e,i,n=t.position||this.position,o=this.appRef.components[0].location.nativeElement,r=n.horizontal+" "+n.vertical,s=this.notificationContainers.find(function(t){return t.id===r});if(!s){e=this.resolver.resolveComponentFactory(a.NotificationContainerComponent).create(this.injector),s=e.instance,this.appRef.attachView(e.hostView);var c=e.hostView.rootNodes[0];o.appendChild(c),this.notificationContainers.push(s)}return t.position=n,i=s.addNotification(t)},t=n.__decorate([o.Injectable(),n.__metadata("design:paramtypes",[o.ComponentFactoryResolver,o.ApplicationRef,o.Injector])],t)}();e.NotificationService=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),o=i(3),a=i(1),r=function(){function t(t,e){this.element=t,this.resolver=e,this.id="",this.notifications=[]}return t.prototype.ngOnDestroy=function(){this.notifications.forEach(function(t){t.closeClickSubscription&&t.closeClickSubscription.unsubscribe()}),this.notifications=[]},t.prototype.addNotification=function(t){var e=t.position,i=t.animation||null;this.id=e.horizontal+" "+e.vertical,this.position=e,this.animation=i;var n=this.resolver.resolveComponentFactory(a.NotificationComponent),o=this.container.createComponent(n);this.applySettings(o,t);var r=null;if("function"==typeof t.content){var s=this.resolver.resolveComponentFactory(t.content);r=o.instance.container.createComponent(s)}return o.instance.cdr.detectChanges(),this.notifications.push(o.instance),this.applyPosition(),this.applyContainerWrap(),{hide:function(){return o.instance.hide(r)},notification:o,content:r?r.instance:null}},t.prototype.hide=function(t){var e=t.instance,i=this.notifications.indexOf(e);this.notifications.splice(i,1),e.closeClickSubscription&&e.closeClickSubscription.unsubscribe(),e.templateRef=null,e.templateString=null,e.cdr.detectChanges(),t.destroy()},t.prototype.applyContainerWrap=function(){return"right"===this.position.horizontal?"wrap-reverse":"wrap"},t.prototype.applySettings=function(t,e){var i=this,n=t.instance,a=e.content,r=e.animation||null;n.closeClickSubscription=n.close.subscribe(function(){return i.hide(t)}),"string"==typeof a&&(n.templateString=a),a instanceof o.TemplateRef&&(n.templateRef=a),n.animation=r;var s=e.type;s&&void 0===s.style&&(s.style="none"),s&&void 0===s.icon&&(s.icon=!0),n.type=s,n.closable=e.closable,n.hideAfter=e.hideAfter,n.width=e.width,n.height=e.height},t.prototype.applyPosition=function(){var t=this.element.nativeElement.children[0],e=t.getBoundingClientRect().width/2,i=this.setContainerPosition(this.position,e);Object.keys(i).forEach(function(e){t.style[e]=i[e]})},t.prototype.setContainerPosition=function(t,e){var i={horizontal:{left:{left:0,alignItems:"flex-start"},right:{right:0,alignItems:"flex-start"},center:{left:"50%",marginLeft:-e+"px",alignItems:"center"}},vertical:{top:{top:0},bottom:{bottom:0}}},n=i.horizontal[t.horizontal],o=i.vertical[t.vertical];return Object.assign({},n,o)},n.__decorate([o.ViewChild("container",{read:o.ViewContainerRef}),n.__metadata("design:type",o.ViewContainerRef)],t.prototype,"container",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"id",void 0),t=n.__decorate([o.Component({selector:"kendo-notification-container",template:'\n    <div class="k-notification-group" [style.flexWrap]="applyContainerWrap()">\n        <ng-container #container></ng-container>\n    </div>\n  '}),n.__metadata("design:paramtypes",[o.ElementRef,o.ComponentFactoryResolver])],t)}();e.NotificationContainerComponent=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),o=i(3),a=i(11),r=i(8),s=i(1),c=i(9),p=function(){function t(){}return t=n.__decorate([o.NgModule({declarations:[s.NotificationComponent,c.NotificationContainerComponent],entryComponents:[s.NotificationComponent,c.NotificationContainerComponent],imports:[a.CommonModule],exports:[s.NotificationComponent,c.NotificationContainerComponent],providers:[r.NotificationService]})],t)}();e.NotificationModule=p},function(t,e){t.exports=a}])});