vue-cal 5.0.1-rc.3 → 5.0.1-rc.4

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.
@@ -1,10 +1,10 @@
1
- import { computed as M, reactive as _e, watch as de, toRefs as xe, ref as ue, onBeforeUnmount as ze, inject as Se, createElementBlock as j, openBlock as Y, renderSlot as F, createCommentVNode as Z, unref as C, Fragment as se, renderList as De, normalizeClass as we, createElementVNode as me, createVNode as Me, Transition as He, withCtx as q, createBlock as be, resolveDynamicComponent as Xe, mergeProps as ge, toHandlers as je, normalizeProps as ne, guardReactiveProps as le, toDisplayString as re, onMounted as Ae, withModifiers as Ge, nextTick as We, normalizeStyle as ke, createTextVNode as Ze, TransitionGroup as qe, createSlots as $e, useTemplateRef as et, useId as tt, useAttrs as at, provide as st } from "vue";
1
+ import { computed as T, reactive as $e, watch as me, toRefs as lt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as Y, renderSlot as F, createCommentVNode as U, unref as C, Fragment as te, renderList as pe, normalizeClass as ke, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as Z, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as ye, toHandlers as Ie, normalizeProps as se, guardReactiveProps as ne, toDisplayString as le, onMounted as Ze, withModifiers as Qe, nextTick as Ue, normalizeStyle as Te, createTextVNode as xe, TransitionGroup as et, createSlots as je, useTemplateRef as rt, useId as it, useAttrs as ot, provide as ut } from "vue";
2
2
  /**
3
- * vue-cal v5.0.1-rc.3
3
+ * vue-cal v5.0.1-rc.4
4
4
  * (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
5
5
  * @license MIT
6
6
  */
7
- const ve = {
7
+ const fe = {
8
8
  texts: {
9
9
  weekDays: Array(7).fill(""),
10
10
  weekDaysShort: [],
@@ -33,16 +33,16 @@ const ve = {
33
33
  years: { cols: 5, rows: 5 }
34
34
  // Arbitrary range of quarters of century (25y).
35
35
  }
36
- }, nt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Pe = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], lt = Pe.reduce((c, s, i) => (c[s] = i || 7, c), {}), rt = (c, s, i) => {
37
- const { dateUtils: D } = c, w = !1, _ = M(() => {
38
- if (W.value[s.view]) return s.view;
36
+ }, ct = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], dt = Re.reduce((c, s, i) => (c[s] = i || 7, c), {}), vt = (c, s, i) => {
37
+ const { dateUtils: D } = c, w = !1, _ = T(() => {
38
+ if (N.value[s.view]) return s.view;
39
39
  {
40
40
  const l = s.datePicker ? "month" : "week", n = s.view || l;
41
- return W.value[n] ? n : (console.warn(
42
- `Vue Cal: the provided or default view \`${n}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
43
- ), Object.keys(W.value)[0]);
41
+ return N.value[n] ? n : (console.warn(
42
+ `Vue Cal: the provided or default view \`${n}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(N.value)[0]}\`.`
43
+ ), Object.keys(N.value)[0]);
44
44
  }
45
- }), L = M(() => s.sm && !s.xs), g = M(() => s.xs || s.datePicker), V = M(() => s.clickToNavigate || s.datePicker && s.clickToNavigate !== !1), o = M(() => {
45
+ }), z = T(() => s.sm && !s.xs), m = T(() => s.xs || s.datePicker), V = T(() => s.clickToNavigate || s.datePicker && s.clickToNavigate !== !1), o = T(() => {
46
46
  const l = {
47
47
  cell: {},
48
48
  // All possible event listeners to attach to cells.
@@ -50,30 +50,30 @@ const ve = {
50
50
  // All possible event listeners to attach to calendar events.
51
51
  }, n = (k) => k.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
52
52
  return Object.entries(i).forEach(([k, t]) => {
53
- const [O, z, R] = k.match(/^on(Cell|Event)(.+)$/) || [];
54
- O && (l[z.toLowerCase()][n(R).replace(/^-+|-+$/g, "")] = t);
53
+ const [O, P, I] = k.match(/^on(Cell|Event)(.+)$/) || [];
54
+ O && (l[P.toLowerCase()][n(I).replace(/^-+|-+$/g, "")] = t);
55
55
  }), l;
56
- }), f = M(() => {
56
+ }), f = T(() => {
57
57
  var n;
58
58
  const l = {};
59
- return s.hideWeekends && (l[6] = !0) && (l[7] = !0), (n = s.hideWeekdays) != null && n.length && s.hideWeekdays.forEach((k) => l[lt[k]] = !0), l;
60
- }), b = M(() => s.hideWeekends || f.value[6] && f.value[7]), W = M(() => {
59
+ return s.hideWeekends && (l[6] = !0) && (l[7] = !0), (n = s.hideWeekdays) != null && n.length && s.hideWeekdays.forEach((k) => l[dt[k]] = !0), l;
60
+ }), b = T(() => s.hideWeekends || f.value[6] && f.value[7]), N = T(() => {
61
61
  const l = s.datePicker;
62
62
  let n = 0, k = {};
63
63
  const t = s.views;
64
64
  return l && !t ? {
65
- month: { ...ve.availableViews.month },
66
- year: { ...ve.availableViews.year },
67
- years: { ...ve.availableViews.years }
68
- } : (t ? (Array.isArray(t) ? k = t.reduce((O, z) => (typeof z == "string" && ve.availableViews[z] ? O[z] = ve.availableViews[z] : n++, O), {}) : typeof t == "object" && (k = Object.entries(t).reduce((O, [z, R]) => {
69
- const { cols: Q, rows: ee } = ve.availableViews[z];
70
- return O[z] = { cols: R.cols || Q, rows: R.rows || ee }, O;
71
- }, {})), n && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(k).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), k = { ...ve.availableViews })) : k = { ...ve.availableViews }, k);
72
- }), X = M(() => s.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), u = M(() => {
65
+ month: { ...fe.availableViews.month },
66
+ year: { ...fe.availableViews.year },
67
+ years: { ...fe.availableViews.years }
68
+ } : (t ? (Array.isArray(t) ? k = t.reduce((O, P) => (typeof P == "string" && fe.availableViews[P] ? O[P] = fe.availableViews[P] : n++, O), {}) : typeof t == "object" && (k = Object.entries(t).reduce((O, [P, I]) => {
69
+ const { cols: K, rows: oe } = fe.availableViews[P];
70
+ return O[P] = { cols: I.cols || K, rows: I.rows || oe }, O;
71
+ }, {})), n && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(k).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), k = { ...fe.availableViews })) : k = { ...fe.availableViews }, k);
72
+ }), X = T(() => s.datePicker ? "month" : N.value.week ? "week" : Object.keys(N.value)[0]), u = T(() => {
73
73
  if (typeof s.selectedDate == "string") return D.stringToDate(s.selectedDate);
74
74
  if (s.selectedDate instanceof Date) return s.selectedDate;
75
75
  s.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", s.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
76
- }), d = M(() => {
76
+ }), d = T(() => {
77
77
  if (!s.disableDays) return [];
78
78
  const l = [];
79
79
  return Array.isArray(s.disableDays) ? s.disableDays.forEach((n) => {
@@ -83,17 +83,17 @@ const ve = {
83
83
  return;
84
84
  } else console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", n);
85
85
  }) : console.warn("Vue Cal: The provided `disableDays` prop is invalid:", s.disableDays), l;
86
- }), e = M(() => {
86
+ }), e = T(() => {
87
87
  let l = null;
88
88
  return s.minDate && typeof s.minDate == "string" ? l = D.stringToDate(s.minDate) : s.minDate && s.minDate instanceof Date && (l = s.minDate), (l == null ? void 0 : l.getTime()) || null;
89
- }), v = M(() => {
89
+ }), v = T(() => {
90
90
  let l = null;
91
91
  return s.maxDate && typeof s.maxDate == "string" ? l = D.stringToDate(s.maxDate) : s.maxDate && s.maxDate instanceof Date && (l = s.maxDate), (l == null ? void 0 : l.getTime()) || null;
92
- }), y = M(() => {
92
+ }), h = T(() => {
93
93
  var k;
94
94
  const { view: l } = c;
95
95
  return s.schedules.length && (l.isDay || l.isDays || l.isWeek) && ((k = s.schedules) == null ? void 0 : k.map((t, O) => ({ ...t, id: t.id ?? O + 1 }))) || void 0;
96
- }), E = M(() => {
96
+ }), E = T(() => {
97
97
  const l = {
98
98
  drag: !0,
99
99
  resize: !0,
@@ -101,7 +101,7 @@ const ve = {
101
101
  create: !0
102
102
  };
103
103
  return s.editableEvents === !0 ? l : s.editableEvents === !1 ? Object.keys(l).map((n) => l[n] = !1) : { ...l, ...s.editableEvents };
104
- }), H = async (l) => {
104
+ }), L = async (l) => {
105
105
  var k;
106
106
  let n = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.json").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.json").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.json").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.json").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.json").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.json").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.json").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.json").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.json").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.json").then((t) => t.default), "../i18n/en-us.json": () => import("./i18n/en-us.json").then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.json").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.json").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.json").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.json").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.json").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.json").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.json").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.json").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.json").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.json").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.json").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.json").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.json").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.json").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.json").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.json").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.json").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.json").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.json").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.json").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.json").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.json").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.json").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.json").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.json").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.json").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.json").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.json").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.json").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.json").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.json").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.json").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.json").then((t) => t.default) });
107
107
  {
@@ -111,26 +111,26 @@ const ve = {
111
111
  }
112
112
  n = await ((k = n[`../i18n/${l}.json`]) == null ? void 0 : k.call(n));
113
113
  }
114
- c.texts = Object.assign(c.texts, Object.assign({ ...ve.texts }, n)), D.updateTexts(c.texts);
114
+ c.texts = Object.assign(c.texts, Object.assign({ ...fe.texts }, n)), D.updateTexts(c.texts);
115
115
  };
116
- let B = _e(s.events || []);
117
- return de(() => s.events, (l) => B.splice(0, B.length, ...l)), (s.locale || !c.texts.today) && H(s.locale || "en-us"), {
118
- ...xe(s),
116
+ let B = $e(s.events || []);
117
+ return me(() => s.events, (l) => B.splice(0, B.length, ...l)), (s.locale || !c.texts.today) && L(s.locale || "en-us"), {
118
+ ...lt(s),
119
119
  events: B,
120
120
  // All the events listeners for cells and events that the end user may have attached to vue-cal.
121
121
  eventListeners: o,
122
122
  defaultView: X,
123
- availableViews: W,
123
+ availableViews: N,
124
124
  disableDays: d,
125
125
  ready: w,
126
- sm: L,
127
- xs: g,
126
+ sm: z,
127
+ xs: m,
128
128
  clickToNavigate: V,
129
129
  hideWeekdays: f,
130
130
  hideWeekends: b,
131
131
  minTimestamp: e,
132
132
  maxTimestamp: v,
133
- schedules: y,
133
+ schedules: h,
134
134
  selectedDate: u,
135
135
  editableEvents: E,
136
136
  view: _,
@@ -139,115 +139,115 @@ const ve = {
139
139
  return Object.keys(f.value).length;
140
140
  },
141
141
  get size() {
142
- return g.value ? "xs" : L.value ? "sm" : "lg";
142
+ return m.value ? "xs" : z.value ? "sm" : "lg";
143
143
  },
144
- loadTexts: H
144
+ loadTexts: L
145
145
  };
146
- }, Te = (c, s) => {
146
+ }, Ve = (c, s) => {
147
147
  const i = s.timeTo - s.timeFrom;
148
148
  return (c - s.timeFrom) * 100 / i;
149
- }, Ee = (c, s) => {
149
+ }, Pe = (c, s) => {
150
150
  const i = s.timeTo - s.timeFrom;
151
151
  return ~~(c * i / 100 + s.timeFrom);
152
- }, Be = (c, s) => {
152
+ }, Je = (c, s) => {
153
153
  const i = s.clientHeight;
154
154
  return c * 100 / i;
155
- }, Oe = _e({ id: null, date: null });
156
- let Je = !1, Ne = !0;
157
- const ye = _e({ el: null, cell: null, timeout: null }), pe = _e({
155
+ }, Ae = $e({ id: null, date: null });
156
+ let tt = !1, qe = !0;
157
+ const we = $e({ el: null, cell: null, timeout: null }), be = $e({
158
158
  eventId: null,
159
159
  fromVueCal: null,
160
160
  toVueCal: null
161
161
  });
162
- function it(c) {
163
- const { config: s, view: i, eventsManager: D, emit: w, uid: _, dateUtils: L } = c, g = (e) => {
162
+ function mt(c) {
163
+ const { config: s, view: i, eventsManager: D, emit: w, uid: _, dateUtils: z } = c, m = (e) => {
164
164
  var n;
165
- const { timeStep: v, timeCellHeight: y, timeFrom: E } = s, H = (((n = e.touches) == null ? void 0 : n[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), l = H - B - ~~e.dataTransfer.getData("cursor-grab-at");
166
- return Ee(Be(l, e.currentTarget), s);
167
- }, V = (e, v, y) => {
165
+ const { timeStep: v, timeCellHeight: h, timeFrom: E } = s, L = (((n = e.touches) == null ? void 0 : n[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), l = L - B - ~~e.dataTransfer.getData("cursor-grab-at");
166
+ return Pe(Je(l, e.currentTarget), s);
167
+ }, V = (e, v, h) => {
168
168
  const E = v.duration || o(v.start, v.end) || s.timeStep;
169
- let H = Math.max(g(e), 0);
169
+ let L = Math.max(m(e), 0);
170
170
  if (s.snapToInterval) {
171
- const k = H + s.snapToInterval / 2;
172
- H = k - k % s.snapToInterval;
171
+ const k = L + s.snapToInterval / 2;
172
+ L = k - k % s.snapToInterval;
173
173
  }
174
- const B = new Date(new Date(y).setMinutes(H)), l = Math.min(H + E, 24 * 60), n = new Date(new Date(y).setMinutes(l));
174
+ const B = new Date(new Date(h).setMinutes(L)), l = Math.min(L + E, 24 * 60), n = new Date(new Date(h).setMinutes(l));
175
175
  return { start: B, end: n };
176
176
  }, o = (e, v) => Math.round((v - e) / 6e4);
177
177
  return {
178
178
  eventDragStart: (e, v) => {
179
179
  if (e.target.nodeType === 3 || c.touch.isResizingEvent) return e.preventDefault();
180
180
  e.dataTransfer.dropEffect = "move";
181
- const y = { ...v, _: { id: v._.id, duration: o(v.start, v.end) } };
182
- e.dataTransfer.setData("event", JSON.stringify(y)), e.dataTransfer.setData("cursor-grab-at", e.offsetY), pe.eventId = v._.id, pe.fromVueCal = _;
181
+ const h = { ...v, _: { id: v._.id, duration: o(v.start, v.end) } };
182
+ e.dataTransfer.setData("event", JSON.stringify(h)), e.dataTransfer.setData("cursor-grab-at", e.offsetY), be.eventId = v._.id, be.fromVueCal = _;
183
183
  const E = e.target.closest(".vuecal__event");
184
184
  E.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
185
185
  E.classList.add("vuecal__event--dragging-original"), E.classList.remove("vuecal__event--dragging-ghost");
186
- }, 0), Je = !1, Object.assign(Oe, { id: i.id, date: i.firstCellDate }), Ne = !0, c.touch.isDraggingEvent = !0;
186
+ }, 0), tt = !1, Object.assign(Ae, { id: i.id, date: i.firstCellDate }), qe = !0, c.touch.isDraggingEvent = !0;
187
187
  },
188
188
  eventDragEnd: (e, v) => {
189
- pe.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
190
- const { fromVueCal: y, toVueCal: E } = pe;
191
- E && y !== E && D.deleteEvent(v._.id, 3), pe.fromVueCal = null, pe.toVueCal = null, Je && Ne && Oe.id && i.switchView(Oe.id, Oe.date, !0), c.touch.isDraggingEvent = !1;
189
+ be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
190
+ const { fromVueCal: h, toVueCal: E } = be;
191
+ E && h !== E && D.deleteEvent(v._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && i.switchView(Ae.id, Ae.date, !0), c.touch.isDraggingEvent = !1;
192
192
  },
193
193
  cellDragEnter: (e, v) => {
194
- const { start: y } = v, E = e.currentTarget;
194
+ const { start: h } = v, E = e.currentTarget;
195
195
  if (!e.currentTarget.contains(e.relatedTarget)) {
196
- if (E === ye.el || !E.className.includes("vuecal__cell-content")) return !1;
197
- ye.el && (ye.cell.highlighted = !1), Object.assign(ye, { el: E, cell: v, timeout: clearTimeout(ye.timeout) }), v.highlighted = !0, ["years", "year", "month"].includes(i.id) && (ye.timeout = setTimeout(() => c.switchToNarrowerView(y), 2e3));
196
+ if (E === we.el || !E.className.includes("vuecal__cell-content")) return !1;
197
+ we.el && (we.cell.highlighted = !1), Object.assign(we, { el: E, cell: v, timeout: clearTimeout(we.timeout) }), v.highlighted = !0, ["years", "year", "month"].includes(i.id) && (we.timeout = setTimeout(() => c.switchToNarrowerView(h), 2e3));
198
198
  }
199
199
  },
200
200
  cellDragOver: (e, v) => {
201
- const { start: y, schedule: E } = v;
201
+ const { start: h, schedule: E } = v;
202
202
  e.preventDefault(), v.highlighted = !0, (E || E === 0) && (v.highlightedSchedule = E);
203
203
  },
204
204
  cellDragLeave: (e, v) => {
205
- e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (v.highlightedSchedule = !1, ye.cell === v && (clearTimeout(ye.timeout), Object.assign(ye, { el: null, cell: null, timeout: null }), v.highlighted = !1));
205
+ e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (v.highlightedSchedule = !1, we.cell === v && (clearTimeout(we.timeout), Object.assign(we, { el: null, cell: null, timeout: null }), v.highlighted = !1));
206
206
  },
207
207
  cellDragDrop: async (e, v) => {
208
- var O, z, R;
209
- e.preventDefault(), clearTimeout(ye.timeout), Object.assign(ye, { el: null, cell: null, timeout: null });
210
- const y = JSON.parse(e.dataTransfer.getData("event") || "{}");
211
- y.start && (y.start = new Date(y.start)), y.end && (y.end = new Date(y.end));
208
+ var O, P, I;
209
+ e.preventDefault(), clearTimeout(we.timeout), Object.assign(we, { el: null, cell: null, timeout: null });
210
+ const h = JSON.parse(e.dataTransfer.getData("event") || "{}");
211
+ h.start && (h.start = new Date(h.start)), h.end && (h.end = new Date(h.end));
212
212
  let E;
213
- const { start: H, end: B } = V(e, y, v.start), { schedule: l } = ((O = e.target.closest("[data-schedule]")) == null ? void 0 : O.dataset) || {};
213
+ const { start: L, end: B } = V(e, h, v.start), { schedule: l } = ((O = e.target.closest("[data-schedule]")) == null ? void 0 : O.dataset) || {};
214
214
  let n = () => {
215
215
  };
216
- pe.fromVueCal === _ ? (E = D.getEvent(y._.id), E && (E._.dragging = !1, n = () => {
217
- E.start = H, E.end = B, l !== void 0 && (E.schedule = ~~l);
216
+ be.fromVueCal === _ ? (E = D.getEvent(h._.id), E && (E._.dragging = !1, n = () => {
217
+ E.start = L, E.end = B, l !== void 0 && (E.schedule = ~~l);
218
218
  })) : (E = {
219
- ...y,
220
- start: H,
219
+ ...h,
220
+ start: L,
221
221
  end: B,
222
222
  ...l !== void 0 && { schedule: ~~l },
223
- _: { id: ((z = y._) == null ? void 0 : z.id) || y.id, duration: o(H, B) },
223
+ _: { id: ((P = h._) == null ? void 0 : P.id) || h.id, duration: o(L, B) },
224
224
  getOverlappingEvents: () => D.getEventsInRange(
225
- D.getEventsByDate(L.formatDate(H), !0),
226
- { start: H, end: B },
225
+ D.getEventsByDate(z.formatDate(L), !0),
226
+ { start: L, end: B },
227
227
  { schedule: ~~l }
228
228
  )
229
229
  }, n = () => {
230
230
  E = D.createEvent(E);
231
231
  });
232
232
  let k = !0;
233
- const { drop: t } = (R = s.eventListeners) == null ? void 0 : R.event;
233
+ const { drop: t } = (I = s.eventListeners) == null ? void 0 : I.event;
234
234
  t && (k = await t({
235
235
  e,
236
- event: { ...E, start: H, end: B, schedule: ~~l },
237
- overlaps: E.getOverlappingEvents({ start: H, end: B, schedule: ~~l }),
236
+ event: { ...E, start: L, end: B, schedule: ~~l },
237
+ overlaps: E.getOverlappingEvents({ start: L, end: B, schedule: ~~l }),
238
238
  cell: v,
239
- external: pe.fromVueCal !== _
240
- })), k !== !1 && n(), v.highlighted = !1, v.highlightedSchedule = null, Ne = !1, pe.toVueCal = _, w("event-dropped", { event: E, originalEvent: y, external: pe.fromVueCal !== _ }), w("event-change", { event: E, originalEvent: y });
239
+ external: be.fromVueCal !== _
240
+ })), k !== !1 && n(), v.highlighted = !1, v.highlightedSchedule = null, qe = !1, be.toVueCal = _, w("event-dropped", { event: E, originalEvent: h, external: be.fromVueCal !== _ }), w("event-change", { event: E, originalEvent: h });
241
241
  }
242
242
  };
243
243
  }
244
- const Ke = (c) => {
244
+ const st = (c) => {
245
245
  let s, i, D, w = {}, _ = {};
246
- const L = ue(c), g = () => {
246
+ const z = ie(c), m = () => {
247
247
  Date.prototype.addDays = function(a) {
248
248
  return b(this, a || 0);
249
249
  }, Date.prototype.subtractDays = function(a) {
250
- return W(this, a || 0);
250
+ return N(this, a || 0);
251
251
  }, Date.prototype.addHours = function(a) {
252
252
  return X(this, a || 0);
253
253
  }, Date.prototype.subtractHours = function(a) {
@@ -257,121 +257,121 @@ const Ke = (c) => {
257
257
  }, Date.prototype.subtractMinutes = function(a) {
258
258
  return e(this, a || 0);
259
259
  }, Date.prototype.getWeek = function() {
260
- return y(this);
260
+ return h(this);
261
261
  }, Date.prototype.isToday = function() {
262
262
  return E(this);
263
263
  }, Date.prototype.isLeapYear = function() {
264
264
  return l(this);
265
265
  }, Date.prototype.format = function(a = "YYYY-MM-DD") {
266
- return Q(this, a);
266
+ return K(this, a);
267
267
  }, Date.prototype.formatTime = function(a = "HH:mm") {
268
- return ie(this, a);
268
+ return ae(this, a);
269
269
  };
270
270
  }, V = () => {
271
271
  delete Date.prototype.addDays, delete Date.prototype.subtractDays, delete Date.prototype.addHours, delete Date.prototype.subtractHours, delete Date.prototype.addMinutes, delete Date.prototype.subtractMinutes, delete Date.prototype.getWeek, delete Date.prototype.isToday, delete Date.prototype.isLeapYear, delete Date.prototype.format, delete Date.prototype.formatTime;
272
- }, o = (a) => L.value = a, f = () => (i !== (/* @__PURE__ */ new Date()).getDate() && (s = /* @__PURE__ */ new Date(), i = s.getDate(), D = `${s.getFullYear()}-${s.getMonth()}-${s.getDate()}`), D), b = (a, p) => {
273
- const m = new Date(a.valueOf());
274
- return m.setDate(m.getDate() + p), m;
275
- }, W = (a, p) => {
276
- const m = new Date(a.valueOf());
277
- return m.setDate(m.getDate() - p), m;
272
+ }, o = (a) => z.value = a, f = () => (i !== (/* @__PURE__ */ new Date()).getDate() && (s = /* @__PURE__ */ new Date(), i = s.getDate(), D = `${s.getFullYear()}-${s.getMonth()}-${s.getDate()}`), D), b = (a, p) => {
273
+ const y = new Date(a.valueOf());
274
+ return y.setDate(y.getDate() + p), y;
275
+ }, N = (a, p) => {
276
+ const y = new Date(a.valueOf());
277
+ return y.setDate(y.getDate() - p), y;
278
278
  }, X = (a, p) => {
279
- const m = new Date(a.valueOf());
280
- return m.setHours(m.getHours() + p), m;
279
+ const y = new Date(a.valueOf());
280
+ return y.setHours(y.getHours() + p), y;
281
281
  }, u = (a, p) => {
282
- const m = new Date(a.valueOf());
283
- return m.setHours(m.getHours() - p), m;
282
+ const y = new Date(a.valueOf());
283
+ return y.setHours(y.getHours() - p), y;
284
284
  }, d = (a, p) => {
285
- const m = new Date(a.valueOf());
286
- return m.setMinutes(m.getMinutes() + p), m;
285
+ const y = new Date(a.valueOf());
286
+ return y.setMinutes(y.getMinutes() + p), y;
287
287
  }, e = (a, p) => {
288
- const m = new Date(a.valueOf());
289
- return m.setMinutes(m.getMinutes() - p), m;
288
+ const y = new Date(a.valueOf());
289
+ return y.setMinutes(y.getMinutes() - p), y;
290
290
  }, v = (a, p) => {
291
- const m = (G) => {
292
- const U = G % p;
293
- return U !== 0 && (G += U >= p / 2 ? p - U : -U), G;
291
+ const y = (G) => {
292
+ const J = G % p;
293
+ return J !== 0 && (G += J >= p / 2 ? p - J : -J), G;
294
294
  };
295
- if (typeof a == "number") return m(a);
295
+ if (typeof a == "number") return y(a);
296
296
  if (a instanceof Date) {
297
- let G = m(a.getMinutes());
297
+ let G = y(a.getMinutes());
298
298
  G >= 60 && (a.setHours(a.getHours() + 1), G = 0), a.setMinutes(G, 0, 0);
299
299
  }
300
- }, y = (a, p = !1) => {
301
- const m = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), G = m.getUTCDay() || 7;
302
- m.setUTCDate(m.getUTCDate() + 4 - G);
303
- const U = new Date(Date.UTC(m.getUTCFullYear(), 0, 1));
304
- return Math.ceil(((m - U) / 864e5 + 1) / 7) + (p ? 1 : 0);
305
- }, E = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === f(), H = (a, p) => {
300
+ }, h = (a, p = !1) => {
301
+ const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), G = y.getUTCDay() || 7;
302
+ y.setUTCDate(y.getUTCDate() + 4 - G);
303
+ const J = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
304
+ return Math.ceil(((y - J) / 864e5 + 1) / 7) + (p ? 1 : 0);
305
+ }, E = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === f(), L = (a, p) => {
306
306
  if (!a || !p) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
307
- if (R(a)) {
308
- if (!R(p)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${p}\`.`);
307
+ if (I(a)) {
308
+ if (!I(p)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${p}\`.`);
309
309
  } else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${a}\`.`);
310
310
  return a.getFullYear() === p.getFullYear() && a.getMonth() === p.getMonth() && a.getDate() === p.getDate();
311
- }, B = (a, p, m) => R(a) ? a.getTime() >= p && a.getTime() <= m : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
311
+ }, B = (a, p, y) => I(a) ? a.getTime() >= p && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
312
312
  const p = a.getFullYear();
313
313
  return !(p % 400) || p % 100 && !(p % 4);
314
314
  }, n = (a = null, p) => {
315
- const m = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), G = p ? 7 : 6;
316
- return m.setDate(m.getDate() - (m.getDay() + G) % 7), m;
315
+ const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), G = p ? 7 : 6;
316
+ return y.setDate(y.getDate() - (y.getDay() + G) % 7), y;
317
317
  }, k = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), t = (a) => a.getHours() * 60 + a.getMinutes(), O = (a, p) => {
318
318
  typeof a == "string" && (a = a.replace(/-/g, "/")), typeof p == "string" && (p = p.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), p = new Date(p).setHours(0, 0, 1, 0);
319
- const m = (new Date(p).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
320
- return Math.ceil((p - a - m) / (24 * 3600 * 1e3));
321
- }, z = (a, p, m) => Math.abs(a.getTime() - p.getTime()) <= m * 60 * 1e3, R = (a) => a && a instanceof Date && !isNaN(a), Q = (a, p = "YYYY-MM-DD", m = null) => {
322
- if (m || (m = L.value), p || (p = "YYYY-MM-DD"), p === "YYYY-MM-DD") return ee(a);
319
+ const y = (new Date(p).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
320
+ return Math.ceil((p - a - y) / (24 * 3600 * 1e3));
321
+ }, P = (a, p, y) => Math.abs(a.getTime() - p.getTime()) <= y * 60 * 1e3, I = (a) => a && a instanceof Date && !isNaN(a), K = (a, p = "YYYY-MM-DD", y = null) => {
322
+ if (y || (y = z.value), p || (p = "YYYY-MM-DD"), p === "YYYY-MM-DD") return oe(a);
323
323
  w = {}, _ = {};
324
324
  const G = {
325
- YYYY: () => J(a, m).YYYY,
326
- YY: () => J(a, m).YY(),
327
- M: () => J(a, m).M,
328
- MM: () => J(a, m).MM(),
329
- MMM: () => J(a, m).MMM(),
330
- MMMM: () => J(a, m).MMMM(),
331
- MMMMG: () => J(a, m).MMMMG(),
332
- D: () => J(a, m).D,
333
- DD: () => J(a, m).DD(),
334
- S: () => J(a, m).S(),
335
- d: () => J(a, m).d,
336
- dd: () => J(a, m).dd(),
337
- ddd: () => J(a, m).ddd(),
338
- dddd: () => J(a, m).dddd(),
339
- HH: () => ce(a, m).HH,
340
- H: () => ce(a, m).H,
341
- hh: () => ce(a, m).hh,
342
- h: () => ce(a, m).h,
343
- am: () => ce(a, m).am,
344
- AM: () => ce(a, m).AM,
345
- mm: () => ce(a, m).mm,
346
- m: () => ce(a, m).m,
347
- s: () => ce(a, m).s
325
+ YYYY: () => Q(a, y).YYYY,
326
+ YY: () => Q(a, y).YY(),
327
+ M: () => Q(a, y).M,
328
+ MM: () => Q(a, y).MM(),
329
+ MMM: () => Q(a, y).MMM(),
330
+ MMMM: () => Q(a, y).MMMM(),
331
+ MMMMG: () => Q(a, y).MMMMG(),
332
+ D: () => Q(a, y).D,
333
+ DD: () => Q(a, y).DD(),
334
+ S: () => Q(a, y).S(),
335
+ d: () => Q(a, y).d,
336
+ dd: () => Q(a, y).dd(),
337
+ ddd: () => Q(a, y).ddd(),
338
+ dddd: () => Q(a, y).dddd(),
339
+ HH: () => ue(a, y).HH,
340
+ H: () => ue(a, y).H,
341
+ hh: () => ue(a, y).hh,
342
+ h: () => ue(a, y).h,
343
+ am: () => ue(a, y).am,
344
+ AM: () => ue(a, y).AM,
345
+ mm: () => ue(a, y).mm,
346
+ m: () => ue(a, y).m,
347
+ s: () => ue(a, y).s
348
348
  };
349
- return p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (U, fe) => {
350
- const r = G[fe.replace(/\{|\}/g, "")];
351
- return r !== void 0 ? r() : fe;
349
+ return p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (J, ce) => {
350
+ const r = G[ce.replace(/\{|\}/g, "")];
351
+ return r !== void 0 ? r() : ce;
352
352
  });
353
- }, ee = (a) => {
354
- const p = a.getMonth() + 1, m = a.getDate();
355
- return `${a.getFullYear()}-${p < 10 ? "0" : ""}${p}-${m < 10 ? "0" : ""}${m}`;
356
- }, ie = (a, p = "HH:mm", m = null, G = !1) => {
357
- let U = !1;
353
+ }, oe = (a) => {
354
+ const p = a.getMonth() + 1, y = a.getDate();
355
+ return `${a.getFullYear()}-${p < 10 ? "0" : ""}${p}-${y < 10 ? "0" : ""}${y}`;
356
+ }, ae = (a, p = "HH:mm", y = null, G = !1) => {
357
+ let J = !1;
358
358
  if (G) {
359
- const [T, S, $] = [a.getHours(), a.getMinutes(), a.getSeconds()];
360
- T + S + $ === 141 && (U = !0);
359
+ const [$, S, M] = [a.getHours(), a.getMinutes(), a.getSeconds()];
360
+ $ + S + M === 141 && (J = !0);
361
361
  }
362
- if (a instanceof Date && p === "HH:mm") return U ? "24:00" : oe(a);
363
- _ = {}, m || (m = L.value);
364
- const fe = ce(a, m), r = p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (T, S) => {
365
- const $ = fe[S.replace(/\{|\}/g, "")];
366
- return $ !== void 0 ? $ : S;
362
+ if (a instanceof Date && p === "HH:mm") return J ? "24:00" : re(a);
363
+ _ = {}, y || (y = z.value);
364
+ const ce = ue(a, y), r = p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, ($, S) => {
365
+ const M = ce[S.replace(/\{|\}/g, "")];
366
+ return M !== void 0 ? M : S;
367
367
  });
368
- return U ? r.replace("23:59", "24:00") : r;
369
- }, oe = (a) => {
370
- const p = a.getHours(), m = a.getMinutes();
371
- return `${(p < 10 ? "0" : "") + p}:${(m < 10 ? "0" : "") + m}`;
372
- }, he = (a) => {
373
- const p = Math.floor(a / 60).toString().padStart(2, 0), m = (a % 60).toString().padStart(2, 0);
374
- return `${p}:${m}`;
368
+ return J ? r.replace("23:59", "24:00") : r;
369
+ }, re = (a) => {
370
+ const p = a.getHours(), y = a.getMinutes();
371
+ return `${(p < 10 ? "0" : "") + p}:${(y < 10 ? "0" : "") + y}`;
372
+ }, De = (a) => {
373
+ const p = Math.floor(a / 60).toString().padStart(2, 0), y = (a % 60).toString().padStart(2, 0);
374
+ return `${p}:${y}`;
375
375
  }, x = (a) => {
376
376
  if (a > 3 && a < 21) return "th";
377
377
  switch (a % 10) {
@@ -384,14 +384,14 @@ const Ke = (c) => {
384
384
  default:
385
385
  return "th";
386
386
  }
387
- }, J = (a, p) => {
387
+ }, Q = (a, p) => {
388
388
  if (w.D) return w;
389
- const m = a.getFullYear(), G = a.getMonth() + 1, U = a.getDate(), r = (a.getDay() - 1 + 7) % 7;
389
+ const y = a.getFullYear(), G = a.getMonth() + 1, J = a.getDate(), r = (a.getDay() - 1 + 7) % 7;
390
390
  return w = {
391
391
  // Year.
392
- YYYY: m,
392
+ YYYY: y,
393
393
  // 2024.
394
- YY: () => m.toString().substring(2),
394
+ YY: () => y.toString().substring(2),
395
395
  // 24.
396
396
  // Month.
397
397
  M: G,
@@ -405,11 +405,11 @@ const Ke = (c) => {
405
405
  MMMMG: () => (p.monthsGenitive || p.months)[G - 1],
406
406
  // January to December in genitive form (Greek...)
407
407
  // Day.
408
- D: U,
408
+ D: J,
409
409
  // 1 to 31.
410
- DD: () => U.toString().padStart(2, 0),
410
+ DD: () => J.toString().padStart(2, 0),
411
411
  // 01 to 31.
412
- S: () => x(U),
412
+ S: () => x(J),
413
413
  // st, nd, rd, th.
414
414
  // Day of the week.
415
415
  d: r + 1,
@@ -422,55 +422,55 @@ const Ke = (c) => {
422
422
  dddd: () => p.weekDays[r]
423
423
  // Monday to Sunday.
424
424
  }, w;
425
- }, ce = (a, p) => {
425
+ }, ue = (a, p) => {
426
426
  if (_.am) return _;
427
- let m, G, U;
428
- a instanceof Date ? (m = a.getHours(), G = a.getMinutes(), U = a.getSeconds()) : (m = Math.floor(a / 60), G = Math.floor(a % 60));
429
- const fe = m % 12 ? m % 12 : 12, r = (p || { am: "am", pm: "pm" })[m === 24 || m < 12 ? "am" : "pm"];
427
+ let y, G, J;
428
+ a instanceof Date ? (y = a.getHours(), G = a.getMinutes(), J = a.getSeconds()) : (y = Math.floor(a / 60), G = Math.floor(a % 60));
429
+ const ce = y % 12 ? y % 12 : 12, r = (p || { am: "am", pm: "pm" })[y === 24 || y < 12 ? "am" : "pm"];
430
430
  return _ = {
431
- H: m,
432
- h: fe,
433
- HH: m.toString().padStart(2, 0),
434
- hh: fe.toString().padStart(2, 0),
431
+ H: y,
432
+ h: ce,
433
+ HH: y.toString().padStart(2, 0),
434
+ hh: ce.toString().padStart(2, 0),
435
435
  am: r,
436
436
  AM: r.toUpperCase(),
437
437
  m: G,
438
438
  mm: G.toString().padStart(2, 0),
439
- s: U
439
+ s: J
440
440
  }, _;
441
441
  };
442
442
  return {
443
- addDatePrototypes: g,
443
+ addDatePrototypes: m,
444
444
  removeDatePrototypes: V,
445
445
  updateTexts: o,
446
446
  addDays: b,
447
- subtractDays: W,
447
+ subtractDays: N,
448
448
  addHours: X,
449
449
  subtractHours: u,
450
450
  addMinutes: d,
451
451
  subtractMinutes: e,
452
452
  snapToInterval: v,
453
- getWeek: y,
453
+ getWeek: h,
454
454
  isToday: E,
455
- isSameDate: H,
455
+ isSameDate: L,
456
456
  isInRange: B,
457
457
  isLeapYear: l,
458
458
  getPreviousFirstDayOfWeek: n,
459
459
  stringToDate: k,
460
460
  dateToMinutes: t,
461
461
  countDays: O,
462
- datesInSameTimeStep: z,
463
- isValid: R,
464
- formatDate: Q,
465
- formatDateLite: ee,
466
- formatTime: ie,
467
- formatTimeLite: oe,
468
- formatMinutes: he
462
+ datesInSameTimeStep: P,
463
+ isValid: I,
464
+ formatDate: K,
465
+ formatDateLite: oe,
466
+ formatTime: ae,
467
+ formatTimeLite: re,
468
+ formatMinutes: De
469
469
  };
470
- }, ot = (c) => {
470
+ }, ft = (c) => {
471
471
  const { dateUtils: s, config: i } = c;
472
472
  let D = 0;
473
- const w = M(() => {
473
+ const w = T(() => {
474
474
  const u = {
475
475
  byDate: {},
476
476
  // A map of single-day events indexed by date.
@@ -483,11 +483,11 @@ const Ke = (c) => {
483
483
  };
484
484
  return i.events.sort((e, v) => e.start - v.start < 0 ? -1 : 1).forEach((e) => {
485
485
  _(e), e._ || (e._ = {}), e._.id = e._.id || ++D, e.delete || (e.delete = (v) => f(e._.id, v)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (v = null) => e.getOverlappingEvents(v).length, e.getOverlappingEvents = (v = null) => {
486
- var y;
487
- return W(
488
- g(s.formatDate((v == null ? void 0 : v.start) || e.start), !0),
486
+ var h;
487
+ return N(
488
+ m(s.formatDate((v == null ? void 0 : v.start) || e.start), !0),
489
489
  { start: (v == null ? void 0 : v.start) || e.start, end: (v == null ? void 0 : v.end) || e.end },
490
- { excludeIds: [e._.id], schedule: (y = i.schedules) != null && y.length ? ~~((v == null ? void 0 : v.schedule) || e.schedule) : null }
490
+ { excludeIds: [e._.id], schedule: (h = i.schedules) != null && h.length ? ~~((v == null ? void 0 : v.schedule) || e.schedule) : null }
491
491
  );
492
492
  }, e._.register = (v) => {
493
493
  e._.$el = v, e._.fireCreated && (c.emit("event-created", e), delete e._.fireCreated);
@@ -501,16 +501,16 @@ const Ke = (c) => {
501
501
  return;
502
502
  } else u.end.getTime() < u.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${u.title}". The event ends before it starts.`, u.start, u.end);
503
503
  u._ || (u._ = {}), u._.multiday = !s.isSameDate(u.start, new Date(u.end.getTime() - 1)), u._.startFormatted = s.formatDate(u.start), u._.startMinutes = ~~s.dateToMinutes(u.start), u._.endMinutes = ~~s.dateToMinutes(u.end);
504
- const d = u.start.getHours(), e = u.start.getMinutes().toString().padStart(2, 0), v = u.end.getHours(), y = u.end.getMinutes().toString().padStart(2, 0);
505
- u._.startTimeFormatted24 = `${d.toString().padStart(2, 0)}:${e}`, u._.startTimeFormatted12 = `${d % 12 || 12}${e ? `:${e}` : ""} ${d < 12 ? "AM" : "PM"}`, u._.endTimeFormatted24 = `${v.toString().padStart(2, 0)}:${y}`, u._.endTimeFormatted12 = `${v % 12 || 12}${y ? `:${y}` : ""} ${v < 12 ? "AM" : "PM"}`, u._.duration = Math.abs(~~((u.end - u.start) / 6e4));
506
- }, L = (u) => w.value.byId[u], g = (u, d = !1, e = !1) => {
504
+ const d = u.start.getHours(), e = u.start.getMinutes().toString().padStart(2, 0), v = u.end.getHours(), h = u.end.getMinutes().toString().padStart(2, 0);
505
+ u._.startTimeFormatted24 = `${d.toString().padStart(2, 0)}:${e}`, u._.startTimeFormatted12 = `${d % 12 || 12}${e ? `:${e}` : ""} ${d < 12 ? "AM" : "PM"}`, u._.endTimeFormatted24 = `${v.toString().padStart(2, 0)}:${h}`, u._.endTimeFormatted12 = `${v % 12 || 12}${h ? `:${h}` : ""} ${v < 12 ? "AM" : "PM"}`, u._.duration = Math.abs(~~((u.end - u.start) / 6e4));
506
+ }, z = (u) => w.value.byId[u], m = (u, d = !1, e = !1) => {
507
507
  let v = w.value.byDate[u] || [];
508
- return v = d || e ? v.map(L) : v, e || (v = v.filter((y) => !y.background), d || (v = v.map((y) => y._.id))), v;
508
+ return v = d || e ? v.map(z) : v, e || (v = v.filter((h) => !h.background), d || (v = v.map((h) => h._.id))), v;
509
509
  }, V = (u) => {
510
510
  const d = {};
511
511
  return u.forEach(({ startFormatted: e }) => {
512
512
  d[e] = [];
513
- const v = g(e, !1, !0);
513
+ const v = m(e, !1, !0);
514
514
  v.length && d[e].push(...v);
515
515
  }), d;
516
516
  }, o = (u) => {
@@ -520,7 +520,7 @@ const Ke = (c) => {
520
520
  }
521
521
  return i.snapToInterval && (s.snapToInterval(u.start, i.snapToInterval), s.snapToInterval(u.end, i.snapToInterval)), u = { ...u }, u._ || (u._ = {}), u._.id = ++D, u._.fireCreated = !0, i.events.push(u), u;
522
522
  }, f = (u, d = 0) => {
523
- var y;
523
+ var h;
524
524
  if (!i.editableEvents.delete)
525
525
  return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
526
526
  if (!u) return console.warn("Vue Cal: Cannot delete event without its ID.");
@@ -540,7 +540,7 @@ const Ke = (c) => {
540
540
  // When explicitly using this stage, the event will be visually deleted but still present in the
541
541
  // source of truth until the cell is unmounted (by navigating away).
542
542
  case 2:
543
- v._.deleted = !0, i.events[e]._.deleted = !0, (y = v._.$el) == null || y.dispatchEvent(new CustomEvent("event-deleted", { detail: v._.id }));
543
+ v._.deleted = !0, i.events[e]._.deleted = !0, (h = v._.$el) == null || h.dispatchEvent(new CustomEvent("event-deleted", { detail: v._.id }));
544
544
  break;
545
545
  // Effective deletion from the source of truth (by default, when unmounting the cell).
546
546
  case 3:
@@ -549,157 +549,170 @@ const Ke = (c) => {
549
549
  }
550
550
  return !0;
551
551
  }, b = (u) => {
552
- const d = g(u, !0);
552
+ const d = m(u, !0);
553
553
  if (!d.length) return { cellOverlaps: {}, longestStreak: 0 };
554
- let e = {}, v = [], y = 0;
555
- d.sort((E, H) => E.start - H.start || E.end - E.start - (H.end - H.start));
554
+ let e = {}, v = [], h = 0;
555
+ d.sort((E, L) => E.start - L.start || E.end - E.start - (L.end - L.start));
556
556
  for (const E of d) {
557
- const H = E._.id;
558
- e[H] || (e[H] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), v = v.filter((t) => t.end > E.start);
557
+ const L = E._.id;
558
+ e[L] || (e[L] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), v = v.filter((t) => t.end > E.start);
559
559
  let B = v.filter((t) => {
560
- var z;
561
- return (!((z = i.schedules) != null && z.length) || E.schedule === t.schedule) && t.start < E.end;
560
+ var P;
561
+ return (!((P = i.schedules) != null && P.length) || E.schedule === t.schedule) && t.start < E.end;
562
562
  }), l = new Set(B.map((t) => {
563
563
  var O;
564
564
  return ((O = e[t._.id]) == null ? void 0 : O.position) ?? 0;
565
565
  })), n = 0;
566
566
  for (; l.has(n); ) n++;
567
- e[H].position = n, v.push(E);
567
+ e[L].position = n, v.push(E);
568
568
  let k = Math.max(1, ...B.map((t) => {
569
569
  var O;
570
570
  return ((O = e[t._.id]) == null ? void 0 : O.maxConcurrent) ?? 1;
571
571
  }));
572
- e[H].maxConcurrent = Math.max(B.length + 1, k);
572
+ e[L].maxConcurrent = Math.max(B.length + 1, k);
573
573
  for (const t of B)
574
- e[t._.id].overlaps.add(H), e[H].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[H].maxConcurrent;
575
- y = Math.max(y, e[H].maxConcurrent);
574
+ e[t._.id].overlaps.add(L), e[L].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[L].maxConcurrent;
575
+ h = Math.max(h, e[L].maxConcurrent);
576
576
  }
577
577
  for (const E in e) e[E].overlaps = [...e[E].overlaps];
578
- return { cellOverlaps: e, longestStreak: y };
579
- }, W = (u = [], { start: d, end: e }, { excludeIds: v = [], schedule: y = null }) => {
578
+ return { cellOverlaps: e, longestStreak: h };
579
+ }, N = (u = [], { start: d, end: e }, { excludeIds: v = [], schedule: h = null }) => {
580
580
  var B;
581
- const E = new Set(v), H = [];
581
+ const E = new Set(v), L = [];
582
582
  for (const l of u)
583
- !E.has((B = l._) == null ? void 0 : B.id) && (y === null || y === l.schedule) && X(l, d, e) && H.push(l);
584
- return H;
583
+ !E.has((B = l._) == null ? void 0 : B.id) && (h === null || h === l.schedule) && X(l, d, e) && L.push(l);
584
+ return L;
585
585
  }, X = (u, d, e) => {
586
- const v = u.allDay || !i.time, y = v ? new Date(u.start).setHours(0, 0, 0, 0) : u.start.getTime(), E = v ? new Date(u.end).setHours(23, 59, 59, 999) : u.end.getTime(), H = v ? new Date(d).setHours(0, 0, 0, 0) : d.getTime(), B = v ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
587
- return E > H && y < B;
586
+ const v = u.allDay || !i.time, h = v ? new Date(u.start).setHours(0, 0, 0, 0) : u.start.getTime(), E = v ? new Date(u.end).setHours(23, 59, 59, 999) : u.end.getTime(), L = v ? new Date(d).setHours(0, 0, 0, 0) : d.getTime(), B = v ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
587
+ return E > L && h < B;
588
588
  };
589
589
  return {
590
590
  events: w,
591
- getEvent: L,
592
- getEventsByDate: g,
591
+ getEvent: z,
592
+ getEventsByDate: m,
593
593
  getViewEvents: V,
594
594
  getCellOverlappingEvents: b,
595
- getEventsInRange: W,
595
+ getEventsInRange: N,
596
596
  createEvent: o,
597
597
  deleteEvent: f,
598
598
  isEventInRange: X
599
599
  };
600
- }, ut = ({ config: c, dateUtils: s, emit: i, texts: D, eventsManager: w }, _) => {
601
- const { availableViews: L } = c, g = ue(c.view && L[c.view] ? c.view : c.defaultView), V = ue(c.selectedDate || null);
602
- let o = ue(/* @__PURE__ */ new Date());
603
- const f = ue(new Date(c.viewDate || o.value));
600
+ }, gt = ({ config: c, dateUtils: s, emit: i, texts: D, eventsManager: w }, _) => {
601
+ const { availableViews: z } = c, m = ie(c.view && z[c.view] ? c.view : c.defaultView), V = ie(c.selectedDate || null);
602
+ let o = ie(/* @__PURE__ */ new Date());
603
+ const f = ie(new Date(c.viewDate || o.value));
604
604
  f.value.setHours(0, 0, 0, 0);
605
- const b = ue(new Date(f));
606
- let W = null;
607
- const X = M(() => g.value === "month" ? b.value : n.value), u = M(() => g.value === "month" ? new Date(b.value.getFullYear(), b.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), d = M(() => g.value === "week" ? s.getPreviousFirstDayOfWeek(n.value, c.startWeekOnSunday) : g.value === "month" ? n.value : X.value), e = M(() => {
608
- if (g.value === "week") {
609
- const h = s.addDays(d.value, 7);
610
- return h.setMilliseconds(-1), h;
611
- } else if (g.value === "month") return t.value;
605
+ const b = ie(new Date(f));
606
+ let N = null;
607
+ const X = T(() => m.value === "month" ? b.value : n.value), u = T(() => m.value === "month" ? new Date(b.value.getFullYear(), b.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), d = T(() => m.value === "week" ? s.getPreviousFirstDayOfWeek(n.value, c.startWeekOnSunday) : m.value === "month" ? n.value : X.value), e = T(() => {
608
+ if (m.value === "week") {
609
+ const g = s.addDays(d.value, 7);
610
+ return g.setMilliseconds(-1), g;
611
+ } else if (m.value === "month") return t.value;
612
612
  return u.value;
613
- }), v = M(() => {
614
- const h = o.value.getTime();
615
- if (g.value === "week")
616
- return d.value.getTime() <= h && h <= e.value.getTime();
617
- const P = n.value.getTime(), N = t.value.getTime();
618
- return P <= h && h <= N;
613
+ }), v = T(() => {
614
+ const g = o.value.getTime();
615
+ if (m.value === "week")
616
+ return d.value.getTime() <= g && g <= e.value.getTime();
617
+ const H = n.value.getTime(), R = t.value.getTime();
618
+ return H <= g && g <= R;
619
619
  });
620
- function y() {
621
- o.value = /* @__PURE__ */ new Date(), W = setTimeout(y, 60 * 1e3);
620
+ function h() {
621
+ o.value = /* @__PURE__ */ new Date(), N = setTimeout(h, 60 * 1e3);
622
622
  }
623
623
  function E() {
624
- W = setTimeout(y, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), y();
624
+ N = setTimeout(h, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), h();
625
625
  }
626
- const H = M(() => {
627
- if (!c.availableViews[g.value]) return 1;
628
- let h = c.availableViews[g.value].cols;
629
- return c.hasHiddenDays && ["week", "month"].includes(g.value) && (h -= c.hasHiddenDays), h;
630
- }), B = M(() => {
631
- var h;
632
- return ((h = c.availableViews[g.value]) == null ? void 0 : h.rows) || 1;
633
- }), l = M(() => H.value * B.value), n = M(() => {
634
- if (g.value === "month") {
635
- let h = b.value.getDay() || 7;
636
- return c.startWeekOnSunday && !c.hideWeekdays[7] && (h += 1), c.viewDayOffset && (h -= c.viewDayOffset), s.subtractDays(b.value, h - 1);
637
- } else if (g.value === "week") {
638
- const h = "1234567".split("").filter((N) => !Object.keys(c.hideWeekdays).includes(N));
639
- let P = Math.min(...h);
640
- return c.startWeekOnSunday && !c.hideWeekdays[7] && (P = 1), c.viewDayOffset && (P += c.viewDayOffset), s.addDays(b.value, P - 1);
626
+ const L = T(() => {
627
+ if (!c.availableViews[m.value]) return 1;
628
+ let g = c.availableViews[m.value].cols;
629
+ return c.hasHiddenDays && ["week", "month"].includes(m.value) && (g -= c.hasHiddenDays), g;
630
+ }), B = T(() => {
631
+ var g;
632
+ return ((g = c.availableViews[m.value]) == null ? void 0 : g.rows) || 1;
633
+ }), l = T(() => L.value * B.value), n = T(() => {
634
+ if (m.value === "month") {
635
+ let g = b.value.getDay() || 7;
636
+ return c.startWeekOnSunday && !c.hideWeekdays[7] && (g += 1), c.viewDayOffset && (g -= c.viewDayOffset), s.subtractDays(b.value, g - 1);
637
+ } else if (m.value === "week") {
638
+ const g = "1234567".split("").filter((R) => !Object.keys(c.hideWeekdays).includes(R));
639
+ let H = Math.min(...g);
640
+ return c.startWeekOnSunday && !c.hideWeekdays[7] && (H = 1), c.viewDayOffset && (H += c.viewDayOffset), s.addDays(b.value, H - 1);
641
641
  } else return b.value;
642
- }), k = M(() => {
643
- const h = [], P = ["days", "week", "month"].includes(g.value);
644
- let N = 0;
645
- for (let K = 0; K < l.value + N; K++)
646
- switch (g.value) {
642
+ }), k = T(() => {
643
+ const g = [], H = ["days", "week", "month"].includes(m.value);
644
+ let R = 0;
645
+ for (let q = 0; q < l.value + R; q++)
646
+ switch (m.value) {
647
647
  case "day":
648
648
  case "days":
649
649
  case "week":
650
650
  case "month": {
651
- const ae = s.addDays(n.value, K), Ve = ae.getDay() || 7;
652
- if (P && c.hasHiddenDays && c.hideWeekdays[Ve]) {
653
- N++;
651
+ const ve = s.addDays(n.value, q), We = ve.getDay() || 7;
652
+ if (H && c.hasHiddenDays && c.hideWeekdays[We]) {
653
+ R++;
654
654
  continue;
655
655
  }
656
- const Ce = new Date(ae);
657
- Ce.setHours(23, 59, 59, 999), h.push({ start: ae, startFormatted: s.formatDate(ae), end: Ce });
656
+ const Ce = new Date(ve);
657
+ Ce.setHours(23, 59, 59, 999), g.push({ start: ve, startFormatted: s.formatDate(ve), end: Ce });
658
658
  break;
659
659
  }
660
660
  case "year":
661
- h.push({
662
- start: new Date(n.value.getFullYear(), K, 1, 0, 0, 0, 0),
663
- end: new Date(n.value.getFullYear(), K + 1, 0, 23, 59, 59, 999)
661
+ g.push({
662
+ start: new Date(n.value.getFullYear(), q, 1, 0, 0, 0, 0),
663
+ end: new Date(n.value.getFullYear(), q + 1, 0, 23, 59, 59, 999)
664
664
  });
665
665
  break;
666
666
  case "years":
667
- h.push({
668
- start: new Date(n.value.getFullYear() + K, 0, 1, 0, 0, 0, 0),
669
- end: new Date(n.value.getFullYear() + K + 1, 0, 0, 23, 59, 59, 999)
667
+ g.push({
668
+ start: new Date(n.value.getFullYear() + q, 0, 1, 0, 0, 0, 0),
669
+ end: new Date(n.value.getFullYear() + q + 1, 0, 0, 23, 59, 59, 999)
670
670
  });
671
671
  break;
672
672
  }
673
- return h;
674
- }), t = M(() => k.value[k.value.length - 1].end), O = ue("right"), z = M(() => {
675
- const h = Object.keys(c.availableViews);
676
- return h[h.indexOf(g.value) + 1];
677
- }), R = M(() => {
678
- const h = Object.keys(c.availableViews);
679
- return h[h.indexOf(g.value) - 1];
680
- }), Q = M(() => {
681
- const { dateFormat: h, truncations: P } = D;
682
- switch (g.value) {
673
+ return g;
674
+ }), t = T(() => k.value[k.value.length - 1].end), O = ie("right"), P = T(() => {
675
+ const g = Object.keys(c.availableViews);
676
+ return g[g.indexOf(m.value) + 1];
677
+ }), I = T(() => {
678
+ const g = Object.keys(c.availableViews);
679
+ return g[g.indexOf(m.value) - 1];
680
+ });
681
+ function K(g, H, R = !1) {
682
+ if (!H || !H[g]) return g + 1;
683
+ const q = H[g];
684
+ return R && typeof q == "string" ? q.substring(0, 3) : q;
685
+ }
686
+ function oe(g, H, R) {
687
+ const { monthsArray: q, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = g.getMonth(), Ee = g.getFullYear(), Ye = H.getMonth(), He = H.getFullYear(), Be = Me !== Ye, nt = Ee !== He, _e = We && (Ce || Be), Le = g.getDate(), ze = H.getDate();
688
+ return nt ? ve ? `${K(Me, q, _e)} ${Le}, ${Ee} - ${K(Ye, q, _e)} ${ze}, ${He}` : `${Le} ${K(Me, q, _e)} ${Ee} - ${ze} ${K(Ye, q, _e)} ${He}` : Be ? ve ? `${K(Me, q, _e)} ${Le} - ${K(Ye, q, _e)} ${ze}, ${Ee}` : `${Le} ${K(Me, q, _e)} - ${ze} ${K(Ye, q, _e)} ${Ee}` : ve ? `${K(Me, q, _e)} ${Le}-${ze}, ${Ee}` : `${Le}-${ze} ${K(Me, q, _e)} ${Ee}`;
689
+ }
690
+ const ae = T(() => {
691
+ const { dateFormat: g, months: H, monthsGenitive: R, week: q, truncations: ve } = D, We = c.locale, Ce = ve !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ee = R && We === "el" ? R : H;
692
+ switch (m.value) {
683
693
  case "day":
684
- return s.formatDate(n.value, h);
685
- case "days": {
686
- let N = h.replace(/(\s|^)[^a-zA-Z]*?d{2,4}[^a-zA-Z]*?(\s|$)/, "");
687
- P !== !1 && (N = N.replace("MMMM", "MMM"));
688
- const K = s.formatDate(n.value, N), ae = s.formatDate(t.value, N);
689
- return `${K} - ${ae}`;
690
- }
694
+ return s.formatDate(n.value, g);
695
+ case "days":
691
696
  case "week": {
692
- let N = s.getWeek(n.value, c.startWeekOnSunday && !c.hideWeekdays[7]);
693
- N = ` <small>${D.week} ${N}</small>`;
694
- const K = n.value.getMonth(), ae = n.value.getFullYear(), Ve = t.value.getMonth(), Ce = t.value.getFullYear(), Le = K !== Ve, Qe = Le && ae !== Ce, Ie = P !== !1 && (c.xs || Le), Fe = D.months[K][Ie ? "substring" : "toString"](0, 3);
695
- if (Le) {
696
- const Re = D.months[Ve][Ie ? "substring" : "toString"](0, 3);
697
- return Qe ? `${Fe} ${ae} - ${Re} ${Ce} ${N}` : `${Fe} - ${Re} ${ae} ${N}`;
698
- } else return `${Fe} ${ae} ${N}`;
697
+ const Ye = {
698
+ monthsArray: Ee,
699
+ monthBeforeDay: Me,
700
+ canTruncate: Ce,
701
+ xs: c.xs
702
+ };
703
+ let He = oe(n.value, t.value, Ye);
704
+ if (m.value === "week") {
705
+ const Be = s.getWeek(
706
+ n.value,
707
+ c.startWeekOnSunday && !c.hideWeekdays[7]
708
+ );
709
+ He += ` <small>${q} ${Be}</small>`;
710
+ }
711
+ return He;
699
712
  }
700
713
  case "month": {
701
- const N = `${c.xs && P !== !1 ? "MMM" : "MMMM"} YYYY`;
702
- return s.formatDate(X.value, N);
714
+ const Ye = `${c.xs && Ce ? "MMM" : "MMMM"} YYYY`;
715
+ return s.formatDate(X.value, Ye);
703
716
  }
704
717
  case "year":
705
718
  return n.value.getFullYear();
@@ -707,8 +720,8 @@ const Ke = (c) => {
707
720
  return `${n.value.getFullYear()} - ${u.value.getFullYear()}`;
708
721
  }
709
722
  });
710
- function ee() {
711
- switch (b.value = new Date(f.value || o.value), b.value.setHours(0, 0, 0, 0), g.value) {
723
+ function re() {
724
+ switch (b.value = new Date(f.value || o.value), b.value.setHours(0, 0, 0, 0), m.value) {
712
725
  case "day":
713
726
  break;
714
727
  case "days":
@@ -727,113 +740,113 @@ const Ke = (c) => {
727
740
  break;
728
741
  }
729
742
  i("view-change", {
730
- id: g.value,
731
- title: Q.value,
743
+ id: m.value,
744
+ title: ae.value,
732
745
  start: X.value,
733
746
  end: u.value,
734
747
  extendedStart: d.value,
735
748
  extendedEnd: e.value,
736
749
  cellDates: k.value,
737
750
  containsToday: v.value,
738
- events: A.value
751
+ events: ee.value
739
752
  }), o.value = /* @__PURE__ */ new Date();
740
753
  }
741
- function ie(h) {
742
- const P = g.value, N = c.availableViews[P];
743
- h[P] && JSON.stringify(h[P]) === JSON.stringify(N) || ee();
754
+ function De(g) {
755
+ const H = m.value, R = c.availableViews[H];
756
+ g[H] && JSON.stringify(g[H]) === JSON.stringify(R) || re();
744
757
  }
745
- function oe(h, P = !0) {
746
- const N = Object.keys(c.availableViews);
747
- g.value !== h && (N.includes(h) ? (O.value = N.indexOf(h) < N.indexOf(g.value) ? "left" : "right", g.value = h, i("update:view", h), ee()) : console.warn(`Vue Cal: the \`${h}\` view is not available.`));
758
+ function x(g, H = !0) {
759
+ const R = Object.keys(c.availableViews);
760
+ m.value !== g && (R.includes(g) ? (O.value = R.indexOf(g) < R.indexOf(m.value) ? "left" : "right", m.value = g, i("update:view", g), re()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
748
761
  }
749
- function he() {
750
- z.value ? oe(z.value) : console.warn("Vue Cal: no broader view is available.");
762
+ function Q() {
763
+ P.value ? x(P.value) : console.warn("Vue Cal: no broader view is available.");
751
764
  }
752
- function x() {
753
- R.value ? oe(R.value) : console.warn("Vue Cal: no narrower view is available.");
765
+ function ue() {
766
+ I.value ? x(I.value) : console.warn("Vue Cal: no narrower view is available.");
754
767
  }
755
- function J() {
756
- a(!1);
768
+ function a() {
769
+ y(!1);
757
770
  }
758
- function ce() {
759
- a(!0);
771
+ function p() {
772
+ y(!0);
760
773
  }
761
- function a(h = !0) {
762
- let P = new Date(f.value);
763
- switch (g.value) {
774
+ function y(g = !0) {
775
+ let H = new Date(f.value);
776
+ switch (m.value) {
764
777
  case "day":
765
778
  case "days":
766
- h ? P = s.addDays(t.value, 1) : P = s.subtractDays(n.value, l.value);
779
+ g ? H = s.addDays(t.value, 1) : H = s.subtractDays(n.value, l.value);
767
780
  break;
768
781
  case "week": {
769
- h ? (P = s.addDays(e.value, 1), P.setHours(0, 0, 0, 0)) : P = s.subtractDays(d.value, l.value);
782
+ g ? (H = s.addDays(e.value, 1), H.setHours(0, 0, 0, 0)) : H = s.subtractDays(d.value, l.value);
770
783
  break;
771
784
  }
772
785
  case "month": {
773
- const N = h ? 1 : -1;
774
- P = new Date(P.getFullYear(), P.getMonth() + N, 1, 0, 0, 0, 0);
786
+ const R = g ? 1 : -1;
787
+ H = new Date(H.getFullYear(), H.getMonth() + R, 1, 0, 0, 0, 0);
775
788
  break;
776
789
  }
777
790
  case "year": {
778
- const N = h ? 1 : -1;
779
- P = new Date(P.getFullYear() + N, 1, 1, 0, 0, 0, 0);
791
+ const R = g ? 1 : -1;
792
+ H = new Date(H.getFullYear() + R, 1, 1, 0, 0, 0, 0);
780
793
  break;
781
794
  }
782
795
  case "years": {
783
- const N = h ? l.value : -l.value;
784
- P = new Date(P.getFullYear() + N, 1, 1, 0, 0, 0, 0);
796
+ const R = g ? l.value : -l.value;
797
+ H = new Date(H.getFullYear() + R, 1, 1, 0, 0, 0, 0);
785
798
  break;
786
799
  }
787
800
  }
788
- m(P);
801
+ J(H);
789
802
  }
790
- function p() {
791
- const h = /* @__PURE__ */ new Date();
792
- h.setHours(0, 0, 0, 0), m(h);
803
+ function G() {
804
+ const g = /* @__PURE__ */ new Date();
805
+ g.setHours(0, 0, 0, 0), J(g);
793
806
  }
794
- function m(h, P = !0, N = !1) {
795
- if (!s.isValid(h)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
796
- let [K, ae] = [n.value, t.value];
797
- g.value === "month" && ([K, ae] = [X.value, u.value]), (!s.isInRange(h, K, ae) || N) && (h.setHours(0, 0, 0, 0), O.value = h.getTime() < K.getTime() ? "left" : "right", f.value = h, P && i("update:viewDate", h), ee());
807
+ function J(g, H = !0, R = !1) {
808
+ if (!s.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
809
+ let [q, ve] = [n.value, t.value];
810
+ m.value === "month" && ([q, ve] = [X.value, u.value]), (!s.isInRange(g, q, ve) || R) && (g.setHours(0, 0, 0, 0), O.value = g.getTime() < q.getTime() ? "left" : "right", f.value = g, H && i("update:viewDate", g), re());
798
811
  }
799
- function G(h, P = !0) {
800
- if (s.isValid(h)) {
801
- const { isValid: N, isSameDate: K } = s;
802
- (!V.value || !N(V.value) || !K(h, V.value)) && (h.setHours(0, 0, 0, 0), V.value = h, P && i("update:selectedDate", h));
812
+ function ce(g, H = !0) {
813
+ if (s.isValid(g)) {
814
+ const { isValid: R, isSameDate: q } = s;
815
+ (!V.value || !R(V.value) || !q(g, V.value)) && (g.setHours(0, 0, 0, 0), V.value = g, H && i("update:selectedDate", g));
803
816
  } else
804
817
  return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
805
818
  }
806
- function U(h) {
807
- !h && !b.value.getDay() ? m(s.addDays(b.value, 1), !0, !0) : (O.value = "left", ee());
819
+ function r(g) {
820
+ !g && !b.value.getDay() ? J(s.addDays(b.value, 1), !0, !0) : (O.value = "left", re());
808
821
  }
809
- function fe(h) {
810
- h && c.startWeekOnSunday && !b.value.getDay() ? m(s.addDays(b.value, 1), !0, !0) : !h && c.startWeekOnSunday && b.value.getDay() === 1 && m(s.subtractDays(b.value, 1), !0, !0);
822
+ function $(g) {
823
+ g && c.startWeekOnSunday && !b.value.getDay() ? J(s.addDays(b.value, 1), !0, !0) : !g && c.startWeekOnSunday && b.value.getDay() === 1 && J(s.subtractDays(b.value, 1), !0, !0);
811
824
  }
812
- function r() {
825
+ function S() {
813
826
  console.log("toggling weekdays", c.hideWeekdays);
814
827
  }
815
- function T(h) {
816
- const P = _.value.querySelector(".vuecal__scrollable"), N = h ? h * c.timeCellHeight / c.timeStep : 0;
817
- P == null || P.scrollTo({ top: N, behavior: "smooth" });
828
+ function M(g) {
829
+ const H = _.value.querySelector(".vuecal__scrollable"), R = g ? g * c.timeCellHeight / c.timeStep : 0;
830
+ H == null || H.scrollTo({ top: R, behavior: "smooth" });
818
831
  }
819
- function S() {
820
- const h = /* @__PURE__ */ new Date();
821
- T(h.getHours() * 60 + h.getMinutes());
832
+ function W() {
833
+ const g = /* @__PURE__ */ new Date();
834
+ M(g.getHours() * 60 + g.getMinutes());
822
835
  }
823
- function $() {
824
- T(0);
836
+ function A() {
837
+ M(0);
825
838
  }
826
- const A = M(() => w.getViewEvents(k.value)), I = w.createEvent, te = w.deleteEvent;
827
- return de(() => c.view, (h) => oe(h, !1)), de(() => c.availableViews, ie), de(() => c.datePicker, () => oe("month", !1)), de(() => c.viewDate, (h) => m(h, !1)), de(() => c.selectedDate, (h) => G(h, !1)), de(() => c.startWeekOnSunday, (h) => U(h)), de(() => c.hideWeekends, (h) => fe(h)), de(() => c.hideWeekdays, r), de(() => l.value, () => {
839
+ const ee = T(() => w.getViewEvents(k.value)), de = w.createEvent, he = w.deleteEvent;
840
+ return me(() => c.view, (g) => x(g, !1)), me(() => c.availableViews, De), me(() => c.datePicker, () => x("month", !1)), me(() => c.viewDate, (g) => J(g, !1)), me(() => c.selectedDate, (g) => ce(g, !1)), me(() => c.startWeekOnSunday, (g) => r(g)), me(() => c.hideWeekends, (g) => $(g)), me(() => c.hideWeekdays, S), me(() => l.value, () => {
828
841
  l.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
829
- }), de(() => c.watchRealTime, (h) => {
830
- h && c.time ? E() : W = clearTimeout(W);
831
- }), ee(), c.time && c.watchRealTime && E(), ze(() => W = clearTimeout(W)), {
842
+ }), me(() => c.watchRealTime, (g) => {
843
+ g && c.time ? E() : N = clearTimeout(N);
844
+ }), re(), c.time && c.watchRealTime && E(), Xe(() => N = clearTimeout(N)), {
832
845
  now: o,
833
- id: g,
834
- broaderView: z,
835
- narrowerView: R,
836
- title: Q,
846
+ id: m,
847
+ broaderView: P,
848
+ narrowerView: I,
849
+ title: ae,
837
850
  viewDate: f,
838
851
  start: X,
839
852
  end: u,
@@ -846,63 +859,63 @@ const Ke = (c) => {
846
859
  containsToday: v,
847
860
  selectedDate: V,
848
861
  cellDates: k,
849
- cols: H,
862
+ cols: L,
850
863
  rows: B,
851
864
  // All the events are stored and indexed in the events object of the eventsManager.
852
865
  // The following events array is only a subset of visible ones, plus any potential recurring
853
866
  // and multi-day events.
854
- events: A,
867
+ events: ee,
855
868
  transitionDirection: O,
856
- switch: oe,
857
- broader: he,
858
- narrower: x,
859
- previous: J,
860
- next: ce,
861
- navigate: a,
862
- goToToday: p,
863
- updateViewDate: m,
864
- updateSelectedDate: G,
865
- scrollToCurrentTime: S,
866
- scrollToTime: T,
867
- scrollTop: $,
868
- createEvent: I,
869
- deleteEvent: te,
869
+ switch: x,
870
+ broader: Q,
871
+ narrower: ue,
872
+ previous: a,
873
+ next: p,
874
+ navigate: y,
875
+ goToToday: G,
876
+ updateViewDate: J,
877
+ updateSelectedDate: ce,
878
+ scrollToCurrentTime: W,
879
+ scrollToTime: M,
880
+ scrollTop: A,
881
+ createEvent: de,
882
+ deleteEvent: he,
870
883
  // Getters.
871
884
  get isDay() {
872
- return g.value === "day";
885
+ return m.value === "day";
873
886
  },
874
887
  get isDays() {
875
- return g.value === "days";
888
+ return m.value === "days";
876
889
  },
877
890
  get isWeek() {
878
- return g.value === "week";
891
+ return m.value === "week";
879
892
  },
880
893
  get isMonth() {
881
- return g.value === "month";
894
+ return m.value === "month";
882
895
  },
883
896
  get isYear() {
884
- return g.value === "year";
897
+ return m.value === "year";
885
898
  },
886
899
  get isYears() {
887
- return g.value === "years";
900
+ return m.value === "years";
888
901
  }
889
902
  };
890
- }, Ye = _e({
891
- texts: { ...ve.texts },
903
+ }, Fe = $e({
904
+ texts: { ...fe.texts },
892
905
  // Make texts reactive before a locale is loaded.
893
- dateUtils: Ke(ve.texts)
906
+ dateUtils: st(fe.texts)
894
907
  // Some Date utils functions need localized texts.
895
- }), ct = ({ props: c, emit: s, attrs: i, vuecalEl: D, uid: w }) => {
896
- const _ = _e({
908
+ }), ht = ({ props: c, emit: s, attrs: i, vuecalEl: D, uid: w }) => {
909
+ const _ = $e({
897
910
  uid: w,
898
911
  // The Vuecal instance unique ID, used for dnd source-target identification.
899
912
  emit: s,
900
- texts: { ...Ye.texts },
913
+ texts: { ...Fe.texts },
901
914
  // Make texts reactive before a locale is loaded.
902
915
  // The date utils composable.
903
916
  // A class/composable is needed in order to access the user locale in all the methods, and
904
917
  // independently of other potential Vue Cal instances on the same page.
905
- dateUtils: { ...Ye.dateUtils },
918
+ dateUtils: { ...Fe.dateUtils },
906
919
  now: /* @__PURE__ */ new Date(),
907
920
  config: {},
908
921
  eventsManager: {},
@@ -917,8 +930,8 @@ const Ke = (c) => {
917
930
  isResizingEvent: !1
918
931
  }
919
932
  });
920
- return _.dateUtils = Ke(Object.assign(ve.texts, _.texts)), _.config = rt(_, c, i), _.eventsManager = ot(_), _.view = ut(_, D), _.dnd = it(_), _;
921
- }, dt = 24 * 60, vt = {
933
+ return _.dateUtils = st(Object.assign(fe.texts, _.texts)), _.config = vt(_, c, i), _.eventsManager = ft(_), _.view = gt(_, D), _.dnd = mt(_), _;
934
+ }, yt = 24 * 60, Dt = {
922
935
  allDayEvents: { type: [Boolean, String], default: !1 },
923
936
  // Coming soon.
924
937
  // avoidEventOverlap: { type: Boolean, default: undefined }, // Coming soon.
@@ -982,7 +995,7 @@ const Ke = (c) => {
982
995
  // Start time of the time column, in minutes.
983
996
  timeStep: { type: Number, default: 60 },
984
997
  // Step amount for the time in the time column, in minutes.
985
- timeTo: { type: Number, default: dt },
998
+ timeTo: { type: Number, default: yt },
986
999
  // End time of the time column, in minutes.
987
1000
  titleBar: { type: Boolean, default: !0 },
988
1001
  // Show or hide the header title bar.
@@ -1014,61 +1027,61 @@ const Ke = (c) => {
1014
1027
  // minScheduleWidth: { type: Number, default: 0 },
1015
1028
  // overlapsPerTimeStep: { type: Boolean, default: false },
1016
1029
  // resizeX: { type: Boolean, default: false },
1017
- }, mt = { class: "vuecal__header" }, ft = {
1030
+ }, wt = { class: "vuecal__header" }, pt = {
1018
1031
  key: 0,
1019
1032
  class: "vuecal__views-bar"
1020
- }, gt = ["onClick", "innerHTML"], ht = {
1033
+ }, kt = ["onClick", "innerHTML"], _t = {
1021
1034
  key: 1,
1022
1035
  class: "vuecal__title-bar"
1023
- }, yt = { class: "vuecal__transition-wrap" }, Dt = ["disabled", "innerHTML"], wt = {
1036
+ }, bt = { class: "vuecal__transition-wrap" }, Tt = ["disabled", "innerHTML"], $t = {
1024
1037
  __name: "header",
1025
1038
  setup(c) {
1026
- const s = Se("vuecal"), { view: i, config: D } = s, w = () => {
1039
+ const s = Ne("vuecal"), { view: i, config: D } = s, w = () => {
1027
1040
  D.clickToNavigate && i.broader();
1028
- }, _ = M(() => D.clickToNavigate ? { click: w } : {});
1029
- return (L, g) => (Y(), j("div", mt, [
1030
- F(L.$slots, "header", {
1041
+ }, _ = T(() => D.clickToNavigate ? { click: w } : {});
1042
+ return (z, m) => (Y(), j("div", wt, [
1043
+ F(z.$slots, "header", {
1031
1044
  view: C(i),
1032
1045
  availableViews: C(D).availableViews,
1033
1046
  vuecal: C(s)
1034
1047
  }),
1035
- L.$slots.header ? Z("", !0) : (Y(), j(se, { key: 0 }, [
1036
- C(D).viewsBar ? (Y(), j("div", ft, [
1037
- (Y(!0), j(se, null, De(C(D).availableViews, (V, o) => (Y(), j("button", {
1038
- class: we(["vuecal__view-button", { "vuecal__view-button--active": C(i).id === o }]),
1048
+ z.$slots.header ? U("", !0) : (Y(), j(te, { key: 0 }, [
1049
+ C(D).viewsBar ? (Y(), j("div", pt, [
1050
+ (Y(!0), j(te, null, pe(C(D).availableViews, (V, o) => (Y(), j("button", {
1051
+ class: ke(["vuecal__view-button", { "vuecal__view-button--active": C(i).id === o }]),
1039
1052
  onClick: (f) => C(i).switch(o),
1040
1053
  innerHTML: C(s).texts[o],
1041
1054
  type: "button"
1042
- }, null, 10, gt))), 256))
1043
- ])) : Z("", !0),
1044
- C(D).titleBar ? (Y(), j("nav", ht, [
1045
- me("button", {
1046
- class: we(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !L.$slots["previous-button"] }]),
1047
- onClick: g[0] || (g[0] = (...V) => C(i).previous && C(i).previous(...V)),
1055
+ }, null, 10, kt))), 256))
1056
+ ])) : U("", !0),
1057
+ C(D).titleBar ? (Y(), j("nav", _t, [
1058
+ ge("button", {
1059
+ class: ke(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !z.$slots["previous-button"] }]),
1060
+ onClick: m[0] || (m[0] = (...V) => C(i).previous && C(i).previous(...V)),
1048
1061
  type: "button"
1049
1062
  }, [
1050
- F(L.$slots, "previous-button")
1063
+ F(z.$slots, "previous-button")
1051
1064
  ], 2),
1052
- me("div", yt, [
1053
- Me(He, {
1065
+ ge("div", bt, [
1066
+ Oe(Ge, {
1054
1067
  name: `vuecal-slide-fade--${C(i).transitionDirection}`
1055
1068
  }, {
1056
- default: q(() => [
1069
+ default: Z(() => [
1057
1070
  (Y(), j("div", {
1058
1071
  key: C(i).id + C(i).start.getTime()
1059
1072
  }, [
1060
- L.$slots.title ? (Y(), be(Xe(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ge({
1073
+ z.$slots.title ? (Y(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1061
1074
  key: 0,
1062
1075
  class: "vuecal__title"
1063
- }, je(_.value)), {
1064
- default: q(() => [
1065
- F(L.$slots, "title", ne(le(C(i))))
1076
+ }, Ie(_.value)), {
1077
+ default: Z(() => [
1078
+ F(z.$slots, "title", se(ne(C(i))))
1066
1079
  ]),
1067
1080
  _: 3
1068
- }, 16)) : (Y(), be(Xe(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ge({
1081
+ }, 16)) : (Y(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1069
1082
  key: 1,
1070
1083
  class: "vuecal__title"
1071
- }, je(_.value), {
1084
+ }, Ie(_.value), {
1072
1085
  innerHTML: C(i).title
1073
1086
  }), null, 16, ["innerHTML"]))
1074
1087
  ]))
@@ -1076,48 +1089,48 @@ const Ke = (c) => {
1076
1089
  _: 3
1077
1090
  }, 8, ["name"])
1078
1091
  ]),
1079
- C(D).todayButton ? (Y(), j(se, { key: 0 }, [
1080
- L.$slots["today-button"] ? F(L.$slots, "today-button", {
1092
+ C(D).todayButton ? (Y(), j(te, { key: 0 }, [
1093
+ z.$slots["today-button"] ? F(z.$slots, "today-button", {
1081
1094
  key: 0,
1082
1095
  navigate: () => !C(i).containsToday && C(i).goToToday(),
1083
1096
  active: C(i).containsToday
1084
1097
  }) : (Y(), j("button", {
1085
1098
  key: 1,
1086
- class: we(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": C(i).containsToday }]),
1087
- onClick: g[1] || (g[1] = (V) => !C(i).containsToday && C(i).goToToday()),
1099
+ class: ke(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": C(i).containsToday }]),
1100
+ onClick: m[1] || (m[1] = (V) => !C(i).containsToday && C(i).goToToday()),
1088
1101
  disabled: !!C(i).containsToday,
1089
1102
  type: "button",
1090
1103
  innerHTML: C(s).texts.today
1091
- }, null, 10, Dt))
1092
- ], 64)) : Z("", !0),
1093
- me("button", {
1094
- class: we(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !L.$slots["next-button"] }]),
1095
- onClick: g[2] || (g[2] = (...V) => C(i).next && C(i).next(...V)),
1104
+ }, null, 10, Tt))
1105
+ ], 64)) : U("", !0),
1106
+ ge("button", {
1107
+ class: ke(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !z.$slots["next-button"] }]),
1108
+ onClick: m[2] || (m[2] = (...V) => C(i).next && C(i).next(...V)),
1096
1109
  type: "button"
1097
1110
  }, [
1098
- F(L.$slots, "next-button")
1111
+ F(z.$slots, "next-button")
1099
1112
  ], 2)
1100
- ])) : Z("", !0)
1113
+ ])) : U("", !0)
1101
1114
  ], 64))
1102
1115
  ]));
1103
1116
  }
1104
- }, pt = {
1117
+ }, Mt = {
1105
1118
  key: 0,
1106
1119
  class: "vuecal__headings"
1107
- }, kt = {
1120
+ }, Et = {
1108
1121
  key: 0,
1109
1122
  class: "vuecal__weekdays-headings"
1110
- }, _t = ["onClick"], bt = { class: "vuecal__weekday-day" }, Tt = {
1123
+ }, Yt = ["onClick"], St = { class: "vuecal__weekday-day" }, Ct = {
1111
1124
  key: 0,
1112
1125
  class: "vuecal__weekday-date"
1113
- }, Mt = {
1126
+ }, Vt = {
1114
1127
  key: 1,
1115
1128
  class: "vuecal__schedules-headings w-flex grow"
1116
- }, $t = ["innerHTML"], Et = {
1129
+ }, Ot = ["innerHTML"], jt = {
1117
1130
  __name: "headings-bar",
1118
1131
  setup(c) {
1119
- const s = Se("vuecal"), { view: i, config: D, dateUtils: w } = s, _ = M(() => D.xs ? "day-xs" : D.sm || i.isDays || i.isMonth ? "day-sm" : "day"), L = M(() => (i.isDay || i.isDays || i.isWeek || i.isMonth) && !(i.isDay && !D.schedules)), g = M(() => i.cellDates.slice(0, i.cols).map(({ start: o }) => ({
1120
- id: Pe[o.getDay()],
1132
+ const s = Ne("vuecal"), { view: i, config: D, dateUtils: w } = s, _ = T(() => D.xs ? "day-xs" : D.sm || i.isDays || i.isMonth ? "day-sm" : "day"), z = T(() => (i.isDay || i.isDays || i.isWeek || i.isMonth) && !(i.isDay && !D.schedules)), m = T(() => i.cellDates.slice(0, i.cols).map(({ start: o }) => ({
1133
+ id: Re[o.getDay()],
1121
1134
  date: o,
1122
1135
  dateNumber: o.getDate(),
1123
1136
  day: w.formatDate(o, "dddd"),
@@ -1129,11 +1142,11 @@ const Ke = (c) => {
1129
1142
  (i.isDays || i.isWeek) && i.updateSelectedDate(o);
1130
1143
  }
1131
1144
  };
1132
- return (o, f) => L.value ? (Y(), j("div", pt, [
1133
- C(i).isDay ? Z("", !0) : (Y(), j("div", kt, [
1134
- (Y(!0), j(se, null, De(g.value, (b, W) => (Y(), j("div", {
1135
- class: we(["vuecal__weekday", { "vuecal__weekday--today": b.isToday }]),
1136
- key: W,
1145
+ return (o, f) => z.value ? (Y(), j("div", Mt, [
1146
+ C(i).isDay ? U("", !0) : (Y(), j("div", Et, [
1147
+ (Y(!0), j(te, null, pe(m.value, (b, N) => (Y(), j("div", {
1148
+ class: ke(["vuecal__weekday", { "vuecal__weekday--today": b.isToday }]),
1149
+ key: N,
1137
1150
  onClick: (X) => V.click(b.date)
1138
1151
  }, [
1139
1152
  F(o.$slots, "weekday-heading", {
@@ -1141,17 +1154,17 @@ const Ke = (c) => {
1141
1154
  id: b.id,
1142
1155
  date: b.date
1143
1156
  }, () => [
1144
- me("span", bt, re(b[_.value]), 1),
1145
- C(i).isMonth ? Z("", !0) : (Y(), j("strong", Tt, re(b.dateNumber), 1))
1157
+ ge("span", St, le(b[_.value]), 1),
1158
+ C(i).isMonth ? U("", !0) : (Y(), j("strong", Ct, le(b.dateNumber), 1))
1146
1159
  ])
1147
- ], 10, _t))), 128))
1160
+ ], 10, Yt))), 128))
1148
1161
  ])),
1149
- C(D).schedules ? (Y(), j("div", Mt, [
1150
- (Y(!0), j(se, null, De(g.value, (b, W) => (Y(), j(se, { key: W }, [
1151
- (Y(!0), j(se, null, De(C(D).schedules, (X, u) => (Y(), j(se, { key: u }, [
1162
+ C(D).schedules ? (Y(), j("div", Vt, [
1163
+ (Y(!0), j(te, null, pe(m.value, (b, N) => (Y(), j(te, { key: N }, [
1164
+ (Y(!0), j(te, null, pe(C(D).schedules, (X, u) => (Y(), j(te, { key: u }, [
1152
1165
  o.$slots["schedule-heading"] ? (Y(), j("div", {
1153
1166
  key: 0,
1154
- class: we(["vuecal__schedule vuecal__schedule--heading", X.class])
1167
+ class: ke(["vuecal__schedule vuecal__schedule--heading", X.class])
1155
1168
  }, [
1156
1169
  F(o.$slots, "schedule-heading", {
1157
1170
  schedule: X,
@@ -1159,23 +1172,23 @@ const Ke = (c) => {
1159
1172
  })
1160
1173
  ], 2)) : (Y(), j("div", {
1161
1174
  key: 1,
1162
- class: we(["vuecal__schedule vuecal__schedule--heading", X.class]),
1175
+ class: ke(["vuecal__schedule vuecal__schedule--heading", X.class]),
1163
1176
  innerHTML: X.label
1164
- }, null, 10, $t))
1177
+ }, null, 10, Ot))
1165
1178
  ], 64))), 128))
1166
1179
  ], 64))), 128))
1167
- ])) : Z("", !0)
1168
- ])) : Z("", !0);
1180
+ ])) : U("", !0)
1181
+ ])) : U("", !0);
1169
1182
  }
1170
- }, Yt = { class: "vuecal__time-column" }, St = {
1183
+ }, Pt = { class: "vuecal__time-column" }, Ht = {
1171
1184
  __name: "time-column",
1172
1185
  setup(c) {
1173
- const s = Se("vuecal"), { config: i, texts: D } = s, w = M(() => {
1186
+ const s = Ne("vuecal"), { config: i, texts: D } = s, w = T(() => {
1174
1187
  const _ = [];
1175
- for (let g = i.timeFrom; g < i.timeTo; g += i.timeStep) {
1176
- const V = ~~(g / 60), o = g % 60, f = D[g < 720 ? "am" : "pm"];
1188
+ for (let m = i.timeFrom; m < i.timeTo; m += i.timeStep) {
1189
+ const V = ~~(m / 60), o = m % 60, f = D[m < 720 ? "am" : "pm"];
1177
1190
  _.push({
1178
- minutesSum: g,
1191
+ minutesSum: m,
1179
1192
  // The sum of hours + minutes in minutes.
1180
1193
  hours: V,
1181
1194
  minutes: o,
@@ -1185,35 +1198,35 @@ const Ke = (c) => {
1185
1198
  }
1186
1199
  return _;
1187
1200
  });
1188
- return (_, L) => (Y(), j("div", Yt, [
1189
- (Y(!0), j(se, null, De(w.value, (g, V) => (Y(), j("div", {
1201
+ return (_, z) => (Y(), j("div", Pt, [
1202
+ (Y(!0), j(te, null, pe(w.value, (m, V) => (Y(), j("div", {
1190
1203
  class: "vuecal__time-cell",
1191
1204
  key: V
1192
1205
  }, [
1193
1206
  F(_.$slots, "time-cell", {
1194
1207
  index: V,
1195
- minutes: g.minutes,
1196
- hours: g.hours,
1197
- minutesSum: g.minutesSum,
1198
- format12: g.formatted12,
1199
- format24: g.formatted24
1208
+ minutes: m.minutes,
1209
+ hours: m.hours,
1210
+ minutesSum: m.minutesSum,
1211
+ format12: m.formatted12,
1212
+ format24: m.formatted24
1200
1213
  }, () => [
1201
- me("label", null, re(C(i).twelveHour ? g.formatted12 : g.formatted24), 1)
1214
+ ge("label", null, le(C(i).twelveHour ? m.formatted12 : m.formatted24), 1)
1202
1215
  ])
1203
1216
  ]))), 128))
1204
1217
  ]));
1205
1218
  }
1206
- }, Ct = ["draggable"], Vt = { class: "vuecal__event-details" }, Ot = { class: "vuecal__event-title" }, jt = {
1219
+ }, Lt = ["draggable"], zt = { class: "vuecal__event-details" }, Ft = { class: "vuecal__event-title" }, Nt = {
1207
1220
  key: 0,
1208
1221
  class: "vuecal__event-time"
1209
- }, Pt = ["innerHTML"], Ue = {
1222
+ }, Wt = ["innerHTML"], at = {
1210
1223
  __name: "event",
1211
1224
  props: {
1212
1225
  event: { type: Object, required: !0 }
1213
1226
  },
1214
1227
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1215
1228
  setup(c, { emit: s }) {
1216
- const { config: i, view: D, dnd: w, touch: _, dateUtils: L } = Se("vuecal"), g = c, V = ue(null), o = _e(g.event), f = _e({
1229
+ const { config: i, view: D, dnd: w, touch: _, dateUtils: z } = Ne("vuecal"), m = c, V = ie(null), o = $e(m.event), f = $e({
1217
1230
  dragging: !1,
1218
1231
  resizing: !1,
1219
1232
  fromResizer: !1,
@@ -1247,9 +1260,9 @@ const Ke = (c) => {
1247
1260
  cellEl: null,
1248
1261
  // Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
1249
1262
  schedule: null
1250
- }), b = M(() => i.editableEvents.drag && o.draggable !== !1 && !o.background), W = M(() => i.time && i.editableEvents.resize && o.resizable !== !1 && !o.background);
1251
- M(() => i.editableEvents.delete && o.deletable !== !1 && !o.background);
1252
- const X = M(() => {
1263
+ }), b = T(() => i.editableEvents.drag && o.draggable !== !1 && !o.background), N = T(() => i.time && i.editableEvents.resize && o.resizable !== !1 && !o.background);
1264
+ T(() => i.editableEvents.delete && o.deletable !== !1 && !o.background);
1265
+ const X = T(() => {
1253
1266
  var l, n, k;
1254
1267
  return {
1255
1268
  [`vuecal__event--${o._.id}`]: !0,
@@ -1270,7 +1283,7 @@ const Ke = (c) => {
1270
1283
  "vuecal__event--dragging-ghost": o._.draggingGhost,
1271
1284
  "vuecal__event--resizing": f.resizing
1272
1285
  };
1273
- }), u = M(() => {
1286
+ }), u = T(() => {
1274
1287
  const l = (D.isDay || D.isDays || D.isWeek) && i.time;
1275
1288
  if (!l && !o.backgroundColor && !o.color) return !1;
1276
1289
  const n = {
@@ -1278,21 +1291,21 @@ const Ke = (c) => {
1278
1291
  color: o.color || null
1279
1292
  };
1280
1293
  if (l) {
1281
- const k = Math.max(i.timeFrom, o._.startMinutes), t = Math.min(i.timeTo, o._.endMinutes), O = Te(k, i), z = Te(t, i) - O;
1282
- n.top = `${O}%`, n.height = `${z}%`;
1294
+ const k = Math.max(i.timeFrom, o._.startMinutes), t = Math.min(i.timeTo, o._.endMinutes), O = Ve(k, i), P = Ve(t, i) - O;
1295
+ n.top = `${O}%`, n.height = `${P}%`;
1283
1296
  }
1284
1297
  return n;
1285
- }), d = M(() => {
1298
+ }), d = T(() => {
1286
1299
  const l = { ...i.eventListeners.event };
1287
1300
  Object.entries(l).forEach(([t, O]) => {
1288
- ["resize-end"].includes(t) || (l[t] = (z) => {
1289
- z.type !== "drop" && O(z.type ? { e: z, event: o } : z);
1301
+ ["resize-end"].includes(t) || (l[t] = (P) => {
1302
+ P.type !== "drop" && O(P.type ? { e: P, event: o } : P);
1290
1303
  });
1291
1304
  });
1292
1305
  const n = { ...l };
1293
1306
  l.touchstart = (t) => {
1294
1307
  var O;
1295
- t.stopPropagation(), (O = n.touchstart) == null || O.call(n, { e: t, event: o });
1308
+ t.stopPropagation(), e(t), (O = n.touchstart) == null || O.call(n, { e: t, event: o });
1296
1309
  }, l.mousedown = (t) => {
1297
1310
  var O;
1298
1311
  t.stopPropagation(), e(t), (O = n.mousedown) == null || O.call(n, { e: t, event: o });
@@ -1301,73 +1314,73 @@ const Ke = (c) => {
1301
1314
  return l.click = (t) => {
1302
1315
  var O;
1303
1316
  (O = n.click) == null || O.call(n, { e: t, event: o }), k ? k = clearTimeout(k) : k = setTimeout(() => {
1304
- var z;
1305
- k = null, (z = n["delayed-click"]) == null || z.call(n, { e: t, event: o });
1317
+ var P;
1318
+ k = null, (P = n["delayed-click"]) == null || P.call(n, { e: t, event: o });
1306
1319
  }, 400);
1307
1320
  }, l.dblclick = (t) => {
1308
1321
  n.dblclick ? n.dblclick({ e: t, event: o }) : o.delete(1);
1309
1322
  }, l;
1310
1323
  }), e = (l) => {
1311
- var t, O, z;
1324
+ var t, O, P;
1312
1325
  const n = ((t = l.touches) == null ? void 0 : t[0]) || l;
1313
1326
  f.fromResizer = n.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1314
1327
  const k = V.value.getBoundingClientRect();
1315
- f.startX = (((O = l.touches) == null ? void 0 : O[0]) || l).clientX - k.left, f.startY = (((z = l.touches) == null ? void 0 : z[0]) || l).clientY - k.top, f.startPercentageX = f.startX * 100 / k.width, f.startPercentageY = f.startY * 100 / k.height, f.cellEl = V.value.closest(".vuecal__cell"), f.resizeStartDate = o.start, B(l.type === "touchstart" ? "touchmove" : "mousemove", v), B(l.type === "touchstart" ? "touchend" : "mouseup", y, { once: !0 }), f.holdTimer = setTimeout(() => {
1316
- var R, Q;
1317
- f.holding = !0, (Q = (R = d.value).hold) == null || Q.call(R, { e: l, event: o });
1328
+ f.startX = (((O = l.touches) == null ? void 0 : O[0]) || l).clientX - k.left, f.startY = (((P = l.touches) == null ? void 0 : P[0]) || l).clientY - k.top, f.startPercentageX = f.startX * 100 / k.width, f.startPercentageY = f.startY * 100 / k.height, f.cellEl = V.value.closest(".vuecal__cell"), f.resizeStartDate = o.start, B(l.type === "touchstart" ? "touchmove" : "mousemove", v), B(l.type === "touchstart" ? "touchend" : "mouseup", h, { once: !0 }), f.holdTimer = setTimeout(() => {
1329
+ var I, K;
1330
+ f.holding = !0, (K = (I = d.value).hold) == null || K.call(I, { e: l, event: o });
1318
1331
  }, 1e3);
1319
1332
  }, v = async (l) => {
1320
- var k, t, O, z;
1333
+ var k, t, O, P;
1321
1334
  const n = ((k = l.touches) == null ? void 0 : k[0]) || l;
1322
1335
  if (f.fromResizer && !f.resizing && (f.resizing = !0, f.resizingOriginalEvent = { ...o, _: { ...o._ } }, _.isResizingEvent = !0, (O = (t = d.value).resizeStart) == null || O.call(t, { e: l, event: o })), f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.cellEl) {
1323
- const { top: R, left: Q, width: ee, height: ie } = f.cellEl.getBoundingClientRect();
1324
- f.moveX = n.clientX - Q, f.moveY = n.clientY - R, f.movePercentageX = f.moveX * 100 / ee, f.movePercentageY = f.moveY * 100 / ie;
1336
+ const { top: I, left: K, width: oe, height: ae } = f.cellEl.getBoundingClientRect();
1337
+ f.moveX = n.clientX - K, f.moveY = n.clientY - I, f.movePercentageX = f.moveX * 100 / oe, f.movePercentageY = f.moveY * 100 / ae;
1325
1338
  }
1326
1339
  if (f.fromResizer) {
1327
- const { newStart: R, newEnd: Q } = E(o);
1328
- let ee = !0;
1329
- const { resize: ie } = (z = i.eventListeners) == null ? void 0 : z.event;
1330
- ie && (ee = await ie({
1340
+ const { newStart: I, newEnd: K } = E(o);
1341
+ let oe = !0;
1342
+ const { resize: ae } = (P = i.eventListeners) == null ? void 0 : P.event;
1343
+ ae && (oe = await ae({
1331
1344
  e: l,
1332
- event: { ...o, start: R, end: Q },
1333
- overlaps: o.getOverlappingEvents({ start: R, end: Q })
1334
- })), ee !== !1 ? (o.start = R, o.end = Q, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ie && (f.resizingLastAcceptedEvent = { ...o, _: { ...o._ } });
1345
+ event: { ...o, start: I, end: K },
1346
+ overlaps: o.getOverlappingEvents({ start: I, end: K })
1347
+ })), oe !== !1 ? (o.start = I, o.end = K, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ae && (f.resizingLastAcceptedEvent = { ...o, _: { ...o._ } });
1335
1348
  }
1336
- }, y = async (l) => {
1349
+ }, h = async (l) => {
1337
1350
  var n, k;
1338
1351
  if (f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.resizing) {
1339
1352
  const { newStart: t, newEnd: O } = E(o);
1340
- let z = !0;
1341
- const R = d.value["resize-end"];
1342
- R && (z = await R({
1353
+ let P = !0;
1354
+ const I = d.value["resize-end"];
1355
+ I && (P = await I({
1343
1356
  e: l,
1344
1357
  event: o,
1345
1358
  original: f.resizingOriginalEvent,
1346
1359
  // Original event details before resizing.
1347
1360
  overlaps: o.getOverlappingEvents({ start: t, end: O })
1348
- })), o.start = z === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).start : ((n = f.resizingLastAcceptedEvent) == null ? void 0 : n.start) || t, o.end = z === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).end : ((k = f.resizingLastAcceptedEvent) == null ? void 0 : k.end) || O, o._.duration < 1 && (o.start = f.resizingOriginalEvent.start, o.end = f.resizingOriginalEvent.end), _.isResizingEvent = !1;
1361
+ })), o.start = P === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).start : ((n = f.resizingLastAcceptedEvent) == null ? void 0 : n.start) || t, o.end = P === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).end : ((k = f.resizingLastAcceptedEvent) == null ? void 0 : k.end) || O, o._.duration < 1 && (o.start = f.resizingOriginalEvent.start, o.end = f.resizingOriginalEvent.end), _.isResizingEvent = !1;
1349
1362
  }
1350
1363
  document.removeEventListener(l.type === "touchend" ? "touchmove" : "mousemove", v), f.resizing = !1, f.fromResizer = !1, f.dragging = !1, f.startX = 0, f.startY = 0, f.moveX = 0, f.moveY = 0, f.startPercentageX = 0, f.startPercentageY = 0, f.movePercentageX = 0, f.movePercentageY = 0, f.cellEl = null, f.resizeStartDate = null, f.resizingOriginalEvent = null, f.resizingLastAcceptedEvent = null, f.schedule = null;
1351
1364
  }, E = (l) => {
1352
1365
  const n = new Date(l.start.getFullYear(), l.start.getMonth(), l.start.getDate());
1353
1366
  new Date(n).setDate(n.getDate() + 1);
1354
- let t = Ee(f.movePercentageY, i);
1367
+ let t = Pe(f.movePercentageY, i);
1355
1368
  if (t = Math.max(0, Math.min(t, 24 * 60)), i.snapToInterval) {
1356
- const R = t + i.snapToInterval / 2;
1357
- t = R - R % i.snapToInterval;
1369
+ const I = t + i.snapToInterval / 2;
1370
+ t = I - I % i.snapToInterval;
1358
1371
  }
1359
- let O = l.start, z = new Date(n.getTime() + t * 6e4);
1360
- return z < f.resizeStartDate && (O = z, z = f.resizeStartDate), { newStart: O, newEnd: z };
1372
+ let O = l.start, P = new Date(n.getTime() + t * 6e4);
1373
+ return P < f.resizeStartDate && (O = P, P = f.resizeStartDate), { newStart: O, newEnd: P };
1361
1374
  };
1362
- Ae(() => o._.register(V.value));
1363
- const H = [], B = (l, n, k) => {
1364
- document.addEventListener(l, n, k), H.push({ event: l, handler: n, options: k });
1375
+ Ze(() => o._.register(V.value));
1376
+ const L = [], B = (l, n, k) => {
1377
+ document.addEventListener(l, n, k), L.push({ event: l, handler: n, options: k });
1365
1378
  };
1366
- return ze(() => {
1367
- o._.unregister(), H.forEach(({ event: l, handler: n, options: k }) => {
1379
+ return Xe(() => {
1380
+ o._.unregister(), L.forEach(({ event: l, handler: n, options: k }) => {
1368
1381
  document.removeEventListener(l, n, k);
1369
1382
  });
1370
- }), (l, n) => (Y(), j("div", ge({ class: "vuecal__event" }, je(d.value, !0), {
1383
+ }), (l, n) => (Y(), j("div", ye({ class: "vuecal__event" }, Ie(d.value, !0), {
1371
1384
  ref_key: "eventEl",
1372
1385
  ref: V,
1373
1386
  class: X.value,
@@ -1376,57 +1389,57 @@ const Ke = (c) => {
1376
1389
  onDragstart: n[2] || (n[2] = (k) => b.value && C(w).eventDragStart(k, o)),
1377
1390
  onDragend: n[3] || (n[3] = (k) => b.value && C(w).eventDragEnd(k, o))
1378
1391
  }), [
1379
- me("div", Vt, [
1392
+ ge("div", zt, [
1380
1393
  F(l.$slots, "event", { event: o }, () => [
1381
- me("div", Ot, re(o.title), 1),
1382
- C(i).time ? (Y(), j("div", jt, re(o._[`startTimeFormatted${C(i).twelveHour ? 12 : 24}`]) + `
1383
- - ` + re(o._[`endTimeFormatted${C(i).twelveHour ? 12 : 24}`]), 1)) : Z("", !0),
1384
- me("div", {
1394
+ ge("div", Ft, le(o.title), 1),
1395
+ C(i).time ? (Y(), j("div", Nt, le(o._[`startTimeFormatted${C(i).twelveHour ? 12 : 24}`]) + `
1396
+ - ` + le(o._[`endTimeFormatted${C(i).twelveHour ? 12 : 24}`]), 1)) : U("", !0),
1397
+ ge("div", {
1385
1398
  class: "vuecal__event-content",
1386
1399
  innerHTML: o.content
1387
- }, null, 8, Pt)
1400
+ }, null, 8, Wt)
1388
1401
  ])
1389
1402
  ]),
1390
- W.value ? (Y(), j("div", {
1403
+ N.value ? (Y(), j("div", {
1391
1404
  key: 0,
1392
1405
  class: "vuecal__event-resizer",
1393
- onDragstart: n[0] || (n[0] = Ge(() => {
1406
+ onDragstart: n[0] || (n[0] = Qe(() => {
1394
1407
  }, ["prevent", "stop"]))
1395
- }, null, 32)) : Z("", !0),
1396
- Me(He, { name: "vuecal-delete-btn" }, {
1397
- default: q(() => [
1408
+ }, null, 32)) : U("", !0),
1409
+ Oe(Ge, { name: "vuecal-delete-btn" }, {
1410
+ default: Z(() => [
1398
1411
  o._.deleting ? (Y(), j("div", {
1399
1412
  key: 0,
1400
1413
  class: "vuecal__event-delete",
1401
- onClick: n[1] || (n[1] = Ge((k) => o.delete(3), ["stop"]))
1402
- }, "Delete")) : Z("", !0)
1414
+ onClick: n[1] || (n[1] = Qe((k) => o.delete(3), ["stop"]))
1415
+ }, "Delete")) : U("", !0)
1403
1416
  ]),
1404
1417
  _: 1
1405
1418
  })
1406
- ], 16, Ct));
1419
+ ], 16, Lt));
1407
1420
  }
1408
- }, zt = ["innerHTML"], Ht = ["data-schedule"], Lt = {
1421
+ }, Bt = ["innerHTML"], At = ["data-schedule"], It = {
1409
1422
  key: 1,
1410
1423
  class: "vuecal__cell-date"
1411
- }, Ft = {
1424
+ }, Rt = {
1412
1425
  key: 2,
1413
1426
  class: "vuecal__cell-content"
1414
- }, Nt = {
1427
+ }, Xt = {
1415
1428
  key: 3,
1416
1429
  class: "vuecal__cell-events"
1417
- }, Wt = {
1430
+ }, Gt = {
1418
1431
  key: 1,
1419
1432
  class: "vuecal__cell-date"
1420
- }, At = {
1433
+ }, qt = {
1421
1434
  key: 2,
1422
1435
  class: "vuecal__cell-content"
1423
- }, Bt = {
1436
+ }, Ut = {
1424
1437
  key: 3,
1425
1438
  class: "vuecal__cell-events"
1426
- }, It = {
1439
+ }, Zt = {
1427
1440
  key: 5,
1428
1441
  class: "vuecal__cell-events-count"
1429
- }, Rt = ["title"], Xt = {
1442
+ }, Jt = ["title"], Kt = {
1430
1443
  __name: "cell",
1431
1444
  props: {
1432
1445
  // Even with time=false, the date of the cell will still be provided in order to attach
@@ -1436,9 +1449,9 @@ const Ke = (c) => {
1436
1449
  index: { type: Number, required: !0 }
1437
1450
  },
1438
1451
  setup(c) {
1439
- const s = c, i = Se("vuecal"), { view: D, config: w, dateUtils: _, eventsManager: L, dnd: g, touch: V } = i, o = M(() => _.isToday(s.start)), f = ue(null), b = ue([]), W = ue(!1), X = (r) => {
1440
- b.value.push(r.detail), W.value = !0;
1441
- }, u = () => setTimeout(() => W.value = !1, 300), d = _e({
1452
+ const s = c, i = Ne("vuecal"), { view: D, config: w, dateUtils: _, eventsManager: z, dnd: m, touch: V } = i, o = T(() => _.isToday(s.start)), f = ie(null), b = ie([]), N = ie(!1), X = (r) => {
1453
+ b.value.push(r.detail), N.value = !0;
1454
+ }, u = () => setTimeout(() => N.value = !1, 300), d = $e({
1442
1455
  dragging: !1,
1443
1456
  holding: !1,
1444
1457
  // When the cell is clicked and hold for a certain amount of time.
@@ -1459,42 +1472,42 @@ const Ke = (c) => {
1459
1472
  movePercentageX: 0,
1460
1473
  movePercentageY: 0,
1461
1474
  schedule: null
1462
- }), e = ue(!1), v = ue({ cellOverlaps: {}, longestStreak: 0 }), y = M(() => {
1463
- let r = Math.min(d.startPercentageY, d.movePercentageY), T = Math.max(d.startPercentageY, d.movePercentageY), S = Ee(r, w), $ = Ee(T, w);
1464
- return w.snapToInterval && (S = _.snapToInterval(S, w.snapToInterval), $ = _.snapToInterval($, w.snapToInterval), r = Te(S, w), T = Te($, w)), {
1475
+ }), e = ie(!1), v = ie({ cellOverlaps: {}, longestStreak: 0 }), h = T(() => {
1476
+ let r = Math.min(d.startPercentageY, d.movePercentageY), $ = Math.max(d.startPercentageY, d.movePercentageY), S = Pe(r, w), M = Pe($, w);
1477
+ return w.snapToInterval && (S = _.snapToInterval(S, w.snapToInterval), M = _.snapToInterval(M, w.snapToInterval), r = Ve(S, w), $ = Ve(M, w)), {
1465
1478
  style: {
1466
1479
  top: r + "%",
1467
- height: Math.abs(T - r) + "%"
1480
+ height: Math.abs($ - r) + "%"
1468
1481
  },
1469
1482
  startMinutes: S,
1470
- endMinutes: $,
1483
+ endMinutes: M,
1471
1484
  start: _.formatMinutes(S),
1472
- end: _.formatMinutes($),
1485
+ end: _.formatMinutes(M),
1473
1486
  ...d.schedule ? { schedule: d.schedule } : {}
1474
1487
  };
1475
- }), E = M(() => {
1476
- const r = w.editableEvents.create && (d.dragging || e.value), T = w.eventCreateMinDrag && d.thresholdPassed || !w.eventCreateMinDrag;
1477
- return r && T;
1478
- }), H = M(() => {
1479
- var te;
1480
- const r = /* @__PURE__ */ new Date(), T = D.start.getFullYear(), S = D.start.getMonth(), $ = s.start.getFullYear(), A = s.start.getMonth();
1488
+ }), E = T(() => {
1489
+ const r = w.editableEvents.create && (d.dragging || e.value), $ = w.eventCreateMinDrag && d.thresholdPassed || !w.eventCreateMinDrag;
1490
+ return r && $;
1491
+ }), L = T(() => {
1492
+ var ee;
1493
+ const r = /* @__PURE__ */ new Date(), $ = D.start.getFullYear(), S = D.start.getMonth(), M = s.start.getFullYear(), W = s.start.getMonth();
1481
1494
  return {
1482
- [`vuecal__cell--${Pe[s.start.getDay()]}`]: D.isDay || D.isDays || D.isWeek || D.isMonth,
1483
- [`vuecal__cell--${nt[A]}`]: D.isYear,
1484
- [`vuecal__cell--${$}`]: D.isYears,
1495
+ [`vuecal__cell--${Re[s.start.getDay()]}`]: D.isDay || D.isDays || D.isWeek || D.isMonth,
1496
+ [`vuecal__cell--${ct[W]}`]: D.isYear,
1497
+ [`vuecal__cell--${M}`]: D.isYears,
1485
1498
  "vuecal__cell--today": o.value,
1486
- "vuecal__cell--current-month": D.isYear && $ === r.getFullYear() && A === r.getMonth(),
1487
- "vuecal__cell--current-year": D.isYears && $ === r.getFullYear(),
1488
- "vuecal__cell--out-of-range": D.isMonth && ($ !== T || A !== S),
1489
- "vuecal__cell--before-min": ie.value && Q.value,
1490
- "vuecal__cell--after-max": ie.value && ee.value,
1491
- "vuecal__cell--disabled": ie.value,
1499
+ "vuecal__cell--current-month": D.isYear && M === r.getFullYear() && W === r.getMonth(),
1500
+ "vuecal__cell--current-year": D.isYears && M === r.getFullYear(),
1501
+ "vuecal__cell--out-of-range": D.isMonth && (M !== $ || W !== S),
1502
+ "vuecal__cell--before-min": ae.value && K.value,
1503
+ "vuecal__cell--after-max": ae.value && oe.value,
1504
+ "vuecal__cell--disabled": ae.value,
1492
1505
  "vuecal__cell--selected": D.selectedDate && D.selectedDate.getTime() >= s.start.getTime() && D.selectedDate.getTime() <= s.end.getTime(),
1493
- "vuecal__cell--has-schedules": (te = w.schedules) == null ? void 0 : te.length,
1506
+ "vuecal__cell--has-schedules": (ee = w.schedules) == null ? void 0 : ee.length,
1494
1507
  "vuecal__cell--dragging": d.dragging,
1495
1508
  "vuecal__cell--has-events": n.value.length
1496
1509
  };
1497
- }), B = M(() => _.formatDate(s.start)), l = M(() => {
1510
+ }), B = T(() => _.formatDate(s.start)), l = T(() => {
1498
1511
  switch (D.id) {
1499
1512
  case "day":
1500
1513
  return "";
@@ -1509,162 +1522,162 @@ const Ke = (c) => {
1509
1522
  case "years":
1510
1523
  return _.formatDate(s.start, "YYYY");
1511
1524
  }
1512
- }), n = M(() => w.datePicker ? [] : L.getEventsByDate(B.value, !0, !0).filter((r) => !b.value.includes(r._.id))), k = M(() => n.value.filter((r) => !r.background)), t = M(() => {
1525
+ }), n = T(() => w.datePicker ? [] : z.getEventsByDate(B.value, !0, !0).filter((r) => !b.value.includes(r._.id))), k = T(() => n.value.filter((r) => !r.background)), t = T(() => {
1513
1526
  var r;
1514
- return (r = w.schedules) == null ? void 0 : r.reduce((T, S) => (T[S.id] = n.value.filter(($) => $.schedule === S.id), T), {});
1515
- }), O = M(() => {
1527
+ return (r = w.schedules) == null ? void 0 : r.reduce(($, S) => ($[S.id] = n.value.filter((M) => M.schedule === S.id), $), {});
1528
+ }), O = T(() => {
1516
1529
  const r = {};
1517
- for (const T of n.value) {
1518
- const S = T._.id, { maxConcurrent: $ = 1, position: A = 0 } = v.value.cellOverlaps[S] || {};
1530
+ for (const $ of n.value) {
1531
+ const S = $._.id, { maxConcurrent: M = 1, position: W = 0 } = v.value.cellOverlaps[S] || {};
1519
1532
  r[S] = {
1520
- width: `${100 / $}%`,
1521
- left: `${100 / $ * A}%`
1533
+ width: `${100 / M}%`,
1534
+ left: `${100 / M * W}%`
1522
1535
  };
1523
1536
  }
1524
1537
  return r;
1525
- }), z = M(() => D.isMonth && w.eventCount && !w.eventsOnMonthView && k.value.length), R = M(() => {
1538
+ }), P = T(() => D.isMonth && w.eventCount && !w.eventsOnMonthView && k.value.length), I = T(() => {
1526
1539
  var S;
1527
1540
  if (!w.specialHours || D.isMonth || D.isYear || D.isYears) return;
1528
- const r = Pe[s.start.getDay()];
1529
- let T = (S = w.specialHours) == null ? void 0 : S[r];
1530
- if (T)
1531
- return Array.isArray(T) || (T = [T]), T.map(($) => {
1532
- let { from: A, to: I, class: te, label: h } = $;
1533
- if (isNaN(A) || isNaN(I) || w.timeFrom >= I || w.timeTo <= A) return;
1534
- A = Math.max(w.timeFrom, A), I = Math.min(w.timeTo, I);
1535
- const P = Te(A, w), N = Te(I, w) - P;
1541
+ const r = Re[s.start.getDay()];
1542
+ let $ = (S = w.specialHours) == null ? void 0 : S[r];
1543
+ if ($)
1544
+ return Array.isArray($) || ($ = [$]), $.map((M) => {
1545
+ let { from: W, to: A, class: ee, label: de } = M;
1546
+ if (isNaN(W) || isNaN(A) || w.timeFrom >= A || w.timeTo <= W) return;
1547
+ W = Math.max(w.timeFrom, W), A = Math.min(w.timeTo, A);
1548
+ const he = Ve(W, w), g = Ve(A, w) - he;
1536
1549
  return {
1537
- style: { top: `${P}%`, height: `${N}%` },
1538
- label: h,
1539
- class: te
1550
+ style: { top: `${he}%`, height: `${g}%` },
1551
+ label: de,
1552
+ class: ee
1540
1553
  };
1541
- }).filter(($) => !!$);
1542
- }), Q = M(() => w.minTimestamp !== null && w.minTimestamp > s.end.getTime()), ee = M(() => w.maxTimestamp && w.maxTimestamp < s.start.getTime()), ie = M(() => {
1543
- const { disableDays: r } = w, T = D.isYear || D.isYears;
1544
- return r.length && r.includes(_.formatDate(s.start)) && !T ? !0 : Q.value || ee.value;
1545
- }), oe = _e({
1546
- show: M(() => {
1554
+ }).filter((M) => !!M);
1555
+ }), K = T(() => w.minTimestamp !== null && w.minTimestamp > s.end.getTime()), oe = T(() => w.maxTimestamp && w.maxTimestamp < s.start.getTime()), ae = T(() => {
1556
+ const { disableDays: r } = w, $ = D.isYear || D.isYears;
1557
+ return r.length && r.includes(_.formatDate(s.start)) && !$ ? !0 : K.value || oe.value;
1558
+ }), re = $e({
1559
+ show: T(() => {
1547
1560
  if (!(!D.isDay && !D.isDays && !D.isWeek) && !(!o.value || !w.time) && !(w.timeFrom > _.dateToMinutes(D.now)) && !(_.dateToMinutes(D.now) > w.timeTo))
1548
1561
  return !0;
1549
1562
  }),
1550
- nowInMinutes: M(() => _.dateToMinutes(D.now)),
1551
- todaysTimePosition: M(() => Te(oe.nowInMinutes, w)),
1552
- style: M(() => `top: ${oe.todaysTimePosition}%`),
1553
- currentTime: M(() => _.formatTime(D.now))
1554
- }), he = M(() => {
1555
- if (ie.value) return {};
1563
+ nowInMinutes: T(() => _.dateToMinutes(D.now)),
1564
+ todaysTimePosition: T(() => Ve(re.nowInMinutes, w)),
1565
+ style: T(() => `top: ${re.todaysTimePosition}%`),
1566
+ currentTime: T(() => _.formatTime(D.now))
1567
+ }), De = T(() => {
1568
+ if (ae.value) return {};
1556
1569
  const r = { ...w.eventListeners.cell };
1557
- Object.entries(r).forEach(([$, A]) => {
1558
- r[$] = (I) => {
1559
- var te, h, P;
1560
- (P = (h = I.target || ((te = I.e) == null ? void 0 : te.target)).closest) != null && P.call(h, ".vuecal__event") || A(I.type ? { e: I, cell: x.value, cursor: J.value } : I);
1570
+ Object.entries(r).forEach(([M, W]) => {
1571
+ r[M] = (A) => {
1572
+ var ee, de, he;
1573
+ (he = (de = A.target || ((ee = A.e) == null ? void 0 : ee.target)).closest) != null && he.call(de, ".vuecal__event") || W(A.type ? { e: A, cell: x.value, cursor: Q.value } : A);
1561
1574
  };
1562
1575
  });
1563
- const T = { ...r };
1576
+ const $ = { ...r };
1564
1577
  let S = null;
1565
- return r.click = ($) => {
1566
- var A;
1567
- ce(), (A = T.click) == null || A.call(T, { e: $, cell: x.value, cursor: J.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1568
- var I;
1569
- S = null, (I = T["delayed-click"]) == null || I.call(T, { e: $, cell: x.value, cursor: J.value });
1578
+ return r.click = (M) => {
1579
+ var W;
1580
+ ue(), (W = $.click) == null || W.call($, { e: M, cell: x.value, cursor: Q.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1581
+ var A;
1582
+ S = null, (A = $["delayed-click"]) == null || A.call($, { e: M, cell: x.value, cursor: Q.value });
1570
1583
  }, 400);
1571
- }, (w.time && D.isDay || D.isDays || D.isWeek) && (r.touchstart = ($) => {
1572
- var A;
1573
- a($.e || $), (A = T.touchstart) == null || A.call(T, { e: $, cell: x.value, cursor: J.value });
1574
- }, r.mousedown = ($) => {
1575
- var A;
1576
- a($.e || $), (A = T.mousedown) == null || A.call(T, { e: $, cell: x.value, cursor: J.value });
1577
- }), T.dblclick && (r.dblclick = ($) => {
1578
- var K, ae;
1579
- const A = (((K = $.touches) == null ? void 0 : K[0]) || $).clientY, { top: I } = f.value.getBoundingClientRect(), te = Be(A - I, f.value), h = Ee(te, w), P = new Date(s.start);
1580
- P.setMinutes(h);
1581
- const N = {
1582
- y: te,
1583
- date: P
1584
+ }, (w.time && D.isDay || D.isDays || D.isWeek) && (r.touchstart = (M) => {
1585
+ var W;
1586
+ a(M.e || M), (W = $.touchstart) == null || W.call($, { e: M, cell: x.value, cursor: Q.value });
1587
+ }, r.mousedown = (M) => {
1588
+ var W;
1589
+ a(M.e || M), (W = $.mousedown) == null || W.call($, { e: M, cell: x.value, cursor: Q.value });
1590
+ }), $.dblclick && (r.dblclick = (M) => {
1591
+ var H, R;
1592
+ const W = (((H = M.touches) == null ? void 0 : H[0]) || M).clientY, { top: A } = f.value.getBoundingClientRect(), ee = Je(W - A, f.value), de = Pe(ee, w), he = new Date(s.start);
1593
+ he.setMinutes(de);
1594
+ const g = {
1595
+ y: ee,
1596
+ date: he
1584
1597
  };
1585
- (ae = T.dblclick) == null || ae.call(T, { e: $, cell: x.value, cursor: N });
1586
- }), w.editableEvents.drag && (r.dragenter = ($) => g.cellDragEnter($, x.value), r.dragover = ($) => {
1587
- $.preventDefault(), g.cellDragOver($, x.value);
1588
- }, r.dragleave = ($) => g.cellDragLeave($, x.value), r.drop = ($) => g.cellDragDrop($, x.value)), r;
1589
- }), x = M(() => ({
1598
+ (R = $.dblclick) == null || R.call($, { e: M, cell: x.value, cursor: g });
1599
+ }), w.editableEvents.drag && (r.dragenter = (M) => m.cellDragEnter(M, x.value), r.dragover = (M) => {
1600
+ M.preventDefault(), m.cellDragOver(M, x.value);
1601
+ }, r.dragleave = (M) => m.cellDragLeave(M, x.value), r.drop = (M) => m.cellDragDrop(M, x.value)), r;
1602
+ }), x = T(() => ({
1590
1603
  start: s.start,
1591
1604
  end: s.end,
1592
1605
  events: n,
1593
1606
  ...d.schedule ? { schedule: d.schedule } : {}
1594
- })), J = M(() => {
1595
- const r = Ee(d.movePercentageY || d.startPercentageY, w), T = new Date(s.start);
1596
- return T.setMinutes(r), {
1607
+ })), Q = T(() => {
1608
+ const r = Pe(d.movePercentageY || d.startPercentageY, w), $ = new Date(s.start);
1609
+ return $.setMinutes(r), {
1597
1610
  x: d.movePercentageX || d.startPercentageX,
1598
1611
  y: d.movePercentageY || d.startPercentageY,
1599
- date: T
1612
+ date: $
1600
1613
  };
1601
- }), ce = () => {
1614
+ }), ue = () => {
1602
1615
  D.updateSelectedDate(s.start), w.clickToNavigate && ((D.isMonth || D.isDays || D.isWeek) && w.availableViews.day ? D.switch("day") : D.isYear && w.availableViews.month ? D.switch("month") : D.isYears && w.availableViews.year && D.switch("year")), D.updateViewDate(s.start);
1603
1616
  }, a = (r) => {
1604
- var S, $;
1617
+ var S, M;
1605
1618
  d.schedule = ~~r.target.dataset.schedule;
1606
- const T = f.value.getBoundingClientRect();
1607
- d.startX = (((S = r.touches) == null ? void 0 : S[0]) || r).clientX - T.left, d.startY = ((($ = r.touches) == null ? void 0 : $[0]) || r).clientY - T.top, d.startPercentageX = d.startX * 100 / T.width, d.startPercentageY = d.startY * 100 / T.height, d.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", p), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", m, { once: !0 }), d.holdTimer = setTimeout(() => {
1608
- var A, I;
1609
- d.holding = !0, (I = (A = he.value).hold) == null || I.call(A, { e: r, cell: x.value, cursor: J.value });
1619
+ const $ = f.value.getBoundingClientRect();
1620
+ d.startX = (((S = r.touches) == null ? void 0 : S[0]) || r).clientX - $.left, d.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - $.top, d.startPercentageX = d.startX * 100 / $.width, d.startPercentageY = d.startY * 100 / $.height, d.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", p), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", y, { once: !0 }), d.holdTimer = setTimeout(() => {
1621
+ var W, A;
1622
+ d.holding = !0, (A = (W = De.value).hold) == null || A.call(W, { e: r, cell: x.value, cursor: Q.value });
1610
1623
  }, 1e3);
1611
1624
  }, p = (r) => {
1612
- var S, $, A, I, te, h;
1613
- d.dragging || (V.isDraggingCell = !0, ($ = (S = he.value).dragStart) == null || $.call(S, { e: r, cell: x.value, cursor: J.value })), d.dragging = !0, d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1;
1614
- const T = f.value.getBoundingClientRect();
1615
- d.moveX = (((A = r.touches) == null ? void 0 : A[0]) || r).clientX - T.left, d.moveY = (((I = r.touches) == null ? void 0 : I[0]) || r).clientY - T.top, d.movePercentageX = d.moveX * 100 / T.width, d.movePercentageY = d.moveY * 100 / T.height, w.eventCreateMinDrag && Math.abs(d.startY - d.moveY) > w.eventCreateMinDrag && (d.thresholdPassed = !0), (h = (te = he.value).drag) == null || h.call(te, { e: r, cell: x.value, cursor: J.value });
1616
- }, m = async (r) => {
1617
- var T, S;
1618
- document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", p, { passive: !1 }), d.dragging && ((S = (T = he.value).dragEnd) == null || S.call(T, { e: r, cell: x.value, cursor: J.value }), V.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await G(r), e.value = !1)), d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1, d.dragging = !1, d.startX = 0, d.startY = 0, d.moveX = 0, d.moveY = 0, d.startPercentageX = 0, d.startPercentageY = 0, d.movePercentageX = 0, d.movePercentageY = 0, d.thresholdPassed = !1, d.schedule = null;
1625
+ var S, M, W, A, ee, de;
1626
+ d.dragging || (V.isDraggingCell = !0, (M = (S = De.value).dragStart) == null || M.call(S, { e: r, cell: x.value, cursor: Q.value })), d.dragging = !0, d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1;
1627
+ const $ = f.value.getBoundingClientRect();
1628
+ d.moveX = (((W = r.touches) == null ? void 0 : W[0]) || r).clientX - $.left, d.moveY = (((A = r.touches) == null ? void 0 : A[0]) || r).clientY - $.top, d.movePercentageX = d.moveX * 100 / $.width, d.movePercentageY = d.moveY * 100 / $.height, w.eventCreateMinDrag && Math.abs(d.startY - d.moveY) > w.eventCreateMinDrag && (d.thresholdPassed = !0), (de = (ee = De.value).drag) == null || de.call(ee, { e: r, cell: x.value, cursor: Q.value });
1629
+ }, y = async (r) => {
1630
+ var $, S;
1631
+ document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", p, { passive: !1 }), d.dragging && ((S = ($ = De.value).dragEnd) == null || S.call($, { e: r, cell: x.value, cursor: Q.value }), V.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await G(r), e.value = !1)), d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1, d.dragging = !1, d.startX = 0, d.startY = 0, d.moveX = 0, d.moveY = 0, d.startPercentageX = 0, d.startPercentageY = 0, d.movePercentageX = 0, d.movePercentageY = 0, d.thresholdPassed = !1, d.schedule = null;
1619
1632
  }, G = async (r) => {
1620
1633
  if (!E.value) return;
1621
- let { start: T, end: S, startMinutes: $, endMinutes: A } = y.value;
1622
- T = new Date(s.start), T.setMinutes($), S = new Date(s.start), S.setMinutes(A);
1623
- let I = { ...y.value, start: T, end: S };
1624
- const { create: te } = w.eventListeners.event;
1625
- if (typeof te == "function") {
1626
- const h = I;
1627
- I = await new Promise((P) => te({ e: r, event: I, cell: x.value, resolve: P, cursor: J.value })), I && typeof I == "object" && D.createEvent(I), I && typeof I == "boolean" && D.createEvent(h);
1628
- } else D.createEvent(I);
1629
- }, U = () => {
1630
- Object.keys(he.value).forEach((r) => {
1631
- var T;
1632
- (T = f.value) == null || T.removeEventListener(r, he.value[r]);
1634
+ let { start: $, end: S, startMinutes: M, endMinutes: W } = h.value;
1635
+ $ = new Date(s.start), $.setMinutes(M), S = new Date(s.start), S.setMinutes(W);
1636
+ let A = { ...h.value, start: $, end: S };
1637
+ const { create: ee } = w.eventListeners.event;
1638
+ if (typeof ee == "function") {
1639
+ const de = A;
1640
+ A = await new Promise((he) => ee({ e: r, event: A, cell: x.value, resolve: he, cursor: Q.value })), A && typeof A == "object" && D.createEvent(A), A && typeof A == "boolean" && D.createEvent(de);
1641
+ } else D.createEvent(A);
1642
+ }, J = () => {
1643
+ Object.keys(De.value).forEach((r) => {
1644
+ var $;
1645
+ ($ = f.value) == null || $.removeEventListener(r, De.value[r]);
1633
1646
  });
1634
- }, fe = () => {
1635
- v.value = L.getCellOverlappingEvents(B.value);
1647
+ }, ce = () => {
1648
+ v.value = z.getCellOverlappingEvents(B.value);
1636
1649
  };
1637
- return de(
1650
+ return me(
1638
1651
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
1639
1652
  () => k.value.map((r) => `${r._.id}${r.start.getTime()}${r.end.getTime()}`).join(),
1640
1653
  async () => {
1641
- await We(), fe();
1654
+ await Ue(), ce();
1642
1655
  },
1643
1656
  { immediate: !0, flush: "post" }
1644
1657
  // Use flush: 'post' to prevent infinite updates.
1645
- ), ze(async () => {
1646
- b.value.forEach((r) => L.deleteEvent(r, 3)), U(), await We();
1647
- }), (r, T) => (Y(), j("div", ge({
1648
- class: ["vuecal__cell", H.value],
1658
+ ), Xe(async () => {
1659
+ b.value.forEach((r) => z.deleteEvent(r, 3)), J(), await Ue();
1660
+ }), (r, $) => (Y(), j("div", ye({
1661
+ class: ["vuecal__cell", L.value],
1649
1662
  ref_key: "cellEl",
1650
1663
  ref: f
1651
- }, je(he.value, !0)), [
1664
+ }, Ie(De.value, !0)), [
1652
1665
  r.$slots.cell ? F(r.$slots, "cell", {
1653
1666
  key: 0,
1654
1667
  start: c.start,
1655
1668
  end: c.end,
1656
1669
  index: c.index,
1657
1670
  events: n.value
1658
- }) : Z("", !0),
1659
- R.value ? (Y(!0), j(se, { key: 1 }, De(R.value, (S, $) => (Y(), j("div", {
1660
- class: we(["vuecal__special-hours", S.class]),
1661
- style: ke(S.style),
1671
+ }) : U("", !0),
1672
+ I.value ? (Y(!0), j(te, { key: 1 }, pe(I.value, (S, M) => (Y(), j("div", {
1673
+ class: ke(["vuecal__special-hours", S.class]),
1674
+ style: Te(S.style),
1662
1675
  innerHTML: S.label || ""
1663
- }, null, 14, zt))), 256)) : Z("", !0),
1664
- !r.$slots.cell && C(w).schedules ? (Y(!0), j(se, { key: 2 }, De(C(w).schedules, (S) => (Y(), j("div", {
1665
- class: we(["vuecal__schedule vuecal__schedule--cell", S.class]),
1676
+ }, null, 14, Bt))), 256)) : U("", !0),
1677
+ !r.$slots.cell && C(w).schedules ? (Y(!0), j(te, { key: 2 }, pe(C(w).schedules, (S) => (Y(), j("div", {
1678
+ class: ke(["vuecal__schedule vuecal__schedule--cell", S.class]),
1666
1679
  key: S.id,
1667
- style: ke(S.style || null),
1680
+ style: Te(S.style || null),
1668
1681
  "data-schedule": S.id
1669
1682
  }, [
1670
1683
  r.$slots["cell-events"] ? F(r.$slots, "cell-events", {
@@ -1672,230 +1685,230 @@ const Ke = (c) => {
1672
1685
  start: c.start,
1673
1686
  end: c.end,
1674
1687
  events: n.value
1675
- }) : Z("", !0),
1676
- l.value || r.$slots["cell-date"] ? (Y(), j("div", Lt, [
1688
+ }) : U("", !0),
1689
+ l.value || r.$slots["cell-date"] ? (Y(), j("div", It, [
1677
1690
  F(r.$slots, "cell-date", {
1678
1691
  start: c.start,
1679
1692
  end: c.end,
1680
1693
  events: n.value
1681
1694
  }, () => [
1682
- Ze(re(l.value), 1)
1695
+ xe(le(l.value), 1)
1683
1696
  ])
1684
- ])) : Z("", !0),
1685
- r.$slots["cell-content"] ? (Y(), j("div", Ft, [
1697
+ ])) : U("", !0),
1698
+ r.$slots["cell-content"] ? (Y(), j("div", Rt, [
1686
1699
  F(r.$slots, "cell-content", {
1687
1700
  start: c.start,
1688
1701
  end: c.end,
1689
1702
  events: n.value
1690
1703
  })
1691
- ])) : Z("", !0),
1692
- r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Nt, [
1704
+ ])) : U("", !0),
1705
+ r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Xt, [
1693
1706
  F(r.$slots, "cell-events", {
1694
1707
  start: c.start,
1695
1708
  end: c.end,
1696
1709
  events: n.value
1697
1710
  })
1698
- ])) : n.value.length || W.value ? (Y(), be(qe, {
1711
+ ])) : n.value.length || N.value ? (Y(), Se(et, {
1699
1712
  key: 4,
1700
1713
  class: "vuecal__cell-events",
1701
1714
  name: "vuecal-event-delete",
1702
- onBeforeLeave: T[0] || (T[0] = ($) => W.value = !0),
1715
+ onBeforeLeave: $[0] || ($[0] = (M) => N.value = !0),
1703
1716
  onAfterLeave: u,
1704
1717
  tag: "div"
1705
1718
  }, {
1706
- default: q(() => [
1707
- (Y(!0), j(se, null, De(t.value[S.id], ($) => (Y(), be(Ue, {
1708
- key: $._.id,
1709
- event: $,
1719
+ default: Z(() => [
1720
+ (Y(!0), j(te, null, pe(t.value[S.id], (M) => (Y(), Se(at, {
1721
+ key: M._.id,
1722
+ event: M,
1710
1723
  onEventDeleted: X,
1711
- style: ke(O.value[$._.id])
1712
- }, $e({ _: 2 }, [
1724
+ style: Te(O.value[M._.id])
1725
+ }, je({ _: 2 }, [
1713
1726
  r.$slots.event ? {
1714
1727
  name: "event",
1715
- fn: q((A) => [
1716
- F(r.$slots, "event", ge({ ref_for: !0 }, A))
1728
+ fn: Z((W) => [
1729
+ F(r.$slots, "event", ye({ ref_for: !0 }, W))
1717
1730
  ]),
1718
1731
  key: "0"
1719
1732
  } : void 0
1720
1733
  ]), 1032, ["event", "style"]))), 128))
1721
1734
  ]),
1722
1735
  _: 2
1723
- }, 1024)) : Z("", !0),
1736
+ }, 1024)) : U("", !0),
1724
1737
  E.value && d.schedule === S.id ? (Y(), j("div", {
1725
1738
  key: 5,
1726
1739
  class: "vuecal__event-placeholder",
1727
- style: ke(y.value.style)
1728
- }, re(y.value.start) + " - " + re(y.value.end), 5)) : Z("", !0)
1729
- ], 14, Ht))), 128)) : Z("", !0),
1730
- !r.$slots.cell && !C(w).schedules ? (Y(), j(se, { key: 3 }, [
1731
- r.$slots["cell-events"] ? F(r.$slots, "cell-events", { key: 0 }) : Z("", !0),
1732
- l.value || r.$slots["cell-date"] ? (Y(), j("div", Wt, [
1740
+ style: Te(h.value.style)
1741
+ }, le(h.value.start) + " - " + le(h.value.end), 5)) : U("", !0)
1742
+ ], 14, At))), 128)) : U("", !0),
1743
+ !r.$slots.cell && !C(w).schedules ? (Y(), j(te, { key: 3 }, [
1744
+ r.$slots["cell-events"] ? F(r.$slots, "cell-events", { key: 0 }) : U("", !0),
1745
+ l.value || r.$slots["cell-date"] ? (Y(), j("div", Gt, [
1733
1746
  F(r.$slots, "cell-date", {
1734
1747
  start: c.start,
1735
1748
  end: c.end,
1736
1749
  events: n.value
1737
1750
  }, () => [
1738
- Ze(re(l.value), 1)
1751
+ xe(le(l.value), 1)
1739
1752
  ])
1740
- ])) : Z("", !0),
1741
- r.$slots["cell-content"] ? (Y(), j("div", At, [
1753
+ ])) : U("", !0),
1754
+ r.$slots["cell-content"] ? (Y(), j("div", qt, [
1742
1755
  F(r.$slots, "cell-content", {
1743
1756
  start: c.start,
1744
1757
  end: c.end,
1745
1758
  events: n.value
1746
1759
  })
1747
- ])) : Z("", !0),
1748
- r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Bt, [
1760
+ ])) : U("", !0),
1761
+ r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Ut, [
1749
1762
  F(r.$slots, "cell-events", {
1750
1763
  start: c.start,
1751
1764
  end: c.end,
1752
1765
  events: n.value
1753
1766
  })
1754
- ])) : (n.value.length || W.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (Y(), be(qe, {
1767
+ ])) : (n.value.length || N.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (Y(), Se(et, {
1755
1768
  key: 4,
1756
1769
  class: "vuecal__cell-events",
1757
1770
  name: "vuecal-event-delete",
1758
- onBeforeLeave: T[1] || (T[1] = (S) => W.value = !0),
1771
+ onBeforeLeave: $[1] || ($[1] = (S) => N.value = !0),
1759
1772
  onAfterLeave: u,
1760
1773
  tag: "div"
1761
1774
  }, {
1762
- default: q(() => [
1763
- (Y(!0), j(se, null, De(n.value, (S) => (Y(), be(Ue, {
1775
+ default: Z(() => [
1776
+ (Y(!0), j(te, null, pe(n.value, (S) => (Y(), Se(at, {
1764
1777
  key: S._.id,
1765
1778
  event: S,
1766
1779
  onEventDeleted: X,
1767
- style: ke(O.value[S._.id])
1768
- }, $e({ _: 2 }, [
1780
+ style: Te(O.value[S._.id])
1781
+ }, je({ _: 2 }, [
1769
1782
  r.$slots.event ? {
1770
1783
  name: "event",
1771
- fn: q(($) => [
1772
- F(r.$slots, "event", ge({ ref_for: !0 }, $))
1784
+ fn: Z((M) => [
1785
+ F(r.$slots, "event", ye({ ref_for: !0 }, M))
1773
1786
  ]),
1774
1787
  key: "0"
1775
1788
  } : void 0
1776
1789
  ]), 1032, ["event", "style"]))), 128))
1777
1790
  ]),
1778
1791
  _: 3
1779
- })) : Z("", !0),
1792
+ })) : U("", !0),
1780
1793
  E.value ? (Y(), j("div", {
1781
1794
  key: 5,
1782
1795
  class: "vuecal__event-placeholder",
1783
- style: ke(y.value.style)
1784
- }, re(y.value.start) + " - " + re(y.value.end), 5)) : Z("", !0)
1785
- ], 64)) : Z("", !0),
1796
+ style: Te(h.value.style)
1797
+ }, le(h.value.start) + " - " + le(h.value.end), 5)) : U("", !0)
1798
+ ], 64)) : U("", !0),
1786
1799
  r.$slots["event-count"] ? F(r.$slots, "event-count", {
1787
1800
  key: 4,
1788
1801
  events: k.value
1789
- }) : z.value ? (Y(), j("div", It, re(k.value.length), 1)) : Z("", !0),
1790
- oe.show ? (Y(), j("div", {
1802
+ }) : P.value ? (Y(), j("div", Zt, le(k.value.length), 1)) : U("", !0),
1803
+ re.show ? (Y(), j("div", {
1791
1804
  key: 6,
1792
1805
  class: "vuecal__now-line",
1793
- style: ke(oe.style),
1794
- title: oe.currentTime
1806
+ style: Te(re.style),
1807
+ title: re.currentTime
1795
1808
  }, [
1796
- me("span", null, re(oe.currentTime), 1)
1797
- ], 12, Rt)) : Z("", !0)
1809
+ ge("span", null, le(re.currentTime), 1)
1810
+ ], 12, Jt)) : U("", !0)
1798
1811
  ], 16));
1799
1812
  }
1800
- }, Gt = {
1813
+ }, Qt = {
1801
1814
  __name: "body",
1802
1815
  setup(c) {
1803
- const s = Se("vuecal");
1816
+ const s = Ne("vuecal");
1804
1817
  let { view: i, config: D, dateUtils: w } = s;
1805
- const _ = ue(null), L = ue(null), g = M(() => ({
1818
+ const _ = ie(null), z = ie(null), m = T(() => ({
1806
1819
  "--vuecal-grid-columns": i.cols,
1807
1820
  "--vuecal-grid-rows": i.rows
1808
- })), V = M(() => {
1809
- const b = w.formatTime(Ee(L.value, D));
1821
+ })), V = T(() => {
1822
+ const b = w.formatTime(Pe(z.value, D));
1810
1823
  return {
1811
- style: { top: L.value + "%" },
1824
+ style: { top: z.value + "%" },
1812
1825
  time: b
1813
1826
  };
1814
1827
  }), o = (b) => {
1815
1828
  var u;
1816
1829
  if (i.isMonth || i.isYear || i.isYears) return;
1817
- const W = (((u = b.touches) == null ? void 0 : u[0]) || b).clientY, { top: X } = _.value.getBoundingClientRect();
1818
- L.value = Be(W - X, _.value);
1830
+ const N = (((u = b.touches) == null ? void 0 : u[0]) || b).clientY, { top: X } = _.value.getBoundingClientRect();
1831
+ z.value = Je(N - X, _.value);
1819
1832
  }, f = () => {
1820
- L.value = null;
1833
+ z.value = null;
1821
1834
  };
1822
- return Ae(() => {
1835
+ return Ze(() => {
1823
1836
  _.value.addEventListener("mousemove", o), _.value.addEventListener("touchmove", o), _.value.addEventListener("mouseleave", f), _.value.addEventListener("touchend", f);
1824
- }), ze(() => {
1837
+ }), Xe(() => {
1825
1838
  _.value && (_.value.removeEventListener("mousemove", o), _.value.removeEventListener("touchmove", o), _.value.removeEventListener("mouseleave", f), _.value.removeEventListener("touchend", f));
1826
- }), (b, W) => (Y(), j("div", {
1839
+ }), (b, N) => (Y(), j("div", {
1827
1840
  class: "vuecal__body",
1828
1841
  ref_key: "bodyEl",
1829
1842
  ref: _,
1830
- style: ke(g.value)
1843
+ style: Te(m.value)
1831
1844
  }, [
1832
- Me(He, { name: "vuecal-shrink" }, {
1833
- default: q(() => [
1834
- C(D).timeAtCursor && L.value !== null ? (Y(), j("div", {
1845
+ Oe(Ge, { name: "vuecal-shrink" }, {
1846
+ default: Z(() => [
1847
+ C(D).timeAtCursor && z.value !== null ? (Y(), j("div", {
1835
1848
  key: 0,
1836
1849
  class: "vuecal__time-at-cursor",
1837
- style: ke(V.value.style)
1850
+ style: Te(V.value.style)
1838
1851
  }, [
1839
- me("label", null, re(V.value.time), 1)
1840
- ], 4)) : Z("", !0)
1852
+ ge("label", null, le(V.value.time), 1)
1853
+ ], 4)) : U("", !0)
1841
1854
  ]),
1842
1855
  _: 1
1843
1856
  }),
1844
- (Y(!0), j(se, null, De(C(i).cellDates, (X, u) => (Y(), be(Xt, {
1857
+ (Y(!0), j(te, null, pe(C(i).cellDates, (X, u) => (Y(), Se(Kt, {
1845
1858
  key: u,
1846
1859
  start: X.start,
1847
1860
  end: X.end,
1848
1861
  index: u
1849
- }, $e({ _: 2 }, [
1862
+ }, je({ _: 2 }, [
1850
1863
  b.$slots.cell ? {
1851
1864
  name: "cell",
1852
- fn: q((d) => [
1853
- F(b.$slots, "cell", ge({ ref_for: !0 }, d))
1865
+ fn: Z((d) => [
1866
+ F(b.$slots, "cell", ye({ ref_for: !0 }, d))
1854
1867
  ]),
1855
1868
  key: "0"
1856
1869
  } : void 0,
1857
1870
  b.$slots["cell-date"] ? {
1858
1871
  name: "cell-date",
1859
- fn: q((d) => [
1860
- F(b.$slots, "cell-date", ge({ ref_for: !0 }, d))
1872
+ fn: Z((d) => [
1873
+ F(b.$slots, "cell-date", ye({ ref_for: !0 }, d))
1861
1874
  ]),
1862
1875
  key: "1"
1863
1876
  } : void 0,
1864
1877
  b.$slots["cell-content"] ? {
1865
1878
  name: "cell-content",
1866
- fn: q((d) => [
1867
- F(b.$slots, "cell-content", ge({ ref_for: !0 }, d))
1879
+ fn: Z((d) => [
1880
+ F(b.$slots, "cell-content", ye({ ref_for: !0 }, d))
1868
1881
  ]),
1869
1882
  key: "2"
1870
1883
  } : void 0,
1871
1884
  b.$slots["cell-events"] ? {
1872
1885
  name: "cell-events",
1873
- fn: q((d) => [
1874
- F(b.$slots, "cell-events", ge({ ref_for: !0 }, d))
1886
+ fn: Z((d) => [
1887
+ F(b.$slots, "cell-events", ye({ ref_for: !0 }, d))
1875
1888
  ]),
1876
1889
  key: "3"
1877
1890
  } : b.$slots.event ? {
1878
1891
  name: "event",
1879
- fn: q((d) => [
1880
- F(b.$slots, "event", ge({ ref_for: !0 }, d))
1892
+ fn: Z((d) => [
1893
+ F(b.$slots, "event", ye({ ref_for: !0 }, d))
1881
1894
  ]),
1882
1895
  key: "4"
1883
1896
  } : b.$slots["event-count"] ? {
1884
1897
  name: "event-count",
1885
- fn: q((d) => [
1886
- F(b.$slots, "event-count", ge({ ref_for: !0 }, d))
1898
+ fn: Z((d) => [
1899
+ F(b.$slots, "event-count", ye({ ref_for: !0 }, d))
1887
1900
  ]),
1888
1901
  key: "5"
1889
1902
  } : void 0
1890
1903
  ]), 1032, ["start", "end", "index"]))), 128))
1891
1904
  ], 4));
1892
1905
  }
1893
- }, Zt = ["data-locale"], qt = { class: "vuecal__scrollable-wrap" }, Jt = {
1906
+ }, xt = ["data-locale"], ea = { class: "vuecal__scrollable-wrap" }, ta = {
1894
1907
  key: 1,
1895
1908
  class: "vuecal__week-numbers"
1896
- }, Ut = { class: "vuecal__week-number" }, Kt = { class: "vuecal__body-wrap" }, xt = {
1909
+ }, aa = { class: "vuecal__week-number" }, sa = { class: "vuecal__body-wrap" }, la = {
1897
1910
  __name: "index",
1898
- props: vt,
1911
+ props: Dt,
1899
1912
  emits: [
1900
1913
  "ready",
1901
1914
  "view-change",
@@ -1909,175 +1922,175 @@ const Ke = (c) => {
1909
1922
  "event-change"
1910
1923
  ],
1911
1924
  setup(c, { expose: s, emit: i }) {
1912
- const D = c, w = i, _ = et("vuecal-el"), L = ct({ props: D, emit: w, attrs: at(), vuecalEl: _, uid: tt() }), { config: g, view: V, dateUtils: o, touch: f } = L, b = M(() => g.time && (V.isDay || V.isDays || V.isWeek)), W = M(() => Array(V.rows).fill().map((e, v) => o.getWeek(o.addDays(V.firstCellDate, 7 * v)))), X = M(() => {
1925
+ const D = c, w = i, _ = rt("vuecal-el"), z = ht({ props: D, emit: w, attrs: ot(), vuecalEl: _, uid: it() }), { config: m, view: V, dateUtils: o, touch: f } = z, b = T(() => m.time && (V.isDay || V.isDays || V.isWeek)), N = T(() => Array(V.rows).fill().map((e, v) => o.getWeek(o.addDays(V.firstCellDate, 7 * v)))), X = T(() => {
1913
1926
  var e;
1914
1927
  return {
1915
- "vuecal--ready": g.ready,
1916
- [`vuecal--${g.theme}-theme`]: g.theme,
1917
- [`vuecal--${g.size}`]: !0,
1918
- "vuecal--date-picker": g.datePicker,
1919
- "vuecal--dark": g.dark,
1920
- "vuecal--light": !g.dark,
1928
+ "vuecal--ready": m.ready,
1929
+ [`vuecal--${m.theme}-theme`]: m.theme,
1930
+ [`vuecal--${m.size}`]: !0,
1931
+ "vuecal--date-picker": m.datePicker,
1932
+ "vuecal--dark": m.dark,
1933
+ "vuecal--light": !m.dark,
1921
1934
  [`vuecal--${V.id}-view`]: !0,
1922
1935
  "vuecal--view-has-time": b.value,
1923
- "vuecal--timeless": !g.time,
1936
+ "vuecal--timeless": !m.time,
1924
1937
  "vuecal--dragging-cell": f.isDraggingCell,
1925
1938
  "vuecal--dragging-event": f.isDraggingEvent,
1926
1939
  "vuecal--resizing-event": f.isResizingEvent,
1927
- "vuecal--has-schedules": (e = g.schedules) == null ? void 0 : e.length
1940
+ "vuecal--has-schedules": (e = m.schedules) == null ? void 0 : e.length
1928
1941
  };
1929
- }), u = M(() => ({
1930
- "--vuecal-time-cell-height": g.timeCellHeight && `${g.timeCellHeight}px`
1931
- })), d = M(() => {
1942
+ }), u = T(() => ({
1943
+ "--vuecal-time-cell-height": m.timeCellHeight && `${m.timeCellHeight}px`
1944
+ })), d = T(() => {
1932
1945
  var e, v;
1933
1946
  return {
1934
- "vuecal__scrollable--row": b.value || g.weekNumbers && V.isMonth,
1947
+ "vuecal__scrollable--row": b.value || m.weekNumbers && V.isMonth,
1935
1948
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
1936
1949
  [`vuecal__scrollable--${V.id}-view`]: !0,
1937
- "vuecal__scrollable--has-schedules": (e = g.schedules) == null ? void 0 : e.length,
1938
- "vuecal__scrollable--no-schedules": !((v = g.schedules) != null && v.length)
1950
+ "vuecal__scrollable--has-schedules": (e = m.schedules) == null ? void 0 : e.length,
1951
+ "vuecal__scrollable--no-schedules": !((v = m.schedules) != null && v.length)
1939
1952
  };
1940
1953
  });
1941
- return Ae(async () => {
1942
- await We(), w("ready", { config: g, view: V });
1943
- }), de(() => g.locale, (e) => g.loadTexts(e)), st("vuecal", L), s({ view: L.view }), (e, v) => (Y(), j("div", {
1944
- class: we(["vuecal", X.value]),
1954
+ return Ze(async () => {
1955
+ await Ue(), w("ready", { config: m, view: V });
1956
+ }), me(() => m.locale, (e) => m.loadTexts(e)), ut("vuecal", z), s({ view: z.view }), (e, v) => (Y(), j("div", {
1957
+ class: ke(["vuecal", X.value]),
1945
1958
  ref: "vuecal-el",
1946
1959
  "data-locale": e.locale,
1947
- style: ke(u.value)
1960
+ style: Te(u.value)
1948
1961
  }, [
1949
1962
  e.$slots.diy ? F(e.$slots, "diy", {
1950
1963
  key: 0,
1951
- vuecal: C(L),
1964
+ vuecal: C(z),
1952
1965
  view: C(V),
1953
- availableViews: C(g).availableViews
1954
- }) : (Y(), j(se, { key: 1 }, [
1955
- Me(wt, null, $e({ _: 2 }, [
1966
+ availableViews: C(m).availableViews
1967
+ }) : (Y(), j(te, { key: 1 }, [
1968
+ Oe($t, null, je({ _: 2 }, [
1956
1969
  e.$slots.header ? {
1957
1970
  name: "header",
1958
- fn: q((y) => [
1959
- F(e.$slots, "header", ne(le(y)))
1971
+ fn: Z((h) => [
1972
+ F(e.$slots, "header", se(ne(h)))
1960
1973
  ]),
1961
1974
  key: "0"
1962
1975
  } : void 0,
1963
1976
  !e.$slots.header && e.$slots["previous-button"] ? {
1964
1977
  name: "previous-button",
1965
- fn: q((y) => [
1966
- F(e.$slots, "previous-button", ne(le(y)))
1978
+ fn: Z((h) => [
1979
+ F(e.$slots, "previous-button", se(ne(h)))
1967
1980
  ]),
1968
1981
  key: "1"
1969
1982
  } : void 0,
1970
1983
  !e.$slots.header && e.$slots["next-button"] ? {
1971
1984
  name: "next-button",
1972
- fn: q((y) => [
1973
- F(e.$slots, "next-button", ne(le(y)))
1985
+ fn: Z((h) => [
1986
+ F(e.$slots, "next-button", se(ne(h)))
1974
1987
  ]),
1975
1988
  key: "2"
1976
1989
  } : void 0,
1977
1990
  !e.$slots.header && e.$slots["today-button"] ? {
1978
1991
  name: "today-button",
1979
- fn: q((y) => [
1980
- F(e.$slots, "today-button", ne(le(y)))
1992
+ fn: Z((h) => [
1993
+ F(e.$slots, "today-button", se(ne(h)))
1981
1994
  ]),
1982
1995
  key: "3"
1983
1996
  } : void 0,
1984
1997
  !e.$slots.header && e.$slots.title ? {
1985
1998
  name: "title",
1986
- fn: q((y) => [
1987
- F(e.$slots, "title", ne(le(y)))
1999
+ fn: Z((h) => [
2000
+ F(e.$slots, "title", se(ne(h)))
1988
2001
  ]),
1989
2002
  key: "4"
1990
2003
  } : void 0,
1991
2004
  !e.$slots.header && e.$slots["schedule-heading"] ? {
1992
2005
  name: "schedule-heading",
1993
- fn: q((y) => [
1994
- F(e.$slots, "schedule-heading", ne(le(y)))
2006
+ fn: Z((h) => [
2007
+ F(e.$slots, "schedule-heading", se(ne(h)))
1995
2008
  ]),
1996
2009
  key: "5"
1997
2010
  } : void 0
1998
2011
  ]), 1024),
1999
- me("div", qt, [
2000
- Me(He, {
2012
+ ge("div", ea, [
2013
+ Oe(Ge, {
2001
2014
  name: `vuecal-slide-fade--${C(V).transitionDirection}`
2002
2015
  }, {
2003
- default: q(() => [
2016
+ default: Z(() => [
2004
2017
  (Y(), j("div", {
2005
- class: we(["vuecal__scrollable", d.value]),
2018
+ class: ke(["vuecal__scrollable", d.value]),
2006
2019
  key: C(V).id + C(V).start.getTime()
2007
2020
  }, [
2008
- b.value ? (Y(), be(St, { key: 0 }, $e({ _: 2 }, [
2021
+ b.value ? (Y(), Se(Ht, { key: 0 }, je({ _: 2 }, [
2009
2022
  e.$slots["time-cell"] ? {
2010
2023
  name: "time-cell",
2011
- fn: q((y) => [
2012
- F(e.$slots, "time-cell", ne(le(y)))
2024
+ fn: Z((h) => [
2025
+ F(e.$slots, "time-cell", se(ne(h)))
2013
2026
  ]),
2014
2027
  key: "0"
2015
2028
  } : void 0
2016
- ]), 1024)) : Z("", !0),
2017
- C(g).weekNumbers && C(V).isMonth ? (Y(), j("div", Jt, [
2018
- (Y(!0), j(se, null, De(W.value, (y) => (Y(), j("div", Ut, [
2029
+ ]), 1024)) : U("", !0),
2030
+ C(m).weekNumbers && C(V).isMonth ? (Y(), j("div", ta, [
2031
+ (Y(!0), j(te, null, pe(N.value, (h) => (Y(), j("div", aa, [
2019
2032
  F(e.$slots, "week-number", {}, () => [
2020
- me("small", null, re(y), 1)
2033
+ ge("small", null, le(h), 1)
2021
2034
  ])
2022
2035
  ]))), 256))
2023
- ])) : Z("", !0),
2024
- me("div", Kt, [
2025
- Me(Et, null, $e({ _: 2 }, [
2036
+ ])) : U("", !0),
2037
+ ge("div", sa, [
2038
+ Oe(jt, null, je({ _: 2 }, [
2026
2039
  e.$slots["weekday-heading"] ? {
2027
2040
  name: "weekday-heading",
2028
- fn: q((y) => [
2029
- F(e.$slots, "weekday-heading", ne(le(y)))
2041
+ fn: Z((h) => [
2042
+ F(e.$slots, "weekday-heading", se(ne(h)))
2030
2043
  ]),
2031
2044
  key: "0"
2032
2045
  } : void 0,
2033
2046
  e.$slots["schedule-heading"] ? {
2034
2047
  name: "schedule-heading",
2035
- fn: q((y) => [
2036
- F(e.$slots, "schedule-heading", ne(le(y)))
2048
+ fn: Z((h) => [
2049
+ F(e.$slots, "schedule-heading", se(ne(h)))
2037
2050
  ]),
2038
2051
  key: "1"
2039
2052
  } : void 0
2040
2053
  ]), 1024),
2041
- Me(Gt, null, $e({ _: 2 }, [
2054
+ Oe(Qt, null, je({ _: 2 }, [
2042
2055
  e.$slots.cell ? {
2043
2056
  name: "cell",
2044
- fn: q((y) => [
2045
- F(e.$slots, "cell", ne(le(y)))
2057
+ fn: Z((h) => [
2058
+ F(e.$slots, "cell", se(ne(h)))
2046
2059
  ]),
2047
2060
  key: "0"
2048
2061
  } : void 0,
2049
2062
  !e.$slots.cell && e.$slots["cell-date"] ? {
2050
2063
  name: "cell-date",
2051
- fn: q((y) => [
2052
- F(e.$slots, "cell-date", ne(le(y)))
2064
+ fn: Z((h) => [
2065
+ F(e.$slots, "cell-date", se(ne(h)))
2053
2066
  ]),
2054
2067
  key: "1"
2055
2068
  } : void 0,
2056
2069
  !e.$slots.cell && e.$slots["cell-content"] ? {
2057
2070
  name: "cell-content",
2058
- fn: q((y) => [
2059
- F(e.$slots, "cell-content", ne(le(y)))
2071
+ fn: Z((h) => [
2072
+ F(e.$slots, "cell-content", se(ne(h)))
2060
2073
  ]),
2061
2074
  key: "2"
2062
2075
  } : void 0,
2063
2076
  !e.$slots.cell && e.$slots["cell-events"] ? {
2064
2077
  name: "cell-events",
2065
- fn: q((y) => [
2066
- F(e.$slots, "cell-events", ne(le(y)))
2078
+ fn: Z((h) => [
2079
+ F(e.$slots, "cell-events", se(ne(h)))
2067
2080
  ]),
2068
2081
  key: "3"
2069
2082
  } : void 0,
2070
2083
  !e.$slots.cell && e.$slots.event ? {
2071
2084
  name: "event",
2072
- fn: q((y) => [
2073
- F(e.$slots, "event", ne(le(y)))
2085
+ fn: Z((h) => [
2086
+ F(e.$slots, "event", se(ne(h)))
2074
2087
  ]),
2075
2088
  key: "4"
2076
2089
  } : void 0,
2077
2090
  !e.$slots.cell && e.$slots["event-count"] ? {
2078
2091
  name: "event-count",
2079
- fn: q((y) => [
2080
- F(e.$slots, "event-count", ne(le(y)))
2092
+ fn: Z((h) => [
2093
+ F(e.$slots, "event-count", se(ne(h)))
2081
2094
  ]),
2082
2095
  key: "5"
2083
2096
  } : void 0
@@ -2089,63 +2102,63 @@ const Ke = (c) => {
2089
2102
  }, 8, ["name"])
2090
2103
  ])
2091
2104
  ], 64))
2092
- ], 14, Zt));
2105
+ ], 14, xt));
2093
2106
  }
2094
- }, ea = (c) => {
2095
- Ye.texts = { ...ve.texts, ...c }, Ye.dateUtils.updateTexts(Ye.texts);
2107
+ }, ra = (c) => {
2108
+ Fe.texts = { ...fe.texts, ...c }, Fe.dateUtils.updateTexts(Fe.texts);
2096
2109
  }, {
2097
- addDatePrototypes: ta,
2098
- removeDatePrototypes: aa,
2099
- updateTexts: sa,
2100
- addDays: na,
2101
- subtractDays: la,
2102
- addHours: ra,
2103
- subtractHours: ia,
2104
- addMinutes: oa,
2105
- subtractMinutes: ua,
2106
- getWeek: ca,
2107
- isToday: da,
2108
- isSameDate: va,
2109
- isInRange: ma,
2110
- isLeapYear: fa,
2111
- getPreviousFirstDayOfWeek: ga,
2112
- stringToDate: ha,
2113
- dateToMinutes: ya,
2114
- countDays: Da,
2115
- datesInSameTimeStep: wa,
2116
- isValid: pa,
2117
- formatDate: ka,
2118
- formatDateLite: _a,
2119
- formatTime: ba,
2120
- formatTimeLite: Ta,
2121
- formatMinutes: Ma
2122
- } = Ye.dateUtils;
2110
+ addDatePrototypes: ia,
2111
+ removeDatePrototypes: oa,
2112
+ updateTexts: ua,
2113
+ addDays: ca,
2114
+ subtractDays: da,
2115
+ addHours: va,
2116
+ subtractHours: ma,
2117
+ addMinutes: fa,
2118
+ subtractMinutes: ga,
2119
+ getWeek: ha,
2120
+ isToday: ya,
2121
+ isSameDate: Da,
2122
+ isInRange: wa,
2123
+ isLeapYear: pa,
2124
+ getPreviousFirstDayOfWeek: ka,
2125
+ stringToDate: _a,
2126
+ dateToMinutes: ba,
2127
+ countDays: Ta,
2128
+ datesInSameTimeStep: $a,
2129
+ isValid: Ma,
2130
+ formatDate: Ea,
2131
+ formatDateLite: Ya,
2132
+ formatTime: Sa,
2133
+ formatTimeLite: Ca,
2134
+ formatMinutes: Va
2135
+ } = Fe.dateUtils;
2123
2136
  export {
2124
- xt as VueCal,
2125
- ta as addDatePrototypes,
2126
- na as addDays,
2127
- ra as addHours,
2128
- oa as addMinutes,
2129
- Da as countDays,
2130
- ya as dateToMinutes,
2131
- wa as datesInSameTimeStep,
2132
- ka as formatDate,
2133
- _a as formatDateLite,
2134
- Ma as formatMinutes,
2135
- ba as formatTime,
2136
- Ta as formatTimeLite,
2137
- ga as getPreviousFirstDayOfWeek,
2138
- ca as getWeek,
2139
- ma as isInRange,
2140
- fa as isLeapYear,
2141
- va as isSameDate,
2142
- da as isToday,
2143
- pa as isValidDate,
2144
- aa as removeDatePrototypes,
2145
- ha as stringToDate,
2146
- la as subtractDays,
2147
- ia as subtractHours,
2148
- ua as subtractMinutes,
2149
- sa as updateTexts,
2150
- ea as useLocale
2137
+ la as VueCal,
2138
+ ia as addDatePrototypes,
2139
+ ca as addDays,
2140
+ va as addHours,
2141
+ fa as addMinutes,
2142
+ Ta as countDays,
2143
+ ba as dateToMinutes,
2144
+ $a as datesInSameTimeStep,
2145
+ Ea as formatDate,
2146
+ Ya as formatDateLite,
2147
+ Va as formatMinutes,
2148
+ Sa as formatTime,
2149
+ Ca as formatTimeLite,
2150
+ ka as getPreviousFirstDayOfWeek,
2151
+ ha as getWeek,
2152
+ wa as isInRange,
2153
+ pa as isLeapYear,
2154
+ Da as isSameDate,
2155
+ ya as isToday,
2156
+ Ma as isValidDate,
2157
+ oa as removeDatePrototypes,
2158
+ _a as stringToDate,
2159
+ da as subtractDays,
2160
+ ma as subtractHours,
2161
+ ga as subtractMinutes,
2162
+ ua as updateTexts,
2163
+ ra as useLocale
2151
2164
  };