@semapps/date-components 0.4.0-alpha.0 → 0.4.0-alpha.11
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/index.cjs.js +1 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -27
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -3
- package/dist/index.cjs.css +0 -1045
- package/dist/index.es.css +0 -1045
package/dist/index.es.js
CHANGED
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
import e,{useCallback as t,Component as n,createElement as r,createRef as a,Fragment as o,createContext as i,useMemo as s}from"react";import{MuiPickersUtilsProvider as u,DatePicker as l,TimePicker as c,DateTimePicker as d,KeyboardDatePicker as f,KeyboardDateTimePicker as p,KeyboardTimePicker as h}from"@material-ui/pickers";import{useTranslate as g,useInput as v,FieldTitle as m,useListContext as y,linkToRecord as w}from"react-admin";import{render as b,createPortal as E,unmountComponentAtNode as C}from"react-dom";import{makeStyles as T,useTheme as D}from"@material-ui/core";import{useHistory as S}from"react-router-dom";function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(){return(R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function P(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function O(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function N(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t);return n.setDate(n.getDate()+r),n}function I(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getFullYear(),r=t.getMonth(),a=new Date(0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}function H(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t),a=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),a,1),o.setHours(0,0,0,0);var i=I(o);return n.setMonth(a,Math.min(i,n.getDate())),n}function U(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=P(t);return H(e,12*n)}function A(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e);return t.setHours(23,59,59,999),t}function F(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,o=null==a?0:P(a),i=null==n.weekStartsOn?o:P(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=O(e),u=s.getDay(),l=6+(u<i?-7:0)-(u-i);return s.setDate(s.getDate()+l),s.setHours(23,59,59,999),s}function W(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function _(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e);return!isNaN(t)}var q={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function z(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var L={date:z({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:z({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:z({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},B={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function V(e){return function(t,n){var r,a=n||{};if("formatting"===(a.context?String(a.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=a.width?String(a.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var s=e.defaultWidth,u=a.width?String(a.width):e.defaultWidth;r=e.values[u]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function Y(e){return function(t,n){var r=String(t),a=n||{},o=a.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=r.match(i);if(!s)return null;var u,l=s[0],c=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(c,(function(e){return e.test(r)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(c,(function(e){return e.test(r)})),u=e.valueCallback?e.valueCallback(u):u,{value:u=a.valueCallback?a.valueCallback(u):u,rest:r.slice(l.length)}}}var j,G={code:"en-US",formatDistance:function(e,t,n){var r;return n=n||{},r="string"==typeof q[e]?q[e]:1===t?q[e].one:q[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:L,formatRelative:function(e,t,n,r){return B[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:V({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:V({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:V({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:V({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:V({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(j={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),r=t||{},a=n.match(j.matchPattern);if(!a)return null;var o=a[0],i=n.match(j.parsePattern);if(!i)return null;var s=j.valueCallback?j.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Y({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Y({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Y({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Y({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Y({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Z(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e).getTime(),r=P(t);return new Date(n+r)}function X(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=P(t);return Z(e,-n)}function Q(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var K=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Q("yy"===t?r%100:r,t.length)},J=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Q(n+1,2)},$=function(e,t){return Q(e.getUTCDate(),t.length)},ee=function(e,t){return Q(e.getUTCHours()%12||12,t.length)},te=function(e,t){return Q(e.getUTCHours(),t.length)},ne=function(e,t){return Q(e.getUTCMinutes(),t.length)},re=function(e,t){return Q(e.getUTCSeconds(),t.length)},ae=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Q(Math.floor(r*Math.pow(10,n-3)),t.length)};function oe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=1,n=O(e),r=n.getUTCDay(),a=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n}function ie(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=oe(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var i=oe(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function se(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=ie(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=oe(n);return r}function ue(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=oe(t).getTime()-se(t).getTime();return Math.round(n/6048e5)+1}function le(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,o=null==a?0:P(a),i=null==n.weekStartsOn?o:P(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=O(e),u=s.getUTCDay(),l=(u<i?7:0)+u-i;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function ce(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=O(e,t),r=n.getUTCFullYear(),a=t||{},o=a.locale,i=o&&o.options&&o.options.firstWeekContainsDate,s=null==i?1:P(i),u=null==a.firstWeekContainsDate?s:P(a.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,u),l.setUTCHours(0,0,0,0);var c=le(l,t),d=new Date(0);d.setUTCFullYear(r,0,u),d.setUTCHours(0,0,0,0);var f=le(d,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function de(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},r=n.locale,a=r&&r.options&&r.options.firstWeekContainsDate,o=null==a?1:P(a),i=null==n.firstWeekContainsDate?o:P(n.firstWeekContainsDate),s=ce(e,t),u=new Date(0);u.setUTCFullYear(s,0,i),u.setUTCHours(0,0,0,0);var l=le(u,t);return l}function fe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=O(e),r=le(n,t).getTime()-de(n,t).getTime();return Math.round(r/6048e5)+1}var pe="midnight",he="noon",ge="morning",ve="afternoon",me="evening",ye="night",we={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return K(e,t)},Y:function(e,t,n,r){var a=ce(e,r),o=a>0?a:1-a;return"YY"===t?Q(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Q(o,t.length)},R:function(e,t){return Q(ie(e),t.length)},u:function(e,t){return Q(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Q(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Q(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return J(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Q(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var a=fe(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):Q(a,t.length)},I:function(e,t,n){var r=ue(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Q(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):$(e,t)},D:function(e,t,n){var r=function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),a=n-r;return Math.floor(a/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Q(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Q(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Q(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return Q(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,a=e.getUTCHours();switch(r=12===a?he:0===a?pe:a/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,a=e.getUTCHours();switch(r=a>=17?me:a>=12?ve:a>=4?ge:ye,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ee(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):te(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ne(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):re(e,t)},S:function(e,t){return ae(e,t)},X:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return Ee(a);case"XXXX":case"XX":return Ce(a);case"XXXXX":case"XXX":default:return Ce(a,":")}},x:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return Ee(a);case"xxxx":case"xx":return Ce(a);case"xxxxx":case"xxx":default:return Ce(a,":")}},O:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+be(a,":");case"OOOO":default:return"GMT"+Ce(a,":")}},z:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+be(a,":");case"zzzz":default:return"GMT"+Ce(a,":")}},t:function(e,t,n,r){var a=r._originalDate||e;return Q(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,n,r){return Q((r._originalDate||e).getTime(),t.length)}};function be(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),o=r%60;if(0===o)return n+String(a);var i=t||"";return n+String(a)+i+Q(o,2)}function Ee(e,t){return e%60==0?(e>0?"-":"+")+Q(Math.abs(e)/60,2):Ce(e,t)}function Ce(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e);return r+Q(Math.floor(a/60),2)+n+Q(a%60,2)}function Te(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function De(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Se={p:De,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),a=r[1],o=r[2];if(!o)return Te(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Te(a,t)).replace("{{time}}",De(o,t))}};function ke(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}var Re=["D","DD"],xe=["YY","YYYY"];function Me(e){return-1!==Re.indexOf(e)}function Pe(e){return-1!==xe.indexOf(e)}function Oe(e){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===e)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===e)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===e)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var Ne=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,He=/^'([^]*?)'?$/,Ue=/''/g,Ae=/[a-zA-Z]/;function Fe(e){return e.match(He)[1].replace(Ue,"'")}function We(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=O(t);return n.getTime()>r.getTime()}function _e(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=O(t);return n.getTime()<r.getTime()}function qe(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e);return t.setHours(0,0,0,0),t}function ze(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e);return t.setMinutes(0,0,0),t}function Le(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Be(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=n||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=null==o?0:P(o),s=null==r.weekStartsOn?i:P(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=O(e),l=P(t),c=u.getUTCDay(),d=l%7,f=(d+7)%7,p=(f<s?7:0)+l-c;return u.setUTCDate(u.getUTCDate()+p),u}var Ve=/^(1[0-2]|0?\d)/,Ye=/^(3[0-1]|[0-2]?\d)/,je=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ge=/^(5[0-3]|[0-4]?\d)/,Ze=/^(2[0-3]|[0-1]?\d)/,Xe=/^(2[0-4]|[0-1]?\d)/,Qe=/^(1[0-1]|0?\d)/,Ke=/^(1[0-2]|0?\d)/,Je=/^[0-5]?\d/,$e=/^[0-5]?\d/,et=/^\d/,tt=/^\d{1,2}/,nt=/^\d{1,3}/,rt=/^\d{1,4}/,at=/^-?\d+/,ot=/^-?\d/,it=/^-?\d{1,2}/,st=/^-?\d{1,3}/,ut=/^-?\d{1,4}/,lt=/^([+-])(\d{2})(\d{2})?|Z/,ct=/^([+-])(\d{2})(\d{2})|Z/,dt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ft=/^([+-])(\d{2}):(\d{2})|Z/,pt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ht(e,t,n){var r=t.match(e);if(!r)return null;var a=parseInt(r[0],10);return{value:n?n(a):a,rest:t.slice(r[0].length)}}function gt(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function vt(e,t){return ht(at,e,t)}function mt(e,t,n){switch(e){case 1:return ht(et,t,n);case 2:return ht(tt,t,n);case 3:return ht(nt,t,n);case 4:return ht(rt,t,n);default:return ht(new RegExp("^\\d{1,"+e+"}"),t,n)}}function yt(e,t,n){switch(e){case 1:return ht(ot,t,n);case 2:return ht(it,t,n);case 3:return ht(st,t,n);case 4:return ht(ut,t,n);default:return ht(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function wt(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function bt(e,t){var n,r=t>0,a=r?t:1-t;if(a<=50)n=e||100;else{var o=a+50;n=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return r?n:1-n}var Et=[31,28,31,30,31,30,31,31,30,31,30,31],Ct=[31,29,31,30,31,30,31,31,30,31,30,31];function Tt(e){return e%400==0||e%4==0&&e%100!=0}var Dt={G:{priority:140,parse:function(e,t,n,r){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,r){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,r){var a=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return mt(4,e,a);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:a});default:return mt(t.length,e,a)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var a=e.getUTCFullYear();if(n.isTwoDigitYear){var o=bt(n.year,a);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,r){var a=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return mt(4,e,a);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:a});default:return mt(t.length,e,a)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var a=ce(e,r);if(n.isTwoDigitYear){var o=bt(n.year,a);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),le(e,r)}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),le(e,r)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,r){return yt("R"===t?4:t.length,e)},set:function(e,t,n,r){var a=new Date(0);return a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0),oe(a)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,r){return yt("u"===t?4:t.length,e)},set:function(e,t,n,r){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,r){switch(t){case"Q":case"QQ":return mt(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,r){switch(t){case"q":case"qq":return mt(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,r){var a=function(e){return e-1};switch(t){case"M":return ht(Ve,e,a);case"MM":return mt(2,e,a);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:a});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,r){var a=function(e){return e-1};switch(t){case"L":return ht(Ve,e,a);case"LL":return mt(2,e,a);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:a});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,r){switch(t){case"w":return ht(Ge,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return le(function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=O(e),a=P(t),o=fe(r,n)-a;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,n,r),r)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,r){switch(t){case"I":return ht(Ge,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return oe(function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t),a=ue(n)-r;return n.setUTCDate(n.getUTCDate()-7*a),n}(e,n,r),r)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,parse:function(e,t,n,r){switch(t){case"d":return ht(Ye,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return mt(t.length,e)}},validate:function(e,t,n){var r=Tt(e.getUTCFullYear()),a=e.getUTCMonth();return r?t>=1&&t<=Ct[a]:t>=1&&t<=Et[a]},set:function(e,t,n,r){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,parse:function(e,t,n,r){switch(t){case"D":case"DD":return ht(je,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return mt(t.length,e)}},validate:function(e,t,n){return Tt(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,r){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,r){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=Be(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,r){var a=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return mt(t.length,e,a);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:a});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=Be(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,r){var a=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return mt(t.length,e,a);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:a});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=Be(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,r){var a=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return mt(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||n.day(e,{width:"short",context:"formatting",valueCallback:a})||n.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:a})||n.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiii":default:return n.day(e,{width:"wide",context:"formatting",valueCallback:a})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||n.day(e,{width:"short",context:"formatting",valueCallback:a})||n.day(e,{width:"narrow",context:"formatting",valueCallback:a})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,r){return(e=function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=P(t);n%7==0&&(n-=7);var r=1,a=O(e),o=a.getUTCDay(),i=n%7,s=(i+7)%7,u=(s<r?7:0)+n-o;return a.setUTCDate(a.getUTCDate()+u),a}(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,r){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(wt(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,r){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(wt(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,r){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(wt(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,r){switch(t){case"h":return ht(Ke,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,r){var a=e.getUTCHours()>=12;return a&&n<12?e.setUTCHours(n+12,0,0,0):a||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,r){switch(t){case"H":return ht(Ze,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,r){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,r){switch(t){case"K":return ht(Qe,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,r){switch(t){case"k":return ht(Xe,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,r){var a=n<=24?n%24:n;return e.setUTCHours(a,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,r){switch(t){case"m":return ht(Je,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,r){switch(t){case"s":return ht($e,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return mt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,r){return mt(t.length,e,(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))},set:function(e,t,n,r){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,r){switch(t){case"X":return gt(lt,e);case"XX":return gt(ct,e);case"XXXX":return gt(dt,e);case"XXXXX":return gt(pt,e);case"XXX":default:return gt(ft,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,r){switch(t){case"x":return gt(lt,e);case"xx":return gt(ct,e);case"xxxx":return gt(dt,e);case"xxxxx":return gt(pt,e);case"xxx":default:return gt(ft,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,r){return vt(e)},set:function(e,t,n,r){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,r){return vt(e)},set:function(e,t,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},St=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rt=/^'([^]*?)'?$/,xt=/''/g,Mt=/\S/,Pt=/[a-zA-Z]/;function Ot(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}function Nt(e){return e.match(Rt)[1].replace(xt,"'")}function It(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ht(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Ut(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=t||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,o=null==a?0:P(a),i=null==n.weekStartsOn?o:P(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=O(e),u=s.getDay(),l=(u<i?7:0)+u-i;return s.setDate(s.getDate()-l),s.setHours(0,0,0,0),s}function At(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var Ft=function(){function e(e){var t=(void 0===e?{}:e).locale;this.yearFormat="yyyy",this.yearMonthFormat="MMMM yyyy",this.dateTime12hFormat="MMMM do hh:mm aaaa",this.dateTime24hFormat="MMMM do HH:mm",this.time12hFormat="hh:mm a",this.time24hFormat="HH:mm",this.dateFormat="MMMM do",this.locale=t}return e.prototype.addDays=function(e,t){return N(e,t)},e.prototype.isValid=function(e){return _(this.date(e))},e.prototype.getDiff=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=O(t);return n.getTime()-r.getTime()}(e,this.date(t))},e.prototype.isAfter=function(e,t){return We(e,t)},e.prototype.isBefore=function(e,t){return _e(e,t)},e.prototype.startOfDay=function(e){return qe(e)},e.prototype.endOfDay=function(e){return A(e)},e.prototype.getHours=function(e){return function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getHours();return n}(e)},e.prototype.setHours=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t);return n.setHours(r),n}(e,t)},e.prototype.setMinutes=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t);return n.setMinutes(r),n}(e,t)},e.prototype.getSeconds=function(e){return function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getSeconds();return n}(e)},e.prototype.setSeconds=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t);return n.setSeconds(r),n}(e,t)},e.prototype.isSameDay=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}(e,t)},e.prototype.isSameMonth=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=O(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t)},e.prototype.isSameYear=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=O(t);return n.getFullYear()===r.getFullYear()}(e,t)},e.prototype.isSameHour=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ze(e),r=ze(t);return n.getTime()===r.getTime()}(e,t)},e.prototype.startOfMonth=function(e){return It(e)},e.prototype.endOfMonth=function(e){return Ht(e)},e.prototype.getYear=function(e){return function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=O(e),n=t.getFullYear();return n}(e)},e.prototype.setYear=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t);return isNaN(n)?new Date(NaN):(n.setFullYear(r),n)}(e,t)},e.prototype.date=function(e){return void 0===e?new Date:null===e?null:new Date(e)},e.prototype.parse=function(e,t){return""===e?null:function(e,t,n,r){if(arguments.length<3)throw new TypeError("3 arguments required, but only "+arguments.length+" present");var a=String(e),o=String(t),i=r||{},s=i.locale||G;if(!s.match)throw new RangeError("locale must contain match property");var u=s.options&&s.options.firstWeekContainsDate,l=null==u?1:P(u),c=null==i.firstWeekContainsDate?l:P(i.firstWeekContainsDate);if(!(c>=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=s.options&&s.options.weekStartsOn,f=null==d?0:P(d),p=null==i.weekStartsOn?f:P(i.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===o)return""===a?O(n):new Date(NaN);var h,g={firstWeekContainsDate:c,weekStartsOn:p,locale:s},v=[{priority:10,set:Ot,index:0}],m=o.match(kt).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Se[t])(e,s.formatLong,g):e})).join("").match(St),y=[];for(h=0;h<m.length;h++){var w=m[h];!i.useAdditionalWeekYearTokens&&Pe(w)&&Oe(w),!i.useAdditionalDayOfYearTokens&&Me(w)&&Oe(w);var b=w[0],E=Dt[b];if(E){var C=E.incompatibleTokens;if(Array.isArray(C)){for(var T=void 0,D=0;D<y.length;D++){var S=y[D].token;if(-1!==C.indexOf(S)||S===b){T=y[D];break}}if(T)throw new RangeError("The format string mustn't contain `".concat(T.fullToken,"` and `").concat(w,"` at the same time"))}else if("*"===E.incompatibleTokens&&y.length)throw new RangeError("The format string mustn't contain `".concat(w,"` and any other token at the same time"));y.push({token:b,fullToken:w});var k=E.parse(a,w,s.match,g);if(!k)return new Date(NaN);v.push({priority:E.priority,set:E.set,validate:E.validate,value:k.value,index:v.length}),a=k.rest}else{if(b.match(Pt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");if("''"===w?w="'":"'"===b&&(w=Nt(w)),0!==a.indexOf(w))return new Date(NaN);a=a.slice(w.length)}}if(a.length>0&&Mt.test(a))return new Date(NaN);var R=v.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return v.filter((function(t){return t.priority===e})).reverse()})).map((function(e){return e[0]})),x=O(n);if(isNaN(x))return new Date(NaN);var M=X(x,ke(x)),N={};for(h=0;h<R.length;h++){var I=R[h];if(I.validate&&!I.validate(M,I.value,g))return new Date(NaN);var H=I.set(M,N,I.value,g);H[0]?(M=H[0],Le(N,H[1])):M=H}return M}(e,t,new Date,{locale:this.locale})},e.prototype.format=function(e,t){return function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(t),a=n||{},o=a.locale||G,i=o.options&&o.options.firstWeekContainsDate,s=null==i?1:P(i),u=null==a.firstWeekContainsDate?s:P(a.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:P(l),d=null==a.weekStartsOn?c:P(a.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=O(e);if(!_(f))throw new RangeError("Invalid time value");var p=ke(f),h=X(f,p),g={firstWeekContainsDate:u,weekStartsOn:d,locale:o,_originalDate:f},v=r.match(Ie).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Se[t])(e,o.formatLong,g):e})).join("").match(Ne).map((function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return Fe(e);var n=we[t];if(n)return!a.useAdditionalWeekYearTokens&&Pe(e)&&Oe(e),!a.useAdditionalDayOfYearTokens&&Me(e)&&Oe(e),n(h,e,o.localize,g);if(t.match(Ae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return e})).join("");return v}(e,t,{locale:this.locale})},e.prototype.isEqual=function(e,t){return null===e&&null===t||function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=O(t);return n.getTime()===r.getTime()}(e,t)},e.prototype.isNull=function(e){return null===e},e.prototype.isAfterDay=function(e,t){return We(e,A(t))},e.prototype.isBeforeDay=function(e,t){return _e(e,qe(t))},e.prototype.isBeforeYear=function(e,t){return _e(e,At(t))},e.prototype.isAfterYear=function(e,t){return We(e,W(t))},e.prototype.formatNumber=function(e){return e},e.prototype.getMinutes=function(e){return e.getMinutes()},e.prototype.getMonth=function(e){return e.getMonth()},e.prototype.setMonth=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=O(e),r=P(t),a=n.getFullYear(),o=n.getDate(),i=new Date(0);i.setFullYear(a,r,15),i.setHours(0,0,0,0);var s=I(i);return n.setMonth(r,Math.min(o,s)),n}(e,t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.getNextMonth=function(e){return H(e,1)},e.prototype.getPreviousMonth=function(e){return H(e,-1)},e.prototype.getMonthArray=function(e){for(var t=[At(e)];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){var e=this,t=new Date;return function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=O(n.start),a=O(n.end),o=a.getTime();if(!(r.getTime()<=o))throw new RangeError("Invalid interval");var i=[],s=r;s.setHours(0,0,0,0);var u=t&&"step"in t?Number(t.step):1;if(u<1||isNaN(u))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=o;)i.push(O(s)),s.setDate(s.getDate()+u),s.setHours(0,0,0,0);return i}({start:Ut(t,{locale:this.locale}),end:F(t,{locale:this.locale})}).map((function(t){return e.format(t,"EEEEEE")}))},e.prototype.getWeekArray=function(e){for(var t=Ut(It(e),{locale:this.locale}),n=F(Ht(e),{locale:this.locale}),r=0,a=t,o=[];_e(a,n);){var i=Math.floor(r/7);o[i]=o[i]||[],o[i].push(a),a=N(a,1),r+=1}return o},e.prototype.getYearRange=function(e,t){for(var n=At(e),r=W(t),a=[],o=n;_e(o,r);)a.push(o),o=U(o,1);return a},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"yyyy")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"EEE, MMM d")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM d")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"d")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}(),Wt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return function(t){return("0".repeat(e)+t).slice(-e)}},_t=Wt(4),qt=Wt(2),zt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,Lt=function(e){if(!(e instanceof Date)||isNaN(e.getDate()))return"";var t=_t(e.getFullYear()),n=qt(e.getMonth()+1),r=qt(e.getDate()),a=qt(e.getHours()),o=qt(e.getMinutes());return"".concat(t,"-").concat(n,"-").concat(r,"T").concat(a,":").concat(o)},Bt=function(e){return null==e||""===e?"":e instanceof Date?Lt(e):zt.test(e)?e:Lt(new Date(e))},Vt=function(e){return e?new Date(e):""},Yt=function(n){var r=n.PickerComponent,a=n.format,o=void 0===a?Bt:a,i=n.label,s=n.options,l=n.source,c=n.resource,d=(n.helperText,n.margin),f=void 0===d?"dense":d,p=n.onBlur,h=n.onChange,y=n.onFocus,w=n.parse,b=void 0===w?Vt:w,E=n.validate,C=n.variant,T=void 0===C?"filled":C,D=(n.defaultValue,n.providerOptions),S=D.utils,P=D.locale,O=n.pickerVariant,N=void 0===O?"dialog":O,I=n.stringFormat,H=void 0===I?"ISO":I,U=M(n,["PickerComponent","format","label","options","source","resource","helperText","margin","onBlur","onChange","onFocus","parse","validate","variant","defaultValue","providerOptions","pickerVariant","stringFormat"]),A=g(),F=v(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({format:o,onBlur:p,onChange:h,onFocus:y,parse:b,resource:c,source:l,validate:E},U)),W=F.id,_=F.input,q=F.isRequired,z=F.meta,L=z.error,B=z.touched,V=t((function(e){Date.parse(e)?_.onChange("ISO"===H?e.toISOString():e.toString()):_.onChange(null)}),[]);return e.createElement(u,{utils:S||Ft,locale:P},e.createElement(r,R({id:W,InputLabelProps:{shrink:!0},label:e.createElement(m,{label:i,source:l,resource:c,isRequired:q}),variant:N,inputVariant:T,margin:f,error:!(!B||!L),helperText:" ",clearLabel:A("ra.action.clear_input_value"),cancelLabel:A("ra.action.cancel")},s,function(e){e.allowEmpty,e.alwaysOn,e.basePath,e.component,e.defaultValue,e.format,e.formClassName,e.initialValue,e.initializeForm,e.input,e.isRequired,e.label,e.limitChoicesToValue,e.locale,e.meta,e.options,e.optionText,e.optionValue,e.parse,e.record,e.resource,e.source,e.textAlign,e.translate,e.translateChoice,e.labelTime;return M(e,["allowEmpty","alwaysOn","basePath","component","defaultValue","format","formClassName","initialValue","initializeForm","input","isRequired","label","limitChoicesToValue","locale","meta","options","optionText","optionValue","parse","record","resource","source","textAlign","translate","translateChoice","labelTime"])}(U),{value:_.value?new Date(_.value):null,onChange:function(e){return V(e)},onBlur:function(){return _.onBlur(_.value?"ISO"===H?new Date(_.value).toISOString():new Date(_.value).toString():null)}})))};Yt.defaultProps={isRequired:!1,meta:{touched:!1,error:!1},options:{},providerOptions:{utils:Ft,locale:void 0}};
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
var jt=function(e,t){return(jt=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])})(e,t)};function Gt(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}jt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Zt=function(){return(Zt=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}).apply(this,arguments)};function Xt(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e}if(("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:n,createElement:r,render:b,createRef:a,Fragment:o,createContext:i,createPortal:E,flushToDom:function(){},unmountComponentAtNode:C},"undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Qt=FullCalendarVDom.Component,Kt=FullCalendarVDom.createElement,Jt=(FullCalendarVDom.render,FullCalendarVDom.createRef),$t=FullCalendarVDom.Fragment,en=FullCalendarVDom.createContext,tn=FullCalendarVDom.createPortal,nn=(FullCalendarVDom.flushToDom,FullCalendarVDom.unmountComponentAtNode,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 rn(e){e.parentNode&&e.parentNode.removeChild(e)}function an(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(on(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function on(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var sn=/(top|left|right|bottom|width|height)$/i;function un(e,t,n){null==n?e.style[t]="":"number"==typeof n&&sn.test(t)?e.style[t]=n+"px":e.style[t]=n}function ln(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 cn(e,t){return function(n){var r=an(n.target,e);r&&t.call(r,n,r)}}function dn(e,t,n,r){var a=cn(n,r);return e.addEventListener(t,a),function(){e.removeEventListener(t,a)}}var fn=0;function pn(){return String(fn+=1)}function hn(e,t,n){return n.func?n.func(e,t):function(e,t){if(!e&&!t)return 0;if(null==t)return-1;if(null==e)return 1;if("string"==typeof e||"string"==typeof t)return String(e).localeCompare(String(t));return e-t}(e[n.field],t[n.field])*(n.order||1)}function gn(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function vn(e){return e%1==0}function mn(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 yn=["sun","mon","tue","wed","thu","fri","sat"];function wn(e,t){var n=Mn(e);return n[2]+=7*t,Pn(n)}function bn(e,t){var n=Mn(e);return n[2]+=t,Pn(n)}function En(e,t){var n=Mn(e);return n[6]+=t,Pn(n)}function Cn(e,t){return(t.valueOf()-e.valueOf())/864e5}function Tn(e,t){return Nn(e)===Nn(t)?Math.round(Cn(e,t)):null}function Dn(e){return Pn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Sn(e,t,n,r){var a=Pn([t,0,1+kn(t,n,r)]),o=Dn(e),i=Math.round(Cn(a,o));return Math.floor(i/7)+1}function kn(e,t,n){var r=7+t-n;return-((7+Pn([e,0,r]).getUTCDay()-t)%7)+r-1}function Rn(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function xn(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 Mn(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Pn(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function On(e){return!isNaN(e.valueOf())}function Nn(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function In(e,t,n,r){return{instanceId:pn(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Hn=Object.prototype.hasOwnProperty;function Un(e,t){var n={};if(t)for(var r in t){for(var a=[],o=e.length-1;o>=0;o-=1){var i=e[o][r];if("object"==typeof i&&i)a.unshift(i);else if(void 0!==i){n[r]=i;break}}a.length&&(n[r]=Un(a))}for(o=e.length-1;o>=0;o-=1){var s=e[o];for(var u in s)u in n||(n[u]=s[u])}return n}function An(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Fn(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Wn(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function _n(e){var t=[];for(var n in e)t.push(e[n]);return t}function qn(e,t){if(e===t)return!0;for(var n in e)if(Hn.call(e,n)&&!(n in t))return!1;for(var n in t)if(Hn.call(t,n)&&e[n]!==t[n])return!1;return!0}function zn(e,t){var n=[];for(var r in e)Hn.call(e,r)&&(r in t||n.push(r));for(var r in t)Hn.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ln(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!Bn(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function Bn(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Vn(e,t,n){var r=n.dateEnv,a=n.pluginHooks,o=n.options,i=e.defs,s=e.instances;for(var u in s=An(s,(function(e){return!i[e.defId].recurringDef})),i){var l=i[u];if(l.recurringDef){var c=l.recurringDef.duration;c||(c=l.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,f=Yn(l,c,t,r,a.recurringTypes);d<f.length;d++){var p=f[d],h=In(u,{start:p,end:r.add(p,c)});s[h.instanceId]=h}}}return{defs:i,instances:s}}function Yn(e,t,n,r,a){var o=a[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(Dn)),o}var jn=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Gn(e,t){var n;return"string"==typeof e?function(e){var t=jn.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}(e):"object"==typeof e&&e?Zn(e):"number"==typeof e?Zn(((n={})[t||"milliseconds"]=e,n)):null}function Zn(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 Xn(e){return Qn(e)/864e5}function Qn(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Kn(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 Jn(e){return e.toISOString().replace(/T.*$/,"")}function $n(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),o=Math.round(r%60);return t?n+gn(a,2)+":"+gn(o,2):"GMT"+n+a+(o?":"+gn(o,2):"")}function er(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 tr(e,t,n){var r,a;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(r){if(!er(r,o)){n&&n(a);var s=e.apply(this,o);t&&t(s,a)||(a=s)}}else a=e.apply(this,o);return r=o,a}}function nr(e,t,n){var r,a,o=this;return function(i){if(r){if(!qn(r,i)){n&&n(a);var s=e.call(o,i);t&&t(s,a)||(a=s)}}else a=e.call(o,i);return r=i,a}}var rr={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},ar={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},or=/\s*([ap])\.?m\.?/i,ir=/,/g,sr=/\s+/g,ur=/\u200e/g,lr=/UTC|GMT/,cr=function(){function e(e){var t={},n={},r=0;for(var a in e)a in rr?(n[a]=e[a],r=Math.max(rr[a],r)):(t[a]=e[a],a in ar&&(r=Math.max(ar[a],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=tr(dr)}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,o=this.extendedSettings,i=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(Nn(e)!==Nn(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!i)return this.format(e,n);var s=i;!(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 u=this.format(e,n),l=this.format(t,n);if(u===l)return u;var c=dr(function(e,t){var n={};for(var r in e)(!(r in ar)||ar[r]<=t)&&(n[r]=e[r]);return n}(a,s),o,n),d=c(e),f=c(t),p=function(e,t,n,r){var a=0;for(;a<e.length;){var o=e.indexOf(t,a);if(-1===o)break;var i=e.substr(0,o);a=o+t.length;for(var s=e.substr(a),u=0;u<n.length;){var l=n.indexOf(r,u);if(-1===l)break;var c=n.substr(0,l);u=l+r.length;var d=n.substr(u);if(i===c&&s===d)return{before:i,after:s}}}return null}(u,d,l,f),h=o.separator||r||n.defaultSeparator||"";return p?p.before+d+h+f+p.after:u+h+l},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 dr(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return $n(e.timeZoneOffset)}:0===r&&t.week?function(e){return function(e,t,n,r){var a=[];"narrow"===r?a.push(t):"short"===r&&a.push(t," ");a.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&a.reverse();return a.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=Zt({},e),t=Zt({},t),function(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}(e,t),e.timeZone="UTC";var r,a=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var o=Zt({},e);delete o.minute,r=new Intl.DateTimeFormat(n.locale.codes,o)}return function(o){var i=o.marker;return function(e,t,n,r,a){e=e.replace(ur,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(lr,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===a.timeZone||null==t.timeZoneOffset?"UTC":$n(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(ir,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(or,"").trim():"narrow"===r.meridiem?e=e.replace(or,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(or,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(or,(function(e){return e.toLocaleLowerCase()})));return e=(e=e.replace(sr," ")).trim()}((r&&!i.getUTCMinutes()?r:a).format(i),o,e,t,n)}}(e,t,n)}function fr(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 pr(e,t,n,r){var a=fr(e,n.calendarSystem);return{date:a,start:a,end:t?fr(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var hr=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,pr(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,pr(e,t,n,r))},e}(),gr=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(pr(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(pr(e,t,n,r))},e}();function vr(e){return"object"==typeof e&&e?new cr(e):"string"==typeof e?new hr(e):"function"==typeof e?new gr(e):null}var mr={navLinkDayClick:kr,navLinkWeekClick:kr,duration:Gn,bootstrapFontAwesome:kr,buttonIcons:kr,customButtons:kr,defaultAllDayEventDuration:Gn,defaultTimedEventDuration:Gn,nextDayThreshold:Gn,scrollTime:Gn,scrollTimeReset:Boolean,slotMinTime:Gn,slotMaxTime:Gn,dayPopoverFormat:vr,slotDuration:Gn,snapDuration:Gn,headerToolbar:kr,footerToolbar:kr,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:vr,dayHeaderClassNames:kr,dayHeaderContent:kr,dayHeaderDidMount:kr,dayHeaderWillUnmount:kr,dayCellClassNames:kr,dayCellContent:kr,dayCellDidMount:kr,dayCellWillUnmount:kr,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:kr,weekNumbers:Boolean,weekNumberClassNames:kr,weekNumberContent:kr,weekNumberDidMount:kr,weekNumberWillUnmount:kr,editable:Boolean,viewClassNames:kr,viewDidMount:kr,viewWillUnmount:kr,nowIndicator:Boolean,nowIndicatorClassNames:kr,nowIndicatorContent:kr,nowIndicatorDidMount:kr,nowIndicatorWillUnmount:kr,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:kr,locale:kr,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:kr,eventOrder:function(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},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:kr,contentHeight:kr,direction:String,weekNumberFormat:vr,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:kr,initialDate:kr,now:kr,eventDataTransform:kr,stickyHeaderDates:kr,stickyFooterScrollbar:kr,viewHeight:kr,defaultAllDay:Boolean,eventSourceFailure:kr,eventSourceSuccess:kr,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:kr,eventConstraint:kr,eventAllow:kr,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:kr,eventContent:kr,eventDidMount:kr,eventWillUnmount:kr,selectConstraint:kr,selectOverlap:kr,selectAllow:kr,droppable:Boolean,unselectCancel:String,slotLabelFormat:kr,slotLaneClassNames:kr,slotLaneContent:kr,slotLaneDidMount:kr,slotLaneWillUnmount:kr,slotLabelClassNames:kr,slotLabelContent:kr,slotLabelDidMount:kr,slotLabelWillUnmount:kr,dayMaxEvents:kr,dayMaxEventRows:kr,dayMinWidth:Number,slotLabelInterval:Gn,allDayText:String,allDayClassNames:kr,allDayContent:kr,allDayDidMount:kr,allDayWillUnmount:kr,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:vr,rerenderDelay:Number,moreLinkText:kr,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:kr,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Gn,hiddenDays:kr,monthMode:Boolean,fixedWeekCount:Boolean,validRange:kr,visibleRange:kr,titleFormat:kr,noEventsText:String,moreLinkClick:kr,moreLinkClassNames:kr,moreLinkContent:kr,moreLinkDidMount:kr,moreLinkWillUnmount:kr},yr={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},wr={datesSet:kr,eventsSet:kr,eventAdd:kr,eventChange:kr,eventRemove:kr,windowResize:kr,eventClick:kr,eventMouseEnter:kr,eventMouseLeave:kr,select:kr,unselect:kr,loading:kr,_unmount:kr,_beforeprint:kr,_afterprint:kr,_noEventDrop:kr,_noEventResize:kr,_resize:kr,_scrollRequest:kr},br={buttonText:kr,views:kr,plugins:kr,initialEvents:kr,events:kr,eventSources:kr},Er={headerToolbar:Cr,footerToolbar:Cr,buttonText:Cr,buttonIcons:Cr};function Cr(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?qn(e,t):e===t}var Tr={type:String,component:kr,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:kr,usesMinMaxTime:Boolean,classNames:kr,content:kr,didMount:kr,willUnmount:kr};function Dr(e){return Un(e,Er)}function Sr(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 kr(e){return e}function Rr(e,t,n,r){for(var a={defs:{},instances:{}},o=Lr(n),i=0,s=e;i<s.length;i++){var u=qr(s[i],t,n,r,o);u&&xr(u,a)}return a}function xr(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Mr(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],a=Or(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return a.defs[r.defId]=r,a.instances[n.instanceId]=n,a}return{defs:{},instances:{}}}function Pr(e,t){return{defs:Zt(Zt({},e.defs),t.defs),instances:Zt(Zt({},e.instances),t.instances)}}function Or(e,t){var n=An(e.defs,t),r=An(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Nr(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ir={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:kr,overlap:kr,allow:kr,className:Nr,classNames:Nr,color:String,backgroundColor:String,borderColor:String,textColor:String},Hr={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Ur(e,t){var n=function(e,t){return Array.isArray(e)?Rr(e,null,t,!0):"object"==typeof e&&e?Rr([e],null,t,!0):null!=e?String(e):null}(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 Ar(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 Fr={id:String,groupId:String,title:String,url:String},Wr={start:kr,end:kr,date:kr,allDay:Boolean},_r=Zt(Zt(Zt({},Fr),Wr),{extendedProps:kr});function qr(e,t,n,r,a){void 0===a&&(a=Lr(n));var o=zr(e,n,a),i=o.refined,s=o.extra,u=function(e,t){var n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),l=function(e,t,n,r){for(var a=0;a<r.length;a+=1){var o=r[a].parse(e,n);if(o){var i=e.allDay;return null==i&&null==(i=t)&&null==(i=o.allDayGuess)&&(i=!1),{allDay:i,duration:o.duration,typeData:o.typeData,typeId:a}}}return null}(i,u,n.dateEnv,n.pluginHooks.recurringTypes);if(l)return(c=Br(i,s,t?t.sourceId:"",l.allDay,Boolean(l.duration),n)).recurringDef={typeId:l.typeId,typeData:l.typeData,duration:l.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var a,o,i=e.allDay,s=null,u=!1,l=null,c=null!=e.start?e.start:e.date;if(a=n.dateEnv.createMarkerMeta(c))s=a.marker;else if(!r)return null;null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end));null==i&&(i=null!=t?t:(!a||a.isTimeUnspecified)&&(!o||o.isTimeUnspecified));i&&s&&(s=Dn(s));o&&(l=o.marker,i&&(l=Dn(l)),s&&l<=s&&(l=null));l?u=!0:r||(u=n.options.forceEventDuration||!1,l=n.dateEnv.add(s,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:i,hasEnd:u,range:{start:s,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(i,u,n,r);return d?{def:c=Br(i,s,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:In(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function zr(e,t,n){return void 0===n&&(n=Lr(t)),Sr(e,n)}function Lr(e){return Zt(Zt(Zt({},Ir),_r),e.pluginHooks.eventRefiners)}function Br(e,t,n,r,a,o){for(var i={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:pn(),sourceId:n,allDay:r,hasEnd:a,ui:Ur(e,o),extendedProps:Zt(Zt({},e.extendedProps||{}),t)},s=0,u=o.pluginHooks.eventDefMemberAdders;s<u.length;s++){var l=u[s];Zt(i,l(e))}return Object.freeze(i.ui.classNames),Object.freeze(i.extendedProps),i}function Vr(e){var t=Math.floor(Cn(e.start,e.end))||1,n=Dn(e.start);return{start:n,end:bn(n,t)}}function Yr(e,t){void 0===t&&(t=Gn(0));var n=null,r=null;if(e.end){r=Dn(e.end);var a=e.end.valueOf()-r.valueOf();a&&a>=Qn(t)&&(r=bn(r,1))}return e.start&&(n=Dn(e.start),r&&r<=n&&(r=bn(n,1))),{start:n,end:r}}function jr(e,t,n,r){return"year"===r?Gn(n.diffWholeYears(e,t),"year"):"month"===r?Gn(n.diffWholeMonths(e,t),"month"):(o=t,i=Dn(a=e),s=Dn(o),{years:0,months:0,days:Math.round(Cn(i,s)),milliseconds:o.valueOf()-s.valueOf()-(a.valueOf()-i.valueOf())});var a,o,i,s}function Gr(e,t){var n,r,a=[],o=t.start;for(e.sort(Zr),n=0;n<e.length;n+=1)(r=e[n]).start>o&&a.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&a.push({start:o,end:t.end}),a}function Zr(e,t){return e.start.valueOf()-t.start.valueOf()}function Xr(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 Qr(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Kr(e,t,n,r){var a={},o={},i={},s=[],u=[],l=ea(e.defs,t);for(var c in e.defs){"inverse-background"===(p=l[(b=e.defs[c]).defId]).display&&(b.groupId?(a[b.groupId]=[],i[b.groupId]||(i[b.groupId]=b)):o[c]=[])}for(var d in e.instances){var f=e.instances[d],p=l[(b=e.defs[f.defId]).defId],h=f.range,g=!b.allDay&&r?Yr(h,r):h,v=Xr(g,n);v&&("inverse-background"===p.display?b.groupId?a[b.groupId].push(v):o[f.defId].push(v):"none"!==p.display&&("background"===p.display?s:u).push({def:b,ui:p,instance:f,range:v,isStart:g.start&&g.start.valueOf()===v.start.valueOf(),isEnd:g.end&&g.end.valueOf()===v.end.valueOf()}))}for(var m in a)for(var y=0,w=Gr(a[m],n);y<w.length;y++){var b,E=w[y];p=l[(b=i[m]).defId];s.push({def:b,ui:p,instance:null,range:E,isStart:!1,isEnd:!1})}for(var c in o)for(var C=0,T=Gr(o[c],n);C<T.length;C++){E=T[C];s.push({def:e.defs[c],ui:l[c],instance:null,range:E,isStart:!1,isEnd:!1})}return{bg:s,fg:u}}function Jr(e,t){e.fcSeg=t}function $r(e){return e.fcSeg||e.parentNode.fcSeg||null}function ea(e,t){return Fn(e,(function(e){return ta(e,t)}))}function ta(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),function(e){return e.reduce(Ar,Hr)}(n)}function na(e,t){var n=e.map(ra);return n.sort((function(e,n){return function(e,t,n){var r,a;for(r=0;r<n.length;r+=1)if(a=hn(e,t,n[r]))return a;return 0}(e,n,t)})),n.map((function(e){return e._seg}))}function ra(e){var t=e.eventRange,n=t.def,r=t.instance?t.instance.range:t.range,a=r.start?r.start.valueOf():0,o=r.end?r.end.valueOf():0;return Zt(Zt(Zt({},n.extendedProps),n),{id:n.publicId,start:a,end:o,duration:o-a,allDay:Number(n.allDay),_seg:e})}function aa(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,a=r.def,o=r.ui,i=o.startEditable,s=0,u=n;s<u.length;s++){i=(0,u[s])(i,a,o,t)}return i}function oa(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function ia(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function sa(e,t,n,r,a,o,i){var s=n.dateEnv,u=n.options,l=u.displayEventTime,c=u.displayEventEnd,d=e.eventRange.def,f=e.eventRange.instance;null==l&&(l=!1!==r),null==c&&(c=!1!==a);var p=f.range.start,h=f.range.end,g=o||e.start||e.eventRange.range.start,v=i||e.end||e.eventRange.range.end,m=Dn(p).valueOf()===Dn(g).valueOf(),y=Dn(En(h,-1)).valueOf()===Dn(En(v,-1)).valueOf();return l&&!d.allDay&&(m||y)?(g=m?p:g,v=y?h:v,c&&d.hasEnd?s.formatRange(g,v,t,{forcedStartTzo:o?null:f.forcedStartTzo,forcedEndTzo:i?null:f.forcedEndTzo}):s.format(g,t,{forcedTzo:o?null:f.forcedStartTzo})):""}function ua(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Qr(t,r.start)}}var la={start:kr,end:kr,allDay:Boolean};function ca(e,t,n){var r=function(e,t){var n=Sr(e,la),r=n.refined,a=n.extra,o=r.start?t.createMarkerMeta(r.start):null,i=r.end?t.createMarkerMeta(r.end):null,s=r.allDay;null==s&&(s=o&&o.isTimeUnspecified&&(!i||i.isTimeUnspecified));return Zt({range:{start:o?o.marker:null,end:i?i.marker:null},allDay:s},a)}(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 da(e,t,n){return Zt(Zt({},fa(e,t,n)),{timeZone:t.timeZone})}function fa(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 pa(e,t,n){var r=zr({editable:!1},n),a=Br(r.refined,r.extra,"",e.allDay,!0,n);return{def:a,ui:ta(a,t),instance:In(a.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function ha(e,t,n){n.emitter.trigger("select",Zt(Zt({},function(e,t){for(var n={},r=0,a=t.pluginHooks.dateSpanTransforms;r<a.length;r++){var o=a[r];Zt(n,o(e,t))}return Zt(n,function(e,t){return Zt(Zt({},fa(e.range,t,e.allDay)),{allDay:e.allDay})}(e,t.dateEnv)),n}(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function ga(e,t,n){var r=n.dateEnv,a=n.options,o=t;return e?(o=Dn(o),o=r.add(o,a.defaultAllDayEventDuration)):o=r.add(o,a.defaultTimedEventDuration),o}function va(e,t,n,r){var a=n.standardProps||{};null==a.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(a.hasEnd=!0);var o=Zt(Zt(Zt({},e),a),{ui:Zt(Zt({},e.ui),a.ui)});n.extendedProps&&(o.extendedProps=Zt(Zt({},o.extendedProps),n.extendedProps));for(var i=0,s=r.pluginHooks.eventDefMutationAppliers;i<s.length;i++){(0,s[i])(o,n,r)}return!o.hasEnd&&r.options.forceEventDuration&&(o.hasEnd=!0),o}function ma(e,t,n,r,a){var o=a.dateEnv,i=r.standardProps&&!0===r.standardProps.allDay,s=r.standardProps&&!1===r.standardProps.hasEnd,u=Zt({},e);return i&&(u.range=Vr(u.range)),r.datesDelta&&n.startEditable&&(u.range={start:o.add(u.range.start,r.datesDelta),end:o.add(u.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(u.range={start:o.add(u.range.start,r.startDelta),end:u.range.end}),r.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:o.add(u.range.end,r.endDelta)}),s&&(u.range={start:u.range.start,end:ga(t.allDay,u.range.start,a)}),t.allDay&&(u.range={start:Dn(u.range.start),end:Dn(u.range.end)}),u.range.end<u.range.start&&(u.range.end=ga(t.allDay,u.range.start,a)),u}var ya=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}(),wa={id:String,defaultAllDay:Boolean,url:String,format:String,events:kr,eventDataTransform:kr,success:kr,failure:kr};function ba(e,t,n){var r;if(void 0===n&&(n=Ea(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=Sr(r,n),o=a.refined,i=a.extra,s=function(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}(o,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:pn(),sourceDefId:s.sourceDefId,meta:s.meta,ui:Ur(o,t),extendedProps:i}}return null}function Ea(e){return Zt(Zt(Zt({},Ir),wa),e.pluginHooks.eventSourceRefiners)}function Ca(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Ta=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,Xt([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,o=r.toolbarConfig,i=[].concat(o.viewsWithButtons);for(var s in a)i.push(s);for(t=0;t<i.length;t+=1)if((n=a[i[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:Ca(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=Gn(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),vr(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),vr(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=ca(n,r.dateEnv,Gn({days:1}));a&&(this.dispatch({type:"SELECT_DATES",selection:a}),ha(a,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Da){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:xr({def:n,instance:r})}),this.triggerEventAdd(e)),e}var a,o=this.getCurrentData();if(t instanceof nn)a=t.internalEventSource;else if("boolean"==typeof t)t&&(a=_n(o.eventSources)[0]);else if(null!=t){var i=this.getEventSourceById(t);if(!i)return console.warn('Could not find an event source with ID "'+t+'"'),null;a=i.internalEventSource}var s=qr(e,a,o,!1);if(s){var u=new Da(o,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:xr(s)}),this.triggerEventAdd(u),u}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:Sa(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,a=n.instances;for(var o in e=String(e),r){var i=r[o];if(i.publicId===e){if(i.recurringDef)return new Da(t,i,null);for(var s in a){var u=a[s];if(u.defId===i.defId)return new Da(t,i,u)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return ka(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 nn(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 nn(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof nn)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=ba(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new nn(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=Gn(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Da=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 Wr)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=Fr[e](t),this.mutate({standardProps:{publicId:t}});else if(e in Fr)t=Fr[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ir){var a=Ir[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=jr(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=jr(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,o,i=this._context.dateEnv,s={allDay:n.allDay},u=i.createMarker(e);if(u&&((null==t||(r=i.createMarker(t)))&&this._instance)){var l=this._instance.range;!0===n.allDay&&(l=Vr(l));var c=jr(l.start,u,i,n.granularity);if(r){var d=jr(l.end,r,i,n.granularity);o=d,(a=c).years===o.years&&a.months===o.months&&a.days===o.days&&a.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:s}):this.mutate({startDelta:c,endDelta:d,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:c,standardProps:s})}},e.prototype.moveStart=function(e){var t=Gn(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Gn(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Gn(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=vr(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,o=a.getCurrentData().eventStore,i=Mr(o,n.instanceId);i=function(e,t,n,r){var a=ea(e.defs,t),o={defs:{},instances:{}};for(var i in e.defs){var s=e.defs[i];o.defs[i]=va(s,a[i],n,r)}for(var u in e.instances){var l=e.instances[u];s=o.defs[l.defId];o.instances[u]=ma(l,s,a[l.defId],n,r)}return o}(i,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,a);var s=new e(a,r,n);this._def=i.defs[r.defId],this._instance=i.instances[n.instanceId],a.dispatch({type:"MERGE_EVENTS",eventStore:i}),a.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:ka(i,a,n),revert:function(){a.dispatch({type:"RESET_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Sa(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 nn(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,o={};return t.title&&(o.title=t.title),r&&(o.start=r),a&&(o.end=a),t.publicId&&(o.id=t.publicId),t.groupId&&(o.groupId=t.groupId),t.url&&(o.url=t.url),n.display&&"auto"!==n.display&&(o.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?o.color=n.backgroundColor:(n.backgroundColor&&(o.backgroundColor=n.backgroundColor),n.borderColor&&(o.borderColor=n.borderColor)),n.textColor&&(o.textColor=n.textColor),n.classNames.length&&(o.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Zt(o,t.extendedProps):o.extendedProps=t.extendedProps),o},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Sa(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 ka(e,t,n){var r=e.defs,a=e.instances,o=[],i=n?n.instanceId:"";for(var s in a){var u=a[s],l=r[u.defId];u.instanceId!==i&&o.push(new Da(t,l,u))}return o}var Ra={};var xa,Ma=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 Pn(e)},e.prototype.markerToArray=function(e){return Mn(e)},e}();xa=Ma,Ra["gregory"]=xa;var Pa=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;var Oa=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=function(e){return new Ra[e]}(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.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()):Pn(Rn(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=Pn(e)),null!==t&&On(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=function(e){var t=Pa.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(On(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}(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 Nn(e)===Nn(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 Nn(e)===Nn(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=function(e,t){var n=Tn(e,t);return null!==n&&n%7==0?n/7:null}(e,t))?{unit:"week",value:n}:null!==(n=Tn(e,t))?{unit:"day",value:n}:vn(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:vn(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:vn(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(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/(Xn(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xn(e)/30}(n):n.days&&null!==(r=Tn(e,t))?r/Xn(n):(t.valueOf()-e.valueOf())/Qn(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?Dn(e):"hour"===t?function(e){return Pn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Pn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Pn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(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)):function(e,t,n){var r=e.getUTCFullYear(),a=Sn(e,r,t,n);if(a<1)return Sn(e,r-1,t,n);var o=Sn(e,r+1,t,n);return o>=1?Math.min(a,o):a}(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=En(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)),function(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",$n(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Pn(Rn(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Pn(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-xn(Mn(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Mn(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?xn(Mn(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Mn(e))*60):new Date(e.valueOf()-(t||0))},e}(),Na=[],Ia={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",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Ha(e){for(var t=e.length>0?e[0].code:"en",n=Na.concat(e),r={en:Ia},a=0,o=n;a<o.length;a++){var i=o[a];r[i.code]=i}return{map:r,defaultCode:t}}function Ua(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(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 o=r.slice(0,a).join("-");if(t[o])return t[o]}return null}(n,t)||Ia;return Aa(e,n,r)}(e,t):Aa(e.code,[e.code],e)}function Aa(e,t,n){var r=Un([Ia,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 Fa,Wa,_a={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function qa(e,t){return Rr(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return Zt(Zt({},_a),e)}))}(e),null,t)}function za(){return null==Fa&&(Fa=function(){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}()),Fa}function La(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Qr(r.activeRange,e)),isOther:Boolean(r&&!Qr(r.currentRange,e)),isToday:Boolean(t&&Qr(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function Ba(e,t){var n=["fc-day","fc-day-"+yn[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}function Va(e,t){return void 0===t&&(t="day"),JSON.stringify({date:Jn(e),type:t})}function Ya(){return Wa||(Wa=function(){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=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),Wa}function ja(e){for(var t,n,r,a=function(e){var t=[];for(;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}(e),o=e.getBoundingClientRect(),i=0,s=a;i<s.length;i++){var u=s[i],l=(t=o,n=u.getBoundingClientRect(),r=void 0,(r={left:Math.max(t.left,n.left),right:Math.min(t.right,n.right),top:Math.max(t.top,n.top),bottom:Math.min(t.bottom,n.bottom)}).left<r.right&&r.top<r.bottom&&r);if(!l)return null;o=l}return o}var Ga=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){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(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],o=[].concat(a||[],r),i=0,s=o;i<s.length;i++){var u=s[i];u.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}();var Za=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 o=a[r].getBoundingClientRect();t.push(o.left-e),n.push(o.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 o=a[r].getBoundingClientRect();t.push(o.top-e),n.push(o.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}(),Xa=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}(),Qa=(function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}Gt(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}}(Xa),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Gt(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}}(Xa),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=Zt({},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}());Qa.prototype.classes={},Qa.prototype.iconClasses={},Qa.prototype.baseIconClass="",Qa.prototype.iconOverridePrefix="";var Ka=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=Zt({},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}(),Ja=en({});function $a(e,t,n,r,a,o,i,s,u,l,c,d,f){return{dateEnv:a,options:n,pluginHooks:i,emitter:l,dispatch:s,getCurrentData:u,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){l.on("_resize",e)},removeResizeHandler:function(e){l.off("_resize",e)},createScrollResponder:function(e){return new Ka(e,l,Gn(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:d,unregisterInteractiveComponent:f}}var eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(zn(e,this.props),zn(t,this.state)),!Ln(this.props,e,this.propEquality)||!Ln(this.state,t,this.stateEquality)},t.addPropsEquality=no,t.addStateEquality=ro,t.contextType=Ja,t}(Qt);eo.prototype.propEquality={},eo.prototype.stateEquality={};var to=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.contextType=Ja,t}(eo);function no(e){var t=Object.create(this.prototype.propEquality);Zt(t,e),this.prototype.propEquality=t}function ro(e){var t=Object.create(this.prototype.stateEquality);Zt(t,e),this.prototype.stateEquality=t}function ao(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=pn(),t}return Gt(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&&!an(e,".fc-event-mirror")},t.prototype.isValidDateDownEl=function(e){return!(an(e,".fc-event:not(.fc-bg-event)")||an(e,".fc-more-link")||an(e,"a[data-navlink]")||an(e,".fc-popover"))},t}(to);function io(e){return{id:pn(),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 so(){var e,t=[],n=[];return function(r,a){return e&&er(r,t)&&er(a,n)||(e=function(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,o=e;t<o.length;t++){var i=o[t];n[i.id]||(n[i.id]=!0,a(i.deps),u=i,r={reducers:(s=r).reducers.concat(u.reducers),isLoadingFuncs:s.isLoadingFuncs.concat(u.isLoadingFuncs),contextInit:s.contextInit.concat(u.contextInit),eventRefiners:Zt(Zt({},s.eventRefiners),u.eventRefiners),eventDefMemberAdders:s.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:Zt(Zt({},s.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:s.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:s.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:s.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:s.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:s.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:s.dateSpanTransforms.concat(u.dateSpanTransforms),views:Zt(Zt({},s.views),u.views),viewPropsTransformers:s.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||s.isPropsValid,externalDefTransforms:s.externalDefTransforms.concat(u.externalDefTransforms),viewContainerAppends:s.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:s.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:s.calendarInteractions.concat(u.calendarInteractions),componentInteractions:s.componentInteractions.concat(u.componentInteractions),themeClasses:Zt(Zt({},s.themeClasses),u.themeClasses),eventSourceDefs:s.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||s.cmdFormatter,recurringTypes:s.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||s.namedTimeZonedImpl,initialView:s.initialView||u.initialView,elementDraggingImpl:s.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:Zt(Zt({},s.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||s.scrollGridImpl,contentTypeHandlers:Zt(Zt({},s.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:Zt(Zt({},s.listenerRefiners),u.listenerRefiners),optionRefiners:Zt(Zt({},s.optionRefiners),u.optionRefiners),propSetHandlers:Zt(Zt({},s.propSetHandlers),u.propSetHandlers)})}var s,u}return e&&a(e),a(t),r}(r,a)),t=r,n=a,e}}var uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t}(Qa);function lo(e,t,n,r){if(t[e])return t[e];var a=function(e,t,n,r){var a=n[e],o=r[e],i=function(e){return a&&null!==a[e]?a[e]:o&&null!==o[e]?o[e]:null},s=i("component"),u=i("superType"),l=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");l=lo(u,t,n,r)}!s&&l&&(s=l.component);if(!s)return null;return{type:e,component:s,defaults:Zt(Zt({},l?l.defaults:{}),a?a.rawOptions:{}),overrides:Zt(Zt({},l?l.overrides:{}),o?o.rawOptions:{})}}(e,t,n,r);return a&&(t[e]=a),a}uo.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},uo.prototype.baseIconClass="fc-icon",uo.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"},uo.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},uo.prototype.iconOverrideOption="buttonIcons",uo.prototype.iconOverrideCustomButtonOption="icon",uo.prototype.iconOverridePrefix="fc-icon-";var co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Jt(),t.handleRootEl=function(e){ao(t.rootElRef,e),t.props.elRef&&ao(t.props.elRef,e)},t}return Gt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Kt(go,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Kt(po,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,a){return t.children(r,mo(t.classNames,n),e,a)}))}))},t}(to),fo=en(0);function po(e){return Kt(fo.Consumer,null,(function(t){return Kt(ho,Zt({renderId:t},e))}))}var ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Jt(),t}return Gt(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.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=yo(t.content,t.hookProps),a=null;if(void 0===r&&(r=yo(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){var i=e[o]();n=this.customContentInfo=Zt({contentKey:o,contentVal:r[o]},i);break}a=n?[]:r}return a},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.render(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(to),go=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&ao(t.props.elRef,e)},t}return Gt(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(Zt(Zt({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(Zt(Zt({},this.props.hookProps),{el:this.rootEl}))},t}(to);function vo(){var e,t,n=[];return function(r,a){return t&&qn(t,a)&&r===e||(e=r,t=a,n=mo(r,a)),n}}function mo(e,t){return"function"==typeof e&&(e=e(t)),Nr(e)}function yo(e,t){return"function"==typeof e?e(t,Kt):e}var wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=vo(),t}return Gt(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 Kt(go,{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}(to);function bo(e){return Fn(e,Eo)}function Eo(e){var t,n="function"==typeof e?{component:e}:e,r=n.component;return n.content&&(t=n,r=function(e){return Kt(Ja.Consumer,null,(function(n){return Kt(wo,{viewSpec:n.viewSpec},(function(r,a){var o=Zt(Zt({},e),{nextDayThreshold:n.options.nextDayThreshold});return Kt(co,{hookProps:o,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:r},(function(e,t,n,r){return Kt("div",{className:a.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:r,rawOptions:n}}function Co(e,t,n,r){var a=bo(e),o=bo(t.views);return Fn(function(e,t){var n,r={};for(n in e)lo(n,r,e,t);for(n in t)lo(n,r,e,t);return r}(a,o),(function(e){return function(e,t,n,r,a){var o=e.overrides.duration||e.defaults.duration||r.duration||n.duration,i=null,s="",u="",l={};if(o&&(i=function(e){var t=JSON.stringify(e),n=To[t];void 0===n&&(n=Gn(e),To[t]=n);return n}(o))){var c=Kn(i);s=c.unit,1===c.value&&(u=s,l=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[u]?n[u]:null};return{type:e.type,component:e.component,duration:i,durationUnit:s,singleUnit:u,optionDefaults:e.defaults,optionOverrides:Zt(Zt({},l),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(a)||e.defaults.buttonText||d(yr)||e.type}}(e,o,t,n,r)}))}var To={};var Do=function(){function e(e){this.props=e,this.nowDate=Ca(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,o,i,s,u,l,c,d,f,p=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(l=e,e=null!=(c=r).start&&l<c.start?c.start:null!=c.end&&l>=c.end?new Date(c.end.valueOf()-1):l),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),i=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=i=this.trimHiddenDays(i),p.showNonCurrentDates||(s=Xr(s,a.range)),s=Xr(s=this.adjustActiveRange(s),r),d=a.range,f=r,u=(null===d.end||null===f.start||d.end>f.start)&&(null===d.start||null===f.end||d.start<f.end),{validRange:r,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:s,renderRange:i,slotMinTime:p.slotMinTime,slotMaxTime:p.slotMaxTime,isValid:u,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,o=null,i=null;return r.duration?(a=r.duration,o=r.durationUnit,i=this.buildRangeFromDuration(e,t,a,o)):(n=this.props.dayCount)?(o="day",i=this.buildRangeFromDayCount(e,t,n)):(i=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(i.start,i.end).unit:(o=Kn(a=this.getFallbackDuration()).unit,i=this.buildRangeFromDuration(e,t,a,o)),{duration:a,unit:o,range:i}},e.prototype.getFallbackDuration=function(){return Gn({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,a=t.slotMinTime,o=t.slotMaxTime,i=e.start,s=e.end;return r&&(Xn(a)<0&&(i=Dn(i),i=n.add(i,a)),Xn(o)>1&&(s=bn(s=Dn(s),-1),s=n.add(s,o))),{start:i,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var a,o,i,s=this.props,u=s.dateEnv,l=s.dateAlignment;if(!l){var c=this.props.dateIncrement;l=c&&Qn(c)<Qn(n)?Kn(c).unit:r}function d(){a=u.startOf(e,l),o=u.add(a,n),i={start:a,end:o}}return Xn(n)<=1&&this.isHiddenDay(a)&&(a=Dn(a=this.skipHiddenDays(a,t))),d(),this.trimHiddenDays(i)||(e=this.skipHiddenDays(e,t),d()),i},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,a=this.props,o=a.dateEnv,i=a.dateAlignment,s=0,u=e;i&&(u=o.startOf(u,i)),u=Dn(u),r=u=this.skipHiddenDays(u,t);do{r=bn(r,1),this.isHiddenDay(r)||(s+=1)}while(s<n);return{start:u,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)?Gn(1,t):e||Gn({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,a=null,o=null,n.start&&(a=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),a||o?a&&o&&o<a?null:{start:a,end:o}:null);return t&&(t=Yr(t)),t}var n,r,a,o;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=bn(e,t);return e},e}();function So(e,t,n){var r=t?t.activeRange:null;return xo({},function(e,t){var n=Ea(t),r=[].concat(e.eventSources||[]),a=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(var o=0,i=r;o<i.length;o++){var s=ba(i[o],t,n);s&&a.push(s)}return a}(e,n),r,n)}function ko(e,t,n,r){var a,o,i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return xo(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return a=e,o=t.sourceId,An(a,(function(e){return e.sourceId!==o}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Mo(e,i,r):e;case"FETCH_EVENT_SOURCES":return Po(e,t.sourceIds?Wn(t.sourceIds):No(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){var a,o=e[t];if(o&&n===o.latestFetchId)return Zt(Zt({},e),((a={})[t]=Zt(Zt({},o),{isFetching:!1,fetchRange:r}),a));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function Ro(e){for(var t in e)if(e[t].isFetching)return!0;return!1}function xo(e,t,n,r){for(var a={},o=0,i=t;o<i.length;o++){var s=i[o];a[s.sourceId]=s}return n&&(a=Mo(a,n,r)),Zt(Zt({},e),a)}function Mo(e,t,n){return Po(e,An(e,(function(e){return function(e,t,n){if(!Io(e,n))return!e.latestFetchId;return!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end}(e,t,n)})),t,!1,n)}function Po(e,t,n,r,a){var o={};for(var i in e){var s=e[i];t[i]?o[i]=Oo(s,n,r,a):o[i]=s}return o}function Oo(e,t,n,r){var a=r.options,o=r.calendarApi,i=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=pn();return i.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var i=n.rawEvents;a.eventSourceSuccess&&(i=a.eventSourceSuccess.call(o,i,n.xhr)||i),e.success&&(i=e.success.call(o,i,n.xhr)||i),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:i})}),(function(n){console.warn(n.message,n),a.eventSourceFailure&&a.eventSourceFailure.call(o,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})})),Zt(Zt({},e),{isFetching:!0,latestFetchId:s})}function No(e,t){return An(e,(function(e){return Io(e,t)}))}function Io(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ho(e,t,n,r,a){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,a,o){if(t&&n===t.latestFetchId){var i=Rr(function(e,t,n){var r=n.options.eventDataTransform,a=t?t.eventDataTransform:null;a&&(e=Uo(e,a));r&&(e=Uo(e,r));return e}(a,t,o),t,o);return r&&(i=Vn(i,r,o)),Pr(Ao(e,t.sourceId),i)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,a);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Vn(t,n,r));return Pr(e,t)}(e,t.eventStore,r?r.activeRange:null,a);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Pr(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Vn(e,r.activeRange,a):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,a={},o={};for(var i in n)t.defs[i]||(a[i]=n[i]);for(var s in r)!t.instances[s]&&a[r[s].defId]&&(o[s]=r[s]);return{defs:a,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Ao(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Or(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Uo(e,t){var n;if(t){n=[];for(var r=0,a=e;r<a.length;r++){var o=a[r],i=t(o);i?n.push(i):null==i&&n.push(o)}}else n=e;return n}function Ao(e,t){return Or(e,(function(e){return e.sourceId!==t}))}function Fo(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Wo(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function _o(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 qo(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 zo(e,t,n,r,a){var o=[];return{headerToolbar:e.headerToolbar?Lo(e.headerToolbar,e,t,n,r,a,o):null,footerToolbar:e.footerToolbar?Lo(e.footerToolbar,e,t,n,r,a,o):null,viewsWithButtons:o}}function Lo(e,t,n,r,a,o,i){return Fn(e,(function(e){return function(e,t,n,r,a,o,i){var s="rtl"===t.direction,u=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){return"title"===e?{buttonName:e}:((t=u[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(f=r.getCustomButtonIconClass(t))||(f=r.getIconClass(e,s))||(p=t.text)):(n=a[e])?(i.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(f=r.getIconClass(e,s))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=l[e])||(f=r.getIconClass(e,s))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:f,buttonText:p});var t,n,d,f,p}))}))}(e,t,n,r,a,o,i)}))}function Bo(e,t,n,r,a){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Vo(t)}(t,n):o=Vo(n);var i=new XMLHttpRequest;i.open(e,t,!0),"GET"!==e&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.onload=function(){if(i.status>=200&&i.status<400){var e=!1,t=void 0;try{t=JSON.parse(i.responseText),e=!0}catch(e){}e?r(t,i):a("Failure parsing JSON",i)}else a("Request failed",i)},i.onerror=function(){a("Request failed",i)},i.send(o)}function Vo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Yo(e,t){for(var n=_n(t.getCurrentData().eventSources),r=[],a=0,o=e;a<o.length;a++){for(var i=o[a],s=!1,u=0;u<n.length;u+=1)if(n[u]._raw===i){n.splice(u,1),s=!0;break}s||r.push(i)}for(var l=0,c=n;l<c.length;l++){var d=c[l];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var f=0,p=r;f<p.length;f++){var h=p[f];t.calendarApi.addEventSource(h)}}var jo=[io({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),io({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;!function(e,t,n){var r=!1,a=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},i=e(a,o);i&&"function"==typeof i.then&&i.then(a,o)}(e.eventSource.meta.bind(null,da(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),io({eventSourceRefiners:{method:String,extraParams:kr,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{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=function(e,t,n){var r,a,o,i,s=n.dateEnv,u=n.options,l={};null==(r=e.startParam)&&(r=u.startParam);null==(a=e.endParam)&&(a=u.endParam);null==(o=e.timeZoneParam)&&(o=u.timeZoneParam);i="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};Zt(l,i),l[r]=s.formatIso(t.start),l[a]=s.formatIso(t.end),"local"!==s.timeZone&&(l[o]=s.timeZone);return l}(r,e.range,e.context);Bo(r.method,r.url,a,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),io({recurringTypes:[{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&&(a=e.endTime,o=e.startTime,r={years:a.years-o.years,months:a.months-o.months,days:a.days-o.days,milliseconds:a.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var a,o;return null},expand:function(e,t,n){var r=Xr(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var a=e?Wn(e):null,o=Dn(n.start),i=n.end,s=[];for(;o<i;){var u=void 0;a&&!a[o.getUTCDay()]||(u=t?r.add(o,t):o,s.push(u)),o=bn(o,1)}return s}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:kr,startTime:Gn,endTime:Gn,duration:Gn,startRecur:kr,endRecur:kr}}),io({optionChangeHandlers:{events:function(e,t){Yo([e],t)},eventSources:Yo}}),io({isLoadingFuncs:[function(e){return Ro(e.eventSources)}],contentTypeHandlers:{html:function(){return{render:Go}},domNodes:function(){return{render:Zo}}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Zt(Zt({},da(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",ka(e,t))}}})];function Go(e,t){e.innerHTML=t}function Zo(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!er(n,r)){for(var a=0,o=r;a<o.length;a++){var i=o[a];e.appendChild(i)}n.forEach(rn)}}var Xo=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}(),Qo=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Xo(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 Ko(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,vr(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=Tn(e.currentRange.start,e.currentRange.end);if(null!==n&&n>1)return{year:"numeric",month:"short",day:"numeric"};return{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Jo=function(){function e(e){var t=this;this.computeOptionsData=tr(this._computeOptionsData),this.computeCurrentViewData=tr(this._computeCurrentViewData),this.organizeRawLocales=tr(Ha),this.buildLocale=tr(Ua),this.buildPluginHooks=so(),this.buildDateEnv=tr($o),this.buildTheme=tr(ei),this.parseToolbars=tr(zo),this.buildViewSpecs=tr(Co),this.buildDateProfileGenerator=nr(ti),this.buildViewApi=tr(ni),this.buildViewUiProps=nr(oi),this.buildEventUiBySource=tr(ri,qn),this.buildEventUiBases=tr(ai),this.parseContextBusinessHours=nr(si),this.buildTitle=tr(Ko),this.emitter=new Ga,this.actionRunner=new Qo(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,o=this.computeCurrentViewData(a,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(o.options);var i,s,u,l=(i=r.calendarOptions,s=r.dateEnv,null!=(u=i.initialDate)?s.createMarker(u):Ca(i.now,s)),c=o.dateProfileGenerator.build(l);Qr(c.activeRange,l)||(l=c.currentRange.start);for(var d={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,p=r.pluginHooks.contextInit;f<p.length;f++){(0,p[f])(d)}for(var h=So(r.calendarOptions,c,d),g={dynamicOptionOverrides:n,currentViewType:a,currentDate:l,dateProfile:c,businessHours:this.parseContextBusinessHours(d),eventSources:h,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(d).selectionConfig},v=Zt(Zt({},d),g),m=0,y=r.pluginHooks.reducers;m<y.length;m++){var w=y[m];Zt(g,w(null,null,v))}ii(g,d)&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?Zt(Zt({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,r=this.emitter,a=function(e,t){var n;switch(t.type){case"SET_OPTION":return Zt(Zt({},e),((n={})[t.optionName]=t.rawOptionValue,n));default:return e}}(n.dynamicOptionOverrides,e),o=this.computeOptionsData(t.optionOverrides,a,t.calendarApi),i=function(e,t){switch(t.type){case"CHANGE_VIEW_TYPE":e=t.viewType}return e}(n.currentViewType,e),s=this.computeCurrentViewData(i,o,t.optionOverrides,a);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);var u={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},l=n.currentDate,c=n.dateProfile;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(c=s.dateProfileGenerator.build(l)),c=function(e,t,n,r){var a;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!Qr(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;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}(c,e,l=function(e,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return e}}(l,e),s.dateProfileGenerator),Qr(c.currentRange,l)||(l=c.currentRange.start);for(var d=ko(n.eventSources,e,c,u),f=Ho(n.eventStore,e,d,c,u),p=Ro(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,h=this.buildViewUiProps(u),g=h.eventUiSingleBase,v=h.selectionConfig,m=this.buildEventUiBySource(d),y={dynamicOptionOverrides:a,currentViewType:i,currentDate:l,dateProfile:c,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:v,eventUiBases:this.buildEventUiBases(p.defs,g,m),businessHours:this.parseContextBusinessHours(u),dateSelection:Fo(n.dateSelection,e),eventSelection:Wo(n.eventSelection,e),eventDrag:_o(n.eventDrag,e),eventResize:qo(n.eventResize,e)},w=Zt(Zt({},u),y),b=0,E=o.pluginHooks.reducers;b<E.length;b++){var C=E[b];Zt(y,C(n,e,w))}var T=ii(n,u),D=ii(y,u);!T&&D?r.trigger("loading",!0):T&&!D&&r.trigger("loading",!1),this.state=y,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,r,a,o,i,s,u,l=this.props,c=this.state,d=this.data,f=this.computeOptionsData(l.optionOverrides,c.dynamicOptionOverrides,l.calendarApi),p=this.computeCurrentViewData(c.currentViewType,f,l.optionOverrides,c.dynamicOptionOverrides),h=this.data=Zt(Zt(Zt({viewTitle:this.buildTitle(c.dateProfile,p.options,f.dateEnv),calendarApi:l.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f),p),c),g=f.pluginHooks.optionChangeHandlers,v=d&&d.calendarOptions,m=f.calendarOptions;if(v&&v!==m)for(var y in v.timeZone!==m.timeZone&&(c.eventSources=h.eventSources=(o=h.eventSources,i=c.dateProfile,s=h,u=i?i.activeRange:null,Po(o,No(o,s),u,!0,s)),c.eventStore=h.eventStore=(e=h.eventStore,t=d.dateEnv,n=h.dateEnv,r=e.defs,a=Fn(e.instances,(function(e){var a=r[e.defId];return a.allDay||a.recurringDef?e:Zt(Zt({},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})})),{defs:r,instances:a})),g)v[y]!==m[y]&&g[y](m[y],h);l.onData&&l.onData(h)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),a=r.refinedOptions,o=r.pluginHooks,i=r.localeDefaults,s=r.availableLocaleData;ui(r.extra);var u=this.buildDateEnv(a.timeZone,a.locale,a.weekNumberCalculation,a.firstDay,a.weekText,o,s,a.defaultRangeSeparator),l=this.buildViewSpecs(o.views,e,t,i),c=this.buildTheme(a,o);return{calendarOptions:a,pluginHooks:o,dateEnv:u,viewSpecs:l,theme:c,toolbarConfig:this.parseToolbars(a,e,c,l,n),localeDefaults:i,availableRawLocales:s.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Dr([yr,e,t]),r=n.locales,a=n.locale,o=this.organizeRawLocales(r),i=o.map,s=this.buildLocale(a||o.defaultCode,i).options,u=this.buildPluginHooks(e.plugins||[],jo),l=this.currentCalendarOptionsRefiners=Zt(Zt(Zt(Zt(Zt({},mr),wr),br),u.listenerRefiners),u.optionRefiners),c={},d=Dr([yr,s,e,t]),f={},p=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,g=!1;for(var v in d)"plugins"!==v&&(d[v]===p[v]||Er[v]&&v in p&&Er[v](p[v],d[v])?f[v]=h[v]:l[v]?(f[v]=l[v](d[v]),g=!0):c[v]=p[v]);return g&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=f),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:o,localeDefaults:s,extra:c}},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 o=this.processRawViewOptions(a,t.pluginHooks,t.localeDefaults,n,r),i=o.refinedOptions;return ui(o.extra),{viewSpec:a,options:i,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:i.slotMinTime,slotMaxTime:i.slotMaxTime,showNonCurrentDates:i.showNonCurrentDates,dayCount:i.dayCount,dateAlignment:i.dateAlignment,dateIncrement:i.dateIncrement,hiddenDays:i.hiddenDays,weekends:i.weekends,nowInput:i.now,validRangeInput:i.validRange,visibleRangeInput:i.visibleRange,monthMode:i.monthMode,fixedWeekCount:i.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,r,a){var o=Dr([yr,e.optionDefaults,n,r,e.optionOverrides,a]),i=Zt(Zt(Zt(Zt(Zt(Zt({},mr),wr),br),Tr),t.listenerRefiners),t.optionRefiners),s={},u=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,c=!1,d={};for(var f in o)o[f]===u[f]?s[f]=l[f]:(o[f]===this.currentCalendarOptionsInput[f]?f in this.currentCalendarOptionsRefined&&(s[f]=this.currentCalendarOptionsRefined[f]):i[f]?s[f]=i[f](o[f]):d[f]=o[f],c=!0);return c&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}},e}();function $o(e,t,n,r,a,o,i,s){var u=Ua(t||i.defaultCode,i.map);return new Oa({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:u,weekNumberCalculation:n,firstDay:r,weekText:a,cmdFormatter:o.cmdFormatter,defaultSeparator:s})}function ei(e,t){return new(t.themeClasses[e.themeSystem]||uo)(e)}function ti(e){return new(e.dateProfileGeneratorClass||Do)(e)}function ni(e,t,n){return new ya(e,t,n)}function ri(e){return Fn(e,(function(e){return e.ui}))}function ai(e,t,n){var r={"":t};for(var a in e){var o=e[a];o.sourceId&&n[o.sourceId]&&(r[a]=n[o.sourceId])}return r}function oi(e){var t=e.options;return{eventUiSingleBase:Ur({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:Ur({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ii(e,t){for(var n=0,r=t.pluginHooks.isLoadingFuncs;n<r.length;n++){if((0,r[n])(e))return!0}return!1}function si(e){return qa(e.options.businessHours,e)}function ui(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var li=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 Jo({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return Gt(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}(Qt),ci=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({segInput:a,spanStart:a.spanStart,spanEnd:a.spanEnd,thickness:a.thickness},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=[];return e.spanStart<t.spanStart&&(r+=this.insertEntry(Zt(Zt({},e),{spanStart:e.spanStart,spanEnd:t.spanStart}),a)),t.spanEnd<e.spanEnd&&(r+=this.insertEntry(Zt(Zt({},e),{spanStart:t.spanEnd,spanEnd:e.spanEnd}),a)),r?(n.push.apply(n,Xt([Zt(Zt({},e),{spanStart:Math.max(t.spanStart,e.spanStart),spanEnd:Math.min(t.spanEnd,e.spanEnd)})],a)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=t.nextLevel;!n||this.levelCoords[n-1]<t.levelCoord?(pi(this.levelCoords,n,t.levelCoord),pi(this.entriesByLevel,n,[e])):pi(this.entriesByLevel[n-1],t.lateralEnd,e),this.stackCnts[fi(e)]=t.stackCnt},e.prototype.findInsertion=function(e){var t,n,r=this.levelCoords,a=this.entriesByLevel,o=this.stackCnts,i=this.strictOrder,s=r.length,u=0,l=0,c=0,d=null;for(t=0;t<s&&(n=r[t],i||!(n>=c+e.thickness));t+=1){var f=a[t],p=void 0,h=hi(f,e.spanStart,di);for(l=u=h[0]+h[1];(p=f[l])&&p.spanStart<e.spanEnd;)(i||c<n+p.thickness&&c+e.thickness>n)&&(d=p,c=n+p.thickness),l+=1}return{levelCoord:c,nextLevel:t,lateralStart:u,lateralEnd:l,touchingEntry:d,stackCnt:d?o[fi(d)]+1:0}},e.prototype.toRects=function(){for(var e=this.entriesByLevel,t=this.levelCoords,n=e.length,r=[],a=0;a<n;a+=1)for(var o=e[a],i=t[a],s=0,u=o;s<u.length;s++){var l=u[s];r.push(Zt(Zt({},l),{levelCoord:i}))}return r},e}();function di(e){return e.spanEnd}function fi(e){return e.segInput.index+":"+e.spanStart}function pi(e,t,n){e.splice(t,0,n)}function hi(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 o=Math.floor(r+(a-r)/2),i=n(e[o]);if(t<i)a=o;else{if(!(t>i))return[o,1];r=o+1}}return[r,0]}var gi=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function vi(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var mi={},yi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Kt.apply(void 0,Xt(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],a=!0,o=0,i=e;o<i.length;o++){var s=i[o],u=s.buttonName,l=s.buttonClick,c=s.buttonText,d=s.buttonIcon;if("title"===u)a=!1,r.push(Kt("h2",{className:"fc-toolbar-title"},t.title));else{var f=d?{"aria-label":u}:{},p=["fc-"+u+"-button",n.getClass("button")];u===t.activeButton&&p.push(n.getClass("buttonActive"));var h=!t.isTodayEnabled&&"today"===u||!t.isPrevEnabled&&"prev"===u||!t.isNextEnabled&&"next"===u;r.push(Kt("button",Zt({disabled:h,className:p.join(" "),onClick:l,type:"button"},f),c||(d?Kt("span",{className:d}):"")))}}if(r.length>1){var g=a&&n.getClass("buttonGroup")||"";return Kt.apply(void 0,Xt(["div",{className:g}],r))}return r[0]},t}(to),wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,a=n.extraClassName,o=!1,i=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Kt("div",{className:[a||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",i||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Kt(yi,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(to),bi=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,ao(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return Gt(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="",o="";return n?null!==t.availableWidth?a=t.availableWidth/n:o=1/n*100+"%":a=e.height||"",Kt("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:a,paddingBottom:o}},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}(to),Ei=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,o=$r(t);if(o&&r.isValidSegDownEl(e.target)){var i=an(e.target,".fc-event-forced-url"),s=i?i.querySelector("a[href]").href:"";a.emitter.trigger("eventClick",{el:t,event:new Da(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:a.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=dn(t.el,"click",".fc-event",n.handleSegClick),n}return Gt(t,e),t}(gi),Ci=function(e){function t(t){var n,r,a,o,i,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){$r(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=".fc-event",a=s.handleSegEnter,o=s.handleSegLeave,dn(n,"mouseover",r,(function(e,t){if(t!==i){i=t,a(e,t);var n=function(e){i=null,o(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return Gt(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,a=r.context,o=$r(n);t&&!r.isValidSegDownEl(t.target)||a.emitter.trigger(e,{el:n,event:new Da(a,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:a.viewApi})},t}(gi),Ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=tr($a),t.buildViewPropTransformers=tr(Si),t.buildToolbarProps=tr(Di),t.handleNavLinkClick=cn("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Jt(),t.footerRef=Jt(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=vi(e,n),a=[Ei,Ci].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=a,mi[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++){r[n].destroy()}delete t.interactionsStore[e.uid],delete mi[e.uid]},t.resizeRunner=new Xo((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 Gt(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,Ca(t.options.now,t.dateEnv),t.viewTitle),o=!1,i="";t.isHeightAuto||t.forPrint?i="":null!=r.height?o=!0:null!=r.contentHeight?i=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);return Kt(Ja.Provider,{value:s},n.headerToolbar&&Kt(wi,Zt({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},a)),Kt(bi,{liquid:o,height:i,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Kt(wi,Zt({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},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._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,a=n.options,o=n.calendarApi,i=t.getAttribute("data-navlink");i=i?JSON.parse(i):{};var s=r.createMarker(i.date),u=i.type,l="day"===u?a.navLinkDayClick:"week"===u?a.navLinkWeekClick:null;"function"==typeof l?l.call(o,r.toDate(s),e):("string"==typeof l&&(u=l),o.zoomTo(s,u))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Kt.apply(void 0,Xt([$t,{}],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,o=this.buildViewPropTransformers(t.viewPropsTransformers);a<o.length;a++){var i=o[a];Zt(r,i.transform(r,e))}var s=n.component;return Kt(s,Zt({},r))},t}(eo);function Di(e,t,n,r,a,o){var i=n.build(a,void 0,!1),s=n.buildPrev(t,r,!1),u=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:i.isValid&&!Qr(t.currentRange,a),isPrevEnabled:s.isValid,isNextEnabled:u.isValid}}function Si(e){return e.map((function(e){return new e}))}var ki=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 Gt(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,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return za()||o.push("fc-liquid-hack"),e.children(o,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}(to);var Ri="fc-col-header-cell";function xi(e){return e.text}var Mi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,r=e.theme,a=e.viewApi,o=this.props,i=o.date,s=o.dateProfile,u=La(i,o.todayRange,null,s),l=[Ri].concat(Ba(u,r)),c=t.format(i,o.dayHeaderFormat),d=n.navLinks&&!u.isDisabled&&o.colCnt>1?{"data-navlink":Va(i),tabIndex:0}:{},f=Zt(Zt(Zt({date:t.toDate(i),view:a},o.extraHookProps),{text:c}),u);return Kt(co,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:xi,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return Kt("th",Zt({ref:e,className:l.concat(t).join(" "),"data-date":u.isDisabled?void 0:Jn(i),colSpan:o.colSpan},o.extraDataAttrs),Kt("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Kt("a",Zt({ref:n,className:["fc-col-header-cell-cushion",o.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(to),Pi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,a=t.viewApi,o=t.options,i=bn(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[Ri].concat(Ba(s,r),e.extraClassNames||[]),l=n.format(i,e.dayHeaderFormat),c=Zt(Zt(Zt(Zt({date:i},s),{view:a}),e.extraHookProps),{text:l});return Kt(co,{hookProps:c,classNames:o.dayHeaderClassNames,content:o.dayHeaderContent,defaultContent:xi,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(function(t,n,r,a){return Kt("th",Zt({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Kt("div",{className:"fc-scrollgrid-sync-inner"},Kt("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:r},a)))}))},t}(to),Oi=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Ca(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return Gt(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=En(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(r,Gn(1,e.unit)),o=a.valueOf()-n.valueOf();return o=Math.min(864e5,o),{currentState:{nowDate:r,todayRange:Ni(r)},nextState:{nowDate:a,todayRange:Ni(a)},waitMs:o}},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=Ja,t}(Qt);function Ni(e){var t=Dn(e);return{start:t,end:bn(t,1)}}var Ii=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=tr(Hi),t}return Gt(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,a=t.datesRepDistinctDays,o=t.renderIntro,i=this.createDayHeaderFormatter(e.options.dayHeaderFormat,a,n.length);return Kt(Oi,{unit:"day"},(function(e,t){return Kt("tr",null,o&&o("day"),n.map((function(e){return a?Kt(Mi,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:i}):Kt(Pi,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:i})})))}))},t}(to);function Hi(e,t,n){return e||function(e,t){return vr(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var Ui=function(){function e(e,t){for(var n=e.start,r=e.end,a=[],o=[],i=-1;n<r;)t.isHiddenDay(n)?a.push(i+.5):(i+=1,a.push(i),o.push(n)),n=bn(n,1);this.dates=o,this.indices=a,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(bn(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(Cn(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),Ai=function(){function e(e,t){var n,r,a,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n+=1);a=Math.ceil(o.length/n)}else a=1,n=o.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,o=n.lastIndex,i=a;i<=o;){var s=Math.floor(i/t),u=Math.min((s+1)*t,o+1);r.push({row:s,firstCol:i%t,lastCol:(u-1)%t,isStart:n.isStart&&i===a,isEnd:n.isEnd&&u-1===o}),i=u}return r},e}(),Fi=function(){function e(){this.sliceBusinessHours=tr(this._sliceBusinessHours),this.sliceDateSelection=tr(this._sliceDateSpan),this.sliceEventStore=tr(this._sliceEventStore),this.sliceEventDrag=tr(this._sliceInteraction),this.sliceEventResize=tr(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];var i=e.eventUiBases,s=this.sliceEventStore.apply(this,Xt([e.eventStore,i,t,n],a));return{dateSelectionSegs:this.sliceDateSelection.apply(this,Xt([e.dateSelection,i,r],a)),businessHourSegs:this.sliceBusinessHours.apply(this,Xt([e.businessHours,t,n,r],a)),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag.apply(this,Xt([e.eventDrag,i,t,n],a)),eventResize:this.sliceEventResize.apply(this,Xt([e.eventResize,i,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,Xt([{range:{start:e,end:En(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];return e?this._sliceEventStore.apply(this,Xt([Vn(e,Wi(t,Boolean(n)),r),{},t,n],a)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];if(e){var i=Kr(e,t,Wi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(i.bg,a),fg:this.sliceEventRanges(i.fg,a)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];if(!e)return null;var i=Kr(e.mutatedEvents,t,Wi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(i.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 o=pa(e,t,n),i=this.sliceRange.apply(this,Xt([e.range],r)),s=0,u=i;s<u.length;s++){var l=u[s];l.eventRange=o}return i},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,a=e;r<a.length;r++){var o=a[r];n.push.apply(n,this.sliceEventRange(o,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:bn(n.start,1)});for(var r=this.sliceRange.apply(this,Xt([n],t)),a=0,o=r;a<o.length;a++){var i=o[a];i.eventRange=e,i.isStart=e.isStart&&i.isStart,i.isEnd=e.isEnd&&i.isEnd}return r},e}();function Wi(e,t){var n=e.activeRange;return t?n:{start:En(n.start,e.slotMinTime.milliseconds),end:En(n.end,e.slotMaxTime.milliseconds-864e5)}}var _i=/^(visible|hidden)$/,qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,ao(t.props.elRef,e)},t}return Gt(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")),Kt("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(_i.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(_i.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 _i.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return _i.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(to),zi=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,o=r.currentMap,i=!1,s=!1;null!==e?(i=n in o,o[n]=e,a[n]=(a[n]||0)+1,s=!0):(a[n]-=1,a[n]||(delete o[n],delete t.callbackMap[n],i=!0)),t.masterCallback&&(i&&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 function(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 o=t;o<n;o+=r){var i=e[o];void 0!==i&&a.push(i)}return a}(this.currentMap,e,t,n)},e.prototype.getAll=function(){return _n(this.currentMap)},e}();function Li(e){for(var t=0,n=0,r=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],a=0;a<n.length;a+=1)for(var o=n[a].querySelectorAll(t),i=0;i<o.length;i+=1)r.push(o[i]);return r}(e,".fc-scrollgrid-shrink");n<r.length;n++){var a=r[n];t=Math.max(t,mn(a))}return Math.ceil(t)}function Bi(e,t){return e.liquid&&t.liquid}function Vi(e,t){return er(e,t,qn)}function Yi(e,t){for(var n=[],r=0,a=e;r<a.length;r++)for(var o=a[r],i=o.span||1,s=0;s<i;s+=1)n.push(Kt("col",{style:{width:"shrink"===o.width?ji(t):o.width||"",minWidth:o.minWidth||""}}));return Kt.apply(void 0,Xt(["colgroup",{}],n))}function ji(e){return null==e?4:e}function Gi(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 Zi(e){return Kt("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Xi(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var Qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=tr((function(e){return e}),Vi),t.renderMicroColGroup=tr(Yi),t.scrollerRefs=new zi,t.scrollerElRefs=new zi(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(Zt({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=this.context,r=e.sections||[],a=this.processCols(e.cols),o=this.renderMicroColGroup(a,t.shrinkWidth),i=function(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&i.push("fc-scrollgrid-collapsible");for(var s,u=r.length,l=0,c=[],d=[],f=[];l<u&&"header"===(s=r[l]).type;)c.push(this.renderSection(s,o)),l+=1;for(;l<u&&"body"===(s=r[l]).type;)d.push(this.renderSection(s,o)),l+=1;for(;l<u&&"footer"===(s=r[l]).type;)f.push(this.renderSection(s,o)),l+=1;var p=!za();return Kt("table",{className:i.join(" "),style:{height:e.height}},Boolean(!p&&c.length)&&Kt.apply(void 0,Xt(["thead",{}],c)),Boolean(!p&&d.length)&&Kt.apply(void 0,Xt(["tbody",{}],d)),Boolean(!p&&f.length)&&Kt.apply(void 0,Xt(["tfoot",{}],f)),p&&Kt.apply(void 0,Xt(Xt(Xt(["tbody",{}],c),d),f)))},t.prototype.renderSection=function(e,t){return"outerContent"in e?Kt($t,{key:e.key},e.outerContent):Kt("tr",{key:e.key,className:Gi(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk))},t.prototype.renderChunkTd=function(e,t,n){if("outerContent"in n)return n.outerContent;var r=this.props,a=this.state,o=a.forceYScrollbars,i=a.scrollerClientWidths,s=a.scrollerClientHeights,u=function(e,t){return null!=t.maxHeight||Bi(e,t)}(r,e),l=Bi(r,e),c=r.liquid?o?"scroll":u?"auto":"hidden":"visible",d=e.key,f=function(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Kt("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Kt("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:r.collapsibleWidth||void 0===i[d]?null:i[d],clientHeight:void 0!==s[d]?s[d]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Kt("td",{ref:n.elRef},Kt("div",{className:"fc-scroller-harness"+(l?" fc-scroller-harness-liquid":"")},Kt(qi,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:c,overflowX:r.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))},t.prototype._handleScrollerEl=function(e,t){var n=function(e,t){for(var n=0,r=e;n<r.length;n++){var a=r[n];if(a.key===t)return a}return null}(this.props.sections,t);n&&ao(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 function(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}(this.props.cols)?Li(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){var e=Ya(),t=this.scrollerRefs,n=this.scrollerElRefs,r=!1,a={},o={};for(var i in t.currentMap){var s=t.currentMap[i];if(s&&s.needsYScrolling()){r=!0;break}}for(var u=0,l=this.props.sections;u<l.length;u++){i=l[u].key;var c=n.currentMap[i];if(c){var d=c.parentNode;a[i]=Math.floor(d.getBoundingClientRect().width-(r?e.y:0)),o[i]=Math.floor(d.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:a,scrollerClientHeights:o}},t}(to);Qi.addStateEquality({scrollerClientWidths:qn,scrollerClientHeights:qn});var Ki=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Jt(),t}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,a=r.eventRange,o=a.ui,i={event:new Da(t,a.def,a.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&aa(r,t),isStartResizable:!e.disableResizing&&oa(r,t),isEndResizable:!e.disableResizing&&ia(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=function(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}(i).concat(o.classNames);return Kt(co,{hookProps:i,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,i)}))},t.prototype.componentDidMount=function(){Jr(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&Jr(this.elRef.current,t)},t}(to),Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||e.defaultTimeFormat,a=sa(n,r,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Kt(Ki,{seg:n,timeText:a,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$i,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,r,a,o,i){return Kt("a",Zt({className:e.extraClassNames.concat(r).join(" "),style:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Kt("div",{className:"fc-event-main",ref:a,style:{color:i.textColor}},o),i.isStartResizable&&Kt("div",{className:"fc-event-resizer fc-event-resizer-start"}),i.isEndResizable&&Kt("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(to);function $i(e){return Kt("div",{className:"fc-event-main-frame"},e.timeText&&Kt("div",{className:"fc-event-time"},e.timeText),Kt("div",{className:"fc-event-title-container"},Kt("div",{className:"fc-event-title fc-sticky"},e.event.title||Kt($t,null," "))))}var es=vr({day:"numeric"}),ts=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=ns({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Kt(po,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(to);function ns(e){var t=e.date,n=e.dateEnv,r=La(t,e.todayRange,null,e.dateProfile);return Zt(Zt(Zt({date:n.toDate(t),view:e.viewApi},r),{dayNumberText:e.showDayNumber?n.format(t,es):""}),e.extraProps)}var rs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=nr(ns),t.normalizeClassNames=vo(),t}return Gt(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=Ba(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":Jn(e.date)};return Kt(go,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,a,o,r.isDisabled)}))},t}(to);function as(e){return Kt("div",{className:"fc-"+e})}var os=function(e){return Kt(Ki,{defaultContent:is,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 Kt("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:a.backgroundColor}},r)}))};function is(e){return e.event.title&&Kt("div",{className:"fc-event-title"},e.event.title)}var ss=function(e){return Kt(Ja.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,a=e.date,o=r.weekNumberFormat||e.defaultFormat,i=n.computeWeekNumber(a),s=n.format(a,o);return Kt(co,{hookProps:{num:i,text:s,date:a},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:us,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function us(e){return e.text}var ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&ao(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=ln(e);t.rootEl.contains(n)||t.handleCloseClick()},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return Gt(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return tn(Kt("div",Zt({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Kt("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Kt("span",{className:"fc-popover-title"},t.title),Kt("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Kt("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children)),t.parentEl)},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown)},t.prototype.updateSize=function(){var e=this.context.isRtl,t=this.props,n=t.alignmentEl,r=t.alignGridTop,a=this.rootEl,o=ja(n);if(o){var i=a.getBoundingClientRect(),s=r?an(n,".fc-scrollgrid").getBoundingClientRect().top:o.top,u=e?o.right-i.width:o.left;s=Math.max(s,10),u=Math.min(u,document.documentElement.clientWidth-10-i.width),u=Math.max(u,10);var l=a.offsetParent.getBoundingClientRect();!function(e,t){for(var n in t)un(e,n,t[n])}(a,{top:s-l.top,left:u-l.left})}},t}(to),cs=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 Gt(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,r=this.props,a=r.startDate,o=r.todayRange,i=r.dateProfile,s=n.format(a,t.dayPopoverFormat);return Kt(rs,{date:a,dateProfile:i,todayRange:o,elRef:this.handleRootEl},(function(e,t,n){return Kt(ls,{elRef:e,title:s,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},Kt(ts,{date:a,dateProfile:i,todayRange:o},(function(e,t){return t&&Kt("div",{className:"fc-more-popover-misc",ref:e},t)})),r.children)}))},t.prototype.queryHit=function(e,t,n,r){var a=this.rootEl,o=this.props;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:o.dateProfile,dateSpan:Zt({allDay:!0,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:a,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null},t}(oo),ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.linkElRef=Jt(),t.state={isPopoverOpen:!1},t.handleClick=function(e){var n=t,r=n.props,a=n.context,o=a.options.moreLinkClick,i=ps(r).start;function s(e){var t=e.eventRange,n=t.def,r=t.instance,o=t.range;return{event:new Da(a,n,r),start:a.dateEnv.toDate(o.start),end:a.dateEnv.toDate(o.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i,allDay:Boolean(r.allDayDate),allSegs:r.allSegs.map(s),hiddenSegs:r.hiddenSegs.map(s),jsEvent:e,view:a.viewApi})),o&&"popover"!==o?"string"==typeof o&&a.calendarApi.zoomTo(i,o):t.setState({isPopoverOpen:!0})},t.handlePopoverClose=function(){t.setState({isPopoverOpen:!1})},t}return Gt(t,e),t.prototype.render=function(){var e=this,t=this.props;return Kt(Ja.Consumer,null,(function(n){var r=n.viewApi,a=n.options,o=n.calendarApi,i=a.moreLinkText,s=t.moreCnt,u=ps(t),l={num:s,shortText:"+"+s,text:"function"==typeof i?i.call(o,s):"+"+s+" "+i,view:r};return Kt($t,null,Boolean(t.moreCnt)&&Kt(co,{elRef:e.linkElRef,hookProps:l,classNames:a.moreLinkClassNames,content:a.moreLinkContent,defaultContent:t.defaultContent||fs,didMount:a.moreLinkDidMount,willUnmount:a.moreLinkWillUnmount},(function(n,r,a,o){return t.children(n,["fc-more-link"].concat(r),a,o,e.handleClick)})),e.state.isPopoverOpen&&Kt(cs,{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=an(this.linkElRef.current,".fc-view-harness"))},t}(to);function fs(e){return e.text}function ps(e){if(e.allDayDate)return{start:e.allDayDate,end:bn(e.allDayDate,1)};var t,n=e.hiddenSegs;return{start:(t=n,t.reduce(hs).eventRange.range.start),end:gs(n)}}function hs(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function gs(e){return e.reduce(vs).eventRange.range.end}function vs(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._calendarApi=new Ta,t}return Gt(t,e),t.prototype.render=function(){return r(li,{optionOverrides:this.props,calendarApi:this._calendarApi},(function(e){return r(ki,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,a,o){return r("div",{className:t.join(" "),style:{height:n}},r(Ti,Zt({isHeightAuto:a,forPrint:o},e)))}))}))},t.prototype.getApi=function(){return this._calendarApi},t}(n),ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Jt(),t}return Gt(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,a=[],o=Xi(r.options);return e&&a.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),a.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Kt(wo,{viewSpec:r.viewSpec},(function(e,t){return Kt("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Kt(Qi,{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 o=this.props,i=this.context,s=!o.forPrint&&Xi(i.options),u=!o.forPrint&&function(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}(i.options),l=[];return e&&l.push({type:"header",key:"header",isSticky:s,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),l.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),u&&l.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Zi}]}),Kt(wo,{viewSpec:i.viewSpec},(function(e,t){return Kt("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Kt(a,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}))},t}(oo);
|
|
17
|
-
/*!
|
|
18
|
-
FullCalendar v5.7.2
|
|
19
|
-
Docs & License: https://fullcalendar.io/
|
|
20
|
-
(c) 2021 Adam Shaw
|
|
21
|
-
*/function ws(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,o=e;a<o.length;a++){var i=o[a];n[i.row].push(i)}return n}function bs(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,o=e;a<o.length;a++){var i=o[a];n[i.firstCol].push(i)}return n}function Es(e,t){var n=[];if(e){for(i=0;i<t;i+=1)n[i]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,a=e.segs;r<a.length;r++){var o=a[r];n[o.row].segs.push(o)}}else for(var i=0;i<t;i+=1)n[i]=null;return n}var Cs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":Va(e.date),tabIndex:0}:{};return Kt(ts,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:Ts},(function(n,r){return(r||e.forceDayTop)&&Kt("div",{className:"fc-daygrid-day-top",ref:n},Kt("a",Zt({className:"fc-daygrid-day-number"},t),r||Kt($t,null," ")))}))},t}(to);function Ts(e){return e.dayNumberText}var Ds=vr({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ss(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 ks=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props;return Kt(Ji,Zt({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Ds,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(to),Rs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Ds,r=sa(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Kt(Ki,{seg:e.seg,timeText:r,defaultContent:xs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,r,a){return Kt("a",Zt({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(o=e.seg,(i=o.eventRange.def.url)?{href:i}:{})),a);var o,i}))},t}(to);function xs(e){return Kt($t,null,Kt("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Kt("div",{className:"fc-event-time"},e.timeText),Kt("div",{className:"fc-event-title"},e.event.title||Kt($t,null," ")))}var Ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.compileSegs=tr(Ps),t}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.compileSegs(e.singlePlacements),n=t.allSegs,r=t.invisibleSegs;return Kt(ds,{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 Kt($t,null,n.map((function(n){var r=n.eventRange.instance.instanceId;return Kt("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:t[r]?"hidden":""}},Ss(n)?Kt(Rs,Zt({seg:n,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},ua(n,e.todayRange))):Kt(ks,Zt({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},ua(n,e.todayRange))))})))}},(function(e,t,n,r,a){return Kt("a",{ref:e,className:["fc-daygrid-more-link"].concat(t).join(" "),onClick:a},r)}))},t}(to);function Ps(e){for(var t=[],n=[],r=0,a=e;r<a.length;r++){var o=a[r];t.push(o.seg),o.isVisible||n.push(o.seg)}return{allSegs:t,invisibleSegs:n}}var Os=vr({week:"narrow"}),Ns=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Jt(),t.handleRootEl=function(e){ao(t.rootElRef,e),ao(t.props.elRef,e)},t}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=this.rootElRef,r=t.options,a=e.date,o=e.dateProfile,i=r.navLinks?{"data-navlink":Va(a,"week"),tabIndex:0}:{};return Kt(rs,{date:a,dateProfile:o,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,elRef:this.handleRootEl},(function(t,r,s,u){return Kt("td",Zt({ref:t,className:["fc-daygrid-day"].concat(r,e.extraClassNames||[]).join(" ")},s,e.extraDataAttrs),Kt("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:e.innerElRef},e.showWeekNumber&&Kt(ss,{date:a,defaultFormat:Os},(function(e,t,n,r){return Kt("a",Zt({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},i),r)})),!u&&Kt(Cs,{date:a,dateProfile:o,showDayNumber:e.showDayNumber,forceDayTop:e.forceDayTop,todayRange:e.todayRange,extraHookProps:e.extraHookProps}),Kt("div",{className:"fc-daygrid-day-events",ref:e.fgContentElRef},e.fgContent,Kt("div",{className:"fc-daygrid-day-bottom",style:{marginTop:e.moreMarginTop}},Kt(Ms,{allDayDate:a,singlePlacements:e.singlePlacements,moreCnt:e.moreCnt,alignmentElRef:n,alignGridTop:!e.showDayNumber,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange}))),Kt("div",{className:"fc-daygrid-day-bg"},e.bgContent)))}))},t}(oo);function Is(e,t,n,r,a,o,i){var s=new Us;s.allowReslicing=!0,s.strictOrder=r,!0===t||!0===n?(s.maxCoord=o,s.hiddenConsumes=!0):"number"==typeof t?s.maxStackCnt=t:"number"==typeof n&&(s.maxStackCnt=n,s.hiddenConsumes=!0);for(var u=[],l=[],c=0;c<e.length;c+=1){var d=a[(S=e[c]).eventRange.instance.instanceId];null!=d?u.push({index:c,spanStart:S.firstCol,spanEnd:S.lastCol+1,thickness:d}):l.push(S)}for(var f=s.addSegs(u),p=function(e,t,n){for(var r=function(e,t){for(var n=[],r=0;r<t;r+=1)n.push([]);for(var a=0,o=e;a<o.length;a++){var i=o[a];for(r=i.spanStart;r<i.spanEnd;r+=1)n[r].push(i)}return n}(e,n.length),a=[],o=[],i=[],s=0;s<n.length;s+=1){for(var u=r[s],l=[],c=0,d=0,f=0,p=u;f<p.length;f++){var h=p[f],g=t[h.segInput.index];l.push({seg:Hs(g,s,s+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:0,marginTop:h.levelCoord-c}),c=h.levelCoord+h.thickness}var v=[];c=0,d=0;for(var m=0,y=u;m<y.length;m++){h=y[m],g=t[h.segInput.index];var w=h.spanEnd-h.spanStart>1,b=h.spanStart===s;d+=h.levelCoord-c,c=h.levelCoord+h.thickness,w?(d+=h.thickness,b&&v.push({seg:Hs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):b&&(v.push({seg:Hs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!1,absoluteTop:0,marginTop:d}),d=0)}a.push(l),o.push(v),i.push(d)}return{singleColPlacements:a,multiColPlacements:o,leftoverMargins:i}}(s.toRects(),e,i),h=p.singleColPlacements,g=p.multiColPlacements,v=p.leftoverMargins,m=[],y=[],w=0,b=l;w<b.length;w++){g[(S=b[w]).firstCol].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(var E=S.firstCol;E<=S.lastCol;E+=1)h[E].push({seg:Hs(S,E,E+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(E=0;E<i.length;E+=1)m.push(0);for(var C=0,T=f;C<T.length;C++){var D=T[C],S=e[D.segInput.index];g[D.spanStart].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(E=D.spanStart;E<D.spanEnd;E+=1)m[E]+=1,h[E].push({seg:Hs(S,E,E+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(E=0;E<i.length;E+=1)y.push(v[E]);return{singleColPlacements:h,multiColPlacements:g,moreCnts:m,moreMarginTops:y}}function Hs(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;var a=e.eventRange,o=a.range,i=Xr(o,{start:r[t].date,end:bn(r[n-1].date,1)});return Zt(Zt({},e),{firstCol:t,lastCol:n-1,eventRange:{def:a.def,ui:Zt(Zt({},a.ui),{durationEditable:!1}),instance:a.instance,range:i},isStart:e.isStart&&i.start.valueOf()===o.start.valueOf(),isEnd:e.isEnd&&i.end.valueOf()===o.end.valueOf()})}var Us=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hiddenConsumes=!1,t.forceHidden={},t}return Gt(t,e),t.prototype.addSegs=function(t){for(var n=this,r=e.prototype.addSegs.call(this,t),a=this.entriesByLevel,o=function(e){return!n.forceHidden[fi(e)]},i=0;i<a.length;i+=1)a[i]=a[i].filter(o);return r},t.prototype.handleInvalidInsertion=function(t,n,r){var a=this.entriesByLevel,o=this.forceHidden,i=t.nextLevel-1;if(this.hiddenConsumes&&i>=0)for(var s=t.lateralStart;s<t.lateralEnd;s+=1){var u=a[i][s];if(this.allowReslicing){var l=Zt(Zt({},u),{spanStart:Math.max(u.spanStart,n.spanStart),spanEnd:Math.min(u.spanEnd,n.spanEnd)});o[c=fi(l)]||(o[c]=!0,a[i][s]=l,this.splitEntry(u,n,r))}else{var c;o[c=fi(u)]||(o[c]=!0,r.push(u))}}return e.prototype.handleInvalidInsertion.call(this,t,n,r)},t}(ci),As=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new zi,t.frameElRefs=new zi,t.fgElRefs=new zi,t.segHarnessRefs=new zi,t.rootElRef=Jt(),t.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},t}return Gt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context.options,a=t.cells.length,o=bs(t.businessHourSegs,a),i=bs(t.bgEventSegs,a),s=bs(this.getHighlightSegs(),a),u=bs(this.getMirrorSegs(),a),l=Is(na(t.fgEventSegs,r.eventOrder),t.dayMaxEvents,t.dayMaxEventRows,r.eventOrderStrict,n.eventInstanceHeights,n.maxContentHeight,t.cells),c=l.singleColPlacements,d=l.multiColPlacements,f=l.moreCnts,p=l.moreMarginTops,h=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Kt("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var a=e.renderFgSegs(r,t.forPrint?c[r]:d[r],t.todayRange,h),l=e.renderFgSegs(r,function(e,t){if(!e.length)return[];var n=function(e){for(var t={},n=0,r=e;n<r.length;n++)for(var a=r[n],o=0,i=a;o<i.length;o++){var s=i[o];t[s.seg.eventRange.instance.instanceId]=s.absoluteTop}return e}(t);return e.map((function(e){return{seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}}))}(u[r],d),t.todayRange,{},Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Kt(Ns,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,extraDateSpan:n.extraDateSpan,moreCnt:f[r],moreMarginTop:p[r],singlePlacements:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Kt($t,null,Kt($t,null,a),Kt($t,null,l)),bgContent:Kt($t,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(i[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!qn(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,o,i){var s=this.context,u=this.props.eventSelection,l=this.state.framePositions,c=1===this.props.cells.length,d=a||o||i,f=[];if(l)for(var p=0,h=t;p<h.length;p++){var g=h[p],v=g.seg,m=v.eventRange.instance.instanceId,y=m+":"+e,w=g.isVisible&&!r[m],b=g.isAbsolute,E="",C="";b&&(s.isRtl?(C=0,E=l.lefts[v.lastCol]-l.lefts[v.firstCol]):(E=0,C=l.rights[v.firstCol]-l.rights[v.lastCol])),f.push(Kt("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:d?null:this.segHarnessRefs.createRef(y),style:{visibility:w?"":"hidden",marginTop:b?"":g.marginTop,top:b?g.absoluteTop:"",left:E,right:C}},Ss(v)?Kt(Rs,Zt({seg:v,isDragging:a,isSelected:m===u,defaultDisplayEventEnd:c},ua(v,n))):Kt(ks,Zt({seg:v,isDragging:a,isResizing:o,isDateSelecting:i,isSelected:m===u,defaultDisplayEventEnd:c},ua(v,n)))))}return f},t.prototype.renderFillSegs=function(e,t){var n,r=this.context.isRtl,a=this.props.todayRange,o=this.state.framePositions,i=[];if(o)for(var s=0,u=e;s<u.length;s++){var l=u[s],c=r?{right:0,left:o.lefts[l.lastCol]-o.lefts[l.firstCol]}:{left:0,right:o.rights[l.firstCol]-o.rights[l.lastCol]};i.push(Kt("div",{key:(n=l.eventRange,n.instance?n.instance.instanceId:n.def.defId+":"+n.range.start.toISOString()),className:"fc-daygrid-bg-harness",style:c},"bg-event"===t?Kt(os,Zt({seg:l},ua(l,a))):as(t)))}return Kt.apply(void 0,Xt([$t,{}],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 Za(a,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({eventInstanceHeights:this.queryEventInstanceHeights(),maxContentHeight:o?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}(oo);As.addStateEquality({eventInstanceHeights:qn});var Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=tr(ws),t.splitBgEventSegs=tr(ws),t.splitFgEventSegs=tr(ws),t.splitDateSelectionSegs=tr(ws),t.splitEventDrag=tr(Es),t.splitEventResize=tr(Es),t.rowRefs=new zi,t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t}return Gt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,a=t.dayMaxEvents,o=t.expandRows,i=t.cells.length,s=this.splitBusinessHourSegs(t.businessHourSegs,i),u=this.splitBgEventSegs(t.bgEventSegs,i),l=this.splitFgEventSegs(t.fgEventSegs,i),c=this.splitDateSelectionSegs(t.dateSelectionSegs,i),d=this.splitEventDrag(t.eventDrag,i),f=this.splitEventResize(t.eventResize,i),p=!0===a||!0===r;return p&&!o&&(p=!1,r=null,a=null),Kt("div",{className:["fc-daygrid-body",p?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Kt(Oi,{unit:"day"},(function(p,h){return Kt($t,null,Kt("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Kt("tbody",null,t.cells.map((function(o,p){return Kt(As,{ref:e.rowRefs.createRef(p),key:o.length?o[0].date.toISOString():p,showDayNumbers:i>1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:s[p],eventSelection:t.eventSelection,bgEventSegs:u[p].filter(Ws),fgEventSegs:l[p],dateSelectionSegs:c[p],eventDrag:d[p],eventResize:f[p],dayMaxEvents:a,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new Za(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Za(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),o=r.topToIndex(t);if(null!=o&&null!=a){var i=this.props.cells[o][a];return{dateProfile:this.props.dateProfile,dateSpan:Zt({range:this.getCellRange(o,a),allDay:!0},i.extraDateSpan),dayEl:this.getCellEl(o,a),rect:{left:n.lefts[a],right:n.rights[a],top:r.tops[o],bottom:r.bottoms[o]},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:bn(n,1)}},t}(oo);function Ws(e){return e.eventRange.def.allDay}var _s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return Gt(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Fi),qs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new _s,t.tableRef=Jt(),t}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Kt(Fs,Zt({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}(oo);function zs(e,t){var n=new Ui(e.renderRange,t);return new Ai(n,/year|month|week/.test(e.currentRangeUnit))}var Ls=io({initialView:"dayGridMonth",views:{dayGrid:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=tr(zs),t.headerRef=Jt(),t.tableRef=Jt(),t}return Gt(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,a=this.props,o=this.buildDayTableModel(a.dateProfile,r),i=n.dayHeaders&&Kt(Ii,{ref:this.headerRef,dateProfile:a.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),s=function(t){return Kt(qs,{ref:e.tableRef,dateProfile:a.dateProfile,dayTableModel:o,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(i,s,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(i,s)},t}(ys),dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.buildRenderRange=function(t,n,r){var a,o=this.props.dateEnv,i=e.prototype.buildRenderRange.call(this,t,n,r),s=i.start,u=i.end;(/^(year|month)$/.test(n)&&(s=o.startOfWeek(s),(a=o.startOfWeek(u)).valueOf()!==u.valueOf()&&(u=wn(a,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(u=wn(u,6-Math.ceil(Cn(s,u)/7)));return{start:s,end:u}},t}(Do)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Bs=function(e){var n=e.label,r=e.startDate,a=e.endDate,o=e.linkType,i=S(),u=y(),l=u.ids,c=u.data,d=u.basePath,f=new URLSearchParams(i.location.search),p=t((function(e){var t=e.event;e.jsEvent.preventDefault(),i.push(t.url)}),[]),h=t((function(e){var t=e.view;f.set("month",t.currentStart.getMonth()+1),f.set("year",t.currentStart.getFullYear()),i.replace({pathname:i.location.pathname,search:"?"+f.toString()})}),[f]),g=s((function(){return l.map((function(e){return{id:e,title:"string"==typeof n?c[e][n]:n(c[e]),start:"string"==typeof r?c[e][r]:r(c[e]),end:"string"==typeof a?c[e][a]:a(c[e]),url:w(d,e)+"/"+o}}))}),[c,l,d]);return{initialDate:f.has("month")?new Date(f.get("year"),f.get("month")-1):new Date,events:g,datesSet:h,eventClick:p}},Vs=T((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"},".fc-day-today":{backgroundColor:e.palette.secondary.light+" !important"},"a.fc-daygrid-dot-event":{color:"black !important"}}}})),Ys=function(t){var n=D(),r=Bs(t);return Vs(),e.createElement(ms,R({plugins:[Ls],locale:t.locale,initialView:"dayGridMonth",eventBackgroundColor:n.palette.primary.main},r))};Ys.defaultProps={linkType:"edit"};
|
|
22
|
-
/*!
|
|
23
|
-
FullCalendar v5.7.2
|
|
24
|
-
Docs & License: https://fullcalendar.io/
|
|
25
|
-
(c) 2021 Adam Shaw
|
|
26
|
-
*/
|
|
27
|
-
var js=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,r=this.context,a=r.theme,o=r.dateEnv,i=r.options,s=r.viewApi,u=La(t,n),l=i.listDayFormat?o.format(t,i.listDayFormat):"",c=i.listDaySideFormat?o.format(t,i.listDaySideFormat):"",d=i.navLinks?Va(t):null,f=Zt({date:o.toDate(t),view:s,text:l,sideText:c,navLinkData:d},u),p=["fc-list-day"].concat(Ba(u,a));return Kt(co,{hookProps:f,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:Gs,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(e,n,r,o){return Kt("tr",{ref:e,className:p.concat(n).join(" "),"data-date":Jn(t)},Kt("th",{colSpan:3},Kt("div",{className:"fc-list-day-cushion "+a.getClass("tableCellShaded"),ref:r},o)))}))},t}(to);function Gs(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Kt($t,null,e.text&&Kt("a",Zt({className:"fc-list-day-text"},t),e.text),e.sideText&&Kt("a",Zt({className:"fc-list-day-side-text"},t),e.sideText))}var Zs=vr({hour:"numeric",minute:"2-digit",meridiem:"short"}),Xs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Zs;return Kt(Ki,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Qs,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,a,o,i,s){return Kt("tr",{className:["fc-list-event",s.event.url?"fc-event-forced-url":""].concat(a).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var a=e.eventRange.def,o=e.eventRange.instance,i=!1,s=void 0;if(a.allDay?i=!0:(l=e.eventRange.range,Cn((c=Yr(l)).start,c.end)>1?e.isStart?s=sa(e,t,n,null,null,o.range.start,e.end):e.isEnd?s=sa(e,t,n,null,null,e.start,o.range.end):i=!0:s=sa(e,t,n)),i){var u={text:n.options.allDayText,view:n.viewApi};return Kt(co,{hookProps:u,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Ks,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Kt("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Kt("td",{className:"fc-list-event-time"},s)}var l,c;return null}(n,r,t),Kt("td",{className:"fc-list-event-graphic"},Kt("span",{className:"fc-list-event-dot",style:{borderColor:s.borderColor||s.backgroundColor}})),Kt("td",{className:"fc-list-event-title",ref:o},i))}))},t}(to);function Qs(e){var t=e.event,n=t.url;return Kt("a",Zt({},n?{href:n}:{}),t.title)}function Ks(e){return e.text}function Js(e){return e.text}function $s(e){for(var t=Dn(e.renderRange.start),n=e.renderRange.end,r=[],a=[];t<n;)r.push(t),a.push({start:t,end:bn(t,1)}),t=bn(t,1);return{dayDates:r,dayRanges:a}}function eu(e){return!1===e?null:vr(e)}var tu=io({optionRefiners:{listDayFormat:eu,listDaySideFormat:eu,noEventsClassNames:kr,noEventsContent:kr,noEventsDidMount:kr,noEventsWillUnmount:kr},views:{list:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=tr($s),t.eventStoreToSegs=tr(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return Gt(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),o=a.dayDates,i=a.dayRanges,s=this.eventStoreToSegs(t.eventStore,t.eventUiBases,i);return Kt(wo,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,a){return Kt("div",{ref:n,className:r.concat(a).join(" ")},Kt(qi,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},s.length>0?e.renderSegList(s,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Kt(co,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Js,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Kt("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Kt("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,o=function(e){var t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Kt(Oi,{unit:"day"},(function(e,n){for(var i=[],s=0;s<o.length;s+=1){var u=o[s];if(u){var l=t[s].toISOString();i.push(Kt(js,{key:l,dayDate:t[s],todayRange:n}));for(var c=0,d=u=na(u,a.eventOrder);c<d.length;c++){var f=d[c];i.push(Kt(Xs,Zt({key:l+":"+f.eventRange.instance.instanceId,seg:f,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},ua(f,n,e))))}}}return Kt("table",{className:"fc-list-table "+r.getClass("table")},Kt("tbody",null,i))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(Kr(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 o=a[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,a,o=this.context.dateEnv,i=this.context.options.nextDayThreshold,s=e.range,u=e.def.allDay,l=[];for(n=0;n<t.length;n+=1)if((r=Xr(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},l.push(a),!a.isEnd&&!u&&n+1<t.length&&s.end<o.add(t[n+1].start,i))){a.end=s.end,a.isEnd=!0;break}return l},t}(oo),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"}}}}),nu=T((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"}}}})),ru=function(t){var n=Bs(t);return nu(),e.createElement(ms,R({plugins:[tu],locale:t.locale,initialView:"listMonth"},n))};ru.defaultProps={linkType:"edit"};var au=function(t){return e.createElement(Yt,R({PickerComponent:l},t))},ou=function(t){return e.createElement(Yt,R({PickerComponent:c},t))},iu=function(t){return e.createElement(Yt,R({PickerComponent:d},t))},su=function(t){return e.createElement(Yt,R({PickerComponent:f},t))},uu=function(t){return e.createElement(Yt,R({PickerComponent:p},t))},lu=function(t){return e.createElement(Yt,R({PickerComponent:h},t))};export{Ys as CalendarList,au as DateInput,iu as DateTimeInput,ru as DaysList,su as KeyboardDateInput,uu as KeyboardDateTimeInput,lu as KeyboardTimeInput,ou as TimeInput,Bs as useFullCalendarProps};
|
|
1
|
+
import e,{useCallback as t,useMemo as r}from"react";import{MuiPickersUtilsProvider as n,DatePicker as a,TimePicker as o,DateTimePicker as i,KeyboardDatePicker as l,KeyboardDateTimePicker as c,KeyboardTimePicker as u}from"@material-ui/pickers";import{useTranslate as p,useInput as s,FieldTitle as m,InputHelperText as f,useListContext as d,linkToRecord as g}from"react-admin";import v from"@date-io/date-fns";import b from"@fullcalendar/react";import h from"@fullcalendar/daygrid";import{makeStyles as y,useTheme as O}from"@material-ui/core";import{useHistory as P}from"react-router-dom";import w from"@fullcalendar/list";function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(){return(D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function j(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return function(t){return("0".repeat(e)+t).slice(-e)}},S=E(4),T=E(2),V=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,x=function(e){if(!(e instanceof Date)||isNaN(e.getDate()))return"";var t=S(e.getFullYear()),r=T(e.getMonth()+1),n=T(e.getDate()),a=T(e.getHours()),o=T(e.getMinutes());return"".concat(t,"-").concat(r,"-").concat(n,"T").concat(a,":").concat(o)},F=function(e){return null==e||""===e?"":e instanceof Date?x(e):V.test(e)?e:x(new Date(e))},I=function(e){return e?new Date(e):""},B=["allowEmpty","alwaysOn","basePath","component","defaultValue","format","formClassName","initialValue","initializeForm","input","isRequired","label","limitChoicesToValue","locale","meta","options","optionText","optionValue","parse","record","resource","source","textAlign","translate","translateChoice","labelTime"],R=["PickerComponent","format","label","options","source","resource","helperText","margin","onBlur","onChange","onFocus","parse","validate","variant","defaultValue","providerOptions","pickerVariant","stringFormat"],q=function(r){var a=r.PickerComponent,o=r.format,i=void 0===o?F:o,l=r.label,c=r.options,u=r.source,d=r.resource,g=r.helperText,b=r.margin,h=void 0===b?"dense":b,y=r.onBlur,O=r.onChange,P=r.onFocus,w=r.parse,E=void 0===w?I:w,S=r.validate,T=r.variant,V=void 0===T?"filled":T;r.defaultValue;var x,q=r.providerOptions,M=q.utils,L=q.locale,N=r.pickerVariant,z=void 0===N?"dialog":N,A=r.stringFormat,Y=void 0===A?"ISO":A,_=j(r,R),G=p(),H=s(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){k(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({format:i,onBlur:y,onChange:O,onFocus:P,parse:E,resource:d,source:u,validate:S},_)),U=H.id,$=H.input,J=H.isRequired,K=H.meta,Q=K.error,W=K.touched,X=t((function(e){Date.parse(e)?$.onChange("ISO"===Y?e.toISOString():e.toString()):$.onChange(null)}),[]);return e.createElement(n,{utils:M||v,locale:L},e.createElement(a,D({id:U,InputLabelProps:{shrink:!0},label:e.createElement(m,{label:l,source:u,resource:d,isRequired:J}),variant:z,inputVariant:V,margin:h,error:!(!W||!Q),helperText:e.createElement(f,{touched:W,error:Q,helperText:g}),clearLabel:G("ra.action.clear_input_value"),cancelLabel:G("ra.action.cancel")},c,((x=_).allowEmpty,x.alwaysOn,x.basePath,x.component,x.defaultValue,x.format,x.formClassName,x.initialValue,x.initializeForm,x.input,x.isRequired,x.label,x.limitChoicesToValue,x.locale,x.meta,x.options,x.optionText,x.optionValue,x.parse,x.record,x.resource,x.source,x.textAlign,x.translate,x.translateChoice,x.labelTime,j(x,B)),{value:$.value?new Date($.value):null,onChange:function(e){return X(e)},onBlur:function(){return $.onBlur($.value?"ISO"===Y?new Date($.value).toISOString():new Date($.value).toString():null)}})))};q.defaultProps={isRequired:!1,meta:{touched:!1,error:!1},options:{},providerOptions:{utils:v,locale:void 0}};var M=function(e){var n=e.label,a=e.startDate,o=e.endDate,i=e.linkType,l=P(),c=d(),u=c.ids,p=c.data,s=c.basePath,m=new URLSearchParams(l.location.search),f=t((function(e){var t=e.event;e.jsEvent.preventDefault(),l.push(t.url)}),[]),v=t((function(e){var t=e.view;m.set("month",t.currentStart.getMonth()+1),m.set("year",t.currentStart.getFullYear()),l.replace({pathname:l.location.pathname,search:"?"+m.toString()})}),[m]),b=r((function(){return u.map((function(e){return{id:e,title:"string"==typeof n?p[e][n]:n(p[e]),start:"string"==typeof a?p[e][a]:a(p[e]),end:"string"==typeof o?p[e][o]:o(p[e]),url:g(s,e)+"/"+i}}))}),[p,u,s]);return{initialDate:m.has("month")?new Date(m.get("year"),m.get("month")-1):new Date,events:b,datesSet:v,eventClick:f}},L=y((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"},".fc-day-today":{backgroundColor:e.palette.secondary.light+" !important"},"a.fc-daygrid-dot-event":{color:"black !important"}}}})),N=function(t){var r=O(),n=M(t);return L(),e.createElement(b,D({plugins:[h],locale:t.locale,initialView:"dayGridMonth",eventBackgroundColor:r.palette.primary.main},n))};N.defaultProps={linkType:"edit"};var z=y((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"}}}})),A=function(t){var r=M(t);return z(),e.createElement(b,D({plugins:[w],locale:t.locale,initialView:"listMonth"},r))};A.defaultProps={linkType:"edit"};var Y=function(t){return e.createElement(q,D({PickerComponent:a},t))},_=function(t){return e.createElement(q,D({PickerComponent:o},t))},G=function(t){return e.createElement(q,D({PickerComponent:i},t))},H=function(t){return e.createElement(q,D({PickerComponent:l},t))},U=function(t){return e.createElement(q,D({PickerComponent:c},t))},$=function(t){return e.createElement(q,D({PickerComponent:u},t))};export{N as CalendarList,Y as DateInput,G as DateTimeInput,A as DaysList,H as KeyboardDateInput,U as KeyboardDateTimeInput,$ as KeyboardTimeInput,_ as TimeInput,M as useFullCalendarProps};
|
|
28
2
|
//# sourceMappingURL=index.es.js.map
|