@semapps/date-components 0.4.0-alpha.5 → 0.4.0-alpha.6
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.cjs.js
CHANGED
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("@material-ui/pickers"),a=require("react-admin"),o=require("react-dom"),i=require("@material-ui/core"),s=require("react-router-dom");function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return(l=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 c(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 d(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 f(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 p(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 h(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=p(e),r=f(t);return n.setDate(n.getDate()+r),n}function g(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(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 v(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=p(e),r=f(t),a=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),a,1),o.setHours(0,0,0,0);var i=g(o);return n.setMonth(a,Math.min(i,n.getDate())),n}function m(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=f(t);return v(e,12*n)}function y(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e);return t.setHours(23,59,59,999),t}function w(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:f(a),i=null==n.weekStartsOn?o:f(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=p(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 b(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function C(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e);return!isNaN(t)}var E={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 T(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var D={date:T({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:T({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:T({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},S={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function k(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 R(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 x,M={code:"en-US",formatDistance:function(e,t,n){var r;return n=n||{},r="string"==typeof E[e]?E[e]:1===t?E[e].one:E[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:D,formatRelative:function(e,t,n,r){return S[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:k({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:k({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:k({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:k({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:k({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:(x={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(x.matchPattern);if(!a)return null;var o=a[0],i=n.match(x.parsePattern);if(!i)return null;var s=x.valueCallback?x.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:R({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:R({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:R({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:R({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:R({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 P(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=p(e).getTime(),r=f(t);return new Date(n+r)}function O(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=f(t);return P(e,-n)}function N(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var I=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return N("yy"===t?r%100:r,t.length)},H=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):N(n+1,2)},U=function(e,t){return N(e.getUTCDate(),t.length)},A=function(e,t){return N(e.getUTCHours()%12||12,t.length)},F=function(e,t){return N(e.getUTCHours(),t.length)},W=function(e,t){return N(e.getUTCMinutes(),t.length)},_=function(e,t){return N(e.getUTCSeconds(),t.length)},q=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return N(Math.floor(r*Math.pow(10,n-3)),t.length)};function L(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=1,n=p(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 z(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=L(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var i=L(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function B(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=z(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=L(n);return r}function V(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e),n=L(t).getTime()-B(t).getTime();return Math.round(n/6048e5)+1}function Y(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:f(a),i=null==n.weekStartsOn?o:f(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=p(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 j(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=p(e,t),r=n.getUTCFullYear(),a=t||{},o=a.locale,i=o&&o.options&&o.options.firstWeekContainsDate,s=null==i?1:f(i),u=null==a.firstWeekContainsDate?s:f(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=Y(l,t),d=new Date(0);d.setUTCFullYear(r,0,u),d.setUTCHours(0,0,0,0);var h=Y(d,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function G(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:f(a),i=null==n.firstWeekContainsDate?o:f(n.firstWeekContainsDate),s=j(e,t),u=new Date(0);u.setUTCFullYear(s,0,i),u.setUTCHours(0,0,0,0);var l=Y(u,t);return l}function Z(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=p(e),r=Y(n,t).getTime()-G(n,t).getTime();return Math.round(r/6048e5)+1}var X="midnight",Q="noon",K="morning",J="afternoon",$="evening",ee="night",te={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 I(e,t)},Y:function(e,t,n,r){var a=j(e,r),o=a>0?a:1-a;return"YY"===t?N(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):N(o,t.length)},R:function(e,t){return N(z(e),t.length)},u:function(e,t){return N(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 N(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 N(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 H(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 N(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=Z(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):N(a,t.length)},I:function(e,t,n){var r=V(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):N(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):U(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=p(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"}):N(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 N(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 N(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 N(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?Q:0===a?X: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?$:a>=12?J:a>=4?K:ee,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 A(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):F(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):W(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):_(e,t)},S:function(e,t){return q(e,t)},X:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return re(a);case"XXXX":case"XX":return ae(a);case"XXXXX":case"XXX":default:return ae(a,":")}},x:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return re(a);case"xxxx":case"xx":return ae(a);case"xxxxx":case"xxx":default:return ae(a,":")}},O:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ne(a,":");case"OOOO":default:return"GMT"+ae(a,":")}},z:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ne(a,":");case"zzzz":default:return"GMT"+ae(a,":")}},t:function(e,t,n,r){var a=r._originalDate||e;return N(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,n,r){return N((r._originalDate||e).getTime(),t.length)}};function ne(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+N(o,2)}function re(e,t){return e%60==0?(e>0?"-":"+")+N(Math.abs(e)/60,2):ae(e,t)}function ae(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e);return r+N(Math.floor(a/60),2)+n+N(a%60,2)}function oe(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 ie(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:ie,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),a=r[1],o=r[2];if(!o)return oe(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}}",oe(a,t)).replace("{{time}}",ie(o,t))}};function ue(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}var le=["D","DD"],ce=["YY","YYYY"];function de(e){return-1!==le.indexOf(e)}function fe(e){return-1!==ce.indexOf(e)}function pe(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 he=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ve=/^'([^]*?)'?$/,me=/''/g,ye=/[a-zA-Z]/;function we(e){return e.match(ve)[1].replace(me,"'")}function be(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=p(e),r=p(t);return n.getTime()>r.getTime()}function Ce(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=p(e),r=p(t);return n.getTime()<r.getTime()}function Ee(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e);return t.setHours(0,0,0,0),t}function Te(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e);return t.setMinutes(0,0,0),t}function De(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 Se(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:f(o),s=null==r.weekStartsOn?i:f(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=p(e),l=f(t),c=u.getUTCDay(),d=l%7,h=(d+7)%7,g=(h<s?7:0)+l-c;return u.setUTCDate(u.getUTCDate()+g),u}var ke=/^(1[0-2]|0?\d)/,Re=/^(3[0-1]|[0-2]?\d)/,xe=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Me=/^(5[0-3]|[0-4]?\d)/,Pe=/^(2[0-3]|[0-1]?\d)/,Oe=/^(2[0-4]|[0-1]?\d)/,Ne=/^(1[0-1]|0?\d)/,Ie=/^(1[0-2]|0?\d)/,He=/^[0-5]?\d/,Ue=/^[0-5]?\d/,Ae=/^\d/,Fe=/^\d{1,2}/,We=/^\d{1,3}/,_e=/^\d{1,4}/,qe=/^-?\d+/,Le=/^-?\d/,ze=/^-?\d{1,2}/,Be=/^-?\d{1,3}/,Ve=/^-?\d{1,4}/,Ye=/^([+-])(\d{2})(\d{2})?|Z/,je=/^([+-])(\d{2})(\d{2})|Z/,Ge=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ze=/^([+-])(\d{2}):(\d{2})|Z/,Xe=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Qe(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 Ke(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 Je(e,t){return Qe(qe,e,t)}function $e(e,t,n){switch(e){case 1:return Qe(Ae,t,n);case 2:return Qe(Fe,t,n);case 3:return Qe(We,t,n);case 4:return Qe(_e,t,n);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t,n)}}function et(e,t,n){switch(e){case 1:return Qe(Le,t,n);case 2:return Qe(ze,t,n);case 3:return Qe(Be,t,n);case 4:return Qe(Ve,t,n);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function tt(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 nt(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 rt=[31,28,31,30,31,30,31,31,30,31,30,31],at=[31,29,31,30,31,30,31,31,30,31,30,31];function ot(e){return e%400==0||e%4==0&&e%100!=0}var it={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 $e(4,e,a);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:a});default:return $e(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=nt(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 $e(4,e,a);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:a});default:return $e(t.length,e,a)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var a=j(e,r);if(n.isTwoDigitYear){var o=nt(n.year,a);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Y(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),Y(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 et("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),L(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 et("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 $e(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 $e(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 Qe(ke,e,a);case"MM":return $e(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 Qe(ke,e,a);case"LL":return $e(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 Qe(Me,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return Y(function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=p(e),a=f(t),o=Z(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 Qe(Me,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return L(function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=p(e),r=f(t),a=V(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 Qe(Re,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}},validate:function(e,t,n){var r=ot(e.getUTCFullYear()),a=e.getUTCMonth();return r?t>=1&&t<=at[a]:t>=1&&t<=rt[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 Qe(xe,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}},validate:function(e,t,n){return ot(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=Se(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 $e(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=Se(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 $e(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=Se(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 $e(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=f(t);n%7==0&&(n-=7);var r=1,a=p(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(tt(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(tt(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(tt(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,r){switch(t){case"h":return Qe(Ie,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return $e(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 Qe(Pe,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return $e(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 Qe(Ne,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return $e(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 Qe(Oe,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return $e(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 Qe(He,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return $e(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 Qe(Ue,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return $e(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 $e(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 Ke(Ye,e);case"XX":return Ke(je,e);case"XXXX":return Ke(Ge,e);case"XXXXX":return Ke(Xe,e);case"XXX":default:return Ke(Ze,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 Ke(Ye,e);case"xx":return Ke(je,e);case"xxxx":return Ke(Ge,e);case"xxxxx":return Ke(Xe,e);case"xxx":default:return Ke(Ze,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 Je(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 Je(e)},set:function(e,t,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},st=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ut=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lt=/^'([^]*?)'?$/,ct=/''/g,dt=/\S/,ft=/[a-zA-Z]/;function pt(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 ht(e){return e.match(lt)[1].replace(ct,"'")}function gt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function mt(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:f(a),i=null==n.weekStartsOn?o:f(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=p(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 yt(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=p(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var wt=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 h(e,t)},e.prototype.isValid=function(e){return C(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=p(e),r=p(t);return n.getTime()-r.getTime()}(e,this.date(t))},e.prototype.isAfter=function(e,t){return be(e,t)},e.prototype.isBefore=function(e,t){return Ce(e,t)},e.prototype.startOfDay=function(e){return Ee(e)},e.prototype.endOfDay=function(e){return y(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=p(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=p(e),r=f(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=p(e),r=f(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=p(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=p(e),r=f(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=Ee(e),r=Ee(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=p(e),r=p(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=p(e),r=p(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=Te(e),r=Te(t);return n.getTime()===r.getTime()}(e,t)},e.prototype.startOfMonth=function(e){return gt(e)},e.prototype.endOfMonth=function(e){return vt(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=p(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=p(e),r=f(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||M;if(!s.match)throw new RangeError("locale must contain match property");var u=s.options&&s.options.firstWeekContainsDate,l=null==u?1:f(u),c=null==i.firstWeekContainsDate?l:f(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,h=null==d?0:f(d),g=null==i.weekStartsOn?h:f(i.weekStartsOn);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===o)return""===a?p(n):new Date(NaN);var v,m={firstWeekContainsDate:c,weekStartsOn:g,locale:s},y=[{priority:10,set:pt,index:0}],w=o.match(ut).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,se[t])(e,s.formatLong,m):e})).join("").match(st),b=[];for(v=0;v<w.length;v++){var C=w[v];!i.useAdditionalWeekYearTokens&&fe(C)&&pe(C),!i.useAdditionalDayOfYearTokens&&de(C)&&pe(C);var E=C[0],T=it[E];if(T){var D=T.incompatibleTokens;if(Array.isArray(D)){for(var S=void 0,k=0;k<b.length;k++){var R=b[k].token;if(-1!==D.indexOf(R)||R===E){S=b[k];break}}if(S)throw new RangeError("The format string mustn't contain `".concat(S.fullToken,"` and `").concat(C,"` at the same time"))}else if("*"===T.incompatibleTokens&&b.length)throw new RangeError("The format string mustn't contain `".concat(C,"` and any other token at the same time"));b.push({token:E,fullToken:C});var x=T.parse(a,C,s.match,m);if(!x)return new Date(NaN);y.push({priority:T.priority,set:T.set,validate:T.validate,value:x.value,index:y.length}),a=x.rest}else{if(E.match(ft))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");if("''"===C?C="'":"'"===E&&(C=ht(C)),0!==a.indexOf(C))return new Date(NaN);a=a.slice(C.length)}}if(a.length>0&&dt.test(a))return new Date(NaN);var P=y.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 y.filter((function(t){return t.priority===e})).reverse()})).map((function(e){return e[0]})),N=p(n);if(isNaN(N))return new Date(NaN);var I=O(N,ue(N)),H={};for(v=0;v<P.length;v++){var U=P[v];if(U.validate&&!U.validate(I,U.value,m))return new Date(NaN);var A=U.set(I,H,U.value,m);A[0]?(I=A[0],De(H,A[1])):I=A}return I}(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||M,i=o.options&&o.options.firstWeekContainsDate,s=null==i?1:f(i),u=null==a.firstWeekContainsDate?s:f(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:f(l),d=null==a.weekStartsOn?c:f(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 h=p(e);if(!C(h))throw new RangeError("Invalid time value");var g=ue(h),v=O(h,g),m={firstWeekContainsDate:u,weekStartsOn:d,locale:o,_originalDate:h},y=r.match(ge).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,se[t])(e,o.formatLong,m):e})).join("").match(he).map((function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return we(e);var n=te[t];if(n)return!a.useAdditionalWeekYearTokens&&fe(e)&&pe(e),!a.useAdditionalDayOfYearTokens&&de(e)&&pe(e),n(v,e,o.localize,m);if(t.match(ye))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return e})).join("");return y}(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=p(e),r=p(t);return n.getTime()===r.getTime()}(e,t)},e.prototype.isNull=function(e){return null===e},e.prototype.isAfterDay=function(e,t){return be(e,y(t))},e.prototype.isBeforeDay=function(e,t){return Ce(e,Ee(t))},e.prototype.isBeforeYear=function(e,t){return Ce(e,yt(t))},e.prototype.isAfterYear=function(e,t){return be(e,b(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=p(e),r=f(t),a=n.getFullYear(),o=n.getDate(),i=new Date(0);i.setFullYear(a,r,15),i.setHours(0,0,0,0);var s=g(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 v(e,1)},e.prototype.getPreviousMonth=function(e){return v(e,-1)},e.prototype.getMonthArray=function(e){for(var t=[yt(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=p(n.start),a=p(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(p(s)),s.setDate(s.getDate()+u),s.setHours(0,0,0,0);return i}({start:mt(t,{locale:this.locale}),end:w(t,{locale:this.locale})}).map((function(t){return e.format(t,"EEEEEE")}))},e.prototype.getWeekArray=function(e){for(var t=mt(gt(e),{locale:this.locale}),n=w(vt(e),{locale:this.locale}),r=0,a=t,o=[];Ce(a,n);){var i=Math.floor(r/7);o[i]=o[i]||[],o[i].push(a),a=h(a,1),r+=1}return o},e.prototype.getYearRange=function(e,t){for(var n=yt(e),r=b(t),a=[],o=n;Ce(o,r);)a.push(o),o=m(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}(),bt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return function(t){return("0".repeat(e)+t).slice(-e)}},Ct=bt(4),Et=bt(2),Tt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,Dt=function(e){if(!(e instanceof Date)||isNaN(e.getDate()))return"";var t=Ct(e.getFullYear()),n=Et(e.getMonth()+1),r=Et(e.getDate()),a=Et(e.getHours()),o=Et(e.getMinutes());return"".concat(t,"-").concat(n,"-").concat(r,"T").concat(a,":").concat(o)},St=function(e){return null==e||""===e?"":e instanceof Date?Dt(e):Tt.test(e)?e:Dt(new Date(e))},kt=function(e){return e?new Date(e):""},Rt=function(e){var o=e.PickerComponent,i=e.format,s=void 0===i?St:i,f=e.label,p=e.options,h=e.source,g=e.resource,v=(e.helperText,e.margin),m=void 0===v?"dense":v,y=e.onBlur,w=e.onChange,b=e.onFocus,C=e.parse,E=void 0===C?kt:C,T=e.validate,D=e.variant,S=void 0===D?"filled":D,k=(e.defaultValue,e.providerOptions),R=k.utils,x=k.locale,M=e.pickerVariant,P=void 0===M?"dialog":M,O=e.stringFormat,N=void 0===O?"ISO":O,I=d(e,["PickerComponent","format","label","options","source","resource","helperText","margin","onBlur","onChange","onFocus","parse","validate","variant","defaultValue","providerOptions","pickerVariant","stringFormat"]),H=a.useTranslate(),U=a.useInput(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({format:s,onBlur:y,onChange:w,onFocus:b,parse:E,resource:g,source:h,validate:T},I)),A=U.id,F=U.input,W=U.isRequired,_=U.meta,q=_.error,L=_.touched,z=t.useCallback((function(e){Date.parse(e)?F.onChange("ISO"===N?e.toISOString():e.toString()):F.onChange(null)}),[]);return n.createElement(r.MuiPickersUtilsProvider,{utils:R||wt,locale:x},n.createElement(o,l({id:A,InputLabelProps:{shrink:!0},label:n.createElement(a.FieldTitle,{label:f,source:h,resource:g,isRequired:W}),variant:P,inputVariant:S,margin:m,error:!(!L||!q),helperText:" ",clearLabel:H("ra.action.clear_input_value"),cancelLabel:H("ra.action.cancel")},p,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 d(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"])}(I),{value:F.value?new Date(F.value):null,onChange:function(e){return z(e)},onBlur:function(){return F.onBlur(F.value?"ISO"===N?new Date(F.value).toISOString():new Date(F.value).toString():null)}})))};Rt.defaultProps={isRequired:!1,meta:{touched:!1,error:!1},options:{},providerOptions:{utils:wt,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 xt=function(e,t){return(xt=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 Mt(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}xt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Pt=function(){return(Pt=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 Ot(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:t.Component,createElement:t.createElement,render:o.render,createRef:t.createRef,Fragment:t.Fragment,createContext:t.createContext,createPortal:o.createPortal,flushToDom:function(){},unmountComponentAtNode:o.unmountComponentAtNode},"undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Nt=FullCalendarVDom.Component,It=FullCalendarVDom.createElement,Ht=(FullCalendarVDom.render,FullCalendarVDom.createRef),Ut=FullCalendarVDom.Fragment,At=FullCalendarVDom.createContext,Ft=FullCalendarVDom.createPortal,Wt=(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 _t(e){e.parentNode&&e.parentNode.removeChild(e)}function qt(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Lt(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Lt(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var zt=/(top|left|right|bottom|width|height)$/i;function Bt(e,t,n){null==n?e.style[t]="":"number"==typeof n&&zt.test(t)?e.style[t]=n+"px":e.style[t]=n}function Vt(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 Yt(e,t){return function(n){var r=qt(n.target,e);r&&t.call(r,n,r)}}function jt(e,t,n,r){var a=Yt(n,r);return e.addEventListener(t,a),function(){e.removeEventListener(t,a)}}var Gt=0;function Zt(){return String(Gt+=1)}function Xt(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 Qt(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function Kt(e){return e%1==0}function Jt(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 $t=["sun","mon","tue","wed","thu","fri","sat"];function en(e,t){var n=dn(e);return n[2]+=7*t,fn(n)}function tn(e,t){var n=dn(e);return n[2]+=t,fn(n)}function nn(e,t){var n=dn(e);return n[6]+=t,fn(n)}function rn(e,t){return(t.valueOf()-e.valueOf())/864e5}function an(e,t){return hn(e)===hn(t)?Math.round(rn(e,t)):null}function on(e){return fn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function sn(e,t,n,r){var a=fn([t,0,1+un(t,n,r)]),o=on(e),i=Math.round(rn(a,o));return Math.floor(i/7)+1}function un(e,t,n){var r=7+t-n;return-((7+fn([e,0,r]).getUTCDay()-t)%7)+r-1}function ln(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function cn(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 dn(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function fn(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function pn(e){return!isNaN(e.valueOf())}function hn(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function gn(e,t,n,r){return{instanceId:Zt(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var vn=Object.prototype.hasOwnProperty;function mn(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]=mn(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 yn(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function wn(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function bn(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Cn(e){var t=[];for(var n in e)t.push(e[n]);return t}function En(e,t){if(e===t)return!0;for(var n in e)if(vn.call(e,n)&&!(n in t))return!1;for(var n in t)if(vn.call(t,n)&&e[n]!==t[n])return!1;return!0}function Tn(e,t){var n=[];for(var r in e)vn.call(e,r)&&(r in t||n.push(r));for(var r in t)vn.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Dn(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!Sn(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function Sn(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function kn(e,t,n){var r=n.dateEnv,a=n.pluginHooks,o=n.options,i=e.defs,s=e.instances;for(var u in s=yn(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=Rn(l,c,t,r,a.recurringTypes);d<f.length;d++){var p=f[d],h=gn(u,{start:p,end:r.add(p,c)});s[h.instanceId]=h}}}return{defs:i,instances:s}}function Rn(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(on)),o}var xn=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Mn(e,t){var n;return"string"==typeof e?function(e){var t=xn.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?Pn(e):"number"==typeof e?Pn(((n={})[t||"milliseconds"]=e,n)):null}function Pn(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 On(e){return Nn(e)/864e5}function Nn(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function In(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 Hn(e){return e.toISOString().replace(/T.*$/,"")}function Un(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+Qt(a,2)+":"+Qt(o,2):"GMT"+n+a+(o?":"+Qt(o,2):"")}function An(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 Fn(e,t,n){var r,a;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(r){if(!An(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 Wn(e,t,n){var r,a,o=this;return function(i){if(r){if(!En(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 _n={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},qn={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Ln=/\s*([ap])\.?m\.?/i,zn=/,/g,Bn=/\s+/g,Vn=/\u200e/g,Yn=/UTC|GMT/,jn=function(){function e(e){var t={},n={},r=0;for(var a in e)a in _n?(n[a]=e[a],r=Math.max(_n[a],r)):(t[a]=e[a],a in qn&&(r=Math.max(qn[a],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Fn(Gn)}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(hn(e)!==hn(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=Gn(function(e,t){var n={};for(var r in e)(!(r in qn)||qn[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 Gn(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return Un(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=Pt({},e),t=Pt({},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=Pt({},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(Vn,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(Yn,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===a.timeZone||null==t.timeZoneOffset?"UTC":Un(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(zn,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(Ln,"").trim():"narrow"===r.meridiem?e=e.replace(Ln,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(Ln,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(Ln,(function(e){return e.toLocaleLowerCase()})));return e=(e=e.replace(Bn," ")).trim()}((r&&!i.getUTCMinutes()?r:a).format(i),o,e,t,n)}}(e,t,n)}function Zn(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 Xn(e,t,n,r){var a=Zn(e,n.calendarSystem);return{date:a,start:a,end:t?Zn(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var Qn=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,Xn(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,Xn(e,t,n,r))},e}(),Kn=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(Xn(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(Xn(e,t,n,r))},e}();function Jn(e){return"object"==typeof e&&e?new jn(e):"string"==typeof e?new Qn(e):"function"==typeof e?new Kn(e):null}var $n={navLinkDayClick:ur,navLinkWeekClick:ur,duration:Mn,bootstrapFontAwesome:ur,buttonIcons:ur,customButtons:ur,defaultAllDayEventDuration:Mn,defaultTimedEventDuration:Mn,nextDayThreshold:Mn,scrollTime:Mn,scrollTimeReset:Boolean,slotMinTime:Mn,slotMaxTime:Mn,dayPopoverFormat:Jn,slotDuration:Mn,snapDuration:Mn,headerToolbar:ur,footerToolbar:ur,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Jn,dayHeaderClassNames:ur,dayHeaderContent:ur,dayHeaderDidMount:ur,dayHeaderWillUnmount:ur,dayCellClassNames:ur,dayCellContent:ur,dayCellDidMount:ur,dayCellWillUnmount:ur,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:ur,weekNumbers:Boolean,weekNumberClassNames:ur,weekNumberContent:ur,weekNumberDidMount:ur,weekNumberWillUnmount:ur,editable:Boolean,viewClassNames:ur,viewDidMount:ur,viewWillUnmount:ur,nowIndicator:Boolean,nowIndicatorClassNames:ur,nowIndicatorContent:ur,nowIndicatorDidMount:ur,nowIndicatorWillUnmount:ur,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:ur,locale:ur,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:ur,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:ur,contentHeight:ur,direction:String,weekNumberFormat:Jn,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:ur,initialDate:ur,now:ur,eventDataTransform:ur,stickyHeaderDates:ur,stickyFooterScrollbar:ur,viewHeight:ur,defaultAllDay:Boolean,eventSourceFailure:ur,eventSourceSuccess:ur,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:ur,eventConstraint:ur,eventAllow:ur,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:ur,eventContent:ur,eventDidMount:ur,eventWillUnmount:ur,selectConstraint:ur,selectOverlap:ur,selectAllow:ur,droppable:Boolean,unselectCancel:String,slotLabelFormat:ur,slotLaneClassNames:ur,slotLaneContent:ur,slotLaneDidMount:ur,slotLaneWillUnmount:ur,slotLabelClassNames:ur,slotLabelContent:ur,slotLabelDidMount:ur,slotLabelWillUnmount:ur,dayMaxEvents:ur,dayMaxEventRows:ur,dayMinWidth:Number,slotLabelInterval:Mn,allDayText:String,allDayClassNames:ur,allDayContent:ur,allDayDidMount:ur,allDayWillUnmount:ur,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Jn,rerenderDelay:Number,moreLinkText:ur,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:ur,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Mn,hiddenDays:ur,monthMode:Boolean,fixedWeekCount:Boolean,validRange:ur,visibleRange:ur,titleFormat:ur,noEventsText:String,moreLinkClick:ur,moreLinkClassNames:ur,moreLinkContent:ur,moreLinkDidMount:ur,moreLinkWillUnmount:ur},er={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},tr={datesSet:ur,eventsSet:ur,eventAdd:ur,eventChange:ur,eventRemove:ur,windowResize:ur,eventClick:ur,eventMouseEnter:ur,eventMouseLeave:ur,select:ur,unselect:ur,loading:ur,_unmount:ur,_beforeprint:ur,_afterprint:ur,_noEventDrop:ur,_noEventResize:ur,_resize:ur,_scrollRequest:ur},nr={buttonText:ur,views:ur,plugins:ur,initialEvents:ur,events:ur,eventSources:ur},rr={headerToolbar:ar,footerToolbar:ar,buttonText:ar,buttonIcons:ar};function ar(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?En(e,t):e===t}var or={type:String,component:ur,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:ur,usesMinMaxTime:Boolean,classNames:ur,content:ur,didMount:ur,willUnmount:ur};function ir(e){return mn(e,rr)}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 ur(e){return e}function lr(e,t,n,r){for(var a={defs:{},instances:{}},o=Dr(n),i=0,s=e;i<s.length;i++){var u=Er(s[i],t,n,r,o);u&&cr(u,a)}return a}function cr(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 dr(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],a=pr(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 fr(e,t){return{defs:Pt(Pt({},e.defs),t.defs),instances:Pt(Pt({},e.instances),t.instances)}}function pr(e,t){var n=yn(e.defs,t),r=yn(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function hr(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var gr={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:ur,overlap:ur,allow:ur,className:hr,classNames:hr,color:String,backgroundColor:String,borderColor:String,textColor:String},vr={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function mr(e,t){var n=function(e,t){return Array.isArray(e)?lr(e,null,t,!0):"object"==typeof e&&e?lr([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 yr(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 wr={id:String,groupId:String,title:String,url:String},br={start:ur,end:ur,date:ur,allDay:Boolean},Cr=Pt(Pt(Pt({},wr),br),{extendedProps:ur});function Er(e,t,n,r,a){void 0===a&&(a=Dr(n));var o=Tr(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=Sr(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=on(s));o&&(l=o.marker,i&&(l=on(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=Sr(i,s,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:gn(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Tr(e,t,n){return void 0===n&&(n=Dr(t)),sr(e,n)}function Dr(e){return Pt(Pt(Pt({},gr),Cr),e.pluginHooks.eventRefiners)}function Sr(e,t,n,r,a,o){for(var i={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:Zt(),sourceId:n,allDay:r,hasEnd:a,ui:mr(e,o),extendedProps:Pt(Pt({},e.extendedProps||{}),t)},s=0,u=o.pluginHooks.eventDefMemberAdders;s<u.length;s++){var l=u[s];Pt(i,l(e))}return Object.freeze(i.ui.classNames),Object.freeze(i.extendedProps),i}function kr(e){var t=Math.floor(rn(e.start,e.end))||1,n=on(e.start);return{start:n,end:tn(n,t)}}function Rr(e,t){void 0===t&&(t=Mn(0));var n=null,r=null;if(e.end){r=on(e.end);var a=e.end.valueOf()-r.valueOf();a&&a>=Nn(t)&&(r=tn(r,1))}return e.start&&(n=on(e.start),r&&r<=n&&(r=tn(n,1))),{start:n,end:r}}function xr(e,t,n,r){return"year"===r?Mn(n.diffWholeYears(e,t),"year"):"month"===r?Mn(n.diffWholeMonths(e,t),"month"):(o=t,i=on(a=e),s=on(o),{years:0,months:0,days:Math.round(rn(i,s)),milliseconds:o.valueOf()-s.valueOf()-(a.valueOf()-i.valueOf())});var a,o,i,s}function Mr(e,t){var n,r,a=[],o=t.start;for(e.sort(Pr),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 Pr(e,t){return e.start.valueOf()-t.start.valueOf()}function Or(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 Nr(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Ir(e,t,n,r){var a={},o={},i={},s=[],u=[],l=Ar(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?Rr(h,r):h,v=Or(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=Mr(a[m],n);y<w.length;y++){var b,C=w[y];p=l[(b=i[m]).defId];s.push({def:b,ui:p,instance:null,range:C,isStart:!1,isEnd:!1})}for(var c in o)for(var E=0,T=Mr(o[c],n);E<T.length;E++){C=T[E];s.push({def:e.defs[c],ui:l[c],instance:null,range:C,isStart:!1,isEnd:!1})}return{bg:s,fg:u}}function Hr(e,t){e.fcSeg=t}function Ur(e){return e.fcSeg||e.parentNode.fcSeg||null}function Ar(e,t){return wn(e,(function(e){return Fr(e,t)}))}function Fr(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(yr,vr)}(n)}function Wr(e,t){var n=e.map(_r);return n.sort((function(e,n){return function(e,t,n){var r,a;for(r=0;r<n.length;r+=1)if(a=Xt(e,t,n[r]))return a;return 0}(e,n,t)})),n.map((function(e){return e._seg}))}function _r(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 Pt(Pt(Pt({},n.extendedProps),n),{id:n.publicId,start:a,end:o,duration:o-a,allDay:Number(n.allDay),_seg:e})}function qr(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 Lr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function zr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Br(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=on(p).valueOf()===on(g).valueOf(),y=on(nn(h,-1)).valueOf()===on(nn(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 Vr(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Nr(t,r.start)}}var Yr={start:ur,end:ur,allDay:Boolean};function jr(e,t,n){var r=function(e,t){var n=sr(e,Yr),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 Pt({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 Gr(e,t,n){return Pt(Pt({},Zr(e,t,n)),{timeZone:t.timeZone})}function Zr(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 Xr(e,t,n){var r=Tr({editable:!1},n),a=Sr(r.refined,r.extra,"",e.allDay,!0,n);return{def:a,ui:Fr(a,t),instance:gn(a.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function Qr(e,t,n){n.emitter.trigger("select",Pt(Pt({},function(e,t){for(var n={},r=0,a=t.pluginHooks.dateSpanTransforms;r<a.length;r++){var o=a[r];Pt(n,o(e,t))}return Pt(n,function(e,t){return Pt(Pt({},Zr(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 Kr(e,t,n){var r=n.dateEnv,a=n.options,o=t;return e?(o=on(o),o=r.add(o,a.defaultAllDayEventDuration)):o=r.add(o,a.defaultTimedEventDuration),o}function Jr(e,t,n,r){var a=n.standardProps||{};null==a.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(a.hasEnd=!0);var o=Pt(Pt(Pt({},e),a),{ui:Pt(Pt({},e.ui),a.ui)});n.extendedProps&&(o.extendedProps=Pt(Pt({},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 $r(e,t,n,r,a){var o=a.dateEnv,i=r.standardProps&&!0===r.standardProps.allDay,s=r.standardProps&&!1===r.standardProps.hasEnd,u=Pt({},e);return i&&(u.range=kr(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:Kr(t.allDay,u.range.start,a)}),t.allDay&&(u.range={start:on(u.range.start),end:on(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Kr(t.allDay,u.range.start,a)),u}var ea=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}(),ta={id:String,defaultAllDay:Boolean,url:String,format:String,events:ur,eventDataTransform:ur,success:ur,failure:ur};function na(e,t,n){var r;if(void 0===n&&(n=ra(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:Zt(),sourceDefId:s.sourceDefId,meta:s.meta,ui:mr(o,t),extendedProps:i}}return null}function ra(e){return Pt(Pt(Pt({},gr),ta),e.pluginHooks.eventSourceRefiners)}function aa(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var oa=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,Ot([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:aa(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=Mn(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),Jn(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),Jn(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=jr(n,r.dateEnv,Mn({days:1}));a&&(this.dispatch({type:"SELECT_DATES",selection:a}),Qr(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 ia){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:cr({def:n,instance:r})}),this.triggerEventAdd(e)),e}var a,o=this.getCurrentData();if(t instanceof Wt)a=t.internalEventSource;else if("boolean"==typeof t)t&&(a=Cn(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=Er(e,a,o,!1);if(s){var u=new ia(o,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:cr(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 ia(t,i,null);for(var s in a){var u=a[s];if(u.defId===i.defId)return new ia(t,i,u)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return ua(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 Wt(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 Wt(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof Wt)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=na(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Wt(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=Mn(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),ia=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 br)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=wr[e](t),this.mutate({standardProps:{publicId:t}});else if(e in wr)t=wr[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in gr){var a=gr[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=xr(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=xr(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=kr(l));var c=xr(l.start,u,i,n.granularity);if(r){var d=xr(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=Mn(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Mn(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Mn(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=Jn(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=dr(o,n.instanceId);i=function(e,t,n,r){var a=Ar(e.defs,t),o={defs:{},instances:{}};for(var i in e.defs){var s=e.defs[i];o.defs[i]=Jr(s,a[i],n,r)}for(var u in e.instances){var l=e.instances[u];s=o.defs[l.defId];o.instances[u]=$r(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:ua(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 Wt(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?Pt(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 ua(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 ia(t,l,u))}return o}var la={};var ca,da=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 fn(e)},e.prototype.markerToArray=function(e){return dn(e)},e}();ca=da,la["gregory"]=ca;var fa=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;var pa=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 la[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()):fn(ln(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=fn(e)),null!==t&&pn(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=function(e){var t=fa.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(pn(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 hn(e)===hn(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 hn(e)===hn(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=an(e,t);return null!==n&&n%7==0?n/7:null}(e,t))?{unit:"week",value:n}:null!==(n=an(e,t))?{unit:"day",value:n}:Kt(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:Kt(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:Kt(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/(On(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return On(e)/30}(n):n.days&&null!==(r=an(e,t))?r/On(n):(t.valueOf()-e.valueOf())/Nn(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?on(e):"hour"===t?function(e){return fn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return fn([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return fn([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=nn(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",Un(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?fn(ln(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?fn(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-cn(dn(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(dn(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?cn(dn(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(dn(e))*60):new Date(e.valueOf()-(t||0))},e}(),ha=[],ga={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 va(e){for(var t=e.length>0?e[0].code:"en",n=ha.concat(e),r={en:ga},a=0,o=n;a<o.length;a++){var i=o[a];r[i.code]=i}return{map:r,defaultCode:t}}function ma(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)||ga;return ya(e,n,r)}(e,t):ya(e.code,[e.code],e)}function ya(e,t,n){var r=mn([ga,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 wa,ba,Ca={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Ea(e,t){return lr(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 Pt(Pt({},Ca),e)}))}(e),null,t)}function Ta(){return null==wa&&(wa=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}()),wa}function Da(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Nr(r.activeRange,e)),isOther:Boolean(r&&!Nr(r.currentRange,e)),isToday:Boolean(t&&Nr(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function Sa(e,t){var n=["fc-day","fc-day-"+$t[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 ka(e,t){return void 0===t&&(t="day"),JSON.stringify({date:Hn(e),type:t})}function Ra(){return ba||(ba=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}()),ba}function xa(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 Ma=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 Pa=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}(),Oa=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}(),Na=(function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}Mt(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}}(Oa),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Mt(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}}(Oa),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=Pt({},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}());Na.prototype.classes={},Na.prototype.iconClasses={},Na.prototype.baseIconClass="",Na.prototype.iconOverridePrefix="";var Ia=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=Pt({},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}(),Ha=At({});function Ua(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 Ia(e,l,Mn(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:d,unregisterInteractiveComponent:f}}var Aa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Tn(e,this.props),Tn(t,this.state)),!Dn(this.props,e,this.propEquality)||!Dn(this.state,t,this.stateEquality)},t.addPropsEquality=Wa,t.addStateEquality=_a,t.contextType=Ha,t}(Nt);Aa.prototype.propEquality={},Aa.prototype.stateEquality={};var Fa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.contextType=Ha,t}(Aa);function Wa(e){var t=Object.create(this.prototype.propEquality);Pt(t,e),this.prototype.propEquality=t}function _a(e){var t=Object.create(this.prototype.stateEquality);Pt(t,e),this.prototype.stateEquality=t}function qa(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var La=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=Zt(),t}return Mt(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&&!qt(e,".fc-event-mirror")},t.prototype.isValidDateDownEl=function(e){return!(qt(e,".fc-event:not(.fc-bg-event)")||qt(e,".fc-more-link")||qt(e,"a[data-navlink]")||qt(e,".fc-popover"))},t}(Fa);function za(e){return{id:Zt(),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 Ba(){var e,t=[],n=[];return function(r,a){return e&&An(r,t)&&An(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:Pt(Pt({},s.eventRefiners),u.eventRefiners),eventDefMemberAdders:s.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:Pt(Pt({},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:Pt(Pt({},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:Pt(Pt({},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:Pt(Pt({},s.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||s.scrollGridImpl,contentTypeHandlers:Pt(Pt({},s.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:Pt(Pt({},s.listenerRefiners),u.listenerRefiners),optionRefiners:Pt(Pt({},s.optionRefiners),u.optionRefiners),propSetHandlers:Pt(Pt({},s.propSetHandlers),u.propSetHandlers)})}var s,u}return e&&a(e),a(t),r}(r,a)),t=r,n=a,e}}var Va=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t}(Na);function Ya(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=Ya(u,t,n,r)}!s&&l&&(s=l.component);if(!s)return null;return{type:e,component:s,defaults:Pt(Pt({},l?l.defaults:{}),a?a.rawOptions:{}),overrides:Pt(Pt({},l?l.overrides:{}),o?o.rawOptions:{})}}(e,t,n,r);return a&&(t[e]=a),a}Va.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Va.prototype.baseIconClass="fc-icon",Va.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"},Va.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Va.prototype.iconOverrideOption="buttonIcons",Va.prototype.iconOverrideCustomButtonOption="icon",Va.prototype.iconOverridePrefix="fc-icon-";var ja=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ht(),t.handleRootEl=function(e){qa(t.rootElRef,e),t.props.elRef&&qa(t.props.elRef,e)},t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return It(Qa,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return It(Za,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,a){return t.children(r,Ja(t.classNames,n),e,a)}))}))},t}(Fa),Ga=At(0);function Za(e){return It(Ga.Consumer,null,(function(t){return It(Xa,Pt({renderId:t},e))}))}var Xa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Ht(),t}return Mt(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=$a(t.content,t.hookProps),a=null;if(void 0===r&&(r=$a(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=Pt({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}(Fa),Qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qa(t.props.elRef,e)},t}return Mt(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(Pt(Pt({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(Pt(Pt({},this.props.hookProps),{el:this.rootEl}))},t}(Fa);function Ka(){var e,t,n=[];return function(r,a){return t&&En(t,a)&&r===e||(e=r,t=a,n=Ja(r,a)),n}}function Ja(e,t){return"function"==typeof e&&(e=e(t)),hr(e)}function $a(e,t){return"function"==typeof e?e(t,It):e}var eo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=Ka(),t}return Mt(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 It(Qa,{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}(Fa);function to(e){return wn(e,no)}function no(e){var t,n="function"==typeof e?{component:e}:e,r=n.component;return n.content&&(t=n,r=function(e){return It(Ha.Consumer,null,(function(n){return It(eo,{viewSpec:n.viewSpec},(function(r,a){var o=Pt(Pt({},e),{nextDayThreshold:n.options.nextDayThreshold});return It(ja,{hookProps:o,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:r},(function(e,t,n,r){return It("div",{className:a.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:r,rawOptions:n}}function ro(e,t,n,r){var a=to(e),o=to(t.views);return wn(function(e,t){var n,r={};for(n in e)Ya(n,r,e,t);for(n in t)Ya(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=ao[t];void 0===n&&(n=Mn(e),ao[t]=n);return n}(o))){var c=In(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:Pt(Pt({},l),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(a)||e.defaults.buttonText||d(er)||e.type}}(e,o,t,n,r)}))}var ao={};var oo=function(){function e(e){this.props=e,this.nowDate=aa(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=Or(s,a.range)),s=Or(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=In(a=this.getFallbackDuration()).unit,i=this.buildRangeFromDuration(e,t,a,o)),{duration:a,unit:o,range:i}},e.prototype.getFallbackDuration=function(){return Mn({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&&(On(a)<0&&(i=on(i),i=n.add(i,a)),On(o)>1&&(s=tn(s=on(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&&Nn(c)<Nn(n)?In(c).unit:r}function d(){a=u.startOf(e,l),o=u.add(a,n),i={start:a,end:o}}return On(n)<=1&&this.isHiddenDay(a)&&(a=on(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=on(u),r=u=this.skipHiddenDays(u,t);do{r=tn(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)?Mn(1,t):e||Mn({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=Rr(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=tn(e,t);return e},e}();function io(e,t,n){var r=t?t.activeRange:null;return lo({},function(e,t){var n=ra(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=na(i[o],t,n);s&&a.push(s)}return a}(e,n),r,n)}function so(e,t,n,r){var a,o,i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return lo(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return a=e,o=t.sourceId,yn(a,(function(e){return e.sourceId!==o}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?co(e,i,r):e;case"FETCH_EVENT_SOURCES":return fo(e,t.sourceIds?bn(t.sourceIds):ho(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 Pt(Pt({},e),((a={})[t]=Pt(Pt({},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 uo(e){for(var t in e)if(e[t].isFetching)return!0;return!1}function lo(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=co(a,n,r)),Pt(Pt({},e),a)}function co(e,t,n){return fo(e,yn(e,(function(e){return function(e,t,n){if(!go(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 fo(e,t,n,r,a){var o={};for(var i in e){var s=e[i];t[i]?o[i]=po(s,n,r,a):o[i]=s}return o}function po(e,t,n,r){var a=r.options,o=r.calendarApi,i=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=Zt();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})})),Pt(Pt({},e),{isFetching:!0,latestFetchId:s})}function ho(e,t){return yn(e,(function(e){return go(e,t)}))}function go(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function vo(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=lr(function(e,t,n){var r=n.options.eventDataTransform,a=t?t.eventDataTransform:null;a&&(e=mo(e,a));r&&(e=mo(e,r));return e}(a,t,o),t,o);return r&&(i=kn(i,r,o)),fr(yo(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=kn(t,n,r));return fr(e,t)}(e,t.eventStore,r?r.activeRange:null,a);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return fr(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?kn(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 yo(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return pr(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function mo(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 yo(e,t){return pr(e,(function(e){return e.sourceId!==t}))}function wo(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function bo(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Co(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 Eo(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 To(e,t,n,r,a){var o=[];return{headerToolbar:e.headerToolbar?Do(e.headerToolbar,e,t,n,r,a,o):null,footerToolbar:e.footerToolbar?Do(e.footerToolbar,e,t,n,r,a,o):null,viewsWithButtons:o}}function Do(e,t,n,r,a,o,i){return wn(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 So(e,t,n,r,a){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+ko(t)}(t,n):o=ko(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 ko(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ro(e,t){for(var n=Cn(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 xo=[za({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),za({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,Gr(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),za({eventSourceRefiners:{method:String,extraParams:ur,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||{};Pt(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);So(r.method,r.url,a,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),za({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=Or(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var a=e?bn(e):null,o=on(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=tn(o,1)}return s}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:ur,startTime:Mn,endTime:Mn,duration:Mn,startRecur:ur,endRecur:ur}}),za({optionChangeHandlers:{events:function(e,t){Ro([e],t)},eventSources:Ro}}),za({isLoadingFuncs:[function(e){return uo(e.eventSources)}],contentTypeHandlers:{html:function(){return{render:Mo}},domNodes:function(){return{render:Po}}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Pt(Pt({},Gr(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",ua(e,t))}}})];function Mo(e,t){e.innerHTML=t}function Po(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!An(n,r)){for(var a=0,o=r;a<o.length;a++){var i=o[a];e.appendChild(i)}n.forEach(_t)}}var Oo=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}(),No=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Oo(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 Io(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Jn(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=an(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 Ho=function(){function e(e){var t=this;this.computeOptionsData=Fn(this._computeOptionsData),this.computeCurrentViewData=Fn(this._computeCurrentViewData),this.organizeRawLocales=Fn(va),this.buildLocale=Fn(ma),this.buildPluginHooks=Ba(),this.buildDateEnv=Fn(Uo),this.buildTheme=Fn(Ao),this.parseToolbars=Fn(To),this.buildViewSpecs=Fn(ro),this.buildDateProfileGenerator=Wn(Fo),this.buildViewApi=Fn(Wo),this.buildViewUiProps=Wn(Lo),this.buildEventUiBySource=Fn(_o,En),this.buildEventUiBases=Fn(qo),this.parseContextBusinessHours=Wn(Bo),this.buildTitle=Fn(Io),this.emitter=new Ma,this.actionRunner=new No(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):aa(i.now,s)),c=o.dateProfileGenerator.build(l);Nr(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=io(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=Pt(Pt({},d),g),m=0,y=r.pluginHooks.reducers;m<y.length;m++){var w=y[m];Pt(g,w(null,null,v))}zo(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?Pt(Pt({},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 Pt(Pt({},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||!Nr(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),Nr(c.currentRange,l)||(l=c.currentRange.start);for(var d=so(n.eventSources,e,c,u),f=vo(n.eventStore,e,d,c,u),p=uo(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:wo(n.dateSelection,e),eventSelection:bo(n.eventSelection,e),eventDrag:Co(n.eventDrag,e),eventResize:Eo(n.eventResize,e)},w=Pt(Pt({},u),y),b=0,C=o.pluginHooks.reducers;b<C.length;b++){var E=C[b];Pt(y,E(n,e,w))}var T=zo(n,u),D=zo(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=Pt(Pt(Pt({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,fo(o,ho(o,s),u,!0,s)),c.eventStore=h.eventStore=(e=h.eventStore,t=d.dateEnv,n=h.dateEnv,r=e.defs,a=wn(e.instances,(function(e){var a=r[e.defId];return a.allDay||a.recurringDef?e:Pt(Pt({},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;Vo(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=ir([er,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||[],xo),l=this.currentCalendarOptionsRefiners=Pt(Pt(Pt(Pt(Pt({},$n),tr),nr),u.listenerRefiners),u.optionRefiners),c={},d=ir([er,s,e,t]),f={},p=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,g=!1;for(var v in d)"plugins"!==v&&(d[v]===p[v]||rr[v]&&v in p&&rr[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 Vo(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=ir([er,e.optionDefaults,n,r,e.optionOverrides,a]),i=Pt(Pt(Pt(Pt(Pt(Pt({},$n),tr),nr),or),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 Uo(e,t,n,r,a,o,i,s){var u=ma(t||i.defaultCode,i.map);return new pa({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:u,weekNumberCalculation:n,firstDay:r,weekText:a,cmdFormatter:o.cmdFormatter,defaultSeparator:s})}function Ao(e,t){return new(t.themeClasses[e.themeSystem]||Va)(e)}function Fo(e){return new(e.dateProfileGeneratorClass||oo)(e)}function Wo(e,t,n){return new ea(e,t,n)}function _o(e){return wn(e,(function(e){return e.ui}))}function qo(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 Lo(e){var t=e.options;return{eventUiSingleBase:mr({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:mr({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function zo(e,t){for(var n=0,r=t.pluginHooks.isLoadingFuncs;n<r.length;n++){if((0,r[n])(e))return!0}return!1}function Bo(e){return Ea(e.options.businessHours,e)}function Vo(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Yo=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 Ho({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return Mt(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}(Nt),jo=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(Pt(Pt({},e),{spanStart:e.spanStart,spanEnd:t.spanStart}),a)),t.spanEnd<e.spanEnd&&(r+=this.insertEntry(Pt(Pt({},e),{spanStart:t.spanEnd,spanEnd:e.spanEnd}),a)),r?(n.push.apply(n,Ot([Pt(Pt({},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?(Xo(this.levelCoords,n,t.levelCoord),Xo(this.entriesByLevel,n,[e])):Xo(this.entriesByLevel[n-1],t.lateralEnd,e),this.stackCnts[Zo(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=Qo(f,e.spanStart,Go);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[Zo(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(Pt(Pt({},l),{levelCoord:i}))}return r},e}();function Go(e){return e.spanEnd}function Zo(e){return e.segInput.index+":"+e.spanStart}function Xo(e,t,n){e.splice(t,0,n)}function Qo(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 Ko=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Jo(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var $o={},ei=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return It.apply(void 0,Ot(["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(It("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(It("button",Pt({disabled:h,className:p.join(" "),onClick:l,type:"button"},f),c||(d?It("span",{className:d}):"")))}}if(r.length>1){var g=a&&n.getClass("buttonGroup")||"";return It.apply(void 0,Ot(["div",{className:g}],r))}return r[0]},t}(Fa),ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(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,It("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 It(ei,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Fa),ni=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,qa(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return Mt(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||"",It("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}(Fa),ri=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=Ur(t);if(o&&r.isValidSegDownEl(e.target)){var i=qt(e.target,".fc-event-forced-url"),s=i?i.querySelector("a[href]").href:"";a.emitter.trigger("eventClick",{el:t,event:new ia(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:a.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=jt(t.el,"click",".fc-event",n.handleSegClick),n}return Mt(t,e),t}(Ko),ai=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){Ur(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,jt(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 Mt(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,a=r.context,o=Ur(n);t&&!r.isValidSegDownEl(t.target)||a.emitter.trigger(e,{el:n,event:new ia(a,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:a.viewApi})},t}(Ko),oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=Fn(Ua),t.buildViewPropTransformers=Fn(si),t.buildToolbarProps=Fn(ii),t.handleNavLinkClick=Yt("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Ht(),t.footerRef=Ht(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=Jo(e,n),a=[ri,ai].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=a,$o[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 $o[e.uid]},t.resizeRunner=new Oo((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 Mt(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,aa(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 It(Ha.Provider,{value:s},n.headerToolbar&&It(ti,Pt({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},a)),It(ni,{liquid:o,height:i,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&It(ti,Pt({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 It.apply(void 0,Ot([Ut,{}],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];Pt(r,i.transform(r,e))}var s=n.component;return It(s,Pt({},r))},t}(Aa);function ii(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&&!Nr(t.currentRange,a),isPrevEnabled:s.isValid,isNextEnabled:u.isValid}}function si(e){return e.map((function(e){return new e}))}var ui=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 Mt(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 Ta()||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}(Fa);var li="fc-col-header-cell";function ci(e){return e.text}var di=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(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=Da(i,o.todayRange,null,s),l=[li].concat(Sa(u,r)),c=t.format(i,o.dayHeaderFormat),d=n.navLinks&&!u.isDisabled&&o.colCnt>1?{"data-navlink":ka(i),tabIndex:0}:{},f=Pt(Pt(Pt({date:t.toDate(i),view:a},o.extraHookProps),{text:c}),u);return It(ja,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ci,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return It("th",Pt({ref:e,className:l.concat(t).join(" "),"data-date":u.isDisabled?void 0:Hn(i),colSpan:o.colSpan},o.extraDataAttrs),It("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&It("a",Pt({ref:n,className:["fc-col-header-cell-cushion",o.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(Fa),fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(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=tn(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[li].concat(Sa(s,r),e.extraClassNames||[]),l=n.format(i,e.dayHeaderFormat),c=Pt(Pt(Pt(Pt({date:i},s),{view:a}),e.extraHookProps),{text:l});return It(ja,{hookProps:c,classNames:o.dayHeaderClassNames,content:o.dayHeaderContent,defaultContent:ci,didMount:o.dayHeaderDidMount,willUnmount:o.dayHeaderWillUnmount},(function(t,n,r,a){return It("th",Pt({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),It("div",{className:"fc-scrollgrid-sync-inner"},It("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:r},a)))}))},t}(Fa),pi=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=aa(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return Mt(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=nn(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(r,Mn(1,e.unit)),o=a.valueOf()-n.valueOf();return o=Math.min(864e5,o),{currentState:{nowDate:r,todayRange:hi(r)},nextState:{nowDate:a,todayRange:hi(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=Ha,t}(Nt);function hi(e){var t=on(e);return{start:t,end:tn(t,1)}}var gi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=Fn(vi),t}return Mt(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 It(pi,{unit:"day"},(function(e,t){return It("tr",null,o&&o("day"),n.map((function(e){return a?It(di,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:i}):It(fi,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:i})})))}))},t}(Fa);function vi(e,t,n){return e||function(e,t){return Jn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var mi=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=tn(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(tn(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(rn(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),yi=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}(),wi=function(){function e(){this.sliceBusinessHours=Fn(this._sliceBusinessHours),this.sliceDateSelection=Fn(this._sliceDateSpan),this.sliceEventStore=Fn(this._sliceEventStore),this.sliceEventDrag=Fn(this._sliceInteraction),this.sliceEventResize=Fn(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,Ot([e.eventStore,i,t,n],a));return{dateSelectionSegs:this.sliceDateSelection.apply(this,Ot([e.dateSelection,i,r],a)),businessHourSegs:this.sliceBusinessHours.apply(this,Ot([e.businessHours,t,n,r],a)),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag.apply(this,Ot([e.eventDrag,i,t,n],a)),eventResize:this.sliceEventResize.apply(this,Ot([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,Ot([{range:{start:e,end:nn(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,Ot([kn(e,bi(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=Ir(e,t,bi(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=Ir(e.mutatedEvents,t,bi(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=Xr(e,t,n),i=this.sliceRange.apply(this,Ot([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:tn(n.start,1)});for(var r=this.sliceRange.apply(this,Ot([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 bi(e,t){var n=e.activeRange;return t?n:{start:nn(n.start,e.slotMinTime.milliseconds),end:nn(n.end,e.slotMaxTime.milliseconds-864e5)}}var Ci=/^(visible|hidden)$/,Ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qa(t.props.elRef,e)},t}return Mt(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")),It("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(Ci.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(Ci.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 Ci.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ci.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Fa),Ti=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 Cn(this.currentMap)},e}();function Di(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,Jt(a))}return Math.ceil(t)}function Si(e,t){return e.liquid&&t.liquid}function ki(e,t){return An(e,t,En)}function Ri(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(It("col",{style:{width:"shrink"===o.width?xi(t):o.width||"",minWidth:o.minWidth||""}}));return It.apply(void 0,Ot(["colgroup",{}],n))}function xi(e){return null==e?4:e}function Mi(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 Pi(e){return It("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Oi(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var Ni=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=Fn((function(e){return e}),ki),t.renderMicroColGroup=Fn(Ri),t.scrollerRefs=new Ti,t.scrollerElRefs=new Ti(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(Pt({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return Mt(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=!Ta();return It("table",{className:i.join(" "),style:{height:e.height}},Boolean(!p&&c.length)&&It.apply(void 0,Ot(["thead",{}],c)),Boolean(!p&&d.length)&&It.apply(void 0,Ot(["tbody",{}],d)),Boolean(!p&&f.length)&&It.apply(void 0,Ot(["tfoot",{}],f)),p&&It.apply(void 0,Ot(Ot(Ot(["tbody",{}],c),d),f)))},t.prototype.renderSection=function(e,t){return"outerContent"in e?It(Ut,{key:e.key},e.outerContent):It("tr",{key:e.key,className:Mi(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||Si(e,t)}(r,e),l=Si(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):It("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,It("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 It("td",{ref:n.elRef},It("div",{className:"fc-scroller-harness"+(l?" fc-scroller-harness-liquid":"")},It(Ei,{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&&qa(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)?Di(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){var e=Ra(),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}(Fa);Ni.addStateEquality({scrollerClientWidths:En,scrollerClientHeights:En});var Ii=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Ht(),t}return Mt(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 ia(t,a.def,a.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&qr(r,t),isStartResizable:!e.disableResizing&&Lr(r,t),isEndResizable:!e.disableResizing&&zr(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 It(ja,{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(){Hr(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&Hr(this.elRef.current,t)},t}(Fa),Hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||e.defaultTimeFormat,a=Br(n,r,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return It(Ii,{seg:n,timeText:a,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||Ui,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 It("a",Pt({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)),It("div",{className:"fc-event-main",ref:a,style:{color:i.textColor}},o),i.isStartResizable&&It("div",{className:"fc-event-resizer fc-event-resizer-start"}),i.isEndResizable&&It("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Fa);function Ui(e){return It("div",{className:"fc-event-main-frame"},e.timeText&&It("div",{className:"fc-event-time"},e.timeText),It("div",{className:"fc-event-title-container"},It("div",{className:"fc-event-title fc-sticky"},e.event.title||It(Ut,null," "))))}var Ai=Jn({day:"numeric"}),Fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Wi({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return It(Za,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Fa);function Wi(e){var t=e.date,n=e.dateEnv,r=Da(t,e.todayRange,null,e.dateProfile);return Pt(Pt(Pt({date:n.toDate(t),view:e.viewApi},r),{dayNumberText:e.showDayNumber?n.format(t,Ai):""}),e.extraProps)}var _i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=Wn(Wi),t.normalizeClassNames=Ka(),t}return Mt(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=Sa(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":Hn(e.date)};return It(Qa,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,a,o,r.isDisabled)}))},t}(Fa);function qi(e){return It("div",{className:"fc-"+e})}var Li=function(e){return It(Ii,{defaultContent:zi,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 It("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:a.backgroundColor}},r)}))};function zi(e){return e.event.title&&It("div",{className:"fc-event-title"},e.event.title)}var Bi=function(e){return It(Ha.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 It(ja,{hookProps:{num:i,text:s,date:a},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:Vi,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function Vi(e){return e.text}var Yi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qa(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=Vt(e);t.rootEl.contains(n)||t.handleCloseClick()},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return Mt(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Ft(It("div",Pt({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),It("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},It("span",{className:"fc-popover-title"},t.title),It("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),It("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=xa(n);if(o){var i=a.getBoundingClientRect(),s=r?qt(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)Bt(e,n,t[n])}(a,{top:s-l.top,left:u-l.left})}},t}(Fa),ji=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 Mt(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 It(_i,{date:a,dateProfile:i,todayRange:o,elRef:this.handleRootEl},(function(e,t,n){return It(Yi,{elRef:e,title:s,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},It(Fi,{date:a,dateProfile:i,todayRange:o},(function(e,t){return t&&It("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:Pt({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}(La),Gi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.linkElRef=Ht(),t.state={isPopoverOpen:!1},t.handleClick=function(e){var n=t,r=n.props,a=n.context,o=a.options.moreLinkClick,i=Xi(r).start;function s(e){var t=e.eventRange,n=t.def,r=t.instance,o=t.range;return{event:new ia(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 Mt(t,e),t.prototype.render=function(){var e=this,t=this.props;return It(Ha.Consumer,null,(function(n){var r=n.viewApi,a=n.options,o=n.calendarApi,i=a.moreLinkText,s=t.moreCnt,u=Xi(t),l={num:s,shortText:"+"+s,text:"function"==typeof i?i.call(o,s):"+"+s+" "+i,view:r};return It(Ut,null,Boolean(t.moreCnt)&&It(ja,{elRef:e.linkElRef,hookProps:l,classNames:a.moreLinkClassNames,content:a.moreLinkContent,defaultContent:t.defaultContent||Zi,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&&It(ji,{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=qt(this.linkElRef.current,".fc-view-harness"))},t}(Fa);function Zi(e){return e.text}function Xi(e){if(e.allDayDate)return{start:e.allDayDate,end:tn(e.allDayDate,1)};var t,n=e.hiddenSegs;return{start:(t=n,t.reduce(Qi).eventRange.range.start),end:Ki(n)}}function Qi(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function Ki(e){return e.reduce(Ji).eventRange.range.end}function Ji(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var $i=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._calendarApi=new oa,t}return Mt(n,e),n.prototype.render=function(){return t.createElement(Yo,{optionOverrides:this.props,calendarApi:this._calendarApi},(function(e){return t.createElement(ui,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(n,r,a,o){return t.createElement("div",{className:n.join(" "),style:{height:r}},t.createElement(oi,Pt({isHeightAuto:a,forPrint:o},e)))}))}))},n.prototype.getApi=function(){return this._calendarApi},n}(t.Component),es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Ht(),t}return Mt(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,a=[],o=Oi(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}}),It(eo,{viewSpec:r.viewSpec},(function(e,t){return It("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},It(Ni,{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&&Oi(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:Pi}]}),It(eo,{viewSpec:i.viewSpec},(function(e,t){return It("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},It(a,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}))},t}(La);
|
|
17
|
-
/*!
|
|
18
|
-
FullCalendar v5.7.2
|
|
19
|
-
Docs & License: https://fullcalendar.io/
|
|
20
|
-
(c) 2021 Adam Shaw
|
|
21
|
-
*/function ts(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 ns(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 rs(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 as=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":ka(e.date),tabIndex:0}:{};return It(Fi,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:os},(function(n,r){return(r||e.forceDayTop)&&It("div",{className:"fc-daygrid-day-top",ref:n},It("a",Pt({className:"fc-daygrid-day-number"},t),r||It(Ut,null," ")))}))},t}(Fa);function os(e){return e.dayNumberText}var is=Jn({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 us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props;return It(Hi,Pt({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:is,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Fa),ls=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||is,r=Br(e.seg,n,t,!0,e.defaultDisplayEventEnd);return It(Ii,{seg:e.seg,timeText:r,defaultContent:cs,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 It("a",Pt({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}(Fa);function cs(e){return It(Ut,null,It("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&It("div",{className:"fc-event-time"},e.timeText),It("div",{className:"fc-event-title"},e.event.title||It(Ut,null," ")))}var ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.compileSegs=Fn(fs),t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.compileSegs(e.singlePlacements),n=t.allSegs,r=t.invisibleSegs;return It(Gi,{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 It(Ut,null,n.map((function(n){var r=n.eventRange.instance.instanceId;return It("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:t[r]?"hidden":""}},ss(n)?It(ls,Pt({seg:n,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},Vr(n,e.todayRange))):It(us,Pt({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},Vr(n,e.todayRange))))})))}},(function(e,t,n,r,a){return It("a",{ref:e,className:["fc-daygrid-more-link"].concat(t).join(" "),onClick:a},r)}))},t}(Fa);function fs(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 ps=Jn({week:"narrow"}),hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ht(),t.handleRootEl=function(e){qa(t.rootElRef,e),qa(t.props.elRef,e)},t}return Mt(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":ka(a,"week"),tabIndex:0}:{};return It(_i,{date:a,dateProfile:o,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,elRef:this.handleRootEl},(function(t,r,s,u){return It("td",Pt({ref:t,className:["fc-daygrid-day"].concat(r,e.extraClassNames||[]).join(" ")},s,e.extraDataAttrs),It("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:e.innerElRef},e.showWeekNumber&&It(Bi,{date:a,defaultFormat:ps},(function(e,t,n,r){return It("a",Pt({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},i),r)})),!u&&It(as,{date:a,dateProfile:o,showDayNumber:e.showDayNumber,forceDayTop:e.forceDayTop,todayRange:e.todayRange,extraHookProps:e.extraHookProps}),It("div",{className:"fc-daygrid-day-events",ref:e.fgContentElRef},e.fgContent,It("div",{className:"fc-daygrid-day-bottom",style:{marginTop:e.moreMarginTop}},It(ds,{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}))),It("div",{className:"fc-daygrid-day-bg"},e.bgContent)))}))},t}(La);function gs(e,t,n,r,a,o,i){var s=new ms;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:vs(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:vs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):b&&(v.push({seg:vs(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 C=S.firstCol;C<=S.lastCol;C+=1)h[C].push({seg:vs(S,C,C+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(C=0;C<i.length;C+=1)m.push(0);for(var E=0,T=f;E<T.length;E++){var D=T[E],S=e[D.segInput.index];g[D.spanStart].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(C=D.spanStart;C<D.spanEnd;C+=1)m[C]+=1,h[C].push({seg:vs(S,C,C+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(C=0;C<i.length;C+=1)y.push(v[C]);return{singleColPlacements:h,multiColPlacements:g,moreCnts:m,moreMarginTops:y}}function vs(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;var a=e.eventRange,o=a.range,i=Or(o,{start:r[t].date,end:tn(r[n-1].date,1)});return Pt(Pt({},e),{firstCol:t,lastCol:n-1,eventRange:{def:a.def,ui:Pt(Pt({},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 ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hiddenConsumes=!1,t.forceHidden={},t}return Mt(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[Zo(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=Pt(Pt({},u),{spanStart:Math.max(u.spanStart,n.spanStart),spanEnd:Math.min(u.spanEnd,n.spanEnd)});o[c=Zo(l)]||(o[c]=!0,a[i][s]=l,this.splitEntry(u,n,r))}else{var c;o[c=Zo(u)]||(o[c]=!0,r.push(u))}}return e.prototype.handleInvalidInsertion.call(this,t,n,r)},t}(jo),ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ti,t.frameElRefs=new Ti,t.fgElRefs=new Ti,t.segHarnessRefs=new Ti,t.rootElRef=Ht(),t.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context.options,a=t.cells.length,o=ns(t.businessHourSegs,a),i=ns(t.bgEventSegs,a),s=ns(this.getHighlightSegs(),a),u=ns(this.getMirrorSegs(),a),l=gs(Wr(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 It("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 It(hs,{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:It(Ut,null,It(Ut,null,a),It(Ut,null,l)),bgContent:It(Ut,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(!En(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,C="",E="";b&&(s.isRtl?(E=0,C=l.lefts[v.lastCol]-l.lefts[v.firstCol]):(C=0,E=l.rights[v.firstCol]-l.rights[v.lastCol])),f.push(It("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:C,right:E}},ss(v)?It(ls,Pt({seg:v,isDragging:a,isSelected:m===u,defaultDisplayEventEnd:c},Vr(v,n))):It(us,Pt({seg:v,isDragging:a,isResizing:o,isDateSelecting:i,isSelected:m===u,defaultDisplayEventEnd:c},Vr(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(It("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?It(Li,Pt({seg:l},Vr(l,a))):qi(t)))}return It.apply(void 0,Ot([Ut,{}],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 Pa(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}(La);ys.addStateEquality({eventInstanceHeights:En});var ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=Fn(ts),t.splitBgEventSegs=Fn(ts),t.splitFgEventSegs=Fn(ts),t.splitDateSelectionSegs=Fn(ts),t.splitEventDrag=Fn(rs),t.splitEventResize=Fn(rs),t.rowRefs=new Ti,t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t}return Mt(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),It("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}},It(pi,{unit:"day"},(function(p,h){return It(Ut,null,It("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,It("tbody",null,t.cells.map((function(o,p){return It(ys,{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(bs),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 Pa(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Pa(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:Pt({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:tn(n,1)}},t}(La);function bs(e){return e.eventRange.def.allDay}var Cs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return Mt(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(wi),Es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new Cs,t.tableRef=Ht(),t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return It(ws,Pt({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}(La);function Ts(e,t){var n=new mi(e.renderRange,t);return new yi(n,/year|month|week/.test(e.currentRangeUnit))}var Ds=za({initialView:"dayGridMonth",views:{dayGrid:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=Fn(Ts),t.headerRef=Ht(),t.tableRef=Ht(),t}return Mt(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&&It(gi,{ref:this.headerRef,dateProfile:a.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),s=function(t){return It(Es,{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}(es),dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(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=en(a,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(u=en(u,6-Math.ceil(rn(s,u)/7)));return{start:s,end:u}},t}(oo)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ss=function(e){var n=e.label,r=e.startDate,o=e.endDate,i=e.linkType,u=s.useHistory(),l=a.useListContext(),c=l.ids,d=l.data,f=l.basePath,p=new URLSearchParams(u.location.search),h=t.useCallback((function(e){var t=e.event;e.jsEvent.preventDefault(),u.push(t.url)}),[]),g=t.useCallback((function(e){var t=e.view;p.set("month",t.currentStart.getMonth()+1),p.set("year",t.currentStart.getFullYear()),u.replace({pathname:u.location.pathname,search:"?"+p.toString()})}),[p]),v=t.useMemo((function(){return c.map((function(e){return{id:e,title:"string"==typeof n?d[e][n]:n(d[e]),start:"string"==typeof r?d[e][r]:r(d[e]),end:"string"==typeof o?d[e][o]:o(d[e]),url:a.linkToRecord(f,e)+"/"+i}}))}),[d,c,f]);return{initialDate:p.has("month")?new Date(p.get("year"),p.get("month")-1):new Date,events:v,datesSet:g,eventClick:h}},ks=i.makeStyles((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"}}}})),Rs=function(e){var t=i.useTheme(),r=Ss(e);return ks(),n.createElement($i,l({plugins:[Ds],locale:e.locale,initialView:"dayGridMonth",eventBackgroundColor:t.palette.primary.main},r))};Rs.defaultProps={linkType:"edit"};
|
|
22
|
-
/*!
|
|
23
|
-
FullCalendar v5.7.2
|
|
24
|
-
Docs & License: https://fullcalendar.io/
|
|
25
|
-
(c) 2021 Adam Shaw
|
|
26
|
-
*/
|
|
27
|
-
var xs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(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=Da(t,n),l=i.listDayFormat?o.format(t,i.listDayFormat):"",c=i.listDaySideFormat?o.format(t,i.listDaySideFormat):"",d=i.navLinks?ka(t):null,f=Pt({date:o.toDate(t),view:s,text:l,sideText:c,navLinkData:d},u),p=["fc-list-day"].concat(Sa(u,a));return It(ja,{hookProps:f,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:Ms,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(e,n,r,o){return It("tr",{ref:e,className:p.concat(n).join(" "),"data-date":Hn(t)},It("th",{colSpan:3},It("div",{className:"fc-list-day-cushion "+a.getClass("tableCellShaded"),ref:r},o)))}))},t}(Fa);function Ms(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return It(Ut,null,e.text&&It("a",Pt({className:"fc-list-day-text"},t),e.text),e.sideText&&It("a",Pt({className:"fc-list-day-side-text"},t),e.sideText))}var Ps=Jn({hour:"numeric",minute:"2-digit",meridiem:"short"}),Os=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ps;return It(Ii,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ns,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 It("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,rn((c=Rr(l)).start,c.end)>1?e.isStart?s=Br(e,t,n,null,null,o.range.start,e.end):e.isEnd?s=Br(e,t,n,null,null,e.start,o.range.end):i=!0:s=Br(e,t,n)),i){var u={text:n.options.allDayText,view:n.viewApi};return It(ja,{hookProps:u,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Is,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return It("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return It("td",{className:"fc-list-event-time"},s)}var l,c;return null}(n,r,t),It("td",{className:"fc-list-event-graphic"},It("span",{className:"fc-list-event-dot",style:{borderColor:s.borderColor||s.backgroundColor}})),It("td",{className:"fc-list-event-title",ref:o},i))}))},t}(Fa);function Ns(e){var t=e.event,n=t.url;return It("a",Pt({},n?{href:n}:{}),t.title)}function Is(e){return e.text}function Hs(e){return e.text}function Us(e){for(var t=on(e.renderRange.start),n=e.renderRange.end,r=[],a=[];t<n;)r.push(t),a.push({start:t,end:tn(t,1)}),t=tn(t,1);return{dayDates:r,dayRanges:a}}function As(e){return!1===e?null:Jn(e)}var Fs=za({optionRefiners:{listDayFormat:As,listDaySideFormat:As,noEventsClassNames:ur,noEventsContent:ur,noEventsDidMount:ur,noEventsWillUnmount:ur},views:{list:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=Fn(Us),t.eventStoreToSegs=Fn(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return Mt(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 It(eo,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,a){return It("div",{ref:n,className:r.concat(a).join(" ")},It(Ei,{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 It(ja,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Hs,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return It("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},It("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 It(pi,{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(It(xs,{key:l,dayDate:t[s],todayRange:n}));for(var c=0,d=u=Wr(u,a.eventOrder);c<d.length;c++){var f=d[c];i.push(It(Os,Pt({key:l+":"+f.eventRange.instance.instanceId,seg:f,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},Vr(f,n,e))))}}}return It("table",{className:"fc-list-table "+r.getClass("table")},It("tbody",null,i))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(Ir(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=Or(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}(La),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"}}}}),Ws=i.makeStyles((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"}}}})),_s=function(e){var t=Ss(e);return Ws(),n.createElement($i,l({plugins:[Fs],locale:e.locale,initialView:"listMonth"},t))};_s.defaultProps={linkType:"edit"};exports.CalendarList=Rs,exports.DateInput=function(e){return n.createElement(Rt,l({PickerComponent:r.DatePicker},e))},exports.DateTimeInput=function(e){return n.createElement(Rt,l({PickerComponent:r.DateTimePicker},e))},exports.DaysList=_s,exports.KeyboardDateInput=function(e){return n.createElement(Rt,l({PickerComponent:r.KeyboardDatePicker},e))},exports.KeyboardDateTimeInput=function(e){return n.createElement(Rt,l({PickerComponent:r.KeyboardDateTimePicker},e))},exports.KeyboardTimeInput=function(e){return n.createElement(Rt,l({PickerComponent:r.KeyboardTimePicker},e))},exports.TimeInput=function(e){return n.createElement(Rt,l({PickerComponent:r.TimePicker},e))},exports.useFullCalendarProps=Ss;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@material-ui/pickers"),r=require("react-admin"),n=require("@date-io/date-fns"),a=require("@fullcalendar/react"),o=require("@fullcalendar/daygrid"),i=require("@material-ui/core"),l=require("react-router-dom"),u=require("@fullcalendar/list");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=c(e),p=c(n),d=c(a),f=c(o),m=c(u);function b(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 v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(){return(g=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 y(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 h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return function(t){return("0".repeat(e)+t).slice(-e)}},O=h(4),P=h(2),k=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,C=function(e){if(!(e instanceof Date)||isNaN(e.getDate()))return"";var t=O(e.getFullYear()),r=P(e.getMonth()+1),n=P(e.getDate()),a=P(e.getHours()),o=P(e.getMinutes());return"".concat(t,"-").concat(r,"-").concat(n,"T").concat(a,":").concat(o)},D=function(e){return null==e||""===e?"":e instanceof Date?C(e):k.test(e)?e:C(new Date(e))},T=function(e){return e?new Date(e):""},w=["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"],j=["PickerComponent","format","label","options","source","resource","helperText","margin","onBlur","onChange","onFocus","parse","validate","variant","defaultValue","providerOptions","pickerVariant","stringFormat"],x=function(n){var a=n.PickerComponent,o=n.format,i=void 0===o?D:o,l=n.label,u=n.options,c=n.source,d=n.resource;n.helperText;var f=n.margin,m=void 0===f?"dense":f,h=n.onBlur,O=n.onChange,P=n.onFocus,k=n.parse,C=void 0===k?T:k,x=n.validate,S=n.variant,E=void 0===S?"filled":S;n.defaultValue;var V,q=n.providerOptions,I=q.utils,F=q.locale,M=n.pickerVariant,L=void 0===M?"dialog":M,R=n.stringFormat,B=void 0===R?"ISO":R,K=y(n,j),N=r.useTranslate(),_=r.useInput(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({format:i,onBlur:h,onChange:O,onFocus:P,parse:C,resource:d,source:c,validate:x},K)),z=_.id,A=_.input,H=_.isRequired,U=_.meta,Y=U.error,G=U.touched,$=e.useCallback((function(e){Date.parse(e)?A.onChange("ISO"===B?e.toISOString():e.toString()):A.onChange(null)}),[]);return s.default.createElement(t.MuiPickersUtilsProvider,{utils:I||p.default,locale:F},s.default.createElement(a,g({id:z,InputLabelProps:{shrink:!0},label:s.default.createElement(r.FieldTitle,{label:l,source:c,resource:d,isRequired:H}),variant:L,inputVariant:E,margin:m,error:!(!G||!Y),helperText:" ",clearLabel:N("ra.action.clear_input_value"),cancelLabel:N("ra.action.cancel")},u,((V=K).allowEmpty,V.alwaysOn,V.basePath,V.component,V.defaultValue,V.format,V.formClassName,V.initialValue,V.initializeForm,V.input,V.isRequired,V.label,V.limitChoicesToValue,V.locale,V.meta,V.options,V.optionText,V.optionValue,V.parse,V.record,V.resource,V.source,V.textAlign,V.translate,V.translateChoice,V.labelTime,y(V,w)),{value:A.value?new Date(A.value):null,onChange:function(e){return $(e)},onBlur:function(){return A.onBlur(A.value?"ISO"===B?new Date(A.value).toISOString():new Date(A.value).toString():null)}})))};x.defaultProps={isRequired:!1,meta:{touched:!1,error:!1},options:{},providerOptions:{utils:p.default,locale:void 0}};var S=function(t){var n=t.label,a=t.startDate,o=t.endDate,i=t.linkType,u=l.useHistory(),c=r.useListContext(),s=c.ids,p=c.data,d=c.basePath,f=new URLSearchParams(u.location.search),m=e.useCallback((function(e){var t=e.event;e.jsEvent.preventDefault(),u.push(t.url)}),[]),b=e.useCallback((function(e){var t=e.view;f.set("month",t.currentStart.getMonth()+1),f.set("year",t.currentStart.getFullYear()),u.replace({pathname:u.location.pathname,search:"?"+f.toString()})}),[f]),v=e.useMemo((function(){return s.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:r.linkToRecord(d,e)+"/"+i}}))}),[p,s,d]);return{initialDate:f.has("month")?new Date(f.get("year"),f.get("month")-1):new Date,events:v,datesSet:b,eventClick:m}},E=i.makeStyles((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"}}}})),V=function(e){var t=i.useTheme(),r=S(e);return E(),s.default.createElement(d.default,g({plugins:[f.default],locale:e.locale,initialView:"dayGridMonth",eventBackgroundColor:t.palette.primary.main},r))};V.defaultProps={linkType:"edit"};var q=i.makeStyles((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"}}}})),I=function(e){var t=S(e);return q(),s.default.createElement(d.default,g({plugins:[m.default],locale:e.locale,initialView:"listMonth"},t))};I.defaultProps={linkType:"edit"};exports.CalendarList=V,exports.DateInput=function(e){return s.default.createElement(x,g({PickerComponent:t.DatePicker},e))},exports.DateTimeInput=function(e){return s.default.createElement(x,g({PickerComponent:t.DateTimePicker},e))},exports.DaysList=I,exports.KeyboardDateInput=function(e){return s.default.createElement(x,g({PickerComponent:t.KeyboardDatePicker},e))},exports.KeyboardDateTimeInput=function(e){return s.default.createElement(x,g({PickerComponent:t.KeyboardDateTimePicker},e))},exports.KeyboardTimeInput=function(e){return s.default.createElement(x,g({PickerComponent:t.KeyboardTimePicker},e))},exports.TimeInput=function(e){return s.default.createElement(x,g({PickerComponent:t.TimePicker},e))},exports.useFullCalendarProps=S;
|
|
28
2
|
//# sourceMappingURL=index.cjs.js.map
|