vue-cal 4.3.1 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +3 -3
  2. package/dist/drag-and-drop.amd.js +3 -3
  3. package/dist/drag-and-drop.cjs.js +3 -3
  4. package/dist/drag-and-drop.es.js +11 -40
  5. package/dist/i18n/ar.amd.js +2 -2
  6. package/dist/i18n/ar.cjs.js +2 -2
  7. package/dist/i18n/ar.es.js +2 -2
  8. package/dist/i18n/bg.amd.js +2 -2
  9. package/dist/i18n/bg.cjs.js +2 -2
  10. package/dist/i18n/bg.es.js +2 -2
  11. package/dist/i18n/bn.amd.js +2 -2
  12. package/dist/i18n/bn.cjs.js +2 -2
  13. package/dist/i18n/bn.es.js +2 -2
  14. package/dist/i18n/bs.amd.js +2 -2
  15. package/dist/i18n/bs.cjs.js +2 -2
  16. package/dist/i18n/bs.es.js +2 -2
  17. package/dist/i18n/ca.amd.js +2 -2
  18. package/dist/i18n/ca.cjs.js +2 -2
  19. package/dist/i18n/ca.es.js +2 -2
  20. package/dist/i18n/cs.amd.js +2 -2
  21. package/dist/i18n/cs.cjs.js +2 -2
  22. package/dist/i18n/cs.es.js +2 -2
  23. package/dist/i18n/da.amd.js +2 -2
  24. package/dist/i18n/da.cjs.js +2 -2
  25. package/dist/i18n/da.es.js +2 -2
  26. package/dist/i18n/de.amd.js +2 -2
  27. package/dist/i18n/de.cjs.js +2 -2
  28. package/dist/i18n/de.es.js +2 -2
  29. package/dist/i18n/el.amd.js +2 -2
  30. package/dist/i18n/el.cjs.js +2 -2
  31. package/dist/i18n/el.es.js +2 -2
  32. package/dist/i18n/en.amd.js +2 -2
  33. package/dist/i18n/en.cjs.js +2 -2
  34. package/dist/i18n/en.es.js +2 -2
  35. package/dist/i18n/es.amd.js +2 -2
  36. package/dist/i18n/es.cjs.js +2 -2
  37. package/dist/i18n/es.es.js +2 -2
  38. package/dist/i18n/fa.amd.js +2 -2
  39. package/dist/i18n/fa.cjs.js +2 -2
  40. package/dist/i18n/fa.es.js +2 -2
  41. package/dist/i18n/fr.amd.js +2 -2
  42. package/dist/i18n/fr.cjs.js +2 -2
  43. package/dist/i18n/fr.es.js +2 -2
  44. package/dist/i18n/he.amd.js +2 -2
  45. package/dist/i18n/he.cjs.js +2 -2
  46. package/dist/i18n/he.es.js +2 -2
  47. package/dist/i18n/hr.amd.js +2 -2
  48. package/dist/i18n/hr.cjs.js +2 -2
  49. package/dist/i18n/hr.es.js +2 -2
  50. package/dist/i18n/hu.amd.js +2 -2
  51. package/dist/i18n/hu.cjs.js +2 -2
  52. package/dist/i18n/hu.es.js +2 -2
  53. package/dist/i18n/id.amd.js +2 -2
  54. package/dist/i18n/id.cjs.js +2 -2
  55. package/dist/i18n/id.es.js +2 -2
  56. package/dist/i18n/is.amd.js +2 -2
  57. package/dist/i18n/is.cjs.js +2 -2
  58. package/dist/i18n/is.es.js +2 -2
  59. package/dist/i18n/it.amd.js +2 -2
  60. package/dist/i18n/it.cjs.js +2 -2
  61. package/dist/i18n/it.es.js +2 -2
  62. package/dist/i18n/ja.amd.js +2 -2
  63. package/dist/i18n/ja.cjs.js +2 -2
  64. package/dist/i18n/ja.es.js +2 -2
  65. package/dist/i18n/ka.amd.js +2 -2
  66. package/dist/i18n/ka.cjs.js +2 -2
  67. package/dist/i18n/ka.es.js +2 -2
  68. package/dist/i18n/ko.amd.js +2 -2
  69. package/dist/i18n/ko.cjs.js +2 -2
  70. package/dist/i18n/ko.es.js +2 -2
  71. package/dist/i18n/lt.amd.js +2 -2
  72. package/dist/i18n/lt.cjs.js +2 -2
  73. package/dist/i18n/lt.es.js +2 -2
  74. package/dist/i18n/mn.amd.js +2 -2
  75. package/dist/i18n/mn.cjs.js +2 -2
  76. package/dist/i18n/mn.es.js +2 -2
  77. package/dist/i18n/nl.amd.js +2 -2
  78. package/dist/i18n/nl.cjs.js +2 -2
  79. package/dist/i18n/nl.es.js +2 -2
  80. package/dist/i18n/no.amd.js +2 -2
  81. package/dist/i18n/no.cjs.js +2 -2
  82. package/dist/i18n/no.es.js +2 -2
  83. package/dist/i18n/pl.amd.js +2 -2
  84. package/dist/i18n/pl.cjs.js +2 -2
  85. package/dist/i18n/pl.es.js +2 -2
  86. package/dist/i18n/pt-br.amd.js +2 -2
  87. package/dist/i18n/pt-br.cjs.js +2 -2
  88. package/dist/i18n/pt-br.es.js +2 -2
  89. package/dist/i18n/ro.amd.js +2 -2
  90. package/dist/i18n/ro.cjs.js +2 -2
  91. package/dist/i18n/ro.es.js +2 -2
  92. package/dist/i18n/ru.amd.js +2 -2
  93. package/dist/i18n/ru.cjs.js +2 -2
  94. package/dist/i18n/ru.es.js +2 -2
  95. package/dist/i18n/sk.amd.js +2 -2
  96. package/dist/i18n/sk.cjs.js +2 -2
  97. package/dist/i18n/sk.es.js +2 -2
  98. package/dist/i18n/sl.amd.js +2 -2
  99. package/dist/i18n/sl.cjs.js +2 -2
  100. package/dist/i18n/sl.es.js +2 -2
  101. package/dist/i18n/sq.amd.js +2 -2
  102. package/dist/i18n/sq.cjs.js +2 -2
  103. package/dist/i18n/sq.es.js +2 -2
  104. package/dist/i18n/sr.amd.js +2 -2
  105. package/dist/i18n/sr.cjs.js +2 -2
  106. package/dist/i18n/sr.es.js +2 -2
  107. package/dist/i18n/sv.amd.js +2 -2
  108. package/dist/i18n/sv.cjs.js +2 -2
  109. package/dist/i18n/sv.es.js +2 -2
  110. package/dist/i18n/tr.amd.js +2 -2
  111. package/dist/i18n/tr.cjs.js +2 -2
  112. package/dist/i18n/tr.es.js +2 -2
  113. package/dist/i18n/uk.amd.js +2 -2
  114. package/dist/i18n/uk.cjs.js +2 -2
  115. package/dist/i18n/uk.es.js +2 -2
  116. package/dist/i18n/vi.amd.js +2 -2
  117. package/dist/i18n/vi.cjs.js +2 -2
  118. package/dist/i18n/vi.es.js +2 -2
  119. package/dist/i18n/zh-cn.amd.js +2 -2
  120. package/dist/i18n/zh-cn.cjs.js +2 -2
  121. package/dist/i18n/zh-cn.es.js +2 -2
  122. package/dist/i18n/zh-hk.amd.js +2 -2
  123. package/dist/i18n/zh-hk.cjs.js +2 -2
  124. package/dist/i18n/zh-hk.es.js +2 -2
  125. package/dist/vue-cal.amd.js +4 -4
  126. package/dist/vue-cal.cjs.js +4 -4
  127. package/dist/vue-cal.es.js +76 -93
  128. package/dist/vue-cal.iife.js +2 -6
  129. package/dist/vuecal.css +1 -0
  130. package/package.json +35 -25
  131. package/dist/vue-cal.css +0 -1
@@ -1,28 +1,11 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a2, b2) => {
9
- for (var prop in b2 || (b2 = {}))
10
- if (__hasOwnProp.call(b2, prop))
11
- __defNormalProp(a2, prop, b2[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b2)) {
14
- if (__propIsEnum.call(b2, prop))
15
- __defNormalProp(a2, prop, b2[prop]);
16
- }
17
- return a2;
18
- };
19
- var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
3
  var __publicField = (obj, key, value) => {
21
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
5
  return value;
23
6
  };
24
- /*!
25
- * vue-cal v4.3.1
7
+ /**
8
+ * vue-cal v4.3.4
26
9
  * (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
27
10
  * @license MIT
28
11
  */
@@ -44,7 +27,7 @@ class O {
44
27
  __publicField(this, "minutesAtCursor", (e2) => {
45
28
  let t2 = 0, s2 = { x: 0, y: 0 };
46
29
  const { timeStep: i2, timeCellHeight: n2, timeFrom: a2 } = this._vuecal.$props;
47
- return typeof e2 == "number" ? t2 = e2 : typeof e2 == "object" && (s2 = this.getPosition(e2), t2 = Math.round(s2.y * i2 / parseInt(n2) + a2)), { minutes: Math.max(Math.min(t2, 1440), 0), cursorCoords: s2 };
30
+ return "number" == typeof e2 ? t2 = e2 : "object" == typeof e2 && (s2 = this.getPosition(e2), t2 = Math.round(s2.y * i2 / parseInt(n2) + a2)), { minutes: Math.max(Math.min(t2, 1440), 0), cursorCoords: s2 };
48
31
  });
49
32
  this._vuecal = e2;
50
33
  }
@@ -57,12 +40,12 @@ class W {
57
40
  this._vuecal = e2, $ = t2;
58
41
  }
59
42
  createAnEvent(e2, t2, s2) {
60
- if (typeof e2 == "string" && (e2 = $.stringToDate(e2)), !(e2 instanceof Date))
43
+ if ("string" == typeof e2 && (e2 = $.stringToDate(e2)), !(e2 instanceof Date))
61
44
  return false;
62
45
  const i2 = $.dateToMinutes(e2), n2 = i2 + (t2 = 1 * t2 || 120), a2 = $.addMinutes(new Date(e2), t2);
63
- s2.end && (typeof s2.end == "string" && (s2.end = $.stringToDate(s2.end)), s2.endTimeMinutes = $.dateToMinutes(s2.end));
64
- const l2 = __spreadValues(__spreadProps(__spreadValues({}, this.eventDefaults), { _eid: `${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`, start: e2, startTimeMinutes: i2, end: a2, endTimeMinutes: n2, segments: null }), s2);
65
- return typeof this._vuecal.onEventCreate != "function" || this._vuecal.onEventCreate(l2, () => this.deleteAnEvent(l2)) ? (l2.startDateF !== l2.endDateF && (l2.daysCount = $.countDays(l2.start, l2.end)), this._vuecal.mutableEvents.push(l2), this._vuecal.addEventsToView([l2]), this._vuecal.emitWithEvent("event-create", l2), this._vuecal.$emit("event-change", { event: this._vuecal.cleanupEvent(l2), originalEvent: null }), l2) : void 0;
46
+ s2.end && ("string" == typeof s2.end && (s2.end = $.stringToDate(s2.end)), s2.endTimeMinutes = $.dateToMinutes(s2.end));
47
+ const l2 = { ...this.eventDefaults, _eid: `${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`, start: e2, startTimeMinutes: i2, end: a2, endTimeMinutes: n2, segments: null, ...s2 };
48
+ return "function" != typeof this._vuecal.onEventCreate || this._vuecal.onEventCreate(l2, () => this.deleteAnEvent(l2)) ? (l2.startDateF !== l2.endDateF && (l2.daysCount = $.countDays(l2.start, l2.end)), this._vuecal.mutableEvents.push(l2), this._vuecal.addEventsToView([l2]), this._vuecal.emitWithEvent("event-create", l2), this._vuecal.$emit("event-change", { event: this._vuecal.cleanupEvent(l2), originalEvent: null }), l2) : void 0;
66
49
  }
67
50
  addEventSegment(e2) {
68
51
  e2.segments || (e2.segments = {}, e2.segments[$.formatDateLite(e2.start)] = { start: e2.start, startTimeMinutes: e2.startTimeMinutes, endTimeMinutes: 1440, isFirstDay: true, isLastDay: false });
@@ -146,22 +129,22 @@ var z = (e2, t2) => {
146
129
  var I = z({ inject: ["vuecal", "utils", "view"], props: { transitionDirection: { type: String, default: "right" }, weekDays: { type: Array, default: () => [] }, switchToNarrowerView: { type: Function, default: () => {
147
130
  } } }, methods: { selectCell(e2, t2) {
148
131
  e2.getTime() !== this.view.selectedDate.getTime() && (this.view.selectedDate = e2), this.utils.cell.selectCell(false, e2, t2);
149
- }, cleanupHeading: (e2) => __spreadValues({ label: e2.full, date: e2.date }, e2.today ? { today: e2.today } : {}) }, computed: { headings() {
132
+ }, cleanupHeading: (e2) => ({ label: e2.full, date: e2.date, ...e2.today ? { today: e2.today } : {} }) }, computed: { headings() {
150
133
  if (!["month", "week"].includes(this.view.id))
151
134
  return [];
152
135
  let e2 = false;
153
136
  return this.weekDays.map((t2, s2) => {
154
137
  const i2 = this.utils.date.addDays(this.view.startDate, s2);
155
- return __spreadValues({ hide: t2.hide, full: t2.label, small: t2.short || t2.label.substr(0, 3), xsmall: t2.short || t2.label.substr(0, 1) }, this.view.id === "week" ? { dayOfMonth: i2.getDate(), date: i2, today: !e2 && this.utils.date.isToday(i2) && !e2++ } : {});
138
+ return { hide: t2.hide, full: t2.label, small: t2.short || t2.label.substr(0, 3), xsmall: t2.short || t2.label.substr(0, 1), ..."week" === this.view.id ? { dayOfMonth: i2.getDate(), date: i2, today: !e2 && this.utils.date.isToday(i2) && !e2++ } : {} };
156
139
  });
157
140
  }, cellWidth() {
158
141
  return 100 / (7 - this.weekDays.reduce((e2, t2) => e2 + t2.hide, 0));
159
142
  }, weekdayCellStyles() {
160
- return __spreadValues({}, this.vuecal.hideWeekdays.length ? { width: `${this.cellWidth}%` } : {});
143
+ return { ...this.vuecal.hideWeekdays.length ? { width: `${this.cellWidth}%` } : {} };
161
144
  }, cellHeadingsClickable() {
162
- return this.view.id === "week" && (this.vuecal.clickToNavigate || this.vuecal.dblclickToNavigate);
145
+ return "week" === this.view.id && (this.vuecal.clickToNavigate || this.vuecal.dblclickToNavigate);
163
146
  } } }, [["render", function(p2, m2, w2, y2, D2, g2) {
164
- return e(), t("div", j, [(e(true), t(s, null, i(g2.headings, (y3, D3) => (e(), t(s, { key: D3 }, [y3.hide ? c("", true) : (e(), t("div", { key: 0, class: n(["vuecal__flex vuecal__heading", { today: y3.today, clickable: g2.cellHeadingsClickable }]), style: a(g2.weekdayCellStyles), onClick: (e2) => g2.view.id === "week" && g2.selectCell(y3.date, e2), onDblclick: m2[0] || (m2[0] = (e2) => g2.view.id === "week" && g2.vuecal.dblclickToNavigate && w2.switchToNarrowerView()) }, [l(r, { name: `slide-fade--${w2.transitionDirection}`, appear: g2.vuecal.transitions }, { default: o(() => [(e(), t("div", { class: "vuecal__flex", column: "", key: !!g2.vuecal.transitions && `${D3}-${y3.dayOfMonth}` }, [d("div", V, [u(p2.$slots, "weekday-heading", { heading: g2.cleanupHeading(y3), view: g2.view }, () => [d("span", Y, h(y3.full), 1), d("span", L, h(y3.small), 1), d("span", F, h(y3.xsmall), 1), y3.dayOfMonth ? (e(), t("span", B, "\xA0" + h(y3.dayOfMonth), 1)) : c("", true)])]), g2.vuecal.hasSplits && g2.vuecal.stickySplitLabels ? (e(), t("div", N, [(e(true), t(s, null, i(g2.vuecal.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(p2.$slots, "split-label", { split: s2, view: g2.view }, () => [v(h(s2.label), 1)])], 2))), 128))])) : c("", true)]))]), _: 2 }, 1032, ["name", "appear"])], 46, A))], 64))), 128))]);
147
+ return e(), t("div", j, [(e(true), t(s, null, i(g2.headings, (y3, D3) => (e(), t(s, { key: D3 }, [y3.hide ? c("", true) : (e(), t("div", { key: 0, class: n(["vuecal__flex vuecal__heading", { today: y3.today, clickable: g2.cellHeadingsClickable }]), style: a(g2.weekdayCellStyles), onClick: (e2) => "week" === g2.view.id && g2.selectCell(y3.date, e2), onDblclick: m2[0] || (m2[0] = (e2) => "week" === g2.view.id && g2.vuecal.dblclickToNavigate && w2.switchToNarrowerView()) }, [l(r, { name: `slide-fade--${w2.transitionDirection}`, appear: g2.vuecal.transitions }, { default: o(() => [(e(), t("div", { class: "vuecal__flex", column: "", key: !!g2.vuecal.transitions && `${D3}-${y3.dayOfMonth}` }, [d("div", V, [u(p2.$slots, "weekday-heading", { heading: g2.cleanupHeading(y3), view: g2.view }, () => [d("span", Y, h(y3.full), 1), d("span", L, h(y3.small), 1), d("span", F, h(y3.xsmall), 1), y3.dayOfMonth ? (e(), t("span", B, "\xA0" + h(y3.dayOfMonth), 1)) : c("", true)])]), g2.vuecal.hasSplits && g2.vuecal.stickySplitLabels ? (e(), t("div", N, [(e(true), t(s, null, i(g2.vuecal.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(p2.$slots, "split-label", { split: s2, view: g2.view }, () => [v(h(s2.label), 1)])], 2))), 128))])) : c("", true)]))]), _: 2 }, 1032, ["name", "appear"])], 46, A))], 64))), 128))]);
165
148
  }]]);
166
149
  const P = { class: "vuecal__header" }, U = { key: 0, class: "vuecal__flex vuecal__menu", role: "tablist", "aria-label": "Calendar views navigation" }, R = ["onDragenter", "onDragleave", "onClick", "aria-label"], q = { key: 1, class: "vuecal__title-bar" }, K = ["aria-label"], X = { class: "vuecal__flex vuecal__title", grow: "" }, G = ["aria-label"], Z = { key: 0, class: "vuecal__flex vuecal__split-days-headers" };
167
150
  var J = z({ inject: ["vuecal", "previous", "next", "switchView", "updateSelectedDate", "modules", "view"], components: { WeekdaysHeadings: I }, props: { options: { type: Object, default: () => ({}) }, editEvents: { type: Object, required: true }, hasSplits: { type: [Boolean, Number], default: false }, daySplits: { type: Array, default: () => [] }, viewProps: { type: Object, default: () => ({}) }, weekDays: { type: Array, default: () => [] }, switchToNarrowerView: { type: Function, default: () => {
@@ -177,12 +160,12 @@ var J = z({ inject: ["vuecal", "previous", "next", "switchView", "updateSelected
177
160
  const { enabledViews: e2 } = this.vuecal;
178
161
  return e2[e2.indexOf(this.view.id) - 1];
179
162
  }, showDaySplits() {
180
- return this.view.id === "day" && this.hasSplits && this.options.stickySplitLabels && !this.options.minSplitWidth;
163
+ return "day" === this.view.id && this.hasSplits && this.options.stickySplitLabels && !this.options.minSplitWidth;
181
164
  }, dnd() {
182
165
  return this.modules.dnd;
183
166
  } } }, [["render", function(a2, D2, g2, f2, _2, b2) {
184
167
  const k2 = p("weekdays-headings");
185
- return e(), t("div", P, [g2.options.hideViewSelector ? c("", true) : (e(), t("div", U, [(e(true), t(s, null, i(g2.viewProps.views, (i2, l2) => (e(), t(s, { key: l2 }, [i2.enabled ? (e(), t("button", { key: 0, class: n(["vuecal__view-btn", { "vuecal__view-btn--active": b2.view.id === l2, "vuecal__view-btn--highlighted": a2.highlightedControl === l2 }]), type: "button", onDragenter: (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, l2, a2.$data), onDragleave: (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, l2, a2.$data), onClick: (e2) => b2.switchView(l2, null, true), "aria-label": `${i2.label} view` }, h(i2.label), 43, R)) : c("", true)], 64))), 128))])), g2.options.hideTitleBar ? c("", true) : (e(), t("div", q, [d("button", { class: n(["vuecal__arrow vuecal__arrow--prev", { "vuecal__arrow--highlighted": a2.highlightedControl === "previous" }]), type: "button", onClick: D2[0] || (D2[0] = (...e2) => b2.previous && b2.previous(...e2)), onDragenter: D2[1] || (D2[1] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "previous", a2.$data)), onDragleave: D2[2] || (D2[2] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "previous", a2.$data)), "aria-label": `Previous ${b2.view.id}` }, [u(a2.$slots, "arrow-prev")], 42, K), d("div", X, [l(r, { name: g2.options.transitions ? `slide-fade--${b2.transitionDirection}` : "" }, { default: o(() => [(e(), m(w(b2.broaderView ? "button" : "span"), { type: !!b2.broaderView && "button", key: `${b2.view.id}${b2.view.startDate.toString()}`, onClick: D2[3] || (D2[3] = (e2) => !!b2.broaderView && b2.switchToBroaderView()), "aria-label": !!b2.broaderView && `Go to ${b2.broaderView} view` }, { default: o(() => [u(a2.$slots, "title")]), _: 3 }, 8, ["type", "aria-label"]))]), _: 3 }, 8, ["name"])]), g2.options.todayButton ? (e(), t("button", { key: 0, class: n(["vuecal__today-btn", { "vuecal__today-btn--highlighted": a2.highlightedControl === "today" }]), type: "button", onClick: D2[4] || (D2[4] = (...e2) => b2.goToToday && b2.goToToday(...e2)), onDragenter: D2[5] || (D2[5] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "today", a2.$data)), onDragleave: D2[6] || (D2[6] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "today", a2.$data)), "aria-label": "Today" }, [u(a2.$slots, "today-button")], 34)) : c("", true), d("button", { class: n(["vuecal__arrow vuecal__arrow--next", { "vuecal__arrow--highlighted": a2.highlightedControl === "next" }]), type: "button", onClick: D2[7] || (D2[7] = (...e2) => b2.next && b2.next(...e2)), onDragenter: D2[8] || (D2[8] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "next", a2.$data)), onDragleave: D2[9] || (D2[9] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "next", a2.$data)), "aria-label": `Next ${b2.view.id}` }, [u(a2.$slots, "arrow-next")], 42, G)])), g2.viewProps.weekDaysInHeader ? (e(), m(k2, { key: 2, "week-days": g2.weekDays, "transition-direction": b2.transitionDirection, "switch-to-narrower-view": g2.switchToNarrowerView }, y({ _: 2 }, [a2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(a2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, a2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(a2.$slots, "split-label", { split: e2, view: b2.view })]) } : void 0]), 1032, ["week-days", "transition-direction", "switch-to-narrower-view"])) : c("", true), l(r, { name: `slide-fade--${b2.transitionDirection}` }, { default: o(() => [b2.showDaySplits ? (e(), t("div", Z, [(e(true), t(s, null, i(g2.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(a2.$slots, "split-label", { split: s2, view: b2.view.id }, () => [v(h(s2.label), 1)])], 2))), 128))])) : c("", true)]), _: 3 }, 8, ["name"])]);
168
+ return e(), t("div", P, [g2.options.hideViewSelector ? c("", true) : (e(), t("div", U, [(e(true), t(s, null, i(g2.viewProps.views, (i2, l2) => (e(), t(s, { key: l2 }, [i2.enabled ? (e(), t("button", { key: 0, class: n(["vuecal__view-btn", { "vuecal__view-btn--active": b2.view.id === l2, "vuecal__view-btn--highlighted": a2.highlightedControl === l2 }]), type: "button", onDragenter: (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, l2, a2.$data), onDragleave: (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, l2, a2.$data), onClick: (e2) => b2.switchView(l2, null, true), "aria-label": `${i2.label} view` }, h(i2.label), 43, R)) : c("", true)], 64))), 128))])), g2.options.hideTitleBar ? c("", true) : (e(), t("div", q, [d("button", { class: n(["vuecal__arrow vuecal__arrow--prev", { "vuecal__arrow--highlighted": "previous" === a2.highlightedControl }]), type: "button", onClick: D2[0] || (D2[0] = (...e2) => b2.previous && b2.previous(...e2)), onDragenter: D2[1] || (D2[1] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "previous", a2.$data)), onDragleave: D2[2] || (D2[2] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "previous", a2.$data)), "aria-label": `Previous ${b2.view.id}` }, [u(a2.$slots, "arrow-prev")], 42, K), d("div", X, [l(r, { name: g2.options.transitions ? `slide-fade--${b2.transitionDirection}` : "" }, { default: o(() => [(e(), m(w(b2.broaderView ? "button" : "span"), { type: !!b2.broaderView && "button", key: `${b2.view.id}${b2.view.startDate.toString()}`, onClick: D2[3] || (D2[3] = (e2) => !!b2.broaderView && b2.switchToBroaderView()), "aria-label": !!b2.broaderView && `Go to ${b2.broaderView} view` }, { default: o(() => [u(a2.$slots, "title")]), _: 3 }, 8, ["type", "aria-label"]))]), _: 3 }, 8, ["name"])]), g2.options.todayButton ? (e(), t("button", { key: 0, class: n(["vuecal__today-btn", { "vuecal__today-btn--highlighted": "today" === a2.highlightedControl }]), type: "button", onClick: D2[4] || (D2[4] = (...e2) => b2.goToToday && b2.goToToday(...e2)), onDragenter: D2[5] || (D2[5] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "today", a2.$data)), onDragleave: D2[6] || (D2[6] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "today", a2.$data)), "aria-label": "Today" }, [u(a2.$slots, "today-button")], 34)) : c("", true), d("button", { class: n(["vuecal__arrow vuecal__arrow--next", { "vuecal__arrow--highlighted": "next" === a2.highlightedControl }]), type: "button", onClick: D2[7] || (D2[7] = (...e2) => b2.next && b2.next(...e2)), onDragenter: D2[8] || (D2[8] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragEnter(e2, "next", a2.$data)), onDragleave: D2[9] || (D2[9] = (e2) => g2.editEvents.drag && b2.dnd && b2.dnd.viewSelectorDragLeave(e2, "next", a2.$data)), "aria-label": `Next ${b2.view.id}` }, [u(a2.$slots, "arrow-next")], 42, G)])), g2.viewProps.weekDaysInHeader ? (e(), m(k2, { key: 2, "week-days": g2.weekDays, "transition-direction": b2.transitionDirection, "switch-to-narrower-view": g2.switchToNarrowerView }, y({ _: 2 }, [a2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(a2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, a2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(a2.$slots, "split-label", { split: e2, view: b2.view })]) } : void 0]), 1032, ["week-days", "transition-direction", "switch-to-narrower-view"])) : c("", true), l(r, { name: `slide-fade--${b2.transitionDirection}` }, { default: o(() => [b2.showDaySplits ? (e(), t("div", Z, [(e(true), t(s, null, i(g2.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(a2.$slots, "split-label", { split: s2, view: b2.view.id }, () => [v(h(s2.label), 1)])], 2))), 128))])) : c("", true)]), _: 3 }, 8, ["name"])]);
186
169
  }]]);
187
170
  const Q = ["draggable"];
188
171
  const ee = { inject: ["vuecal", "utils", "modules", "view", "domEvents", "editEvents"], props: { cellFormattedDate: { type: String, default: "" }, event: { type: Object, default: () => ({}) }, cellEvents: { type: Array, default: () => [] }, overlaps: { type: Array, default: () => [] }, eventPosition: { type: Number, default: 0 }, overlapsStreak: { type: Number, default: 0 }, allDay: { type: Boolean, default: false } }, data: () => ({ touch: { dragThreshold: 30, startX: 0, startY: 0, dragged: false } }), methods: { onMouseDown(e2, t2 = false) {
@@ -201,17 +184,17 @@ const ee = { inject: ["vuecal", "utils", "modules", "view", "domEvents", "editEv
201
184
  }, onMouseLeave(e2) {
202
185
  e2.preventDefault(), this.vuecal.emitWithEvent("event-mouse-leave", this.event);
203
186
  }, onTouchMove(e2) {
204
- if (typeof this.vuecal.onEventClick != "function")
187
+ if ("function" != typeof this.vuecal.onEventClick)
205
188
  return;
206
189
  const { clientX: t2, clientY: s2 } = e2.touches[0], { startX: i2, startY: n2, dragThreshold: a2 } = this.touch;
207
190
  (Math.abs(t2 - i2) > a2 || Math.abs(s2 - n2) > a2) && (this.touch.dragged = true);
208
191
  }, onTouchStart(e2) {
209
192
  this.touch.startX = e2.touches[0].clientX, this.touch.startY = e2.touches[0].clientY, this.onMouseDown(e2, true);
210
193
  }, onEnterKeypress(e2) {
211
- if (typeof this.vuecal.onEventClick == "function")
194
+ if ("function" == typeof this.vuecal.onEventClick)
212
195
  return this.vuecal.onEventClick(this.event, e2);
213
196
  }, onDblClick(e2) {
214
- if (typeof this.vuecal.onEventDblclick == "function")
197
+ if ("function" == typeof this.vuecal.onEventDblclick)
215
198
  return this.vuecal.onEventDblclick(this.event, e2);
216
199
  }, onDragStart(e2) {
217
200
  this.dnd && this.dnd.eventDragStart(e2, this.event);
@@ -244,7 +227,7 @@ const ee = { inject: ["vuecal", "utils", "modules", "view", "domEvents", "editEv
244
227
  const n2 = Math.round(s2 * this.vuecal.timeCellHeight / this.vuecal.timeStep);
245
228
  return { top: i2, height: Math.max(n2 - i2, 5) };
246
229
  }, eventStyles() {
247
- if (this.event.allDay || !this.vuecal.time || !this.event.endTimeMinutes || this.view.id === "month" || this.allDay)
230
+ if (this.event.allDay || !this.vuecal.time || !this.event.endTimeMinutes || "month" === this.view.id || this.allDay)
248
231
  return {};
249
232
  let e2 = 100 / Math.min(this.overlaps.length + 1, this.overlapsStreak), t2 = 100 / (this.overlaps.length + 1) * this.eventPosition;
250
233
  this.vuecal.minEventWidth && e2 < this.vuecal.minEventWidth && (e2 = this.vuecal.minEventWidth, t2 = (100 - this.vuecal.minEventWidth) / this.overlaps.length * this.eventPosition);
@@ -257,10 +240,10 @@ const ee = { inject: ["vuecal", "utils", "modules", "view", "domEvents", "editEv
257
240
  return this.event.segments && this.event.segments[this.cellFormattedDate] || null;
258
241
  }, draggable() {
259
242
  const { draggable: e2, background: t2, daysCount: s2 } = this.event;
260
- return this.vuecal.editEvents.drag && e2 && !t2 && s2 === 1;
243
+ return this.vuecal.editEvents.drag && e2 && !t2 && 1 === s2;
261
244
  }, resizable() {
262
245
  const { editEvents: e2, time: t2 } = this.vuecal;
263
- return e2.resize && this.event.resizable && t2 && !this.allDay && (!this.segment || this.segment && this.segment.isLastDay) && this.view.id !== "month";
246
+ return e2.resize && this.event.resizable && t2 && !this.allDay && (!this.segment || this.segment && this.segment.isLastDay) && "month" !== this.view.id;
264
247
  }, dnd() {
265
248
  return this.modules.dnd;
266
249
  } } };
@@ -273,7 +256,7 @@ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], compon
273
256
  }, splitClasses(e2) {
274
257
  return { "vuecal__cell-split": true, "vuecal__cell-split--highlighted": this.highlightedSplit === e2.id, [e2.class]: !!e2.class };
275
258
  }, checkCellOverlappingEvents() {
276
- this.options.time && this.eventsCount && !this.splitsCount && (this.eventsCount === 1 ? (this.cellOverlaps = [], this.cellOverlapsStreak = 1) : [this.cellOverlaps, this.cellOverlapsStreak] = this.utils.event.checkCellOverlappingEvents(this.events, this.options));
259
+ this.options.time && this.eventsCount && !this.splitsCount && (1 === this.eventsCount ? (this.cellOverlaps = [], this.cellOverlapsStreak = 1) : [this.cellOverlaps, this.cellOverlapsStreak] = this.utils.event.checkCellOverlappingEvents(this.events, this.options));
277
260
  }, isDOMElementAnEvent(e2) {
278
261
  return this.vuecal.isDOMElementAnEvent(e2);
279
262
  }, selectCell(e2, t2 = false) {
@@ -331,13 +314,13 @@ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], compon
331
314
  const t2 = new Date(this.data.startDate), { cursorCoords: s2, minutes: i2 } = this.vuecal.minutesAtCursor(e2);
332
315
  t2.setMinutes(i2);
333
316
  const n2 = this.splitsCount ? this.getSplitAtCursor(e2) : null;
334
- this.vuecal.$emit("cell-contextmenu", __spreadProps(__spreadValues(__spreadValues({ date: t2 }, s2), n2 || {}), { e: e2 }));
317
+ this.vuecal.$emit("cell-contextmenu", { date: t2, ...s2, ...n2 || {}, e: e2 });
335
318
  } }, computed: { dnd() {
336
319
  return this.modules.dnd;
337
320
  }, nowInMinutes() {
338
321
  return this.utils.date.dateToMinutes(this.vuecal.now);
339
322
  }, isBeforeMinDate() {
340
- return this.minTimestamp !== null && this.minTimestamp > this.data.endDate.getTime();
323
+ return null !== this.minTimestamp && this.minTimestamp > this.data.endDate.getTime();
341
324
  }, isAfterMaxDate() {
342
325
  return this.maxTimestamp && this.maxTimestamp < this.data.startDate.getTime();
343
326
  }, isDisabled() {
@@ -346,7 +329,7 @@ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], compon
346
329
  }, isSelected: { get() {
347
330
  let e2 = false;
348
331
  const { selectedDate: t2 } = this.view;
349
- return e2 = this.view.id === "years" ? t2.getFullYear() === this.data.startDate.getFullYear() : this.view.id === "year" ? t2.getFullYear() === this.data.startDate.getFullYear() && t2.getMonth() === this.data.startDate.getMonth() : t2.getTime() === this.data.startDate.getTime(), e2;
332
+ return e2 = "years" === this.view.id ? t2.getFullYear() === this.data.startDate.getFullYear() : "year" === this.view.id ? t2.getFullYear() === this.data.startDate.getFullYear() && t2.getMonth() === this.data.startDate.getMonth() : t2.getTime() === this.data.startDate.getTime(), e2;
350
333
  }, set(e2) {
351
334
  this.view.selectedDate = e2;
352
335
  } }, isWeekOrDayView() {
@@ -356,16 +339,16 @@ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], compon
356
339
  }, specialHours() {
357
340
  return this.data.specialHours.map((e2) => {
358
341
  let { from: t2, to: s2 } = e2;
359
- return t2 = Math.max(t2, this.options.timeFrom), s2 = Math.min(s2, this.options.timeTo), __spreadProps(__spreadValues({}, e2), { height: (s2 - t2) * this.timeScale, top: (t2 - this.options.timeFrom) * this.timeScale });
342
+ return t2 = Math.max(t2, this.options.timeFrom), s2 = Math.min(s2, this.options.timeTo), { ...e2, height: (s2 - t2) * this.timeScale, top: (t2 - this.options.timeFrom) * this.timeScale };
360
343
  });
361
344
  }, events() {
362
345
  const { startDate: e2, endDate: t2 } = this.data;
363
346
  let s2 = [];
364
347
  if (!["years", "year"].includes(this.view.id) || this.options.eventsCountOnYearView) {
365
- if (s2 = this.view.events.slice(0), this.view.id === "month" && s2.push(...this.view.outOfScopeEvents), s2 = s2.filter((s3) => this.utils.event.eventInRange(s3, e2, t2)), this.options.showAllDayEvents && this.view.id !== "month" && (s2 = s2.filter((e3) => !!e3.allDay === this.allDay)), this.options.time && this.isWeekOrDayView && !this.allDay) {
348
+ if (s2 = this.view.events.slice(0), "month" === this.view.id && s2.push(...this.view.outOfScopeEvents), s2 = s2.filter((s3) => this.utils.event.eventInRange(s3, e2, t2)), this.options.showAllDayEvents && "month" !== this.view.id && (s2 = s2.filter((e3) => !!e3.allDay === this.allDay)), this.options.time && this.isWeekOrDayView && !this.allDay) {
366
349
  const { timeFrom: e3, timeTo: t3 } = this.options;
367
350
  s2 = s2.filter((s3) => {
368
- const i2 = s3.daysCount > 1 && s3.segments[this.data.formattedDate] || {}, n2 = s3.daysCount === 1 && s3.startTimeMinutes < t3 && s3.endTimeMinutes > e3, a2 = s3.daysCount > 1 && i2.startTimeMinutes < t3 && i2.endTimeMinutes > e3;
351
+ const i2 = s3.daysCount > 1 && s3.segments[this.data.formattedDate] || {}, n2 = 1 === s3.daysCount && s3.startTimeMinutes < t3 && s3.endTimeMinutes > e3, a2 = s3.daysCount > 1 && i2.startTimeMinutes < t3 && i2.endTimeMinutes > e3;
369
352
  return s3.allDay || n2 || a2 || false;
370
353
  });
371
354
  }
@@ -377,14 +360,14 @@ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], compon
377
360
  }, splits() {
378
361
  return this.cellSplits.map((e2, t2) => {
379
362
  const s2 = this.events.filter((t3) => t3.split === e2.id), [i2, n2] = this.utils.event.checkCellOverlappingEvents(s2.filter((e3) => !e3.background && !e3.allDay), this.options);
380
- return __spreadProps(__spreadValues({}, e2), { overlaps: i2, overlapsStreak: n2, events: s2 });
363
+ return { ...e2, overlaps: i2, overlapsStreak: n2, events: s2 };
381
364
  });
382
365
  }, splitsCount() {
383
366
  return this.splits.length;
384
367
  }, cellClasses() {
385
368
  return { [this.data.class]: !!this.data.class, "vuecal__cell--current": this.data.current, "vuecal__cell--today": this.data.today, "vuecal__cell--out-of-scope": this.data.outOfScope, "vuecal__cell--before-min": this.isDisabled && this.isBeforeMinDate, "vuecal__cell--after-max": this.isDisabled && this.isAfterMaxDate, "vuecal__cell--disabled": this.isDisabled, "vuecal__cell--selected": this.isSelected, "vuecal__cell--highlighted": this.highlighted, "vuecal__cell--has-splits": this.splitsCount, "vuecal__cell--has-events": this.eventsCount };
386
369
  }, cellStyles() {
387
- return __spreadValues({}, this.cellWidth ? { width: `${this.cellWidth}%` } : {});
370
+ return { ...this.cellWidth ? { width: `${this.cellWidth}%` } : {} };
388
371
  }, timelineVisible() {
389
372
  const { time: e2, timeTo: t2 } = this.options;
390
373
  return this.data.today && this.isWeekOrDayView && e2 && !this.allDay && this.nowInMinutes <= t2;
@@ -397,7 +380,7 @@ var ne = z({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], compon
397
380
  return this.options.timeCellHeight / this.options.timeStep;
398
381
  } } }, [["render", function(l2, r2, d2, h2, v2, w2) {
399
382
  const y2 = p("event");
400
- return e(), m(f, { class: n(["vuecal__cell", w2.cellClasses]), name: `slide-fade--${w2.transitionDirection}`, tag: "div", appear: d2.options.transitions, style: a(w2.cellStyles) }, { default: o(() => [(e(true), t(s, null, i(w2.splitsCount ? w2.splits : 1, (h3, v3) => (e(), t("div", { class: n(["vuecal__flex vuecal__cell-content", w2.splitsCount && w2.splitClasses(h3)]), key: d2.options.transitions ? `${w2.view.id}-${d2.data.content}-${v3}` : v3, "data-split": !!w2.splitsCount && h3.id, column: "", tabindex: "0", "aria-label": d2.data.content, onFocus: r2[0] || (r2[0] = (e2) => w2.onCellFocus(e2)), onKeypress: r2[1] || (r2[1] = D((e2) => w2.onCellkeyPressEnter(e2), ["enter"])), onTouchstart: (e2) => !w2.isDisabled && w2.onCellTouchStart(e2, w2.splitsCount ? h3.id : null), onMousedown: (e2) => !w2.isDisabled && w2.onCellMouseDown(e2, w2.splitsCount ? h3.id : null), onClick: r2[2] || (r2[2] = (e2) => !w2.isDisabled && w2.onCellClick(e2)), onDblclick: r2[3] || (r2[3] = (e2) => !w2.isDisabled && w2.onCellDblClick(e2)), onContextmenu: r2[4] || (r2[4] = (e2) => !w2.isDisabled && d2.options.cellContextmenu && w2.onCellContextMenu(e2)), onDragenter: r2[5] || (r2[5] = (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragEnter(e2, l2.$data, d2.data.startDate)), onDragover: (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragOver(e2, l2.$data, d2.data.startDate, w2.splitsCount ? h3.id : null), onDragleave: r2[6] || (r2[6] = (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragLeave(e2, l2.$data, d2.data.startDate)), onDrop: (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragDrop(e2, l2.$data, d2.data.startDate, w2.splitsCount ? h3.id : null) }, [w2.isWeekOrDayView && !d2.allDay && w2.specialHours.length ? (e(true), t(s, { key: 0 }, i(w2.specialHours, (s2, i2) => (e(), t("div", { class: n(["vuecal__special-hours", `vuecal__special-hours--day${s2.day} ${s2.class}`]), style: a(`height: ${s2.height}px;top: ${s2.top}px`) }, null, 6))), 256)) : c("", true), u(l2.$slots, "cell-content", { events: w2.events, selectCell: (e2) => w2.selectCell(e2, true), split: !!w2.splitsCount && h3 }), w2.eventsCount && (w2.isWeekOrDayView || w2.view.id === "month" && d2.options.eventsOnMonthView) ? (e(), t("div", se, [(e(true), t(s, null, i(w2.splitsCount ? h3.events : w2.events, (t2, s2) => (e(), m(y2, { key: s2, "cell-formatted-date": d2.data.formattedDate, event: t2, "all-day": d2.allDay, "cell-events": w2.splitsCount ? h3.events : w2.events, overlaps: ((w2.splitsCount ? h3.overlaps[t2._eid] : l2.cellOverlaps[t2._eid]) || []).overlaps, "event-position": ((w2.splitsCount ? h3.overlaps[t2._eid] : l2.cellOverlaps[t2._eid]) || []).position, "overlaps-streak": w2.splitsCount ? h3.overlapsStreak : l2.cellOverlapsStreak }, { event: o(({ event: e2, view: t3 }) => [u(l2.$slots, "event", { view: t3, event: e2 })]), _: 2 }, 1032, ["cell-formatted-date", "event", "all-day", "cell-events", "overlaps", "event-position", "overlaps-streak"]))), 128))])) : c("", true)], 42, te))), 128)), w2.timelineVisible ? (e(), t("div", { class: "vuecal__now-line", style: a(`top: ${w2.todaysTimePosition}px`), key: d2.options.transitions ? `${w2.view.id}-now-line` : "now-line", title: w2.utils.date.formatTime(w2.vuecal.now) }, null, 12, ie)) : c("", true)]), _: 3 }, 8, ["class", "name", "appear", "style"]);
383
+ return e(), m(f, { class: n(["vuecal__cell", w2.cellClasses]), name: `slide-fade--${w2.transitionDirection}`, tag: "div", appear: d2.options.transitions, style: a(w2.cellStyles) }, { default: o(() => [(e(true), t(s, null, i(w2.splitsCount ? w2.splits : 1, (h3, v3) => (e(), t("div", { class: n(["vuecal__flex vuecal__cell-content", w2.splitsCount && w2.splitClasses(h3)]), key: d2.options.transitions ? `${w2.view.id}-${d2.data.content}-${v3}` : v3, "data-split": !!w2.splitsCount && h3.id, column: "", tabindex: "0", "aria-label": d2.data.content, onFocus: r2[0] || (r2[0] = (e2) => w2.onCellFocus(e2)), onKeypress: r2[1] || (r2[1] = D((e2) => w2.onCellkeyPressEnter(e2), ["enter"])), onTouchstart: (e2) => !w2.isDisabled && w2.onCellTouchStart(e2, w2.splitsCount ? h3.id : null), onMousedown: (e2) => !w2.isDisabled && w2.onCellMouseDown(e2, w2.splitsCount ? h3.id : null), onClick: r2[2] || (r2[2] = (e2) => !w2.isDisabled && w2.onCellClick(e2)), onDblclick: r2[3] || (r2[3] = (e2) => !w2.isDisabled && w2.onCellDblClick(e2)), onContextmenu: r2[4] || (r2[4] = (e2) => !w2.isDisabled && d2.options.cellContextmenu && w2.onCellContextMenu(e2)), onDragenter: r2[5] || (r2[5] = (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragEnter(e2, l2.$data, d2.data.startDate)), onDragover: (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragOver(e2, l2.$data, d2.data.startDate, w2.splitsCount ? h3.id : null), onDragleave: r2[6] || (r2[6] = (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragLeave(e2, l2.$data, d2.data.startDate)), onDrop: (e2) => !w2.isDisabled && d2.editEvents.drag && w2.dnd && w2.dnd.cellDragDrop(e2, l2.$data, d2.data.startDate, w2.splitsCount ? h3.id : null) }, [w2.isWeekOrDayView && !d2.allDay && w2.specialHours.length ? (e(true), t(s, { key: 0 }, i(w2.specialHours, (s2, i2) => (e(), t("div", { class: n(["vuecal__special-hours", `vuecal__special-hours--day${s2.day} ${s2.class}`]), style: a(`height: ${s2.height}px;top: ${s2.top}px`) }, null, 6))), 256)) : c("", true), u(l2.$slots, "cell-content", { events: w2.events, selectCell: (e2) => w2.selectCell(e2, true), split: !!w2.splitsCount && h3 }), w2.eventsCount && (w2.isWeekOrDayView || "month" === w2.view.id && d2.options.eventsOnMonthView) ? (e(), t("div", se, [(e(true), t(s, null, i(w2.splitsCount ? h3.events : w2.events, (t2, s2) => (e(), m(y2, { key: s2, "cell-formatted-date": d2.data.formattedDate, event: t2, "all-day": d2.allDay, "cell-events": w2.splitsCount ? h3.events : w2.events, overlaps: ((w2.splitsCount ? h3.overlaps[t2._eid] : l2.cellOverlaps[t2._eid]) || []).overlaps, "event-position": ((w2.splitsCount ? h3.overlaps[t2._eid] : l2.cellOverlaps[t2._eid]) || []).position, "overlaps-streak": w2.splitsCount ? h3.overlapsStreak : l2.cellOverlapsStreak }, { event: o(({ event: e2, view: t3 }) => [u(l2.$slots, "event", { view: t3, event: e2 })]), _: 2 }, 1032, ["cell-formatted-date", "event", "all-day", "cell-events", "overlaps", "event-position", "overlaps-streak"]))), 128))])) : c("", true)], 42, te))), 128)), w2.timelineVisible ? (e(), t("div", { class: "vuecal__now-line", style: a(`top: ${w2.todaysTimePosition}px`), key: d2.options.transitions ? `${w2.view.id}-now-line` : "now-line", title: w2.utils.date.formatTime(w2.vuecal.now) }, null, 12, ie)) : c("", true)]), _: 3 }, 8, ["class", "name", "appear", "style"]);
401
384
  }]]);
402
385
  const ae = { key: 0, class: "vuecal__all-day-text", style: { width: "3em" } };
403
386
  var le = z({ inject: ["vuecal", "view", "editEvents"], components: { "vuecal-cell": ne }, props: { options: { type: Object, required: true }, cells: { type: Array, required: true }, label: { type: String, required: true }, daySplits: { type: Array, default: () => [] }, shortEvents: { type: Boolean, default: true }, height: { type: String, default: "" }, cellOrSplitMinWidth: { type: Number, default: null } }, computed: { hasCellOrSplitWidth() {
@@ -489,10 +472,10 @@ const Ne = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).f
489
472
  return s2.setDate(s2.getDate() - (s2.getDay() + i2) % 7), s2;
490
473
  }
491
474
  stringToDate(e2) {
492
- return e2 instanceof Date ? e2 : (e2.length === 10 && (e2 += " 00:00"), new Date(e2.replace(/-/g, "/")));
475
+ return e2 instanceof Date ? e2 : (10 === e2.length && (e2 += " 00:00"), new Date(e2.replace(/-/g, "/")));
493
476
  }
494
477
  countDays(e2, t2) {
495
- typeof e2 == "string" && (e2 = e2.replace(/-/g, "/")), typeof t2 == "string" && (t2 = t2.replace(/-/g, "/")), e2 = new Date(e2).setHours(0, 0, 0, 0), t2 = new Date(t2).setHours(0, 0, 1, 0);
478
+ "string" == typeof e2 && (e2 = e2.replace(/-/g, "/")), "string" == typeof t2 && (t2 = t2.replace(/-/g, "/")), e2 = new Date(e2).setHours(0, 0, 0, 0), t2 = new Date(t2).setHours(0, 0, 1, 0);
496
479
  const s2 = 60 * (new Date(t2).getTimezoneOffset() - new Date(e2).getTimezoneOffset()) * 1e3;
497
480
  return Math.ceil((t2 - e2 - s2) / 864e5);
498
481
  }
@@ -500,13 +483,13 @@ const Ne = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).f
500
483
  return Math.abs(e2.getTime() - t2.getTime()) <= 60 * s2 * 1e3;
501
484
  }
502
485
  formatDate(e2, t2 = "YYYY-MM-DD", s2 = null) {
503
- if (s2 || (s2 = this._texts), t2 || (t2 = "YYYY-MM-DD"), t2 === "YYYY-MM-DD")
486
+ if (s2 || (s2 = this._texts), t2 || (t2 = "YYYY-MM-DD"), "YYYY-MM-DD" === t2)
504
487
  return this.formatDateLite(e2);
505
488
  C = {}, S = {};
506
489
  const i2 = { YYYY: () => this._hydrateDateObject(e2, s2).YYYY, YY: () => this._hydrateDateObject(e2, s2).YY(), M: () => this._hydrateDateObject(e2, s2).M, MM: () => this._hydrateDateObject(e2, s2).MM(), MMM: () => this._hydrateDateObject(e2, s2).MMM(), MMMM: () => this._hydrateDateObject(e2, s2).MMMM(), MMMMG: () => this._hydrateDateObject(e2, s2).MMMMG(), D: () => this._hydrateDateObject(e2, s2).D, DD: () => this._hydrateDateObject(e2, s2).DD(), S: () => this._hydrateDateObject(e2, s2).S(), d: () => this._hydrateDateObject(e2, s2).d, dd: () => this._hydrateDateObject(e2, s2).dd(), ddd: () => this._hydrateDateObject(e2, s2).ddd(), dddd: () => this._hydrateDateObject(e2, s2).dddd(), HH: () => this._hydrateTimeObject(e2, s2).HH, H: () => this._hydrateTimeObject(e2, s2).H, hh: () => this._hydrateTimeObject(e2, s2).hh, h: () => this._hydrateTimeObject(e2, s2).h, am: () => this._hydrateTimeObject(e2, s2).am, AM: () => this._hydrateTimeObject(e2, s2).AM, mm: () => this._hydrateTimeObject(e2, s2).mm, m: () => this._hydrateTimeObject(e2, s2).m };
507
490
  return t2.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (e3, t3) => {
508
491
  const s3 = i2[t3.replace(/\{|\}/g, "")];
509
- return s3 !== void 0 ? s3() : t3;
492
+ return void 0 !== s3 ? s3() : t3;
510
493
  });
511
494
  }
512
495
  formatDateLite(e2) {
@@ -519,12 +502,12 @@ const Ne = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).f
519
502
  const [t3, s3, i3] = [e2.getHours(), e2.getMinutes(), e2.getSeconds()];
520
503
  t3 + s3 + i3 === 141 && (n2 = true);
521
504
  }
522
- if (e2 instanceof Date && t2 === "HH:mm")
505
+ if (e2 instanceof Date && "HH:mm" === t2)
523
506
  return n2 ? "24:00" : this.formatTimeLite(e2);
524
507
  S = {}, s2 || (s2 = this._texts);
525
508
  const a2 = this._hydrateTimeObject(e2, s2), l2 = t2.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (e3, t3) => {
526
509
  const s3 = a2[t3.replace(/\{|\}/g, "")];
527
- return s3 !== void 0 ? s3 : t3;
510
+ return void 0 !== s3 ? s3 : t3;
528
511
  });
529
512
  return n2 ? l2.replace("23:59", "24:00") : l2;
530
513
  }
@@ -557,17 +540,17 @@ const Ne = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).f
557
540
  return S;
558
541
  let s2, i2;
559
542
  e2 instanceof Date ? (s2 = e2.getHours(), i2 = e2.getMinutes()) : (s2 = Math.floor(e2 / 60), i2 = Math.floor(e2 % 60));
560
- const n2 = s2 % 12 ? s2 % 12 : 12, a2 = (t2 || { am: "am", pm: "pm" })[s2 === 24 || s2 < 12 ? "am" : "pm"];
543
+ const n2 = s2 % 12 ? s2 % 12 : 12, a2 = (t2 || { am: "am", pm: "pm" })[24 === s2 || s2 < 12 ? "am" : "pm"];
561
544
  return S = { H: s2, h: n2, HH: (s2 < 10 ? "0" : "") + s2, hh: (n2 < 10 ? "0" : "") + n2, am: a2, AM: a2.toUpperCase(), m: i2, mm: (i2 < 10 ? "0" : "") + i2 }, S;
562
545
  }
563
546
  }(Ne), Pe = { name: "vue-cal", components: { "vuecal-cell": ne, "vuecal-header": J, WeekdaysHeadings: I, AllDayBar: le }, provide() {
564
547
  return { vuecal: this, utils: this.utils, modules: this.modules, previous: this.previous, next: this.next, switchView: this.switchView, updateSelectedDate: this.updateSelectedDate, editEvents: this.editEvents, view: this.view, domEvents: this.domEvents };
565
548
  }, props: { activeView: { type: String, default: "week" }, allDayBarHeight: { type: [String, Number], default: "25px" }, cellClickHold: { type: Boolean, default: true }, cellContextmenu: { type: Boolean, default: false }, clickToNavigate: { type: Boolean, default: false }, dblclickToNavigate: { type: Boolean, default: true }, disableDatePrototypes: { type: Boolean, default: false }, disableDays: { type: Array, default: () => [] }, disableViews: { type: Array, default: () => [] }, dragToCreateEvent: { type: Boolean, default: true }, dragToCreateThreshold: { type: Number, default: 15 }, editableEvents: { type: [Boolean, Object], default: false }, events: { type: Array, default: () => [] }, eventsCountOnYearView: { type: Boolean, default: false }, eventsOnMonthView: { type: [Boolean, String], default: false }, hideBody: { type: Boolean, default: false }, hideTitleBar: { type: Boolean, default: false }, hideViewSelector: { type: Boolean, default: false }, hideWeekdays: { type: Array, default: () => [] }, hideWeekends: { type: Boolean, default: false }, locale: { type: [String, Object], default: "en" }, maxDate: { type: [String, Date], default: "" }, minCellWidth: { type: Number, default: 0 }, minDate: { type: [String, Date], default: "" }, minEventWidth: { type: Number, default: 0 }, minSplitWidth: { type: Number, default: 0 }, onEventClick: { type: [Function, null], default: null }, onEventCreate: { type: [Function, null], default: null }, onEventDblclick: { type: [Function, null], default: null }, overlapsPerTimeStep: { type: Boolean, default: false }, resizeX: { type: Boolean, default: false }, selectedDate: { type: [String, Date], default: "" }, showAllDayEvents: { type: [Boolean, String], default: false }, showWeekNumbers: { type: [Boolean, String], default: false }, snapToTime: { type: Number, default: 0 }, small: { type: Boolean, default: false }, specialHours: { type: Object, default: () => ({}) }, splitDays: { type: Array, default: () => [] }, startWeekOnSunday: { type: Boolean, default: false }, stickySplitLabels: { type: Boolean, default: false }, time: { type: Boolean, default: true }, timeCellHeight: { type: Number, default: 40 }, timeFormat: { type: String, default: "" }, timeFrom: { type: Number, default: 0 }, timeStep: { type: Number, default: 60 }, timeTo: { type: Number, default: 1440 }, todayButton: { type: Boolean, default: false }, transitions: { type: Boolean, default: true }, twelveHour: { type: Boolean, default: false }, watchRealTime: { type: Boolean, default: false }, xsmall: { type: Boolean, default: false } }, data() {
566
- return { ready: false, texts: __spreadValues({}, Ne), utils: { date: !!this.disableDatePrototypes && Ie.removePrototypes() || Ie, cell: null, event: null }, modules: { dnd: null }, cellsEl: null, view: { id: "", title: "", startDate: null, endDate: null, firstCellDate: null, lastCellDate: null, selectedDate: null, events: [] }, eventIdIncrement: 1, now: new Date(), timeTickerIds: [null, null], domEvents: { resizeAnEvent: { _eid: null, start: null, split: null, segment: null, originalEndTimeMinutes: 0, originalEnd: null, end: null, startCell: null, endCell: null }, dragAnEvent: { _eid: null }, dragCreateAnEvent: { startCursorY: null, start: null, split: null, event: null }, focusAnEvent: { _eid: null, mousedUp: false }, clickHoldAnEvent: { _eid: null, timeout: 1200, timeoutId: null }, dblTapACell: { taps: 0, timeout: 500 }, clickHoldACell: { cellId: null, split: null, timeout: 1200, timeoutId: null, eventCreated: false }, cancelClickEventCreation: false }, mutableEvents: [], transitionDirection: "right" };
549
+ return { ready: false, texts: { ...Ne }, utils: { date: !!this.disableDatePrototypes && Ie.removePrototypes() || Ie, cell: null, event: null }, modules: { dnd: null }, cellsEl: null, view: { id: "", title: "", startDate: null, endDate: null, firstCellDate: null, lastCellDate: null, selectedDate: null, events: [] }, eventIdIncrement: 1, now: new Date(), timeTickerIds: [null, null], domEvents: { resizeAnEvent: { _eid: null, start: null, split: null, segment: null, originalEndTimeMinutes: 0, originalEnd: null, end: null, startCell: null, endCell: null }, dragAnEvent: { _eid: null }, dragCreateAnEvent: { startCursorY: null, start: null, split: null, event: null }, focusAnEvent: { _eid: null, mousedUp: false }, clickHoldAnEvent: { _eid: null, timeout: 1200, timeoutId: null }, dblTapACell: { taps: 0, timeout: 500 }, clickHoldACell: { cellId: null, split: null, timeout: 1200, timeoutId: null, eventCreated: false }, cancelClickEventCreation: false }, mutableEvents: [], transitionDirection: "right" };
567
550
  }, methods: { async loadLocale(e2) {
568
- if (typeof this.locale == "object")
551
+ if ("object" == typeof this.locale)
569
552
  return this.texts = Object.assign({}, Ne, e2), void this.utils.date.updateTexts(this.texts);
570
- if (this.locale === "en") {
553
+ if ("en" === this.locale) {
571
554
  const e3 = await import("./i18n/en.es.js");
572
555
  this.texts = Object.assign({}, Ne, e3);
573
556
  } else
@@ -655,7 +638,7 @@ const Ne = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).f
655
638
  return import("./i18n/zh-hk.es.js");
656
639
  default:
657
640
  return new Promise(function(t2, s2) {
658
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s2.bind(null, new Error("Unknown variable dynamic import: " + e3)));
641
+ ("function" == typeof queueMicrotask ? queueMicrotask : setTimeout)(s2.bind(null, new Error("Unknown variable dynamic import: " + e3)));
659
642
  });
660
643
  }
661
644
  })(`./i18n/${e2}.json`).then((e3) => {
@@ -695,19 +678,19 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
695
678
  let e3 = new Date(this.view.startDate);
696
679
  if (e3.getDay() !== (this.startWeekOnSunday ? 0 : 1) && (e3 = i2.getPreviousFirstDayOfWeek(e3, this.startWeekOnSunday)), this.view.firstCellDate = e3, this.view.lastCellDate = i2.addDays(e3, 41), this.view.lastCellDate.setHours(23, 59, 59, 0), this.hideWeekends) {
697
680
  if ([0, 6].includes(this.view.firstCellDate.getDay())) {
698
- const e4 = this.view.firstCellDate.getDay() !== 6 || this.startWeekOnSunday ? 1 : 2;
681
+ const e4 = 6 !== this.view.firstCellDate.getDay() || this.startWeekOnSunday ? 1 : 2;
699
682
  this.view.firstCellDate = i2.addDays(this.view.firstCellDate, e4);
700
683
  }
701
684
  if ([0, 6].includes(this.view.startDate.getDay())) {
702
- const e4 = this.view.startDate.getDay() === 6 ? 2 : 1;
685
+ const e4 = 6 === this.view.startDate.getDay() ? 2 : 1;
703
686
  this.view.startDate = i2.addDays(this.view.startDate, e4);
704
687
  }
705
688
  if ([0, 6].includes(this.view.lastCellDate.getDay())) {
706
- const e4 = this.view.lastCellDate.getDay() !== 0 || this.startWeekOnSunday ? 1 : 2;
689
+ const e4 = 0 !== this.view.lastCellDate.getDay() || this.startWeekOnSunday ? 1 : 2;
707
690
  this.view.lastCellDate = i2.subtractDays(this.view.lastCellDate, e4);
708
691
  }
709
692
  if ([0, 6].includes(this.view.endDate.getDay())) {
710
- const e4 = this.view.endDate.getDay() === 0 ? 2 : 1;
693
+ const e4 = 0 === this.view.endDate.getDay() ? 2 : 1;
711
694
  this.view.endDate = i2.subtractDays(this.view.endDate, e4);
712
695
  }
713
696
  }
@@ -725,7 +708,7 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
725
708
  this.addEventsToView();
726
709
  const l2 = this.view.startDate && this.view.startDate.getTime();
727
710
  if ((a2 !== e2 || l2 !== n2) && (this.$emit("update:activeView", e2), this.ready)) {
728
- const t3 = this.view.startDate, s3 = __spreadValues(__spreadProps(__spreadValues({ view: e2, startDate: t3, endDate: this.view.endDate }, this.isMonthView ? { firstCellDate: this.view.firstCellDate, lastCellDate: this.view.lastCellDate, outOfScopeEvents: this.view.outOfScopeEvents.map(this.cleanupEvent) } : {}), { events: this.view.events.map(this.cleanupEvent) }), this.isWeekView ? { week: i2.getWeek(this.startWeekOnSunday ? i2.addDays(t3, 1) : t3) } : {});
711
+ const t3 = this.view.startDate, s3 = { view: e2, startDate: t3, endDate: this.view.endDate, ...this.isMonthView ? { firstCellDate: this.view.firstCellDate, lastCellDate: this.view.lastCellDate, outOfScopeEvents: this.view.outOfScopeEvents.map(this.cleanupEvent) } : {}, events: this.view.events.map(this.cleanupEvent), ...this.isWeekView ? { week: i2.getWeek(this.startWeekOnSunday ? i2.addDays(t3, 1) : t3) } : {} };
729
712
  this.$emit("view-change", s3);
730
713
  }
731
714
  }, previous() {
@@ -771,7 +754,7 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
771
754
  return e2.classList.contains("vuecal__event") || this.findAncestor(e2, "vuecal__event");
772
755
  }, onMouseMove(e2) {
773
756
  const { resizeAnEvent: t2, dragAnEvent: s2, dragCreateAnEvent: i2 } = this.domEvents;
774
- (t2._eid !== null || s2._eid !== null || i2.start) && (e2.preventDefault(), t2._eid ? this.eventResizing(e2) : this.dragToCreateEvent && i2.start && this.eventDragCreation(e2));
757
+ (null !== t2._eid || null !== s2._eid || i2.start) && (e2.preventDefault(), t2._eid ? this.eventResizing(e2) : this.dragToCreateEvent && i2.start && this.eventDragCreation(e2));
775
758
  }, onMouseUp(e2) {
776
759
  const { focusAnEvent: t2, resizeAnEvent: s2, clickHoldAnEvent: i2, clickHoldACell: n2, dragCreateAnEvent: a2 } = this.domEvents, { _eid: l2 } = i2, { _eid: r2 } = s2;
777
760
  let o2 = false;
@@ -783,30 +766,30 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
783
766
  if (o2 = i3 && i3 !== t3, n3 && n3.end.getTime() !== e3.getTime()) {
784
767
  const t4 = this.mutableEvents.find((e4) => e4._eid === s2._eid);
785
768
  t4.endTimeMinutes = n3.endTimeMinutes, t4.end = n3.end;
786
- const i4 = this.cleanupEvent(n3), a3 = __spreadProps(__spreadValues({}, this.cleanupEvent(n3)), { end: e3, endTimeMinutes: n3.originalEndTimeMinutes });
769
+ const i4 = this.cleanupEvent(n3), a3 = { ...this.cleanupEvent(n3), end: e3, endTimeMinutes: n3.originalEndTimeMinutes };
787
770
  this.$emit("event-duration-change", { event: i4, oldDate: s2.originalEnd, originalEvent: a3 }), this.$emit("event-change", { event: i4, originalEvent: a3 });
788
771
  }
789
772
  n3 && (n3.resizing = false), s2._eid = null, s2.start = null, s2.split = null, s2.segment = null, s2.originalEndTimeMinutes = null, s2.originalEnd = null, s2.endTimeMinutes = null, s2.startCell = null, s2.endCell = null;
790
773
  } else
791
774
  u2 && (d2 && (this.emitWithEvent("event-drag-create", d2), a2.event.resizing = false), a2.start = null, a2.split = null, a2.event = null);
792
775
  h2 || r2 || this.unfocusEvent(), i2.timeoutId && !l2 && (clearTimeout(i2.timeoutId), i2.timeoutId = null), n2.timeoutId && (clearTimeout(n2.timeoutId), n2.timeoutId = null);
793
- const v2 = typeof this.onEventClick == "function";
776
+ const v2 = "function" == typeof this.onEventClick;
794
777
  if (c2 && !o2 && !l2 && !d2 && v2) {
795
778
  let s3 = this.view.events.find((e3) => e3._eid === t2._eid);
796
779
  return !s3 && this.isMonthView && (s3 = this.view.outOfScopeEvents.find((e3) => e3._eid === t2._eid)), s3 && this.onEventClick(s3, e2);
797
780
  }
798
781
  }, onKeyUp(e2) {
799
- e2.keyCode === 27 && this.cancelDelete();
782
+ 27 === e2.keyCode && this.cancelDelete();
800
783
  }, eventResizing(e2) {
801
784
  const { resizeAnEvent: t2 } = this.domEvents, s2 = this.view.events.find((e3) => e3._eid === t2._eid) || { segments: {} }, { minutes: i2, cursorCoords: n2 } = this.minutesAtCursor(e2), a2 = s2.segments && s2.segments[t2.segment], { date: l2, event: r2 } = this.utils, o2 = Math.max(i2, this.timeFrom + 1, (a2 || s2).startTimeMinutes + 1);
802
785
  if (s2.endTimeMinutes = t2.endTimeMinutes = o2, this.snapToTime) {
803
786
  const e3 = s2.endTimeMinutes + this.snapToTime / 2;
804
787
  s2.endTimeMinutes = e3 - e3 % this.snapToTime;
805
788
  }
806
- if (a2 && (a2.endTimeMinutes = s2.endTimeMinutes), s2.end.setHours(0, s2.endTimeMinutes, s2.endTimeMinutes === 1440 ? -1 : 0, 0), this.resizeX && this.isWeekView) {
789
+ if (a2 && (a2.endTimeMinutes = s2.endTimeMinutes), s2.end.setHours(0, s2.endTimeMinutes, 1440 === s2.endTimeMinutes ? -1 : 0, 0), this.resizeX && this.isWeekView) {
807
790
  s2.daysCount = l2.countDays(s2.start, s2.end);
808
791
  const e3 = this.cellsEl, i3 = e3.offsetWidth / e3.childElementCount, a3 = Math.floor(n2.x / i3);
809
- if (t2.startCell === null && (t2.startCell = a3 - (s2.daysCount - 1)), t2.endCell !== a3) {
792
+ if (null === t2.startCell && (t2.startCell = a3 - (s2.daysCount - 1)), t2.endCell !== a3) {
810
793
  t2.endCell = a3;
811
794
  const e4 = l2.addDays(s2.start, a3 - t2.startCell), i4 = Math.max(l2.countDays(s2.start, e4), 1);
812
795
  if (i4 !== s2.daysCount) {
@@ -820,7 +803,7 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
820
803
  const { dragCreateAnEvent: t2 } = this.domEvents, { start: s2, startCursorY: i2, split: n2 } = t2, a2 = new Date(s2), { minutes: l2, cursorCoords: { y: r2 } } = this.minutesAtCursor(e2);
821
804
  if (t2.event || !(Math.abs(i2 - r2) < this.dragToCreateThreshold))
822
805
  if (t2.event) {
823
- if (a2.setHours(0, l2, l2 === 1440 ? -1 : 0, 0), this.snapToTime) {
806
+ if (a2.setHours(0, l2, 1440 === l2 ? -1 : 0, 0), this.snapToTime) {
824
807
  let e4 = 60 * a2.getHours() + a2.getMinutes();
825
808
  const t3 = e4 + this.snapToTime / 2;
826
809
  e4 = t3 - t3 % this.snapToTime, a2.setHours(0, e4, 0, 0);
@@ -847,31 +830,31 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
847
830
  const s2 = t2.title;
848
831
  t2.title = e2.target.innerHTML;
849
832
  const i2 = this.cleanupEvent(t2);
850
- this.$emit("event-title-change", { event: i2, oldTitle: s2 }), this.$emit("event-change", { event: i2, originalEvent: __spreadProps(__spreadValues({}, i2), { title: s2 }) });
833
+ this.$emit("event-title-change", { event: i2, oldTitle: s2 }), this.$emit("event-change", { event: i2, originalEvent: { ...i2, title: s2 } });
851
834
  }, updateMutableEvents() {
852
835
  const e2 = this.utils.date;
853
836
  this.mutableEvents = [], this.events.forEach((t2) => {
854
- const s2 = typeof t2.start == "string" ? e2.stringToDate(t2.start) : t2.start, i2 = e2.formatDateLite(s2), n2 = e2.dateToMinutes(s2);
837
+ const s2 = "string" == typeof t2.start ? e2.stringToDate(t2.start) : t2.start, i2 = e2.formatDateLite(s2), n2 = e2.dateToMinutes(s2);
855
838
  let a2 = null;
856
- typeof t2.end == "string" && t2.end.includes("24:00") ? (a2 = new Date(t2.end.replace(" 24:00", "")), a2.setHours(23, 59, 59, 0)) : a2 = typeof t2.end == "string" ? e2.stringToDate(t2.end) : t2.end;
839
+ "string" == typeof t2.end && t2.end.includes("24:00") ? (a2 = new Date(t2.end.replace(" 24:00", "")), a2.setHours(23, 59, 59, 0)) : a2 = "string" == typeof t2.end ? e2.stringToDate(t2.end) : t2.end;
857
840
  let l2 = e2.formatDateLite(a2), r2 = e2.dateToMinutes(a2);
858
- r2 && r2 !== 1440 || (!this.time || typeof t2.end == "string" && t2.end.length === 10 ? a2.setHours(23, 59, 59, 0) : a2.setSeconds(a2.getSeconds() - 1), l2 = e2.formatDateLite(a2), r2 = 1440);
841
+ r2 && 1440 !== r2 || (!this.time || "string" == typeof t2.end && 10 === t2.end.length ? a2.setHours(23, 59, 59, 0) : a2.setSeconds(a2.getSeconds() - 1), l2 = e2.formatDateLite(a2), r2 = 1440);
859
842
  const o2 = i2 !== l2;
860
- t2 = Object.assign(__spreadValues({}, this.utils.event.eventDefaults), t2, { _eid: `${this._.uid}_${this.eventIdIncrement++}`, segments: o2 ? {} : null, start: s2, startTimeMinutes: n2, end: a2, endTimeMinutes: r2, daysCount: o2 ? e2.countDays(s2, a2) : 1, class: t2.class }), this.mutableEvents.push(t2);
843
+ t2 = Object.assign({ ...this.utils.event.eventDefaults }, t2, { _eid: `${this._.uid}_${this.eventIdIncrement++}`, segments: o2 ? {} : null, start: s2, startTimeMinutes: n2, end: a2, endTimeMinutes: r2, daysCount: o2 ? e2.countDays(s2, a2) : 1, class: t2.class }), this.mutableEvents.push(t2);
861
844
  });
862
845
  }, minutesAtCursor(e2) {
863
846
  return this.utils.cell.minutesAtCursor(e2);
864
847
  }, createEvent(e2, t2, s2 = {}) {
865
848
  return this.utils.event.createAnEvent(e2, t2, s2);
866
849
  }, cleanupEvent(e2) {
867
- e2 = __spreadValues({}, e2);
850
+ e2 = { ...e2 };
868
851
  return ["segments", "deletable", "deleting", "titleEditable", "resizable", "resizing", "draggable", "dragging", "draggingStatic", "focused"].forEach((t2) => {
869
852
  t2 in e2 && delete e2[t2];
870
853
  }), e2.repeat || delete e2.repeat, e2;
871
854
  }, emitWithEvent(e2, t2) {
872
855
  this.$emit(e2, this.cleanupEvent(t2));
873
856
  }, updateSelectedDate(e2) {
874
- if ((e2 = e2 && typeof e2 == "string" ? this.utils.date.stringToDate(e2) : new Date(e2)) && e2 instanceof Date) {
857
+ if ((e2 = e2 && "string" == typeof e2 ? this.utils.date.stringToDate(e2) : new Date(e2)) && e2 instanceof Date) {
875
858
  const { selectedDate: t2 } = this.view;
876
859
  t2 && (this.transitionDirection = t2.getTime() > e2.getTime() ? "left" : "right"), e2.setHours(0, 0, 0, 0), t2 && t2.getTime() === e2.getTime() || (this.view.selectedDate = e2), this.switchView(this.view.id);
877
860
  }
@@ -893,17 +876,17 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
893
876
  }, cellOrSplitHasEvents: (e2, t2 = null) => e2.length && (!t2 && e2.length || t2 && e2.some((e3) => e3.split === t2.id)) }, created() {
894
877
  this.utils.cell = new O(this), this.utils.event = new W(this, this.utils.date), this.loadLocale(this.locale), this.editEvents.drag && this.loadDragAndDrop(), this.updateMutableEvents(this.events), this.view.id = this.currentView, this.selectedDate ? this.updateSelectedDate(this.selectedDate) : (this.view.selectedDate = new Date(), this.switchView(this.currentView)), this.time && this.watchRealTime && (this.timeTickerIds[0] = setTimeout(this.timeTick, 1e3 * (60 - this.now.getSeconds())));
895
878
  }, mounted() {
896
- const e2 = this.utils.date, t2 = "ontouchstart" in window, { resize: s2, drag: i2, create: n2, delete: a2, title: l2 } = this.editEvents, r2 = this.onEventClick && typeof this.onEventClick == "function";
879
+ const e2 = this.utils.date, t2 = "ontouchstart" in window, { resize: s2, drag: i2, create: n2, delete: a2, title: l2 } = this.editEvents, r2 = this.onEventClick && "function" == typeof this.onEventClick;
897
880
  (s2 || i2 || n2 || a2 || l2 || r2) && window.addEventListener(t2 ? "touchend" : "mouseup", this.onMouseUp), (s2 || i2 || n2 && this.dragToCreateEvent) && window.addEventListener(t2 ? "touchmove" : "mousemove", this.onMouseMove, { passive: false }), l2 && window.addEventListener("keyup", this.onKeyUp), t2 && (this.$refs.vuecal.oncontextmenu = function(e3) {
898
881
  e3.preventDefault(), e3.stopPropagation();
899
882
  }), this.hideBody || this.alignWithScrollbar();
900
- const o2 = this.view.startDate, d2 = __spreadValues(__spreadProps(__spreadValues({ view: this.view.id, startDate: o2, endDate: this.view.endDate }, this.isMonthView ? { firstCellDate: this.view.firstCellDate, lastCellDate: this.view.lastCellDate } : {}), { events: this.view.events.map(this.cleanupEvent) }), this.isWeekView ? { week: e2.getWeek(this.startWeekOnSunday ? e2.addDays(o2, 1) : o2) } : {});
883
+ const o2 = this.view.startDate, d2 = { view: this.view.id, startDate: o2, endDate: this.view.endDate, ...this.isMonthView ? { firstCellDate: this.view.firstCellDate, lastCellDate: this.view.lastCellDate } : {}, events: this.view.events.map(this.cleanupEvent), ...this.isWeekView ? { week: e2.getWeek(this.startWeekOnSunday ? e2.addDays(o2, 1) : o2) } : {} };
901
884
  this.$emit("ready", d2), this.ready = true;
902
885
  }, beforeUnmount() {
903
886
  const e2 = "ontouchstart" in window;
904
887
  window.removeEventListener(e2 ? "touchmove" : "mousemove", this.onMouseMove, { passive: false }), window.removeEventListener(e2 ? "touchend" : "mouseup", this.onMouseUp), window.removeEventListener("keyup", this.onKeyUp), this.timeTickerIds[0] && clearTimeout(this.timeTickerIds[0]), this.timeTickerIds[1] && clearTimeout(this.timeTickerIds[1]), this.timeTickerIds = [null, null];
905
888
  }, computed: { editEvents() {
906
- return this.editableEvents && typeof this.editableEvents == "object" ? { title: !!this.editableEvents.title, drag: !!this.editableEvents.drag, resize: !!this.editableEvents.resize, create: !!this.editableEvents.create, delete: !!this.editableEvents.delete } : { title: !!this.editableEvents, drag: !!this.editableEvents, resize: !!this.editableEvents, create: !!this.editableEvents, delete: !!this.editableEvents };
889
+ return this.editableEvents && "object" == typeof this.editableEvents ? { title: !!this.editableEvents.title, drag: !!this.editableEvents.drag, resize: !!this.editableEvents.resize, create: !!this.editableEvents.create, delete: !!this.editableEvents.delete } : { title: !!this.editableEvents, drag: !!this.editableEvents, resize: !!this.editableEvents, create: !!this.editableEvents, delete: !!this.editableEvents };
907
890
  }, views() {
908
891
  return { years: { label: this.texts.years, enabled: !this.disableViews.includes("years") }, year: { label: this.texts.year, enabled: !this.disableViews.includes("year") }, month: { label: this.texts.month, enabled: !this.disableViews.includes("month") }, week: { label: this.texts.week, enabled: !this.disableViews.includes("week") }, day: { label: this.texts.day, enabled: !this.disableViews.includes("day") } };
909
892
  }, currentView() {
@@ -913,7 +896,7 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
913
896
  }, hasTimeColumn() {
914
897
  return this.time && this.isWeekOrDayView;
915
898
  }, isShortMonthView() {
916
- return this.isMonthView && this.eventsOnMonthView === "short";
899
+ return this.isMonthView && "short" === this.eventsOnMonthView;
917
900
  }, firstCellDateWeekNumber() {
918
901
  const e2 = this.utils.date, t2 = this.view.firstCellDate;
919
902
  return e2.getWeek(this.startWeekOnSunday ? e2.addDays(t2, 1) : t2);
@@ -925,11 +908,11 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
925
908
  }, TimeFormat() {
926
909
  return this.timeFormat || (this.twelveHour ? "h:mm{am}" : "HH:mm");
927
910
  }, daySplits() {
928
- return (this.splitDays.filter((e2) => !e2.hide) || []).map((e2, t2) => __spreadProps(__spreadValues({}, e2), { id: e2.id || t2 + 1 }));
911
+ return (this.splitDays.filter((e2) => !e2.hide) || []).map((e2, t2) => ({ ...e2, id: e2.id || t2 + 1 }));
929
912
  }, hasSplits() {
930
913
  return this.daySplits.length && this.isWeekOrDayView;
931
914
  }, hasShortEvents() {
932
- return this.showAllDayEvents === "short";
915
+ return "short" === this.showAllDayEvents;
933
916
  }, cellOrSplitMinWidth() {
934
917
  let e2 = null;
935
918
  return this.hasSplits && this.minSplitWidth ? e2 = this.visibleDaysCount * this.minSplitWidth * this.daySplits.length : this.minCellWidth && this.isWeekView && (e2 = this.visibleDaysCount * this.minCellWidth), e2;
@@ -938,13 +921,13 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
938
921
  return e2 && !isNaN(e2) && (e2 += "px"), { cells: this.viewCells, options: this.$props, label: this.texts.allDay, shortEvents: this.hasShortEvents, daySplits: this.hasSplits && this.daySplits || [], cellOrSplitMinWidth: this.cellOrSplitMinWidth, height: e2 };
939
922
  }, minTimestamp() {
940
923
  let e2 = null;
941
- return this.minDate && typeof this.minDate == "string" ? e2 = this.utils.date.stringToDate(this.minDate) : this.minDate && this.minDate instanceof Date && (e2 = this.minDate), e2 ? e2.getTime() : null;
924
+ return this.minDate && "string" == typeof this.minDate ? e2 = this.utils.date.stringToDate(this.minDate) : this.minDate && this.minDate instanceof Date && (e2 = this.minDate), e2 ? e2.getTime() : null;
942
925
  }, maxTimestamp() {
943
926
  let e2 = null;
944
- return this.maxDate && typeof this.maxDate == "string" ? e2 = this.utils.date.stringToDate(this.maxDate) : this.maxDate && this.minDate instanceof Date && (e2 = this.maxDate), e2 ? e2.getTime() : null;
927
+ return this.maxDate && "string" == typeof this.maxDate ? e2 = this.utils.date.stringToDate(this.maxDate) : this.maxDate && this.minDate instanceof Date && (e2 = this.maxDate), e2 ? e2.getTime() : null;
945
928
  }, weekDays() {
946
929
  let { weekDays: e2, weekDaysShort: t2 = [] } = this.texts;
947
- return e2 = e2.slice(0).map((e3, s2) => __spreadProps(__spreadValues({ label: e3 }, t2.length ? { short: t2[s2] } : {}), { hide: this.hideWeekends && s2 >= 5 || this.hideWeekdays.length && this.hideWeekdays.includes(s2 + 1) })), this.startWeekOnSunday && e2.unshift(e2.pop()), e2;
930
+ return e2 = e2.slice(0).map((e3, s2) => ({ label: e3, ...t2.length ? { short: t2[s2] } : {}, hide: this.hideWeekends && s2 >= 5 || this.hideWeekdays.length && this.hideWeekdays.includes(s2 + 1) })), this.startWeekOnSunday && e2.unshift(e2.pop()), e2;
948
931
  }, weekDaysInHeader() {
949
932
  return this.isMonthView || this.isWeekView && !this.minCellWidth && !(this.hasSplits && this.minSplitWidth);
950
933
  }, months() {
@@ -1044,21 +1027,21 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
1044
1027
  return 100 / this.visibleDaysCount;
1045
1028
  }, cssClasses() {
1046
1029
  const { resizeAnEvent: e2, dragAnEvent: t2, dragCreateAnEvent: s2 } = this.domEvents;
1047
- return { [`vuecal--${this.view.id}-view`]: true, [`vuecal--${this.locale}`]: this.locale, "vuecal--no-time": !this.time, "vuecal--view-with-time": this.hasTimeColumn, "vuecal--week-numbers": this.showWeekNumbers && this.isMonthView, "vuecal--twelve-hour": this.twelveHour, "vuecal--click-to-navigate": this.clickToNavigate, "vuecal--hide-weekends": this.hideWeekends, "vuecal--split-days": this.hasSplits, "vuecal--sticky-split-labels": this.hasSplits && this.stickySplitLabels, "vuecal--overflow-x": this.minCellWidth && this.isWeekView || this.hasSplits && this.minSplitWidth, "vuecal--small": this.small, "vuecal--xsmall": this.xsmall, "vuecal--resizing-event": e2._eid, "vuecal--drag-creating-event": s2.event, "vuecal--dragging-event": t2._eid, "vuecal--events-on-month-view": this.eventsOnMonthView, "vuecal--short-events": this.isMonthView && this.eventsOnMonthView === "short", "vuecal--has-touch": typeof window != "undefined" && "ontouchstart" in window };
1030
+ return { [`vuecal--${this.view.id}-view`]: true, [`vuecal--${this.locale}`]: this.locale, "vuecal--no-time": !this.time, "vuecal--view-with-time": this.hasTimeColumn, "vuecal--week-numbers": this.showWeekNumbers && this.isMonthView, "vuecal--twelve-hour": this.twelveHour, "vuecal--click-to-navigate": this.clickToNavigate, "vuecal--hide-weekends": this.hideWeekends, "vuecal--split-days": this.hasSplits, "vuecal--sticky-split-labels": this.hasSplits && this.stickySplitLabels, "vuecal--overflow-x": this.minCellWidth && this.isWeekView || this.hasSplits && this.minSplitWidth, "vuecal--small": this.small, "vuecal--xsmall": this.xsmall, "vuecal--resizing-event": e2._eid, "vuecal--drag-creating-event": s2.event, "vuecal--dragging-event": t2._eid, "vuecal--events-on-month-view": this.eventsOnMonthView, "vuecal--short-events": this.isMonthView && "short" === this.eventsOnMonthView, "vuecal--has-touch": "undefined" != typeof window && "ontouchstart" in window };
1048
1031
  }, isYearsOrYearView() {
1049
1032
  return ["years", "year"].includes(this.view.id);
1050
1033
  }, isYearsView() {
1051
- return this.view.id === "years";
1034
+ return "years" === this.view.id;
1052
1035
  }, isYearView() {
1053
- return this.view.id === "year";
1036
+ return "year" === this.view.id;
1054
1037
  }, isMonthView() {
1055
- return this.view.id === "month";
1038
+ return "month" === this.view.id;
1056
1039
  }, isWeekOrDayView() {
1057
1040
  return ["week", "day"].includes(this.view.id);
1058
1041
  }, isWeekView() {
1059
- return this.view.id === "week";
1042
+ return "week" === this.view.id;
1060
1043
  }, isDayView() {
1061
- return this.view.id === "day";
1044
+ return "day" === this.view.id;
1062
1045
  } }, watch: { events: { handler(e2, t2) {
1063
1046
  this.updateMutableEvents(e2), this.addEventsToView();
1064
1047
  }, deep: true }, locale(e2) {
@@ -1070,6 +1053,6 @@ A valid view must be one of: ${ze.join(", ")}.`), e2 = "week"), this.enabledView
1070
1053
  } } };
1071
1054
  var Ue = z(Pe, [["render", function(w2, D2, g2, f2, k2, M2) {
1072
1055
  const T2 = p("vuecal-header"), E2 = p("all-day-bar"), C2 = p("weekdays-headings"), S2 = p("vuecal-cell");
1073
- return e(), t("div", { class: n(["vuecal__flex vuecal", M2.cssClasses]), column: "", ref: "vuecal", lang: g2.locale }, [l(T2, { options: w2.$props, "edit-events": M2.editEvents, "view-props": { views: M2.views, weekDaysInHeader: M2.weekDaysInHeader }, "week-days": M2.weekDays, "has-splits": M2.hasSplits, "day-splits": M2.daySplits, "switch-to-narrower-view": M2.switchToNarrowerView }, y({ "arrow-prev": o(() => [u(w2.$slots, "arrow-prev", {}, () => [oe, de, ue])]), "arrow-next": o(() => [u(w2.$slots, "arrow-next", {}, () => [he, ce, ve])]), "today-button": o(() => [u(w2.$slots, "today-button", {}, () => [d("span", pe, h(k2.texts.today), 1)])]), title: o(() => [u(w2.$slots, "title", { title: M2.viewTitle, view: k2.view }, () => [v(h(M2.viewTitle), 1)])]), _: 2 }, [w2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(w2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, w2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(w2.$slots, "split-label", { split: e2, view: k2.view.id })]) } : void 0]), 1032, ["options", "edit-events", "view-props", "week-days", "has-splits", "day-splits", "switch-to-narrower-view"]), g2.hideBody ? c("", true) : (e(), t("div", me, [l(r, { name: `slide-fade--${k2.transitionDirection}`, appear: g2.transitions }, { default: o(() => [(e(), t("div", { class: "vuecal__flex", style: { "min-width": "100%" }, key: !!g2.transitions && k2.view.id, column: "" }, [g2.showAllDayEvents && M2.hasTimeColumn && (!M2.cellOrSplitMinWidth || M2.isDayView && !g2.minSplitWidth) ? (e(), m(E2, _(b({ key: 0 }, M2.allDayBar)), { event: o(({ event: s2, view: i2 }) => [u(w2.$slots, "event", { view: i2, event: s2 }, () => [M2.editEvents.title && s2.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, s2), innerHTML: s2.title }, null, 40, we)) : s2.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: s2.title }, null, 8, ye)) : c("", true), !s2.content || M2.hasShortEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 2, class: "vuecal__event-content", innerHTML: s2.content }, null, 8, De))])]), _: 3 }, 16)) : c("", true), d("div", { class: n(["vuecal__bg", { vuecal__flex: !M2.hasTimeColumn }]), column: "" }, [d("div", ge, [M2.hasTimeColumn ? (e(), t("div", fe, [g2.showAllDayEvents && M2.cellOrSplitMinWidth && (!M2.isDayView || g2.minSplitWidth) ? (e(), t("div", { key: 0, class: "vuecal__all-day-text", style: a({ height: M2.allDayBar.height }) }, [d("span", null, h(k2.texts.allDay), 1)], 4)) : c("", true), (e(true), t(s, null, i(M2.timeCells, (s2, i2) => (e(), t("div", { class: "vuecal__time-cell", key: i2, style: a(`height: ${g2.timeCellHeight}px`) }, [u(w2.$slots, "time-cell", { hours: s2.hours, minutes: s2.minutes }, () => [_e, d("span", be, h(s2.label), 1)])], 4))), 128))])) : c("", true), g2.showWeekNumbers && M2.isMonthView ? (e(), t("div", ke, [(e(), t(s, null, i(6, (e2) => d("div", { class: "vuecal__flex vuecal__week-number-cell", key: e2, grow: "" }, [u(w2.$slots, "week-number-cell", { week: M2.getWeekNumber(e2 - 1) }, () => [v(h(M2.getWeekNumber(e2 - 1)), 1)])])), 64))])) : c("", true), d("div", { class: n(["vuecal__flex vuecal__cells", `${k2.view.id}-view`]), grow: "", wrap: !M2.cellOrSplitMinWidth || !M2.isWeekView, column: !!M2.cellOrSplitMinWidth }, [M2.cellOrSplitMinWidth && M2.isWeekView ? (e(), m(C2, { key: 0, "transition-direction": k2.transitionDirection, "week-days": M2.weekDays, "switch-to-narrower-view": M2.switchToNarrowerView, style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, y({ _: 2 }, [w2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(w2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, w2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(w2.$slots, "split-label", { split: e2, view: k2.view.id })]) } : void 0]), 1032, ["transition-direction", "week-days", "switch-to-narrower-view", "style"])) : M2.hasSplits && g2.stickySplitLabels && g2.minSplitWidth ? (e(), t("div", { key: 1, class: "vuecal__flex vuecal__split-days-headers", style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(M2.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(w2.$slots, "split-label", { split: s2, view: k2.view.id }, () => [v(h(s2.label), 1)])], 2))), 128))], 4)) : c("", true), g2.showAllDayEvents && M2.hasTimeColumn && (M2.isWeekView && M2.cellOrSplitMinWidth || M2.isDayView && M2.hasSplits && g2.minSplitWidth) ? (e(), m(E2, _(b({ key: 2 }, M2.allDayBar)), { event: o(({ event: s2, view: i2 }) => [u(w2.$slots, "event", { view: i2, event: s2 }, () => [M2.editEvents.title && s2.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, s2), innerHTML: s2.title }, null, 40, Te)) : s2.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: s2.title }, null, 8, Ee)) : c("", true), !s2.content || M2.hasShortEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 2, class: "vuecal__event-content", innerHTML: s2.content }, null, 8, Ce))])]), _: 3 }, 16)) : c("", true), d("div", { class: "vuecal__flex", ref: (e2) => k2.cellsEl = e2, grow: "", wrap: !M2.cellOrSplitMinWidth || !M2.isWeekView, style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(M2.viewCells, (s2, i2) => (e(), m(S2, { key: i2, options: w2.$props, "edit-events": M2.editEvents, data: s2, "cell-width": g2.hideWeekdays.length && (M2.isWeekView || M2.isMonthView) && M2.cellWidth, "min-timestamp": M2.minTimestamp, "max-timestamp": M2.maxTimestamp, "cell-splits": M2.hasSplits && M2.daySplits || [] }, { "cell-content": o(({ events: i3, split: n2, selectCell: a2 }) => [u(w2.$slots, "cell-content", { cell: s2, view: k2.view, goNarrower: a2, events: i3 }, () => [n2 && !g2.stickySplitLabels ? (e(), t("div", { key: 0, class: "split-label", innerHTML: n2.label }, null, 8, Oe)) : c("", true), s2.content ? (e(), t("div", { key: 1, class: "vuecal__cell-date", innerHTML: s2.content }, null, 8, $e)) : c("", true), (M2.isMonthView && !g2.eventsOnMonthView || M2.isYearsOrYearView && g2.eventsCountOnYearView) && i3.length ? (e(), t("div", xe, [u(w2.$slots, "events-count", { view: k2.view, events: i3 }, () => [v(h(i3.length), 1)])])) : c("", true), !M2.cellOrSplitHasEvents(i3, n2) && M2.isWeekOrDayView ? (e(), t("div", He, [u(w2.$slots, "no-event", {}, () => [v(h(k2.texts.noEvent), 1)])])) : c("", true)])]), event: o(({ event: i3, view: n2 }) => [u(w2.$slots, "event", { view: n2, event: i3 }, () => [M2.editEvents.title && i3.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, i3), innerHTML: i3.title }, null, 40, We)) : i3.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: i3.title }, null, 8, je)) : c("", true), !g2.time || i3.allDay || M2.isMonthView && (i3.allDay || g2.showAllDayEvents === "short") || M2.isShortMonthView ? c("", true) : (e(), t("div", Ae, [v(h(k2.utils.date.formatTime(i3.start, M2.TimeFormat)), 1), i3.endTimeMinutes ? (e(), t("span", Ve, "\xA0- " + h(k2.utils.date.formatTime(i3.end, M2.TimeFormat, null, true)), 1)) : c("", true), i3.daysCount > 1 && (i3.segments[s2.formattedDate] || {}).isFirstDay ? (e(), t("small", Ye, "\xA0+" + h(i3.daysCount - 1) + h((k2.texts.day[0] || "").toLowerCase()), 1)) : c("", true)])), !i3.content || M2.isMonthView && i3.allDay && g2.showAllDayEvents === "short" || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 3, class: "vuecal__event-content", innerHTML: i3.content }, null, 8, Le))])]), "no-event": o(() => [u(w2.$slots, "no-event", {}, () => [v(h(k2.texts.noEvent), 1)])]), _: 2 }, 1032, ["options", "edit-events", "data", "cell-width", "min-timestamp", "max-timestamp", "cell-splits"]))), 128))], 12, Se)], 10, Me)])], 2)]))]), _: 3 }, 8, ["name", "appear"]), k2.ready ? c("", true) : (e(), t("div", Fe, Be))]))], 10, re);
1056
+ return e(), t("div", { class: n(["vuecal__flex vuecal", M2.cssClasses]), column: "", ref: "vuecal", lang: g2.locale }, [l(T2, { options: w2.$props, "edit-events": M2.editEvents, "view-props": { views: M2.views, weekDaysInHeader: M2.weekDaysInHeader }, "week-days": M2.weekDays, "has-splits": M2.hasSplits, "day-splits": M2.daySplits, "switch-to-narrower-view": M2.switchToNarrowerView }, y({ "arrow-prev": o(() => [u(w2.$slots, "arrow-prev", {}, () => [oe, de, ue])]), "arrow-next": o(() => [u(w2.$slots, "arrow-next", {}, () => [he, ce, ve])]), "today-button": o(() => [u(w2.$slots, "today-button", {}, () => [d("span", pe, h(k2.texts.today), 1)])]), title: o(() => [u(w2.$slots, "title", { title: M2.viewTitle, view: k2.view }, () => [v(h(M2.viewTitle), 1)])]), _: 2 }, [w2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(w2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, w2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(w2.$slots, "split-label", { split: e2, view: k2.view.id })]) } : void 0]), 1032, ["options", "edit-events", "view-props", "week-days", "has-splits", "day-splits", "switch-to-narrower-view"]), g2.hideBody ? c("", true) : (e(), t("div", me, [l(r, { name: `slide-fade--${k2.transitionDirection}`, appear: g2.transitions }, { default: o(() => [(e(), t("div", { class: "vuecal__flex", style: { "min-width": "100%" }, key: !!g2.transitions && k2.view.id, column: "" }, [g2.showAllDayEvents && M2.hasTimeColumn && (!M2.cellOrSplitMinWidth || M2.isDayView && !g2.minSplitWidth) ? (e(), m(E2, _(b({ key: 0 }, M2.allDayBar)), { event: o(({ event: s2, view: i2 }) => [u(w2.$slots, "event", { view: i2, event: s2 }, () => [M2.editEvents.title && s2.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, s2), innerHTML: s2.title }, null, 40, we)) : s2.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: s2.title }, null, 8, ye)) : c("", true), !s2.content || M2.hasShortEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 2, class: "vuecal__event-content", innerHTML: s2.content }, null, 8, De))])]), _: 3 }, 16)) : c("", true), d("div", { class: n(["vuecal__bg", { vuecal__flex: !M2.hasTimeColumn }]), column: "" }, [d("div", ge, [M2.hasTimeColumn ? (e(), t("div", fe, [g2.showAllDayEvents && M2.cellOrSplitMinWidth && (!M2.isDayView || g2.minSplitWidth) ? (e(), t("div", { key: 0, class: "vuecal__all-day-text", style: a({ height: M2.allDayBar.height }) }, [d("span", null, h(k2.texts.allDay), 1)], 4)) : c("", true), (e(true), t(s, null, i(M2.timeCells, (s2, i2) => (e(), t("div", { class: "vuecal__time-cell", key: i2, style: a(`height: ${g2.timeCellHeight}px`) }, [u(w2.$slots, "time-cell", { hours: s2.hours, minutes: s2.minutes }, () => [_e, d("span", be, h(s2.label), 1)])], 4))), 128))])) : c("", true), g2.showWeekNumbers && M2.isMonthView ? (e(), t("div", ke, [(e(), t(s, null, i(6, (e2) => d("div", { class: "vuecal__flex vuecal__week-number-cell", key: e2, grow: "" }, [u(w2.$slots, "week-number-cell", { week: M2.getWeekNumber(e2 - 1) }, () => [v(h(M2.getWeekNumber(e2 - 1)), 1)])])), 64))])) : c("", true), d("div", { class: n(["vuecal__flex vuecal__cells", `${k2.view.id}-view`]), grow: "", wrap: !M2.cellOrSplitMinWidth || !M2.isWeekView, column: !!M2.cellOrSplitMinWidth }, [M2.cellOrSplitMinWidth && M2.isWeekView ? (e(), m(C2, { key: 0, "transition-direction": k2.transitionDirection, "week-days": M2.weekDays, "switch-to-narrower-view": M2.switchToNarrowerView, style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, y({ _: 2 }, [w2.$slots["weekday-heading"] ? { name: "weekday-heading", fn: o(({ heading: e2, view: t2 }) => [u(w2.$slots, "weekday-heading", { heading: e2, view: t2 })]) } : void 0, w2.$slots["split-label"] ? { name: "split-label", fn: o(({ split: e2 }) => [u(w2.$slots, "split-label", { split: e2, view: k2.view.id })]) } : void 0]), 1032, ["transition-direction", "week-days", "switch-to-narrower-view", "style"])) : M2.hasSplits && g2.stickySplitLabels && g2.minSplitWidth ? (e(), t("div", { key: 1, class: "vuecal__flex vuecal__split-days-headers", style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(M2.daySplits, (s2, i2) => (e(), t("div", { class: n(["day-split-header", s2.class || false]), key: i2 }, [u(w2.$slots, "split-label", { split: s2, view: k2.view.id }, () => [v(h(s2.label), 1)])], 2))), 128))], 4)) : c("", true), g2.showAllDayEvents && M2.hasTimeColumn && (M2.isWeekView && M2.cellOrSplitMinWidth || M2.isDayView && M2.hasSplits && g2.minSplitWidth) ? (e(), m(E2, _(b({ key: 2 }, M2.allDayBar)), { event: o(({ event: s2, view: i2 }) => [u(w2.$slots, "event", { view: i2, event: s2 }, () => [M2.editEvents.title && s2.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, s2), innerHTML: s2.title }, null, 40, Te)) : s2.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: s2.title }, null, 8, Ee)) : c("", true), !s2.content || M2.hasShortEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 2, class: "vuecal__event-content", innerHTML: s2.content }, null, 8, Ce))])]), _: 3 }, 16)) : c("", true), d("div", { class: "vuecal__flex", ref: (e2) => k2.cellsEl = e2, grow: "", wrap: !M2.cellOrSplitMinWidth || !M2.isWeekView, style: a(M2.cellOrSplitMinWidth ? `min-width: ${M2.cellOrSplitMinWidth}px` : "") }, [(e(true), t(s, null, i(M2.viewCells, (s2, i2) => (e(), m(S2, { key: i2, options: w2.$props, "edit-events": M2.editEvents, data: s2, "cell-width": g2.hideWeekdays.length && (M2.isWeekView || M2.isMonthView) && M2.cellWidth, "min-timestamp": M2.minTimestamp, "max-timestamp": M2.maxTimestamp, "cell-splits": M2.hasSplits && M2.daySplits || [] }, { "cell-content": o(({ events: i3, split: n2, selectCell: a2 }) => [u(w2.$slots, "cell-content", { cell: s2, view: k2.view, goNarrower: a2, events: i3 }, () => [n2 && !g2.stickySplitLabels ? (e(), t("div", { key: 0, class: "split-label", innerHTML: n2.label }, null, 8, Oe)) : c("", true), s2.content ? (e(), t("div", { key: 1, class: "vuecal__cell-date", innerHTML: s2.content }, null, 8, $e)) : c("", true), (M2.isMonthView && !g2.eventsOnMonthView || M2.isYearsOrYearView && g2.eventsCountOnYearView) && i3.length ? (e(), t("div", xe, [u(w2.$slots, "events-count", { view: k2.view, events: i3 }, () => [v(h(i3.length), 1)])])) : c("", true), !M2.cellOrSplitHasEvents(i3, n2) && M2.isWeekOrDayView ? (e(), t("div", He, [u(w2.$slots, "no-event", {}, () => [v(h(k2.texts.noEvent), 1)])])) : c("", true)])]), event: o(({ event: i3, view: n2 }) => [u(w2.$slots, "event", { view: n2, event: i3 }, () => [M2.editEvents.title && i3.titleEditable ? (e(), t("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (e2) => M2.onEventTitleBlur(e2, i3), innerHTML: i3.title }, null, 40, We)) : i3.title ? (e(), t("div", { key: 1, class: "vuecal__event-title", innerHTML: i3.title }, null, 8, je)) : c("", true), !g2.time || i3.allDay || M2.isMonthView && (i3.allDay || "short" === g2.showAllDayEvents) || M2.isShortMonthView ? c("", true) : (e(), t("div", Ae, [v(h(k2.utils.date.formatTime(i3.start, M2.TimeFormat)), 1), i3.endTimeMinutes ? (e(), t("span", Ve, "\xA0- " + h(k2.utils.date.formatTime(i3.end, M2.TimeFormat, null, true)), 1)) : c("", true), i3.daysCount > 1 && (i3.segments[s2.formattedDate] || {}).isFirstDay ? (e(), t("small", Ye, "\xA0+" + h(i3.daysCount - 1) + h((k2.texts.day[0] || "").toLowerCase()), 1)) : c("", true)])), !i3.content || M2.isMonthView && i3.allDay && "short" === g2.showAllDayEvents || M2.isShortMonthView ? c("", true) : (e(), t("div", { key: 3, class: "vuecal__event-content", innerHTML: i3.content }, null, 8, Le))])]), "no-event": o(() => [u(w2.$slots, "no-event", {}, () => [v(h(k2.texts.noEvent), 1)])]), _: 2 }, 1032, ["options", "edit-events", "data", "cell-width", "min-timestamp", "max-timestamp", "cell-splits"]))), 128))], 12, Se)], 10, Me)])], 2)]))]), _: 3 }, 8, ["name", "appear"]), k2.ready ? c("", true) : (e(), t("div", Fe, Be))]))], 10, re);
1074
1057
  }]]);
1075
1058
  export { Ue as default };