@steedos-widgets/fullcalendar 1.2.3 → 1.2.6-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fullcalendar.umd.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("lodash")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","lodash"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BuilderFullCalendar={},e.React,e.ReactDOM,e._)}(this,(function(exports,React,reactDom,___default){const global=window;function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var React__namespace=_interopNamespace(React),React__default=_interopDefaultLegacy(React),reactDom__namespace=_interopNamespace(reactDom),___default__default=_interopDefaultLegacy(___default),extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign$1=function(){return __assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("lodash")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","lodash"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BuilderFullCalendar={},e.React,e.ReactDOM,e._)}(this,(function(exports,React,reactDom,___default){const global=window;function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var React__namespace=_interopNamespace(React),React__default=_interopDefaultLegacy(React),reactDom__namespace=_interopNamespace(reactDom),___default__namespace=_interopNamespace(___default),___default__default=_interopDefaultLegacy(___default),extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign$1=function(){return __assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},__assign$1.apply(this,arguments)};function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function flushSync(e){e()}if(("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:React__namespace.Component,createElement:React__namespace.createElement,render:reactDom__namespace.render,createRef:React__namespace.createRef,Fragment:React__namespace.Fragment,createContext:React__namespace.createContext,createPortal:reactDom__namespace.createPortal,flushSync:flushSync,unmountComponentAtNode:reactDom__namespace.unmountComponentAtNode},"undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Component=FullCalendarVDom.Component,createElement=FullCalendarVDom.createElement;FullCalendarVDom.render;var createRef=FullCalendarVDom.createRef,Fragment=FullCalendarVDom.Fragment,createContext=FullCalendarVDom.createContext,createPortal=FullCalendarVDom.createPortal;FullCalendarVDom.flushSync,FullCalendarVDom.unmountComponentAtNode;
|
|
2
2
|
/*!
|
|
3
3
|
FullCalendar v5.11.4
|
|
4
4
|
Docs & License: https://fullcalendar.io/
|
|
5
5
|
(c) 2022 Adam Shaw
|
|
6
6
|
*/
|
|
7
|
-
var EventSourceApi=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function removeElement(e){e.parentNode&&e.parentNode.removeChild(e)}function elementClosest(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(elementMatches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function elementMatches(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function findElements(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o+=1)for(var i=n[o].querySelectorAll(t),a=0;a<i.length;a+=1)r.push(i[a]);return r}var PIXEL_PROP_RE=/(top|left|right|bottom|width|height)$/i;function applyStyle(e,t){for(var n in t)applyStyleProp(e,n,t[n])}function applyStyleProp(e,t,n){null==n?e.style[t]="":"number"==typeof n&&PIXEL_PROP_RE.test(t)?e.style[t]=n+"px":e.style[t]=n}function getEventTargetViaRoot(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function getElRoot(e){return e.getRootNode?e.getRootNode():document}var guid$1=0;function getUniqueDomId(){return"fc-dom-"+(guid$1+=1)}function preventDefault(e){e.preventDefault()}function buildDelegationHandler(e,t){return function(n){var r=elementClosest(n.target,e);r&&t.call(r,n,r)}}function listenBySelector(e,t,n,r){var o=buildDelegationHandler(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}function listenToHoverBySelector(e,t,n,r){var o;return listenBySelector(e,"mouseover",t,(function(e,t){if(t!==o){o=t,n(e,t);var i=function(e){o=null,r(e,t),t.removeEventListener("mouseleave",i)};t.addEventListener("mouseleave",i)}}))}var transitionEventNames=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function whenTransitionDone(e,t){var n=function(r){t(r),transitionEventNames.forEach((function(t){e.removeEventListener(t,n)}))};transitionEventNames.forEach((function(t){e.addEventListener(t,n)}))}function createAriaClickAttrs(e){return __assign$1({onClick:e},createAriaKeyboardAttrs(e))}function createAriaKeyboardAttrs(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var guidNumber=0;function guid(){return String(guidNumber+=1)}function disableCursor(){document.body.classList.add("fc-not-allowed")}function enableCursor(){document.body.classList.remove("fc-not-allowed")}function preventSelection(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",preventDefault)}function allowSelection(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",preventDefault)}function preventContextMenu(e){e.addEventListener("contextmenu",preventDefault)}function allowContextMenu(e){e.removeEventListener("contextmenu",preventDefault)}function parseFieldSpecs(e){var t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t+=1)"string"==typeof(n=o[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function compareByFieldSpecs(e,t,n){var r,o;for(r=0;r<n.length;r+=1)if(o=compareByFieldSpec(e,t,n[r]))return o;return 0}function compareByFieldSpec(e,t,n){return n.func?n.func(e,t):flexibleCompare(e[n.field],t[n.field])*(n.order||1)}function flexibleCompare(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function padStart(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function formatWithOrdinals(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function compareNumbers(e,t){return e-t}function isInt(e){return e%1==0}function computeSmallestCellWidth(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var DAY_IDS=["sun","mon","tue","wed","thu","fri","sat"];function addWeeks(e,t){var n=dateToUtcArray(e);return n[2]+=7*t,arrayToUtcDate(n)}function addDays(e,t){var n=dateToUtcArray(e);return n[2]+=t,arrayToUtcDate(n)}function addMs(e,t){var n=dateToUtcArray(e);return n[6]+=t,arrayToUtcDate(n)}function diffWeeks(e,t){return diffDays(e,t)/7}function diffDays(e,t){return(t.valueOf()-e.valueOf())/864e5}function diffHours(e,t){return(t.valueOf()-e.valueOf())/36e5}function diffMinutes(e,t){return(t.valueOf()-e.valueOf())/6e4}function diffSeconds(e,t){return(t.valueOf()-e.valueOf())/1e3}function diffDayAndTime(e,t){var n=startOfDay(e),r=startOfDay(t);return{years:0,months:0,days:Math.round(diffDays(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function diffWholeWeeks(e,t){var n=diffWholeDays(e,t);return null!==n&&n%7==0?n/7:null}function diffWholeDays(e,t){return timeAsMs(e)===timeAsMs(t)?Math.round(diffDays(e,t)):null}function startOfDay(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function startOfHour(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function startOfMinute(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function startOfSecond(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function weekOfYear(e,t,n){var r=e.getUTCFullYear(),o=weekOfGivenYear(e,r,t,n);if(o<1)return weekOfGivenYear(e,r-1,t,n);var i=weekOfGivenYear(e,r+1,t,n);return i>=1?Math.min(o,i):o}function weekOfGivenYear(e,t,n,r){var o=arrayToUtcDate([t,0,1+firstWeekOffset(t,n,r)]),i=startOfDay(e),a=Math.round(diffDays(o,i));return Math.floor(a/7)+1}function firstWeekOffset(e,t,n){var r=7+t-n;return-((7+arrayToUtcDate([e,0,r]).getUTCDay()-t)%7)+r-1}function dateToLocalArray(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function arrayToLocalDate(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function dateToUtcArray(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function arrayToUtcDate(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function isValidDate(e){return!isNaN(e.valueOf())}function timeAsMs(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function createEventInstance(e,t,n,r){return{instanceId:guid(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var hasOwnProperty=Object.prototype.hasOwnProperty;function mergeProps(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i-=1){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=mergeProps(o))}for(i=e.length-1;i>=0;i-=1){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function filterHash(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function mapHash(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function arrayToHash(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function hashValuesToArray(e){var t=[];for(var n in e)t.push(e[n]);return t}function isPropsEqual(e,t){if(e===t)return!0;for(var n in e)if(hasOwnProperty.call(e,n)&&!(n in t))return!1;for(var n in t)if(hasOwnProperty.call(t,n)&&e[n]!==t[n])return!1;return!0}function getUnequalProps(e,t){var n=[];for(var r in e)hasOwnProperty.call(e,r)&&(r in t||n.push(r));for(var r in t)hasOwnProperty.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function compareObjs(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!isObjValsEqual(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function isObjValsEqual(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function collectFromHash(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var a=e[i];void 0!==a&&o.push(a)}return o}function parseRecurring(e,t,n,r){for(var o=0;o<r.length;o+=1){var i=r[o].parse(e,n);if(i){var a=e.allDay;return null==a&&null==(a=t)&&null==(a=i.allDayGuess)&&(a=!1),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:o}}}return null}function expandRecurring(e,t,n){var r=n.dateEnv,o=n.pluginHooks,i=n.options,a=e.defs,s=e.instances;for(var l in s=filterHash(s,(function(e){return!a[e.defId].recurringDef})),a){var u=a[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var d=0,p=expandRecurringRanges(u,c,t,r,o.recurringTypes);d<p.length;d++){var f=p[d],h=createEventInstance(l,{start:f,end:r.add(f,c)});s[h.instanceId]=h}}}return{defs:a,instances:s}}function expandRecurringRanges(e,t,n,r,o){var i=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(startOfDay)),i}var INTERNAL_UNITS=["years","months","days","milliseconds"],PARSE_RE=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function createDuration(e,t){var n;return"string"==typeof e?parseString(e):"object"==typeof e&&e?parseObject(e):"number"==typeof e?parseObject(((n={})[t||"milliseconds"]=e,n)):null}function parseString(e){var t=PARSE_RE.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}function parseObject(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function durationsEqual(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function addDurations(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function subtractDurations(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function multiplyDuration(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function asRoughYears(e){return asRoughDays(e)/365}function asRoughMonths(e){return asRoughDays(e)/30}function asRoughDays(e){return asRoughMs(e)/864e5}function asRoughMs(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function wholeDivideDurations(e,t){for(var n=null,r=0;r<INTERNAL_UNITS.length;r+=1){var o=INTERNAL_UNITS[r];if(t[o]){var i=e[o]/t[o];if(!isInt(i)||null!==n&&n!==i)return null;n=i}else if(e[o])return null}return n}function greatestDurationDenominator(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function buildIsoString(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",formatTimeZoneOffset(t,!0)))),r}function formatDayString(e){return e.toISOString().replace(/T.*$/,"")}function formatIsoTimeString(e){return padStart(e.getUTCHours(),2)+":"+padStart(e.getUTCMinutes(),2)+":"+padStart(e.getUTCSeconds(),2)}function formatTimeZoneOffset(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=Math.round(r%60);return t?n+padStart(o,2)+":"+padStart(i,2):"GMT"+n+o+(i?":"+padStart(i,2):"")}function isArraysEqual(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function memoize(e,t,n){var r,o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r){if(!isArraysEqual(r,i)){n&&n(o);var s=e.apply(this,i);t&&t(s,o)||(o=s)}}else o=e.apply(this,i);return r=i,o}}function memoizeObjArg(e,t,n){var r,o,i=this;return function(a){if(r){if(!isPropsEqual(r,a)){n&&n(o);var s=e.call(i,a);t&&t(s,o)||(o=s)}}else o=e.call(i,a);return r=a,o}}var EXTENDED_SETTINGS_AND_SEVERITIES={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},STANDARD_DATE_PROP_SEVERITIES={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},MERIDIEM_RE=/\s*([ap])\.?m\.?/i,COMMA_RE=/,/g,MULTI_SPACE_RE=/\s+/g,LTR_RE=/\u200e/g,UTC_RE=/UTC|GMT/,NativeFormatter=function(){function e(e){var t={},n={},r=0;for(var o in e)o in EXTENDED_SETTINGS_AND_SEVERITIES?(n[o]=e[o],r=Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[o],r)):(t[o]=e[o],o in STANDARD_DATE_PROP_SEVERITIES&&(r=Math.max(STANDARD_DATE_PROP_SEVERITIES[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=memoize(buildFormattingFunc)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var o=this.standardDateProps,i=this.extendedSettings,a=computeMarkerDiffSeverity(e.marker,t.marker,n.calendarSystem);if(!a)return this.format(e,n);var s=a;!(s>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=buildFormattingFunc(computePartialFormattingOptions(o,s),i,n),d=c(e),p=c(t),f=findCommonInsertion(l,d,u,p),h=i.separator||r||n.defaultSeparator||"";return f?f.before+d+h+p+f.after:l+h+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function buildFormattingFunc(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return formatTimeZoneOffset(e.timeZoneOffset)}:0===r&&t.week?function(e){return formatWeekNumber(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week)}:buildNativeFormattingFunc(e,t,n)}function buildNativeFormattingFunc(e,t,n){e=__assign$1({},e),t=__assign$1({},t),sanitizeSettings(e,t),e.timeZone="UTC";var r,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var i=__assign$1({},e);delete i.minute,r=new Intl.DateTimeFormat(n.locale.codes,i)}return function(i){var a=i.marker;return postProcess((r&&!a.getUTCMinutes()?r:o).format(a),i,e,t,n)}}function sanitizeSettings(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function postProcess(e,t,n,r,o){return e=e.replace(LTR_RE,""),"short"===n.timeZoneName&&(e=injectTzoStr(e,"UTC"===o.timeZone||null==t.timeZoneOffset?"UTC":formatTimeZoneOffset(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(COMMA_RE,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(MERIDIEM_RE,"").trim():"narrow"===r.meridiem?e=e.replace(MERIDIEM_RE,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(MERIDIEM_RE,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(MERIDIEM_RE,(function(e){return e.toLocaleLowerCase()}))),e=(e=e.replace(MULTI_SPACE_RE," ")).trim()}function injectTzoStr(e,t){var n=!1;return e=e.replace(UTC_RE,(function(){return n=!0,t})),n||(e+=" "+t),e}function formatWeekNumber(e,t,n,r,o){var i=[];return"long"===o?i.push(n):"short"!==o&&"narrow"!==o||i.push(t),"long"!==o&&"short"!==o||i.push(" "),i.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&i.reverse(),i.join("")}function computeMarkerDiffSeverity(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:timeAsMs(e)!==timeAsMs(t)?1:0}function computePartialFormattingOptions(e,t){var n={};for(var r in e)(!(r in STANDARD_DATE_PROP_SEVERITIES)||STANDARD_DATE_PROP_SEVERITIES[r]<=t)&&(n[r]=e[r]);return n}function findCommonInsertion(e,t,n,r){for(var o=0;o<e.length;){var i=e.indexOf(t,o);if(-1===i)break;var a=e.substr(0,i);o=i+t.length;for(var s=e.substr(o),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(a===c&&s===d)return{before:a,after:s}}}return null}function expandZonedMarker(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function createVerboseFormattingArg(e,t,n,r){var o=expandZonedMarker(e,n.calendarSystem);return{date:o,start:o,end:t?expandZonedMarker(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var CmdFormatter=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,createVerboseFormattingArg(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,createVerboseFormattingArg(e,t,n,r))},e}(),FuncFormatter=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(createVerboseFormattingArg(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(createVerboseFormattingArg(e,t,n,r))},e}();function createFormatter(e){return"object"==typeof e&&e?new NativeFormatter(e):"string"==typeof e?new CmdFormatter(e):"function"==typeof e?new FuncFormatter(e):null}var BASE_OPTION_REFINERS={navLinkDayClick:identity,navLinkWeekClick:identity,duration:createDuration,bootstrapFontAwesome:identity,buttonIcons:identity,customButtons:identity,defaultAllDayEventDuration:createDuration,defaultTimedEventDuration:createDuration,nextDayThreshold:createDuration,scrollTime:createDuration,scrollTimeReset:Boolean,slotMinTime:createDuration,slotMaxTime:createDuration,dayPopoverFormat:createFormatter,slotDuration:createDuration,snapDuration:createDuration,headerToolbar:identity,footerToolbar:identity,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:createFormatter,dayHeaderClassNames:identity,dayHeaderContent:identity,dayHeaderDidMount:identity,dayHeaderWillUnmount:identity,dayCellClassNames:identity,dayCellContent:identity,dayCellDidMount:identity,dayCellWillUnmount:identity,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:identity,weekNumbers:Boolean,weekNumberClassNames:identity,weekNumberContent:identity,weekNumberDidMount:identity,weekNumberWillUnmount:identity,editable:Boolean,viewClassNames:identity,viewDidMount:identity,viewWillUnmount:identity,nowIndicator:Boolean,nowIndicatorClassNames:identity,nowIndicatorContent:identity,nowIndicatorDidMount:identity,nowIndicatorWillUnmount:identity,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:identity,locale:identity,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:identity,eventOrder:parseFieldSpecs,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:identity,contentHeight:identity,direction:String,weekNumberFormat:createFormatter,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:identity,initialDate:identity,now:identity,eventDataTransform:identity,stickyHeaderDates:identity,stickyFooterScrollbar:identity,viewHeight:identity,defaultAllDay:Boolean,eventSourceFailure:identity,eventSourceSuccess:identity,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:identity,eventConstraint:identity,eventAllow:identity,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:identity,eventContent:identity,eventDidMount:identity,eventWillUnmount:identity,selectConstraint:identity,selectOverlap:identity,selectAllow:identity,droppable:Boolean,unselectCancel:String,slotLabelFormat:identity,slotLaneClassNames:identity,slotLaneContent:identity,slotLaneDidMount:identity,slotLaneWillUnmount:identity,slotLabelClassNames:identity,slotLabelContent:identity,slotLabelDidMount:identity,slotLabelWillUnmount:identity,dayMaxEvents:identity,dayMaxEventRows:identity,dayMinWidth:Number,slotLabelInterval:createDuration,allDayText:String,allDayClassNames:identity,allDayContent:identity,allDayDidMount:identity,allDayWillUnmount:identity,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:createFormatter,rerenderDelay:Number,moreLinkText:identity,moreLinkHint:identity,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:identity,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:createDuration,hiddenDays:identity,monthMode:Boolean,fixedWeekCount:Boolean,validRange:identity,visibleRange:identity,titleFormat:identity,eventInteractive:Boolean,noEventsText:String,viewHint:identity,navLinkHint:identity,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:identity,moreLinkClassNames:identity,moreLinkContent:identity,moreLinkDidMount:identity,moreLinkWillUnmount:identity},BASE_OPTION_DEFAULTS={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30},CALENDAR_LISTENER_REFINERS={datesSet:identity,eventsSet:identity,eventAdd:identity,eventChange:identity,eventRemove:identity,windowResize:identity,eventClick:identity,eventMouseEnter:identity,eventMouseLeave:identity,select:identity,unselect:identity,loading:identity,_unmount:identity,_beforeprint:identity,_afterprint:identity,_noEventDrop:identity,_noEventResize:identity,_resize:identity,_scrollRequest:identity},CALENDAR_OPTION_REFINERS={buttonText:identity,buttonHints:identity,views:identity,plugins:identity,initialEvents:identity,events:identity,eventSources:identity},COMPLEX_OPTION_COMPARATORS={headerToolbar:isMaybeObjectsEqual,footerToolbar:isMaybeObjectsEqual,buttonText:isMaybeObjectsEqual,buttonHints:isMaybeObjectsEqual,buttonIcons:isMaybeObjectsEqual,dateIncrement:isMaybeObjectsEqual};function isMaybeObjectsEqual(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?isPropsEqual(e,t):e===t}var VIEW_OPTION_REFINERS={type:String,component:identity,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:identity,usesMinMaxTime:Boolean,classNames:identity,content:identity,didMount:identity,willUnmount:identity};function mergeRawOptions(e){return mergeProps(e,COMPLEX_OPTION_COMPARATORS)}function refineProps(e,t){var n={},r={};for(var o in t)o in e&&(n[o]=t[o](e[o]));for(var o in e)o in t||(r[o]=e[o]);return{refined:n,extra:r}}function identity(e){return e}function parseEvents(e,t,n,r){for(var o=createEmptyEventStore(),i=buildEventRefiners(n),a=0,s=e;a<s.length;a++){var l=parseEvent(s[a],t,n,r,i);l&&eventTupleToStore(l,o)}return o}function eventTupleToStore(e,t){return void 0===t&&(t=createEmptyEventStore()),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function getRelevantEvents(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],o=filterEventStoreDefs(e,(function(e){return isEventDefsGrouped(r,e)}));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return createEmptyEventStore()}function isEventDefsGrouped(e,t){return Boolean(e.groupId&&e.groupId===t.groupId)}function createEmptyEventStore(){return{defs:{},instances:{}}}function mergeEventStores(e,t){return{defs:__assign$1(__assign$1({},e.defs),t.defs),instances:__assign$1(__assign$1({},e.instances),t.instances)}}function filterEventStoreDefs(e,t){var n=filterHash(e.defs,t),r=filterHash(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function excludeSubEventStore(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var s in r)!t.instances[s]&&o[r[s].defId]&&(i[s]=r[s]);return{defs:o,instances:i}}function normalizeConstraint(e,t){return Array.isArray(e)?parseEvents(e,null,t,!0):"object"==typeof e&&e?parseEvents([e],null,t,!0):null!=e?String(e):null}function parseClassNames(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var EVENT_UI_REFINERS={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:identity,overlap:identity,allow:identity,className:parseClassNames,classNames:parseClassNames,color:String,backgroundColor:String,borderColor:String,textColor:String},EMPTY_EVENT_UI={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function createEventUi(e,t){var n=normalizeConstraint(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function combineEventUis(e){return e.reduce(combineTwoEventUis,EMPTY_EVENT_UI)}function combineTwoEventUis(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var EVENT_NON_DATE_REFINERS={id:String,groupId:String,title:String,url:String,interactive:Boolean},EVENT_DATE_REFINERS={start:identity,end:identity,date:identity,allDay:Boolean},EVENT_REFINERS=__assign$1(__assign$1(__assign$1({},EVENT_NON_DATE_REFINERS),EVENT_DATE_REFINERS),{extendedProps:identity});function parseEvent(e,t,n,r,o){void 0===o&&(o=buildEventRefiners(n));var i=refineEventDef(e,n,o),a=i.refined,s=i.extra,l=computeIsDefaultAllDay(t,n),u=parseRecurring(a,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=parseEventDef(a,s,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=parseSingle(a,l,n,r);return d?{def:c=parseEventDef(a,s,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:createEventInstance(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function refineEventDef(e,t,n){return void 0===n&&(n=buildEventRefiners(t)),refineProps(e,n)}function buildEventRefiners(e){return __assign$1(__assign$1(__assign$1({},EVENT_UI_REFINERS),EVENT_REFINERS),e.pluginHooks.eventRefiners)}function parseEventDef(e,t,n,r,o,i){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:guid(),sourceId:n,allDay:r,hasEnd:o,interactive:e.interactive,ui:createEventUi(e,i),extendedProps:__assign$1(__assign$1({},e.extendedProps||{}),t)},s=0,l=i.pluginHooks.eventDefMemberAdders;s<l.length;s++){var u=l[s];__assign$1(a,u(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function parseSingle(e,t,n,r){var o,i,a=e.allDay,s=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(c))s=o.marker;else if(!r)return null;return null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end)),null==a&&(a=null!=t?t:(!o||o.isTimeUnspecified)&&(!i||i.isTimeUnspecified)),a&&s&&(s=startOfDay(s)),i&&(u=i.marker,a&&(u=startOfDay(u)),s&&u<=s&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(s,a?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:a,hasEnd:l,range:{start:s,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}function computeIsDefaultAllDay(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}function computeAlignedDayRange(e){var t=Math.floor(diffDays(e.start,e.end))||1,n=startOfDay(e.start);return{start:n,end:addDays(n,t)}}function computeVisibleDayRange(e,t){void 0===t&&(t=createDuration(0));var n=null,r=null;if(e.end){r=startOfDay(e.end);var o=e.end.valueOf()-r.valueOf();o&&o>=asRoughMs(t)&&(r=addDays(r,1))}return e.start&&(n=startOfDay(e.start),r&&r<=n&&(r=addDays(n,1))),{start:n,end:r}}function isMultiDayRange(e){var t=computeVisibleDayRange(e);return diffDays(t.start,t.end)>1}function diffDates(e,t,n,r){return"year"===r?createDuration(n.diffWholeYears(e,t),"year"):"month"===r?createDuration(n.diffWholeMonths(e,t),"month"):diffDayAndTime(e,t)}function parseRange(e,t){var n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}function invertRanges(e,t){var n,r,o=[],i=t.start;for(e.sort(compareRanges),n=0;n<e.length;n+=1)(r=e[n]).start>i&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&o.push({start:i,end:t.end}),o}function compareRanges(e,t){return e.start.valueOf()-t.start.valueOf()}function intersectRanges(e,t){var n=e.start,r=e.end,o=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(o={start:n,end:r}),o}function rangesEqual(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rangesIntersect(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function rangeContainsRange(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function rangeContainsMarker(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function constrainMarkerToRange(e,t){return null!=t.start&&e<t.start?t.start:null!=t.end&&e>=t.end?new Date(t.end.valueOf()-1):e}function sliceEventStore(e,t,n,r){var o={},i={},a={},s=[],l=[],u=compileEventUis(e.defs,t);for(var c in e.defs){"inverse-background"===(f=u[(S=e.defs[c]).defId]).display&&(S.groupId?(o[S.groupId]=[],a[S.groupId]||(a[S.groupId]=S)):i[c]=[])}for(var d in e.instances){var p=e.instances[d],f=u[(S=e.defs[p.defId]).defId],h=p.range,g=!S.allDay&&r?computeVisibleDayRange(h,r):h,m=intersectRanges(g,n);m&&("inverse-background"===f.display?S.groupId?o[S.groupId].push(m):i[p.defId].push(m):"none"!==f.display&&("background"===f.display?s:l).push({def:S,ui:f,instance:p,range:m,isStart:g.start&&g.start.valueOf()===m.start.valueOf(),isEnd:g.end&&g.end.valueOf()===m.end.valueOf()}))}for(var v in o)for(var y=0,E=invertRanges(o[v],n);y<E.length;y++){var S,D=E[y];f=u[(S=a[v]).defId];s.push({def:S,ui:f,instance:null,range:D,isStart:!1,isEnd:!1})}for(var c in i)for(var T=0,b=invertRanges(i[c],n);T<b.length;T++){D=b[T];s.push({def:e.defs[c],ui:u[c],instance:null,range:D,isStart:!1,isEnd:!1})}return{bg:s,fg:l}}function hasBgRendering(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function setElSeg(e,t){e.fcSeg=t}function getElSeg(e){return e.fcSeg||e.parentNode.fcSeg||null}function compileEventUis(e,t){return mapHash(e,(function(e){return compileEventUi(e,t)}))}function compileEventUi(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),combineEventUis(n)}function sortEventSegs(e,t){var n=e.map(buildSegCompareObj);return n.sort((function(e,n){return compareByFieldSpecs(e,n,t)})),n.map((function(e){return e._seg}))}function buildSegCompareObj(e){var t=e.eventRange,n=t.def,r=t.instance?t.instance.range:t.range,o=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return __assign$1(__assign$1(__assign$1({},n.extendedProps),n),{id:n.publicId,start:o,end:i,duration:i-o,allDay:Number(n.allDay),_seg:e})}function computeSegDraggable(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,o=r.def,i=r.ui,a=i.startEditable,s=0,l=n;s<l.length;s++){a=(0,l[s])(a,o,i,t)}return a}function computeSegStartResizable(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function computeSegEndResizable(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function buildSegTimeText(e,t,n,r,o,i,a){var s=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,p=e.eventRange.instance;null==u&&(u=!1!==r),null==c&&(c=!1!==o);var f=p.range.start,h=p.range.end,g=i||e.start||e.eventRange.range.start,m=a||e.end||e.eventRange.range.end,v=startOfDay(f).valueOf()===startOfDay(g).valueOf(),y=startOfDay(addMs(h,-1)).valueOf()===startOfDay(addMs(m,-1)).valueOf();return u&&!d.allDay&&(v||y)?(g=v?f:g,m=y?h:m,c&&d.hasEnd?s.formatRange(g,m,t,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:a?null:p.forcedEndTzo}):s.format(g,t,{forcedTzo:i?null:p.forcedStartTzo})):""}function getSegMeta(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&rangeContainsMarker(t,r.start)}}function getEventClassNames(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function buildEventRangeKey(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function getSegAnchorAttrs(e,t){var n=e.eventRange,r=n.def,o=n.instance,i=r.url;if(i)return{href:i};var a=t.emitter,s=t.options.eventInteractive;return null==s&&null==(s=r.interactive)&&(s=Boolean(a.hasHandlers("eventClick"))),s?createAriaKeyboardAttrs((function(e){a.trigger("eventClick",{el:e.target,event:new EventApi(t,r,o),jsEvent:e,view:t.viewApi})})):{}}var STANDARD_PROPS={start:identity,end:identity,allDay:Boolean};function parseDateSpan(e,t,n){var r=parseOpenDateSpan(e,t),o=r.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return r}function parseOpenDateSpan(e,t){var n=refineProps(e,STANDARD_PROPS),r=n.refined,o=n.extra,i=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,s=r.allDay;return null==s&&(s=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified)),__assign$1({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:s},o)}function isDateSpansEqual(e,t){return rangesEqual(e.range,t.range)&&e.allDay===t.allDay&&isSpanPropsEqual(e,t)}function isSpanPropsEqual(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}function buildDateSpanApi(e,t){return __assign$1(__assign$1({},buildRangeApi(e.range,t,e.allDay)),{allDay:e.allDay})}function buildRangeApiWithTimeZone(e,t,n){return __assign$1(__assign$1({},buildRangeApi(e,t,n)),{timeZone:t.timeZone})}function buildRangeApi(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function fabricateEventRange(e,t,n){var r=refineEventDef({editable:!1},n),o=parseEventDef(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:compileEventUi(o,t),instance:createEventInstance(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function triggerDateSelect(e,t,n){n.emitter.trigger("select",__assign$1(__assign$1({},buildDateSpanApiWithContext(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function triggerDateUnselect(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function buildDateSpanApiWithContext(e,t){for(var n={},r=0,o=t.pluginHooks.dateSpanTransforms;r<o.length;r++){var i=o[r];__assign$1(n,i(e,t))}return __assign$1(n,buildDateSpanApi(e,t.dateEnv)),n}function getDefaultEventEnd(e,t,n){var r=n.dateEnv,o=n.options,i=t;return e?(i=startOfDay(i),i=r.add(i,o.defaultAllDayEventDuration)):i=r.add(i,o.defaultTimedEventDuration),i}function applyMutationToEventStore(e,t,n,r){var o=compileEventUis(e.defs,t),i=createEmptyEventStore();for(var a in e.defs){var s=e.defs[a];i.defs[a]=applyMutationToEventDef(s,o[a],n,r)}for(var l in e.instances){var u=e.instances[l];s=i.defs[u.defId];i.instances[l]=applyMutationToEventInstance(u,s,o[u.defId],n,r)}return i}function applyMutationToEventDef(e,t,n,r){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var i=__assign$1(__assign$1(__assign$1({},e),o),{ui:__assign$1(__assign$1({},e.ui),o.ui)});n.extendedProps&&(i.extendedProps=__assign$1(__assign$1({},i.extendedProps),n.extendedProps));for(var a=0,s=r.pluginHooks.eventDefMutationAppliers;a<s.length;a++){(0,s[a])(i,n,r)}return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function applyMutationToEventInstance(e,t,n,r,o){var i=o.dateEnv,a=r.standardProps&&!0===r.standardProps.allDay,s=r.standardProps&&!1===r.standardProps.hasEnd,l=__assign$1({},e);return a&&(l.range=computeAlignedDayRange(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:i.add(l.range.start,r.datesDelta),end:i.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:i.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,r.endDelta)}),s&&(l.range={start:l.range.start,end:getDefaultEventEnd(t.allDay,l.range.start,o)}),t.allDay&&(l.range={start:startOfDay(l.range.start),end:startOfDay(l.range.end)}),l.range.end<l.range.start&&(l.range.end=getDefaultEventEnd(t.allDay,l.range.start,o)),l}var ViewApi=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),EVENT_SOURCE_REFINERS={id:String,defaultAllDay:Boolean,url:String,format:String,events:identity,eventDataTransform:identity,success:identity,failure:identity};function parseEventSource(e,t,n){var r;if(void 0===n&&(n=buildEventSourceRefiners(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var o=refineProps(r,n),i=o.refined,a=o.extra,s=buildEventSourceMeta(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:guid(),sourceDefId:s.sourceDefId,meta:s.meta,ui:createEventUi(i,t),extendedProps:a}}return null}function buildEventSourceRefiners(e){return __assign$1(__assign$1(__assign$1({},EVENT_UI_REFINERS),EVENT_SOURCE_REFINERS),e.pluginHooks.eventSourceRefiners)}function buildEventSourceMeta(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r-=1){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}function reduceCurrentDate(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}function getInitialDate(e,t){var n=e.initialDate;return null!=n?t.createMarker(n):getNow(e.now,t)}function getNow(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var CalendarApi=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,__spreadArray([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),o=r.viewSpecs,i=r.toolbarConfig,a=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(var s in o)a.push(s);for(t=0;t<a.length;t+=1)if((n=o[a[t]])&&n.singleUnit===e)return n;return null},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:getNow(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=createDuration(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),createFormatter(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),createFormatter(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),o=parseDateSpan(n,r.dateEnv,createDuration({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),triggerDateSelect(o,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),triggerDateUnselect(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof EventApi){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:eventTupleToStore({def:n,instance:r})}),this.triggerEventAdd(e)),e}var o,i=this.getCurrentData();if(t instanceof EventSourceApi)o=t.internalEventSource;else if("boolean"==typeof t)t&&(o=hashValuesToArray(i.eventSources)[0]);else if(null!=t){var a=this.getEventSourceById(t);if(!a)return console.warn('Could not find an event source with ID "'+t+'"'),null;o=a.internalEventSource}var s=parseEvent(e,o,i,!1);if(s){var l=new EventApi(i,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:eventTupleToStore(s)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:eventApiToStore(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,o=n.instances;for(var i in e=String(e),r){var a=r[i];if(a.publicId===e){if(a.recurringDef)return new EventApi(t,a,null);for(var s in o){var l=o[s];if(l.defId===a.defId)return new EventApi(t,a,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return buildEventApis(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new EventSourceApi(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new EventSourceApi(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof EventSourceApi)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=parseEventSource(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new EventSourceApi(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})},e.prototype.scrollToTime=function(e){var t=createDuration(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),EventApi=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in EVENT_DATE_REFINERS)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=EVENT_NON_DATE_REFINERS[e](t),this.mutate({standardProps:{publicId:t}});else if(e in EVENT_NON_DATE_REFINERS)t=EVENT_NON_DATE_REFINERS[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in EVENT_UI_REFINERS){var o=EVENT_UI_REFINERS[e](t);"color"===e?o={backgroundColor:t,borderColor:t}:"editable"===e?o={startEditable:t,durationEditable:t}:((r={})[e]=t,o=r),this.mutate({standardProps:{ui:o}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var o=diffDates(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var o=diffDates(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,o=this._context.dateEnv,i={allDay:n.allDay},a=o.createMarker(e);if(a&&(null==t||(r=o.createMarker(t)))&&this._instance){var s=this._instance.range;!0===n.allDay&&(s=computeAlignedDayRange(s));var l=diffDates(s.start,a,o,n.granularity);if(r){var u=diffDates(s.end,r,o,n.granularity);durationsEqual(l,u)?this.mutate({datesDelta:l,standardProps:i}):this.mutate({startDelta:l,endDelta:u,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:l,standardProps:i})}},e.prototype.moveStart=function(e){var t=createDuration(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=createDuration(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=createDuration(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=createFormatter(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,o=this._context,i=o.getCurrentData().eventStore,a=getRelevantEvents(i,n.instanceId);a=applyMutationToEventStore(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,o);var s=new e(o,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:a}),o.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:buildEventApis(a,o,n),revert:function(){o.dispatch({type:"RESET_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=eventApiToStore(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new EventSourceApi(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,r=this.startStr,o=this.endStr,i={};return t.title&&(i.title=t.title),r&&(i.start=r),o&&(i.end=o),t.publicId&&(i.id=t.publicId),t.groupId&&(i.groupId=t.groupId),t.url&&(i.url=t.url),n.display&&"auto"!==n.display&&(i.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?i.color=n.backgroundColor:(n.backgroundColor&&(i.backgroundColor=n.backgroundColor),n.borderColor&&(i.borderColor=n.borderColor)),n.textColor&&(i.textColor=n.textColor),n.classNames.length&&(i.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?__assign$1(i,t.extendedProps):i.extendedProps=t.extendedProps),i},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function eventApiToStore(e){var t,n,r=e._def,o=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:o?(n={},n[o.instanceId]=o,n):{}}}function buildEventApis(e,t,n){var r=e.defs,o=e.instances,i=[],a=n?n.instanceId:"";for(var s in o){var l=o[s],u=r[l.defId];l.instanceId!==a&&i.push(new EventApi(t,u,l))}return i}var calendarSystemClassMap={};function registerCalendarSystem(e,t){calendarSystemClassMap[e]=t}function createCalendarSystem(e){return new calendarSystemClassMap[e]}var GregorianCalendarSystem=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return arrayToUtcDate(e)},e.prototype.markerToArray=function(e){return dateToUtcArray(e)},e}();registerCalendarSystem("gregory",GregorianCalendarSystem);var ISO_RE=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function parse(e){var t=ISO_RE.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(isValidDate(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var DateEnv=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=createCalendarSystem(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):arrayToUtcDate(dateToLocalArray(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=arrayToUtcDate(e)),null!==t&&isValidDate(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=parse(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return timeAsMs(e)===timeAsMs(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return timeAsMs(e)===timeAsMs(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=diffWholeWeeks(e,t))?{unit:"week",value:n}:null!==(n=diffWholeDays(e,t))?{unit:"day",value:n}:isInt(n=diffHours(e,t))?{unit:"hour",value:n}:isInt(n=diffMinutes(e,t))?{unit:"minute",value:n}:isInt(n=diffSeconds(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/asRoughYears(n):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/asRoughMonths(n):n.days&&null!==(r=diffWholeDays(e,t))?r/asRoughDays(n):(t.valueOf()-e.valueOf())/asRoughMs(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?startOfDay(e):"hour"===t?startOfHour(e):"minute"===t?startOfMinute(e):"second"===t?startOfSecond(e):null},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):weekOfYear(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=addMs(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),buildIsoString(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?arrayToUtcDate(dateToLocalArray(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-arrayToLocalDate(dateToUtcArray(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?arrayToLocalDate(dateToUtcArray(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(e))*60):new Date(e.valueOf()-(t||0))},e}(),globalLocales=[],MINIMAL_RAW_EN_LOCALE={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},RAW_EN_LOCALE=__assign$1(__assign$1({},MINIMAL_RAW_EN_LOCALE),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function organizeRawLocales(e){for(var t=e.length>0?e[0].code:"en",n=globalLocales.concat(e),r={en:RAW_EN_LOCALE},o=0,i=n;o<i.length;o++){var a=i[o];r[a.code]=a}return{map:r,defaultCode:t}}function buildLocale(e,t){return"object"!=typeof e||Array.isArray(e)?queryLocale(e,t):parseLocale(e.code,[e.code],e)}function queryLocale(e,t){var n=[].concat(e||[]);return parseLocale(e,n,queryRawLocale(n,t)||RAW_EN_LOCALE)}function queryRawLocale(e,t){for(var n=0;n<e.length;n+=1)for(var r=e[n].toLocaleLowerCase().split("-"),o=r.length;o>0;o-=1){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}function parseLocale(e,t,n){var r=mergeProps([MINIMAL_RAW_EN_LOCALE,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var DEF_DEFAULTS={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"},canVGrowWithinCell;function parseBusinessHours(e,t){return parseEvents(refineInputs(e),null,t)}function refineInputs(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return __assign$1(__assign$1({},DEF_DEFAULTS),e)}))}function pointInsideRect(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function intersectRects(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function constrainPoint(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function getRectCenter(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function diffPoints(e,t){return{left:e.left-t.left,top:e.top-t.top}}function getCanVGrowWithinCell(){return null==canVGrowWithinCell&&(canVGrowWithinCell=computeCanVGrowWithinCell()),canVGrowWithinCell}function computeCanVGrowWithinCell(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}var EMPTY_EVENT_STORE=createEmptyEventStore(),Splitter=function(){function e(){this.getKeysForEventDefs=memoize(this._getKeysForEventDefs),this.splitDateSelection=memoize(this._splitDateSpan),this.splitEventStore=memoize(this._splitEventStore),this.splitIndividualUi=memoize(this._splitIndividualUi),this.splitEventDrag=memoize(this._splitInteraction),this.splitEventResize=memoize(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=mapHash(n,(function(e,n){return t.eventUiBuilders[n]||memoize(buildEventUiForKey)})),n){var d=n[c],p=a[c]||EMPTY_EVENT_STORE,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:o[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],d.ui,i[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return mapHash(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,o={};for(var i in n)for(var a=0,s=t[i];a<s.length;a++){o[p=s[a]]||(o[p]=createEmptyEventStore()),o[p].defs[i]=n[i]}for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var p;o[p=d[c]]&&(o[p].instances[l]=u)}return o},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var o=0,i=t[r];o<i.length;o++){var a=i[o];n[a]||(n[a]={}),n[a][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),o=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||EMPTY_EVENT_STORE,mutatedEvents:o[r]||EMPTY_EVENT_STORE,isEvent:e.isEvent})};for(var a in n)i(a);for(var a in o)i(a)}return t},e}();function buildEventUiForKey(e,t,n){var r=[];e&&r.push(e),t&&r.push(t);var o={"":combineEventUis(r)};return n&&__assign$1(o,n),o}function getDateMeta(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!rangeContainsMarker(r.activeRange,e)),isOther:Boolean(r&&!rangeContainsMarker(r.currentRange,e)),isToday:Boolean(t&&rangeContainsMarker(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function getDayClassNames(e,t){var n=["fc-day","fc-day-"+DAY_IDS[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}var DAY_FORMAT=createFormatter({year:"numeric",month:"long",day:"numeric"}),WEEK_FORMAT=createFormatter({week:"long"});function buildNavLinkAttrs(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var o=e.dateEnv,i=e.options,a=e.calendarApi,s=o.format(t,"week"===n?WEEK_FORMAT:DAY_FORMAT);if(i.navLinks){var l=o.toDate(t),u=function(e){var r="day"===n?i.navLinkDayClick:"week"===n?i.navLinkWeekClick:null;"function"==typeof r?r.call(a,o.toDate(t),e):("string"==typeof r&&(n=r),a.zoomTo(t,n))};return __assign$1({title:formatWithOrdinals(i.navLinkHint,[s,l],s),"data-navlink":""},r?createAriaClickAttrs(u):{onClick:u})}return{"aria-label":s}}var _isRtlScrollbarOnLeft=null,_scrollbarWidths;function getIsRtlScrollbarOnLeft(){return null===_isRtlScrollbarOnLeft&&(_isRtlScrollbarOnLeft=computeIsRtlScrollbarOnLeft()),_isRtlScrollbarOnLeft}function computeIsRtlScrollbarOnLeft(){var e=document.createElement("div");applyStyle(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return removeElement(e),t}function getScrollbarWidths(){return _scrollbarWidths||(_scrollbarWidths=computeScrollbarWidths()),_scrollbarWidths}function computeScrollbarWidths(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=computeScrollbarWidthsForEl(e);return document.body.removeChild(e),t}function computeScrollbarWidthsForEl(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function computeEdges(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=computeScrollbarWidthsForEl(e),l=s.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return getIsRtlScrollbarOnLeft()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function computeInnerRect(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():computeRect(e),o=computeEdges(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function computeRect(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function computeClippedClientRect(e){for(var t=getClippingParents(e),n=e.getBoundingClientRect(),r=0,o=t;r<o.length;r++){var i=intersectRects(n,o[r].getBoundingClientRect());if(!i)return null;n=i}return n}function getClippingParents(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function unpromisify(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var Emitter=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){addToHash(this.handlers,e,t)},e.prototype.off=function(e,t){removeFromHash(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],o=this.options&&this.options[e],i=[].concat(o||[],r),a=0,s=i;a<s.length;a++){var l=s[a];l.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])},e}();function addToHash(e,t,n){(e[t]||(e[t]=[])).push(n)}function removeFromHash(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}var PositionCache=function(){function e(e,t,n,r){this.els=t;var o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,o=n.length;for(t=0;t<o;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),ScrollController=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),ElementScrollController=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return __extends(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(ScrollController),WindowScrollController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(ScrollController),Theme=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=__assign$1({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();Theme.prototype.classes={},Theme.prototype.iconClasses={},Theme.prototype.baseIconClass="",Theme.prototype.iconOverridePrefix="";var ScrollResponder=function(){function e(e,t,n,r){var o=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=function(e){o.queuedRequest=__assign$1({},o.queuedRequest||{},e),o.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),ViewContextType=createContext({});function buildViewContext(e,t,n,r,o,i,a,s,l,u,c,d,p){return{dateEnv:o,options:n,pluginHooks:a,emitter:u,dispatch:s,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new ScrollResponder(e,u,createDuration(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:d,unregisterInteractiveComponent:p}}var PureComponent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(getUnequalProps(e,this.props),getUnequalProps(t,this.state)),!compareObjs(this.props,e,this.propEquality)||!compareObjs(this.state,t,this.stateEquality)},t.prototype.safeSetState=function(e){compareObjs(this.state,__assign$1(__assign$1({},this.state),e),this.stateEquality)||this.setState(e)},t.addPropsEquality=addPropsEquality,t.addStateEquality=addStateEquality,t.contextType=ViewContextType,t}(Component);PureComponent.prototype.propEquality={},PureComponent.prototype.stateEquality={};var BaseComponent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.contextType=ViewContextType,t}(PureComponent);function addPropsEquality(e){var t=Object.create(this.prototype.propEquality);__assign$1(t,e),this.prototype.propEquality=t}function addStateEquality(e){var t=Object.create(this.prototype.stateEquality);__assign$1(t,e),this.prototype.stateEquality=t}function setRef(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var DateComponent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=guid(),t}return __extends(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!elementClosest(e,".fc-event-mirror")},t.prototype.isValidDateDownEl=function(e){return!(elementClosest(e,".fc-event:not(.fc-bg-event)")||elementClosest(e,".fc-more-link")||elementClosest(e,"a[data-navlink]")||elementClosest(e,".fc-popover"))},t}(BaseComponent);function createPlugin(e){return{id:guid(),deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function buildPluginHooks(e,t){var n={},r={reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,i=e;t<i.length;t++){var a=i[t];n[a.id]||(n[a.id]=!0,o(a.deps),r=combineHooks(r,a))}}return e&&o(e),o(t),r}function buildBuildPluginHooks(){var e,t=[],n=[];return function(r,o){return e&&isArraysEqual(r,t)&&isArraysEqual(o,n)||(e=buildPluginHooks(r,o)),t=r,n=o,e}}function combineHooks(e,t){return{reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:__assign$1(__assign$1({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:__assign$1(__assign$1({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:__assign$1(__assign$1({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:__assign$1(__assign$1({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:__assign$1(__assign$1({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,contentTypeHandlers:__assign$1(__assign$1({},e.contentTypeHandlers),t.contentTypeHandlers),listenerRefiners:__assign$1(__assign$1({},e.listenerRefiners),t.listenerRefiners),optionRefiners:__assign$1(__assign$1({},e.optionRefiners),t.optionRefiners),propSetHandlers:__assign$1(__assign$1({},e.propSetHandlers),t.propSetHandlers)}}var StandardTheme=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(Theme);function compileViewDefs(e,t){var n,r={};for(n in e)ensureViewDef(n,r,e,t);for(n in t)ensureViewDef(n,r,e,t);return r}function ensureViewDef(e,t,n,r){if(t[e])return t[e];var o=buildViewDef(e,t,n,r);return o&&(t[e]=o),o}function buildViewDef(e,t,n,r){var o=n[e],i=r[e],a=function(e){return o&&null!==o[e]?o[e]:i&&null!==i[e]?i[e]:null},s=a("component"),l=a("superType"),u=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");u=ensureViewDef(l,t,n,r)}return!s&&u&&(s=u.component),s?{type:e,component:s,defaults:__assign$1(__assign$1({},u?u.defaults:{}),o?o.rawOptions:{}),overrides:__assign$1(__assign$1({},u?u.overrides:{}),i?i.rawOptions:{})}:null}StandardTheme.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},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.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},StandardTheme.prototype.iconOverrideOption="buttonIcons",StandardTheme.prototype.iconOverrideCustomButtonOption="icon",StandardTheme.prototype.iconOverridePrefix="fc-icon-";var RenderHook=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t.handleRootEl=function(e){setRef(t.rootElRef,e),t.props.elRef&&setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return createElement(MountHook,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return createElement(ContentHook,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,o){return t.children(r,normalizeClassNames(t.classNames,n),e,o)}))}))},t}(BaseComponent),CustomContentRenderContext=createContext(0);function ContentHook(e){return createElement(CustomContentRenderContext.Consumer,null,(function(t){return createElement(ContentHookInner,__assign$1({renderId:t},e))}))}var ContentHookInner=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.componentWillUnmount=function(){this.customContentInfo&&this.customContentInfo.destroy&&this.customContentInfo.destroy()},t.prototype.renderInnerContent=function(){var e=this.customContentInfo,t=this.getInnerContent(),n=this.getContentMeta(t);return e&&e.contentKey===n.contentKey?e&&(e.contentVal=t[n.contentKey]):(e&&(e.destroy&&e.destroy(),e=this.customContentInfo=null),n.contentKey&&(e=this.customContentInfo=__assign$1({contentKey:n.contentKey,contentVal:t[n.contentKey]},n.buildLifecycleFuncs()))),e?[]:t},t.prototype.getInnerContent=function(){var e=this.props,t=normalizeContent(e.content,e.hookProps);return void 0===t&&(t=normalizeContent(e.defaultContent,e.hookProps)),null==t?null:t},t.prototype.getContentMeta=function(e){var t=this.context.pluginHooks.contentTypeHandlers,n="",r=null;if(e)for(var o in t)if(void 0!==e[o]){n=o,r=t[o];break}return{contentKey:n,buildLifecycleFuncs:r}},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.render(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(BaseComponent),MountHook=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(__assign$1(__assign$1({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(__assign$1(__assign$1({},this.props.hookProps),{el:this.rootEl}))},t}(BaseComponent);function buildClassNameNormalizer(){var e,t,n=[];return function(r,o){return t&&isPropsEqual(t,o)&&r===e||(e=r,t=o,n=normalizeClassNames(r,o)),n}}function normalizeClassNames(e,t){return"function"==typeof e&&(e=e(t)),parseClassNames(e)}function normalizeContent(e,t){return"function"==typeof e?e(t,createElement):e}var ViewRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=buildClassNameNormalizer(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},o=this.normalizeClassNames(n.viewClassNames,r);return createElement(MountHook,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(o))}))},t}(BaseComponent);function parseViewConfigs(e){return mapHash(e,parseViewConfig)}function parseViewConfig(e){var t="function"==typeof e?{component:e}:e,n=t.component;return t.content&&(n=createViewHookComponent(t)),{superType:t.type,component:n,rawOptions:t}}function createViewHookComponent(e){return function(t){return createElement(ViewContextType.Consumer,null,(function(n){return createElement(ViewRoot,{viewSpec:n.viewSpec},(function(r,o){var i=__assign$1(__assign$1({},t),{nextDayThreshold:n.options.nextDayThreshold});return createElement(RenderHook,{hookProps:i,classNames:e.classNames,content:e.content,didMount:e.didMount,willUnmount:e.willUnmount,elRef:r},(function(e,t,n,r){return createElement("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}}function buildViewSpecs(e,t,n,r){var o=parseViewConfigs(e),i=parseViewConfigs(t.views);return mapHash(compileViewDefs(o,i),(function(e){return buildViewSpec(e,i,t,n,r)}))}function buildViewSpec(e,t,n,r,o){var i=e.overrides.duration||e.defaults.duration||r.duration||n.duration,a=null,s="",l="",u={};if(i&&(a=createDurationCached(i))){var c=greatestDurationDenominator(a);s=c.unit,1===c.value&&(l=s,u=t[s]?t[s].rawOptions:{})}var d=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},p=function(t){var n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:a,durationUnit:s,singleUnit:l,optionDefaults:e.defaults,optionOverrides:__assign$1(__assign$1({},u),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(o)||e.defaults.buttonText||d(BASE_OPTION_DEFAULTS)||e.type,buttonTitleOverride:p(r)||p(n)||e.overrides.buttonHint,buttonTitleDefault:p(o)||e.defaults.buttonHint||p(BASE_OPTION_DEFAULTS)}}var durationInputMap={};function createDurationCached(e){var t=JSON.stringify(e),n=durationInputMap[t];return void 0===n&&(n=createDuration(e),durationInputMap[t]=n),n}var DateProfileGenerator=function(){function e(e){this.props=e,this.nowDate=getNow(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,s,l,u=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=constrainMarkerToRange(e,r)),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),u.showNonCurrentDates||(s=intersectRanges(s,o.range)),s=intersectRanges(s=this.adjustActiveRange(s),r),l=rangesIntersect(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:u.slotMinTime,slotMaxTime:u.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=greatestDurationDenominator(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return createDuration({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(asRoughDays(o)<0&&(a=startOfDay(a),a=n.add(a,o)),asRoughDays(i)>1&&(s=addDays(s=startOfDay(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,u=s.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&asRoughMs(c)<asRoughMs(n)?greatestDurationDenominator(c).unit:r}function d(){o=l.startOf(e,u),i=l.add(o,n),a={start:o,end:i}}return asRoughDays(n)<=1&&this.isHiddenDay(o)&&(o=startOfDay(o=this.skipHiddenDays(o,t))),d(),this.trimHiddenDays(a)||(e=this.skipHiddenDays(e,t),d()),a},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,o=this.props,i=o.dateEnv,a=o.dateAlignment,s=0,l=e;a&&(l=i.startOf(l,a)),l=startOfDay(l),r=l=this.skipHiddenDays(l,t);do{r=addDays(r,1),this.isHiddenDay(r)||(s+=1)}while(s<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?createDuration(1,t):e||createDuration({days:1}))},e.prototype.refineRange=function(e){if(e){var t=parseRange(e,this.props.dateEnv);return t&&(t=computeVisibleDayRange(t)),t}return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=addDays(e,t);return e},e}();function reduceViewType(e,t){if("CHANGE_VIEW_TYPE"===t.type)e=t.viewType;return e}function reduceDynamicOptionOverrides(e,t){var n;return"SET_OPTION"===t.type?__assign$1(__assign$1({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}function reduceDateProfile(e,t,n,r){var o;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if((o=r.buildPrev(e,n)).isValid)return o;break;case"NEXT":if((o=r.buildNext(e,n)).isValid)return o}return e}function initEventSources(e,t,n){var r=t?t.activeRange:null;return addSources({},parseInitialSources(e,n),r,n)}function reduceEventSources(e,t,n,r){var o=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return addSources(e,t.sources,o,r);case"REMOVE_EVENT_SOURCE":return removeSource(e,t.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?fetchDirtySources(e,o,r):e;case"FETCH_EVENT_SOURCES":return fetchSourcesByIds(e,t.sourceIds?arrayToHash(t.sourceIds):excludeStaticSources(e,r),o,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return receiveResponse(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function reduceEventSourcesNewTimeZone(e,t,n){var r=t?t.activeRange:null;return fetchSourcesByIds(e,excludeStaticSources(e,n),r,!0,n)}function computeEventSourcesLoading(e){for(var t in e)if(e[t].isFetching)return!0;return!1}function addSources(e,t,n,r){for(var o={},i=0,a=t;i<a.length;i++){var s=a[i];o[s.sourceId]=s}return n&&(o=fetchDirtySources(o,n,r)),__assign$1(__assign$1({},e),o)}function removeSource(e,t){return filterHash(e,(function(e){return e.sourceId!==t}))}function fetchDirtySources(e,t,n){return fetchSourcesByIds(e,filterHash(e,(function(e){return isSourceDirty(e,t,n)})),t,!1,n)}function isSourceDirty(e,t,n){return doesSourceNeedRange(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function fetchSourcesByIds(e,t,n,r,o){var i={};for(var a in e){var s=e[a];t[a]?i[a]=fetchSource(s,n,r,o):i[a]=s}return i}function fetchSource(e,t,n,r){var o=r.options,i=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=guid();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var a=n.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,n.xhr)||a),e.success&&(a=e.success.call(i,a,n.xhr)||a),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:a})}),(function(n){console.warn(n.message,n),o.eventSourceFailure&&o.eventSourceFailure.call(i,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})})),__assign$1(__assign$1({},e),{isFetching:!0,latestFetchId:s})}function receiveResponse(e,t,n,r){var o,i=e[t];return i&&n===i.latestFetchId?__assign$1(__assign$1({},e),((o={})[t]=__assign$1(__assign$1({},i),{isFetching:!1,fetchRange:r}),o)):e}function excludeStaticSources(e,t){return filterHash(e,(function(e){return doesSourceNeedRange(e,t)}))}function parseInitialSources(e,t){var n=buildEventSourceRefiners(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var i=0,a=r;i<a.length;i++){var s=parseEventSource(a[i],t,n);s&&o.push(s)}return o}function doesSourceNeedRange(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function reduceEventStore(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return receiveRawEvents(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return addEvent(e,t.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return mergeEventStores(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?expandRecurring(e,r.activeRange,o):e;case"REMOVE_EVENTS":return excludeSubEventStore(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return excludeEventsBySourceId(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return filterEventStoreDefs(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return createEmptyEventStore();default:return e}}function receiveRawEvents(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=parseEvents(transformRawEvents(o,t,i),t,i);return r&&(a=expandRecurring(a,r,i)),mergeEventStores(excludeEventsBySourceId(e,t.sourceId),a)}return e}function transformRawEvents(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;return o&&(e=transformEachRawEvent(e,o)),r&&(e=transformEachRawEvent(e,r)),e}function transformEachRawEvent(e,t){var n;if(t){n=[];for(var r=0,o=e;r<o.length;r++){var i=o[r],a=t(i);a?n.push(a):null==a&&n.push(i)}}else n=e;return n}function addEvent(e,t,n,r){return n&&(t=expandRecurring(t,n,r)),mergeEventStores(e,t)}function rezoneEventStoreDates(e,t,n){var r=e.defs,o=mapHash(e.instances,(function(e){var o=r[e.defId];return o.allDay||o.recurringDef?e:__assign$1(__assign$1({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})}));return{defs:r,instances:o}}function excludeEventsBySourceId(e,t){return filterEventStoreDefs(e,(function(e){return e.sourceId!==t}))}function excludeInstances(e,t){return{defs:e.defs,instances:filterHash(e.instances,(function(e){return!t[e.instanceId]}))}}function reduceDateSelection(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function reduceSelectedEvent(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function reduceEventDrag(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function reduceEventResize(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function parseToolbars(e,t,n,r,o){return{header:e.headerToolbar?parseToolbar(e.headerToolbar,e,t,n,r,o):null,footer:e.footerToolbar?parseToolbar(e.footerToolbar,e,t,n,r,o):null}}function parseToolbar(e,t,n,r,o,i){var a={},s=[],l=!1;for(var u in e){var c=parseSection(e[u],t,n,r,o,i);a[u]=c.widgets,s.push.apply(s,c.viewsWithButtons),l=l||c.hasTitle}return{sectionWidgets:a,viewsWithButtons:s,hasTitle:l}}function parseSection(e,t,n,r,o,i){var a="rtl"===t.direction,s=t.customButtons||{},l=n.buttonText||{},u=t.buttonText||{},c=n.buttonHints||{},d=t.buttonHints||{},p=e?e.split(" "):[],f=[],h=!1;return{widgets:p.map((function(e){return e.split(",").map((function(e){if("title"===e)return h=!0,{buttonName:e};var n,p,g,m,v,y;if(n=s[e])g=function(e){n.click&&n.click.call(e.target,e,e.target)},(m=r.getCustomButtonIconClass(n))||(m=r.getIconClass(e,a))||(v=n.text),y=n.hint||n.text;else if(p=o[e]){f.push(e),g=function(){i.changeView(e)},(v=p.buttonTextOverride)||(m=r.getIconClass(e,a))||(v=p.buttonTextDefault);var E=p.buttonTextOverride||p.buttonTextDefault;y=formatWithOrdinals(p.buttonTitleOverride||p.buttonTitleDefault||t.viewHint,[E,e],E)}else if(i[e])if(g=function(){i[e]()},(v=l[e])||(m=r.getIconClass(e,a))||(v=u[e]),"prevYear"===e||"nextYear"===e){var S="prevYear"===e?"prev":"next";y=formatWithOrdinals(c[S]||d[S],[u.year||"year","year"],u[e])}else y=function(t){return formatWithOrdinals(c[e]||d[e],[u[t]||t,t],u[e])};return{buttonName:e,buttonClick:g,buttonIcon:m,buttonText:v,buttonHint:y}}))})),viewsWithButtons:f,hasTitle:h}}var eventSourceDef$2={ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}},arrayEventSourcePlugin=createPlugin({eventSourceDefs:[eventSourceDef$2]}),eventSourceDef$1={parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;unpromisify(e.eventSource.meta.bind(null,buildRangeApiWithTimeZone(e.range,r)),(function(e){t({rawEvents:e})}),n)}},funcEventSourcePlugin=createPlugin({eventSourceDefs:[eventSourceDef$1]});function requestJson(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=injectQueryStringParams(t,n):i=encodeParams(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function injectQueryStringParams(e,t){return e+(-1===e.indexOf("?")?"?":"&")+encodeParams(t)}function encodeParams(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var JSON_FEED_EVENT_SOURCE_REFINERS={method:String,extraParams:identity,startParam:String,endParam:String,timeZoneParam:String},eventSourceDef={parseMeta:function(e){return!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,o=buildRequestParams(r,e.range,e.context);requestJson(r.method,r.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}},jsonFeedEventSourcePlugin=createPlugin({eventSourceRefiners:JSON_FEED_EVENT_SOURCE_REFINERS,eventSourceDefs:[eventSourceDef]});function buildRequestParams(e,t,n){var r,o,i,a,s=n.dateEnv,l=n.options,u={};return null==(r=e.startParam)&&(r=l.startParam),null==(o=e.endParam)&&(o=l.endParam),null==(i=e.timeZoneParam)&&(i=l.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},__assign$1(u,a),u[r]=s.formatIso(t.start),u[o]=s.formatIso(t.end),"local"!==s.timeZone&&(u[i]=s.timeZone),u}var SIMPLE_RECURRING_REFINERS={daysOfWeek:identity,startTime:createDuration,endTime:createDuration,duration:createDuration,startRecur:identity,endRecur:identity},recurring={parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=subtractDurations(e.endTime,e.startTime)),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}return null},expand:function(e,t,n){var r=intersectRanges(t,{start:e.startRecur,end:e.endRecur});return r?expandRanges(e.daysOfWeek,e.startTime,r,n):[]}},simpleRecurringEventsPlugin=createPlugin({recurringTypes:[recurring],eventRefiners:SIMPLE_RECURRING_REFINERS});function expandRanges(e,t,n,r){for(var o=e?arrayToHash(e):null,i=startOfDay(n.start),a=n.end,s=[];i<a;){var l=void 0;o&&!o[i.getUTCDay()]||(l=t?r.add(i,t):i,s.push(l)),i=addDays(i,1)}return s}var changeHandlerPlugin=createPlugin({optionChangeHandlers:{events:function(e,t){handleEventSources([e],t)},eventSources:handleEventSources}});function handleEventSources(e,t){for(var n=hashValuesToArray(t.getCurrentData().eventSources),r=[],o=0,i=e;o<i.length;o++){for(var a=i[o],s=!1,l=0;l<n.length;l+=1)if(n[l]._raw===a){n.splice(l,1),s=!0;break}s||r.push(a)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var p=0,f=r;p<f.length;p++){var h=f[p];t.calendarApi.addEventSource(h)}}function handleDateProfile(e,t){t.emitter.trigger("datesSet",__assign$1(__assign$1({},buildRangeApiWithTimeZone(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function handleEventStore(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",buildEventApis(e,t))}var globalPlugins=[arrayEventSourcePlugin,funcEventSourcePlugin,jsonFeedEventSourcePlugin,simpleRecurringEventsPlugin,changeHandlerPlugin,createPlugin({isLoadingFuncs:[function(e){return computeEventSourcesLoading(e.eventSources)}],contentTypeHandlers:{html:buildHtmlRenderer,domNodes:buildDomNodeRenderer},propSetHandlers:{dateProfile:handleDateProfile,eventStore:handleEventStore}})];function buildHtmlRenderer(){var e=null,t="";return{render:function(n,r){n===e&&r===t||(n.innerHTML=r),e=n,t=r},destroy:function(){e.innerHTML="",e=null,t=""}}}function buildDomNodeRenderer(){var e=null,t=[];function n(){t.forEach(removeElement),t=[],e=null}return{render:function(r,o){var i=Array.prototype.slice.call(o);if(r!==e||!isArraysEqual(t,i)){for(var a=0,s=i;a<s.length;a++){var l=s[a];r.appendChild(l)}n()}e=r,t=i},destroy:n}}var DelayedRunner=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;if(e in n){if(t)delete n[e];else n[e]-=1,n[e]<=0&&delete n[e];this.tryDrain()}},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),TaskRunner=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new DelayedRunner(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function buildTitle(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,createFormatter(t.titleFormat||buildTitleFormat(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function buildTitleFormat(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=diffWholeDays(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}var CalendarDataManager=function(){function e(e){var t=this;this.computeOptionsData=memoize(this._computeOptionsData),this.computeCurrentViewData=memoize(this._computeCurrentViewData),this.organizeRawLocales=memoize(organizeRawLocales),this.buildLocale=memoize(buildLocale),this.buildPluginHooks=buildBuildPluginHooks(),this.buildDateEnv=memoize(buildDateEnv),this.buildTheme=memoize(buildTheme),this.parseToolbars=memoize(parseToolbars),this.buildViewSpecs=memoize(buildViewSpecs),this.buildDateProfileGenerator=memoizeObjArg(buildDateProfileGenerator),this.buildViewApi=memoize(buildViewApi),this.buildViewUiProps=memoizeObjArg(buildViewUiProps),this.buildEventUiBySource=memoize(buildEventUiBySource,isPropsEqual),this.buildEventUiBases=memoize(buildEventUiBases),this.parseContextBusinessHours=memoizeObjArg(parseContextBusinessHours),this.buildTitle=memoize(buildTitle),this.emitter=new Emitter,this.actionRunner=new TaskRunner(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(o,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);var a=getInitialDate(r.calendarOptions,r.dateEnv),s=i.dateProfileGenerator.build(a);rangeContainsMarker(s.activeRange,a)||(a=s.currentRange.start);for(var l={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},u=0,c=r.pluginHooks.contextInit;u<c.length;u++){(0,c[u])(l)}for(var d=initEventSources(r.calendarOptions,s,l),p={dynamicOptionOverrides:n,currentViewType:o,currentDate:a,dateProfile:s,businessHours:this.parseContextBusinessHours(l),eventSources:d,eventUiBases:{},eventStore:createEmptyEventStore(),renderableEventStore:createEmptyEventStore(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(l).selectionConfig},f=__assign$1(__assign$1({},l),p),h=0,g=r.pluginHooks.reducers;h<g.length;h++){var m=g[h];__assign$1(p,m(null,null,f))}computeIsLoading(p,l)&&this.emitter.trigger("loading",!0),this.state=p,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?__assign$1(__assign$1({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this,n=t.props,r=t.state,o=t.emitter,i=reduceDynamicOptionOverrides(r.dynamicOptionOverrides,e),a=this.computeOptionsData(n.optionOverrides,i,n.calendarApi),s=reduceViewType(r.currentViewType,e),l=this.computeCurrentViewData(s,a,n.optionOverrides,i);n.calendarApi.currentDataManager=this,o.setThisContext(n.calendarApi),o.setOptions(l.options);var u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:o,getCurrentData:this.getCurrentData},c=r.currentDate,d=r.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=reduceDateProfile(d,e,c=reduceCurrentDate(c,e),l.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&rangeContainsMarker(d.currentRange,c)||(c=d.currentRange.start);for(var p=reduceEventSources(r.eventSources,e,d,u),f=reduceEventStore(r.eventStore,e,p,d,u),h=computeEventSourcesLoading(p)&&!l.options.progressiveEventRendering&&r.renderableEventStore||f,g=this.buildViewUiProps(u),m=g.eventUiSingleBase,v=g.selectionConfig,y=this.buildEventUiBySource(p),E={dynamicOptionOverrides:i,currentViewType:s,currentDate:c,dateProfile:d,eventSources:p,eventStore:f,renderableEventStore:h,selectionConfig:v,eventUiBases:this.buildEventUiBases(h.defs,m,y),businessHours:this.parseContextBusinessHours(u),dateSelection:reduceDateSelection(r.dateSelection,e),eventSelection:reduceSelectedEvent(r.eventSelection,e),eventDrag:reduceEventDrag(r.eventDrag,e),eventResize:reduceEventResize(r.eventResize,e)},S=__assign$1(__assign$1({},u),E),D=0,T=a.pluginHooks.reducers;D<T.length;D++){var b=T[D];__assign$1(E,b(r,e,S))}var w=computeIsLoading(r,u),C=computeIsLoading(E,u);!w&&C?o.trigger("loading",!0):w&&!C&&o.trigger("loading",!1),this.state=E,n.onAction&&n.onAction(e)},e.prototype.updateData=function(){var e=this.props,t=this.state,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),o=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),i=this.data=__assign$1(__assign$1(__assign$1({viewTitle:this.buildTitle(t.dateProfile,o.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),o),t),a=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,l=r.calendarOptions;if(s&&s!==l)for(var u in s.timeZone!==l.timeZone&&(t.eventSources=i.eventSources=reduceEventSourcesNewTimeZone(i.eventSources,t.dateProfile,i),t.eventStore=i.eventStore=rezoneEventStoreDates(i.eventStore,n.dateEnv,i.dateEnv)),a)s[u]!==l[u]&&a[u](l[u],i);e.onData&&e.onData(i)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),o=r.refinedOptions,i=r.pluginHooks,a=r.localeDefaults,s=r.availableLocaleData;warnUnknownOptions(r.extra);var l=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,i,s,o.defaultRangeSeparator),u=this.buildViewSpecs(i.views,e,t,a),c=this.buildTheme(o,i);return{calendarOptions:o,pluginHooks:i,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(o,e,c,u,n),localeDefaults:a,availableRawLocales:s.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=mergeRawOptions([BASE_OPTION_DEFAULTS,e,t]),r=n.locales,o=n.locale,i=this.organizeRawLocales(r),a=i.map,s=this.buildLocale(o||i.defaultCode,a).options,l=this.buildPluginHooks(e.plugins||[],globalPlugins),u=this.currentCalendarOptionsRefiners=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},BASE_OPTION_REFINERS),CALENDAR_LISTENER_REFINERS),CALENDAR_OPTION_REFINERS),l.listenerRefiners),l.optionRefiners),c={},d=mergeRawOptions([BASE_OPTION_DEFAULTS,s,e,t]),p={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,g=!1;for(var m in d)"plugins"!==m&&(d[m]===f[m]||COMPLEX_OPTION_COMPARATORS[m]&&m in f&&COMPLEX_OPTION_COMPARATORS[m](f[m],d[m])?p[m]=h[m]:u[m]?(p[m]=u[m](d[m]),g=!0):c[m]=f[m]);return g&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:i,localeDefaults:s,extra:c}},e.prototype._computeCurrentViewData=function(e,t,n,r){var o=t.viewSpecs[e];if(!o)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r),a=i.refinedOptions;return warnUnknownOptions(i.extra),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,monthMode:a.monthMode,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,r,o){var i=mergeRawOptions([BASE_OPTION_DEFAULTS,e.optionDefaults,n,r,e.optionOverrides,o]),a=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},BASE_OPTION_REFINERS),CALENDAR_LISTENER_REFINERS),CALENDAR_OPTION_REFINERS),VIEW_OPTION_REFINERS),t.listenerRefiners),t.optionRefiners),s={},l=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,c=!1,d={};for(var p in i)i[p]===l[p]||COMPLEX_OPTION_COMPARATORS[p]&&COMPLEX_OPTION_COMPARATORS[p](i[p],l[p])?s[p]=u[p]:(i[p]===this.currentCalendarOptionsInput[p]||COMPLEX_OPTION_COMPARATORS[p]&&COMPLEX_OPTION_COMPARATORS[p](i[p],this.currentCalendarOptionsInput[p])?p in this.currentCalendarOptionsRefined&&(s[p]=this.currentCalendarOptionsRefined[p]):a[p]?s[p]=a[p](i[p]):d[p]=i[p],c=!0);return c&&(this.currentViewOptionsInput=i,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}},e}();function buildDateEnv(e,t,n,r,o,i,a,s){var l=buildLocale(t||a.defaultCode,a.map);return new DateEnv({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:i.cmdFormatter,defaultSeparator:s})}function buildTheme(e,t){return new(t.themeClasses[e.themeSystem]||StandardTheme)(e)}function buildDateProfileGenerator(e){return new(e.dateProfileGeneratorClass||DateProfileGenerator)(e)}function buildViewApi(e,t,n){return new ViewApi(e,t,n)}function buildEventUiBySource(e){return mapHash(e,(function(e){return e.ui}))}function buildEventUiBases(e,t,n){var r={"":t};for(var o in e){var i=e[o];i.sourceId&&n[i.sourceId]&&(r[o]=n[i.sourceId])}return r}function buildViewUiProps(e){var t=e.options;return{eventUiSingleBase:createEventUi({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:createEventUi({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function computeIsLoading(e,t){for(var n=0,r=t.pluginHooks.isLoadingFuncs;n<r.length;n++){if((0,r[n])(e))return!0}return!1}function parseContextBusinessHours(e){return parseBusinessHours(e.options.businessHours,e)}function warnUnknownOptions(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var CalendarDataProvider=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new CalendarDataManager({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return __extends(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Component),SegHierarchy=function(){function e(){this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}return e.prototype.addSegs=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];this.insertEntry(o,t)}return t},e.prototype.insertEntry=function(e,t){var n=this.findInsertion(e);return this.isInsertionValid(n,e)?(this.insertEntryAt(e,n),1):this.handleInvalidInsertion(n,e,t)},e.prototype.isInsertionValid=function(e,t){return(-1===this.maxCoord||e.levelCoord+t.thickness<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)},e.prototype.handleInvalidInsertion=function(e,t,n){return this.allowReslicing&&e.touchingEntry?this.splitEntry(t,e.touchingEntry,n):(n.push(t),0)},e.prototype.splitEntry=function(e,t,n){var r=0,o=[],i=e.span,a=t.span;return i.start<a.start&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:a.start}},o)),i.end>a.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:a.end,end:i.end}},o)),r?(n.push.apply(n,__spreadArray([{index:e.index,thickness:e.thickness,span:intersectSpans(a,i)}],o)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(insertAt(r,t.level,t.levelCoord),insertAt(n,t.level,[e])):insertAt(n[t.level],t.lateral,e),this.stackCnts[buildEntryKey(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,o=t.strictOrder,i=t.stackCnts,a=n.length,s=0,l=-1,u=-1,c=null,d=0,p=0;p<a;p+=1){var f=n[p];if(!o&&f>=s+e.thickness)break;for(var h=r[p],g=void 0,m=binarySearch(h,e.span.start,getEntrySpanEnd),v=m[0]+m[1];(g=h[v])&&g.span.start<e.span.end;){var y=f+g.thickness;y>s&&(s=y,c=g,l=p,u=v),y===s&&(d=Math.max(d,i[buildEntryKey(g)]+1)),v+=1}}var E=0;if(c)for(E=l+1;E<a&&n[E]<s;)E+=1;var S=-1;return E<a&&n[E]===s&&(S=binarySearch(r[E],e.span.end,getEntrySpanEnd)[0]),{touchingLevel:l,touchingLateral:u,touchingEntry:c,stackCnt:d,levelCoord:s,level:E,lateral:S}},e.prototype.toRects=function(){for(var e=this.entriesByLevel,t=this.levelCoords,n=e.length,r=[],o=0;o<n;o+=1)for(var i=e[o],a=t[o],s=0,l=i;s<l.length;s++){var u=l[s];r.push(__assign$1(__assign$1({},u),{levelCoord:a}))}return r},e}();function getEntrySpanEnd(e){return e.span.end}function buildEntryKey(e){return e.index+":"+e.span.start}function groupIntersectingEntries(e){for(var t=[],n=0,r=e;n<r.length;n++){for(var o=r[n],i=[],a={span:o.span,entries:[o]},s=0,l=t;s<l.length;s++){var u=l[s];intersectSpans(u.span,a.span)?a={entries:u.entries.concat(a.entries),span:joinSpans(u.span,a.span)}:i.push(u)}i.push(a),t=i}return t}function joinSpans(e,t){return{start:Math.min(e.start,t.start),end:Math.max(e.end,t.end)}}function intersectSpans(e,t){var n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function insertAt(e,t,n){e.splice(t,0,n)}function binarySearch(e,t,n){var r=0,o=e.length;if(!o||t<n(e[r]))return[0,0];if(t>n(e[o-1]))return[o,0];for(;r<o;){var i=Math.floor(r+(o-r)/2),a=n(e[i]);if(t<a)o=i;else{if(!(t>a))return[i,1];r=i+1}}return[r,0]}var Interaction=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function parseInteractionSettings(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function interactionSettingsToStore(e){var t;return(t={})[e.component.uid]=e,t}var interactionSettingsStore={},ElementDragging=function(){function e(e,t){this.emitter=new Emitter}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),config={},ToolbarSection=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return createElement.apply(void 0,__spreadArray(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],o=!0,i=0,a=e;i<a.length;i++){var s=a[i],l=s.buttonName,u=s.buttonClick,c=s.buttonText,d=s.buttonIcon,p=s.buttonHint;if("title"===l)o=!1,r.push(createElement("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{var f=l===t.activeButton,h=!t.isTodayEnabled&&"today"===l||!t.isPrevEnabled&&"prev"===l||!t.isNextEnabled&&"next"===l,g=["fc-"+l+"-button",n.getClass("button")];f&&g.push(n.getClass("buttonActive")),r.push(createElement("button",{type:"button",title:"function"==typeof p?p(t.navUnit):p,disabled:h,"aria-pressed":f,className:g.join(" "),onClick:u},c||(d?createElement("span",{className:d}):"")))}}if(r.length>1){var m=o&&n.getClass("buttonGroup")||"";return createElement.apply(void 0,__spreadArray(["div",{className:m}],r))}return r[0]},t}(BaseComponent),Toolbar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,o=n.extraClassName,i=!1,a=r.sectionWidgets,s=a.center;return a.left?(i=!0,e=a.left):e=a.start,a.right?(i=!0,t=a.right):t=a.end,createElement("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return createElement(ToolbarSection,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(BaseComponent),ViewContainer=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,setRef(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",createElement("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(BaseComponent),EventClicking=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=getElSeg(t);if(i&&r.isValidSegDownEl(e.target)){var a=elementClosest(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new EventApi(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=listenBySelector(t.el,"click",".fc-event",n.handleSegClick),n}return __extends(t,e),t}(Interaction),EventHovering=function(e){function t(t){var n=e.call(this,t)||this;return n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){getElSeg(t)&&(n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))},n.removeHoverListeners=listenToHoverBySelector(t.el,".fc-event",n.handleSegEnter,n.handleSegLeave),n}return __extends(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=getElSeg(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new EventApi(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(Interaction),CalendarContent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=memoize(buildViewContext),t.buildViewPropTransformers=memoize(buildViewPropTransformers),t.buildToolbarProps=memoize(buildToolbarProps),t.headerRef=createRef(),t.footerRef=createRef(),t.interactionsStore={},t.state={viewLabelId:getUniqueDomId()},t.registerInteractiveComponent=function(e,n){var r=parseInteractionSettings(e,n),o=[EventClicking,EventHovering].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,interactionSettingsStore[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,o=n;r<o.length;r++){o[r].destroy()}delete t.interactionsStore[e.uid]}delete interactionSettingsStore[e.uid]},t.resizeRunner=new DelayedRunner((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return __extends(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,r=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,getNow(t.options.now,t.dateEnv),t.viewTitle),i=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=r.height?i=!0:null!=r.contentHeight?a=r.contentHeight:e=Math.max(r.aspectRatio,.5);var s=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:"";return createElement(ViewContextType.Provider,{value:s},n.header&&createElement(Toolbar,__assign$1({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},o)),createElement(ViewContainer,{liquid:i,height:a,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&createElement(Toolbar,__assign$1({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++){t[e].destroy()}this.props.emitter.trigger("_unmount")},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return createElement.apply(void 0,__spreadArray([Fragment,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,i=this.buildViewPropTransformers(t.viewPropsTransformers);o<i.length;o++){var a=i[o];__assign$1(r,a.transform(r,e))}var s=n.component;return createElement(s,__assign$1({},r))},t}(PureComponent);function buildToolbarProps(e,t,n,r,o,i){var a=n.build(o,void 0,!1),s=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:a.isValid&&!rangeContainsMarker(t.currentRange,o),isPrevEnabled:s.isValid,isNextEnabled:l.isValid}}function buildViewPropTransformers(e){return e.map((function(e){return new e}))}var CalendarRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return getCanVGrowWithinCell()||i.push("fc-liquid-hack"),e.children(i,o,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(BaseComponent);function computeFallbackHeaderFormat(e,t){return createFormatter(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var CLASS_NAME="fc-col-header-cell";function renderInner$1(e){return e.text}var TableDateCell=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,r=e.theme,o=e.viewApi,i=this.props,a=i.date,s=i.dateProfile,l=getDateMeta(a,i.todayRange,null,s),u=[CLASS_NAME].concat(getDayClassNames(l,r)),c=t.format(a,i.dayHeaderFormat),d=!l.isDisabled&&i.colCnt>1?buildNavLinkAttrs(this.context,a):{},p=__assign$1(__assign$1(__assign$1({date:t.toDate(a),view:o},i.extraHookProps),{text:c}),l);return createElement(RenderHook,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:renderInner$1,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return createElement("th",__assign$1({ref:e,role:"columnheader",className:u.concat(t).join(" "),"data-date":l.isDisabled?void 0:formatDayString(a),colSpan:i.colSpan},i.extraDataAttrs),createElement("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&createElement("a",__assign$1({ref:n,className:["fc-col-header-cell-cushion",i.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(BaseComponent),WEEKDAY_FORMAT=createFormatter({weekday:"long"}),TableDowCell=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,o=t.viewApi,i=t.options,a=addDays(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=[CLASS_NAME].concat(getDayClassNames(s,r),e.extraClassNames||[]),u=n.format(a,e.dayHeaderFormat),c=__assign$1(__assign$1(__assign$1(__assign$1({date:a},s),{view:o}),e.extraHookProps),{text:u});return createElement(RenderHook,{hookProps:c,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:renderInner$1,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(t,r,o,i){return createElement("th",__assign$1({ref:t,role:"columnheader",className:l.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),createElement("div",{className:"fc-scrollgrid-sync-inner"},createElement("a",{"aria-label":n.format(a,WEEKDAY_FORMAT),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(BaseComponent),NowTimer=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=getNow(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=addMs(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,createDuration(1,e.unit)),i=o.valueOf()-n.valueOf();return i=Math.min(864e5,i),{currentState:{nowDate:r,todayRange:buildDayRange(r)},nextState:{nowDate:o,todayRange:buildDayRange(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=ViewContextType,t}(Component);function buildDayRange(e){var t=startOfDay(e);return{start:t,end:addDays(t,1)}}var DayHeader=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=memoize(createDayHeaderFormatter),t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return createElement(NowTimer,{unit:"day"},(function(e,t){return createElement("tr",{role:"row"},i&&i("day"),n.map((function(e){return o?createElement(TableDateCell,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):createElement(TableDowCell,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(BaseComponent);function createDayHeaderFormatter(e,t,n){return e||computeFallbackHeaderFormat(t,n)}var DaySeriesModel=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n<r;)t.isHiddenDay(n)?o.push(a+.5):(a+=1,o.push(a),i.push(n)),n=addDays(n,1);this.dates=i,this.indices=o,this.cnt=i.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(addDays(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(o=Math.floor(o))?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(diffDays(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),DayTableModel=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n+=1);o=Math.ceil(i.length/n)}else o=1,n=i.length;this.rowCnt=o,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t+=1){for(var n=[],r=0;r<this.colCnt;r+=1)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var o=n.firstIndex,i=n.lastIndex,a=o;a<=i;){var s=Math.floor(a/t),l=Math.min((s+1)*t,i+1);r.push({row:s,firstCol:a%t,lastCol:(l-1)%t,isStart:n.isStart&&a===o,isEnd:n.isEnd&&l-1===i}),a=l}return r},e}(),Slicer=function(){function e(){this.sliceBusinessHours=memoize(this._sliceBusinessHours),this.sliceDateSelection=memoize(this._sliceDateSpan),this.sliceEventStore=memoize(this._sliceEventStore),this.sliceEventDrag=memoize(this._sliceInteraction),this.sliceEventResize=memoize(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var a=e.eventUiBases,s=this.sliceEventStore.apply(this,__spreadArray([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,__spreadArray([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,__spreadArray([e.businessHours,t,n,r],o)),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag.apply(this,__spreadArray([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,__spreadArray([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,__spreadArray([{range:{start:e,end:addMs(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];return e?this._sliceEventStore.apply(this,__spreadArray([expandRecurring(e,computeActiveRange(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(e){var a=sliceEventStore(e,t,computeActiveRange(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(!e)return null;var a=sliceEventStore(e.mutatedEvents,t,computeActiveRange(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var i=fabricateEventRange(e,t,n),a=this.sliceRange.apply(this,__spreadArray([e.range],r)),s=0,l=a;s<l.length;s++){var u=l[s];u.eventRange=i}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.sliceEventRange(i,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:addDays(n.start,1)});for(var r=this.sliceRange.apply(this,__spreadArray([n],t)),o=0,i=r;o<i.length;o++){var a=i[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function computeActiveRange(e,t){var n=e.activeRange;return t?n:{start:addMs(n.start,e.slotMinTime.milliseconds),end:addMs(n.end,e.slotMaxTime.milliseconds-864e5)}}function isInteractionValid(e,t,n){var r=e.mutatedEvents.instances;for(var o in r)if(!rangeContainsRange(t.validRange,r[o].range))return!1;return isNewPropsValid({eventDrag:e},n)}function isDateSelectionValid(e,t,n){return!!rangeContainsRange(t.validRange,e.range)&&isNewPropsValid({dateSelection:e},n)}function isNewPropsValid(e,t){var n=t.getCurrentData(),r=__assign$1({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||isPropsValid)(r,t)}function isPropsValid(e,t,n,r){return void 0===n&&(n={}),!(e.eventDrag&&!isInteractionPropsValid(e,t,n,r))&&!(e.dateSelection&&!isDateSelectionPropsValid(e,t,n,r))}function isInteractionPropsValid(e,t,n,r){var o=t.getCurrentData(),i=e.eventDrag,a=i.mutatedEvents,s=a.defs,l=a.instances,u=compileEventUis(s,i.isEvent?e.eventUiBases:{"":o.selectionConfig});r&&(u=mapHash(u,r));var c=excludeInstances(e.eventStore,i.affectedEvents.instances),d=c.defs,p=c.instances,f=compileEventUis(d,e.eventUiBases);for(var h in l){var g=l[h],m=g.range,v=u[g.defId],y=s[g.defId];if(!allConstraintsPass(v.constraints,m,c,e.businessHours,t))return!1;var E=t.options.eventOverlap,S="function"==typeof E?E:null;for(var D in p){var T=p[D];if(rangesIntersect(m,T.range)){if(!1===f[T.defId].overlap&&i.isEvent)return!1;if(!1===v.overlap)return!1;if(S&&!S(new EventApi(t,d[T.defId],T),new EventApi(t,y,g)))return!1}}for(var b=o.eventStore,w=0,C=v.allows;w<C.length;w++){var R=C[w],_=__assign$1(__assign$1({},n),{range:g.range,allDay:y.allDay}),x=b.defs[y.defId],k=b.instances[h],M=void 0;if(M=x?new EventApi(t,x,k):new EventApi(t,y),!R(buildDateSpanApiWithContext(_,t),M))return!1}}return!0}function isDateSelectionPropsValid(e,t,n,r){var o=e.eventStore,i=o.defs,a=o.instances,s=e.dateSelection,l=s.range,u=t.getCurrentData().selectionConfig;if(r&&(u=r(u)),!allConstraintsPass(u.constraints,l,o,e.businessHours,t))return!1;var c=t.options.selectOverlap,d="function"==typeof c?c:null;for(var p in a){var f=a[p];if(rangesIntersect(l,f.range)){if(!1===u.overlap)return!1;if(d&&!d(new EventApi(t,i[f.defId],f),null))return!1}}for(var h=0,g=u.allows;h<g.length;h++){if(!(0,g[h])(buildDateSpanApiWithContext(__assign$1(__assign$1({},n),s),t),null))return!1}return!0}function allConstraintsPass(e,t,n,r,o){for(var i=0,a=e;i<a.length;i++){if(!anyRangesContainRange(constraintToRanges(a[i],t,n,r,o),t))return!1}return!0}function constraintToRanges(e,t,n,r,o){return"businessHours"===e?eventStoreToRanges(expandRecurring(r,t,o)):"string"==typeof e?eventStoreToRanges(filterEventStoreDefs(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?eventStoreToRanges(expandRecurring(e,t,o)):[]}function eventStoreToRanges(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function anyRangesContainRange(e,t){for(var n=0,r=e;n<r.length;n++){if(rangeContainsRange(r[n],t))return!0}return!1}var VISIBLE_HIDDEN_RE=/^(visible|hidden)$/,Scroller=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),createElement("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(VISIBLE_HIDDEN_RE.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().width>t)return!0}return!1},t.prototype.needsYScrolling=function(){if(VISIBLE_HIDDEN_RE.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().height>t)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return VISIBLE_HIDDEN_RE.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return VISIBLE_HIDDEN_RE.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(BaseComponent),RefMap=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):(o[n]-=1,o[n]||(delete i[n],delete t.callbackMap[n],a=!0)),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return collectFromHash(this.currentMap,e,t,n)},e.prototype.getAll=function(){return hashValuesToArray(this.currentMap)},e}();function computeShrinkWidth(e){for(var t=0,n=0,r=findElements(e,".fc-scrollgrid-shrink");n<r.length;n++){var o=r[n];t=Math.max(t,computeSmallestCellWidth(o))}return Math.ceil(t)}function getSectionHasLiquidHeight(e,t){return e.liquid&&t.liquid}function getAllowYScrolling(e,t){return null!=t.maxHeight||getSectionHasLiquidHeight(e,t)}function renderChunkContent(e,t,n,r){var o=n.expandRows;return"function"==typeof t.content?t.content(n):createElement("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,createElement(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function isColPropsEqual(e,t){return isArraysEqual(e,t,isPropsEqual)}function renderMicroColGroup(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var i=o[r],a=i.span||1,s=0;s<a;s+=1)n.push(createElement("col",{style:{width:"shrink"===i.width?sanitizeShrinkWidth(t):i.width||"",minWidth:i.minWidth||""}}));return createElement.apply(void 0,__spreadArray(["colgroup",{}],n))}function sanitizeShrinkWidth(e){return null==e?4:e}function hasShrinkWidth(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function getScrollGridClassNames(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function getSectionClassNames(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function renderScrollShim(e){return createElement("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function getStickyHeaderDates(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function getStickyFooterScrollbar(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var SimpleScrollGrid=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=memoize((function(e){return e}),isColPropsEqual),t.renderMicroColGroup=memoize(renderMicroColGroup),t.scrollerRefs=new RefMap,t.scrollerElRefs=new RefMap(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.safeSetState(__assign$1({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=e.props,n=e.state,r=e.context,o=t.sections||[],i=this.processCols(t.cols),a=this.renderMicroColGroup(i,n.shrinkWidth),s=getScrollGridClassNames(t.liquid,r);t.collapsibleWidth&&s.push("fc-scrollgrid-collapsible");for(var l,u=o.length,c=0,d=[],p=[],f=[];c<u&&"header"===(l=o[c]).type;)d.push(this.renderSection(l,a,!0)),c+=1;for(;c<u&&"body"===(l=o[c]).type;)p.push(this.renderSection(l,a,!1)),c+=1;for(;c<u&&"footer"===(l=o[c]).type;)f.push(this.renderSection(l,a,!0)),c+=1;var h=!getCanVGrowWithinCell(),g={role:"rowgroup"};return createElement("table",{role:"grid",className:s.join(" "),style:{height:t.height}},Boolean(!h&&d.length)&&createElement.apply(void 0,__spreadArray(["thead",g],d)),Boolean(!h&&p.length)&&createElement.apply(void 0,__spreadArray(["tbody",g],p)),Boolean(!h&&f.length)&&createElement.apply(void 0,__spreadArray(["tfoot",g],f)),h&&createElement.apply(void 0,__spreadArray(__spreadArray(__spreadArray(["tbody",g],d),p),f)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?createElement(Fragment,{key:e.key},e.outerContent):createElement("tr",{key:e.key,role:"presentation",className:getSectionClassNames(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in n)return n.outerContent;var o=this.props,i=this.state,a=i.forceYScrollbars,s=i.scrollerClientWidths,l=i.scrollerClientHeights,u=getAllowYScrolling(o,e),c=getSectionHasLiquidHeight(o,e),d=o.liquid?a?"scroll":u?"auto":"hidden":"visible",p=e.key,f=renderChunkContent(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:o.collapsibleWidth||void 0===s[p]?null:s[p],clientHeight:void 0!==l[p]?l[p]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}},r);return createElement(r?"th":"td",{ref:n.elRef,role:"presentation"},createElement("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},createElement(Scroller,{ref:this.scrollerRefs.createRef(p),elRef:this.scrollerElRefs.createRef(p),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))},t.prototype._handleScrollerEl=function(e,t){var n=getSectionByKey(this.props.sections,t);n&&setRef(n.chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return hasShrinkWidth(this.props.cols)?computeShrinkWidth(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){var e=getScrollbarWidths(),t=this.scrollerRefs,n=this.scrollerElRefs,r=!1,o={},i={};for(var a in t.currentMap){var s=t.currentMap[a];if(s&&s.needsYScrolling()){r=!0;break}}for(var l=0,u=this.props.sections;l<u.length;l++){a=u[l].key;var c=n.currentMap[a];if(c){var d=c.parentNode;o[a]=Math.floor(d.getBoundingClientRect().width-(r?e.y:0)),i[a]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:o,scrollerClientHeights:i}},t}(BaseComponent);function getSectionByKey(e,t){for(var n=0,r=e;n<r.length;n++){var o=r[n];if(o.key===t)return o}return null}SimpleScrollGrid.addStateEquality({scrollerClientWidths:isPropsEqual,scrollerClientHeights:isPropsEqual});var EventRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,o=r.eventRange,i=o.ui,a={event:new EventApi(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&computeSegDraggable(r,t),isStartResizable:!e.disableResizing&&computeSegStartResizable(r,t),isEndResizable:!e.disableResizing&&computeSegEndResizable(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},s=getEventClassNames(a).concat(i.classNames);return createElement(RenderHook,{hookProps:a,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,o){return e.children(t,s.concat(n),r,o,a)}))},t.prototype.componentDidMount=function(){setElSeg(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&setElSeg(this.elRef.current,t)},t}(BaseComponent),StandardEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||e.defaultTimeFormat,o=buildSegTimeText(n,r,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return createElement(EventRoot,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||renderInnerContent$1$1,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(r,o,i,a,s){return createElement("a",__assign$1({className:e.extraClassNames.concat(o).join(" "),style:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},ref:r},getSegAnchorAttrs(n,t)),createElement("div",{className:"fc-event-main",ref:i,style:{color:s.textColor}},a),s.isStartResizable&&createElement("div",{className:"fc-event-resizer fc-event-resizer-start"}),s.isEndResizable&&createElement("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(BaseComponent);function renderInnerContent$1$1(e){return createElement("div",{className:"fc-event-main-frame"},e.timeText&&createElement("div",{className:"fc-event-time"},e.timeText),createElement("div",{className:"fc-event-title-container"},createElement("div",{className:"fc-event-title fc-sticky"},e.event.title||createElement(Fragment,null," "))))}var NowIndicatorRoot=function(e){return createElement(ViewContextType.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return createElement(RenderHook,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},DAY_NUM_FORMAT=createFormatter({day:"numeric"}),DayCellContent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=refineDayCellHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return createElement(ContentHook,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(BaseComponent);function refineDayCellHookProps(e){var t=e.date,n=e.dateEnv,r=getDateMeta(t,e.todayRange,null,e.dateProfile);return __assign$1(__assign$1(__assign$1({date:n.toDate(t),view:e.viewApi},r),{dayNumberText:e.showDayNumber?n.format(t,DAY_NUM_FORMAT):""}),e.extraProps)}var DayCellRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=memoizeObjArg(refineDayCellHookProps),t.normalizeClassNames=buildClassNameNormalizer(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),o=getDayClassNames(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":formatDayString(e.date)};return createElement(MountHook,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,o,i,r.isDisabled)}))},t}(BaseComponent);function renderFill(e){return createElement("div",{className:"fc-"+e})}var BgEvent=function(e){return createElement(EventRoot,{defaultContent:renderInnerContent$3,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,o){return createElement("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:o.backgroundColor}},r)}))};function renderInnerContent$3(e){return e.event.title&&createElement("div",{className:"fc-event-title"},e.event.title)}var WeekNumberRoot=function(e){return createElement(ViewContextType.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,o=e.date,i=r.weekNumberFormat||e.defaultFormat,a=n.computeWeekNumber(o),s=n.format(o,i);return createElement(RenderHook,{hookProps:{num:a,text:s,date:o},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:renderInner,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function renderInner(e){return e.text}var PADDING_FROM_VIEWPORT=10,Popover=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={titleId:getUniqueDomId()},t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&setRef(t.props.elRef,e)},t.handleDocumentMouseDown=function(e){var n=getEventTargetViaRoot(e);t.rootEl.contains(n)||t.handleCloseClick()},t.handleDocumentKeyDown=function(e){"Escape"===e.key&&t.handleCloseClick()},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.theme,n=e.options,r=this.props,o=this.state,i=["fc-popover",t.getClass("popover")].concat(r.extraClassNames||[]);return createPortal(createElement("div",__assign$1({id:r.id,className:i.join(" "),"aria-labelledby":o.titleId},r.extraAttrs,{ref:this.handleRootEl}),createElement("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},createElement("span",{className:"fc-popover-title",id:o.titleId},r.title),createElement("span",{className:"fc-popover-close "+t.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),createElement("div",{className:"fc-popover-body "+t.getClass("popoverContent")},r.children)),r.parentEl)},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)},t.prototype.updateSize=function(){var e=this.context.isRtl,t=this.props,n=t.alignmentEl,r=t.alignGridTop,o=this.rootEl,i=computeClippedClientRect(n);if(i){var a=o.getBoundingClientRect(),s=r?elementClosest(n,".fc-scrollgrid").getBoundingClientRect().top:i.top,l=e?i.right-a.width:i.left;s=Math.max(s,PADDING_FROM_VIEWPORT),l=Math.min(l,document.documentElement.clientWidth-PADDING_FROM_VIEWPORT-a.width),l=Math.max(l,PADDING_FROM_VIEWPORT);var u=o.offsetParent.getBoundingClientRect();applyStyle(o,{top:s-u.top,left:l-u.left})}},t}(BaseComponent),MorePopover=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,r=this.props,o=r.startDate,i=r.todayRange,a=r.dateProfile,s=n.format(o,t.dayPopoverFormat);return createElement(DayCellRoot,{date:o,dateProfile:a,todayRange:i,elRef:this.handleRootEl},(function(e,t,n){return createElement(Popover,{elRef:e,id:r.id,title:s,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},createElement(DayCellContent,{date:o,dateProfile:a,todayRange:i},(function(e,t){return t&&createElement("div",{className:"fc-more-popover-misc",ref:e},t)})),r.children)}))},t.prototype.queryHit=function(e,t,n,r){var o=this.rootEl,i=this.props;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:i.dateProfile,dateSpan:__assign$1({allDay:!0,range:{start:i.startDate,end:i.endDate}},i.extraDateSpan),dayEl:o,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null},t}(DateComponent),MoreLinkRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.linkElRef=createRef(),t.state={isPopoverOpen:!1,popoverId:getUniqueDomId()},t.handleClick=function(e){var n=t,r=n.props,o=n.context,i=o.options.moreLinkClick,a=computeRange(r).start;function s(e){var t=e.eventRange,n=t.def,r=t.instance,i=t.range;return{event:new EventApi(o,n,r),start:o.dateEnv.toDate(i.start),end:o.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:a,allDay:Boolean(r.allDayDate),allSegs:r.allSegs.map(s),hiddenSegs:r.hiddenSegs.map(s),jsEvent:e,view:o.viewApi})),i&&"popover"!==i?"string"==typeof i&&o.calendarApi.zoomTo(a,i):t.setState({isPopoverOpen:!0})},t.handlePopoverClose=function(){t.setState({isPopoverOpen:!1})},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state;return createElement(ViewContextType.Consumer,null,(function(r){var o=r.viewApi,i=r.options,a=r.calendarApi,s=i.moreLinkText,l=t.moreCnt,u=computeRange(t),c="function"==typeof s?s.call(a,l):"+"+l+" "+s,d=formatWithOrdinals(i.moreLinkHint,[l],c),p={num:l,shortText:"+"+l,text:c,view:o};return createElement(Fragment,null,Boolean(t.moreCnt)&&createElement(RenderHook,{elRef:e.linkElRef,hookProps:p,classNames:i.moreLinkClassNames,content:i.moreLinkContent,defaultContent:t.defaultContent||renderMoreLinkInner$1,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},(function(r,o,i,a){return t.children(r,["fc-more-link"].concat(o),i,a,e.handleClick,d,n.isPopoverOpen,n.isPopoverOpen?n.popoverId:"")})),n.isPopoverOpen&&createElement(MorePopover,{id:n.popoverId,startDate:u.start,endDate:u.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:e.parentEl,alignmentEl:t.alignmentElRef.current,alignGridTop:t.alignGridTop,onClose:e.handlePopoverClose},t.popoverContent()))}))},t.prototype.componentDidMount=function(){this.updateParentEl()},t.prototype.componentDidUpdate=function(){this.updateParentEl()},t.prototype.updateParentEl=function(){this.linkElRef.current&&(this.parentEl=elementClosest(this.linkElRef.current,".fc-view-harness"))},t}(BaseComponent);function renderMoreLinkInner$1(e){return e.text}function computeRange(e){if(e.allDayDate)return{start:e.allDayDate,end:addDays(e.allDayDate,1)};var t=e.hiddenSegs;return{start:computeEarliestSegStart(t),end:computeLatestSegEnd(t)}}function computeEarliestSegStart(e){return e.reduce(pickEarliestStart).eventRange.range.start}function pickEarliestStart(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function computeLatestSegEnd(e){return e.reduce(pickLatestEnd).eventRange.range.end}function pickLatestEnd(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var FullCalendar$1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._calendarApi=new CalendarApi,t}return __extends(t,e),t.prototype.render=function(){return React__namespace.createElement(CalendarDataProvider,{optionOverrides:this.props,calendarApi:this._calendarApi},(function(e){return React__namespace.createElement(CalendarRoot,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,r,o){return React__namespace.createElement("div",{className:t.join(" "),style:{height:n}},React__namespace.createElement(CalendarContent,__assign$1({isHeightAuto:r,forPrint:o},e)))}))}))},t.prototype.getApi=function(){return this._calendarApi},t}(React__namespace.Component),TableView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=createRef(),t}return __extends(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,o=[],i=getStickyHeaderDates(r.options);return e&&o.push({type:"header",key:"header",isSticky:i,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),createElement(ViewRoot,{viewSpec:r.viewSpec},(function(e,t){return createElement("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},createElement(SimpleScrollGrid,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");var i=this.props,a=this.context,s=!i.forPrint&&getStickyHeaderDates(a.options),l=!i.forPrint&&getStickyFooterScrollbar(a.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:s,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:renderScrollShim}]}),createElement(ViewRoot,{viewSpec:a.viewSpec},(function(e,t){return createElement("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},createElement(o,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(DateComponent);
|
|
7
|
+
var EventSourceApi=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function removeElement(e){e.parentNode&&e.parentNode.removeChild(e)}function elementClosest(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(elementMatches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function elementMatches(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function findElements(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],a=0;a<n.length;a+=1)for(var i=n[a].querySelectorAll(t),o=0;o<i.length;o+=1)r.push(i[o]);return r}var PIXEL_PROP_RE=/(top|left|right|bottom|width|height)$/i;function applyStyle(e,t){for(var n in t)applyStyleProp(e,n,t[n])}function applyStyleProp(e,t,n){null==n?e.style[t]="":"number"==typeof n&&PIXEL_PROP_RE.test(t)?e.style[t]=n+"px":e.style[t]=n}function getEventTargetViaRoot(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function getElRoot(e){return e.getRootNode?e.getRootNode():document}var guid$1=0;function getUniqueDomId(){return"fc-dom-"+(guid$1+=1)}function preventDefault(e){e.preventDefault()}function buildDelegationHandler(e,t){return function(n){var r=elementClosest(n.target,e);r&&t.call(r,n,r)}}function listenBySelector(e,t,n,r){var a=buildDelegationHandler(n,r);return e.addEventListener(t,a),function(){e.removeEventListener(t,a)}}function listenToHoverBySelector(e,t,n,r){var a;return listenBySelector(e,"mouseover",t,(function(e,t){if(t!==a){a=t,n(e,t);var i=function(e){a=null,r(e,t),t.removeEventListener("mouseleave",i)};t.addEventListener("mouseleave",i)}}))}var transitionEventNames=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function whenTransitionDone(e,t){var n=function(r){t(r),transitionEventNames.forEach((function(t){e.removeEventListener(t,n)}))};transitionEventNames.forEach((function(t){e.addEventListener(t,n)}))}function createAriaClickAttrs(e){return __assign$1({onClick:e},createAriaKeyboardAttrs(e))}function createAriaKeyboardAttrs(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var guidNumber=0;function guid(){return String(guidNumber+=1)}function disableCursor(){document.body.classList.add("fc-not-allowed")}function enableCursor(){document.body.classList.remove("fc-not-allowed")}function preventSelection(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",preventDefault)}function allowSelection(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",preventDefault)}function preventContextMenu(e){e.addEventListener("contextmenu",preventDefault)}function allowContextMenu(e){e.removeEventListener("contextmenu",preventDefault)}function parseFieldSpecs(e){var t,n,r=[],a=[];for("string"==typeof e?a=e.split(/\s*,\s*/):"function"==typeof e?a=[e]:Array.isArray(e)&&(a=e),t=0;t<a.length;t+=1)"string"==typeof(n=a[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function compareByFieldSpecs(e,t,n){var r,a;for(r=0;r<n.length;r+=1)if(a=compareByFieldSpec(e,t,n[r]))return a;return 0}function compareByFieldSpec(e,t,n){return n.func?n.func(e,t):flexibleCompare(e[n.field],t[n.field])*(n.order||1)}function flexibleCompare(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function padStart(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function formatWithOrdinals(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function compareNumbers(e,t){return e-t}function isInt(e){return e%1==0}function computeSmallestCellWidth(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var DAY_IDS=["sun","mon","tue","wed","thu","fri","sat"];function addWeeks(e,t){var n=dateToUtcArray(e);return n[2]+=7*t,arrayToUtcDate(n)}function addDays(e,t){var n=dateToUtcArray(e);return n[2]+=t,arrayToUtcDate(n)}function addMs(e,t){var n=dateToUtcArray(e);return n[6]+=t,arrayToUtcDate(n)}function diffWeeks(e,t){return diffDays(e,t)/7}function diffDays(e,t){return(t.valueOf()-e.valueOf())/864e5}function diffHours(e,t){return(t.valueOf()-e.valueOf())/36e5}function diffMinutes(e,t){return(t.valueOf()-e.valueOf())/6e4}function diffSeconds(e,t){return(t.valueOf()-e.valueOf())/1e3}function diffDayAndTime(e,t){var n=startOfDay(e),r=startOfDay(t);return{years:0,months:0,days:Math.round(diffDays(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function diffWholeWeeks(e,t){var n=diffWholeDays(e,t);return null!==n&&n%7==0?n/7:null}function diffWholeDays(e,t){return timeAsMs(e)===timeAsMs(t)?Math.round(diffDays(e,t)):null}function startOfDay(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function startOfHour(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function startOfMinute(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function startOfSecond(e){return arrayToUtcDate([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function weekOfYear(e,t,n){var r=e.getUTCFullYear(),a=weekOfGivenYear(e,r,t,n);if(a<1)return weekOfGivenYear(e,r-1,t,n);var i=weekOfGivenYear(e,r+1,t,n);return i>=1?Math.min(a,i):a}function weekOfGivenYear(e,t,n,r){var a=arrayToUtcDate([t,0,1+firstWeekOffset(t,n,r)]),i=startOfDay(e),o=Math.round(diffDays(a,i));return Math.floor(o/7)+1}function firstWeekOffset(e,t,n){var r=7+t-n;return-((7+arrayToUtcDate([e,0,r]).getUTCDay()-t)%7)+r-1}function dateToLocalArray(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function arrayToLocalDate(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function dateToUtcArray(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function arrayToUtcDate(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function isValidDate(e){return!isNaN(e.valueOf())}function timeAsMs(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function createEventInstance(e,t,n,r){return{instanceId:guid(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var hasOwnProperty=Object.prototype.hasOwnProperty;function mergeProps(e,t){var n={};if(t)for(var r in t){for(var a=[],i=e.length-1;i>=0;i-=1){var o=e[i][r];if("object"==typeof o&&o)a.unshift(o);else if(void 0!==o){n[r]=o;break}}a.length&&(n[r]=mergeProps(a))}for(i=e.length-1;i>=0;i-=1){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function filterHash(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function mapHash(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function arrayToHash(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function hashValuesToArray(e){var t=[];for(var n in e)t.push(e[n]);return t}function isPropsEqual(e,t){if(e===t)return!0;for(var n in e)if(hasOwnProperty.call(e,n)&&!(n in t))return!1;for(var n in t)if(hasOwnProperty.call(t,n)&&e[n]!==t[n])return!1;return!0}function getUnequalProps(e,t){var n=[];for(var r in e)hasOwnProperty.call(e,r)&&(r in t||n.push(r));for(var r in t)hasOwnProperty.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function compareObjs(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!isObjValsEqual(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function isObjValsEqual(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function collectFromHash(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var a=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var o=e[i];void 0!==o&&a.push(o)}return a}function parseRecurring(e,t,n,r){for(var a=0;a<r.length;a+=1){var i=r[a].parse(e,n);if(i){var o=e.allDay;return null==o&&null==(o=t)&&null==(o=i.allDayGuess)&&(o=!1),{allDay:o,duration:i.duration,typeData:i.typeData,typeId:a}}}return null}function expandRecurring(e,t,n){var r=n.dateEnv,a=n.pluginHooks,i=n.options,o=e.defs,s=e.instances;for(var l in s=filterHash(s,(function(e){return!o[e.defId].recurringDef})),o){var c=o[l];if(c.recurringDef){var d=c.recurringDef.duration;d||(d=c.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var u=0,p=expandRecurringRanges(c,d,t,r,a.recurringTypes);u<p.length;u++){var f=p[u],m=createEventInstance(l,{start:f,end:r.add(f,d)});s[m.instanceId]=m}}}return{defs:o,instances:s}}function expandRecurringRanges(e,t,n,r,a){var i=a[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(startOfDay)),i}var INTERNAL_UNITS=["years","months","days","milliseconds"],PARSE_RE=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function createDuration(e,t){var n;return"string"==typeof e?parseString(e):"object"==typeof e&&e?parseObject(e):"number"==typeof e?parseObject(((n={})[t||"milliseconds"]=e,n)):null}function parseString(e){var t=PARSE_RE.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}function parseObject(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function durationsEqual(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function addDurations(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function subtractDurations(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function multiplyDuration(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function asRoughYears(e){return asRoughDays(e)/365}function asRoughMonths(e){return asRoughDays(e)/30}function asRoughDays(e){return asRoughMs(e)/864e5}function asRoughMs(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function wholeDivideDurations(e,t){for(var n=null,r=0;r<INTERNAL_UNITS.length;r+=1){var a=INTERNAL_UNITS[r];if(t[a]){var i=e[a]/t[a];if(!isInt(i)||null!==n&&n!==i)return null;n=i}else if(e[a])return null}return n}function greatestDurationDenominator(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function buildIsoString(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",formatTimeZoneOffset(t,!0)))),r}function formatDayString(e){return e.toISOString().replace(/T.*$/,"")}function formatIsoTimeString(e){return padStart(e.getUTCHours(),2)+":"+padStart(e.getUTCMinutes(),2)+":"+padStart(e.getUTCSeconds(),2)}function formatTimeZoneOffset(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=Math.round(r%60);return t?n+padStart(a,2)+":"+padStart(i,2):"GMT"+n+a+(i?":"+padStart(i,2):"")}function isArraysEqual(e,t,n){if(e===t)return!0;var r,a=e.length;if(a!==t.length)return!1;for(r=0;r<a;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function memoize(e,t,n){var r,a;return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(r){if(!isArraysEqual(r,i)){n&&n(a);var s=e.apply(this,i);t&&t(s,a)||(a=s)}}else a=e.apply(this,i);return r=i,a}}function memoizeObjArg(e,t,n){var r,a,i=this;return function(o){if(r){if(!isPropsEqual(r,o)){n&&n(a);var s=e.call(i,o);t&&t(s,a)||(a=s)}}else a=e.call(i,o);return r=o,a}}var EXTENDED_SETTINGS_AND_SEVERITIES={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},STANDARD_DATE_PROP_SEVERITIES={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},MERIDIEM_RE=/\s*([ap])\.?m\.?/i,COMMA_RE=/,/g,MULTI_SPACE_RE=/\s+/g,LTR_RE=/\u200e/g,UTC_RE=/UTC|GMT/,NativeFormatter=function(){function e(e){var t={},n={},r=0;for(var a in e)a in EXTENDED_SETTINGS_AND_SEVERITIES?(n[a]=e[a],r=Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[a],r)):(t[a]=e[a],a in STANDARD_DATE_PROP_SEVERITIES&&(r=Math.max(STANDARD_DATE_PROP_SEVERITIES[a],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=memoize(buildFormattingFunc)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var a=this.standardDateProps,i=this.extendedSettings,o=computeMarkerDiffSeverity(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);var s=o;!(s>1)||"numeric"!==a.year&&"2-digit"!==a.year||"numeric"!==a.month&&"2-digit"!==a.month||"numeric"!==a.day&&"2-digit"!==a.day||(s=1);var l=this.format(e,n),c=this.format(t,n);if(l===c)return l;var d=buildFormattingFunc(computePartialFormattingOptions(a,s),i,n),u=d(e),p=d(t),f=findCommonInsertion(l,u,c,p),m=i.separator||r||n.defaultSeparator||"";return f?f.before+u+m+p+f.after:l+m+c},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function buildFormattingFunc(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return formatTimeZoneOffset(e.timeZoneOffset)}:0===r&&t.week?function(e){return formatWeekNumber(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week)}:buildNativeFormattingFunc(e,t,n)}function buildNativeFormattingFunc(e,t,n){e=__assign$1({},e),t=__assign$1({},t),sanitizeSettings(e,t),e.timeZone="UTC";var r,a=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var i=__assign$1({},e);delete i.minute,r=new Intl.DateTimeFormat(n.locale.codes,i)}return function(i){var o=i.marker;return postProcess((r&&!o.getUTCMinutes()?r:a).format(o),i,e,t,n)}}function sanitizeSettings(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function postProcess(e,t,n,r,a){return e=e.replace(LTR_RE,""),"short"===n.timeZoneName&&(e=injectTzoStr(e,"UTC"===a.timeZone||null==t.timeZoneOffset?"UTC":formatTimeZoneOffset(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(COMMA_RE,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(MERIDIEM_RE,"").trim():"narrow"===r.meridiem?e=e.replace(MERIDIEM_RE,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(MERIDIEM_RE,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(MERIDIEM_RE,(function(e){return e.toLocaleLowerCase()}))),e=(e=e.replace(MULTI_SPACE_RE," ")).trim()}function injectTzoStr(e,t){var n=!1;return e=e.replace(UTC_RE,(function(){return n=!0,t})),n||(e+=" "+t),e}function formatWeekNumber(e,t,n,r,a){var i=[];return"long"===a?i.push(n):"short"!==a&&"narrow"!==a||i.push(t),"long"!==a&&"short"!==a||i.push(" "),i.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&i.reverse(),i.join("")}function computeMarkerDiffSeverity(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:timeAsMs(e)!==timeAsMs(t)?1:0}function computePartialFormattingOptions(e,t){var n={};for(var r in e)(!(r in STANDARD_DATE_PROP_SEVERITIES)||STANDARD_DATE_PROP_SEVERITIES[r]<=t)&&(n[r]=e[r]);return n}function findCommonInsertion(e,t,n,r){for(var a=0;a<e.length;){var i=e.indexOf(t,a);if(-1===i)break;var o=e.substr(0,i);a=i+t.length;for(var s=e.substr(a),l=0;l<n.length;){var c=n.indexOf(r,l);if(-1===c)break;var d=n.substr(0,c);l=c+r.length;var u=n.substr(l);if(o===d&&s===u)return{before:o,after:s}}}return null}function expandZonedMarker(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function createVerboseFormattingArg(e,t,n,r){var a=expandZonedMarker(e,n.calendarSystem);return{date:a,start:a,end:t?expandZonedMarker(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var CmdFormatter=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,createVerboseFormattingArg(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,createVerboseFormattingArg(e,t,n,r))},e}(),FuncFormatter=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(createVerboseFormattingArg(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(createVerboseFormattingArg(e,t,n,r))},e}();function createFormatter(e){return"object"==typeof e&&e?new NativeFormatter(e):"string"==typeof e?new CmdFormatter(e):"function"==typeof e?new FuncFormatter(e):null}var BASE_OPTION_REFINERS={navLinkDayClick:identity,navLinkWeekClick:identity,duration:createDuration,bootstrapFontAwesome:identity,buttonIcons:identity,customButtons:identity,defaultAllDayEventDuration:createDuration,defaultTimedEventDuration:createDuration,nextDayThreshold:createDuration,scrollTime:createDuration,scrollTimeReset:Boolean,slotMinTime:createDuration,slotMaxTime:createDuration,dayPopoverFormat:createFormatter,slotDuration:createDuration,snapDuration:createDuration,headerToolbar:identity,footerToolbar:identity,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:createFormatter,dayHeaderClassNames:identity,dayHeaderContent:identity,dayHeaderDidMount:identity,dayHeaderWillUnmount:identity,dayCellClassNames:identity,dayCellContent:identity,dayCellDidMount:identity,dayCellWillUnmount:identity,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:identity,weekNumbers:Boolean,weekNumberClassNames:identity,weekNumberContent:identity,weekNumberDidMount:identity,weekNumberWillUnmount:identity,editable:Boolean,viewClassNames:identity,viewDidMount:identity,viewWillUnmount:identity,nowIndicator:Boolean,nowIndicatorClassNames:identity,nowIndicatorContent:identity,nowIndicatorDidMount:identity,nowIndicatorWillUnmount:identity,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:identity,locale:identity,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:identity,eventOrder:parseFieldSpecs,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:identity,contentHeight:identity,direction:String,weekNumberFormat:createFormatter,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:identity,initialDate:identity,now:identity,eventDataTransform:identity,stickyHeaderDates:identity,stickyFooterScrollbar:identity,viewHeight:identity,defaultAllDay:Boolean,eventSourceFailure:identity,eventSourceSuccess:identity,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:identity,eventConstraint:identity,eventAllow:identity,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:identity,eventContent:identity,eventDidMount:identity,eventWillUnmount:identity,selectConstraint:identity,selectOverlap:identity,selectAllow:identity,droppable:Boolean,unselectCancel:String,slotLabelFormat:identity,slotLaneClassNames:identity,slotLaneContent:identity,slotLaneDidMount:identity,slotLaneWillUnmount:identity,slotLabelClassNames:identity,slotLabelContent:identity,slotLabelDidMount:identity,slotLabelWillUnmount:identity,dayMaxEvents:identity,dayMaxEventRows:identity,dayMinWidth:Number,slotLabelInterval:createDuration,allDayText:String,allDayClassNames:identity,allDayContent:identity,allDayDidMount:identity,allDayWillUnmount:identity,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:createFormatter,rerenderDelay:Number,moreLinkText:identity,moreLinkHint:identity,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:identity,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:createDuration,hiddenDays:identity,monthMode:Boolean,fixedWeekCount:Boolean,validRange:identity,visibleRange:identity,titleFormat:identity,eventInteractive:Boolean,noEventsText:String,viewHint:identity,navLinkHint:identity,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:identity,moreLinkClassNames:identity,moreLinkContent:identity,moreLinkDidMount:identity,moreLinkWillUnmount:identity},BASE_OPTION_DEFAULTS={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30},CALENDAR_LISTENER_REFINERS={datesSet:identity,eventsSet:identity,eventAdd:identity,eventChange:identity,eventRemove:identity,windowResize:identity,eventClick:identity,eventMouseEnter:identity,eventMouseLeave:identity,select:identity,unselect:identity,loading:identity,_unmount:identity,_beforeprint:identity,_afterprint:identity,_noEventDrop:identity,_noEventResize:identity,_resize:identity,_scrollRequest:identity},CALENDAR_OPTION_REFINERS={buttonText:identity,buttonHints:identity,views:identity,plugins:identity,initialEvents:identity,events:identity,eventSources:identity},COMPLEX_OPTION_COMPARATORS={headerToolbar:isMaybeObjectsEqual,footerToolbar:isMaybeObjectsEqual,buttonText:isMaybeObjectsEqual,buttonHints:isMaybeObjectsEqual,buttonIcons:isMaybeObjectsEqual,dateIncrement:isMaybeObjectsEqual};function isMaybeObjectsEqual(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?isPropsEqual(e,t):e===t}var VIEW_OPTION_REFINERS={type:String,component:identity,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:identity,usesMinMaxTime:Boolean,classNames:identity,content:identity,didMount:identity,willUnmount:identity};function mergeRawOptions(e){return mergeProps(e,COMPLEX_OPTION_COMPARATORS)}function refineProps(e,t){var n={},r={};for(var a in t)a in e&&(n[a]=t[a](e[a]));for(var a in e)a in t||(r[a]=e[a]);return{refined:n,extra:r}}function identity(e){return e}function parseEvents(e,t,n,r){for(var a=createEmptyEventStore(),i=buildEventRefiners(n),o=0,s=e;o<s.length;o++){var l=parseEvent(s[o],t,n,r,i);l&&eventTupleToStore(l,a)}return a}function eventTupleToStore(e,t){return void 0===t&&(t=createEmptyEventStore()),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function getRelevantEvents(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],a=filterEventStoreDefs(e,(function(e){return isEventDefsGrouped(r,e)}));return a.defs[r.defId]=r,a.instances[n.instanceId]=n,a}return createEmptyEventStore()}function isEventDefsGrouped(e,t){return Boolean(e.groupId&&e.groupId===t.groupId)}function createEmptyEventStore(){return{defs:{},instances:{}}}function mergeEventStores(e,t){return{defs:__assign$1(__assign$1({},e.defs),t.defs),instances:__assign$1(__assign$1({},e.instances),t.instances)}}function filterEventStoreDefs(e,t){var n=filterHash(e.defs,t),r=filterHash(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function excludeSubEventStore(e,t){var n=e.defs,r=e.instances,a={},i={};for(var o in n)t.defs[o]||(a[o]=n[o]);for(var s in r)!t.instances[s]&&a[r[s].defId]&&(i[s]=r[s]);return{defs:a,instances:i}}function normalizeConstraint(e,t){return Array.isArray(e)?parseEvents(e,null,t,!0):"object"==typeof e&&e?parseEvents([e],null,t,!0):null!=e?String(e):null}function parseClassNames(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var EVENT_UI_REFINERS={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:identity,overlap:identity,allow:identity,className:parseClassNames,classNames:parseClassNames,color:String,backgroundColor:String,borderColor:String,textColor:String},EMPTY_EVENT_UI={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function createEventUi(e,t){var n=normalizeConstraint(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function combineEventUis(e){return e.reduce(combineTwoEventUis,EMPTY_EVENT_UI)}function combineTwoEventUis(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var EVENT_NON_DATE_REFINERS={id:String,groupId:String,title:String,url:String,interactive:Boolean},EVENT_DATE_REFINERS={start:identity,end:identity,date:identity,allDay:Boolean},EVENT_REFINERS=__assign$1(__assign$1(__assign$1({},EVENT_NON_DATE_REFINERS),EVENT_DATE_REFINERS),{extendedProps:identity});function parseEvent(e,t,n,r,a){void 0===a&&(a=buildEventRefiners(n));var i=refineEventDef(e,n,a),o=i.refined,s=i.extra,l=computeIsDefaultAllDay(t,n),c=parseRecurring(o,l,n.dateEnv,n.pluginHooks.recurringTypes);if(c)return(d=parseEventDef(o,s,t?t.sourceId:"",c.allDay,Boolean(c.duration),n)).recurringDef={typeId:c.typeId,typeData:c.typeData,duration:c.duration},{def:d,instance:null};var d,u=parseSingle(o,l,n,r);return u?{def:d=parseEventDef(o,s,t?t.sourceId:"",u.allDay,u.hasEnd,n),instance:createEventInstance(d.defId,u.range,u.forcedStartTzo,u.forcedEndTzo)}:null}function refineEventDef(e,t,n){return void 0===n&&(n=buildEventRefiners(t)),refineProps(e,n)}function buildEventRefiners(e){return __assign$1(__assign$1(__assign$1({},EVENT_UI_REFINERS),EVENT_REFINERS),e.pluginHooks.eventRefiners)}function parseEventDef(e,t,n,r,a,i){for(var o={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:guid(),sourceId:n,allDay:r,hasEnd:a,interactive:e.interactive,ui:createEventUi(e,i),extendedProps:__assign$1(__assign$1({},e.extendedProps||{}),t)},s=0,l=i.pluginHooks.eventDefMemberAdders;s<l.length;s++){var c=l[s];__assign$1(o,c(e))}return Object.freeze(o.ui.classNames),Object.freeze(o.extendedProps),o}function parseSingle(e,t,n,r){var a,i,o=e.allDay,s=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(a=n.dateEnv.createMarkerMeta(d))s=a.marker;else if(!r)return null;return null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end)),null==o&&(o=null!=t?t:(!a||a.isTimeUnspecified)&&(!i||i.isTimeUnspecified)),o&&s&&(s=startOfDay(s)),i&&(c=i.marker,o&&(c=startOfDay(c)),s&&c<=s&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(s,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:l,range:{start:s,end:c},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}function computeIsDefaultAllDay(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}function computeAlignedDayRange(e){var t=Math.floor(diffDays(e.start,e.end))||1,n=startOfDay(e.start);return{start:n,end:addDays(n,t)}}function computeVisibleDayRange(e,t){void 0===t&&(t=createDuration(0));var n=null,r=null;if(e.end){r=startOfDay(e.end);var a=e.end.valueOf()-r.valueOf();a&&a>=asRoughMs(t)&&(r=addDays(r,1))}return e.start&&(n=startOfDay(e.start),r&&r<=n&&(r=addDays(n,1))),{start:n,end:r}}function isMultiDayRange(e){var t=computeVisibleDayRange(e);return diffDays(t.start,t.end)>1}function diffDates(e,t,n,r){return"year"===r?createDuration(n.diffWholeYears(e,t),"year"):"month"===r?createDuration(n.diffWholeMonths(e,t),"month"):diffDayAndTime(e,t)}function parseRange(e,t){var n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}function invertRanges(e,t){var n,r,a=[],i=t.start;for(e.sort(compareRanges),n=0;n<e.length;n+=1)(r=e[n]).start>i&&a.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&a.push({start:i,end:t.end}),a}function compareRanges(e,t){return e.start.valueOf()-t.start.valueOf()}function intersectRanges(e,t){var n=e.start,r=e.end,a=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(a={start:n,end:r}),a}function rangesEqual(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rangesIntersect(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function rangeContainsRange(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function rangeContainsMarker(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function constrainMarkerToRange(e,t){return null!=t.start&&e<t.start?t.start:null!=t.end&&e>=t.end?new Date(t.end.valueOf()-1):e}function sliceEventStore(e,t,n,r){var a={},i={},o={},s=[],l=[],c=compileEventUis(e.defs,t);for(var d in e.defs){"inverse-background"===(f=c[(b=e.defs[d]).defId]).display&&(b.groupId?(a[b.groupId]=[],o[b.groupId]||(o[b.groupId]=b)):i[d]=[])}for(var u in e.instances){var p=e.instances[u],f=c[(b=e.defs[p.defId]).defId],m=p.range,h=!b.allDay&&r?computeVisibleDayRange(m,r):m,g=intersectRanges(h,n);g&&("inverse-background"===f.display?b.groupId?a[b.groupId].push(g):i[p.defId].push(g):"none"!==f.display&&("background"===f.display?s:l).push({def:b,ui:f,instance:p,range:g,isStart:h.start&&h.start.valueOf()===g.start.valueOf(),isEnd:h.end&&h.end.valueOf()===g.end.valueOf()}))}for(var v in a)for(var y=0,E=invertRanges(a[v],n);y<E.length;y++){var b,_=E[y];f=c[(b=o[v]).defId];s.push({def:b,ui:f,instance:null,range:_,isStart:!1,isEnd:!1})}for(var d in i)for(var S=0,w=invertRanges(i[d],n);S<w.length;S++){_=w[S];s.push({def:e.defs[d],ui:c[d],instance:null,range:_,isStart:!1,isEnd:!1})}return{bg:s,fg:l}}function hasBgRendering(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function setElSeg(e,t){e.fcSeg=t}function getElSeg(e){return e.fcSeg||e.parentNode.fcSeg||null}function compileEventUis(e,t){return mapHash(e,(function(e){return compileEventUi(e,t)}))}function compileEventUi(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),combineEventUis(n)}function sortEventSegs(e,t){var n=e.map(buildSegCompareObj);return n.sort((function(e,n){return compareByFieldSpecs(e,n,t)})),n.map((function(e){return e._seg}))}function buildSegCompareObj(e){var t=e.eventRange,n=t.def,r=t.instance?t.instance.range:t.range,a=r.start?r.start.valueOf():0,i=r.end?r.end.valueOf():0;return __assign$1(__assign$1(__assign$1({},n.extendedProps),n),{id:n.publicId,start:a,end:i,duration:i-a,allDay:Number(n.allDay),_seg:e})}function computeSegDraggable(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,a=r.def,i=r.ui,o=i.startEditable,s=0,l=n;s<l.length;s++){o=(0,l[s])(o,a,i,t)}return o}function computeSegStartResizable(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function computeSegEndResizable(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function buildSegTimeText(e,t,n,r,a,i,o){var s=n.dateEnv,l=n.options,c=l.displayEventTime,d=l.displayEventEnd,u=e.eventRange.def,p=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==a);var f=p.range.start,m=p.range.end,h=i||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,v=startOfDay(f).valueOf()===startOfDay(h).valueOf(),y=startOfDay(addMs(m,-1)).valueOf()===startOfDay(addMs(g,-1)).valueOf();return c&&!u.allDay&&(v||y)?(h=v?f:h,g=y?m:g,d&&u.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:o?null:p.forcedEndTzo}):s.format(h,t,{forcedTzo:i?null:p.forcedStartTzo})):""}function getSegMeta(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&rangeContainsMarker(t,r.start)}}function getEventClassNames(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function buildEventRangeKey(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}function getSegAnchorAttrs(e,t){var n=e.eventRange,r=n.def,a=n.instance,i=r.url;if(i)return{href:i};var o=t.emitter,s=t.options.eventInteractive;return null==s&&null==(s=r.interactive)&&(s=Boolean(o.hasHandlers("eventClick"))),s?createAriaKeyboardAttrs((function(e){o.trigger("eventClick",{el:e.target,event:new EventApi(t,r,a),jsEvent:e,view:t.viewApi})})):{}}var STANDARD_PROPS={start:identity,end:identity,allDay:Boolean};function parseDateSpan(e,t,n){var r=parseOpenDateSpan(e,t),a=r.range;if(!a.start)return null;if(!a.end){if(null==n)return null;a.end=t.add(a.start,n)}return r}function parseOpenDateSpan(e,t){var n=refineProps(e,STANDARD_PROPS),r=n.refined,a=n.extra,i=r.start?t.createMarkerMeta(r.start):null,o=r.end?t.createMarkerMeta(r.end):null,s=r.allDay;return null==s&&(s=i&&i.isTimeUnspecified&&(!o||o.isTimeUnspecified)),__assign$1({range:{start:i?i.marker:null,end:o?o.marker:null},allDay:s},a)}function isDateSpansEqual(e,t){return rangesEqual(e.range,t.range)&&e.allDay===t.allDay&&isSpanPropsEqual(e,t)}function isSpanPropsEqual(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}function buildDateSpanApi(e,t){return __assign$1(__assign$1({},buildRangeApi(e.range,t,e.allDay)),{allDay:e.allDay})}function buildRangeApiWithTimeZone(e,t,n){return __assign$1(__assign$1({},buildRangeApi(e,t,n)),{timeZone:t.timeZone})}function buildRangeApi(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function fabricateEventRange(e,t,n){var r=refineEventDef({editable:!1},n),a=parseEventDef(r.refined,r.extra,"",e.allDay,!0,n);return{def:a,ui:compileEventUi(a,t),instance:createEventInstance(a.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function triggerDateSelect(e,t,n){n.emitter.trigger("select",__assign$1(__assign$1({},buildDateSpanApiWithContext(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function triggerDateUnselect(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function buildDateSpanApiWithContext(e,t){for(var n={},r=0,a=t.pluginHooks.dateSpanTransforms;r<a.length;r++){var i=a[r];__assign$1(n,i(e,t))}return __assign$1(n,buildDateSpanApi(e,t.dateEnv)),n}function getDefaultEventEnd(e,t,n){var r=n.dateEnv,a=n.options,i=t;return e?(i=startOfDay(i),i=r.add(i,a.defaultAllDayEventDuration)):i=r.add(i,a.defaultTimedEventDuration),i}function applyMutationToEventStore(e,t,n,r){var a=compileEventUis(e.defs,t),i=createEmptyEventStore();for(var o in e.defs){var s=e.defs[o];i.defs[o]=applyMutationToEventDef(s,a[o],n,r)}for(var l in e.instances){var c=e.instances[l];s=i.defs[c.defId];i.instances[l]=applyMutationToEventInstance(c,s,a[c.defId],n,r)}return i}function applyMutationToEventDef(e,t,n,r){var a=n.standardProps||{};null==a.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(a.hasEnd=!0);var i=__assign$1(__assign$1(__assign$1({},e),a),{ui:__assign$1(__assign$1({},e.ui),a.ui)});n.extendedProps&&(i.extendedProps=__assign$1(__assign$1({},i.extendedProps),n.extendedProps));for(var o=0,s=r.pluginHooks.eventDefMutationAppliers;o<s.length;o++){(0,s[o])(i,n,r)}return!i.hasEnd&&r.options.forceEventDuration&&(i.hasEnd=!0),i}function applyMutationToEventInstance(e,t,n,r,a){var i=a.dateEnv,o=r.standardProps&&!0===r.standardProps.allDay,s=r.standardProps&&!1===r.standardProps.hasEnd,l=__assign$1({},e);return o&&(l.range=computeAlignedDayRange(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:i.add(l.range.start,r.datesDelta),end:i.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:i.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:i.add(l.range.end,r.endDelta)}),s&&(l.range={start:l.range.start,end:getDefaultEventEnd(t.allDay,l.range.start,a)}),t.allDay&&(l.range={start:startOfDay(l.range.start),end:startOfDay(l.range.end)}),l.range.end<l.range.start&&(l.range.end=getDefaultEventEnd(t.allDay,l.range.start,a)),l}var ViewApi=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),EVENT_SOURCE_REFINERS={id:String,defaultAllDay:Boolean,url:String,format:String,events:identity,eventDataTransform:identity,success:identity,failure:identity};function parseEventSource(e,t,n){var r;if(void 0===n&&(n=buildEventSourceRefiners(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var a=refineProps(r,n),i=a.refined,o=a.extra,s=buildEventSourceMeta(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:guid(),sourceDefId:s.sourceDefId,meta:s.meta,ui:createEventUi(i,t),extendedProps:o}}return null}function buildEventSourceRefiners(e){return __assign$1(__assign$1(__assign$1({},EVENT_UI_REFINERS),EVENT_SOURCE_REFINERS),e.pluginHooks.eventSourceRefiners)}function buildEventSourceMeta(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r-=1){var a=n[r].parseMeta(e);if(a)return{sourceDefId:r,meta:a}}return null}function reduceCurrentDate(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}function getInitialDate(e,t){var n=e.initialDate;return null!=n?t.createMarker(n):getNow(e.now,t)}function getNow(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var CalendarApi=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,__spreadArray([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),a=r.viewSpecs,i=r.toolbarConfig,o=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(var s in a)o.push(s);for(t=0;t<o.length;t+=1)if((n=a[o[t]])&&n.singleUnit===e)return n;return null},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:getNow(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=createDuration(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),createFormatter(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),createFormatter(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),a=parseDateSpan(n,r.dateEnv,createDuration({days:1}));a&&(this.dispatch({type:"SELECT_DATES",selection:a}),triggerDateSelect(a,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),triggerDateUnselect(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof EventApi){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:eventTupleToStore({def:n,instance:r})}),this.triggerEventAdd(e)),e}var a,i=this.getCurrentData();if(t instanceof EventSourceApi)a=t.internalEventSource;else if("boolean"==typeof t)t&&(a=hashValuesToArray(i.eventSources)[0]);else if(null!=t){var o=this.getEventSourceById(t);if(!o)return console.warn('Could not find an event source with ID "'+t+'"'),null;a=o.internalEventSource}var s=parseEvent(e,a,i,!1);if(s){var l=new EventApi(i,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:eventTupleToStore(s)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:eventApiToStore(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,a=n.instances;for(var i in e=String(e),r){var o=r[i];if(o.publicId===e){if(o.recurringDef)return new EventApi(t,o,null);for(var s in a){var l=a[s];if(l.defId===o.defId)return new EventApi(t,o,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return buildEventApis(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new EventSourceApi(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new EventSourceApi(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof EventSourceApi)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=parseEventSource(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new EventSourceApi(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})},e.prototype.scrollToTime=function(e){var t=createDuration(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),EventApi=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in EVENT_DATE_REFINERS)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=EVENT_NON_DATE_REFINERS[e](t),this.mutate({standardProps:{publicId:t}});else if(e in EVENT_NON_DATE_REFINERS)t=EVENT_NON_DATE_REFINERS[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in EVENT_UI_REFINERS){var a=EVENT_UI_REFINERS[e](t);"color"===e?a={backgroundColor:t,borderColor:t}:"editable"===e?a={startEditable:t,durationEditable:t}:((r={})[e]=t,a=r),this.mutate({standardProps:{ui:a}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var a=diffDates(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var a=diffDates(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:a})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,a=this._context.dateEnv,i={allDay:n.allDay},o=a.createMarker(e);if(o&&(null==t||(r=a.createMarker(t)))&&this._instance){var s=this._instance.range;!0===n.allDay&&(s=computeAlignedDayRange(s));var l=diffDates(s.start,o,a,n.granularity);if(r){var c=diffDates(s.end,r,a,n.granularity);durationsEqual(l,c)?this.mutate({datesDelta:l,standardProps:i}):this.mutate({startDelta:l,endDelta:c,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:l,standardProps:i})}},e.prototype.moveStart=function(e){var t=createDuration(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=createDuration(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=createDuration(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=createFormatter(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,a=this._context,i=a.getCurrentData().eventStore,o=getRelevantEvents(i,n.instanceId);o=applyMutationToEventStore(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,a);var s=new e(a,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],a.dispatch({type:"MERGE_EVENTS",eventStore:o}),a.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:buildEventApis(o,a,n),revert:function(){a.dispatch({type:"RESET_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=eventApiToStore(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new EventSourceApi(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,r=this.startStr,a=this.endStr,i={};return t.title&&(i.title=t.title),r&&(i.start=r),a&&(i.end=a),t.publicId&&(i.id=t.publicId),t.groupId&&(i.groupId=t.groupId),t.url&&(i.url=t.url),n.display&&"auto"!==n.display&&(i.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?i.color=n.backgroundColor:(n.backgroundColor&&(i.backgroundColor=n.backgroundColor),n.borderColor&&(i.borderColor=n.borderColor)),n.textColor&&(i.textColor=n.textColor),n.classNames.length&&(i.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?__assign$1(i,t.extendedProps):i.extendedProps=t.extendedProps),i},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function eventApiToStore(e){var t,n,r=e._def,a=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:a?(n={},n[a.instanceId]=a,n):{}}}function buildEventApis(e,t,n){var r=e.defs,a=e.instances,i=[],o=n?n.instanceId:"";for(var s in a){var l=a[s],c=r[l.defId];l.instanceId!==o&&i.push(new EventApi(t,c,l))}return i}var calendarSystemClassMap={};function registerCalendarSystem(e,t){calendarSystemClassMap[e]=t}function createCalendarSystem(e){return new calendarSystemClassMap[e]}var GregorianCalendarSystem=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return arrayToUtcDate(e)},e.prototype.markerToArray=function(e){return dateToUtcArray(e)},e}();registerCalendarSystem("gregory",GregorianCalendarSystem);var ISO_RE=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function parse(e){var t=ISO_RE.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(isValidDate(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var DateEnv=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=createCalendarSystem(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):arrayToUtcDate(dateToLocalArray(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=arrayToUtcDate(e)),null!==t&&isValidDate(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=parse(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return timeAsMs(e)===timeAsMs(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return timeAsMs(e)===timeAsMs(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=diffWholeWeeks(e,t))?{unit:"week",value:n}:null!==(n=diffWholeDays(e,t))?{unit:"day",value:n}:isInt(n=diffHours(e,t))?{unit:"hour",value:n}:isInt(n=diffMinutes(e,t))?{unit:"minute",value:n}:isInt(n=diffSeconds(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/asRoughYears(n):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/asRoughMonths(n):n.days&&null!==(r=diffWholeDays(e,t))?r/asRoughDays(n):(t.valueOf()-e.valueOf())/asRoughMs(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?startOfDay(e):"hour"===t?startOfHour(e):"minute"===t?startOfMinute(e):"second"===t?startOfSecond(e):null},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):weekOfYear(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=addMs(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),buildIsoString(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?arrayToUtcDate(dateToLocalArray(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-arrayToLocalDate(dateToUtcArray(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?arrayToLocalDate(dateToUtcArray(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(e))*60):new Date(e.valueOf()-(t||0))},e}(),globalLocales=[],MINIMAL_RAW_EN_LOCALE={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},RAW_EN_LOCALE=__assign$1(__assign$1({},MINIMAL_RAW_EN_LOCALE),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function organizeRawLocales(e){for(var t=e.length>0?e[0].code:"en",n=globalLocales.concat(e),r={en:RAW_EN_LOCALE},a=0,i=n;a<i.length;a++){var o=i[a];r[o.code]=o}return{map:r,defaultCode:t}}function buildLocale(e,t){return"object"!=typeof e||Array.isArray(e)?queryLocale(e,t):parseLocale(e.code,[e.code],e)}function queryLocale(e,t){var n=[].concat(e||[]);return parseLocale(e,n,queryRawLocale(n,t)||RAW_EN_LOCALE)}function queryRawLocale(e,t){for(var n=0;n<e.length;n+=1)for(var r=e[n].toLocaleLowerCase().split("-"),a=r.length;a>0;a-=1){var i=r.slice(0,a).join("-");if(t[i])return t[i]}return null}function parseLocale(e,t,n){var r=mergeProps([MINIMAL_RAW_EN_LOCALE,n],["buttonText"]);delete r.code;var a=r.week;return delete r.week,{codeArg:e,codes:t,week:a,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var DEF_DEFAULTS={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"},canVGrowWithinCell;function parseBusinessHours(e,t){return parseEvents(refineInputs(e),null,t)}function refineInputs(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return __assign$1(__assign$1({},DEF_DEFAULTS),e)}))}function pointInsideRect(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function intersectRects(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function constrainPoint(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function getRectCenter(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function diffPoints(e,t){return{left:e.left-t.left,top:e.top-t.top}}function getCanVGrowWithinCell(){return null==canVGrowWithinCell&&(canVGrowWithinCell=computeCanVGrowWithinCell()),canVGrowWithinCell}function computeCanVGrowWithinCell(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}var EMPTY_EVENT_STORE=createEmptyEventStore(),Splitter=function(){function e(){this.getKeysForEventDefs=memoize(this._getKeysForEventDefs),this.splitDateSelection=memoize(this._splitDateSpan),this.splitEventStore=memoize(this._splitEventStore),this.splitIndividualUi=memoize(this._splitIndividualUi),this.splitEventDrag=memoize(this._splitInteraction),this.splitEventResize=memoize(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),a=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),o=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};for(var d in this.eventUiBuilders=mapHash(n,(function(e,n){return t.eventUiBuilders[n]||memoize(buildEventUiForKey)})),n){var u=n[d],p=o[d]||EMPTY_EVENT_STORE,f=this.eventUiBuilders[d];c[d]={businessHours:u.businessHours||e.businessHours,dateSelection:a[d]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],u.ui,i[d]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[d]||null,eventResize:l[d]||null}}return c},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return mapHash(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,a={};for(var i in n)for(var o=0,s=t[i];o<s.length;o++){a[p=s[o]]||(a[p]=createEmptyEventStore()),a[p].defs[i]=n[i]}for(var l in r)for(var c=r[l],d=0,u=t[c.defId];d<u.length;d++){var p;a[p=u[d]]&&(a[p].instances[l]=c)}return a},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var a=0,i=t[r];a<i.length;a++){var o=i[a];n[o]||(n[o]={}),n[o][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),a=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||EMPTY_EVENT_STORE,mutatedEvents:a[r]||EMPTY_EVENT_STORE,isEvent:e.isEvent})};for(var o in n)i(o);for(var o in a)i(o)}return t},e}();function buildEventUiForKey(e,t,n){var r=[];e&&r.push(e),t&&r.push(t);var a={"":combineEventUis(r)};return n&&__assign$1(a,n),a}function getDateMeta(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!rangeContainsMarker(r.activeRange,e)),isOther:Boolean(r&&!rangeContainsMarker(r.currentRange,e)),isToday:Boolean(t&&rangeContainsMarker(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function getDayClassNames(e,t){var n=["fc-day","fc-day-"+DAY_IDS[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}var DAY_FORMAT=createFormatter({year:"numeric",month:"long",day:"numeric"}),WEEK_FORMAT=createFormatter({week:"long"});function buildNavLinkAttrs(e,t,n,r){void 0===n&&(n="day"),void 0===r&&(r=!0);var a=e.dateEnv,i=e.options,o=e.calendarApi,s=a.format(t,"week"===n?WEEK_FORMAT:DAY_FORMAT);if(i.navLinks){var l=a.toDate(t),c=function(e){var r="day"===n?i.navLinkDayClick:"week"===n?i.navLinkWeekClick:null;"function"==typeof r?r.call(o,a.toDate(t),e):("string"==typeof r&&(n=r),o.zoomTo(t,n))};return __assign$1({title:formatWithOrdinals(i.navLinkHint,[s,l],s),"data-navlink":""},r?createAriaClickAttrs(c):{onClick:c})}return{"aria-label":s}}var _isRtlScrollbarOnLeft=null,_scrollbarWidths;function getIsRtlScrollbarOnLeft(){return null===_isRtlScrollbarOnLeft&&(_isRtlScrollbarOnLeft=computeIsRtlScrollbarOnLeft()),_isRtlScrollbarOnLeft}function computeIsRtlScrollbarOnLeft(){var e=document.createElement("div");applyStyle(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return removeElement(e),t}function getScrollbarWidths(){return _scrollbarWidths||(_scrollbarWidths=computeScrollbarWidths()),_scrollbarWidths}function computeScrollbarWidths(){var e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);var t=computeScrollbarWidthsForEl(e);return document.body.removeChild(e),t}function computeScrollbarWidthsForEl(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function computeEdges(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,a=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderBottomWidth,10)||0,s=computeScrollbarWidthsForEl(e),l=s.y-r-a,c={borderLeft:r,borderRight:a,borderTop:i,borderBottom:o,scrollbarBottom:s.x-i-o,scrollbarLeft:0,scrollbarRight:0};return getIsRtlScrollbarOnLeft()&&"rtl"===n.direction?c.scrollbarLeft=l:c.scrollbarRight=l,t&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}function computeInnerRect(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():computeRect(e),a=computeEdges(e,t),i={left:r.left+a.borderLeft+a.scrollbarLeft,right:r.right-a.borderRight-a.scrollbarRight,top:r.top+a.borderTop,bottom:r.bottom-a.borderBottom-a.scrollbarBottom};return t&&(i.left+=a.paddingLeft,i.right-=a.paddingRight,i.top+=a.paddingTop,i.bottom-=a.paddingBottom),i}function computeRect(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function computeClippedClientRect(e){for(var t=getClippingParents(e),n=e.getBoundingClientRect(),r=0,a=t;r<a.length;r++){var i=intersectRects(n,a[r].getBoundingClientRect());if(!i)return null;n=i}return n}function getClippingParents(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function unpromisify(e,t,n){var r=!1,a=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},o=e(a,i);o&&"function"==typeof o.then&&o.then(a,i)}var Emitter=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){addToHash(this.handlers,e,t)},e.prototype.off=function(e,t){removeFromHash(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],a=this.options&&this.options[e],i=[].concat(a||[],r),o=0,s=i;o<s.length;o++){var l=s[o];l.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])},e}();function addToHash(e,t,n){(e[t]||(e[t]=[])).push(n)}function removeFromHash(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}var PositionCache=function(){function e(e,t,n,r){this.els=t;var a=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(a.left),r&&this.buildElVerticals(a.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,a=this.els;r<a.length;r++){var i=a[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,a=this.els;r<a.length;r++){var i=a[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,a=n.length;for(t=0;t<a;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,a=n.length;for(t=0;t<a;t+=1)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),ScrollController=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),ElementScrollController=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return __extends(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(ScrollController),WindowScrollController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(ScrollController),Theme=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=__assign$1({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();Theme.prototype.classes={},Theme.prototype.iconClasses={},Theme.prototype.baseIconClass="",Theme.prototype.iconOverridePrefix="";var ScrollResponder=function(){function e(e,t,n,r){var a=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=function(e){a.queuedRequest=__assign$1({},a.queuedRequest||{},e),a.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),ViewContextType=createContext({});function buildViewContext(e,t,n,r,a,i,o,s,l,c,d,u,p){return{dateEnv:a,options:n,pluginHooks:o,emitter:c,dispatch:s,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){c.on("_resize",e)},removeResizeHandler:function(e){c.off("_resize",e)},createScrollResponder:function(e){return new ScrollResponder(e,c,createDuration(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:u,unregisterInteractiveComponent:p}}var PureComponent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(getUnequalProps(e,this.props),getUnequalProps(t,this.state)),!compareObjs(this.props,e,this.propEquality)||!compareObjs(this.state,t,this.stateEquality)},t.prototype.safeSetState=function(e){compareObjs(this.state,__assign$1(__assign$1({},this.state),e),this.stateEquality)||this.setState(e)},t.addPropsEquality=addPropsEquality,t.addStateEquality=addStateEquality,t.contextType=ViewContextType,t}(Component);PureComponent.prototype.propEquality={},PureComponent.prototype.stateEquality={};var BaseComponent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.contextType=ViewContextType,t}(PureComponent);function addPropsEquality(e){var t=Object.create(this.prototype.propEquality);__assign$1(t,e),this.prototype.propEquality=t}function addStateEquality(e){var t=Object.create(this.prototype.stateEquality);__assign$1(t,e),this.prototype.stateEquality=t}function setRef(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var DateComponent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=guid(),t}return __extends(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!elementClosest(e,".fc-event-mirror")},t.prototype.isValidDateDownEl=function(e){return!(elementClosest(e,".fc-event:not(.fc-bg-event)")||elementClosest(e,".fc-more-link")||elementClosest(e,"a[data-navlink]")||elementClosest(e,".fc-popover"))},t}(BaseComponent);function createPlugin(e){return{id:guid(),deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function buildPluginHooks(e,t){var n={},r={reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function a(e){for(var t=0,i=e;t<i.length;t++){var o=i[t];n[o.id]||(n[o.id]=!0,a(o.deps),r=combineHooks(r,o))}}return e&&a(e),a(t),r}function buildBuildPluginHooks(){var e,t=[],n=[];return function(r,a){return e&&isArraysEqual(r,t)&&isArraysEqual(a,n)||(e=buildPluginHooks(r,a)),t=r,n=a,e}}function combineHooks(e,t){return{reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:__assign$1(__assign$1({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:__assign$1(__assign$1({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:__assign$1(__assign$1({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:__assign$1(__assign$1({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:__assign$1(__assign$1({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,contentTypeHandlers:__assign$1(__assign$1({},e.contentTypeHandlers),t.contentTypeHandlers),listenerRefiners:__assign$1(__assign$1({},e.listenerRefiners),t.listenerRefiners),optionRefiners:__assign$1(__assign$1({},e.optionRefiners),t.optionRefiners),propSetHandlers:__assign$1(__assign$1({},e.propSetHandlers),t.propSetHandlers)}}var StandardTheme=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(Theme);function compileViewDefs(e,t){var n,r={};for(n in e)ensureViewDef(n,r,e,t);for(n in t)ensureViewDef(n,r,e,t);return r}function ensureViewDef(e,t,n,r){if(t[e])return t[e];var a=buildViewDef(e,t,n,r);return a&&(t[e]=a),a}function buildViewDef(e,t,n,r){var a=n[e],i=r[e],o=function(e){return a&&null!==a[e]?a[e]:i&&null!==i[e]?i[e]:null},s=o("component"),l=o("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=ensureViewDef(l,t,n,r)}return!s&&c&&(s=c.component),s?{type:e,component:s,defaults:__assign$1(__assign$1({},c?c.defaults:{}),a?a.rawOptions:{}),overrides:__assign$1(__assign$1({},c?c.overrides:{}),i?i.rawOptions:{})}:null}StandardTheme.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},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.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},StandardTheme.prototype.iconOverrideOption="buttonIcons",StandardTheme.prototype.iconOverrideCustomButtonOption="icon",StandardTheme.prototype.iconOverridePrefix="fc-icon-";var RenderHook=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t.handleRootEl=function(e){setRef(t.rootElRef,e),t.props.elRef&&setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return createElement(MountHook,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return createElement(ContentHook,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,a){return t.children(r,normalizeClassNames(t.classNames,n),e,a)}))}))},t}(BaseComponent),CustomContentRenderContext=createContext(0);function ContentHook(e){return createElement(CustomContentRenderContext.Consumer,null,(function(t){return createElement(ContentHookInner,__assign$1({renderId:t},e))}))}var ContentHookInner=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.componentWillUnmount=function(){this.customContentInfo&&this.customContentInfo.destroy&&this.customContentInfo.destroy()},t.prototype.renderInnerContent=function(){var e=this.customContentInfo,t=this.getInnerContent(),n=this.getContentMeta(t);return e&&e.contentKey===n.contentKey?e&&(e.contentVal=t[n.contentKey]):(e&&(e.destroy&&e.destroy(),e=this.customContentInfo=null),n.contentKey&&(e=this.customContentInfo=__assign$1({contentKey:n.contentKey,contentVal:t[n.contentKey]},n.buildLifecycleFuncs()))),e?[]:t},t.prototype.getInnerContent=function(){var e=this.props,t=normalizeContent(e.content,e.hookProps);return void 0===t&&(t=normalizeContent(e.defaultContent,e.hookProps)),null==t?null:t},t.prototype.getContentMeta=function(e){var t=this.context.pluginHooks.contentTypeHandlers,n="",r=null;if(e)for(var a in t)if(void 0!==e[a]){n=a,r=t[a];break}return{contentKey:n,buildLifecycleFuncs:r}},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.render(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(BaseComponent),MountHook=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(__assign$1(__assign$1({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(__assign$1(__assign$1({},this.props.hookProps),{el:this.rootEl}))},t}(BaseComponent);function buildClassNameNormalizer(){var e,t,n=[];return function(r,a){return t&&isPropsEqual(t,a)&&r===e||(e=r,t=a,n=normalizeClassNames(r,a)),n}}function normalizeClassNames(e,t){return"function"==typeof e&&(e=e(t)),parseClassNames(e)}function normalizeContent(e,t){return"function"==typeof e?e(t,createElement):e}var ViewRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=buildClassNameNormalizer(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},a=this.normalizeClassNames(n.viewClassNames,r);return createElement(MountHook,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(a))}))},t}(BaseComponent);function parseViewConfigs(e){return mapHash(e,parseViewConfig)}function parseViewConfig(e){var t="function"==typeof e?{component:e}:e,n=t.component;return t.content&&(n=createViewHookComponent(t)),{superType:t.type,component:n,rawOptions:t}}function createViewHookComponent(e){return function(t){return createElement(ViewContextType.Consumer,null,(function(n){return createElement(ViewRoot,{viewSpec:n.viewSpec},(function(r,a){var i=__assign$1(__assign$1({},t),{nextDayThreshold:n.options.nextDayThreshold});return createElement(RenderHook,{hookProps:i,classNames:e.classNames,content:e.content,didMount:e.didMount,willUnmount:e.willUnmount,elRef:r},(function(e,t,n,r){return createElement("div",{className:a.concat(t).join(" "),ref:e},r)}))}))}))}}function buildViewSpecs(e,t,n,r){var a=parseViewConfigs(e),i=parseViewConfigs(t.views);return mapHash(compileViewDefs(a,i),(function(e){return buildViewSpec(e,i,t,n,r)}))}function buildViewSpec(e,t,n,r,a){var i=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s="",l="",c={};if(i&&(o=createDurationCached(i))){var d=greatestDurationDenominator(o);s=d.unit,1===d.value&&(l=s,c=t[s]?t[s].rawOptions:{})}var u=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},p=function(t){var n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:l,optionDefaults:e.defaults,optionOverrides:__assign$1(__assign$1({},c),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(a)||e.defaults.buttonText||u(BASE_OPTION_DEFAULTS)||e.type,buttonTitleOverride:p(r)||p(n)||e.overrides.buttonHint,buttonTitleDefault:p(a)||e.defaults.buttonHint||p(BASE_OPTION_DEFAULTS)}}var durationInputMap={};function createDurationCached(e){var t=JSON.stringify(e),n=durationInputMap[t];return void 0===n&&(n=createDuration(e),durationInputMap[t]=n),n}var DateProfileGenerator=function(){function e(e){this.props=e,this.nowDate=getNow(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,a=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(a,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,a=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(a,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,a,i,o,s,l,c=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(e=constrainMarkerToRange(e,r)),a=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(a.unit),o=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,i),s=o=this.trimHiddenDays(o),c.showNonCurrentDates||(s=intersectRanges(s,a.range)),s=intersectRanges(s=this.adjustActiveRange(s),r),l=rangesIntersect(a.range,r),{validRange:r,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:i,activeRange:s,renderRange:o,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,a=null,i=null,o=null;return r.duration?(a=r.duration,i=r.durationUnit,o=this.buildRangeFromDuration(e,t,a,i)):(n=this.props.dayCount)?(i="day",o=this.buildRangeFromDayCount(e,t,n)):(o=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=greatestDurationDenominator(a=this.getFallbackDuration()).unit,o=this.buildRangeFromDuration(e,t,a,i)),{duration:a,unit:i,range:o}},e.prototype.getFallbackDuration=function(){return createDuration({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,a=t.slotMinTime,i=t.slotMaxTime,o=e.start,s=e.end;return r&&(asRoughDays(a)<0&&(o=startOfDay(o),o=n.add(o,a)),asRoughDays(i)>1&&(s=addDays(s=startOfDay(s),-1),s=n.add(s,i))),{start:o,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var a,i,o,s=this.props,l=s.dateEnv,c=s.dateAlignment;if(!c){var d=this.props.dateIncrement;c=d&&asRoughMs(d)<asRoughMs(n)?greatestDurationDenominator(d).unit:r}function u(){a=l.startOf(e,c),i=l.add(a,n),o={start:a,end:i}}return asRoughDays(n)<=1&&this.isHiddenDay(a)&&(a=startOfDay(a=this.skipHiddenDays(a,t))),u(),this.trimHiddenDays(o)||(e=this.skipHiddenDays(e,t),u()),o},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,a=this.props,i=a.dateEnv,o=a.dateAlignment,s=0,l=e;o&&(l=i.startOf(l,o)),l=startOfDay(l),r=l=this.skipHiddenDays(l,t);do{r=addDays(r,1),this.isHiddenDay(r)||(s+=1)}while(s<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,a=this.refineRange(r);return!a||null!=a.start&&null!=a.end?a:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?createDuration(1,t):e||createDuration({days:1}))},e.prototype.refineRange=function(e){if(e){var t=parseRange(e,this.props.dateEnv);return t&&(t=computeVisibleDayRange(t)),t}return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=addDays(e,t);return e},e}();function reduceViewType(e,t){if("CHANGE_VIEW_TYPE"===t.type)e=t.viewType;return e}function reduceDynamicOptionOverrides(e,t){var n;return"SET_OPTION"===t.type?__assign$1(__assign$1({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}function reduceDateProfile(e,t,n,r){var a;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if((a=r.buildPrev(e,n)).isValid)return a;break;case"NEXT":if((a=r.buildNext(e,n)).isValid)return a}return e}function initEventSources(e,t,n){var r=t?t.activeRange:null;return addSources({},parseInitialSources(e,n),r,n)}function reduceEventSources(e,t,n,r){var a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return addSources(e,t.sources,a,r);case"REMOVE_EVENT_SOURCE":return removeSource(e,t.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?fetchDirtySources(e,a,r):e;case"FETCH_EVENT_SOURCES":return fetchSourcesByIds(e,t.sourceIds?arrayToHash(t.sourceIds):excludeStaticSources(e,r),a,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return receiveResponse(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function reduceEventSourcesNewTimeZone(e,t,n){var r=t?t.activeRange:null;return fetchSourcesByIds(e,excludeStaticSources(e,n),r,!0,n)}function computeEventSourcesLoading(e){for(var t in e)if(e[t].isFetching)return!0;return!1}function addSources(e,t,n,r){for(var a={},i=0,o=t;i<o.length;i++){var s=o[i];a[s.sourceId]=s}return n&&(a=fetchDirtySources(a,n,r)),__assign$1(__assign$1({},e),a)}function removeSource(e,t){return filterHash(e,(function(e){return e.sourceId!==t}))}function fetchDirtySources(e,t,n){return fetchSourcesByIds(e,filterHash(e,(function(e){return isSourceDirty(e,t,n)})),t,!1,n)}function isSourceDirty(e,t,n){return doesSourceNeedRange(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function fetchSourcesByIds(e,t,n,r,a){var i={};for(var o in e){var s=e[o];t[o]?i[o]=fetchSource(s,n,r,a):i[o]=s}return i}function fetchSource(e,t,n,r){var a=r.options,i=r.calendarApi,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=guid();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var o=n.rawEvents;a.eventSourceSuccess&&(o=a.eventSourceSuccess.call(i,o,n.xhr)||o),e.success&&(o=e.success.call(i,o,n.xhr)||o),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})}),(function(n){console.warn(n.message,n),a.eventSourceFailure&&a.eventSourceFailure.call(i,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})})),__assign$1(__assign$1({},e),{isFetching:!0,latestFetchId:s})}function receiveResponse(e,t,n,r){var a,i=e[t];return i&&n===i.latestFetchId?__assign$1(__assign$1({},e),((a={})[t]=__assign$1(__assign$1({},i),{isFetching:!1,fetchRange:r}),a)):e}function excludeStaticSources(e,t){return filterHash(e,(function(e){return doesSourceNeedRange(e,t)}))}function parseInitialSources(e,t){var n=buildEventSourceRefiners(t),r=[].concat(e.eventSources||[]),a=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var i=0,o=r;i<o.length;i++){var s=parseEventSource(o[i],t,n);s&&a.push(s)}return a}function doesSourceNeedRange(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function reduceEventStore(e,t,n,r,a){switch(t.type){case"RECEIVE_EVENTS":return receiveRawEvents(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,a);case"ADD_EVENTS":return addEvent(e,t.eventStore,r?r.activeRange:null,a);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return mergeEventStores(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?expandRecurring(e,r.activeRange,a):e;case"REMOVE_EVENTS":return excludeSubEventStore(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return excludeEventsBySourceId(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return filterEventStoreDefs(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return createEmptyEventStore();default:return e}}function receiveRawEvents(e,t,n,r,a,i){if(t&&n===t.latestFetchId){var o=parseEvents(transformRawEvents(a,t,i),t,i);return r&&(o=expandRecurring(o,r,i)),mergeEventStores(excludeEventsBySourceId(e,t.sourceId),o)}return e}function transformRawEvents(e,t,n){var r=n.options.eventDataTransform,a=t?t.eventDataTransform:null;return a&&(e=transformEachRawEvent(e,a)),r&&(e=transformEachRawEvent(e,r)),e}function transformEachRawEvent(e,t){var n;if(t){n=[];for(var r=0,a=e;r<a.length;r++){var i=a[r],o=t(i);o?n.push(o):null==o&&n.push(i)}}else n=e;return n}function addEvent(e,t,n,r){return n&&(t=expandRecurring(t,n,r)),mergeEventStores(e,t)}function rezoneEventStoreDates(e,t,n){var r=e.defs,a=mapHash(e.instances,(function(e){var a=r[e.defId];return a.allDay||a.recurringDef?e:__assign$1(__assign$1({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})}));return{defs:r,instances:a}}function excludeEventsBySourceId(e,t){return filterEventStoreDefs(e,(function(e){return e.sourceId!==t}))}function excludeInstances(e,t){return{defs:e.defs,instances:filterHash(e.instances,(function(e){return!t[e.instanceId]}))}}function reduceDateSelection(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function reduceSelectedEvent(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function reduceEventDrag(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function reduceEventResize(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function parseToolbars(e,t,n,r,a){return{header:e.headerToolbar?parseToolbar(e.headerToolbar,e,t,n,r,a):null,footer:e.footerToolbar?parseToolbar(e.footerToolbar,e,t,n,r,a):null}}function parseToolbar(e,t,n,r,a,i){var o={},s=[],l=!1;for(var c in e){var d=parseSection(e[c],t,n,r,a,i);o[c]=d.widgets,s.push.apply(s,d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:l}}function parseSection(e,t,n,r,a,i){var o="rtl"===t.direction,s=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},p=e?e.split(" "):[],f=[],m=!1;return{widgets:p.map((function(e){return e.split(",").map((function(e){if("title"===e)return m=!0,{buttonName:e};var n,p,h,g,v,y;if(n=s[e])h=function(e){n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(v=n.text),y=n.hint||n.text;else if(p=a[e]){f.push(e),h=function(){i.changeView(e)},(v=p.buttonTextOverride)||(g=r.getIconClass(e,o))||(v=p.buttonTextDefault);var E=p.buttonTextOverride||p.buttonTextDefault;y=formatWithOrdinals(p.buttonTitleOverride||p.buttonTitleDefault||t.viewHint,[E,e],E)}else if(i[e])if(h=function(){i[e]()},(v=l[e])||(g=r.getIconClass(e,o))||(v=c[e]),"prevYear"===e||"nextYear"===e){var b="prevYear"===e?"prev":"next";y=formatWithOrdinals(d[b]||u[b],[c.year||"year","year"],c[e])}else y=function(t){return formatWithOrdinals(d[e]||u[e],[c[t]||t,t],c[e])};return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:v,buttonHint:y}}))})),viewsWithButtons:f,hasTitle:m}}var eventSourceDef$2={ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}},arrayEventSourcePlugin=createPlugin({eventSourceDefs:[eventSourceDef$2]}),eventSourceDef$1={parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;unpromisify(e.eventSource.meta.bind(null,buildRangeApiWithTimeZone(e.range,r)),(function(e){t({rawEvents:e})}),n)}},funcEventSourcePlugin=createPlugin({eventSourceDefs:[eventSourceDef$1]});function requestJson(e,t,n,r,a){var i=null;"GET"===(e=e.toUpperCase())?t=injectQueryStringParams(t,n):i=encodeParams(n);var o=new XMLHttpRequest;o.open(e,t,!0),"GET"!==e&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.onload=function(){if(o.status>=200&&o.status<400){var e=!1,t=void 0;try{t=JSON.parse(o.responseText),e=!0}catch(e){}e?r(t,o):a("Failure parsing JSON",o)}else a("Request failed",o)},o.onerror=function(){a("Request failed",o)},o.send(i)}function injectQueryStringParams(e,t){return e+(-1===e.indexOf("?")?"?":"&")+encodeParams(t)}function encodeParams(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var JSON_FEED_EVENT_SOURCE_REFINERS={method:String,extraParams:identity,startParam:String,endParam:String,timeZoneParam:String},eventSourceDef={parseMeta:function(e){return!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,a=buildRequestParams(r,e.range,e.context);requestJson(r.method,r.url,a,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}},jsonFeedEventSourcePlugin=createPlugin({eventSourceRefiners:JSON_FEED_EVENT_SOURCE_REFINERS,eventSourceDefs:[eventSourceDef]});function buildRequestParams(e,t,n){var r,a,i,o,s=n.dateEnv,l=n.options,c={};return null==(r=e.startParam)&&(r=l.startParam),null==(a=e.endParam)&&(a=l.endParam),null==(i=e.timeZoneParam)&&(i=l.timeZoneParam),o="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},__assign$1(c,o),c[r]=s.formatIso(t.start),c[a]=s.formatIso(t.end),"local"!==s.timeZone&&(c[i]=s.timeZone),c}var SIMPLE_RECURRING_REFINERS={daysOfWeek:identity,startTime:createDuration,endTime:createDuration,duration:createDuration,startRecur:identity,endRecur:identity},recurring={parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=subtractDurations(e.endTime,e.startTime)),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}return null},expand:function(e,t,n){var r=intersectRanges(t,{start:e.startRecur,end:e.endRecur});return r?expandRanges(e.daysOfWeek,e.startTime,r,n):[]}},simpleRecurringEventsPlugin=createPlugin({recurringTypes:[recurring],eventRefiners:SIMPLE_RECURRING_REFINERS});function expandRanges(e,t,n,r){for(var a=e?arrayToHash(e):null,i=startOfDay(n.start),o=n.end,s=[];i<o;){var l=void 0;a&&!a[i.getUTCDay()]||(l=t?r.add(i,t):i,s.push(l)),i=addDays(i,1)}return s}var changeHandlerPlugin=createPlugin({optionChangeHandlers:{events:function(e,t){handleEventSources([e],t)},eventSources:handleEventSources}});function handleEventSources(e,t){for(var n=hashValuesToArray(t.getCurrentData().eventSources),r=[],a=0,i=e;a<i.length;a++){for(var o=i[a],s=!1,l=0;l<n.length;l+=1)if(n[l]._raw===o){n.splice(l,1),s=!0;break}s||r.push(o)}for(var c=0,d=n;c<d.length;c++){var u=d[c];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:u.sourceId})}for(var p=0,f=r;p<f.length;p++){var m=f[p];t.calendarApi.addEventSource(m)}}function handleDateProfile(e,t){t.emitter.trigger("datesSet",__assign$1(__assign$1({},buildRangeApiWithTimeZone(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function handleEventStore(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",buildEventApis(e,t))}var globalPlugins=[arrayEventSourcePlugin,funcEventSourcePlugin,jsonFeedEventSourcePlugin,simpleRecurringEventsPlugin,changeHandlerPlugin,createPlugin({isLoadingFuncs:[function(e){return computeEventSourcesLoading(e.eventSources)}],contentTypeHandlers:{html:buildHtmlRenderer,domNodes:buildDomNodeRenderer},propSetHandlers:{dateProfile:handleDateProfile,eventStore:handleEventStore}})];function buildHtmlRenderer(){var e=null,t="";return{render:function(n,r){n===e&&r===t||(n.innerHTML=r),e=n,t=r},destroy:function(){e.innerHTML="",e=null,t=""}}}function buildDomNodeRenderer(){var e=null,t=[];function n(){t.forEach(removeElement),t=[],e=null}return{render:function(r,a){var i=Array.prototype.slice.call(a);if(r!==e||!isArraysEqual(t,i)){for(var o=0,s=i;o<s.length;o++){var l=s[o];r.appendChild(l)}n()}e=r,t=i},destroy:n}}var DelayedRunner=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;if(e in n){if(t)delete n[e];else n[e]-=1,n[e]<=0&&delete n[e];this.tryDrain()}},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),TaskRunner=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new DelayedRunner(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function buildTitle(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,createFormatter(t.titleFormat||buildTitleFormat(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function buildTitleFormat(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=diffWholeDays(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}var CalendarDataManager=function(){function e(e){var t=this;this.computeOptionsData=memoize(this._computeOptionsData),this.computeCurrentViewData=memoize(this._computeCurrentViewData),this.organizeRawLocales=memoize(organizeRawLocales),this.buildLocale=memoize(buildLocale),this.buildPluginHooks=buildBuildPluginHooks(),this.buildDateEnv=memoize(buildDateEnv),this.buildTheme=memoize(buildTheme),this.parseToolbars=memoize(parseToolbars),this.buildViewSpecs=memoize(buildViewSpecs),this.buildDateProfileGenerator=memoizeObjArg(buildDateProfileGenerator),this.buildViewApi=memoize(buildViewApi),this.buildViewUiProps=memoizeObjArg(buildViewUiProps),this.buildEventUiBySource=memoize(buildEventUiBySource,isPropsEqual),this.buildEventUiBases=memoize(buildEventUiBases),this.parseContextBusinessHours=memoizeObjArg(parseContextBusinessHours),this.buildTitle=memoize(buildTitle),this.emitter=new Emitter,this.actionRunner=new TaskRunner(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),a=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(a,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);var o=getInitialDate(r.calendarOptions,r.dateEnv),s=i.dateProfileGenerator.build(o);rangeContainsMarker(s.activeRange,o)||(o=s.currentRange.start);for(var l={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},c=0,d=r.pluginHooks.contextInit;c<d.length;c++){(0,d[c])(l)}for(var u=initEventSources(r.calendarOptions,s,l),p={dynamicOptionOverrides:n,currentViewType:a,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(l),eventSources:u,eventUiBases:{},eventStore:createEmptyEventStore(),renderableEventStore:createEmptyEventStore(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(l).selectionConfig},f=__assign$1(__assign$1({},l),p),m=0,h=r.pluginHooks.reducers;m<h.length;m++){var g=h[m];__assign$1(p,g(null,null,f))}computeIsLoading(p,l)&&this.emitter.trigger("loading",!0),this.state=p,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?__assign$1(__assign$1({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this,n=t.props,r=t.state,a=t.emitter,i=reduceDynamicOptionOverrides(r.dynamicOptionOverrides,e),o=this.computeOptionsData(n.optionOverrides,i,n.calendarApi),s=reduceViewType(r.currentViewType,e),l=this.computeCurrentViewData(s,o,n.optionOverrides,i);n.calendarApi.currentDataManager=this,a.setThisContext(n.calendarApi),a.setOptions(l.options);var c={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:a,getCurrentData:this.getCurrentData},d=r.currentDate,u=r.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(u=l.dateProfileGenerator.build(d)),u=reduceDateProfile(u,e,d=reduceCurrentDate(d,e),l.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&rangeContainsMarker(u.currentRange,d)||(d=u.currentRange.start);for(var p=reduceEventSources(r.eventSources,e,u,c),f=reduceEventStore(r.eventStore,e,p,u,c),m=computeEventSourcesLoading(p)&&!l.options.progressiveEventRendering&&r.renderableEventStore||f,h=this.buildViewUiProps(c),g=h.eventUiSingleBase,v=h.selectionConfig,y=this.buildEventUiBySource(p),E={dynamicOptionOverrides:i,currentViewType:s,currentDate:d,dateProfile:u,eventSources:p,eventStore:f,renderableEventStore:m,selectionConfig:v,eventUiBases:this.buildEventUiBases(m.defs,g,y),businessHours:this.parseContextBusinessHours(c),dateSelection:reduceDateSelection(r.dateSelection,e),eventSelection:reduceSelectedEvent(r.eventSelection,e),eventDrag:reduceEventDrag(r.eventDrag,e),eventResize:reduceEventResize(r.eventResize,e)},b=__assign$1(__assign$1({},c),E),_=0,S=o.pluginHooks.reducers;_<S.length;_++){var w=S[_];__assign$1(E,w(r,e,b))}var T=computeIsLoading(r,c),D=computeIsLoading(E,c);!T&&D?a.trigger("loading",!0):T&&!D&&a.trigger("loading",!1),this.state=E,n.onAction&&n.onAction(e)},e.prototype.updateData=function(){var e=this.props,t=this.state,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),a=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),i=this.data=__assign$1(__assign$1(__assign$1({viewTitle:this.buildTitle(t.dateProfile,a.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),a),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,l=r.calendarOptions;if(s&&s!==l)for(var c in s.timeZone!==l.timeZone&&(t.eventSources=i.eventSources=reduceEventSourcesNewTimeZone(i.eventSources,t.dateProfile,i),t.eventStore=i.eventStore=rezoneEventStoreDates(i.eventStore,n.dateEnv,i.dateEnv)),o)s[c]!==l[c]&&o[c](l[c],i);e.onData&&e.onData(i)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),a=r.refinedOptions,i=r.pluginHooks,o=r.localeDefaults,s=r.availableLocaleData;warnUnknownOptions(r.extra);var l=this.buildDateEnv(a.timeZone,a.locale,a.weekNumberCalculation,a.firstDay,a.weekText,i,s,a.defaultRangeSeparator),c=this.buildViewSpecs(i.views,e,t,o),d=this.buildTheme(a,i);return{calendarOptions:a,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:this.parseToolbars(a,e,d,c,n),localeDefaults:o,availableRawLocales:s.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=mergeRawOptions([BASE_OPTION_DEFAULTS,e,t]),r=n.locales,a=n.locale,i=this.organizeRawLocales(r),o=i.map,s=this.buildLocale(a||i.defaultCode,o).options,l=this.buildPluginHooks(e.plugins||[],globalPlugins),c=this.currentCalendarOptionsRefiners=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},BASE_OPTION_REFINERS),CALENDAR_LISTENER_REFINERS),CALENDAR_OPTION_REFINERS),l.listenerRefiners),l.optionRefiners),d={},u=mergeRawOptions([BASE_OPTION_DEFAULTS,s,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,h=!1;for(var g in u)"plugins"!==g&&(u[g]===f[g]||COMPLEX_OPTION_COMPARATORS[g]&&g in f&&COMPLEX_OPTION_COMPARATORS[g](f[g],u[g])?p[g]=m[g]:c[g]?(p[g]=c[g](u[g]),h=!0):d[g]=f[g]);return h&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:i,localeDefaults:s,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var a=t.viewSpecs[e];if(!a)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(a,t.pluginHooks,t.localeDefaults,n,r),o=i.refinedOptions;return warnUnknownOptions(i.extra),{viewSpec:a,options:o,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:a.optionDefaults.dateProfileGeneratorClass,duration:a.duration,durationUnit:a.durationUnit,usesMinMaxTime:a.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,nowInput:o.now,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,monthMode:o.monthMode,fixedWeekCount:o.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,r,a){var i=mergeRawOptions([BASE_OPTION_DEFAULTS,e.optionDefaults,n,r,e.optionOverrides,a]),o=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},BASE_OPTION_REFINERS),CALENDAR_LISTENER_REFINERS),CALENDAR_OPTION_REFINERS),VIEW_OPTION_REFINERS),t.listenerRefiners),t.optionRefiners),s={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(var p in i)i[p]===l[p]||COMPLEX_OPTION_COMPARATORS[p]&&COMPLEX_OPTION_COMPARATORS[p](i[p],l[p])?s[p]=c[p]:(i[p]===this.currentCalendarOptionsInput[p]||COMPLEX_OPTION_COMPARATORS[p]&&COMPLEX_OPTION_COMPARATORS[p](i[p],this.currentCalendarOptionsInput[p])?p in this.currentCalendarOptionsRefined&&(s[p]=this.currentCalendarOptionsRefined[p]):o[p]?s[p]=o[p](i[p]):u[p]=i[p],d=!0);return d&&(this.currentViewOptionsInput=i,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}},e}();function buildDateEnv(e,t,n,r,a,i,o,s){var l=buildLocale(t||o.defaultCode,o.map);return new DateEnv({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:a,cmdFormatter:i.cmdFormatter,defaultSeparator:s})}function buildTheme(e,t){return new(t.themeClasses[e.themeSystem]||StandardTheme)(e)}function buildDateProfileGenerator(e){return new(e.dateProfileGeneratorClass||DateProfileGenerator)(e)}function buildViewApi(e,t,n){return new ViewApi(e,t,n)}function buildEventUiBySource(e){return mapHash(e,(function(e){return e.ui}))}function buildEventUiBases(e,t,n){var r={"":t};for(var a in e){var i=e[a];i.sourceId&&n[i.sourceId]&&(r[a]=n[i.sourceId])}return r}function buildViewUiProps(e){var t=e.options;return{eventUiSingleBase:createEventUi({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:createEventUi({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function computeIsLoading(e,t){for(var n=0,r=t.pluginHooks.isLoadingFuncs;n<r.length;n++){if((0,r[n])(e))return!0}return!1}function parseContextBusinessHours(e){return parseBusinessHours(e.options.businessHours,e)}function warnUnknownOptions(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var CalendarDataProvider=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new CalendarDataManager({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return __extends(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Component),SegHierarchy=function(){function e(){this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}return e.prototype.addSegs=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var a=r[n];this.insertEntry(a,t)}return t},e.prototype.insertEntry=function(e,t){var n=this.findInsertion(e);return this.isInsertionValid(n,e)?(this.insertEntryAt(e,n),1):this.handleInvalidInsertion(n,e,t)},e.prototype.isInsertionValid=function(e,t){return(-1===this.maxCoord||e.levelCoord+t.thickness<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)},e.prototype.handleInvalidInsertion=function(e,t,n){return this.allowReslicing&&e.touchingEntry?this.splitEntry(t,e.touchingEntry,n):(n.push(t),0)},e.prototype.splitEntry=function(e,t,n){var r=0,a=[],i=e.span,o=t.span;return i.start<o.start&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:o.start}},a)),i.end>o.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.end,end:i.end}},a)),r?(n.push.apply(n,__spreadArray([{index:e.index,thickness:e.thickness,span:intersectSpans(o,i)}],a)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(insertAt(r,t.level,t.levelCoord),insertAt(n,t.level,[e])):insertAt(n[t.level],t.lateral,e),this.stackCnts[buildEntryKey(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,a=t.strictOrder,i=t.stackCnts,o=n.length,s=0,l=-1,c=-1,d=null,u=0,p=0;p<o;p+=1){var f=n[p];if(!a&&f>=s+e.thickness)break;for(var m=r[p],h=void 0,g=binarySearch(m,e.span.start,getEntrySpanEnd),v=g[0]+g[1];(h=m[v])&&h.span.start<e.span.end;){var y=f+h.thickness;y>s&&(s=y,d=h,l=p,c=v),y===s&&(u=Math.max(u,i[buildEntryKey(h)]+1)),v+=1}}var E=0;if(d)for(E=l+1;E<o&&n[E]<s;)E+=1;var b=-1;return E<o&&n[E]===s&&(b=binarySearch(r[E],e.span.end,getEntrySpanEnd)[0]),{touchingLevel:l,touchingLateral:c,touchingEntry:d,stackCnt:u,levelCoord:s,level:E,lateral:b}},e.prototype.toRects=function(){for(var e=this.entriesByLevel,t=this.levelCoords,n=e.length,r=[],a=0;a<n;a+=1)for(var i=e[a],o=t[a],s=0,l=i;s<l.length;s++){var c=l[s];r.push(__assign$1(__assign$1({},c),{levelCoord:o}))}return r},e}();function getEntrySpanEnd(e){return e.span.end}function buildEntryKey(e){return e.index+":"+e.span.start}function groupIntersectingEntries(e){for(var t=[],n=0,r=e;n<r.length;n++){for(var a=r[n],i=[],o={span:a.span,entries:[a]},s=0,l=t;s<l.length;s++){var c=l[s];intersectSpans(c.span,o.span)?o={entries:c.entries.concat(o.entries),span:joinSpans(c.span,o.span)}:i.push(c)}i.push(o),t=i}return t}function joinSpans(e,t){return{start:Math.min(e.start,t.start),end:Math.max(e.end,t.end)}}function intersectSpans(e,t){var n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function insertAt(e,t,n){e.splice(t,0,n)}function binarySearch(e,t,n){var r=0,a=e.length;if(!a||t<n(e[r]))return[0,0];if(t>n(e[a-1]))return[a,0];for(;r<a;){var i=Math.floor(r+(a-r)/2),o=n(e[i]);if(t<o)a=i;else{if(!(t>o))return[i,1];r=i+1}}return[r,0]}var Interaction=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function parseInteractionSettings(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function interactionSettingsToStore(e){var t;return(t={})[e.component.uid]=e,t}var interactionSettingsStore={},ElementDragging=function(){function e(e,t){this.emitter=new Emitter}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),config$1={},ToolbarSection=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return createElement.apply(void 0,__spreadArray(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],a=!0,i=0,o=e;i<o.length;i++){var s=o[i],l=s.buttonName,c=s.buttonClick,d=s.buttonText,u=s.buttonIcon,p=s.buttonHint;if("title"===l)a=!1,r.push(createElement("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{var f=l===t.activeButton,m=!t.isTodayEnabled&&"today"===l||!t.isPrevEnabled&&"prev"===l||!t.isNextEnabled&&"next"===l,h=["fc-"+l+"-button",n.getClass("button")];f&&h.push(n.getClass("buttonActive")),r.push(createElement("button",{type:"button",title:"function"==typeof p?p(t.navUnit):p,disabled:m,"aria-pressed":f,className:h.join(" "),onClick:c},d||(u?createElement("span",{className:u}):"")))}}if(r.length>1){var g=a&&n.getClass("buttonGroup")||"";return createElement.apply(void 0,__spreadArray(["div",{className:g}],r))}return r[0]},t}(BaseComponent),Toolbar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,a=n.extraClassName,i=!1,o=r.sectionWidgets,s=o.center;return o.left?(i=!0,e=o.left):e=o.start,o.right?(i=!0,t=o.right):t=o.end,createElement("div",{className:[a||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return createElement(ToolbarSection,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(BaseComponent),ViewContainer=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,setRef(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],a="",i="";return n?null!==t.availableWidth?a=t.availableWidth/n:i=1/n*100+"%":a=e.height||"",createElement("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:a,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(BaseComponent),EventClicking=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,a=r.context,i=getElSeg(t);if(i&&r.isValidSegDownEl(e.target)){var o=elementClosest(e.target,".fc-event-forced-url"),s=o?o.querySelector("a[href]").href:"";a.emitter.trigger("eventClick",{el:t,event:new EventApi(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:a.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=listenBySelector(t.el,"click",".fc-event",n.handleSegClick),n}return __extends(t,e),t}(Interaction),EventHovering=function(e){function t(t){var n=e.call(this,t)||this;return n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){getElSeg(t)&&(n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))},n.removeHoverListeners=listenToHoverBySelector(t.el,".fc-event",n.handleSegEnter,n.handleSegLeave),n}return __extends(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,a=r.context,i=getElSeg(n);t&&!r.isValidSegDownEl(t.target)||a.emitter.trigger(e,{el:n,event:new EventApi(a,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:a.viewApi})},t}(Interaction),CalendarContent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=memoize(buildViewContext),t.buildViewPropTransformers=memoize(buildViewPropTransformers),t.buildToolbarProps=memoize(buildToolbarProps),t.headerRef=createRef(),t.footerRef=createRef(),t.interactionsStore={},t.state={viewLabelId:getUniqueDomId()},t.registerInteractiveComponent=function(e,n){var r=parseInteractionSettings(e,n),a=[EventClicking,EventHovering].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=a,interactionSettingsStore[e.uid]=r},t.unregisterInteractiveComponent=function(e){var n=t.interactionsStore[e.uid];if(n){for(var r=0,a=n;r<a.length;r++){a[r].destroy()}delete t.interactionsStore[e.uid]}delete interactionSettingsStore[e.uid]},t.resizeRunner=new DelayedRunner((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return __extends(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,r=t.options,a=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,getNow(t.options.now,t.dateEnv),t.viewTitle),i=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?i=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);var s=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:"";return createElement(ViewContextType.Provider,{value:s},n.header&&createElement(Toolbar,__assign$1({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},a)),createElement(ViewContainer,{liquid:i,height:o,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&createElement(Toolbar,__assign$1({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},a)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++){t[e].destroy()}this.props.emitter.trigger("_unmount")},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return createElement.apply(void 0,__spreadArray([Fragment,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},a=0,i=this.buildViewPropTransformers(t.viewPropsTransformers);a<i.length;a++){var o=i[a];__assign$1(r,o.transform(r,e))}var s=n.component;return createElement(s,__assign$1({},r))},t}(PureComponent);function buildToolbarProps(e,t,n,r,a,i){var o=n.build(a,void 0,!1),s=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!rangeContainsMarker(t.currentRange,a),isPrevEnabled:s.isValid,isNextEnabled:l.isValid}}function buildViewPropTransformers(e){return e.map((function(e){return new e}))}var CalendarRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,a=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return getCanVGrowWithinCell()||i.push("fc-liquid-hack"),e.children(i,a,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(BaseComponent);function computeFallbackHeaderFormat(e,t){return createFormatter(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var CLASS_NAME="fc-col-header-cell";function renderInner$1(e){return e.text}var TableDateCell=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,r=e.theme,a=e.viewApi,i=this.props,o=i.date,s=i.dateProfile,l=getDateMeta(o,i.todayRange,null,s),c=[CLASS_NAME].concat(getDayClassNames(l,r)),d=t.format(o,i.dayHeaderFormat),u=!l.isDisabled&&i.colCnt>1?buildNavLinkAttrs(this.context,o):{},p=__assign$1(__assign$1(__assign$1({date:t.toDate(o),view:a},i.extraHookProps),{text:d}),l);return createElement(RenderHook,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:renderInner$1,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return createElement("th",__assign$1({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":l.isDisabled?void 0:formatDayString(o),colSpan:i.colSpan},i.extraDataAttrs),createElement("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&createElement("a",__assign$1({ref:n,className:["fc-col-header-cell-cushion",i.isSticky?"fc-sticky":""].join(" ")},u),r)))}))},t}(BaseComponent),WEEKDAY_FORMAT=createFormatter({weekday:"long"}),TableDowCell=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,a=t.viewApi,i=t.options,o=addDays(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=[CLASS_NAME].concat(getDayClassNames(s,r),e.extraClassNames||[]),c=n.format(o,e.dayHeaderFormat),d=__assign$1(__assign$1(__assign$1(__assign$1({date:o},s),{view:a}),e.extraHookProps),{text:c});return createElement(RenderHook,{hookProps:d,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:renderInner$1,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(t,r,a,i){return createElement("th",__assign$1({ref:t,role:"columnheader",className:l.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),createElement("div",{className:"fc-scrollgrid-sync-inner"},createElement("a",{"aria-label":n.format(o,WEEKDAY_FORMAT),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:a},i)))}))},t}(BaseComponent),NowTimer=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=getNow(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=addMs(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(r,createDuration(1,e.unit)),i=a.valueOf()-n.valueOf();return i=Math.min(864e5,i),{currentState:{nowDate:r,todayRange:buildDayRange(r)},nextState:{nowDate:a,todayRange:buildDayRange(a)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=ViewContextType,t}(Component);function buildDayRange(e){var t=startOfDay(e);return{start:t,end:addDays(t,1)}}var DayHeader=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=memoize(createDayHeaderFormatter),t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,a=t.datesRepDistinctDays,i=t.renderIntro,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,a,n.length);return createElement(NowTimer,{unit:"day"},(function(e,t){return createElement("tr",{role:"row"},i&&i("day"),n.map((function(e){return a?createElement(TableDateCell,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:o}):createElement(TableDowCell,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:o})})))}))},t}(BaseComponent);function createDayHeaderFormatter(e,t,n){return e||computeFallbackHeaderFormat(t,n)}var DaySeriesModel=function(){function e(e,t){for(var n=e.start,r=e.end,a=[],i=[],o=-1;n<r;)t.isHiddenDay(n)?a.push(o+.5):(o+=1,a.push(o),i.push(n)),n=addDays(n,1);this.dates=i,this.indices=a,this.cnt=i.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(addDays(e.end,-1)),r=Math.max(0,t),a=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(a=Math.floor(a))?{firstIndex:r,lastIndex:a,isStart:t===r,isEnd:n===a}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(diffDays(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),DayTableModel=function(){function e(e,t){var n,r,a,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n+=1);a=Math.ceil(i.length/n)}else a=1,n=i.length;this.rowCnt=a,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t+=1){for(var n=[],r=0;r<this.colCnt;r+=1)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var a=n.firstIndex,i=n.lastIndex,o=a;o<=i;){var s=Math.floor(o/t),l=Math.min((s+1)*t,i+1);r.push({row:s,firstCol:o%t,lastCol:(l-1)%t,isStart:n.isStart&&o===a,isEnd:n.isEnd&&l-1===i}),o=l}return r},e}(),Slicer=function(){function e(){this.sliceBusinessHours=memoize(this._sliceBusinessHours),this.sliceDateSelection=memoize(this._sliceDateSpan),this.sliceEventStore=memoize(this._sliceEventStore),this.sliceEventDrag=memoize(this._sliceInteraction),this.sliceEventResize=memoize(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];var o=e.eventUiBases,s=this.sliceEventStore.apply(this,__spreadArray([e.eventStore,o,t,n],a));return{dateSelectionSegs:this.sliceDateSelection.apply(this,__spreadArray([e.dateSelection,o,r],a)),businessHourSegs:this.sliceBusinessHours.apply(this,__spreadArray([e.businessHours,t,n,r],a)),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag.apply(this,__spreadArray([e.eventDrag,o,t,n],a)),eventResize:this.sliceEventResize.apply(this,__spreadArray([e.eventResize,o,t,n],a)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,__spreadArray([{range:{start:e,end:addMs(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];return e?this._sliceEventStore.apply(this,__spreadArray([expandRecurring(e,computeActiveRange(t,Boolean(n)),r),{},t,n],a)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];if(e){var o=sliceEventStore(e,t,computeActiveRange(n,Boolean(r)),r);return{bg:this.sliceEventRanges(o.bg,a),fg:this.sliceEventRanges(o.fg,a)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];if(!e)return null;var o=sliceEventStore(e.mutatedEvents,t,computeActiveRange(n,Boolean(r)),r);return{segs:this.sliceEventRanges(o.fg,a),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],a=3;a<arguments.length;a++)r[a-3]=arguments[a];if(!e)return[];for(var i=fabricateEventRange(e,t,n),o=this.sliceRange.apply(this,__spreadArray([e.range],r)),s=0,l=o;s<l.length;s++){var c=l[s];c.eventRange=i}return o},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,a=e;r<a.length;r++){var i=a[r];n.push.apply(n,this.sliceEventRange(i,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:addDays(n.start,1)});for(var r=this.sliceRange.apply(this,__spreadArray([n],t)),a=0,i=r;a<i.length;a++){var o=i[a];o.eventRange=e,o.isStart=e.isStart&&o.isStart,o.isEnd=e.isEnd&&o.isEnd}return r},e}();function computeActiveRange(e,t){var n=e.activeRange;return t?n:{start:addMs(n.start,e.slotMinTime.milliseconds),end:addMs(n.end,e.slotMaxTime.milliseconds-864e5)}}function isInteractionValid(e,t,n){var r=e.mutatedEvents.instances;for(var a in r)if(!rangeContainsRange(t.validRange,r[a].range))return!1;return isNewPropsValid({eventDrag:e},n)}function isDateSelectionValid(e,t,n){return!!rangeContainsRange(t.validRange,e.range)&&isNewPropsValid({dateSelection:e},n)}function isNewPropsValid(e,t){var n=t.getCurrentData(),r=__assign$1({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||isPropsValid)(r,t)}function isPropsValid(e,t,n,r){return void 0===n&&(n={}),!(e.eventDrag&&!isInteractionPropsValid(e,t,n,r))&&!(e.dateSelection&&!isDateSelectionPropsValid(e,t,n,r))}function isInteractionPropsValid(e,t,n,r){var a=t.getCurrentData(),i=e.eventDrag,o=i.mutatedEvents,s=o.defs,l=o.instances,c=compileEventUis(s,i.isEvent?e.eventUiBases:{"":a.selectionConfig});r&&(c=mapHash(c,r));var d=excludeInstances(e.eventStore,i.affectedEvents.instances),u=d.defs,p=d.instances,f=compileEventUis(u,e.eventUiBases);for(var m in l){var h=l[m],g=h.range,v=c[h.defId],y=s[h.defId];if(!allConstraintsPass(v.constraints,g,d,e.businessHours,t))return!1;var E=t.options.eventOverlap,b="function"==typeof E?E:null;for(var _ in p){var S=p[_];if(rangesIntersect(g,S.range)){if(!1===f[S.defId].overlap&&i.isEvent)return!1;if(!1===v.overlap)return!1;if(b&&!b(new EventApi(t,u[S.defId],S),new EventApi(t,y,h)))return!1}}for(var w=a.eventStore,T=0,D=v.allows;T<D.length;T++){var C=D[T],x=__assign$1(__assign$1({},n),{range:h.range,allDay:y.allDay}),R=w.defs[y.defId],k=w.instances[m],I=void 0;if(I=R?new EventApi(t,R,k):new EventApi(t,y),!C(buildDateSpanApiWithContext(x,t),I))return!1}}return!0}function isDateSelectionPropsValid(e,t,n,r){var a=e.eventStore,i=a.defs,o=a.instances,s=e.dateSelection,l=s.range,c=t.getCurrentData().selectionConfig;if(r&&(c=r(c)),!allConstraintsPass(c.constraints,l,a,e.businessHours,t))return!1;var d=t.options.selectOverlap,u="function"==typeof d?d:null;for(var p in o){var f=o[p];if(rangesIntersect(l,f.range)){if(!1===c.overlap)return!1;if(u&&!u(new EventApi(t,i[f.defId],f),null))return!1}}for(var m=0,h=c.allows;m<h.length;m++){if(!(0,h[m])(buildDateSpanApiWithContext(__assign$1(__assign$1({},n),s),t),null))return!1}return!0}function allConstraintsPass(e,t,n,r,a){for(var i=0,o=e;i<o.length;i++){if(!anyRangesContainRange(constraintToRanges(o[i],t,n,r,a),t))return!1}return!0}function constraintToRanges(e,t,n,r,a){return"businessHours"===e?eventStoreToRanges(expandRecurring(r,t,a)):"string"==typeof e?eventStoreToRanges(filterEventStoreDefs(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?eventStoreToRanges(expandRecurring(e,t,a)):[]}function eventStoreToRanges(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function anyRangesContainRange(e,t){for(var n=0,r=e;n<r.length;n++){if(rangeContainsRange(r[n],t))return!0}return!1}var VISIBLE_HIDDEN_RE=/^(visible|hidden)$/,Scroller=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,a=["fc-scroller"];return t&&(n?a.push("fc-scroller-liquid-absolute"):a.push("fc-scroller-liquid")),createElement("div",{ref:this.handleEl,className:a.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(VISIBLE_HIDDEN_RE.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().width>t)return!0}return!1},t.prototype.needsYScrolling=function(){if(VISIBLE_HIDDEN_RE.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r+=1){if(n[r].getBoundingClientRect().height>t)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return VISIBLE_HIDDEN_RE.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return VISIBLE_HIDDEN_RE.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(BaseComponent),RefMap=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,a=r.depths,i=r.currentMap,o=!1,s=!1;null!==e?(o=n in i,i[n]=e,a[n]=(a[n]||0)+1,s=!0):(a[n]-=1,a[n]||(delete i[n],delete t.callbackMap[n],o=!0)),t.masterCallback&&(o&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return collectFromHash(this.currentMap,e,t,n)},e.prototype.getAll=function(){return hashValuesToArray(this.currentMap)},e}();function computeShrinkWidth(e){for(var t=0,n=0,r=findElements(e,".fc-scrollgrid-shrink");n<r.length;n++){var a=r[n];t=Math.max(t,computeSmallestCellWidth(a))}return Math.ceil(t)}function getSectionHasLiquidHeight(e,t){return e.liquid&&t.liquid}function getAllowYScrolling(e,t){return null!=t.maxHeight||getSectionHasLiquidHeight(e,t)}function renderChunkContent(e,t,n,r){var a=n.expandRows;return"function"==typeof t.content?t.content(n):createElement("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:a?n.clientHeight:""}},n.tableColGroupNode,createElement(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function isColPropsEqual(e,t){return isArraysEqual(e,t,isPropsEqual)}function renderMicroColGroup(e,t){for(var n=[],r=0,a=e;r<a.length;r++)for(var i=a[r],o=i.span||1,s=0;s<o;s+=1)n.push(createElement("col",{style:{width:"shrink"===i.width?sanitizeShrinkWidth(t):i.width||"",minWidth:i.minWidth||""}}));return createElement.apply(void 0,__spreadArray(["colgroup",{}],n))}function sanitizeShrinkWidth(e){return null==e?4:e}function hasShrinkWidth(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function getScrollGridClassNames(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function getSectionClassNames(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function renderScrollShim(e){return createElement("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function getStickyHeaderDates(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function getStickyFooterScrollbar(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var SimpleScrollGrid=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=memoize((function(e){return e}),isColPropsEqual),t.renderMicroColGroup=memoize(renderMicroColGroup),t.scrollerRefs=new RefMap,t.scrollerElRefs=new RefMap(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.safeSetState(__assign$1({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=e.props,n=e.state,r=e.context,a=t.sections||[],i=this.processCols(t.cols),o=this.renderMicroColGroup(i,n.shrinkWidth),s=getScrollGridClassNames(t.liquid,r);t.collapsibleWidth&&s.push("fc-scrollgrid-collapsible");for(var l,c=a.length,d=0,u=[],p=[],f=[];d<c&&"header"===(l=a[d]).type;)u.push(this.renderSection(l,o,!0)),d+=1;for(;d<c&&"body"===(l=a[d]).type;)p.push(this.renderSection(l,o,!1)),d+=1;for(;d<c&&"footer"===(l=a[d]).type;)f.push(this.renderSection(l,o,!0)),d+=1;var m=!getCanVGrowWithinCell(),h={role:"rowgroup"};return createElement("table",{role:"grid",className:s.join(" "),style:{height:t.height}},Boolean(!m&&u.length)&&createElement.apply(void 0,__spreadArray(["thead",h],u)),Boolean(!m&&p.length)&&createElement.apply(void 0,__spreadArray(["tbody",h],p)),Boolean(!m&&f.length)&&createElement.apply(void 0,__spreadArray(["tfoot",h],f)),m&&createElement.apply(void 0,__spreadArray(__spreadArray(__spreadArray(["tbody",h],u),p),f)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?createElement(Fragment,{key:e.key},e.outerContent):createElement("tr",{key:e.key,role:"presentation",className:getSectionClassNames(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in n)return n.outerContent;var a=this.props,i=this.state,o=i.forceYScrollbars,s=i.scrollerClientWidths,l=i.scrollerClientHeights,c=getAllowYScrolling(a,e),d=getSectionHasLiquidHeight(a,e),u=a.liquid?o?"scroll":c?"auto":"hidden":"visible",p=e.key,f=renderChunkContent(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:a.collapsibleWidth||void 0===s[p]?null:s[p],clientHeight:void 0!==l[p]?l[p]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}},r);return createElement(r?"th":"td",{ref:n.elRef,role:"presentation"},createElement("div",{className:"fc-scroller-harness"+(d?" fc-scroller-harness-liquid":"")},createElement(Scroller,{ref:this.scrollerRefs.createRef(p),elRef:this.scrollerElRefs.createRef(p),overflowY:u,overflowX:a.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:d,liquidIsAbsolute:!0},f)))},t.prototype._handleScrollerEl=function(e,t){var n=getSectionByKey(this.props.sections,t);n&&setRef(n.chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return hasShrinkWidth(this.props.cols)?computeShrinkWidth(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){var e=getScrollbarWidths(),t=this.scrollerRefs,n=this.scrollerElRefs,r=!1,a={},i={};for(var o in t.currentMap){var s=t.currentMap[o];if(s&&s.needsYScrolling()){r=!0;break}}for(var l=0,c=this.props.sections;l<c.length;l++){o=c[l].key;var d=n.currentMap[o];if(d){var u=d.parentNode;a[o]=Math.floor(u.getBoundingClientRect().width-(r?e.y:0)),i[o]=Math.floor(u.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:a,scrollerClientHeights:i}},t}(BaseComponent);function getSectionByKey(e,t){for(var n=0,r=e;n<r.length;n++){var a=r[n];if(a.key===t)return a}return null}SimpleScrollGrid.addStateEquality({scrollerClientWidths:isPropsEqual,scrollerClientHeights:isPropsEqual});var EventRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,a=r.eventRange,i=a.ui,o={event:new EventApi(t,a.def,a.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&computeSegDraggable(r,t),isStartResizable:!e.disableResizing&&computeSegStartResizable(r,t),isEndResizable:!e.disableResizing&&computeSegEndResizable(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},s=getEventClassNames(o).concat(i.classNames);return createElement(RenderHook,{hookProps:o,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,a){return e.children(t,s.concat(n),r,a,o)}))},t.prototype.componentDidMount=function(){setElSeg(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&setElSeg(this.elRef.current,t)},t}(BaseComponent),StandardEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||e.defaultTimeFormat,a=buildSegTimeText(n,r,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return createElement(EventRoot,{seg:n,timeText:a,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||renderInnerContent$1$1,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(r,a,i,o,s){return createElement("a",__assign$1({className:e.extraClassNames.concat(a).join(" "),style:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},ref:r},getSegAnchorAttrs(n,t)),createElement("div",{className:"fc-event-main",ref:i,style:{color:s.textColor}},o),s.isStartResizable&&createElement("div",{className:"fc-event-resizer fc-event-resizer-start"}),s.isEndResizable&&createElement("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(BaseComponent);function renderInnerContent$1$1(e){return createElement("div",{className:"fc-event-main-frame"},e.timeText&&createElement("div",{className:"fc-event-time"},e.timeText),createElement("div",{className:"fc-event-title-container"},createElement("div",{className:"fc-event-title fc-sticky"},e.event.title||createElement(Fragment,null," "))))}var NowIndicatorRoot=function(e){return createElement(ViewContextType.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return createElement(RenderHook,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},DAY_NUM_FORMAT=createFormatter({day:"numeric"}),DayCellContent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=refineDayCellHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return createElement(ContentHook,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(BaseComponent);function refineDayCellHookProps(e){var t=e.date,n=e.dateEnv,r=getDateMeta(t,e.todayRange,null,e.dateProfile);return __assign$1(__assign$1(__assign$1({date:n.toDate(t),view:e.viewApi},r),{dayNumberText:e.showDayNumber?n.format(t,DAY_NUM_FORMAT):""}),e.extraProps)}var DayCellRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=memoizeObjArg(refineDayCellHookProps),t.normalizeClassNames=buildClassNameNormalizer(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),a=getDayClassNames(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":formatDayString(e.date)};return createElement(MountHook,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,a,i,r.isDisabled)}))},t}(BaseComponent);function renderFill(e){return createElement("div",{className:"fc-"+e})}var BgEvent=function(e){return createElement(EventRoot,{defaultContent:renderInnerContent$3,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,a){return createElement("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:a.backgroundColor}},r)}))};function renderInnerContent$3(e){return e.event.title&&createElement("div",{className:"fc-event-title"},e.event.title)}var WeekNumberRoot=function(e){return createElement(ViewContextType.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,a=e.date,i=r.weekNumberFormat||e.defaultFormat,o=n.computeWeekNumber(a),s=n.format(a,i);return createElement(RenderHook,{hookProps:{num:o,text:s,date:a},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:renderInner,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function renderInner(e){return e.text}var PADDING_FROM_VIEWPORT=10,Popover=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={titleId:getUniqueDomId()},t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&setRef(t.props.elRef,e)},t.handleDocumentMouseDown=function(e){var n=getEventTargetViaRoot(e);t.rootEl.contains(n)||t.handleCloseClick()},t.handleDocumentKeyDown=function(e){"Escape"===e.key&&t.handleCloseClick()},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.theme,n=e.options,r=this.props,a=this.state,i=["fc-popover",t.getClass("popover")].concat(r.extraClassNames||[]);return createPortal(createElement("div",__assign$1({id:r.id,className:i.join(" "),"aria-labelledby":a.titleId},r.extraAttrs,{ref:this.handleRootEl}),createElement("div",{className:"fc-popover-header "+t.getClass("popoverHeader")},createElement("span",{className:"fc-popover-title",id:a.titleId},r.title),createElement("span",{className:"fc-popover-close "+t.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),createElement("div",{className:"fc-popover-body "+t.getClass("popoverContent")},r.children)),r.parentEl)},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)},t.prototype.updateSize=function(){var e=this.context.isRtl,t=this.props,n=t.alignmentEl,r=t.alignGridTop,a=this.rootEl,i=computeClippedClientRect(n);if(i){var o=a.getBoundingClientRect(),s=r?elementClosest(n,".fc-scrollgrid").getBoundingClientRect().top:i.top,l=e?i.right-o.width:i.left;s=Math.max(s,PADDING_FROM_VIEWPORT),l=Math.min(l,document.documentElement.clientWidth-PADDING_FROM_VIEWPORT-o.width),l=Math.max(l,PADDING_FROM_VIEWPORT);var c=a.offsetParent.getBoundingClientRect();applyStyle(a,{top:s-c.top,left:l-c.left})}},t}(BaseComponent),MorePopover=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,r=this.props,a=r.startDate,i=r.todayRange,o=r.dateProfile,s=n.format(a,t.dayPopoverFormat);return createElement(DayCellRoot,{date:a,dateProfile:o,todayRange:i,elRef:this.handleRootEl},(function(e,t,n){return createElement(Popover,{elRef:e,id:r.id,title:s,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},createElement(DayCellContent,{date:a,dateProfile:o,todayRange:i},(function(e,t){return t&&createElement("div",{className:"fc-more-popover-misc",ref:e},t)})),r.children)}))},t.prototype.queryHit=function(e,t,n,r){var a=this.rootEl,i=this.props;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:i.dateProfile,dateSpan:__assign$1({allDay:!0,range:{start:i.startDate,end:i.endDate}},i.extraDateSpan),dayEl:a,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null},t}(DateComponent),MoreLinkRoot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.linkElRef=createRef(),t.state={isPopoverOpen:!1,popoverId:getUniqueDomId()},t.handleClick=function(e){var n=t,r=n.props,a=n.context,i=a.options.moreLinkClick,o=computeRange(r).start;function s(e){var t=e.eventRange,n=t.def,r=t.instance,i=t.range;return{event:new EventApi(a,n,r),start:a.dateEnv.toDate(i.start),end:a.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:o,allDay:Boolean(r.allDayDate),allSegs:r.allSegs.map(s),hiddenSegs:r.hiddenSegs.map(s),jsEvent:e,view:a.viewApi})),i&&"popover"!==i?"string"==typeof i&&a.calendarApi.zoomTo(o,i):t.setState({isPopoverOpen:!0})},t.handlePopoverClose=function(){t.setState({isPopoverOpen:!1})},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state;return createElement(ViewContextType.Consumer,null,(function(r){var a=r.viewApi,i=r.options,o=r.calendarApi,s=i.moreLinkText,l=t.moreCnt,c=computeRange(t),d="function"==typeof s?s.call(o,l):"+"+l+" "+s,u=formatWithOrdinals(i.moreLinkHint,[l],d),p={num:l,shortText:"+"+l,text:d,view:a};return createElement(Fragment,null,Boolean(t.moreCnt)&&createElement(RenderHook,{elRef:e.linkElRef,hookProps:p,classNames:i.moreLinkClassNames,content:i.moreLinkContent,defaultContent:t.defaultContent||renderMoreLinkInner$1,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},(function(r,a,i,o){return t.children(r,["fc-more-link"].concat(a),i,o,e.handleClick,u,n.isPopoverOpen,n.isPopoverOpen?n.popoverId:"")})),n.isPopoverOpen&&createElement(MorePopover,{id:n.popoverId,startDate:c.start,endDate:c.end,dateProfile:t.dateProfile,todayRange:t.todayRange,extraDateSpan:t.extraDateSpan,parentEl:e.parentEl,alignmentEl:t.alignmentElRef.current,alignGridTop:t.alignGridTop,onClose:e.handlePopoverClose},t.popoverContent()))}))},t.prototype.componentDidMount=function(){this.updateParentEl()},t.prototype.componentDidUpdate=function(){this.updateParentEl()},t.prototype.updateParentEl=function(){this.linkElRef.current&&(this.parentEl=elementClosest(this.linkElRef.current,".fc-view-harness"))},t}(BaseComponent);function renderMoreLinkInner$1(e){return e.text}function computeRange(e){if(e.allDayDate)return{start:e.allDayDate,end:addDays(e.allDayDate,1)};var t=e.hiddenSegs;return{start:computeEarliestSegStart(t),end:computeLatestSegEnd(t)}}function computeEarliestSegStart(e){return e.reduce(pickEarliestStart).eventRange.range.start}function pickEarliestStart(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function computeLatestSegEnd(e){return e.reduce(pickLatestEnd).eventRange.range.end}function pickLatestEnd(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var FullCalendar$1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._calendarApi=new CalendarApi,t}return __extends(t,e),t.prototype.render=function(){return React__namespace.createElement(CalendarDataProvider,{optionOverrides:this.props,calendarApi:this._calendarApi},(function(e){return React__namespace.createElement(CalendarRoot,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,r,a){return React__namespace.createElement("div",{className:t.join(" "),style:{height:n}},React__namespace.createElement(CalendarContent,__assign$1({isHeightAuto:r,forPrint:a},e)))}))}))},t.prototype.getApi=function(){return this._calendarApi},t}(React__namespace.Component),TableView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=createRef(),t}return __extends(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,a=[],i=getStickyHeaderDates(r.options);return e&&a.push({type:"header",key:"header",isSticky:i,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),a.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),createElement(ViewRoot,{viewSpec:r.viewSpec},(function(e,t){return createElement("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},createElement(SimpleScrollGrid,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:a}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var a=this.context.pluginHooks.scrollGridImpl;if(!a)throw new Error("No ScrollGrid implementation");var i=this.props,o=this.context,s=!i.forPrint&&getStickyHeaderDates(o.options),l=!i.forPrint&&getStickyFooterScrollbar(o.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:s,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:renderScrollShim}]}),createElement(ViewRoot,{viewSpec:o.viewSpec},(function(e,t){return createElement("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},createElement(a,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}))},t}(DateComponent);
|
|
8
8
|
/*!
|
|
9
9
|
FullCalendar v5.11.4
|
|
10
10
|
Docs & License: https://fullcalendar.io/
|
|
11
11
|
(c) 2022 Adam Shaw
|
|
12
|
-
*/function splitSegsByRow(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.row].push(a)}return n}function splitSegsByFirstCol(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.firstCol].push(a)}return n}function splitInteractionByRow(e,t){var n=[];if(e){for(a=0;a<t;a+=1)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.row].segs.push(i)}}else for(var a=0;a<t;a+=1)n[a]=null;return n}var TableCellTop=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=buildNavLinkAttrs(this.context,e.date);return createElement(DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:renderTopInner},(function(n,r){return(r||e.forceDayTop)&&createElement("div",{className:"fc-daygrid-day-top",ref:n},createElement("a",__assign$1({id:e.dayNumberId,className:"fc-daygrid-day-number"},t),r||createElement(Fragment,null," ")))}))},t}(BaseComponent);function renderTopInner(e){return e.dayNumberText}var DEFAULT_TABLE_EVENT_TIME_FORMAT=createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function hasListItemDisplay(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var TableBlockEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props;return createElement(StandardEvent,__assign$1({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:DEFAULT_TABLE_EVENT_TIME_FORMAT,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(BaseComponent),TableListItemEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||DEFAULT_TABLE_EVENT_TIME_FORMAT,r=buildSegTimeText(e.seg,n,t,!0,e.defaultDisplayEventEnd);return createElement(EventRoot,{seg:e.seg,timeText:r,defaultContent:renderInnerContent$2,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(n,r,o,i){return createElement("a",__assign$1({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(r).join(" "),ref:n},getSegAnchorAttrs(e.seg,t)),i)}))},t}(BaseComponent);function renderInnerContent$2(e){return createElement(Fragment,null,createElement("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&createElement("div",{className:"fc-event-time"},e.timeText),createElement("div",{className:"fc-event-title"},e.event.title||createElement(Fragment,null," ")))}var TableCellMoreLink=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.compileSegs=memoize(compileSegs),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.compileSegs(e.singlePlacements),n=t.allSegs,r=t.invisibleSegs;return createElement(MoreLinkRoot,{dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:function(){var t=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return createElement(Fragment,null,n.map((function(n){var r=n.eventRange.instance.instanceId;return createElement("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:t[r]?"hidden":""}},hasListItemDisplay(n)?createElement(TableListItemEvent,__assign$1({seg:n,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},getSegMeta(n,e.todayRange))):createElement(TableBlockEvent,__assign$1({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},getSegMeta(n,e.todayRange))))})))}},(function(e,t,n,r,o,i,a,s){return createElement("a",__assign$1({ref:e,className:["fc-daygrid-more-link"].concat(t).join(" "),title:i,"aria-expanded":a,"aria-controls":s},createAriaClickAttrs(o)),r)}))},t}(BaseComponent);function compileSegs(e){for(var t=[],n=[],r=0,o=e;r<o.length;r++){var i=o[r];t.push(i.seg),i.isVisible||n.push(i.seg)}return{allSegs:t,invisibleSegs:n}}var DEFAULT_WEEK_NUM_FORMAT$1=createFormatter({week:"narrow"}),TableCell=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t.state={dayNumberId:getUniqueDomId()},t.handleRootEl=function(e){setRef(t.rootElRef,e),setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=e.context,n=e.props,r=e.state,o=e.rootElRef,i=n.date,a=n.dateProfile,s=buildNavLinkAttrs(t,i,"week");return createElement(DayCellRoot,{date:i,dateProfile:a,todayRange:n.todayRange,showDayNumber:n.showDayNumber,extraHookProps:n.extraHookProps,elRef:this.handleRootEl},(function(e,t,l,u){return createElement("td",__assign$1({ref:e,role:"gridcell",className:["fc-daygrid-day"].concat(t,n.extraClassNames||[]).join(" ")},l,n.extraDataAttrs,n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),createElement("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:n.innerElRef},n.showWeekNumber&&createElement(WeekNumberRoot,{date:i,defaultFormat:DEFAULT_WEEK_NUM_FORMAT$1},(function(e,t,n,r){return createElement("a",__assign$1({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},s),r)})),!u&&createElement(TableCellTop,{date:i,dateProfile:a,showDayNumber:n.showDayNumber,dayNumberId:r.dayNumberId,forceDayTop:n.forceDayTop,todayRange:n.todayRange,extraHookProps:n.extraHookProps}),createElement("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,createElement("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},createElement(TableCellMoreLink,{allDayDate:i,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:o,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),createElement("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}))},t}(DateComponent);function computeFgSegPlacement(e,t,n,r,o,i,a){var s=new DayGridSegHierarchy;s.allowReslicing=!0,s.strictOrder=r,!0===t||!0===n?(s.maxCoord=i,s.hiddenConsumes=!0):"number"==typeof t?s.maxStackCnt=t:"number"==typeof n&&(s.maxStackCnt=n,s.hiddenConsumes=!0);for(var l=[],u=[],c=0;c<e.length;c+=1){var d=o[(C=e[c]).eventRange.instance.instanceId];null!=d?l.push({index:c,thickness:d,span:{start:C.firstCol,end:C.lastCol+1}}):u.push(C)}for(var p=s.addSegs(l),f=placeRects(s.toRects(),e,a),h=f.singleColPlacements,g=f.multiColPlacements,m=f.leftoverMargins,v=[],y=[],E=0,S=u;E<S.length;E++){g[(C=S[E]).firstCol].push({seg:C,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(var D=C.firstCol;D<=C.lastCol;D+=1)h[D].push({seg:resliceSeg(C,D,D+1,a),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(D=0;D<a.length;D+=1)v.push(0);for(var T=0,b=p;T<b.length;T++){var w=b[T],C=e[w.index],R=w.span;g[R.start].push({seg:resliceSeg(C,R.start,R.end,a),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(D=R.start;D<R.end;D+=1)v[D]+=1,h[D].push({seg:resliceSeg(C,D,D+1,a),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(D=0;D<a.length;D+=1)y.push(m[D]);return{singleColPlacements:h,multiColPlacements:g,moreCnts:v,moreMarginTops:y}}function placeRects(e,t,n){for(var r=groupRectsByEachCol(e,n.length),o=[],i=[],a=[],s=0;s<n.length;s+=1){for(var l=r[s],u=[],c=0,d=0,p=0,f=l;p<f.length;p++){var h=t[(y=f[p]).index];u.push({seg:resliceSeg(h,s,s+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:y.levelCoord-c}),c=y.levelCoord+y.thickness}var g=[];c=0,d=0;for(var m=0,v=l;m<v.length;m++){h=t[(y=v[m]).index];var y,E=y.span.end-y.span.start>1,S=y.span.start===s;d+=y.levelCoord-c,c=y.levelCoord+y.thickness,E?(d+=y.thickness,S&&g.push({seg:resliceSeg(h,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):S&&(g.push({seg:resliceSeg(h,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:d}),d=0)}o.push(u),i.push(g),a.push(d)}return{singleColPlacements:o,multiColPlacements:i,leftoverMargins:a}}function groupRectsByEachCol(e,t){for(var n=[],r=0;r<t;r+=1)n.push([]);for(var o=0,i=e;o<i.length;o++){var a=i[o];for(r=a.span.start;r<a.span.end;r+=1)n[r].push(a)}return n}function resliceSeg(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;var o=e.eventRange,i=o.range,a=intersectRanges(i,{start:r[t].date,end:addDays(r[n-1].date,1)});return __assign$1(__assign$1({},e),{firstCol:t,lastCol:n-1,eventRange:{def:o.def,ui:__assign$1(__assign$1({},o.ui),{durationEditable:!1}),instance:o.instance,range:a},isStart:e.isStart&&a.start.valueOf()===i.start.valueOf(),isEnd:e.isEnd&&a.end.valueOf()===i.end.valueOf()})}var DayGridSegHierarchy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hiddenConsumes=!1,t.forceHidden={},t}return __extends(t,e),t.prototype.addSegs=function(t){for(var n=this,r=e.prototype.addSegs.call(this,t),o=this.entriesByLevel,i=function(e){return!n.forceHidden[buildEntryKey(e)]},a=0;a<o.length;a+=1)o[a]=o[a].filter(i);return r},t.prototype.handleInvalidInsertion=function(t,n,r){var o=this.entriesByLevel,i=this.forceHidden,a=t.touchingEntry,s=t.touchingLevel,l=t.touchingLateral;if(this.hiddenConsumes&&a){var u=buildEntryKey(a);if(!i[u])if(this.allowReslicing){var c=__assign$1(__assign$1({},a),{span:intersectSpans(a.span,n.span)});i[buildEntryKey(c)]=!0,o[s][l]=c,this.splitEntry(a,n,r)}else i[u]=!0,r.push(a)}return e.prototype.handleInvalidInsertion.call(this,t,n,r)},t}(SegHierarchy),TableRow=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new RefMap,t.frameElRefs=new RefMap,t.fgElRefs=new RefMap,t.segHarnessRefs=new RefMap,t.rootElRef=createRef(),t.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this,n=t.props,r=t.state,o=t.context.options,i=n.cells.length,a=splitSegsByFirstCol(n.businessHourSegs,i),s=splitSegsByFirstCol(n.bgEventSegs,i),l=splitSegsByFirstCol(this.getHighlightSegs(),i),u=splitSegsByFirstCol(this.getMirrorSegs(),i),c=computeFgSegPlacement(sortEventSegs(n.fgEventSegs,o.eventOrder),n.dayMaxEvents,n.dayMaxEventRows,o.eventOrderStrict,r.eventInstanceHeights,r.maxContentHeight,n.cells),d=c.singleColPlacements,p=c.multiColPlacements,f=c.moreCnts,h=c.moreMarginTops,g=n.eventDrag&&n.eventDrag.affectedInstances||n.eventResize&&n.eventResize.affectedInstances||{};return createElement("tr",{ref:this.rootElRef,role:"row"},n.renderIntro&&n.renderIntro(),n.cells.map((function(t,r){var o=e.renderFgSegs(r,n.forPrint?d[r]:p[r],n.todayRange,g),i=e.renderFgSegs(r,buildMirrorPlacements(u[r],p),n.todayRange,{},Boolean(n.eventDrag),Boolean(n.eventResize),!1);return createElement(TableCell,{key:t.key,elRef:e.cellElRefs.createRef(t.key),innerElRef:e.frameElRefs.createRef(t.key),dateProfile:n.dateProfile,date:t.date,showDayNumber:n.showDayNumbers,showWeekNumber:n.showWeekNumbers&&0===r,forceDayTop:n.showWeekNumbers,todayRange:n.todayRange,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,extraHookProps:t.extraHookProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:f[r],moreMarginTop:h[r],singlePlacements:d[r],fgContentElRef:e.fgElRefs.createRef(t.key),fgContent:createElement(Fragment,null,createElement(Fragment,null,o),createElement(Fragment,null,i)),bgContent:createElement(Fragment,null,e.renderFillSegs(l[r],"highlight"),e.renderFillSegs(a[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!isPropsEqual(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,r,o,i,a){var s=this.context,l=this.props.eventSelection,u=this.state.framePositions,c=1===this.props.cells.length,d=o||i||a,p=[];if(u)for(var f=0,h=t;f<h.length;f++){var g=h[f],m=g.seg,v=m.eventRange.instance.instanceId,y=v+":"+e,E=g.isVisible&&!r[v],S=g.isAbsolute,D="",T="";S&&(s.isRtl?(T=0,D=u.lefts[m.lastCol]-u.lefts[m.firstCol]):(D=0,T=u.rights[m.firstCol]-u.rights[m.lastCol])),p.push(createElement("div",{className:"fc-daygrid-event-harness"+(S?" fc-daygrid-event-harness-abs":""),key:y,ref:d?null:this.segHarnessRefs.createRef(y),style:{visibility:E?"":"hidden",marginTop:S?"":g.marginTop,top:S?g.absoluteTop:"",left:D,right:T}},hasListItemDisplay(m)?createElement(TableListItemEvent,__assign$1({seg:m,isDragging:o,isSelected:v===l,defaultDisplayEventEnd:c},getSegMeta(m,n))):createElement(TableBlockEvent,__assign$1({seg:m,isDragging:o,isResizing:i,isDateSelecting:a,isSelected:v===l,defaultDisplayEventEnd:c},getSegMeta(m,n)))))}return p},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,r=this.props.todayRange,o=this.state.framePositions,i=[];if(o)for(var a=0,s=e;a<s.length;a++){var l=s[a],u=n?{right:0,left:o.lefts[l.lastCol]-o.lefts[l.firstCol]}:{left:0,right:o.rights[l.firstCol]-o.rights[l.lastCol]};i.push(createElement("div",{key:buildEventRangeKey(l.eventRange),className:"fc-daygrid-bg-harness",style:u},"bg-event"===t?createElement(BgEvent,__assign$1({seg:l},getSegMeta(l,r))):renderFill(t)))}return createElement.apply(void 0,__spreadArray([Fragment,{}],i))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(!t.forPrint&&null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var o=this.rootElRef.current;this.setState({framePositions:new PositionCache(o,r,!0,!1)})}}var i=this.state.eventInstanceHeights,a=this.queryEventInstanceHeights(),s=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({eventInstanceHeights:__assign$1(__assign$1({},i),a),maxContentHeight:s?this.computeMaxContentHeight():null})}},t.prototype.queryEventInstanceHeights=function(){var e=this.segHarnessRefs.currentMap,t={};for(var n in e){var r=Math.round(e[n].getBoundingClientRect().height),o=n.split(":")[0];t[o]=Math.max(t[o]||0,r)}return t},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(DateComponent);function buildMirrorPlacements(e,t){if(!e.length)return[];var n=buildAbsoluteTopHash(t);return e.map((function(e){return{seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}}))}function buildAbsoluteTopHash(e){for(var t={},n=0,r=e;n<r.length;n++)for(var o=0,i=r[n];o<i.length;o++){var a=i[o];t[a.seg.eventRange.instance.instanceId]=a.absoluteTop}return t}TableRow.addStateEquality({eventInstanceHeights:isPropsEqual});var Table=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=memoize(splitSegsByRow),t.splitBgEventSegs=memoize(splitSegsByRow),t.splitFgEventSegs=memoize(splitSegsByRow),t.splitDateSelectionSegs=memoize(splitSegsByRow),t.splitEventDrag=memoize(splitInteractionByRow),t.splitEventResize=memoize(splitInteractionByRow),t.rowRefs=new RefMap,t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,o=t.dayMaxEvents,i=t.expandRows,a=t.cells.length,s=this.splitBusinessHourSegs(t.businessHourSegs,a),l=this.splitBgEventSegs(t.bgEventSegs,a),u=this.splitFgEventSegs(t.fgEventSegs,a),c=this.splitDateSelectionSegs(t.dateSelectionSegs,a),d=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=!0===o||!0===r;return f&&!i&&(f=!1,r=null,o=null),createElement("div",{className:["fc-daygrid-body",f?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},createElement(NowTimer,{unit:"day"},(function(f,h){return createElement(Fragment,null,createElement("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:i?t.clientHeight:""}},t.colGroupNode,createElement("tbody",{role:"presentation"},t.cells.map((function(i,f){return createElement(TableRow,{ref:e.rowRefs.createRef(f),key:i.length?i[0].date.toISOString():f,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:s[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(isSegAllDay),fgEventSegs:u[f],dateSelectionSegs:c[f],eventDrag:d[f],eventResize:p[f],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new PositionCache(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new PositionCache(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o){var a=this.props.cells[i][o];return{dateProfile:this.props.dateProfile,dateSpan:__assign$1({range:this.getCellRange(i,o),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(i,o),rect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:addDays(n,1)}},t}(DateComponent);function isSegAllDay(e){return e.eventRange.def.allDay}var DayTableSlicer=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return __extends(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Slicer),DayTable=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new DayTableSlicer,t.tableRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return createElement(Table,__assign$1({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(DateComponent),DayTableView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=memoize(buildDayTableModel),t.headerRef=createRef(),t.tableRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&createElement(DayHeader,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return createElement(DayTable,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(TableView);function buildDayTableModel(e,t){var n=new DaySeriesModel(e.renderRange,t);return new DayTableModel(n,/year|month|week/.test(e.currentRangeUnit))}var TableDateProfileGenerator=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=addWeeks(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=addWeeks(l,6-Math.ceil(diffWeeks(s,l))));return{start:s,end:l}},t}(DateProfileGenerator),main$3=createPlugin({initialView:"dayGridMonth",views:{dayGrid:{component:DayTableView,dateProfileGeneratorClass:TableDateProfileGenerator},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),AllDaySplitter=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?hasBgRendering(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(Splitter),DEFAULT_SLAT_LABEL_FORMAT=createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function TimeColsAxisCell(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return createElement(ViewContextType.Consumer,null,(function(n){if(!e.isLabeled)return createElement("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,o=n.options,i=n.viewApi,a=null==o.slotLabelFormat?DEFAULT_SLAT_LABEL_FORMAT:Array.isArray(o.slotLabelFormat)?createFormatter(o.slotLabelFormat[0]):createFormatter(o.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:i,text:r.format(e.date,a)};return createElement(RenderHook,{hookProps:s,classNames:o.slotLabelClassNames,content:o.slotLabelContent,defaultContent:renderInnerContent$1,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(function(n,r,o,i){return createElement("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},createElement("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},createElement("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:o},i)))}))}))}function renderInnerContent$1(e){return e.text}var TimeBodyAxis=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return createElement("tr",{key:e.key},createElement(TimeColsAxisCell,__assign$1({},e)))}))},t}(BaseComponent),DEFAULT_WEEK_NUM_FORMAT=createFormatter({week:"short"}),AUTO_ALL_DAY_MAX_EVENT_ROWS=5,TimeColsView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new AllDaySplitter,t.headerElRef=createRef(),t.rootElRef=createRef(),t.scrollerElRef=createRef(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=t.context.options,o=t.props.dateProfile.renderRange,i=1===diffDays(o.start,o.end)?buildNavLinkAttrs(t.context,o.start,"week"):{};return r.weekNumbers&&"day"===e?createElement(WeekNumberRoot,{date:o.start,defaultFormat:DEFAULT_WEEK_NUM_FORMAT},(function(e,t,r,o){return createElement("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},createElement("a",__assign$1({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},i),o)))})):createElement("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},createElement("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,o=n.viewApi,i={text:r.allDayText,view:o};return createElement(RenderHook,{hookProps:i,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:renderAllDayInner$1,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,o){return createElement("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},createElement("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return __extends(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,o=this.props,i=[],a=getStickyHeaderDates(r.options);return e&&i.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.push({type:"body",key:"all-day-divider",outerContent:createElement("tr",{role:"presentation",className:"fc-scrollgrid-section"},createElement("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),createElement(ViewRoot,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return createElement("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},createElement(SimpleScrollGrid,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,cols:[{width:"shrink"}],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,o,i,a){var s=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&getStickyHeaderDates(u.options),p=!c.forPrint&&getStickyFooterScrollbar(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return createElement("tr",{role:"presentation"},s.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return createElement("tr",{role:"presentation"},s.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:createElement("tr",{role:"presentation",className:"fc-scrollgrid-section"},createElement("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var h=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return createElement("div",{className:"fc-timegrid-axis-chunk"},createElement("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,createElement("tbody",null,createElement(TimeBodyAxis,{slatMetas:i}))),createElement("div",{className:"fc-timegrid-now-indicator-container"},createElement(NowTimer,{unit:h?"minute":"day"},(function(e){var t=h&&a&&a.safeComputeTop(e);return"number"==typeof t?createElement(NowIndicatorRoot,{isAxis:!0,date:e},(function(e,n,r,o){return createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},o)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:renderScrollShim},{key:"cols",content:renderScrollShim}]}),createElement(ViewRoot,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return createElement("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},createElement(l,{liquid:!c.isHeightAuto&&!c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=AUTO_ALL_DAY_MAX_EVENT_ROWS),{dayMaxEvents:t,dayMaxEventRows:n}},t}(DateComponent);function renderAllDayInner$1(e){return e.text}var TimeColsSlatsCoords=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(rangeContainsMarker(t.currentRange,e)){var n=startOfDay(e),r=e.valueOf()-n.valueOf();if(r>=asRoughMs(t.slotMinTime)&&r<asRoughMs(t.slotMaxTime))return this.computeTimeTop(createDuration(r))}return null},e.prototype.computeDateTop=function(e,t){return t||(t=startOfDay(e)),this.computeTimeTop(createDuration(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,o=this.dateProfile,i=r.els.length,a=(e.milliseconds-asRoughMs(o.slotMinTime))/asRoughMs(this.slotDuration);return a=Math.max(0,a),a=Math.min(i,a),t=Math.floor(a),n=a-(t=Math.min(t,i-1)),r.tops[t]+r.getHeight(t)*n},e}(),TimeColsSlatsBody=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.slatElRefs;return createElement("tbody",null,e.slatMetas.map((function(o,i){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},s=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return createElement("tr",{key:o.key,ref:r.createRef(o.key)},e.axis&&createElement(TimeColsAxisCell,__assign$1({},o)),createElement(RenderHook,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return createElement("td",{ref:e,className:s.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(BaseComponent),TimeColsSlats=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t.slatElRefs=new RefMap,t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return createElement("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},createElement("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,createElement(TimeColsSlatsBody,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e=this.context,t=this.props;t.onCoords&&null!==t.clientWidth&&(this.rootElRef.current.offsetHeight&&t.onCoords(new TimeColsSlatsCoords(new PositionCache(this.rootElRef.current,collectSlatEls(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration)))},t}(BaseComponent);function collectSlatEls(e,t){return t.map((function(t){return e[t.key]}))}function splitSegsByCol(e,t){var n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function splitInteractionByCol(e,t){var n=[];if(e){for(a=0;a<t;a+=1)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.col].segs.push(i)}}else for(var a=0;a<t;a+=1)n[a]=null;return n}var TimeColMoreLink=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props;return createElement(MoreLinkRoot,{allDayDate:null,moreCnt:t.hiddenSegs.length,allSegs:t.hiddenSegs,hiddenSegs:t.hiddenSegs,alignmentElRef:this.rootElRef,defaultContent:renderMoreLinkInner,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,todayRange:t.todayRange,popoverContent:function(){return renderPlainFgSegs(t.hiddenSegs,t)}},(function(n,r,o,i,a,s,l,u){return createElement("a",{ref:function(t){setRef(n,t),setRef(e.rootElRef,t)},className:["fc-timegrid-more-link"].concat(r).join(" "),style:{top:t.top,bottom:t.bottom},onClick:a,title:s,"aria-expanded":l,"aria-controls":u},createElement("div",{ref:o,className:"fc-timegrid-more-link-inner fc-sticky"},i))}))},t}(BaseComponent);function renderMoreLinkInner(e){return e.shortText}function buildPositioning(e,t,n){var r=new SegHierarchy;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);var o=groupIntersectingEntries(r.addSegs(e)),i=buildWeb(r);return{segRects:webToRects(i=stretchWeb(i,1)),hiddenGroups:o}}function buildWeb(e){var t=e.entriesByLevel,n=cacheable((function(e,t){return e+":"+t}),(function(r,o){var i=buildNodes(findNextLevelSegs(e,r,o),n),a=t[r][o];return[__assign$1(__assign$1({},a),{nextLevelNodes:i[0]}),a.thickness+i[1]]}));return buildNodes(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}function buildNodes(e,t){if(!e)return[[],0];for(var n=e.level,r=e.lateralStart,o=e.lateralEnd,i=r,a=[];i<o;)a.push(t(n,i)),i+=1;return a.sort(cmpDescPressures),[a.map(extractNode),a[0][1]]}function cmpDescPressures(e,t){return t[1]-e[1]}function extractNode(e){return e[0]}function findNextLevelSegs(e,t,n){for(var r=e.levelCoords,o=e.entriesByLevel,i=o[t][n],a=r[t]+i.thickness,s=r.length,l=t;l<s&&r[l]<a;l+=1);for(;l<s;l+=1){for(var u=o[l],c=void 0,d=binarySearch(u,i.span.start,getEntrySpanEnd),p=d[0]+d[1],f=p;(c=u[f])&&c.span.start<i.span.end;)f+=1;if(p<f)return{level:l,lateralStart:p,lateralEnd:f}}return null}function stretchWeb(e,t){var n=cacheable((function(e,t,n){return buildEntryKey(e)}),(function(e,r,o){var i,a=e.nextLevelNodes,s=e.thickness,l=s+o,u=s/l,c=[];if(a.length)for(var d=0,p=a;d<p.length;d++){var f=p[d];if(void 0===i){i=(h=n(f,r,l))[0],c.push(h[1])}else{var h=n(f,i,0);c.push(h[1])}}else i=t;var g=(i-r)*u;return[i-g,__assign$1(__assign$1({},e),{thickness:g,nextLevelNodes:c})]}));return e.map((function(e){return n(e,0,0)[1]}))}function webToRects(e){var t=[],n=cacheable((function(e,t,n){return buildEntryKey(e)}),(function(e,n,o){var i=__assign$1(__assign$1({},e),{levelCoord:n,stackDepth:o,stackForward:0});return t.push(i),i.stackForward=r(e.nextLevelNodes,n+e.thickness,o+1)+1}));function r(e,t,r){for(var o=0,i=0,a=e;i<a.length;i++){var s=a[i];o=Math.max(n(s,t,r),o)}return o}return r(e,0,0),t}function cacheable(e,t){var n={};return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=e.apply(void 0,r);return i in n?n[i]:n[i]=t.apply(void 0,r)}}function computeSegVCoords(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=0);var o=[];if(n)for(var i=0;i<e.length;i+=1){var a=e[i],s=n.computeDateTop(a.start,t),l=Math.max(s+(r||0),n.computeDateTop(a.end,t));o.push({start:Math.round(s),end:Math.round(l)})}return o}function computeFgSegPlacements(e,t,n,r){for(var o=[],i=[],a=0;a<e.length;a+=1){var s=t[a];s?o.push({index:a,thickness:1,span:s}):i.push(e[a])}for(var l=buildPositioning(o,n,r),u=l.segRects,c=l.hiddenGroups,d=[],p=0,f=u;p<f.length;p++){var h=f[p];d.push({seg:e[h.index],rect:h})}for(var g=0,m=i;g<m.length;g++){var v=m[g];d.push({seg:v,rect:null})}return{segPlacements:d,hiddenGroups:c}}var DEFAULT_TIME_FORMAT$1=createFormatter({hour:"numeric",minute:"2-digit",meridiem:!1}),TimeColEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isShort&&e.push("fc-timegrid-event-short"),createElement(StandardEvent,__assign$1({},this.props,{defaultTimeFormat:DEFAULT_TIME_FORMAT$1,extraClassNames:e}))},t}(BaseComponent),TimeColMisc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props;return createElement(DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&createElement("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(BaseComponent),TimeCol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sortEventSegs=memoize(sortEventSegs),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=n.options.selectMirror,o=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||r&&t.dateSelectionSegs||[],i=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{},a=this.sortEventSegs(t.fgEventSegs,n.options.eventOrder);return createElement(DayCellRoot,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(n,s,l){return createElement("td",__assign$1({ref:n,role:"gridcell",className:["fc-timegrid-col"].concat(s,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),createElement("div",{className:"fc-timegrid-col-frame"},createElement("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(a,i,!1,!1,!1)),createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(r))),createElement("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),createElement(TimeColMisc,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,o){var i=this.props;return i.forPrint?renderPlainFgSegs(e,i):this.renderPositionedFgSegs(e,t,n,r,o)},t.prototype.renderPositionedFgSegs=function(e,t,n,r,o){var i=this,a=this.context.options,s=a.eventMaxStack,l=a.eventShortHeight,u=a.eventOrderStrict,c=a.eventMinHeight,d=this.props,p=d.date,f=d.slatCoords,h=d.eventSelection,g=d.todayRange,m=d.nowDate,v=n||r||o,y=computeFgSegPlacements(e,computeSegVCoords(e,p,f,c),u,s),E=y.segPlacements,S=y.hiddenGroups;return createElement(Fragment,null,this.renderHiddenGroups(S,e),E.map((function(e){var a=e.seg,s=e.rect,u=a.eventRange.instance.instanceId,c=v||Boolean(!t[u]&&s),d=computeSegVStyle(s&&s.span),p=!v&&s?i.computeSegHStyle(s):{left:0,right:0},f=Boolean(s)&&s.stackForward>0,y=Boolean(s)&&s.span.end-s.span.start<l;return createElement("div",{className:"fc-timegrid-event-harness"+(f?" fc-timegrid-event-harness-inset":""),key:u,style:__assign$1(__assign$1({visibility:c?"":"hidden"},d),p)},createElement(TimeColEvent,__assign$1({seg:a,isDragging:n,isResizing:r,isDateSelecting:o,isSelected:u===h,isShort:y},getSegMeta(a,g,m))))})))},t.prototype.renderHiddenGroups=function(e,t){var n=this.props,r=n.extraDateSpan,o=n.dateProfile,i=n.todayRange,a=n.nowDate,s=n.eventSelection,l=n.eventDrag,u=n.eventResize;return createElement(Fragment,null,e.map((function(e){var n=computeSegVStyle(e.span),c=compileSegsFromEntries(e.entries,t);return createElement(TimeColMoreLink,{key:buildIsoString(computeEarliestSegStart(c)),hiddenSegs:c,top:n.top,bottom:n.bottom,extraDateSpan:r,dateProfile:o,todayRange:i,nowDate:a,eventSelection:s,eventDrag:l,eventResize:u})})))},t.prototype.renderFillSegs=function(e,t){var n=this.props,r=this.context,o=computeSegVCoords(e,n.date,n.slatCoords,r.options.eventMinHeight).map((function(r,o){var i=e[o];return createElement("div",{key:buildEventRangeKey(i.eventRange),className:"fc-timegrid-bg-harness",style:computeSegVStyle(r)},"bg-event"===t?createElement(BgEvent,__assign$1({seg:i},getSegMeta(i,n.todayRange,n.nowDate))):renderFill(t))}));return createElement(Fragment,null,o)},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;return n?e.map((function(e,t){return createElement(NowIndicatorRoot,{isAxis:!1,date:r,key:t},(function(t,o,i,a){return createElement("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(o).join(" "),style:{top:n.computeDateTop(e.start,r)}},a)}))})):null},t.prototype.computeSegHStyle=function(e){var t,n,r=this.context,o=r.isRtl,i=r.options.slotEventOverlap,a=e.levelCoord,s=e.levelCoord+e.thickness;i&&(s=Math.min(1,a+2*(s-a))),o?(t=1-s,n=a):(t=a,n=1-s);var l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return i&&!e.stackForward&&(l[o?"marginLeft":"marginRight"]=20),l},t}(BaseComponent);function renderPlainFgSegs(e,t){var n=t.todayRange,r=t.nowDate,o=t.eventSelection,i=t.eventDrag,a=t.eventResize,s=(i?i.affectedInstances:null)||(a?a.affectedInstances:null)||{};return createElement(Fragment,null,e.map((function(e){var t=e.eventRange.instance.instanceId;return createElement("div",{key:t,style:{visibility:s[t]?"hidden":""}},createElement(TimeColEvent,__assign$1({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===o,isShort:!1},getSegMeta(e,n,r))))})))}function computeSegVStyle(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}function compileSegsFromEntries(e,t){return e.map((function(e){return t[e.index]}))}var TimeColsContent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=memoize(splitSegsByCol),t.splitBgEventSegs=memoize(splitSegsByCol),t.splitBusinessHourSegs=memoize(splitSegsByCol),t.splitNowIndicatorSegs=memoize(splitSegsByCol),t.splitDateSelectionSegs=memoize(splitSegsByCol),t.splitEventDrag=memoize(splitInteractionByCol),t.splitEventResize=memoize(splitInteractionByCol),t.rootElRef=createRef(),t.cellElRefs=new RefMap,t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,o=this.splitFgEventSegs(t.fgEventSegs,r),i=this.splitBgEventSegs(t.bgEventSegs,r),a=this.splitBusinessHourSegs(t.businessHourSegs,r),s=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return createElement("div",{className:"fc-timegrid-cols",ref:this.rootElRef},createElement("table",{role:"presentation",style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,createElement("tbody",{role:"presentation"},createElement("tr",{role:"row"},t.axis&&createElement("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},createElement("div",{className:"fc-timegrid-col-frame"},createElement("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&createElement(NowIndicatorRoot,{isAxis:!0,date:t.nowDate},(function(e,t,r,o){return createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},o)}))))),t.cells.map((function(n,r){return createElement(TimeCol,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,extraDateSpan:n.extraDateSpan,fgEventSegs:o[r],bgEventSegs:i[r],businessHourSegs:a[r],nowIndicatorSegs:s[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e=this.props;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new PositionCache(this.rootElRef.current,collectCellEls(this.cellElRefs.currentMap,e.cells),!0,!1))},t}(BaseComponent);function collectCellEls(e,t){return t.map((function(t){return e[t.key]}))}var TimeCols=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=memoize(processSlotOptions),t.state={slatCoords:null},t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var o=r.computeTimeTop(e.time);(o=Math.ceil(o))&&(o+=1),n(o)}return!0}return!1},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return createElement("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},createElement(TimeColsSlats,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),createElement(TimeColsContent,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.queryHit=function(e,t){var n=this.context,r=n.dateEnv,o=n.options,i=this.colCoords,a=this.props.dateProfile,s=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,o.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=i.leftToIndex(e),p=s.positions.topToIndex(t);if(null!=d&&null!=p){var f=this.props.cells[d],h=s.positions.tops[p],g=s.positions.getHeight(p),m=(t-h)/g,v=p*c+Math.floor(m*c),y=this.props.cells[d].date,E=addDurations(a.slotMinTime,multiplyDuration(u,v)),S=r.add(y,E),D=r.add(S,u);return{dateProfile:a,dateSpan:__assign$1({range:{start:S,end:D},allDay:!1},f.extraDateSpan),dayEl:i.els[d],rect:{left:i.lefts[d],right:i.rights[d],top:h,bottom:h+g},layer:0}}return null},t}(DateComponent);function processSlotOptions(e,t){var n=t||e,r=wholeDivideDurations(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var DayTimeColsSlicer=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r+=1){var o=intersectRanges(e,t[r]);o&&n.push({start:o.start,end:o.end,isStart:o.start.valueOf()===e.start.valueOf(),isEnd:o.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Slicer),DayTimeCols=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=memoize(buildDayRanges),t.slicer=new DayTimeColsSlicer,t.timeColsRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=t.dateProfile,o=t.dayTableModel,i=n.options.nowIndicator,a=this.buildDayRanges(o,r,n.dateEnv);return createElement(NowTimer,{unit:i?"minute":"day"},(function(s,l){return createElement(TimeCols,__assign$1({ref:e.timeColsRef},e.slicer.sliceProps(t,r,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:r,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:s,nowIndicatorSegs:i&&e.slicer.sliceNowDate(s,n,a),todayRange:l,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t}(DateComponent);function buildDayRanges(e,t,n){for(var r=[],o=0,i=e.headerDates;o<i.length;o++){var a=i[o];r.push({start:n.add(a,t.slotMinTime),end:n.add(a,t.slotMaxTime)})}return r}var STOCK_SUB_DURATIONS=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function buildSlatMetas(e,t,n,r,o){for(var i=new Date(0),a=e,s=createDuration(0),l=n||computeLabelInterval(r),u=[];asRoughMs(a)<asRoughMs(t);){var c=o.add(i,a),d=null!==wholeDivideDurations(s,l);u.push({date:c,time:a,key:c.toISOString(),isoTimeStr:formatIsoTimeString(c),isLabeled:d}),a=addDurations(a,r),s=addDurations(s,r)}return u}function computeLabelInterval(e){var t,n,r;for(t=STOCK_SUB_DURATIONS.length-1;t>=0;t-=1)if(null!==(r=wholeDivideDurations(n=createDuration(STOCK_SUB_DURATIONS[t]),e))&&r>1)return n;return e}var DayTimeColsView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=memoize(buildTimeColsModel),t.buildSlatMetas=memoize(buildSlatMetas),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateEnv,o=t.dateProfileGenerator,i=this.props,a=i.dateProfile,s=this.buildTimeColsModel(a,o),l=this.allDaySplitter.splitProps(i),u=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,r),c=n.dayMinWidth,d=!c,p=c,f=n.dayHeaders&&createElement(DayHeader,{dates:s.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:d?this.renderHeadAxis:null}),h=!1!==n.allDaySlot&&function(t){return createElement(DayTable,__assign$1({},l.allDay,{dateProfile:a,dayTableModel:s,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:d?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return createElement(DayTimeCols,__assign$1({},l.timed,{dayTableModel:s,dateProfile:a,axis:d,slotDuration:n.slotDuration,slatMetas:u,forPrint:i.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,h,g,s.colCnt,c,u,this.state.slatCoords):this.renderSimpleLayout(f,h,g)},t}(TimeColsView);function buildTimeColsModel(e,t){var n=new DaySeriesModel(e.renderRange,t);return new DayTableModel(n,!1)}var OPTION_REFINERS$2={allDaySlot:Boolean},main$2=createPlugin({initialView:"timeGridWeek",optionRefiners:OPTION_REFINERS$2,views:{timeGrid:{component:DayTimeColsView,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});
|
|
12
|
+
*/function splitSegsByRow(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,i=e;a<i.length;a++){var o=i[a];n[o.row].push(o)}return n}function splitSegsByFirstCol(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,i=e;a<i.length;a++){var o=i[a];n[o.firstCol].push(o)}return n}function splitInteractionByRow(e,t){var n=[];if(e){for(o=0;o<t;o+=1)n[o]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,a=e.segs;r<a.length;r++){var i=a[r];n[i.row].segs.push(i)}}else for(var o=0;o<t;o+=1)n[o]=null;return n}var TableCellTop=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=buildNavLinkAttrs(this.context,e.date);return createElement(DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:renderTopInner},(function(n,r){return(r||e.forceDayTop)&&createElement("div",{className:"fc-daygrid-day-top",ref:n},createElement("a",__assign$1({id:e.dayNumberId,className:"fc-daygrid-day-number"},t),r||createElement(Fragment,null," ")))}))},t}(BaseComponent);function renderTopInner(e){return e.dayNumberText}var DEFAULT_TABLE_EVENT_TIME_FORMAT=createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function hasListItemDisplay(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var TableBlockEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props;return createElement(StandardEvent,__assign$1({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:DEFAULT_TABLE_EVENT_TIME_FORMAT,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(BaseComponent),TableListItemEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||DEFAULT_TABLE_EVENT_TIME_FORMAT,r=buildSegTimeText(e.seg,n,t,!0,e.defaultDisplayEventEnd);return createElement(EventRoot,{seg:e.seg,timeText:r,defaultContent:renderInnerContent$2,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(n,r,a,i){return createElement("a",__assign$1({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(r).join(" "),ref:n},getSegAnchorAttrs(e.seg,t)),i)}))},t}(BaseComponent);function renderInnerContent$2(e){return createElement(Fragment,null,createElement("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&createElement("div",{className:"fc-event-time"},e.timeText),createElement("div",{className:"fc-event-title"},e.event.title||createElement(Fragment,null," ")))}var TableCellMoreLink=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.compileSegs=memoize(compileSegs),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.compileSegs(e.singlePlacements),n=t.allSegs,r=t.invisibleSegs;return createElement(MoreLinkRoot,{dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:function(){var t=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return createElement(Fragment,null,n.map((function(n){var r=n.eventRange.instance.instanceId;return createElement("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:t[r]?"hidden":""}},hasListItemDisplay(n)?createElement(TableListItemEvent,__assign$1({seg:n,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},getSegMeta(n,e.todayRange))):createElement(TableBlockEvent,__assign$1({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},getSegMeta(n,e.todayRange))))})))}},(function(e,t,n,r,a,i,o,s){return createElement("a",__assign$1({ref:e,className:["fc-daygrid-more-link"].concat(t).join(" "),title:i,"aria-expanded":o,"aria-controls":s},createAriaClickAttrs(a)),r)}))},t}(BaseComponent);function compileSegs(e){for(var t=[],n=[],r=0,a=e;r<a.length;r++){var i=a[r];t.push(i.seg),i.isVisible||n.push(i.seg)}return{allSegs:t,invisibleSegs:n}}var DEFAULT_WEEK_NUM_FORMAT$1=createFormatter({week:"narrow"}),TableCell=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t.state={dayNumberId:getUniqueDomId()},t.handleRootEl=function(e){setRef(t.rootElRef,e),setRef(t.props.elRef,e)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=e.context,n=e.props,r=e.state,a=e.rootElRef,i=n.date,o=n.dateProfile,s=buildNavLinkAttrs(t,i,"week");return createElement(DayCellRoot,{date:i,dateProfile:o,todayRange:n.todayRange,showDayNumber:n.showDayNumber,extraHookProps:n.extraHookProps,elRef:this.handleRootEl},(function(e,t,l,c){return createElement("td",__assign$1({ref:e,role:"gridcell",className:["fc-daygrid-day"].concat(t,n.extraClassNames||[]).join(" ")},l,n.extraDataAttrs,n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),createElement("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:n.innerElRef},n.showWeekNumber&&createElement(WeekNumberRoot,{date:i,defaultFormat:DEFAULT_WEEK_NUM_FORMAT$1},(function(e,t,n,r){return createElement("a",__assign$1({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},s),r)})),!c&&createElement(TableCellTop,{date:i,dateProfile:o,showDayNumber:n.showDayNumber,dayNumberId:r.dayNumberId,forceDayTop:n.forceDayTop,todayRange:n.todayRange,extraHookProps:n.extraHookProps}),createElement("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,createElement("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},createElement(TableCellMoreLink,{allDayDate:i,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:a,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),createElement("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}))},t}(DateComponent);function computeFgSegPlacement(e,t,n,r,a,i,o){var s=new DayGridSegHierarchy;s.allowReslicing=!0,s.strictOrder=r,!0===t||!0===n?(s.maxCoord=i,s.hiddenConsumes=!0):"number"==typeof t?s.maxStackCnt=t:"number"==typeof n&&(s.maxStackCnt=n,s.hiddenConsumes=!0);for(var l=[],c=[],d=0;d<e.length;d+=1){var u=a[(D=e[d]).eventRange.instance.instanceId];null!=u?l.push({index:d,thickness:u,span:{start:D.firstCol,end:D.lastCol+1}}):c.push(D)}for(var p=s.addSegs(l),f=placeRects(s.toRects(),e,o),m=f.singleColPlacements,h=f.multiColPlacements,g=f.leftoverMargins,v=[],y=[],E=0,b=c;E<b.length;E++){h[(D=b[E]).firstCol].push({seg:D,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(var _=D.firstCol;_<=D.lastCol;_+=1)m[_].push({seg:resliceSeg(D,_,_+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(_=0;_<o.length;_+=1)v.push(0);for(var S=0,w=p;S<w.length;S++){var T=w[S],D=e[T.index],C=T.span;h[C.start].push({seg:resliceSeg(D,C.start,C.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(_=C.start;_<C.end;_+=1)v[_]+=1,m[_].push({seg:resliceSeg(D,_,_+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(_=0;_<o.length;_+=1)y.push(g[_]);return{singleColPlacements:m,multiColPlacements:h,moreCnts:v,moreMarginTops:y}}function placeRects(e,t,n){for(var r=groupRectsByEachCol(e,n.length),a=[],i=[],o=[],s=0;s<n.length;s+=1){for(var l=r[s],c=[],d=0,u=0,p=0,f=l;p<f.length;p++){var m=t[(y=f[p]).index];c.push({seg:resliceSeg(m,s,s+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:y.levelCoord-d}),d=y.levelCoord+y.thickness}var h=[];d=0,u=0;for(var g=0,v=l;g<v.length;g++){m=t[(y=v[g]).index];var y,E=y.span.end-y.span.start>1,b=y.span.start===s;u+=y.levelCoord-d,d=y.levelCoord+y.thickness,E?(u+=y.thickness,b&&h.push({seg:resliceSeg(m,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):b&&(h.push({seg:resliceSeg(m,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:u}),u=0)}a.push(c),i.push(h),o.push(u)}return{singleColPlacements:a,multiColPlacements:i,leftoverMargins:o}}function groupRectsByEachCol(e,t){for(var n=[],r=0;r<t;r+=1)n.push([]);for(var a=0,i=e;a<i.length;a++){var o=i[a];for(r=o.span.start;r<o.span.end;r+=1)n[r].push(o)}return n}function resliceSeg(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;var a=e.eventRange,i=a.range,o=intersectRanges(i,{start:r[t].date,end:addDays(r[n-1].date,1)});return __assign$1(__assign$1({},e),{firstCol:t,lastCol:n-1,eventRange:{def:a.def,ui:__assign$1(__assign$1({},a.ui),{durationEditable:!1}),instance:a.instance,range:o},isStart:e.isStart&&o.start.valueOf()===i.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===i.end.valueOf()})}var DayGridSegHierarchy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hiddenConsumes=!1,t.forceHidden={},t}return __extends(t,e),t.prototype.addSegs=function(t){for(var n=this,r=e.prototype.addSegs.call(this,t),a=this.entriesByLevel,i=function(e){return!n.forceHidden[buildEntryKey(e)]},o=0;o<a.length;o+=1)a[o]=a[o].filter(i);return r},t.prototype.handleInvalidInsertion=function(t,n,r){var a=this.entriesByLevel,i=this.forceHidden,o=t.touchingEntry,s=t.touchingLevel,l=t.touchingLateral;if(this.hiddenConsumes&&o){var c=buildEntryKey(o);if(!i[c])if(this.allowReslicing){var d=__assign$1(__assign$1({},o),{span:intersectSpans(o.span,n.span)});i[buildEntryKey(d)]=!0,a[s][l]=d,this.splitEntry(o,n,r)}else i[c]=!0,r.push(o)}return e.prototype.handleInvalidInsertion.call(this,t,n,r)},t}(SegHierarchy),TableRow=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new RefMap,t.frameElRefs=new RefMap,t.fgElRefs=new RefMap,t.segHarnessRefs=new RefMap,t.rootElRef=createRef(),t.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this,n=t.props,r=t.state,a=t.context.options,i=n.cells.length,o=splitSegsByFirstCol(n.businessHourSegs,i),s=splitSegsByFirstCol(n.bgEventSegs,i),l=splitSegsByFirstCol(this.getHighlightSegs(),i),c=splitSegsByFirstCol(this.getMirrorSegs(),i),d=computeFgSegPlacement(sortEventSegs(n.fgEventSegs,a.eventOrder),n.dayMaxEvents,n.dayMaxEventRows,a.eventOrderStrict,r.eventInstanceHeights,r.maxContentHeight,n.cells),u=d.singleColPlacements,p=d.multiColPlacements,f=d.moreCnts,m=d.moreMarginTops,h=n.eventDrag&&n.eventDrag.affectedInstances||n.eventResize&&n.eventResize.affectedInstances||{};return createElement("tr",{ref:this.rootElRef,role:"row"},n.renderIntro&&n.renderIntro(),n.cells.map((function(t,r){var a=e.renderFgSegs(r,n.forPrint?u[r]:p[r],n.todayRange,h),i=e.renderFgSegs(r,buildMirrorPlacements(c[r],p),n.todayRange,{},Boolean(n.eventDrag),Boolean(n.eventResize),!1);return createElement(TableCell,{key:t.key,elRef:e.cellElRefs.createRef(t.key),innerElRef:e.frameElRefs.createRef(t.key),dateProfile:n.dateProfile,date:t.date,showDayNumber:n.showDayNumbers,showWeekNumber:n.showWeekNumbers&&0===r,forceDayTop:n.showWeekNumbers,todayRange:n.todayRange,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,extraHookProps:t.extraHookProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:f[r],moreMarginTop:m[r],singlePlacements:u[r],fgContentElRef:e.fgElRefs.createRef(t.key),fgContent:createElement(Fragment,null,createElement(Fragment,null,a),createElement(Fragment,null,i)),bgContent:createElement(Fragment,null,e.renderFillSegs(l[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!isPropsEqual(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,r,a,i,o){var s=this.context,l=this.props.eventSelection,c=this.state.framePositions,d=1===this.props.cells.length,u=a||i||o,p=[];if(c)for(var f=0,m=t;f<m.length;f++){var h=m[f],g=h.seg,v=g.eventRange.instance.instanceId,y=v+":"+e,E=h.isVisible&&!r[v],b=h.isAbsolute,_="",S="";b&&(s.isRtl?(S=0,_=c.lefts[g.lastCol]-c.lefts[g.firstCol]):(_=0,S=c.rights[g.firstCol]-c.rights[g.lastCol])),p.push(createElement("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:u?null:this.segHarnessRefs.createRef(y),style:{visibility:E?"":"hidden",marginTop:b?"":h.marginTop,top:b?h.absoluteTop:"",left:_,right:S}},hasListItemDisplay(g)?createElement(TableListItemEvent,__assign$1({seg:g,isDragging:a,isSelected:v===l,defaultDisplayEventEnd:d},getSegMeta(g,n))):createElement(TableBlockEvent,__assign$1({seg:g,isDragging:a,isResizing:i,isDateSelecting:o,isSelected:v===l,defaultDisplayEventEnd:d},getSegMeta(g,n)))))}return p},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,r=this.props.todayRange,a=this.state.framePositions,i=[];if(a)for(var o=0,s=e;o<s.length;o++){var l=s[o],c=n?{right:0,left:a.lefts[l.lastCol]-a.lefts[l.firstCol]}:{left:0,right:a.rights[l.firstCol]-a.rights[l.lastCol]};i.push(createElement("div",{key:buildEventRangeKey(l.eventRange),className:"fc-daygrid-bg-harness",style:c},"bg-event"===t?createElement(BgEvent,__assign$1({seg:l},getSegMeta(l,r))):renderFill(t)))}return createElement.apply(void 0,__spreadArray([Fragment,{}],i))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(!t.forPrint&&null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var a=this.rootElRef.current;this.setState({framePositions:new PositionCache(a,r,!0,!1)})}}var i=this.state.eventInstanceHeights,o=this.queryEventInstanceHeights(),s=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({eventInstanceHeights:__assign$1(__assign$1({},i),o),maxContentHeight:s?this.computeMaxContentHeight():null})}},t.prototype.queryEventInstanceHeights=function(){var e=this.segHarnessRefs.currentMap,t={};for(var n in e){var r=Math.round(e[n].getBoundingClientRect().height),a=n.split(":")[0];t[a]=Math.max(t[a]||0,r)}return t},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(DateComponent);function buildMirrorPlacements(e,t){if(!e.length)return[];var n=buildAbsoluteTopHash(t);return e.map((function(e){return{seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}}))}function buildAbsoluteTopHash(e){for(var t={},n=0,r=e;n<r.length;n++)for(var a=0,i=r[n];a<i.length;a++){var o=i[a];t[o.seg.eventRange.instance.instanceId]=o.absoluteTop}return t}TableRow.addStateEquality({eventInstanceHeights:isPropsEqual});var Table=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=memoize(splitSegsByRow),t.splitBgEventSegs=memoize(splitSegsByRow),t.splitFgEventSegs=memoize(splitSegsByRow),t.splitDateSelectionSegs=memoize(splitSegsByRow),t.splitEventDrag=memoize(splitInteractionByRow),t.splitEventResize=memoize(splitInteractionByRow),t.rowRefs=new RefMap,t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,a=t.dayMaxEvents,i=t.expandRows,o=t.cells.length,s=this.splitBusinessHourSegs(t.businessHourSegs,o),l=this.splitBgEventSegs(t.bgEventSegs,o),c=this.splitFgEventSegs(t.fgEventSegs,o),d=this.splitDateSelectionSegs(t.dateSelectionSegs,o),u=this.splitEventDrag(t.eventDrag,o),p=this.splitEventResize(t.eventResize,o),f=!0===a||!0===r;return f&&!i&&(f=!1,r=null,a=null),createElement("div",{className:["fc-daygrid-body",f?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},createElement(NowTimer,{unit:"day"},(function(f,m){return createElement(Fragment,null,createElement("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:i?t.clientHeight:""}},t.colGroupNode,createElement("tbody",{role:"presentation"},t.cells.map((function(i,f){return createElement(TableRow,{ref:e.rowRefs.createRef(f),key:i.length?i[0].date.toISOString():f,showDayNumbers:o>1,showWeekNumbers:t.showWeekNumbers,todayRange:m,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:s[f],eventSelection:t.eventSelection,bgEventSegs:l[f].filter(isSegAllDay),fgEventSegs:c[f],dateSelectionSegs:d[f],eventDrag:u[f],eventResize:p[f],dayMaxEvents:a,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new PositionCache(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new PositionCache(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,a=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=a){var o=this.props.cells[i][a];return{dateProfile:this.props.dateProfile,dateSpan:__assign$1({range:this.getCellRange(i,a),allDay:!0},o.extraDateSpan),dayEl:this.getCellEl(i,a),rect:{left:n.lefts[a],right:n.rights[a],top:r.tops[i],bottom:r.bottoms[i]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:addDays(n,1)}},t}(DateComponent);function isSegAllDay(e){return e.eventRange.def.allDay}var DayTableSlicer=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return __extends(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Slicer),DayTable=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new DayTableSlicer,t.tableRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return createElement(Table,__assign$1({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(DateComponent),DayTableView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=memoize(buildDayTableModel),t.headerRef=createRef(),t.tableRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,a=this.props,i=this.buildDayTableModel(a.dateProfile,r),o=n.dayHeaders&&createElement(DayHeader,{ref:this.headerRef,dateProfile:a.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return createElement(DayTable,{ref:e.tableRef,dateProfile:a.dateProfile,dayTableModel:i,businessHours:a.businessHours,dateSelection:a.dateSelection,eventStore:a.eventStore,eventUiBases:a.eventUiBases,eventSelection:a.eventSelection,eventDrag:a.eventDrag,eventResize:a.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!a.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:a.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(o,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(o,s)},t}(TableView);function buildDayTableModel(e,t){var n=new DaySeriesModel(e.renderRange,t);return new DayTableModel(n,/year|month|week/.test(e.currentRangeUnit))}var TableDateProfileGenerator=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.buildRenderRange=function(t,n,r){var a,i=this.props.dateEnv,o=e.prototype.buildRenderRange.call(this,t,n,r),s=o.start,l=o.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(a=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=addWeeks(a,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=addWeeks(l,6-Math.ceil(diffWeeks(s,l))));return{start:s,end:l}},t}(DateProfileGenerator),main$3=createPlugin({initialView:"dayGridMonth",views:{dayGrid:{component:DayTableView,dateProfileGeneratorClass:TableDateProfileGenerator},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),AllDaySplitter=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?hasBgRendering(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(Splitter),DEFAULT_SLAT_LABEL_FORMAT=createFormatter({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function TimeColsAxisCell(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return createElement(ViewContextType.Consumer,null,(function(n){if(!e.isLabeled)return createElement("td",{className:t.join(" "),"data-time":e.isoTimeStr});var r=n.dateEnv,a=n.options,i=n.viewApi,o=null==a.slotLabelFormat?DEFAULT_SLAT_LABEL_FORMAT:Array.isArray(a.slotLabelFormat)?createFormatter(a.slotLabelFormat[0]):createFormatter(a.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:i,text:r.format(e.date,o)};return createElement(RenderHook,{hookProps:s,classNames:a.slotLabelClassNames,content:a.slotLabelContent,defaultContent:renderInnerContent$1,didMount:a.slotLabelDidMount,willUnmount:a.slotLabelWillUnmount},(function(n,r,a,i){return createElement("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},createElement("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},createElement("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:a},i)))}))}))}function renderInnerContent$1(e){return e.text}var TimeBodyAxis=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return createElement("tr",{key:e.key},createElement(TimeColsAxisCell,__assign$1({},e)))}))},t}(BaseComponent),DEFAULT_WEEK_NUM_FORMAT=createFormatter({week:"short"}),AUTO_ALL_DAY_MAX_EVENT_ROWS=5,TimeColsView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new AllDaySplitter,t.headerElRef=createRef(),t.rootElRef=createRef(),t.scrollerElRef=createRef(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e,n){void 0===n&&(n="");var r=t.context.options,a=t.props.dateProfile.renderRange,i=1===diffDays(a.start,a.end)?buildNavLinkAttrs(t.context,a.start,"week"):{};return r.weekNumbers&&"day"===e?createElement(WeekNumberRoot,{date:a.start,defaultFormat:DEFAULT_WEEK_NUM_FORMAT},(function(e,t,r,a){return createElement("th",{ref:e,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(t).join(" ")},createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:n}},createElement("a",__assign$1({ref:r,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},i),a)))})):createElement("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},createElement("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,a=n.viewApi,i={text:r.allDayText,view:a};return createElement(RenderHook,{hookProps:i,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:renderAllDayInner$1,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,a){return createElement("td",{ref:t,"aria-hidden":!0,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},createElement("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},createElement("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},a)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return __extends(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,a=this.props,i=[],o=getStickyHeaderDates(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.push({type:"body",key:"all-day-divider",outerContent:createElement("tr",{role:"presentation",className:"fc-scrollgrid-section"},createElement("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),createElement(ViewRoot,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return createElement("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},createElement(SimpleScrollGrid,{liquid:!a.isHeightAuto&&!a.forPrint,collapsibleWidth:a.forPrint,cols:[{width:"shrink"}],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,a,i,o){var s=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var c=this.context,d=this.props,u=!d.forPrint&&getStickyHeaderDates(c.options),p=!d.forPrint&&getStickyFooterScrollbar(c.options),f=[];e&&f.push({type:"header",key:"header",isSticky:u,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return createElement("tr",{role:"presentation"},s.renderHeadAxis("day",e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return createElement("tr",{role:"presentation"},s.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:createElement("tr",{role:"presentation",className:"fc-scrollgrid-section"},createElement("td",{colSpan:2,className:"fc-timegrid-divider "+c.theme.getClass("tableCellShaded")}))}));var m=c.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(c.options.expandRows),chunks:[{key:"axis",content:function(e){return createElement("div",{className:"fc-timegrid-axis-chunk"},createElement("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,createElement("tbody",null,createElement(TimeBodyAxis,{slatMetas:i}))),createElement("div",{className:"fc-timegrid-now-indicator-container"},createElement(NowTimer,{unit:m?"minute":"day"},(function(e){var t=m&&o&&o.safeComputeTop(e);return"number"==typeof t?createElement(NowIndicatorRoot,{isAxis:!0,date:e},(function(e,n,r,a){return createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},a)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:renderScrollShim},{key:"cols",content:renderScrollShim}]}),createElement(ViewRoot,{viewSpec:c.viewSpec,elRef:this.rootElRef},(function(e,t){return createElement("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},createElement(l,{liquid:!d.isHeightAuto&&!d.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:a}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=AUTO_ALL_DAY_MAX_EVENT_ROWS),{dayMaxEvents:t,dayMaxEventRows:n}},t}(DateComponent);function renderAllDayInner$1(e){return e.text}var TimeColsSlatsCoords=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(rangeContainsMarker(t.currentRange,e)){var n=startOfDay(e),r=e.valueOf()-n.valueOf();if(r>=asRoughMs(t.slotMinTime)&&r<asRoughMs(t.slotMaxTime))return this.computeTimeTop(createDuration(r))}return null},e.prototype.computeDateTop=function(e,t){return t||(t=startOfDay(e)),this.computeTimeTop(createDuration(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,a=this.dateProfile,i=r.els.length,o=(e.milliseconds-asRoughMs(a.slotMinTime))/asRoughMs(this.slotDuration);return o=Math.max(0,o),o=Math.min(i,o),t=Math.floor(o),n=o-(t=Math.min(t,i-1)),r.tops[t]+r.getHeight(t)*n},e}(),TimeColsSlatsBody=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.slatElRefs;return createElement("tbody",null,e.slatMetas.map((function(a,i){var o={time:a.time,date:t.dateEnv.toDate(a.date),view:t.viewApi},s=["fc-timegrid-slot","fc-timegrid-slot-lane",a.isLabeled?"":"fc-timegrid-slot-minor"];return createElement("tr",{key:a.key,ref:r.createRef(a.key)},e.axis&&createElement(TimeColsAxisCell,__assign$1({},a)),createElement(RenderHook,{hookProps:o,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return createElement("td",{ref:e,className:s.concat(t).join(" "),"data-time":a.isoTimeStr},r)})))})))},t}(BaseComponent),TimeColsSlats=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t.slatElRefs=new RefMap,t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return createElement("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},createElement("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,createElement(TimeColsSlatsBody,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e=this.context,t=this.props;t.onCoords&&null!==t.clientWidth&&(this.rootElRef.current.offsetHeight&&t.onCoords(new TimeColsSlatsCoords(new PositionCache(this.rootElRef.current,collectSlatEls(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration)))},t}(BaseComponent);function collectSlatEls(e,t){return t.map((function(t){return e[t.key]}))}function splitSegsByCol(e,t){var n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function splitInteractionByCol(e,t){var n=[];if(e){for(o=0;o<t;o+=1)n[o]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,a=e.segs;r<a.length;r++){var i=a[r];n[i.col].segs.push(i)}}else for(var o=0;o<t;o+=1)n[o]=null;return n}var TimeColMoreLink=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props;return createElement(MoreLinkRoot,{allDayDate:null,moreCnt:t.hiddenSegs.length,allSegs:t.hiddenSegs,hiddenSegs:t.hiddenSegs,alignmentElRef:this.rootElRef,defaultContent:renderMoreLinkInner,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,todayRange:t.todayRange,popoverContent:function(){return renderPlainFgSegs(t.hiddenSegs,t)}},(function(n,r,a,i,o,s,l,c){return createElement("a",{ref:function(t){setRef(n,t),setRef(e.rootElRef,t)},className:["fc-timegrid-more-link"].concat(r).join(" "),style:{top:t.top,bottom:t.bottom},onClick:o,title:s,"aria-expanded":l,"aria-controls":c},createElement("div",{ref:a,className:"fc-timegrid-more-link-inner fc-sticky"},i))}))},t}(BaseComponent);function renderMoreLinkInner(e){return e.shortText}function buildPositioning(e,t,n){var r=new SegHierarchy;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);var a=groupIntersectingEntries(r.addSegs(e)),i=buildWeb(r);return{segRects:webToRects(i=stretchWeb(i,1)),hiddenGroups:a}}function buildWeb(e){var t=e.entriesByLevel,n=cacheable((function(e,t){return e+":"+t}),(function(r,a){var i=buildNodes(findNextLevelSegs(e,r,a),n),o=t[r][a];return[__assign$1(__assign$1({},o),{nextLevelNodes:i[0]}),o.thickness+i[1]]}));return buildNodes(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}function buildNodes(e,t){if(!e)return[[],0];for(var n=e.level,r=e.lateralStart,a=e.lateralEnd,i=r,o=[];i<a;)o.push(t(n,i)),i+=1;return o.sort(cmpDescPressures),[o.map(extractNode),o[0][1]]}function cmpDescPressures(e,t){return t[1]-e[1]}function extractNode(e){return e[0]}function findNextLevelSegs(e,t,n){for(var r=e.levelCoords,a=e.entriesByLevel,i=a[t][n],o=r[t]+i.thickness,s=r.length,l=t;l<s&&r[l]<o;l+=1);for(;l<s;l+=1){for(var c=a[l],d=void 0,u=binarySearch(c,i.span.start,getEntrySpanEnd),p=u[0]+u[1],f=p;(d=c[f])&&d.span.start<i.span.end;)f+=1;if(p<f)return{level:l,lateralStart:p,lateralEnd:f}}return null}function stretchWeb(e,t){var n=cacheable((function(e,t,n){return buildEntryKey(e)}),(function(e,r,a){var i,o=e.nextLevelNodes,s=e.thickness,l=s+a,c=s/l,d=[];if(o.length)for(var u=0,p=o;u<p.length;u++){var f=p[u];if(void 0===i){i=(m=n(f,r,l))[0],d.push(m[1])}else{var m=n(f,i,0);d.push(m[1])}}else i=t;var h=(i-r)*c;return[i-h,__assign$1(__assign$1({},e),{thickness:h,nextLevelNodes:d})]}));return e.map((function(e){return n(e,0,0)[1]}))}function webToRects(e){var t=[],n=cacheable((function(e,t,n){return buildEntryKey(e)}),(function(e,n,a){var i=__assign$1(__assign$1({},e),{levelCoord:n,stackDepth:a,stackForward:0});return t.push(i),i.stackForward=r(e.nextLevelNodes,n+e.thickness,a+1)+1}));function r(e,t,r){for(var a=0,i=0,o=e;i<o.length;i++){var s=o[i];a=Math.max(n(s,t,r),a)}return a}return r(e,0,0),t}function cacheable(e,t){var n={};return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var i=e.apply(void 0,r);return i in n?n[i]:n[i]=t.apply(void 0,r)}}function computeSegVCoords(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=0);var a=[];if(n)for(var i=0;i<e.length;i+=1){var o=e[i],s=n.computeDateTop(o.start,t),l=Math.max(s+(r||0),n.computeDateTop(o.end,t));a.push({start:Math.round(s),end:Math.round(l)})}return a}function computeFgSegPlacements(e,t,n,r){for(var a=[],i=[],o=0;o<e.length;o+=1){var s=t[o];s?a.push({index:o,thickness:1,span:s}):i.push(e[o])}for(var l=buildPositioning(a,n,r),c=l.segRects,d=l.hiddenGroups,u=[],p=0,f=c;p<f.length;p++){var m=f[p];u.push({seg:e[m.index],rect:m})}for(var h=0,g=i;h<g.length;h++){var v=g[h];u.push({seg:v,rect:null})}return{segPlacements:u,hiddenGroups:d}}var DEFAULT_TIME_FORMAT$1=createFormatter({hour:"numeric",minute:"2-digit",meridiem:!1}),TimeColEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isShort&&e.push("fc-timegrid-event-short"),createElement(StandardEvent,__assign$1({},this.props,{defaultTimeFormat:DEFAULT_TIME_FORMAT$1,extraClassNames:e}))},t}(BaseComponent),TimeColMisc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props;return createElement(DayCellContent,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&createElement("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(BaseComponent),TimeCol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sortEventSegs=memoize(sortEventSegs),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=n.options.selectMirror,a=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||r&&t.dateSelectionSegs||[],i=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{},o=this.sortEventSegs(t.fgEventSegs,n.options.eventOrder);return createElement(DayCellRoot,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(n,s,l){return createElement("td",__assign$1({ref:n,role:"gridcell",className:["fc-timegrid-col"].concat(s,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),createElement("div",{className:"fc-timegrid-col-frame"},createElement("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o,i,!1,!1,!1)),createElement("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(a,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(r))),createElement("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),createElement(TimeColMisc,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,a){var i=this.props;return i.forPrint?renderPlainFgSegs(e,i):this.renderPositionedFgSegs(e,t,n,r,a)},t.prototype.renderPositionedFgSegs=function(e,t,n,r,a){var i=this,o=this.context.options,s=o.eventMaxStack,l=o.eventShortHeight,c=o.eventOrderStrict,d=o.eventMinHeight,u=this.props,p=u.date,f=u.slatCoords,m=u.eventSelection,h=u.todayRange,g=u.nowDate,v=n||r||a,y=computeFgSegPlacements(e,computeSegVCoords(e,p,f,d),c,s),E=y.segPlacements,b=y.hiddenGroups;return createElement(Fragment,null,this.renderHiddenGroups(b,e),E.map((function(e){var o=e.seg,s=e.rect,c=o.eventRange.instance.instanceId,d=v||Boolean(!t[c]&&s),u=computeSegVStyle(s&&s.span),p=!v&&s?i.computeSegHStyle(s):{left:0,right:0},f=Boolean(s)&&s.stackForward>0,y=Boolean(s)&&s.span.end-s.span.start<l;return createElement("div",{className:"fc-timegrid-event-harness"+(f?" fc-timegrid-event-harness-inset":""),key:c,style:__assign$1(__assign$1({visibility:d?"":"hidden"},u),p)},createElement(TimeColEvent,__assign$1({seg:o,isDragging:n,isResizing:r,isDateSelecting:a,isSelected:c===m,isShort:y},getSegMeta(o,h,g))))})))},t.prototype.renderHiddenGroups=function(e,t){var n=this.props,r=n.extraDateSpan,a=n.dateProfile,i=n.todayRange,o=n.nowDate,s=n.eventSelection,l=n.eventDrag,c=n.eventResize;return createElement(Fragment,null,e.map((function(e){var n=computeSegVStyle(e.span),d=compileSegsFromEntries(e.entries,t);return createElement(TimeColMoreLink,{key:buildIsoString(computeEarliestSegStart(d)),hiddenSegs:d,top:n.top,bottom:n.bottom,extraDateSpan:r,dateProfile:a,todayRange:i,nowDate:o,eventSelection:s,eventDrag:l,eventResize:c})})))},t.prototype.renderFillSegs=function(e,t){var n=this.props,r=this.context,a=computeSegVCoords(e,n.date,n.slatCoords,r.options.eventMinHeight).map((function(r,a){var i=e[a];return createElement("div",{key:buildEventRangeKey(i.eventRange),className:"fc-timegrid-bg-harness",style:computeSegVStyle(r)},"bg-event"===t?createElement(BgEvent,__assign$1({seg:i},getSegMeta(i,n.todayRange,n.nowDate))):renderFill(t))}));return createElement(Fragment,null,a)},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;return n?e.map((function(e,t){return createElement(NowIndicatorRoot,{isAxis:!1,date:r,key:t},(function(t,a,i,o){return createElement("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(a).join(" "),style:{top:n.computeDateTop(e.start,r)}},o)}))})):null},t.prototype.computeSegHStyle=function(e){var t,n,r=this.context,a=r.isRtl,i=r.options.slotEventOverlap,o=e.levelCoord,s=e.levelCoord+e.thickness;i&&(s=Math.min(1,o+2*(s-o))),a?(t=1-s,n=o):(t=o,n=1-s);var l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return i&&!e.stackForward&&(l[a?"marginLeft":"marginRight"]=20),l},t}(BaseComponent);function renderPlainFgSegs(e,t){var n=t.todayRange,r=t.nowDate,a=t.eventSelection,i=t.eventDrag,o=t.eventResize,s=(i?i.affectedInstances:null)||(o?o.affectedInstances:null)||{};return createElement(Fragment,null,e.map((function(e){var t=e.eventRange.instance.instanceId;return createElement("div",{key:t,style:{visibility:s[t]?"hidden":""}},createElement(TimeColEvent,__assign$1({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===a,isShort:!1},getSegMeta(e,n,r))))})))}function computeSegVStyle(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}function compileSegsFromEntries(e,t){return e.map((function(e){return t[e.index]}))}var TimeColsContent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=memoize(splitSegsByCol),t.splitBgEventSegs=memoize(splitSegsByCol),t.splitBusinessHourSegs=memoize(splitSegsByCol),t.splitNowIndicatorSegs=memoize(splitSegsByCol),t.splitDateSelectionSegs=memoize(splitSegsByCol),t.splitEventDrag=memoize(splitInteractionByCol),t.splitEventResize=memoize(splitInteractionByCol),t.rootElRef=createRef(),t.cellElRefs=new RefMap,t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,a=this.splitFgEventSegs(t.fgEventSegs,r),i=this.splitBgEventSegs(t.bgEventSegs,r),o=this.splitBusinessHourSegs(t.businessHourSegs,r),s=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),c=this.splitEventDrag(t.eventDrag,r),d=this.splitEventResize(t.eventResize,r);return createElement("div",{className:"fc-timegrid-cols",ref:this.rootElRef},createElement("table",{role:"presentation",style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,createElement("tbody",{role:"presentation"},createElement("tr",{role:"row"},t.axis&&createElement("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},createElement("div",{className:"fc-timegrid-col-frame"},createElement("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&createElement(NowIndicatorRoot,{isAxis:!0,date:t.nowDate},(function(e,t,r,a){return createElement("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},a)}))))),t.cells.map((function(n,r){return createElement(TimeCol,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,extraDateSpan:n.extraDateSpan,fgEventSegs:a[r],bgEventSegs:i[r],businessHourSegs:o[r],nowIndicatorSegs:s[r],dateSelectionSegs:l[r],eventDrag:c[r],eventResize:d[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e=this.props;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new PositionCache(this.rootElRef.current,collectCellEls(this.cellElRefs.currentMap,e.cells),!0,!1))},t}(BaseComponent);function collectCellEls(e,t){return t.map((function(t){return e[t.key]}))}var TimeCols=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=memoize(processSlotOptions),t.state={slatCoords:null},t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var a=r.computeTimeTop(e.time);(a=Math.ceil(a))&&(a+=1),n(a)}return!0}return!1},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return createElement("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},createElement(TimeColsSlats,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),createElement(TimeColsContent,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.queryHit=function(e,t){var n=this.context,r=n.dateEnv,a=n.options,i=this.colCoords,o=this.props.dateProfile,s=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,a.snapDuration),c=l.snapDuration,d=l.snapsPerSlot,u=i.leftToIndex(e),p=s.positions.topToIndex(t);if(null!=u&&null!=p){var f=this.props.cells[u],m=s.positions.tops[p],h=s.positions.getHeight(p),g=(t-m)/h,v=p*d+Math.floor(g*d),y=this.props.cells[u].date,E=addDurations(o.slotMinTime,multiplyDuration(c,v)),b=r.add(y,E),_=r.add(b,c);return{dateProfile:o,dateSpan:__assign$1({range:{start:b,end:_},allDay:!1},f.extraDateSpan),dayEl:i.els[u],rect:{left:i.lefts[u],right:i.rights[u],top:m,bottom:m+h},layer:0}}return null},t}(DateComponent);function processSlotOptions(e,t){var n=t||e,r=wholeDivideDurations(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var DayTimeColsSlicer=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r+=1){var a=intersectRanges(e,t[r]);a&&n.push({start:a.start,end:a.end,isStart:a.start.valueOf()===e.start.valueOf(),isEnd:a.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Slicer),DayTimeCols=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=memoize(buildDayRanges),t.slicer=new DayTimeColsSlicer,t.timeColsRef=createRef(),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=t.dateProfile,a=t.dayTableModel,i=n.options.nowIndicator,o=this.buildDayRanges(a,r,n.dateEnv);return createElement(NowTimer,{unit:i?"minute":"day"},(function(s,l){return createElement(TimeCols,__assign$1({ref:e.timeColsRef},e.slicer.sliceProps(t,r,null,n,o),{forPrint:t.forPrint,axis:t.axis,dateProfile:r,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:a.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:s,nowIndicatorSegs:i&&e.slicer.sliceNowDate(s,n,o),todayRange:l,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t}(DateComponent);function buildDayRanges(e,t,n){for(var r=[],a=0,i=e.headerDates;a<i.length;a++){var o=i[a];r.push({start:n.add(o,t.slotMinTime),end:n.add(o,t.slotMaxTime)})}return r}var STOCK_SUB_DURATIONS=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function buildSlatMetas(e,t,n,r,a){for(var i=new Date(0),o=e,s=createDuration(0),l=n||computeLabelInterval(r),c=[];asRoughMs(o)<asRoughMs(t);){var d=a.add(i,o),u=null!==wholeDivideDurations(s,l);c.push({date:d,time:o,key:d.toISOString(),isoTimeStr:formatIsoTimeString(d),isLabeled:u}),o=addDurations(o,r),s=addDurations(s,r)}return c}function computeLabelInterval(e){var t,n,r;for(t=STOCK_SUB_DURATIONS.length-1;t>=0;t-=1)if(null!==(r=wholeDivideDurations(n=createDuration(STOCK_SUB_DURATIONS[t]),e))&&r>1)return n;return e}var DayTimeColsView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=memoize(buildTimeColsModel),t.buildSlatMetas=memoize(buildSlatMetas),t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateEnv,a=t.dateProfileGenerator,i=this.props,o=i.dateProfile,s=this.buildTimeColsModel(o,a),l=this.allDaySplitter.splitProps(i),c=this.buildSlatMetas(o.slotMinTime,o.slotMaxTime,n.slotLabelInterval,n.slotDuration,r),d=n.dayMinWidth,u=!d,p=d,f=n.dayHeaders&&createElement(DayHeader,{dates:s.headerDates,dateProfile:o,datesRepDistinctDays:!0,renderIntro:u?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return createElement(DayTable,__assign$1({},l.allDay,{dateProfile:o,dayTableModel:s,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:u?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint},e.getAllDayMaxEventProps()))},h=function(t){return createElement(DayTimeCols,__assign$1({},l.timed,{dayTableModel:s,dateProfile:o,axis:u,slotDuration:n.slotDuration,slatMetas:c,forPrint:i.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,h,s.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,h)},t}(TimeColsView);function buildTimeColsModel(e,t){var n=new DaySeriesModel(e.renderRange,t);return new DayTableModel(n,!1)}var OPTION_REFINERS$2={allDaySlot:Boolean},main$2=createPlugin({initialView:"timeGridWeek",optionRefiners:OPTION_REFINERS$2,views:{timeGrid:{component:DayTimeColsView,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});
|
|
13
13
|
/*!
|
|
14
14
|
FullCalendar v5.11.4
|
|
15
15
|
Docs & License: https://fullcalendar.io/
|
|
16
16
|
(c) 2022 Adam Shaw
|
|
17
17
|
*/
|
|
18
|
-
config.touchMouseIgnoreWait=500;var ignoreMouseDepth=0,listenerCnt=0,isWindowTouchMoveCancelled=!1,PointerDragging=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&isPrimaryMouseButton(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,startIgnoringMouse()}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Emitter,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),listenerCreated()}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),listenerDestroyed()},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!elementClosest(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){isWindowTouchMoveCancelled=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?elementClosest(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return ignoreMouseDepth||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(isWindowTouchMoveCancelled=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,o=e.touches,i=0,a=0;return o&&o.length?(n=o[0].pageX,r=o[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(i=n-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:i,deltaY:a}},e}();function isPrimaryMouseButton(e){return 0===e.button&&!e.ctrlKey}function startIgnoringMouse(){ignoreMouseDepth+=1,setTimeout((function(){ignoreMouseDepth-=1}),config.touchMouseIgnoreWait)}function listenerCreated(){1===(listenerCnt+=1)&&window.addEventListener("touchmove",onWindowTouchMove,{passive:!1})}function listenerDestroyed(){(listenerCnt-=1)||window.removeEventListener("touchmove",onWindowTouchMove,{passive:!1})}function onWindowTouchMove(e){isWindowTouchMoveCancelled&&e.preventDefault()}var ElementMirror=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",applyStyle(n,{left:r.left,top:r.top}),whenTransitionDone(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(removeElement(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&applyStyle(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),applyStyle(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ScrollGeomCache=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return __extends(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(ScrollController),ElementScrollGeomCache=function(e){function t(t,n){return e.call(this,new ElementScrollController(t),n)||this}return __extends(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return computeInnerRect(this.scrollController.el)},t}(ScrollGeomCache),WindowScrollGeomCache=function(e){function t(t){return e.call(this,new WindowScrollController,t)||this}return __extends(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ScrollGeomCache),getTime="function"==typeof performance?performance.now:Date.now,AutoScroller=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=getTime();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,o=null===this.pointerScreenY?0:r-this.pointerScreenY,i=null===this.pointerScreenX?0:n-this.pointerScreenX;o<0?this.everMovedUp=!0:o>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(getTime()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++){t[e].destroy()}this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,o=r-e.distance,i=o*o/(r*r)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":n.setScrollLeft(n.getScrollLeft()+i*a);break;case"top":a=-1;case"bottom":n.setScrollTop(n.getScrollTop()+i*a)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,o=0,i=this.scrollCaches||[];o<i.length;o++){var a=i[o],s=a.clientRect,l=e-s.left,u=s.right-e,c=t-s.top,d=s.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new WindowScrollGeomCache(!1):new ElementScrollGeomCache(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n<r.length;n++){var o=r[n];"object"==typeof o?t.push(o):t.push.apply(t,Array.prototype.slice.call(getElRoot(e).querySelectorAll(o)))}return t},e}(),FeaturefulElementDragging=function(e){function t(t,n){var r=e.call(this,t)||this;r.containerEl=t,r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,preventSelection(document.body),preventContextMenu(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,o=e.deltaY;n*n+o*o>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,allowSelection(document.body),allowContextMenu(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new PointerDragging(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new ElementMirror,r.autoScroller=new AutoScroller,r}return __extends(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(ElementDragging),OffsetTracker=function(){function e(e){this.origRect=computeRect(e),this.scrollCaches=getClippingParents(e).map((function(e){return new ElementScrollGeomCache(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++){t[e].destroy()}},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n={left:e,top:t},r=0,o=this.scrollCaches;r<o.length;r++){var i=o[r];if(!isIgnoredClipping(i.getEventTarget())&&!pointInsideRect(n,i.clientRect))return!1}return!0},e}();function isIgnoredClipping(e){var t=e.tagName;return"HTML"===t||"BODY"===t}var HitDragging=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Emitter}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,o=e.subjectEl;o instanceof HTMLElement&&(r=constrainPoint(r,t=computeRect(o)));var i=this.initialHit=this.queryHitForOffset(r.left,r.top);if(i){if(this.useSubjectCenter&&t){var a=intersectRects(t,i.rect);a&&(r=getRectCenter(a))}this.coordAdjust=diffPoints(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&isHitsEqual(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=mapHash(this.droppableStore,(function(e){return e.component.prepareHits(),new OffsetTracker(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,o=null;for(var i in n){var a=n[i].component,s=r[i];if(s&&s.isWithinClipping(e,t)){var l=s.computeLeft(),u=s.computeTop(),c=e-l,d=t-u,p=s.origRect,f=p.right-p.left,h=p.bottom-p.top;if(c>=0&&c<f&&d>=0&&d<h){var g=a.queryHit(c,d,f,h);g&&rangeContainsRange(g.dateProfile.activeRange,g.dateSpan.range)&&(!o||g.layer>o.layer)&&(g.componentId=i,g.context=a.context,g.rect.left+=l,g.rect.right+=l,g.rect.top+=u,g.rect.bottom+=u,o=g)}}}return o},e}();function isHitsEqual(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&isDateSpansEqual(e.dateSpan,t.dateSpan)}function buildDatePointApiWithContext(e,t){for(var n={},r=0,o=t.pluginHooks.datePointTransforms;r<o.length;r++){var i=o[r];__assign$1(n,i(e,t))}return __assign$1(n,buildDatePointApi(e,t.dateEnv)),n}function buildDatePointApi(e,t){return{date:t.toDate(e.range.start),dateStr:t.formatIso(e.range.start,{omitTime:e.allDay}),allDay:e.allDay}}var DateClicking=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var r=n.hitDragging,o=r.initialHit,i=r.finalHit;if(o&&i&&isHitsEqual(o,i)){var a=t.context,s=__assign$1(__assign$1({},buildDatePointApiWithContext(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",s)}}},n.dragging=new FeaturefulElementDragging(t.el),n.dragging.autoScroller.isEnabled=!1;var r=n.hitDragging=new HitDragging(n.dragging,interactionSettingsToStore(t));return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("dragend",n.handleDragEnd),n}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Interaction),DateSelecting=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,o=t.dragging,i=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);o.setIgnoreMove(!i),o.delay=e.isTouch?getComponentTouchDelay$1(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var r=n.component.context,o=null,i=!1;if(e){var a=n.hitDragging.initialHit;e.componentId===a.componentId&&n.isHitComboAllowed&&!n.isHitComboAllowed(a,e)||(o=joinHitsIntoSelection(a,e,r.pluginHooks.dateSelectionTransformers)),o&&isDateSelectionValid(o,e.dateProfile,r)||(i=!0,o=null)}o?r.dispatch({type:"SELECT_DATES",selection:o}):t||r.dispatch({type:"UNSELECT_DATES"}),i?disableCursor():enableCursor(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(triggerDateSelect(n.dragSelection,e,n.component.context),n.dragSelection=null)};var r=t.component.context.options,o=n.dragging=new FeaturefulElementDragging(t.el);o.touchScrollAllowed=!1,o.minDistance=r.selectMinDistance||0,o.autoScroller.isEnabled=r.dragScroll;var i=n.hitDragging=new HitDragging(n.dragging,interactionSettingsToStore(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragstart",n.handleDragStart),i.emitter.on("hitupdate",n.handleHitUpdate),i.emitter.on("pointerup",n.handlePointerUp),n}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Interaction);function getComponentTouchDelay$1(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}function joinHitsIntoSelection(e,t,n){var r=e.dateSpan,o=t.dateSpan,i=[r.range.start,r.range.end,o.range.start,o.range.end];i.sort(compareNumbers);for(var a={},s=0,l=n;s<l.length;s++){var u=(0,l[s])(e,t);if(!1===u)return null;u&&__assign$1(a,u)}return a.range={start:i[0],end:i[3]},a.allDay=r.allDay,a}var EventDragging=function(e){function t(n){var r=e.call(this,n)||this;r.subjectEl=null,r.subjectSeg=null,r.isDragging=!1,r.eventRange=null,r.relevantEvents=null,r.receivingContext=null,r.validMutation=null,r.mutatedRelevantEvents=null,r.handlePointerDown=function(e){var t=e.origEvent.target,n=r,o=n.component,i=n.dragging,a=i.mirror,s=o.context.options,l=o.context;r.subjectEl=e.subjectEl;var u=r.subjectSeg=getElSeg(e.subjectEl),c=(r.eventRange=u.eventRange).instance.instanceId;r.relevantEvents=getRelevantEvents(l.getCurrentData().eventStore,c),i.minDistance=e.isTouch?0:s.eventDragMinDistance,i.delay=e.isTouch&&c!==o.props.eventSelection?getComponentTouchDelay(o):null,s.fixedMirrorParent?a.parentNode=s.fixedMirrorParent:a.parentNode=elementClosest(t,".fc"),a.revertDuration=s.dragRevertDuration;var d=o.isValidSegDownEl(t)&&!elementClosest(t,".fc-event-resizer");i.setIgnoreMove(!d),r.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},r.handleDragStart=function(e){var t=r.component.context,n=r.eventRange,o=n.instance.instanceId;e.isTouch?o!==r.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:o}):t.dispatch({type:"UNSELECT_EVENT"}),r.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:r.subjectEl,event:new EventApi(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},r.handleHitUpdate=function(e,t){if(r.isDragging){var n=r.relevantEvents,o=r.hitDragging.initialHit,i=r.component.context,a=null,s=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:createEmptyEventStore(),isEvent:!0};if(e){var d=(a=e.context).options;i===a||d.editable&&d.droppable?(s=computeEventMutation(o,e,a.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=applyMutationToEventStore(n,a.getCurrentData().eventUiBases,s,a),c.mutatedEvents=l,isInteractionValid(c,e.dateProfile,a)||(u=!0,s=null,l=null,c.mutatedEvents=createEmptyEventStore())):a=null}r.displayDrag(a,c),u?disableCursor():enableCursor(),t||(i===a&&isHitsEqual(o,e)&&(s=null),r.dragging.setMirrorNeedsRevert(!s),r.dragging.setMirrorIsVisible(!e||!getElRoot(r.subjectEl).querySelector(".fc-event-mirror")),r.receivingContext=a,r.validMutation=s,r.mutatedRelevantEvents=l)}},r.handlePointerUp=function(){r.isDragging||r.cleanup()},r.handleDragEnd=function(e){if(r.isDragging){var t=r.component.context,n=t.viewApi,o=r,i=o.receivingContext,a=o.validMutation,s=r.eventRange.def,l=r.eventRange.instance,u=new EventApi(t,s,l),c=r.relevantEvents,d=r.mutatedRelevantEvents,p=r.hitDragging.finalHit;if(r.clearDrag(),t.emitter.trigger("eventDragStop",{el:r.subjectEl,event:u,jsEvent:e.origEvent,view:n}),a){if(i===t){var f=new EventApi(t,d.defs[s.defId],l?d.instances[l.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:d});for(var h={oldEvent:u,event:f,relatedEvents:buildEventApis(d,t,l),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:c})}},g={},m=0,v=t.getCurrentData().pluginHooks.eventDropTransformers;m<v.length;m++){var y=v[m];__assign$1(g,y(a,t))}t.emitter.trigger("eventDrop",__assign$1(__assign$1(__assign$1({},h),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",h)}else if(i){var E={event:u,relatedEvents:buildEventApis(c,t,l),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:c})}};t.emitter.trigger("eventLeave",__assign$1(__assign$1({},E),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:c}),t.emitter.trigger("eventRemove",E);var S=d.defs[s.defId],D=d.instances[l.instanceId],T=new EventApi(i,S,D);i.dispatch({type:"MERGE_EVENTS",eventStore:d});var b={event:T,relatedEvents:buildEventApis(d,i,D),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:d})}};i.emitter.trigger("eventAdd",b),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:l.instanceId}),i.emitter.trigger("drop",__assign$1(__assign$1({},buildDatePointApiWithContext(p.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.context.viewApi})),i.emitter.trigger("eventReceive",__assign$1(__assign$1({},b),{draggedEl:e.subjectEl,view:p.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}r.cleanup()};var o=r.component.context.options,i=r.dragging=new FeaturefulElementDragging(n.el);i.pointer.selector=t.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=o.dragScroll;var a=r.hitDragging=new HitDragging(r.dragging,interactionSettingsStore);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",r.handlePointerDown),a.emitter.on("dragstart",r.handleDragStart),a.emitter.on("hitupdate",r.handleHitUpdate),a.emitter.on("pointerup",r.handlePointerUp),a.emitter.on("dragend",r.handleDragEnd),r}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:createEmptyEventStore(),isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Interaction);function computeEventMutation(e,t,n){var r=e.dateSpan,o=t.dateSpan,i=r.range.start,a=o.range.start,s={};r.allDay!==o.allDay&&(s.allDay=o.allDay,s.hasEnd=t.context.options.allDayMaintainDuration,o.allDay&&(i=startOfDay(i)));var l=diffDates(i,a,e.context.dateEnv,e.componentId===t.componentId?e.largeUnit:null);l.milliseconds&&(s.allDay=!1);for(var u={datesDelta:l,standardProps:s},c=0,d=n;c<d.length;c++){(0,d[c])(u,e,t)}return u}function getComponentTouchDelay(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}var EventResizing=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=getElSeg(n.querySegEl(e)),o=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==o.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=getRelevantEvents(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var o=n.querySegEl(e);n.draggingSegEl=o,n.draggingSeg=getElSeg(o),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:o,event:new EventApi(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,r){var o=n.component.context,i=n.relevantEvents,a=n.hitDragging.initialHit,s=n.eventRange.instance,l=null,u=null,c=!1,d={affectedEvents:i,mutatedEvents:createEmptyEventStore(),isEvent:!0};e&&(e.componentId===a.componentId&&n.isHitComboAllowed&&!n.isHitComboAllowed(a,e)||(l=computeMutation(a,e,r.subjectEl.classList.contains("fc-event-resizer-start"),s.range)));l&&(u=applyMutationToEventStore(i,o.getCurrentData().eventUiBases,l,o),d.mutatedEvents=u,isInteractionValid(d,e.dateProfile,o)||(c=!0,l=null,u=null,d.mutatedEvents=null)),u?o.dispatch({type:"SET_EVENT_RESIZE",state:d}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),c?disableCursor():enableCursor(),t||(l&&isHitsEqual(a,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,o=n.eventRange.instance,i=new EventApi(t,r,o),a=n.relevantEvents,s=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:i,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var l=new EventApi(t,s.defs[r.defId],o?s.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:s});var u={oldEvent:i,event:l,relatedEvents:buildEventApis(s,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",__assign$1(__assign$1({},u),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||createDuration(0),endDelta:n.validMutation.endDelta||createDuration(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",u)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var r=t.component,o=n.dragging=new FeaturefulElementDragging(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=r.context.options.dragScroll;var i=n.hitDragging=new HitDragging(n.dragging,interactionSettingsToStore(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragstart",n.handleDragStart),i.emitter.on("hitupdate",n.handleHitUpdate),i.emitter.on("dragend",n.handleDragEnd),n}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return elementClosest(e.subjectEl,".fc-event")},t}(Interaction);function computeMutation(e,t,n,r){var o=e.context.dateEnv,i=diffDates(e.dateSpan.range.start,t.dateSpan.range.start,o,e.largeUnit);if(n){if(o.add(r.start,i)<r.end)return{startDelta:i}}else if(o.add(r.end,i)>r.start)return{endDelta:i};return null}var UnselectAuto=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=getEventTargetViaRoot(e.origEvent);t.matchesCancel=!!elementClosest(r,n),t.matchesEvent=!!elementClosest(r,EventDragging.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new PointerDragging(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),OPTION_REFINERS$1={fixedMirrorParent:identity},LISTENER_REFINERS={dateClick:identity,eventDragStart:identity,eventDragStop:identity,eventDrop:identity,eventResizeStart:identity,eventResizeStop:identity,eventResize:identity,drop:identity,eventReceive:identity,eventLeave:identity};config.dataAttrPrefix="",function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new PointerDragging(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}__extends(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}}}(ElementDragging);var main$1=createPlugin({componentInteractions:[DateClicking,DateSelecting,EventDragging,EventResizing],calendarInteractions:[UnselectAuto],elementDraggingImpl:FeaturefulElementDragging,optionRefiners:OPTION_REFINERS$1,listenerRefiners:LISTENER_REFINERS}),ListViewHeaderRow=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={textId:getUniqueDomId()},t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.theme,n=e.dateEnv,r=e.options,o=e.viewApi,i=this.props,a=i.cellId,s=i.dayDate,l=i.todayRange,u=this.state.textId,c=getDateMeta(s,l),d=r.listDayFormat?n.format(s,r.listDayFormat):"",p=r.listDaySideFormat?n.format(s,r.listDaySideFormat):"",f=__assign$1({date:n.toDate(s),view:o,textId:u,text:d,sideText:p,navLinkAttrs:buildNavLinkAttrs(this.context,s),sideNavLinkAttrs:buildNavLinkAttrs(this.context,s,"day",!1)},c),h=["fc-list-day"].concat(getDayClassNames(c,t));return createElement(RenderHook,{hookProps:f,classNames:r.dayHeaderClassNames,content:r.dayHeaderContent,defaultContent:renderInnerContent,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},(function(e,n,r,o){return createElement("tr",{ref:e,className:h.concat(n).join(" "),"data-date":formatDayString(s)},createElement("th",{scope:"colgroup",colSpan:3,id:a,"aria-labelledby":u},createElement("div",{className:"fc-list-day-cushion "+t.getClass("tableCellShaded"),ref:r},o)))}))},t}(BaseComponent);
|
|
18
|
+
config$1.touchMouseIgnoreWait=500;var ignoreMouseDepth=0,listenerCnt=0,isWindowTouchMoveCancelled=!1,PointerDragging=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&isPrimaryMouseButton(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,startIgnoringMouse()}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Emitter,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),listenerCreated()}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),listenerDestroyed()},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!elementClosest(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){isWindowTouchMoveCancelled=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?elementClosest(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return ignoreMouseDepth||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(isWindowTouchMoveCancelled=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,a=e.touches,i=0,o=0;return a&&a.length?(n=a[0].pageX,r=a[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(i=n-this.origPageX,o=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:i,deltaY:o}},e}();function isPrimaryMouseButton(e){return 0===e.button&&!e.ctrlKey}function startIgnoringMouse(){ignoreMouseDepth+=1,setTimeout((function(){ignoreMouseDepth-=1}),config$1.touchMouseIgnoreWait)}function listenerCreated(){1===(listenerCnt+=1)&&window.addEventListener("touchmove",onWindowTouchMove,{passive:!1})}function listenerDestroyed(){(listenerCnt-=1)||window.removeEventListener("touchmove",onWindowTouchMove,{passive:!1})}function onWindowTouchMove(e){isWindowTouchMoveCancelled&&e.preventDefault()}var ElementMirror=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",applyStyle(n,{left:r.left,top:r.top}),whenTransitionDone(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(removeElement(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&applyStyle(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),applyStyle(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ScrollGeomCache=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return __extends(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(ScrollController),ElementScrollGeomCache=function(e){function t(t,n){return e.call(this,new ElementScrollController(t),n)||this}return __extends(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return computeInnerRect(this.scrollController.el)},t}(ScrollGeomCache),WindowScrollGeomCache=function(e){function t(t){return e.call(this,new WindowScrollController,t)||this}return __extends(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ScrollGeomCache),getTime="function"==typeof performance?performance.now:Date.now,AutoScroller=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=getTime();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,a=null===this.pointerScreenY?0:r-this.pointerScreenY,i=null===this.pointerScreenX?0:n-this.pointerScreenX;a<0?this.everMovedUp=!0:a>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(getTime()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++){t[e].destroy()}this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,a=r-e.distance,i=a*a/(r*r)*this.maxVelocity*t,o=1;switch(e.name){case"left":o=-1;case"right":n.setScrollLeft(n.getScrollLeft()+i*o);break;case"top":o=-1;case"bottom":n.setScrollTop(n.getScrollTop()+i*o)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,a=0,i=this.scrollCaches||[];a<i.length;a++){var o=i[a],s=o.clientRect,l=e-s.left,c=s.right-e,d=t-s.top,u=s.bottom-t;l>=0&&c>=0&&d>=0&&u>=0&&(d<=n&&this.everMovedUp&&o.canScrollUp()&&(!r||r.distance>d)&&(r={scrollCache:o,name:"top",distance:d}),u<=n&&this.everMovedDown&&o.canScrollDown()&&(!r||r.distance>u)&&(r={scrollCache:o,name:"bottom",distance:u}),l<=n&&this.everMovedLeft&&o.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:o,name:"left",distance:l}),c<=n&&this.everMovedRight&&o.canScrollRight()&&(!r||r.distance>c)&&(r={scrollCache:o,name:"right",distance:c}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new WindowScrollGeomCache(!1):new ElementScrollGeomCache(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n<r.length;n++){var a=r[n];"object"==typeof a?t.push(a):t.push.apply(t,Array.prototype.slice.call(getElRoot(e).querySelectorAll(a)))}return t},e}(),FeaturefulElementDragging=function(e){function t(t,n){var r=e.call(this,t)||this;r.containerEl=t,r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,preventSelection(document.body),preventContextMenu(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,a=e.deltaY;n*n+a*a>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,allowSelection(document.body),allowContextMenu(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var a=r.pointer=new PointerDragging(t);return a.emitter.on("pointerdown",r.onPointerDown),a.emitter.on("pointermove",r.onPointerMove),a.emitter.on("pointerup",r.onPointerUp),n&&(a.selector=n),r.mirror=new ElementMirror,r.autoScroller=new AutoScroller,r}return __extends(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(ElementDragging),OffsetTracker=function(){function e(e){this.origRect=computeRect(e),this.scrollCaches=getClippingParents(e).map((function(e){return new ElementScrollGeomCache(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++){t[e].destroy()}},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n={left:e,top:t},r=0,a=this.scrollCaches;r<a.length;r++){var i=a[r];if(!isIgnoredClipping(i.getEventTarget())&&!pointInsideRect(n,i.clientRect))return!1}return!0},e}();function isIgnoredClipping(e){var t=e.tagName;return"HTML"===t||"BODY"===t}var HitDragging=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Emitter}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,a=e.subjectEl;a instanceof HTMLElement&&(r=constrainPoint(r,t=computeRect(a)));var i=this.initialHit=this.queryHitForOffset(r.left,r.top);if(i){if(this.useSubjectCenter&&t){var o=intersectRects(t,i.rect);o&&(r=getRectCenter(o))}this.coordAdjust=diffPoints(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&isHitsEqual(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=mapHash(this.droppableStore,(function(e){return e.component.prepareHits(),new OffsetTracker(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,a=null;for(var i in n){var o=n[i].component,s=r[i];if(s&&s.isWithinClipping(e,t)){var l=s.computeLeft(),c=s.computeTop(),d=e-l,u=t-c,p=s.origRect,f=p.right-p.left,m=p.bottom-p.top;if(d>=0&&d<f&&u>=0&&u<m){var h=o.queryHit(d,u,f,m);h&&rangeContainsRange(h.dateProfile.activeRange,h.dateSpan.range)&&(!a||h.layer>a.layer)&&(h.componentId=i,h.context=o.context,h.rect.left+=l,h.rect.right+=l,h.rect.top+=c,h.rect.bottom+=c,a=h)}}}return a},e}();function isHitsEqual(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&isDateSpansEqual(e.dateSpan,t.dateSpan)}function buildDatePointApiWithContext(e,t){for(var n={},r=0,a=t.pluginHooks.datePointTransforms;r<a.length;r++){var i=a[r];__assign$1(n,i(e,t))}return __assign$1(n,buildDatePointApi(e,t.dateEnv)),n}function buildDatePointApi(e,t){return{date:t.toDate(e.range.start),dateStr:t.formatIso(e.range.start,{omitTime:e.allDay}),allDay:e.allDay}}var DateClicking=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var r=n.hitDragging,a=r.initialHit,i=r.finalHit;if(a&&i&&isHitsEqual(a,i)){var o=t.context,s=__assign$1(__assign$1({},buildDatePointApiWithContext(a.dateSpan,o)),{dayEl:a.dayEl,jsEvent:e.origEvent,view:o.viewApi||o.calendarApi.view});o.emitter.trigger("dateClick",s)}}},n.dragging=new FeaturefulElementDragging(t.el),n.dragging.autoScroller.isEnabled=!1;var r=n.hitDragging=new HitDragging(n.dragging,interactionSettingsToStore(t));return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("dragend",n.handleDragEnd),n}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Interaction),DateSelecting=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,a=t.dragging,i=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);a.setIgnoreMove(!i),a.delay=e.isTouch?getComponentTouchDelay$1(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var r=n.component.context,a=null,i=!1;if(e){var o=n.hitDragging.initialHit;e.componentId===o.componentId&&n.isHitComboAllowed&&!n.isHitComboAllowed(o,e)||(a=joinHitsIntoSelection(o,e,r.pluginHooks.dateSelectionTransformers)),a&&isDateSelectionValid(a,e.dateProfile,r)||(i=!0,a=null)}a?r.dispatch({type:"SELECT_DATES",selection:a}):t||r.dispatch({type:"UNSELECT_DATES"}),i?disableCursor():enableCursor(),t||(n.dragSelection=a)},n.handlePointerUp=function(e){n.dragSelection&&(triggerDateSelect(n.dragSelection,e,n.component.context),n.dragSelection=null)};var r=t.component.context.options,a=n.dragging=new FeaturefulElementDragging(t.el);a.touchScrollAllowed=!1,a.minDistance=r.selectMinDistance||0,a.autoScroller.isEnabled=r.dragScroll;var i=n.hitDragging=new HitDragging(n.dragging,interactionSettingsToStore(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragstart",n.handleDragStart),i.emitter.on("hitupdate",n.handleHitUpdate),i.emitter.on("pointerup",n.handlePointerUp),n}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Interaction);function getComponentTouchDelay$1(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}function joinHitsIntoSelection(e,t,n){var r=e.dateSpan,a=t.dateSpan,i=[r.range.start,r.range.end,a.range.start,a.range.end];i.sort(compareNumbers);for(var o={},s=0,l=n;s<l.length;s++){var c=(0,l[s])(e,t);if(!1===c)return null;c&&__assign$1(o,c)}return o.range={start:i[0],end:i[3]},o.allDay=r.allDay,o}var EventDragging=function(e){function t(n){var r=e.call(this,n)||this;r.subjectEl=null,r.subjectSeg=null,r.isDragging=!1,r.eventRange=null,r.relevantEvents=null,r.receivingContext=null,r.validMutation=null,r.mutatedRelevantEvents=null,r.handlePointerDown=function(e){var t=e.origEvent.target,n=r,a=n.component,i=n.dragging,o=i.mirror,s=a.context.options,l=a.context;r.subjectEl=e.subjectEl;var c=r.subjectSeg=getElSeg(e.subjectEl),d=(r.eventRange=c.eventRange).instance.instanceId;r.relevantEvents=getRelevantEvents(l.getCurrentData().eventStore,d),i.minDistance=e.isTouch?0:s.eventDragMinDistance,i.delay=e.isTouch&&d!==a.props.eventSelection?getComponentTouchDelay(a):null,s.fixedMirrorParent?o.parentNode=s.fixedMirrorParent:o.parentNode=elementClosest(t,".fc"),o.revertDuration=s.dragRevertDuration;var u=a.isValidSegDownEl(t)&&!elementClosest(t,".fc-event-resizer");i.setIgnoreMove(!u),r.isDragging=u&&e.subjectEl.classList.contains("fc-event-draggable")},r.handleDragStart=function(e){var t=r.component.context,n=r.eventRange,a=n.instance.instanceId;e.isTouch?a!==r.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:a}):t.dispatch({type:"UNSELECT_EVENT"}),r.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:r.subjectEl,event:new EventApi(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},r.handleHitUpdate=function(e,t){if(r.isDragging){var n=r.relevantEvents,a=r.hitDragging.initialHit,i=r.component.context,o=null,s=null,l=null,c=!1,d={affectedEvents:n,mutatedEvents:createEmptyEventStore(),isEvent:!0};if(e){var u=(o=e.context).options;i===o||u.editable&&u.droppable?(s=computeEventMutation(a,e,o.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=applyMutationToEventStore(n,o.getCurrentData().eventUiBases,s,o),d.mutatedEvents=l,isInteractionValid(d,e.dateProfile,o)||(c=!0,s=null,l=null,d.mutatedEvents=createEmptyEventStore())):o=null}r.displayDrag(o,d),c?disableCursor():enableCursor(),t||(i===o&&isHitsEqual(a,e)&&(s=null),r.dragging.setMirrorNeedsRevert(!s),r.dragging.setMirrorIsVisible(!e||!getElRoot(r.subjectEl).querySelector(".fc-event-mirror")),r.receivingContext=o,r.validMutation=s,r.mutatedRelevantEvents=l)}},r.handlePointerUp=function(){r.isDragging||r.cleanup()},r.handleDragEnd=function(e){if(r.isDragging){var t=r.component.context,n=t.viewApi,a=r,i=a.receivingContext,o=a.validMutation,s=r.eventRange.def,l=r.eventRange.instance,c=new EventApi(t,s,l),d=r.relevantEvents,u=r.mutatedRelevantEvents,p=r.hitDragging.finalHit;if(r.clearDrag(),t.emitter.trigger("eventDragStop",{el:r.subjectEl,event:c,jsEvent:e.origEvent,view:n}),o){if(i===t){var f=new EventApi(t,u.defs[s.defId],l?u.instances[l.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:u});for(var m={oldEvent:c,event:f,relatedEvents:buildEventApis(u,t,l),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},h={},g=0,v=t.getCurrentData().pluginHooks.eventDropTransformers;g<v.length;g++){var y=v[g];__assign$1(h,y(o,t))}t.emitter.trigger("eventDrop",__assign$1(__assign$1(__assign$1({},m),h),{el:e.subjectEl,delta:o.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(i){var E={event:c,relatedEvents:buildEventApis(d,t,l),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",__assign$1(__assign$1({},E),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",E);var b=u.defs[s.defId],_=u.instances[l.instanceId],S=new EventApi(i,b,_);i.dispatch({type:"MERGE_EVENTS",eventStore:u});var w={event:S,relatedEvents:buildEventApis(u,i,_),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})}};i.emitter.trigger("eventAdd",w),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:l.instanceId}),i.emitter.trigger("drop",__assign$1(__assign$1({},buildDatePointApiWithContext(p.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.context.viewApi})),i.emitter.trigger("eventReceive",__assign$1(__assign$1({},w),{draggedEl:e.subjectEl,view:p.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}r.cleanup()};var a=r.component.context.options,i=r.dragging=new FeaturefulElementDragging(n.el);i.pointer.selector=t.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=a.dragScroll;var o=r.hitDragging=new HitDragging(r.dragging,interactionSettingsStore);return o.useSubjectCenter=n.useEventCenter,o.emitter.on("pointerdown",r.handlePointerDown),o.emitter.on("dragstart",r.handleDragStart),o.emitter.on("hitupdate",r.handleHitUpdate),o.emitter.on("pointerup",r.handlePointerUp),o.emitter.on("dragend",r.handleDragEnd),r}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:createEmptyEventStore(),isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Interaction);function computeEventMutation(e,t,n){var r=e.dateSpan,a=t.dateSpan,i=r.range.start,o=a.range.start,s={};r.allDay!==a.allDay&&(s.allDay=a.allDay,s.hasEnd=t.context.options.allDayMaintainDuration,a.allDay&&(i=startOfDay(i)));var l=diffDates(i,o,e.context.dateEnv,e.componentId===t.componentId?e.largeUnit:null);l.milliseconds&&(s.allDay=!1);for(var c={datesDelta:l,standardProps:s},d=0,u=n;d<u.length;d++){(0,u[d])(c,e,t)}return c}function getComponentTouchDelay(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}var EventResizing=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=getElSeg(n.querySegEl(e)),a=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==a.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=getRelevantEvents(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var a=n.querySegEl(e);n.draggingSegEl=a,n.draggingSeg=getElSeg(a),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:a,event:new EventApi(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,r){var a=n.component.context,i=n.relevantEvents,o=n.hitDragging.initialHit,s=n.eventRange.instance,l=null,c=null,d=!1,u={affectedEvents:i,mutatedEvents:createEmptyEventStore(),isEvent:!0};e&&(e.componentId===o.componentId&&n.isHitComboAllowed&&!n.isHitComboAllowed(o,e)||(l=computeMutation(o,e,r.subjectEl.classList.contains("fc-event-resizer-start"),s.range)));l&&(c=applyMutationToEventStore(i,a.getCurrentData().eventUiBases,l,a),u.mutatedEvents=c,isInteractionValid(u,e.dateProfile,a)||(d=!0,l=null,c=null,u.mutatedEvents=null)),c?a.dispatch({type:"SET_EVENT_RESIZE",state:u}):a.dispatch({type:"UNSET_EVENT_RESIZE"}),d?disableCursor():enableCursor(),t||(l&&isHitsEqual(o,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,a=n.eventRange.instance,i=new EventApi(t,r,a),o=n.relevantEvents,s=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:i,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var l=new EventApi(t,s.defs[r.defId],a?s.instances[a.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:s});var c={oldEvent:i,event:l,relatedEvents:buildEventApis(s,t,a),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:o})}};t.emitter.trigger("eventResize",__assign$1(__assign$1({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||createDuration(0),endDelta:n.validMutation.endDelta||createDuration(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var r=t.component,a=n.dragging=new FeaturefulElementDragging(t.el);a.pointer.selector=".fc-event-resizer",a.touchScrollAllowed=!1,a.autoScroller.isEnabled=r.context.options.dragScroll;var i=n.hitDragging=new HitDragging(n.dragging,interactionSettingsToStore(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragstart",n.handleDragStart),i.emitter.on("hitupdate",n.handleHitUpdate),i.emitter.on("dragend",n.handleDragEnd),n}return __extends(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return elementClosest(e.subjectEl,".fc-event")},t}(Interaction);function computeMutation(e,t,n,r){var a=e.context.dateEnv,i=diffDates(e.dateSpan.range.start,t.dateSpan.range.start,a,e.largeUnit);if(n){if(a.add(r.start,i)<r.end)return{startDelta:i}}else if(a.add(r.end,i)>r.start)return{endDelta:i};return null}var UnselectAuto=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=getEventTargetViaRoot(e.origEvent);t.matchesCancel=!!elementClosest(r,n),t.matchesEvent=!!elementClosest(r,EventDragging.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,a=n.getCurrentData();if(!r.wasTouchScroll){if(a.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}a.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new PointerDragging(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),OPTION_REFINERS$1={fixedMirrorParent:identity},LISTENER_REFINERS={dateClick:identity,eventDragStart:identity,eventDragStop:identity,eventDrop:identity,eventResizeStart:identity,eventResizeStop:identity,eventResize:identity,drop:identity,eventReceive:identity,eventLeave:identity};config$1.dataAttrPrefix="",function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new PointerDragging(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}__extends(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}}}(ElementDragging);var main$1=createPlugin({componentInteractions:[DateClicking,DateSelecting,EventDragging,EventResizing],calendarInteractions:[UnselectAuto],elementDraggingImpl:FeaturefulElementDragging,optionRefiners:OPTION_REFINERS$1,listenerRefiners:LISTENER_REFINERS}),ListViewHeaderRow=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={textId:getUniqueDomId()},t}return __extends(t,e),t.prototype.render=function(){var e=this.context,t=e.theme,n=e.dateEnv,r=e.options,a=e.viewApi,i=this.props,o=i.cellId,s=i.dayDate,l=i.todayRange,c=this.state.textId,d=getDateMeta(s,l),u=r.listDayFormat?n.format(s,r.listDayFormat):"",p=r.listDaySideFormat?n.format(s,r.listDaySideFormat):"",f=__assign$1({date:n.toDate(s),view:a,textId:c,text:u,sideText:p,navLinkAttrs:buildNavLinkAttrs(this.context,s),sideNavLinkAttrs:buildNavLinkAttrs(this.context,s,"day",!1)},d),m=["fc-list-day"].concat(getDayClassNames(d,t));return createElement(RenderHook,{hookProps:f,classNames:r.dayHeaderClassNames,content:r.dayHeaderContent,defaultContent:renderInnerContent,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},(function(e,n,r,a){return createElement("tr",{ref:e,className:m.concat(n).join(" "),"data-date":formatDayString(s)},createElement("th",{scope:"colgroup",colSpan:3,id:o,"aria-labelledby":c},createElement("div",{className:"fc-list-day-cushion "+t.getClass("tableCellShaded"),ref:r},a)))}))},t}(BaseComponent);
|
|
19
19
|
/*!
|
|
20
20
|
FullCalendar v5.11.4
|
|
21
21
|
Docs & License: https://fullcalendar.io/
|
|
22
22
|
(c) 2022 Adam Shaw
|
|
23
|
-
*/function renderInnerContent(e){return createElement(Fragment,null,e.text&&createElement("a",__assign$1({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&createElement("a",__assign$1({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}var DEFAULT_TIME_FORMAT=createFormatter({hour:"numeric",minute:"2-digit",meridiem:"short"}),ListViewEventRow=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=e.timeHeaderId,o=e.eventHeaderId,i=e.dateHeaderId,a=t.options.eventTimeFormat||DEFAULT_TIME_FORMAT;return createElement(EventRoot,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:function(){return renderEventInnerContent(n,t)},isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,s,l,u,c){return createElement("tr",{className:["fc-list-event",c.event.url?"fc-event-forced-url":""].concat(s).join(" "),ref:e},buildTimeContent(n,a,t,r,i),createElement("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},createElement("span",{className:"fc-list-event-dot",style:{borderColor:c.borderColor||c.backgroundColor}})),createElement("td",{ref:l,headers:o+" "+i,className:"fc-list-event-title"},u))}))},t}(BaseComponent);function renderEventInnerContent(e,t){var n=getSegAnchorAttrs(e,t);return createElement("a",__assign$1({},n),e.eventRange.def.title)}function buildTimeContent(e,t,n,r,o){var i=n.options;if(!1!==i.displayEventTime){var a=e.eventRange.def,s=e.eventRange.instance,l=!1,u=void 0;if(a.allDay?l=!0:isMultiDayRange(e.eventRange.range)?e.isStart?u=buildSegTimeText(e,t,n,null,null,s.range.start,e.end):e.isEnd?u=buildSegTimeText(e,t,n,null,null,e.start,s.range.end):l=!0:u=buildSegTimeText(e,t,n),l){var c={text:n.options.allDayText,view:n.viewApi};return createElement(RenderHook,{hookProps:c,classNames:i.allDayClassNames,content:i.allDayContent,defaultContent:renderAllDayInner,didMount:i.allDayDidMount,willUnmount:i.allDayWillUnmount},(function(e,t,n,i){return createElement("td",{ref:e,headers:r+" "+o,className:["fc-list-event-time"].concat(t).join(" ")},i)}))}return createElement("td",{className:"fc-list-event-time"},u)}return null}function renderAllDayInner(e){return e.text}var ListView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=memoize(computeDateVars),t.eventStoreToSegs=memoize(t._eventStoreToSegs),t.state={timeHeaderId:getUniqueDomId(),eventHeaderId:getUniqueDomId(),dateHeaderIdRoot:getUniqueDomId()},t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],o=this.computeDateVars(t.dateProfile),i=o.dayDates,a=o.dayRanges,s=this.eventStoreToSegs(t.eventStore,t.eventUiBases,a);return createElement(ViewRoot,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,o){return createElement("div",{ref:n,className:r.concat(o).join(" ")},createElement(Scroller,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},s.length>0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return createElement(RenderHook,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:renderNoEventsInner,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return createElement("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},createElement("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,r=n.theme,o=n.options,i=this.state,a=i.timeHeaderId,s=i.eventHeaderId,l=i.dateHeaderIdRoot,u=groupSegsByDay(e);return createElement(NowTimer,{unit:"day"},(function(e,n){for(var i=[],c=0;c<u.length;c+=1){var d=u[c];if(d){var p=formatDayString(t[c]),f=l+"-"+p;i.push(createElement(ListViewHeaderRow,{key:p,cellId:f,dayDate:t[c],todayRange:n}));for(var h=0,g=d=sortEventSegs(d,o.eventOrder);h<g.length;h++){var m=g[h];i.push(createElement(ListViewEventRow,__assign$1({key:p+":"+m.eventRange.instance.instanceId,seg:m,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:a,eventHeaderId:s,dateHeaderId:f},getSegMeta(m,n,e))))}}}return createElement("table",{className:"fc-list-table "+r.getClass("table")},createElement("thead",null,createElement("tr",null,createElement("th",{scope:"col",id:a},o.timeHint),createElement("th",{scope:"col","aria-hidden":!0}),createElement("th",{scope:"col",id:s},o.eventHint))),createElement("tbody",null,i))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(sliceEventStore(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.eventRangeToSegs(i,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,o,i=this.context.dateEnv,a=this.context.options.nextDayThreshold,s=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n+=1)if((r=intersectRanges(s,t[n]))&&(o={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===s.end.valueOf(),dayIndex:n},u.push(o),!o.isEnd&&!l&&n+1<t.length&&s.end<i.add(t[n+1].start,a))){o.end=s.end,o.isEnd=!0;break}return u},t}(DateComponent);function renderNoEventsInner(e){return e.text}function computeDateVars(e){for(var t=startOfDay(e.renderRange.start),n=e.renderRange.end,r=[],o=[];t<n;)r.push(t),o.push({start:t,end:addDays(t,1)}),t=addDays(t,1);return{dayDates:r,dayRanges:o}}function groupSegsByDay(e){var t,n,r=[];for(t=0;t<e.length;t+=1)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}var OPTION_REFINERS={listDayFormat:createFalsableFormatter,listDaySideFormat:createFalsableFormatter,noEventsClassNames:identity,noEventsContent:identity,noEventsDidMount:identity,noEventsWillUnmount:identity};function createFalsableFormatter(e){return!1===e?null:createFormatter(e)}var main=createPlugin({optionRefiners:OPTION_REFINERS,views:{list:{component:ListView,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{},localesAll$1={};Object.defineProperty(localesAll$1,"__esModule",{value:!0});var l0={code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"},l1={code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l2={code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l3={code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l4={code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l5={code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l6={code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l7={code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l8={code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:function(e){return"+ daha çox "+e},noEventsText:"Göstərmək üçün hadisə yoxdur"},l9={code:"bg",week:{dow:1,doy:7},buttonText:{prev:"назад",next:"напред",today:"днес",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:function(e){return"+още "+e},noEventsText:"Няма събития за показване"},l10={code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:function(e){return"+অন্যান্য "+e},noEventsText:"কোনো ইভেন্ট নেই"},l11={code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikazivanje"},l12={code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"},l13={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:function(e){return"+další: "+e},noEventsText:"Žádné akce k zobrazení"},l14={code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"},l15={code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"};function affix$1(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var l16={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(affix$1(e)," ").concat(e)},next:function(e){return"Nächste".concat(affix$1(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(affix$1(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};function affix(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var l17={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(affix(e)," ").concat(e)},next:function(e){return"Nächste".concat(affix(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(affix(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},l18={code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"},l19={code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},l20={code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},l21={code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},l22={code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"},l23={code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"},l24={code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:function(e){return"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()}},viewHint:function(e){return"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase()},weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:function(e){return"Mostrar ".concat(e," eventos más")},noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"},l25={code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:function(e){return"+ veel "+e},noEventsText:"Kuvamiseks puuduvad sündmused"},l26={code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"},l27={code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:function(e){return"بیش از "+e},noEventsText:"هیچ رویدادی به نمایش"},l28={code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"},l29={code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},l30={code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},l31={code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},l32={code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},weekText:"Sm",allDayText:"Todo o día",moreLinkText:"máis",noEventsText:"Non hai eventos para amosar"},l33={code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"},l34={code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:function(e){return"+अधिक "+e},noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"},l35={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikaz"},l36={code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"},l37={code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:function(e){return"+ ևս "+e},noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"},l38={code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"},l39={code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"},l40={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:function(e){return"+altri "+e},noEventsText:"Non ci sono eventi da visualizzare"},l41={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"},l42={code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:function(e){return"+ კიდევ "+e},noEventsText:"ღონისძიებები არ არის"},l43={code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:function(e){return"+ тағы "+e},noEventsText:"Көрсету үшін оқиғалар жоқ"},l44={code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"},l45={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"},l46={code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"},l47={code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"},l48={code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"},l49={code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:function(e){return"+vēl "+e},noEventsText:"Nav notikumu"},l50={code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:function(e){return"+повеќе "+e},noEventsText:"Нема настани за прикажување"},l51={code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:function(e){return"masih ada "+e+" acara"},noEventsText:"Tiada peristiwa untuk dipaparkan"},l52={code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:function(e){return"Vis ".concat(e," flere hendelse").concat(1===e?"":"r")}},l53={code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"},l54={code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"},l55={code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"},l56={code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"},l57={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},weekText:"Sm",allDayText:"dia inteiro",moreLinkText:function(e){return"mais +"+e},noEventsText:"Não há eventos para mostrar"},l58={code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"},l59={code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:function(e){return"+alte "+e},noEventsText:"Nu există evenimente de afișat"},l60={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"},l61={code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"},l62={code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:function(e){return"+ďalšie: "+e},noEventsText:"Žiadne akcie na zobrazenie"},l63={code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"},l64={code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"},l65={code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"sot",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:function(e){return"+më tepër "+e},noEventsText:"Nuk ka evente për të shfaqur"},l66={code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:function(e){return"+ још "+e},noEventsText:"Нема догађаја за приказ"},l67={code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nеma događaja za prikaz"},l68={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:function(e){return"Föregående ".concat(e.toLocaleLowerCase())},next:function(e){return"Nästa ".concat(e.toLocaleLowerCase())},today:function(e){return("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()}},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:function(e){return"Visa ytterligare ".concat(e," händelse").concat(1===e?"":"r")},weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"},l69={code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:function(e){return"+ மேலும் "+e},noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"},l70={code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"},l71={code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"},l72={code:"ug",buttonText:{month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"},l73={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:function(e){return"+ще "+e+"..."},noEventsText:"Немає подій для відображення"},l74={code:"uz",buttonText:{month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:function(e){return"+ yana "+e},noEventsText:"Ko'rsatish uchun voqealar yo'q"},l75={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:function(e){return"+ thêm "+e},noEventsText:"Không có sự kiện để hiển thị"},l76={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:function(e){return"另外 "+e+" 个"},noEventsText:"没有事件显示"},l77={code:"zh-tw",buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"周",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"没有任何活動"},localesAll=[l0,l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24,l25,l26,l27,l28,l29,l30,l31,l32,l33,l34,l35,l36,l37,l38,l39,l40,l41,l42,l43,l44,l45,l46,l47,l48,l49,l50,l51,l52,l53,l54,l55,l56,l57,l58,l59,l60,l61,l62,l63,l64,l65,l66,l67,l68,l69,l70,l71,l72,l73,l74,l75,l76,l77],_default=localesAll$1.default=localesAll,freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$1=freeGlobal||freeSelf||Function("return this")(),_root=root$1,root=_root,Symbol$3=root.Symbol,_Symbol=Symbol$3,Symbol$2=_Symbol;Symbol$2&&Symbol$2.toStringTag;var Symbol$1=_Symbol;Symbol$1&&Symbol$1.toStringTag;var funcProto=Function.prototype,funcToString=funcProto.toString;funcToString.call(Object);const getBuilderContext=()=>"undefined"==typeof window?{}:Builder.settings.context?Builder.settings.context:Builder.settings;async function fetchAPI(e,t={credentials:"include"}){const n={"Content-Type":"application/json"},r=getAuthorization();r&&(n.Authorization=r),t.headers=Object.assign({},n,t.headers),t.credentials="include";const o=await fetch(`${getRootUrl()}${e}`,t);if(401===o.status)throw new Error(401);const i=await o.json();if(i.errors)throw console.error(i.errors),new Error("Failed to fetch API");return i}function getAuthorization(){try{const e=getBuilderContext();let t=e.tenantId,n=e.authToken;return t&&n?`Bearer ${t},${n}`:null}catch(e){console.error(e)}}function getUserId(){try{let e=getBuilderContext().userId;return e||null}catch(e){console.error(e)}}function getRootUrl(e){const t=getBuilderContext();if(t.rootUrl)return t.rootUrl;const n="undefined"!=typeof window?window.localStorage.getItem("steedos:rootUrl"):"";return n||e}let UI_SCHEMA_CACHE={},UISchemaFunction;"undefined"!=typeof window&&(window.UI_SCHEMA_CACHE||(window.UI_SCHEMA_CACHE=UI_SCHEMA_CACHE),UI_SCHEMA_CACHE=window.UI_SCHEMA_CACHE);const setUISchemaCache=(e,t)=>{UI_SCHEMA_CACHE[e]=t},getUISchemaCache=e=>___default.cloneDeep(UI_SCHEMA_CACHE[e]),hasUISchemaCache=e=>___default.has(UI_SCHEMA_CACHE,e);function getListViewColumns(e,t){let n=[];return n="SMALL"===t?___default.isEmpty(e.mobile_columns)?___default.slice(e.columns,0,4):e.mobile_columns:e.columns,n}function getListViewSort(e){let t="";return e&&e.sort&&e.sort.length&&___default.each(e.sort,(function(e,n){if(___default.isArray(e)){let r=e[0]+" "+(e[1]||"");r=n>0?","+r:r,t+=r}else{let r=e.field_name+" "+e.order;r=n>0?","+r:r,t+=r}})),t}function getListViewFilter(e){if(e)try{const t=getUserId();let n=e.filters;if("mine"===e.filter_scope)if(___default__default.default.isEmpty(n))n=[["owner","=",t]];else{if(___default__default.default.isString(n)&&___default__default.default.startsWith(___default__default.default.trim(n),"function")&&(n=new Function(`return ${n}`),n=n()),!___default__default.default.isArray(n))throw console.debug("listView filters is not array",e),new Error("filters is not array");n.push(["owner","=",t])}return n}catch(e){console.error(e)}}function formatUISchemaCache(objectName,uiSchema){setUISchemaCache(objectName,uiSchema),___default.each(uiSchema.fields,(field=>{try{"lookup"===field.type&&field._reference_to&&___default__default.default.isString(field._reference_to)&&(field.reference_to=eval(`(${field._reference_to})`)())}catch(e){field.reference_to=void 0,console.error(e)}})),___default.each(uiSchema.list_views,((e,t)=>{e.name=t,___default.has(e,"columns")||(e.columns=uiSchema.list_views.all.columns)}))}async function getUISchema(e,t){if(!e)return;if(hasUISchemaCache(e)&&!t)return getUISchemaCache(e);let n=null;try{if(UISchemaFunction);else{const t=`/service/api/@${e.replace(/\./g,"_")}/uiSchema`;n=await fetchAPI(t,{method:"get"})}if(!n)return;formatUISchemaCache(e,n)}catch(t){console.error("getUISchema",e,t),setUISchemaCache(e,null)}return getUISchemaCache(e)}function getUISchemaSync(e,t){if(!e)return;if(hasUISchemaCache(e)&&!t)return getUISchemaCache(e);let n=null;try{const t=`/service/api/@${e.replace(/\./g,"_")}/uiSchema`;if(n=Steedos.authRequest(t,{type:"GET",async:!1}),!n)return;formatUISchemaCache(e,n)}catch(t){console.error("getUISchema",e,t),setUISchemaCache(e,null)}return getUISchemaCache(e)}async function getListSchema(e,t,n,r={}){const o=await getUISchema(t),i=___default.find(o.list_views,((e,t)=>(n||(n=t),t===n||e._id===n)));if(!i)return{uiSchema:o};if(i.enable_amis_schema&&i.amis_schema){return{uiSchema:o,isCustomAmisSchema:!0,amisSchema:___default.isString(i.amis_schema)?JSON.parse(i.amis_schema):i.amis_schema}}let a=getListViewColumns(i,r.formFactor),s=getListViewSort(i),l=getListViewFilter(i),u=i&&i._filters;if("calendar"===i.type){return{uiSchema:o,isCalendar:!0,amisSchema:{type:"steedos-object-calendar",objectApiName:t,filters:l,filtersFunction:u,sort:s,...i.options}}}const c=r.defaults||{};c.headerSchema=null;try{const e=location.pathname+"/crud/"+r.listViewId;let t=sessionStorage.getItem(e);if(t){t=JSON.parse(t);let e={};t.orderBy&&(e.orderBy=t.orderBy),t.orderDir&&(e.orderDir=t.orderDir),c.listSchema=___default.defaultsDeep({},e,c.listSchema||{})}}catch(e){console.error("本地存储中crud参数解析异常:",e)}r.defaults=c;return{uiSchema:o,amisSchema:{type:"steedos-object-table",objectApiName:t,columns:a,extraColumns:i.extra_columns,filters:l,filtersFunction:u,sort:s,ctx:r,requestAdaptor:i.requestAdaptor,adaptor:i.adaptor,headerToolbarItems:r.headerToolbarItems,filterVisible:r.filterVisible}}}"undefined"!=typeof window&&(window.getUISchema=getUISchema,window.getUISchemaSync=getUISchemaSync,window.getListSchema=getListSchema);var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};function createObject(e,t,n){e&&Object.isFrozen(e)&&(e=cloneObject(e));var r=e?Object.create(e,__assign(__assign({},n),{__super:{value:e,writable:!1,enumerable:!1}})):Object.create(Object.prototype,n);return t&&isObject(t)&&Object.keys(t).forEach((function(e){return r[e]=t[e]})),r}function cloneObject(e,t){void 0===t&&(t=!0);var n=e&&e.__super?Object.create(e.__super,{__super:{value:e.__super,writable:!1,enumerable:!1}}):Object.create(Object.prototype);return t&&e&&Object.keys(e).forEach((function(t){return n[t]=e[t]})),n}function isObject(e){var t=typeof e;return e&&"string"!==t&&"number"!==t&&"boolean"!==t&&"function"!==t&&!Array.isArray(e)}var FullCalendar=function(e){var t=e.dispatchEvent,n=e.data,r=__rest(e,["dispatchEvent","data"]),o=function(e,r){return __awaiter(void 0,void 0,void 0,(function(){var o,i;return __generator(this,(function(a){switch(a.label){case 0:return t?[4,t(e,r?createObject(n,r):n)]:[2];case 1:return o=a.sent(),[2,null!==(i=null==o?void 0:o.prevented)&&void 0!==i&&i]}}))}))};return React__default.default.createElement(FullCalendar$1,__assign$1({plugins:[main$3,main$2,main$1,main],headerToolbar:{left:"title",center:"",right:"prev,next today dayGridMonth,timeGridWeek,timeGridDay,listWeek"},locales:_default,locale:"zh-cn",editable:!0,selectable:!0,selectMirror:!0,dayMaxEvents:!0,initialView:"timeGridWeek",events:function(e,t,n){setTimeout((function(){o("getEvents",{fetchInfo:e,successCallback:t,failureCallback:n})}),100)},select:function(e){o("select",e)},eventClick:function(e){o("eventClick",e)},eventsSet:function(e){o("eventsSet",e)},eventAdd:function(e){o("eventAdd",e)},eventChange:function(e){o("eventChange",e)},eventRemove:function(e){o("eventRemove",e)},eventDidMount:function(e){o("eventDidMount",e)},eventWillUnmount:function(e){o("eventWillUnmount",e)},noEventsDidMount:function(e){o("noEventsDidMount",e)},noEventsWillUnmount:function(e){o("noEventsWillUnmount",e)},forceEventDuration:!0,views:{listWeek:{buttonText:"列表"}}},r))};exports.FullCalendar=FullCalendar,Object.defineProperty(exports,"__esModule",{value:!0})}));
|
|
23
|
+
*/function renderInnerContent(e){return createElement(Fragment,null,e.text&&createElement("a",__assign$1({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&createElement("a",__assign$1({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}var DEFAULT_TIME_FORMAT=createFormatter({hour:"numeric",minute:"2-digit",meridiem:"short"}),ListViewEventRow=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=e.timeHeaderId,a=e.eventHeaderId,i=e.dateHeaderId,o=t.options.eventTimeFormat||DEFAULT_TIME_FORMAT;return createElement(EventRoot,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:function(){return renderEventInnerContent(n,t)},isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,s,l,c,d){return createElement("tr",{className:["fc-list-event",d.event.url?"fc-event-forced-url":""].concat(s).join(" "),ref:e},buildTimeContent(n,o,t,r,i),createElement("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},createElement("span",{className:"fc-list-event-dot",style:{borderColor:d.borderColor||d.backgroundColor}})),createElement("td",{ref:l,headers:a+" "+i,className:"fc-list-event-title"},c))}))},t}(BaseComponent);function renderEventInnerContent(e,t){var n=getSegAnchorAttrs(e,t);return createElement("a",__assign$1({},n),e.eventRange.def.title)}function buildTimeContent(e,t,n,r,a){var i=n.options;if(!1!==i.displayEventTime){var o=e.eventRange.def,s=e.eventRange.instance,l=!1,c=void 0;if(o.allDay?l=!0:isMultiDayRange(e.eventRange.range)?e.isStart?c=buildSegTimeText(e,t,n,null,null,s.range.start,e.end):e.isEnd?c=buildSegTimeText(e,t,n,null,null,e.start,s.range.end):l=!0:c=buildSegTimeText(e,t,n),l){var d={text:n.options.allDayText,view:n.viewApi};return createElement(RenderHook,{hookProps:d,classNames:i.allDayClassNames,content:i.allDayContent,defaultContent:renderAllDayInner,didMount:i.allDayDidMount,willUnmount:i.allDayWillUnmount},(function(e,t,n,i){return createElement("td",{ref:e,headers:r+" "+a,className:["fc-list-event-time"].concat(t).join(" ")},i)}))}return createElement("td",{className:"fc-list-event-time"},c)}return null}function renderAllDayInner(e){return e.text}var ListView=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=memoize(computeDateVars),t.eventStoreToSegs=memoize(t._eventStoreToSegs),t.state={timeHeaderId:getUniqueDomId(),eventHeaderId:getUniqueDomId(),dateHeaderIdRoot:getUniqueDomId()},t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return __extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],a=this.computeDateVars(t.dateProfile),i=a.dayDates,o=a.dayRanges,s=this.eventStoreToSegs(t.eventStore,t.eventUiBases,o);return createElement(ViewRoot,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,a){return createElement("div",{ref:n,className:r.concat(a).join(" ")},createElement(Scroller,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},s.length>0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return createElement(RenderHook,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:renderNoEventsInner,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return createElement("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},createElement("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,r=n.theme,a=n.options,i=this.state,o=i.timeHeaderId,s=i.eventHeaderId,l=i.dateHeaderIdRoot,c=groupSegsByDay(e);return createElement(NowTimer,{unit:"day"},(function(e,n){for(var i=[],d=0;d<c.length;d+=1){var u=c[d];if(u){var p=formatDayString(t[d]),f=l+"-"+p;i.push(createElement(ListViewHeaderRow,{key:p,cellId:f,dayDate:t[d],todayRange:n}));for(var m=0,h=u=sortEventSegs(u,a.eventOrder);m<h.length;m++){var g=h[m];i.push(createElement(ListViewEventRow,__assign$1({key:p+":"+g.eventRange.instance.instanceId,seg:g,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:o,eventHeaderId:s,dateHeaderId:f},getSegMeta(g,n,e))))}}}return createElement("table",{className:"fc-list-table "+r.getClass("table")},createElement("thead",null,createElement("tr",null,createElement("th",{scope:"col",id:o},a.timeHint),createElement("th",{scope:"col","aria-hidden":!0}),createElement("th",{scope:"col",id:s},a.eventHint))),createElement("tbody",null,i))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(sliceEventStore(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,a=e;r<a.length;r++){var i=a[r];n.push.apply(n,this.eventRangeToSegs(i,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,a,i=this.context.dateEnv,o=this.context.options.nextDayThreshold,s=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if((r=intersectRanges(s,t[n]))&&(a={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===s.end.valueOf(),dayIndex:n},c.push(a),!a.isEnd&&!l&&n+1<t.length&&s.end<i.add(t[n+1].start,o))){a.end=s.end,a.isEnd=!0;break}return c},t}(DateComponent);function renderNoEventsInner(e){return e.text}function computeDateVars(e){for(var t=startOfDay(e.renderRange.start),n=e.renderRange.end,r=[],a=[];t<n;)r.push(t),a.push({start:t,end:addDays(t,1)}),t=addDays(t,1);return{dayDates:r,dayRanges:a}}function groupSegsByDay(e){var t,n,r=[];for(t=0;t<e.length;t+=1)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}var OPTION_REFINERS={listDayFormat:createFalsableFormatter,listDaySideFormat:createFalsableFormatter,noEventsClassNames:identity,noEventsContent:identity,noEventsDidMount:identity,noEventsWillUnmount:identity};function createFalsableFormatter(e){return!1===e?null:createFormatter(e)}var main=createPlugin({optionRefiners:OPTION_REFINERS,views:{list:{component:ListView,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{},localesAll$1={};Object.defineProperty(localesAll$1,"__esModule",{value:!0});var l0={code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Heeldag",moreLinkText:"Addisionele",noEventsText:"Daar is geen gebeurtenisse nie"},l1={code:"ar-dz",week:{dow:0,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l2={code:"ar-kw",week:{dow:0,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l3={code:"ar-ly",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l4={code:"ar-ma",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l5={code:"ar-sa",week:{dow:0,doy:6},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l6={code:"ar-tn",week:{dow:1,doy:4},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l7={code:"ar",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekText:"أسبوع",allDayText:"اليوم كله",moreLinkText:"أخرى",noEventsText:"أي أحداث لعرض"},l8={code:"az",week:{dow:1,doy:4},buttonText:{prev:"Əvvəl",next:"Sonra",today:"Bu Gün",month:"Ay",week:"Həftə",day:"Gün",list:"Gündəm"},weekText:"Həftə",allDayText:"Bütün Gün",moreLinkText:function(e){return"+ daha çox "+e},noEventsText:"Göstərmək üçün hadisə yoxdur"},l9={code:"bg",week:{dow:1,doy:7},buttonText:{prev:"назад",next:"напред",today:"днес",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",moreLinkText:function(e){return"+още "+e},noEventsText:"Няма събития за показване"},l10={code:"bn",week:{dow:0,doy:6},buttonText:{prev:"পেছনে",next:"সামনে",today:"আজ",month:"মাস",week:"সপ্তাহ",day:"দিন",list:"তালিকা"},weekText:"সপ্তাহ",allDayText:"সারাদিন",moreLinkText:function(e){return"+অন্যান্য "+e},noEventsText:"কোনো ইভেন্ট নেই"},l11={code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekText:"Sed",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikazivanje"},l12={code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekText:"Set",allDayText:"Tot el dia",moreLinkText:"més",noEventsText:"No hi ha esdeveniments per mostrar"},l13={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekText:"Týd",allDayText:"Celý den",moreLinkText:function(e){return"+další: "+e},noEventsText:"Žádné akce k zobrazení"},l14={code:"cy",week:{dow:1,doy:4},buttonText:{prev:"Blaenorol",next:"Nesaf",today:"Heddiw",year:"Blwyddyn",month:"Mis",week:"Wythnos",day:"Dydd",list:"Rhestr"},weekText:"Wythnos",allDayText:"Trwy'r dydd",moreLinkText:"Mwy",noEventsText:"Dim digwyddiadau"},l15={code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekText:"Uge",allDayText:"Hele dagen",moreLinkText:"flere",noEventsText:"Ingen arrangementer at vise"};function affix$1(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var l16={code:"de-at",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(affix$1(e)," ").concat(e)},next:function(e){return"Nächste".concat(affix$1(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(affix$1(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"};function affix(e){return"Tag"===e||"Monat"===e?"r":"Jahr"===e?"s":""}var l17={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekText:"KW",weekTextLong:"Woche",allDayText:"Ganztägig",moreLinkText:function(e){return"+ weitere "+e},noEventsText:"Keine Ereignisse anzuzeigen",buttonHints:{prev:function(e){return"Vorherige".concat(affix(e)," ").concat(e)},next:function(e){return"Nächste".concat(affix(e)," ").concat(e)},today:function(e){return"Tag"===e?"Heute":"Diese".concat(affix(e)," ").concat(e)}},viewHint:function(e){return e+("Woche"===e?"n":"Monat"===e?"s":"es")+"ansicht"},navLinkHint:"Gehe zu $0",moreLinkHint:function(e){return"Zeige "+(1===e?"ein weiteres Ereignis":e+" weitere Ereignisse")},closeHint:"Schließen",timeHint:"Uhrzeit",eventHint:"Ereignis"},l18={code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekText:"Εβδ",allDayText:"Ολοήμερο",moreLinkText:"περισσότερα",noEventsText:"Δεν υπάρχουν γεγονότα προς εμφάνιση"},l19={code:"en-au",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},l20={code:"en-gb",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},l21={code:"en-nz",week:{dow:1,doy:4},buttonHints:{prev:"Previous $0",next:"Next $0",today:"This $0"},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show ".concat(e," more event").concat(1===e?"":"s")}},l22={code:"eo",week:{dow:1,doy:4},buttonText:{prev:"Antaŭa",next:"Sekva",today:"Hodiaŭ",month:"Monato",week:"Semajno",day:"Tago",list:"Tagordo"},weekText:"Sm",allDayText:"Tuta tago",moreLinkText:"pli",noEventsText:"Neniuj eventoj por montri"},l23={code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekText:"Sm",allDayText:"Todo el día",moreLinkText:"más",noEventsText:"No hay eventos para mostrar"},l24={code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},buttonHints:{prev:"$0 antes",next:"$0 siguiente",today:function(e){return"Día"===e?"Hoy":("Semana"===e?"Esta":"Este")+" "+e.toLocaleLowerCase()}},viewHint:function(e){return"Vista "+("Semana"===e?"de la":"del")+" "+e.toLocaleLowerCase()},weekText:"Sm",weekTextLong:"Semana",allDayText:"Todo el día",moreLinkText:"más",moreLinkHint:function(e){return"Mostrar ".concat(e," eventos más")},noEventsText:"No hay eventos para mostrar",navLinkHint:"Ir al $0",closeHint:"Cerrar",timeHint:"La hora",eventHint:"Evento"},l25={code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekText:"näd",allDayText:"Kogu päev",moreLinkText:function(e){return"+ veel "+e},noEventsText:"Kuvamiseks puuduvad sündmused"},l26={code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekText:"As",allDayText:"Egun osoa",moreLinkText:"gehiago",noEventsText:"Ez dago ekitaldirik erakusteko"},l27={code:"fa",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekText:"هف",allDayText:"تمام روز",moreLinkText:function(e){return"بیش از "+e},noEventsText:"هیچ رویدادی به نمایش"},l28={code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekText:"Vk",allDayText:"Koko päivä",moreLinkText:"lisää",noEventsText:"Ei näytettäviä tapahtumia"},l29={code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},l30={code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekText:"Sm",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},l31={code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Planning"},weekText:"Sem.",allDayText:"Toute la journée",moreLinkText:"en plus",noEventsText:"Aucun événement à afficher"},l32={code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},weekText:"Sm",allDayText:"Todo o día",moreLinkText:"máis",noEventsText:"Non hai eventos para amosar"},l33={code:"he",direction:"rtl",buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",moreLinkText:"אחר",noEventsText:"אין אירועים להצגה",weekText:"שבוע"},l34={code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekText:"हफ्ता",allDayText:"सभी दिन",moreLinkText:function(e){return"+अधिक "+e},noEventsText:"कोई घटनाओं को प्रदर्शित करने के लिए"},l35={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekText:"Tje",allDayText:"Cijeli dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nema događaja za prikaz"},l36={code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Lista"},weekText:"Hét",allDayText:"Egész nap",moreLinkText:"további",noEventsText:"Nincs megjeleníthető esemény"},l37={code:"hy-am",week:{dow:1,doy:4},buttonText:{prev:"Նախորդ",next:"Հաջորդ",today:"Այսօր",month:"Ամիս",week:"Շաբաթ",day:"Օր",list:"Օրվա ցուցակ"},weekText:"Շաբ",allDayText:"Ամբողջ օր",moreLinkText:function(e){return"+ ևս "+e},noEventsText:"Բացակայում է իրադարձությունը ցուցադրելու"},l38={code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sehari penuh",moreLinkText:"lebih",noEventsText:"Tidak ada acara untuk ditampilkan"},l39={code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekText:"Vika",allDayText:"Allan daginn",moreLinkText:"meira",noEventsText:"Engir viðburðir til að sýna"},l40={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekText:"Sm",allDayText:"Tutto il giorno",moreLinkText:function(e){return"+altri "+e},noEventsText:"Non ci sono eventi da visualizzare"},l41={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekText:"週",allDayText:"終日",moreLinkText:function(e){return"他 "+e+" 件"},noEventsText:"表示する予定はありません"},l42={code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekText:"კვ",allDayText:"მთელი დღე",moreLinkText:function(e){return"+ კიდევ "+e},noEventsText:"ღონისძიებები არ არის"},l43={code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekText:"Не",allDayText:"Күні бойы",moreLinkText:function(e){return"+ тағы "+e},noEventsText:"Көрсету үшін оқиғалар жоқ"},l44={code:"km",week:{dow:1,doy:4},buttonText:{prev:"មុន",next:"បន្ទាប់",today:"ថ្ងៃនេះ",year:"ឆ្នាំ",month:"ខែ",week:"សប្តាហ៍",day:"ថ្ងៃ",list:"បញ្ជី"},weekText:"សប្តាហ៍",allDayText:"ពេញមួយថ្ងៃ",moreLinkText:"ច្រើនទៀត",noEventsText:"គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ"},l45={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekText:"주",allDayText:"종일",moreLinkText:"개",noEventsText:"일정이 없습니다"},l46={code:"ku",week:{dow:6,doy:12},direction:"rtl",buttonText:{prev:"پێشتر",next:"دواتر",today:"ئەمڕو",month:"مانگ",week:"هەفتە",day:"ڕۆژ",list:"بەرنامە"},weekText:"هەفتە",allDayText:"هەموو ڕۆژەکە",moreLinkText:"زیاتر",noEventsText:"هیچ ڕووداوێك نیە"},l47={code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekText:"W",allDayText:"Ganzen Dag",moreLinkText:"méi",noEventsText:"Nee Evenementer ze affichéieren"},l48={code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekText:"SAV",allDayText:"Visą dieną",moreLinkText:"daugiau",noEventsText:"Nėra įvykių rodyti"},l49={code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekText:"Ned.",allDayText:"Visu dienu",moreLinkText:function(e){return"+vēl "+e},noEventsText:"Nav notikumu"},l50={code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekText:"Сед",allDayText:"Цел ден",moreLinkText:function(e){return"+повеќе "+e},noEventsText:"Нема настани за прикажување"},l51={code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekText:"Mg",allDayText:"Sepanjang hari",moreLinkText:function(e){return"masih ada "+e+" acara"},noEventsText:"Tiada peristiwa untuk dipaparkan"},l52={code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekText:"Uke",weekTextLong:"Uke",allDayText:"Hele dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise",buttonHints:{prev:"Forrige $0",next:"Neste $0",today:"Nåværende $0"},viewHint:"$0 visning",navLinkHint:"Gå til $0",moreLinkHint:function(e){return"Vis ".concat(e," flere hendelse").concat(1===e?"":"r")}},l53={code:"ne",week:{dow:7,doy:1},buttonText:{prev:"अघिल्लो",next:"अर्को",today:"आज",month:"महिना",week:"हप्ता",day:"दिन",list:"सूची"},weekText:"हप्ता",allDayText:"दिनभरि",moreLinkText:"थप लिंक",noEventsText:"देखाउनको लागि कुनै घटनाहरू छैनन्"},l54={code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",moreLinkText:"extra",noEventsText:"Geen evenementen om te laten zien"},l55={code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekText:"Veke",allDayText:"Heile dagen",moreLinkText:"til",noEventsText:"Ingen hendelser å vise"},l56={code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekText:"Tydz",allDayText:"Cały dzień",moreLinkText:"więcej",noEventsText:"Brak wydarzeń do wyświetlenia"},l57={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Lista"},weekText:"Sm",allDayText:"dia inteiro",moreLinkText:function(e){return"mais +"+e},noEventsText:"Não há eventos para mostrar"},l58={code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekText:"Sem",allDayText:"Todo o dia",moreLinkText:"mais",noEventsText:"Não há eventos para mostrar"},l59={code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekText:"Săpt",allDayText:"Toată ziua",moreLinkText:function(e){return"+alte "+e},noEventsText:"Nu există evenimente de afișat"},l60={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekText:"Нед",allDayText:"Весь день",moreLinkText:function(e){return"+ ещё "+e},noEventsText:"Нет событий для отображения"},l61={code:"si-lk",week:{dow:1,doy:4},buttonText:{prev:"පෙර",next:"පසු",today:"අද",month:"මාසය",week:"සතිය",day:"දවස",list:"ලැයිස්තුව"},weekText:"සති",allDayText:"සියලු",moreLinkText:"තවත්",noEventsText:"මුකුත් නැත"},l62={code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekText:"Ty",allDayText:"Celý deň",moreLinkText:function(e){return"+ďalšie: "+e},noEventsText:"Žiadne akcie na zobrazenie"},l63={code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekText:"Teden",allDayText:"Ves dan",moreLinkText:"več",noEventsText:"Ni dogodkov za prikaz"},l64={code:"sm",buttonText:{prev:"Talu ai",next:"Mulimuli atu",today:"Aso nei",month:"Masina",week:"Vaiaso",day:"Aso",list:"Faasologa"},weekText:"Vaiaso",allDayText:"Aso atoa",moreLinkText:"sili atu",noEventsText:"Leai ni mea na tutupu"},l65={code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"sot",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekText:"Ja",allDayText:"Gjithë ditën",moreLinkText:function(e){return"+më tepër "+e},noEventsText:"Nuk ka evente për të shfaqur"},l66={code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekText:"Сед",allDayText:"Цео дан",moreLinkText:function(e){return"+ још "+e},noEventsText:"Нема догађаја за приказ"},l67={code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekText:"Sed",allDayText:"Cеo dan",moreLinkText:function(e){return"+ još "+e},noEventsText:"Nеma događaja za prikaz"},l68={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},buttonHints:{prev:function(e){return"Föregående ".concat(e.toLocaleLowerCase())},next:function(e){return"Nästa ".concat(e.toLocaleLowerCase())},today:function(e){return("Program"===e?"Detta":"Denna")+" "+e.toLocaleLowerCase()}},viewHint:"$0 vy",navLinkHint:"Gå till $0",moreLinkHint:function(e){return"Visa ytterligare ".concat(e," händelse").concat(1===e?"":"r")},weekText:"v.",weekTextLong:"Vecka",allDayText:"Heldag",moreLinkText:"till",noEventsText:"Inga händelser att visa",closeHint:"Stäng",timeHint:"Klockan",eventHint:"Händelse"},l69={code:"ta-in",week:{dow:1,doy:4},buttonText:{prev:"முந்தைய",next:"அடுத்தது",today:"இன்று",month:"மாதம்",week:"வாரம்",day:"நாள்",list:"தினசரி அட்டவணை"},weekText:"வாரம்",allDayText:"நாள் முழுவதும்",moreLinkText:function(e){return"+ மேலும் "+e},noEventsText:"காண்பிக்க நிகழ்வுகள் இல்லை"},l70={code:"th",week:{dow:1,doy:4},buttonText:{prev:"ก่อนหน้า",next:"ถัดไป",prevYear:"ปีก่อนหน้า",nextYear:"ปีถัดไป",year:"ปี",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"กำหนดการ"},weekText:"สัปดาห์",allDayText:"ตลอดวัน",moreLinkText:"เพิ่มเติม",noEventsText:"ไม่มีกิจกรรมที่จะแสดง"},l71={code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekText:"Hf",allDayText:"Tüm gün",moreLinkText:"daha fazla",noEventsText:"Gösterilecek etkinlik yok"},l72={code:"ug",buttonText:{month:"ئاي",week:"ھەپتە",day:"كۈن",list:"كۈنتەرتىپ"},allDayText:"پۈتۈن كۈن"},l73={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText:function(e){return"+ще "+e+"..."},noEventsText:"Немає подій для відображення"},l74={code:"uz",buttonText:{month:"Oy",week:"Xafta",day:"Kun",list:"Kun tartibi"},allDayText:"Kun bo'yi",moreLinkText:function(e){return"+ yana "+e},noEventsText:"Ko'rsatish uchun voqealar yo'q"},l75={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekText:"Tu",allDayText:"Cả ngày",moreLinkText:function(e){return"+ thêm "+e},noEventsText:"Không có sự kiện để hiển thị"},l76={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekText:"周",allDayText:"全天",moreLinkText:function(e){return"另外 "+e+" 个"},noEventsText:"没有事件显示"},l77={code:"zh-tw",buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"週",day:"天",list:"活動列表"},weekText:"周",allDayText:"整天",moreLinkText:"顯示更多",noEventsText:"没有任何活動"},localesAll=[l0,l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24,l25,l26,l27,l28,l29,l30,l31,l32,l33,l34,l35,l36,l37,l38,l39,l40,l41,l42,l43,l44,l45,l46,l47,l48,l49,l50,l51,l52,l53,l54,l55,l56,l57,l58,l59,l60,l61,l62,l63,l64,l65,l66,l67,l68,l69,l70,l71,l72,l73,l74,l75,l76,l77],_default=localesAll$1.default=localesAll,freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$1=freeGlobal||freeSelf||Function("return this")(),_root=root$1,root=_root,Symbol$3=root.Symbol,_Symbol=Symbol$3,Symbol$2=_Symbol;Symbol$2&&Symbol$2.toStringTag;var Symbol$1=_Symbol;Symbol$1&&Symbol$1.toStringTag;var funcProto=Function.prototype,funcToString=funcProto.toString;funcToString.call(Object);const getBuilderContext=()=>"undefined"==typeof window?{}:Builder.settings.context?Builder.settings.context:Builder.settings;async function fetchAPI(e,t={credentials:"include"}){const n={"Content-Type":"application/json"},r=getAuthorization();r&&(n.Authorization=r),t.headers=Object.assign({},n,t.headers),t.credentials="include";const a=await fetch(`${getRootUrl()}${e}`,t);if(401===a.status)throw new Error(401);const i=await a.json();if(i.errors)throw console.error(i.errors),new Error("Failed to fetch API");return i}function getAuthorization(){try{const e=getBuilderContext();let t=e.tenantId,n=e.authToken;return t&&n?`Bearer ${t},${n}`:null}catch(e){console.error(e)}}function getUserId(){try{let e=getBuilderContext().userId;return e||null}catch(e){console.error(e)}}function getRootUrl(e){const t=getBuilderContext();if(t.rootUrl)return t.rootUrl;const n="undefined"!=typeof window?window.localStorage.getItem("steedos:rootUrl"):"";return n||e}const Router={getTabDisplayAs(e){var t=new URLSearchParams(document.location.search);if(t.has("display"))return t.get("display");const n=localStorage.getItem("page_display");return n||"grid"},setTabDisplayAs(e,t){const n=`tab.${e}.display`;localStorage.setItem(n,t)},getAppPath:({formFactor:e,appId:t})=>`/app/${t}`,getPagePath(){},getObjectListViewPath:({formFactor:e,appId:t,objectName:n,listViewName:r})=>`/app/${t}/${n}/grid/${r}`,getObjectDetailPath(e){const{formFactor:t,appId:n,objectName:r,recordId:a,listViewName:i,_templateType:o}=e,s=Router.getTabDisplayAs(r);return"JavaScript"===o?`/app/${n}/${r}/view/${a}?display=${s}&side_object=<%=item.objectName%>&side_listview_id=<%=item.listName%>`:`/app/${n}/${r}/view/${a}?display=${s}&side_object=\${objectName}&side_listview_id=\${listName}`},getObjectRelatedViewPath:({formFactor:e,appId:t,masterObjectName:n,masterRecordId:r,objectName:a,foreignKey:i})=>`/app/${t}/${n}/${r}/${a}/grid?related_field_name=${i}`};function getNumberTpl(e){return`<div>\${_display.${e.name}}</div>`}function getTimeTpl(e){return`<div>\${_display.${e.name}}</div>`}function getDateTpl(e){return`<div>\${_display.${e.name}}</div>`}function getDateTimeTpl(e){return`<div>\${_display.${e.name}}</div>`}function getUiFieldTpl(e){return`<div>\${_display.${e.name}}</div>`}function getUiFileSizeTpl(e){return`<div>\${_display.${e.name}}</div>`}async function getRefObjectNameFieldName(e){return(await getUISchema(e.reference_to)).NAME_FIELD_KEY||"name"}function getSelectTpl(e){return`<div>\${_display.${e.name}}</div>`}function getNameTplUrl(e,t){if("cms_files"===t.objectName)return"${context.rootUrl}/api/files/files/${versions[0]}?download=true";return Router.getObjectDetailPath({...t,formFactor:t.formFactor,appId:"${appId}",objectName:t.objectName||"${objectName}",recordId:`\${${t.idFieldName}}`})}function getNameTpl(e,t){return`<a href="${getNameTplUrl(e,t)}">\${${e.name}}</a>`}function getRelatedFieldTpl(e,t){let n="";if(!e.reference_to&&(e.optionsFunction||e._optionsFunction))return e.isTableField?`\${${e.name}}`:`\${${e.name}__label}`;const r=t.onlyDisplayLabel;let a=`data._display.${e.name}`;if(e.isTableField&&(a=`data.${e.name}`),_.isString(e.reference_to)||!e.reference_to)if(e.multiple){let e="<%=item.label%>";if(!r){e=`<a href="${Router.getObjectDetailPath({formFactor:t.formFactor,appId:"<%=data.appId%>",objectName:"<%=item.objectName%>",recordId:"<%=item.value%>",_templateType:"JavaScript"})}"><%=item.label%></a>`}n=`\n <% if (${a} && ${a}.length) { %><% ${a}.forEach(function(item,index) { %> <% if(index>0 && index<${a}.length){ %> , <% } %> ${e} <% }); %><% } %>\n `}else{let a=`\${_display.${e.name}.label}`,i=`\${_display.${e.name}.objectName}`,o=`\${_display.${e.name}.value}`;if(e.isTableField&&(a=`\${${e.name}.label}`,i=`\${${e.name}.objectName}`,o=`\${${e.name}.value}`),!r){a=`<a href="${Router.getObjectDetailPath({formFactor:t.formFactor,appId:"${appId}",objectName:`${i}`,recordId:`${o}`})}">${a}</a>`}n=a}else{let e="<%=item.label%>";if(!r){e=`<a href="${Router.getObjectDetailPath({formFactor:t.formFactor,appId:"<%=data.appId%>",objectName:"<%=item.objectName%>",recordId:"<%=item.value%>",_templateType:"JavaScript"})}"><%=item.label%></a>`}n=`\n <% if (${a} && ${a}.length) { %><% ${a}.forEach(function(item) { %> ${e} <% }); %><% } %>\n `}return n}async function getLookupTpl(e,t){if(!e.reference_to)return getSelectTpl(e);const n=await getRefObjectNameFieldName(e);if(e.multiple){const r=Router.getObjectDetailPath({formFactor:t.formFactor,appId:t.appId,objectName:e.reference_to,recordId:"<%=item._id%>",_templateType:"JavaScript"});return`\n <% if (data.${e.name} && data.${e.name}.length) { %><% data.${e.name}.forEach(function(item) { %> <a href="${r}"><%=item.${n}%></a> <% }); %><% } %>\n `}return`<a href="${Router.getObjectDetailPath({formFactor:t.formFactor,appId:t.appId,objectName:e.reference_to,recordId:`\${${e.name}._id}`})}">\${${e.name}.${n}}</a>`}function getSwitchTpl(e){return`<% if (data.${e.name}) { %>\n <span class="slds-icon_container slds-icon-utility-check slds-current-color" title="<%=data._display.${e.name}%>">\n <span ><%= data._display.${e.name} === "√" ? "<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-4 h-4'><path stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5' /></svg>" : data._display.${e.name} %></span>\n </span>\n <% } %>`}function getPasswordTpl(e){return`<% if (data.${e.name}) { %>\n <span>······</span>\n <% } %>`}async function getFieldTpl(e,t){if((e.is_name||e.name===t.labelFieldName)&&!t.onlyDisplayLabel)return getNameTpl(e,t);switch(e.type){case"password":return getPasswordTpl(e);case"boolean":case"toggle":return getSwitchTpl(e);case"select":return getSelectTpl(e);case"time":return getTimeTpl(e);case"date":return getDateTpl(e);case"datetime":return getDateTimeTpl(e);case"lookup":case"master_detail":return await getRelatedFieldTpl(e,t);case"number":case"currency":return await getNumberTpl(e);case"percent":case"formula":case"summary":return getUiFieldTpl(e);case"filesize":return getUiFileSizeTpl(e)}}async function getFieldsTemplate(e,t){0!=t&&(t=!0);let n=["_id"],r=[],a=[];a=___default__namespace.isArray(e)?e:___default__namespace.values(e);for(const e of a)e.name.indexOf(".")<0&&(!t||"lookup"!=e.type&&"master_detail"!=e.type?n.push(e.alias?`${e.alias}:${e.name}`:e.name):(n.push(`${e.name}`),r.push(`${e.name}`)),___default.includes(["time","date","datetime","boolean","number","currency"],e.type)&&n.push(`${e.name}`),___default.includes(["percent","time","filesize","date","datetime","boolean","number","currency","select","file","image","avatar","formula","summary","object","grid"],e.type)&&r.push(`${e.name}`));return r=___default__namespace.uniq(r),n=___default__namespace.uniq(n),r.length>0?`${n.join(",")},_display:_ui{${r.join(",")}}`:`${n.join(" ")}`}async function getFindQuery(e,t,n,r){let a=r.limit||10,i=`(top: ${a})`;t&&(i=`(filters:["_id", "=", "${t}"], top: ${a})`);let o="data";r&&(r.alias&&(o=r.alias),r.filters&&(i=`(filters:${r.filters})`),r.queryOptions&&(i=`(${r.queryOptions})`));var s="";e.enable_tree&&___default__namespace.includes(___default__namespace.keys(e.fields),"parent")&&___default__namespace.includes(___default__namespace.keys(e.fields),"children")&&(s=",parent,children");var l="";"cms_files"===e.name&&(l=",versions");const c=!1===r.count?"":`,count:${e.name}__count(filters:{__filters})`,d=r.moreQueries?.length?","+r.moreQueries.map((function(e){return e.replace(/^{/,"").replace(/}$/,"")})).join(","):"";return{orderBy:"${orderBy}",orderDir:"${orderDir}",pageNo:"${page}",pageSize:"${perPage}",query:`{${o}:${e.name}${i}{${await getFieldsTemplate(n,r.expand)}${s}${l}}${c}${d}}`}}function getApi$2(e){if(!e)return"${context.rootUrl}/graphql?reload=${additionalFilters}"}async function getListBody(e,t){const n=[];for(const r of e){const e=await getFieldTpl(r,t);let a="text";e&&(a="tpl"),r.hidden||r.extra||n.push({name:r.name,label:r.label,sortable:r.sortable,width:r.width,type:a,tpl:e,toggled:r.toggled})}return{type:"hbox",columns:n}}function getDefaultParams$1(e){return{perPage:e.top||e.perPage||10}}async function getListSchema$1(e,t){const n=(await getListBody(e,t)).columns;return{mode:"list",name:"thelist",draggable:!1,headerToolbar:["reload"],defaultParams:getDefaultParams$1(t),syncLocation:!1,keepItemSelectionOnPageChange:!0,checkOnItemClick:!1,labelTpl:"${name}",listItem:{body:[...n],actions:!1===t.actions?null:[{icon:"fa fa-eye",label:"查看",type:"button",actionType:"link",link:Router.getObjectDetailPath({formFactor:t.formFactor,appId:t.appId,objectName:t.tabId,listView:t.listView,recordId:"${_id}"})}]}}}var config={listView:{newRecordMode:"modal",editRecordMode:"modal",perPage:20}};const getSchema$4=async(e,t)=>({type:"service",body:[{type:"button",label:"新建",id:"u:standard_new",level:"default",onEvent:{click:{weight:0,actions:[{actionType:"dialog",dialog:{type:"dialog",data:{$master:"$$",_master:"${_master}","_master._isRelated":"${_isRelated}","_master.relatedKey":"${relatedKey}",appId:"${appId}",objectName:"${objectName}",context:"${context}",global:"${global}",listViewId:"${listViewId}",displayAs:"${displayAs}",uiSchema:"${uiSchema}",isLookup:"${isLookup}",listName:"${listName}"},title:"新建 ${uiSchema.label}",body:[{type:"service",id:"u:1678e148c4d2",messages:{},schemaApi:{data:{isLookup:"${isLookup}",_master:"${_master}"},url:"${context.rootUrl}/api/pageSchema/form?app=${appId}&objectApiName=${objectName}&formFactor=${formFactor}",method:"get",messages:{},headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"},requestAdaptor:"",adaptor:`\n let formSchema = {\n "type": "steedos-object-form",\n "label": "对象表单",\n "objectApiName": "\${objectName}",\n "recordId": "",\n "mode": "edit",\n "layout": "normal"\n };\n\n if (payload && payload.schema) {\n formSchema = _.isString(payload.schema) ? JSON.parse(payload.schema) : payload.schema;\n }\n\n const _master = api.body._master;\n if(_master && _master._isRelated){\n const relatedKey = _master.relatedKey;\n const masterObjectName = _master.objectName;\n const recordId = _master.recordId;\n let relatedKeySaveValue = recordId;\n const fields = ${JSON.stringify(e.fields)};\n const relatedField = fields[relatedKey];\n if(relatedField.reference_to_field && relatedField.reference_to_field !== '_id'){\n relatedKeySaveValue = _master.record[relatedField.reference_to_field];\n }\n let defaultData = {}; \n let relatedKeyValue; \n if(!_.isString(relatedField.reference_to)){\n relatedKeyValue = { o: masterObjectName, ids: [relatedKeySaveValue] };\n }else if (relatedField.multiple) {\n relatedKeyValue = [relatedKeySaveValue];\n } else {\n relatedKeyValue = relatedKeySaveValue;\n }\n defaultData[relatedKey]=relatedKeyValue;\n if(payload.schema){\n // 表单微页面第一层要求是page\n formSchema.data.defaultData = defaultData;\n }else{\n formSchema.defaultData = defaultData;\n }\n }\n\n return {\n data: formSchema\n };\n `}}],showCloseButton:!0,id:"u:e11347411d2d",closeOnEsc:!1,closeOnOutside:!1,size:"lg",actions:[{type:"button",actionType:"cancel",label:"取消"},{type:"button",label:"保存并新建",actionType:"confirm",close:!1,id:"confirmAndNew"},{type:"button",actionType:"confirm",label:"保存",primary:!0}]}}]}}}],regions:["body"],className:"p-0 border-0",id:"u:aef99d937b10"});async function getObjectFieldsFilterFormSchema(e){e||(e={});return{type:"service",visibleOn:"this.filterFormSearchableFields && this.filterFormSearchableFields.length",className:"SMALL"===e.formFactor?"slds-filters__body p-0 mb-2":"slds-filters__body p-0 sm:grid sm:gap-2 sm:grid-cols-4 mb-2",schemaApi:{method:"post",url:"${context.rootUrl}/graphql?reload=${filterFormSearchableFields|join}",data:{$self:"$$",query:'{\n data: objects(filters: [["_id","=",null]],top: 1, skip: 0){_id}\n }'},requestAdaptor:"\n return {\n ...api,\n data: {\n query: api.data.query\n }\n };\n ",adaptor:`\n if(payload.errors){\n payload.status = 2;\n payload.msg = window.t ? window.t(payload.errors[0].message) : payload.errors[0].message;\n }\n const selfData = api.body.$self;\n const filterFormSearchableFields = selfData.filterFormSearchableFields;\n const uiSchema = selfData.uiSchema;\n const fields = uiSchema.fields;\n const searchableFields = [];\n\n const resolveAll = function(values){\n payload.data = {\n "body": values\n };\n return payload;\n }\n\n const rejectAll = function(){\n console.warn("run function getFieldSearchable failed.");\n }\n\n return Promise.all(filterFormSearchableFields.map(function (item) {\n const field = _.clone(fields[item]);\n if (\n !_.includes(\n [\n "grid",\n "avatar",\n "image",\n "object",\n "[object]",\n "[Object]",\n "[grid]",\n "[text]",\n "audio",\n "file",\n ],\n field.type\n )\n ) {\n delete field.defaultValue;\n delete field.required;\n delete field.is_wide;\n delete field.readonly;\n delete field.hidden;\n delete field.omit;\n var ctx = ${JSON.stringify(e)};\n const amisField = window.getFieldSearchable(field, fields, ctx);\n return amisField;\n }\n })).then(resolveAll, rejectAll);\n `,headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}}}async function getObjectFieldsFilterBarSchema(e,t){t||(t={});return{type:"service",name:"service_listview_filter_form",data:{},dataProvider:{inited:'\n const objectName = data.objectName;\n const isLookup = data.isLookup;\n const listViewId = data.listViewId;\n let searchableFieldsStoreKey = location.pathname + "/searchable_fields/";\n if(isLookup){\n searchableFieldsStoreKey += "lookup/" + objectName;\n }\n else{\n searchableFieldsStoreKey += listViewId;\n }\n let defaultSearchableFields = sessionStorage.getItem(searchableFieldsStoreKey);\n if(defaultSearchableFields){\n defaultSearchableFields = defaultSearchableFields.split(",");\n }\n if(_.isEmpty(defaultSearchableFields) && data.uiSchema){\n let listView = data.uiSchema.list_views[data.listName];\n const sFields = listView && listView.searchable_fields;\n if(sFields && sFields.length){\n defaultSearchableFields = _.map(sFields, \'field\');\n }\n }\n if(_.isEmpty(defaultSearchableFields) && data.uiSchema){\n defaultSearchableFields = _.map(\n _.sortBy(_.filter(_.values(data.uiSchema.fields), (field) => {\n return field.searchable;\n }), "sort_no"),\n "name"\n );\n }\n setData({ filterFormSearchableFields: defaultSearchableFields });\n if(isLookup){\n // looup字段过滤器不在本地缓存记住过滤条件,所以初始始终隐藏过滤器\n setData({ showFieldsFilter: false });\n }\n else{\n const listViewPropsStoreKey = location.pathname + "/crud/" + data.listViewId ;\n let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);\n if(localListViewProps){\n localListViewProps = JSON.parse(localListViewProps);\n let filterFormValues = _.pickBy(localListViewProps, function(n,k){\n return /^__searchable__/g.test(k);\n });\n if(!_.isEmpty(filterFormValues)){\n setData({ ...filterFormValues });\n const omitedEmptyFormValue = _.omitBy(filterFormValues, function(n){\n return _.isNil(n) \n || (_.isObject(n) && _.isEmpty(n)) \n || (_.isArray(n) && _.isEmpty(n.filter(function(item){return !_.isNil(item)})))\n || (_.isString(n) && n.length === 0);\n });\n // 有过滤条件时自动展开搜索栏\n if(!_.isEmpty(omitedEmptyFormValue)){\n setData({ showFieldsFilter: true });\n }\n }\n }\n }\n '},body:{type:"wrapper",body:{type:"wrapper",body:[await getObjectFieldsFilterFormSchema(t),{type:"wrapper",body:{type:"wrapper",body:[{type:"button",label:"搜索",icon:"fa fa-search",visibleOn:"this.filterFormSearchableFields && this.filterFormSearchableFields.length",onEvent:{click:{actions:[{actionType:"custom",script:'\n const scope = event.context.scoped;\n var filterForm = scope.parent.parent.getComponents().find(function(n){\n return n.props.type === "form";\n });\n filterForm.handleFormSubmit(event)\n // var filterFormValues = filterForm.getValues();\n // var listView = scope.parent.parent.parent.getComponents().find(function(n){\n // return n.props.type === "crud";\n // });\n // const removedValues = {};\n // // 设置搜索项中移除搜索项后,filterFormValues未把其字段的空值保存为own property,即hasOwnProperty属性中\n // // 这会造成handleFilterSubmit时把移除掉的搜索项字段之前的值加到过滤条件中\n // for(var k in filterFormValues){\n // if(filterFormValues[k] === "" && !filterFormValues.hasOwnProperty(k)){\n // removedValues[k] = "";\n // }\n // }\n // listView.handleFilterSubmit(Object.assign({}, removedValues, filterFormValues));\n '}]}}},{type:"button",label:"设置搜索项",onEvent:{click:{actions:[{actionType:"dialog",dialog:{type:"dialog",size:"md",title:"设置搜索项",body:[{type:"form",title:"",body:[{label:"",type:"transfer",name:"fields",id:"u:92c0b3cccca0",source:{method:"get",url:"${context.rootUrl}/service/api/amis-metadata-objects/objects/${objectName}/fields/options",dataType:"json",headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"},data:null,requestAdaptor:"",adaptor:""},options:[],required:!0,placeholder:"-",className:"col-span-2 m-0",checkAll:!1,searchable:!0,sortable:!0,joinValues:!1,extractValue:!0,multiple:!0}],id:"u:e5ac506d5683",mode:"normal",persistData:!1,promptPageLeave:!0,name:"form",debug:!1,actions:[],panelClassName:"m-0",bodyClassName:"p-4",className:"steedos-amis-form"}],id:"u:ca99fa9fe1b1",actions:[{type:"button",label:"取消",onEvent:{click:{actions:[{componentId:"",args:{},actionType:"closeDialog"}]}},id:"u:4e447b5ca72a"},{type:"button",label:"确认",onEvent:{click:{actions:[{actionType:"custom",script:'\n const data = context.props.data;\n const listName = data.listName;\n const objectName = data.objectName;\n const isLookup = data.isLookup;\n const listViewId = data.listViewId;\n const value = data.fields;\n const scope = event.context.scoped;\n // 这里的filterForm不是name为"listview-filter-form"的内部form,而是crud自带的filter form\n const filterForm = scope.parent.parent.getComponents().find(function(n){\n return n.props.type === "form";\n });\n const filterService = filterForm.context.getComponents().find(function(n){\n return n.props.type === "service";\n });\n filterService.setData({ filterFormSearchableFields: value });\n let searchableFieldsStoreKey = location.pathname + "/searchable_fields/";\n if(isLookup){\n searchableFieldsStoreKey += "lookup/" + objectName;\n }\n else{\n searchableFieldsStoreKey += listViewId;\n }\n sessionStorage.setItem(searchableFieldsStoreKey, value);\n\n // ===START===:当变更可搜索字段时,如果被移除的可搜索字段在本地存储中已经存入过滤条件中则应该清除本地存储中相关字段的过滤条件。\n const searchableFields = data.fields;\n let preSearchableFields = data.__super.fields;\n if(typeof preSearchableFields === "string"){\n preSearchableFields = preSearchableFields.split(",");\n }\n const removedFields = _.difference(preSearchableFields, searchableFields);\n\n // const getClosestAmisComponentByType = function (scope, type, name) {\n // // 递归children找到listview-filter-form\n // let re = scope.getComponents().find(function (n) {\n // return n.props.type === type && n.props.name === name;\n // });\n // if (re) {\n // return re;\n // }\n // else {\n // if (scope.children && scope.children.length) {\n // for (let i = 0; i < scope.children.length; i++) {\n // re = getClosestAmisComponentByType(scope.children[i], type, name);\n // if (re) {\n // break;\n // }\n // }\n // return re;\n // }\n \n // }\n // }\n // // 这里第二层form才是真正要提交到crud过滤条件的form\n // filterInnerForm = getClosestAmisComponentByType(filterForm.context, "form", "listview-filter-form");\n\n const filterFormValues = filterForm.getValues();\n let removedKeys = [];\n _.each(filterFormValues, function(n,k){\n // __searchable__开头的不在searchableFields范围则清除其值\n let isRemoved = !!removedFields.find(function(fieldName){\n return new RegExp("__searchable__.*" + fieldName + "$").test(k);\n });\n if(isRemoved){\n removedKeys.push(k);\n }\n });\n const removedValues = {};\n removedKeys.forEach(function(key){\n removedValues[key] = "";\n });\n filterForm.setValues(removedValues);//这里使用filterInnerForm也可以\n\n if(isLookup){\n return;\n }\n \n // 列表视图crud支持本地缓存,所以需要进一步清除浏览器本地缓存里面用户在可搜索项中移除的字段值\n const listViewPropsStoreKey = location.pathname + "/crud/" + listViewId ;\n let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);\n if(localListViewProps){\n localListViewProps = JSON.parse(localListViewProps);\n // const removedValues = {};\n removedKeys.forEach(function(key){\n delete localListViewProps[key];\n // removedValues[key] = "";\n });\n sessionStorage.setItem(listViewPropsStoreKey, JSON.stringify(localListViewProps));\n }\n //触发amis crud 高度重算\n setTimeout(()=>{\n window.dispatchEvent(new Event("resize"))\n }, 100)\n // ===END===\n '},{componentId:"",args:{},actionType:"closeDrawer"}]}},id:"u:14e7388fecd3",level:"primary"}],closeOnEsc:!1,closeOnOutside:!1,showCloseButton:!0,data:{"&":"$$",objectName:"${objectName}",listName:"${listName}",listViewId:"${listViewId}",uiSchema:"${uiSchema}",isLookup:"${isLookup}",context:"${context}",fields:"${filterFormSearchableFields}"}}}]}},id:"u:b96d84868a5a",level:"link"}],size:"xs",className:"space-x-4"},size:"xs",className:"slds-filters__footer slds-grid slds-shrink-none flex justify-between p-0"}],size:"xs",className:"slds-filters"},size:"xs",className:`border-gray-300 border-y slds-grid slds-grid_vertical slds-nowrap ${!t.isLookup&&"mt-2"}`,visibleOn:"this.showFieldsFilter"},className:"bg-white"}}async function getObjectListHeaderFieldsFilterBar(e,t,n){return await getObjectFieldsFilterBarSchema(e,n)}const getDisplayAsButton=function(e,t){let n=Router.getTabDisplayAs(e);return{type:"dropdown-button",icon:"fa fa-table-columns",btnClassName:"antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",align:"right",visibleOn:"${formFactor !== 'SMALL'}",buttons:[{label:"显示为",children:[{type:"button",label:"表格",onClick:'let url = document.location.pathname; var urlSearch = new URLSearchParams(document.location.search); if(urlSearch.get("side_object") && urlSearch.get("side_listview_id")){url=`/app/${props.data.appId}/${urlSearch.get("side_object")}/grid/${urlSearch.get("side_listview_id")}`;}; props.env.jumpTo(url + \'?display=grid\');',rightIcon:"split"!=n?"fa fa-check":null,rightIconClassName:"m-l-sm"},{type:"button",label:"分栏视图",onClick:"const url = document.location.pathname + '?display=split'; props.env.jumpTo(url);",rightIcon:"split"===n?"fa fa-check":null,rightIconClassName:"m-l-sm"}]}]}},onFieldsFilterToggleScript='\nconst scope = event.context.scoped;\nconst filterForm = scope.getComponents().find(function(n){\n return n.props.type === "form";\n});\nconst filterService = filterForm.context.getComponents().find(function(n){\n return n.props.type === "service";\n});\nfilterService.setData({showFieldsFilter: !!!filterService.props.data.showFieldsFilter});\n//触发amis crud 高度重算\nsetTimeout(()=>{\n window.dispatchEvent(new Event("resize"))\n}, 100)\n';function getExportApiRequestAdaptorScript(){return'\n // 获取列表视图的属性\n let uiSchema = api.body.uiSchema;\n let list_views = uiSchema.list_views;\n let list_views_name = api.body.listName;\n let col = list_views[list_views_name].columns;\n let sort_test = list_views[list_views_name].sort;\n \n // 获取下载字段\n let select = [];\n _.each(col, (col) => {\n if (col.field == undefined)\n select.push(col);\n else select.push(col.field);\n });\n \n // 获取排序字段\n \n let sort = [];\n _.forEach(sort_test, (sortField) => {\n if (sortField.field_name == undefined)\n sort.push(sortField);\n else sort.push([sortField.field_name, sortField.order]);\n })\n \n let orders = [];\n _.map(sort, (value) => {\n let order_tmp = [];\n if (value[1] == "desc")\n order_tmp = value[0] + \' desc\';\n else\n order_tmp = value[0];\n orders.push(order_tmp);\n });\n let order = orders.join(\',\');\n \n let filename = uiSchema.label + "-" + list_views[list_views_name].label;\n \n url_tmp = api.url.split(\'?\')[0];\n api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;\n \n // 判断sort 和 filters\n if (sort.length > 0) {\n api.url += "&$orderby=" + order;\n }\n let filters = list_views[list_views_name].filters;\n if (filters && filters.length > 0) {\n api.url = api.url + "&filters=" + JSON.stringify(filters);\n }\n return api;\n '}function getObjectHeaderToolbar(e,t,{showDisplayAs:n=!1,hiddenCount:r=!1,headerToolbarItems:a,filterVisible:i=!0}={}){if(window.innerWidth<768&&(n=!1),"SMALL"===t){return[r?{}:{type:"tpl",tpl:"${count} 个项目"},{type:"button",align:"right",className:"bg-white p-2 rounded border-gray-300 text-gray-500",label:"",icon:"fa fa-sync",onEvent:{click:{actions:[{actionType:"custom",script:'\n const scope = event.context.scoped;\n var listView = scope.parent.getComponents().find(function(n){\n return n.props.type === "crud";\n });\n listView.handleChangePage(1);\n '}]}}},i?{label:"",icon:"fa fa-search",type:"button",align:"right",className:"bg-white p-2 rounded border-gray-300 text-gray-500",onEvent:{click:{actions:[{actionType:"custom",script:onFieldsFilterToggleScript}]}}}:{},getDisplayAsButton(e?.name)]}return[...a||[],"bulkActions",{type:"columns-toggler",className:"hidden"},r?{}:{type:"tpl",tpl:"${count} 个项目"},{type:"reload",align:"right",tooltipPlacement:"bottom",className:"bg-white p-2 rounded border-gray-300 text-gray-500"},{type:"button",label:"",icon:"fa fa-download",align:"right",className:"bg-white p-2 rounded border-gray-300 text-gray-500",tooltipPlacement:"bottom",visibleOn:"${!isLookup && global.user.is_space_admin}",tooltip:"导出Excel",onEvent:{click:{weight:0,actions:[{args:{api:{url:"${context.rootUrl}/api/record/export/${objectName}",method:"get",messages:{},requestAdaptor:`${getExportApiRequestAdaptorScript()}`,data:{uiSchema:"${uiSchema}",listName:"${listName}"},headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}},actionType:"download"}]}}},i?{label:"",icon:"fa fa-search",type:"button",align:"right",className:"bg-white p-2 rounded border-gray-300 text-gray-500",onEvent:{click:{actions:[{actionType:"custom",script:onFieldsFilterToggleScript}]}}}:{},{type:"dropdown-button",trigger:"click",icon:"fa fa-cog",btnClassName:"antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",align:"right",visibleOn:"${!isLookup}",buttons:[{label:"列表视图操作",children:[{type:"button",label:"新建",onEvent:{click:{weight:0,actions:[{dialog:{type:"dialog",title:"新建 列表视图",data:{"&":"$$",all:"${uiSchema.list_views.all}",list_view:"${uiSchema.list_views[listName]}",appId:"${appId}",global:"${global}",objectName:"${objectName}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"",mode:"edit",defaultData:{"&":"${list_view}",name:"",label:"",filters:"",shared:!1},fieldsExtend:'{\n "label": {\n "is_wide": true\n },\n "name": {\n "is_wide": true,\n "amis": {\n "hidden": true\n }\n },\n "object_name": {\n "amis": {\n "hidden": true\n }\n },\n "filter_scope": {\n "amis": {\n "hidden": true\n }\n },\n "columns": {\n "amis": {\n "hidden": true\n }\n },\n "filter_fields": {\n "amis": {\n "hidden": true\n }\n },\n "scrolling_mode": {\n "amis": {\n "hidden": true\n }\n },\n "sort": {\n "amis": {\n "hidden": true\n }\n },\n "show_count": {\n "amis": {\n "hidden": true\n }\n },\n "type": {\n "amis": {\n "hidden": true\n }\n },\n "shared":{\n "amis":{\n "visibleOn":"${global.user.is_space_admin}"\n }\n}\n}',fields:["label","name","object_name","filter_scope","show_count","columns.$.field","columns.$.width","sort.$.field_name","sort.$.order","filters","mobile_columns.$.field","searchable_fields.$.field","is_system","shared"],onEvent:{submitSucc:{weight:0,actions:[{args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/listview_${result.data.recordId|lowerCase}",blank:!1},actionType:"url"}]}},messages:{success:"成功",failed:"失败"}}],showCloseButton:!0,showErrorMsg:!0,showLoading:!0,closeOnEsc:!1,dataMapSwitch:!1,size:"lg"},actionType:"dialog"}]}}},{type:"button",label:"复制",onEvent:{click:{weight:0,actions:[{dialog:{type:"dialog",title:"复制 列表视图",data:{"&":"$$",listName:"${listName}",objectName:"${objectName}",list_view:"${uiSchema.list_views[listName]}",appId:"${appId}",global:"${global}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"",mode:"edit",fields:[],defaultData:{"&":"${list_view}",name:"",label:"${list_view.label}的副本",shared:!1},fieldsExtend:'{\n "label": {\n "is_wide": true\n },\n "name": {\n "is_wide": true,\n "amis": {\n "hidden": true\n }\n },\n "object_name": {\n "amis": {\n "hidden": true\n }\n },\n "filter_scope": {\n "amis": {\n "hidden": true\n }\n },\n "columns": {\n "amis": {\n "hidden": true\n }\n },\n "filter_fields": {\n "amis": {\n "hidden": true\n }\n },\n "scrolling_mode": {\n "amis": {\n "hidden": true\n }\n },\n "sort": {\n "amis": {\n "hidden": true\n }\n },\n "show_count": {\n "amis": {\n "hidden": true\n }\n },\n "type": {\n "amis": {\n "hidden": true\n }\n },\n "shared":{\n "amis":{\n "visibleOn":"${global.user.is_space_admin}"\n }\n}\n}',fields:["label","name","object_name","filter_scope","show_count","columns.$.field","columns.$.width","sort.$.field_name","sort.$.order","filters","mobile_columns.$.field","searchable_fields.$.field","is_system","shared"],onEvent:{submitSucc:{weight:0,actions:[{args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/listview_${result.data.recordId|lowerCase}",blank:!1},actionType:"url"}]}}}],showCloseButton:!0,showErrorMsg:!0,showLoading:!0,closeOnEsc:!1,dataMapSwitch:!1,size:"lg"},actionType:"dialog"}]}}},{type:"button",label:"重命名",disabledOn:"!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",onEvent:{click:{weight:0,actions:[{dialog:{type:"dialog",title:"重命名 列表视图",data:{objectName:"${objectName}",recordId:"${uiSchema.list_views[listName]._id}",appId:"${appId}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"${recordId}",mode:"edit",fields:["label"],fieldsExtend:'{\n "label":{\n "is_wide": true\n }\n}',onEvent:{submitSucc:{weight:0,actions:[{args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/${name}",blank:!1},actionType:"url"}]}}}],showCloseButton:!0,showErrorMsg:!0,showLoading:!0,size:"lg"},actionType:"dialog"}]}}},{type:"button",label:"共享设置",disabledOn:"!(global.user.is_space_admin && !!uiSchema.list_views[listName].owner)",onEvent:{click:{weight:0,actions:[{dialog:{type:"dialog",title:"共享设置",data:{recordId:"${uiSchema.list_views[listName]._id}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"${recordId}",mode:"edit",fields:["shared"]}],showCloseButton:!0,showErrorMsg:!0,showLoading:!0,closeOnEsc:!1,dataMapSwitch:!1,size:"md"},actionType:"dialog"}]}}},{type:"button",label:"过滤设置",disabledOn:"!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",onEvent:{click:{weight:0,actions:[{dialog:{type:"dialog",title:"过滤设置",data:{objectName:"${objectName}",recordId:"${uiSchema.list_views[listName]._id}",listName:"${listName}",appId:"${appId}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"${recordId}",mode:"edit",fields:["filters"],initApiRequestAdaptor:"",initApiAdaptor:"const recordId_tmp = api.body.recordId;\nlet data_tmp;\nif (recordId_tmp) {\n data_tmp = payload.data;\n // 数据格式转换\n if (data_tmp) {\n if (data_tmp.filters && lodash.isString(data_tmp.filters)) {\n try {\n data_tmp.filters = JSON.parse(data_tmp.filters);\n } catch (e) { }\n }\n\n if (data_tmp.filters && lodash.isString(data_tmp.filters)) {\n data_tmp._filters_type_controller = 'function';\n } else {\n data_tmp._filters_type_controller = 'conditions'\n }\n\n if (data_tmp._filters_type_controller === 'conditions') {\n data_tmp._filters_conditions = window.amisConvert.filtersToConditions(data_tmp.filters || []);\n data_tmp.filters = data_tmp._filters_conditions;\n } else {\n data_tmp._filters_function = data_tmp.filters;\n }\n }\n}\nfor (key in data_tmp) {\n if (data_tmp[key] === null) {\n delete data_tmp[key];\n }\n}\npayload.data = Object.assign(payload.data, data_tmp);\ndelete payload.extensions;",apiRequestAdaptor:"const recordId = api.body.recordId;\nif (formData._filters_type_controller === 'conditions' && formData._filters_conditions) {\n formData.filters = window.amisConvert.conditionsToFilters(formData.filters);\n} else {\n formData.filters = formData._filters_function || null;\n}\n\ndelete formData._filters_type_controller;\ndelete formData._filters_conditions;\ndelete formData._filters_function;\n// 字符串拼接(不支持ES6``语法)\nquery = 'mutation{record: ' + objectName + '__insert(doc: {__saveData}){_id}}';\nif (api.body.recordId) {\n query = 'mutation{record: ' + objectName + '__update(id: \"' + recordId + '\", doc: {__saveData}){_id}}';\n};\n__saveData = JSON.stringify(JSON.stringify(formData));\napi.data = { query: query.replace('{__saveData}', __saveData) };\n",fieldsExtend:'{"filters": {\n "visible_on": "true",\n "amis": {\n "type": "condition-builder",\n "label": "条件组件",\n "source": {\n "method": "get",\n "url": "${context.rootUrl}/service/api/amis-metadata-listviews/getFilterFields?objectName=${objectName}",\n "dataType": "json",\n "headers": {\n "Authorization": "Bearer ${context.tenantId},${context.authToken}"\n }\n }\n }\n }\n}',onEvent:{submitSucc:{weight:0,actions:[{args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/${listName}",blank:!1},actionType:"url"}]}}}],showCloseButton:!0,showErrorMsg:!0,showLoading:!0,closeOnEsc:!1,dataMapSwitch:!1,size:"lg"},actionType:"dialog"}]}}},{type:"button",label:"显示的列",disabledOn:"!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",onEvent:{click:{weight:0,actions:[{args:{},dialog:{type:"dialog",title:"显示的列",data:{"&":"$$",objectName:"${objectName}",recordId:"${uiSchema.list_views[listName]._id}",listName:"${listName}",appId:"${appId}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"${recordId}",mode:"edit",fieldsExtend:'{\n "columns": {\n "amis": {\n "type": "transfer",\n "sortable": true,\n "searchable": true,\n "source": {\n "method": "get",\n "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${objectName}/fields/options",\n "headers": {\n "Authorization": "Bearer ${context.tenantId},${context.authToken}"\n }\n }\n }\n },\n "mobile_columns": {\n "group": "手机端",\n "amis": {\n "type": "transfer",\n "sortable": true,\n "searchable": true,\n "source": {\n "method": "get",\n "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${objectName}/fields/options",\n "headers": {\n "Authorization": "Bearer ${context.tenantId},${context.authToken}"\n }\n }\n }\n }\n}',initApiAdaptor:"const recordId_tmp = api.body.recordId;\nlet columns_tmp = {}, mobile_columns_tmp = {};\nif (recordId_tmp) {\n columns_tmp = payload.data.columns;\n mobile_columns_tmp = payload.data.mobile_columns;\n if (columns_tmp) {\n columns_tmp = lodash.map(columns_tmp, 'field');\n }\n if (mobile_columns_tmp) {\n mobile_columns_tmp = lodash.map(mobile_columns_tmp, 'field');\n }\n}\npayload.data.columns = columns_tmp;\npayload.data.mobile_columns = mobile_columns_tmp;\n\ndelete payload.extensions;\nreturn payload;",apiRequestAdaptor:"const formData_tmp = api.body.$;\nconst objectName_tmp = api.body.objectName;\nconst recordId_tmp = api.body.recordId;\n\nif (typeof formData_tmp.columns == 'string') {\n formData_tmp.columns = formData_tmp.columns?.split(',');\n}\nif (typeof formData_tmp.mobile_columns == 'string') {\n formData_tmp.mobile_columns = formData_tmp.mobile_columns?.split(',');\n}\n\n// 数据格式转换\nformData_tmp.columns = lodash.map(formData_tmp.columns, (item) => {\n return { field: item };\n});\nformData.mobile_columns = lodash.map(formData.mobile_columns, (item) => {\n return { field: item };\n});\n\n// 字符串拼接(不支持ES6语法)\nlet query_tmp = 'mutation{record: ' + objectName_tmp + '__insert(doc: {__saveData}){_id}}';\nif (api.body.recordId) {\n query_tmp = 'mutation{record: ' + objectName_tmp + '__update(id: \"' + recordId_tmp +'\", doc: {__saveData}){_id}}';\n};\ndelete formData_tmp._id;\nlet __saveData_tmp = JSON.stringify(JSON.stringify(formData_tmp));\napi.data = { query: query_tmp.replace('{__saveData}', __saveData_tmp) };\n\nreturn api;",fields:["columns","mobile_columns"],onEvent:{submitSucc:{weight:0,actions:[{args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/${listName}",blank:!1},actionType:"url"}]}}}],searchable:!0,showCloseButton:!0,showErrorMsg:!0,showLoading:!0,size:"lg"},actionType:"dialog"}]}}},{type:"button",label:"默认排序规则",disabledOn:"!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",onEvent:{click:{weight:0,actions:[{dialog:{type:"dialog",title:"弹框标题",data:{"&":"$$",objectName:"${objectName}",recordId:"${uiSchema.list_views[listName]._id}",listName:"${listName}",appId:"${appId}"},body:[{type:"steedos-object-form",label:"对象表单",objectApiName:"object_listviews",recordId:"${recordId}",className:"",id:"u:061f158b4c5a",mode:"edit",fields:["sort","sort.$.field_name","sort.$.order"],onEvent:{submitSucc:{weight:0,actions:[{args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/${listName}",blank:!1},actionType:"url"}]}},fieldsExtend:'{\n "sort": {\n "amis": {\n "type": "tabs-transfer",\n "sortable": true,\n "searchable": true,\n "source": {\n "method": "get",\n "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${objectName}/sortFields/options",\n "headers": {\n "Authorization": "Bearer ${context.tenantId},${context.authToken}"\n }\n }\n }\n }\n}',initApiAdaptor:"let sort;\nif (recordId) {\n sort = payload.data.sort;\n //数据格式转换\n if (sort instanceof Array) {\n sort = lodash.map(sort, (item) => {\n return item.field_name + ':' + (item.order || 'asc')\n });\n }\n}\npayload.data.sort = sort;\ndelete payload.extensions;",apiRequestAdaptor:"const recordId = api.body.recordId;\n//数据格式转换\nif (typeof formData.sort == 'string') {\n formData.sort = formData.sort?.split(',');\n}\nformData.sort = lodash.map(formData.sort, (item) => {\n const arr = item.split(':');\n return { field_name: arr[0], order: arr[1] };\n});\nif (recordId) {\n query = 'mutation{record: ' + objectName + '__update(id: \"' + recordId + '\", doc: {__saveData}){_id}}';\n}\n__saveData = JSON.stringify(JSON.stringify(formData));\napi.data = { query: query.replace('{__saveData}', __saveData) };\n"}],showCloseButton:!0,showErrorMsg:!0,showLoading:!0,id:"u:d3f6947b6acf",size:"lg"},actionType:"dialog"}]}}},{type:"button",label:"删除",disabledOn:"!((global.user.is_space_admin || global.userId == uiSchema.list_views[listName].owner) && !!uiSchema.list_views[listName].owner)",confirmText:"如果您删除此列表视图,该视图将为所有具备访问权限的用户永久删除。是否确定要删除?",onEvent:{click:{actions:[{actionType:"ajax",args:{api:{url:"${context.rootUrl}/graphql",method:"post",headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"},data:{"&":"$$",uiSchema:"${uiSchema}",recordId:"${uiSchema.list_views[listName]._id}"},messages:{success:"删除成功"},requestAdaptor:"const { recordId } = api.body;\nvar deleteArray = [];\nif (recordId) { deleteArray.push(`delete:object_listviews__delete(id: \"${recordId}\")`); }\napi.data = { query: `mutation{${deleteArray.join(',')}}` };\n return api;\n",adaptor:"if (payload.errors) {\n payload.status = 2;\n payload.msg = payload.errors[0].message;\n}\nreturn payload;"}}},{actionType:"url",args:{url:"${context.rootUrl}/app/${appId}/${objectName}/grid/all",blank:!1},expression:"data.delete == 1"}]}}},{type:"button",visibleOn:"${false}",label:"保存宽度(todo)"}]}]},getDisplayAsButton(n)]}function getObjectFooterToolbar(e,t){return"SMALL"===t?["load-more"]:["statistics","pagination"]}async function getObjectFilter(e,t,n){return{title:"",submitText:"",className:"",mode:"normal",wrapWithPanel:!1,body:[await getObjectListHeaderFieldsFilterBar(e,null,n)]}}async function getSource(e,t){const n=t.objectName,r=await getFindQuery({name:n},null,[{name:t.valueField,alias:"value"},{name:t.labelField,alias:"label"},{name:"children"}],{alias:"options",filters:"{__filters}"});r.query=r.query.replace(/,count\:.+/,"}");const a=await getFindQuery({name:n},null,[{name:t.valueField,alias:"value"},{name:t.labelField,alias:"label"}],{alias:"defaultValueOptions",filters:"{__options_filters}"});a.query=a.query.replace(/,count\:.+/,"}"),r.query=r.query.replace(/}$/,","+a.query.replace(/{(.+)}/,"$1}"));let i=`${e.name}`;e._prefix&&(i=`${e._prefix}${e.name}`),t.fieldNamePrefix&&(i=`${t.fieldNamePrefix}${i}`),r.$value=`$${i}`;const o=`\n var filters = [['parent', '=', null]];\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters));\n var defaultValue = api.data.$value;\n var optionsFiltersOp = "${e.multiple?"in":"="}";\n var optionsFilters = [["${t.valueField}", optionsFiltersOp, []]];\n if (defaultValue) { \n optionsFilters = [["${t.valueField}", optionsFiltersOp, defaultValue]];\n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n `;return{method:"post",url:getApi$2(),requestAdaptor:o,adaptor:'\n const data = payload.data;\n data.options = data.options.map(function (optionItem) {\n optionItem.defer = !!(optionItem.children && optionItem.children.length);\n delete optionItem.children;\n return optionItem;\n });\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(data.options, defaultValueOptions, function(a,b){\n return a["value"]=== b["value"];\n });\n delete data.defaultValueOptions;\n payload.data = data;\n return payload;\n ',data:r,headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}}async function getDeferApi(e,t){const n=t.objectName,r=await getFindQuery({name:"{__object_name}"},null,[],{alias:"options",queryOptions:'filters: {__filters}, sort: "{__sort}"'});let a=e.filters;"string"==typeof a&&(a=new Function(`return ${a}`),a=a()),"function"==typeof a&&(a=a(e)),r.query=r.query.replace(/,count\:.+/,"}"),r.query=r.query.replace("{_id}","{{__fields}}");const i=`\n var dep = api.query.dep;\n var term = api.query.term;\n var filters;\n var objectName;\n var fields;\n var sort = "";\n if (dep) {\n objectName = "${n}";\n fields = "_id,value:${t.valueField},label:${t.labelField},children";\n filters = [['parent', '=', dep]];\n sort = "${t.sort}";\n }\n api.data.query = api.data.query.replace(/{__object_name}/g, objectName).replace(/{__fields}/g, fields).replace(/{__filters}/g, JSON.stringify(filters)).replace('{__sort}', sort.trim());\n return api;\n `;return{method:"post",url:getApi$2()+"&dep=${value}",requestAdaptor:i,adaptor:"\n if (api.query.dep) {\n // 展开组织时才需要根据children值设置defer属性\n const data = payload.data;\n data.options = data.options.map(function (option) {\n option.defer = !!(option.children && option.children.length);\n delete option.children;\n return option;\n });\n payload.data = data;\n }\n return payload;\n ",data:r,headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}}function getRefListViewSort(e){const t=___default__namespace.find(e.list_views,((e,t)=>"all"===t));let n="";return t&&(n=getListViewSort(t)),n}async function lookupToAmisTreeSelect(e,t,n){if(!e)return{};n||(n={});const r={type:getAmisStaticFieldType("tree-select",t)};if(t)r.tpl=await getLookupTpl(e,n);else{const t=await getUISchema(n.objectName);n.sort=getRefListViewSort(t),Object.assign(r,{multiple:e.multiple,searchable:e.searchable,extractValue:!0,hideNodePathLabel:!0,clearable:!0,source:await getSource(e,n),deferApi:await getDeferApi(e,n)}),e.multiple&&Object.assign(r,{joinValues:!1}),"boolean"!=typeof r.searchable&&(r.searchable=!0);const a=e.onEvent;a&&(r.onEvent=a)}return r}const getReferenceTo=async e=>{let t=e.reference_to;if(!t)return;"users"===t&&(t="space_users",e.reference_to_field="user");const n=await getUISchema(t);if(!n)return null;let r=null,a=e.reference_to_field;return a||(a=n.idFieldName||"_id"),r="_id"===a?{name:"_id",label:"ID",type:"text",toggled:!1}:n.fields[a]||{name:a},{objectName:t,valueField:r,labelField:n.fields[n.NAME_FIELD_KEY||"name"],NAME_FIELD_KEY:n.NAME_FIELD_KEY||"name"}};function getLookupSapceUserTreeSchema(){return[{type:"input-tree",className:"",inputClassName:"pl-0",id:"u:7fd77b7915b0",source:{method:"post",url:"${context.rootUrl}/graphql",headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"},adaptor:"if (payload.data.treeCache == true) {\n return payload;\n }\n const records = payload.data.options;\n const treeRecords = [];\n const getChildren = (records, childrenIds) => {\n if (!childrenIds) {\n return;\n }\n const children = _.filter(records, (record) => {\n return _.includes(childrenIds, record.value)\n });\n _.each(children, (item) => {\n if (item.children) {\n item.children = getChildren(records, item.children)\n }\n })\n return children;\n }\n\n const getRoot = (records) => {\n for (var i = 0; i < records.length; i++){\n records[i].noParent = 0;\n if (!!records[i].parent) {\n biaozhi = 1\n for (var j = 0; j < records.length; j++){\n if (records[i].parent == records[j].value)\n biaozhi = 0;\n }\n if (biaozhi == 1) records[i].noParent = 1;\n } else records[i].noParent = 1;\n }\n }\n getRoot(records);\n console.log(records)\n\n _.each(records, (record) => {\n if (record.noParent ==1) {\n treeRecords.push(Object.assign({}, record, { children: getChildren(records, record.children) }));\n }\n });\n console.log(treeRecords)\n\n payload.data.options = treeRecords;\n payload.data.treeCache = true;\n return payload;\n ",requestAdaptor:"\n ",data:{query:'{options:organizations(filters:["hidden", "!=", true],sort:"sort_no desc"){value:_id label:name,parent,children}}'},messages:{},cache:3e5},onEvent:{change:{actions:[{actionType:"custom",script:'\n const scope = event.context.scoped;\n //TODO: 将form中的value一同加入筛选内\n // var filterForm = scope.parent.parent.getComponents().find(function(n){\n // return n.props.type === "form";\n // });\n // var filterFormValues = filterForm.getValues();\n filterFormValues={\n "__searchable__organizations_parents":event.data.value.value\n }\n var listView = scope.parent.getComponents().find(function(n){\n return n.props.type === "crud";\n });\n const removedValues = {};\n // for(var k in filterFormValues){\n // if(filterFormValues[k] === "" && !filterFormValues.hasOwnProperty(k)){\n // removedValues[k] = "";\n // }\n // }\n listView.handleFilterSubmit(Object.assign({}, removedValues, filterFormValues));\n '}]}},label:"",name:"organizations",multiple:!1,joinValues:!1,clearValueOnHidden:!1,fieldName:"organizations",hideRoot:!0,initiallyOpen:!1,extractValue:!0,onlyChildren:!0,treeContainerClassName:"no-border",showIcon:!1,enableNodePath:!1,autoCheckChildren:!1,searchable:!0,searchConfig:{sticky:!0},unfoldedLevel:2,style:{"max-height":"100%",position:"absolute",left:"-200px",width:"190px",bottom:0,top:"-14px",overflow:"auto","min-height":"300px"},originPosition:"left-top"}]}async function lookupToAmisPicker(e,t,n){let r=await getReferenceTo(e);if(!r)return;const a=await getUISchema(r.objectName),i=[];let o=0;const s=[],l=[],c=___default__namespace.find(a.list_views,((e,t)=>"all"===t));c&&c.columns?___default__namespace.each(c.columns,(function(e){___default__namespace.isString(e)&&a.fields[e]?l.push(a.fields[e]):___default__namespace.isObject(e)&&a.fields[e.field]&&l.push(Object.assign({},a.fields[e.field],{width:e.width,wrap:e.wrap}))})):___default__namespace.each(a.fields,((e,t)=>{"_id"==t||e.hidden||(___default__namespace.has(e,"name")||(e.name=t),l.push(e))})),___default__namespace.each(___default__namespace.sortBy(l,"sort_no"),(function(e){o<5&&(___default__namespace.find(i,(function(t){return t.name===e.name}))||(o++,i.push(e),e.searchable&&s.push(e.name)))}));const d={[r.labelField.name]:r.labelField,[r.valueField.name]:r.valueField};___default__namespace.each(i,(e=>{e.hidden||(d[e.name]=e)}));let u="";c&&(u=getListViewSort(c));const p=await getApi$1(a,null,d,{expand:!0,alias:"rows",queryOptions:'filters: {__filters}, top: {__top}, skip: {__skip}, sort: "{__sort}"'});if(p.url){const t=[],n=[];___default__namespace.each(e.depend_on,(e=>{t.push(`depend_on_${e}=\${${e}}`),n.push(`this.${e}`)})),t.length>0&&(p.url=`${p.url}?${t.join("&")}`,p.sendOn=`${n.join(" && ")}`)}p.data.$term="$term",p.data.$self="$$",p.requestAdaptor=`\n const selfData = JSON.parse(JSON.stringify(api.data.$self));\n var filters = [];\n var pageSize = api.data.pageSize || 10;\n var pageNo = api.data.pageNo || 1;\n var skip = (pageNo - 1) * pageSize;\n var orderBy = api.data.orderBy || '';\n var orderDir = api.data.orderDir || '';\n var sort = orderBy + ' ' + orderDir;\n sort = orderBy ? sort : "${u}";\n var allowSearchFields = ${JSON.stringify(s)};\n let fieldValue;\n if(api.data.$term){\n filters = [["name", "contains", "'+ api.data.$term +'"]];\n }else if(selfData.op === 'loadOptions' && selfData.value){\n if(selfData.value?.indexOf(',') > 0){\n fieldValue = selfData.value.split(',');\n filters = [["${r.valueField.name}", "=", fieldValue]];\n }else{\n fieldValue = selfData.value;\n filters = [["${r.valueField.name}", "=", fieldValue]];\n }\n }\n\n var searchableFilter = [];\n _.each(selfData, (value, key)=>{\n if(!_.isEmpty(value) || _.isBoolean(value)){\n if(_.startsWith(key, '__searchable__between__')){\n searchableFilter.push([\`\${key.replace("__searchable__between__", "")}\`, "between", value])\n }else if(_.startsWith(key, '__searchable__')){\n if(_.isString(value)){\n searchableFilter.push([\`\${key.replace("__searchable__", "")}\`, "contains", value])\n }else{\n searchableFilter.push([\`\${key.replace("__searchable__", "")}\`, "=", value])\n }\n }\n }\n });\n\n if(searchableFilter.length > 0){\n if(filters.length > 0 ){\n filters = [filters, 'and', searchableFilter];\n }else{\n filters = searchableFilter;\n }\n }\n\n if(allowSearchFields){\n allowSearchFields.forEach(function(key){\n const keyValue = selfData[key];\n if(keyValue){\n filters.push([key, "contains", keyValue]);\n }\n })\n }\n\n var fieldFilters = ${JSON.stringify(e.filters)};\n if(fieldFilters && fieldFilters.length){\n filters.push(fieldFilters);\n }\n \n const filtersFunction = ${e.filtersFunction||e._filtersFunction};\n\n if(filtersFunction){\n const _filters = filtersFunction(filters, api.data.$self.__super.__super);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n\n const enable_tree = ${a.enable_tree};\n if(enable_tree){\n pageSize = 10000;\n }\n if(fieldValue && _.isArray(fieldValue) && fieldValue.length > pageSize){\n pageSize = fieldValue.length;\n }\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', pageSize).replace('{__skip}', skip).replace('{__sort}', sort.trim());\n return api;\n `,p.adaptor=`\n const enable_tree = ${a.enable_tree};\n const op = api.data.$self.op;\n if(!_.isEmpty(op)){\n // op不为空,表示处于字段初始编辑状态,不是点击后出现弹窗状态。\n const rows = _.map(payload.data.rows, (item)=>{\n return _.pick(item, ["${r.labelField.name}", "${r.valueField.name}"]);\n })\n payload.data.rows = rows;\n return payload;\n }\n if(enable_tree){\n const records = payload.data.rows;\n const treeRecords = [];\n\n const getParentIds = (records)=>{\n const ids = _.map(records, (item)=>{\n return item._id;\n });\n const parents = _.filter(records,(record)=>{\n return !record.parent || !_.includes(ids,record.parent);\n })\n const parentsIds = _.map(parents,(item)=>{\n return item._id;\n })\n return parentsIds;\n }\n const getChildren = (records, childrenIds)=>{\n if(!childrenIds){\n return;\n }\n const children = _.filter(records, (record)=>{\n return _.includes(childrenIds, record._id)\n });\n _.each(children, (item)=>{\n if(item.children){\n item.children = getChildren(records, item.children)\n }\n })\n return children;\n }\n\n const parentIds = getParentIds(records);\n _.each(records, (record)=>{\n if(!record.parent || _.includes(parentIds, record._id)){\n treeRecords.push(Object.assign({}, record, {children: getChildren(records, record.children)}));\n }\n });\n payload.data.rows = treeRecords;\n }\n return payload;\n `,(e.optionsFunction||e._optionsFunction)&&(p.adaptor=`\n payload.data.rows = eval(${e.optionsFunction||e._optionsFunction})(api.data.$self);\n return payload;\n `);let f=20;a.paging&&!1===a.paging.enabled&&(f=1e3);let m=null;if("SMALL"===n.formFactor)m=await getListSchema$1(i,{top:f,...n,actions:!1});else{m=await getTableSchema$1(i,{labelFieldName:a.NAME_FIELD_KEY,top:f,...n});var h=[];const t=window.innerWidth<768;"space_users"!==r.objectName||"user"!==e.reference_to_field||t||(h=getLookupSapceUserTreeSchema(),m.style={"margin-left":"200px","min-height":"300px"}),m.headerToolbar=getObjectHeaderToolbar(a,n.formFactor,{headerToolbarItems:h});if(a.permissions.allowCreate){const e=await getSchema$4(a,{appId:n.appId,objectName:a.name,formFactor:n.formFactor});e.align="right",m.headerToolbar.push(e)}m.footerToolbar=a.enable_tree?[]:getObjectFooterToolbar(),"space_users"==r.objectName&&"user"==e.reference_to_field||!1!==n.filterVisible&&(m.filter=await getObjectFilter(a,d,{isLookup:!0,...n})),m.data=Object.assign({},m.data,{"&":"$$",objectName:a.name,uiSchema:a,listName:"all",isLookup:!0}),m.onEvent||(m.onEvent={}),m.onEvent[`@data.changed.${a.name}`]={actions:[{actionType:"reload"}]}}const g={type:getAmisStaticFieldType("picker",t),labelField:r.labelField.name,valueField:r.valueField.name,modalMode:"dialog",source:p,size:"lg",pickerSchema:m,joinValues:!1,extractValue:!0};return e.multiple&&(g.multiple=!0,g.extractValue=!0),t&&(g.tpl=await getLookupTpl(e,n)),g}async function lookupToAmisSelect(e,t,n){let r=await getReferenceTo(e);const a=r&&r.valueField?.name||"_id";let i;if(r){const e=await getFindQuery({name:r.objectName},null,[Object.assign({},r.labelField,{alias:"label"}),Object.assign({},r.valueField,{alias:"value"})],{alias:"defaultValueOptions",filters:"{__options_filters}",count:!1});i=await getApi$1({name:r.objectName},null,[Object.assign({},r.labelField,{alias:"label"}),Object.assign({},r.valueField,{alias:"value"})],{expand:!1,alias:"options",queryOptions:'filters: {__filters}, top: {__top}, sort: "{__sort}"',moreQueries:[e.query]}),i.adaptor='\n const data = payload.data;\n var defaultValueOptions = data.defaultValueOptions;\n // 字段值下拉选项合并到options中\n data.options = _.unionWith(defaultValueOptions, data.options, function(a,b){\n return a["value"]=== b["value"];\n });\n delete data.defaultValueOptions;\n payload.data.options = data.options;\n return payload;\n '}else i={method:"post",url:getApi$2(),data:{query:'{objects(filters: ["_id", "=", "-1"]){_id}}',$:"$$"},headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}};const o=r&&await getUISchema(r.objectName),s=o&&___default__namespace.find(o.list_views,((e,t)=>"all"===t));let l="";if(s&&(l=getListViewSort(s)),i.url){const t=[],n=[];___default__namespace.each(e.depend_on,(e=>{t.push(`depend_on_${e}=\${${e}}`),n.push(`this.${e}`)})),t.length>0&&(i.url=`${i.url}?${t.join("&")}`,i.sendOn=`${n.join(" && ")}`)}i.data.$term="$term",i.data.$value=n.isRefToMutiple?`$${e.name}.ids`:`$${e.name}`,___default__namespace.each(e.depend_on,(function(e){i.data[e]=`$${e}`})),i.data.$="$$",i.data.rfield="${object_name}",i.requestAdaptor=`\n var filters = [];\n var top = 10;\n if(api.data.$term){\n filters = [["${r?.NAME_FIELD_KEY||"name"}", "contains", api.data.$term]];\n }\n // else if(api.data.$value){\n // filters = [["_id", "=", api.data.$value]];\n // }\n\n var fieldFilters = ${JSON.stringify(e.filters)};\n if(fieldFilters && fieldFilters.length){\n filters.push(fieldFilters);\n }\n\n const filtersFunction = ${e.filtersFunction||e._filtersFunction};\n\n if(filtersFunction){\n const _filters = filtersFunction(filters, api.data.$);\n if(_filters && _filters.length > 0){\n filters.push(_filters);\n }\n }\n var sort = "${l}";\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', top).replace('{__sort}', sort.trim());\n\n var defaultValue = api.data.$value;\n var optionsFiltersOp = "${e.multiple?"in":"="}";\n var optionsFilters = [["${a}", optionsFiltersOp, []]];\n if (defaultValue && !api.data.$term) { \n // 字段值单独请求,没值的时候在请求中返回空\n optionsFilters = [["${a}", optionsFiltersOp, defaultValue]];\n if(filters.length > 0){\n optionsFilters = [filters, optionsFilters];\n }\n }\n api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));\n return api;\n `,r&&r.labelField.name,r&&r.valueField.name,(e.optionsFunction||e._optionsFunction)&&(i.adaptor=`\n payload.data.options = eval(${e.optionsFunction||e._optionsFunction})(api.data.$);\n return payload;\n `);const c={type:getAmisStaticFieldType("select",t),joinValues:!1,extractValue:!0,clearable:!0,source:i,autoComplete:i,searchable:!0};return c.menuTpl="${icon ? `<span class='flex items-center mt-0.5'>\n <span role='img' aria-label='smile' class='anticon anticon-smile'>\n <span class='slds-icon_container slds-icon-standard-${REPLACE(icon,'_','-')}'>\n <svg class='slds-icon slds-icon_x-small' aria-hidden='true'>\n <use xlink:href='${context.rootUrl}/assets/icons/standard-sprite/svg/symbols.svg#${icon}'></use>\n </svg>\n </span> \n </span>\n <span class='pl-1.5'>${label}</span>\n </span>` : label}",e.multiple&&(c.multiple=!0,c.extractValue=!0),t&&(c.tpl=await getLookupTpl(e,n)),c}async function getApi$1(e,t,n,r){const a=await getFindQuery(e,t,n,r);return{method:"post",url:getApi$2(),data:a,headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}}async function lookupToAmis(e,t,n){if(n||(n={}),t)return{type:getAmisStaticFieldType("picker",t),tpl:getRelatedFieldTpl(e,n)};if(e.reference_to&&!___default__namespace.isString(e.reference_to)&&!t)return{type:"steedos-field-lookup",field:e,readonly:t,ctx:{}};let r=await getReferenceTo(e);if(!r)return await lookupToAmisSelect(e,t,n);if("space_users"===r.objectName&&"user"===e.reference_to_field&&(n.idsDependOn||e.amis))return await lookupToAmisIdsPicker(e,t,n);const a=await getUISchema(r.objectName);return 1==a.enable_enhanced_lookup&&___default__namespace.isEmpty(e.depend_on)?await lookupToAmisPicker(e,t,n):a.enable_tree?await lookupToAmisTreeSelect(e,t,Object.assign({},n,{labelField:r.labelField?.name||"name",valueField:r.valueField?.name||"_id",objectName:r.objectName})):await lookupToAmisSelect(e,t,n)}async function lookupToAmisIdsPicker(e,t,n){return getIdsPickerSchema(e,t,n)}async function getIdsPickerSchema(e,t,n){n||(n={});let r=await getReferenceTo(e);if(!r)return;const a=await getUISchema(r.objectName),{idsDependOn:i}=n,o={[r.labelField.name]:r.labelField,[r.valueField.name]:r.valueField},s=[r.labelField],l=await getApi$1(a,null,o,{expand:!0,alias:"rows",queryOptions:"filters: {__filters}, top: {__top}, skip: {__skip}"});l.data.$term="$term",l.data.$self="$$",i&&l.url&&(l.sendOn=`\${${i} && ${i}.length}`,l.url=`${l.url}&depend_on_${i}=\${${i}|join}`),l.requestAdaptor=`\n const selfData = JSON.parse(JSON.stringify(api.data.$self));\n var filters = [];\n var pageSize = api.data.pageSize || 1000;\n var pageNo = api.data.pageNo || 1;\n var skip = (pageNo - 1) * pageSize;\n if(selfData.op === 'loadOptions' && selfData.value){\n if(selfData.value?.indexOf(',') > 0){\n filters = [["${r.valueField.name}", "=", selfData.value.split(',')]];\n }else{\n filters = [["${r.valueField.name}", "=", selfData.value]];\n }\n }\n\n var ids;\n var idsDependOn = "${i}";\n if(idsDependOn){\n ids = api.data.$self[idsDependOn];\n }\n if(ids && ids.length){\n filters.push(["${r.valueField.name}", "=", ids]);\n }\n\n api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', pageSize).replace('{__skip}', skip);\n return api;\n `;let c=null;c="SMALL"===n.formFactor?await getListSchema$1(s,{top:1e3,...n,actions:!1}):await getTableSchema$1(s,{labelFieldName:a.NAME_FIELD_KEY,top:1e3,...n});const d={type:getAmisStaticFieldType("picker",t),labelField:r.labelField.name,valueField:r.valueField.name,modalMode:"dialog",source:l,size:"lg",pickerSchema:c,joinValues:!1,extractValue:!0};return e.multiple&&(d.multiple=!0,d.extractValue=!0),n.value&&(d.value=n.value),null!=n.selectFirst&&(d.selectFirst=n.selectFirst),t&&(d.tpl=await getLookupTpl(e,n)),d}const getMarkdownFieldSchema=(e,t,n)=>t?{type:"markdown",name:e.name,options:{linkify:!0,html:!0,breaks:!0}}:{type:"group",body:[{type:"editor",name:e.name,language:"markdown"},{type:"markdown",name:e.name,options:{linkify:!0,html:!0,breaks:!0}}]},getHtmlFieldSchema=(e,t,n)=>t?{type:"html",name:e.name}:{type:"input-rich-text",name:e.name},AmisFormInputs=["text","date","file","avatar","image","datetime","time","number","currency","percent","password","url","email"];function getAmisStaticFieldType(e,t,n){return t?___default__namespace.includes(["text","image"],e)?"image"===e&&n&&n.multiple?"static-images":`static-${e}`:"static":___default__namespace.includes(AmisFormInputs,e)?`input-${e}`:e}const getFileTableName=e=>{switch(e.type){case"avatar":return"avatars";case"image":return"images";case"file":return"files"}},getAmisFieldType$1=(e,t)=>getAmisStaticFieldType("avatar"===e.type?"image":e.type,t,{multiple:e.multiple}),getAmisFileReadonlySchema=e=>{const t=e.type,n=getAmisFieldType$1(e,!0);return _.includes(["avatar","image"],t)?{type:n,defaultImage:"",enlargeAble:!0,showToolbar:!0}:"file"===t?{type:n,tpl:`\n <% let fileData = data.${e.name}; if (fileData) { %>\n <% if(!Array.isArray(fileData)){ fileData = [fileData]} %>\n <% fileData.forEach(function(item) { %> \n <a href='<%= item.url %>' target='_self' class='block'><%= item.name %></a> \n <% });} %>`}:void 0},getAmisFileEditSchema=e=>{const t=getFileTableName(e);let n={type:getAmisFieldType$1(e,!1),useChunk:!1,receiver:{method:"post",url:`\${context.rootUrl}/s3/${t}`,data:{$:"$$",context:"${context}"},adaptor:`\n const { context } = api.body; \n var rootUrl = context.rootUrl + "/api/files/${t}/";\n payload = {\n status: response.status == 200 ? 0 : response.status,\n msg: response.statusText,\n data: {\n value: payload._id,\n name: payload.original.name,\n url: rootUrl + payload._id,\n }\n }\n return payload;\n `,headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}};return e.multiple&&(n.multiple=!0,n.joinValues=!1,n.extractValue=!0),n},getAmisFileSchema=(e,t)=>t?getAmisFileReadonlySchema(e):getAmisFileEditSchema(e),OMIT_FIELDS=["created","created_by","modified","modified_by"];function getObjectFieldSubFields(e,t){const n=Object.assign({subFields:[]},e),r=___default__namespace.filter(t,(function(t){let n=t.name.startsWith(`${e.name}.`)&&___default__namespace.split(t.name,".").length<3;return n&&(t._prefix=`${e.name}.`),n}));return n.subFields=r,n}function getGridFieldSubFields(e,t){const n=Object.assign({subFields:[]},e),r=___default__namespace.filter(t,(function(t){let n=t.name.startsWith(`${e.name}.`);return n&&(t._prefix=`${e.name}.`),n}));return n.subFields=r,n}function getSelectFieldOptions(e){const t=e.data_type||"text",n=[];return ___default__namespace.each(e.options,(e=>{switch(t){case"number":n.push({label:e.label,value:Number(e.value)});break;case"text":n.push({label:e.label,value:String(e.value)});break;case"boolean":n.push({label:e.label,value:"false"!==e.value})}})),n}async function convertSFieldToAmisField(e,t,n){if(___default__namespace.includes(OMIT_FIELDS,e.name)&&1!=n.showSystemFields)return;const r={name:n.fieldNamePrefix?`${n.fieldNamePrefix}${e.name}`:e.name,label:e.label,labelRemark:e.inlineHelpText,required:___default__namespace.has(n,"required")?n.required:e.required};let a={};switch(e.type){case"text":a.type=getAmisStaticFieldType("text",t);break;case"textarea":a.type=getAmisStaticFieldType("textarea",t),a.tpl=`<%=(data.${e.name} || "").split("\\n").join('<br>')%>`;break;case"html":a=getHtmlFieldSchema(e,t);break;case"markdown":a=getMarkdownFieldSchema(e,t);break;case"select":a={type:getAmisStaticFieldType("select",t),joinValues:!1,options:getSelectFieldOptions(e),extractValue:!0,clearable:!0,labelField:"label",valueField:"value",tpl:t?getSelectTpl(e):null},e.multiple&&(a.multiple=!0,a.extractValue=!0);break;case"boolean":a={type:getAmisStaticFieldType("checkbox",t),tpl:t?getSwitchTpl(e):null};break;case"input-date-range":a={type:"input-date-range",inputFormat:"YYYY-MM-DD",format:"YYYY-MM-DDT00:00:00.000[Z]",tpl:t?getDateTpl(e):null,joinValues:!1};break;case"date":a={type:getAmisStaticFieldType("date",t),inputFormat:"YYYY-MM-DD",format:"YYYY-MM-DDT00:00:00.000[Z]",tpl:t?getDateTpl(e):null};break;case"input-datetime-range":a={type:"input-datetime-range",inputFormat:"YYYY-MM-DD HH:mm",format:"YYYY-MM-DDTHH:mm:ss.SSSZ",tpl:t?getDateTimeTpl(e):null,utc:!0,joinValues:!1};break;case"datetime":a={type:getAmisStaticFieldType("datetime",t),inputFormat:"YYYY-MM-DD HH:mm",format:"YYYY-MM-DDTHH:mm:ss.SSSZ",tpl:t?getDateTimeTpl(e):null,utc:!0};break;case"input-time-range":a={type:"input-time-range",inputFormat:"HH:mm",timeFormat:"HH:mm",format:"1970-01-01THH:mm:00.000[Z]",tpl:t?getDateTimeTpl(e):null,joinValues:!1};break;case"time":a={type:getAmisStaticFieldType("time",t),inputFormat:"HH:mm",timeFormat:"HH:mm",format:"1970-01-01THH:mm:00.000[Z]",tpl:t?getDateTimeTpl(e):null};break;case"currency":case"number":a=t?{type:"static-tpl",tpl:getNumberTpl(e)}:{type:getAmisStaticFieldType("number",t),min:e.min,max:e.max,precision:e.scale};break;case"input-array":a=Object.assign({},e,r);break;case"input-range":a={type:"input-range",min:e.min,max:e.max,value:[0,0],multiple:!0,showInput:!0};break;case"percent":a=t?{type:"static-tpl",tpl:getUiFieldTpl(e)}:{type:getAmisStaticFieldType("number",t),min:e.min,max:e.max,precision:e.scale};break;case"password":a={type:getAmisStaticFieldType("password",t),tpl:t?getPasswordTpl(e):null};break;case"lookup":case"master_detail":a=await lookupToAmis(e,t,n);break;case"autonumber":t&&(a={type:"static-text"});break;case"url":a={type:getAmisStaticFieldType("url",t)};break;case"email":a={type:getAmisStaticFieldType("email",t)};break;case"avatar":case"image":case"file":a=getAmisFileSchema(e,t);break;case"formula":case"summary":t&&(a={type:"static-tpl",tpl:getUiFieldTpl(e)});break;case"code":a={type:"editor",language:e.language};break;case"toggle":a={type:"switch",name:e.name,label:e.label,width:e.width,toggled:e.toggled,disabled:t};break;case"grid":if(e.subFields){a={type:"input-table",showIndex:!0,columnsTogglable:!1,strictMode:!1,affixHeader:!1,needConfirm:!1,editable:!t,addable:!t,removable:!t,draggable:!t,columns:[]};for(const r of e.subFields){const i=r.name.replace(`${e._prefix||""}${e.name}.$.`,"").replace(`${e.name}.`,""),o=await convertSFieldToAmisField(Object.assign({},r,{name:i,isTableField:!0}),t,n);if(o){delete o.name,delete o.label;const e={name:i,label:r.label,quickEdit:!t&&o};"lookup"===r.type&&(e.type=o.type,e.tpl=o.tpl),a.columns.push(Object.assign({},e,r.amis,{name:i}))}}}break;case"object":if(e.subFields){a={type:"combo",items:[]};for(let r of e.subFields){let i=r.name.replace(`${e.name}.$.`,"").replace(`${e.name}.`,"");"grid"===r.type?r=await getGridFieldSubFields(r,n.__formFields):t&&(i=`${e.name}.${i}`);const o=await convertSFieldToAmisField(Object.assign({},r,{name:i}),t,n);o&&(delete o.name,delete o.label,a.items.push(Object.assign({},o,{label:r.label},r.amis,{name:i})))}}}return ___default__namespace.isEmpty(a)?void 0:(e.is_wide||"group"===a.type?a.className="col-span-2 m-1":a.className="m-1",t&&(a.className=`${a.className} md:border-b`),t&&(a.quickEdit=!1),e.visible_on&&(e.visible_on.startsWith("{{")?a.visibleOn=`${e.visible_on.substring(2,e.visible_on.length-2).replace(/formData./g,"data.")}`:a.visibleOn=`${e.visible_on.replace(/formData./g,"data.")}`),___default__namespace.isString(r.required)&&r.required.startsWith("{{")&&(r.requiredOn=`${r.required.substring(2,r.required.length-2).replace(/formData./g,"data.")}`,delete r.required),"group"===a.type?(a.body[0]=Object.assign({},r,a.body[0],{labelClassName:"text-left",clearValueOnHidden:!0,fieldName:e.name}),a):Object.assign({},r,a,{labelClassName:"text-left",clearValueOnHidden:!0,fieldName:e.name},e.amis,{name:r.name}))}async function getFieldSearchable(e,t,n){n||(n={});let r=e;"grid"===r.type?r=await getGridFieldSubFields(e,t):"object"===e.type&&(r=await getObjectFieldSubFields(e,t));let a="__searchable__";if(r.name.indexOf(".")<0){let e=___default.cloneDeep(r);___default.includes(["textarea","html","code","autonumber"],r.type)&&(e.type="text"),___default.includes(["formula","summary"],r.type)?(e.type=r.data_type,e.precision=r.precision,e.scale=r.scale):"select"===r.type&&r.data_type&&"text"!=r.data_type&&(e.type=r.data_type),"number"!==e.type&&"currency"!==e.type||(e.type="input-array",e.inline=!0,e.addable=!1,e.removable=!1,e.value=[null,null],e.items={type:"input-number"},e.is_wide=!0,a=`${a}between__`),"date"===e.type&&(e.type="input-date-range",e.is_wide=!0,a=`${a}between__`),"datetime"===e.type&&(e.type="input-datetime-range",e.is_wide=!0,a=`${a}between__`),"time"===e.type&&(e.type="input-time-range",e.is_wide=!0,a=`${a}between__`),"users"===e.reference_to&&(e.reference_to="space_users",e.reference_to_field="user"),e.readonly=!1,e.disabled=!1,e.multiple=!0,e.is_wide=!1,e.defaultValue=void 0;const t=await convertSFieldToAmisField(e,!1,Object.assign({},n,{fieldNamePrefix:a,required:!1,showSystemFields:!0}));if(t)return t}}async function getTableColumns(e,t){const n=[{name:"_index",type:"text",width:32,placeholder:""}];for(const r of e)if(!r.is_name&&r.name!==t.labelFieldName||"cms_files"!==t.objectName)if("toggle"===r.type)n.push(Object.assign({},{type:"switch",name:r.name,label:r.label,width:r.width,toggled:r.toggled,disabled:!0,className:"whitespace-nowrap"},r.amis,{name:r.name}));else if("avatar"===r.type||"image"===r.type||"file"===r.type)n.push(Object.assign({},{type:"switch",name:r.name,label:r.label,width:r.width,toggled:r.toggled,disabled:!0,className:"whitespace-nowrap",...getAmisFileReadonlySchema(r)},r.amis,{name:r.name}));else{const e=await getFieldTpl(r,t);let a="text";e?a="tpl":"html"===r.type&&(a="markdown");let i="";"textarea"===r.type&&(i="min-w-56"),!1===r.wrap&&(i+=" whitespace-nowrap"),r.hidden||r.extra||n.push(Object.assign({},{name:r.name,label:r.label,sortable:r.sortable,width:r.width,type:a,tpl:e,toggled:r.toggled,className:i,html:"html"===r.type||null},r.amis,{name:r.name}))}else{const e=`\n var data = event.data;\n var file_name = data.versions ? data.name : "${r.label}";\n var file_id = data._id;\n SteedosUI.previewFile && SteedosUI.previewFile({file_name, file_id});\n `;n.push({type:"button",label:`<%=data.versions ? data.name : "${r.label}"%>`,className:"whitespace-nowrap",level:"link",onEvent:{click:{actions:[{args:{api:{url:"${context.rootUrl}/api/files/files/${versions[0]}?download=true",method:"get",headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"}}},actionType:"download",expression:"!!!window?.nw?.require"},{args:{},actionType:"custom",script:e,expression:"!!window?.nw?.require"}]}}})}return n}function getMobileLines(e){let t=[],n=[],r=!1,a=!0,i="",o="flex items-center justify-between h-[20px]";return e.forEach((function(e){r&&t.length<2&&(t.push({type:"wrapper",body:n,size:"none",className:o}),n=[]),a?(i="steedos-listview-item-left truncate",e.field.is_wide&&(i="steedos-listview-item-wide truncate"),0===t.length&&(i+=" font-bold text-gray-800")):i="steedos-listview-item-right truncate ml-2 flex flex-shrink-0",n.push({type:"tpl",tpl:e.tpl,className:i}),e.field.is_wide?(a=!0,r=!0):(a=!a,r=a)})),n.length&&t.length<2&&t.push({type:"wrapper",body:n,size:"none",className:o}),t}async function getMobileTableColumns(e,t){const n=[];let r={},a=[];for(const n of e){let e="";n.is_name||n.name===t.labelFieldName?(r=n,t.onlyDisplayLabel=!0,e=await getFieldTpl(n,t)):"avatar"===n.type||"image"===n.type||"file"===n.type?e=`\${_display.${n.name}.name}`:("lookup"!==n.type&&"master_detail"!==n.type||(t.onlyDisplayLabel=!0),e=await getFieldTpl(n,t)),e||(e=`\${${n.name}}`),n.hidden||n.extra||a.push({field:n,tpl:e})}const i=getNameTplUrl(r,t),o=getMobileLines(a);return n.push({name:r.name,label:r.label,sortable:r.sortable,type:"button",level:"link",actionType:"link",link:i,innerClassName:"steedos-listview-item block text-gray-500",body:{type:"wrapper",body:o,size:"none",className:"p-1"}}),n}function getDefaultParams(e){return{perPage:e.top||e.perPage||config.listView.perPage}}function getButtonVisibleOn(e){let t=e.visible;if(e._visible&&(t=e._visible),___default.isBoolean(t)&&(t=t.toString()),t)return t.trim().startsWith("function")?`${t}(objectName, typeof _id === 'undefined' ? null: _id, typeof record === 'undefined' ? (typeof recordPermissions === 'undefined' ? {} : recordPermissions) : record.recordPermissions, data)`:t;if("amis_button"===e.type){const t=e.amis_schema;if(t&&t.body&&t.body.length>0){return t.body[0].visibleOn}}}async function getTableOperation(e){const t=e.buttons,n=[];if(___default.each(t,(e=>{___default.isBoolean(e.visible)&&(e.visible=e.visible.toString()),n.push({type:"steedos-object-button",name:e.name,objectName:e.objectName,visibleOn:getButtonVisibleOn(e),className:"antd-Button--default"})})),!(n.length<1))return{type:"operation",label:"操作",fixed:"right",labelClassName:"text-center",className:"text-center steedos-listview-operation w-20",buttons:[{type:"steedos-dropdown-button",label:"xxx",buttons:n,placement:"bottomRight",overlayClassName:"shadow !min-w-[160px]",trigger:["click"],id:"u:c2140a365019",onOpenApi:{url:"${context.rootUrl}/service/api/@${objectName}/recordPermissions/${_id}",method:"get",data:{$:"$$",objectName:"${objectName}",listViewId:"${listViewId}",appId:"${appId}",formFactor:"${formFactor}",context:"${context}"},headers:{Authorization:"Bearer ${context.tenantId},${context.authToken}"},adaptor:"\n payload = {\n record: {\n recordPermissions: payload\n }\n };\n return payload;\n "}}]}}async function getTableSchema$1(e,t){t||(t={});let n=[];return"SMALL"===t.formFactor?n=await getMobileTableColumns(e,t):(n=await getTableColumns(e,t),n.push(await getTableOperation(t))),{mode:"table",name:"thelist",headerToolbarClassName:"py-2 px-2 border-gray-300 bg-gray-100 border-solid border-b",className:"",draggable:!1,defaultParams:getDefaultParams(t),columns:n,syncLocation:!1,keepItemSelectionOnPageChange:!0,checkOnItemClick:!1,labelTpl:`\${${t.labelFieldName}}`,autoFillHeight:!1,columnsTogglable:!1}}"undefined"!=typeof window&&(window.getFieldSearchable=getFieldSearchable);let UI_SCHEMA_CACHE={},UISchemaFunction;"undefined"!=typeof window&&(window.UI_SCHEMA_CACHE||(window.UI_SCHEMA_CACHE=UI_SCHEMA_CACHE),UI_SCHEMA_CACHE=window.UI_SCHEMA_CACHE);const setUISchemaCache=(e,t)=>{UI_SCHEMA_CACHE[e]=t},getUISchemaCache=e=>___default.cloneDeep(UI_SCHEMA_CACHE[e]),hasUISchemaCache=e=>___default.has(UI_SCHEMA_CACHE,e);function getListViewColumns(e,t){let n=[];return n="SMALL"===t?___default.isEmpty(e.mobile_columns)?___default.slice(e.columns,0,4):e.mobile_columns:e.columns,n}function getListViewSort(e){let t="";return e&&e.sort&&e.sort.length&&___default.each(e.sort,(function(e,n){if(___default.isArray(e)){let r=e[0]+" "+(e[1]||"");r=n>0?","+r:r,t+=r}else{let r=e.field_name+" "+e.order;r=n>0?","+r:r,t+=r}})),t}function getListViewFilter(e){if(e)try{const t=getUserId();let n=e.filters;if("mine"===e.filter_scope)if(___default__default.default.isEmpty(n))n=[["owner","=",t]];else{if(___default__default.default.isString(n)&&___default__default.default.startsWith(___default__default.default.trim(n),"function")&&(n=new Function(`return ${n}`),n=n()),!___default__default.default.isArray(n))throw console.debug("listView filters is not array",e),new Error("filters is not array");n.push(["owner","=",t])}return n}catch(e){console.error(e)}}function formatUISchemaCache(objectName,uiSchema){setUISchemaCache(objectName,uiSchema),___default.each(uiSchema.fields,(field=>{try{"lookup"===field.type&&field._reference_to&&___default__default.default.isString(field._reference_to)&&(field.reference_to=eval(`(${field._reference_to})`)())}catch(e){field.reference_to=void 0,console.error(e)}})),___default.each(uiSchema.list_views,((e,t)=>{e.name=t,___default.has(e,"columns")||(e.columns=uiSchema.list_views.all.columns)}))}async function getUISchema(e,t){if(!e)return;if(hasUISchemaCache(e)&&!t)return getUISchemaCache(e);let n=null;try{if(UISchemaFunction);else{const t=`/service/api/@${e.replace(/\./g,"_")}/uiSchema`;n=await fetchAPI(t,{method:"get"})}if(!n)return;formatUISchemaCache(e,n)}catch(t){console.error("getUISchema",e,t),setUISchemaCache(e,null)}return getUISchemaCache(e)}function getUISchemaSync(e,t){if(!e)return;if(hasUISchemaCache(e)&&!t)return getUISchemaCache(e);let n=null;try{const t=`/service/api/@${e.replace(/\./g,"_")}/uiSchema`;if(n=Steedos.authRequest(t,{type:"GET",async:!1}),!n)return;formatUISchemaCache(e,n)}catch(t){console.error("getUISchema",e,t),setUISchemaCache(e,null)}return getUISchemaCache(e)}async function getListSchema(e,t,n,r={}){const a=await getUISchema(t),i=___default.find(a.list_views,((e,t)=>(n||(n=t),t===n||e._id===n)));if(!i)return{uiSchema:a};if(i.enable_amis_schema&&i.amis_schema){return{uiSchema:a,isCustomAmisSchema:!0,amisSchema:___default.isString(i.amis_schema)?JSON.parse(i.amis_schema):i.amis_schema}}let o=getListViewColumns(i,r.formFactor),s=getListViewSort(i),l=getListViewFilter(i),c=i&&i._filters;if("calendar"===i.type){return{uiSchema:a,isCalendar:!0,amisSchema:{type:"steedos-object-calendar",objectApiName:t,filters:l,filtersFunction:c,sort:s,...i.options}}}const d=r.defaults||{};d.headerSchema=null;try{const e=location.pathname+"/crud/"+r.listViewId;let t=sessionStorage.getItem(e);if(t){t=JSON.parse(t);let e={};t.orderBy&&(e.orderBy=t.orderBy),t.orderDir&&(e.orderDir=t.orderDir),d.listSchema=___default.defaultsDeep({},e,d.listSchema||{})}}catch(e){console.error("本地存储中crud参数解析异常:",e)}r.defaults=d;return{uiSchema:a,amisSchema:{type:"steedos-object-table",objectApiName:t,columns:o,extraColumns:i.extra_columns,filters:l,filtersFunction:c,sort:s,ctx:r,requestAdaptor:i.requestAdaptor,adaptor:i.adaptor,headerToolbarItems:r.headerToolbarItems,filterVisible:r.filterVisible}}}"undefined"!=typeof window&&(window.getUISchema=getUISchema,window.getUISchemaSync=getUISchemaSync,window.getListSchema=getListSchema);var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},__assign.apply(this,arguments)};function createObject(e,t,n){e&&Object.isFrozen(e)&&(e=cloneObject(e));var r=e?Object.create(e,__assign(__assign({},n),{__super:{value:e,writable:!1,enumerable:!1}})):Object.create(Object.prototype,n);return t&&isObject(t)&&Object.keys(t).forEach((function(e){return r[e]=t[e]})),r}function cloneObject(e,t){void 0===t&&(t=!0);var n=e&&e.__super?Object.create(e.__super,{__super:{value:e.__super,writable:!1,enumerable:!1}}):Object.create(Object.prototype);return t&&e&&Object.keys(e).forEach((function(t){return n[t]=e[t]})),n}function isObject(e){var t=typeof e;return e&&"string"!==t&&"number"!==t&&"boolean"!==t&&"function"!==t&&!Array.isArray(e)}var FullCalendar=function(e){var t=e.dispatchEvent,n=e.data,r=__rest(e,["dispatchEvent","data"]),a=function(e,r){return __awaiter(void 0,void 0,void 0,(function(){var a,i;return __generator(this,(function(o){switch(o.label){case 0:return t?[4,t(e,r?createObject(n,r):n)]:[2];case 1:return a=o.sent(),[2,null!==(i=null==a?void 0:a.prevented)&&void 0!==i&&i]}}))}))};return React__default.default.createElement(FullCalendar$1,__assign$1({plugins:[main$3,main$2,main$1,main],headerToolbar:{left:"title",center:"",right:"prev,next today dayGridMonth,timeGridWeek,timeGridDay,listWeek"},locales:_default,locale:"zh-cn",editable:!0,selectable:!0,selectMirror:!0,dayMaxEvents:!0,initialView:"timeGridWeek",events:function(e,t,n){setTimeout((function(){a("getEvents",{fetchInfo:e,successCallback:t,failureCallback:n})}),100)},select:function(e){a("select",e)},eventClick:function(e){a("eventClick",e)},eventsSet:function(e){a("eventsSet",e)},eventAdd:function(e){a("eventAdd",e)},eventChange:function(e){a("eventChange",e)},eventRemove:function(e){a("eventRemove",e)},eventDidMount:function(e){a("eventDidMount",e)},eventWillUnmount:function(e){a("eventWillUnmount",e)},noEventsDidMount:function(e){a("noEventsDidMount",e)},noEventsWillUnmount:function(e){a("noEventsWillUnmount",e)},forceEventDuration:!0,views:{listWeek:{buttonText:"列表"}}},r))};exports.FullCalendar=FullCalendar,Object.defineProperty(exports,"__esModule",{value:!0})}));
|