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

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.5
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
+ }), G = 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
- defaultView: X,
123
- availableViews: W,
122
+ defaultView: G,
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,117 +139,117 @@ 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
- return X(this, a || 0);
252
+ return G(this, a || 0);
253
253
  }, Date.prototype.subtractHours = function(a) {
254
254
  return u(this, a || 0);
255
255
  }, Date.prototype.addMinutes = 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;
278
- }, X = (a, p) => {
279
- const m = new Date(a.valueOf());
280
- return m.setHours(m.getHours() + 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
+ }, G = (a, p) => {
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 = (q) => {
292
+ const J = q % p;
293
+ return J !== 0 && (q += J >= p / 2 ? p - J : -J), q;
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());
298
- G >= 60 && (a.setHours(a.getHours() + 1), G = 0), a.setMinutes(G, 0, 0);
297
+ let q = y(a.getMinutes());
298
+ q >= 60 && (a.setHours(a.getHours() + 1), q = 0), a.setMinutes(q, 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())), q = y.getUTCDay() || 7;
302
+ y.setUTCDate(y.getUTCDate() + 4 - q);
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(), q = p ? 7 : 6;
316
+ return y.setDate(y.getDate() - (y.getDay() + q) % 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
- 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
324
+ const q = {
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 = q[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;
358
- if (G) {
359
- const [T, S, $] = [a.getHours(), a.getMinutes(), a.getSeconds()];
360
- T + S + $ === 141 && (U = !0);
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, q = !1) => {
357
+ let J = !1;
358
+ if (q) {
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,32 +384,32 @@ 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(), q = 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
- M: G,
397
+ M: q,
398
398
  // 1 to 12.
399
- MM: () => G.toString().padStart(2, 0),
399
+ MM: () => q.toString().padStart(2, 0),
400
400
  // 01 to 12.
401
- MMM: () => p.months[G - 1].substring(0, 3),
401
+ MMM: () => p.months[q - 1].substring(0, 3),
402
402
  // Jan to Dec.
403
- MMMM: () => p.months[G - 1],
403
+ MMMM: () => p.months[q - 1],
404
404
  // January to December.
405
- MMMMG: () => (p.monthsGenitive || p.months)[G - 1],
405
+ MMMMG: () => (p.monthsGenitive || p.months)[q - 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, q, J;
428
+ a instanceof Date ? (y = a.getHours(), q = a.getMinutes(), J = a.getSeconds()) : (y = Math.floor(a / 60), q = 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
- m: G,
438
- mm: G.toString().padStart(2, 0),
439
- s: U
437
+ m: q,
438
+ mm: q.toString().padStart(2, 0),
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,
448
- addHours: X,
447
+ subtractDays: N,
448
+ addHours: G,
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;
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;
583
+ !E.has((B = l._) == null ? void 0 : B.id) && (h === null || h === l.schedule) && G(l, d, e) && L.push(l);
584
+ return L;
585
+ }, G = (u, d, e) => {
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
- isEventInRange: X
598
+ isEventInRange: G
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 G = 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 : G.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 X = 0; X < l.value + R; X++)
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, X), 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(), X, 1, 0, 0, 0, 0),
663
+ end: new Date(n.value.getFullYear(), X + 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() + X, 0, 1, 0, 0, 0, 0),
669
+ end: new Date(n.value.getFullYear() + X + 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 X = H[g];
684
+ return R && typeof X == "string" ? X.substring(0, 3) : X;
685
+ }
686
+ function oe(g, H, R) {
687
+ const { monthsArray: X, 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, X, _e)} ${Le}, ${Ee} - ${K(Ye, X, _e)} ${ze}, ${He}` : `${Le} ${K(Me, X, _e)} ${Ee} - ${ze} ${K(Ye, X, _e)} ${He}` : Be ? ve ? `${K(Me, X, _e)} ${Le} - ${K(Ye, X, _e)} ${ze}, ${Ee}` : `${Le} ${K(Me, X, _e)} - ${ze} ${K(Ye, X, _e)} ${Ee}` : ve ? `${K(Me, X, _e)} ${Le}-${ze}, ${Ee}` : `${Le}-${ze} ${K(Me, X, _e)} ${Ee}`;
689
+ }
690
+ const ae = T(() => {
691
+ const { dateFormat: g, months: H, monthsGenitive: R, week: X, 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>${X} ${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(G.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,115 +740,116 @@ const Ke = (c) => {
727
740
  break;
728
741
  }
729
742
  i("view-change", {
730
- id: g.value,
731
- title: Q.value,
732
- start: X.value,
743
+ id: m.value,
744
+ title: ae.value,
745
+ start: G.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 q() {
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 [X, ve] = [n.value, t.value];
810
+ m.value === "month" && ([X, ve] = [G.value, u.value]), (!s.isInRange(g, X, ve) || R) && (g.setHours(0, 0, 0, 0), O.value = g.getTime() < X.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: X } = s;
815
+ (!V.value || !R(V.value) || !X(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
+ var X;
830
+ const H = (X = _.value) == null ? void 0 : X.querySelector(".vuecal__scrollable"), R = g ? g * c.timeCellHeight / c.timeStep : 0;
831
+ H == null || H.scrollTo({ top: R, behavior: "smooth" });
818
832
  }
819
- function S() {
820
- const h = /* @__PURE__ */ new Date();
821
- T(h.getHours() * 60 + h.getMinutes());
833
+ function W() {
834
+ const g = /* @__PURE__ */ new Date();
835
+ M(g.getHours() * 60 + g.getMinutes());
822
836
  }
823
- function $() {
824
- T(0);
837
+ function A() {
838
+ M(0);
825
839
  }
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, () => {
840
+ const ee = T(() => w.getViewEvents(k.value)), de = w.createEvent, he = w.deleteEvent;
841
+ 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
842
  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)), {
843
+ }), me(() => c.watchRealTime, (g) => {
844
+ g && c.time ? E() : N = clearTimeout(N);
845
+ }), re(), c.time && c.watchRealTime && E(), Xe(() => N = clearTimeout(N)), {
832
846
  now: o,
833
- id: g,
834
- broaderView: z,
835
- narrowerView: R,
836
- title: Q,
847
+ id: m,
848
+ broaderView: P,
849
+ narrowerView: I,
850
+ title: ae,
837
851
  viewDate: f,
838
- start: X,
852
+ start: G,
839
853
  end: u,
840
854
  extendedStart: d,
841
855
  // Full range, including out of scope month days, and hidden leading/trailing days.
@@ -846,63 +860,63 @@ const Ke = (c) => {
846
860
  containsToday: v,
847
861
  selectedDate: V,
848
862
  cellDates: k,
849
- cols: H,
863
+ cols: L,
850
864
  rows: B,
851
865
  // All the events are stored and indexed in the events object of the eventsManager.
852
866
  // The following events array is only a subset of visible ones, plus any potential recurring
853
867
  // and multi-day events.
854
- events: A,
868
+ events: ee,
855
869
  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,
870
+ switch: x,
871
+ broader: Q,
872
+ narrower: ue,
873
+ previous: a,
874
+ next: p,
875
+ navigate: y,
876
+ goToToday: q,
877
+ updateViewDate: J,
878
+ updateSelectedDate: ce,
879
+ scrollToCurrentTime: W,
880
+ scrollToTime: M,
881
+ scrollTop: A,
882
+ createEvent: de,
883
+ deleteEvent: he,
870
884
  // Getters.
871
885
  get isDay() {
872
- return g.value === "day";
886
+ return m.value === "day";
873
887
  },
874
888
  get isDays() {
875
- return g.value === "days";
889
+ return m.value === "days";
876
890
  },
877
891
  get isWeek() {
878
- return g.value === "week";
892
+ return m.value === "week";
879
893
  },
880
894
  get isMonth() {
881
- return g.value === "month";
895
+ return m.value === "month";
882
896
  },
883
897
  get isYear() {
884
- return g.value === "year";
898
+ return m.value === "year";
885
899
  },
886
900
  get isYears() {
887
- return g.value === "years";
901
+ return m.value === "years";
888
902
  }
889
903
  };
890
- }, Ye = _e({
891
- texts: { ...ve.texts },
904
+ }, Fe = $e({
905
+ texts: { ...fe.texts },
892
906
  // Make texts reactive before a locale is loaded.
893
- dateUtils: Ke(ve.texts)
907
+ dateUtils: st(fe.texts)
894
908
  // Some Date utils functions need localized texts.
895
- }), ct = ({ props: c, emit: s, attrs: i, vuecalEl: D, uid: w }) => {
896
- const _ = _e({
909
+ }), ht = ({ props: c, emit: s, attrs: i, vuecalEl: D, uid: w }) => {
910
+ const _ = $e({
897
911
  uid: w,
898
912
  // The Vuecal instance unique ID, used for dnd source-target identification.
899
913
  emit: s,
900
- texts: { ...Ye.texts },
914
+ texts: { ...Fe.texts },
901
915
  // Make texts reactive before a locale is loaded.
902
916
  // The date utils composable.
903
917
  // A class/composable is needed in order to access the user locale in all the methods, and
904
918
  // independently of other potential Vue Cal instances on the same page.
905
- dateUtils: { ...Ye.dateUtils },
919
+ dateUtils: { ...Fe.dateUtils },
906
920
  now: /* @__PURE__ */ new Date(),
907
921
  config: {},
908
922
  eventsManager: {},
@@ -917,8 +931,8 @@ const Ke = (c) => {
917
931
  isResizingEvent: !1
918
932
  }
919
933
  });
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 = {
934
+ return _.dateUtils = st(Object.assign(fe.texts, _.texts)), _.config = vt(_, c, i), _.eventsManager = ft(_), _.view = gt(_, D), _.dnd = mt(_), _;
935
+ }, yt = 24 * 60, Dt = {
922
936
  allDayEvents: { type: [Boolean, String], default: !1 },
923
937
  // Coming soon.
924
938
  // avoidEventOverlap: { type: Boolean, default: undefined }, // Coming soon.
@@ -982,7 +996,7 @@ const Ke = (c) => {
982
996
  // Start time of the time column, in minutes.
983
997
  timeStep: { type: Number, default: 60 },
984
998
  // Step amount for the time in the time column, in minutes.
985
- timeTo: { type: Number, default: dt },
999
+ timeTo: { type: Number, default: yt },
986
1000
  // End time of the time column, in minutes.
987
1001
  titleBar: { type: Boolean, default: !0 },
988
1002
  // Show or hide the header title bar.
@@ -1014,61 +1028,61 @@ const Ke = (c) => {
1014
1028
  // minScheduleWidth: { type: Number, default: 0 },
1015
1029
  // overlapsPerTimeStep: { type: Boolean, default: false },
1016
1030
  // resizeX: { type: Boolean, default: false },
1017
- }, mt = { class: "vuecal__header" }, ft = {
1031
+ }, wt = { class: "vuecal__header" }, pt = {
1018
1032
  key: 0,
1019
1033
  class: "vuecal__views-bar"
1020
- }, gt = ["onClick", "innerHTML"], ht = {
1034
+ }, kt = ["onClick", "innerHTML"], _t = {
1021
1035
  key: 1,
1022
1036
  class: "vuecal__title-bar"
1023
- }, yt = { class: "vuecal__transition-wrap" }, Dt = ["disabled", "innerHTML"], wt = {
1037
+ }, bt = { class: "vuecal__transition-wrap" }, Tt = ["disabled", "innerHTML"], $t = {
1024
1038
  __name: "header",
1025
1039
  setup(c) {
1026
- const s = Se("vuecal"), { view: i, config: D } = s, w = () => {
1040
+ const s = Ne("vuecal"), { view: i, config: D } = s, w = () => {
1027
1041
  D.clickToNavigate && i.broader();
1028
- }, _ = M(() => D.clickToNavigate ? { click: w } : {});
1029
- return (L, g) => (Y(), j("div", mt, [
1030
- F(L.$slots, "header", {
1042
+ }, _ = T(() => D.clickToNavigate ? { click: w } : {});
1043
+ return (z, m) => (Y(), j("div", wt, [
1044
+ F(z.$slots, "header", {
1031
1045
  view: C(i),
1032
1046
  availableViews: C(D).availableViews,
1033
1047
  vuecal: C(s)
1034
1048
  }),
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 }]),
1049
+ z.$slots.header ? U("", !0) : (Y(), j(te, { key: 0 }, [
1050
+ C(D).viewsBar ? (Y(), j("div", pt, [
1051
+ (Y(!0), j(te, null, pe(C(D).availableViews, (V, o) => (Y(), j("button", {
1052
+ class: ke(["vuecal__view-button", { "vuecal__view-button--active": C(i).id === o }]),
1039
1053
  onClick: (f) => C(i).switch(o),
1040
1054
  innerHTML: C(s).texts[o],
1041
1055
  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)),
1056
+ }, null, 10, kt))), 256))
1057
+ ])) : U("", !0),
1058
+ C(D).titleBar ? (Y(), j("nav", _t, [
1059
+ ge("button", {
1060
+ class: ke(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !z.$slots["previous-button"] }]),
1061
+ onClick: m[0] || (m[0] = (...V) => C(i).previous && C(i).previous(...V)),
1048
1062
  type: "button"
1049
1063
  }, [
1050
- F(L.$slots, "previous-button")
1064
+ F(z.$slots, "previous-button")
1051
1065
  ], 2),
1052
- me("div", yt, [
1053
- Me(He, {
1066
+ ge("div", bt, [
1067
+ Oe(Ge, {
1054
1068
  name: `vuecal-slide-fade--${C(i).transitionDirection}`
1055
1069
  }, {
1056
- default: q(() => [
1070
+ default: Z(() => [
1057
1071
  (Y(), j("div", {
1058
1072
  key: C(i).id + C(i).start.getTime()
1059
1073
  }, [
1060
- L.$slots.title ? (Y(), be(Xe(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ge({
1074
+ z.$slots.title ? (Y(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1061
1075
  key: 0,
1062
1076
  class: "vuecal__title"
1063
- }, je(_.value)), {
1064
- default: q(() => [
1065
- F(L.$slots, "title", ne(le(C(i))))
1077
+ }, Ie(_.value)), {
1078
+ default: Z(() => [
1079
+ F(z.$slots, "title", se(ne(C(i))))
1066
1080
  ]),
1067
1081
  _: 3
1068
- }, 16)) : (Y(), be(Xe(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ge({
1082
+ }, 16)) : (Y(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
1069
1083
  key: 1,
1070
1084
  class: "vuecal__title"
1071
- }, je(_.value), {
1085
+ }, Ie(_.value), {
1072
1086
  innerHTML: C(i).title
1073
1087
  }), null, 16, ["innerHTML"]))
1074
1088
  ]))
@@ -1076,48 +1090,48 @@ const Ke = (c) => {
1076
1090
  _: 3
1077
1091
  }, 8, ["name"])
1078
1092
  ]),
1079
- C(D).todayButton ? (Y(), j(se, { key: 0 }, [
1080
- L.$slots["today-button"] ? F(L.$slots, "today-button", {
1093
+ C(D).todayButton ? (Y(), j(te, { key: 0 }, [
1094
+ z.$slots["today-button"] ? F(z.$slots, "today-button", {
1081
1095
  key: 0,
1082
1096
  navigate: () => !C(i).containsToday && C(i).goToToday(),
1083
1097
  active: C(i).containsToday
1084
1098
  }) : (Y(), j("button", {
1085
1099
  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()),
1100
+ class: ke(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": C(i).containsToday }]),
1101
+ onClick: m[1] || (m[1] = (V) => !C(i).containsToday && C(i).goToToday()),
1088
1102
  disabled: !!C(i).containsToday,
1089
1103
  type: "button",
1090
1104
  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)),
1105
+ }, null, 10, Tt))
1106
+ ], 64)) : U("", !0),
1107
+ ge("button", {
1108
+ class: ke(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !z.$slots["next-button"] }]),
1109
+ onClick: m[2] || (m[2] = (...V) => C(i).next && C(i).next(...V)),
1096
1110
  type: "button"
1097
1111
  }, [
1098
- F(L.$slots, "next-button")
1112
+ F(z.$slots, "next-button")
1099
1113
  ], 2)
1100
- ])) : Z("", !0)
1114
+ ])) : U("", !0)
1101
1115
  ], 64))
1102
1116
  ]));
1103
1117
  }
1104
- }, pt = {
1118
+ }, Mt = {
1105
1119
  key: 0,
1106
1120
  class: "vuecal__headings"
1107
- }, kt = {
1121
+ }, Et = {
1108
1122
  key: 0,
1109
1123
  class: "vuecal__weekdays-headings"
1110
- }, _t = ["onClick"], bt = { class: "vuecal__weekday-day" }, Tt = {
1124
+ }, Yt = ["onClick"], St = { class: "vuecal__weekday-day" }, Ct = {
1111
1125
  key: 0,
1112
1126
  class: "vuecal__weekday-date"
1113
- }, Mt = {
1127
+ }, Vt = {
1114
1128
  key: 1,
1115
1129
  class: "vuecal__schedules-headings w-flex grow"
1116
- }, $t = ["innerHTML"], Et = {
1130
+ }, Ot = ["innerHTML"], jt = {
1117
1131
  __name: "headings-bar",
1118
1132
  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()],
1133
+ 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 }) => ({
1134
+ id: Re[o.getDay()],
1121
1135
  date: o,
1122
1136
  dateNumber: o.getDate(),
1123
1137
  day: w.formatDate(o, "dddd"),
@@ -1129,53 +1143,53 @@ const Ke = (c) => {
1129
1143
  (i.isDays || i.isWeek) && i.updateSelectedDate(o);
1130
1144
  }
1131
1145
  };
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,
1137
- onClick: (X) => V.click(b.date)
1146
+ return (o, f) => z.value ? (Y(), j("div", Mt, [
1147
+ C(i).isDay ? U("", !0) : (Y(), j("div", Et, [
1148
+ (Y(!0), j(te, null, pe(m.value, (b, N) => (Y(), j("div", {
1149
+ class: ke(["vuecal__weekday", { "vuecal__weekday--today": b.isToday }]),
1150
+ key: N,
1151
+ onClick: (G) => V.click(b.date)
1138
1152
  }, [
1139
1153
  F(o.$slots, "weekday-heading", {
1140
1154
  label: b[_.value],
1141
1155
  id: b.id,
1142
1156
  date: b.date
1143
1157
  }, () => [
1144
- me("span", bt, re(b[_.value]), 1),
1145
- C(i).isMonth ? Z("", !0) : (Y(), j("strong", Tt, re(b.dateNumber), 1))
1158
+ ge("span", St, le(b[_.value]), 1),
1159
+ C(i).isMonth ? U("", !0) : (Y(), j("strong", Ct, le(b.dateNumber), 1))
1146
1160
  ])
1147
- ], 10, _t))), 128))
1161
+ ], 10, Yt))), 128))
1148
1162
  ])),
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 }, [
1163
+ C(D).schedules ? (Y(), j("div", Vt, [
1164
+ (Y(!0), j(te, null, pe(m.value, (b, N) => (Y(), j(te, { key: N }, [
1165
+ (Y(!0), j(te, null, pe(C(D).schedules, (G, u) => (Y(), j(te, { key: u }, [
1152
1166
  o.$slots["schedule-heading"] ? (Y(), j("div", {
1153
1167
  key: 0,
1154
- class: we(["vuecal__schedule vuecal__schedule--heading", X.class])
1168
+ class: ke(["vuecal__schedule vuecal__schedule--heading", G.class])
1155
1169
  }, [
1156
1170
  F(o.$slots, "schedule-heading", {
1157
- schedule: X,
1171
+ schedule: G,
1158
1172
  view: C(i)
1159
1173
  })
1160
1174
  ], 2)) : (Y(), j("div", {
1161
1175
  key: 1,
1162
- class: we(["vuecal__schedule vuecal__schedule--heading", X.class]),
1163
- innerHTML: X.label
1164
- }, null, 10, $t))
1176
+ class: ke(["vuecal__schedule vuecal__schedule--heading", G.class]),
1177
+ innerHTML: G.label
1178
+ }, null, 10, Ot))
1165
1179
  ], 64))), 128))
1166
1180
  ], 64))), 128))
1167
- ])) : Z("", !0)
1168
- ])) : Z("", !0);
1181
+ ])) : U("", !0)
1182
+ ])) : U("", !0);
1169
1183
  }
1170
- }, Yt = { class: "vuecal__time-column" }, St = {
1184
+ }, Pt = { class: "vuecal__time-column" }, Ht = {
1171
1185
  __name: "time-column",
1172
1186
  setup(c) {
1173
- const s = Se("vuecal"), { config: i, texts: D } = s, w = M(() => {
1187
+ const s = Ne("vuecal"), { config: i, texts: D } = s, w = T(() => {
1174
1188
  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"];
1189
+ for (let m = i.timeFrom; m < i.timeTo; m += i.timeStep) {
1190
+ const V = ~~(m / 60), o = m % 60, f = D[m < 720 ? "am" : "pm"];
1177
1191
  _.push({
1178
- minutesSum: g,
1192
+ minutesSum: m,
1179
1193
  // The sum of hours + minutes in minutes.
1180
1194
  hours: V,
1181
1195
  minutes: o,
@@ -1185,35 +1199,35 @@ const Ke = (c) => {
1185
1199
  }
1186
1200
  return _;
1187
1201
  });
1188
- return (_, L) => (Y(), j("div", Yt, [
1189
- (Y(!0), j(se, null, De(w.value, (g, V) => (Y(), j("div", {
1202
+ return (_, z) => (Y(), j("div", Pt, [
1203
+ (Y(!0), j(te, null, pe(w.value, (m, V) => (Y(), j("div", {
1190
1204
  class: "vuecal__time-cell",
1191
1205
  key: V
1192
1206
  }, [
1193
1207
  F(_.$slots, "time-cell", {
1194
1208
  index: V,
1195
- minutes: g.minutes,
1196
- hours: g.hours,
1197
- minutesSum: g.minutesSum,
1198
- format12: g.formatted12,
1199
- format24: g.formatted24
1209
+ minutes: m.minutes,
1210
+ hours: m.hours,
1211
+ minutesSum: m.minutesSum,
1212
+ format12: m.formatted12,
1213
+ format24: m.formatted24
1200
1214
  }, () => [
1201
- me("label", null, re(C(i).twelveHour ? g.formatted12 : g.formatted24), 1)
1215
+ ge("label", null, le(C(i).twelveHour ? m.formatted12 : m.formatted24), 1)
1202
1216
  ])
1203
1217
  ]))), 128))
1204
1218
  ]));
1205
1219
  }
1206
- }, Ct = ["draggable"], Vt = { class: "vuecal__event-details" }, Ot = { class: "vuecal__event-title" }, jt = {
1220
+ }, Lt = ["draggable"], zt = { class: "vuecal__event-details" }, Ft = { class: "vuecal__event-title" }, Nt = {
1207
1221
  key: 0,
1208
1222
  class: "vuecal__event-time"
1209
- }, Pt = ["innerHTML"], Ue = {
1223
+ }, Wt = ["innerHTML"], at = {
1210
1224
  __name: "event",
1211
1225
  props: {
1212
1226
  event: { type: Object, required: !0 }
1213
1227
  },
1214
1228
  emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
1215
1229
  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({
1230
+ const { config: i, view: D, dnd: w, touch: _, dateUtils: z } = Ne("vuecal"), m = c, V = ie(null), o = $e(m.event), f = $e({
1217
1231
  dragging: !1,
1218
1232
  resizing: !1,
1219
1233
  fromResizer: !1,
@@ -1247,9 +1261,9 @@ const Ke = (c) => {
1247
1261
  cellEl: null,
1248
1262
  // Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
1249
1263
  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(() => {
1264
+ }), b = T(() => i.editableEvents.drag && o.draggable !== !1 && !o.background), N = T(() => i.time && i.editableEvents.resize && o.resizable !== !1 && !o.background);
1265
+ T(() => i.editableEvents.delete && o.deletable !== !1 && !o.background);
1266
+ const G = T(() => {
1253
1267
  var l, n, k;
1254
1268
  return {
1255
1269
  [`vuecal__event--${o._.id}`]: !0,
@@ -1270,7 +1284,7 @@ const Ke = (c) => {
1270
1284
  "vuecal__event--dragging-ghost": o._.draggingGhost,
1271
1285
  "vuecal__event--resizing": f.resizing
1272
1286
  };
1273
- }), u = M(() => {
1287
+ }), u = T(() => {
1274
1288
  const l = (D.isDay || D.isDays || D.isWeek) && i.time;
1275
1289
  if (!l && !o.backgroundColor && !o.color) return !1;
1276
1290
  const n = {
@@ -1278,21 +1292,21 @@ const Ke = (c) => {
1278
1292
  color: o.color || null
1279
1293
  };
1280
1294
  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}%`;
1295
+ const k = Math.max(i.timeFrom, o._.startMinutes), t = Math.min(i.timeTo, o._.endMinutes), O = Ve(k, i), P = Ve(t, i) - O;
1296
+ n.top = `${O}%`, n.height = `${P}%`;
1283
1297
  }
1284
1298
  return n;
1285
- }), d = M(() => {
1299
+ }), d = T(() => {
1286
1300
  const l = { ...i.eventListeners.event };
1287
1301
  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);
1302
+ ["resize-end"].includes(t) || (l[t] = (P) => {
1303
+ P.type !== "drop" && O(P.type ? { e: P, event: o } : P);
1290
1304
  });
1291
1305
  });
1292
1306
  const n = { ...l };
1293
1307
  l.touchstart = (t) => {
1294
1308
  var O;
1295
- t.stopPropagation(), (O = n.touchstart) == null || O.call(n, { e: t, event: o });
1309
+ t.stopPropagation(), e(t), (O = n.touchstart) == null || O.call(n, { e: t, event: o });
1296
1310
  }, l.mousedown = (t) => {
1297
1311
  var O;
1298
1312
  t.stopPropagation(), e(t), (O = n.mousedown) == null || O.call(n, { e: t, event: o });
@@ -1301,132 +1315,132 @@ const Ke = (c) => {
1301
1315
  return l.click = (t) => {
1302
1316
  var O;
1303
1317
  (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 });
1318
+ var P;
1319
+ k = null, (P = n["delayed-click"]) == null || P.call(n, { e: t, event: o });
1306
1320
  }, 400);
1307
1321
  }, l.dblclick = (t) => {
1308
1322
  n.dblclick ? n.dblclick({ e: t, event: o }) : o.delete(1);
1309
1323
  }, l;
1310
1324
  }), e = (l) => {
1311
- var t, O, z;
1325
+ var t, O, P;
1312
1326
  const n = ((t = l.touches) == null ? void 0 : t[0]) || l;
1313
1327
  f.fromResizer = n.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
1314
1328
  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 });
1329
+ 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(() => {
1330
+ var I, K;
1331
+ f.holding = !0, (K = (I = d.value).hold) == null || K.call(I, { e: l, event: o });
1318
1332
  }, 1e3);
1319
1333
  }, v = async (l) => {
1320
- var k, t, O, z;
1334
+ var k, t, O, P;
1321
1335
  const n = ((k = l.touches) == null ? void 0 : k[0]) || l;
1322
1336
  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;
1337
+ const { top: I, left: K, width: oe, height: ae } = f.cellEl.getBoundingClientRect();
1338
+ f.moveX = n.clientX - K, f.moveY = n.clientY - I, f.movePercentageX = f.moveX * 100 / oe, f.movePercentageY = f.moveY * 100 / ae;
1325
1339
  }
1326
1340
  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({
1341
+ const { newStart: I, newEnd: K } = E(o);
1342
+ let oe = !0;
1343
+ const { resize: ae } = (P = i.eventListeners) == null ? void 0 : P.event;
1344
+ ae && (oe = await ae({
1331
1345
  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._ } });
1346
+ event: { ...o, start: I, end: K },
1347
+ overlaps: o.getOverlappingEvents({ start: I, end: K })
1348
+ })), oe !== !1 ? (o.start = I, o.end = K, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ae && (f.resizingLastAcceptedEvent = { ...o, _: { ...o._ } });
1335
1349
  }
1336
- }, y = async (l) => {
1350
+ }, h = async (l) => {
1337
1351
  var n, k;
1338
1352
  if (f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.resizing) {
1339
1353
  const { newStart: t, newEnd: O } = E(o);
1340
- let z = !0;
1341
- const R = d.value["resize-end"];
1342
- R && (z = await R({
1354
+ let P = !0;
1355
+ const I = d.value["resize-end"];
1356
+ I && (P = await I({
1343
1357
  e: l,
1344
1358
  event: o,
1345
1359
  original: f.resizingOriginalEvent,
1346
1360
  // Original event details before resizing.
1347
1361
  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;
1362
+ })), 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
1363
  }
1350
1364
  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
1365
  }, E = (l) => {
1352
1366
  const n = new Date(l.start.getFullYear(), l.start.getMonth(), l.start.getDate());
1353
1367
  new Date(n).setDate(n.getDate() + 1);
1354
- let t = Ee(f.movePercentageY, i);
1368
+ let t = Pe(f.movePercentageY, i);
1355
1369
  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;
1370
+ const I = t + i.snapToInterval / 2;
1371
+ t = I - I % i.snapToInterval;
1358
1372
  }
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 };
1373
+ let O = l.start, P = new Date(n.getTime() + t * 6e4);
1374
+ return P < f.resizeStartDate && (O = P, P = f.resizeStartDate), { newStart: O, newEnd: P };
1361
1375
  };
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 });
1376
+ Ze(() => o._.register(V.value));
1377
+ const L = [], B = (l, n, k) => {
1378
+ document.addEventListener(l, n, k), L.push({ event: l, handler: n, options: k });
1365
1379
  };
1366
- return ze(() => {
1367
- o._.unregister(), H.forEach(({ event: l, handler: n, options: k }) => {
1380
+ return Xe(() => {
1381
+ o._.unregister(), L.forEach(({ event: l, handler: n, options: k }) => {
1368
1382
  document.removeEventListener(l, n, k);
1369
1383
  });
1370
- }), (l, n) => (Y(), j("div", ge({ class: "vuecal__event" }, je(d.value, !0), {
1384
+ }), (l, n) => (Y(), j("div", ye({ class: "vuecal__event" }, Ie(d.value, !0), {
1371
1385
  ref_key: "eventEl",
1372
1386
  ref: V,
1373
- class: X.value,
1387
+ class: G.value,
1374
1388
  style: u.value,
1375
1389
  draggable: b.value ? "true" : void 0,
1376
1390
  onDragstart: n[2] || (n[2] = (k) => b.value && C(w).eventDragStart(k, o)),
1377
1391
  onDragend: n[3] || (n[3] = (k) => b.value && C(w).eventDragEnd(k, o))
1378
1392
  }), [
1379
- me("div", Vt, [
1393
+ ge("div", zt, [
1380
1394
  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", {
1395
+ ge("div", Ft, le(o.title), 1),
1396
+ C(i).time ? (Y(), j("div", Nt, le(o._[`startTimeFormatted${C(i).twelveHour ? 12 : 24}`]) + `
1397
+ - ` + le(o._[`endTimeFormatted${C(i).twelveHour ? 12 : 24}`]), 1)) : U("", !0),
1398
+ ge("div", {
1385
1399
  class: "vuecal__event-content",
1386
1400
  innerHTML: o.content
1387
- }, null, 8, Pt)
1401
+ }, null, 8, Wt)
1388
1402
  ])
1389
1403
  ]),
1390
- W.value ? (Y(), j("div", {
1404
+ N.value ? (Y(), j("div", {
1391
1405
  key: 0,
1392
1406
  class: "vuecal__event-resizer",
1393
- onDragstart: n[0] || (n[0] = Ge(() => {
1407
+ onDragstart: n[0] || (n[0] = Qe(() => {
1394
1408
  }, ["prevent", "stop"]))
1395
- }, null, 32)) : Z("", !0),
1396
- Me(He, { name: "vuecal-delete-btn" }, {
1397
- default: q(() => [
1409
+ }, null, 32)) : U("", !0),
1410
+ Oe(Ge, { name: "vuecal-delete-btn" }, {
1411
+ default: Z(() => [
1398
1412
  o._.deleting ? (Y(), j("div", {
1399
1413
  key: 0,
1400
1414
  class: "vuecal__event-delete",
1401
- onClick: n[1] || (n[1] = Ge((k) => o.delete(3), ["stop"]))
1402
- }, "Delete")) : Z("", !0)
1415
+ onClick: n[1] || (n[1] = Qe((k) => o.delete(3), ["stop"]))
1416
+ }, "Delete")) : U("", !0)
1403
1417
  ]),
1404
1418
  _: 1
1405
1419
  })
1406
- ], 16, Ct));
1420
+ ], 16, Lt));
1407
1421
  }
1408
- }, zt = ["innerHTML"], Ht = ["data-schedule"], Lt = {
1422
+ }, Bt = ["innerHTML"], At = ["data-schedule"], It = {
1409
1423
  key: 1,
1410
1424
  class: "vuecal__cell-date"
1411
- }, Ft = {
1425
+ }, Rt = {
1412
1426
  key: 2,
1413
1427
  class: "vuecal__cell-content"
1414
- }, Nt = {
1428
+ }, Xt = {
1415
1429
  key: 3,
1416
1430
  class: "vuecal__cell-events"
1417
- }, Wt = {
1431
+ }, Gt = {
1418
1432
  key: 1,
1419
1433
  class: "vuecal__cell-date"
1420
- }, At = {
1434
+ }, qt = {
1421
1435
  key: 2,
1422
1436
  class: "vuecal__cell-content"
1423
- }, Bt = {
1437
+ }, Ut = {
1424
1438
  key: 3,
1425
1439
  class: "vuecal__cell-events"
1426
- }, It = {
1440
+ }, Zt = {
1427
1441
  key: 5,
1428
1442
  class: "vuecal__cell-events-count"
1429
- }, Rt = ["title"], Xt = {
1443
+ }, Jt = ["title"], Kt = {
1430
1444
  __name: "cell",
1431
1445
  props: {
1432
1446
  // Even with time=false, the date of the cell will still be provided in order to attach
@@ -1436,9 +1450,9 @@ const Ke = (c) => {
1436
1450
  index: { type: Number, required: !0 }
1437
1451
  },
1438
1452
  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({
1453
+ 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), G = (r) => {
1454
+ b.value.push(r.detail), N.value = !0;
1455
+ }, u = () => setTimeout(() => N.value = !1, 300), d = $e({
1442
1456
  dragging: !1,
1443
1457
  holding: !1,
1444
1458
  // When the cell is clicked and hold for a certain amount of time.
@@ -1459,42 +1473,42 @@ const Ke = (c) => {
1459
1473
  movePercentageX: 0,
1460
1474
  movePercentageY: 0,
1461
1475
  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)), {
1476
+ }), e = ie(!1), v = ie({ cellOverlaps: {}, longestStreak: 0 }), h = T(() => {
1477
+ let r = Math.min(d.startPercentageY, d.movePercentageY), $ = Math.max(d.startPercentageY, d.movePercentageY), S = Pe(r, w), M = Pe($, w);
1478
+ return w.snapToInterval && (S = _.snapToInterval(S, w.snapToInterval), M = _.snapToInterval(M, w.snapToInterval), r = Ve(S, w), $ = Ve(M, w)), {
1465
1479
  style: {
1466
1480
  top: r + "%",
1467
- height: Math.abs(T - r) + "%"
1481
+ height: Math.abs($ - r) + "%"
1468
1482
  },
1469
1483
  startMinutes: S,
1470
- endMinutes: $,
1484
+ endMinutes: M,
1471
1485
  start: _.formatMinutes(S),
1472
- end: _.formatMinutes($),
1486
+ end: _.formatMinutes(M),
1473
1487
  ...d.schedule ? { schedule: d.schedule } : {}
1474
1488
  };
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();
1489
+ }), E = T(() => {
1490
+ const r = w.editableEvents.create && (d.dragging || e.value), $ = w.eventCreateMinDrag && d.thresholdPassed || !w.eventCreateMinDrag;
1491
+ return r && $;
1492
+ }), L = T(() => {
1493
+ var ee;
1494
+ const r = /* @__PURE__ */ new Date(), $ = D.start.getFullYear(), S = D.start.getMonth(), M = s.start.getFullYear(), W = s.start.getMonth();
1481
1495
  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,
1496
+ [`vuecal__cell--${Re[s.start.getDay()]}`]: D.isDay || D.isDays || D.isWeek || D.isMonth,
1497
+ [`vuecal__cell--${ct[W]}`]: D.isYear,
1498
+ [`vuecal__cell--${M}`]: D.isYears,
1485
1499
  "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,
1500
+ "vuecal__cell--current-month": D.isYear && M === r.getFullYear() && W === r.getMonth(),
1501
+ "vuecal__cell--current-year": D.isYears && M === r.getFullYear(),
1502
+ "vuecal__cell--out-of-range": D.isMonth && (M !== $ || W !== S),
1503
+ "vuecal__cell--before-min": ae.value && K.value,
1504
+ "vuecal__cell--after-max": ae.value && oe.value,
1505
+ "vuecal__cell--disabled": ae.value,
1492
1506
  "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,
1507
+ "vuecal__cell--has-schedules": (ee = w.schedules) == null ? void 0 : ee.length,
1494
1508
  "vuecal__cell--dragging": d.dragging,
1495
1509
  "vuecal__cell--has-events": n.value.length
1496
1510
  };
1497
- }), B = M(() => _.formatDate(s.start)), l = M(() => {
1511
+ }), B = T(() => _.formatDate(s.start)), l = T(() => {
1498
1512
  switch (D.id) {
1499
1513
  case "day":
1500
1514
  return "";
@@ -1509,162 +1523,162 @@ const Ke = (c) => {
1509
1523
  case "years":
1510
1524
  return _.formatDate(s.start, "YYYY");
1511
1525
  }
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(() => {
1526
+ }), 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
1527
  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(() => {
1528
+ return (r = w.schedules) == null ? void 0 : r.reduce(($, S) => ($[S.id] = n.value.filter((M) => M.schedule === S.id), $), {});
1529
+ }), O = T(() => {
1516
1530
  const r = {};
1517
- for (const T of n.value) {
1518
- const S = T._.id, { maxConcurrent: $ = 1, position: A = 0 } = v.value.cellOverlaps[S] || {};
1531
+ for (const $ of n.value) {
1532
+ const S = $._.id, { maxConcurrent: M = 1, position: W = 0 } = v.value.cellOverlaps[S] || {};
1519
1533
  r[S] = {
1520
- width: `${100 / $}%`,
1521
- left: `${100 / $ * A}%`
1534
+ width: `${100 / M}%`,
1535
+ left: `${100 / M * W}%`
1522
1536
  };
1523
1537
  }
1524
1538
  return r;
1525
- }), z = M(() => D.isMonth && w.eventCount && !w.eventsOnMonthView && k.value.length), R = M(() => {
1539
+ }), P = T(() => D.isMonth && w.eventCount && !w.eventsOnMonthView && k.value.length), I = T(() => {
1526
1540
  var S;
1527
1541
  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;
1542
+ const r = Re[s.start.getDay()];
1543
+ let $ = (S = w.specialHours) == null ? void 0 : S[r];
1544
+ if ($)
1545
+ return Array.isArray($) || ($ = [$]), $.map((M) => {
1546
+ let { from: W, to: A, class: ee, label: de } = M;
1547
+ if (isNaN(W) || isNaN(A) || w.timeFrom >= A || w.timeTo <= W) return;
1548
+ W = Math.max(w.timeFrom, W), A = Math.min(w.timeTo, A);
1549
+ const he = Ve(W, w), g = Ve(A, w) - he;
1536
1550
  return {
1537
- style: { top: `${P}%`, height: `${N}%` },
1538
- label: h,
1539
- class: te
1551
+ style: { top: `${he}%`, height: `${g}%` },
1552
+ label: de,
1553
+ class: ee
1540
1554
  };
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(() => {
1555
+ }).filter((M) => !!M);
1556
+ }), K = T(() => w.minTimestamp !== null && w.minTimestamp > s.end.getTime()), oe = T(() => w.maxTimestamp && w.maxTimestamp < s.start.getTime()), ae = T(() => {
1557
+ const { disableDays: r } = w, $ = D.isYear || D.isYears;
1558
+ return r.length && r.includes(_.formatDate(s.start)) && !$ ? !0 : K.value || oe.value;
1559
+ }), re = $e({
1560
+ show: T(() => {
1547
1561
  if (!(!D.isDay && !D.isDays && !D.isWeek) && !(!o.value || !w.time) && !(w.timeFrom > _.dateToMinutes(D.now)) && !(_.dateToMinutes(D.now) > w.timeTo))
1548
1562
  return !0;
1549
1563
  }),
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 {};
1564
+ nowInMinutes: T(() => _.dateToMinutes(D.now)),
1565
+ todaysTimePosition: T(() => Ve(re.nowInMinutes, w)),
1566
+ style: T(() => `top: ${re.todaysTimePosition}%`),
1567
+ currentTime: T(() => _.formatTime(D.now))
1568
+ }), De = T(() => {
1569
+ if (ae.value) return {};
1556
1570
  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);
1571
+ Object.entries(r).forEach(([M, W]) => {
1572
+ r[M] = (A) => {
1573
+ var ee, de, he;
1574
+ (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
1575
  };
1562
1576
  });
1563
- const T = { ...r };
1577
+ const $ = { ...r };
1564
1578
  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 });
1579
+ return r.click = (M) => {
1580
+ var W;
1581
+ ue(), (W = $.click) == null || W.call($, { e: M, cell: x.value, cursor: Q.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
1582
+ var A;
1583
+ S = null, (A = $["delayed-click"]) == null || A.call($, { e: M, cell: x.value, cursor: Q.value });
1570
1584
  }, 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
1585
+ }, (w.time && D.isDay || D.isDays || D.isWeek) && (r.touchstart = (M) => {
1586
+ var W;
1587
+ a(M.e || M), (W = $.touchstart) == null || W.call($, { e: M, cell: x.value, cursor: Q.value });
1588
+ }, r.mousedown = (M) => {
1589
+ var W;
1590
+ a(M.e || M), (W = $.mousedown) == null || W.call($, { e: M, cell: x.value, cursor: Q.value });
1591
+ }), $.dblclick && (r.dblclick = (M) => {
1592
+ var H, R;
1593
+ 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);
1594
+ he.setMinutes(de);
1595
+ const g = {
1596
+ y: ee,
1597
+ date: he
1584
1598
  };
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(() => ({
1599
+ (R = $.dblclick) == null || R.call($, { e: M, cell: x.value, cursor: g });
1600
+ }), w.editableEvents.drag && (r.dragenter = (M) => m.cellDragEnter(M, x.value), r.dragover = (M) => {
1601
+ M.preventDefault(), m.cellDragOver(M, x.value);
1602
+ }, r.dragleave = (M) => m.cellDragLeave(M, x.value), r.drop = (M) => m.cellDragDrop(M, x.value)), r;
1603
+ }), x = T(() => ({
1590
1604
  start: s.start,
1591
1605
  end: s.end,
1592
1606
  events: n,
1593
1607
  ...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), {
1608
+ })), Q = T(() => {
1609
+ const r = Pe(d.movePercentageY || d.startPercentageY, w), $ = new Date(s.start);
1610
+ return $.setMinutes(r), {
1597
1611
  x: d.movePercentageX || d.startPercentageX,
1598
1612
  y: d.movePercentageY || d.startPercentageY,
1599
- date: T
1613
+ date: $
1600
1614
  };
1601
- }), ce = () => {
1615
+ }), ue = () => {
1602
1616
  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
1617
  }, a = (r) => {
1604
- var S, $;
1618
+ var S, M;
1605
1619
  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 });
1620
+ const $ = f.value.getBoundingClientRect();
1621
+ 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(() => {
1622
+ var W, A;
1623
+ d.holding = !0, (A = (W = De.value).hold) == null || A.call(W, { e: r, cell: x.value, cursor: Q.value });
1610
1624
  }, 1e3);
1611
1625
  }, 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;
1619
- }, G = async (r) => {
1626
+ var S, M, W, A, ee, de;
1627
+ 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;
1628
+ const $ = f.value.getBoundingClientRect();
1629
+ 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 });
1630
+ }, y = async (r) => {
1631
+ var $, S;
1632
+ 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 q(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;
1633
+ }, q = async (r) => {
1620
1634
  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]);
1635
+ let { start: $, end: S, startMinutes: M, endMinutes: W } = h.value;
1636
+ $ = new Date(s.start), $.setMinutes(M), S = new Date(s.start), S.setMinutes(W);
1637
+ let A = { ...h.value, start: $, end: S };
1638
+ const { create: ee } = w.eventListeners.event;
1639
+ if (typeof ee == "function") {
1640
+ const de = A;
1641
+ 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);
1642
+ } else D.createEvent(A);
1643
+ }, J = () => {
1644
+ Object.keys(De.value).forEach((r) => {
1645
+ var $;
1646
+ ($ = f.value) == null || $.removeEventListener(r, De.value[r]);
1633
1647
  });
1634
- }, fe = () => {
1635
- v.value = L.getCellOverlappingEvents(B.value);
1648
+ }, ce = () => {
1649
+ v.value = z.getCellOverlappingEvents(B.value);
1636
1650
  };
1637
- return de(
1651
+ return me(
1638
1652
  // Watch event IDs and start/end dates (only) to detect event resizing/dnd.
1639
1653
  () => k.value.map((r) => `${r._.id}${r.start.getTime()}${r.end.getTime()}`).join(),
1640
1654
  async () => {
1641
- await We(), fe();
1655
+ await Ue(), ce();
1642
1656
  },
1643
1657
  { immediate: !0, flush: "post" }
1644
1658
  // 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],
1659
+ ), Xe(async () => {
1660
+ b.value.forEach((r) => z.deleteEvent(r, 3)), J(), await Ue();
1661
+ }), (r, $) => (Y(), j("div", ye({
1662
+ class: ["vuecal__cell", L.value],
1649
1663
  ref_key: "cellEl",
1650
1664
  ref: f
1651
- }, je(he.value, !0)), [
1665
+ }, Ie(De.value, !0)), [
1652
1666
  r.$slots.cell ? F(r.$slots, "cell", {
1653
1667
  key: 0,
1654
1668
  start: c.start,
1655
1669
  end: c.end,
1656
1670
  index: c.index,
1657
1671
  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),
1672
+ }) : U("", !0),
1673
+ I.value ? (Y(!0), j(te, { key: 1 }, pe(I.value, (S, M) => (Y(), j("div", {
1674
+ class: ke(["vuecal__special-hours", S.class]),
1675
+ style: Te(S.style),
1662
1676
  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]),
1677
+ }, null, 14, Bt))), 256)) : U("", !0),
1678
+ !r.$slots.cell && C(w).schedules ? (Y(!0), j(te, { key: 2 }, pe(C(w).schedules, (S) => (Y(), j("div", {
1679
+ class: ke(["vuecal__schedule vuecal__schedule--cell", S.class]),
1666
1680
  key: S.id,
1667
- style: ke(S.style || null),
1681
+ style: Te(S.style || null),
1668
1682
  "data-schedule": S.id
1669
1683
  }, [
1670
1684
  r.$slots["cell-events"] ? F(r.$slots, "cell-events", {
@@ -1672,230 +1686,230 @@ const Ke = (c) => {
1672
1686
  start: c.start,
1673
1687
  end: c.end,
1674
1688
  events: n.value
1675
- }) : Z("", !0),
1676
- l.value || r.$slots["cell-date"] ? (Y(), j("div", Lt, [
1689
+ }) : U("", !0),
1690
+ l.value || r.$slots["cell-date"] ? (Y(), j("div", It, [
1677
1691
  F(r.$slots, "cell-date", {
1678
1692
  start: c.start,
1679
1693
  end: c.end,
1680
1694
  events: n.value
1681
1695
  }, () => [
1682
- Ze(re(l.value), 1)
1696
+ xe(le(l.value), 1)
1683
1697
  ])
1684
- ])) : Z("", !0),
1685
- r.$slots["cell-content"] ? (Y(), j("div", Ft, [
1698
+ ])) : U("", !0),
1699
+ r.$slots["cell-content"] ? (Y(), j("div", Rt, [
1686
1700
  F(r.$slots, "cell-content", {
1687
1701
  start: c.start,
1688
1702
  end: c.end,
1689
1703
  events: n.value
1690
1704
  })
1691
- ])) : Z("", !0),
1692
- r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Nt, [
1705
+ ])) : U("", !0),
1706
+ r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Xt, [
1693
1707
  F(r.$slots, "cell-events", {
1694
1708
  start: c.start,
1695
1709
  end: c.end,
1696
1710
  events: n.value
1697
1711
  })
1698
- ])) : n.value.length || W.value ? (Y(), be(qe, {
1712
+ ])) : n.value.length || N.value ? (Y(), Se(et, {
1699
1713
  key: 4,
1700
1714
  class: "vuecal__cell-events",
1701
1715
  name: "vuecal-event-delete",
1702
- onBeforeLeave: T[0] || (T[0] = ($) => W.value = !0),
1716
+ onBeforeLeave: $[0] || ($[0] = (M) => N.value = !0),
1703
1717
  onAfterLeave: u,
1704
1718
  tag: "div"
1705
1719
  }, {
1706
- default: q(() => [
1707
- (Y(!0), j(se, null, De(t.value[S.id], ($) => (Y(), be(Ue, {
1708
- key: $._.id,
1709
- event: $,
1710
- onEventDeleted: X,
1711
- style: ke(O.value[$._.id])
1712
- }, $e({ _: 2 }, [
1720
+ default: Z(() => [
1721
+ (Y(!0), j(te, null, pe(t.value[S.id], (M) => (Y(), Se(at, {
1722
+ key: M._.id,
1723
+ event: M,
1724
+ onEventDeleted: G,
1725
+ style: Te(O.value[M._.id])
1726
+ }, je({ _: 2 }, [
1713
1727
  r.$slots.event ? {
1714
1728
  name: "event",
1715
- fn: q((A) => [
1716
- F(r.$slots, "event", ge({ ref_for: !0 }, A))
1729
+ fn: Z((W) => [
1730
+ F(r.$slots, "event", ye({ ref_for: !0 }, W))
1717
1731
  ]),
1718
1732
  key: "0"
1719
1733
  } : void 0
1720
1734
  ]), 1032, ["event", "style"]))), 128))
1721
1735
  ]),
1722
1736
  _: 2
1723
- }, 1024)) : Z("", !0),
1737
+ }, 1024)) : U("", !0),
1724
1738
  E.value && d.schedule === S.id ? (Y(), j("div", {
1725
1739
  key: 5,
1726
1740
  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, [
1741
+ style: Te(h.value.style)
1742
+ }, le(h.value.start) + " - " + le(h.value.end), 5)) : U("", !0)
1743
+ ], 14, At))), 128)) : U("", !0),
1744
+ !r.$slots.cell && !C(w).schedules ? (Y(), j(te, { key: 3 }, [
1745
+ r.$slots["cell-events"] ? F(r.$slots, "cell-events", { key: 0 }) : U("", !0),
1746
+ l.value || r.$slots["cell-date"] ? (Y(), j("div", Gt, [
1733
1747
  F(r.$slots, "cell-date", {
1734
1748
  start: c.start,
1735
1749
  end: c.end,
1736
1750
  events: n.value
1737
1751
  }, () => [
1738
- Ze(re(l.value), 1)
1752
+ xe(le(l.value), 1)
1739
1753
  ])
1740
- ])) : Z("", !0),
1741
- r.$slots["cell-content"] ? (Y(), j("div", At, [
1754
+ ])) : U("", !0),
1755
+ r.$slots["cell-content"] ? (Y(), j("div", qt, [
1742
1756
  F(r.$slots, "cell-content", {
1743
1757
  start: c.start,
1744
1758
  end: c.end,
1745
1759
  events: n.value
1746
1760
  })
1747
- ])) : Z("", !0),
1748
- r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Bt, [
1761
+ ])) : U("", !0),
1762
+ r.$slots["cell-events"] && n.value.length ? (Y(), j("div", Ut, [
1749
1763
  F(r.$slots, "cell-events", {
1750
1764
  start: c.start,
1751
1765
  end: c.end,
1752
1766
  events: n.value
1753
1767
  })
1754
- ])) : (n.value.length || W.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (Y(), be(qe, {
1768
+ ])) : (n.value.length || N.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (Y(), Se(et, {
1755
1769
  key: 4,
1756
1770
  class: "vuecal__cell-events",
1757
1771
  name: "vuecal-event-delete",
1758
- onBeforeLeave: T[1] || (T[1] = (S) => W.value = !0),
1772
+ onBeforeLeave: $[1] || ($[1] = (S) => N.value = !0),
1759
1773
  onAfterLeave: u,
1760
1774
  tag: "div"
1761
1775
  }, {
1762
- default: q(() => [
1763
- (Y(!0), j(se, null, De(n.value, (S) => (Y(), be(Ue, {
1776
+ default: Z(() => [
1777
+ (Y(!0), j(te, null, pe(n.value, (S) => (Y(), Se(at, {
1764
1778
  key: S._.id,
1765
1779
  event: S,
1766
- onEventDeleted: X,
1767
- style: ke(O.value[S._.id])
1768
- }, $e({ _: 2 }, [
1780
+ onEventDeleted: G,
1781
+ style: Te(O.value[S._.id])
1782
+ }, je({ _: 2 }, [
1769
1783
  r.$slots.event ? {
1770
1784
  name: "event",
1771
- fn: q(($) => [
1772
- F(r.$slots, "event", ge({ ref_for: !0 }, $))
1785
+ fn: Z((M) => [
1786
+ F(r.$slots, "event", ye({ ref_for: !0 }, M))
1773
1787
  ]),
1774
1788
  key: "0"
1775
1789
  } : void 0
1776
1790
  ]), 1032, ["event", "style"]))), 128))
1777
1791
  ]),
1778
1792
  _: 3
1779
- })) : Z("", !0),
1793
+ })) : U("", !0),
1780
1794
  E.value ? (Y(), j("div", {
1781
1795
  key: 5,
1782
1796
  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),
1797
+ style: Te(h.value.style)
1798
+ }, le(h.value.start) + " - " + le(h.value.end), 5)) : U("", !0)
1799
+ ], 64)) : U("", !0),
1786
1800
  r.$slots["event-count"] ? F(r.$slots, "event-count", {
1787
1801
  key: 4,
1788
1802
  events: k.value
1789
- }) : z.value ? (Y(), j("div", It, re(k.value.length), 1)) : Z("", !0),
1790
- oe.show ? (Y(), j("div", {
1803
+ }) : P.value ? (Y(), j("div", Zt, le(k.value.length), 1)) : U("", !0),
1804
+ re.show ? (Y(), j("div", {
1791
1805
  key: 6,
1792
1806
  class: "vuecal__now-line",
1793
- style: ke(oe.style),
1794
- title: oe.currentTime
1807
+ style: Te(re.style),
1808
+ title: re.currentTime
1795
1809
  }, [
1796
- me("span", null, re(oe.currentTime), 1)
1797
- ], 12, Rt)) : Z("", !0)
1810
+ ge("span", null, le(re.currentTime), 1)
1811
+ ], 12, Jt)) : U("", !0)
1798
1812
  ], 16));
1799
1813
  }
1800
- }, Gt = {
1814
+ }, Qt = {
1801
1815
  __name: "body",
1802
1816
  setup(c) {
1803
- const s = Se("vuecal");
1817
+ const s = Ne("vuecal");
1804
1818
  let { view: i, config: D, dateUtils: w } = s;
1805
- const _ = ue(null), L = ue(null), g = M(() => ({
1819
+ const _ = ie(null), z = ie(null), m = T(() => ({
1806
1820
  "--vuecal-grid-columns": i.cols,
1807
1821
  "--vuecal-grid-rows": i.rows
1808
- })), V = M(() => {
1809
- const b = w.formatTime(Ee(L.value, D));
1822
+ })), V = T(() => {
1823
+ const b = w.formatTime(Pe(z.value, D));
1810
1824
  return {
1811
- style: { top: L.value + "%" },
1825
+ style: { top: z.value + "%" },
1812
1826
  time: b
1813
1827
  };
1814
1828
  }), o = (b) => {
1815
1829
  var u;
1816
1830
  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);
1831
+ const N = (((u = b.touches) == null ? void 0 : u[0]) || b).clientY, { top: G } = _.value.getBoundingClientRect();
1832
+ z.value = Je(N - G, _.value);
1819
1833
  }, f = () => {
1820
- L.value = null;
1834
+ z.value = null;
1821
1835
  };
1822
- return Ae(() => {
1836
+ return Ze(() => {
1823
1837
  _.value.addEventListener("mousemove", o), _.value.addEventListener("touchmove", o), _.value.addEventListener("mouseleave", f), _.value.addEventListener("touchend", f);
1824
- }), ze(() => {
1838
+ }), Xe(() => {
1825
1839
  _.value && (_.value.removeEventListener("mousemove", o), _.value.removeEventListener("touchmove", o), _.value.removeEventListener("mouseleave", f), _.value.removeEventListener("touchend", f));
1826
- }), (b, W) => (Y(), j("div", {
1840
+ }), (b, N) => (Y(), j("div", {
1827
1841
  class: "vuecal__body",
1828
1842
  ref_key: "bodyEl",
1829
1843
  ref: _,
1830
- style: ke(g.value)
1844
+ style: Te(m.value)
1831
1845
  }, [
1832
- Me(He, { name: "vuecal-shrink" }, {
1833
- default: q(() => [
1834
- C(D).timeAtCursor && L.value !== null ? (Y(), j("div", {
1846
+ Oe(Ge, { name: "vuecal-shrink" }, {
1847
+ default: Z(() => [
1848
+ C(D).timeAtCursor && z.value !== null ? (Y(), j("div", {
1835
1849
  key: 0,
1836
1850
  class: "vuecal__time-at-cursor",
1837
- style: ke(V.value.style)
1851
+ style: Te(V.value.style)
1838
1852
  }, [
1839
- me("label", null, re(V.value.time), 1)
1840
- ], 4)) : Z("", !0)
1853
+ ge("label", null, le(V.value.time), 1)
1854
+ ], 4)) : U("", !0)
1841
1855
  ]),
1842
1856
  _: 1
1843
1857
  }),
1844
- (Y(!0), j(se, null, De(C(i).cellDates, (X, u) => (Y(), be(Xt, {
1858
+ (Y(!0), j(te, null, pe(C(i).cellDates, (G, u) => (Y(), Se(Kt, {
1845
1859
  key: u,
1846
- start: X.start,
1847
- end: X.end,
1860
+ start: G.start,
1861
+ end: G.end,
1848
1862
  index: u
1849
- }, $e({ _: 2 }, [
1863
+ }, je({ _: 2 }, [
1850
1864
  b.$slots.cell ? {
1851
1865
  name: "cell",
1852
- fn: q((d) => [
1853
- F(b.$slots, "cell", ge({ ref_for: !0 }, d))
1866
+ fn: Z((d) => [
1867
+ F(b.$slots, "cell", ye({ ref_for: !0 }, d))
1854
1868
  ]),
1855
1869
  key: "0"
1856
1870
  } : void 0,
1857
1871
  b.$slots["cell-date"] ? {
1858
1872
  name: "cell-date",
1859
- fn: q((d) => [
1860
- F(b.$slots, "cell-date", ge({ ref_for: !0 }, d))
1873
+ fn: Z((d) => [
1874
+ F(b.$slots, "cell-date", ye({ ref_for: !0 }, d))
1861
1875
  ]),
1862
1876
  key: "1"
1863
1877
  } : void 0,
1864
1878
  b.$slots["cell-content"] ? {
1865
1879
  name: "cell-content",
1866
- fn: q((d) => [
1867
- F(b.$slots, "cell-content", ge({ ref_for: !0 }, d))
1880
+ fn: Z((d) => [
1881
+ F(b.$slots, "cell-content", ye({ ref_for: !0 }, d))
1868
1882
  ]),
1869
1883
  key: "2"
1870
1884
  } : void 0,
1871
1885
  b.$slots["cell-events"] ? {
1872
1886
  name: "cell-events",
1873
- fn: q((d) => [
1874
- F(b.$slots, "cell-events", ge({ ref_for: !0 }, d))
1887
+ fn: Z((d) => [
1888
+ F(b.$slots, "cell-events", ye({ ref_for: !0 }, d))
1875
1889
  ]),
1876
1890
  key: "3"
1877
1891
  } : b.$slots.event ? {
1878
1892
  name: "event",
1879
- fn: q((d) => [
1880
- F(b.$slots, "event", ge({ ref_for: !0 }, d))
1893
+ fn: Z((d) => [
1894
+ F(b.$slots, "event", ye({ ref_for: !0 }, d))
1881
1895
  ]),
1882
1896
  key: "4"
1883
1897
  } : b.$slots["event-count"] ? {
1884
1898
  name: "event-count",
1885
- fn: q((d) => [
1886
- F(b.$slots, "event-count", ge({ ref_for: !0 }, d))
1899
+ fn: Z((d) => [
1900
+ F(b.$slots, "event-count", ye({ ref_for: !0 }, d))
1887
1901
  ]),
1888
1902
  key: "5"
1889
1903
  } : void 0
1890
1904
  ]), 1032, ["start", "end", "index"]))), 128))
1891
1905
  ], 4));
1892
1906
  }
1893
- }, Zt = ["data-locale"], qt = { class: "vuecal__scrollable-wrap" }, Jt = {
1907
+ }, xt = ["data-locale"], ea = { class: "vuecal__scrollable-wrap" }, ta = {
1894
1908
  key: 1,
1895
1909
  class: "vuecal__week-numbers"
1896
- }, Ut = { class: "vuecal__week-number" }, Kt = { class: "vuecal__body-wrap" }, xt = {
1910
+ }, aa = { class: "vuecal__week-number" }, sa = { class: "vuecal__body-wrap" }, la = {
1897
1911
  __name: "index",
1898
- props: vt,
1912
+ props: Dt,
1899
1913
  emits: [
1900
1914
  "ready",
1901
1915
  "view-change",
@@ -1909,175 +1923,175 @@ const Ke = (c) => {
1909
1923
  "event-change"
1910
1924
  ],
1911
1925
  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(() => {
1926
+ 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)))), G = T(() => {
1913
1927
  var e;
1914
1928
  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,
1929
+ "vuecal--ready": m.ready,
1930
+ [`vuecal--${m.theme}-theme`]: m.theme,
1931
+ [`vuecal--${m.size}`]: !0,
1932
+ "vuecal--date-picker": m.datePicker,
1933
+ "vuecal--dark": m.dark,
1934
+ "vuecal--light": !m.dark,
1921
1935
  [`vuecal--${V.id}-view`]: !0,
1922
1936
  "vuecal--view-has-time": b.value,
1923
- "vuecal--timeless": !g.time,
1937
+ "vuecal--timeless": !m.time,
1924
1938
  "vuecal--dragging-cell": f.isDraggingCell,
1925
1939
  "vuecal--dragging-event": f.isDraggingEvent,
1926
1940
  "vuecal--resizing-event": f.isResizingEvent,
1927
- "vuecal--has-schedules": (e = g.schedules) == null ? void 0 : e.length
1941
+ "vuecal--has-schedules": (e = m.schedules) == null ? void 0 : e.length
1928
1942
  };
1929
- }), u = M(() => ({
1930
- "--vuecal-time-cell-height": g.timeCellHeight && `${g.timeCellHeight}px`
1931
- })), d = M(() => {
1943
+ }), u = T(() => ({
1944
+ "--vuecal-time-cell-height": m.timeCellHeight && `${m.timeCellHeight}px`
1945
+ })), d = T(() => {
1932
1946
  var e, v;
1933
1947
  return {
1934
- "vuecal__scrollable--row": b.value || g.weekNumbers && V.isMonth,
1948
+ "vuecal__scrollable--row": b.value || m.weekNumbers && V.isMonth,
1935
1949
  // Keep the states inside the Vue transition wrapper for smooth CSS transitions.
1936
1950
  [`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)
1951
+ "vuecal__scrollable--has-schedules": (e = m.schedules) == null ? void 0 : e.length,
1952
+ "vuecal__scrollable--no-schedules": !((v = m.schedules) != null && v.length)
1939
1953
  };
1940
1954
  });
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]),
1955
+ return Ze(async () => {
1956
+ await Ue(), w("ready", { config: m, view: V });
1957
+ }), me(() => m.locale, (e) => m.loadTexts(e)), ut("vuecal", z), s({ view: z.view }), (e, v) => (Y(), j("div", {
1958
+ class: ke(["vuecal", G.value]),
1945
1959
  ref: "vuecal-el",
1946
1960
  "data-locale": e.locale,
1947
- style: ke(u.value)
1961
+ style: Te(u.value)
1948
1962
  }, [
1949
1963
  e.$slots.diy ? F(e.$slots, "diy", {
1950
1964
  key: 0,
1951
- vuecal: C(L),
1965
+ vuecal: C(z),
1952
1966
  view: C(V),
1953
- availableViews: C(g).availableViews
1954
- }) : (Y(), j(se, { key: 1 }, [
1955
- Me(wt, null, $e({ _: 2 }, [
1967
+ availableViews: C(m).availableViews
1968
+ }) : (Y(), j(te, { key: 1 }, [
1969
+ Oe($t, null, je({ _: 2 }, [
1956
1970
  e.$slots.header ? {
1957
1971
  name: "header",
1958
- fn: q((y) => [
1959
- F(e.$slots, "header", ne(le(y)))
1972
+ fn: Z((h) => [
1973
+ F(e.$slots, "header", se(ne(h)))
1960
1974
  ]),
1961
1975
  key: "0"
1962
1976
  } : void 0,
1963
1977
  !e.$slots.header && e.$slots["previous-button"] ? {
1964
1978
  name: "previous-button",
1965
- fn: q((y) => [
1966
- F(e.$slots, "previous-button", ne(le(y)))
1979
+ fn: Z((h) => [
1980
+ F(e.$slots, "previous-button", se(ne(h)))
1967
1981
  ]),
1968
1982
  key: "1"
1969
1983
  } : void 0,
1970
1984
  !e.$slots.header && e.$slots["next-button"] ? {
1971
1985
  name: "next-button",
1972
- fn: q((y) => [
1973
- F(e.$slots, "next-button", ne(le(y)))
1986
+ fn: Z((h) => [
1987
+ F(e.$slots, "next-button", se(ne(h)))
1974
1988
  ]),
1975
1989
  key: "2"
1976
1990
  } : void 0,
1977
1991
  !e.$slots.header && e.$slots["today-button"] ? {
1978
1992
  name: "today-button",
1979
- fn: q((y) => [
1980
- F(e.$slots, "today-button", ne(le(y)))
1993
+ fn: Z((h) => [
1994
+ F(e.$slots, "today-button", se(ne(h)))
1981
1995
  ]),
1982
1996
  key: "3"
1983
1997
  } : void 0,
1984
1998
  !e.$slots.header && e.$slots.title ? {
1985
1999
  name: "title",
1986
- fn: q((y) => [
1987
- F(e.$slots, "title", ne(le(y)))
2000
+ fn: Z((h) => [
2001
+ F(e.$slots, "title", se(ne(h)))
1988
2002
  ]),
1989
2003
  key: "4"
1990
2004
  } : void 0,
1991
2005
  !e.$slots.header && e.$slots["schedule-heading"] ? {
1992
2006
  name: "schedule-heading",
1993
- fn: q((y) => [
1994
- F(e.$slots, "schedule-heading", ne(le(y)))
2007
+ fn: Z((h) => [
2008
+ F(e.$slots, "schedule-heading", se(ne(h)))
1995
2009
  ]),
1996
2010
  key: "5"
1997
2011
  } : void 0
1998
2012
  ]), 1024),
1999
- me("div", qt, [
2000
- Me(He, {
2013
+ ge("div", ea, [
2014
+ Oe(Ge, {
2001
2015
  name: `vuecal-slide-fade--${C(V).transitionDirection}`
2002
2016
  }, {
2003
- default: q(() => [
2017
+ default: Z(() => [
2004
2018
  (Y(), j("div", {
2005
- class: we(["vuecal__scrollable", d.value]),
2019
+ class: ke(["vuecal__scrollable", d.value]),
2006
2020
  key: C(V).id + C(V).start.getTime()
2007
2021
  }, [
2008
- b.value ? (Y(), be(St, { key: 0 }, $e({ _: 2 }, [
2022
+ b.value ? (Y(), Se(Ht, { key: 0 }, je({ _: 2 }, [
2009
2023
  e.$slots["time-cell"] ? {
2010
2024
  name: "time-cell",
2011
- fn: q((y) => [
2012
- F(e.$slots, "time-cell", ne(le(y)))
2025
+ fn: Z((h) => [
2026
+ F(e.$slots, "time-cell", se(ne(h)))
2013
2027
  ]),
2014
2028
  key: "0"
2015
2029
  } : 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, [
2030
+ ]), 1024)) : U("", !0),
2031
+ C(m).weekNumbers && C(V).isMonth ? (Y(), j("div", ta, [
2032
+ (Y(!0), j(te, null, pe(N.value, (h) => (Y(), j("div", aa, [
2019
2033
  F(e.$slots, "week-number", {}, () => [
2020
- me("small", null, re(y), 1)
2034
+ ge("small", null, le(h), 1)
2021
2035
  ])
2022
2036
  ]))), 256))
2023
- ])) : Z("", !0),
2024
- me("div", Kt, [
2025
- Me(Et, null, $e({ _: 2 }, [
2037
+ ])) : U("", !0),
2038
+ ge("div", sa, [
2039
+ Oe(jt, null, je({ _: 2 }, [
2026
2040
  e.$slots["weekday-heading"] ? {
2027
2041
  name: "weekday-heading",
2028
- fn: q((y) => [
2029
- F(e.$slots, "weekday-heading", ne(le(y)))
2042
+ fn: Z((h) => [
2043
+ F(e.$slots, "weekday-heading", se(ne(h)))
2030
2044
  ]),
2031
2045
  key: "0"
2032
2046
  } : void 0,
2033
2047
  e.$slots["schedule-heading"] ? {
2034
2048
  name: "schedule-heading",
2035
- fn: q((y) => [
2036
- F(e.$slots, "schedule-heading", ne(le(y)))
2049
+ fn: Z((h) => [
2050
+ F(e.$slots, "schedule-heading", se(ne(h)))
2037
2051
  ]),
2038
2052
  key: "1"
2039
2053
  } : void 0
2040
2054
  ]), 1024),
2041
- Me(Gt, null, $e({ _: 2 }, [
2055
+ Oe(Qt, null, je({ _: 2 }, [
2042
2056
  e.$slots.cell ? {
2043
2057
  name: "cell",
2044
- fn: q((y) => [
2045
- F(e.$slots, "cell", ne(le(y)))
2058
+ fn: Z((h) => [
2059
+ F(e.$slots, "cell", se(ne(h)))
2046
2060
  ]),
2047
2061
  key: "0"
2048
2062
  } : void 0,
2049
2063
  !e.$slots.cell && e.$slots["cell-date"] ? {
2050
2064
  name: "cell-date",
2051
- fn: q((y) => [
2052
- F(e.$slots, "cell-date", ne(le(y)))
2065
+ fn: Z((h) => [
2066
+ F(e.$slots, "cell-date", se(ne(h)))
2053
2067
  ]),
2054
2068
  key: "1"
2055
2069
  } : void 0,
2056
2070
  !e.$slots.cell && e.$slots["cell-content"] ? {
2057
2071
  name: "cell-content",
2058
- fn: q((y) => [
2059
- F(e.$slots, "cell-content", ne(le(y)))
2072
+ fn: Z((h) => [
2073
+ F(e.$slots, "cell-content", se(ne(h)))
2060
2074
  ]),
2061
2075
  key: "2"
2062
2076
  } : void 0,
2063
2077
  !e.$slots.cell && e.$slots["cell-events"] ? {
2064
2078
  name: "cell-events",
2065
- fn: q((y) => [
2066
- F(e.$slots, "cell-events", ne(le(y)))
2079
+ fn: Z((h) => [
2080
+ F(e.$slots, "cell-events", se(ne(h)))
2067
2081
  ]),
2068
2082
  key: "3"
2069
2083
  } : void 0,
2070
2084
  !e.$slots.cell && e.$slots.event ? {
2071
2085
  name: "event",
2072
- fn: q((y) => [
2073
- F(e.$slots, "event", ne(le(y)))
2086
+ fn: Z((h) => [
2087
+ F(e.$slots, "event", se(ne(h)))
2074
2088
  ]),
2075
2089
  key: "4"
2076
2090
  } : void 0,
2077
2091
  !e.$slots.cell && e.$slots["event-count"] ? {
2078
2092
  name: "event-count",
2079
- fn: q((y) => [
2080
- F(e.$slots, "event-count", ne(le(y)))
2093
+ fn: Z((h) => [
2094
+ F(e.$slots, "event-count", se(ne(h)))
2081
2095
  ]),
2082
2096
  key: "5"
2083
2097
  } : void 0
@@ -2089,63 +2103,63 @@ const Ke = (c) => {
2089
2103
  }, 8, ["name"])
2090
2104
  ])
2091
2105
  ], 64))
2092
- ], 14, Zt));
2106
+ ], 14, xt));
2093
2107
  }
2094
- }, ea = (c) => {
2095
- Ye.texts = { ...ve.texts, ...c }, Ye.dateUtils.updateTexts(Ye.texts);
2108
+ }, ra = (c) => {
2109
+ Fe.texts = { ...fe.texts, ...c }, Fe.dateUtils.updateTexts(Fe.texts);
2096
2110
  }, {
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;
2111
+ addDatePrototypes: ia,
2112
+ removeDatePrototypes: oa,
2113
+ updateTexts: ua,
2114
+ addDays: ca,
2115
+ subtractDays: da,
2116
+ addHours: va,
2117
+ subtractHours: ma,
2118
+ addMinutes: fa,
2119
+ subtractMinutes: ga,
2120
+ getWeek: ha,
2121
+ isToday: ya,
2122
+ isSameDate: Da,
2123
+ isInRange: wa,
2124
+ isLeapYear: pa,
2125
+ getPreviousFirstDayOfWeek: ka,
2126
+ stringToDate: _a,
2127
+ dateToMinutes: ba,
2128
+ countDays: Ta,
2129
+ datesInSameTimeStep: $a,
2130
+ isValid: Ma,
2131
+ formatDate: Ea,
2132
+ formatDateLite: Ya,
2133
+ formatTime: Sa,
2134
+ formatTimeLite: Ca,
2135
+ formatMinutes: Va
2136
+ } = Fe.dateUtils;
2123
2137
  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
2138
+ la as VueCal,
2139
+ ia as addDatePrototypes,
2140
+ ca as addDays,
2141
+ va as addHours,
2142
+ fa as addMinutes,
2143
+ Ta as countDays,
2144
+ ba as dateToMinutes,
2145
+ $a as datesInSameTimeStep,
2146
+ Ea as formatDate,
2147
+ Ya as formatDateLite,
2148
+ Va as formatMinutes,
2149
+ Sa as formatTime,
2150
+ Ca as formatTimeLite,
2151
+ ka as getPreviousFirstDayOfWeek,
2152
+ ha as getWeek,
2153
+ wa as isInRange,
2154
+ pa as isLeapYear,
2155
+ Da as isSameDate,
2156
+ ya as isToday,
2157
+ Ma as isValidDate,
2158
+ oa as removeDatePrototypes,
2159
+ _a as stringToDate,
2160
+ da as subtractDays,
2161
+ ma as subtractHours,
2162
+ ga as subtractMinutes,
2163
+ ua as updateTexts,
2164
+ ra as useLocale
2151
2165
  };