6 lines
1.5 KiB
JavaScript
6 lines
1.5 KiB
JavaScript
|
/*!
|
||
|
FullCalendar v5.5.0
|
||
|
Docs & License: https://fullcalendar.io/
|
||
|
(c) 2020 Adam Shaw
|
||
|
*/
|
||
|
var FullCalendarMoment=function(e,t,a){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(a);var l=t.createPlugin({cmdFormatter:function(e,t){var a=function e(t){var a=t.match(/^(.*?)\{(.*)\}(.*)$/);if(a){var n=e(a[2]);return{head:a[1],middle:n,tail:a[3],whole:a[1]+n.whole+a[3]}}return{head:null,middle:null,tail:null,whole:t}}(e);if(t.end){var n=o(t.start.array,t.timeZone,t.start.timeZoneOffset,t.localeCodes[0]),r=o(t.end.array,t.timeZone,t.end.timeZoneOffset,t.localeCodes[0]);return function e(t,a,n,r){if(t.middle){var l=a(t.head),u=e(t.middle,a,n,r),o=a(t.tail),i=n(t.head),d=e(t.middle,a,n,r),f=n(t.tail);if(l===i&&o===f)return l+(u===d?u:u+r+d)+o}var c=a(t.whole),m=n(t.whole);if(c===m)return c;return c+r+m}(a,u(n),u(r),t.defaultSeparator)}return o(t.date.array,t.timeZone,t.date.timeZoneOffset,t.localeCodes[0]).format(a.whole)}});function u(e){return function(t){return t?e.format(t):""}}function o(e,t,a,n){var l;return"local"===t?l=r.default(e):"UTC"===t?l=r.default.utc(e):r.default.tz?l=r.default.tz(e,t):(l=r.default.utc(e),null!=a&&l.utcOffset(a)),l.locale(n),l}return t.globalPlugins.push(l),e.default=l,e.toMoment=function(e,a){if(!(a instanceof t.CalendarApi))throw new Error("must supply a CalendarApi instance");var n=a.getCurrentData().dateEnv;return o(e,n.timeZone,null,n.locale.codes[0])},e.toMomentDuration=function(e){return r.default.duration(e)},Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,moment);
|