@keenmate/web-daterangepicker 1.0.0-rc03 → 1.0.0-rc08
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,7 +1,7 @@
|
|
|
1
1
|
var At = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
2
|
+
var Rt = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var D = (e, t, n) => Rt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
function $t(e) {
|
|
5
5
|
if (e !== "auto")
|
|
6
6
|
return e;
|
|
7
7
|
try {
|
|
@@ -31,7 +31,7 @@ function Rt(e) {
|
|
|
31
31
|
// South Korea
|
|
32
32
|
].some((a) => t.startsWith(a)) ? 0 : 1;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function de(e) {
|
|
35
35
|
if (!e) return null;
|
|
36
36
|
let t;
|
|
37
37
|
return typeof e == "string" ? t = /* @__PURE__ */ new Date(e + "T00:00:00") : t = new Date(e), t.setHours(0, 0, 0, 0), isNaN(t.getTime()) ? null : t;
|
|
@@ -40,11 +40,22 @@ function ve(e) {
|
|
|
40
40
|
const t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0");
|
|
41
41
|
return `${t}-${n}-${a}`;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Pt(e, t, n, a, r, o) {
|
|
44
44
|
const s = ve(e), i = e.getDay();
|
|
45
45
|
return !!(t && e < t || n && e > n || r && r.includes(i) || a.has(s) || o && o(e));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function kt(e, t) {
|
|
48
|
+
for (let n = 0; n < 12; n++) {
|
|
49
|
+
const a = new Date(t, n + 1, 0).getDate();
|
|
50
|
+
for (let r = 1; r <= a; r++) {
|
|
51
|
+
const o = new Date(t, n, r);
|
|
52
|
+
if (!e.isDateDisabledInternal(o))
|
|
53
|
+
return !0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return !1;
|
|
57
|
+
}
|
|
58
|
+
function Tt(e, t, n) {
|
|
48
59
|
const a = new Date(e), r = new Date(t);
|
|
49
60
|
a.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
50
61
|
const o = new Date(a);
|
|
@@ -55,7 +66,7 @@ function Pt(e, t, n) {
|
|
|
55
66
|
}
|
|
56
67
|
return !1;
|
|
57
68
|
}
|
|
58
|
-
function
|
|
69
|
+
function zt(e, t, n) {
|
|
59
70
|
const a = [], r = new Date(e), o = new Date(t);
|
|
60
71
|
r.setHours(0, 0, 0, 0), o.setHours(0, 0, 0, 0);
|
|
61
72
|
const s = new Date(r);
|
|
@@ -63,7 +74,7 @@ function Tt(e, t, n) {
|
|
|
63
74
|
n(s) || a.push(new Date(s)), s.setDate(s.getDate() + 1);
|
|
64
75
|
return a;
|
|
65
76
|
}
|
|
66
|
-
function
|
|
77
|
+
function Ft(e, t, n) {
|
|
67
78
|
const a = [], r = new Date(e), o = new Date(t);
|
|
68
79
|
r.setHours(0, 0, 0, 0), o.setHours(0, 0, 0, 0);
|
|
69
80
|
const s = new Date(r);
|
|
@@ -71,7 +82,7 @@ function zt(e, t, n) {
|
|
|
71
82
|
n(s) && a.push(new Date(s)), s.setDate(s.getDate() + 1);
|
|
72
83
|
return a;
|
|
73
84
|
}
|
|
74
|
-
function
|
|
85
|
+
function Nt(e, t, n) {
|
|
75
86
|
const a = new Date(e), r = new Date(t);
|
|
76
87
|
a.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
77
88
|
let o = new Date(a);
|
|
@@ -83,7 +94,7 @@ function Ft(e, t, n) {
|
|
|
83
94
|
}
|
|
84
95
|
return r;
|
|
85
96
|
}
|
|
86
|
-
function
|
|
97
|
+
function Ot(e, t, n) {
|
|
87
98
|
const a = [], r = new Date(e), o = new Date(t);
|
|
88
99
|
r.setHours(0, 0, 0, 0), o.setHours(0, 0, 0, 0);
|
|
89
100
|
let s = null;
|
|
@@ -99,13 +110,13 @@ function Nt(e, t, n) {
|
|
|
99
110
|
}
|
|
100
111
|
return s && a.push({ start: s, end: new Date(o) }), a;
|
|
101
112
|
}
|
|
102
|
-
function
|
|
113
|
+
function Ht(e) {
|
|
103
114
|
return Je(e, /* @__PURE__ */ new Date());
|
|
104
115
|
}
|
|
105
116
|
function Je(e, t) {
|
|
106
117
|
return !e || !t ? !1 : e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
107
118
|
}
|
|
108
|
-
function
|
|
119
|
+
function Yt(e, t, n) {
|
|
109
120
|
return !t || !n ? !1 : e > t && e < n;
|
|
110
121
|
}
|
|
111
122
|
var Qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -160,38 +171,38 @@ var et = { exports: {} };
|
|
|
160
171
|
return l(f) || u.apply(this, arguments);
|
|
161
172
|
}
|
|
162
173
|
function g(f, y) {
|
|
163
|
-
var m = this, x,
|
|
174
|
+
var m = this, x, M, I, b = "loglevel";
|
|
164
175
|
typeof f == "string" ? b += ":" + f : typeof f == "symbol" && (b = void 0);
|
|
165
|
-
function S
|
|
166
|
-
var
|
|
176
|
+
function v(S) {
|
|
177
|
+
var E = (r[S] || "silent").toUpperCase();
|
|
167
178
|
if (!(typeof window === n || !b)) {
|
|
168
179
|
try {
|
|
169
|
-
window.localStorage[b] =
|
|
180
|
+
window.localStorage[b] = E;
|
|
170
181
|
return;
|
|
171
182
|
} catch {
|
|
172
183
|
}
|
|
173
184
|
try {
|
|
174
|
-
window.document.cookie = encodeURIComponent(b) + "=" +
|
|
185
|
+
window.document.cookie = encodeURIComponent(b) + "=" + E + ";";
|
|
175
186
|
} catch {
|
|
176
187
|
}
|
|
177
188
|
}
|
|
178
189
|
}
|
|
179
|
-
function
|
|
180
|
-
var
|
|
190
|
+
function L() {
|
|
191
|
+
var S;
|
|
181
192
|
if (!(typeof window === n || !b)) {
|
|
182
193
|
try {
|
|
183
|
-
|
|
194
|
+
S = window.localStorage[b];
|
|
184
195
|
} catch {
|
|
185
196
|
}
|
|
186
|
-
if (typeof
|
|
197
|
+
if (typeof S === n)
|
|
187
198
|
try {
|
|
188
|
-
var
|
|
189
|
-
|
|
190
|
-
|
|
199
|
+
var E = window.document.cookie, P = encodeURIComponent(b), R = E.indexOf(P + "=");
|
|
200
|
+
R !== -1 && (S = /^([^;]+)/.exec(
|
|
201
|
+
E.slice(R + P.length + 1)
|
|
191
202
|
)[1]);
|
|
192
203
|
} catch {
|
|
193
204
|
}
|
|
194
|
-
return m.levels[
|
|
205
|
+
return m.levels[S] === void 0 && (S = void 0), S;
|
|
195
206
|
}
|
|
196
207
|
}
|
|
197
208
|
function A() {
|
|
@@ -206,11 +217,11 @@ var et = { exports: {} };
|
|
|
206
217
|
}
|
|
207
218
|
}
|
|
208
219
|
}
|
|
209
|
-
function w(
|
|
210
|
-
var
|
|
211
|
-
if (typeof
|
|
212
|
-
return
|
|
213
|
-
throw new TypeError("log.setLevel() called with invalid level: " +
|
|
220
|
+
function w(S) {
|
|
221
|
+
var E = S;
|
|
222
|
+
if (typeof E == "string" && m.levels[E.toUpperCase()] !== void 0 && (E = m.levels[E.toUpperCase()]), typeof E == "number" && E >= 0 && E <= m.levels.SILENT)
|
|
223
|
+
return E;
|
|
224
|
+
throw new TypeError("log.setLevel() called with invalid level: " + S);
|
|
214
225
|
}
|
|
215
226
|
m.name = f, m.levels = {
|
|
216
227
|
TRACE: 0,
|
|
@@ -220,26 +231,26 @@ var et = { exports: {} };
|
|
|
220
231
|
ERROR: 4,
|
|
221
232
|
SILENT: 5
|
|
222
233
|
}, m.methodFactory = y || p, m.getLevel = function() {
|
|
223
|
-
return
|
|
224
|
-
}, m.setLevel = function(
|
|
225
|
-
return
|
|
226
|
-
}, m.setDefaultLevel = function(
|
|
227
|
-
|
|
234
|
+
return I ?? M ?? x;
|
|
235
|
+
}, m.setLevel = function(S, E) {
|
|
236
|
+
return I = w(S), E !== !1 && v(I), c.call(m);
|
|
237
|
+
}, m.setDefaultLevel = function(S) {
|
|
238
|
+
M = w(S), L() || m.setLevel(S, !1);
|
|
228
239
|
}, m.resetLevel = function() {
|
|
229
|
-
|
|
230
|
-
}, m.enableAll = function(
|
|
231
|
-
m.setLevel(m.levels.TRACE,
|
|
232
|
-
}, m.disableAll = function(
|
|
233
|
-
m.setLevel(m.levels.SILENT,
|
|
240
|
+
I = null, A(), c.call(m);
|
|
241
|
+
}, m.enableAll = function(S) {
|
|
242
|
+
m.setLevel(m.levels.TRACE, S);
|
|
243
|
+
}, m.disableAll = function(S) {
|
|
244
|
+
m.setLevel(m.levels.SILENT, S);
|
|
234
245
|
}, m.rebuild = function() {
|
|
235
246
|
if (s !== m && (x = w(s.getLevel())), c.call(m), s === m)
|
|
236
|
-
for (var
|
|
237
|
-
o[
|
|
247
|
+
for (var S in o)
|
|
248
|
+
o[S].rebuild();
|
|
238
249
|
}, x = w(
|
|
239
250
|
s ? s.getLevel() : "WARN"
|
|
240
251
|
);
|
|
241
|
-
var
|
|
242
|
-
|
|
252
|
+
var _ = L();
|
|
253
|
+
_ != null && (I = w(_)), c.call(m);
|
|
243
254
|
}
|
|
244
255
|
s = new g(), s.getLogger = function(y) {
|
|
245
256
|
if (typeof y != "symbol" && typeof y != "string" || y === "")
|
|
@@ -259,7 +270,7 @@ var et = { exports: {} };
|
|
|
259
270
|
});
|
|
260
271
|
})(et);
|
|
261
272
|
var Vt = et.exports;
|
|
262
|
-
const
|
|
273
|
+
const k = /* @__PURE__ */ Ze(Vt);
|
|
263
274
|
var tt = { exports: {} };
|
|
264
275
|
(function(e) {
|
|
265
276
|
(function(t, n) {
|
|
@@ -291,15 +302,15 @@ var tt = { exports: {} };
|
|
|
291
302
|
throw new TypeError("Argument is not a logger");
|
|
292
303
|
var p = c.methodFactory, g = c.name || "", h = o[g] || o[""] || a;
|
|
293
304
|
function f(y, m, x) {
|
|
294
|
-
var
|
|
305
|
+
var M = p(y, m, x), I = o[x] || o[""], b = I.template.indexOf("%t") !== -1, v = I.template.indexOf("%l") !== -1, L = I.template.indexOf("%n") !== -1;
|
|
295
306
|
return function() {
|
|
296
|
-
for (var A = "", w = arguments.length,
|
|
297
|
-
|
|
307
|
+
for (var A = "", w = arguments.length, _ = Array(w), S = 0; S < w; S++)
|
|
308
|
+
_[S] = arguments[S];
|
|
298
309
|
if (g || !o[x]) {
|
|
299
|
-
var
|
|
300
|
-
|
|
310
|
+
var E = I.timestampFormatter(/* @__PURE__ */ new Date()), P = I.levelFormatter(y), R = I.nameFormatter(x);
|
|
311
|
+
I.format ? A += I.format(P, R, E) : (A += I.template, b && (A = A.replace(/%t/, E)), v && (A = A.replace(/%l/, P)), L && (A = A.replace(/%n/, R))), _.length && typeof _[0] == "string" ? _[0] = A + " " + _[0] : _.unshift(A);
|
|
301
312
|
}
|
|
302
|
-
|
|
313
|
+
M.apply(void 0, _);
|
|
303
314
|
};
|
|
304
315
|
}
|
|
305
316
|
return o[g] || (c.methodFactory = f), u = u || {}, u.template && (u.format = void 0), o[g] = n({}, h, u), c.setLevel(c.getLevel()), r || c.warn(
|
|
@@ -314,10 +325,10 @@ var tt = { exports: {} };
|
|
|
314
325
|
}), d;
|
|
315
326
|
});
|
|
316
327
|
})(tt);
|
|
317
|
-
var
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
328
|
+
var qt = tt.exports;
|
|
329
|
+
const K = /* @__PURE__ */ Ze(qt);
|
|
330
|
+
K.reg(k);
|
|
331
|
+
K.apply(k, {
|
|
321
332
|
format(e, t, n) {
|
|
322
333
|
return `[${n}] [${e}] ${t ? `[${t}]` : ""}`;
|
|
323
334
|
},
|
|
@@ -325,30 +336,30 @@ j.apply(R, {
|
|
|
325
336
|
return e.toTimeString().split(" ")[0] + "." + e.getMilliseconds().toString().padStart(3, "0");
|
|
326
337
|
}
|
|
327
338
|
});
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
339
|
+
const $ = k.getLogger("INIT"), U = k.getLogger("VALIDATION"), F = k.getLogger("DRAG"), te = k.getLogger("SELECTION"), q = k.getLogger("RENDERING"), B = k.getLogger("UI"), C = k.getLogger("NAVIGATION"), Z = k.getLogger("INTERACTION");
|
|
340
|
+
K.apply($);
|
|
341
|
+
K.apply(U);
|
|
342
|
+
K.apply(F);
|
|
343
|
+
K.apply(te);
|
|
344
|
+
K.apply(q);
|
|
345
|
+
K.apply(B);
|
|
346
|
+
K.apply(C);
|
|
347
|
+
K.apply(Z);
|
|
337
348
|
const X = "silent";
|
|
338
|
-
|
|
339
|
-
|
|
349
|
+
k.setLevel(X);
|
|
350
|
+
$.setLevel(X);
|
|
340
351
|
U.setLevel(X);
|
|
341
|
-
|
|
352
|
+
F.setLevel(X);
|
|
342
353
|
te.setLevel(X);
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
354
|
+
q.setLevel(X);
|
|
355
|
+
B.setLevel(X);
|
|
356
|
+
C.setLevel(X);
|
|
346
357
|
Z.setLevel(X);
|
|
347
|
-
const
|
|
358
|
+
const Bt = (e) => {
|
|
348
359
|
const t = e ? "debug" : "silent";
|
|
349
|
-
|
|
360
|
+
k.setLevel(t), $.setLevel(t), U.setLevel(t), F.setLevel(t), te.setLevel(t), q.setLevel(t), B.setLevel(t), C.setLevel(t), Z.setLevel(t);
|
|
350
361
|
};
|
|
351
|
-
function
|
|
362
|
+
function Re(e, t, n) {
|
|
352
363
|
for (let a = 1; a <= 31; a++) {
|
|
353
364
|
const r = new Date(t, n, a);
|
|
354
365
|
if (r.getMonth() === n && !e.isDateDisabledInternal(r))
|
|
@@ -356,68 +367,68 @@ function Ye(e, t, n) {
|
|
|
356
367
|
}
|
|
357
368
|
return !1;
|
|
358
369
|
}
|
|
359
|
-
function
|
|
370
|
+
function Wt(e, t) {
|
|
360
371
|
e.showingRollingSelector[t] = !e.showingRollingSelector[t], e.renderCalendar();
|
|
361
372
|
}
|
|
362
373
|
function jt(e, t, n) {
|
|
363
374
|
const a = e.monthDates[n].getFullYear();
|
|
364
|
-
e.monthDates[n].setFullYear(t),
|
|
375
|
+
e.monthDates[n].setFullYear(t), C.debug(`selectYear() Col${n} - changed from ${a} to ${t}`), ue(e, n), e.showingRollingSelector[n] = !1, e.renderCalendar();
|
|
365
376
|
}
|
|
366
|
-
function
|
|
377
|
+
function Kt(e, t, n) {
|
|
367
378
|
const a = e.monthDates[n].getMonth();
|
|
368
|
-
e.monthDates[n].setMonth(t),
|
|
379
|
+
e.monthDates[n].setMonth(t), C.debug(`selectMonth() Col${n} - changed from ${a + 1} to ${t + 1}`), ue(e, n), e.showingRollingSelector[n] = !1, e.renderCalendar();
|
|
369
380
|
}
|
|
370
|
-
function
|
|
381
|
+
function ue(e, t) {
|
|
371
382
|
const n = e.monthDates[t];
|
|
372
383
|
if (t < e.monthDates.length - 1) {
|
|
373
384
|
const a = e.monthDates[t + 1];
|
|
374
|
-
if (
|
|
375
|
-
|
|
385
|
+
if (be(n, a)) {
|
|
386
|
+
C.debug(`checkAndResolveCollisions() Col${t} - collision with Col${t + 1}, shifting forward`);
|
|
376
387
|
const r = new Date(n.getFullYear(), n.getMonth() + 1, 1);
|
|
377
|
-
e.monthDates[t + 1] = r,
|
|
388
|
+
e.monthDates[t + 1] = r, ue(e, t + 1);
|
|
378
389
|
}
|
|
379
390
|
}
|
|
380
391
|
if (t > 0) {
|
|
381
392
|
const a = e.monthDates[t - 1];
|
|
382
|
-
if (
|
|
383
|
-
|
|
393
|
+
if (be(a, n)) {
|
|
394
|
+
C.debug(`checkAndResolveCollisions() Col${t} - collision with Col${t - 1}, shifting backward`);
|
|
384
395
|
const r = new Date(n.getFullYear(), n.getMonth() - 1, 1);
|
|
385
|
-
e.monthDates[t - 1] = r,
|
|
396
|
+
e.monthDates[t - 1] = r, ue(e, t - 1);
|
|
386
397
|
}
|
|
387
398
|
}
|
|
388
399
|
}
|
|
389
|
-
function
|
|
400
|
+
function be(e, t) {
|
|
390
401
|
const n = e.getFullYear(), a = e.getMonth(), r = t.getFullYear(), o = t.getMonth();
|
|
391
402
|
return n > r || n === r && a >= o;
|
|
392
403
|
}
|
|
393
|
-
function
|
|
404
|
+
function ce(e, t) {
|
|
394
405
|
const n = isNaN(t) ? e.activeMonthIndex : t;
|
|
395
406
|
e.showingRollingSelector[n] && (e.showingRollingSelector[n] = !1);
|
|
396
407
|
const a = e.monthDates[n], r = new Date(a.getFullYear(), a.getMonth() - 1, 1);
|
|
397
|
-
if (e.monthDates[n] = r,
|
|
408
|
+
if (e.monthDates[n] = r, C.debug(`prevMonth() Col${n} - changed from ${a.getFullYear()}-${a.getMonth() + 1} to ${r.getFullYear()}-${r.getMonth() + 1}`), n > 0) {
|
|
398
409
|
const o = e.monthDates[n - 1];
|
|
399
|
-
|
|
410
|
+
be(o, r) && (C.debug(`prevMonth() Col${n} - collision detected with Col${n - 1}, shifting previous columns back`), ce(e, n - 1));
|
|
400
411
|
}
|
|
401
412
|
e.renderCalendar();
|
|
402
413
|
}
|
|
403
|
-
function
|
|
414
|
+
function pe(e, t) {
|
|
404
415
|
const n = isNaN(t) ? e.activeMonthIndex : t;
|
|
405
416
|
e.showingRollingSelector[n] && (e.showingRollingSelector[n] = !1);
|
|
406
417
|
const a = e.monthDates[n], r = new Date(a.getFullYear(), a.getMonth() + 1, 1);
|
|
407
|
-
if (e.monthDates[n] = r,
|
|
418
|
+
if (e.monthDates[n] = r, C.debug(`nextMonth() Col${n} - changed from ${a.getFullYear()}-${a.getMonth() + 1} to ${r.getFullYear()}-${r.getMonth() + 1}`), n < e.monthDates.length - 1) {
|
|
408
419
|
const o = e.monthDates[n + 1];
|
|
409
|
-
|
|
420
|
+
be(r, o) && (C.debug(`nextMonth() Col${n} - collision detected with Col${n + 1}, shifting next columns forward`), pe(e, n + 1));
|
|
410
421
|
}
|
|
411
422
|
e.renderCalendar();
|
|
412
423
|
}
|
|
413
|
-
function
|
|
424
|
+
function le(e, t, n, a, r) {
|
|
414
425
|
let o = t, s = 0;
|
|
415
426
|
const i = 60;
|
|
416
427
|
for (; s < i; ) {
|
|
417
428
|
if (o >= 0 && o < a.length) {
|
|
418
429
|
const l = a[o].dataset.date;
|
|
419
430
|
if (l) {
|
|
420
|
-
const [c, u, p] = l.split("-").map(Number), g = new Date(c, u, p);
|
|
431
|
+
const [c, u, p] = l.split("-").map(Number), g = new Date(c, u - 1, p);
|
|
421
432
|
if (!e.isDateDisabledInternal(g))
|
|
422
433
|
return { index: o, monthChanged: !1 };
|
|
423
434
|
}
|
|
@@ -427,44 +438,44 @@ function de(e, t, n, a, r) {
|
|
|
427
438
|
}
|
|
428
439
|
return { index: null, monthChanged: !1 };
|
|
429
440
|
}
|
|
430
|
-
function
|
|
441
|
+
function Ut(e, t) {
|
|
431
442
|
var s, i, d, l;
|
|
432
|
-
|
|
443
|
+
C.debug(`moveFocus(${t}) Col${e.activeMonthIndex} - focusedDayIndex:`, e.focusedDayIndex);
|
|
433
444
|
const n = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${e.activeMonthIndex}"]`);
|
|
434
445
|
if (!n) {
|
|
435
|
-
|
|
446
|
+
C.debug(`moveFocus() Col${e.activeMonthIndex} - ERROR: daysContainer not found!`);
|
|
436
447
|
return;
|
|
437
448
|
}
|
|
438
449
|
const a = n.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
439
|
-
if (
|
|
450
|
+
if (C.debug(`moveFocus() Col${e.activeMonthIndex} - found ${a.length} days in column`), a.length === 0) return;
|
|
440
451
|
if (e.focusedDayIndex === null) {
|
|
441
452
|
const c = Array.from(a).findIndex((u) => u.classList.contains("drp-date-picker__day--today"));
|
|
442
|
-
e.focusedDayIndex = c !== -1 ? c : 0,
|
|
453
|
+
e.focusedDayIndex = c !== -1 ? c : 0, C.debug(`moveFocus() Col${e.activeMonthIndex} - initialized focusedDayIndex to ${e.focusedDayIndex} (today or first day), will move by offset ${t}`);
|
|
443
454
|
}
|
|
444
455
|
(s = a[e.focusedDayIndex]) == null || s.classList.remove("drp-date-picker__day--focused");
|
|
445
456
|
const r = e.focusedDayIndex + t;
|
|
446
457
|
if (r < 0) {
|
|
447
458
|
const c = e.activeMonthIndex;
|
|
448
459
|
if (t === -1)
|
|
449
|
-
|
|
460
|
+
C.debug(`moveFocus() Col${c} - edge navigation LEFT: going to last enabled day of prev month`), ce(e, e.activeMonthIndex), setTimeout(() => {
|
|
450
461
|
var h, f;
|
|
451
462
|
const u = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
452
463
|
if (!u) return;
|
|
453
|
-
const p = u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g =
|
|
464
|
+
const p = u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = le(e, p.length - 1, -1, p);
|
|
454
465
|
g.index !== null && (e.focusedDayIndex = g.index, (h = p[e.focusedDayIndex]) == null || h.classList.add("drp-date-picker__day--focused"), (f = p[e.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
455
466
|
}, 0);
|
|
456
467
|
else {
|
|
457
468
|
const p = a[e.focusedDayIndex].dataset.date;
|
|
458
469
|
if (p) {
|
|
459
|
-
const [g, h, f] = p.split("-").map(Number), m = new Date(g, h, f).getDay();
|
|
460
|
-
|
|
461
|
-
var
|
|
470
|
+
const [g, h, f] = p.split("-").map(Number), m = new Date(g, h - 1, f).getDay();
|
|
471
|
+
C.debug(`moveFocus() Col${c} - edge navigation UP: current day ${f} is weekday ${m}, going to prev month`), ce(e, e.activeMonthIndex), setTimeout(() => {
|
|
472
|
+
var v, L;
|
|
462
473
|
const x = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
463
474
|
if (!x) return;
|
|
464
|
-
const
|
|
475
|
+
const M = x.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), b = M[M.length - 1].dataset.date;
|
|
465
476
|
if (b) {
|
|
466
|
-
const [A, w,
|
|
467
|
-
e.focusedDayIndex =
|
|
477
|
+
const [A, w, _] = b.split("-").map(Number), E = new Date(A, w - 1, _).getDay(), P = (E - m + 7) % 7;
|
|
478
|
+
e.focusedDayIndex = M.length - 1 - P, C.debug(`moveFocus() Col${c} - last day weekday ${E}, target ${m}, focusing on day ${e.focusedDayIndex + 1}`), (v = M[e.focusedDayIndex]) == null || v.classList.add("drp-date-picker__day--focused"), (L = M[e.focusedDayIndex]) == null || L.scrollIntoView({ block: "nearest" });
|
|
468
479
|
}
|
|
469
480
|
}, 0);
|
|
470
481
|
}
|
|
@@ -473,39 +484,39 @@ function Kt(e, t) {
|
|
|
473
484
|
} else if (r >= a.length) {
|
|
474
485
|
const c = e.activeMonthIndex;
|
|
475
486
|
if (t === 1)
|
|
476
|
-
|
|
487
|
+
C.debug(`moveFocus() Col${c} - edge navigation RIGHT: going to first enabled day of next month`), pe(e, e.activeMonthIndex), setTimeout(() => {
|
|
477
488
|
var h, f;
|
|
478
489
|
const u = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
479
490
|
if (!u) return;
|
|
480
|
-
const p = u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g =
|
|
491
|
+
const p = u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = le(e, 0, 1, p);
|
|
481
492
|
g.index !== null && (e.focusedDayIndex = g.index, (h = p[e.focusedDayIndex]) == null || h.classList.add("drp-date-picker__day--focused"), (f = p[e.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
482
493
|
}, 0);
|
|
483
494
|
else {
|
|
484
495
|
const p = a[e.focusedDayIndex].dataset.date;
|
|
485
496
|
if (p) {
|
|
486
|
-
const [g, h, f] = p.split("-").map(Number), m = new Date(g, h, f).getDay();
|
|
487
|
-
|
|
488
|
-
var
|
|
497
|
+
const [g, h, f] = p.split("-").map(Number), m = new Date(g, h - 1, f).getDay();
|
|
498
|
+
C.debug(`moveFocus() Col${c} - edge navigation DOWN: current day ${f} is weekday ${m}, going to next month`), pe(e, e.activeMonthIndex), setTimeout(() => {
|
|
499
|
+
var v, L;
|
|
489
500
|
const x = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
490
501
|
if (!x) return;
|
|
491
|
-
const
|
|
502
|
+
const M = x.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), b = M[0].dataset.date;
|
|
492
503
|
if (b) {
|
|
493
|
-
const [A, w,
|
|
494
|
-
e.focusedDayIndex =
|
|
504
|
+
const [A, w, _] = b.split("-").map(Number), E = new Date(A, w - 1, _).getDay(), P = (m - E + 7) % 7;
|
|
505
|
+
e.focusedDayIndex = P, C.debug(`moveFocus() Col${c} - first day weekday ${E}, target ${m}, focusing on day ${e.focusedDayIndex + 1}`), (v = M[e.focusedDayIndex]) == null || v.classList.add("drp-date-picker__day--focused"), (L = M[e.focusedDayIndex]) == null || L.scrollIntoView({ block: "nearest" });
|
|
495
506
|
}
|
|
496
507
|
}, 0);
|
|
497
508
|
}
|
|
498
509
|
}
|
|
499
510
|
return;
|
|
500
511
|
}
|
|
501
|
-
const o =
|
|
512
|
+
const o = le(e, r, t, a, e.activeMonthIndex);
|
|
502
513
|
if (o.monthChanged) {
|
|
503
514
|
const c = e.activeMonthIndex;
|
|
504
|
-
o.direction === "next" ?
|
|
515
|
+
o.direction === "next" ? pe(e, e.activeMonthIndex) : ce(e, e.activeMonthIndex), setTimeout(() => {
|
|
505
516
|
var h, f;
|
|
506
517
|
const u = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
507
518
|
if (!u) return;
|
|
508
|
-
const p = u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g =
|
|
519
|
+
const p = u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = le(
|
|
509
520
|
e,
|
|
510
521
|
o.direction === "next" ? 0 : p.length - 1,
|
|
511
522
|
t,
|
|
@@ -515,10 +526,32 @@ function Kt(e, t) {
|
|
|
515
526
|
}, 0);
|
|
516
527
|
return;
|
|
517
528
|
}
|
|
518
|
-
o.index !== null ? (e.focusedDayIndex = o.index, (i = a[e.focusedDayIndex]) == null || i.classList.add("drp-date-picker__day--focused"), (d = a[e.focusedDayIndex]) == null || d.scrollIntoView({ block: "nearest" })) : (
|
|
529
|
+
o.index !== null ? (e.focusedDayIndex = o.index, (i = a[e.focusedDayIndex]) == null || i.classList.add("drp-date-picker__day--focused"), (d = a[e.focusedDayIndex]) == null || d.scrollIntoView({ block: "nearest" })) : (C.debug("moveFocus() - no enabled day found in search range"), (l = a[e.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"));
|
|
530
|
+
}
|
|
531
|
+
function Xt(e, t, n) {
|
|
532
|
+
if (!e) {
|
|
533
|
+
if (n != null && n.normalizedMinDate || n != null && n.normalizedMaxDate) {
|
|
534
|
+
const a = n.normalizedMinDate ? n.normalizedMinDate.getFullYear() : t - 1, r = n.normalizedMaxDate ? n.normalizedMaxDate.getFullYear() : t + 1;
|
|
535
|
+
return { min: a, max: r };
|
|
536
|
+
}
|
|
537
|
+
return { min: t - 1, max: t + 1 };
|
|
538
|
+
}
|
|
539
|
+
if (e.includes("-")) {
|
|
540
|
+
const [a, r] = e.split("-");
|
|
541
|
+
return { min: parseInt(a, 10), max: parseInt(r, 10) };
|
|
542
|
+
} else {
|
|
543
|
+
const a = parseInt(e, 10);
|
|
544
|
+
return { min: a, max: a };
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
function Gt(e) {
|
|
548
|
+
if (!e)
|
|
549
|
+
return { min: 1, max: 12 };
|
|
550
|
+
const [t, n] = e.split("-");
|
|
551
|
+
return { min: parseInt(t, 10), max: parseInt(n, 10) };
|
|
519
552
|
}
|
|
520
|
-
function
|
|
521
|
-
|
|
553
|
+
function Jt(e) {
|
|
554
|
+
q.debug("[DatePicker 18] renderCalendar called, showingRollingSelector:", e.showingRollingSelector, `activeCol: ${e.activeMonthIndex}`), q.debug("[DatePicker 18] monthDates array:", e.monthDates.map((t, n) => `Col${n}: ${t.getFullYear()}-${t.getMonth() + 1}`).join(", "));
|
|
522
555
|
for (let t = 0; t < e.options.visibleMonthsCount; t++)
|
|
523
556
|
e.showingRollingSelector[t] ? rt(e, t) : nt(e, t);
|
|
524
557
|
if (requestAnimationFrame(() => {
|
|
@@ -527,12 +560,14 @@ function Ut(e) {
|
|
|
527
560
|
if (t) {
|
|
528
561
|
const n = t.querySelector(".drp-date-picker__weekdays"), a = t.querySelector(".drp-date-picker__days");
|
|
529
562
|
if (n && a) {
|
|
530
|
-
const r = n.offsetHeight, o = a.offsetHeight, s = getComputedStyle(n),
|
|
531
|
-
e.calendarContentHeight = r +
|
|
563
|
+
const r = n.offsetHeight, o = a.offsetHeight, s = a.offsetWidth, i = getComputedStyle(n), d = parseInt(i.marginBottom) || 0;
|
|
564
|
+
e.calendarContentHeight = r + d + o, e.calendarContentWidth = Math.ceil(s), q.debug("[DatePicker] Captured calendar content dimensions:", {
|
|
532
565
|
weekdaysHeight: r,
|
|
533
|
-
weekdaysMargin:
|
|
566
|
+
weekdaysMargin: d,
|
|
534
567
|
daysHeight: o,
|
|
535
|
-
|
|
568
|
+
daysWidth: s,
|
|
569
|
+
totalHeight: e.calendarContentHeight,
|
|
570
|
+
totalWidth: e.calendarContentWidth
|
|
536
571
|
});
|
|
537
572
|
}
|
|
538
573
|
}
|
|
@@ -544,12 +579,15 @@ function Ut(e) {
|
|
|
544
579
|
const a = n.querySelector(".drp-date-picker__rolling-selector");
|
|
545
580
|
if (a) {
|
|
546
581
|
const r = a.classList.contains("drp-date-picker__rolling-selector--visible");
|
|
547
|
-
if (a.style.height = `${e.calendarContentHeight}px`, r) {
|
|
548
|
-
const o = a.offsetHeight;
|
|
549
|
-
|
|
582
|
+
if (a.style.height = `${e.calendarContentHeight}px`, e.calendarContentWidth && (a.style.width = `${e.calendarContentWidth}px`), r) {
|
|
583
|
+
const o = a.offsetHeight, s = a.offsetWidth;
|
|
584
|
+
q.debug(`[DatePicker] Applied dimensions to rolling selector ${t}:`, {
|
|
550
585
|
targetHeight: e.calendarContentHeight,
|
|
551
586
|
actualHeight: o,
|
|
552
|
-
|
|
587
|
+
heightDifference: o - e.calendarContentHeight,
|
|
588
|
+
targetWidth: e.calendarContentWidth,
|
|
589
|
+
actualWidth: s,
|
|
590
|
+
widthDifference: s - (e.calendarContentWidth || 0)
|
|
553
591
|
});
|
|
554
592
|
}
|
|
555
593
|
}
|
|
@@ -564,7 +602,7 @@ function Ut(e) {
|
|
|
564
602
|
e.options.selectionMode === "range" && !e.isDragging && e.initDragListeners();
|
|
565
603
|
}
|
|
566
604
|
function nt(e, t) {
|
|
567
|
-
|
|
605
|
+
q.debug(`[DatePicker Col${t} 19] renderNormalView called for month`, t);
|
|
568
606
|
const n = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${t}"]`);
|
|
569
607
|
if (!n) return;
|
|
570
608
|
const a = n.querySelector(".drp-date-picker__rolling-selector");
|
|
@@ -572,9 +610,9 @@ function nt(e, t) {
|
|
|
572
610
|
const r = e.monthDates[t], o = n.querySelector(".drp-date-picker__month-year");
|
|
573
611
|
o && (o.textContent = `${e.monthNames[r.getMonth()]} ${r.getFullYear()}`);
|
|
574
612
|
const s = r.getFullYear(), i = r.getMonth(), d = i === 0 ? 11 : i - 1, l = i === 0 ? s - 1 : s, c = n.querySelector(".drp-date-picker__nav--prev");
|
|
575
|
-
c && (
|
|
613
|
+
c && (Re(e, l, d) ? (c.removeAttribute("disabled"), c.classList.remove("drp-date-picker__nav--disabled")) : (c.setAttribute("disabled", "true"), c.classList.add("drp-date-picker__nav--disabled")));
|
|
576
614
|
const u = i === 11 ? 0 : i + 1, p = i === 11 ? s + 1 : s, g = n.querySelector(".drp-date-picker__nav--next");
|
|
577
|
-
g && (
|
|
615
|
+
g && (Re(e, p, u) ? (g.removeAttribute("disabled"), g.classList.remove("drp-date-picker__nav--disabled")) : (g.setAttribute("disabled", "true"), g.classList.add("drp-date-picker__nav--disabled")));
|
|
578
616
|
const h = n.querySelector(".drp-date-picker__weekdays"), f = [
|
|
579
617
|
...e.weekdayNames.slice(e.weekStartDay),
|
|
580
618
|
...e.weekdayNames.slice(0, e.weekStartDay)
|
|
@@ -582,94 +620,146 @@ function nt(e, t) {
|
|
|
582
620
|
h && (h.innerHTML = f.map((y) => `<div class="drp-date-picker__weekday">${y}</div>`).join("")), at(e, t, r);
|
|
583
621
|
}
|
|
584
622
|
function at(e, t, n) {
|
|
585
|
-
|
|
623
|
+
q.debug(`[DatePicker Col${t} 20] renderDays called for month`, t);
|
|
586
624
|
const a = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${t}"]`);
|
|
587
625
|
if (!a) return;
|
|
588
626
|
const r = a.querySelector(".drp-date-picker__days"), o = n.getFullYear(), s = n.getMonth();
|
|
589
|
-
|
|
627
|
+
q.debug(`[DatePicker Col${t} 21] Rendering days for:`, o, s + 1);
|
|
590
628
|
const d = (new Date(o, s, 1).getDay() - e.weekStartDay + 7) % 7, l = new Date(o, s + 1, 0).getDate(), c = new Date(o, s, 0).getDate(), u = new Date(o, s - 1, 1), p = u.getFullYear(), g = u.getMonth(), h = new Date(o, s + 1, 1), f = h.getFullYear(), y = h.getMonth(), m = [];
|
|
591
|
-
for (let
|
|
592
|
-
const
|
|
629
|
+
for (let v = d - 1; v >= 0; v--) {
|
|
630
|
+
const L = c - v, A = new Date(p, g, L);
|
|
593
631
|
m.push({
|
|
594
632
|
date: A,
|
|
595
633
|
year: p,
|
|
596
634
|
month: g,
|
|
597
|
-
day:
|
|
635
|
+
day: L,
|
|
598
636
|
isOtherMonth: !0
|
|
599
637
|
});
|
|
600
638
|
}
|
|
601
|
-
for (let
|
|
602
|
-
const
|
|
639
|
+
for (let v = 1; v <= l; v++) {
|
|
640
|
+
const L = new Date(o, s, v);
|
|
603
641
|
m.push({
|
|
604
|
-
date:
|
|
642
|
+
date: L,
|
|
605
643
|
year: o,
|
|
606
644
|
month: s,
|
|
607
|
-
day:
|
|
645
|
+
day: v,
|
|
608
646
|
isOtherMonth: !1
|
|
609
647
|
});
|
|
610
648
|
}
|
|
611
|
-
const
|
|
612
|
-
for (let
|
|
613
|
-
const
|
|
649
|
+
const M = Math.ceil((d + l) / 7) * 7 - (d + l);
|
|
650
|
+
for (let v = 1; v <= M; v++) {
|
|
651
|
+
const L = new Date(f, y, v);
|
|
614
652
|
m.push({
|
|
615
|
-
date:
|
|
653
|
+
date: L,
|
|
616
654
|
year: f,
|
|
617
655
|
month: y,
|
|
618
|
-
day:
|
|
656
|
+
day: v,
|
|
619
657
|
isOtherMonth: !0
|
|
620
658
|
});
|
|
621
659
|
}
|
|
622
|
-
const
|
|
623
|
-
for (let
|
|
624
|
-
|
|
660
|
+
const I = [];
|
|
661
|
+
for (let v = 0; v < m.length; v += 7)
|
|
662
|
+
I.push(m.slice(v, v + 7));
|
|
625
663
|
let b = "";
|
|
626
|
-
for (const
|
|
627
|
-
const
|
|
628
|
-
const
|
|
664
|
+
for (const v of I) {
|
|
665
|
+
const L = v.map((w) => {
|
|
666
|
+
const _ = e.getDateInfoInternal(w.date);
|
|
629
667
|
return {
|
|
630
|
-
label: (
|
|
631
|
-
tooltip: (
|
|
632
|
-
class: (
|
|
668
|
+
label: (_ == null ? void 0 : _.label) || "",
|
|
669
|
+
tooltip: (_ == null ? void 0 : _.tooltip) || "",
|
|
670
|
+
class: (_ == null ? void 0 : _.class) || ""
|
|
633
671
|
};
|
|
634
672
|
});
|
|
635
|
-
if (
|
|
673
|
+
if (L.some((w) => w.label)) {
|
|
636
674
|
b += '<div class="drp-date-picker__badge-row">';
|
|
637
|
-
for (const w of
|
|
675
|
+
for (const w of L)
|
|
638
676
|
if (w.label) {
|
|
639
|
-
const
|
|
640
|
-
b += `<div class="drp-date-picker__badge-cell${
|
|
677
|
+
const _ = w.tooltip ? ` data-tooltip="${w.tooltip.replace(/"/g, """)}"` : "", S = w.class ? ` ${w.class}` : "";
|
|
678
|
+
b += `<div class="drp-date-picker__badge-cell${S}"${_}>${w.label}</div>`;
|
|
641
679
|
} else
|
|
642
680
|
b += '<div class="drp-date-picker__badge-cell"></div>';
|
|
643
681
|
b += "</div>";
|
|
644
682
|
}
|
|
645
683
|
b += '<div class="drp-date-picker__date-row">';
|
|
646
|
-
for (const w of
|
|
647
|
-
const
|
|
648
|
-
w.isOtherMonth &&
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
|
|
684
|
+
for (const w of v) {
|
|
685
|
+
const _ = ["drp-date-picker__day"];
|
|
686
|
+
w.isOtherMonth && _.push("drp-date-picker__day--other-month");
|
|
687
|
+
const S = e.isDateDisabledInternal(w.date);
|
|
688
|
+
S && _.push("drp-date-picker__day--disabled");
|
|
689
|
+
const E = e.getDateInfoInternal(w.date);
|
|
690
|
+
E && E.class && _.push(E.class), e.isToday(w.date) && _.push("drp-date-picker__day--today"), e.options.selectionMode === "single" && e.isSameDay(w.date, e.selectedDate) && _.push("drp-date-picker__day--selected");
|
|
691
|
+
const R = e.options.selectionMode === "range" && e.isSameDay(w.date, e.selectedStartDate), N = e.options.selectionMode === "range" && e.isSameDay(w.date, e.selectedEndDate), O = e.options.selectionMode === "range" && e.isInRange(w.date);
|
|
692
|
+
e.options.selectionMode === "range" && (R && _.push("drp-date-picker__day--range-start"), N && _.push("drp-date-picker__day--range-end"), O && (!S || e.options.highlightDisabledInRange) && _.push("drp-date-picker__day--in-range"));
|
|
693
|
+
const T = `${w.year}-${String(w.month + 1).padStart(2, "0")}-${String(w.day).padStart(2, "0")}`;
|
|
694
|
+
b += `<div class="${_.join(" ")}" data-date="${T}" data-day-number="${w.day}">`, b += `<slot name="day-${T}">${w.day}</slot>`, b += "</div>";
|
|
653
695
|
}
|
|
654
696
|
b += "</div>";
|
|
655
697
|
}
|
|
656
|
-
r && (r.innerHTML = b);
|
|
698
|
+
r && (r.innerHTML = b, Qt(e, t, r));
|
|
699
|
+
}
|
|
700
|
+
function Qt(e, t, n) {
|
|
701
|
+
if (!e.options.renderDay && !e.options.renderDayContent)
|
|
702
|
+
return;
|
|
703
|
+
n.querySelectorAll(".drp-date-picker__day").forEach((r) => {
|
|
704
|
+
const o = r, s = o.getAttribute("data-date"), i = parseInt(o.getAttribute("data-day-number") || "0", 10);
|
|
705
|
+
if (!s) return;
|
|
706
|
+
const [d, l, c] = s.split("-"), u = new Date(parseInt(d), parseInt(l) - 1, parseInt(c)), p = o.querySelector(`slot[name="day-${s}"]`);
|
|
707
|
+
if (p && p.assignedNodes().length > 0)
|
|
708
|
+
return;
|
|
709
|
+
const h = e.isDateDisabledInternal(u), f = e.isToday(u), y = u.getDay() === 0 || u.getDay() === 6, m = e.options.selectionMode === "single" && e.isSameDay(u, e.selectedDate), x = e.options.selectionMode === "range" && e.isSameDay(u, e.selectedStartDate), M = e.options.selectionMode === "range" && e.isSameDay(u, e.selectedEndDate), I = e.options.selectionMode === "range" && e.isInRange(u), b = {
|
|
710
|
+
date: u,
|
|
711
|
+
dateString: s,
|
|
712
|
+
dayNumber: i,
|
|
713
|
+
isDisabled: h,
|
|
714
|
+
isSelected: m || x || M,
|
|
715
|
+
isStartDate: x,
|
|
716
|
+
isEndDate: M,
|
|
717
|
+
isInRange: I,
|
|
718
|
+
isToday: f,
|
|
719
|
+
isWeekend: y,
|
|
720
|
+
monthIndex: t,
|
|
721
|
+
element: o,
|
|
722
|
+
picker: e
|
|
723
|
+
};
|
|
724
|
+
if (e.options.renderDay)
|
|
725
|
+
try {
|
|
726
|
+
const v = e.options.renderDay(b);
|
|
727
|
+
v != null && (typeof v == "string" ? p && (p.innerHTML = v) : v instanceof HTMLElement && p && (p.innerHTML = "", p.appendChild(v)));
|
|
728
|
+
} catch (v) {
|
|
729
|
+
console.error("[DatePicker] Error in renderDay callback:", v);
|
|
730
|
+
}
|
|
731
|
+
else if (e.options.renderDayContent)
|
|
732
|
+
try {
|
|
733
|
+
const v = e.options.renderDayContent(b);
|
|
734
|
+
v != null && (typeof v == "string" ? p && (p.innerHTML += v) : v instanceof HTMLElement && p && p.appendChild(v));
|
|
735
|
+
} catch (v) {
|
|
736
|
+
console.error("[DatePicker] Error in renderDayContent callback:", v);
|
|
737
|
+
}
|
|
738
|
+
});
|
|
657
739
|
}
|
|
658
740
|
function rt(e, t) {
|
|
659
|
-
var c, u;
|
|
660
741
|
const n = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${t}"]`);
|
|
661
742
|
if (!n) return;
|
|
662
743
|
const a = n.querySelector(".drp-date-picker__rolling-selector");
|
|
663
744
|
a == null || a.classList.add("drp-date-picker__rolling-selector--visible");
|
|
664
|
-
const r = e.monthDates[t], o = a == null ? void 0 : a.querySelector('[data-list="years"]')
|
|
665
|
-
let
|
|
666
|
-
for (let p =
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
745
|
+
const r = e.monthDates[t], o = r.getFullYear(), s = r.getMonth(), i = Xt(e.options.rollingYearRange, o, e), d = Gt(e.options.rollingMonthRange), l = a == null ? void 0 : a.querySelector('[data-list="years"]');
|
|
746
|
+
let c = "";
|
|
747
|
+
for (let p = i.min; p <= i.max; p++) {
|
|
748
|
+
const g = p === o ? "drp-date-picker__rolling-item--selected" : "", f = kt(e, p) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
749
|
+
c += `<div class="drp-date-picker__rolling-item ${g} ${f}" data-year="${p}" data-month-index="${t}">${p}</div>`;
|
|
750
|
+
}
|
|
751
|
+
l && (l.innerHTML = c);
|
|
752
|
+
const u = a == null ? void 0 : a.querySelector('[data-list="months"]');
|
|
753
|
+
if (u) {
|
|
754
|
+
let p = "";
|
|
755
|
+
for (let g = d.min - 1; g <= d.max - 1; g++) {
|
|
756
|
+
const h = e.monthNames[g], f = g === s ? "drp-date-picker__rolling-item--selected" : "", m = Re(e, o, g) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
757
|
+
p += `<div class="drp-date-picker__rolling-item ${f} ${m}" data-month="${g}" data-month-index="${t}">${h}</div>`;
|
|
758
|
+
}
|
|
759
|
+
u.innerHTML = p;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
function Zt(e) {
|
|
673
763
|
if (e.options.selectionMode !== "range") return;
|
|
674
764
|
const t = e.calendar.querySelector(".drp-date-picker__summary");
|
|
675
765
|
if (t)
|
|
@@ -768,7 +858,7 @@ function st(e) {
|
|
|
768
858
|
`;
|
|
769
859
|
}
|
|
770
860
|
}
|
|
771
|
-
function
|
|
861
|
+
function en(e) {
|
|
772
862
|
if (e.calendar.querySelectorAll(".drp-date-picker__day--drag-preview, .drp-date-picker__day--drag-invalid").forEach((r) => {
|
|
773
863
|
r.classList.remove("drp-date-picker__day--drag-preview", "drp-date-picker__day--drag-invalid");
|
|
774
864
|
}), !e.dragPreviewStart || !e.dragPreviewEnd) return;
|
|
@@ -776,82 +866,82 @@ function Gt(e) {
|
|
|
776
866
|
e.calendar.querySelectorAll(".drp-date-picker__day").forEach((r) => {
|
|
777
867
|
const o = r.dataset.date;
|
|
778
868
|
if (!o) return;
|
|
779
|
-
const [s, i, d] = o.split("-").map(Number), l = new Date(s, i, d);
|
|
869
|
+
const [s, i, d] = o.split("-").map(Number), l = new Date(s, i - 1, d);
|
|
780
870
|
l >= e.dragPreviewStart && l <= e.dragPreviewEnd && (r.classList.add("drp-date-picker__day--drag-preview"), n && r.classList.add("drp-date-picker__day--drag-invalid"));
|
|
781
871
|
}), st(e);
|
|
782
872
|
}
|
|
783
|
-
const
|
|
873
|
+
const ge = Math.min, ae = Math.max, _e = Math.round, W = (e) => ({
|
|
784
874
|
x: e,
|
|
785
875
|
y: e
|
|
786
|
-
}),
|
|
876
|
+
}), tn = {
|
|
787
877
|
left: "right",
|
|
788
878
|
right: "left",
|
|
789
879
|
bottom: "top",
|
|
790
880
|
top: "bottom"
|
|
791
|
-
},
|
|
881
|
+
}, nn = {
|
|
792
882
|
start: "end",
|
|
793
883
|
end: "start"
|
|
794
884
|
};
|
|
795
|
-
function
|
|
796
|
-
return ae(e,
|
|
885
|
+
function $e(e, t, n) {
|
|
886
|
+
return ae(e, ge(t, n));
|
|
797
887
|
}
|
|
798
|
-
function
|
|
888
|
+
function he(e, t) {
|
|
799
889
|
return typeof e == "function" ? e(t) : e;
|
|
800
890
|
}
|
|
801
891
|
function ne(e) {
|
|
802
892
|
return e.split("-")[0];
|
|
803
893
|
}
|
|
804
|
-
function
|
|
894
|
+
function me(e) {
|
|
805
895
|
return e.split("-")[1];
|
|
806
896
|
}
|
|
807
897
|
function ot(e) {
|
|
808
898
|
return e === "x" ? "y" : "x";
|
|
809
899
|
}
|
|
810
|
-
function
|
|
900
|
+
function Ne(e) {
|
|
811
901
|
return e === "y" ? "height" : "width";
|
|
812
902
|
}
|
|
813
|
-
const
|
|
903
|
+
const an = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
814
904
|
function Q(e) {
|
|
815
|
-
return
|
|
905
|
+
return an.has(ne(e)) ? "y" : "x";
|
|
816
906
|
}
|
|
817
|
-
function
|
|
907
|
+
function Oe(e) {
|
|
818
908
|
return ot(Q(e));
|
|
819
909
|
}
|
|
820
|
-
function
|
|
910
|
+
function rn(e, t, n) {
|
|
821
911
|
n === void 0 && (n = !1);
|
|
822
|
-
const a =
|
|
912
|
+
const a = me(e), r = Oe(e), o = Ne(r);
|
|
823
913
|
let s = r === "x" ? a === (n ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top";
|
|
824
|
-
return t.reference[o] > t.floating[o] && (s =
|
|
914
|
+
return t.reference[o] > t.floating[o] && (s = we(s)), [s, we(s)];
|
|
825
915
|
}
|
|
826
|
-
function
|
|
827
|
-
const t =
|
|
828
|
-
return [
|
|
916
|
+
function sn(e) {
|
|
917
|
+
const t = we(e);
|
|
918
|
+
return [Pe(e), t, Pe(t)];
|
|
829
919
|
}
|
|
830
|
-
function
|
|
831
|
-
return e.replace(/start|end/g, (t) =>
|
|
920
|
+
function Pe(e) {
|
|
921
|
+
return e.replace(/start|end/g, (t) => nn[t]);
|
|
832
922
|
}
|
|
833
|
-
const qe = ["left", "right"], Be = ["right", "left"],
|
|
834
|
-
function
|
|
923
|
+
const qe = ["left", "right"], Be = ["right", "left"], on = ["top", "bottom"], dn = ["bottom", "top"];
|
|
924
|
+
function ln(e, t, n) {
|
|
835
925
|
switch (e) {
|
|
836
926
|
case "top":
|
|
837
927
|
case "bottom":
|
|
838
928
|
return n ? t ? Be : qe : t ? qe : Be;
|
|
839
929
|
case "left":
|
|
840
930
|
case "right":
|
|
841
|
-
return t ?
|
|
931
|
+
return t ? on : dn;
|
|
842
932
|
default:
|
|
843
933
|
return [];
|
|
844
934
|
}
|
|
845
935
|
}
|
|
846
|
-
function
|
|
847
|
-
const r =
|
|
848
|
-
let o =
|
|
849
|
-
return r && (o = o.map((s) => s + "-" + r), t && (o = o.concat(o.map(
|
|
936
|
+
function cn(e, t, n, a) {
|
|
937
|
+
const r = me(e);
|
|
938
|
+
let o = ln(ne(e), n === "start", a);
|
|
939
|
+
return r && (o = o.map((s) => s + "-" + r), t && (o = o.concat(o.map(Pe)))), o;
|
|
850
940
|
}
|
|
851
|
-
function
|
|
852
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
941
|
+
function we(e) {
|
|
942
|
+
return e.replace(/left|right|bottom|top/g, (t) => tn[t]);
|
|
853
943
|
}
|
|
854
|
-
function
|
|
944
|
+
function pn(e) {
|
|
855
945
|
return {
|
|
856
946
|
top: 0,
|
|
857
947
|
right: 0,
|
|
@@ -861,7 +951,7 @@ function on(e) {
|
|
|
861
951
|
};
|
|
862
952
|
}
|
|
863
953
|
function it(e) {
|
|
864
|
-
return typeof e != "number" ?
|
|
954
|
+
return typeof e != "number" ? pn(e) : {
|
|
865
955
|
top: e,
|
|
866
956
|
right: e,
|
|
867
957
|
bottom: e,
|
|
@@ -886,12 +976,12 @@ function xe(e) {
|
|
|
886
976
|
y: n
|
|
887
977
|
};
|
|
888
978
|
}
|
|
889
|
-
function
|
|
979
|
+
function We(e, t, n) {
|
|
890
980
|
let {
|
|
891
981
|
reference: a,
|
|
892
982
|
floating: r
|
|
893
983
|
} = e;
|
|
894
|
-
const o = Q(t), s =
|
|
984
|
+
const o = Q(t), s = Oe(t), i = Ne(s), d = ne(t), l = o === "y", c = a.x + a.width / 2 - r.width / 2, u = a.y + a.height / 2 - r.height / 2, p = a[i] / 2 - r[i] / 2;
|
|
895
985
|
let g;
|
|
896
986
|
switch (d) {
|
|
897
987
|
case "top":
|
|
@@ -924,7 +1014,7 @@ function je(e, t, n) {
|
|
|
924
1014
|
y: a.y
|
|
925
1015
|
};
|
|
926
1016
|
}
|
|
927
|
-
switch (
|
|
1017
|
+
switch (me(t)) {
|
|
928
1018
|
case "start":
|
|
929
1019
|
g[s] -= p * (n && l ? -1 : 1);
|
|
930
1020
|
break;
|
|
@@ -934,7 +1024,7 @@ function je(e, t, n) {
|
|
|
934
1024
|
}
|
|
935
1025
|
return g;
|
|
936
1026
|
}
|
|
937
|
-
const
|
|
1027
|
+
const un = async (e, t, n) => {
|
|
938
1028
|
const {
|
|
939
1029
|
placement: a = "bottom",
|
|
940
1030
|
strategy: r = "absolute",
|
|
@@ -948,15 +1038,15 @@ const dn = async (e, t, n) => {
|
|
|
948
1038
|
}), {
|
|
949
1039
|
x: c,
|
|
950
1040
|
y: u
|
|
951
|
-
} =
|
|
1041
|
+
} = We(l, a, d), p = a, g = {}, h = 0;
|
|
952
1042
|
for (let f = 0; f < i.length; f++) {
|
|
953
1043
|
const {
|
|
954
1044
|
name: y,
|
|
955
1045
|
fn: m
|
|
956
1046
|
} = i[f], {
|
|
957
1047
|
x,
|
|
958
|
-
y:
|
|
959
|
-
data:
|
|
1048
|
+
y: M,
|
|
1049
|
+
data: I,
|
|
960
1050
|
reset: b
|
|
961
1051
|
} = await m({
|
|
962
1052
|
x: c,
|
|
@@ -972,11 +1062,11 @@ const dn = async (e, t, n) => {
|
|
|
972
1062
|
floating: t
|
|
973
1063
|
}
|
|
974
1064
|
});
|
|
975
|
-
c = x ?? c, u =
|
|
1065
|
+
c = x ?? c, u = M ?? u, g = {
|
|
976
1066
|
...g,
|
|
977
1067
|
[y]: {
|
|
978
1068
|
...g[y],
|
|
979
|
-
...
|
|
1069
|
+
...I
|
|
980
1070
|
}
|
|
981
1071
|
}, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (l = b.rects === !0 ? await s.getElementRects({
|
|
982
1072
|
reference: e,
|
|
@@ -985,7 +1075,7 @@ const dn = async (e, t, n) => {
|
|
|
985
1075
|
}) : b.rects), {
|
|
986
1076
|
x: c,
|
|
987
1077
|
y: u
|
|
988
|
-
} =
|
|
1078
|
+
} = We(l, p, d)), f = -1);
|
|
989
1079
|
}
|
|
990
1080
|
return {
|
|
991
1081
|
x: c,
|
|
@@ -1011,7 +1101,7 @@ async function dt(e, t) {
|
|
|
1011
1101
|
elementContext: u = "floating",
|
|
1012
1102
|
altBoundary: p = !1,
|
|
1013
1103
|
padding: g = 0
|
|
1014
|
-
} =
|
|
1104
|
+
} = he(t, e), h = it(g), y = i[p ? u === "floating" ? "reference" : "floating" : u], m = xe(await o.getClippingRect({
|
|
1015
1105
|
element: (n = await (o.isElement == null ? void 0 : o.isElement(y))) == null || n ? y : y.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(i.floating)),
|
|
1016
1106
|
boundary: l,
|
|
1017
1107
|
rootBoundary: c,
|
|
@@ -1021,7 +1111,7 @@ async function dt(e, t) {
|
|
|
1021
1111
|
y: r,
|
|
1022
1112
|
width: s.floating.width,
|
|
1023
1113
|
height: s.floating.height
|
|
1024
|
-
} : s.reference,
|
|
1114
|
+
} : s.reference, M = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(i.floating)), I = await (o.isElement == null ? void 0 : o.isElement(M)) ? await (o.getScale == null ? void 0 : o.getScale(M)) || {
|
|
1025
1115
|
x: 1,
|
|
1026
1116
|
y: 1
|
|
1027
1117
|
} : {
|
|
@@ -1030,17 +1120,17 @@ async function dt(e, t) {
|
|
|
1030
1120
|
}, b = xe(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1031
1121
|
elements: i,
|
|
1032
1122
|
rect: x,
|
|
1033
|
-
offsetParent:
|
|
1123
|
+
offsetParent: M,
|
|
1034
1124
|
strategy: d
|
|
1035
1125
|
}) : x);
|
|
1036
1126
|
return {
|
|
1037
|
-
top: (m.top - b.top + h.top) /
|
|
1038
|
-
bottom: (b.bottom - m.bottom + h.bottom) /
|
|
1039
|
-
left: (m.left - b.left + h.left) /
|
|
1040
|
-
right: (b.right - m.right + h.right) /
|
|
1127
|
+
top: (m.top - b.top + h.top) / I.y,
|
|
1128
|
+
bottom: (b.bottom - m.bottom + h.bottom) / I.y,
|
|
1129
|
+
left: (m.left - b.left + h.left) / I.x,
|
|
1130
|
+
right: (b.right - m.right + h.right) / I.x
|
|
1041
1131
|
};
|
|
1042
1132
|
}
|
|
1043
|
-
const
|
|
1133
|
+
const gn = (e) => ({
|
|
1044
1134
|
name: "arrow",
|
|
1045
1135
|
options: e,
|
|
1046
1136
|
async fn(t) {
|
|
@@ -1055,29 +1145,29 @@ const ln = (e) => ({
|
|
|
1055
1145
|
} = t, {
|
|
1056
1146
|
element: l,
|
|
1057
1147
|
padding: c = 0
|
|
1058
|
-
} =
|
|
1148
|
+
} = he(e, t) || {};
|
|
1059
1149
|
if (l == null)
|
|
1060
1150
|
return {};
|
|
1061
1151
|
const u = it(c), p = {
|
|
1062
1152
|
x: n,
|
|
1063
1153
|
y: a
|
|
1064
|
-
}, g =
|
|
1065
|
-
let
|
|
1066
|
-
(!
|
|
1067
|
-
const A =
|
|
1154
|
+
}, g = Oe(r), h = Ne(g), f = await s.getDimensions(l), y = g === "y", m = y ? "top" : "left", x = y ? "bottom" : "right", M = y ? "clientHeight" : "clientWidth", I = o.reference[h] + o.reference[g] - p[g] - o.floating[h], b = p[g] - o.reference[g], v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1155
|
+
let L = v ? v[M] : 0;
|
|
1156
|
+
(!L || !await (s.isElement == null ? void 0 : s.isElement(v))) && (L = i.floating[M] || o.floating[h]);
|
|
1157
|
+
const A = I / 2 - b / 2, w = L / 2 - f[h] / 2 - 1, _ = ge(u[m], w), S = ge(u[x], w), E = _, P = L - f[h] - S, R = L / 2 - f[h] / 2 + A, N = $e(E, R, P), O = !d.arrow && me(r) != null && R !== N && o.reference[h] / 2 - (R < E ? _ : S) - f[h] / 2 < 0, T = O ? R < E ? R - E : R - P : 0;
|
|
1068
1158
|
return {
|
|
1069
|
-
[g]: p[g] +
|
|
1159
|
+
[g]: p[g] + T,
|
|
1070
1160
|
data: {
|
|
1071
|
-
[g]:
|
|
1072
|
-
centerOffset:
|
|
1073
|
-
...
|
|
1074
|
-
alignmentOffset:
|
|
1161
|
+
[g]: N,
|
|
1162
|
+
centerOffset: R - N - T,
|
|
1163
|
+
...O && {
|
|
1164
|
+
alignmentOffset: T
|
|
1075
1165
|
}
|
|
1076
1166
|
},
|
|
1077
|
-
reset:
|
|
1167
|
+
reset: O
|
|
1078
1168
|
};
|
|
1079
1169
|
}
|
|
1080
|
-
}),
|
|
1170
|
+
}), fn = function(e) {
|
|
1081
1171
|
return e === void 0 && (e = {}), {
|
|
1082
1172
|
name: "flip",
|
|
1083
1173
|
options: e,
|
|
@@ -1098,73 +1188,73 @@ const ln = (e) => ({
|
|
|
1098
1188
|
fallbackAxisSideDirection: h = "none",
|
|
1099
1189
|
flipAlignment: f = !0,
|
|
1100
1190
|
...y
|
|
1101
|
-
} =
|
|
1191
|
+
} = he(e, t);
|
|
1102
1192
|
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
1103
1193
|
return {};
|
|
1104
|
-
const m = ne(r), x = Q(i),
|
|
1105
|
-
!p &&
|
|
1106
|
-
const
|
|
1107
|
-
let
|
|
1194
|
+
const m = ne(r), x = Q(i), M = ne(i) === i, I = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), b = p || (M || !f ? [we(i)] : sn(i)), v = h !== "none";
|
|
1195
|
+
!p && v && b.push(...cn(i, f, h, I));
|
|
1196
|
+
const L = [i, ...b], A = await dt(t, y), w = [];
|
|
1197
|
+
let _ = ((a = o.flip) == null ? void 0 : a.overflows) || [];
|
|
1108
1198
|
if (c && w.push(A[m]), u) {
|
|
1109
|
-
const
|
|
1110
|
-
w.push(A[
|
|
1199
|
+
const R = rn(r, s, I);
|
|
1200
|
+
w.push(A[R[0]], A[R[1]]);
|
|
1111
1201
|
}
|
|
1112
|
-
if (
|
|
1202
|
+
if (_ = [..._, {
|
|
1113
1203
|
placement: r,
|
|
1114
1204
|
overflows: w
|
|
1115
|
-
}], !w.every((
|
|
1116
|
-
var
|
|
1117
|
-
const
|
|
1118
|
-
if (
|
|
1205
|
+
}], !w.every((R) => R <= 0)) {
|
|
1206
|
+
var S, E;
|
|
1207
|
+
const R = (((S = o.flip) == null ? void 0 : S.index) || 0) + 1, N = L[R];
|
|
1208
|
+
if (N && (!(u === "alignment" ? x !== Q(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1119
1209
|
// overflows the main axis.
|
|
1120
|
-
|
|
1210
|
+
_.every((H) => Q(H.placement) === x ? H.overflows[0] > 0 : !0)))
|
|
1121
1211
|
return {
|
|
1122
1212
|
data: {
|
|
1123
|
-
index:
|
|
1124
|
-
overflows:
|
|
1213
|
+
index: R,
|
|
1214
|
+
overflows: _
|
|
1125
1215
|
},
|
|
1126
1216
|
reset: {
|
|
1127
|
-
placement:
|
|
1217
|
+
placement: N
|
|
1128
1218
|
}
|
|
1129
1219
|
};
|
|
1130
|
-
let
|
|
1131
|
-
if (!
|
|
1220
|
+
let O = (E = _.filter((T) => T.overflows[0] <= 0).sort((T, H) => T.overflows[1] - H.overflows[1])[0]) == null ? void 0 : E.placement;
|
|
1221
|
+
if (!O)
|
|
1132
1222
|
switch (g) {
|
|
1133
1223
|
case "bestFit": {
|
|
1134
|
-
var
|
|
1135
|
-
const
|
|
1136
|
-
if (
|
|
1137
|
-
const J = Q(
|
|
1224
|
+
var P;
|
|
1225
|
+
const T = (P = _.filter((H) => {
|
|
1226
|
+
if (v) {
|
|
1227
|
+
const J = Q(H.placement);
|
|
1138
1228
|
return J === x || // Create a bias to the `y` side axis due to horizontal
|
|
1139
1229
|
// reading directions favoring greater width.
|
|
1140
1230
|
J === "y";
|
|
1141
1231
|
}
|
|
1142
1232
|
return !0;
|
|
1143
|
-
}).map((
|
|
1144
|
-
|
|
1233
|
+
}).map((H) => [H.placement, H.overflows.filter((J) => J > 0).reduce((J, Lt) => J + Lt, 0)]).sort((H, J) => H[1] - J[1])[0]) == null ? void 0 : P[0];
|
|
1234
|
+
T && (O = T);
|
|
1145
1235
|
break;
|
|
1146
1236
|
}
|
|
1147
1237
|
case "initialPlacement":
|
|
1148
|
-
|
|
1238
|
+
O = i;
|
|
1149
1239
|
break;
|
|
1150
1240
|
}
|
|
1151
|
-
if (r !==
|
|
1241
|
+
if (r !== O)
|
|
1152
1242
|
return {
|
|
1153
1243
|
reset: {
|
|
1154
|
-
placement:
|
|
1244
|
+
placement: O
|
|
1155
1245
|
}
|
|
1156
1246
|
};
|
|
1157
1247
|
}
|
|
1158
1248
|
return {};
|
|
1159
1249
|
}
|
|
1160
1250
|
};
|
|
1161
|
-
},
|
|
1162
|
-
async function
|
|
1251
|
+
}, hn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1252
|
+
async function mn(e, t) {
|
|
1163
1253
|
const {
|
|
1164
1254
|
placement: n,
|
|
1165
1255
|
platform: a,
|
|
1166
1256
|
elements: r
|
|
1167
|
-
} = e, o = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), s = ne(n), i =
|
|
1257
|
+
} = e, o = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), s = ne(n), i = me(n), d = Q(n) === "y", l = hn.has(s) ? -1 : 1, c = o && d ? -1 : 1, u = he(t, e);
|
|
1168
1258
|
let {
|
|
1169
1259
|
mainAxis: p,
|
|
1170
1260
|
crossAxis: g,
|
|
@@ -1186,7 +1276,7 @@ async function un(e, t) {
|
|
|
1186
1276
|
y: g * c
|
|
1187
1277
|
};
|
|
1188
1278
|
}
|
|
1189
|
-
const
|
|
1279
|
+
const yn = function(e) {
|
|
1190
1280
|
return e === void 0 && (e = 0), {
|
|
1191
1281
|
name: "offset",
|
|
1192
1282
|
options: e,
|
|
@@ -1197,7 +1287,7 @@ const gn = function(e) {
|
|
|
1197
1287
|
y: o,
|
|
1198
1288
|
placement: s,
|
|
1199
1289
|
middlewareData: i
|
|
1200
|
-
} = t, d = await
|
|
1290
|
+
} = t, d = await mn(t, e);
|
|
1201
1291
|
return s === ((n = i.offset) == null ? void 0 : n.placement) && (a = i.arrow) != null && a.alignmentOffset ? {} : {
|
|
1202
1292
|
x: r + d.x,
|
|
1203
1293
|
y: o + d.y,
|
|
@@ -1208,7 +1298,7 @@ const gn = function(e) {
|
|
|
1208
1298
|
};
|
|
1209
1299
|
}
|
|
1210
1300
|
};
|
|
1211
|
-
},
|
|
1301
|
+
}, vn = function(e) {
|
|
1212
1302
|
return e === void 0 && (e = {}), {
|
|
1213
1303
|
name: "shift",
|
|
1214
1304
|
options: e,
|
|
@@ -1233,18 +1323,18 @@ const gn = function(e) {
|
|
|
1233
1323
|
}
|
|
1234
1324
|
},
|
|
1235
1325
|
...d
|
|
1236
|
-
} =
|
|
1326
|
+
} = he(e, t), l = {
|
|
1237
1327
|
x: n,
|
|
1238
1328
|
y: a
|
|
1239
1329
|
}, c = await dt(t, d), u = Q(ne(r)), p = ot(u);
|
|
1240
1330
|
let g = l[p], h = l[u];
|
|
1241
1331
|
if (o) {
|
|
1242
|
-
const y = p === "y" ? "top" : "left", m = p === "y" ? "bottom" : "right", x = g + c[y],
|
|
1243
|
-
g =
|
|
1332
|
+
const y = p === "y" ? "top" : "left", m = p === "y" ? "bottom" : "right", x = g + c[y], M = g - c[m];
|
|
1333
|
+
g = $e(x, g, M);
|
|
1244
1334
|
}
|
|
1245
1335
|
if (s) {
|
|
1246
|
-
const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", x = h + c[y],
|
|
1247
|
-
h =
|
|
1336
|
+
const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", x = h + c[y], M = h - c[m];
|
|
1337
|
+
h = $e(x, h, M);
|
|
1248
1338
|
}
|
|
1249
1339
|
const f = i.fn({
|
|
1250
1340
|
...t,
|
|
@@ -1265,13 +1355,13 @@ const gn = function(e) {
|
|
|
1265
1355
|
}
|
|
1266
1356
|
};
|
|
1267
1357
|
};
|
|
1268
|
-
function
|
|
1358
|
+
function Me() {
|
|
1269
1359
|
return typeof window < "u";
|
|
1270
1360
|
}
|
|
1271
1361
|
function ie(e) {
|
|
1272
1362
|
return lt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1273
1363
|
}
|
|
1274
|
-
function
|
|
1364
|
+
function z(e) {
|
|
1275
1365
|
var t;
|
|
1276
1366
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1277
1367
|
}
|
|
@@ -1280,34 +1370,34 @@ function G(e) {
|
|
|
1280
1370
|
return (t = (lt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1281
1371
|
}
|
|
1282
1372
|
function lt(e) {
|
|
1283
|
-
return
|
|
1373
|
+
return Me() ? e instanceof Node || e instanceof z(e).Node : !1;
|
|
1284
1374
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return
|
|
1375
|
+
function Y(e) {
|
|
1376
|
+
return Me() ? e instanceof Element || e instanceof z(e).Element : !1;
|
|
1287
1377
|
}
|
|
1288
|
-
function
|
|
1289
|
-
return
|
|
1378
|
+
function j(e) {
|
|
1379
|
+
return Me() ? e instanceof HTMLElement || e instanceof z(e).HTMLElement : !1;
|
|
1290
1380
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return !
|
|
1381
|
+
function je(e) {
|
|
1382
|
+
return !Me() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof z(e).ShadowRoot;
|
|
1293
1383
|
}
|
|
1294
|
-
const
|
|
1295
|
-
function
|
|
1384
|
+
const Dn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1385
|
+
function ye(e) {
|
|
1296
1386
|
const {
|
|
1297
1387
|
overflow: t,
|
|
1298
1388
|
overflowX: n,
|
|
1299
1389
|
overflowY: a,
|
|
1300
1390
|
display: r
|
|
1301
|
-
} =
|
|
1302
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + a + n) && !
|
|
1391
|
+
} = V(e);
|
|
1392
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + a + n) && !Dn.has(r);
|
|
1303
1393
|
}
|
|
1304
|
-
const
|
|
1305
|
-
function
|
|
1306
|
-
return
|
|
1394
|
+
const bn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1395
|
+
function _n(e) {
|
|
1396
|
+
return bn.has(ie(e));
|
|
1307
1397
|
}
|
|
1308
|
-
const
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1398
|
+
const wn = [":popover-open", ":modal"];
|
|
1399
|
+
function Ie(e) {
|
|
1400
|
+
return wn.some((t) => {
|
|
1311
1401
|
try {
|
|
1312
1402
|
return e.matches(t);
|
|
1313
1403
|
} catch {
|
|
@@ -1315,34 +1405,34 @@ function Me(e) {
|
|
|
1315
1405
|
}
|
|
1316
1406
|
});
|
|
1317
1407
|
}
|
|
1318
|
-
const
|
|
1319
|
-
function
|
|
1320
|
-
const t =
|
|
1321
|
-
return
|
|
1408
|
+
const xn = ["transform", "translate", "scale", "rotate", "perspective"], Sn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Mn = ["paint", "layout", "strict", "content"];
|
|
1409
|
+
function He(e) {
|
|
1410
|
+
const t = Ye(), n = Y(e) ? V(e) : e;
|
|
1411
|
+
return xn.some((a) => n[a] ? n[a] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Sn.some((a) => (n.willChange || "").includes(a)) || Mn.some((a) => (n.contain || "").includes(a));
|
|
1322
1412
|
}
|
|
1323
|
-
function
|
|
1413
|
+
function In(e) {
|
|
1324
1414
|
let t = ee(e);
|
|
1325
|
-
for (;
|
|
1326
|
-
if (
|
|
1415
|
+
for (; j(t) && !se(t); ) {
|
|
1416
|
+
if (He(t))
|
|
1327
1417
|
return t;
|
|
1328
|
-
if (
|
|
1418
|
+
if (Ie(t))
|
|
1329
1419
|
return null;
|
|
1330
1420
|
t = ee(t);
|
|
1331
1421
|
}
|
|
1332
1422
|
return null;
|
|
1333
1423
|
}
|
|
1334
|
-
function
|
|
1424
|
+
function Ye() {
|
|
1335
1425
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1336
1426
|
}
|
|
1337
|
-
const
|
|
1427
|
+
const En = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1338
1428
|
function se(e) {
|
|
1339
|
-
return
|
|
1429
|
+
return En.has(ie(e));
|
|
1340
1430
|
}
|
|
1341
|
-
function
|
|
1342
|
-
return
|
|
1431
|
+
function V(e) {
|
|
1432
|
+
return z(e).getComputedStyle(e);
|
|
1343
1433
|
}
|
|
1344
1434
|
function Ee(e) {
|
|
1345
|
-
return
|
|
1435
|
+
return Y(e) ? {
|
|
1346
1436
|
scrollLeft: e.scrollLeft,
|
|
1347
1437
|
scrollTop: e.scrollTop
|
|
1348
1438
|
} : {
|
|
@@ -1357,28 +1447,28 @@ function ee(e) {
|
|
|
1357
1447
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1358
1448
|
e.assignedSlot || // DOM Element detected.
|
|
1359
1449
|
e.parentNode || // ShadowRoot detected.
|
|
1360
|
-
|
|
1450
|
+
je(e) && e.host || // Fallback.
|
|
1361
1451
|
G(e)
|
|
1362
1452
|
);
|
|
1363
|
-
return
|
|
1453
|
+
return je(t) ? t.host : t;
|
|
1364
1454
|
}
|
|
1365
1455
|
function ct(e) {
|
|
1366
1456
|
const t = ee(e);
|
|
1367
|
-
return se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
1457
|
+
return se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : j(t) && ye(t) ? t : ct(t);
|
|
1368
1458
|
}
|
|
1369
1459
|
function pt(e, t, n) {
|
|
1370
1460
|
var a;
|
|
1371
1461
|
t === void 0 && (t = []);
|
|
1372
|
-
const r = ct(e), o = r === ((a = e.ownerDocument) == null ? void 0 : a.body), s =
|
|
1373
|
-
return o ? (
|
|
1462
|
+
const r = ct(e), o = r === ((a = e.ownerDocument) == null ? void 0 : a.body), s = z(r);
|
|
1463
|
+
return o ? (ke(s), t.concat(s, s.visualViewport || [], ye(r) ? r : [], [])) : t.concat(r, pt(r, []));
|
|
1374
1464
|
}
|
|
1375
|
-
function
|
|
1465
|
+
function ke(e) {
|
|
1376
1466
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1377
1467
|
}
|
|
1378
1468
|
function ut(e) {
|
|
1379
|
-
const t =
|
|
1469
|
+
const t = V(e);
|
|
1380
1470
|
let n = parseFloat(t.width) || 0, a = parseFloat(t.height) || 0;
|
|
1381
|
-
const r =
|
|
1471
|
+
const r = j(e), o = r ? e.offsetWidth : n, s = r ? e.offsetHeight : a, i = _e(n) !== o || _e(a) !== s;
|
|
1382
1472
|
return i && (n = o, a = s), {
|
|
1383
1473
|
width: n,
|
|
1384
1474
|
height: a,
|
|
@@ -1386,47 +1476,47 @@ function ut(e) {
|
|
|
1386
1476
|
};
|
|
1387
1477
|
}
|
|
1388
1478
|
function gt(e) {
|
|
1389
|
-
return
|
|
1479
|
+
return Y(e) ? e : e.contextElement;
|
|
1390
1480
|
}
|
|
1391
1481
|
function re(e) {
|
|
1392
1482
|
const t = gt(e);
|
|
1393
|
-
if (!
|
|
1394
|
-
return
|
|
1483
|
+
if (!j(t))
|
|
1484
|
+
return W(1);
|
|
1395
1485
|
const n = t.getBoundingClientRect(), {
|
|
1396
1486
|
width: a,
|
|
1397
1487
|
height: r,
|
|
1398
1488
|
$: o
|
|
1399
1489
|
} = ut(t);
|
|
1400
|
-
let s = (o ?
|
|
1490
|
+
let s = (o ? _e(n.width) : n.width) / a, i = (o ? _e(n.height) : n.height) / r;
|
|
1401
1491
|
return (!s || !Number.isFinite(s)) && (s = 1), (!i || !Number.isFinite(i)) && (i = 1), {
|
|
1402
1492
|
x: s,
|
|
1403
1493
|
y: i
|
|
1404
1494
|
};
|
|
1405
1495
|
}
|
|
1406
|
-
const
|
|
1496
|
+
const Cn = /* @__PURE__ */ W(0);
|
|
1407
1497
|
function ft(e) {
|
|
1408
|
-
const t =
|
|
1409
|
-
return !
|
|
1498
|
+
const t = z(e);
|
|
1499
|
+
return !Ye() || !t.visualViewport ? Cn : {
|
|
1410
1500
|
x: t.visualViewport.offsetLeft,
|
|
1411
1501
|
y: t.visualViewport.offsetTop
|
|
1412
1502
|
};
|
|
1413
1503
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1504
|
+
function Ln(e, t, n) {
|
|
1505
|
+
return t === void 0 && (t = !1), !n || t && n !== z(e) ? !1 : t;
|
|
1416
1506
|
}
|
|
1417
|
-
function
|
|
1507
|
+
function fe(e, t, n, a) {
|
|
1418
1508
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1419
1509
|
const r = e.getBoundingClientRect(), o = gt(e);
|
|
1420
|
-
let s =
|
|
1421
|
-
t && (a ?
|
|
1422
|
-
const i =
|
|
1510
|
+
let s = W(1);
|
|
1511
|
+
t && (a ? Y(a) && (s = re(a)) : s = re(e));
|
|
1512
|
+
const i = Ln(o, n, a) ? ft(o) : W(0);
|
|
1423
1513
|
let d = (r.left + i.x) / s.x, l = (r.top + i.y) / s.y, c = r.width / s.x, u = r.height / s.y;
|
|
1424
1514
|
if (o) {
|
|
1425
|
-
const p =
|
|
1426
|
-
let h = p, f =
|
|
1515
|
+
const p = z(o), g = a && Y(a) ? z(a) : a;
|
|
1516
|
+
let h = p, f = ke(h);
|
|
1427
1517
|
for (; f && a && g !== h; ) {
|
|
1428
|
-
const y = re(f), m = f.getBoundingClientRect(), x =
|
|
1429
|
-
d *= y.x, l *= y.y, c *= y.x, u *= y.y, d +=
|
|
1518
|
+
const y = re(f), m = f.getBoundingClientRect(), x = V(f), M = m.left + (f.clientLeft + parseFloat(x.paddingLeft)) * y.x, I = m.top + (f.clientTop + parseFloat(x.paddingTop)) * y.y;
|
|
1519
|
+
d *= y.x, l *= y.y, c *= y.x, u *= y.y, d += M, l += I, h = z(f), f = ke(h);
|
|
1430
1520
|
}
|
|
1431
1521
|
}
|
|
1432
1522
|
return xe({
|
|
@@ -1436,37 +1526,37 @@ function ge(e, t, n, a) {
|
|
|
1436
1526
|
y: l
|
|
1437
1527
|
});
|
|
1438
1528
|
}
|
|
1439
|
-
function
|
|
1529
|
+
function Ce(e, t) {
|
|
1440
1530
|
const n = Ee(e).scrollLeft;
|
|
1441
|
-
return t ? t.left + n :
|
|
1531
|
+
return t ? t.left + n : fe(G(e)).left + n;
|
|
1442
1532
|
}
|
|
1443
1533
|
function ht(e, t) {
|
|
1444
|
-
const n = e.getBoundingClientRect(), a = n.left + t.scrollLeft -
|
|
1534
|
+
const n = e.getBoundingClientRect(), a = n.left + t.scrollLeft - Ce(e, n), r = n.top + t.scrollTop;
|
|
1445
1535
|
return {
|
|
1446
1536
|
x: a,
|
|
1447
1537
|
y: r
|
|
1448
1538
|
};
|
|
1449
1539
|
}
|
|
1450
|
-
function
|
|
1540
|
+
function An(e) {
|
|
1451
1541
|
let {
|
|
1452
1542
|
elements: t,
|
|
1453
1543
|
rect: n,
|
|
1454
1544
|
offsetParent: a,
|
|
1455
1545
|
strategy: r
|
|
1456
1546
|
} = e;
|
|
1457
|
-
const o = r === "fixed", s = G(a), i = t ?
|
|
1547
|
+
const o = r === "fixed", s = G(a), i = t ? Ie(t.floating) : !1;
|
|
1458
1548
|
if (a === s || i && o)
|
|
1459
1549
|
return n;
|
|
1460
1550
|
let d = {
|
|
1461
1551
|
scrollLeft: 0,
|
|
1462
1552
|
scrollTop: 0
|
|
1463
|
-
}, l =
|
|
1464
|
-
const c =
|
|
1465
|
-
if ((u || !u && !o) && ((ie(a) !== "body" ||
|
|
1466
|
-
const g =
|
|
1553
|
+
}, l = W(1);
|
|
1554
|
+
const c = W(0), u = j(a);
|
|
1555
|
+
if ((u || !u && !o) && ((ie(a) !== "body" || ye(s)) && (d = Ee(a)), j(a))) {
|
|
1556
|
+
const g = fe(a);
|
|
1467
1557
|
l = re(a), c.x = g.x + a.clientLeft, c.y = g.y + a.clientTop;
|
|
1468
1558
|
}
|
|
1469
|
-
const p = s && !u && !o ? ht(s, d) :
|
|
1559
|
+
const p = s && !u && !o ? ht(s, d) : W(0);
|
|
1470
1560
|
return {
|
|
1471
1561
|
width: n.width * l.x,
|
|
1472
1562
|
height: n.height * l.y,
|
|
@@ -1474,14 +1564,14 @@ function Mn(e) {
|
|
|
1474
1564
|
y: n.y * l.y - d.scrollTop * l.y + c.y + p.y
|
|
1475
1565
|
};
|
|
1476
1566
|
}
|
|
1477
|
-
function
|
|
1567
|
+
function Rn(e) {
|
|
1478
1568
|
return Array.from(e.getClientRects());
|
|
1479
1569
|
}
|
|
1480
|
-
function
|
|
1570
|
+
function $n(e) {
|
|
1481
1571
|
const t = G(e), n = Ee(e), a = e.ownerDocument.body, r = ae(t.scrollWidth, t.clientWidth, a.scrollWidth, a.clientWidth), o = ae(t.scrollHeight, t.clientHeight, a.scrollHeight, a.clientHeight);
|
|
1482
|
-
let s = -n.scrollLeft +
|
|
1572
|
+
let s = -n.scrollLeft + Ce(e);
|
|
1483
1573
|
const i = -n.scrollTop;
|
|
1484
|
-
return
|
|
1574
|
+
return V(a).direction === "rtl" && (s += ae(t.clientWidth, a.clientWidth) - r), {
|
|
1485
1575
|
width: r,
|
|
1486
1576
|
height: o,
|
|
1487
1577
|
x: s,
|
|
@@ -1489,15 +1579,15 @@ function Ln(e) {
|
|
|
1489
1579
|
};
|
|
1490
1580
|
}
|
|
1491
1581
|
const Ke = 25;
|
|
1492
|
-
function
|
|
1493
|
-
const n =
|
|
1582
|
+
function Pn(e, t) {
|
|
1583
|
+
const n = z(e), a = G(e), r = n.visualViewport;
|
|
1494
1584
|
let o = a.clientWidth, s = a.clientHeight, i = 0, d = 0;
|
|
1495
1585
|
if (r) {
|
|
1496
1586
|
o = r.width, s = r.height;
|
|
1497
|
-
const c =
|
|
1587
|
+
const c = Ye();
|
|
1498
1588
|
(!c || c && t === "fixed") && (i = r.offsetLeft, d = r.offsetTop);
|
|
1499
1589
|
}
|
|
1500
|
-
const l =
|
|
1590
|
+
const l = Ce(a);
|
|
1501
1591
|
if (l <= 0) {
|
|
1502
1592
|
const c = a.ownerDocument, u = c.body, p = getComputedStyle(u), g = c.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(a.clientWidth - u.clientWidth - g);
|
|
1503
1593
|
h <= Ke && (o -= h);
|
|
@@ -1509,9 +1599,9 @@ function Cn(e, t) {
|
|
|
1509
1599
|
y: d
|
|
1510
1600
|
};
|
|
1511
1601
|
}
|
|
1512
|
-
const
|
|
1513
|
-
function
|
|
1514
|
-
const n =
|
|
1602
|
+
const kn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1603
|
+
function Tn(e, t) {
|
|
1604
|
+
const n = fe(e, !0, t === "fixed"), a = n.top + e.clientTop, r = n.left + e.clientLeft, o = j(e) ? re(e) : W(1), s = e.clientWidth * o.x, i = e.clientHeight * o.y, d = r * o.x, l = a * o.y;
|
|
1515
1605
|
return {
|
|
1516
1606
|
width: s,
|
|
1517
1607
|
height: i,
|
|
@@ -1522,11 +1612,11 @@ function kn(e, t) {
|
|
|
1522
1612
|
function Ue(e, t, n) {
|
|
1523
1613
|
let a;
|
|
1524
1614
|
if (t === "viewport")
|
|
1525
|
-
a =
|
|
1615
|
+
a = Pn(e, n);
|
|
1526
1616
|
else if (t === "document")
|
|
1527
|
-
a =
|
|
1528
|
-
else if (
|
|
1529
|
-
a =
|
|
1617
|
+
a = $n(G(e));
|
|
1618
|
+
else if (Y(t))
|
|
1619
|
+
a = Tn(t, n);
|
|
1530
1620
|
else {
|
|
1531
1621
|
const r = ft(e);
|
|
1532
1622
|
a = {
|
|
@@ -1540,31 +1630,31 @@ function Ue(e, t, n) {
|
|
|
1540
1630
|
}
|
|
1541
1631
|
function mt(e, t) {
|
|
1542
1632
|
const n = ee(e);
|
|
1543
|
-
return n === t || !
|
|
1633
|
+
return n === t || !Y(n) || se(n) ? !1 : V(n).position === "fixed" || mt(n, t);
|
|
1544
1634
|
}
|
|
1545
|
-
function
|
|
1635
|
+
function zn(e, t) {
|
|
1546
1636
|
const n = t.get(e);
|
|
1547
1637
|
if (n)
|
|
1548
1638
|
return n;
|
|
1549
|
-
let a = pt(e, []).filter((i) =>
|
|
1550
|
-
const o =
|
|
1639
|
+
let a = pt(e, []).filter((i) => Y(i) && ie(i) !== "body"), r = null;
|
|
1640
|
+
const o = V(e).position === "fixed";
|
|
1551
1641
|
let s = o ? ee(e) : e;
|
|
1552
|
-
for (;
|
|
1553
|
-
const i =
|
|
1554
|
-
!d && i.position === "fixed" && (r = null), (o ? !d && !r : !d && i.position === "static" && !!r &&
|
|
1642
|
+
for (; Y(s) && !se(s); ) {
|
|
1643
|
+
const i = V(s), d = He(s);
|
|
1644
|
+
!d && i.position === "fixed" && (r = null), (o ? !d && !r : !d && i.position === "static" && !!r && kn.has(r.position) || ye(s) && !d && mt(e, s)) ? a = a.filter((c) => c !== s) : r = i, s = ee(s);
|
|
1555
1645
|
}
|
|
1556
1646
|
return t.set(e, a), a;
|
|
1557
1647
|
}
|
|
1558
|
-
function
|
|
1648
|
+
function Fn(e) {
|
|
1559
1649
|
let {
|
|
1560
1650
|
element: t,
|
|
1561
1651
|
boundary: n,
|
|
1562
1652
|
rootBoundary: a,
|
|
1563
1653
|
strategy: r
|
|
1564
1654
|
} = e;
|
|
1565
|
-
const s = [...n === "clippingAncestors" ?
|
|
1655
|
+
const s = [...n === "clippingAncestors" ? Ie(t) ? [] : zn(t, this._c) : [].concat(n), a], i = s[0], d = s.reduce((l, c) => {
|
|
1566
1656
|
const u = Ue(t, c, r);
|
|
1567
|
-
return l.top = ae(u.top, l.top), l.right =
|
|
1657
|
+
return l.top = ae(u.top, l.top), l.right = ge(u.right, l.right), l.bottom = ge(u.bottom, l.bottom), l.left = ae(u.left, l.left), l;
|
|
1568
1658
|
}, Ue(t, i, r));
|
|
1569
1659
|
return {
|
|
1570
1660
|
width: d.right - d.left,
|
|
@@ -1573,7 +1663,7 @@ function $n(e) {
|
|
|
1573
1663
|
y: d.top
|
|
1574
1664
|
};
|
|
1575
1665
|
}
|
|
1576
|
-
function
|
|
1666
|
+
function Nn(e) {
|
|
1577
1667
|
const {
|
|
1578
1668
|
width: t,
|
|
1579
1669
|
height: n
|
|
@@ -1583,23 +1673,23 @@ function Pn(e) {
|
|
|
1583
1673
|
height: n
|
|
1584
1674
|
};
|
|
1585
1675
|
}
|
|
1586
|
-
function
|
|
1587
|
-
const a =
|
|
1676
|
+
function On(e, t, n) {
|
|
1677
|
+
const a = j(t), r = G(t), o = n === "fixed", s = fe(e, !0, o, t);
|
|
1588
1678
|
let i = {
|
|
1589
1679
|
scrollLeft: 0,
|
|
1590
1680
|
scrollTop: 0
|
|
1591
1681
|
};
|
|
1592
|
-
const d =
|
|
1682
|
+
const d = W(0);
|
|
1593
1683
|
function l() {
|
|
1594
|
-
d.x =
|
|
1684
|
+
d.x = Ce(r);
|
|
1595
1685
|
}
|
|
1596
1686
|
if (a || !a && !o)
|
|
1597
|
-
if ((ie(t) !== "body" ||
|
|
1598
|
-
const g =
|
|
1687
|
+
if ((ie(t) !== "body" || ye(r)) && (i = Ee(t)), a) {
|
|
1688
|
+
const g = fe(t, !0, o, t);
|
|
1599
1689
|
d.x = g.x + t.clientLeft, d.y = g.y + t.clientTop;
|
|
1600
1690
|
} else r && l();
|
|
1601
1691
|
o && !a && r && l();
|
|
1602
|
-
const c = r && !a && !o ? ht(r, i) :
|
|
1692
|
+
const c = r && !a && !o ? ht(r, i) : W(0), u = s.left + i.scrollLeft - d.x - c.x, p = s.top + i.scrollTop - d.y - c.y;
|
|
1603
1693
|
return {
|
|
1604
1694
|
x: u,
|
|
1605
1695
|
y: p,
|
|
@@ -1608,10 +1698,10 @@ function Tn(e, t, n) {
|
|
|
1608
1698
|
};
|
|
1609
1699
|
}
|
|
1610
1700
|
function Ae(e) {
|
|
1611
|
-
return
|
|
1701
|
+
return V(e).position === "static";
|
|
1612
1702
|
}
|
|
1613
1703
|
function Xe(e, t) {
|
|
1614
|
-
if (!
|
|
1704
|
+
if (!j(e) || V(e).position === "fixed")
|
|
1615
1705
|
return null;
|
|
1616
1706
|
if (t)
|
|
1617
1707
|
return t(e);
|
|
@@ -1619,27 +1709,27 @@ function Xe(e, t) {
|
|
|
1619
1709
|
return G(e) === n && (n = n.ownerDocument.body), n;
|
|
1620
1710
|
}
|
|
1621
1711
|
function yt(e, t) {
|
|
1622
|
-
const n =
|
|
1623
|
-
if (
|
|
1712
|
+
const n = z(e);
|
|
1713
|
+
if (Ie(e))
|
|
1624
1714
|
return n;
|
|
1625
|
-
if (!
|
|
1715
|
+
if (!j(e)) {
|
|
1626
1716
|
let r = ee(e);
|
|
1627
1717
|
for (; r && !se(r); ) {
|
|
1628
|
-
if (
|
|
1718
|
+
if (Y(r) && !Ae(r))
|
|
1629
1719
|
return r;
|
|
1630
1720
|
r = ee(r);
|
|
1631
1721
|
}
|
|
1632
1722
|
return n;
|
|
1633
1723
|
}
|
|
1634
1724
|
let a = Xe(e, t);
|
|
1635
|
-
for (; a &&
|
|
1725
|
+
for (; a && _n(a) && Ae(a); )
|
|
1636
1726
|
a = Xe(a, t);
|
|
1637
|
-
return a && se(a) && Ae(a) && !
|
|
1727
|
+
return a && se(a) && Ae(a) && !He(a) ? n : a || In(e) || n;
|
|
1638
1728
|
}
|
|
1639
|
-
const
|
|
1729
|
+
const Hn = async function(e) {
|
|
1640
1730
|
const t = this.getOffsetParent || yt, n = this.getDimensions, a = await n(e.floating);
|
|
1641
1731
|
return {
|
|
1642
|
-
reference:
|
|
1732
|
+
reference: On(e.reference, await t(e.floating), e.strategy),
|
|
1643
1733
|
floating: {
|
|
1644
1734
|
x: 0,
|
|
1645
1735
|
y: 0,
|
|
@@ -1648,40 +1738,40 @@ const zn = async function(e) {
|
|
|
1648
1738
|
}
|
|
1649
1739
|
};
|
|
1650
1740
|
};
|
|
1651
|
-
function
|
|
1652
|
-
return
|
|
1741
|
+
function Yn(e) {
|
|
1742
|
+
return V(e).direction === "rtl";
|
|
1653
1743
|
}
|
|
1654
|
-
const
|
|
1655
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1744
|
+
const Vn = {
|
|
1745
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: An,
|
|
1656
1746
|
getDocumentElement: G,
|
|
1657
|
-
getClippingRect:
|
|
1747
|
+
getClippingRect: Fn,
|
|
1658
1748
|
getOffsetParent: yt,
|
|
1659
|
-
getElementRects:
|
|
1660
|
-
getClientRects:
|
|
1661
|
-
getDimensions:
|
|
1749
|
+
getElementRects: Hn,
|
|
1750
|
+
getClientRects: Rn,
|
|
1751
|
+
getDimensions: Nn,
|
|
1662
1752
|
getScale: re,
|
|
1663
|
-
isElement:
|
|
1664
|
-
isRTL:
|
|
1665
|
-
},
|
|
1753
|
+
isElement: Y,
|
|
1754
|
+
isRTL: Yn
|
|
1755
|
+
}, Te = yn, ze = vn, vt = fn, qn = gn, Dt = (e, t, n) => {
|
|
1666
1756
|
const a = /* @__PURE__ */ new Map(), r = {
|
|
1667
|
-
platform:
|
|
1757
|
+
platform: Vn,
|
|
1668
1758
|
...n
|
|
1669
1759
|
}, o = {
|
|
1670
1760
|
...r.platform,
|
|
1671
1761
|
_c: a
|
|
1672
1762
|
};
|
|
1673
|
-
return
|
|
1763
|
+
return un(e, t, {
|
|
1674
1764
|
...r,
|
|
1675
1765
|
platform: o
|
|
1676
1766
|
});
|
|
1677
1767
|
};
|
|
1678
|
-
function
|
|
1679
|
-
e.options.positioningMode !== "inline" && (
|
|
1768
|
+
function bt(e) {
|
|
1769
|
+
e.options.positioningMode !== "inline" && (B.debug("show() - adding visible class"), e.isFirstRender && (e.renderCalendar(), e.isFirstRender = !1), e.calendar.classList.add("drp-date-picker--visible"), e.isCalendarActive = !0, B.debug("show() - calendar classes:", e.calendar.className), wt(e), setTimeout(() => {
|
|
1680
1770
|
const t = window.getComputedStyle(e.calendar);
|
|
1681
|
-
|
|
1771
|
+
B.debug("show() - computed styles - display:", t.display, "position:", t.position, "left:", t.left, "top:", t.top, "z-index:", t.zIndex);
|
|
1682
1772
|
}, 100));
|
|
1683
1773
|
}
|
|
1684
|
-
function
|
|
1774
|
+
function _t(e) {
|
|
1685
1775
|
if (e.options.positioningMode !== "inline" && e.calendar.classList.contains("drp-date-picker--visible")) {
|
|
1686
1776
|
e.calendar.classList.remove("drp-date-picker--visible"), e.isCalendarActive = !1;
|
|
1687
1777
|
for (let t = 0; t < e.showingRollingSelector.length; t++)
|
|
@@ -1689,27 +1779,27 @@ function wt(e) {
|
|
|
1689
1779
|
e.isFirstRender || e.renderCalendar(), e.lockedPlacement = void 0;
|
|
1690
1780
|
}
|
|
1691
1781
|
}
|
|
1692
|
-
function
|
|
1693
|
-
e.calendar.classList.contains("drp-date-picker--visible") ?
|
|
1782
|
+
function Bn(e) {
|
|
1783
|
+
e.calendar.classList.contains("drp-date-picker--visible") ? _t(e) : bt(e);
|
|
1694
1784
|
}
|
|
1695
|
-
async function
|
|
1696
|
-
if (
|
|
1697
|
-
const t = e.lockedPlacement ? [
|
|
1785
|
+
async function wt(e) {
|
|
1786
|
+
if (B.debug("position() - locked placement:", e.lockedPlacement), !e.input) return;
|
|
1787
|
+
const t = e.lockedPlacement ? [Te(8), ze({ padding: 8 })] : [Te(8), vt(), ze({ padding: 8 })], n = await Dt(e.input, e.calendar, {
|
|
1698
1788
|
placement: e.lockedPlacement || e.options.calendarPlacement,
|
|
1699
1789
|
middleware: t
|
|
1700
1790
|
});
|
|
1701
|
-
|
|
1791
|
+
B.debug("position() - FloatingUI computed - x:", n.x, "y:", n.y, "placement:", n.placement), e.lockedPlacement || (e.lockedPlacement = n.placement, B.debug("position() - locked placement to:", e.lockedPlacement)), e.calendar.style.left = `${n.x}px`, e.calendar.style.top = `${n.y}px`, B.debug("position() - applied styles to calendar");
|
|
1702
1792
|
}
|
|
1703
|
-
async function
|
|
1793
|
+
async function Wn(e, t, n) {
|
|
1704
1794
|
if (!e.tooltip || !e.tooltipArrow) return;
|
|
1705
1795
|
e.currentTooltipTarget = t, e.tooltip.textContent = n, e.tooltip.appendChild(e.tooltipArrow), e.tooltip.classList.add("drp-date-picker__tooltip--visible");
|
|
1706
|
-
const { x: a, y: r, placement: o, middlewareData: s } = await
|
|
1796
|
+
const { x: a, y: r, placement: o, middlewareData: s } = await Dt(t, e.tooltip, {
|
|
1707
1797
|
placement: "top",
|
|
1708
1798
|
middleware: [
|
|
1709
|
-
|
|
1799
|
+
Te(6),
|
|
1710
1800
|
vt(),
|
|
1711
|
-
|
|
1712
|
-
|
|
1801
|
+
ze({ padding: 5 }),
|
|
1802
|
+
qn({ element: e.tooltipArrow })
|
|
1713
1803
|
]
|
|
1714
1804
|
});
|
|
1715
1805
|
if (Object.assign(e.tooltip.style, {
|
|
@@ -1731,10 +1821,10 @@ async function Vn(e, t, n) {
|
|
|
1731
1821
|
});
|
|
1732
1822
|
}
|
|
1733
1823
|
}
|
|
1734
|
-
function
|
|
1824
|
+
function jn(e) {
|
|
1735
1825
|
e.tooltip && (e.tooltip.classList.remove("drp-date-picker__tooltip--visible"), e.currentTooltipTarget = void 0);
|
|
1736
1826
|
}
|
|
1737
|
-
function
|
|
1827
|
+
function Kn(e) {
|
|
1738
1828
|
if (e.loadingOverlay) return;
|
|
1739
1829
|
const t = document.createElement("div");
|
|
1740
1830
|
t.className = "drp-date-picker__loading-overlay", t.innerHTML = `
|
|
@@ -1755,7 +1845,7 @@ async function xt(e, t, n) {
|
|
|
1755
1845
|
}
|
|
1756
1846
|
if (e.options.validateRangeCallback)
|
|
1757
1847
|
try {
|
|
1758
|
-
e.isValidating = !0,
|
|
1848
|
+
e.isValidating = !0, Kn(e);
|
|
1759
1849
|
const a = await e.options.validateRangeCallback(t, n);
|
|
1760
1850
|
switch (Ge(e), e.isValidating = !1, a.action) {
|
|
1761
1851
|
case "accept":
|
|
@@ -1775,17 +1865,17 @@ async function xt(e, t, n) {
|
|
|
1775
1865
|
return { isValid: !1, message: "Unknown validation action" };
|
|
1776
1866
|
}
|
|
1777
1867
|
} catch (a) {
|
|
1778
|
-
return Ge(e), e.isValidating = !1,
|
|
1868
|
+
return Ge(e), e.isValidating = !1, k.error("validateRangeAsync() - async validation error:", a), { isValid: !1, message: "Validation error occurred" };
|
|
1779
1869
|
}
|
|
1780
1870
|
return { isValid: !0 };
|
|
1781
1871
|
}
|
|
1782
|
-
async function
|
|
1872
|
+
async function Un(e, t) {
|
|
1783
1873
|
if (t.classList.contains("drp-date-picker__day--disabled")) return;
|
|
1784
1874
|
if (!t.dataset || !t.dataset.date) {
|
|
1785
|
-
|
|
1875
|
+
k.warn("selectDay() - called with invalid element:", t);
|
|
1786
1876
|
return;
|
|
1787
1877
|
}
|
|
1788
|
-
const [n, a, r] = t.dataset.date.split("-").map(Number), o = new Date(n, a, r);
|
|
1878
|
+
const [n, a, r] = t.dataset.date.split("-").map(Number), o = new Date(n, a - 1, r);
|
|
1789
1879
|
t.classList.contains("drp-date-picker__day--other-month");
|
|
1790
1880
|
const s = t.closest(".drp-date-picker__days");
|
|
1791
1881
|
if (s && s instanceof HTMLElement) {
|
|
@@ -1802,7 +1892,7 @@ async function Bn(e, t) {
|
|
|
1802
1892
|
o < e.selectedStartDate && (d = e.selectedStartDate, i = o), te.debug(" selectDay - calling validateRangeAsync with:", i, d);
|
|
1803
1893
|
const l = await xt(e, i, d);
|
|
1804
1894
|
if (te.debug(" selectDay - validation result:", l), !l.isValid) {
|
|
1805
|
-
l.message &&
|
|
1895
|
+
l.message && k.warn("selectDay() - range validation failed:", l.message), e.renderCalendar(), e.updateSummary();
|
|
1806
1896
|
return;
|
|
1807
1897
|
}
|
|
1808
1898
|
e.selectedStartDate = l.adjustedStart || i, e.selectedEndDate = l.adjustedEnd || d, e.input && (e.input.value = `${e.formatDate(e.selectedStartDate)} - ${e.formatDate(e.selectedEndDate)}`), e.options.onSelect && e.options.onSelect({ start: e.selectedStartDate, end: e.selectedEndDate });
|
|
@@ -1818,7 +1908,7 @@ async function Bn(e, t) {
|
|
|
1818
1908
|
const u = c.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), p = Array.from(u).findIndex((g) => {
|
|
1819
1909
|
const h = g.dataset.date;
|
|
1820
1910
|
if (!h) return !1;
|
|
1821
|
-
const [f, y, m] = h.split("-").map(Number), x = new Date(f, y, m);
|
|
1911
|
+
const [f, y, m] = h.split("-").map(Number), x = new Date(f, y - 1, m);
|
|
1822
1912
|
return e.isSameDay(x, i);
|
|
1823
1913
|
});
|
|
1824
1914
|
p !== -1 && (e.focusedDayIndex = p, u.forEach((g) => g.classList.remove("drp-date-picker__day--focused")), u[p] && u[p].classList.add("drp-date-picker__day--focused"));
|
|
@@ -1828,16 +1918,16 @@ async function Bn(e, t) {
|
|
|
1828
1918
|
}
|
|
1829
1919
|
}
|
|
1830
1920
|
}
|
|
1831
|
-
function
|
|
1921
|
+
function Xn(e) {
|
|
1832
1922
|
e.monthDates[e.activeMonthIndex] = /* @__PURE__ */ new Date(), e.selectedDate = /* @__PURE__ */ new Date(), e.input && (e.input.value = e.formatDate(e.selectedDate)), e.options.onSelect && e.options.onSelect(e.selectedDate), e.renderCalendar(), e.options.selectionMode === "single" && e.hide();
|
|
1833
1923
|
}
|
|
1834
|
-
function
|
|
1924
|
+
function Gn(e) {
|
|
1835
1925
|
e.selectedDate = null, e.selectedStartDate = null, e.selectedEndDate = null, e.input && (e.input.value = ""), e.renderCalendar(), e.updateSummary();
|
|
1836
1926
|
}
|
|
1837
|
-
function
|
|
1927
|
+
function Jn(e) {
|
|
1838
1928
|
e.selectedStartDate && e.selectedEndDate && e.hide();
|
|
1839
1929
|
}
|
|
1840
|
-
function
|
|
1930
|
+
function Qn(e) {
|
|
1841
1931
|
e.options.selectionMode === "range" && e.calendar.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--disabled):not(.drp-date-picker__day--other-month)").forEach((n) => {
|
|
1842
1932
|
n.addEventListener("mousedown", (a) => {
|
|
1843
1933
|
const r = a, o = n, s = r.clientX, i = r.clientY, d = 5;
|
|
@@ -1861,11 +1951,13 @@ function St(e, t, n, a) {
|
|
|
1861
1951
|
let s = null;
|
|
1862
1952
|
if (o) {
|
|
1863
1953
|
const [i, d, l] = o.split("-").map(Number);
|
|
1864
|
-
s = new Date(i, d, l);
|
|
1954
|
+
s = new Date(i, d - 1, l);
|
|
1865
1955
|
}
|
|
1866
|
-
!e.selectedStartDate && !e.selectedEndDate ? s && (e.originalStartDate = s, e.originalEndDate = null, e.draggingType = "end") : s && e.selectedStartDate && !e.selectedEndDate ? s.getTime() === e.selectedStartDate.getTime() ? (e.originalStartDate = new Date(e.selectedStartDate), e.originalEndDate = null) : (e.selectedStartDate = null, e.selectedEndDate = null, e.
|
|
1956
|
+
!e.selectedStartDate && !e.selectedEndDate ? s && (e.originalStartDate = s, e.originalEndDate = null, e.draggingType = "end") : s && e.selectedStartDate && !e.selectedEndDate ? s.getTime() === e.selectedStartDate.getTime() ? (e.originalStartDate = new Date(e.selectedStartDate), e.originalEndDate = null) : (e.selectedStartDate = null, e.selectedEndDate = null, e.focusedDayIndex = null, e.calendar.querySelectorAll(".drp-date-picker__day--range-start, .drp-date-picker__day--range-end, .drp-date-picker__day--selected, .drp-date-picker__day--focused").forEach((d) => {
|
|
1957
|
+
d.classList.remove("drp-date-picker__day--range-start", "drp-date-picker__day--range-end", "drp-date-picker__day--selected", "drp-date-picker__day--focused");
|
|
1958
|
+
}), e.originalStartDate = s, e.originalEndDate = null, e.draggingType = "end") : (e.selectedStartDate && (e.originalStartDate = new Date(e.selectedStartDate)), e.selectedEndDate && (e.originalEndDate = new Date(e.selectedEndDate))), r.classList.add("drp-date-picker__day--dragging"), F.debug(`Started dragging ${n} date`), e.onDragMoveBound = (i) => Mt(e, i), e.onDragEndBound = async (i) => await It(e), document.addEventListener("mousemove", e.onDragMoveBound), document.addEventListener("mouseup", e.onDragEndBound), document.body.style.cursor = "grabbing";
|
|
1867
1959
|
}
|
|
1868
|
-
function
|
|
1960
|
+
function Mt(e, t) {
|
|
1869
1961
|
if (!e.isDragging) return;
|
|
1870
1962
|
let n = null;
|
|
1871
1963
|
e.containerElement instanceof ShadowRoot && "elementsFromPoint" in e.containerElement ? n = e.containerElement.elementsFromPoint(t.clientX, t.clientY)[0] || null : n = document.elementFromPoint(t.clientX, t.clientY);
|
|
@@ -1888,35 +1980,35 @@ function It(e, t) {
|
|
|
1888
1980
|
const s = o.dataset.date;
|
|
1889
1981
|
if (!s) return;
|
|
1890
1982
|
const [i, d, l] = s.split("-").map(Number);
|
|
1891
|
-
let c = new Date(i, d, l);
|
|
1983
|
+
let c = new Date(i, d - 1, l);
|
|
1892
1984
|
if (o.classList.contains("drp-date-picker__day--disabled")) {
|
|
1893
1985
|
const u = e.draggingType === "start" ? e.originalEndDate && c > e.originalEndDate ? "backward" : "forward" : e.originalStartDate && c < e.originalStartDate ? "forward" : "backward";
|
|
1894
1986
|
c = Se(e, c, u);
|
|
1895
1987
|
}
|
|
1896
1988
|
if (e.draggingType === "start" && e.originalEndDate ? (e.dragPreviewStart = c, e.dragPreviewEnd = e.originalEndDate, e.dragPreviewStart > e.dragPreviewEnd && ([e.dragPreviewStart, e.dragPreviewEnd] = [e.dragPreviewEnd, e.dragPreviewStart], e.draggingType = "end")) : e.originalStartDate && (e.dragPreviewStart = e.originalStartDate, e.dragPreviewEnd = c, e.dragPreviewEnd < e.dragPreviewStart && ([e.dragPreviewStart, e.dragPreviewEnd] = [e.dragPreviewEnd, e.dragPreviewStart], e.draggingType = "start")), e.dragPreviewStart && e.dragPreviewEnd) {
|
|
1897
1989
|
const u = e.options.disabledDatesHandling;
|
|
1898
|
-
if (
|
|
1899
|
-
|
|
1990
|
+
if (F.debug("onDragMove - mode:", u, "start:", e.dragPreviewStart, "end:", e.dragPreviewEnd), u === "prevent" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd)) {
|
|
1991
|
+
F.debug("PREVENT mode - range contains disabled dates, blocking preview update");
|
|
1900
1992
|
return;
|
|
1901
1993
|
} else if (u === "block" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd)) {
|
|
1902
|
-
if (
|
|
1994
|
+
if (F.debug("BLOCK mode - range contains disabled dates, adjusting preview"), e.draggingType === "start" && e.originalEndDate) {
|
|
1903
1995
|
const p = e.findLastEnabledBeforeGap(e.dragPreviewStart, e.originalEndDate);
|
|
1904
|
-
|
|
1996
|
+
F.debug("BLOCK mode - adjusted end (dragging start):", p), e.dragPreviewEnd = p;
|
|
1905
1997
|
} else if (e.originalStartDate) {
|
|
1906
1998
|
const p = e.findLastEnabledBeforeGap(e.originalStartDate, e.dragPreviewEnd);
|
|
1907
|
-
|
|
1999
|
+
F.debug("BLOCK mode - adjusted end (dragging end):", p), e.dragPreviewEnd = p;
|
|
1908
2000
|
}
|
|
1909
2001
|
}
|
|
1910
2002
|
}
|
|
1911
2003
|
e.updateDragPreview();
|
|
1912
2004
|
}
|
|
1913
|
-
async function
|
|
2005
|
+
async function It(e, t) {
|
|
1914
2006
|
if (e.isDragging) {
|
|
1915
|
-
if (
|
|
2007
|
+
if (F.debug("Ended dragging, finalizing selection"), e.dragPreviewStart && e.dragPreviewEnd) {
|
|
1916
2008
|
let n = Se(e, e.dragPreviewStart, "forward"), a = Se(e, e.dragPreviewEnd, "backward");
|
|
1917
|
-
n > a && ([n, a] = [a, n]),
|
|
2009
|
+
n > a && ([n, a] = [a, n]), F.debug("onDragEnd - calling validateRangeAsync with:", n, a);
|
|
1918
2010
|
const r = await xt(e, n, a);
|
|
1919
|
-
|
|
2011
|
+
F.debug("onDragEnd - validation result:", r), r.isValid ? (e.selectedStartDate = r.adjustedStart || n, e.selectedEndDate = r.adjustedEnd || a, e.input && (e.input.value = `${e.formatDate(e.selectedStartDate)} - ${e.formatDate(e.selectedEndDate)}`), e.options.onSelect && e.options.onSelect({ start: e.selectedStartDate, end: e.selectedEndDate })) : r.message && k.warn("onDragEnd() - drag validation failed:", r.message);
|
|
1920
2012
|
}
|
|
1921
2013
|
if (e.isDragging = !1, e.draggingType = null, e.dragPreviewStart = null, e.dragPreviewEnd = null, e.calendar.querySelectorAll(".drp-date-picker__day--dragging").forEach((n) => {
|
|
1922
2014
|
n.classList.remove("drp-date-picker__day--dragging");
|
|
@@ -1931,7 +2023,7 @@ async function Mt(e, t) {
|
|
|
1931
2023
|
const s = o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), i = Array.from(s).findIndex((d) => {
|
|
1932
2024
|
const l = d.dataset.date;
|
|
1933
2025
|
if (!l) return !1;
|
|
1934
|
-
const [c, u, p] = l.split("-").map(Number), g = new Date(c, u, p);
|
|
2026
|
+
const [c, u, p] = l.split("-").map(Number), g = new Date(c, u - 1, p);
|
|
1935
2027
|
return e.isSameDay(g, n);
|
|
1936
2028
|
});
|
|
1937
2029
|
i !== -1 && (e.focusedDayIndex = i, s.forEach((d) => d.classList.remove("drp-date-picker__day--focused")), s[i] && s[i].classList.add("drp-date-picker__day--focused"));
|
|
@@ -1960,7 +2052,7 @@ function Se(e, t, n = "forward") {
|
|
|
1960
2052
|
}
|
|
1961
2053
|
return t;
|
|
1962
2054
|
}
|
|
1963
|
-
function
|
|
2055
|
+
function Zn(e, t) {
|
|
1964
2056
|
const n = t.target, a = n.value, r = n.selectionStart || 0, o = e._previousInputValue || "", s = a.length < o.length, { separator: i } = e.formatInfo;
|
|
1965
2057
|
if (e.options.selectionMode === "range") {
|
|
1966
2058
|
const d = a.replace(new RegExp(`[^0-9${i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}to ]`, "gi"), ""), l = Et(e, d);
|
|
@@ -2028,7 +2120,7 @@ function Et(e, t) {
|
|
|
2028
2120
|
else
|
|
2029
2121
|
return i;
|
|
2030
2122
|
}
|
|
2031
|
-
function
|
|
2123
|
+
function ea(e, t) {
|
|
2032
2124
|
const { key: n, ctrlKey: a, metaKey: r } = t, { separator: o } = e.formatInfo;
|
|
2033
2125
|
if (e.calendar.classList.contains("drp-date-picker--visible") && ["ArrowUp", "ArrowDown", "Home", "End", "PageUp", "PageDown"].includes(n)) {
|
|
2034
2126
|
t.preventDefault();
|
|
@@ -2068,7 +2160,7 @@ function Gn(e, t) {
|
|
|
2068
2160
|
e.options.selectionMode === "range" ? !/^\d$/.test(n) && n !== o && n !== " " && n.toLowerCase() !== "t" && n.toLowerCase() !== "o" && t.preventDefault() : !/^\d$/.test(n) && n !== o && t.preventDefault();
|
|
2069
2161
|
}
|
|
2070
2162
|
}
|
|
2071
|
-
function
|
|
2163
|
+
function ta(e, t) {
|
|
2072
2164
|
var p;
|
|
2073
2165
|
t.preventDefault();
|
|
2074
2166
|
const n = ((p = t.clipboardData) == null ? void 0 : p.getData("text")) || "", { separator: a } = e.formatInfo, r = n.replace(new RegExp(`[^0-9${a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}]`, "g"), ""), o = oe(e, r), s = t.target, i = s.selectionStart || 0, d = s.selectionEnd || 0, l = s.value, c = l.substring(0, i) + o + l.substring(d);
|
|
@@ -2083,13 +2175,13 @@ function Ve(e) {
|
|
|
2083
2175
|
const { separator: n, parts: a, maxLength: r } = e.formatInfo;
|
|
2084
2176
|
if (Z.debug("Format info:", { separator: n, parts: a, maxLength: r }), e.options.selectionMode === "range" && t.includes(" to ")) {
|
|
2085
2177
|
const s = t.split(" to "), i = s[0], d = s[1];
|
|
2086
|
-
Z.debug("Range parts - start:", i, "end:", d),
|
|
2178
|
+
Z.debug("Range parts - start:", i, "end:", d), De(e, i, "start"), d && De(e, d, "end");
|
|
2087
2179
|
return;
|
|
2088
2180
|
}
|
|
2089
2181
|
const o = e.options.selectionMode === "range" ? "start" : "single";
|
|
2090
|
-
|
|
2182
|
+
De(e, t, o);
|
|
2091
2183
|
}
|
|
2092
|
-
function
|
|
2184
|
+
function De(e, t, n = "single") {
|
|
2093
2185
|
const { separator: a, parts: r, maxLength: o } = e.formatInfo, s = t.split(a);
|
|
2094
2186
|
let i = null, d = null, l = null;
|
|
2095
2187
|
if (s.forEach((c, u) => {
|
|
@@ -2136,7 +2228,7 @@ function be(e, t, n = "single") {
|
|
|
2136
2228
|
c.getMonth() === d - 1 && (n === "single" ? e.selectedDate = c : n === "start" ? e.selectedStartDate = c : n === "end" && (e.selectedEndDate = c), e.renderCalendar(), e.options.selectionMode === "range" && e.updateSummary(), Z.debug(`Set ${n} date:`, c));
|
|
2137
2229
|
}
|
|
2138
2230
|
}
|
|
2139
|
-
const
|
|
2231
|
+
const Fe = {
|
|
2140
2232
|
en: {
|
|
2141
2233
|
today: "Today",
|
|
2142
2234
|
clear: "Clear",
|
|
@@ -2178,21 +2270,21 @@ const ze = {
|
|
|
2178
2270
|
nights: "noches"
|
|
2179
2271
|
}
|
|
2180
2272
|
};
|
|
2181
|
-
function
|
|
2273
|
+
function Le(e) {
|
|
2182
2274
|
if (e !== "auto")
|
|
2183
2275
|
return e;
|
|
2184
2276
|
if (typeof navigator < "u" && navigator.language) {
|
|
2185
2277
|
const t = navigator.language.split("-")[0].toLowerCase();
|
|
2186
|
-
return
|
|
2278
|
+
return Fe[t] ? t : "en";
|
|
2187
2279
|
}
|
|
2188
2280
|
return "en";
|
|
2189
2281
|
}
|
|
2190
|
-
function
|
|
2191
|
-
const n =
|
|
2282
|
+
function na(e, t) {
|
|
2283
|
+
const n = Le(e), a = Fe[n] || Fe.en;
|
|
2192
2284
|
return t ? { ...a, ...t } : a;
|
|
2193
2285
|
}
|
|
2194
|
-
function
|
|
2195
|
-
const t =
|
|
2286
|
+
function aa(e) {
|
|
2287
|
+
const t = Le(e);
|
|
2196
2288
|
try {
|
|
2197
2289
|
const n = new Intl.DateTimeFormat(t, { weekday: "short" }), a = [];
|
|
2198
2290
|
for (let r = 0; r < 7; r++) {
|
|
@@ -2201,11 +2293,11 @@ function Zn(e) {
|
|
|
2201
2293
|
}
|
|
2202
2294
|
return a;
|
|
2203
2295
|
} catch (n) {
|
|
2204
|
-
return
|
|
2296
|
+
return k.warn("getWeekdayNames() - Intl.DateTimeFormat failed, using English weekdays", n), ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
2205
2297
|
}
|
|
2206
2298
|
}
|
|
2207
|
-
function
|
|
2208
|
-
const t =
|
|
2299
|
+
function ra(e) {
|
|
2300
|
+
const t = Le(e);
|
|
2209
2301
|
try {
|
|
2210
2302
|
const n = new Intl.DateTimeFormat(t, { month: "long" }), a = [];
|
|
2211
2303
|
for (let r = 0; r < 12; r++) {
|
|
@@ -2214,7 +2306,7 @@ function ea(e) {
|
|
|
2214
2306
|
}
|
|
2215
2307
|
return a;
|
|
2216
2308
|
} catch (n) {
|
|
2217
|
-
return
|
|
2309
|
+
return k.warn("getMonthNames() - Intl.DateTimeFormat failed, using English months", n), [
|
|
2218
2310
|
"January",
|
|
2219
2311
|
"February",
|
|
2220
2312
|
"March",
|
|
@@ -2230,63 +2322,65 @@ function ea(e) {
|
|
|
2230
2322
|
];
|
|
2231
2323
|
}
|
|
2232
2324
|
}
|
|
2233
|
-
class
|
|
2325
|
+
class sa {
|
|
2234
2326
|
constructor(t, n = {}) {
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2327
|
+
D(this, "input");
|
|
2328
|
+
D(this, "options");
|
|
2329
|
+
D(this, "formatInfo");
|
|
2330
|
+
D(this, "_previousInputValue");
|
|
2331
|
+
D(this, "currentDate");
|
|
2332
|
+
D(this, "monthDates");
|
|
2333
|
+
D(this, "displayMonths");
|
|
2334
|
+
D(this, "selectedDate");
|
|
2335
|
+
D(this, "selectedStartDate");
|
|
2336
|
+
D(this, "selectedEndDate");
|
|
2337
|
+
D(this, "focusedDayIndex");
|
|
2338
|
+
D(this, "activeMonthIndex");
|
|
2339
|
+
D(this, "showingRollingSelector");
|
|
2340
|
+
D(this, "draggingType");
|
|
2341
|
+
D(this, "isDragging");
|
|
2342
|
+
D(this, "dragStartDate");
|
|
2343
|
+
D(this, "originalStartDate");
|
|
2344
|
+
D(this, "originalEndDate");
|
|
2345
|
+
D(this, "dragPreviewStart");
|
|
2346
|
+
D(this, "dragPreviewEnd");
|
|
2347
|
+
D(this, "autoScrollInterval");
|
|
2348
|
+
D(this, "navInterval");
|
|
2349
|
+
D(this, "calendar");
|
|
2350
|
+
D(this, "containerElement");
|
|
2351
|
+
D(this, "onDragMoveBound");
|
|
2352
|
+
D(this, "onDragEndBound");
|
|
2353
|
+
D(this, "clickOutsideHandler");
|
|
2354
|
+
D(this, "isFirstRender", !0);
|
|
2355
|
+
D(this, "lockedPlacement");
|
|
2264
2356
|
// Store the initial placement to prevent jumping
|
|
2265
|
-
|
|
2357
|
+
D(this, "calendarContentHeight");
|
|
2266
2358
|
// Store calendar height for rolling selector
|
|
2267
|
-
|
|
2359
|
+
D(this, "calendarContentWidth");
|
|
2360
|
+
// Store calendar width for rolling selector
|
|
2361
|
+
D(this, "isCalendarActive", !1);
|
|
2268
2362
|
// Track if this calendar is actively focused (for inline mode)
|
|
2269
2363
|
// Async validation state
|
|
2270
|
-
|
|
2271
|
-
|
|
2364
|
+
D(this, "isValidating", !1);
|
|
2365
|
+
D(this, "loadingOverlay");
|
|
2272
2366
|
// Floating UI tooltips
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2367
|
+
D(this, "tooltip");
|
|
2368
|
+
D(this, "tooltipArrow");
|
|
2369
|
+
D(this, "currentTooltipTarget");
|
|
2276
2370
|
// Week start and date restrictions
|
|
2277
|
-
|
|
2371
|
+
D(this, "weekStartDay", 0);
|
|
2278
2372
|
// 0 = Sunday, 1 = Monday, etc.
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2373
|
+
D(this, "normalizedMinDate", null);
|
|
2374
|
+
D(this, "normalizedMaxDate", null);
|
|
2375
|
+
D(this, "normalizedDisabledDates", /* @__PURE__ */ new Set());
|
|
2282
2376
|
// Store as 'YYYY-MM-DD' strings
|
|
2283
|
-
|
|
2377
|
+
D(this, "normalizedSpecialDates", /* @__PURE__ */ new Map());
|
|
2284
2378
|
// Store as 'YYYY-MM-DD' -> DecoratedDate
|
|
2285
2379
|
// Internationalization
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2380
|
+
D(this, "locale", "en");
|
|
2381
|
+
D(this, "localeStrings");
|
|
2382
|
+
D(this, "weekdayNames", []);
|
|
2383
|
+
D(this, "monthNames", []);
|
|
2290
2384
|
this.input = t, this.containerElement = n.container || document.body, this.options = {
|
|
2291
2385
|
selectionMode: n.selectionMode || "single",
|
|
2292
2386
|
calendarPlacement: n.calendarPlacement || (n.monthLayout === "grid" ? "bottom" : "bottom-start"),
|
|
@@ -2302,6 +2396,7 @@ class ta {
|
|
|
2302
2396
|
weekStartDay: n.weekStartDay !== void 0 ? n.weekStartDay : "auto",
|
|
2303
2397
|
minDate: n.minDate,
|
|
2304
2398
|
maxDate: n.maxDate,
|
|
2399
|
+
initialDate: n.initialDate,
|
|
2305
2400
|
disabledDates: n.disabledDates,
|
|
2306
2401
|
disabledWeekdays: n.disabledWeekdays,
|
|
2307
2402
|
specialDates: n.specialDates,
|
|
@@ -2314,12 +2409,23 @@ class ta {
|
|
|
2314
2409
|
customStrings: n.customStrings,
|
|
2315
2410
|
formatSummaryCallback: n.formatSummaryCallback,
|
|
2316
2411
|
validateRangeCallback: n.validateRangeCallback,
|
|
2317
|
-
showDebugInfo: n.showDebugInfo || !1
|
|
2318
|
-
|
|
2319
|
-
|
|
2412
|
+
showDebugInfo: n.showDebugInfo || !1,
|
|
2413
|
+
rollingYearRange: n.rollingYearRange,
|
|
2414
|
+
rollingMonthRange: n.rollingMonthRange,
|
|
2415
|
+
renderDay: n.renderDay,
|
|
2416
|
+
renderDayContent: n.renderDayContent
|
|
2417
|
+
}, Bt(this.options.showDebugInfo), this.weekStartDay = $t(this.options.weekStartDay), $.debug("Week starts on day:", this.weekStartDay), $.debug("disabledDatesHandling:", this.options.disabledDatesHandling), this.locale = Le(this.options.locale), this.localeStrings = na(this.locale, this.options.customStrings), this.weekdayNames = aa(this.locale), this.monthNames = ra(this.locale), $.debug("Locale:", this.locale, "Weekdays:", this.weekdayNames, "Months:", this.monthNames), this.initializeDateRestrictions(), this.formatInfo = this.parseFormat(this.options.dateFormatMask), $.debug("Format info:", this.formatInfo), this._previousInputValue = "", this.currentDate = /* @__PURE__ */ new Date();
|
|
2418
|
+
let a;
|
|
2419
|
+
if (this.options.initialDate)
|
|
2420
|
+
a = de(this.options.initialDate) || /* @__PURE__ */ new Date(), $.debug(`Using initialDate: ${a.toISOString()}`);
|
|
2421
|
+
else if (this.options.rollingYearRange || this.options.rollingMonthRange) {
|
|
2422
|
+
const r = this.options.rollingYearRange ? this.parseYearRange(this.options.rollingYearRange) : null, o = this.options.rollingMonthRange ? this.parseMonthRange(this.options.rollingMonthRange) : null, s = r ? r.min : (/* @__PURE__ */ new Date()).getFullYear(), i = o ? o.min - 1 : 0;
|
|
2423
|
+
a = new Date(s, i, 1), $.debug(`Using first allowed year/month as initial: ${a.toISOString()}`);
|
|
2424
|
+
} else this.normalizedMinDate && this.normalizedMinDate > /* @__PURE__ */ new Date() ? (a = new Date(this.normalizedMinDate), $.debug(`Using minDate as initial: ${a.toISOString()}`)) : this.normalizedMaxDate && this.normalizedMaxDate < /* @__PURE__ */ new Date() ? (a = new Date(this.normalizedMaxDate), $.debug(`Using maxDate as initial: ${a.toISOString()}`)) : (a = /* @__PURE__ */ new Date(), $.debug(`Using current date as initial: ${a.toISOString()}`));
|
|
2425
|
+
this.monthDates = [];
|
|
2320
2426
|
for (let r = 0; r < this.options.visibleMonthsCount; r++) {
|
|
2321
2427
|
const o = new Date(a.getFullYear(), a.getMonth() + r, 1);
|
|
2322
|
-
this.monthDates.push(o),
|
|
2428
|
+
this.monthDates.push(o), $.debug(`monthDates[${r}] = ${o.getFullYear()}-${o.getMonth() + 1}`);
|
|
2323
2429
|
}
|
|
2324
2430
|
if (this.options.selectionMode === "range") {
|
|
2325
2431
|
this.displayMonths = [];
|
|
@@ -2337,31 +2443,60 @@ class ta {
|
|
|
2337
2443
|
this.draggingType = null, this.isDragging = !1, this.dragStartDate = null, this.originalStartDate = null, this.originalEndDate = null, this.dragPreviewStart = null, this.dragPreviewEnd = null, this.autoScrollInterval = null, this.init();
|
|
2338
2444
|
}
|
|
2339
2445
|
init() {
|
|
2340
|
-
|
|
2446
|
+
$.debug("Init called"), this.createCalendar(), this.input && (this.attachInputListeners(), this.input.value && ($.debug("Parsing pre-filled value:", this.input.value), this.updateCalendarFromInput())), this.options.positioningMode === "inline" && (this.renderCalendar(), this.calendar.classList.add("drp-date-picker--visible", "drp-date-picker--inline"), this.isCalendarActive = !0, this.isFirstRender = !1), $.debug("Init complete");
|
|
2341
2447
|
}
|
|
2342
2448
|
/**
|
|
2343
2449
|
* Initialize and normalize date restrictions
|
|
2344
2450
|
*/
|
|
2345
2451
|
initializeDateRestrictions() {
|
|
2346
|
-
this.options.minDate && (this.normalizedMinDate =
|
|
2347
|
-
const n =
|
|
2452
|
+
this.options.minDate && (this.normalizedMinDate = de(this.options.minDate)), this.options.maxDate && (this.normalizedMaxDate = de(this.options.maxDate)), this.options.disabledDates && this.options.disabledDates.length > 0 && this.options.disabledDates.forEach((t) => {
|
|
2453
|
+
const n = de(t);
|
|
2348
2454
|
if (n) {
|
|
2349
2455
|
const a = ve(n);
|
|
2350
2456
|
this.normalizedDisabledDates.add(a);
|
|
2351
2457
|
}
|
|
2352
2458
|
}), this.options.specialDates && this.options.specialDates.length > 0 && this.options.specialDates.forEach((t) => {
|
|
2353
|
-
const n =
|
|
2459
|
+
const n = de(t.date);
|
|
2354
2460
|
if (n) {
|
|
2355
2461
|
const a = ve(n);
|
|
2356
2462
|
this.normalizedSpecialDates.set(a, t);
|
|
2357
2463
|
}
|
|
2358
2464
|
});
|
|
2359
2465
|
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Parse year range string to min/max values
|
|
2468
|
+
*/
|
|
2469
|
+
parseYearRange(t) {
|
|
2470
|
+
if (t.includes("-")) {
|
|
2471
|
+
const [n, a] = t.split("-");
|
|
2472
|
+
return { min: parseInt(n, 10), max: parseInt(a, 10) };
|
|
2473
|
+
} else {
|
|
2474
|
+
const n = parseInt(t, 10);
|
|
2475
|
+
return { min: n, max: n };
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
/**
|
|
2479
|
+
* Parse month range string to min/max values
|
|
2480
|
+
*/
|
|
2481
|
+
parseMonthRange(t) {
|
|
2482
|
+
const [n, a] = t.split("-");
|
|
2483
|
+
return { min: parseInt(n, 10), max: parseInt(a, 10) };
|
|
2484
|
+
}
|
|
2360
2485
|
/**
|
|
2361
2486
|
* Check if a date should be disabled
|
|
2362
2487
|
*/
|
|
2363
2488
|
isDateDisabledInternal(t) {
|
|
2364
|
-
|
|
2489
|
+
if (this.options.rollingYearRange) {
|
|
2490
|
+
const n = this.parseYearRange(this.options.rollingYearRange), a = t.getFullYear();
|
|
2491
|
+
if (a < n.min || a > n.max)
|
|
2492
|
+
return !0;
|
|
2493
|
+
}
|
|
2494
|
+
if (this.options.rollingMonthRange) {
|
|
2495
|
+
const n = this.parseMonthRange(this.options.rollingMonthRange), a = t.getMonth() + 1;
|
|
2496
|
+
if (a < n.min || a > n.max)
|
|
2497
|
+
return !0;
|
|
2498
|
+
}
|
|
2499
|
+
return Pt(
|
|
2365
2500
|
t,
|
|
2366
2501
|
this.normalizedMinDate,
|
|
2367
2502
|
this.normalizedMaxDate,
|
|
@@ -2398,43 +2533,43 @@ class ta {
|
|
|
2398
2533
|
* Check if there are any disabled dates in a range
|
|
2399
2534
|
*/
|
|
2400
2535
|
hasDisabledDatesInRange(t, n) {
|
|
2401
|
-
return
|
|
2536
|
+
return Tt(t, n, (a) => this.isDateDisabledInternal(a));
|
|
2402
2537
|
}
|
|
2403
2538
|
/**
|
|
2404
2539
|
* Get all enabled dates in a range
|
|
2405
2540
|
*/
|
|
2406
2541
|
getEnabledDatesInRange(t, n) {
|
|
2407
|
-
return
|
|
2542
|
+
return zt(t, n, (a) => this.isDateDisabledInternal(a));
|
|
2408
2543
|
}
|
|
2409
2544
|
/**
|
|
2410
2545
|
* Get all disabled dates in a range
|
|
2411
2546
|
*/
|
|
2412
2547
|
getDisabledDatesInRange(t, n) {
|
|
2413
|
-
return
|
|
2548
|
+
return Ft(t, n, (a) => this.isDateDisabledInternal(a));
|
|
2414
2549
|
}
|
|
2415
2550
|
/**
|
|
2416
2551
|
* For 'block' mode: Find the last enabled date before hitting a disabled date
|
|
2417
2552
|
*/
|
|
2418
2553
|
findLastEnabledBeforeGap(t, n) {
|
|
2419
|
-
return
|
|
2554
|
+
return Nt(t, n, (a) => this.isDateDisabledInternal(a));
|
|
2420
2555
|
}
|
|
2421
2556
|
/**
|
|
2422
2557
|
* For 'split' mode: Split a range into multiple ranges separated by disabled dates
|
|
2423
2558
|
*/
|
|
2424
2559
|
splitRangeByDisabled(t, n) {
|
|
2425
|
-
return
|
|
2560
|
+
return Ot(t, n, (a) => this.isDateDisabledInternal(a));
|
|
2426
2561
|
}
|
|
2427
2562
|
isToday(t) {
|
|
2428
|
-
return
|
|
2563
|
+
return Ht(t);
|
|
2429
2564
|
}
|
|
2430
2565
|
isSameDay(t, n) {
|
|
2431
2566
|
return Je(t, n);
|
|
2432
2567
|
}
|
|
2433
2568
|
isInRange(t) {
|
|
2434
|
-
return
|
|
2569
|
+
return Yt(t, this.selectedStartDate, this.selectedEndDate);
|
|
2435
2570
|
}
|
|
2436
2571
|
createCalendar() {
|
|
2437
|
-
|
|
2572
|
+
$.debug("Creating calendar"), this.calendar = document.createElement("div"), this.calendar.className = "drp-date-picker";
|
|
2438
2573
|
const t = document.createElement("div");
|
|
2439
2574
|
this.options.monthLayout === "grid" ? (t.className = "drp-date-picker__months drp-date-picker__months--grid", this.options.gridRows && t.style.setProperty("--drp-grid-rows", String(this.options.gridRows)), this.options.gridColumns && t.style.setProperty("--drp-grid-columns", String(this.options.gridColumns))) : t.className = "drp-date-picker__months drp-date-picker__months--horizontal";
|
|
2440
2575
|
for (let a = 0; a < this.options.visibleMonthsCount; a++) {
|
|
@@ -2462,14 +2597,17 @@ class ta {
|
|
|
2462
2597
|
<button class="drp-date-picker__button drp-date-picker__button--today" data-action="today">${this.localeStrings.today}</button>
|
|
2463
2598
|
<button class="drp-date-picker__button drp-date-picker__button--clear" data-action="clear">${this.localeStrings.clear}</button>
|
|
2464
2599
|
${this.options.selectionMode === "range" ? `<button class="drp-date-picker__button drp-date-picker__button--apply" data-action="apply">${this.localeStrings.apply}</button>` : ""}
|
|
2465
|
-
`, this.calendar.appendChild(n), this.containerElement.appendChild(this.calendar),
|
|
2600
|
+
`, this.calendar.appendChild(n), this.containerElement.appendChild(this.calendar), $.debug("Calendar appended to container:", this.calendar), this.tooltip = document.createElement("div"), this.tooltip.className = "drp-date-picker__tooltip", this.tooltipArrow = document.createElement("div"), this.tooltipArrow.className = "drp-date-picker__tooltip-arrow", this.tooltip.appendChild(this.tooltipArrow), this.containerElement.appendChild(this.tooltip), this.attachCalendarListeners(), this.showingRollingSelector = new Array(this.options.visibleMonthsCount).fill(!1);
|
|
2466
2601
|
}
|
|
2467
2602
|
attachInputListeners() {
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2603
|
+
if (!this.input) return;
|
|
2604
|
+
$.debug("Attaching input listeners");
|
|
2605
|
+
const t = this.options.calendarOpenTrigger || "focus";
|
|
2606
|
+
t === "focus" ? this.input.addEventListener("focus", () => {
|
|
2607
|
+
$.debug("Input focused - opening calendar"), this.show();
|
|
2608
|
+
}) : t === "typing" && this.input.addEventListener("input", (n) => {
|
|
2609
|
+
!this.isVisible && this.input && this.input.value.length > 0 && ($.debug("User started typing - opening calendar"), this.show());
|
|
2610
|
+
}), this.input.addEventListener("input", (n) => this.handleInputMask(n)), this.input.addEventListener("keydown", (n) => this.handleKeydown(n)), this.input.addEventListener("paste", (n) => this.handlePaste(n));
|
|
2473
2611
|
}
|
|
2474
2612
|
attachCalendarListeners() {
|
|
2475
2613
|
this.calendar.addEventListener("click", async (t) => {
|
|
@@ -2485,10 +2623,16 @@ class ta {
|
|
|
2485
2623
|
else if (n.closest(".drp-date-picker__day:not(.drp-date-picker__day--disabled)"))
|
|
2486
2624
|
await this.selectDay(n.closest(".drp-date-picker__day"));
|
|
2487
2625
|
else if (n.closest("[data-year]")) {
|
|
2488
|
-
const s = n.closest("[data-year]")
|
|
2626
|
+
const s = n.closest("[data-year]");
|
|
2627
|
+
if (s.classList.contains("drp-date-picker__rolling-item--disabled"))
|
|
2628
|
+
return;
|
|
2629
|
+
const i = s.dataset.year, d = s.dataset.monthIndex;
|
|
2489
2630
|
i && d && this.selectYear(parseInt(i), parseInt(d));
|
|
2490
2631
|
} else if (n.closest("[data-month]")) {
|
|
2491
|
-
const s = n.closest("[data-month]")
|
|
2632
|
+
const s = n.closest("[data-month]");
|
|
2633
|
+
if (s.classList.contains("drp-date-picker__rolling-item--disabled"))
|
|
2634
|
+
return;
|
|
2635
|
+
const i = s.dataset.month, d = s.dataset.monthIndex;
|
|
2492
2636
|
i && d && this.selectMonth(parseInt(i), parseInt(d));
|
|
2493
2637
|
}
|
|
2494
2638
|
}), this.calendar.addEventListener("mouseenter", (t) => {
|
|
@@ -2509,7 +2653,7 @@ class ta {
|
|
|
2509
2653
|
}, !0), document.addEventListener("keydown", (t) => {
|
|
2510
2654
|
var n, a, r, o;
|
|
2511
2655
|
if (this.calendar.classList.contains("drp-date-picker--visible") && this.isCalendarActive) {
|
|
2512
|
-
if (
|
|
2656
|
+
if ($.debug("Keydown", t.key, "Ctrl:", t.ctrlKey, "Meta:", t.metaKey, "Shift:", t.shiftKey, "Alt:", t.altKey), t.key === "Escape")
|
|
2513
2657
|
this.hide(), t.preventDefault();
|
|
2514
2658
|
else if (t.key === "ArrowUp")
|
|
2515
2659
|
this.moveFocus(-7), t.preventDefault();
|
|
@@ -2517,7 +2661,7 @@ class ta {
|
|
|
2517
2661
|
this.moveFocus(7), t.preventDefault();
|
|
2518
2662
|
else if (t.key === "ArrowLeft") {
|
|
2519
2663
|
if (t.ctrlKey || t.metaKey) {
|
|
2520
|
-
|
|
2664
|
+
C.debug("Ctrl+Left: Navigate to previous month");
|
|
2521
2665
|
const s = this.focusedDayIndex;
|
|
2522
2666
|
this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
2523
2667
|
var l, c;
|
|
@@ -2529,7 +2673,7 @@ class ta {
|
|
|
2529
2673
|
t.preventDefault();
|
|
2530
2674
|
} else if (t.key === "ArrowRight") {
|
|
2531
2675
|
if (t.ctrlKey || t.metaKey) {
|
|
2532
|
-
|
|
2676
|
+
C.debug("Ctrl+Right: Navigate to next month");
|
|
2533
2677
|
const s = this.focusedDayIndex;
|
|
2534
2678
|
this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
2535
2679
|
var l, c;
|
|
@@ -2550,13 +2694,13 @@ class ta {
|
|
|
2550
2694
|
if (this.options.visibleMonthsCount > 1) {
|
|
2551
2695
|
const s = t.shiftKey ? -1 : 1, i = this.activeMonthIndex + s;
|
|
2552
2696
|
if (i >= 0 && i < this.monthDates.length) {
|
|
2553
|
-
|
|
2697
|
+
C.debug(`Tab: switching from Col${this.activeMonthIndex} to Col${i}`);
|
|
2554
2698
|
const d = this.focusedDayIndex ?? 0;
|
|
2555
2699
|
this.activeMonthIndex = i;
|
|
2556
2700
|
const l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`);
|
|
2557
2701
|
if (l) {
|
|
2558
2702
|
const c = l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2559
|
-
this.focusedDayIndex = Math.min(d, c.length - 1),
|
|
2703
|
+
this.focusedDayIndex = Math.min(d, c.length - 1), C.debug(`Col${this.activeMonthIndex} Tab: set focusedDayIndex to ${this.focusedDayIndex}`);
|
|
2560
2704
|
}
|
|
2561
2705
|
this.renderCalendar();
|
|
2562
2706
|
}
|
|
@@ -2585,18 +2729,18 @@ class ta {
|
|
|
2585
2729
|
d && (this.focusedDayIndex = Math.min(s !== null ? s : 0, d.length - 1), (l = d[this.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"), (c = d[this.focusedDayIndex]) == null || c.scrollIntoView({ block: "nearest" }));
|
|
2586
2730
|
}, 0), t.preventDefault();
|
|
2587
2731
|
} else if (t.key === "Home") {
|
|
2588
|
-
|
|
2732
|
+
C.debug("Home key pressed, Ctrl:", t.ctrlKey, "Meta:", t.metaKey);
|
|
2589
2733
|
const s = this.monthDates[this.activeMonthIndex].getFullYear(), i = this.monthDates[this.activeMonthIndex].getMonth();
|
|
2590
2734
|
if (t.ctrlKey || t.metaKey) {
|
|
2591
|
-
|
|
2735
|
+
C.debug("Ctrl+Home: Navigate to year start");
|
|
2592
2736
|
const d = i === 0, l = this.focusedDayIndex === 0;
|
|
2593
|
-
d && l ? (
|
|
2737
|
+
d && l ? (C.debug("Already at Jan 1, going to previous year"), this.monthDates[this.activeMonthIndex] = new Date(s - 1, 0, 1)) : (C.debug("Going to Jan 1 of current year"), this.monthDates[this.activeMonthIndex] = new Date(s, 0, 1)), this.renderCalendar(), setTimeout(() => {
|
|
2594
2738
|
var p, g;
|
|
2595
2739
|
const c = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), u = c == null ? void 0 : c.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2596
2740
|
u && (this.focusedDayIndex = 0, (p = u[0]) == null || p.classList.add("drp-date-picker__day--focused"), (g = u[0]) == null || g.scrollIntoView({ block: "nearest" }));
|
|
2597
2741
|
}, 0);
|
|
2598
|
-
} else if (
|
|
2599
|
-
|
|
2742
|
+
} else if (C.debug("Home: Navigate to first day (cycles to previous month if already there)"), this.focusedDayIndex === 0)
|
|
2743
|
+
C.debug("Already on first day, going to previous month"), this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
2600
2744
|
var u, p;
|
|
2601
2745
|
const l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), c = l == null ? void 0 : l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2602
2746
|
c && (this.focusedDayIndex = 0, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((g) => g.classList.remove("drp-date-picker__day--focused")), (u = c[0]) == null || u.classList.add("drp-date-picker__day--focused"), (p = c[0]) == null || p.scrollIntoView({ block: "nearest" }));
|
|
@@ -2608,10 +2752,10 @@ class ta {
|
|
|
2608
2752
|
}
|
|
2609
2753
|
t.preventDefault();
|
|
2610
2754
|
} else if (t.key === "End") {
|
|
2611
|
-
|
|
2755
|
+
C.debug("End key pressed, Ctrl:", t.ctrlKey, "Meta:", t.metaKey);
|
|
2612
2756
|
const s = this.monthDates[this.activeMonthIndex].getFullYear(), i = this.monthDates[this.activeMonthIndex].getMonth();
|
|
2613
2757
|
if (t.ctrlKey || t.metaKey) {
|
|
2614
|
-
|
|
2758
|
+
C.debug("Ctrl+End: Navigate to year end");
|
|
2615
2759
|
const d = i === 11, l = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), c = l == null ? void 0 : l.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), u = c && this.focusedDayIndex === c.length - 1;
|
|
2616
2760
|
d && u ? this.monthDates[this.activeMonthIndex] = new Date(s + 1, 11, 31) : this.monthDates[this.activeMonthIndex] = new Date(s, 11, 31), this.renderCalendar(), setTimeout(() => {
|
|
2617
2761
|
var h, f;
|
|
@@ -2619,10 +2763,10 @@ class ta {
|
|
|
2619
2763
|
g && (this.focusedDayIndex = g.length - 1, (h = g[this.focusedDayIndex]) == null || h.classList.add("drp-date-picker__day--focused"), (f = g[this.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
2620
2764
|
}, 0);
|
|
2621
2765
|
} else {
|
|
2622
|
-
|
|
2766
|
+
C.debug("End: Navigate to last day (cycles to next month if already there)");
|
|
2623
2767
|
const d = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), l = d == null ? void 0 : d.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2624
2768
|
if (!l) return;
|
|
2625
|
-
this.focusedDayIndex === l.length - 1 ? (
|
|
2769
|
+
this.focusedDayIndex === l.length - 1 ? (C.debug("Already on last day, going to next month"), this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
2626
2770
|
var g, h;
|
|
2627
2771
|
const u = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), p = u == null ? void 0 : u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2628
2772
|
p && (this.focusedDayIndex = p.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((f) => f.classList.remove("drp-date-picker__day--focused")), (g = p[this.focusedDayIndex]) == null || g.classList.add("drp-date-picker__day--focused"), (h = p[this.focusedDayIndex]) == null || h.scrollIntoView({ block: "nearest" }));
|
|
@@ -2662,26 +2806,26 @@ class ta {
|
|
|
2662
2806
|
}
|
|
2663
2807
|
// UI methods - wrappers for pure functions
|
|
2664
2808
|
show() {
|
|
2665
|
-
return
|
|
2809
|
+
return bt(this);
|
|
2666
2810
|
}
|
|
2667
2811
|
hide() {
|
|
2668
|
-
return
|
|
2812
|
+
return _t(this);
|
|
2669
2813
|
}
|
|
2670
2814
|
toggle() {
|
|
2671
|
-
return
|
|
2815
|
+
return Bn(this);
|
|
2672
2816
|
}
|
|
2673
2817
|
position() {
|
|
2674
|
-
return
|
|
2818
|
+
return wt(this);
|
|
2675
2819
|
}
|
|
2676
2820
|
showTooltip(t, n) {
|
|
2677
|
-
return
|
|
2821
|
+
return Wn(this, t, n);
|
|
2678
2822
|
}
|
|
2679
2823
|
hideTooltip() {
|
|
2680
|
-
return
|
|
2824
|
+
return jn(this);
|
|
2681
2825
|
}
|
|
2682
2826
|
// Rendering methods - wrappers for pure functions
|
|
2683
2827
|
renderCalendar() {
|
|
2684
|
-
return
|
|
2828
|
+
return Jt(this);
|
|
2685
2829
|
}
|
|
2686
2830
|
renderNormalView(t) {
|
|
2687
2831
|
return nt(this, t);
|
|
@@ -2693,70 +2837,70 @@ class ta {
|
|
|
2693
2837
|
return rt(this, t);
|
|
2694
2838
|
}
|
|
2695
2839
|
updateSummary() {
|
|
2696
|
-
return
|
|
2840
|
+
return Zt(this);
|
|
2697
2841
|
}
|
|
2698
2842
|
updateSummaryWithPreview() {
|
|
2699
2843
|
return st(this);
|
|
2700
2844
|
}
|
|
2701
2845
|
updateDragPreview() {
|
|
2702
|
-
return
|
|
2846
|
+
return en(this);
|
|
2703
2847
|
}
|
|
2704
2848
|
// Navigation methods - wrappers for pure functions
|
|
2705
2849
|
toggleRollingSelector(t) {
|
|
2706
|
-
return
|
|
2850
|
+
return Wt(this, t);
|
|
2707
2851
|
}
|
|
2708
2852
|
selectYear(t, n) {
|
|
2709
2853
|
return jt(this, t, n);
|
|
2710
2854
|
}
|
|
2711
2855
|
selectMonth(t, n) {
|
|
2712
|
-
return
|
|
2856
|
+
return Kt(this, t, n);
|
|
2713
2857
|
}
|
|
2714
2858
|
checkAndResolveCollisions(t) {
|
|
2715
|
-
return
|
|
2859
|
+
return ue(this, t);
|
|
2716
2860
|
}
|
|
2717
2861
|
prevMonth(t) {
|
|
2718
|
-
return
|
|
2862
|
+
return ce(this, t);
|
|
2719
2863
|
}
|
|
2720
2864
|
nextMonth(t) {
|
|
2721
|
-
return
|
|
2865
|
+
return pe(this, t);
|
|
2722
2866
|
}
|
|
2723
2867
|
findNextEnabledDayIndex(t, n, a, r) {
|
|
2724
|
-
return
|
|
2868
|
+
return le(this, t, n, a);
|
|
2725
2869
|
}
|
|
2726
2870
|
moveFocus(t) {
|
|
2727
|
-
return
|
|
2871
|
+
return Ut(this, t);
|
|
2728
2872
|
}
|
|
2729
2873
|
// Selection methods - wrappers for pure functions
|
|
2730
2874
|
async selectDay(t) {
|
|
2731
|
-
return await
|
|
2875
|
+
return await Un(this, t);
|
|
2732
2876
|
}
|
|
2733
2877
|
selectToday() {
|
|
2734
|
-
return
|
|
2878
|
+
return Xn(this);
|
|
2735
2879
|
}
|
|
2736
2880
|
clearSelection() {
|
|
2737
|
-
return
|
|
2881
|
+
return Gn(this);
|
|
2738
2882
|
}
|
|
2739
2883
|
apply() {
|
|
2740
|
-
return
|
|
2884
|
+
return Jn(this);
|
|
2741
2885
|
}
|
|
2742
2886
|
// Interaction methods - wrappers for pure functions
|
|
2743
2887
|
initDragListeners() {
|
|
2744
|
-
return
|
|
2888
|
+
return Qn(this);
|
|
2745
2889
|
}
|
|
2746
2890
|
startDrag(t, n) {
|
|
2747
2891
|
return St(this, t, n);
|
|
2748
2892
|
}
|
|
2749
2893
|
onDragMove(t) {
|
|
2750
|
-
return
|
|
2894
|
+
return Mt(this, t);
|
|
2751
2895
|
}
|
|
2752
2896
|
async onDragEnd(t) {
|
|
2753
|
-
return await
|
|
2897
|
+
return await It(this);
|
|
2754
2898
|
}
|
|
2755
2899
|
findNearestEnabledDate(t, n = "forward") {
|
|
2756
2900
|
return Se(this, t, n);
|
|
2757
2901
|
}
|
|
2758
2902
|
handleInputMask(t) {
|
|
2759
|
-
return
|
|
2903
|
+
return Zn(this, t);
|
|
2760
2904
|
}
|
|
2761
2905
|
applyMask(t) {
|
|
2762
2906
|
return oe(this, t);
|
|
@@ -2765,30 +2909,32 @@ class ta {
|
|
|
2765
2909
|
return Et(this, t);
|
|
2766
2910
|
}
|
|
2767
2911
|
handleKeydown(t) {
|
|
2768
|
-
return
|
|
2912
|
+
return ea(this, t);
|
|
2769
2913
|
}
|
|
2770
2914
|
handlePaste(t) {
|
|
2771
|
-
return
|
|
2915
|
+
return ta(this, t);
|
|
2772
2916
|
}
|
|
2773
2917
|
updateCalendarFromInput() {
|
|
2774
2918
|
return Ve(this);
|
|
2775
2919
|
}
|
|
2776
2920
|
parseAndUpdateSingleDate(t, n = "single") {
|
|
2777
|
-
return
|
|
2921
|
+
return De(this, t, n);
|
|
2778
2922
|
}
|
|
2779
2923
|
}
|
|
2780
|
-
const na = '@charset "UTF-8";:host{--drp-card-bg: #ffffff;--drp-border-color: #e5e7eb;--drp-primary-bg: #f3f4f6;--drp-primary-bg-hover: #e5e7eb;--drp-accent-color: #3b82f6;--drp-accent-color-hover: #2563eb;--drp-text-primary: #111827;--drp-text-secondary: #6b7280;--drp-accent-text-color: #ffffff;--drp-button-text-color: #ffffff;--drp-spacing-xs: .25rem;--drp-spacing-sm: .5rem;--drp-spacing-md: 1rem;--drp-spacing-lg: 1.5rem;--drp-spacing-xl: 2rem;--drp-font-size-2xs: .625rem;--drp-font-size-xs: .75rem;--drp-font-size-sm: .875rem;--drp-font-size-base: 1rem;--drp-font-size-lg: 1.125rem;--drp-font-size-xl: 1.25rem;--drp-font-size-2xl: 1.5rem;--drp-font-weight-medium: 500;--drp-font-weight-semibold: 600;--drp-border-width-base: 1px;--drp-border-radius: .375rem;--drp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);--drp-transition-fast: .15s;--drp-easing-snappy: cubic-bezier(.4, 0, .2, 1);--drp-input-padding-h: .75rem;--drp-grid-columns: 3;--drp-grid-rows: 2}.drp-date-picker-input{position:relative;cursor:pointer}.drp-date-picker-input:after{content:"📅";position:absolute;right:var(--drp-input-padding-h);top:50%;transform:translateY(-50%);pointer-events:none;opacity:.6}.drp-date-picker{position:absolute;z-index:9500;background:var(--drp-card-bg);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);box-shadow:var(--drp-shadow-xl);padding:var(--drp-spacing-md);min-width:280px;max-width:calc(100vw - 2rem);box-sizing:border-box;-webkit-user-select:none;user-select:none}.drp-date-picker:not(.drp-date-picker--visible){display:none}.drp-date-picker--inline{position:relative!important;display:block!important;z-index:auto;min-width:0;max-width:100%;width:fit-content;box-sizing:border-box}.drp-date-picker__months{display:flex;gap:var(--drp-spacing-lg)}.drp-date-picker--inline .drp-date-picker__months{flex-wrap:wrap}.drp-date-picker__months--grid{display:grid;grid-template-columns:repeat(var(--drp-grid-columns, 3),minmax(0,1fr));grid-template-rows:repeat(var(--drp-grid-rows, 2),auto);gap:var(--drp-spacing-lg);width:100%}@media (max-width: 1200px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),3),minmax(0,1fr))}}@media (max-width: 768px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),2),minmax(0,1fr))}}@media (max-width: 480px){.drp-date-picker__months--grid{grid-template-columns:minmax(0,1fr)}}.drp-date-picker__month{flex:1;min-width:280px}.drp-date-picker--inline .drp-date-picker__month{min-width:250px}.drp-date-picker__months--grid .drp-date-picker__month{min-width:0;width:100%}.drp-date-picker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-md);gap:var(--drp-spacing-sm)}.drp-date-picker__month-year{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-base);color:var(--drp-text-primary);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer;transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__month-year:hover{background-color:var(--drp-primary-bg)}.drp-date-picker__month-year:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__nav{width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;transition:all var(--drp-transition-fast) var(--drp-easing-snappy);font-size:var(--drp-font-size-lg);color:var(--drp-text-primary)}.drp-date-picker__nav:hover{background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__nav:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__nav--disabled,.drp-date-picker__nav[disabled]{opacity:.6;cursor:not-allowed;pointer-events:none}.drp-date-picker__nav--disabled:hover,.drp-date-picker__nav[disabled]:hover{background-color:transparent;border-color:var(--drp-border-color)}.drp-date-picker__nav--prev:before{content:"‹"}.drp-date-picker__nav--next:before{content:"›"}.drp-date-picker__rolling-selector{display:none}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible{display:flex}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__weekdays,.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__days{display:none}.drp-date-picker__rolling-selector{gap:var(--drp-spacing-md);margin-bottom:var(--drp-spacing-md)}.drp-date-picker__rolling-list{flex:1;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);scroll-behavior:smooth}.drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-primary-bg)}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-border-color);border-radius:3px}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-accent-color)}.drp-date-picker__rolling-item{padding:var(--drp-spacing-sm) var(--drp-spacing-md);text-align:center;cursor:pointer;font-size:var(--drp-font-size-sm);transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__rolling-item:hover{background-color:var(--drp-primary-bg)}.drp-date-picker__rolling-item--selected{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-sm)}.drp-date-picker__weekday{text-align:center;font-size:var(--drp-font-size-xs);font-weight:var(--drp-font-weight-semibold);color:var(--drp-text-secondary);padding:var(--drp-spacing-xs);text-transform:uppercase}.drp-date-picker__days{display:flex;flex-direction:column;gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-md)}.drp-date-picker__date-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs)}.drp-date-picker__day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-sm);color:var(--drp-text-primary);border-radius:var(--drp-border-radius);cursor:pointer;transition:all var(--drp-transition-fast) var(--drp-easing-snappy);border:2px solid transparent;position:relative}.drp-date-picker__day:hover:not(.drp-date-picker__day--disabled):not(.drp-date-picker__day--other-month){background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__day--today{border-color:var(--drp-accent-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__day--focused{outline:2px solid var(--drp-accent-color);outline-offset:2px}.drp-date-picker__day--disabled{color:var(--drp-text-secondary);opacity:.6;cursor:not-allowed;position:relative}.drp-date-picker__day--disabled:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.1) 0px,rgba(0,0,0,.1) 1px,transparent 1px,transparent 6px);border-radius:var(--drp-border-radius);pointer-events:none}.drp-date-picker__day--disabled:hover{background-color:transparent;border-color:transparent}.drp-date-picker__day--other-month{color:var(--drp-text-secondary);opacity:.5}.drp-date-picker__day--other-month.drp-date-picker__day--range-start,.drp-date-picker__day--other-month.drp-date-picker__day--range-end,.drp-date-picker__day--other-month.drp-date-picker__day--in-range,.drp-date-picker__day--other-month.drp-date-picker__day--drag-preview{opacity:1}.drp-date-picker__day--range-start,.drp-date-picker__day--range-end{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold);cursor:grab;-webkit-user-select:none;user-select:none}.drp-date-picker__day--range-start:active,.drp-date-picker__day--range-end:active{cursor:grabbing}.drp-date-picker__day--in-range{background-color:color-mix(in srgb,var(--drp-accent-color) 15%,transparent)}.drp-date-picker__day--in-range:hover{background-color:color-mix(in srgb,var(--drp-accent-color) 25%,transparent)}.drp-date-picker__day--dragging{cursor:grabbing!important;opacity:.7;transform:scale(1.1);transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__day--drag-preview{background-color:color-mix(in srgb,var(--drp-accent-color) 30%,transparent);border:2px dashed var(--drp-accent-color)}.drp-date-picker__day--drag-preview.drp-date-picker__day--range-start,.drp-date-picker__day--drag-preview.drp-date-picker__day--range-end{background-color:color-mix(in srgb,var(--drp-accent-color) 60%,transparent);color:var(--drp-accent-text-color)}.drp-date-picker__day--drag-invalid{background-color:color-mix(in srgb,#ef4444 20%,transparent)!important;border-color:#ef4444!important;border-style:dashed!important}.drp-date-picker__day.holiday{background-color:color-mix(in srgb,#ef4444 10%,transparent)}.drp-date-picker__day.holiday:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#ef4444 20%,transparent)}.drp-date-picker__day.event{background-color:color-mix(in srgb,#10b981 10%,transparent)}.drp-date-picker__day.event:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#10b981 20%,transparent)}.drp-date-picker__badge-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-xs);max-height:1rem;min-height:1rem}.drp-date-picker__badge-cell{display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-2xs);padding:1px 2px;border-radius:2px;transition:all var(--drp-transition-fast) var(--drp-easing-snappy);cursor:pointer;height:100%;max-height:1rem}.drp-date-picker__badge-cell:empty{visibility:hidden}.drp-date-picker__badge-cell:hover:not(:empty){transform:scale(1.05)}.drp-date-picker__badge-cell.badge-number{background-color:#10b981;color:#fff;font-size:.7rem;font-weight:600}.drp-date-picker__badge-cell.badge-count{background-color:#ef4444;color:#fff;font-size:.7rem;font-weight:700}.drp-date-picker__badge-cell.badge-text{background-color:#6b7280;color:#fff;font-size:.65rem;font-weight:700;text-transform:uppercase}.drp-date-picker__summary{text-align:center;padding:var(--drp-spacing-md);border-top:var(--drp-border-width-base) solid var(--drp-border-color);font-size:var(--drp-font-size-sm);color:var(--drp-text-secondary)}.drp-date-picker__summary--visible{display:block}.drp-date-picker__summary--hidden{display:none}.drp-date-picker__summary-count{font-weight:var(--drp-font-weight-semibold);color:var(--drp-accent-color);font-size:var(--drp-font-size-base)}.drp-date-picker__actions{display:flex;gap:var(--drp-spacing-sm);justify-content:space-between;padding-top:var(--drp-spacing-sm);border-top:var(--drp-border-width-base) solid var(--drp-border-color)}.drp-date-picker__button{flex:1;padding:var(--drp-spacing-sm) var(--drp-spacing-md);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-sm);font-weight:var(--drp-font-weight-medium);transition:all var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__button:hover{background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__button--today{color:var(--drp-accent-color)}.drp-date-picker__button--clear{color:var(--drp-text-secondary)}.drp-date-picker__button--apply{background-color:var(--drp-accent-color);color:var(--drp-button-text-color);border-color:var(--drp-accent-color)}.drp-date-picker__button--apply:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__button--cancel{color:var(--drp-text-secondary)}.drp-date-picker__tooltip{position:absolute;z-index:9999;background-color:var(--drp-text-primary);color:#fff;padding:var(--drp-spacing-xs) var(--drp-spacing-sm);border-radius:var(--drp-border-radius);font-size:var(--drp-font-size-xs);line-height:1.4;max-width:200px;word-wrap:break-word;pointer-events:none;opacity:0;transition:opacity var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__tooltip--visible{opacity:1}.drp-date-picker__tooltip-arrow{position:absolute;background-color:var(--drp-text-primary);width:8px;height:8px;transform:rotate(45deg)}.drp-date-picker__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fffc;display:flex;align-items:center;justify-content:center;z-index:9500;border-radius:.375rem}.drp-date-picker__loading-spinner{width:40px;height:40px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:drp-spin .8s linear infinite}@keyframes drp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drp-font-xs{--drp-font-size-2xs: .4375rem;--drp-font-size-xs: .525rem;--drp-font-size-sm: .6125rem;--drp-font-size-base: .7rem;--drp-font-size-lg: .7875rem;--drp-font-size-xl: .875rem;--drp-font-size-2xl: 1.05rem}.drp-font-sm{--drp-font-size-2xs: .53125rem;--drp-font-size-xs: .6375rem;--drp-font-size-sm: .74375rem;--drp-font-size-base: .85rem;--drp-font-size-lg: .95625rem;--drp-font-size-xl: 1.0625rem;--drp-font-size-2xl: 1.275rem}.drp-font-lg{--drp-font-size-2xs: .75rem;--drp-font-size-xs: .9rem;--drp-font-size-sm: 1.05rem;--drp-font-size-base: 1.2rem;--drp-font-size-lg: 1.35rem;--drp-font-size-xl: 1.5rem;--drp-font-size-2xl: 1.8rem}.drp-font-xl{--drp-font-size-2xs: .875rem;--drp-font-size-xs: 1.05rem;--drp-font-size-sm: 1.225rem;--drp-font-size-base: 1.4rem;--drp-font-size-lg: 1.575rem;--drp-font-size-xl: 1.75rem;--drp-font-size-2xl: 2.1rem}.drp-spacing-xs{--drp-spacing-xs: .175rem;--drp-spacing-sm: .35rem;--drp-spacing-md: .7rem;--drp-spacing-lg: 1.05rem;--drp-spacing-xl: 1.4rem}.drp-spacing-xs .drp-date-picker__month{min-width:196px}.drp-spacing-sm{--drp-spacing-xs: .2125rem;--drp-spacing-sm: .425rem;--drp-spacing-md: .85rem;--drp-spacing-lg: 1.275rem;--drp-spacing-xl: 1.7rem}.drp-spacing-sm .drp-date-picker__month{min-width:238px}.drp-spacing-lg{--drp-spacing-xs: .3rem;--drp-spacing-sm: .6rem;--drp-spacing-md: 1.2rem;--drp-spacing-lg: 1.8rem;--drp-spacing-xl: 2.4rem}.drp-spacing-lg .drp-date-picker__month{min-width:336px}.drp-spacing-xl{--drp-spacing-xs: .35rem;--drp-spacing-sm: .7rem;--drp-spacing-md: 1.4rem;--drp-spacing-lg: 2.1rem;--drp-spacing-xl: 2.8rem}.drp-spacing-xl .drp-date-picker__month{min-width:392px}@media (max-width: 1200px){.drp-responsive.drp-font-xl{--drp-font-size-2xs: .75rem;--drp-font-size-xs: .9rem;--drp-font-size-sm: 1.05rem;--drp-font-size-base: 1.2rem;--drp-font-size-lg: 1.35rem;--drp-font-size-xl: 1.5rem;--drp-font-size-2xl: 1.8rem}}@media (max-width: 768px){.drp-responsive.drp-font-xl{--drp-font-size-2xs: .625rem;--drp-font-size-xs: .75rem;--drp-font-size-sm: .875rem;--drp-font-size-base: 1rem;--drp-font-size-lg: 1.125rem;--drp-font-size-xl: 1.25rem;--drp-font-size-2xl: 1.5rem}}@media (max-width: 1200px){.drp-responsive.drp-font-lg{--drp-font-size-2xs: .625rem;--drp-font-size-xs: .75rem;--drp-font-size-sm: .875rem;--drp-font-size-base: 1rem;--drp-font-size-lg: 1.125rem;--drp-font-size-xl: 1.25rem;--drp-font-size-2xl: 1.5rem}}@media (max-width: 768px){.drp-responsive.drp-font-lg{--drp-font-size-2xs: .53125rem;--drp-font-size-xs: .6375rem;--drp-font-size-sm: .74375rem;--drp-font-size-base: .85rem;--drp-font-size-lg: .95625rem;--drp-font-size-xl: 1.0625rem;--drp-font-size-2xl: 1.275rem}}@media (max-width: 768px){.drp-responsive.drp-font-md{--drp-font-size-2xs: .53125rem;--drp-font-size-xs: .6375rem;--drp-font-size-sm: .74375rem;--drp-font-size-base: .85rem;--drp-font-size-lg: .95625rem;--drp-font-size-xl: 1.0625rem;--drp-font-size-2xl: 1.275rem}}@media (max-width: 768px){.drp-responsive.drp-font-sm{--drp-font-size-2xs: .4375rem;--drp-font-size-xs: .525rem;--drp-font-size-sm: .6125rem;--drp-font-size-base: .7rem;--drp-font-size-lg: .7875rem;--drp-font-size-xl: .875rem;--drp-font-size-2xl: 1.05rem}}@media (max-width: 1200px){.drp-responsive.drp-spacing-xl{--drp-spacing-xs: .3rem;--drp-spacing-sm: .6rem;--drp-spacing-md: 1.2rem;--drp-spacing-lg: 1.8rem;--drp-spacing-xl: 2.4rem}.drp-responsive.drp-spacing-xl .drp-date-picker__month{min-width:336px}}@media (max-width: 768px){.drp-responsive.drp-spacing-xl{--drp-spacing-xs: .25rem;--drp-spacing-sm: .5rem;--drp-spacing-md: 1rem;--drp-spacing-lg: 1.5rem;--drp-spacing-xl: 2rem}.drp-responsive.drp-spacing-xl .drp-date-picker__month{min-width:280px}}@media (max-width: 1200px){.drp-responsive.drp-spacing-lg{--drp-spacing-xs: .25rem;--drp-spacing-sm: .5rem;--drp-spacing-md: 1rem;--drp-spacing-lg: 1.5rem;--drp-spacing-xl: 2rem}.drp-responsive.drp-spacing-lg .drp-date-picker__month{min-width:280px}}@media (max-width: 768px){.drp-responsive.drp-spacing-lg{--drp-spacing-xs: .2125rem;--drp-spacing-sm: .425rem;--drp-spacing-md: .85rem;--drp-spacing-lg: 1.275rem;--drp-spacing-xl: 1.7rem}.drp-responsive.drp-spacing-lg .drp-date-picker__month{min-width:238px}}@media (max-width: 768px){.drp-responsive.drp-spacing-md{--drp-spacing-xs: .2125rem;--drp-spacing-sm: .425rem;--drp-spacing-md: .85rem;--drp-spacing-lg: 1.275rem;--drp-spacing-xl: 1.7rem}.drp-responsive.drp-spacing-md .drp-date-picker__month{min-width:238px}}@media (max-width: 768px){.drp-responsive.drp-spacing-sm{--drp-spacing-xs: .175rem;--drp-spacing-sm: .35rem;--drp-spacing-md: .7rem;--drp-spacing-lg: 1.05rem;--drp-spacing-xl: 1.4rem}.drp-responsive.drp-spacing-sm .drp-date-picker__month{min-width:196px}}.drp-date-picker--xs{padding:var(--drp-spacing-sm);min-width:240px}.drp-date-picker--xs .drp-date-picker__month-year{font-size:var(--drp-font-size-xs);padding:var(--drp-spacing-xs) var(--drp-spacing-sm)}.drp-date-picker--xs .drp-date-picker__nav{width:1.5rem;height:1.5rem;font-size:var(--drp-font-size-sm)}.drp-date-picker--xs .drp-date-picker__weekday{font-size:var(--drp-font-size-2xs)}.drp-date-picker--xs .drp-date-picker__day{font-size:var(--drp-font-size-xs)}.drp-date-picker--sm{padding:var(--drp-spacing-sm);min-width:260px}.drp-date-picker--sm .drp-date-picker__month-year{font-size:var(--drp-font-size-sm);padding:var(--drp-spacing-xs) var(--drp-spacing-sm)}.drp-date-picker--sm .drp-date-picker__nav{width:1.75rem;height:1.75rem;font-size:var(--drp-font-size-base)}.drp-date-picker--sm .drp-date-picker__day{font-size:var(--drp-font-size-xs)}.drp-date-picker--lg{padding:var(--drp-spacing-lg);min-width:320px}.drp-date-picker--lg .drp-date-picker__month-year{font-size:var(--drp-font-size-lg);padding:var(--drp-spacing-md) var(--drp-spacing-lg)}.drp-date-picker--lg .drp-date-picker__nav{width:2.5rem;height:2.5rem;font-size:var(--drp-font-size-xl)}.drp-date-picker--lg .drp-date-picker__day{font-size:var(--drp-font-size-base)}.drp-date-picker--xl{padding:var(--drp-spacing-xl);min-width:360px}.drp-date-picker--xl .drp-date-picker__month-year{font-size:var(--drp-font-size-xl);padding:var(--drp-spacing-lg) var(--drp-spacing-xl)}.drp-date-picker--xl .drp-date-picker__nav{width:3rem;height:3rem;font-size:var(--drp-font-size-2xl)}.drp-date-picker--xl .drp-date-picker__day{font-size:var(--drp-font-size-lg)}.drp-date-picker--inline{position:static;display:block;box-shadow:none}';
|
|
2781
|
-
class
|
|
2924
|
+
const oa = '@charset "UTF-8";:host{--drp-card-bg: #ffffff;--drp-border-color: #e5e7eb;--drp-primary-bg: #f3f4f6;--drp-primary-bg-hover: #e5e7eb;--drp-accent-color: #3b82f6;--drp-accent-color-hover: #2563eb;--drp-text-primary: #111827;--drp-text-secondary: #6b7280;--drp-accent-text-color: #ffffff;--drp-button-text-color: #ffffff;--drp-spacing-xs: .25rem;--drp-spacing-sm: .5rem;--drp-spacing-md: 1rem;--drp-spacing-lg: 1.5rem;--drp-spacing-xl: 2rem;--drp-font-size-2xs: .625rem;--drp-font-size-xs: .75rem;--drp-font-size-sm: .875rem;--drp-font-size-base: 1rem;--drp-font-size-lg: 1.125rem;--drp-font-size-xl: 1.25rem;--drp-font-size-2xl: 1.5rem;--drp-font-weight-medium: 500;--drp-font-weight-semibold: 600;--drp-border-width-base: 1px;--drp-border-radius: .375rem;--drp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);--drp-transition-fast: .15s;--drp-easing-snappy: cubic-bezier(.4, 0, .2, 1);--drp-input-padding-h: .75rem;--drp-grid-columns: 3;--drp-grid-rows: 2}.drp-date-picker-input{position:relative;cursor:pointer}.drp-date-picker-input:after{content:"📅";position:absolute;right:var(--drp-input-padding-h);top:50%;transform:translateY(-50%);pointer-events:none;opacity:.6}.drp-date-picker{position:absolute;z-index:9500;background:var(--drp-card-bg);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);box-shadow:var(--drp-shadow-xl);padding:var(--drp-spacing-md);min-width:280px;max-width:calc(100vw - 2rem);box-sizing:border-box;-webkit-user-select:none;user-select:none}.drp-date-picker:not(.drp-date-picker--visible){display:none}.drp-date-picker--inline{position:relative!important;display:block!important;z-index:auto;min-width:0;max-width:100%;width:fit-content;box-sizing:border-box}.drp-date-picker__months{display:flex;gap:var(--drp-spacing-lg)}.drp-date-picker--inline .drp-date-picker__months{flex-wrap:wrap}.drp-date-picker__months--grid{display:grid;grid-template-columns:repeat(var(--drp-grid-columns, 3),minmax(0,1fr));grid-template-rows:repeat(var(--drp-grid-rows, 2),auto);gap:var(--drp-spacing-lg);width:100%}@media (max-width: 1200px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),3),minmax(0,1fr))}}@media (max-width: 768px){.drp-date-picker__months--grid{grid-template-columns:repeat(min(var(--drp-grid-columns, 3),2),minmax(0,1fr))}}@media (max-width: 480px){.drp-date-picker__months--grid{grid-template-columns:minmax(0,1fr)}}.drp-date-picker__month{flex:1;min-width:280px}.drp-date-picker--inline .drp-date-picker__month{min-width:250px}.drp-date-picker__months--grid .drp-date-picker__month{min-width:0;width:100%}.drp-date-picker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-md);gap:var(--drp-spacing-sm)}.drp-date-picker__month-year{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-base);color:var(--drp-text-primary);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer;transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__month-year:hover{background-color:var(--drp-primary-bg)}.drp-date-picker__month-year:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__nav{width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;transition:all var(--drp-transition-fast) var(--drp-easing-snappy);font-size:var(--drp-font-size-lg);color:var(--drp-text-primary)}.drp-date-picker__nav:hover{background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__nav:active{background-color:var(--drp-primary-bg-hover)}.drp-date-picker__nav--disabled,.drp-date-picker__nav[disabled]{opacity:.6;cursor:not-allowed;pointer-events:none}.drp-date-picker__nav--disabled:hover,.drp-date-picker__nav[disabled]:hover{background-color:transparent;border-color:var(--drp-border-color)}.drp-date-picker__nav--prev:before{content:"‹"}.drp-date-picker__nav--next:before{content:"›"}.drp-date-picker__rolling-selector{display:none}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible{display:flex}.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__weekdays,.drp-date-picker__rolling-selector.drp-date-picker__rolling-selector--visible~.drp-date-picker__days{display:none}.drp-date-picker__rolling-selector{gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-md)}.drp-date-picker__rolling-list{flex:1;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);scroll-behavior:smooth}.drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-primary-bg)}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-border-color);border-radius:3px}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-accent-color)}.drp-date-picker__rolling-item{padding:var(--drp-spacing-sm) var(--drp-spacing-md);text-align:center;cursor:pointer;font-size:var(--drp-font-size-sm);transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__rolling-item:hover{background-color:var(--drp-primary-bg)}.drp-date-picker__rolling-item--selected{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-sm)}.drp-date-picker__weekday{text-align:center;font-size:var(--drp-font-size-xs);font-weight:var(--drp-font-weight-semibold);color:var(--drp-text-secondary);padding:var(--drp-spacing-xs);text-transform:uppercase}.drp-date-picker__days{display:flex;flex-direction:column;gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-md)}.drp-date-picker__date-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs)}.drp-date-picker__day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-sm);color:var(--drp-text-primary);border-radius:var(--drp-border-radius);cursor:pointer;transition:all var(--drp-transition-fast) var(--drp-easing-snappy);border:2px solid transparent;position:relative}.drp-date-picker__day:hover:not(.drp-date-picker__day--disabled):not(.drp-date-picker__day--other-month){background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__day--today{border-color:var(--drp-accent-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__day--focused{outline:2px solid var(--drp-accent-color);outline-offset:2px}.drp-date-picker__day--disabled{color:var(--drp-text-secondary);opacity:.6;cursor:not-allowed;position:relative}.drp-date-picker__day--disabled:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.1) 0px,rgba(0,0,0,.1) 1px,transparent 1px,transparent 6px);border-radius:var(--drp-border-radius);pointer-events:none}.drp-date-picker__day--disabled:hover{background-color:transparent;border-color:transparent}.drp-date-picker__day--other-month{color:var(--drp-text-secondary);opacity:.5}.drp-date-picker__day--other-month.drp-date-picker__day--range-start,.drp-date-picker__day--other-month.drp-date-picker__day--range-end,.drp-date-picker__day--other-month.drp-date-picker__day--in-range,.drp-date-picker__day--other-month.drp-date-picker__day--drag-preview{opacity:1}.drp-date-picker__day--range-start,.drp-date-picker__day--range-end{background-color:var(--drp-accent-color);color:var(--drp-accent-text-color);font-weight:var(--drp-font-weight-semibold);cursor:grab;-webkit-user-select:none;user-select:none}.drp-date-picker__day--range-start:active,.drp-date-picker__day--range-end:active{cursor:grabbing}.drp-date-picker__day--in-range{background-color:color-mix(in srgb,var(--drp-accent-color) 15%,transparent)}.drp-date-picker__day--in-range:hover{background-color:color-mix(in srgb,var(--drp-accent-color) 25%,transparent)}.drp-date-picker__day--dragging{cursor:grabbing!important;opacity:.7;transform:scale(1.1);transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__day--drag-preview{background-color:color-mix(in srgb,var(--drp-accent-color) 30%,transparent);border:2px dashed var(--drp-accent-color)}.drp-date-picker__day--drag-preview.drp-date-picker__day--range-start,.drp-date-picker__day--drag-preview.drp-date-picker__day--range-end{background-color:color-mix(in srgb,var(--drp-accent-color) 60%,transparent);color:var(--drp-accent-text-color)}.drp-date-picker__day--drag-invalid{background-color:color-mix(in srgb,#ef4444 20%,transparent)!important;border-color:#ef4444!important;border-style:dashed!important}.drp-date-picker__day.holiday{background-color:color-mix(in srgb,#ef4444 10%,transparent)}.drp-date-picker__day.holiday:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#ef4444 20%,transparent)}.drp-date-picker__day.event{background-color:color-mix(in srgb,#10b981 10%,transparent)}.drp-date-picker__day.event:hover:not(.drp-date-picker__day--disabled){background-color:color-mix(in srgb,#10b981 20%,transparent)}.drp-date-picker__rolling-item--disabled{color:var(--drp-text-secondary);opacity:.4;cursor:not-allowed;pointer-events:none;text-decoration:line-through}.drp-date-picker__rolling-item--disabled:hover{background-color:transparent}.drp-date-picker__badge-row{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--drp-spacing-xs);margin-bottom:var(--drp-spacing-xs);max-height:1rem;min-height:1rem}.drp-date-picker__badge-cell{display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-2xs);padding:1px 2px;border-radius:2px;transition:all var(--drp-transition-fast) var(--drp-easing-snappy);cursor:pointer;height:100%;max-height:1rem}.drp-date-picker__badge-cell:empty{visibility:hidden}.drp-date-picker__badge-cell:hover:not(:empty){transform:scale(1.05)}.drp-date-picker__badge-cell.badge-number{background-color:#10b981;color:#fff;font-size:.7rem;font-weight:600}.drp-date-picker__badge-cell.badge-count{background-color:#ef4444;color:#fff;font-size:.7rem;font-weight:700}.drp-date-picker__badge-cell.badge-text{background-color:#6b7280;color:#fff;font-size:.65rem;font-weight:700;text-transform:uppercase}.drp-date-picker__summary{text-align:center;padding:var(--drp-spacing-md);border-top:var(--drp-border-width-base) solid var(--drp-border-color);font-size:var(--drp-font-size-sm);color:var(--drp-text-secondary)}.drp-date-picker__summary--visible{display:block}.drp-date-picker__summary--hidden{display:none}.drp-date-picker__summary-count{font-weight:var(--drp-font-weight-semibold);color:var(--drp-accent-color);font-size:var(--drp-font-size-base)}.drp-date-picker__actions{display:flex;gap:var(--drp-spacing-sm);justify-content:space-between;padding-top:var(--drp-spacing-sm);border-top:var(--drp-border-width-base) solid var(--drp-border-color)}.drp-date-picker__button{flex:1;padding:var(--drp-spacing-sm) var(--drp-spacing-md);border:var(--drp-border-width-base) solid var(--drp-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-sm);font-weight:var(--drp-font-weight-medium);transition:all var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__button:hover{background-color:var(--drp-primary-bg);border-color:var(--drp-accent-color)}.drp-date-picker__button--today{color:var(--drp-accent-color)}.drp-date-picker__button--clear{color:var(--drp-text-secondary)}.drp-date-picker__button--apply{background-color:var(--drp-accent-color);color:var(--drp-button-text-color);border-color:var(--drp-accent-color)}.drp-date-picker__button--apply:hover{background-color:var(--drp-accent-color-hover)}.drp-date-picker__button--cancel{color:var(--drp-text-secondary)}.drp-date-picker__tooltip{position:absolute;z-index:9999;background-color:var(--drp-text-primary);color:#fff;padding:var(--drp-spacing-xs) var(--drp-spacing-sm);border-radius:var(--drp-border-radius);font-size:var(--drp-font-size-xs);line-height:1.4;max-width:200px;word-wrap:break-word;pointer-events:none;opacity:0;transition:opacity var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker__tooltip--visible{opacity:1}.drp-date-picker__tooltip-arrow{position:absolute;background-color:var(--drp-text-primary);width:8px;height:8px;transform:rotate(45deg)}.drp-date-picker__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fffc;display:flex;align-items:center;justify-content:center;z-index:9500;border-radius:.375rem}.drp-date-picker__loading-spinner{width:40px;height:40px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:drp-spin .8s linear infinite}@keyframes drp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drp-font-xs{--drp-font-size-2xs: .4375rem;--drp-font-size-xs: .525rem;--drp-font-size-sm: .6125rem;--drp-font-size-base: .7rem;--drp-font-size-lg: .7875rem;--drp-font-size-xl: .875rem;--drp-font-size-2xl: 1.05rem}.drp-font-sm{--drp-font-size-2xs: .53125rem;--drp-font-size-xs: .6375rem;--drp-font-size-sm: .74375rem;--drp-font-size-base: .85rem;--drp-font-size-lg: .95625rem;--drp-font-size-xl: 1.0625rem;--drp-font-size-2xl: 1.275rem}.drp-font-lg{--drp-font-size-2xs: .75rem;--drp-font-size-xs: .9rem;--drp-font-size-sm: 1.05rem;--drp-font-size-base: 1.2rem;--drp-font-size-lg: 1.35rem;--drp-font-size-xl: 1.5rem;--drp-font-size-2xl: 1.8rem}.drp-font-xl{--drp-font-size-2xs: .875rem;--drp-font-size-xs: 1.05rem;--drp-font-size-sm: 1.225rem;--drp-font-size-base: 1.4rem;--drp-font-size-lg: 1.575rem;--drp-font-size-xl: 1.75rem;--drp-font-size-2xl: 2.1rem}.drp-spacing-xs{--drp-spacing-xs: .175rem;--drp-spacing-sm: .35rem;--drp-spacing-md: .7rem;--drp-spacing-lg: 1.05rem;--drp-spacing-xl: 1.4rem}.drp-spacing-xs .drp-date-picker__month{min-width:196px}.drp-spacing-sm{--drp-spacing-xs: .2125rem;--drp-spacing-sm: .425rem;--drp-spacing-md: .85rem;--drp-spacing-lg: 1.275rem;--drp-spacing-xl: 1.7rem}.drp-spacing-sm .drp-date-picker__month{min-width:238px}.drp-spacing-lg{--drp-spacing-xs: .3rem;--drp-spacing-sm: .6rem;--drp-spacing-md: 1.2rem;--drp-spacing-lg: 1.8rem;--drp-spacing-xl: 2.4rem}.drp-spacing-lg .drp-date-picker__month{min-width:336px}.drp-spacing-xl{--drp-spacing-xs: .35rem;--drp-spacing-sm: .7rem;--drp-spacing-md: 1.4rem;--drp-spacing-lg: 2.1rem;--drp-spacing-xl: 2.8rem}.drp-spacing-xl .drp-date-picker__month{min-width:392px}@media (max-width: 1200px){.drp-responsive.drp-font-xl{--drp-font-size-2xs: .75rem;--drp-font-size-xs: .9rem;--drp-font-size-sm: 1.05rem;--drp-font-size-base: 1.2rem;--drp-font-size-lg: 1.35rem;--drp-font-size-xl: 1.5rem;--drp-font-size-2xl: 1.8rem}}@media (max-width: 768px){.drp-responsive.drp-font-xl{--drp-font-size-2xs: .625rem;--drp-font-size-xs: .75rem;--drp-font-size-sm: .875rem;--drp-font-size-base: 1rem;--drp-font-size-lg: 1.125rem;--drp-font-size-xl: 1.25rem;--drp-font-size-2xl: 1.5rem}}@media (max-width: 1200px){.drp-responsive.drp-font-lg{--drp-font-size-2xs: .625rem;--drp-font-size-xs: .75rem;--drp-font-size-sm: .875rem;--drp-font-size-base: 1rem;--drp-font-size-lg: 1.125rem;--drp-font-size-xl: 1.25rem;--drp-font-size-2xl: 1.5rem}}@media (max-width: 768px){.drp-responsive.drp-font-lg{--drp-font-size-2xs: .53125rem;--drp-font-size-xs: .6375rem;--drp-font-size-sm: .74375rem;--drp-font-size-base: .85rem;--drp-font-size-lg: .95625rem;--drp-font-size-xl: 1.0625rem;--drp-font-size-2xl: 1.275rem}}@media (max-width: 768px){.drp-responsive.drp-font-md{--drp-font-size-2xs: .53125rem;--drp-font-size-xs: .6375rem;--drp-font-size-sm: .74375rem;--drp-font-size-base: .85rem;--drp-font-size-lg: .95625rem;--drp-font-size-xl: 1.0625rem;--drp-font-size-2xl: 1.275rem}}@media (max-width: 768px){.drp-responsive.drp-font-sm{--drp-font-size-2xs: .4375rem;--drp-font-size-xs: .525rem;--drp-font-size-sm: .6125rem;--drp-font-size-base: .7rem;--drp-font-size-lg: .7875rem;--drp-font-size-xl: .875rem;--drp-font-size-2xl: 1.05rem}}@media (max-width: 1200px){.drp-responsive.drp-spacing-xl{--drp-spacing-xs: .3rem;--drp-spacing-sm: .6rem;--drp-spacing-md: 1.2rem;--drp-spacing-lg: 1.8rem;--drp-spacing-xl: 2.4rem}.drp-responsive.drp-spacing-xl .drp-date-picker__month{min-width:336px}}@media (max-width: 768px){.drp-responsive.drp-spacing-xl{--drp-spacing-xs: .25rem;--drp-spacing-sm: .5rem;--drp-spacing-md: 1rem;--drp-spacing-lg: 1.5rem;--drp-spacing-xl: 2rem}.drp-responsive.drp-spacing-xl .drp-date-picker__month{min-width:280px}}@media (max-width: 1200px){.drp-responsive.drp-spacing-lg{--drp-spacing-xs: .25rem;--drp-spacing-sm: .5rem;--drp-spacing-md: 1rem;--drp-spacing-lg: 1.5rem;--drp-spacing-xl: 2rem}.drp-responsive.drp-spacing-lg .drp-date-picker__month{min-width:280px}}@media (max-width: 768px){.drp-responsive.drp-spacing-lg{--drp-spacing-xs: .2125rem;--drp-spacing-sm: .425rem;--drp-spacing-md: .85rem;--drp-spacing-lg: 1.275rem;--drp-spacing-xl: 1.7rem}.drp-responsive.drp-spacing-lg .drp-date-picker__month{min-width:238px}}@media (max-width: 768px){.drp-responsive.drp-spacing-md{--drp-spacing-xs: .2125rem;--drp-spacing-sm: .425rem;--drp-spacing-md: .85rem;--drp-spacing-lg: 1.275rem;--drp-spacing-xl: 1.7rem}.drp-responsive.drp-spacing-md .drp-date-picker__month{min-width:238px}}@media (max-width: 768px){.drp-responsive.drp-spacing-sm{--drp-spacing-xs: .175rem;--drp-spacing-sm: .35rem;--drp-spacing-md: .7rem;--drp-spacing-lg: 1.05rem;--drp-spacing-xl: 1.4rem}.drp-responsive.drp-spacing-sm .drp-date-picker__month{min-width:196px}}.drp-date-picker--xs{padding:var(--drp-spacing-sm);min-width:240px}.drp-date-picker--xs .drp-date-picker__month-year{font-size:var(--drp-font-size-xs);padding:var(--drp-spacing-xs) var(--drp-spacing-sm)}.drp-date-picker--xs .drp-date-picker__nav{width:1.5rem;height:1.5rem;font-size:var(--drp-font-size-sm)}.drp-date-picker--xs .drp-date-picker__weekday{font-size:var(--drp-font-size-2xs)}.drp-date-picker--xs .drp-date-picker__day{font-size:var(--drp-font-size-xs)}.drp-date-picker--sm{padding:var(--drp-spacing-sm);min-width:260px}.drp-date-picker--sm .drp-date-picker__month-year{font-size:var(--drp-font-size-sm);padding:var(--drp-spacing-xs) var(--drp-spacing-sm)}.drp-date-picker--sm .drp-date-picker__nav{width:1.75rem;height:1.75rem;font-size:var(--drp-font-size-base)}.drp-date-picker--sm .drp-date-picker__day{font-size:var(--drp-font-size-xs)}.drp-date-picker--lg{padding:var(--drp-spacing-lg);min-width:320px}.drp-date-picker--lg .drp-date-picker__month-year{font-size:var(--drp-font-size-lg);padding:var(--drp-spacing-md) var(--drp-spacing-lg)}.drp-date-picker--lg .drp-date-picker__nav{width:2.5rem;height:2.5rem;font-size:var(--drp-font-size-xl)}.drp-date-picker--lg .drp-date-picker__day{font-size:var(--drp-font-size-base)}.drp-date-picker--xl{padding:var(--drp-spacing-xl);min-width:360px}.drp-date-picker--xl .drp-date-picker__month-year{font-size:var(--drp-font-size-xl);padding:var(--drp-spacing-lg) var(--drp-spacing-xl)}.drp-date-picker--xl .drp-date-picker__nav{width:3rem;height:3rem;font-size:var(--drp-font-size-2xl)}.drp-date-picker--xl .drp-date-picker__day{font-size:var(--drp-font-size-lg)}.drp-date-picker--inline{position:static;display:block;box-shadow:none}';
|
|
2925
|
+
class Ct extends HTMLElement {
|
|
2782
2926
|
constructor() {
|
|
2783
2927
|
super();
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2928
|
+
D(this, "picker");
|
|
2929
|
+
D(this, "inputElement");
|
|
2930
|
+
D(this, "shadow");
|
|
2787
2931
|
// Properties for complex data (not attributes)
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2932
|
+
D(this, "_specialDates");
|
|
2933
|
+
D(this, "_disabledDates");
|
|
2934
|
+
D(this, "_isDateDisabled");
|
|
2935
|
+
D(this, "_getDateMetadata");
|
|
2936
|
+
D(this, "_renderDay");
|
|
2937
|
+
D(this, "_renderDayContent");
|
|
2792
2938
|
this.shadow = this.attachShadow({ mode: "open" });
|
|
2793
2939
|
}
|
|
2794
2940
|
static get observedAttributes() {
|
|
@@ -2813,7 +2959,10 @@ class Lt extends HTMLElement {
|
|
|
2813
2959
|
"calendar-placement",
|
|
2814
2960
|
"locale",
|
|
2815
2961
|
"display-format-mask",
|
|
2816
|
-
"show-debug-info"
|
|
2962
|
+
"show-debug-info",
|
|
2963
|
+
"initial-date",
|
|
2964
|
+
"rolling-year-range",
|
|
2965
|
+
"rolling-month-range"
|
|
2817
2966
|
];
|
|
2818
2967
|
}
|
|
2819
2968
|
connectedCallback() {
|
|
@@ -2827,7 +2976,7 @@ class Lt extends HTMLElement {
|
|
|
2827
2976
|
}
|
|
2828
2977
|
render() {
|
|
2829
2978
|
const n = document.createElement("style");
|
|
2830
|
-
if (n.textContent =
|
|
2979
|
+
if (n.textContent = oa, this.shadow.appendChild(n), (this.getAttribute("positioning-mode") || "floating") === "floating") {
|
|
2831
2980
|
this.inputElement = document.createElement("input"), this.inputElement.type = "text", this.inputElement.classList.add("drp-input", "drp-date-picker-input");
|
|
2832
2981
|
const r = this.getAttribute("placeholder");
|
|
2833
2982
|
r && (this.inputElement.placeholder = r);
|
|
@@ -2854,7 +3003,7 @@ class Lt extends HTMLElement {
|
|
|
2854
3003
|
selectionMode: this.getAttribute("selection-mode") || "single",
|
|
2855
3004
|
dateFormatMask: this.getAttribute("date-format-mask") || "YYYY-MM-DD",
|
|
2856
3005
|
visibleMonthsCount: parseInt(this.getAttribute("visible-months-count") || "0") || void 0,
|
|
2857
|
-
calendarOpenTrigger: this.getAttribute("calendar-open-trigger") || "
|
|
3006
|
+
calendarOpenTrigger: this.getAttribute("calendar-open-trigger") || "focus",
|
|
2858
3007
|
onSelect: (l) => this.handleDateSelect(l),
|
|
2859
3008
|
container: this.shadow,
|
|
2860
3009
|
// Append calendar to shadow root
|
|
@@ -2869,6 +3018,7 @@ class Lt extends HTMLElement {
|
|
|
2869
3018
|
weekStartDay: o,
|
|
2870
3019
|
minDate: this.getAttribute("min-date") || void 0,
|
|
2871
3020
|
maxDate: this.getAttribute("max-date") || void 0,
|
|
3021
|
+
initialDate: this.getAttribute("initial-date") || void 0,
|
|
2872
3022
|
disabledWeekdays: a,
|
|
2873
3023
|
disabledDates: this._disabledDates,
|
|
2874
3024
|
specialDates: this._specialDates,
|
|
@@ -2878,9 +3028,15 @@ class Lt extends HTMLElement {
|
|
|
2878
3028
|
highlightDisabledInRange: this.hasAttribute("highlight-disabled-in-range") ? this.getAttribute("highlight-disabled-in-range") === "true" : void 0,
|
|
2879
3029
|
locale: this.getAttribute("locale") || "auto",
|
|
2880
3030
|
displayFormatMask: this.getAttribute("display-format-mask") || void 0,
|
|
2881
|
-
showDebugInfo: this.hasAttribute("show-debug-info")
|
|
3031
|
+
showDebugInfo: this.hasAttribute("show-debug-info"),
|
|
3032
|
+
// Rolling selector configuration
|
|
3033
|
+
rollingYearRange: this.getAttribute("rolling-year-range") || void 0,
|
|
3034
|
+
rollingMonthRange: this.getAttribute("rolling-month-range") || void 0,
|
|
3035
|
+
// Custom rendering
|
|
3036
|
+
renderDay: this._renderDay,
|
|
3037
|
+
renderDayContent: this._renderDayContent
|
|
2882
3038
|
}, d = n === "inline" ? null : this.inputElement;
|
|
2883
|
-
this.picker = new
|
|
3039
|
+
this.picker = new sa(d, i);
|
|
2884
3040
|
}
|
|
2885
3041
|
handleDateSelect(n) {
|
|
2886
3042
|
var o;
|
|
@@ -3027,27 +3183,40 @@ class Lt extends HTMLElement {
|
|
|
3027
3183
|
set getDateMetadata(n) {
|
|
3028
3184
|
this._getDateMetadata = n, this.picker && (this.picker.destroy(), this.initializePicker());
|
|
3029
3185
|
}
|
|
3186
|
+
// Custom rendering properties
|
|
3187
|
+
get renderDay() {
|
|
3188
|
+
return this._renderDay;
|
|
3189
|
+
}
|
|
3190
|
+
set renderDay(n) {
|
|
3191
|
+
this._renderDay = n, this.picker && (this.picker.options.renderDay = n, this.picker.render());
|
|
3192
|
+
}
|
|
3193
|
+
get renderDayContent() {
|
|
3194
|
+
return this._renderDayContent;
|
|
3195
|
+
}
|
|
3196
|
+
set renderDayContent(n) {
|
|
3197
|
+
this._renderDayContent = n, this.picker && (this.picker.options.renderDayContent = n, this.picker.render());
|
|
3198
|
+
}
|
|
3030
3199
|
}
|
|
3031
|
-
customElements.get("date-range-picker") || customElements.define("date-range-picker",
|
|
3032
|
-
function
|
|
3200
|
+
customElements.get("date-range-picker") || customElements.define("date-range-picker", Ct);
|
|
3201
|
+
function ia() {
|
|
3033
3202
|
return Array.from(document.querySelectorAll("date-range-picker"));
|
|
3034
3203
|
}
|
|
3035
3204
|
typeof window < "u" && (window.keenmate = window.keenmate || {}, window.keenmate.daterangepicker = {
|
|
3036
|
-
version: () => "1.0.0-
|
|
3205
|
+
version: () => "1.0.0-rc08",
|
|
3037
3206
|
config: {
|
|
3038
3207
|
name: "@keenmate/web-daterangepicker",
|
|
3039
|
-
version: "1.0.0-
|
|
3208
|
+
version: "1.0.0-rc08",
|
|
3040
3209
|
author: "Keenmate",
|
|
3041
3210
|
license: "MIT",
|
|
3042
3211
|
repository: "git+https://github.com/keenmate/web-daterangepicker.git",
|
|
3043
3212
|
homepage: "https://github.com/keenmate/web-daterangepicker#readme"
|
|
3044
3213
|
},
|
|
3045
3214
|
register: () => {
|
|
3046
|
-
typeof customElements < "u" && !customElements.get("date-range-picker") && customElements.define("date-range-picker",
|
|
3215
|
+
typeof customElements < "u" && !customElements.get("date-range-picker") && customElements.define("date-range-picker", Ct);
|
|
3047
3216
|
},
|
|
3048
|
-
getInstances: () =>
|
|
3217
|
+
getInstances: () => ia()
|
|
3049
3218
|
}, window.keenmate.daterangepicker.register());
|
|
3050
3219
|
export {
|
|
3051
|
-
|
|
3052
|
-
|
|
3220
|
+
Ct as DateRangePickerElement,
|
|
3221
|
+
sa as PureDatePicker
|
|
3053
3222
|
};
|