@quidgest/ui 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- import { defineComponent as xn, mergeModels as Tn, useModel as Sn, computed as s, ref as q, useTemplateRef as Be, watch as se, onBeforeUnmount as In, createElementBlock as S, openBlock as f, Fragment as V, createVNode as i, createBlock as U, createCommentVNode as M, unref as o, normalizeClass as yt, createSlots as Cn, withCtx as b, mergeProps as ne, renderSlot as Hn, createElementVNode as k, normalizeProps as W, guardReactiveProps as Q, renderList as ge, toDisplayString as Le, nextTick as F } from "vue";
2
- import { WEEKDAY_NAMES as Oe, MONTH_NAMES as $e, DEFAULT_TEXTS as qn, DEFAULT_ICONS as En } from "./constants.js";
1
+ import { defineComponent as Yn, mergeModels as Pn, useModel as An, computed as s, ref as R, useTemplateRef as ie, watch as se, onBeforeUnmount as Ln, createElementBlock as H, openBlock as f, Fragment as Y, createVNode as i, createBlock as U, createCommentVNode as M, unref as o, normalizeClass as kt, createSlots as On, withCtx as b, mergeProps as te, renderSlot as Bn, createElementVNode as k, normalizeProps as W, guardReactiveProps as j, renderList as ge, toDisplayString as ze, nextTick as F } from "vue";
2
+ import { WEEKDAY_NAMES as Ue, MONTH_NAMES as We, DEFAULT_TEXTS as Kn, DEFAULT_ICONS as $n } from "./constants.js";
3
3
  import { QButton as p } from "../QButton/index.js";
4
4
  import { QIcon as w } from "../QIcon/index.js";
5
- import { QOverlay as Fn } from "../QOverlay/index.js";
6
- import { QSwitch as Nn } from "../QSwitch/index.js";
7
- import { QTextField as Me } from "../QTextField/index.js";
8
- import { useInputMask as Rn, applyMask as we, clampNumericSegments as ht, resolveCursorPosition as Pn } from "../../composables/useInputMask/index.js";
9
- import { formatUsesTime as Vn, formatUsesSeconds as Yn, uses12HourFormat as An, isTimeOnlyFormat as Bn, parseDate as L, formatDate as j, getFirstDayOfMonth as Ln, getDaysInMonth as bt, isBetween as On, isSameDay as xe, convertDatePatternToMask as $n, padNumber as Ke, parseDateWithCompletion as ze, inputIncludesTimePortion as kt } from "../../utils/date.js";
10
- const Kn = {
5
+ import { QOverlay as zn } from "../QOverlay/index.js";
6
+ import { QSwitch as Un } from "../QSwitch/index.js";
7
+ import { QTextField as Te } from "../QTextField/index.js";
8
+ import { useInputMask as Wn, applyMask as xe, clampNumericSegments as _t, resolveCursorPosition as jn } from "../../composables/useInputMask/index.js";
9
+ import { formatUsesTime as Qn, formatUsesSeconds as Gn, uses12HourFormat as Xn, isTimeOnlyFormat as Zn, parseDate as O, formatDate as Q, getFirstDayOfMonth as Jn, getDaysInMonth as Dt, isBetween as ea, isSameDay as He, convertDatePatternToMask as ta, padNumber as je, parseDateWithCompletion as Qe, inputIncludesTimePortion as Mt } from "../../utils/date.js";
10
+ const na = {
11
11
  key: 0,
12
12
  ref: "calendar",
13
13
  class: "q-date-time-picker__calendar"
14
- }, zn = { class: "q-date-time-picker__header" }, Un = { class: "q-date-time-picker__weekdays" }, Wn = { class: "q-date-time-picker__time" }, Qn = {
14
+ }, aa = { class: "q-date-time-picker__header" }, la = { class: "q-date-time-picker__weekdays" }, ra = { class: "q-date-time-picker__time" }, ua = {
15
15
  key: 0,
16
16
  class: "q-date-time-picker__time-period"
17
- }, jn = { class: "q-date-time-picker__time-inputs" }, Gn = { class: "q-date-time-picker__time-input-group" }, Xn = { class: "q-date-time-picker__time-input-group" }, Zn = { class: "q-date-time-picker__time-input-group" }, Jn = { class: "q-date-time-picker__month-grid" }, ea = { class: "q-date-time-picker__year" }, ta = { class: "q-date-time-picker__year-change" }, na = { class: "q-date-time-picker__year-interval" }, aa = { class: "q-date-time-picker__year-grid" }, la = { class: "q-date-time-picker__bottom-bar" }, G = 1001, X = 9999, ce = 26, _t = 'a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]', ma = /* @__PURE__ */ xn({
17
+ }, oa = { class: "q-date-time-picker__time-inputs" }, ia = { class: "q-date-time-picker__time-input-group" }, sa = { class: "q-date-time-picker__time-input-group" }, ca = { class: "q-date-time-picker__time-input-group" }, da = { class: "q-date-time-picker__month-grid" }, fa = { class: "q-date-time-picker__year" }, va = { class: "q-date-time-picker__year-change" }, ma = { class: "q-date-time-picker__year-interval" }, pa = { class: "q-date-time-picker__year-grid" }, ga = { class: "q-date-time-picker__bottom-bar" }, G = 1001, X = 9999, ce = 26, wt = 'a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]', xa = /* @__PURE__ */ Yn({
18
18
  inheritAttrs: !1,
19
19
  __name: "QDateTimePicker",
20
- props: /* @__PURE__ */ Tn({
20
+ props: /* @__PURE__ */ Pn({
21
21
  id: {},
22
22
  class: {},
23
23
  label: {},
@@ -33,42 +33,64 @@ const Kn = {
33
33
  clearable: { type: Boolean },
34
34
  format: { default: "dd/MM/yyyy HH:mm" },
35
35
  range: { type: Boolean },
36
- icons: { default: () => En },
37
- texts: { default: () => qn }
36
+ icons: { default: () => $n },
37
+ texts: { default: () => Kn }
38
38
  }, {
39
39
  modelValue: {},
40
40
  modelModifiers: {}
41
41
  }),
42
42
  emits: ["update:modelValue"],
43
- setup(Ue) {
44
- const l = Ue, We = Sn(Ue, "modelValue"), v = s({
45
- get: () => We.value,
46
- set: (e) => We.value = e || void 0
47
- }), Dt = s(
43
+ setup(Ge) {
44
+ const l = Ge, Xe = An(Ge, "modelValue"), v = s({
45
+ get: () => Xe.value,
46
+ set: (e) => Xe.value = e || void 0
47
+ }), Tt = s(
48
48
  () => l.readonly || l.disabled ? void 0 : l.placeholder
49
- ), ae = s(() => Vn(l.format)), ye = s(() => Yn(l.format)), Z = s(() => An(l.format)), J = s(() => Bn(l.format)), Mt = s(
49
+ ), ne = s(() => Qn(l.format)), ye = s(() => Gn(l.format)), Z = s(() => Xn(l.format)), J = s(() => Zn(l.format)), xt = s(
50
50
  () => g.value === (/* @__PURE__ */ new Date()).getMonth() && h.value === (/* @__PURE__ */ new Date()).getFullYear()
51
- ), x = q(!1), Te = q(!1), _ = q(""), I = q(null), Y = q(!1);
51
+ ), T = R(!1), Se = R(!1), _ = R(""), S = R(null), P = R(!1);
52
52
  let de = 0;
53
- const D = q("date"), g = q((/* @__PURE__ */ new Date()).getMonth()), h = q((/* @__PURE__ */ new Date()).getFullYear()), le = q((/* @__PURE__ */ new Date()).getFullYear());
54
- let re = null, O = !1, fe = !1, Se = !1;
55
- function Qe() {
53
+ const D = R("date"), g = R((/* @__PURE__ */ new Date()).getMonth()), h = R((/* @__PURE__ */ new Date()).getFullYear()), ae = R((/* @__PURE__ */ new Date()).getFullYear());
54
+ let le = null, B = !1, fe = !1, Ce = !1;
55
+ function Ze() {
56
56
  queueMicrotask(() => {
57
57
  requestAnimationFrame(() => {
58
58
  var a, n;
59
- const e = ie((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
60
- if (e && (t === e || t instanceof Node && ((n = N.value) != null && n.contains(t)))) {
61
- O = !0;
59
+ const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
60
+ if (e && (t === e || t instanceof Node && ((n = E.value) != null && n.contains(t)))) {
61
+ B = !0;
62
62
  return;
63
63
  }
64
- O = !1;
64
+ B = !1;
65
65
  });
66
66
  });
67
67
  }
68
- const C = Be("field"), N = Be("menu"), Ie = Be("calendar"), E = s(() => ({
68
+ const C = ie("field"), E = ie("menu"), Ie = ie("calendar"), Ht = ie("monthHeader"), St = ie("yearHeader"), Ct = ie("toggleTime"), Re = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
69
+ function Ee(e) {
70
+ if (!e) return null;
71
+ if (e instanceof HTMLElement) return e;
72
+ if (typeof e == "object" && "$el" in e) {
73
+ const t = e.$el;
74
+ return t instanceof HTMLElement ? t : null;
75
+ }
76
+ return null;
77
+ }
78
+ function It(e, t) {
79
+ const a = Ee(e);
80
+ a ? Re.set(t, a) : Re.delete(t);
81
+ }
82
+ function Rt(e, t) {
83
+ const a = Ee(e);
84
+ a ? qe.set(t, a) : qe.delete(t);
85
+ }
86
+ function qt(e) {
87
+ var t;
88
+ (t = Ee(e)) == null || t.focus();
89
+ }
90
+ const q = s(() => ({
69
91
  getMonthIndex: (e, t) => {
70
92
  const a = e.toLowerCase();
71
- return $e.findIndex((n) => {
93
+ return We.findIndex((n) => {
72
94
  const r = l.texts[n] ?? n;
73
95
  return (t ? r.substring(0, 3) : r).toLowerCase() === a;
74
96
  });
@@ -76,147 +98,150 @@ const Kn = {
76
98
  getWeekdayIndex: (e, t) => {
77
99
  const a = e.toLowerCase();
78
100
  for (let n = 0; n < 7; n++) {
79
- const r = (n + 6) % 7, u = Oe[r], c = l.texts[u] ?? u;
101
+ const r = (n + 6) % 7, u = Ue[r], c = l.texts[u] ?? u;
80
102
  if ((t ? c.substring(0, 3) : c).toLowerCase() === a) return n;
81
103
  }
82
104
  return null;
83
105
  }
84
- })), T = s(() => {
106
+ })), x = s(() => {
85
107
  const e = v.value;
86
- return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? L(e, l.format, E.value) : null : null;
87
- }), Ce = s(() => {
108
+ return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? O(e, l.format, q.value) : null : null;
109
+ }), Fe = s(() => {
88
110
  const e = v.value;
89
111
  return Array.isArray(e) && e.length > 1 ? e[1] : null;
90
- }), m = q(null), ee = q(null), R = q(null), A = q(!1), wt = s(() => !A.value || !m.value ? T.value : R.value && R.value < m.value ? R.value : m.value), xt = s(() => {
91
- if (!l.range) return T.value;
112
+ }), m = R(null), ee = R(null), N = R(null), A = R(!1), Et = s(() => !A.value || !m.value ? x.value : N.value && N.value < m.value ? N.value : m.value), Ft = s(() => {
113
+ if (!l.range) return x.value;
92
114
  if (!A.value || !m.value)
93
- return Ce.value;
94
- const e = R.value ?? ee.value;
115
+ return Fe.value;
116
+ const e = N.value ?? ee.value;
95
117
  return e ? e < m.value ? m.value : e : null;
96
- }), $ = s(() => ({
118
+ }), K = s(() => ({
97
119
  getMonthName: (e, t) => {
98
120
  const a = be(e);
99
121
  return t ? a.substring(0, 3) : a;
100
122
  },
101
123
  getWeekdayName: (e, t) => {
102
- const a = (e + 6) % 7, n = Oe[a], r = l.texts[n] ?? n;
124
+ const a = (e + 6) % 7, n = Ue[a], r = l.texts[n] ?? n;
103
125
  return t ? r.substring(0, 3) : r;
104
126
  }
105
- })), Tt = s(() => {
127
+ })), Nt = s(() => {
106
128
  const e = v.value;
107
129
  return e ? Array.isArray(e) ? e.map(
108
- (t) => t instanceof Date ? j(t, l.format, $.value) : t
109
- ).join(" - ") : e instanceof Date ? j(e, l.format, $.value) : String(e) : "";
110
- }), je = s(() => I.value ?? Tt.value);
130
+ (t) => t instanceof Date ? Q(t, l.format, K.value) : t
131
+ ).join(" - ") : e instanceof Date ? Q(e, l.format, K.value) : String(e) : "";
132
+ }), Je = s(() => S.value ?? Nt.value);
111
133
  function he() {
112
- _.value = je.value;
134
+ _.value = Je.value;
113
135
  }
114
136
  se(
115
- je,
137
+ Je,
116
138
  () => {
117
- Te.value || he();
139
+ Se.value || he();
118
140
  },
119
141
  { immediate: !0 }
120
142
  );
121
- const Ge = s(() => {
122
- const e = Ln(new Date(h.value, g.value, 1)), t = bt(g.value, h.value), a = (e.getDay() + 6) % 7, n = [], r = g.value === 0 ? 11 : g.value - 1, u = g.value === 0 ? h.value - 1 : h.value, c = bt(r, u);
143
+ const et = s(() => {
144
+ const e = Jn(new Date(h.value, g.value, 1)), t = Dt(g.value, h.value), a = (e.getDay() + 6) % 7, n = [], r = g.value === 0 ? 11 : g.value - 1, u = g.value === 0 ? h.value - 1 : h.value, c = Dt(r, u);
123
145
  for (let d = a - 1; d >= 0; d--) {
124
- const H = new Date(u, r, c - d);
125
- He(n, H, !1);
146
+ const I = new Date(u, r, c - d);
147
+ Ne(n, I, !1);
126
148
  }
127
149
  for (let d = 1; d <= t; d++) {
128
- const H = new Date(h.value, g.value, d);
129
- He(n, H, !0);
150
+ const I = new Date(h.value, g.value, d);
151
+ Ne(n, I, !0);
130
152
  }
131
- const y = 7 - n.length % 7, B = y === 7 ? 0 : y;
132
- for (let d = 1; d <= B; d++) {
133
- const H = new Date(h.value, g.value + 1, d);
134
- He(n, H, !1);
153
+ const y = 7 - n.length % 7, L = y === 7 ? 0 : y;
154
+ for (let d = 1; d <= L; d++) {
155
+ const I = new Date(h.value, g.value + 1, d);
156
+ Ne(n, I, !1);
135
157
  }
136
158
  return n;
137
159
  });
138
- function He(e, t, a) {
139
- const n = wt.value, r = xt.value, u = t.getFullYear(), c = u < G || u > X;
160
+ function Ne(e, t, a) {
161
+ const n = Et.value, r = Ft.value, u = t.getFullYear(), c = u < G || u > X;
140
162
  e.push({
141
163
  date: t,
142
164
  isCurrentMonth: a,
143
- isToday: xe(t, /* @__PURE__ */ new Date()),
144
- isSelected: n ? xe(t, n) : !1,
145
- isRangeStart: !!n && xe(t, n),
146
- isRangeEnd: !!r && xe(t, r),
147
- isInRange: n && r ? On(t, n, r) : !1,
165
+ isToday: He(t, /* @__PURE__ */ new Date()),
166
+ isSelected: n ? He(t, n) : !1,
167
+ isRangeStart: !!n && He(t, n),
168
+ isRangeEnd: !!r && He(t, r),
169
+ isInRange: n && r ? ea(t, n, r) : !1,
148
170
  isDisabled: c
149
171
  });
150
172
  }
151
- const St = s(() => Oe.map((e) => {
173
+ const Vt = s(() => Ue.map((e) => {
152
174
  var a;
153
175
  const t = e;
154
176
  return ((a = l.texts[t]) == null ? void 0 : a.substring(0, 2)) ?? e;
155
- })), Xe = s(
177
+ })), Yt = s(
156
178
  () => Array.from({ length: 12 }, (e, t) => be(t, 3))
157
179
  );
158
180
  function be(e, t = 0) {
159
- const a = $e[e], n = l.texts[a] ?? $e[e];
181
+ const a = We[e], n = l.texts[a] ?? We[e];
160
182
  return t <= 0 ? n : n.substring(0, t);
161
183
  }
162
- function Ze(e) {
184
+ function tt(e) {
163
185
  const t = Math.floor(ce / 2);
164
186
  let a = e - t, n = a + ce;
165
187
  return a < G && (a = G, n = Math.min(a + ce, X)), n > X && (n = X, a = Math.max(G, n - ce)), { startYear: a, endYear: n };
166
188
  }
167
- function It(e) {
168
- const { startYear: t, endYear: a } = Ze(e);
189
+ function Pt(e) {
190
+ const { startYear: t, endYear: a } = tt(e);
169
191
  return Array.from({ length: a - t + 1 }, (n, r) => t + r);
170
192
  }
171
- function Ct() {
172
- Je.value && (le.value -= ce);
193
+ function At() {
194
+ nt.value && (ae.value -= ce);
173
195
  }
174
- function Ht() {
175
- et.value && (le.value += ce);
196
+ function Lt() {
197
+ at.value && (ae.value += ce);
176
198
  }
177
- const ke = s(() => Ze(le.value)), Je = s(
199
+ const ke = s(() => tt(ae.value)), nt = s(
178
200
  () => ke.value.startYear > G
179
- ), et = s(() => ke.value.endYear < X), qt = s(() => g.value === 0 ? h.value - 1 : h.value), Et = s(() => g.value === 11 ? h.value + 1 : h.value), tt = s(() => qt.value >= G), nt = s(() => Et.value <= X), Ft = s(() => It(le.value)), Nt = s(() => J.value ? l.icons.clock : l.icons.calendar), ve = s(() => $n(l.format)), qe = s(
201
+ ), at = s(() => ke.value.endYear < X), Ot = s(() => g.value === 0 ? h.value - 1 : h.value), Bt = s(() => g.value === 11 ? h.value + 1 : h.value), lt = s(() => Ot.value >= G), rt = s(() => Bt.value <= X), Kt = s(() => Pt(ae.value)), $t = s(() => J.value ? l.icons.clock : l.icons.calendar), ve = s(() => ta(l.format)), Ve = s(
180
202
  () => `${ve.value} - ${ve.value}`
181
203
  );
182
- Rn(
204
+ Wn(
183
205
  () => {
184
206
  var e;
185
207
  return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
186
208
  },
187
- () => l.range ? qe.value : ve.value
209
+ () => l.range ? Ve.value : ve.value
188
210
  ), se(
189
211
  () => {
190
212
  var e;
191
213
  return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
192
214
  },
193
215
  (e, t, a) => {
194
- const n = ie(e);
195
- n && (n.addEventListener("click", vt), n.addEventListener("paste", dt, !0), a(() => {
196
- n.removeEventListener("click", vt), n.removeEventListener("paste", dt, !0);
216
+ const n = oe(e);
217
+ n && (n.addEventListener("click", gt), n.addEventListener("paste", mt, !0), a(() => {
218
+ n.removeEventListener("click", gt), n.removeEventListener("paste", mt, !0);
197
219
  }));
198
220
  },
199
221
  { flush: "post" }
200
222
  ), se(v, () => {
201
- I.value = null, he();
223
+ S.value = null, he();
202
224
  });
203
- const Ee = s(
204
- () => l.clearable && !l.readonly && !l.disabled && !!v.value
225
+ function zt(e) {
226
+ return e === void 0 ? !1 : typeof e == "string" ? e.trim().length > 0 : e instanceof Date ? !0 : Array.isArray(e) ? e.length > 0 : !1;
227
+ }
228
+ const Ye = s(
229
+ () => l.clearable && !l.readonly && !l.disabled && zt(v.value)
205
230
  );
206
- function Rt() {
207
- Ee.value && (m.value = null, ee.value = null, R.value = null, A.value = !1, v.value = void 0, _.value = "", De());
231
+ function Ut() {
232
+ Ye.value && (m.value = null, ee.value = null, N.value = null, A.value = !1, v.value = void 0, _.value = "", we());
208
233
  }
209
- function Fe(e) {
210
- !l.range || !A.value || !m.value || e.getFullYear() < G || e.getFullYear() > X || (R.value = new Date(e));
234
+ function Pe(e) {
235
+ !l.range || !A.value || !m.value || e.getFullYear() < G || e.getFullYear() > X || (N.value = new Date(e));
211
236
  }
212
- function at() {
213
- R.value = null;
237
+ function ut() {
238
+ N.value = null;
214
239
  }
215
- function Pt(e) {
240
+ function Wt(e) {
216
241
  const t = e.currentTarget, a = e.relatedTarget;
217
- !t || a && t.contains(a) || at();
242
+ !t || a && t.contains(a) || ut();
218
243
  }
219
- function lt(e) {
244
+ function ot(e) {
220
245
  if (!l.range || !A.value || !m.value) return;
221
246
  const t = e.touches.item(0);
222
247
  if (!t) return;
@@ -224,102 +249,102 @@ const Kn = {
224
249
  if (!n) return;
225
250
  const r = Number(n.dataset.dayIndex);
226
251
  if (Number.isNaN(r)) return;
227
- const u = Ge.value[r];
228
- u && Fe(u.date);
252
+ const u = et.value[r];
253
+ u && Pe(u.date);
229
254
  }
230
- function Vt(e) {
255
+ function jt(e) {
231
256
  if (!(l.readonly || l.disabled) && !(e.getFullYear() < G || e.getFullYear() > X))
232
257
  if (l.range)
233
258
  if (A.value) {
234
259
  const t = m.value ?? new Date(e), a = new Date(e), [n, r] = a < t ? [a, t] : [t, a];
235
- ae.value && r.setHours(23, 59, ye.value ? 59 : 0, 0), v.value = [n, r], m.value = null, ee.value = null, R.value = null, A.value = !1;
260
+ ne.value && r.setHours(23, 59, ye.value ? 59 : 0, 0), v.value = [n, r], m.value = null, ee.value = null, N.value = null, A.value = !1;
236
261
  } else {
237
262
  const t = new Date(e);
238
- ae.value && m.value && t.setHours(
263
+ ne.value && m.value && t.setHours(
239
264
  m.value.getHours(),
240
265
  m.value.getMinutes(),
241
266
  m.value.getSeconds(),
242
267
  m.value.getMilliseconds()
243
- ), m.value = t, ee.value = null, R.value = null, A.value = !0;
268
+ ), m.value = t, ee.value = null, N.value = null, A.value = !0;
244
269
  }
245
270
  else {
246
271
  const t = new Date(e);
247
- T.value && !un(T.value) ? t.setHours(
248
- T.value.getHours(),
249
- T.value.getMinutes(),
250
- T.value.getSeconds()
251
- ) : ae.value && ct(t), v.value = t;
272
+ x.value && !hn(x.value) ? t.setHours(
273
+ x.value.getHours(),
274
+ x.value.getMinutes(),
275
+ x.value.getSeconds()
276
+ ) : ne.value && vt(t), v.value = t;
252
277
  }
253
278
  }
254
- function ue(e, t) {
255
- h.value = e, t && te();
279
+ function re(e, t) {
280
+ h.value = e, t && Me("year");
256
281
  }
257
- function K(e, t) {
258
- g.value = e, t && te();
282
+ function $(e, t) {
283
+ g.value = e, t && Me("month");
259
284
  }
260
- function Yt() {
261
- tt.value && (g.value === 0 ? (K(11), ue(h.value - 1)) : K(g.value - 1));
285
+ function Qt() {
286
+ lt.value && (g.value === 0 ? ($(11), re(h.value - 1)) : $(g.value - 1));
262
287
  }
263
- function At() {
264
- nt.value && (g.value === 11 ? (K(0), ue(h.value + 1)) : K(g.value + 1));
288
+ function Gt() {
289
+ rt.value && (g.value === 11 ? ($(0), re(h.value + 1)) : $(g.value + 1));
265
290
  }
266
- function Bt() {
267
- K((/* @__PURE__ */ new Date()).getMonth()), ue((/* @__PURE__ */ new Date()).getFullYear()), te();
291
+ function Xt() {
292
+ $((/* @__PURE__ */ new Date()).getMonth()), re((/* @__PURE__ */ new Date()).getFullYear()), De();
268
293
  }
269
- function Lt() {
270
- let e = T.value;
294
+ function Zt() {
295
+ let e = x.value;
271
296
  const t = v.value;
272
297
  if (l.range && Array.isArray(t) && t.length > 0) {
273
298
  const a = t[0];
274
- a instanceof Date ? e = a : typeof a == "string" && (e = L(a, l.format, E.value));
299
+ a instanceof Date ? e = a : typeof a == "string" && (e = O(a, l.format, q.value));
275
300
  }
276
- e = e ?? /* @__PURE__ */ new Date(), K(e.getMonth()), ue(e.getFullYear()), te();
301
+ e = e ?? /* @__PURE__ */ new Date(), $(e.getMonth()), re(e.getFullYear()), De();
277
302
  }
278
303
  function me(e) {
279
- return l.range ? e === 1 ? Ce.value ?? ee.value : T.value ?? m.value : T.value;
304
+ return l.range ? e === 1 ? Fe.value ?? ee.value : x.value ?? m.value : x.value;
280
305
  }
281
- function Ot(e, t) {
306
+ function Jt(e, t) {
282
307
  if (!l.range) {
283
308
  v.value = t;
284
309
  return;
285
310
  }
286
- const a = T.value, n = Ce.value;
311
+ const a = x.value, n = Fe.value;
287
312
  if (!a || !n) {
288
313
  e === 1 ? ee.value = t : m.value = t;
289
314
  return;
290
315
  }
291
316
  v.value = e === 1 ? [a, t] : [t, n];
292
317
  }
293
- function P(e, t) {
318
+ function V(e, t) {
294
319
  const a = me(e) ?? (() => {
295
320
  const r = /* @__PURE__ */ new Date();
296
321
  return r.setHours(0, 0, 0, 0), r;
297
322
  })(), n = new Date(a);
298
- t(n), Ot(e, n);
323
+ t(n), Jt(e, n);
299
324
  }
300
- function $t(e) {
325
+ function en(e) {
301
326
  const t = me(e);
302
327
  if (!t) return Z.value ? 12 : 0;
303
328
  const a = t.getHours();
304
329
  return Z.value ? a % 12 || 12 : a;
305
330
  }
306
- function Kt(e) {
331
+ function tn(e) {
307
332
  var t;
308
333
  return ((t = me(e)) == null ? void 0 : t.getMinutes()) ?? 0;
309
334
  }
310
- function zt(e) {
335
+ function nn(e) {
311
336
  var t;
312
337
  return ((t = me(e)) == null ? void 0 : t.getSeconds()) ?? 0;
313
338
  }
314
- function Ut(e) {
339
+ function an(e) {
315
340
  const t = me(e);
316
341
  return t ? t.getHours() >= 12 : !1;
317
342
  }
318
343
  function _e(e, t) {
319
344
  return t ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e;
320
345
  }
321
- function Wt(e) {
322
- P(e, (t) => {
346
+ function ln(e) {
347
+ V(e, (t) => {
323
348
  if (Z.value) {
324
349
  const a = t.getHours() % 12 || 12, n = a >= 12 ? 1 : a + 1, r = t.getHours() >= 12;
325
350
  t.setHours(_e(n, r));
@@ -327,8 +352,8 @@ const Kn = {
327
352
  t.setHours(t.getHours() >= 23 ? 0 : t.getHours() + 1);
328
353
  });
329
354
  }
330
- function Qt(e) {
331
- P(e, (t) => {
355
+ function rn(e) {
356
+ V(e, (t) => {
332
357
  if (Z.value) {
333
358
  const a = t.getHours() % 12 || 12, n = a <= 1 ? 12 : a - 1, r = t.getHours() >= 12;
334
359
  t.setHours(_e(n, r));
@@ -336,69 +361,69 @@ const Kn = {
336
361
  t.setHours(t.getHours() <= 0 ? 23 : t.getHours() - 1);
337
362
  });
338
363
  }
339
- function jt(e) {
340
- P(e, (t) => {
364
+ function un(e) {
365
+ V(e, (t) => {
341
366
  t.setMinutes(t.getMinutes() >= 59 ? 0 : t.getMinutes() + 1);
342
367
  });
343
368
  }
344
- function Gt(e) {
345
- P(e, (t) => {
369
+ function on(e) {
370
+ V(e, (t) => {
346
371
  t.setMinutes(t.getMinutes() <= 0 ? 59 : t.getMinutes() - 1);
347
372
  });
348
373
  }
349
- function Xt(e) {
350
- P(e, (t) => {
374
+ function sn(e) {
375
+ V(e, (t) => {
351
376
  t.setSeconds(t.getSeconds() >= 59 ? 0 : t.getSeconds() + 1);
352
377
  });
353
378
  }
354
- function Zt(e) {
355
- P(e, (t) => {
379
+ function cn(e) {
380
+ V(e, (t) => {
356
381
  t.setSeconds(t.getSeconds() <= 0 ? 59 : t.getSeconds() - 1);
357
382
  });
358
383
  }
359
- function Ne(e) {
384
+ function Ae(e) {
360
385
  return (e ?? "").replace(/\D/g, "");
361
386
  }
362
- function Jt(e) {
387
+ function dn(e) {
363
388
  return Math.min(23, Math.max(0, e));
364
389
  }
365
- function en(e) {
390
+ function fn(e) {
366
391
  return Math.min(12, Math.max(1, e));
367
392
  }
368
- function rt(e) {
393
+ function it(e) {
369
394
  return Math.min(59, Math.max(0, e));
370
395
  }
371
- function ut(e, t) {
372
- const a = Ne(e).slice(0, 2);
396
+ function st(e, t) {
397
+ const a = Ae(e).slice(0, 2);
373
398
  if (a === "") return;
374
399
  const n = Number.parseInt(a, 10);
375
400
  if (Number.isNaN(n)) return;
376
- const r = Z.value ? en(n) : Jt(n);
377
- P(t, (u) => {
401
+ const r = Z.value ? fn(n) : dn(n);
402
+ V(t, (u) => {
378
403
  Z.value ? u.setHours(_e(r, u.getHours() >= 12)) : u.setHours(r);
379
404
  });
380
405
  }
381
- function ot(e, t) {
382
- const a = Ne(e).slice(0, 2);
406
+ function ct(e, t) {
407
+ const a = Ae(e).slice(0, 2);
383
408
  if (a === "") return;
384
409
  const n = Number.parseInt(a, 10);
385
410
  if (Number.isNaN(n)) return;
386
- const r = rt(n);
387
- P(t, (u) => {
411
+ const r = it(n);
412
+ V(t, (u) => {
388
413
  u.setMinutes(r);
389
414
  });
390
415
  }
391
- function it(e, t) {
392
- const a = Ne(e).slice(0, 2);
416
+ function dt(e, t) {
417
+ const a = Ae(e).slice(0, 2);
393
418
  if (a === "") return;
394
419
  const n = Number.parseInt(a, 10);
395
420
  if (Number.isNaN(n)) return;
396
- const r = rt(n);
397
- P(t, (u) => {
421
+ const r = it(n);
422
+ V(t, (u) => {
398
423
  u.setSeconds(r);
399
424
  });
400
425
  }
401
- async function Re(e, t, a) {
426
+ async function Le(e, t, a) {
402
427
  if (e.ctrlKey || e.altKey || e.metaKey || !/^\d$/.test(e.key)) return;
403
428
  const n = e.target;
404
429
  if (!n) return;
@@ -407,106 +432,106 @@ const Kn = {
407
432
  return;
408
433
  e.preventDefault();
409
434
  const c = `${n.value.slice(0, r)}${e.key}${n.value.slice(r + 1)}`;
410
- t === "hours" ? ut(c, a) : t === "minutes" ? ot(c, a) : it(c, a);
435
+ t === "hours" ? st(c, a) : t === "minutes" ? ct(c, a) : dt(c, a);
411
436
  const y = Math.min(r + 1, n.maxLength);
412
437
  await F(), n.setSelectionRange(y, y);
413
438
  }
414
- function tn(e, t) {
415
- P(t, (a) => {
439
+ function vn(e, t) {
440
+ V(t, (a) => {
416
441
  const n = a.getHours() % 12 || 12;
417
442
  a.setHours(_e(n, e));
418
443
  });
419
444
  }
420
- async function Pe(e, t, a, n) {
445
+ async function Oe(e, t, a, n) {
421
446
  if (!e) return;
422
- const r = Pn(t, a, n), u = () => e.setSelectionRange(r, r);
447
+ const r = jn(t, a, n), u = () => e.setSelectionRange(r, r);
423
448
  u(), await F(), u(), await new Promise((c) => {
424
449
  requestAnimationFrame(() => {
425
450
  u(), c();
426
451
  });
427
452
  });
428
453
  }
429
- async function st(e, t, a, n) {
454
+ async function ft(e, t, a, n) {
430
455
  if (a === t) {
431
456
  _.value !== a && (_.value = a);
432
457
  return;
433
458
  }
434
- _.value = a, await Pe(e, t, a, n);
459
+ _.value = a, await Oe(e, t, a, n);
435
460
  }
436
- async function nn(e) {
437
- var B;
461
+ async function mn(e) {
462
+ var L;
438
463
  if (de > 0) return;
439
464
  if (l.readonly || l.disabled) {
440
465
  he();
441
466
  return;
442
467
  }
443
- const t = ie((B = C.value) == null ? void 0 : B.inputRef), a = (t == null ? void 0 : t.selectionStart) ?? 0, n = e ?? "";
468
+ const t = oe((L = C.value) == null ? void 0 : L.inputRef), a = (t == null ? void 0 : t.selectionStart) ?? 0, n = e ?? "";
444
469
  if (!n) {
445
- v.value = void 0, I.value = null, _.value = "", Y.value = !1;
470
+ v.value = void 0, S.value = null, _.value = "", P.value = !1;
446
471
  return;
447
472
  }
448
473
  if (l.range) {
449
- const d = we(n, qe.value);
450
- await st(t, n, d, a), I.value = d;
451
- const H = Ve(d);
452
- if (H) {
453
- v.value = H, I.value = null;
454
- const Ae = H.map((wn) => j(wn, l.format, $.value)).join(" - ");
455
- Ae !== d && (_.value = Ae, await Pe(t, d, Ae, a)), Y.value = !1;
474
+ const d = xe(n, Ve.value);
475
+ await ft(t, n, d, a), S.value = d;
476
+ const I = Be(d);
477
+ if (I) {
478
+ v.value = I, S.value = null;
479
+ const $e = I.map((Vn) => Q(Vn, l.format, K.value)).join(" - ");
480
+ $e !== d && (_.value = $e, await Oe(t, d, $e, a)), P.value = !1;
456
481
  }
457
482
  return;
458
483
  }
459
- const r = we(n, ve.value), u = ht(r, l.format);
460
- let c = u, y = L(u, l.format, E.value);
484
+ const r = xe(n, ve.value), u = _t(r, l.format);
485
+ let c = u, y = O(u, l.format, q.value);
461
486
  if (!y) {
462
- const d = L(n, l.format, E.value);
487
+ const d = O(n, l.format, q.value);
463
488
  d && (c = n, y = d);
464
489
  }
465
- if (await st(t, n, c, a), I.value = c, y) {
466
- const d = oe(y, n);
467
- v.value = d, I.value = null;
468
- const H = j(d, l.format, $.value);
469
- H !== c && (_.value = H, await Pe(t, c, H, a)), Y.value = !1;
490
+ if (await ft(t, n, c, a), S.value = c, y) {
491
+ const d = ue(y, n);
492
+ v.value = d, S.value = null;
493
+ const I = Q(d, l.format, K.value);
494
+ I !== c && (_.value = I, await Oe(t, c, I, a)), P.value = !1;
470
495
  }
471
496
  }
472
- function Ve(e, t) {
497
+ function Be(e, t) {
473
498
  const a = e.split(" - ");
474
499
  if (a.length !== 2) return null;
475
500
  const n = (c) => {
476
- const y = c.trim(), B = L(y, l.format, E.value);
477
- return B || (t != null && t.complete ? ze(y, l.format, E.value) : null);
501
+ const y = c.trim(), L = O(y, l.format, q.value);
502
+ return L || (t != null && t.complete ? Qe(y, l.format, q.value) : null);
478
503
  }, r = n(a[0] ?? ""), u = n(a[1] ?? "");
479
504
  return !r || !u ? null : u < r ? [u, r] : [r, u];
480
505
  }
481
- function an() {
506
+ function pn() {
482
507
  if (l.readonly || l.disabled) return !1;
483
- const e = I.value ?? _.value;
508
+ const e = S.value ?? _.value;
484
509
  if (!e) return !1;
485
510
  if (l.range) {
486
- const c = we(e, qe.value), y = Ve(c, { complete: !0 });
487
- return y ? (v.value = y, I.value = null, Y.value = !1, _.value = y.map((B) => j(B, l.format, $.value)).join(" - "), !0) : (I.value = null, v.value = void 0, Y.value = !0, _.value = "", !1);
511
+ const c = xe(e, Ve.value), y = Be(c, { complete: !0 });
512
+ return y ? (v.value = y, S.value = null, P.value = !1, _.value = y.map((L) => Q(L, l.format, K.value)).join(" - "), !0) : (S.value = null, v.value = void 0, P.value = !0, _.value = "", !1);
488
513
  }
489
- const t = we(e, ve.value), a = ht(t, l.format), n = ze(
514
+ const t = xe(e, ve.value), a = _t(t, l.format), n = Qe(
490
515
  a,
491
516
  l.format,
492
- E.value
517
+ q.value
493
518
  );
494
519
  if (!n)
495
- return I.value = null, v.value = void 0, Y.value = !0, _.value = "", !1;
496
- const u = !!L(a, l.format, E.value) || kt(a, l.format) ? n : oe(n, a);
497
- return v.value = u, I.value = null, Y.value = !1, _.value = j(u, l.format, $.value), !0;
520
+ return S.value = null, v.value = void 0, P.value = !0, _.value = "", !1;
521
+ const u = !!O(a, l.format, q.value) || Mt(a, l.format) ? n : ue(n, a);
522
+ return v.value = u, S.value = null, P.value = !1, _.value = Q(u, l.format, K.value), !0;
498
523
  }
499
- function ln(e) {
524
+ function gn(e) {
500
525
  const t = e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i, "").trim();
501
526
  return t && t !== e ? t : null;
502
527
  }
503
- function rn(e) {
504
- return !ae.value || L(e, l.format, E.value) || kt(e, l.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
528
+ function yn(e) {
529
+ return !ne.value || O(e, l.format, q.value) || Mt(e, l.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
505
530
  }
506
- function un(e) {
531
+ function hn(e) {
507
532
  return e.getHours() === 0 && e.getMinutes() === 0 && e.getSeconds() === 0 && e.getMilliseconds() === 0;
508
533
  }
509
- function ct(e) {
534
+ function vt(e) {
510
535
  const t = /* @__PURE__ */ new Date();
511
536
  e.setHours(
512
537
  t.getHours(),
@@ -515,41 +540,41 @@ const Kn = {
515
540
  ye.value ? t.getMilliseconds() : 0
516
541
  );
517
542
  }
518
- function oe(e, t) {
519
- if (l.range || !ae.value || t !== void 0 && rn(t)) return e;
543
+ function ue(e, t) {
544
+ if (l.range || !ne.value || t !== void 0 && yn(t)) return e;
520
545
  const a = new Date(e);
521
- return ct(a), a;
546
+ return vt(a), a;
522
547
  }
523
- function on(e) {
548
+ function bn(e) {
524
549
  if (l.range)
525
- return Ve(e);
526
- const t = L(e, l.format, E.value);
527
- if (t) return oe(t, e);
528
- const a = bn(e);
529
- if (a) return oe(a, e);
530
- const n = ze(e, l.format, E.value);
531
- if (n) return oe(n, e);
532
- const r = ln(l.format);
550
+ return Be(e);
551
+ const t = O(e, l.format, q.value);
552
+ if (t) return ue(t, e);
553
+ const a = In(e);
554
+ if (a) return ue(a, e);
555
+ const n = Qe(e, l.format, q.value);
556
+ if (n) return ue(n, e);
557
+ const r = gn(l.format);
533
558
  if (r) {
534
- const u = L(e, r, E.value);
535
- if (u) return oe(u, e);
559
+ const u = O(e, r, q.value);
560
+ if (u) return ue(u, e);
536
561
  }
537
562
  return null;
538
563
  }
539
- function sn(e) {
540
- if (Y.value = !1, I.value = null, Array.isArray(e)) {
541
- const a = e.map((n) => j(n, l.format, $.value)).join(" - ");
564
+ function kn(e) {
565
+ if (P.value = !1, S.value = null, Array.isArray(e)) {
566
+ const a = e.map((n) => Q(n, l.format, K.value)).join(" - ");
542
567
  de += 1, v.value = e, _.value = a, F(() => {
543
568
  de -= 1;
544
569
  });
545
570
  return;
546
571
  }
547
- const t = j(e, l.format, $.value);
572
+ const t = Q(e, l.format, K.value);
548
573
  de += 1, v.value = e, _.value = t, F(() => {
549
574
  de -= 1;
550
575
  });
551
576
  }
552
- function dt(e) {
577
+ function mt(e) {
553
578
  var n, r, u, c;
554
579
  if (l.readonly || l.disabled) {
555
580
  e.preventDefault();
@@ -560,97 +585,97 @@ const Kn = {
560
585
  e.preventDefault();
561
586
  return;
562
587
  }
563
- const a = on(t);
588
+ const a = bn(t);
564
589
  if (!a) {
565
590
  e.preventDefault();
566
591
  return;
567
592
  }
568
- e.preventDefault(), sn(a);
593
+ e.preventDefault(), kn(a);
569
594
  }
570
- function cn(e) {
595
+ function _n(e) {
571
596
  const t = e.target;
572
- if (!(t instanceof Element) || !N.value) return null;
597
+ if (!(t instanceof Element) || !E.value) return null;
573
598
  const a = t.closest(
574
599
  "button, input, select, textarea, a[href], [tabindex], [contenteditable]"
575
600
  );
576
- return a && N.value.contains(a) ? a : null;
601
+ return a && E.value.contains(a) ? a : null;
577
602
  }
578
- function dn(e) {
603
+ function Dn(e) {
579
604
  return !(e.matches(":disabled") || e.getAttribute("aria-disabled") === "true" || e.getAttribute("tabindex") === "-1");
580
605
  }
581
- function fn(e) {
606
+ function Mn(e) {
582
607
  var a;
583
- if (!(e.target instanceof Node) || !((a = N.value) != null && a.contains(e.target))) return;
608
+ if (!(e.target instanceof Node) || !((a = E.value) != null && a.contains(e.target))) return;
584
609
  fe = !0;
585
- const t = cn(e);
586
- t && !dn(t) && e.preventDefault();
610
+ const t = _n(e);
611
+ t && !Dn(t) && e.preventDefault();
587
612
  }
588
- function ft() {
589
- return N.value ? Array.from(N.value.querySelectorAll(_t)).filter(
613
+ function pt() {
614
+ return E.value ? Array.from(E.value.querySelectorAll(wt)).filter(
590
615
  (e) => e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0
591
616
  ) : [];
592
617
  }
593
- function vn() {
618
+ function wn() {
594
619
  var n, r;
595
- const e = ie((n = C.value) == null ? void 0 : n.inputRef);
620
+ const e = oe((n = C.value) == null ? void 0 : n.inputRef);
596
621
  if (!e) return;
597
622
  const t = Array.from(
598
- document.querySelectorAll(_t)
623
+ document.querySelectorAll(wt)
599
624
  ).filter(
600
625
  (u) => u.offsetWidth > 0 || u.offsetHeight > 0 || u.getClientRects().length > 0
601
626
  ), a = t.indexOf(e);
602
627
  a >= 0 && a < t.length - 1 && ((r = t[a + 1]) == null || r.focus());
603
628
  }
604
- function mn(e) {
605
- if (e.key !== "Tab" || !x.value || l.readonly || l.disabled) return;
629
+ function Tn(e) {
630
+ if (e.key !== "Tab" || !T.value || l.readonly || l.disabled) return;
606
631
  if (e.shiftKey) {
607
- O = !1, x.value = !1;
632
+ B = !1, T.value = !1;
608
633
  return;
609
634
  }
610
- const [t] = ft();
635
+ const [t] = pt();
611
636
  t && (e.preventDefault(), fe = !0, t.focus());
612
637
  }
613
- async function pn(e) {
638
+ async function xn(e) {
614
639
  if (e.key !== "Tab") return;
615
- const t = ft();
640
+ const t = pt();
616
641
  if (!t.length) return;
617
642
  const a = t[0], n = t[t.length - 1], r = document.activeElement;
618
643
  if (e.shiftKey) {
619
644
  if (r !== a) return;
620
- e.preventDefault(), fe = !0, De();
645
+ e.preventDefault(), fe = !0, we();
621
646
  return;
622
647
  }
623
- r === n && (e.preventDefault(), Se = !0, x.value = !1, await F(), vn());
648
+ r === n && (e.preventDefault(), Ce = !0, T.value = !1, await F(), wn());
624
649
  }
625
- async function gn(e) {
650
+ async function Hn(e) {
626
651
  var r, u, c;
627
- if (an(), fe) {
652
+ if (pn(), fe) {
628
653
  fe = !1;
629
654
  return;
630
655
  }
631
656
  const t = e == null ? void 0 : e.relatedTarget;
632
- if (t instanceof Node && ((r = N.value) != null && r.contains(t)))
657
+ if (t instanceof Node && ((r = E.value) != null && r.contains(t)))
633
658
  return;
634
659
  await F();
635
- const a = ie((u = C.value) == null ? void 0 : u.inputRef), n = document.activeElement;
636
- a !== n && (n instanceof Node && ((c = N.value) != null && c.contains(n)) || (O = !1, x.value = !1, Te.value = !1, he()));
660
+ const a = oe((u = C.value) == null ? void 0 : u.inputRef), n = document.activeElement;
661
+ a !== n && (n instanceof Node && ((c = E.value) != null && c.contains(n)) || (B = !1, T.value = !1, Se.value = !1, he()));
637
662
  }
638
- function yn() {
663
+ function Sn() {
639
664
  if (!(l.readonly || l.disabled)) {
640
- if (Te.value = !0, O) {
641
- O = !1;
665
+ if (Se.value = !0, B) {
666
+ B = !1;
642
667
  return;
643
668
  }
644
- x.value || (x.value = !0);
669
+ T.value || (T.value = !0);
645
670
  }
646
671
  }
647
- function vt() {
648
- l.readonly || l.disabled || (O = !1, x.value = !0);
672
+ function gt() {
673
+ l.readonly || l.disabled || (B = !1, T.value = !0);
649
674
  }
650
- function hn(e) {
651
- e || Qe(), x.value = e;
675
+ function Cn(e) {
676
+ e || Ze(), T.value = e;
652
677
  }
653
- function bn(e) {
678
+ function In(e) {
654
679
  const t = /[A-Za-z]/.test(e), a = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(
655
680
  e
656
681
  );
@@ -658,123 +683,131 @@ const Kn = {
658
683
  const n = new Date(e);
659
684
  return Number.isNaN(n.getTime()) ? null : n;
660
685
  }
661
- function ie(e) {
686
+ function oe(e) {
662
687
  return e instanceof HTMLInputElement ? e : typeof e == "object" && e !== null && "value" in e && e.value instanceof HTMLInputElement ? e.value : null;
663
688
  }
664
- function kn(e) {
689
+ function Rn(e) {
665
690
  return e.isSelected || e.isRangeStart || e.isRangeEnd ? "bold" : e.isInRange ? "tonal" : "ghost";
666
691
  }
667
692
  function pe(e) {
668
693
  var t;
669
- (t = N.value) == null || t.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
694
+ (t = E.value) == null || t.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
670
695
  }
671
- async function mt() {
696
+ async function yt() {
672
697
  var e;
673
- if (!x.value || J.value) {
698
+ if (!T.value || J.value) {
674
699
  pe(0);
675
700
  return;
676
701
  }
677
702
  D.value === "date" && (await F(), pe(((e = Ie.value) == null ? void 0 : e.getBoundingClientRect().height) ?? 0));
678
703
  }
679
704
  function z() {
680
- re == null || re.disconnect(), re = null;
705
+ le == null || le.disconnect(), le = null;
681
706
  }
682
- async function pt() {
683
- !x.value || J.value || D.value !== "date" || (await F(), Ie.value && (z(), re = new MutationObserver(() => {
684
- mt();
685
- }), re.observe(Ie.value, {
707
+ async function ht() {
708
+ !T.value || J.value || D.value !== "date" || (await F(), Ie.value && (z(), le = new MutationObserver(() => {
709
+ yt();
710
+ }), le.observe(Ie.value, {
686
711
  childList: !0,
687
712
  subtree: !0,
688
713
  attributes: !0,
689
714
  characterData: !0
690
- }), mt()));
715
+ }), yt()));
691
716
  }
692
- function gt() {
717
+ function bt() {
693
718
  D.value = "time", z();
694
719
  }
695
- function te() {
696
- D.value = "date", pt();
720
+ function De() {
721
+ D.value = "date", ht();
697
722
  }
698
- async function _n() {
723
+ async function Me(e) {
699
724
  var a;
725
+ (a = E.value) == null || a.focus(), De(), await F();
726
+ const t = e === "year" ? St.value : e === "month" ? Ht.value : e === "time" ? Ct.value : null;
727
+ qt(t);
728
+ }
729
+ function qn() {
730
+ const e = D.value;
731
+ e !== "date" && Me(e);
732
+ }
733
+ async function En() {
700
734
  z(), D.value = "month", await F();
701
- const e = Xe.value.findIndex((n, r) => r !== g.value), t = e >= 0 ? e : 0;
702
- (a = document.getElementById(`q-date-time-month-option-${t}`)) == null || a.focus();
735
+ const e = Re.get(g.value);
736
+ e == null || e.scrollIntoView({ block: "center" }), e == null || e.focus();
703
737
  }
704
- async function Dn() {
705
- z(), le.value = h.value, D.value = "year", await F();
706
- const e = document.getElementById(`q-date-time-year-${le.value}`);
707
- e == null || e.scrollIntoView({ block: "center" });
738
+ async function Fn() {
739
+ var e;
740
+ z(), ae.value = h.value, D.value = "year", await F(), (e = qe.get(ae.value)) == null || e.scrollIntoView({ block: "center" });
708
741
  }
709
- async function Ye(e) {
710
- var a;
742
+ async function Ke(e) {
711
743
  if (e.key !== "Escape") return;
712
- if (O = !0, D.value === "date") {
713
- e.preventDefault(), x.value = !1;
744
+ if (B = !0, D.value === "date") {
745
+ e.preventDefault(), T.value = !1;
714
746
  return;
715
747
  }
716
- const t = D.value === "year" ? "q-date-time-year" : D.value === "month" ? "q-date-time-month" : D.value === "time" ? "q-date-time-toggle-time" : "";
717
- e.preventDefault(), te(), await F(), t && ((a = document.getElementById(t)) == null || a.focus());
748
+ e.preventDefault();
749
+ const t = D.value;
750
+ await Me(t);
718
751
  }
719
- function De() {
752
+ function we() {
720
753
  var e, t;
721
754
  (t = (e = C.value) == null ? void 0 : e.inputRef) == null || t.focus();
722
755
  }
723
- function Mn() {
756
+ function Nn() {
724
757
  var a, n;
725
- if (Se) {
726
- Se = !1;
758
+ if (Ce) {
759
+ Ce = !1;
727
760
  return;
728
761
  }
729
- const e = ie((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
730
- e && t !== e && !(t instanceof Node && ((n = N.value) != null && n.contains(t))) || De();
762
+ const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
763
+ e && t !== e && !(t instanceof Node && ((n = E.value) != null && n.contains(t))) || we();
731
764
  }
732
765
  return se(v, () => {
733
- T.value && (K(T.value.getMonth()), ue(T.value.getFullYear()));
734
- }), se(x, (e, t) => {
766
+ x.value && ($(x.value.getMonth()), re(x.value.getFullYear()));
767
+ }), se(T, (e, t) => {
735
768
  if (J.value) {
736
769
  z(), pe(0);
737
770
  return;
738
771
  }
739
- m.value = null, ee.value = null, R.value = null, A.value = !1, e ? (document.addEventListener("keydown", Ye), Lt(), pt()) : (t && Qe(), document.removeEventListener("keydown", Ye), z(), pe(0));
772
+ m.value = null, ee.value = null, N.value = null, A.value = !1, e ? (document.addEventListener("keydown", Ke, { capture: !0 }), Zt(), ht()) : (t && Ze(), document.removeEventListener("keydown", Ke, { capture: !0 }), z(), pe(0));
740
773
  }), se(
741
774
  J,
742
775
  (e) => {
743
- e && z(), x.value = !1, e && pe(0), e ? gt() : te();
776
+ e && z(), T.value = !1, e && pe(0), e ? bt() : De();
744
777
  },
745
778
  { immediate: !0 }
746
- ), In(() => {
747
- z(), document.removeEventListener("keydown", Ye);
779
+ ), Ln(() => {
780
+ z(), document.removeEventListener("keydown", Ke, { capture: !0 });
748
781
  }), (e, t) => {
749
782
  var a;
750
- return f(), S(
751
- V,
783
+ return f(), H(
784
+ Y,
752
785
  null,
753
786
  [
754
- i(o(Me), {
787
+ i(o(Te), {
755
788
  id: l.id,
756
789
  ref: "field",
757
790
  "model-value": _.value,
758
- class: yt(["q-date-time-picker", l.class]),
759
- clearable: Ee.value,
791
+ class: kt(["q-date-time-picker", l.class]),
792
+ clearable: Ye.value,
760
793
  label: l.label,
761
794
  "label-position": l.labelPosition,
762
795
  readonly: l.readonly,
763
796
  disabled: l.disabled,
764
- placeholder: Dt.value,
797
+ placeholder: Tt.value,
765
798
  required: l.required,
766
799
  size: l.size,
767
- invalid: l.invalid || Y.value,
768
- "onClick:clear": De,
769
- onFocusin: yn,
770
- onKeydown: mn,
771
- onBlur: gn,
772
- "onUpdate:modelValue": nn
773
- }, Cn({
800
+ invalid: l.invalid || P.value,
801
+ "onClick:clear": we,
802
+ onFocusin: Sn,
803
+ onKeydown: Tn,
804
+ onBlur: Hn,
805
+ "onUpdate:modelValue": mn
806
+ }, On({
774
807
  prepend: b(() => [
775
808
  i(
776
809
  o(w),
777
- ne({ class: "q-date-time-picker__input-icon" }, Nt.value),
810
+ te({ class: "q-date-time-picker__input-icon" }, $t.value),
778
811
  null,
779
812
  16
780
813
  /* FULL_PROPS */
@@ -786,14 +819,14 @@ const Kn = {
786
819
  e.$slots.extras ? {
787
820
  name: "extras",
788
821
  fn: b(() => [
789
- Hn(e.$slots, "extras")
822
+ Bn(e.$slots, "extras")
790
823
  ]),
791
824
  key: "0"
792
825
  } : void 0
793
826
  ]), 1032, ["id", "model-value", "class", "clearable", "label", "label-position", "readonly", "disabled", "placeholder", "required", "size", "invalid"]),
794
- !l.readonly && !l.disabled ? (f(), U(o(Fn), {
827
+ !l.readonly && !l.disabled ? (f(), U(o(zn), {
795
828
  key: 0,
796
- "model-value": x.value,
829
+ "model-value": T.value,
797
830
  anchor: (a = C.value) == null ? void 0 : a.fieldRef,
798
831
  inline: l.inline,
799
832
  offset: 8,
@@ -802,8 +835,8 @@ const Kn = {
802
835
  arrow: "",
803
836
  "non-modal": "",
804
837
  spy: "",
805
- onLeave: Mn,
806
- "onUpdate:modelValue": hn
838
+ onLeave: Nn,
839
+ "onUpdate:modelValue": Cn
807
840
  }, {
808
841
  default: b(() => [
809
842
  k(
@@ -811,27 +844,28 @@ const Kn = {
811
844
  {
812
845
  ref: "menu",
813
846
  class: "q-date-time-picker__menu",
814
- onPointerdownCapture: fn,
815
- onKeydown: pn
847
+ tabindex: "-1",
848
+ onPointerdownCapture: Mn,
849
+ onKeydown: xn
816
850
  },
817
851
  [
818
852
  M(" Calendar View "),
819
- D.value === "date" ? (f(), S(
853
+ D.value === "date" ? (f(), H(
820
854
  "div",
821
- Kn,
855
+ na,
822
856
  [
823
857
  M(" Header "),
824
- k("div", zn, [
858
+ k("div", aa, [
825
859
  i(o(p), {
826
860
  variant: "ghost",
827
- disabled: !tt.value,
861
+ disabled: !lt.value,
828
862
  title: l.texts.previousMonth,
829
- onClick: Yt
863
+ onClick: Qt
830
864
  }, {
831
865
  default: b(() => [
832
866
  i(
833
867
  o(w),
834
- W(Q(l.icons.back)),
868
+ W(j(l.icons.back)),
835
869
  null,
836
870
  16
837
871
  /* FULL_PROPS */
@@ -841,29 +875,31 @@ const Kn = {
841
875
  /* STABLE */
842
876
  }, 8, ["disabled", "title"]),
843
877
  i(o(p), {
844
- id: "q-date-time-month",
878
+ ref: "monthHeader",
879
+ "data-testid": "q-date-time-picker-month-header",
845
880
  variant: "ghost",
846
881
  label: be(g.value, 3),
847
882
  title: l.texts.pickMonth,
848
- onClick: _n
883
+ onClick: En
849
884
  }, null, 8, ["label", "title"]),
850
885
  i(o(p), {
851
- id: "q-date-time-year",
886
+ ref: "yearHeader",
887
+ "data-testid": "q-date-time-picker-year-header",
852
888
  variant: "ghost",
853
889
  label: h.value.toString(),
854
890
  title: l.texts.pickYear,
855
- onClick: Dn
891
+ onClick: Fn
856
892
  }, null, 8, ["label", "title"]),
857
893
  i(o(p), {
858
894
  variant: "ghost",
859
- disabled: !nt.value,
895
+ disabled: !rt.value,
860
896
  title: l.texts.nextMonth,
861
- onClick: At
897
+ onClick: Gt
862
898
  }, {
863
899
  default: b(() => [
864
900
  i(
865
901
  o(w),
866
- W(Q(l.icons.forward)),
902
+ W(j(l.icons.forward)),
867
903
  null,
868
904
  16
869
905
  /* FULL_PROPS */
@@ -874,17 +910,17 @@ const Kn = {
874
910
  }, 8, ["disabled", "title"])
875
911
  ]),
876
912
  M(" Weekday Headers "),
877
- k("div", Un, [
878
- (f(!0), S(
879
- V,
913
+ k("div", la, [
914
+ (f(!0), H(
915
+ Y,
880
916
  null,
881
- ge(St.value, (n) => (f(), S(
917
+ ge(Vt.value, (n) => (f(), H(
882
918
  "div",
883
919
  {
884
920
  key: n,
885
921
  class: "q-date-time-picker__weekday"
886
922
  },
887
- Le(n),
923
+ ze(n),
888
924
  1
889
925
  /* TEXT */
890
926
  ))),
@@ -897,19 +933,19 @@ const Kn = {
897
933
  "div",
898
934
  {
899
935
  class: "q-date-time-picker__days",
900
- onMouseleave: at,
901
- onFocusout: Pt,
902
- onTouchstartPassive: lt,
903
- onTouchmovePassive: lt
936
+ onMouseleave: ut,
937
+ onFocusout: Wt,
938
+ onTouchstartPassive: ot,
939
+ onTouchmovePassive: ot
904
940
  },
905
941
  [
906
- (f(!0), S(
907
- V,
942
+ (f(!0), H(
943
+ Y,
908
944
  null,
909
- ge(Ge.value, (n, r) => (f(), U(o(p), {
945
+ ge(et.value, (n, r) => (f(), U(o(p), {
910
946
  key: r,
911
947
  "data-day-index": r,
912
- class: yt([
948
+ class: kt([
913
949
  "q-date-time-picker__day",
914
950
  {
915
951
  "q-date-time-picker__day--other-month": !n.isCurrentMonth,
@@ -921,11 +957,11 @@ const Kn = {
921
957
  }
922
958
  ]),
923
959
  label: n.date.getDate().toString(),
924
- variant: kn(n),
960
+ variant: Rn(n),
925
961
  disabled: n.isDisabled,
926
- onMouseenter: () => Fe(n.date),
927
- onFocus: () => Fe(n.date),
928
- onClick: () => Vt(n.date)
962
+ onMouseenter: () => Pe(n.date),
963
+ onFocus: () => Pe(n.date),
964
+ onClick: () => jt(n.date)
929
965
  }, null, 8, ["data-day-index", "class", "label", "variant", "disabled", "onMouseenter", "onFocus", "onClick"]))),
930
966
  128
931
967
  /* KEYED_FRAGMENT */
@@ -937,41 +973,41 @@ const Kn = {
937
973
  ],
938
974
  512
939
975
  /* NEED_PATCH */
940
- )) : D.value === "time" ? (f(), S(
941
- V,
976
+ )) : D.value === "time" ? (f(), H(
977
+ Y,
942
978
  { key: 1 },
943
979
  [
944
980
  M(" Time View "),
945
- k("div", Wn, [
946
- (f(!0), S(
947
- V,
981
+ k("div", ra, [
982
+ (f(!0), H(
983
+ Y,
948
984
  null,
949
- ge(l.range ? 2 : 1, (n) => (f(), S("div", {
985
+ ge(l.range ? 2 : 1, (n) => (f(), H("div", {
950
986
  key: n,
951
987
  class: "q-date-time-picker__time-group"
952
988
  }, [
953
- Z.value ? (f(), S("div", Qn, [
954
- i(o(Nn), {
955
- "model-value": Ut(n - 1),
989
+ Z.value ? (f(), H("div", ua, [
990
+ i(o(Un), {
991
+ "model-value": an(n - 1),
956
992
  "show-state-labels": "",
957
993
  size: "small",
958
994
  "false-label": l.texts.am,
959
995
  "true-label": l.texts.pm,
960
- "onUpdate:modelValue": (r) => tn(r ?? !1, n - 1)
996
+ "onUpdate:modelValue": (r) => vn(r ?? !1, n - 1)
961
997
  }, null, 8, ["model-value", "false-label", "true-label", "onUpdate:modelValue"])
962
998
  ])) : M("v-if", !0),
963
999
  M(" Time Inputs "),
964
- k("div", jn, [
965
- k("div", Gn, [
1000
+ k("div", oa, [
1001
+ k("div", ia, [
966
1002
  i(o(p), {
967
1003
  variant: "ghost",
968
1004
  title: l.texts.increaseHour,
969
- onClick: (r) => Wt(n - 1)
1005
+ onClick: (r) => ln(n - 1)
970
1006
  }, {
971
1007
  default: b(() => [
972
1008
  i(
973
1009
  o(w),
974
- ne({ ref_for: !0 }, l.icons.up),
1010
+ te({ ref_for: !0 }, l.icons.up),
975
1011
  null,
976
1012
  16
977
1013
  /* FULL_PROPS */
@@ -980,24 +1016,24 @@ const Kn = {
980
1016
  _: 1
981
1017
  /* STABLE */
982
1018
  }, 8, ["title", "onClick"]),
983
- i(o(Me), {
1019
+ i(o(Te), {
984
1020
  class: "q-date-time-picker__time-number",
985
1021
  size: "small",
986
1022
  inputmode: "numeric",
987
1023
  "max-length": 2,
988
- "model-value": o(Ke)($t(n - 1)),
989
- onKeydown: (r) => Re(r, "hours", n - 1),
990
- "onUpdate:modelValue": (r) => ut(r, n - 1)
1024
+ "model-value": o(je)(en(n - 1)),
1025
+ onKeydown: (r) => Le(r, "hours", n - 1),
1026
+ "onUpdate:modelValue": (r) => st(r, n - 1)
991
1027
  }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
992
1028
  i(o(p), {
993
1029
  variant: "ghost",
994
1030
  title: l.texts.decreaseHour,
995
- onClick: (r) => Qt(n - 1)
1031
+ onClick: (r) => rn(n - 1)
996
1032
  }, {
997
1033
  default: b(() => [
998
1034
  i(
999
1035
  o(w),
1000
- ne({ ref_for: !0 }, l.icons.down),
1036
+ te({ ref_for: !0 }, l.icons.down),
1001
1037
  null,
1002
1038
  16
1003
1039
  /* FULL_PROPS */
@@ -1014,16 +1050,16 @@ const Kn = {
1014
1050
  -1
1015
1051
  /* CACHED */
1016
1052
  )),
1017
- k("div", Xn, [
1053
+ k("div", sa, [
1018
1054
  i(o(p), {
1019
1055
  variant: "ghost",
1020
1056
  title: l.texts.increaseMinute,
1021
- onClick: (r) => jt(n - 1)
1057
+ onClick: (r) => un(n - 1)
1022
1058
  }, {
1023
1059
  default: b(() => [
1024
1060
  i(
1025
1061
  o(w),
1026
- ne({ ref_for: !0 }, l.icons.up),
1062
+ te({ ref_for: !0 }, l.icons.up),
1027
1063
  null,
1028
1064
  16
1029
1065
  /* FULL_PROPS */
@@ -1032,24 +1068,24 @@ const Kn = {
1032
1068
  _: 1
1033
1069
  /* STABLE */
1034
1070
  }, 8, ["title", "onClick"]),
1035
- i(o(Me), {
1071
+ i(o(Te), {
1036
1072
  class: "q-date-time-picker__time-number",
1037
1073
  size: "small",
1038
1074
  inputmode: "numeric",
1039
1075
  "max-length": 2,
1040
- "model-value": o(Ke)(Kt(n - 1)),
1041
- onKeydown: (r) => Re(r, "minutes", n - 1),
1042
- "onUpdate:modelValue": (r) => ot(r, n - 1)
1076
+ "model-value": o(je)(tn(n - 1)),
1077
+ onKeydown: (r) => Le(r, "minutes", n - 1),
1078
+ "onUpdate:modelValue": (r) => ct(r, n - 1)
1043
1079
  }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1044
1080
  i(o(p), {
1045
1081
  variant: "ghost",
1046
1082
  title: l.texts.decreaseMinute,
1047
- onClick: (r) => Gt(n - 1)
1083
+ onClick: (r) => on(n - 1)
1048
1084
  }, {
1049
1085
  default: b(() => [
1050
1086
  i(
1051
1087
  o(w),
1052
- ne({ ref_for: !0 }, l.icons.down),
1088
+ te({ ref_for: !0 }, l.icons.down),
1053
1089
  null,
1054
1090
  16
1055
1091
  /* FULL_PROPS */
@@ -1059,8 +1095,8 @@ const Kn = {
1059
1095
  /* STABLE */
1060
1096
  }, 8, ["title", "onClick"])
1061
1097
  ]),
1062
- ye.value ? (f(), S(
1063
- V,
1098
+ ye.value ? (f(), H(
1099
+ Y,
1064
1100
  { key: 0 },
1065
1101
  [
1066
1102
  t[0] || (t[0] = k(
@@ -1070,16 +1106,16 @@ const Kn = {
1070
1106
  -1
1071
1107
  /* CACHED */
1072
1108
  )),
1073
- k("div", Zn, [
1109
+ k("div", ca, [
1074
1110
  i(o(p), {
1075
1111
  variant: "ghost",
1076
1112
  title: l.texts.increaseSecond,
1077
- onClick: (r) => Xt(n - 1)
1113
+ onClick: (r) => sn(n - 1)
1078
1114
  }, {
1079
1115
  default: b(() => [
1080
1116
  i(
1081
1117
  o(w),
1082
- ne({ ref_for: !0 }, l.icons.up),
1118
+ te({ ref_for: !0 }, l.icons.up),
1083
1119
  null,
1084
1120
  16
1085
1121
  /* FULL_PROPS */
@@ -1088,24 +1124,24 @@ const Kn = {
1088
1124
  _: 1
1089
1125
  /* STABLE */
1090
1126
  }, 8, ["title", "onClick"]),
1091
- i(o(Me), {
1127
+ i(o(Te), {
1092
1128
  class: "q-date-time-picker__time-number",
1093
1129
  size: "small",
1094
1130
  inputmode: "numeric",
1095
1131
  "max-length": 2,
1096
- "model-value": o(Ke)(zt(n - 1)),
1097
- onKeydown: (r) => Re(r, "seconds", n - 1),
1098
- "onUpdate:modelValue": (r) => it(r, n - 1)
1132
+ "model-value": o(je)(nn(n - 1)),
1133
+ onKeydown: (r) => Le(r, "seconds", n - 1),
1134
+ "onUpdate:modelValue": (r) => dt(r, n - 1)
1099
1135
  }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1100
1136
  i(o(p), {
1101
1137
  variant: "ghost",
1102
1138
  title: l.texts.decreaseSecond,
1103
- onClick: (r) => Zt(n - 1)
1139
+ onClick: (r) => cn(n - 1)
1104
1140
  }, {
1105
1141
  default: b(() => [
1106
1142
  i(
1107
1143
  o(w),
1108
- ne({ ref_for: !0 }, l.icons.down),
1144
+ te({ ref_for: !0 }, l.icons.down),
1109
1145
  null,
1110
1146
  16
1111
1147
  /* FULL_PROPS */
@@ -1128,24 +1164,27 @@ const Kn = {
1128
1164
  ],
1129
1165
  2112
1130
1166
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1131
- )) : D.value === "month" ? (f(), S(
1132
- V,
1167
+ )) : D.value === "month" ? (f(), H(
1168
+ Y,
1133
1169
  { key: 2 },
1134
1170
  [
1135
1171
  M(" Month View "),
1136
- k("div", Jn, [
1137
- (f(!0), S(
1138
- V,
1172
+ k("div", da, [
1173
+ (f(!0), H(
1174
+ Y,
1139
1175
  null,
1140
- ge(Xe.value, (n, r) => (f(), U(o(p), {
1141
- id: `q-date-time-month-option-${r}`,
1176
+ ge(Yt.value, (n, r) => (f(), U(o(p), {
1142
1177
  key: r,
1178
+ ref_for: !0,
1179
+ ref: (u) => It(u, r),
1180
+ "data-testid": "q-date-time-picker-month-option",
1181
+ "data-month-index": r,
1143
1182
  disabled: g.value === r,
1144
1183
  label: n,
1145
1184
  title: be(r),
1146
1185
  variant: "ghost",
1147
- onClick: () => K(r, !0)
1148
- }, null, 8, ["id", "disabled", "label", "title", "onClick"]))),
1186
+ onClick: () => $(r, !0)
1187
+ }, null, 8, ["data-month-index", "disabled", "label", "title", "onClick"]))),
1149
1188
  128
1150
1189
  /* KEYED_FRAGMENT */
1151
1190
  ))
@@ -1153,23 +1192,23 @@ const Kn = {
1153
1192
  ],
1154
1193
  2112
1155
1194
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1156
- )) : D.value === "year" ? (f(), S(
1157
- V,
1195
+ )) : D.value === "year" ? (f(), H(
1196
+ Y,
1158
1197
  { key: 3 },
1159
1198
  [
1160
1199
  M(" Year View "),
1161
- k("div", ea, [
1162
- k("div", ta, [
1200
+ k("div", fa, [
1201
+ k("div", va, [
1163
1202
  i(o(p), {
1164
1203
  variant: "ghost",
1165
- disabled: !Je.value,
1204
+ disabled: !nt.value,
1166
1205
  title: l.texts.previousYears,
1167
- onClick: Ct
1206
+ onClick: At
1168
1207
  }, {
1169
1208
  default: b(() => [
1170
1209
  i(
1171
1210
  o(w),
1172
- W(Q(l.icons.back)),
1211
+ W(j(l.icons.back)),
1173
1212
  null,
1174
1213
  16
1175
1214
  /* FULL_PROPS */
@@ -1180,21 +1219,21 @@ const Kn = {
1180
1219
  }, 8, ["disabled", "title"]),
1181
1220
  k(
1182
1221
  "div",
1183
- na,
1184
- Le(ke.value.startYear) + " - " + Le(ke.value.endYear),
1222
+ ma,
1223
+ ze(ke.value.startYear) + " - " + ze(ke.value.endYear),
1185
1224
  1
1186
1225
  /* TEXT */
1187
1226
  ),
1188
1227
  i(o(p), {
1189
1228
  variant: "ghost",
1190
- disabled: !et.value,
1229
+ disabled: !at.value,
1191
1230
  title: l.texts.nextYears,
1192
- onClick: Ht
1231
+ onClick: Lt
1193
1232
  }, {
1194
1233
  default: b(() => [
1195
1234
  i(
1196
1235
  o(w),
1197
- W(Q(l.icons.forward)),
1236
+ W(j(l.icons.forward)),
1198
1237
  null,
1199
1238
  16
1200
1239
  /* FULL_PROPS */
@@ -1204,19 +1243,22 @@ const Kn = {
1204
1243
  /* STABLE */
1205
1244
  }, 8, ["disabled", "title"])
1206
1245
  ]),
1207
- k("div", aa, [
1208
- (f(!0), S(
1209
- V,
1246
+ k("div", pa, [
1247
+ (f(!0), H(
1248
+ Y,
1210
1249
  null,
1211
- ge(Ft.value, (n, r) => (f(), U(o(p), {
1212
- id: `q-date-time-year-${n}`,
1250
+ ge(Kt.value, (n, r) => (f(), U(o(p), {
1213
1251
  key: r,
1252
+ ref_for: !0,
1253
+ ref: (u) => Rt(u, n),
1254
+ "data-testid": "q-date-time-picker-year-option",
1255
+ "data-year": n,
1214
1256
  disabled: h.value === n,
1215
1257
  label: n.toString(),
1216
1258
  title: n,
1217
1259
  variant: "ghost",
1218
- onClick: () => ue(n, !0)
1219
- }, null, 8, ["id", "disabled", "label", "title", "onClick"]))),
1260
+ onClick: () => re(n, !0)
1261
+ }, null, 8, ["data-year", "disabled", "label", "title", "onClick"]))),
1220
1262
  128
1221
1263
  /* KEYED_FRAGMENT */
1222
1264
  ))
@@ -1226,18 +1268,18 @@ const Kn = {
1226
1268
  2112
1227
1269
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1228
1270
  )) : M("v-if", !0),
1229
- k("div", la, [
1271
+ k("div", ga, [
1230
1272
  J.value ? M("v-if", !0) : (f(), U(o(p), {
1231
1273
  key: 0,
1232
1274
  variant: "ghost",
1233
- disabled: Mt.value,
1275
+ disabled: xt.value,
1234
1276
  title: l.texts.today,
1235
- onClick: Bt
1277
+ onClick: Xt
1236
1278
  }, {
1237
1279
  default: b(() => [
1238
1280
  i(
1239
1281
  o(w),
1240
- W(Q(l.icons.today)),
1282
+ W(j(l.icons.today)),
1241
1283
  null,
1242
1284
  16
1243
1285
  /* FULL_PROPS */
@@ -1246,17 +1288,18 @@ const Kn = {
1246
1288
  _: 1
1247
1289
  /* STABLE */
1248
1290
  }, 8, ["disabled", "title"])),
1249
- ae.value && D.value === "date" ? (f(), U(o(p), {
1291
+ ne.value && D.value === "date" ? (f(), U(o(p), {
1250
1292
  key: 1,
1251
- id: "q-date-time-toggle-time",
1293
+ ref: "toggleTime",
1294
+ "data-testid": "q-date-time-picker-toggle-time",
1252
1295
  variant: "ghost",
1253
1296
  title: l.texts.toggleMode,
1254
- onClick: gt
1297
+ onClick: bt
1255
1298
  }, {
1256
1299
  default: b(() => [
1257
1300
  i(
1258
1301
  o(w),
1259
- W(Q(l.icons.clock)),
1302
+ W(j(l.icons.clock)),
1260
1303
  null,
1261
1304
  16
1262
1305
  /* FULL_PROPS */
@@ -1266,15 +1309,15 @@ const Kn = {
1266
1309
  /* STABLE */
1267
1310
  }, 8, ["title"])) : D.value !== "date" && !J.value ? (f(), U(o(p), {
1268
1311
  key: 2,
1269
- id: "q-date-time-toggle-date",
1312
+ "data-testid": "q-date-time-picker-toggle-date",
1270
1313
  variant: "ghost",
1271
1314
  title: l.texts.toggleMode,
1272
- onClick: te
1315
+ onClick: qn
1273
1316
  }, {
1274
1317
  default: b(() => [
1275
1318
  i(
1276
1319
  o(w),
1277
- W(Q(l.icons.calendar)),
1320
+ W(j(l.icons.calendar)),
1278
1321
  null,
1279
1322
  16
1280
1323
  /* FULL_PROPS */
@@ -1285,15 +1328,16 @@ const Kn = {
1285
1328
  }, 8, ["title"])) : M("v-if", !0),
1286
1329
  l.clearable ? (f(), U(o(p), {
1287
1330
  key: 3,
1331
+ "data-testid": "q-date-time-picker-clear",
1288
1332
  variant: "ghost",
1289
- disabled: !Ee.value,
1333
+ disabled: !Ye.value,
1290
1334
  title: l.texts.clearValue,
1291
- onClick: Rt
1335
+ onClick: Ut
1292
1336
  }, {
1293
1337
  default: b(() => [
1294
1338
  i(
1295
1339
  o(w),
1296
- W(Q(l.icons.delete)),
1340
+ W(j(l.icons.delete)),
1297
1341
  null,
1298
1342
  16
1299
1343
  /* FULL_PROPS */
@@ -1319,5 +1363,5 @@ const Kn = {
1319
1363
  }
1320
1364
  });
1321
1365
  export {
1322
- ma as default
1366
+ xa as default
1323
1367
  };