!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("fullcalendar"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-fullcalendar",["exports","fullcalendar","@angular/core"],e):e(t["ngx-fullcalendar"]={},t.fullcalendar,t.ng.core)}(this,function(t,n,i){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var o={aspectRatio:1.35,defaultView:"month",fixedWeekCount:!0,showNonCurrentDates:!0,allDaySlot:!0,allDayText:"all-day",slotDuration:"00:30:00",scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0,dragRevertDuration:500,dragOpacity:.75,dragScroll:!0,timeZone:"local",titleFormat:{year:"numeric",month:"long"},titleRangeSeparator:" – ",defaultRangeSeparator:" - ",dir:"ltr",defaultTimedEventDuration:"01:00",defaultAllDayEventDuration:{days:1},eventOrder:"start,-duration,allDay,title",rerenderDelay:null},r=function(){function t(t,e){this.el=t,this.onDateClick=new i.EventEmitter,this.onDrop=new i.EventEmitter,this.onEventClick=new i.EventEmitter,this.onEventMouseEnter=new i.EventEmitter,this.onEventMouseLeave=new i.EventEmitter,this.onEventDragStart=new i.EventEmitter,this.onEventDragStop=new i.EventEmitter,this.onEventDrop=new i.EventEmitter,this.onEventReceive=new i.EventEmitter,this.onEventResizeStart=new i.EventEmitter,this.onEventResizeStop=new i.EventEmitter,this.onEventResize=new i.EventEmitter,this.onDatesRender=new i.EventEmitter,this.onDatesDestroy=new i.EventEmitter,this.onViewSkeletonRender=new i.EventEmitter,this.onViewSkeletonDestroy=new i.EventEmitter,this.onNavLinkDayClick=new i.EventEmitter,this.onNavLinkWeekClick=new i.EventEmitter,this.onEventRender=new i.EventEmitter,this.onEventDestroy=new i.EventEmitter,this.onEventPositioned=new i.EventEmitter,this.onDayRender=new i.EventEmitter,this.onSelect=new i.EventEmitter,this.onUnselect=new i.EventEmitter,this.onResourceRender=new i.EventEmitter,this.eventDiffer=e.find([]).create(null),this.resourceDiffer=e.find([]).create(null),this.initialized=!1}return t.prototype.ngOnInit=function(){var i=this;this.config=this.safeGenerateConfig(),this.config.resources=function(t,e,n){e(i.resources||[])},this.config.dateClick=function(t){i.onDateClick.emit(t)},this.config.dayRender=function(t){i.onDayRender.emit(t)},this.config.drop=function(t){i.onDrop.emit(t)},this.config.eventClick=function(t){i.onEventClick.emit(t)},this.config.eventMouseEnter=function(t){i.onEventMouseEnter.emit(t)},this.config.eventMouseLeave=function(t){i.onEventMouseLeave.emit(t)},this.config.eventDragStart=function(t){i.onEventDragStart.emit(t)},this.config.eventDragStop=function(t){i.onEventDragStop.emit(t)},this.config.eventDrop=function(t){i._updateEvent(t.event),i.onEventDrop.emit(t)},this.config.eventReceive=function(t){i.onEventReceive.emit(t)},this.config.eventResizeStart=function(t){i.onEventResizeStart.emit(t)},this.config.eventResizeStop=function(t){i.onEventResizeStop.emit(t)},this.config.eventResize=function(t){i._updateEvent(t.event),i.onEventResize.emit(t)},this.config.datesRender=function(t){i.onDatesRender.emit({info:t})},this.config.datesDestroy=function(t){i.onDatesDestroy.emit({info:t})},this.config.viewSkeletonRender=function(t){i.onViewSkeletonRender.emit({info:t})},this.config.viewSkeletonDestroy=function(t){i.onViewSkeletonDestroy.emit({info:t})},this.config.navLinkDayClick=function(t,e){i.onNavLinkDayClick.emit({date:t,jsEvent:e})},this.config.navLinkWeekClick=function(t,e){i.onNavLinkWeekClick.emit({weekStart:t,jsEvent:e})},this.config.eventRender=function(t){i.onEventRender.emit(t)},this.config.eventDestroy=function(t){i.onEventDestroy.emit(t)},this.config.eventPositioned=function(t){i.onEventPositioned.emit(t)},this.config.select=function(t){i.onSelect.emit(t)},this.config.unselect=function(t,e){i.onUnselect.emit({jsEvent:t,view:e})},this.config.resourceRender=function(t){i.onResourceRender.emit(t)}},t.prototype.ngOnDestroy=function(){this.calendar&&(this.calendar.destroy(),this.initialized=!1,this.calendar=null)},t.prototype.ngOnChanges=function(t){if(this.calendar)for(var e in t)"events"!==e&&this.calendar.option(e,t[e].currentValue)},t.prototype.ngAfterViewChecked=function(){!this.initialized&&this.el.nativeElement.offsetParent&&this.initialize()},t.prototype.ngDoCheck=function(){var t=this.eventDiffer.diff(this.events);this.calendar&&t&&(this.calendar.getEventSources().forEach(function(t){return t.remove()}),this.events&&this.calendar.addEventSource(this.events));var e=this.resourceDiffer.diff(this.resources);this.calendar&&e&&this.calendar.refetchResources()},t.prototype.initialize=function(){this.calendar=new n.Calendar(this.el.nativeElement,this.config),this.calendar.render(),(this.draggableEl||this.containerEl)&&(this.draggableEl?new n.Draggable(this.draggableEl):this.containerEl&&new n.Draggable(this.containerEl,{itemSelector:this.itemSelector})),this.events&&this.calendar.addEventSource(this.events),this.initialized=!0},t.prototype.safeGenerateConfig=function(){var t={header:this.header,weekends:this.weekends,hiddenDays:this.hiddenDays,fixedWeekCount:this.fixedWeekCount,weekNumbers:this.weekNumbers,businessHours:this.businessHours,height:this.height,contentHeight:this.contentHeight,aspectRatio:this.aspectRatio,eventLimit:this.eventLimit,defaultDate:this.defaultDate,locale:this.locale,timeZone:this.timeZone,eventTimeFormat:this.eventTimeFormat,editable:this.editable,droppable:this.droppable,eventStartEditable:this.eventStartEditable,eventDurationEditable:this.eventDurationEditable,defaultView:this.defaultView,allDaySlot:this.allDaySlot,allDayText:this.allDayText,slotDuration:this.slotDuration,slotLabelInterval:this.slotLabelInterval,snapDuration:this.snapDuration,scrollTime:this.scrollTime,minTime:this.minTime,maxTime:this.maxTime,slotEventOverlap:this.slotEventOverlap,nowIndicator:this.nowIndicator,dragRevertDuration:this.dragRevertDuration,dragOpacity:this.dragOpacity,dragScroll:this.dragScroll,eventOverlap:this.eventOverlap,eventConstraint:this.eventConstraint,dayRender:this.dayRender,navLinks:this.navLinks,titleFormat:this.titleFormat,titleRangeSeparator:this.titleRangeSeparator,defaultRangeSeparator:this.defaultRangeSeparator,dir:this.dir,defaultTimedEventDuration:this.defaultTimedEventDuration,defaultAllDayEventDuration:this.defaultAllDayEventDuration,showNonCurrentDates:this.showNonCurrentDates,columnHeaderFormat:this.columnHeaderFormat,slotLabelFormat:this.slotLabelFormat,columnHeaderText:this.columnHeaderText,nextDayThreshold:this.nextDayThreshold,eventOrder:this.eventOrder,rerenderDelay:this.rerenderDelay,progressiveEventRendering:this.progressiveEventRendering,eventResizableFromStart:this.eventResizableFromStart,eventDragMinDistance:this.eventDragMinDistance,allDayMaintainDuration:this.allDayMaintainDuration,listDayFormat:this.listDayFormat,listDayAltFormat:this.listDayAltFormat};return e({},o,this.removeUndefinedProperties(this.options),this.removeUndefinedProperties(t))},t.prototype._updateEvent=function(t){console.log(t);var e=this._findEvent(t.id);e&&(e.start=n.formatDate(t.start),t.end&&(e.end=n.formatDate(t.end)),t.resourceId&&(e.resourceId=t.resourceId))},t.prototype._findEvent=function(t){var e,n,i;if(this.events)try{for(var o=function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}(this.events),r=o.next();!r.done;r=o.next()){var a=r.value;if(a.id===t){i=a;break}}}catch(u){e={error:u}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(e)throw e.error}}return i},t.prototype.removeUndefinedProperties=function(t){return JSON.parse(JSON.stringify("object"==typeof t?t:{}))},t.decorators=[{type:i.Component,args:[{selector:"ngx-fullcalendar",template:" "}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:i.IterableDiffers}]},t.propDecorators={draggableEl:[{type:i.Input}],containerEl:[{type:i.Input}],itemSelector:[{type:i.Input}],options:[{type:i.Input}],events:[{type:i.Input}],resources:[{type:i.Input}],header:[{type:i.Input}],weekends:[{type:i.Input}],hiddenDays:[{type:i.Input}],fixedWeekCount:[{type:i.Input}],weekNumbers:[{type:i.Input}],businessHours:[{type:i.Input}],height:[{type:i.Input}],contentHeight:[{type:i.Input}],aspectRatio:[{type:i.Input}],eventLimit:[{type:i.Input}],defaultDate:[{type:i.Input}],editable:[{type:i.Input}],droppable:[{type:i.Input}],eventStartEditable:[{type:i.Input}],eventDurationEditable:[{type:i.Input}],defaultView:[{type:i.Input}],allDaySlot:[{type:i.Input}],allDayText:[{type:i.Input}],slotDuration:[{type:i.Input}],slotLabelInterval:[{type:i.Input}],snapDuration:[{type:i.Input}],scrollTime:[{type:i.Input}],minTime:[{type:i.Input}],maxTime:[{type:i.Input}],slotEventOverlap:[{type:i.Input}],nowIndicator:[{type:i.Input}],dragRevertDuration:[{type:i.Input}],dragOpacity:[{type:i.Input}],dragScroll:[{type:i.Input}],eventOverlap:[{type:i.Input}],eventConstraint:[{type:i.Input}],locale:[{type:i.Input}],timeZone:[{type:i.Input}],eventTimeFormat:[{type:i.Input}],dayRender:[{type:i.Input}],navLinks:[{type:i.Input}],titleFormat:[{type:i.Input}],titleRangeSeparator:[{type:i.Input}],defaultRangeSeparator:[{type:i.Input}],dir:[{type:i.Input}],defaultTimedEventDuration:[{type:i.Input}],defaultAllDayEventDuration:[{type:i.Input}],showNonCurrentDates:[{type:i.Input}],columnHeaderFormat:[{type:i.Input}],slotLabelFormat:[{type:i.Input}],columnHeaderText:[{type:i.Input}],nextDayThreshold:[{type:i.Input}],eventOrder:[{type:i.Input}],rerenderDelay:[{type:i.Input}],progressiveEventRendering:[{type:i.Input}],eventResizableFromStart:[{type:i.Input}],eventDragMinDistance:[{type:i.Input}],allDayMaintainDuration:[{type:i.Input}],listDayFormat:[{type:i.Input}],listDayAltFormat:[{type:i.Input}],onDateClick:[{type:i.Output}],onDrop:[{type:i.Output}],onEventClick:[{type:i.Output}],onEventMouseEnter:[{type:i.Output}],onEventMouseLeave:[{type:i.Output}],onEventDragStart:[{type:i.Output}],onEventDragStop:[{type:i.Output}],onEventDrop:[{type:i.Output}],onEventReceive:[{type:i.Output}],onEventResizeStart:[{type:i.Output}],onEventResizeStop:[{type:i.Output}],onEventResize:[{type:i.Output}],onDatesRender:[{type:i.Output}],onDatesDestroy:[{type:i.Output}],onViewSkeletonRender:[{type:i.Output}],onViewSkeletonDestroy:[{type:i.Output}],onNavLinkDayClick:[{type:i.Output}],onNavLinkWeekClick:[{type:i.Output}],onEventRender:[{type:i.Output}],onEventDestroy:[{type:i.Output}],onEventPositioned:[{type:i.Output}],onDayRender:[{type:i.Output}],onSelect:[{type:i.Output}],onUnselect:[{type:i.Output}],onResourceRender:[{type:i.Output}]},t}(),a=function(){function t(){}return t.decorators=[{type:i.NgModule,args:[{declarations:[r],imports:[],exports:[r]}]}],t}();t.NgxFullCalendarModule=a,t.FullCalendarComponent=r,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-fullcalendar.umd.min.js.map