/*! FullCalendar Core Package v4.4.1 Docs & License: https://fullcalendar.io/ (c) 2019 Adam Shaw */ !function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global=global||self).FullCalendar={})}(this,(function(exports){"use strict";var elementPropHash={className:!0,colSpan:!0,rowSpan:!0},containerTagHash={"=rect.left&&point.left=rect.top&&point.top");document.body.appendChild(outerEl);var innerEl,res=outerEl.firstChild.getBoundingClientRect().left>outerEl.getBoundingClientRect().left;return removeElement(outerEl),res}function sanitizeScrollbarWidth(width){return width=Math.max(0,width),width=Math.round(width)}function computeEdges(el,getPadding){void 0===getPadding&&(getPadding=!1);var computedStyle=window.getComputedStyle(el),borderLeft=parseInt(computedStyle.borderLeftWidth,10)||0,borderRight=parseInt(computedStyle.borderRightWidth,10)||0,borderTop=parseInt(computedStyle.borderTopWidth,10)||0,borderBottom=parseInt(computedStyle.borderBottomWidth,10)||0,scrollbarLeftRight=sanitizeScrollbarWidth(el.offsetWidth-el.clientWidth-borderLeft-borderRight),scrollbarBottom,res={borderLeft:borderLeft,borderRight:borderRight,borderTop:borderTop,borderBottom:borderBottom,scrollbarBottom:sanitizeScrollbarWidth(el.offsetHeight-el.clientHeight-borderTop-borderBottom),scrollbarLeft:0,scrollbarRight:0};return getIsRtlScrollbarOnLeft()&&"rtl"===computedStyle.direction?res.scrollbarLeft=scrollbarLeftRight:res.scrollbarRight=scrollbarLeftRight,getPadding&&(res.paddingLeft=parseInt(computedStyle.paddingLeft,10)||0,res.paddingRight=parseInt(computedStyle.paddingRight,10)||0,res.paddingTop=parseInt(computedStyle.paddingTop,10)||0,res.paddingBottom=parseInt(computedStyle.paddingBottom,10)||0),res}function computeInnerRect(el,goWithinPadding){void 0===goWithinPadding&&(goWithinPadding=!1);var outerRect=computeRect(el),edges=computeEdges(el,goWithinPadding),res={left:outerRect.left+edges.borderLeft+edges.scrollbarLeft,right:outerRect.right-edges.borderRight-edges.scrollbarRight,top:outerRect.top+edges.borderTop,bottom:outerRect.bottom-edges.borderBottom-edges.scrollbarBottom};return goWithinPadding&&(res.left+=edges.paddingLeft,res.right-=edges.paddingRight,res.top+=edges.paddingTop,res.bottom-=edges.paddingBottom),res}function computeRect(el){var rect=el.getBoundingClientRect();return{left:rect.left+window.pageXOffset,top:rect.top+window.pageYOffset,right:rect.right+window.pageXOffset,bottom:rect.bottom+window.pageYOffset}}function computeViewportRect(){return{left:window.pageXOffset,right:window.pageXOffset+document.documentElement.clientWidth,top:window.pageYOffset,bottom:window.pageYOffset+document.documentElement.clientHeight}}function computeHeightAndMargins(el){return el.getBoundingClientRect().height+computeVMargins(el)}function computeVMargins(el){var computed=window.getComputedStyle(el);return parseInt(computed.marginTop,10)+parseInt(computed.marginBottom,10)}function getClippingParents(el){for(var parents=[];el instanceof HTMLElement;){var computedStyle=window.getComputedStyle(el);if("fixed"===computedStyle.position)break;/(auto|scroll)/.test(computedStyle.overflow+computedStyle.overflowY+computedStyle.overflowX)&&parents.push(el),el=el.parentNode}return parents}function computeClippingRect(el){return getClippingParents(el).map((function(el){return computeInnerRect(el)})).concat(computeViewportRect()).reduce((function(rect0,rect1){return intersectRects(rect0,rect1)||rect1}))}function preventDefault(ev){ev.preventDefault()}function listenBySelector(container,eventType,selector,handler){function realHandler(ev){var matchedChild=elementClosest(ev.target,selector);matchedChild&&handler.call(matchedChild,ev,matchedChild)}return container.addEventListener(eventType,realHandler),function(){container.removeEventListener(eventType,realHandler)}}function listenToHoverBySelector(container,selector,onMouseEnter,onMouseLeave){var currentMatchedChild;return listenBySelector(container,"mouseover",selector,(function(ev,matchedChild){if(matchedChild!==currentMatchedChild){currentMatchedChild=matchedChild,onMouseEnter(ev,matchedChild);var realOnMouseLeave_1=function(ev){currentMatchedChild=null,onMouseLeave(ev,matchedChild),matchedChild.removeEventListener("mouseleave",realOnMouseLeave_1)};matchedChild.addEventListener("mouseleave",realOnMouseLeave_1)}}))}var transitionEventNames=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function whenTransitionDone(el,callback){var realCallback=function(ev){callback(ev),transitionEventNames.forEach((function(eventName){el.removeEventListener(eventName,realCallback)}))};transitionEventNames.forEach((function(eventName){el.addEventListener(eventName,realCallback)}))}var DAY_IDS=["sun","mon","tue","wed","thu","fri","sat"];function addWeeks(m,n){var a=dateToUtcArray(m);return a[2]+=7*n,arrayToUtcDate(a)}function addDays(m,n){var a=dateToUtcArray(m);return a[2]+=n,arrayToUtcDate(a)}function addMs(m,n){var a=dateToUtcArray(m);return a[6]+=n,arrayToUtcDate(a)}function diffWeeks(m0,m1){return diffDays(m0,m1)/7}function diffDays(m0,m1){return(m1.valueOf()-m0.valueOf())/864e5}function diffHours(m0,m1){return(m1.valueOf()-m0.valueOf())/36e5}function diffMinutes(m0,m1){return(m1.valueOf()-m0.valueOf())/6e4}function diffSeconds(m0,m1){return(m1.valueOf()-m0.valueOf())/1e3}function diffDayAndTime(m0,m1){var m0day=startOfDay(m0),m1day=startOfDay(m1);return{years:0,months:0,days:Math.round(diffDays(m0day,m1day)),milliseconds:m1.valueOf()-m1day.valueOf()-(m0.valueOf()-m0day.valueOf())}}function diffWholeWeeks(m0,m1){var d=diffWholeDays(m0,m1);return null!==d&&d%7==0?d/7:null}function diffWholeDays(m0,m1){return timeAsMs(m0)===timeAsMs(m1)?Math.round(diffDays(m0,m1)):null}function startOfDay(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()])}function startOfHour(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate(),m.getUTCHours()])}function startOfMinute(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate(),m.getUTCHours(),m.getUTCMinutes()])}function startOfSecond(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate(),m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds()])}function weekOfYear(marker,dow,doy){var y=marker.getUTCFullYear(),w=weekOfGivenYear(marker,y,dow,doy);if(w<1)return weekOfGivenYear(marker,y-1,dow,doy);var nextW=weekOfGivenYear(marker,y+1,dow,doy);return nextW>=1?Math.min(w,nextW):w}function weekOfGivenYear(marker,year,dow,doy){var firstWeekStart=arrayToUtcDate([year,0,1+firstWeekOffset(year,dow,doy)]),dayStart=startOfDay(marker),days=Math.round(diffDays(firstWeekStart,dayStart));return Math.floor(days/7)+1}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy,fwdlw;return-((7+arrayToUtcDate([year,0,fwd]).getUTCDay()-dow)%7)+fwd-1}function dateToLocalArray(date){return[date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds()]}function arrayToLocalDate(a){return new Date(a[0],a[1]||0,null==a[2]?1:a[2],a[3]||0,a[4]||0,a[5]||0)}function dateToUtcArray(date){return[date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds(),date.getUTCMilliseconds()]}function arrayToUtcDate(a){return 1===a.length&&(a=a.concat([0])),new Date(Date.UTC.apply(Date,a))}function isValidDate(m){return!isNaN(m.valueOf())}function timeAsMs(m){return 1e3*m.getUTCHours()*60*60+1e3*m.getUTCMinutes()*60+1e3*m.getUTCSeconds()+m.getUTCMilliseconds()}var INTERNAL_UNITS=["years","months","days","milliseconds"],PARSE_RE=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function createDuration(input,unit){var _a;return"string"==typeof input?parseString(input):"object"==typeof input&&input?normalizeObject(input):"number"==typeof input?normalizeObject(((_a={})[unit||"milliseconds"]=input,_a)):null}function parseString(s){var m=PARSE_RE.exec(s);if(m){var sign=m[1]?-1:1;return{years:0,months:0,days:sign*(m[2]?parseInt(m[2],10):0),milliseconds:sign*(60*(m[3]?parseInt(m[3],10):0)*60*1e3+60*(m[4]?parseInt(m[4],10):0)*1e3+1e3*(m[5]?parseInt(m[5],10):0)+(m[6]?parseInt(m[6],10):0))}}return null}function normalizeObject(obj){return{years:obj.years||obj.year||0,months:obj.months||obj.month||0,days:(obj.days||obj.day||0)+7*getWeeksFromInput(obj),milliseconds:60*(obj.hours||obj.hour||0)*60*1e3+60*(obj.minutes||obj.minute||0)*1e3+1e3*(obj.seconds||obj.second||0)+(obj.milliseconds||obj.millisecond||obj.ms||0)}}function getWeeksFromInput(obj){return obj.weeks||obj.week||0}function durationsEqual(d0,d1){return d0.years===d1.years&&d0.months===d1.months&&d0.days===d1.days&&d0.milliseconds===d1.milliseconds}function isSingleDay(dur){return 0===dur.years&&0===dur.months&&1===dur.days&&0===dur.milliseconds}function addDurations(d0,d1){return{years:d0.years+d1.years,months:d0.months+d1.months,days:d0.days+d1.days,milliseconds:d0.milliseconds+d1.milliseconds}}function subtractDurations(d1,d0){return{years:d1.years-d0.years,months:d1.months-d0.months,days:d1.days-d0.days,milliseconds:d1.milliseconds-d0.milliseconds}}function multiplyDuration(d,n){return{years:d.years*n,months:d.months*n,days:d.days*n,milliseconds:d.milliseconds*n}}function asRoughYears(dur){return asRoughDays(dur)/365}function asRoughMonths(dur){return asRoughDays(dur)/30}function asRoughDays(dur){return asRoughMs(dur)/864e5}function asRoughMinutes(dur){return asRoughMs(dur)/6e4}function asRoughSeconds(dur){return asRoughMs(dur)/1e3}function asRoughMs(dur){return 31536e6*dur.years+2592e6*dur.months+864e5*dur.days+dur.milliseconds}function wholeDivideDurations(numerator,denominator){for(var res=null,i=0;imaxInnerWidth&&(maxInnerWidth=innerWidth_1)}})),maxInnerWidth++,els.forEach((function(el){el.style.width=maxInnerWidth+"px"})),maxInnerWidth}function subtractInnerElHeight(outerEl,innerEl){var reflowStyleProps={position:"relative",left:-1};applyStyle(outerEl,reflowStyleProps),applyStyle(innerEl,reflowStyleProps);var diff=outerEl.getBoundingClientRect().height-innerEl.getBoundingClientRect().height,resetStyleProps={position:"",left:""};return applyStyle(outerEl,resetStyleProps),applyStyle(innerEl,resetStyleProps),diff}function preventSelection(el){el.classList.add("fc-unselectable"),el.addEventListener("selectstart",preventDefault)}function allowSelection(el){el.classList.remove("fc-unselectable"),el.removeEventListener("selectstart",preventDefault)}function preventContextMenu(el){el.addEventListener("contextmenu",preventDefault)}function allowContextMenu(el){el.removeEventListener("contextmenu",preventDefault)}function parseFieldSpecs(input){var specs=[],tokens=[],i,token;for("string"==typeof input?tokens=input.split(/\s*,\s*/):"function"==typeof input?tokens=[input]:Array.isArray(input)&&(tokens=input),i=0;i=asRoughMs(nextDayThreshold)&&(endDay=addDays(endDay,1))}return timedRange.start&&(startDay=startOfDay(timedRange.start),endDay&&endDay<=startDay&&(endDay=addDays(startDay,1))),{start:startDay,end:endDay}}function isMultiDayRange(range){var visibleRange=computeVisibleDayRange(range);return diffDays(visibleRange.start,visibleRange.end)>1}function diffDates(date0,date1,dateEnv,largeUnit){return"year"===largeUnit?createDuration(dateEnv.diffWholeYears(date0,date1),"year"):"month"===largeUnit?createDuration(dateEnv.diffWholeMonths(date0,date1),"month"):diffDayAndTime(date0,date1)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i=0;j--)if("object"==typeof(val=propObjs[j][name])&&val)complexObjs.unshift(val);else if(void 0!==val){dest[name]=val;break}complexObjs.length&&(dest[name]=mergeProps(complexObjs))}for(i=propObjs.length-1;i>=0;i--)for(name in props=propObjs[i])name in dest||(dest[name]=props[name]);return dest}function filterHash(hash,func){var filtered={};for(var key in hash)func(hash[key],key)&&(filtered[key]=hash[key]);return filtered}function mapHash(hash,func){var newHash={};for(var key in hash)newHash[key]=func(hash[key],key);return newHash}function arrayToHash(a){for(var hash={},_i=0,a_1=a;_istart&&invertedRanges.push({start:start,end:dateRange.start}),dateRange.end>start&&(start=dateRange.end);return startrange1.start)&&(null===range0.start||null===range1.end||range0.start=outerRange.start)&&(null===outerRange.end||null!==innerRange.end&&innerRange.end<=outerRange.end)}function rangeContainsMarker(range,date){return(null===range.start||date>=range.start)&&(null===range.end||date=range.end?new Date(range.end.valueOf()-1):date}function removeExact(array,exactVal){for(var removeCnt=0,i=0;i1)||"numeric"!==standardDateProps.year&&"2-digit"!==standardDateProps.year||"numeric"!==standardDateProps.month&&"2-digit"!==standardDateProps.month||"numeric"!==standardDateProps.day&&"2-digit"!==standardDateProps.day||(biggestUnitForPartial=1);var full0=this.format(start,context),full1=this.format(end,context);if(full0===full1)return full0;var partialDateProps,partialFormattingFunc=buildFormattingFunc(computePartialFormattingOptions(standardDateProps,biggestUnitForPartial),extendedSettings,context),partial0=partialFormattingFunc(start),partial1=partialFormattingFunc(end),insertion=findCommonInsertion(full0,partial0,full1,partial1),separator=extendedSettings.separator||"";return insertion?insertion.before+partial0+separator+partial1+insertion.after:full0+separator+full1},NativeFormatter.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";default:return"day"}},NativeFormatter}();function buildFormattingFunc(standardDateProps,extendedSettings,context){var standardDatePropCnt=Object.keys(standardDateProps).length;return 1===standardDatePropCnt&&"short"===standardDateProps.timeZoneName?function(date){return formatTimeZoneOffset(date.timeZoneOffset)}:0===standardDatePropCnt&&extendedSettings.week?function(date){return formatWeekNumber(context.computeWeekNumber(date.marker),context.weekLabel,context.locale,extendedSettings.week)}:buildNativeFormattingFunc(standardDateProps,extendedSettings,context)}function buildNativeFormattingFunc(standardDateProps,extendedSettings,context){standardDateProps=__assign({},standardDateProps),extendedSettings=__assign({},extendedSettings),sanitizeSettings(standardDateProps,extendedSettings),standardDateProps.timeZone="UTC";var normalFormat=new Intl.DateTimeFormat(context.locale.codes,standardDateProps),zeroFormat;if(extendedSettings.omitZeroMinute){var zeroProps=__assign({},standardDateProps);delete zeroProps.minute,zeroFormat=new Intl.DateTimeFormat(context.locale.codes,zeroProps)}return function(date){var marker=date.marker,format,s;return postProcess((format=zeroFormat&&!marker.getUTCMinutes()?zeroFormat:normalFormat).format(marker),date,standardDateProps,extendedSettings,context)}}function sanitizeSettings(standardDateProps,extendedSettings){standardDateProps.timeZoneName&&(standardDateProps.hour||(standardDateProps.hour="2-digit"),standardDateProps.minute||(standardDateProps.minute="2-digit")),"long"===standardDateProps.timeZoneName&&(standardDateProps.timeZoneName="short"),extendedSettings.omitZeroMinute&&(standardDateProps.second||standardDateProps.millisecond)&&delete extendedSettings.omitZeroMinute}function postProcess(s,date,standardDateProps,extendedSettings,context){return s=s.replace(LTR_RE,""),"short"===standardDateProps.timeZoneName&&(s=injectTzoStr(s,"UTC"===context.timeZone||null==date.timeZoneOffset?"UTC":formatTimeZoneOffset(date.timeZoneOffset))),extendedSettings.omitCommas&&(s=s.replace(COMMA_RE,"").trim()),extendedSettings.omitZeroMinute&&(s=s.replace(":00","")),!1===extendedSettings.meridiem?s=s.replace(MERIDIEM_RE,"").trim():"narrow"===extendedSettings.meridiem?s=s.replace(MERIDIEM_RE,(function(m0,m1){return m1.toLocaleLowerCase()})):"short"===extendedSettings.meridiem?s=s.replace(MERIDIEM_RE,(function(m0,m1){return m1.toLocaleLowerCase()+"m"})):"lowercase"===extendedSettings.meridiem&&(s=s.replace(MERIDIEM_RE,(function(m0){return m0.toLocaleLowerCase()}))),s=(s=s.replace(MULTI_SPACE_RE," ")).trim()}function injectTzoStr(s,tzoStr){var replaced=!1;return s=s.replace(UTC_RE,(function(){return replaced=!0,tzoStr})),replaced||(s+=" "+tzoStr),s}function formatWeekNumber(num,weekLabel,locale,display){var parts=[];return"narrow"===display?parts.push(weekLabel):"short"===display&&parts.push(weekLabel," "),parts.push(locale.simpleNumberFormat.format(num)),locale.options.isRtl&&parts.reverse(),parts.join("")}function computeMarkerDiffSeverity(d0,d1,ca){return ca.getMarkerYear(d0)!==ca.getMarkerYear(d1)?5:ca.getMarkerMonth(d0)!==ca.getMarkerMonth(d1)?4:ca.getMarkerDay(d0)!==ca.getMarkerDay(d1)?2:timeAsMs(d0)!==timeAsMs(d1)?1:0}function computePartialFormattingOptions(options,biggestUnit){var partialOptions={};for(var name_2 in options)name_2 in STANDARD_DATE_PROP_SEVERITIES&&!(STANDARD_DATE_PROP_SEVERITIES[name_2]<=biggestUnit)||(partialOptions[name_2]=options[name_2]);return partialOptions}function findCommonInsertion(full0,partial0,full1,partial1){for(var i0=0;i010&&(null==timeZoneOffset?s=s.replace("Z",""):0!==timeZoneOffset&&(s=s.replace("Z",formatTimeZoneOffset(timeZoneOffset,!0)))),s}function formatIsoTimeString(marker){return padStart(marker.getUTCHours(),2)+":"+padStart(marker.getUTCMinutes(),2)+":"+padStart(marker.getUTCSeconds(),2)}function formatTimeZoneOffset(minutes,doIso){void 0===doIso&&(doIso=!1);var sign=minutes<0?"-":"+",abs=Math.abs(minutes),hours=Math.floor(abs/60),mins=Math.round(abs%60);return doIso?sign+padStart(hours,2)+":"+padStart(mins,2):"GMT"+sign+hours+(mins?":"+padStart(mins,2):"")}function createVerboseFormattingArg(start,end,context,separator){var startInfo=expandZonedMarker(start,context.calendarSystem),endInfo;return{date:startInfo,start:startInfo,end:end?expandZonedMarker(end,context.calendarSystem):null,timeZone:context.timeZone,localeCodes:context.locale.codes,separator:separator}}function expandZonedMarker(dateInfo,calendarSystem){var a=calendarSystem.markerToArray(dateInfo.marker);return{marker:dateInfo.marker,timeZoneOffset:dateInfo.timeZoneOffset,array:a,year:a[0],month:a[1],day:a[2],hour:a[3],minute:a[4],second:a[5],millisecond:a[6]}}var EventSourceApi=function(){function EventSourceApi(calendar,internalEventSource){this.calendar=calendar,this.internalEventSource=internalEventSource}return EventSourceApi.prototype.remove=function(){this.calendar.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},EventSourceApi.prototype.refetch=function(){this.calendar.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(EventSourceApi.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(EventSourceApi.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!0,configurable:!0}),EventSourceApi}(),EventApi=function(){function EventApi(calendar,def,instance){this._calendar=calendar,this._def=def,this._instance=instance||null}return EventApi.prototype.setProp=function(name,val){var _a,_b;if(name in DATE_PROPS);else if(name in NON_DATE_PROPS)"function"==typeof NON_DATE_PROPS[name]&&(val=NON_DATE_PROPS[name](val)),this.mutate({standardProps:(_a={},_a[name]=val,_a)});else if(name in UNSCOPED_EVENT_UI_PROPS){var ui=void 0;"function"==typeof UNSCOPED_EVENT_UI_PROPS[name]&&(val=UNSCOPED_EVENT_UI_PROPS[name](val)),"color"===name?ui={backgroundColor:val,borderColor:val}:"editable"===name?ui={startEditable:val,durationEditable:val}:((_b={})[name]=val,ui=_b),this.mutate({standardProps:{ui:ui}})}},EventApi.prototype.setExtendedProp=function(name,val){var _a;this.mutate({extendedProps:(_a={},_a[name]=val,_a)})},EventApi.prototype.setStart=function(startInput,options){void 0===options&&(options={});var dateEnv=this._calendar.dateEnv,start=dateEnv.createMarker(startInput);if(start&&this._instance){var instanceRange,startDelta=diffDates(this._instance.range.start,start,dateEnv,options.granularity);options.maintainDuration?this.mutate({datesDelta:startDelta}):this.mutate({startDelta:startDelta})}},EventApi.prototype.setEnd=function(endInput,options){void 0===options&&(options={});var dateEnv=this._calendar.dateEnv,end;if((null==endInput||(end=dateEnv.createMarker(endInput)))&&this._instance)if(end){var endDelta=diffDates(this._instance.range.end,end,dateEnv,options.granularity);this.mutate({endDelta:endDelta})}else this.mutate({standardProps:{hasEnd:!1}})},EventApi.prototype.setDates=function(startInput,endInput,options){void 0===options&&(options={});var dateEnv=this._calendar.dateEnv,standardProps={allDay:options.allDay},start=dateEnv.createMarker(startInput),end;if(start&&(null==endInput||(end=dateEnv.createMarker(endInput)))&&this._instance){var instanceRange=this._instance.range;!0===options.allDay&&(instanceRange=computeAlignedDayRange(instanceRange));var startDelta=diffDates(instanceRange.start,start,dateEnv,options.granularity);if(end){var endDelta=diffDates(instanceRange.end,end,dateEnv,options.granularity);durationsEqual(startDelta,endDelta)?this.mutate({datesDelta:startDelta,standardProps:standardProps}):this.mutate({startDelta:startDelta,endDelta:endDelta,standardProps:standardProps})}else standardProps.hasEnd=!1,this.mutate({datesDelta:startDelta,standardProps:standardProps})}},EventApi.prototype.moveStart=function(deltaInput){var delta=createDuration(deltaInput);delta&&this.mutate({startDelta:delta})},EventApi.prototype.moveEnd=function(deltaInput){var delta=createDuration(deltaInput);delta&&this.mutate({endDelta:delta})},EventApi.prototype.moveDates=function(deltaInput){var delta=createDuration(deltaInput);delta&&this.mutate({datesDelta:delta})},EventApi.prototype.setAllDay=function(allDay,options){void 0===options&&(options={});var standardProps={allDay:allDay},maintainDuration=options.maintainDuration;null==maintainDuration&&(maintainDuration=this._calendar.opt("allDayMaintainDuration")),this._def.allDay!==allDay&&(standardProps.hasEnd=maintainDuration),this.mutate({standardProps:standardProps})},EventApi.prototype.formatRange=function(formatInput){var dateEnv=this._calendar.dateEnv,instance=this._instance,formatter=createFormatter(formatInput,this._calendar.opt("defaultRangeSeparator"));return this._def.hasEnd?dateEnv.formatRange(instance.range.start,instance.range.end,formatter,{forcedStartTzo:instance.forcedStartTzo,forcedEndTzo:instance.forcedEndTzo}):dateEnv.format(instance.range.start,formatter,{forcedTzo:instance.forcedStartTzo})},EventApi.prototype.mutate=function(mutation){var def=this._def,instance=this._instance;if(instance){this._calendar.dispatch({type:"MUTATE_EVENTS",instanceId:instance.instanceId,mutation:mutation,fromApi:!0});var eventStore=this._calendar.state.eventStore;this._def=eventStore.defs[def.defId],this._instance=eventStore.instances[instance.instanceId]}},EventApi.prototype.remove=function(){this._calendar.dispatch({type:"REMOVE_EVENT_DEF",defId:this._def.defId})},Object.defineProperty(EventApi.prototype,"source",{get:function(){var sourceId=this._def.sourceId;return sourceId?new EventSourceApi(this._calendar,this._calendar.state.eventSources[sourceId]):null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"start",{get:function(){return this._instance?this._calendar.dateEnv.toDate(this._instance.range.start):null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._calendar.dateEnv.toDate(this._instance.range.end):null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"id",{get:function(){return this._def.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"title",{get:function(){return this._def.title},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"url",{get:function(){return this._def.url},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"rendering",{get:function(){return this._def.rendering},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!0,configurable:!0}),EventApi}();function sliceEventStore(eventStore,eventUiBases,framingRange,nextDayThreshold){var inverseBgByGroupId={},inverseBgByDefId={},defByGroupId={},bgRanges=[],fgRanges=[],eventUis=compileEventUis(eventStore.defs,eventUiBases);for(var defId in eventStore.defs){var def;"inverse-background"===(def=eventStore.defs[defId]).rendering&&(def.groupId?(inverseBgByGroupId[def.groupId]=[],defByGroupId[def.groupId]||(defByGroupId[def.groupId]=def)):inverseBgByDefId[defId]=[])}for(var instanceId in eventStore.instances){var instance=eventStore.instances[instanceId],def,ui=eventUis[(def=eventStore.defs[instance.defId]).defId],origRange=instance.range,normalRange=!def.allDay&&nextDayThreshold?computeVisibleDayRange(origRange,nextDayThreshold):origRange,slicedRange=intersectRanges(normalRange,framingRange);slicedRange&&("inverse-background"===def.rendering?def.groupId?inverseBgByGroupId[def.groupId].push(slicedRange):inverseBgByDefId[instance.defId].push(slicedRange):("background"===def.rendering?bgRanges:fgRanges).push({def:def,ui:ui,instance:instance,range:slicedRange,isStart:normalRange.start&&normalRange.start.valueOf()===slicedRange.start.valueOf(),isEnd:normalRange.end&&normalRange.end.valueOf()===slicedRange.end.valueOf()}))}for(var groupId in inverseBgByGroupId)for(var ranges,invertedRanges,_i=0,invertedRanges_1=invertedRanges=invertRanges(ranges=inverseBgByGroupId[groupId],framingRange);_i/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function cssToStr(cssProps){var statements=[];for(var name_1 in cssProps){var val=cssProps[name_1];null!=val&&""!==val&&statements.push(name_1+":"+val)}return statements.join(";")}function attrsToStr(attrs){var parts=[];for(var name_2 in attrs){var val=attrs[name_2];null!=val&&parts.push(name_2+'="'+htmlEscape(val)+'"')}return parts.join(" ")}function parseClassName(raw){return Array.isArray(raw)?raw:"string"==typeof raw?raw.split(/\s+/):[]}var UNSCOPED_EVENT_UI_PROPS={editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:null,overlap:null,allow:null,className:parseClassName,classNames:parseClassName,color:String,backgroundColor:String,borderColor:String,textColor:String};function processUnscopedUiProps(rawProps,calendar,leftovers){var props=refineProps(rawProps,UNSCOPED_EVENT_UI_PROPS,{},leftovers),constraint=normalizeConstraint(props.constraint,calendar);return{startEditable:null!=props.startEditable?props.startEditable:props.editable,durationEditable:null!=props.durationEditable?props.durationEditable:props.editable,constraints:null!=constraint?[constraint]:[],overlap:props.overlap,allows:null!=props.allow?[props.allow]:[],backgroundColor:props.backgroundColor||props.color,borderColor:props.borderColor||props.color,textColor:props.textColor,classNames:props.classNames.concat(props.className)}}function processScopedUiProps(prefix,rawScoped,calendar,leftovers){var rawUnscoped={},wasFound={};for(var key in UNSCOPED_EVENT_UI_PROPS){var scopedKey=prefix+capitaliseFirstLetter(key);rawUnscoped[key]=rawScoped[scopedKey],wasFound[scopedKey]=!0}if("event"===prefix&&(rawUnscoped.editable=rawScoped.editable),leftovers)for(var key in rawScoped)wasFound[key]||(leftovers[key]=rawScoped[key]);return processUnscopedUiProps(rawUnscoped,calendar)}var EMPTY_EVENT_UI={startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function combineEventUis(uis){return uis.reduce(combineTwoEventUis,EMPTY_EVENT_UI)}function combineTwoEventUis(item0,item1){return{startEditable:null!=item1.startEditable?item1.startEditable:item0.startEditable,durationEditable:null!=item1.durationEditable?item1.durationEditable:item0.durationEditable,constraints:item0.constraints.concat(item1.constraints),overlap:"boolean"==typeof item1.overlap?item1.overlap:item0.overlap,allows:item0.allows.concat(item1.allows),backgroundColor:item1.backgroundColor||item0.backgroundColor,borderColor:item1.borderColor||item0.borderColor,textColor:item1.textColor||item0.textColor,classNames:item0.classNames.concat(item1.classNames)}}var NON_DATE_PROPS={id:String,groupId:String,title:String,url:String,rendering:String,extendedProps:null},DATE_PROPS={start:null,date:null,end:null,allDay:null},uid=0;function parseEvent(raw,sourceId,calendar,allowOpenRange){var allDayDefault=computeIsAllDayDefault(sourceId,calendar),leftovers0={},recurringRes=parseRecurring(raw,allDayDefault,calendar.dateEnv,calendar.pluginSystem.hooks.recurringTypes,leftovers0),def;if(recurringRes)return(def=parseEventDef(leftovers0,sourceId,recurringRes.allDay,Boolean(recurringRes.duration),calendar)).recurringDef={typeId:recurringRes.typeId,typeData:recurringRes.typeData,duration:recurringRes.duration},{def:def,instance:null};var leftovers1={},singleRes=parseSingle(raw,allDayDefault,calendar,leftovers1,allowOpenRange),def,instance;return singleRes?{def:def=parseEventDef(leftovers1,sourceId,singleRes.allDay,singleRes.hasEnd,calendar),instance:createEventInstance(def.defId,singleRes.range,singleRes.forcedStartTzo,singleRes.forcedEndTzo)}:null}function parseEventDef(raw,sourceId,allDay,hasEnd,calendar){var leftovers={},def=pluckNonDateProps(raw,calendar,leftovers);def.defId=String(uid++),def.sourceId=sourceId,def.allDay=allDay,def.hasEnd=hasEnd;for(var _i=0,_a=calendar.pluginSystem.hooks.eventDefParsers;_i<_a.length;_i++){var eventDefParser,newLeftovers={};(0,_a[_i])(def,leftovers,newLeftovers),leftovers=newLeftovers}return def.extendedProps=__assign(leftovers,def.extendedProps||{}),Object.freeze(def.ui.classNames),Object.freeze(def.extendedProps),def}function createEventInstance(defId,range,forcedStartTzo,forcedEndTzo){return{instanceId:String(uid++),defId:defId,range:range,forcedStartTzo:null==forcedStartTzo?null:forcedStartTzo,forcedEndTzo:null==forcedEndTzo?null:forcedEndTzo}}function parseSingle(raw,allDayDefault,calendar,leftovers,allowOpenRange){var props=pluckDateProps(raw,leftovers),allDay=props.allDay,startMeta,startMarker=null,hasEnd=!1,endMeta,endMarker=null;if(startMeta=calendar.dateEnv.createMarkerMeta(props.start))startMarker=startMeta.marker;else if(!allowOpenRange)return null;return null!=props.end&&(endMeta=calendar.dateEnv.createMarkerMeta(props.end)),null==allDay&&(allDay=null!=allDayDefault?allDayDefault:(!startMeta||startMeta.isTimeUnspecified)&&(!endMeta||endMeta.isTimeUnspecified)),allDay&&startMarker&&(startMarker=startOfDay(startMarker)),endMeta&&(endMarker=endMeta.marker,allDay&&(endMarker=startOfDay(endMarker)),startMarker&&endMarker<=startMarker&&(endMarker=null)),endMarker?hasEnd=!0:allowOpenRange||(hasEnd=calendar.opt("forceEventDuration")||!1,endMarker=calendar.dateEnv.add(startMarker,allDay?calendar.defaultAllDayEventDuration:calendar.defaultTimedEventDuration)),{allDay:allDay,hasEnd:hasEnd,range:{start:startMarker,end:endMarker},forcedStartTzo:startMeta?startMeta.forcedTzo:null,forcedEndTzo:endMeta?endMeta.forcedTzo:null}}function pluckDateProps(raw,leftovers){var props=refineProps(raw,DATE_PROPS,{},leftovers);return props.start=null!==props.start?props.start:props.date,delete props.date,props}function pluckNonDateProps(raw,calendar,leftovers){var preLeftovers={},props=refineProps(raw,NON_DATE_PROPS,{},preLeftovers),ui=processUnscopedUiProps(preLeftovers,calendar,leftovers);return props.publicId=props.id,delete props.id,props.ui=ui,props}function computeIsAllDayDefault(sourceId,calendar){var res=null,source;sourceId&&(res=calendar.state.eventSources[sourceId].allDayDefault);return null==res&&(res=calendar.opt("allDayDefault")),res}var DEF_DEFAULTS={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],rendering:"inverse-background",classNames:"fc-nonbusiness",groupId:"_businessHours"};function parseBusinessHours(input,calendar){return parseEvents(refineInputs(input),"",calendar)}function refineInputs(input){var rawDefs;return rawDefs=(rawDefs=!0===input?[{}]:Array.isArray(input)?input.filter((function(rawDef){return rawDef.daysOfWeek})):"object"==typeof input&&input?[input]:[]).map((function(rawDef){return __assign({},DEF_DEFAULTS,rawDef)}))}function memoizeRendering(renderFunc,unrenderFunc,dependencies){void 0===dependencies&&(dependencies=[]);var dependents=[],thisContext,prevArgs;function unrender(){if(prevArgs){for(var _i=0,dependents_1=dependents;_i'+innerHtml+"":""+innerHtml+""}function getAllDayHtml(allOptions){return allOptions.allDayHtml||htmlEscape(allOptions.allDayText)}function getDayClasses(date,dateProfile,context,noThemeHighlight){var calendar=context.calendar,options=context.options,theme=context.theme,dateEnv=context.dateEnv,classes=[],todayStart,todayEnd;return rangeContainsMarker(dateProfile.activeRange,date)?(classes.push("fc-"+DAY_IDS[date.getUTCDay()]),options.monthMode&&dateEnv.getMonth(date)!==dateEnv.getMonth(dateProfile.currentRange.start)&&classes.push("fc-other-month"),todayEnd=addDays(todayStart=startOfDay(calendar.getNow()),1),date=todayEnd?classes.push("fc-future"):(classes.push("fc-today"),!0!==noThemeHighlight&&classes.push(theme.getClass("today")))):classes.push("fc-disabled-day"),classes}function unpromisify(func,success,failure){var isResolved=!1,wrappedSuccess=function(){isResolved||(isResolved=!0,success.apply(this,arguments))},wrappedFailure=function(){isResolved||(isResolved=!0,failure&&failure.apply(this,arguments))},res=func(wrappedSuccess,wrappedFailure);res&&"function"==typeof res.then&&res.then(wrappedSuccess,wrappedFailure)}var Mixin=function(){function Mixin(){}return Mixin.mixInto=function(destClass){this.mixIntoObj(destClass.prototype)},Mixin.mixIntoObj=function(destObj){var _this=this;Object.getOwnPropertyNames(this.prototype).forEach((function(name){destObj[name]||(destObj[name]=_this.prototype[name])}))},Mixin.mixOver=function(destClass){var _this=this;Object.getOwnPropertyNames(this.prototype).forEach((function(name){destClass.prototype[name]=_this.prototype[name]}))},Mixin}(),EmitterMixin=function(_super){function EmitterMixin(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EmitterMixin,_super),EmitterMixin.prototype.on=function(type,handler){return addToHash(this._handlers||(this._handlers={}),type,handler),this},EmitterMixin.prototype.one=function(type,handler){return addToHash(this._oneHandlers||(this._oneHandlers={}),type,handler),this},EmitterMixin.prototype.off=function(type,handler){return this._handlers&&removeFromHash(this._handlers,type,handler),this._oneHandlers&&removeFromHash(this._oneHandlers,type,handler),this},EmitterMixin.prototype.trigger=function(type){for(var args=[],_i=1;_i=lefts[i]&&leftPosition=tops[i]&&topPosition0},ScrollController.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},ScrollController.prototype.canScrollUp=function(){return this.getScrollTop()>0},ScrollController.prototype.canScrollDown=function(){return this.getScrollTop()0},ScrollController.prototype.canScrollRight=function(){return this.getScrollLeft()=200&&xhr.status<400)try{var res=JSON.parse(xhr.responseText);successCallback(res,xhr)}catch(err){failureCallback("Failure parsing JSON",xhr)}else failureCallback("Request failed",xhr)},xhr.onerror=function(){failureCallback("Request failed",xhr)},xhr.send(body)}function injectQueryStringParams(url,params){return url+(-1===url.indexOf("?")?"?":"&")+encodeParams(params)}function encodeParams(params){var parts=[];for(var key in params)parts.push(encodeURIComponent(key)+"="+encodeURIComponent(params[key]));return parts.join("&")}var eventSourceDef$2,JsonFeedEventSourcePlugin=createPlugin({eventSourceDefs:[{parseMeta:function(raw){if("string"==typeof raw)raw={url:raw};else if(!raw||"object"!=typeof raw||!raw.url)return null;return{url:raw.url,method:(raw.method||"GET").toUpperCase(),extraParams:raw.extraParams,startParam:raw.startParam,endParam:raw.endParam,timeZoneParam:raw.timeZoneParam}},fetch:function(arg,success,failure){var meta=arg.eventSource.meta,requestParams=buildRequestParams(meta,arg.range,arg.calendar);requestJson(meta.method,meta.url,requestParams,(function(rawEvents,xhr){success({rawEvents:rawEvents,xhr:xhr})}),(function(errorMessage,xhr){failure({message:errorMessage,xhr:xhr})}))}}]});function buildRequestParams(meta,range,calendar){var dateEnv=calendar.dateEnv,startParam,endParam,timeZoneParam,customRequestParams,params={};return null==(startParam=meta.startParam)&&(startParam=calendar.opt("startParam")),null==(endParam=meta.endParam)&&(endParam=calendar.opt("endParam")),null==(timeZoneParam=meta.timeZoneParam)&&(timeZoneParam=calendar.opt("timeZoneParam")),customRequestParams="function"==typeof meta.extraParams?meta.extraParams():meta.extraParams||{},__assign(params,customRequestParams),params[startParam]=dateEnv.formatIso(range.start),params[endParam]=dateEnv.formatIso(range.end),"local"!==dateEnv.timeZone&&(params[timeZoneParam]=dateEnv.timeZone),params}var recurring,SimpleRecurrencePlugin=createPlugin({recurringTypes:[{parse:function(rawEvent,leftoverProps,dateEnv){var createMarker=dateEnv.createMarker.bind(dateEnv),processors,props=refineProps(rawEvent,{daysOfWeek:null,startTime:createDuration,endTime:createDuration,startRecur:createMarker,endRecur:createMarker},{},leftoverProps),anyValid=!1;for(var propName in props)if(null!=props[propName]){anyValid=!0;break}if(anyValid){var duration=null;return"duration"in leftoverProps&&(duration=createDuration(leftoverProps.duration),delete leftoverProps.duration),!duration&&props.startTime&&props.endTime&&(duration=subtractDurations(props.endTime,props.startTime)),{allDayGuess:Boolean(!props.startTime&&!props.endTime),duration:duration,typeData:props}}return null},expand:function(typeData,framingRange,dateEnv){var clippedFramingRange=intersectRanges(framingRange,{start:typeData.startRecur,end:typeData.endRecur});return clippedFramingRange?expandRanges(typeData.daysOfWeek,typeData.startTime,clippedFramingRange,dateEnv):[]}}]});function expandRanges(daysOfWeek,startTime,framingRange,dateEnv){for(var dowHash=daysOfWeek?arrayToHash(daysOfWeek):null,dayMarker=startOfDay(framingRange.start),endMarker=framingRange.end,instanceStarts=[];dayMarker0?explicitRawLocales[0].code:"en",globalArray=window.FullCalendarLocalesAll||[],globalObject=window.FullCalendarLocales||{},allRawLocales=globalArray.concat(hashValuesToArray(globalObject),explicitRawLocales),rawLocaleMap={en:RAW_EN_LOCALE},_i=0,allRawLocales_1=allRawLocales;_i0;j--){var simpleId=parts.slice(0,j).join("-");if(available[simpleId])return available[simpleId]}return null}function parseLocale(codeArg,codes,raw){var merged=mergeProps([RAW_EN_LOCALE,raw],["buttonText"]);delete merged.code;var week=merged.week;return delete merged.week,{codeArg:codeArg,codes:codes,week:week,simpleNumberFormat:new Intl.NumberFormat(codeArg),options:merged}}var OptionsManager=function(){function OptionsManager(overrides){this.overrides=__assign({},overrides),this.dynamicOverrides={},this.compute()}return OptionsManager.prototype.mutate=function(updates,removals,isDynamic){if(Object.keys(updates).length||removals.length){var overrideHash=isDynamic?this.dynamicOverrides:this.overrides;__assign(overrideHash,updates);for(var _i=0,removals_1=removals;_i=0;i--){var def,meta=defs[i].parseMeta(raw);if(meta){var res=parseEventSourceProps("object"==typeof raw?raw:{},meta,i,calendar);return res._raw=raw,res}}return null}function parseEventSourceProps(raw,meta,sourceDefId,calendar){var leftovers0={},props=refineProps(raw,SIMPLE_SOURCE_PROPS,{},leftovers0),leftovers1={},ui=processUnscopedUiProps(leftovers0,calendar,leftovers1);return props.isFetching=!1,props.latestFetchId="",props.fetchRange=null,props.publicId=String(raw.id||""),props.sourceId=String(uid$2++),props.sourceDefId=sourceDefId,props.meta=meta,props.ui=ui,props.extendedProps=leftovers1,props}function reduceEventSources(eventSources,action,dateProfile,calendar){switch(action.type){case"ADD_EVENT_SOURCES":return addSources(eventSources,action.sources,dateProfile?dateProfile.activeRange:null,calendar);case"REMOVE_EVENT_SOURCE":return removeSource(eventSources,action.sourceId);case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return dateProfile?fetchDirtySources(eventSources,dateProfile.activeRange,calendar):eventSources;case"FETCH_EVENT_SOURCES":case"CHANGE_TIMEZONE":return fetchSourcesByIds(eventSources,action.sourceIds?arrayToHash(action.sourceIds):excludeStaticSources(eventSources,calendar),dateProfile?dateProfile.activeRange:null,calendar);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return receiveResponse(eventSources,action.sourceId,action.fetchId,action.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return eventSources}}var uid$3=0;function addSources(eventSourceHash,sources,fetchRange,calendar){for(var hash={},_i=0,sources_1=sources;_ieventSource.fetchRange.end:!eventSource.latestFetchId}function fetchSourcesByIds(prevSources,sourceIdHash,fetchRange,calendar){var nextSources={};for(var sourceId in prevSources){var source=prevSources[sourceId];sourceIdHash[sourceId]?nextSources[sourceId]=fetchSource(source,fetchRange,calendar):nextSources[sourceId]=source}return nextSources}function fetchSource(eventSource,fetchRange,calendar){var sourceDef=calendar.pluginSystem.hooks.eventSourceDefs[eventSource.sourceDefId],fetchId=String(uid$3++);return sourceDef.fetch({eventSource:eventSource,calendar:calendar,range:fetchRange},(function(res){var rawEvents=res.rawEvents,calSuccess=calendar.opt("eventSourceSuccess"),calSuccessRes,sourceSuccessRes;eventSource.success&&(sourceSuccessRes=eventSource.success(rawEvents,res.xhr)),calSuccess&&(calSuccessRes=calSuccess(rawEvents,res.xhr)),rawEvents=sourceSuccessRes||calSuccessRes||rawEvents,calendar.dispatch({type:"RECEIVE_EVENTS",sourceId:eventSource.sourceId,fetchId:fetchId,fetchRange:fetchRange,rawEvents:rawEvents})}),(function(error){var callFailure=calendar.opt("eventSourceFailure");console.warn(error.message,error),eventSource.failure&&eventSource.failure(error),callFailure&&callFailure(error),calendar.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:eventSource.sourceId,fetchId:fetchId,fetchRange:fetchRange,error:error})})),__assign({},eventSource,{isFetching:!0,latestFetchId:fetchId})}function receiveResponse(sourceHash,sourceId,fetchId,fetchRange){var _a,eventSource=sourceHash[sourceId];return eventSource&&fetchId===eventSource.latestFetchId?__assign({},sourceHash,((_a={})[sourceId]=__assign({},eventSource,{isFetching:!1,fetchRange:fetchRange}),_a)):sourceHash}function excludeStaticSources(eventSources,calendar){return filterHash(eventSources,(function(eventSource){return doesSourceNeedRange(eventSource,calendar)}))}var DateProfileGenerator=function(){function DateProfileGenerator(viewSpec,calendar){this.viewSpec=viewSpec,this.options=viewSpec.options,this.dateEnv=calendar.dateEnv,this.calendar=calendar,this.initHiddenDays()}return DateProfileGenerator.prototype.buildPrev=function(currentDateProfile,currentDate){var dateEnv=this.dateEnv,prevDate=dateEnv.subtract(dateEnv.startOf(currentDate,currentDateProfile.currentRangeUnit),currentDateProfile.dateIncrement);return this.build(prevDate,-1)},DateProfileGenerator.prototype.buildNext=function(currentDateProfile,currentDate){var dateEnv=this.dateEnv,nextDate=dateEnv.add(dateEnv.startOf(currentDate,currentDateProfile.currentRangeUnit),currentDateProfile.dateIncrement);return this.build(nextDate,1)},DateProfileGenerator.prototype.build=function(currentDate,direction,forceToValid){var validRange;void 0===forceToValid&&(forceToValid=!1);var minTime=null,maxTime=null,currentInfo,isRangeAllDay,renderRange,activeRange,isValid;return validRange=this.buildValidRange(),validRange=this.trimHiddenDays(validRange),forceToValid&&(currentDate=constrainMarkerToRange(currentDate,validRange)),currentInfo=this.buildCurrentRangeInfo(currentDate,direction),isRangeAllDay=/^(year|month|week|day)$/.test(currentInfo.unit),renderRange=this.buildRenderRange(this.trimHiddenDays(currentInfo.range),currentInfo.unit,isRangeAllDay),activeRange=renderRange=this.trimHiddenDays(renderRange),this.options.showNonCurrentDates||(activeRange=intersectRanges(activeRange,currentInfo.range)),minTime=createDuration(this.options.minTime),maxTime=createDuration(this.options.maxTime),activeRange=intersectRanges(activeRange=this.adjustActiveRange(activeRange,minTime,maxTime),validRange),isValid=rangesIntersect(currentInfo.range,validRange),{validRange:validRange,currentRange:currentInfo.range,currentRangeUnit:currentInfo.unit,isRangeAllDay:isRangeAllDay,activeRange:activeRange,renderRange:renderRange,minTime:minTime,maxTime:maxTime,isValid:isValid,dateIncrement:this.buildDateIncrement(currentInfo.duration)}},DateProfileGenerator.prototype.buildValidRange=function(){return this.getRangeOption("validRange",this.calendar.getNow())||{start:null,end:null}},DateProfileGenerator.prototype.buildCurrentRangeInfo=function(date,direction){var _a=this,viewSpec=_a.viewSpec,dateEnv=_a.dateEnv,duration=null,unit=null,range=null,dayCount;return viewSpec.duration?(duration=viewSpec.duration,unit=viewSpec.durationUnit,range=this.buildRangeFromDuration(date,direction,duration,unit)):(dayCount=this.options.dayCount)?(unit="day",range=this.buildRangeFromDayCount(date,direction,dayCount)):(range=this.buildCustomVisibleRange(date))?unit=dateEnv.greatestWholeUnit(range.start,range.end).unit:(unit=greatestDurationDenominator(duration=this.getFallbackDuration()).unit,range=this.buildRangeFromDuration(date,direction,duration,unit)),{duration:duration,unit:unit,range:range}},DateProfileGenerator.prototype.getFallbackDuration=function(){return createDuration({day:1})},DateProfileGenerator.prototype.adjustActiveRange=function(range,minTime,maxTime){var dateEnv=this.dateEnv,start=range.start,end=range.end;return this.viewSpec.class.prototype.usesMinMaxTime&&(asRoughDays(minTime)<0&&(start=startOfDay(start),start=dateEnv.add(start,minTime)),asRoughDays(maxTime)>1&&(end=addDays(end=startOfDay(end),-1),end=dateEnv.add(end,maxTime))),{start:start,end:end}},DateProfileGenerator.prototype.buildRangeFromDuration=function(date,direction,duration,unit){var dateEnv=this.dateEnv,alignment=this.options.dateAlignment,dateIncrementInput,dateIncrementDuration,start,end,res;function computeRes(){start=dateEnv.startOf(date,alignment),end=dateEnv.add(start,duration),res={start:start,end:end}}return alignment||((dateIncrementInput=this.options.dateIncrement)?(dateIncrementDuration=createDuration(dateIncrementInput),alignment=asRoughMs(dateIncrementDuration) ")),isOnlyButtons=!1):((customButtonProps=calendarCustomButtons[buttonName])?(buttonClick=function(ev){customButtonProps.click&&customButtonProps.click.call(buttonEl,ev)},(buttonIcon=theme.getCustomButtonIconClass(customButtonProps))||(buttonIcon=theme.getIconClass(buttonName))||(buttonText=customButtonProps.text)):(viewSpec=viewSpecs[buttonName])?(_this.viewsWithButtons.push(buttonName),buttonClick=function(){calendar.changeView(buttonName)},(buttonText=viewSpec.buttonTextOverride)||(buttonIcon=theme.getIconClass(buttonName))||(buttonText=viewSpec.buttonTextDefault)):calendar[buttonName]&&(buttonClick=function(){calendar[buttonName]()},(buttonText=calendarButtonTextOverrides[buttonName])||(buttonIcon=theme.getIconClass(buttonName))||(buttonText=calendarButtonText[buttonName])),buttonClick&&(buttonClasses=["fc-"+buttonName+"-button",theme.getClass("button")],buttonText?(buttonInnerHtml=htmlEscape(buttonText),buttonAriaAttr=""):buttonIcon&&(buttonInnerHtml="",buttonAriaAttr=' aria-label="'+buttonName+'"'),(buttonEl=htmlToElement('")).addEventListener("click",buttonClick),groupChildren.push(buttonEl)))})),groupChildren.length>1){groupEl=document.createElement("div");var buttonGroupClassName=theme.getClass("buttonGroup");isOnlyButtons&&buttonGroupClassName&&groupEl.classList.add(buttonGroupClassName),appendToElement(groupEl,groupChildren),sectionEl.appendChild(groupEl)}else appendToElement(sectionEl,groupChildren)})),sectionEl},Toolbar.prototype.updateToday=function(isTodayEnabled){this.toggleButtonEnabled("today",isTodayEnabled)},Toolbar.prototype.updatePrev=function(isPrevEnabled){this.toggleButtonEnabled("prev",isPrevEnabled)},Toolbar.prototype.updateNext=function(isNextEnabled){this.toggleButtonEnabled("next",isNextEnabled)},Toolbar.prototype.updateTitle=function(text){findElements(this.el,"h2").forEach((function(titleEl){titleEl.innerText=text}))},Toolbar.prototype.updateActiveButton=function(buttonName){var theme,className=this.context.theme.getClass("buttonActive");findElements(this.el,"button").forEach((function(buttonEl){buttonName&&buttonEl.classList.contains("fc-"+buttonName+"-button")?buttonEl.classList.add(className):buttonEl.classList.remove(className)}))},Toolbar.prototype.toggleButtonEnabled=function(buttonName,bool){findElements(this.el,".fc-"+buttonName+"-button").forEach((function(buttonEl){buttonEl.disabled=!bool}))},Toolbar}(Component),CalendarComponent=function(_super){function CalendarComponent(el){var _this=_super.call(this)||this;return _this.elClassNames=[],_this.renderSkeleton=memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton),_this.renderToolbars=memoizeRendering(_this._renderToolbars,_this._unrenderToolbars,[_this.renderSkeleton]),_this.buildComponentContext=memoize(buildComponentContext),_this.buildViewPropTransformers=memoize(buildViewPropTransformers),_this.el=el,_this.computeTitle=memoize(computeTitle),_this.parseBusinessHours=memoize((function(input){return parseBusinessHours(input,_this.context.calendar)})),_this}return __extends(CalendarComponent,_super),CalendarComponent.prototype.render=function(props,context){this.freezeHeight();var title=this.computeTitle(props.dateProfile,props.viewSpec.options);this.renderSkeleton(context),this.renderToolbars(props.viewSpec,props.dateProfile,props.currentDate,title),this.renderView(props,title),this.updateSize(),this.thawHeight()},CalendarComponent.prototype.destroy=function(){this.header&&this.header.destroy(),this.footer&&this.footer.destroy(),this.renderSkeleton.unrender(),_super.prototype.destroy.call(this)},CalendarComponent.prototype._renderSkeleton=function(context){this.updateElClassNames(context),prependToElement(this.el,this.contentEl=createElement("div",{className:"fc-view-container"}));for(var calendar=context.calendar,_i=0,_a=calendar.pluginSystem.hooks.viewContainerModifiers;_i<_a.length;_i++){var modifyViewContainer;(0,_a[_i])(this.contentEl,calendar)}},CalendarComponent.prototype._unrenderSkeleton=function(){this.view&&(this.savedScroll=this.view.queryScroll(),this.view.destroy(),this.view=null),removeElement(this.contentEl),this.removeElClassNames()},CalendarComponent.prototype.removeElClassNames=function(){for(var classList=this.el.classList,_i=0,_a=this.elClassNames;_i<_a.length;_i++){var className=_a[_i];classList.remove(className)}this.elClassNames=[]},CalendarComponent.prototype.updateElClassNames=function(context){this.removeElClassNames();var theme=context.theme,options=context.options;this.elClassNames=["fc","fc-"+options.dir,theme.getClass("widget")];for(var classList=this.el.classList,_i=0,_a=this.elClassNames;_i<_a.length;_i++){var className=_a[_i];classList.add(className)}},CalendarComponent.prototype._renderToolbars=function(viewSpec,dateProfile,currentDate,title){var _a=this,context=_a.context,header=_a.header,footer=_a.footer,options=context.options,calendar=context.calendar,headerLayout=options.header,footerLayout=options.footer,dateProfileGenerator=this.props.dateProfileGenerator,now=calendar.getNow(),todayInfo=dateProfileGenerator.build(now),prevInfo=dateProfileGenerator.buildPrev(dateProfile,currentDate),nextInfo=dateProfileGenerator.buildNext(dateProfile,currentDate),toolbarProps={title:title,activeButton:viewSpec.type,isTodayEnabled:todayInfo.isValid&&!rangeContainsMarker(dateProfile.currentRange,now),isPrevEnabled:prevInfo.isValid,isNextEnabled:nextInfo.isValid};headerLayout?(header||(header=this.header=new Toolbar("fc-header-toolbar"),prependToElement(this.el,header.el)),header.receiveProps(__assign({layout:headerLayout},toolbarProps),context)):header&&(header.destroy(),header=this.header=null),footerLayout?(footer||(footer=this.footer=new Toolbar("fc-footer-toolbar"),appendToElement(this.el,footer.el)),footer.receiveProps(__assign({layout:footerLayout},toolbarProps),context)):footer&&(footer.destroy(),footer=this.footer=null)},CalendarComponent.prototype._unrenderToolbars=function(){this.header&&(this.header.destroy(),this.header=null),this.footer&&(this.footer.destroy(),this.footer=null)},CalendarComponent.prototype.renderView=function(props,title){var view=this.view,_a=this.context,calendar=_a.calendar,options=_a.options,viewSpec=props.viewSpec,dateProfileGenerator=props.dateProfileGenerator;view&&view.viewSpec===viewSpec||(view&&view.destroy(),view=this.view=new viewSpec.class(viewSpec,this.contentEl),this.savedScroll&&(view.addScroll(this.savedScroll,!0),this.savedScroll=null)),view.title=title;for(var viewProps={dateProfileGenerator:dateProfileGenerator,dateProfile:props.dateProfile,businessHours:this.parseBusinessHours(viewSpec.options.businessHours),eventStore:props.eventStore,eventUiBases:props.eventUiBases,dateSelection:props.dateSelection,eventSelection:props.eventSelection,eventDrag:props.eventDrag,eventResize:props.eventResize},transformers,_i=0,transformers_1=this.buildViewPropTransformers(calendar.pluginSystem.hooks.viewPropsTransformers);_i1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}function buildComponentContext(context,viewSpec,view){return context.extend(viewSpec.options,view)}function buildViewPropTransformers(theClasses){return theClasses.map((function(theClass){return new theClass}))}var Interaction=function(){function Interaction(settings){this.component=settings.component}return Interaction.prototype.destroy=function(){},Interaction}();function parseInteractionSettings(component,input){return{component:component,el:input.el,useEventCenter:null==input.useEventCenter||input.useEventCenter}}function interactionSettingsToStore(settings){var _a;return(_a={})[settings.component.uid]=settings,_a}var interactionSettingsStore={},EventClicking=function(_super){function EventClicking(settings){var _this=_super.call(this,settings)||this;_this.handleSegClick=function(ev,segEl){var component=_this.component,_a=component.context,calendar=_a.calendar,view=_a.view,seg=getElSeg(segEl);if(seg&&component.isValidSegDownEl(ev.target)){var hasUrlContainer=elementClosest(ev.target,".fc-has-url"),url=hasUrlContainer?hasUrlContainer.querySelector("a[href]").href:"";calendar.publiclyTrigger("eventClick",[{el:segEl,event:new EventApi(component.context.calendar,seg.eventRange.def,seg.eventRange.instance),jsEvent:ev,view:view}]),url&&!ev.defaultPrevented&&(window.location.href=url)}};var component=settings.component;return _this.destroy=listenBySelector(component.el,"click",component.fgSegSelector+","+component.bgSegSelector,_this.handleSegClick),_this}return __extends(EventClicking,_super),EventClicking}(Interaction),EventHovering=function(_super){function EventHovering(settings){var _this=_super.call(this,settings)||this;_this.handleEventElRemove=function(el){el===_this.currentSegEl&&_this.handleSegLeave(null,_this.currentSegEl)},_this.handleSegEnter=function(ev,segEl){getElSeg(segEl)&&(segEl.classList.add("fc-allow-mouse-resize"),_this.currentSegEl=segEl,_this.triggerEvent("eventMouseEnter",ev,segEl))},_this.handleSegLeave=function(ev,segEl){_this.currentSegEl&&(segEl.classList.remove("fc-allow-mouse-resize"),_this.currentSegEl=null,_this.triggerEvent("eventMouseLeave",ev,segEl))};var component=settings.component;return _this.removeHoverListeners=listenToHoverBySelector(component.el,component.fgSegSelector+","+component.bgSegSelector,_this.handleSegEnter,_this.handleSegLeave),component.context.calendar.on("eventElRemove",_this.handleEventElRemove),_this}return __extends(EventHovering,_super),EventHovering.prototype.destroy=function(){this.removeHoverListeners(),this.component.context.calendar.off("eventElRemove",this.handleEventElRemove)},EventHovering.prototype.triggerEvent=function(publicEvName,ev,segEl){var component=this.component,_a=component.context,calendar=_a.calendar,view=_a.view,seg=getElSeg(segEl);ev&&!component.isValidSegDownEl(ev.target)||calendar.publiclyTrigger(publicEvName,[{el:segEl,event:new EventApi(calendar,seg.eventRange.def,seg.eventRange.instance),jsEvent:ev,view:view}])},EventHovering}(Interaction),StandardTheme=function(_super){function StandardTheme(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(StandardTheme,_super),StandardTheme}(Theme);StandardTheme.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},StandardTheme.prototype.baseIconClass="fc-icon",StandardTheme.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},StandardTheme.prototype.iconOverrideOption="buttonIcons",StandardTheme.prototype.iconOverrideCustomButtonOption="icon",StandardTheme.prototype.iconOverridePrefix="fc-icon-";var Calendar=function(){function Calendar(el,overrides){var _this=this;this.buildComponentContext=memoize(buildComponentContext$1),this.parseRawLocales=memoize(parseRawLocales),this.buildLocale=memoize(buildLocale),this.buildDateEnv=memoize(buildDateEnv),this.buildTheme=memoize(buildTheme),this.buildEventUiSingleBase=memoize(this._buildEventUiSingleBase),this.buildSelectionConfig=memoize(this._buildSelectionConfig),this.buildEventUiBySource=memoizeOutput(buildEventUiBySource,isPropsEqual),this.buildEventUiBases=memoize(buildEventUiBases),this.interactionsStore={},this.actionQueue=[],this.isReducing=!1,this.needsRerender=!1,this.isRendering=!1,this.renderingPauseDepth=0,this.buildDelayedRerender=memoize(buildDelayedRerender),this.afterSizingTriggers={},this.isViewUpdated=!1,this.isDatesUpdated=!1,this.isEventsUpdated=!1,this.el=el,this.optionsManager=new OptionsManager(overrides||{}),this.pluginSystem=new PluginSystem,this.addPluginInputs(this.optionsManager.computed.plugins||[]),this.handleOptions(this.optionsManager.computed),this.publiclyTrigger("_init"),this.hydrate(),this.calendarInteractions=this.pluginSystem.hooks.calendarInteractions.map((function(calendarInteractionClass){return new calendarInteractionClass(_this)}))}return Calendar.prototype.addPluginInputs=function(pluginInputs){for(var pluginDefs,_i=0,pluginDefs_1=refinePluginDefs(pluginInputs);_i"},FillRenderer.prototype.detachSegs=function(type,segs){var containerEls=this.containerElsByType[type];containerEls&&(containerEls.forEach(removeElement),delete this.containerElsByType[type])},FillRenderer.prototype.computeSizes=function(force){for(var type in this.segsByType)(force||this.dirtySizeFlags[type])&&this.computeSegSizes(this.segsByType[type])},FillRenderer.prototype.assignSizes=function(force){for(var type in this.segsByType)(force||this.dirtySizeFlags[type])&&this.assignSegSizes(this.segsByType[type]);this.dirtySizeFlags={}},FillRenderer.prototype.computeSegSizes=function(segs){},FillRenderer.prototype.assignSegSizes=function(segs){},FillRenderer}(),NamedTimeZoneImpl=function(){function NamedTimeZoneImpl(timeZoneName){this.timeZoneName=timeZoneName}return NamedTimeZoneImpl}(),ElementDragging=function(){function ElementDragging(el){this.emitter=new EmitterMixin}return ElementDragging.prototype.destroy=function(){},ElementDragging.prototype.setMirrorIsVisible=function(bool){},ElementDragging.prototype.setMirrorNeedsRevert=function(bool){},ElementDragging.prototype.setAutoScrollEnabled=function(bool){},ElementDragging}();function formatDate(dateInput,settings){void 0===settings&&(settings={});var dateEnv=buildDateEnv$1(settings),formatter=createFormatter(settings),dateMeta=dateEnv.createMarkerMeta(dateInput);return dateMeta?dateEnv.format(dateMeta.marker,formatter,{forcedTzo:dateMeta.forcedTzo}):""}function formatRange(startInput,endInput,settings){var dateEnv=buildDateEnv$1("object"==typeof settings&&settings?settings:{}),formatter=createFormatter(settings,globalDefaults.defaultRangeSeparator),startMeta=dateEnv.createMarkerMeta(startInput),endMeta=dateEnv.createMarkerMeta(endInput);return startMeta&&endMeta?dateEnv.formatRange(startMeta.marker,endMeta.marker,formatter,{forcedStartTzo:startMeta.forcedTzo,forcedEndTzo:endMeta.forcedTzo,isEndExclusive:settings.isEndExclusive}):""}function buildDateEnv$1(settings){var locale=buildLocale(settings.locale||"en",parseRawLocales([]).map);return settings=__assign({timeZone:globalDefaults.timeZone,calendarSystem:"gregory"},settings,{locale:locale}),new DateEnv(settings)}var DRAG_META_PROPS={startTime:createDuration,duration:createDuration,create:Boolean,sourceId:String},DRAG_META_DEFAULTS={create:!0};function parseDragMeta(raw){var leftoverProps={},refined=refineProps(raw,DRAG_META_PROPS,DRAG_META_DEFAULTS,leftoverProps);return refined.leftoverProps=leftoverProps,refined}function computeFallbackHeaderFormat(datesRepDistinctDays,dayCnt){return!datesRepDistinctDays||dayCnt>10?{weekday:"short"}:dayCnt>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"}}function renderDateCell(dateMarker,dateProfile,datesRepDistinctDays,colCnt,colHeadFormat,context,colspan,otherAttrs){var dateEnv=context.dateEnv,theme=context.theme,options=context.options,isDateValid=rangeContainsMarker(dateProfile.activeRange,dateMarker),classNames=["fc-day-header",theme.getClass("widgetHeader")],innerHtml;return innerHtml="function"==typeof options.columnHeaderHtml?options.columnHeaderHtml(dateEnv.toDate(dateMarker)):"function"==typeof options.columnHeaderText?htmlEscape(options.columnHeaderText(dateEnv.toDate(dateMarker))):htmlEscape(dateEnv.format(dateMarker,colHeadFormat)),datesRepDistinctDays?classNames=classNames.concat(getDayClasses(dateMarker,dateProfile,context,!0)):classNames.push("fc-"+DAY_IDS[dateMarker.getUTCDay()]),'1?' colspan="'+colspan+'"':"")+(otherAttrs?" "+otherAttrs:"")+">"+(isDateValid?buildGotoAnchorHtml(options,dateEnv,{date:dateMarker,forceOff:!datesRepDistinctDays||1===colCnt},innerHtml):innerHtml)+""}var DayHeader=function(_super){function DayHeader(parentEl){var _this=_super.call(this)||this;return _this.renderSkeleton=memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton),_this.parentEl=parentEl,_this}return __extends(DayHeader,_super),DayHeader.prototype.render=function(props,context){var dates=props.dates,datesRepDistinctDays=props.datesRepDistinctDays,parts=[];this.renderSkeleton(context),props.renderIntroHtml&&parts.push(props.renderIntroHtml());for(var colHeadFormat=createFormatter(context.options.columnHeaderFormat||computeFallbackHeaderFormat(datesRepDistinctDays,dates.length)),_i=0,dates_1=dates;_i"+parts.join("")+""},DayHeader.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender()},DayHeader.prototype._renderSkeleton=function(context){var theme=context.theme,parentEl=this.parentEl;parentEl.innerHTML="",parentEl.appendChild(this.el=htmlToElement('
')),this.thead=this.el.querySelector("thead")},DayHeader.prototype._unrenderSkeleton=function(){removeElement(this.el)},DayHeader}(Component),DaySeries=function(){function DaySeries(range,dateProfileGenerator){for(var date=range.start,end=range.end,indices=[],dates=[],dayIndex=-1;date=indices.length?indices[indices.length-1]+1:indices[dayOffset]},DaySeries}(),DayTable=function(){function DayTable(daySeries,breakOnWeeks){var dates=daySeries.dates,daysPerRow,firstDay,rowCnt;if(breakOnWeeks){for(firstDay=dates[0].getUTCDay(),daysPerRow=1;daysPerRow'+core.htmlEscape(timeText)+""),titleHtml=''+(core.htmlEscape(eventDef.title||"")||" ")+"",'
'+("rtl"===context.options.dir?titleHtml+" "+timeHtml:timeHtml+" "+titleHtml)+"
"+(isResizableFromStart?'
':"")+(isResizableFromEnd?'
':"")+"
"},SimpleDayGridEventRenderer.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"}},SimpleDayGridEventRenderer.prototype.computeDisplayEventEnd=function(){return!1},SimpleDayGridEventRenderer}(core.FgEventRenderer),DayGridEventRenderer=function(_super){function DayGridEventRenderer(dayGrid){var _this=_super.call(this)||this;return _this.dayGrid=dayGrid,_this}return __extends(DayGridEventRenderer,_super),DayGridEventRenderer.prototype.attachSegs=function(segs,mirrorInfo){var rowStructs=this.rowStructs=this.renderSegRows(segs);this.dayGrid.rowEls.forEach((function(rowNode,i){rowNode.querySelector(".fc-content-skeleton > table").appendChild(rowStructs[i].tbodyEl)})),mirrorInfo||this.dayGrid.removeSegPopover()},DayGridEventRenderer.prototype.detachSegs=function(){for(var rowStructs=this.rowStructs||[],rowStruct;rowStruct=rowStructs.pop();)core.removeElement(rowStruct.tbodyEl);this.rowStructs=null},DayGridEventRenderer.prototype.renderSegRows=function(segs){var rowStructs=[],segRows,row;for(segRows=this.groupSegRows(segs),row=0;row=seg.firstCol)return!0;return!1}function compareDaySegCols(a,b){return a.leftCol-b.leftCol}var DayGridMirrorRenderer=function(_super){function DayGridMirrorRenderer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DayGridMirrorRenderer,_super),DayGridMirrorRenderer.prototype.attachSegs=function(segs,mirrorInfo){var sourceSeg=mirrorInfo.sourceSeg,rowStructs=this.rowStructs=this.renderSegRows(segs);this.dayGrid.rowEls.forEach((function(rowNode,row){var skeletonEl=core.htmlToElement('
'),skeletonTopEl,skeletonTop;sourceSeg&&sourceSeg.row===row?skeletonTopEl=sourceSeg.el:(skeletonTopEl=rowNode.querySelector(".fc-content-skeleton tbody"))||(skeletonTopEl=rowNode.querySelector(".fc-content-skeleton table")),skeletonTop=skeletonTopEl.getBoundingClientRect().top-rowNode.getBoundingClientRect().top,skeletonEl.style.top=skeletonTop+"px",skeletonEl.querySelector("table").appendChild(rowStructs[row].tbodyEl),rowNode.appendChild(skeletonEl)}))},DayGridMirrorRenderer}(DayGridEventRenderer),EMPTY_CELL_HTML='',DayGridFillRenderer=function(_super){function DayGridFillRenderer(dayGrid){var _this=_super.call(this)||this;return _this.fillSegTag="td",_this.dayGrid=dayGrid,_this}return __extends(DayGridFillRenderer,_super),DayGridFillRenderer.prototype.renderSegs=function(type,context,segs){"bgEvent"===type&&(segs=segs.filter((function(seg){return seg.eventRange.def.allDay}))),_super.prototype.renderSegs.call(this,type,context,segs)},DayGridFillRenderer.prototype.attachSegs=function(type,segs){var els=[],i,seg,skeletonEl;for(i=0;i
')).getElementsByTagName("tr")[0],startCol>0&&core.appendToElement(trEl,new Array(startCol+1).join(EMPTY_CELL_HTML)),seg.el.colSpan=endCol-startCol,trEl.appendChild(seg.el),endCol'+core.htmlEscape(title)+'
',this.segContainerEl=this.el.querySelector(".fc-event-container")},DayTile.prototype.queryHit=function(positionLeft,positionTop,elWidth,elHeight){var date=this.props.date;if(positionLeft'),"rtl"===this.context.options.dir&&parts.reverse(),""+parts.join("")+""},DayBgRow}();function renderCellHtml(date,dateProfile,context,otherAttrs){var dateEnv=context.dateEnv,theme=context.theme,isDateValid=core.rangeContainsMarker(dateProfile.activeRange,date),classes=core.getDayClasses(date,dateProfile,context);return classes.unshift("fc-day",theme.getClass("widgetContent")),'"}var DAY_NUM_FORMAT=core.createFormatter({day:"numeric"}),WEEK_NUM_FORMAT=core.createFormatter({week:"numeric"}),DayGrid=function(_super){function DayGrid(el,renderProps){var _this=_super.call(this,el)||this;_this.bottomCoordPadding=0,_this.isCellSizesDirty=!1,_this.renderProps=renderProps;var eventRenderer=_this.eventRenderer=new DayGridEventRenderer(_this),fillRenderer=_this.fillRenderer=new DayGridFillRenderer(_this);_this.mirrorRenderer=new DayGridMirrorRenderer(_this);var renderCells=_this.renderCells=core.memoizeRendering(_this._renderCells,_this._unrenderCells);return _this.renderBusinessHours=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"businessHours"),fillRenderer.unrender.bind(fillRenderer,"businessHours"),[renderCells]),_this.renderDateSelection=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"highlight"),fillRenderer.unrender.bind(fillRenderer,"highlight"),[renderCells]),_this.renderBgEvents=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"bgEvent"),fillRenderer.unrender.bind(fillRenderer,"bgEvent"),[renderCells]),_this.renderFgEvents=core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer),eventRenderer.unrender.bind(eventRenderer),[renderCells]),_this.renderEventSelection=core.memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer),eventRenderer.unselectByInstanceId.bind(eventRenderer),[_this.renderFgEvents]),_this.renderEventDrag=core.memoizeRendering(_this._renderEventDrag,_this._unrenderEventDrag,[renderCells]),_this.renderEventResize=core.memoizeRendering(_this._renderEventResize,_this._unrenderEventResize,[renderCells]),_this}return __extends(DayGrid,_super),DayGrid.prototype.render=function(props,context){var cells=props.cells;this.rowCnt=cells.length,this.colCnt=cells[0].length,this.renderCells(cells,props.isRigid),this.renderBusinessHours(context,props.businessHourSegs),this.renderDateSelection(context,props.dateSelectionSegs),this.renderBgEvents(context,props.bgEventSegs),this.renderFgEvents(context,props.fgEventSegs),this.renderEventSelection(props.eventSelection),this.renderEventDrag(props.eventDrag),this.renderEventResize(props.eventResize),this.segPopoverTile&&this.updateSegPopoverTile()},DayGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderCells.unrender()},DayGrid.prototype.getCellRange=function(row,col){var start=this.props.cells[row][col].date,end;return{start:start,end:core.addDays(start,1)}},DayGrid.prototype.updateSegPopoverTile=function(date,segs){var ownProps=this.props;this.segPopoverTile.receiveProps({date:date||this.segPopoverTile.props.date,fgSegs:segs||this.segPopoverTile.props.fgSegs,eventSelection:ownProps.eventSelection,eventDragInstances:ownProps.eventDrag?ownProps.eventDrag.affectedInstances:null,eventResizeInstances:ownProps.eventResize?ownProps.eventResize.affectedInstances:null},this.context)},DayGrid.prototype._renderCells=function(cells,isRigid){var _a=this.context,calendar=_a.calendar,view=_a.view,isRtl=_a.isRtl,dateEnv=_a.dateEnv,_b=this,rowCnt=_b.rowCnt,colCnt=_b.colCnt,html="",row,col;for(row=0;row
'+bgRow.renderHtml({cells:this.props.cells[row],dateProfile:this.props.dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+'
'+(this.getIsNumbersVisible()?""+this.renderNumberTrHtml(row)+"":"")+"
"},DayGrid.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.renderProps.cellWeekNumbersVisible||this.renderProps.colWeekNumbersVisible},DayGrid.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},DayGrid.prototype.renderNumberTrHtml=function(row){var isRtl=this.context.isRtl,intro=this.renderProps.renderNumberIntroHtml(row,this);return""+(isRtl?"":intro)+this.renderNumberCellsHtml(row)+(isRtl?intro:"")+""},DayGrid.prototype.renderNumberCellsHtml=function(row){var htmls=[],col,date;for(col=0;col",this.renderProps.cellWeekNumbersVisible&&date.getUTCDay()===weekCalcFirstDow&&(html+=core.buildGotoAnchorHtml(options,dateEnv,{date:date,type:"week"},{class:"fc-week-number"},dateEnv.format(date,WEEK_NUM_FORMAT))),isDayNumberVisible&&(html+=core.buildGotoAnchorHtml(options,dateEnv,date,{class:"fc-day-number"},dateEnv.format(date,DAY_NUM_FORMAT))),html+=""):""},DayGrid.prototype.updateSize=function(isResize){var calendar=this.context.calendar,_a=this,fillRenderer=_a.fillRenderer,eventRenderer=_a.eventRenderer,mirrorRenderer=_a.mirrorRenderer;(isResize||this.isCellSizesDirty||calendar.isEventsUpdated)&&(this.buildPositionCaches(),this.isCellSizesDirty=!1),fillRenderer.computeSizes(isResize),eventRenderer.computeSizes(isResize),mirrorRenderer.computeSizes(isResize),fillRenderer.assignSizes(isResize),eventRenderer.assignSizes(isResize),mirrorRenderer.assignSizes(isResize)},DayGrid.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildRowPositions()},DayGrid.prototype.buildColPositions=function(){this.colPositions.build()},DayGrid.prototype.buildRowPositions=function(){this.rowPositions.build(),this.rowPositions.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},DayGrid.prototype.positionToHit=function(leftPosition,topPosition){var _a=this,colPositions=_a.colPositions,rowPositions=_a.rowPositions,col=colPositions.leftToIndex(leftPosition),row=rowPositions.topToIndex(topPosition);if(null!=row&&null!=col)return{row:row,col:col,dateSpan:{range:this.getCellRange(row,col),allDay:!0},dayEl:this.getCellEl(row,col),relativeRect:{left:colPositions.lefts[col],right:colPositions.rights[col],top:rowPositions.tops[row],bottom:rowPositions.bottoms[row]}}},DayGrid.prototype.getCellEl=function(row,col){return this.cellEls[row*this.colCnt+col]},DayGrid.prototype._renderEventDrag=function(state){state&&(this.eventRenderer.hideByHash(state.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,state.segs))},DayGrid.prototype._unrenderEventDrag=function(state){state&&(this.eventRenderer.showByHash(state.affectedInstances),this.fillRenderer.unrender("highlight",this.context))},DayGrid.prototype._renderEventResize=function(state){state&&(this.eventRenderer.hideByHash(state.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,state.segs),this.mirrorRenderer.renderSegs(this.context,state.segs,{isResizing:!0,sourceSeg:state.sourceSeg}))},DayGrid.prototype._unrenderEventResize=function(state){state&&(this.eventRenderer.showByHash(state.affectedInstances),this.fillRenderer.unrender("highlight",this.context),this.mirrorRenderer.unrender(this.context,state.segs,{isResizing:!0,sourceSeg:state.sourceSeg}))},DayGrid.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},DayGrid.prototype.limitRows=function(levelLimit){var rowStructs=this.eventRenderer.rowStructs||[],row,rowLevelLimit;for(row=0;rowrowBottom)return i;return!1},DayGrid.prototype.limitRow=function(row,levelLimit){var _this=this,colCnt=this.colCnt,isRtl=this.context.isRtl,rowStruct=this.eventRenderer.rowStructs[row],moreNodes=[],col=0,levelSegs,cellMatrix,limitedNodes,i,seg,segsBelow,totalSegsBelow,colSegsBelow,td,rowSpan,segMoreNodes,j,moreTd,moreWrap,moreLink,emptyCellsUntil=function(endCol){for(;col"+core.htmlEscape(options.weekLabel)+"":""},_this.renderDayGridNumberIntroHtml=function(row,dayGrid){var _a=_this.context,options=_a.options,dateEnv=_a.dateEnv,weekStart=dayGrid.props.cells[row][0].date;return _this.colWeekNumbersVisible?'"+core.buildGotoAnchorHtml(options,dateEnv,{date:weekStart,type:"week",forceOff:1===dayGrid.colCnt},dateEnv.format(weekStart,WEEK_NUM_FORMAT$1))+"":""},_this.renderDayGridBgIntroHtml=function(){var theme=_this.context.theme;return _this.colWeekNumbersVisible?'":""},_this.renderDayGridIntroHtml=function(){return _this.colWeekNumbersVisible?'":""},_this}return __extends(AbstractDayGridView,_super),AbstractDayGridView.prototype._processOptions=function(options){options.weekNumbers?options.weekNumbersWithinDays?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0):(this.colWeekNumbersVisible=!1,this.cellWeekNumbersVisible=!1)},AbstractDayGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context),this.processOptions(context.options),this.renderSkeleton(context)},AbstractDayGridView.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender()},AbstractDayGridView.prototype._renderSkeleton=function(context){this.el.classList.add("fc-dayGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new core.ScrollComponent("hidden","auto");var dayGridContainerEl=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(dayGridContainerEl),dayGridContainerEl.classList.add("fc-day-grid-container");var dayGridEl=core.createElement("div",{className:"fc-day-grid"});dayGridContainerEl.appendChild(dayGridEl),this.dayGrid=new DayGrid(dayGridEl,{renderNumberIntroHtml:this.renderDayGridNumberIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:this.colWeekNumbersVisible,cellWeekNumbersVisible:this.cellWeekNumbersVisible})},AbstractDayGridView.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-dayGrid-view"),this.dayGrid.destroy(),this.scroller.destroy()},AbstractDayGridView.prototype.renderSkeletonHtml=function(){var _a=this.context,theme=_a.theme,options=_a.options;return''+(options.columnHeader?'':"")+'
 
'},AbstractDayGridView.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},AbstractDayGridView.prototype.hasRigidRows=function(){var eventLimit=this.context.options.eventLimit;return eventLimit&&"number"!=typeof eventLimit},AbstractDayGridView.prototype.updateSize=function(isResize,viewHeight,isAuto){_super.prototype.updateSize.call(this,isResize,viewHeight,isAuto),this.dayGrid.updateSize(isResize)},AbstractDayGridView.prototype.updateBaseSize=function(isResize,viewHeight,isAuto){var dayGrid=this.dayGrid,eventLimit=this.context.options.eventLimit,headRowEl=this.header?this.header.el:null,scrollerHeight,scrollbarWidths;dayGrid.rowEls?(this.colWeekNumbersVisible&&(this.weekNumberWidth=core.matchCellWidths(core.findElements(this.el,".fc-week-number"))),this.scroller.clear(),headRowEl&&core.uncompensateScroll(headRowEl),dayGrid.removeSegPopover(),eventLimit&&"number"==typeof eventLimit&&dayGrid.limitRows(eventLimit),scrollerHeight=this.computeScrollerHeight(viewHeight),this.setGridHeight(scrollerHeight,isAuto),eventLimit&&"number"!=typeof eventLimit&&dayGrid.limitRows(eventLimit),isAuto||(this.scroller.setHeight(scrollerHeight),((scrollbarWidths=this.scroller.getScrollbarWidths()).left||scrollbarWidths.right)&&(headRowEl&&core.compensateScroll(headRowEl,scrollbarWidths),scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight)),this.scroller.lockOverflow(scrollbarWidths))):isAuto||(scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight))},AbstractDayGridView.prototype.computeScrollerHeight=function(viewHeight){return viewHeight-core.subtractInnerElHeight(this.el,this.scroller.el)},AbstractDayGridView.prototype.setGridHeight=function(height,isAuto){this.context.options.monthMode?(isAuto&&(height*=this.dayGrid.rowCnt/6),core.distributeHeight(this.dayGrid.rowEls,height,!isAuto)):isAuto?core.undistributeHeight(this.dayGrid.rowEls):core.distributeHeight(this.dayGrid.rowEls,height,!0)},AbstractDayGridView.prototype.computeDateScroll=function(duration){return{top:0}},AbstractDayGridView.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},AbstractDayGridView.prototype.applyDateScroll=function(scroll){void 0!==scroll.top&&this.scroller.setScrollTop(scroll.top)},AbstractDayGridView}(core.View);AbstractDayGridView.prototype.dateProfileGeneratorClass=DayGridDateProfileGenerator;var SimpleDayGrid=function(_super){function SimpleDayGrid(dayGrid){var _this=_super.call(this,dayGrid.el)||this;return _this.slicer=new DayGridSlicer,_this.dayGrid=dayGrid,_this}return __extends(SimpleDayGrid,_super),SimpleDayGrid.prototype.firstContext=function(context){context.calendar.registerInteractiveComponent(this,{el:this.dayGrid.el})},SimpleDayGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},SimpleDayGrid.prototype.render=function(props,context){var dayGrid=this.dayGrid,dateProfile=props.dateProfile,dayTable=props.dayTable;dayGrid.receiveContext(context),dayGrid.receiveProps(__assign({},this.slicer.sliceProps(props,dateProfile,props.nextDayThreshold,context.calendar,dayGrid,dayTable),{dateProfile:dateProfile,cells:dayTable.cells,isRigid:props.isRigid}),context)},SimpleDayGrid.prototype.buildPositionCaches=function(){this.dayGrid.buildPositionCaches()},SimpleDayGrid.prototype.queryHit=function(positionLeft,positionTop){var rawHit=this.dayGrid.positionToHit(positionLeft,positionTop);if(rawHit)return{component:this.dayGrid,dateSpan:rawHit.dateSpan,dayEl:rawHit.dayEl,rect:{left:rawHit.relativeRect.left,right:rawHit.relativeRect.right,top:rawHit.relativeRect.top,bottom:rawHit.relativeRect.bottom},layer:0}},SimpleDayGrid}(core.DateComponent),DayGridSlicer=function(_super){function DayGridSlicer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DayGridSlicer,_super),DayGridSlicer.prototype.sliceRange=function(dateRange,dayTable){return dayTable.sliceRange(dateRange)},DayGridSlicer}(core.Slicer),DayGridView=function(_super){function DayGridView(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.buildDayTable=core.memoize(buildDayTable),_this}return __extends(DayGridView,_super),DayGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context);var dateProfile=this.props.dateProfile,dayTable=this.dayTable=this.buildDayTable(dateProfile,props.dateProfileGenerator);this.header&&this.header.receiveProps({dateProfile:dateProfile,dates:dayTable.headerDates,datesRepDistinctDays:1===dayTable.rowCnt,renderIntroHtml:this.renderHeadIntroHtml},context),this.simpleDayGrid.receiveProps({dateProfile:dateProfile,dayTable:dayTable,businessHours:props.businessHours,dateSelection:props.dateSelection,eventStore:props.eventStore,eventUiBases:props.eventUiBases,eventSelection:props.eventSelection,eventDrag:props.eventDrag,eventResize:props.eventResize,isRigid:this.hasRigidRows(),nextDayThreshold:this.context.nextDayThreshold},context)},DayGridView.prototype._renderSkeleton=function(context){_super.prototype._renderSkeleton.call(this,context),context.options.columnHeader&&(this.header=new core.DayHeader(this.el.querySelector(".fc-head-container"))),this.simpleDayGrid=new SimpleDayGrid(this.dayGrid)},DayGridView.prototype._unrenderSkeleton=function(){_super.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleDayGrid.destroy()},DayGridView}(AbstractDayGridView);function buildDayTable(dateProfile,dateProfileGenerator){var daySeries=new core.DaySeries(dateProfile.renderRange,dateProfileGenerator);return new core.DayTable(daySeries,/year|month|week/.test(dateProfile.currentRangeUnit))}var main=core.createPlugin({defaultView:"dayGridMonth",views:{dayGrid:DayGridView,dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});exports.AbstractDayGridView=AbstractDayGridView,exports.DayBgRow=DayBgRow,exports.DayGrid=DayGrid,exports.DayGridSlicer=DayGridSlicer,exports.DayGridView=DayGridView,exports.SimpleDayGrid=SimpleDayGrid,exports.buildBasicDayTable=buildDayTable,exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})), /*! FullCalendar Google Calendar Plugin v4.4.0 Docs & License: https://fullcalendar.io/ (c) 2019 Adam Shaw */ function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],factory):factory((global=global||self).FullCalendarGoogleCalendar={},global.FullCalendar)}(this,(function(exports,core){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i0&&(this.everMovedDown=!0),xDelta<0?this.everMovedLeft=!0:xDelta>0&&(this.everMovedRight=!0),this.pointerScreenX=pointerScreenX,this.pointerScreenY=pointerScreenY,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(getTime()))}},AutoScroller.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var _i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache;_a[_i].destroy()}this.scrollCaches=null}},AutoScroller.prototype.requestAnimation=function(now){this.msSinceRequest=now,requestAnimationFrame(this.animate)},AutoScroller.prototype.handleSide=function(edge,seconds){var scrollCache=edge.scrollCache,edgeThreshold=this.edgeThreshold,invDistance=edgeThreshold-edge.distance,velocity=invDistance*invDistance/(edgeThreshold*edgeThreshold)*this.maxVelocity*seconds,sign=1;switch(edge.name){case"left":sign=-1;case"right":scrollCache.setScrollLeft(scrollCache.getScrollLeft()+velocity*sign);break;case"top":sign=-1;case"bottom":scrollCache.setScrollTop(scrollCache.getScrollTop()+velocity*sign)}},AutoScroller.prototype.computeBestEdge=function(left,top){for(var edgeThreshold=this.edgeThreshold,bestSide=null,_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i],rect=scrollCache.clientRect,leftDist=left-rect.left,rightDist=rect.right-left,topDist=top-rect.top,bottomDist=rect.bottom-top;leftDist>=0&&rightDist>=0&&topDist>=0&&bottomDist>=0&&(topDist<=edgeThreshold&&this.everMovedUp&&scrollCache.canScrollUp()&&(!bestSide||bestSide.distance>topDist)&&(bestSide={scrollCache:scrollCache,name:"top",distance:topDist}),bottomDist<=edgeThreshold&&this.everMovedDown&&scrollCache.canScrollDown()&&(!bestSide||bestSide.distance>bottomDist)&&(bestSide={scrollCache:scrollCache,name:"bottom",distance:bottomDist}),leftDist<=edgeThreshold&&this.everMovedLeft&&scrollCache.canScrollLeft()&&(!bestSide||bestSide.distance>leftDist)&&(bestSide={scrollCache:scrollCache,name:"left",distance:leftDist}),rightDist<=edgeThreshold&&this.everMovedRight&&scrollCache.canScrollRight()&&(!bestSide||bestSide.distance>rightDist)&&(bestSide={scrollCache:scrollCache,name:"right",distance:rightDist}))}return bestSide},AutoScroller.prototype.buildCaches=function(){return this.queryScrollEls().map((function(el){return el===window?new WindowScrollGeomCache(!1):new ElementScrollGeomCache(el,!1)}))},AutoScroller.prototype.queryScrollEls=function(){for(var els=[],_i=0,_a=this.scrollQuery;_i<_a.length;_i++){var query=_a[_i];"object"==typeof query?els.push(query):els.push.apply(els,Array.prototype.slice.call(document.querySelectorAll(query)))}return els},AutoScroller}(),FeaturefulElementDragging=function(_super){function FeaturefulElementDragging(containerEl){var _this=_super.call(this,containerEl)||this;_this.delay=null,_this.minDistance=0,_this.touchScrollAllowed=!0,_this.mirrorNeedsRevert=!1,_this.isInteracting=!1,_this.isDragging=!1,_this.isDelayEnded=!1,_this.isDistanceSurpassed=!1,_this.delayTimeoutId=null,_this.onPointerDown=function(ev){_this.isDragging||(_this.isInteracting=!0,_this.isDelayEnded=!1,_this.isDistanceSurpassed=!1,core.preventSelection(document.body),core.preventContextMenu(document.body),ev.isTouch||ev.origEvent.preventDefault(),_this.emitter.trigger("pointerdown",ev),_this.pointer.shouldIgnoreMove||(_this.mirror.setIsVisible(!1),_this.mirror.start(ev.subjectEl,ev.pageX,ev.pageY),_this.startDelay(ev),_this.minDistance||_this.handleDistanceSurpassed(ev)))},_this.onPointerMove=function(ev){if(_this.isInteracting){if(_this.emitter.trigger("pointermove",ev),!_this.isDistanceSurpassed){var minDistance=_this.minDistance,distanceSq=void 0,deltaX=ev.deltaX,deltaY=ev.deltaY;(distanceSq=deltaX*deltaX+deltaY*deltaY)>=minDistance*minDistance&&_this.handleDistanceSurpassed(ev)}_this.isDragging&&("scroll"!==ev.origEvent.type&&(_this.mirror.handleMove(ev.pageX,ev.pageY),_this.autoScroller.handleMove(ev.pageX,ev.pageY)),_this.emitter.trigger("dragmove",ev))}},_this.onPointerUp=function(ev){_this.isInteracting&&(_this.isInteracting=!1,core.allowSelection(document.body),core.allowContextMenu(document.body),_this.emitter.trigger("pointerup",ev),_this.isDragging&&(_this.autoScroller.stop(),_this.tryStopDrag(ev)),_this.delayTimeoutId&&(clearTimeout(_this.delayTimeoutId),_this.delayTimeoutId=null))};var pointer=_this.pointer=new PointerDragging(containerEl);return pointer.emitter.on("pointerdown",_this.onPointerDown),pointer.emitter.on("pointermove",_this.onPointerMove),pointer.emitter.on("pointerup",_this.onPointerUp),_this.mirror=new ElementMirror,_this.autoScroller=new AutoScroller,_this}return __extends(FeaturefulElementDragging,_super),FeaturefulElementDragging.prototype.destroy=function(){this.pointer.destroy()},FeaturefulElementDragging.prototype.startDelay=function(ev){var _this=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){_this.delayTimeoutId=null,_this.handleDelayEnd(ev)}),this.delay):this.handleDelayEnd(ev)},FeaturefulElementDragging.prototype.handleDelayEnd=function(ev){this.isDelayEnded=!0,this.tryStartDrag(ev)},FeaturefulElementDragging.prototype.handleDistanceSurpassed=function(ev){this.isDistanceSurpassed=!0,this.tryStartDrag(ev)},FeaturefulElementDragging.prototype.tryStartDrag=function(ev){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(ev.pageX,ev.pageY),this.emitter.trigger("dragstart",ev),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},FeaturefulElementDragging.prototype.tryStopDrag=function(ev){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,ev))},FeaturefulElementDragging.prototype.stopDrag=function(ev){this.isDragging=!1,this.emitter.trigger("dragend",ev)},FeaturefulElementDragging.prototype.setIgnoreMove=function(bool){this.pointer.shouldIgnoreMove=bool},FeaturefulElementDragging.prototype.setMirrorIsVisible=function(bool){this.mirror.setIsVisible(bool)},FeaturefulElementDragging.prototype.setMirrorNeedsRevert=function(bool){this.mirrorNeedsRevert=bool},FeaturefulElementDragging.prototype.setAutoScrollEnabled=function(bool){this.autoScroller.isEnabled=bool},FeaturefulElementDragging}(core.ElementDragging),OffsetTracker=function(){function OffsetTracker(el){this.origRect=core.computeRect(el),this.scrollCaches=core.getClippingParents(el).map((function(el){return new ElementScrollGeomCache(el,!0)}))}return OffsetTracker.prototype.destroy=function(){for(var _i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache;_a[_i].destroy()}},OffsetTracker.prototype.computeLeft=function(){for(var left=this.origRect.left,_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i];left+=scrollCache.origScrollLeft-scrollCache.getScrollLeft()}return left},OffsetTracker.prototype.computeTop=function(){for(var top=this.origRect.top,_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i];top+=scrollCache.origScrollTop-scrollCache.getScrollTop()}return top},OffsetTracker.prototype.isWithinClipping=function(pageX,pageY){for(var point={left:pageX,top:pageY},_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i];if(!isIgnoredClipping(scrollCache.getEventTarget())&&!core.pointInsideRect(point,scrollCache.clientRect))return!1}return!0},OffsetTracker}();function isIgnoredClipping(node){var tagName=node.tagName;return"HTML"===tagName||"BODY"===tagName}var HitDragging=function(){function HitDragging(dragging,droppableStore){var _this=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(ev){var dragging=_this.dragging;_this.initialHit=null,_this.movingHit=null,_this.finalHit=null,_this.prepareHits(),_this.processFirstCoord(ev),_this.initialHit||!_this.requireInitial?(dragging.setIgnoreMove(!1),_this.emitter.trigger("pointerdown",ev)):dragging.setIgnoreMove(!0)},this.handleDragStart=function(ev){_this.emitter.trigger("dragstart",ev),_this.handleMove(ev,!0)},this.handleDragMove=function(ev){_this.emitter.trigger("dragmove",ev),_this.handleMove(ev)},this.handlePointerUp=function(ev){_this.releaseHits(),_this.emitter.trigger("pointerup",ev)},this.handleDragEnd=function(ev){_this.movingHit&&_this.emitter.trigger("hitupdate",null,!0,ev),_this.finalHit=_this.movingHit,_this.movingHit=null,_this.emitter.trigger("dragend",ev)},this.droppableStore=droppableStore,dragging.emitter.on("pointerdown",this.handlePointerDown),dragging.emitter.on("dragstart",this.handleDragStart),dragging.emitter.on("dragmove",this.handleDragMove),dragging.emitter.on("pointerup",this.handlePointerUp),dragging.emitter.on("dragend",this.handleDragEnd),this.dragging=dragging,this.emitter=new core.EmitterMixin}return HitDragging.prototype.processFirstCoord=function(ev){var origPoint={left:ev.pageX,top:ev.pageY},adjustedPoint=origPoint,subjectEl=ev.subjectEl,subjectRect;subjectEl!==document&&(subjectRect=core.computeRect(subjectEl),adjustedPoint=core.constrainPoint(adjustedPoint,subjectRect));var initialHit=this.initialHit=this.queryHitForOffset(adjustedPoint.left,adjustedPoint.top);if(initialHit){if(this.useSubjectCenter&&subjectRect){var slicedSubjectRect=core.intersectRects(subjectRect,initialHit.rect);slicedSubjectRect&&(adjustedPoint=core.getRectCenter(slicedSubjectRect))}this.coordAdjust=core.diffPoints(adjustedPoint,origPoint)}else this.coordAdjust={left:0,top:0}},HitDragging.prototype.handleMove=function(ev,forceHandle){var hit=this.queryHitForOffset(ev.pageX+this.coordAdjust.left,ev.pageY+this.coordAdjust.top);!forceHandle&&isHitsEqual(this.movingHit,hit)||(this.movingHit=hit,this.emitter.trigger("hitupdate",hit,!1,ev))},HitDragging.prototype.prepareHits=function(){this.offsetTrackers=core.mapHash(this.droppableStore,(function(interactionSettings){return interactionSettings.component.buildPositionCaches(),new OffsetTracker(interactionSettings.el)}))},HitDragging.prototype.releaseHits=function(){var offsetTrackers=this.offsetTrackers;for(var id in offsetTrackers)offsetTrackers[id].destroy();this.offsetTrackers={}},HitDragging.prototype.queryHitForOffset=function(offsetLeft,offsetTop){var _a=this,droppableStore=_a.droppableStore,offsetTrackers=_a.offsetTrackers,bestHit=null;for(var id in droppableStore){var component=droppableStore[id].component,offsetTracker=offsetTrackers[id];if(offsetTracker.isWithinClipping(offsetLeft,offsetTop)){var originLeft=offsetTracker.computeLeft(),originTop=offsetTracker.computeTop(),positionLeft=offsetLeft-originLeft,positionTop=offsetTop-originTop,origRect=offsetTracker.origRect,width=origRect.right-origRect.left,height=origRect.bottom-origRect.top;if(positionLeft>=0&&positionLeft=0&&positionTopbestHit.layer)||(hit.rect.left+=originLeft,hit.rect.right+=originLeft,hit.rect.top+=originTop,hit.rect.bottom+=originTop,bestHit=hit)}}}return bestHit},HitDragging}();function isHitsEqual(hit0,hit1){return!hit0&&!hit1||Boolean(hit0)===Boolean(hit1)&&core.isDateSpansEqual(hit0.dateSpan,hit1.dateSpan)}var DateClicking=function(_super){function DateClicking(settings){var _this=_super.call(this,settings)||this;_this.handlePointerDown=function(ev){var dragging=_this.dragging;dragging.setIgnoreMove(!_this.component.isValidDateDownEl(dragging.pointer.downEl))},_this.handleDragEnd=function(ev){var component,_a=_this.component.context,calendar=_a.calendar,view=_a.view,pointer;if(!_this.dragging.pointer.wasTouchScroll){var _b=_this.hitDragging,initialHit=_b.initialHit,finalHit=_b.finalHit;initialHit&&finalHit&&isHitsEqual(initialHit,finalHit)&&calendar.triggerDateClick(initialHit.dateSpan,initialHit.dayEl,view,ev.origEvent)}};var component=settings.component;_this.dragging=new FeaturefulElementDragging(component.el),_this.dragging.autoScroller.isEnabled=!1;var hitDragging=_this.hitDragging=new HitDragging(_this.dragging,core.interactionSettingsToStore(settings));return hitDragging.emitter.on("pointerdown",_this.handlePointerDown),hitDragging.emitter.on("dragend",_this.handleDragEnd),_this}return __extends(DateClicking,_super),DateClicking.prototype.destroy=function(){this.dragging.destroy()},DateClicking}(core.Interaction),DateSelecting=function(_super){function DateSelecting(settings){var _this=_super.call(this,settings)||this;_this.dragSelection=null,_this.handlePointerDown=function(ev){var _a=_this,component=_a.component,dragging=_a.dragging,options,canSelect=component.context.options.selectable&&component.isValidDateDownEl(ev.origEvent.target);dragging.setIgnoreMove(!canSelect),dragging.delay=ev.isTouch?getComponentTouchDelay(component):null},_this.handleDragStart=function(ev){_this.component.context.calendar.unselect(ev)},_this.handleHitUpdate=function(hit,isFinal){var calendar=_this.component.context.calendar,dragSelection=null,isInvalid=!1;hit&&((dragSelection=joinHitsIntoSelection(_this.hitDragging.initialHit,hit,calendar.pluginSystem.hooks.dateSelectionTransformers))&&_this.component.isDateSelectionValid(dragSelection)||(isInvalid=!0,dragSelection=null)),dragSelection?calendar.dispatch({type:"SELECT_DATES",selection:dragSelection}):isFinal||calendar.dispatch({type:"UNSELECT_DATES"}),isInvalid?core.disableCursor():core.enableCursor(),isFinal||(_this.dragSelection=dragSelection)},_this.handlePointerUp=function(pev){_this.dragSelection&&(_this.component.context.calendar.triggerDateSelect(_this.dragSelection,pev),_this.dragSelection=null)};var component=settings.component,options=component.context.options,dragging=_this.dragging=new FeaturefulElementDragging(component.el);dragging.touchScrollAllowed=!1,dragging.minDistance=options.selectMinDistance||0,dragging.autoScroller.isEnabled=options.dragScroll;var hitDragging=_this.hitDragging=new HitDragging(_this.dragging,core.interactionSettingsToStore(settings));return hitDragging.emitter.on("pointerdown",_this.handlePointerDown),hitDragging.emitter.on("dragstart",_this.handleDragStart),hitDragging.emitter.on("hitupdate",_this.handleHitUpdate),hitDragging.emitter.on("pointerup",_this.handlePointerUp),_this}return __extends(DateSelecting,_super),DateSelecting.prototype.destroy=function(){this.dragging.destroy()},DateSelecting}(core.Interaction);function getComponentTouchDelay(component){var options=component.context.options,delay=options.selectLongPressDelay;return null==delay&&(delay=options.longPressDelay),delay}function joinHitsIntoSelection(hit0,hit1,dateSelectionTransformers){var dateSpan0=hit0.dateSpan,dateSpan1=hit1.dateSpan,ms=[dateSpan0.range.start,dateSpan0.range.end,dateSpan1.range.start,dateSpan1.range.end];ms.sort(core.compareNumbers);for(var props={},_i=0,dateSelectionTransformers_1=dateSelectionTransformers;_iinstanceRange.start)return props.endDelta=delta,props;return null}var UnselectAuto=function(){function UnselectAuto(calendar){var _this=this;this.isRecentPointerDateSelect=!1,this.onSelect=function(selectInfo){selectInfo.jsEvent&&(_this.isRecentPointerDateSelect=!0)},this.onDocumentPointerUp=function(pev){var _a=_this,calendar=_a.calendar,documentPointer=_a.documentPointer,state=calendar.state;if(!documentPointer.wasTouchScroll){if(state.dateSelection&&!_this.isRecentPointerDateSelect){var unselectAuto=calendar.viewOpt("unselectAuto"),unselectCancel=calendar.viewOpt("unselectCancel");!unselectAuto||unselectAuto&&core.elementClosest(documentPointer.downEl,unselectCancel)||calendar.unselect(pev)}state.eventSelection&&!core.elementClosest(documentPointer.downEl,EventDragging.SELECTOR)&&calendar.dispatch({type:"UNSELECT_EVENT"})}_this.isRecentPointerDateSelect=!1},this.calendar=calendar;var documentPointer=this.documentPointer=new PointerDragging(document);documentPointer.shouldIgnoreMove=!0,documentPointer.shouldWatchScroll=!1,documentPointer.emitter.on("pointerup",this.onDocumentPointerUp),calendar.on("select",this.onSelect)}return UnselectAuto.prototype.destroy=function(){this.calendar.off("select",this.onSelect),this.documentPointer.destroy()},UnselectAuto}(),ExternalElementDragging=function(){function ExternalElementDragging(dragging,suppliedDragMeta){var _this=this;this.receivingCalendar=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(ev){_this.dragMeta=_this.buildDragMeta(ev.subjectEl)},this.handleHitUpdate=function(hit,isFinal,ev){var dragging=_this.hitDragging.dragging,receivingCalendar=null,droppableEvent=null,isInvalid=!1,interaction={affectedEvents:core.createEmptyEventStore(),mutatedEvents:core.createEmptyEventStore(),isEvent:_this.dragMeta.create,origSeg:null};hit&&(receivingCalendar=hit.component.context.calendar,_this.canDropElOnCalendar(ev.subjectEl,receivingCalendar)&&(droppableEvent=computeEventForDateSpan(hit.dateSpan,_this.dragMeta,receivingCalendar),interaction.mutatedEvents=core.eventTupleToStore(droppableEvent),(isInvalid=!core.isInteractionValid(interaction,receivingCalendar))&&(interaction.mutatedEvents=core.createEmptyEventStore(),droppableEvent=null))),_this.displayDrag(receivingCalendar,interaction),dragging.setMirrorIsVisible(isFinal||!droppableEvent||!document.querySelector(".fc-mirror")),isInvalid?core.disableCursor():core.enableCursor(),isFinal||(dragging.setMirrorNeedsRevert(!droppableEvent),_this.receivingCalendar=receivingCalendar,_this.droppableEvent=droppableEvent)},this.handleDragEnd=function(pev){var _a=_this,receivingCalendar=_a.receivingCalendar,droppableEvent=_a.droppableEvent;if(_this.clearDrag(),receivingCalendar&&droppableEvent){var finalHit=_this.hitDragging.finalHit,finalView=finalHit.component.context.view,dragMeta=_this.dragMeta,arg=__assign({},receivingCalendar.buildDatePointApi(finalHit.dateSpan),{draggedEl:pev.subjectEl,jsEvent:pev.origEvent,view:finalView});receivingCalendar.publiclyTrigger("drop",[arg]),dragMeta.create&&(receivingCalendar.dispatch({type:"MERGE_EVENTS",eventStore:core.eventTupleToStore(droppableEvent)}),pev.isTouch&&receivingCalendar.dispatch({type:"SELECT_EVENT",eventInstanceId:droppableEvent.instance.instanceId}),receivingCalendar.publiclyTrigger("eventReceive",[{draggedEl:pev.subjectEl,event:new core.EventApi(receivingCalendar,droppableEvent.def,droppableEvent.instance),view:finalView}]))}_this.receivingCalendar=null,_this.droppableEvent=null};var hitDragging=this.hitDragging=new HitDragging(dragging,core.interactionSettingsStore);hitDragging.requireInitial=!1,hitDragging.emitter.on("dragstart",this.handleDragStart),hitDragging.emitter.on("hitupdate",this.handleHitUpdate),hitDragging.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=suppliedDragMeta}return ExternalElementDragging.prototype.buildDragMeta=function(subjectEl){return"object"==typeof this.suppliedDragMeta?core.parseDragMeta(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?core.parseDragMeta(this.suppliedDragMeta(subjectEl)):getDragMetaFromEl(subjectEl)},ExternalElementDragging.prototype.displayDrag=function(nextCalendar,state){var prevCalendar=this.receivingCalendar;prevCalendar&&prevCalendar!==nextCalendar&&prevCalendar.dispatch({type:"UNSET_EVENT_DRAG"}),nextCalendar&&nextCalendar.dispatch({type:"SET_EVENT_DRAG",state:state})},ExternalElementDragging.prototype.clearDrag=function(){this.receivingCalendar&&this.receivingCalendar.dispatch({type:"UNSET_EVENT_DRAG"})},ExternalElementDragging.prototype.canDropElOnCalendar=function(el,receivingCalendar){var dropAccept=receivingCalendar.opt("dropAccept");return"function"==typeof dropAccept?dropAccept(el):"string"!=typeof dropAccept||!dropAccept||Boolean(core.elementMatches(el,dropAccept))},ExternalElementDragging}();function computeEventForDateSpan(dateSpan,dragMeta,calendar){for(var defProps=__assign({},dragMeta.leftoverProps),_i=0,_a=calendar.pluginSystem.hooks.externalDefTransforms;_i<_a.length;_i++){var transform=_a[_i];__assign(defProps,transform(dateSpan,dragMeta))}var def=core.parseEventDef(defProps,dragMeta.sourceId,dateSpan.allDay,calendar.opt("forceEventDuration")||Boolean(dragMeta.duration),calendar),start=dateSpan.range.start;dateSpan.allDay&&dragMeta.startTime&&(start=calendar.dateEnv.add(start,dragMeta.startTime));var end=dragMeta.duration?calendar.dateEnv.add(start,dragMeta.duration):calendar.getDefaultEventEnd(dateSpan.allDay,start),instance;return{def:def,instance:core.createEventInstance(def.defId,{start:start,end:end})}}function getDragMetaFromEl(el){var str=getEmbeddedElData(el,"event"),obj=str?JSON.parse(str):{create:!1};return core.parseDragMeta(obj)}function getEmbeddedElData(el,name){var prefix=core.config.dataAttrPrefix,prefixedName=(prefix?prefix+"-":"")+name;return el.getAttribute("data-"+prefixedName)||""}core.config.dataAttrPrefix="";var ExternalDraggable=function(){function ExternalDraggable(el,settings){var _this=this;void 0===settings&&(settings={}),this.handlePointerDown=function(ev){var dragging=_this.dragging,_a=_this.settings,minDistance=_a.minDistance,longPressDelay=_a.longPressDelay;dragging.minDistance=null!=minDistance?minDistance:ev.isTouch?0:core.globalDefaults.eventDragMinDistance,dragging.delay=ev.isTouch?null!=longPressDelay?longPressDelay:core.globalDefaults.longPressDelay:0},this.handleDragStart=function(ev){ev.isTouch&&_this.dragging.delay&&ev.subjectEl.classList.contains("fc-event")&&_this.dragging.mirror.getMirrorEl().classList.add("fc-selected")},this.settings=settings;var dragging=this.dragging=new FeaturefulElementDragging(el);dragging.touchScrollAllowed=!1,null!=settings.itemSelector&&(dragging.pointer.selector=settings.itemSelector),null!=settings.appendTo&&(dragging.mirror.parentNode=settings.appendTo),dragging.emitter.on("pointerdown",this.handlePointerDown),dragging.emitter.on("dragstart",this.handleDragStart),new ExternalElementDragging(dragging,settings.eventData)}return ExternalDraggable.prototype.destroy=function(){this.dragging.destroy()},ExternalDraggable}(),InferredElementDragging=function(_super){function InferredElementDragging(containerEl){var _this=_super.call(this,containerEl)||this;_this.shouldIgnoreMove=!1,_this.mirrorSelector="",_this.currentMirrorEl=null,_this.handlePointerDown=function(ev){_this.emitter.trigger("pointerdown",ev),_this.shouldIgnoreMove||_this.emitter.trigger("dragstart",ev)},_this.handlePointerMove=function(ev){_this.shouldIgnoreMove||_this.emitter.trigger("dragmove",ev)},_this.handlePointerUp=function(ev){_this.emitter.trigger("pointerup",ev),_this.shouldIgnoreMove||_this.emitter.trigger("dragend",ev)};var pointer=_this.pointer=new PointerDragging(containerEl);return pointer.emitter.on("pointerdown",_this.handlePointerDown),pointer.emitter.on("pointermove",_this.handlePointerMove),pointer.emitter.on("pointerup",_this.handlePointerUp),_this}return __extends(InferredElementDragging,_super),InferredElementDragging.prototype.destroy=function(){this.pointer.destroy()},InferredElementDragging.prototype.setIgnoreMove=function(bool){this.shouldIgnoreMove=bool},InferredElementDragging.prototype.setMirrorIsVisible=function(bool){if(bool)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var mirrorEl=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;mirrorEl&&(this.currentMirrorEl=mirrorEl,mirrorEl.style.visibility="hidden")}},InferredElementDragging}(core.ElementDragging),ThirdPartyDraggable=function(){function ThirdPartyDraggable(containerOrSettings,settings){var containerEl=document;containerOrSettings===document||containerOrSettings instanceof Element?(containerEl=containerOrSettings,settings=settings||{}):settings=containerOrSettings||{};var dragging=this.dragging=new InferredElementDragging(containerEl);"string"==typeof settings.itemSelector?dragging.pointer.selector=settings.itemSelector:containerEl===document&&(dragging.pointer.selector="[data-event]"),"string"==typeof settings.mirrorSelector&&(dragging.mirrorSelector=settings.mirrorSelector),new ExternalElementDragging(dragging,settings.eventData)}return ThirdPartyDraggable.prototype.destroy=function(){this.dragging.destroy()},ThirdPartyDraggable}(),main=core.createPlugin({componentInteractions:[DateClicking,DateSelecting,EventDragging,EventDragging$1],calendarInteractions:[UnselectAuto],elementDraggingImpl:FeaturefulElementDragging});exports.Draggable=ExternalDraggable,exports.FeaturefulElementDragging=FeaturefulElementDragging,exports.PointerDragging=PointerDragging,exports.ThirdPartyDraggable=ThirdPartyDraggable,exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})), /*! FullCalendar List View Plugin v4.4.0 Docs & License: https://fullcalendar.io/ (c) 2019 Adam Shaw */ function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],factory):factory((global=global||self).FullCalendarList={},global.FullCalendar)}(this,(function(exports,core){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var ListEventRenderer=function(_super){function ListEventRenderer(listView){var _this=_super.call(this)||this;return _this.listView=listView,_this}return __extends(ListEventRenderer,_super),ListEventRenderer.prototype.attachSegs=function(segs){segs.length?this.listView.renderSegList(segs):this.listView.renderEmptyMessage()},ListEventRenderer.prototype.detachSegs=function(){},ListEventRenderer.prototype.renderSegHtml=function(seg){var _a=this.context,theme=_a.theme,options=_a.options,eventRange=seg.eventRange,eventDef=eventRange.def,eventInstance=eventRange.instance,eventUi=eventRange.ui,url=eventDef.url,classes=["fc-list-item"].concat(eventUi.classNames),bgColor=eventUi.backgroundColor,timeHtml;return timeHtml=eventDef.allDay?core.getAllDayHtml(options):core.isMultiDayRange(eventRange.range)?seg.isStart?core.htmlEscape(this._getTimeText(eventInstance.range.start,seg.end,!1)):seg.isEnd?core.htmlEscape(this._getTimeText(seg.start,eventInstance.range.end,!1)):core.getAllDayHtml(options):core.htmlEscape(this.getTimeText(eventRange)),url&&classes.push("fc-has-url"),''+(this.displayEventTime?''+(timeHtml||"")+"":"")+'"+core.htmlEscape(eventDef.title||"")+""},ListEventRenderer.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},ListEventRenderer}(core.FgEventRenderer),ListView=function(_super){function ListView(viewSpec,parentEl){var _this=_super.call(this,viewSpec,parentEl)||this;_this.computeDateVars=core.memoize(computeDateVars),_this.eventStoreToSegs=core.memoize(_this._eventStoreToSegs),_this.renderSkeleton=core.memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton);var eventRenderer=_this.eventRenderer=new ListEventRenderer(_this);return _this.renderContent=core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer),eventRenderer.unrender.bind(eventRenderer),[_this.renderSkeleton]),_this}return __extends(ListView,_super),ListView.prototype.firstContext=function(context){context.calendar.registerInteractiveComponent(this,{el:this.el})},ListView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context);var _a=this.computeDateVars(props.dateProfile),dayDates=_a.dayDates,dayRanges=_a.dayRanges;this.dayDates=dayDates,this.renderSkeleton(context),this.renderContent(context,this.eventStoreToSegs(props.eventStore,props.eventUiBases,dayRanges))},ListView.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender(),this.renderContent.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},ListView.prototype._renderSkeleton=function(context){var theme=context.theme;this.el.classList.add("fc-list-view");for(var listViewClassNames,_i=0,listViewClassNames_1=(theme.getClass("listView")||"").split(" ");_i
'+core.htmlEscape(this.context.options.noEventsMessage)+"
"},ListView.prototype.renderSegList=function(allSegs){var theme=this.context.theme,segsByDay=this.groupSegsByDay(allSegs),dayIndex,daySegs,i,tableEl=core.htmlToElement('
'),tbodyEl=tableEl.querySelector("tbody");for(dayIndex=0;dayIndex'+(mainFormat?core.buildGotoAnchorHtml(options,dateEnv,dayDate,{class:"fc-list-heading-main"},core.htmlEscape(dateEnv.format(dayDate,mainFormat))):"")+(altFormat?core.buildGotoAnchorHtml(options,dateEnv,dayDate,{class:"fc-list-heading-alt"},core.htmlEscape(dateEnv.format(dayDate,altFormat))):"")+"")},ListView}(core.View);function computeDateVars(dateProfile){for(var dayStart=core.startOfDay(dateProfile.renderRange.start),viewEnd=dateProfile.renderRange.end,dayDates=[],dayRanges=[];dayStart
'+(timeText?'
'+core.htmlEscape(timeText)+"
":"")+(eventDef.title?'
'+core.htmlEscape(eventDef.title)+"
":"")+"
"+(isResizableFromEnd?'
':"")+""},TimeGridEventRenderer.prototype.computeSegHorizontals=function(segs){var levels,level0,i;if(computeForwardSlotSegs(levels=buildSlotSegLevels(segs)),level0=levels[0]){for(i=0;i0&&seg.el.classList.add("fc-time-grid-event-inset"),seg.eventRange.def.title&&seg.bottom-seg.top<30&&seg.el.classList.add("fc-short")}},TimeGridEventRenderer.prototype.generateSegCss=function(seg){var shouldOverlap=this.context.options.slotEventOverlap,backwardCoord=seg.backwardCoord,forwardCoord=seg.forwardCoord,props=this.timeGrid.generateSegVerticalCss(seg),isRtl=this.context.isRtl,left,right;return shouldOverlap&&(forwardCoord=Math.min(1,backwardCoord+2*(forwardCoord-backwardCoord))),isRtl?(left=1-forwardCoord,right=backwardCoord):(left=backwardCoord,right=1-forwardCoord),props.zIndex=seg.level+1,props.left=100*left+"%",props.right=100*right+"%",shouldOverlap&&seg.forwardPressure&&(props[isRtl?"marginLeft":"marginRight"]=20),props},TimeGridEventRenderer}(core.FgEventRenderer);function buildSlotSegLevels(segs){var levels=[],i,seg,j;for(i=0;iseg2.top&&seg1.top=0;i--)if(labelInterval=core.createDuration(AGENDA_STOCK_SUB_DURATIONS[i]),null!==(slotsPerLabel=core.wholeDivideDurations(labelInterval,slotDuration))&&slotsPerLabel>1)return labelInterval;return slotDuration},TimeGrid.prototype.render=function(props,context){this.processOptions(context.options);var cells=props.cells;this.colCnt=cells.length,this.renderSkeleton(context.theme),this.renderSlats(props.dateProfile),this.renderColumns(props.cells,props.dateProfile),this.renderBusinessHours(context,props.businessHourSegs),this.renderDateSelection(props.dateSelectionSegs),this.renderFgEvents(context,props.fgEventSegs),this.renderBgEvents(context,props.bgEventSegs),this.renderEventSelection(props.eventSelection),this.renderEventDrag(props.eventDrag),this.renderEventResize(props.eventResize)},TimeGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSlats.unrender(),this.renderColumns.unrender(),this.renderSkeleton.unrender()},TimeGrid.prototype.updateSize=function(isResize){var _a=this,fillRenderer=_a.fillRenderer,eventRenderer=_a.eventRenderer,mirrorRenderer=_a.mirrorRenderer;(isResize||this.isSlatSizesDirty)&&(this.buildSlatPositions(),this.isSlatSizesDirty=!1),(isResize||this.isColSizesDirty)&&(this.buildColPositions(),this.isColSizesDirty=!1),fillRenderer.computeSizes(isResize),eventRenderer.computeSizes(isResize),mirrorRenderer.computeSizes(isResize),fillRenderer.assignSizes(isResize),eventRenderer.assignSizes(isResize),mirrorRenderer.assignSizes(isResize)},TimeGrid.prototype._renderSkeleton=function(theme){var el=this.el;el.innerHTML='
',this.rootBgContainerEl=el.querySelector(".fc-bg"),this.slatContainerEl=el.querySelector(".fc-slats"),this.bottomRuleEl=el.querySelector(".fc-divider")},TimeGrid.prototype._renderSlats=function(dateProfile){var theme=this.context.theme;this.slatContainerEl.innerHTML=''+this.renderSlatRowHtml(dateProfile)+"
",this.slatEls=core.findElements(this.slatContainerEl,"tr"),this.slatPositions=new core.PositionCache(this.el,this.slatEls,!1,!0),this.isSlatSizesDirty=!0},TimeGrid.prototype.renderSlatRowHtml=function(dateProfile){for(var _a=this.context,dateEnv=_a.dateEnv,theme=_a.theme,isRtl=_a.isRtl,html="",dayStart=core.startOfDay(dateProfile.renderRange.start),slotTime=dateProfile.minTime,slotIterator=core.createDuration(0),slotDate,isLabeled,axisHtml;core.asRoughMs(slotTime)'+(isLabeled?""+core.htmlEscape(dateEnv.format(slotDate,this.labelFormat))+"":"")+"",html+='"+(isRtl?"":axisHtml)+''+(isRtl?axisHtml:"")+"",slotTime=core.addDurations(slotTime,this.slotDuration),slotIterator=core.addDurations(slotIterator,this.slotDuration);return html},TimeGrid.prototype._renderColumns=function(cells,dateProfile){var _a=this.context,calendar=_a.calendar,view=_a.view,isRtl=_a.isRtl,theme=_a.theme,dateEnv=_a.dateEnv,bgRow=new daygrid.DayBgRow(this.context);this.rootBgContainerEl.innerHTML=''+bgRow.renderHtml({cells:cells,dateProfile:dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+"
",this.colEls=core.findElements(this.el,".fc-day, .fc-disabled-day");for(var col=0;col
');isRtl&&parts.reverse(),skeletonEl=this.contentSkeletonEl=core.htmlToElement('
'+parts.join("")+"
"),this.colContainerEls=core.findElements(skeletonEl,".fc-content-col"),this.mirrorContainerEls=core.findElements(skeletonEl,".fc-mirror-container"),this.fgContainerEls=core.findElements(skeletonEl,".fc-event-container:not(.fc-mirror-container)"),this.bgContainerEls=core.findElements(skeletonEl,".fc-bgevent-container"),this.highlightContainerEls=core.findElements(skeletonEl,".fc-highlight-container"),this.businessContainerEls=core.findElements(skeletonEl,".fc-business-container"),isRtl&&(this.colContainerEls.reverse(),this.mirrorContainerEls.reverse(),this.fgContainerEls.reverse(),this.bgContainerEls.reverse(),this.highlightContainerEls.reverse(),this.businessContainerEls.reverse()),this.el.appendChild(skeletonEl)},TimeGrid.prototype.unrenderContentSkeleton=function(){core.removeElement(this.contentSkeletonEl)},TimeGrid.prototype.groupSegsByCol=function(segs){var segsByCol=[],i;for(i=0;i0){var arrowEl=core.createElement("div",{className:"fc-now-indicator fc-now-indicator-arrow"});arrowEl.style.top=top+"px",this.contentSkeletonEl.appendChild(arrowEl),nodes.push(arrowEl)}this.nowIndicatorEls=nodes}},TimeGrid.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.forEach(core.removeElement),this.nowIndicatorEls=null)},TimeGrid.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.getBoundingClientRect().height},TimeGrid.prototype.computeDateTop=function(when,startOfDayDate){return startOfDayDate||(startOfDayDate=core.startOfDay(when)),this.computeTimeTop(core.createDuration(when.valueOf()-startOfDayDate.valueOf()))},TimeGrid.prototype.computeTimeTop=function(duration){var len=this.slatEls.length,dateProfile=this.props.dateProfile,slatCoverage=(duration.milliseconds-core.asRoughMs(dateProfile.minTime))/core.asRoughMs(this.slotDuration),slatIndex,slatRemainder;return slatCoverage=Math.max(0,slatCoverage),slatCoverage=Math.min(len,slatCoverage),slatIndex=Math.floor(slatCoverage),slatRemainder=slatCoverage-(slatIndex=Math.min(slatIndex,len-1)),this.slatPositions.tops[slatIndex]+this.slatPositions.getHeight(slatIndex)*slatRemainder},TimeGrid.prototype.computeSegVerticals=function(segs){var options,eventMinHeight=this.context.options.timeGridEventMinHeight,i,seg,dayDate;for(i=0;i"+core.buildGotoAnchorHtml(options,dateEnv,{date:range.start,type:"week",forceOff:dayCnt>1},core.htmlEscape(weekText))+""):'"},_this.renderTimeGridBgIntroHtml=function(){var theme;return'"},_this.renderTimeGridIntroHtml=function(){return'"},_this.renderDayGridBgIntroHtml=function(){var _a=_this.context,theme=_a.theme,options=_a.options;return'"+core.getAllDayHtml(options)+""},_this.renderDayGridIntroHtml=function(){return'"},_this}return __extends(AbstractTimeGridView,_super),AbstractTimeGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context),this.renderSkeleton(context)},AbstractTimeGridView.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender()},AbstractTimeGridView.prototype._renderSkeleton=function(context){this.el.classList.add("fc-timeGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new core.ScrollComponent("hidden","auto");var timeGridWrapEl=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(timeGridWrapEl),timeGridWrapEl.classList.add("fc-time-grid-container");var timeGridEl=core.createElement("div",{className:"fc-time-grid"});if(timeGridWrapEl.appendChild(timeGridEl),this.timeGrid=new TimeGrid(timeGridEl,{renderBgIntroHtml:this.renderTimeGridBgIntroHtml,renderIntroHtml:this.renderTimeGridIntroHtml}),context.options.allDaySlot){this.dayGrid=new daygrid.DayGrid(this.el.querySelector(".fc-day-grid"),{renderNumberIntroHtml:this.renderDayGridIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:!1,cellWeekNumbersVisible:!1});var dividerEl=this.el.querySelector(".fc-divider");this.dayGrid.bottomCoordPadding=dividerEl.getBoundingClientRect().height}},AbstractTimeGridView.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-timeGrid-view"),this.timeGrid.destroy(),this.dayGrid&&this.dayGrid.destroy(),this.scroller.destroy()},AbstractTimeGridView.prototype.renderSkeletonHtml=function(){var _a=this.context,theme=_a.theme,options=_a.options;return''+(options.columnHeader?'':"")+'
 
'+(options.allDaySlot?'

':"")+"
"},AbstractTimeGridView.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},AbstractTimeGridView.prototype.unrenderNowIndicator=function(){this.timeGrid.unrenderNowIndicator()},AbstractTimeGridView.prototype.updateSize=function(isResize,viewHeight,isAuto){_super.prototype.updateSize.call(this,isResize,viewHeight,isAuto),this.timeGrid.updateSize(isResize),this.dayGrid&&this.dayGrid.updateSize(isResize)},AbstractTimeGridView.prototype.updateBaseSize=function(isResize,viewHeight,isAuto){var _this=this,eventLimit,scrollerHeight,scrollbarWidths;if(this.axisWidth=core.matchCellWidths(core.findElements(this.el,".fc-axis")),this.timeGrid.colEls){var noScrollRowEls=core.findElements(this.el,".fc-row").filter((function(node){return!_this.scroller.el.contains(node)}));this.timeGrid.bottomRuleEl.style.display="none",this.scroller.clear(),noScrollRowEls.forEach(core.uncompensateScroll),this.dayGrid&&(this.dayGrid.removeSegPopover(),(eventLimit=this.context.options.eventLimit)&&"number"!=typeof eventLimit&&(eventLimit=5),eventLimit&&this.dayGrid.limitRows(eventLimit)),isAuto||(scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight),((scrollbarWidths=this.scroller.getScrollbarWidths()).left||scrollbarWidths.right)&&(noScrollRowEls.forEach((function(rowEl){core.compensateScroll(rowEl,scrollbarWidths)})),scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight)),this.scroller.lockOverflow(scrollbarWidths),this.timeGrid.getTotalSlatHeight()