@keenmate/web-daterangepicker 1.6.0 → 1.7.0-rc01
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.
- package/README.md +2 -0
- package/dist/style.css +1 -1
- package/dist/web-daterangepicker.js +892 -914
- package/dist/web-daterangepicker.umd.js +9 -9
- package/package.json +1 -1
- package/src/scss/_badges.scss +4 -8
- package/src/scss/_base.scss +50 -62
- package/src/scss/_calendar-grid.scss +4 -7
- package/src/scss/_header-navigation.scss +4 -7
- package/src/scss/_modifiers.scss +0 -215
- package/src/scss/_summary-actions.scss +1 -0
- package/src/scss/_variables.scss +0 -13
|
@@ -7,8 +7,8 @@ function Xt(e) {
|
|
|
7
7
|
try {
|
|
8
8
|
const n = new Intl.Locale(navigator.language);
|
|
9
9
|
if ("weekInfo" in n && n.weekInfo && "firstDay" in n.weekInfo) {
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const i = n.weekInfo.firstDay;
|
|
11
|
+
return i === 7 ? 0 : i;
|
|
12
12
|
}
|
|
13
13
|
} catch {
|
|
14
14
|
}
|
|
@@ -31,150 +31,150 @@ function Xt(e) {
|
|
|
31
31
|
// South Korea
|
|
32
32
|
].some((n) => a.startsWith(n)) ? 0 : 1;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function fe(e) {
|
|
35
35
|
if (!e) return null;
|
|
36
36
|
let a;
|
|
37
37
|
return typeof e == "string" ? a = /* @__PURE__ */ new Date(e + "T00:00:00") : a = new Date(e), a.setHours(0, 0, 0, 0), isNaN(a.getTime()) ? null : a;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function be(e) {
|
|
40
40
|
const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
41
41
|
return `${a}-${t}-${n}`;
|
|
42
42
|
}
|
|
43
|
-
function Jt(e, a, t, n,
|
|
44
|
-
const
|
|
45
|
-
return !!(a && e < a || t && e > t ||
|
|
43
|
+
function Jt(e, a, t, n, i) {
|
|
44
|
+
const r = be(e), o = e.getDay();
|
|
45
|
+
return !!(a && e < a || t && e > t || i && i.includes(o) || n.has(r));
|
|
46
46
|
}
|
|
47
47
|
function ct(e, a) {
|
|
48
48
|
for (let t = 0; t < 12; t++) {
|
|
49
49
|
const n = new Date(a, t + 1, 0).getDate();
|
|
50
|
-
for (let
|
|
51
|
-
const
|
|
52
|
-
if (!e.isDateDisabledInternal(
|
|
50
|
+
for (let i = 1; i <= n; i++) {
|
|
51
|
+
const r = new Date(a, t, i);
|
|
52
|
+
if (!e.isDateDisabledInternal(r))
|
|
53
53
|
return !0;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
58
|
function Qt(e, a, t) {
|
|
59
|
-
const n = new Date(e),
|
|
60
|
-
n.setHours(0, 0, 0, 0),
|
|
61
|
-
const
|
|
62
|
-
for (;
|
|
63
|
-
if (t(
|
|
59
|
+
const n = new Date(e), i = new Date(a);
|
|
60
|
+
n.setHours(0, 0, 0, 0), i.setHours(0, 0, 0, 0);
|
|
61
|
+
const r = new Date(n);
|
|
62
|
+
for (; r <= i; ) {
|
|
63
|
+
if (t(r))
|
|
64
64
|
return !0;
|
|
65
|
-
|
|
65
|
+
r.setDate(r.getDate() + 1);
|
|
66
66
|
}
|
|
67
67
|
return !1;
|
|
68
68
|
}
|
|
69
69
|
function Zt(e, a, t) {
|
|
70
|
-
const n = [],
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
for (;
|
|
74
|
-
t(
|
|
70
|
+
const n = [], i = new Date(e), r = new Date(a);
|
|
71
|
+
i.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
72
|
+
const o = new Date(i);
|
|
73
|
+
for (; o <= r; )
|
|
74
|
+
t(o) || n.push(new Date(o)), o.setDate(o.getDate() + 1);
|
|
75
75
|
return n;
|
|
76
76
|
}
|
|
77
77
|
function ea(e, a, t) {
|
|
78
|
-
const n = [],
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
for (;
|
|
82
|
-
t(
|
|
78
|
+
const n = [], i = new Date(e), r = new Date(a);
|
|
79
|
+
i.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
80
|
+
const o = new Date(i);
|
|
81
|
+
for (; o <= r; )
|
|
82
|
+
t(o) && n.push(new Date(o)), o.setDate(o.getDate() + 1);
|
|
83
83
|
return n;
|
|
84
84
|
}
|
|
85
85
|
function ta(e, a, t) {
|
|
86
|
-
const n = new Date(e),
|
|
87
|
-
n.setHours(0, 0, 0, 0),
|
|
88
|
-
let
|
|
89
|
-
const
|
|
90
|
-
for (
|
|
91
|
-
if (t(
|
|
92
|
-
return
|
|
93
|
-
|
|
86
|
+
const n = new Date(e), i = new Date(a);
|
|
87
|
+
n.setHours(0, 0, 0, 0), i.setHours(0, 0, 0, 0);
|
|
88
|
+
let r = new Date(n);
|
|
89
|
+
const o = new Date(n);
|
|
90
|
+
for (o.setDate(o.getDate() + 1); o <= i; ) {
|
|
91
|
+
if (t(o))
|
|
92
|
+
return r;
|
|
93
|
+
r = new Date(o), o.setDate(o.getDate() + 1);
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return i;
|
|
96
96
|
}
|
|
97
97
|
function aa(e, a, t) {
|
|
98
|
-
const n = [],
|
|
99
|
-
|
|
100
|
-
let
|
|
101
|
-
const s = new Date(
|
|
102
|
-
for (; s <=
|
|
98
|
+
const n = [], i = new Date(e), r = new Date(a);
|
|
99
|
+
i.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0);
|
|
100
|
+
let o = null;
|
|
101
|
+
const s = new Date(i);
|
|
102
|
+
for (; s <= r; ) {
|
|
103
103
|
if (!t(s))
|
|
104
|
-
|
|
105
|
-
else if (
|
|
104
|
+
o || (o = new Date(s));
|
|
105
|
+
else if (o) {
|
|
106
106
|
const d = new Date(s);
|
|
107
|
-
d.setDate(d.getDate() - 1), n.push({ start:
|
|
107
|
+
d.setDate(d.getDate() - 1), n.push({ start: o, end: d }), o = null;
|
|
108
108
|
}
|
|
109
109
|
s.setDate(s.getDate() + 1);
|
|
110
110
|
}
|
|
111
|
-
return
|
|
111
|
+
return o && n.push({ start: o, end: new Date(r) }), n;
|
|
112
112
|
}
|
|
113
113
|
function ut(e) {
|
|
114
|
-
return
|
|
114
|
+
return ht(e, /* @__PURE__ */ new Date());
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ht(e, a) {
|
|
117
117
|
return !e || !a ? !1 : e.getFullYear() === a.getFullYear() && e.getMonth() === a.getMonth() && e.getDate() === a.getDate();
|
|
118
118
|
}
|
|
119
119
|
function na(e, a, t) {
|
|
120
120
|
return !a || !t ? !1 : e > a && e < t;
|
|
121
121
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
122
|
+
var ia = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
123
|
+
function oa(e) {
|
|
124
124
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
125
125
|
}
|
|
126
126
|
var gt = { exports: {} };
|
|
127
127
|
(function(e) {
|
|
128
128
|
(function(a, t) {
|
|
129
129
|
e.exports ? e.exports = t() : a.log = t();
|
|
130
|
-
})(
|
|
130
|
+
})(ia, function() {
|
|
131
131
|
var a = function() {
|
|
132
|
-
}, t = "undefined", n = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent),
|
|
132
|
+
}, t = "undefined", n = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), i = [
|
|
133
133
|
"trace",
|
|
134
134
|
"debug",
|
|
135
135
|
"info",
|
|
136
136
|
"warn",
|
|
137
137
|
"error"
|
|
138
|
-
],
|
|
139
|
-
function s(
|
|
140
|
-
var m =
|
|
138
|
+
], r = {}, o = null;
|
|
139
|
+
function s(p, D) {
|
|
140
|
+
var m = p[D];
|
|
141
141
|
if (typeof m.bind == "function")
|
|
142
|
-
return m.bind(
|
|
142
|
+
return m.bind(p);
|
|
143
143
|
try {
|
|
144
|
-
return Function.prototype.bind.call(m,
|
|
144
|
+
return Function.prototype.bind.call(m, p);
|
|
145
145
|
} catch {
|
|
146
146
|
return function() {
|
|
147
|
-
return Function.prototype.apply.apply(m, [
|
|
147
|
+
return Function.prototype.apply.apply(m, [p, arguments]);
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
function d() {
|
|
152
152
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
153
153
|
}
|
|
154
|
-
function l(
|
|
155
|
-
return
|
|
154
|
+
function l(p) {
|
|
155
|
+
return p === "debug" && (p = "log"), typeof console === t ? !1 : p === "trace" && n ? d : console[p] !== void 0 ? s(console, p) : console.log !== void 0 ? s(console, "log") : a;
|
|
156
156
|
}
|
|
157
157
|
function c() {
|
|
158
|
-
for (var
|
|
159
|
-
var m =
|
|
160
|
-
this[m] = D <
|
|
158
|
+
for (var p = this.getLevel(), D = 0; D < i.length; D++) {
|
|
159
|
+
var m = i[D];
|
|
160
|
+
this[m] = D < p ? a : this.methodFactory(m, p, this.name);
|
|
161
161
|
}
|
|
162
|
-
if (this.log = this.debug, typeof console === t &&
|
|
162
|
+
if (this.log = this.debug, typeof console === t && p < this.levels.SILENT)
|
|
163
163
|
return "No console available for logging";
|
|
164
164
|
}
|
|
165
|
-
function p
|
|
165
|
+
function h(p) {
|
|
166
166
|
return function() {
|
|
167
|
-
typeof console !== t && (c.call(this), this[
|
|
167
|
+
typeof console !== t && (c.call(this), this[p].apply(this, arguments));
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function u(
|
|
171
|
-
return l(
|
|
170
|
+
function u(p, D, m) {
|
|
171
|
+
return l(p) || h.apply(this, arguments);
|
|
172
172
|
}
|
|
173
|
-
function g(
|
|
173
|
+
function g(p, D) {
|
|
174
174
|
var m = this, C, I, S, v = "loglevel";
|
|
175
|
-
typeof
|
|
175
|
+
typeof p == "string" ? v += ":" + p : typeof p == "symbol" && (v = void 0);
|
|
176
176
|
function _(x) {
|
|
177
|
-
var E = (
|
|
177
|
+
var E = (i[x] || "silent").toUpperCase();
|
|
178
178
|
if (!(typeof window === t || !v)) {
|
|
179
179
|
try {
|
|
180
180
|
window.localStorage[v] = E;
|
|
@@ -196,9 +196,9 @@ var gt = { exports: {} };
|
|
|
196
196
|
}
|
|
197
197
|
if (typeof x === t)
|
|
198
198
|
try {
|
|
199
|
-
var E = window.document.cookie,
|
|
199
|
+
var E = window.document.cookie, T = encodeURIComponent(v), A = E.indexOf(T + "=");
|
|
200
200
|
A !== -1 && (x = /^([^;]+)/.exec(
|
|
201
|
-
E.slice(A +
|
|
201
|
+
E.slice(A + T.length + 1)
|
|
202
202
|
)[1]);
|
|
203
203
|
} catch {
|
|
204
204
|
}
|
|
@@ -223,7 +223,7 @@ var gt = { exports: {} };
|
|
|
223
223
|
return E;
|
|
224
224
|
throw new TypeError("log.setLevel() called with invalid level: " + x);
|
|
225
225
|
}
|
|
226
|
-
m.name =
|
|
226
|
+
m.name = p, m.levels = {
|
|
227
227
|
TRACE: 0,
|
|
228
228
|
DEBUG: 1,
|
|
229
229
|
INFO: 2,
|
|
@@ -243,34 +243,34 @@ var gt = { exports: {} };
|
|
|
243
243
|
}, m.disableAll = function(x) {
|
|
244
244
|
m.setLevel(m.levels.SILENT, x);
|
|
245
245
|
}, m.rebuild = function() {
|
|
246
|
-
if (
|
|
247
|
-
for (var x in
|
|
248
|
-
|
|
246
|
+
if (o !== m && (C = y(o.getLevel())), c.call(m), o === m)
|
|
247
|
+
for (var x in r)
|
|
248
|
+
r[x].rebuild();
|
|
249
249
|
}, C = y(
|
|
250
|
-
|
|
250
|
+
o ? o.getLevel() : "WARN"
|
|
251
251
|
);
|
|
252
252
|
var M = R();
|
|
253
253
|
M != null && (S = y(M)), c.call(m);
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
o = new g(), o.getLogger = function(D) {
|
|
256
256
|
if (typeof D != "symbol" && typeof D != "string" || D === "")
|
|
257
257
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
258
|
-
var m =
|
|
259
|
-
return m || (m =
|
|
258
|
+
var m = r[D];
|
|
259
|
+
return m || (m = r[D] = new g(
|
|
260
260
|
D,
|
|
261
|
-
|
|
261
|
+
o.methodFactory
|
|
262
262
|
)), m;
|
|
263
263
|
};
|
|
264
264
|
var f = typeof window !== t ? window.log : void 0;
|
|
265
|
-
return
|
|
266
|
-
return typeof window !== t && window.log ===
|
|
267
|
-
},
|
|
268
|
-
return
|
|
269
|
-
},
|
|
265
|
+
return o.noConflict = function() {
|
|
266
|
+
return typeof window !== t && window.log === o && (window.log = f), o;
|
|
267
|
+
}, o.getLoggers = function() {
|
|
268
|
+
return r;
|
|
269
|
+
}, o.default = o, o;
|
|
270
270
|
});
|
|
271
271
|
})(gt);
|
|
272
|
-
var
|
|
273
|
-
const O = /* @__PURE__ */
|
|
272
|
+
var ra = gt.exports;
|
|
273
|
+
const O = /* @__PURE__ */ oa(ra), sa = [
|
|
274
274
|
"DRP",
|
|
275
275
|
"DRP:RENDERING",
|
|
276
276
|
"DRP:INTERACTION",
|
|
@@ -292,42 +292,42 @@ const O = /* @__PURE__ */ ia(oa), sa = [
|
|
|
292
292
|
// Red
|
|
293
293
|
}, la = O.methodFactory, ca = (e, a, t) => {
|
|
294
294
|
const n = la.call(O, e, a, t);
|
|
295
|
-
return (...
|
|
296
|
-
const
|
|
295
|
+
return (...i) => {
|
|
296
|
+
const r = da[e] || "#6b7280", s = `%c[${(/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
|
|
297
297
|
hour12: !1,
|
|
298
298
|
hour: "2-digit",
|
|
299
299
|
minute: "2-digit",
|
|
300
300
|
second: "2-digit",
|
|
301
301
|
fractionalSecondDigits: 3
|
|
302
302
|
})}] [${e.toUpperCase()}] ${t ? `[${t}]` : ""}`;
|
|
303
|
-
n(s, `color: ${
|
|
303
|
+
n(s, `color: ${r}`, ...i);
|
|
304
304
|
};
|
|
305
|
-
},
|
|
305
|
+
}, pt = [];
|
|
306
306
|
function Q(e) {
|
|
307
307
|
const a = O.getLogger(e);
|
|
308
|
-
return a.methodFactory = ca, a.setLevel("silent"),
|
|
308
|
+
return a.methodFactory = ca, a.setLevel("silent"), pt.push(a), a;
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const k = Q("DRP"), de = Q("DRP:RENDERING"), re = Q("DRP:INTERACTION"), oe = Q("DRP:SELECTION"), w = Q("DRP:NAVIGATION"), H = Q("DRP:UI"), ee = Q("DRP:VALIDATION"), U = Q("DRP:DRAG");
|
|
311
311
|
O.setLevel("silent");
|
|
312
312
|
const We = (e) => {
|
|
313
|
-
O.setLevel(e),
|
|
313
|
+
O.setLevel(e), pt.forEach((a) => a.setLevel(e));
|
|
314
314
|
}, ft = () => {
|
|
315
315
|
We("debug");
|
|
316
316
|
}, mt = () => {
|
|
317
317
|
We("silent");
|
|
318
318
|
}, ua = (e, a = "debug") => {
|
|
319
319
|
const n = {
|
|
320
|
-
DRP:
|
|
320
|
+
DRP: k,
|
|
321
321
|
"DRP:RENDERING": de,
|
|
322
|
-
"DRP:INTERACTION":
|
|
323
|
-
"DRP:SELECTION":
|
|
322
|
+
"DRP:INTERACTION": re,
|
|
323
|
+
"DRP:SELECTION": oe,
|
|
324
324
|
"DRP:NAVIGATION": w,
|
|
325
325
|
"DRP:UI": H,
|
|
326
326
|
"DRP:VALIDATION": ee,
|
|
327
327
|
"DRP:DRAG": U
|
|
328
328
|
}[e];
|
|
329
329
|
n && n.setLevel(a);
|
|
330
|
-
},
|
|
330
|
+
}, ha = () => [...sa], le = Math.min, te = Math.max, Ie = Math.round, Me = Math.floor, W = (e) => ({
|
|
331
331
|
x: e,
|
|
332
332
|
y: e
|
|
333
333
|
}), ga = {
|
|
@@ -335,7 +335,7 @@ const We = (e) => {
|
|
|
335
335
|
right: "left",
|
|
336
336
|
bottom: "top",
|
|
337
337
|
top: "bottom"
|
|
338
|
-
},
|
|
338
|
+
}, pa = {
|
|
339
339
|
start: "end",
|
|
340
340
|
end: "start"
|
|
341
341
|
};
|
|
@@ -366,23 +366,23 @@ function Ge(e) {
|
|
|
366
366
|
}
|
|
367
367
|
function ma(e, a, t) {
|
|
368
368
|
t === void 0 && (t = !1);
|
|
369
|
-
const n = we(e),
|
|
370
|
-
let
|
|
371
|
-
return a.reference[
|
|
369
|
+
const n = we(e), i = Ge(e), r = Ke(i);
|
|
370
|
+
let o = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
371
|
+
return a.reference[r] > a.floating[r] && (o = Ee(o)), [o, Ee(o)];
|
|
372
372
|
}
|
|
373
373
|
function ba(e) {
|
|
374
374
|
const a = Ee(e);
|
|
375
375
|
return [Ye(e), a, Ye(a)];
|
|
376
376
|
}
|
|
377
377
|
function Ye(e) {
|
|
378
|
-
return e.replace(/start|end/g, (a) =>
|
|
378
|
+
return e.replace(/start|end/g, (a) => pa[a]);
|
|
379
379
|
}
|
|
380
|
-
const nt = ["left", "right"],
|
|
380
|
+
const nt = ["left", "right"], it = ["right", "left"], ya = ["top", "bottom"], va = ["bottom", "top"];
|
|
381
381
|
function Da(e, a, t) {
|
|
382
382
|
switch (e) {
|
|
383
383
|
case "top":
|
|
384
384
|
case "bottom":
|
|
385
|
-
return t ? a ?
|
|
385
|
+
return t ? a ? it : nt : a ? nt : it;
|
|
386
386
|
case "left":
|
|
387
387
|
case "right":
|
|
388
388
|
return a ? ya : va;
|
|
@@ -391,9 +391,9 @@ function Da(e, a, t) {
|
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
function _a(e, a, t, n) {
|
|
394
|
-
const
|
|
395
|
-
let
|
|
396
|
-
return
|
|
394
|
+
const i = we(e);
|
|
395
|
+
let r = Da(ne(e), t === "start", n);
|
|
396
|
+
return i && (r = r.map((o) => o + "-" + i), a && (r = r.concat(r.map(Ye)))), r;
|
|
397
397
|
}
|
|
398
398
|
function Ee(e) {
|
|
399
399
|
return e.replace(/left|right|bottom|top/g, (a) => ga[a]);
|
|
@@ -420,31 +420,31 @@ function Re(e) {
|
|
|
420
420
|
x: a,
|
|
421
421
|
y: t,
|
|
422
422
|
width: n,
|
|
423
|
-
height:
|
|
423
|
+
height: i
|
|
424
424
|
} = e;
|
|
425
425
|
return {
|
|
426
426
|
width: n,
|
|
427
|
-
height:
|
|
427
|
+
height: i,
|
|
428
428
|
top: t,
|
|
429
429
|
left: a,
|
|
430
430
|
right: a + n,
|
|
431
|
-
bottom: t +
|
|
431
|
+
bottom: t + i,
|
|
432
432
|
x: a,
|
|
433
433
|
y: t
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function ot(e, a, t) {
|
|
437
437
|
let {
|
|
438
438
|
reference: n,
|
|
439
|
-
floating:
|
|
439
|
+
floating: i
|
|
440
440
|
} = e;
|
|
441
|
-
const
|
|
441
|
+
const r = X(a), o = Ge(a), s = Ke(o), d = ne(a), l = r === "y", c = n.x + n.width / 2 - i.width / 2, h = n.y + n.height / 2 - i.height / 2, u = n[s] / 2 - i[s] / 2;
|
|
442
442
|
let g;
|
|
443
443
|
switch (d) {
|
|
444
444
|
case "top":
|
|
445
445
|
g = {
|
|
446
446
|
x: c,
|
|
447
|
-
y: n.y -
|
|
447
|
+
y: n.y - i.height
|
|
448
448
|
};
|
|
449
449
|
break;
|
|
450
450
|
case "bottom":
|
|
@@ -456,13 +456,13 @@ function it(e, a, t) {
|
|
|
456
456
|
case "right":
|
|
457
457
|
g = {
|
|
458
458
|
x: n.x + n.width,
|
|
459
|
-
y:
|
|
459
|
+
y: h
|
|
460
460
|
};
|
|
461
461
|
break;
|
|
462
462
|
case "left":
|
|
463
463
|
g = {
|
|
464
|
-
x: n.x -
|
|
465
|
-
y:
|
|
464
|
+
x: n.x - i.width,
|
|
465
|
+
y: h
|
|
466
466
|
};
|
|
467
467
|
break;
|
|
468
468
|
default:
|
|
@@ -473,10 +473,10 @@ function it(e, a, t) {
|
|
|
473
473
|
}
|
|
474
474
|
switch (we(a)) {
|
|
475
475
|
case "start":
|
|
476
|
-
g[
|
|
476
|
+
g[o] -= u * (t && l ? -1 : 1);
|
|
477
477
|
break;
|
|
478
478
|
case "end":
|
|
479
|
-
g[
|
|
479
|
+
g[o] += u * (t && l ? -1 : 1);
|
|
480
480
|
break;
|
|
481
481
|
}
|
|
482
482
|
return g;
|
|
@@ -484,61 +484,61 @@ function it(e, a, t) {
|
|
|
484
484
|
const xa = async (e, a, t) => {
|
|
485
485
|
const {
|
|
486
486
|
placement: n = "bottom",
|
|
487
|
-
strategy:
|
|
488
|
-
middleware:
|
|
489
|
-
platform:
|
|
490
|
-
} = t, s =
|
|
491
|
-
let l = await
|
|
487
|
+
strategy: i = "absolute",
|
|
488
|
+
middleware: r = [],
|
|
489
|
+
platform: o
|
|
490
|
+
} = t, s = r.filter(Boolean), d = await (o.isRTL == null ? void 0 : o.isRTL(a));
|
|
491
|
+
let l = await o.getElementRects({
|
|
492
492
|
reference: e,
|
|
493
493
|
floating: a,
|
|
494
|
-
strategy:
|
|
494
|
+
strategy: i
|
|
495
495
|
}), {
|
|
496
496
|
x: c,
|
|
497
|
-
y:
|
|
498
|
-
} =
|
|
499
|
-
for (let
|
|
497
|
+
y: h
|
|
498
|
+
} = ot(l, n, d), u = n, g = {}, f = 0;
|
|
499
|
+
for (let p = 0; p < s.length; p++) {
|
|
500
500
|
const {
|
|
501
501
|
name: D,
|
|
502
502
|
fn: m
|
|
503
|
-
} = s[
|
|
503
|
+
} = s[p], {
|
|
504
504
|
x: C,
|
|
505
505
|
y: I,
|
|
506
506
|
data: S,
|
|
507
507
|
reset: v
|
|
508
508
|
} = await m({
|
|
509
509
|
x: c,
|
|
510
|
-
y:
|
|
510
|
+
y: h,
|
|
511
511
|
initialPlacement: n,
|
|
512
512
|
placement: u,
|
|
513
|
-
strategy:
|
|
513
|
+
strategy: i,
|
|
514
514
|
middlewareData: g,
|
|
515
515
|
rects: l,
|
|
516
|
-
platform:
|
|
516
|
+
platform: o,
|
|
517
517
|
elements: {
|
|
518
518
|
reference: e,
|
|
519
519
|
floating: a
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
|
-
c = C ?? c,
|
|
522
|
+
c = C ?? c, h = I ?? h, g = {
|
|
523
523
|
...g,
|
|
524
524
|
[D]: {
|
|
525
525
|
...g[D],
|
|
526
526
|
...S
|
|
527
527
|
}
|
|
528
|
-
}, v && f <= 50 && (f++, typeof v == "object" && (v.placement && (u = v.placement), v.rects && (l = v.rects === !0 ? await
|
|
528
|
+
}, v && f <= 50 && (f++, typeof v == "object" && (v.placement && (u = v.placement), v.rects && (l = v.rects === !0 ? await o.getElementRects({
|
|
529
529
|
reference: e,
|
|
530
530
|
floating: a,
|
|
531
|
-
strategy:
|
|
531
|
+
strategy: i
|
|
532
532
|
}) : v.rects), {
|
|
533
533
|
x: c,
|
|
534
|
-
y:
|
|
535
|
-
} =
|
|
534
|
+
y: h
|
|
535
|
+
} = ot(l, u, d)), p = -1);
|
|
536
536
|
}
|
|
537
537
|
return {
|
|
538
538
|
x: c,
|
|
539
|
-
y:
|
|
539
|
+
y: h,
|
|
540
540
|
placement: u,
|
|
541
|
-
strategy:
|
|
541
|
+
strategy: i,
|
|
542
542
|
middlewareData: g
|
|
543
543
|
};
|
|
544
544
|
};
|
|
@@ -547,34 +547,34 @@ async function vt(e, a) {
|
|
|
547
547
|
a === void 0 && (a = {});
|
|
548
548
|
const {
|
|
549
549
|
x: n,
|
|
550
|
-
y:
|
|
551
|
-
platform:
|
|
552
|
-
rects:
|
|
550
|
+
y: i,
|
|
551
|
+
platform: r,
|
|
552
|
+
rects: o,
|
|
553
553
|
elements: s,
|
|
554
554
|
strategy: d
|
|
555
555
|
} = e, {
|
|
556
556
|
boundary: l = "clippingAncestors",
|
|
557
557
|
rootBoundary: c = "viewport",
|
|
558
|
-
elementContext:
|
|
558
|
+
elementContext: h = "floating",
|
|
559
559
|
altBoundary: u = !1,
|
|
560
560
|
padding: g = 0
|
|
561
|
-
} = _e(a, e), f = yt(g), D = s[u ?
|
|
562
|
-
element: (t = await (
|
|
561
|
+
} = _e(a, e), f = yt(g), D = s[u ? h === "floating" ? "reference" : "floating" : h], m = Re(await r.getClippingRect({
|
|
562
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(D))) == null || t ? D : D.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(s.floating)),
|
|
563
563
|
boundary: l,
|
|
564
564
|
rootBoundary: c,
|
|
565
565
|
strategy: d
|
|
566
|
-
})), C =
|
|
566
|
+
})), C = h === "floating" ? {
|
|
567
567
|
x: n,
|
|
568
|
-
y:
|
|
569
|
-
width:
|
|
570
|
-
height:
|
|
571
|
-
} :
|
|
568
|
+
y: i,
|
|
569
|
+
width: o.floating.width,
|
|
570
|
+
height: o.floating.height
|
|
571
|
+
} : o.reference, I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(s.floating)), S = await (r.isElement == null ? void 0 : r.isElement(I)) ? await (r.getScale == null ? void 0 : r.getScale(I)) || {
|
|
572
572
|
x: 1,
|
|
573
573
|
y: 1
|
|
574
574
|
} : {
|
|
575
575
|
x: 1,
|
|
576
576
|
y: 1
|
|
577
|
-
}, v = Re(
|
|
577
|
+
}, v = Re(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
578
578
|
elements: s,
|
|
579
579
|
rect: C,
|
|
580
580
|
offsetParent: I,
|
|
@@ -594,9 +594,9 @@ const Ma = (e) => ({
|
|
|
594
594
|
const {
|
|
595
595
|
x: t,
|
|
596
596
|
y: n,
|
|
597
|
-
placement:
|
|
598
|
-
rects:
|
|
599
|
-
platform:
|
|
597
|
+
placement: i,
|
|
598
|
+
rects: r,
|
|
599
|
+
platform: o,
|
|
600
600
|
elements: s,
|
|
601
601
|
middlewareData: d
|
|
602
602
|
} = a, {
|
|
@@ -605,20 +605,20 @@ const Ma = (e) => ({
|
|
|
605
605
|
} = _e(e, a) || {};
|
|
606
606
|
if (l == null)
|
|
607
607
|
return {};
|
|
608
|
-
const
|
|
608
|
+
const h = yt(c), u = {
|
|
609
609
|
x: t,
|
|
610
610
|
y: n
|
|
611
|
-
}, g = Ge(
|
|
611
|
+
}, g = Ge(i), f = Ke(g), p = await o.getDimensions(l), D = g === "y", m = D ? "top" : "left", C = D ? "bottom" : "right", I = D ? "clientHeight" : "clientWidth", S = r.reference[f] + r.reference[g] - u[g] - r.floating[f], v = u[g] - r.reference[g], _ = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l));
|
|
612
612
|
let R = _ ? _[I] : 0;
|
|
613
|
-
(!R || !await (
|
|
614
|
-
const L = S / 2 - v / 2, y = R / 2 -
|
|
613
|
+
(!R || !await (o.isElement == null ? void 0 : o.isElement(_))) && (R = s.floating[I] || r.floating[f]);
|
|
614
|
+
const L = S / 2 - v / 2, y = R / 2 - p[f] / 2 - 1, M = le(h[m], y), x = le(h[C], y), E = M, T = R - p[f] - x, A = R / 2 - p[f] / 2 + L, $ = Be(E, A, T), N = !d.arrow && we(i) != null && A !== $ && r.reference[f] / 2 - (A < E ? M : x) - p[f] / 2 < 0, P = N ? A < E ? A - E : A - T : 0;
|
|
615
615
|
return {
|
|
616
|
-
[g]: u[g] +
|
|
616
|
+
[g]: u[g] + P,
|
|
617
617
|
data: {
|
|
618
618
|
[g]: $,
|
|
619
|
-
centerOffset: A - $ -
|
|
619
|
+
centerOffset: A - $ - P,
|
|
620
620
|
...N && {
|
|
621
|
-
alignmentOffset:
|
|
621
|
+
alignmentOffset: P
|
|
622
622
|
}
|
|
623
623
|
},
|
|
624
624
|
reset: N
|
|
@@ -631,40 +631,40 @@ const Ma = (e) => ({
|
|
|
631
631
|
async fn(a) {
|
|
632
632
|
var t, n;
|
|
633
633
|
const {
|
|
634
|
-
placement:
|
|
635
|
-
middlewareData:
|
|
636
|
-
rects:
|
|
634
|
+
placement: i,
|
|
635
|
+
middlewareData: r,
|
|
636
|
+
rects: o,
|
|
637
637
|
initialPlacement: s,
|
|
638
638
|
platform: d,
|
|
639
639
|
elements: l
|
|
640
640
|
} = a, {
|
|
641
641
|
mainAxis: c = !0,
|
|
642
|
-
crossAxis:
|
|
642
|
+
crossAxis: h = !0,
|
|
643
643
|
fallbackPlacements: u,
|
|
644
644
|
fallbackStrategy: g = "bestFit",
|
|
645
645
|
fallbackAxisSideDirection: f = "none",
|
|
646
|
-
flipAlignment:
|
|
646
|
+
flipAlignment: p = !0,
|
|
647
647
|
...D
|
|
648
648
|
} = _e(e, a);
|
|
649
|
-
if ((t =
|
|
649
|
+
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
650
650
|
return {};
|
|
651
|
-
const m = ne(
|
|
652
|
-
!u && _ && v.push(..._a(s,
|
|
651
|
+
const m = ne(i), C = X(s), I = ne(s) === s, S = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), v = u || (I || !p ? [Ee(s)] : ba(s)), _ = f !== "none";
|
|
652
|
+
!u && _ && v.push(..._a(s, p, f, S));
|
|
653
653
|
const R = [s, ...v], L = await vt(a, D), y = [];
|
|
654
|
-
let M = ((n =
|
|
655
|
-
if (c && y.push(L[m]),
|
|
656
|
-
const A = ma(
|
|
654
|
+
let M = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
655
|
+
if (c && y.push(L[m]), h) {
|
|
656
|
+
const A = ma(i, o, S);
|
|
657
657
|
y.push(L[A[0]], L[A[1]]);
|
|
658
658
|
}
|
|
659
659
|
if (M = [...M, {
|
|
660
|
-
placement:
|
|
660
|
+
placement: i,
|
|
661
661
|
overflows: y
|
|
662
662
|
}], !y.every((A) => A <= 0)) {
|
|
663
663
|
var x, E;
|
|
664
|
-
const A = (((x =
|
|
665
|
-
if ($ && (!(
|
|
664
|
+
const A = (((x = r.flip) == null ? void 0 : x.index) || 0) + 1, $ = R[A];
|
|
665
|
+
if ($ && (!(h === "alignment" ? C !== X($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
666
666
|
// overflows the main axis.
|
|
667
|
-
M.every((
|
|
667
|
+
M.every((z) => X(z.placement) === C ? z.overflows[0] > 0 : !0)))
|
|
668
668
|
return {
|
|
669
669
|
data: {
|
|
670
670
|
index: A,
|
|
@@ -674,28 +674,28 @@ const Ma = (e) => ({
|
|
|
674
674
|
placement: $
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
|
-
let N = (E = M.filter((
|
|
677
|
+
let N = (E = M.filter((P) => P.overflows[0] <= 0).sort((P, z) => P.overflows[1] - z.overflows[1])[0]) == null ? void 0 : E.placement;
|
|
678
678
|
if (!N)
|
|
679
679
|
switch (g) {
|
|
680
680
|
case "bestFit": {
|
|
681
|
-
var
|
|
682
|
-
const
|
|
681
|
+
var T;
|
|
682
|
+
const P = (T = M.filter((z) => {
|
|
683
683
|
if (_) {
|
|
684
|
-
const V = X(
|
|
684
|
+
const V = X(z.placement);
|
|
685
685
|
return V === C || // Create a bias to the `y` side axis due to horizontal
|
|
686
686
|
// reading directions favoring greater width.
|
|
687
687
|
V === "y";
|
|
688
688
|
}
|
|
689
689
|
return !0;
|
|
690
|
-
}).map((
|
|
691
|
-
|
|
690
|
+
}).map((z) => [z.placement, z.overflows.filter((V) => V > 0).reduce((V, q) => V + q, 0)]).sort((z, V) => z[1] - V[1])[0]) == null ? void 0 : T[0];
|
|
691
|
+
P && (N = P);
|
|
692
692
|
break;
|
|
693
693
|
}
|
|
694
694
|
case "initialPlacement":
|
|
695
695
|
N = s;
|
|
696
696
|
break;
|
|
697
697
|
}
|
|
698
|
-
if (
|
|
698
|
+
if (i !== N)
|
|
699
699
|
return {
|
|
700
700
|
reset: {
|
|
701
701
|
placement: N
|
|
@@ -710,20 +710,20 @@ async function Ia(e, a) {
|
|
|
710
710
|
const {
|
|
711
711
|
placement: t,
|
|
712
712
|
platform: n,
|
|
713
|
-
elements:
|
|
714
|
-
} = e,
|
|
713
|
+
elements: i
|
|
714
|
+
} = e, r = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), o = ne(t), s = we(t), d = X(t) === "y", l = Ca.has(o) ? -1 : 1, c = r && d ? -1 : 1, h = _e(a, e);
|
|
715
715
|
let {
|
|
716
716
|
mainAxis: u,
|
|
717
717
|
crossAxis: g,
|
|
718
718
|
alignmentAxis: f
|
|
719
|
-
} = typeof
|
|
720
|
-
mainAxis:
|
|
719
|
+
} = typeof h == "number" ? {
|
|
720
|
+
mainAxis: h,
|
|
721
721
|
crossAxis: 0,
|
|
722
722
|
alignmentAxis: null
|
|
723
723
|
} : {
|
|
724
|
-
mainAxis:
|
|
725
|
-
crossAxis:
|
|
726
|
-
alignmentAxis:
|
|
724
|
+
mainAxis: h.mainAxis || 0,
|
|
725
|
+
crossAxis: h.crossAxis || 0,
|
|
726
|
+
alignmentAxis: h.alignmentAxis
|
|
727
727
|
};
|
|
728
728
|
return s && typeof f == "number" && (g = s === "end" ? f * -1 : f), d ? {
|
|
729
729
|
x: g * c,
|
|
@@ -740,17 +740,17 @@ const Ea = function(e) {
|
|
|
740
740
|
async fn(a) {
|
|
741
741
|
var t, n;
|
|
742
742
|
const {
|
|
743
|
-
x:
|
|
744
|
-
y:
|
|
745
|
-
placement:
|
|
743
|
+
x: i,
|
|
744
|
+
y: r,
|
|
745
|
+
placement: o,
|
|
746
746
|
middlewareData: s
|
|
747
747
|
} = a, d = await Ia(a, e);
|
|
748
|
-
return
|
|
749
|
-
x:
|
|
750
|
-
y:
|
|
748
|
+
return o === ((t = s.offset) == null ? void 0 : t.placement) && (n = s.arrow) != null && n.alignmentOffset ? {} : {
|
|
749
|
+
x: i + d.x,
|
|
750
|
+
y: r + d.y,
|
|
751
751
|
data: {
|
|
752
752
|
...d,
|
|
753
|
-
placement:
|
|
753
|
+
placement: o
|
|
754
754
|
}
|
|
755
755
|
};
|
|
756
756
|
}
|
|
@@ -763,10 +763,10 @@ const Ea = function(e) {
|
|
|
763
763
|
const {
|
|
764
764
|
x: t,
|
|
765
765
|
y: n,
|
|
766
|
-
placement:
|
|
766
|
+
placement: i
|
|
767
767
|
} = a, {
|
|
768
|
-
mainAxis:
|
|
769
|
-
crossAxis:
|
|
768
|
+
mainAxis: r = !0,
|
|
769
|
+
crossAxis: o = !1,
|
|
770
770
|
limiter: s = {
|
|
771
771
|
fn: (D) => {
|
|
772
772
|
let {
|
|
@@ -783,39 +783,39 @@ const Ea = function(e) {
|
|
|
783
783
|
} = _e(e, a), l = {
|
|
784
784
|
x: t,
|
|
785
785
|
y: n
|
|
786
|
-
}, c = await vt(a, d),
|
|
787
|
-
let g = l[u], f = l[
|
|
788
|
-
if (
|
|
786
|
+
}, c = await vt(a, d), h = X(ne(i)), u = bt(h);
|
|
787
|
+
let g = l[u], f = l[h];
|
|
788
|
+
if (r) {
|
|
789
789
|
const D = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", C = g + c[D], I = g - c[m];
|
|
790
790
|
g = Be(C, g, I);
|
|
791
791
|
}
|
|
792
|
-
if (
|
|
793
|
-
const D =
|
|
792
|
+
if (o) {
|
|
793
|
+
const D = h === "y" ? "top" : "left", m = h === "y" ? "bottom" : "right", C = f + c[D], I = f - c[m];
|
|
794
794
|
f = Be(C, f, I);
|
|
795
795
|
}
|
|
796
|
-
const
|
|
796
|
+
const p = s.fn({
|
|
797
797
|
...a,
|
|
798
798
|
[u]: g,
|
|
799
|
-
[
|
|
799
|
+
[h]: f
|
|
800
800
|
});
|
|
801
801
|
return {
|
|
802
|
-
...
|
|
802
|
+
...p,
|
|
803
803
|
data: {
|
|
804
|
-
x:
|
|
805
|
-
y:
|
|
804
|
+
x: p.x - t,
|
|
805
|
+
y: p.y - n,
|
|
806
806
|
enabled: {
|
|
807
|
-
[u]:
|
|
808
|
-
[
|
|
807
|
+
[u]: r,
|
|
808
|
+
[h]: o
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
813
|
};
|
|
814
814
|
};
|
|
815
|
-
function
|
|
815
|
+
function Pe() {
|
|
816
816
|
return typeof window < "u";
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function pe(e) {
|
|
819
819
|
return Dt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
820
820
|
}
|
|
821
821
|
function F(e) {
|
|
@@ -827,16 +827,16 @@ function G(e) {
|
|
|
827
827
|
return (a = (Dt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : a.documentElement;
|
|
828
828
|
}
|
|
829
829
|
function Dt(e) {
|
|
830
|
-
return
|
|
830
|
+
return Pe() ? e instanceof Node || e instanceof F(e).Node : !1;
|
|
831
831
|
}
|
|
832
832
|
function B(e) {
|
|
833
|
-
return
|
|
833
|
+
return Pe() ? e instanceof Element || e instanceof F(e).Element : !1;
|
|
834
834
|
}
|
|
835
835
|
function K(e) {
|
|
836
|
-
return
|
|
836
|
+
return Pe() ? e instanceof HTMLElement || e instanceof F(e).HTMLElement : !1;
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
return !
|
|
838
|
+
function rt(e) {
|
|
839
|
+
return !Pe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
|
|
840
840
|
}
|
|
841
841
|
const Aa = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
842
842
|
function xe(e) {
|
|
@@ -844,17 +844,17 @@ function xe(e) {
|
|
|
844
844
|
overflow: a,
|
|
845
845
|
overflowX: t,
|
|
846
846
|
overflowY: n,
|
|
847
|
-
display:
|
|
847
|
+
display: i
|
|
848
848
|
} = Y(e);
|
|
849
|
-
return /auto|scroll|overlay|hidden|clip/.test(a + n + t) && !Aa.has(
|
|
849
|
+
return /auto|scroll|overlay|hidden|clip/.test(a + n + t) && !Aa.has(i);
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const Ta = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
852
852
|
function La(e) {
|
|
853
|
-
return
|
|
853
|
+
return Ta.has(pe(e));
|
|
854
854
|
}
|
|
855
|
-
const
|
|
856
|
-
function
|
|
857
|
-
return
|
|
855
|
+
const ka = [":popover-open", ":modal"];
|
|
856
|
+
function ze(e) {
|
|
857
|
+
return ka.some((a) => {
|
|
858
858
|
try {
|
|
859
859
|
return e.matches(a);
|
|
860
860
|
} catch {
|
|
@@ -862,17 +862,17 @@ function Pe(e) {
|
|
|
862
862
|
}
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
|
-
const $a = ["transform", "translate", "scale", "rotate", "perspective"],
|
|
865
|
+
const $a = ["transform", "translate", "scale", "rotate", "perspective"], Pa = ["transform", "translate", "scale", "rotate", "perspective", "filter"], za = ["paint", "layout", "strict", "content"];
|
|
866
866
|
function Xe(e) {
|
|
867
867
|
const a = Je(), t = B(e) ? Y(e) : e;
|
|
868
|
-
return $a.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !a && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !a && (t.filter ? t.filter !== "none" : !1) ||
|
|
868
|
+
return $a.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !a && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !a && (t.filter ? t.filter !== "none" : !1) || Pa.some((n) => (t.willChange || "").includes(n)) || za.some((n) => (t.contain || "").includes(n));
|
|
869
869
|
}
|
|
870
870
|
function Na(e) {
|
|
871
871
|
let a = J(e);
|
|
872
872
|
for (; K(a) && !ce(a); ) {
|
|
873
873
|
if (Xe(a))
|
|
874
874
|
return a;
|
|
875
|
-
if (
|
|
875
|
+
if (ze(a))
|
|
876
876
|
return null;
|
|
877
877
|
a = J(a);
|
|
878
878
|
}
|
|
@@ -883,7 +883,7 @@ function Je() {
|
|
|
883
883
|
}
|
|
884
884
|
const Fa = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
885
885
|
function ce(e) {
|
|
886
|
-
return Fa.has(
|
|
886
|
+
return Fa.has(pe(e));
|
|
887
887
|
}
|
|
888
888
|
function Y(e) {
|
|
889
889
|
return F(e).getComputedStyle(e);
|
|
@@ -898,16 +898,16 @@ function Ne(e) {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
function J(e) {
|
|
901
|
-
if (
|
|
901
|
+
if (pe(e) === "html")
|
|
902
902
|
return e;
|
|
903
903
|
const a = (
|
|
904
904
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
905
905
|
e.assignedSlot || // DOM Element detected.
|
|
906
906
|
e.parentNode || // ShadowRoot detected.
|
|
907
|
-
|
|
907
|
+
rt(e) && e.host || // Fallback.
|
|
908
908
|
G(e)
|
|
909
909
|
);
|
|
910
|
-
return
|
|
910
|
+
return rt(a) ? a.host : a;
|
|
911
911
|
}
|
|
912
912
|
function _t(e) {
|
|
913
913
|
const a = J(e);
|
|
@@ -916,12 +916,12 @@ function _t(e) {
|
|
|
916
916
|
function ue(e, a, t) {
|
|
917
917
|
var n;
|
|
918
918
|
a === void 0 && (a = []), t === void 0 && (t = !0);
|
|
919
|
-
const
|
|
920
|
-
if (
|
|
921
|
-
const s = Ve(
|
|
922
|
-
return a.concat(
|
|
919
|
+
const i = _t(e), r = i === ((n = e.ownerDocument) == null ? void 0 : n.body), o = F(i);
|
|
920
|
+
if (r) {
|
|
921
|
+
const s = Ve(o);
|
|
922
|
+
return a.concat(o, o.visualViewport || [], xe(i) ? i : [], s && t ? ue(s) : []);
|
|
923
923
|
}
|
|
924
|
-
return a.concat(
|
|
924
|
+
return a.concat(i, ue(i, [], t));
|
|
925
925
|
}
|
|
926
926
|
function Ve(e) {
|
|
927
927
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -929,8 +929,8 @@ function Ve(e) {
|
|
|
929
929
|
function wt(e) {
|
|
930
930
|
const a = Y(e);
|
|
931
931
|
let t = parseFloat(a.width) || 0, n = parseFloat(a.height) || 0;
|
|
932
|
-
const
|
|
933
|
-
return s && (t =
|
|
932
|
+
const i = K(e), r = i ? e.offsetWidth : t, o = i ? e.offsetHeight : n, s = Ie(t) !== r || Ie(n) !== o;
|
|
933
|
+
return s && (t = r, n = o), {
|
|
934
934
|
width: t,
|
|
935
935
|
height: n,
|
|
936
936
|
$: s
|
|
@@ -945,12 +945,12 @@ function se(e) {
|
|
|
945
945
|
return W(1);
|
|
946
946
|
const t = a.getBoundingClientRect(), {
|
|
947
947
|
width: n,
|
|
948
|
-
height:
|
|
949
|
-
$:
|
|
948
|
+
height: i,
|
|
949
|
+
$: r
|
|
950
950
|
} = wt(a);
|
|
951
|
-
let
|
|
952
|
-
return (!
|
|
953
|
-
x:
|
|
951
|
+
let o = (r ? Ie(t.width) : t.width) / n, s = (r ? Ie(t.height) : t.height) / i;
|
|
952
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
953
|
+
x: o,
|
|
954
954
|
y: s
|
|
955
955
|
};
|
|
956
956
|
}
|
|
@@ -965,37 +965,37 @@ function xt(e) {
|
|
|
965
965
|
function Oa(e, a, t) {
|
|
966
966
|
return a === void 0 && (a = !1), !t || a && t !== F(e) ? !1 : a;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function ie(e, a, t, n) {
|
|
969
969
|
a === void 0 && (a = !1), t === void 0 && (t = !1);
|
|
970
|
-
const
|
|
971
|
-
let
|
|
972
|
-
a && (n ? B(n) && (
|
|
973
|
-
const s = Oa(
|
|
974
|
-
let d = (
|
|
975
|
-
if (
|
|
976
|
-
const u = F(
|
|
977
|
-
let f = u,
|
|
978
|
-
for (;
|
|
979
|
-
const D = se(
|
|
980
|
-
d *= D.x, l *= D.y, c *= D.x,
|
|
970
|
+
const i = e.getBoundingClientRect(), r = Qe(e);
|
|
971
|
+
let o = W(1);
|
|
972
|
+
a && (n ? B(n) && (o = se(n)) : o = se(e));
|
|
973
|
+
const s = Oa(r, t, n) ? xt(r) : W(0);
|
|
974
|
+
let d = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, c = i.width / o.x, h = i.height / o.y;
|
|
975
|
+
if (r) {
|
|
976
|
+
const u = F(r), g = n && B(n) ? F(n) : n;
|
|
977
|
+
let f = u, p = Ve(f);
|
|
978
|
+
for (; p && n && g !== f; ) {
|
|
979
|
+
const D = se(p), m = p.getBoundingClientRect(), C = Y(p), I = m.left + (p.clientLeft + parseFloat(C.paddingLeft)) * D.x, S = m.top + (p.clientTop + parseFloat(C.paddingTop)) * D.y;
|
|
980
|
+
d *= D.x, l *= D.y, c *= D.x, h *= D.y, d += I, l += S, f = F(p), p = Ve(f);
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
983
|
return Re({
|
|
984
984
|
width: c,
|
|
985
|
-
height:
|
|
985
|
+
height: h,
|
|
986
986
|
x: d,
|
|
987
987
|
y: l
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
990
|
function Fe(e, a) {
|
|
991
991
|
const t = Ne(e).scrollLeft;
|
|
992
|
-
return a ? a.left + t :
|
|
992
|
+
return a ? a.left + t : ie(G(e)).left + t;
|
|
993
993
|
}
|
|
994
994
|
function Mt(e, a) {
|
|
995
|
-
const t = e.getBoundingClientRect(), n = t.left + a.scrollLeft - Fe(e, t),
|
|
995
|
+
const t = e.getBoundingClientRect(), n = t.left + a.scrollLeft - Fe(e, t), i = t.top + a.scrollTop;
|
|
996
996
|
return {
|
|
997
997
|
x: n,
|
|
998
|
-
y:
|
|
998
|
+
y: i
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
1001
|
function Ba(e) {
|
|
@@ -1003,21 +1003,21 @@ function Ba(e) {
|
|
|
1003
1003
|
elements: a,
|
|
1004
1004
|
rect: t,
|
|
1005
1005
|
offsetParent: n,
|
|
1006
|
-
strategy:
|
|
1006
|
+
strategy: i
|
|
1007
1007
|
} = e;
|
|
1008
|
-
const
|
|
1009
|
-
if (n ===
|
|
1008
|
+
const r = i === "fixed", o = G(n), s = a ? ze(a.floating) : !1;
|
|
1009
|
+
if (n === o || s && r)
|
|
1010
1010
|
return t;
|
|
1011
1011
|
let d = {
|
|
1012
1012
|
scrollLeft: 0,
|
|
1013
1013
|
scrollTop: 0
|
|
1014
1014
|
}, l = W(1);
|
|
1015
|
-
const c = W(0),
|
|
1016
|
-
if ((
|
|
1017
|
-
const g =
|
|
1015
|
+
const c = W(0), h = K(n);
|
|
1016
|
+
if ((h || !h && !r) && ((pe(n) !== "body" || xe(o)) && (d = Ne(n)), K(n))) {
|
|
1017
|
+
const g = ie(n);
|
|
1018
1018
|
l = se(n), c.x = g.x + n.clientLeft, c.y = g.y + n.clientTop;
|
|
1019
1019
|
}
|
|
1020
|
-
const u =
|
|
1020
|
+
const u = o && !h && !r ? Mt(o, d) : W(0);
|
|
1021
1021
|
return {
|
|
1022
1022
|
width: t.width * l.x,
|
|
1023
1023
|
height: t.height * l.y,
|
|
@@ -1029,42 +1029,42 @@ function Ya(e) {
|
|
|
1029
1029
|
return Array.from(e.getClientRects());
|
|
1030
1030
|
}
|
|
1031
1031
|
function Va(e) {
|
|
1032
|
-
const a = G(e), t = Ne(e), n = e.ownerDocument.body,
|
|
1033
|
-
let
|
|
1032
|
+
const a = G(e), t = Ne(e), n = e.ownerDocument.body, i = te(a.scrollWidth, a.clientWidth, n.scrollWidth, n.clientWidth), r = te(a.scrollHeight, a.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1033
|
+
let o = -t.scrollLeft + Fe(e);
|
|
1034
1034
|
const s = -t.scrollTop;
|
|
1035
|
-
return Y(n).direction === "rtl" && (
|
|
1036
|
-
width:
|
|
1037
|
-
height:
|
|
1038
|
-
x:
|
|
1035
|
+
return Y(n).direction === "rtl" && (o += te(a.clientWidth, n.clientWidth) - i), {
|
|
1036
|
+
width: i,
|
|
1037
|
+
height: r,
|
|
1038
|
+
x: o,
|
|
1039
1039
|
y: s
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
1042
|
const st = 25;
|
|
1043
1043
|
function qa(e, a) {
|
|
1044
|
-
const t = F(e), n = G(e),
|
|
1045
|
-
let
|
|
1046
|
-
if (
|
|
1047
|
-
|
|
1044
|
+
const t = F(e), n = G(e), i = t.visualViewport;
|
|
1045
|
+
let r = n.clientWidth, o = n.clientHeight, s = 0, d = 0;
|
|
1046
|
+
if (i) {
|
|
1047
|
+
r = i.width, o = i.height;
|
|
1048
1048
|
const c = Je();
|
|
1049
|
-
(!c || c && a === "fixed") && (s =
|
|
1049
|
+
(!c || c && a === "fixed") && (s = i.offsetLeft, d = i.offsetTop);
|
|
1050
1050
|
}
|
|
1051
1051
|
const l = Fe(n);
|
|
1052
1052
|
if (l <= 0) {
|
|
1053
|
-
const c = n.ownerDocument,
|
|
1054
|
-
f <= st && (
|
|
1055
|
-
} else l <= st && (
|
|
1053
|
+
const c = n.ownerDocument, h = c.body, u = getComputedStyle(h), g = c.compatMode === "CSS1Compat" && parseFloat(u.marginLeft) + parseFloat(u.marginRight) || 0, f = Math.abs(n.clientWidth - h.clientWidth - g);
|
|
1054
|
+
f <= st && (r -= f);
|
|
1055
|
+
} else l <= st && (r += l);
|
|
1056
1056
|
return {
|
|
1057
|
-
width:
|
|
1058
|
-
height:
|
|
1057
|
+
width: r,
|
|
1058
|
+
height: o,
|
|
1059
1059
|
x: s,
|
|
1060
1060
|
y: d
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
const Ua = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1064
1064
|
function ja(e, a) {
|
|
1065
|
-
const t =
|
|
1065
|
+
const t = ie(e, !0, a === "fixed"), n = t.top + e.clientTop, i = t.left + e.clientLeft, r = K(e) ? se(e) : W(1), o = e.clientWidth * r.x, s = e.clientHeight * r.y, d = i * r.x, l = n * r.y;
|
|
1066
1066
|
return {
|
|
1067
|
-
width:
|
|
1067
|
+
width: o,
|
|
1068
1068
|
height: s,
|
|
1069
1069
|
x: d,
|
|
1070
1070
|
y: l
|
|
@@ -1079,10 +1079,10 @@ function dt(e, a, t) {
|
|
|
1079
1079
|
else if (B(a))
|
|
1080
1080
|
n = ja(a, t);
|
|
1081
1081
|
else {
|
|
1082
|
-
const
|
|
1082
|
+
const i = xt(e);
|
|
1083
1083
|
n = {
|
|
1084
|
-
x: a.x -
|
|
1085
|
-
y: a.y -
|
|
1084
|
+
x: a.x - i.x,
|
|
1085
|
+
y: a.y - i.y,
|
|
1086
1086
|
width: a.width,
|
|
1087
1087
|
height: a.height
|
|
1088
1088
|
};
|
|
@@ -1097,12 +1097,12 @@ function Wa(e, a) {
|
|
|
1097
1097
|
const t = a.get(e);
|
|
1098
1098
|
if (t)
|
|
1099
1099
|
return t;
|
|
1100
|
-
let n = ue(e, [], !1).filter((s) => B(s) &&
|
|
1101
|
-
const
|
|
1102
|
-
let
|
|
1103
|
-
for (; B(
|
|
1104
|
-
const s = Y(
|
|
1105
|
-
!d && s.position === "fixed" && (
|
|
1100
|
+
let n = ue(e, [], !1).filter((s) => B(s) && pe(s) !== "body"), i = null;
|
|
1101
|
+
const r = Y(e).position === "fixed";
|
|
1102
|
+
let o = r ? J(e) : e;
|
|
1103
|
+
for (; B(o) && !ce(o); ) {
|
|
1104
|
+
const s = Y(o), d = Xe(o);
|
|
1105
|
+
!d && s.position === "fixed" && (i = null), (r ? !d && !i : !d && s.position === "static" && !!i && Ua.has(i.position) || xe(o) && !d && St(e, o)) ? n = n.filter((c) => c !== o) : i = s, o = J(o);
|
|
1106
1106
|
}
|
|
1107
1107
|
return a.set(e, n), n;
|
|
1108
1108
|
}
|
|
@@ -1111,12 +1111,12 @@ function Ka(e) {
|
|
|
1111
1111
|
element: a,
|
|
1112
1112
|
boundary: t,
|
|
1113
1113
|
rootBoundary: n,
|
|
1114
|
-
strategy:
|
|
1114
|
+
strategy: i
|
|
1115
1115
|
} = e;
|
|
1116
|
-
const
|
|
1117
|
-
const
|
|
1118
|
-
return l.top = te(
|
|
1119
|
-
}, dt(a, s,
|
|
1116
|
+
const o = [...t === "clippingAncestors" ? ze(a) ? [] : Wa(a, this._c) : [].concat(t), n], s = o[0], d = o.reduce((l, c) => {
|
|
1117
|
+
const h = dt(a, c, i);
|
|
1118
|
+
return l.top = te(h.top, l.top), l.right = le(h.right, l.right), l.bottom = le(h.bottom, l.bottom), l.left = te(h.left, l.left), l;
|
|
1119
|
+
}, dt(a, s, i));
|
|
1120
1120
|
return {
|
|
1121
1121
|
width: d.right - d.left,
|
|
1122
1122
|
height: d.bottom - d.top,
|
|
@@ -1135,27 +1135,27 @@ function Ga(e) {
|
|
|
1135
1135
|
};
|
|
1136
1136
|
}
|
|
1137
1137
|
function Xa(e, a, t) {
|
|
1138
|
-
const n = K(a),
|
|
1138
|
+
const n = K(a), i = G(a), r = t === "fixed", o = ie(e, !0, r, a);
|
|
1139
1139
|
let s = {
|
|
1140
1140
|
scrollLeft: 0,
|
|
1141
1141
|
scrollTop: 0
|
|
1142
1142
|
};
|
|
1143
1143
|
const d = W(0);
|
|
1144
1144
|
function l() {
|
|
1145
|
-
d.x = Fe(
|
|
1145
|
+
d.x = Fe(i);
|
|
1146
1146
|
}
|
|
1147
|
-
if (n || !n && !
|
|
1148
|
-
if ((
|
|
1149
|
-
const g =
|
|
1147
|
+
if (n || !n && !r)
|
|
1148
|
+
if ((pe(a) !== "body" || xe(i)) && (s = Ne(a)), n) {
|
|
1149
|
+
const g = ie(a, !0, r, a);
|
|
1150
1150
|
d.x = g.x + a.clientLeft, d.y = g.y + a.clientTop;
|
|
1151
|
-
} else
|
|
1152
|
-
|
|
1153
|
-
const c =
|
|
1151
|
+
} else i && l();
|
|
1152
|
+
r && !n && i && l();
|
|
1153
|
+
const c = i && !n && !r ? Mt(i, s) : W(0), h = o.left + s.scrollLeft - d.x - c.x, u = o.top + s.scrollTop - d.y - c.y;
|
|
1154
1154
|
return {
|
|
1155
|
-
x:
|
|
1155
|
+
x: h,
|
|
1156
1156
|
y: u,
|
|
1157
|
-
width:
|
|
1158
|
-
height:
|
|
1157
|
+
width: o.width,
|
|
1158
|
+
height: o.height
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
function Oe(e) {
|
|
@@ -1171,14 +1171,14 @@ function lt(e, a) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
function Ct(e, a) {
|
|
1173
1173
|
const t = F(e);
|
|
1174
|
-
if (
|
|
1174
|
+
if (ze(e))
|
|
1175
1175
|
return t;
|
|
1176
1176
|
if (!K(e)) {
|
|
1177
|
-
let
|
|
1178
|
-
for (;
|
|
1179
|
-
if (B(
|
|
1180
|
-
return
|
|
1181
|
-
|
|
1177
|
+
let i = J(e);
|
|
1178
|
+
for (; i && !ce(i); ) {
|
|
1179
|
+
if (B(i) && !Oe(i))
|
|
1180
|
+
return i;
|
|
1181
|
+
i = J(i);
|
|
1182
1182
|
}
|
|
1183
1183
|
return t;
|
|
1184
1184
|
}
|
|
@@ -1219,23 +1219,23 @@ function Et(e, a) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
function Za(e, a) {
|
|
1221
1221
|
let t = null, n;
|
|
1222
|
-
const
|
|
1223
|
-
function
|
|
1222
|
+
const i = G(e);
|
|
1223
|
+
function r() {
|
|
1224
1224
|
var s;
|
|
1225
1225
|
clearTimeout(n), (s = t) == null || s.disconnect(), t = null;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
s === void 0 && (s = !1), d === void 0 && (d = 1),
|
|
1227
|
+
function o(s, d) {
|
|
1228
|
+
s === void 0 && (s = !1), d === void 0 && (d = 1), r();
|
|
1229
1229
|
const l = e.getBoundingClientRect(), {
|
|
1230
1230
|
left: c,
|
|
1231
|
-
top:
|
|
1231
|
+
top: h,
|
|
1232
1232
|
width: u,
|
|
1233
1233
|
height: g
|
|
1234
1234
|
} = l;
|
|
1235
1235
|
if (s || a(), !u || !g)
|
|
1236
1236
|
return;
|
|
1237
|
-
const f = Me(
|
|
1238
|
-
rootMargin: -f + "px " + -
|
|
1237
|
+
const f = Me(h), p = Me(i.clientWidth - (c + u)), D = Me(i.clientHeight - (h + g)), m = Me(c), I = {
|
|
1238
|
+
rootMargin: -f + "px " + -p + "px " + -D + "px " + -m + "px",
|
|
1239
1239
|
threshold: te(0, le(1, d)) || 1
|
|
1240
1240
|
};
|
|
1241
1241
|
let S = !0;
|
|
@@ -1243,73 +1243,73 @@ function Za(e, a) {
|
|
|
1243
1243
|
const R = _[0].intersectionRatio;
|
|
1244
1244
|
if (R !== d) {
|
|
1245
1245
|
if (!S)
|
|
1246
|
-
return
|
|
1247
|
-
R ?
|
|
1248
|
-
|
|
1246
|
+
return o();
|
|
1247
|
+
R ? o(!1, R) : n = setTimeout(() => {
|
|
1248
|
+
o(!1, 1e-7);
|
|
1249
1249
|
}, 1e3);
|
|
1250
1250
|
}
|
|
1251
|
-
R === 1 && !Et(l, e.getBoundingClientRect()) &&
|
|
1251
|
+
R === 1 && !Et(l, e.getBoundingClientRect()) && o(), S = !1;
|
|
1252
1252
|
}
|
|
1253
1253
|
try {
|
|
1254
1254
|
t = new IntersectionObserver(v, {
|
|
1255
1255
|
...I,
|
|
1256
1256
|
// Handle <iframe>s
|
|
1257
|
-
root:
|
|
1257
|
+
root: i.ownerDocument
|
|
1258
1258
|
});
|
|
1259
1259
|
} catch {
|
|
1260
1260
|
t = new IntersectionObserver(v, I);
|
|
1261
1261
|
}
|
|
1262
1262
|
t.observe(e);
|
|
1263
1263
|
}
|
|
1264
|
-
return
|
|
1264
|
+
return o(!0), r;
|
|
1265
1265
|
}
|
|
1266
1266
|
function Rt(e, a, t, n) {
|
|
1267
1267
|
n === void 0 && (n = {});
|
|
1268
1268
|
const {
|
|
1269
|
-
ancestorScroll:
|
|
1270
|
-
ancestorResize:
|
|
1271
|
-
elementResize:
|
|
1269
|
+
ancestorScroll: i = !0,
|
|
1270
|
+
ancestorResize: r = !0,
|
|
1271
|
+
elementResize: o = typeof ResizeObserver == "function",
|
|
1272
1272
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1273
1273
|
animationFrame: d = !1
|
|
1274
|
-
} = n, l = Qe(e), c =
|
|
1274
|
+
} = n, l = Qe(e), c = i || r ? [...l ? ue(l) : [], ...ue(a)] : [];
|
|
1275
1275
|
c.forEach((m) => {
|
|
1276
|
-
|
|
1276
|
+
i && m.addEventListener("scroll", t, {
|
|
1277
1277
|
passive: !0
|
|
1278
|
-
}),
|
|
1278
|
+
}), r && m.addEventListener("resize", t);
|
|
1279
1279
|
});
|
|
1280
|
-
const
|
|
1280
|
+
const h = l && s ? Za(l, t) : null;
|
|
1281
1281
|
let u = -1, g = null;
|
|
1282
|
-
|
|
1282
|
+
o && (g = new ResizeObserver((m) => {
|
|
1283
1283
|
let [C] = m;
|
|
1284
1284
|
C && C.target === l && g && (g.unobserve(a), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
1285
1285
|
var I;
|
|
1286
1286
|
(I = g) == null || I.observe(a);
|
|
1287
1287
|
})), t();
|
|
1288
1288
|
}), l && !d && g.observe(l), g.observe(a));
|
|
1289
|
-
let f,
|
|
1289
|
+
let f, p = d ? ie(e) : null;
|
|
1290
1290
|
d && D();
|
|
1291
1291
|
function D() {
|
|
1292
|
-
const m =
|
|
1293
|
-
|
|
1292
|
+
const m = ie(e);
|
|
1293
|
+
p && !Et(p, m) && t(), p = m, f = requestAnimationFrame(D);
|
|
1294
1294
|
}
|
|
1295
1295
|
return t(), () => {
|
|
1296
1296
|
var m;
|
|
1297
1297
|
c.forEach((C) => {
|
|
1298
|
-
|
|
1299
|
-
}),
|
|
1298
|
+
i && C.removeEventListener("scroll", t), r && C.removeEventListener("resize", t);
|
|
1299
|
+
}), h == null || h(), (m = g) == null || m.disconnect(), g = null, d && cancelAnimationFrame(f);
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
|
-
const Ae = Ea,
|
|
1303
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1302
|
+
const Ae = Ea, Te = Ra, Ze = Sa, At = Ma, et = (e, a, t) => {
|
|
1303
|
+
const n = /* @__PURE__ */ new Map(), i = {
|
|
1304
1304
|
platform: It,
|
|
1305
1305
|
...t
|
|
1306
|
-
},
|
|
1307
|
-
...
|
|
1306
|
+
}, r = {
|
|
1307
|
+
...i.platform,
|
|
1308
1308
|
_c: n
|
|
1309
1309
|
};
|
|
1310
1310
|
return xa(e, a, {
|
|
1311
|
-
...
|
|
1312
|
-
platform:
|
|
1311
|
+
...i,
|
|
1312
|
+
platform: r
|
|
1313
1313
|
});
|
|
1314
1314
|
}, en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1315
1315
|
__proto__: null,
|
|
@@ -1320,11 +1320,11 @@ const Ae = Ea, ke = Ra, Ze = Sa, At = Ma, et = (e, a, t) => {
|
|
|
1320
1320
|
getOverflowAncestors: ue,
|
|
1321
1321
|
offset: Ae,
|
|
1322
1322
|
platform: It,
|
|
1323
|
-
shift:
|
|
1323
|
+
shift: Te
|
|
1324
1324
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1325
1325
|
let Se = null;
|
|
1326
|
-
function
|
|
1327
|
-
e.options.positioningMode !== "inline" && (H.debug("show() - adding visible class"), e.requiresApplyButton() && e.input && (e.originalInputValue = e.input.value, H.debug("show() - stored original input value:", e.originalInputValue)), e.isFirstRender && (e.renderCalendar(), e.isFirstRender = !1,
|
|
1326
|
+
function Tt(e) {
|
|
1327
|
+
e.options.positioningMode !== "inline" && (H.debug("show() - adding visible class"), e.requiresApplyButton() && e.input && (e.originalInputValue = e.input.value, H.debug("show() - stored original input value:", e.originalInputValue)), e.isFirstRender && (e.renderCalendar(), e.isFirstRender = !1, kt(e)), e.calendar.classList.add("drp-date-picker--visible"), e.isCalendarActive = !0, H.debug("show() - calendar classes:", e.calendar.className), qe(e), Se = Rt(e.input, e.calendar, () => {
|
|
1328
1328
|
qe(e);
|
|
1329
1329
|
}), e.clickOutsideHandler && setTimeout(() => {
|
|
1330
1330
|
document.addEventListener("click", e.clickOutsideHandler);
|
|
@@ -1342,12 +1342,12 @@ function Lt(e) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
function tn(e) {
|
|
1345
|
-
e.calendar.classList.contains("drp-date-picker--visible") ? Lt(e) :
|
|
1345
|
+
e.calendar.classList.contains("drp-date-picker--visible") ? Lt(e) : Tt(e);
|
|
1346
1346
|
}
|
|
1347
1347
|
async function qe(e) {
|
|
1348
1348
|
if (H.debug("position() - locked placement:", e.lockedPlacement), !e.input)
|
|
1349
1349
|
return;
|
|
1350
|
-
const a = e.lockedPlacement ? [Ae(8),
|
|
1350
|
+
const a = e.lockedPlacement ? [Ae(8), Te({ padding: 8 })] : [Ae(8), Ze(), Te({ padding: 8 })], t = await et(e.input, e.calendar, {
|
|
1351
1351
|
placement: e.lockedPlacement || e.options.calendarPlacement,
|
|
1352
1352
|
middleware: a
|
|
1353
1353
|
});
|
|
@@ -1356,25 +1356,25 @@ async function qe(e) {
|
|
|
1356
1356
|
async function an(e, a, t) {
|
|
1357
1357
|
if (!e.tooltip || !e.tooltipArrow) return;
|
|
1358
1358
|
e.currentTooltipTarget = a, e.tooltip.innerHTML = t, e.tooltip.appendChild(e.tooltipArrow), e.tooltip.classList.add("drp-date-picker__tooltip--visible");
|
|
1359
|
-
const { x: n, y:
|
|
1359
|
+
const { x: n, y: i, placement: r, middlewareData: o } = await et(a, e.tooltip, {
|
|
1360
1360
|
placement: "top",
|
|
1361
1361
|
middleware: [
|
|
1362
1362
|
Ae(6),
|
|
1363
1363
|
Ze(),
|
|
1364
|
-
|
|
1364
|
+
Te({ padding: 5 }),
|
|
1365
1365
|
At({ element: e.tooltipArrow })
|
|
1366
1366
|
]
|
|
1367
1367
|
});
|
|
1368
1368
|
if (Object.assign(e.tooltip.style, {
|
|
1369
1369
|
left: `${n}px`,
|
|
1370
|
-
top: `${
|
|
1371
|
-
}),
|
|
1372
|
-
const { x: s, y: d } =
|
|
1370
|
+
top: `${i}px`
|
|
1371
|
+
}), o.arrow) {
|
|
1372
|
+
const { x: s, y: d } = o.arrow, l = {
|
|
1373
1373
|
top: "bottom",
|
|
1374
1374
|
right: "left",
|
|
1375
1375
|
bottom: "top",
|
|
1376
1376
|
left: "right"
|
|
1377
|
-
}[
|
|
1377
|
+
}[r.split("-")[0]];
|
|
1378
1378
|
Object.assign(e.tooltipArrow.style, {
|
|
1379
1379
|
left: s != null ? `${s}px` : "",
|
|
1380
1380
|
top: d != null ? `${d}px` : "",
|
|
@@ -1399,14 +1399,14 @@ function ae(e) {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
function j(e, a, t) {
|
|
1401
1401
|
for (let n = 1; n <= 31; n++) {
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1402
|
+
const i = new Date(a, t, n);
|
|
1403
|
+
if (i.getMonth() === t && !e.isDateDisabledInternal(i))
|
|
1404
1404
|
return !0;
|
|
1405
1405
|
}
|
|
1406
1406
|
return !1;
|
|
1407
1407
|
}
|
|
1408
|
-
async function
|
|
1409
|
-
var a, t, n,
|
|
1408
|
+
async function kt(e) {
|
|
1409
|
+
var a, t, n, i;
|
|
1410
1410
|
if (e.options.beforeMonthChangedCallback) {
|
|
1411
1411
|
if (e.isMonthChanging) {
|
|
1412
1412
|
w.debug("handleInitialMonthLoad() - already changing month, skipping");
|
|
@@ -1414,16 +1414,16 @@ async function Tt(e) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
try {
|
|
1416
1416
|
if (e.isMonthChanging = !0, e.options.unifiedNavigation) {
|
|
1417
|
-
const
|
|
1418
|
-
let l = 1 / 0, c = 1 / 0,
|
|
1417
|
+
const r = e.options.unifiedNavigationAnchorIndex ?? 0, o = e.monthDates[r], s = o.getFullYear(), d = o.getMonth();
|
|
1418
|
+
let l = 1 / 0, c = 1 / 0, h = -1 / 0, u = -1 / 0;
|
|
1419
1419
|
for (let M = 0; M < e.monthDates.length; M++) {
|
|
1420
|
-
const x = e.monthDates[M], E = x.getFullYear(),
|
|
1421
|
-
(E < l || E === l &&
|
|
1420
|
+
const x = e.monthDates[M], E = x.getFullYear(), T = x.getMonth();
|
|
1421
|
+
(E < l || E === l && T < c) && (l = E, c = T), (E > h || E === h && T > u) && (h = E, u = T);
|
|
1422
1422
|
}
|
|
1423
|
-
const
|
|
1423
|
+
const p = (new Date(l, c, 1).getDay() - e.weekStartDay + 7) % 7, D = new Date(l, c, 1 - p), m = new Date(h, u + 1, 0).getDate(), I = new Date(h, u, m).getDay(), S = (e.weekStartDay + 6 - I) % 7, v = new Date(h, u, m + S), _ = {
|
|
1424
1424
|
year: s,
|
|
1425
1425
|
month: d,
|
|
1426
|
-
monthIndex:
|
|
1426
|
+
monthIndex: r,
|
|
1427
1427
|
firstVisibleDate: D,
|
|
1428
1428
|
lastVisibleDate: v
|
|
1429
1429
|
};
|
|
@@ -1434,93 +1434,93 @@ async function Tt(e) {
|
|
|
1434
1434
|
L && ae(e), w.debug(`handleInitialMonthLoad() [UNIFIED] - callback completed, metadata items: ${((a = y.metadata) == null ? void 0 : a.size) || 0}, monthHeaders: ${((t = y.monthHeaders) == null ? void 0 : t.size) || 0}`), y.metadata && (e.bulkMetadataCache = y.metadata, w.debug(`handleInitialMonthLoad() [UNIFIED] - bulk metadata cache updated with ${y.metadata.size} entries`)), y.monthHeaders && (e.monthHeadersCache = y.monthHeaders, w.debug(`handleInitialMonthLoad() [UNIFIED] - month headers cache updated with ${y.monthHeaders.size} entries`)), (y.metadata || y.monthHeaders) && e.renderCalendar();
|
|
1435
1435
|
} else {
|
|
1436
1436
|
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] - calling callback for ${e.monthDates.length} months`);
|
|
1437
|
-
const
|
|
1437
|
+
const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1438
1438
|
let s = !1;
|
|
1439
1439
|
for (let d = 0; d < e.monthDates.length; d++) {
|
|
1440
|
-
const l = e.monthDates[d], c = l.getFullYear(),
|
|
1441
|
-
D.setDate(
|
|
1440
|
+
const l = e.monthDates[d], c = l.getFullYear(), h = l.getMonth(), f = (new Date(c, h, 1).getDay() - e.weekStartDay + 7) % 7, p = new Date(c, h, 1 - f), D = new Date(p);
|
|
1441
|
+
D.setDate(p.getDate() + 41);
|
|
1442
1442
|
const m = {
|
|
1443
1443
|
year: c,
|
|
1444
|
-
month:
|
|
1444
|
+
month: h,
|
|
1445
1445
|
monthIndex: d,
|
|
1446
|
-
firstVisibleDate:
|
|
1446
|
+
firstVisibleDate: p,
|
|
1447
1447
|
lastVisibleDate: D
|
|
1448
1448
|
};
|
|
1449
|
-
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${d} - calling callback for ${c}-${
|
|
1449
|
+
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${d} - calling callback for ${c}-${h + 1}, range: ${p.toISOString().split("T")[0]} to ${D.toISOString().split("T")[0]}`);
|
|
1450
1450
|
const C = e.options.beforeMonthChangedCallback(m);
|
|
1451
1451
|
C instanceof Promise && !s && (s = !0, Le(e));
|
|
1452
1452
|
const S = await Promise.resolve(C);
|
|
1453
|
-
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${d} - callback completed, metadata items: ${((n = S.metadata) == null ? void 0 : n.size) || 0}, monthHeaders: ${((
|
|
1454
|
-
|
|
1453
|
+
w.debug(`handleInitialMonthLoad() [NON-UNIFIED] Col${d} - callback completed, metadata items: ${((n = S.metadata) == null ? void 0 : n.size) || 0}, monthHeaders: ${((i = S.monthHeaders) == null ? void 0 : i.size) || 0}`), S.metadata && S.metadata.forEach((v, _) => {
|
|
1454
|
+
r.set(_, v);
|
|
1455
1455
|
}), S.monthHeaders && S.monthHeaders.forEach((v, _) => {
|
|
1456
|
-
|
|
1456
|
+
o.set(_, v);
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
|
-
s && ae(e),
|
|
1459
|
+
s && ae(e), r.size > 0 && (e.bulkMetadataCache = r, w.debug(`handleInitialMonthLoad() [NON-UNIFIED] - combined metadata cache updated with ${r.size} entries`)), o.size > 0 && (e.monthHeadersCache = o, w.debug(`handleInitialMonthLoad() [NON-UNIFIED] - combined month headers cache updated with ${o.size} entries`)), (r.size > 0 || o.size > 0) && e.renderCalendar();
|
|
1460
1460
|
}
|
|
1461
|
-
} catch (
|
|
1462
|
-
ae(e), w.debug("handleInitialMonthLoad() - error in callback:",
|
|
1461
|
+
} catch (r) {
|
|
1462
|
+
ae(e), w.debug("handleInitialMonthLoad() - error in callback:", r), console.error("[DateRangePicker] Error in beforeMonthChangedCallback (initial load):", r);
|
|
1463
1463
|
} finally {
|
|
1464
1464
|
e.isMonthChanging = !1;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
async function Z(e, a, t, n) {
|
|
1469
|
-
var
|
|
1469
|
+
var i, r;
|
|
1470
1470
|
if (!e.options.beforeMonthChangedCallback)
|
|
1471
1471
|
return !0;
|
|
1472
1472
|
if (e.isMonthChanging)
|
|
1473
1473
|
return w.debug("handleBeforeMonthChange() - already changing month, ignoring"), !1;
|
|
1474
1474
|
try {
|
|
1475
1475
|
e.isMonthChanging = !0;
|
|
1476
|
-
let
|
|
1476
|
+
let o, s;
|
|
1477
1477
|
if (e.options.unifiedNavigation) {
|
|
1478
|
-
let u = 1 / 0, g = 1 / 0, f = -1 / 0,
|
|
1478
|
+
let u = 1 / 0, g = 1 / 0, f = -1 / 0, p = -1 / 0;
|
|
1479
1479
|
for (let R = 0; R < e.monthDates.length; R++) {
|
|
1480
1480
|
const L = e.monthDates[R], y = L.getFullYear(), M = L.getMonth();
|
|
1481
|
-
(y < u || y === u && M < g) && (u = y, g = M), (y > f || y === f && M >
|
|
1481
|
+
(y < u || y === u && M < g) && (u = y, g = M), (y > f || y === f && M > p) && (f = y, p = M);
|
|
1482
1482
|
}
|
|
1483
1483
|
const C = (new Date(u, g, 1).getDay() - e.weekStartDay + 7) % 7;
|
|
1484
|
-
|
|
1485
|
-
const I = new Date(f,
|
|
1486
|
-
s = new Date(f,
|
|
1484
|
+
o = new Date(u, g, 1 - C);
|
|
1485
|
+
const I = new Date(f, p + 1, 0).getDate(), v = new Date(f, p, I).getDay(), _ = (e.weekStartDay + 6 - v) % 7;
|
|
1486
|
+
s = new Date(f, p, I + _);
|
|
1487
1487
|
} else {
|
|
1488
1488
|
const f = (new Date(a, t, 1).getDay() - e.weekStartDay + 7) % 7;
|
|
1489
|
-
|
|
1489
|
+
o = new Date(a, t, 1 - f), s = new Date(o), s.setDate(o.getDate() + 41);
|
|
1490
1490
|
}
|
|
1491
1491
|
const d = {
|
|
1492
1492
|
year: a,
|
|
1493
1493
|
month: t,
|
|
1494
1494
|
monthIndex: n,
|
|
1495
|
-
firstVisibleDate:
|
|
1495
|
+
firstVisibleDate: o,
|
|
1496
1496
|
lastVisibleDate: s
|
|
1497
1497
|
};
|
|
1498
|
-
w.debug(`handleBeforeMonthChange() - calling callback for ${a}-${t + 1}, range: ${
|
|
1498
|
+
w.debug(`handleBeforeMonthChange() - calling callback for ${a}-${t + 1}, range: ${o.toISOString().split("T")[0]} to ${s.toISOString().split("T")[0]}`);
|
|
1499
1499
|
const l = e.options.beforeMonthChangedCallback(d), c = l instanceof Promise;
|
|
1500
1500
|
c && Le(e);
|
|
1501
|
-
const
|
|
1502
|
-
return c && ae(e),
|
|
1501
|
+
const h = await Promise.resolve(l);
|
|
1502
|
+
return c && ae(e), h.action === "block" ? (w.debug(`handleBeforeMonthChange() - navigation blocked: ${h.message || "no reason provided"}`), h.message && console.warn(`[DateRangePicker] Month navigation blocked: ${h.message}`), !1) : (w.debug(`handleBeforeMonthChange() - navigation accepted, metadata items: ${((i = h.metadata) == null ? void 0 : i.size) || 0}, monthHeaders: ${((r = h.monthHeaders) == null ? void 0 : r.size) || 0}`), h.metadata ? e.bulkMetadataCache ? (h.metadata.forEach((u, g) => {
|
|
1503
1503
|
e.bulkMetadataCache.set(g, u);
|
|
1504
|
-
}), w.debug(`handleBeforeMonthChange() - merged ${
|
|
1504
|
+
}), w.debug(`handleBeforeMonthChange() - merged ${h.metadata.size} entries into cache (total: ${e.bulkMetadataCache.size})`)) : (e.bulkMetadataCache = h.metadata, w.debug(`handleBeforeMonthChange() - bulk metadata cache created with ${h.metadata.size} entries`)) : e.bulkMetadataCache = null, h.monthHeaders && (e.monthHeadersCache ? (h.monthHeaders.forEach((u, g) => {
|
|
1505
1505
|
e.monthHeadersCache.set(g, u);
|
|
1506
|
-
}), w.debug(`handleBeforeMonthChange() - merged ${
|
|
1507
|
-
} catch (
|
|
1508
|
-
return ae(e), w.debug("handleBeforeMonthChange() - error in callback:",
|
|
1506
|
+
}), w.debug(`handleBeforeMonthChange() - merged ${h.monthHeaders.size} entries into headers cache (total: ${e.monthHeadersCache.size})`)) : (e.monthHeadersCache = h.monthHeaders, w.debug(`handleBeforeMonthChange() - month headers cache created with ${h.monthHeaders.size} entries`))), !0);
|
|
1507
|
+
} catch (o) {
|
|
1508
|
+
return ae(e), w.debug("handleBeforeMonthChange() - error in callback:", o), console.error("[DateRangePicker] Error in beforeMonthChangedCallback:", o), !1;
|
|
1509
1509
|
} finally {
|
|
1510
1510
|
e.isMonthChanging = !1;
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function on(e, a) {
|
|
1514
1514
|
e.showingRollingSelector[a] = !e.showingRollingSelector[a], e.renderCalendar();
|
|
1515
1515
|
}
|
|
1516
|
-
async function
|
|
1516
|
+
async function rn(e, a, t) {
|
|
1517
1517
|
const n = e.monthDates[t].getMonth();
|
|
1518
1518
|
if (!await Z(e, a, n, t)) {
|
|
1519
1519
|
w.debug(`selectYear() Col${t} - navigation blocked by callback`);
|
|
1520
1520
|
return;
|
|
1521
1521
|
}
|
|
1522
|
-
const
|
|
1523
|
-
e.monthDates[t].setFullYear(a), w.debug(`selectYear() Col${t} - changed from ${
|
|
1522
|
+
const r = e.monthDates[t].getFullYear();
|
|
1523
|
+
e.monthDates[t].setFullYear(a), w.debug(`selectYear() Col${t} - changed from ${r} to ${a}`), he(e, t), e.showingRollingSelector[t] = !1, e.renderCalendar();
|
|
1524
1524
|
}
|
|
1525
1525
|
async function sn(e, a, t) {
|
|
1526
1526
|
const n = e.monthDates[t].getFullYear();
|
|
@@ -1528,87 +1528,87 @@ async function sn(e, a, t) {
|
|
|
1528
1528
|
w.debug(`selectMonth() Col${t} - navigation blocked by callback`);
|
|
1529
1529
|
return;
|
|
1530
1530
|
}
|
|
1531
|
-
const
|
|
1532
|
-
e.monthDates[t].setMonth(a), w.debug(`selectMonth() Col${t} - changed from ${
|
|
1531
|
+
const r = e.monthDates[t].getMonth();
|
|
1532
|
+
e.monthDates[t].setMonth(a), w.debug(`selectMonth() Col${t} - changed from ${r + 1} to ${a + 1}`), he(e, t), e.showingRollingSelector[t] = !1, e.renderCalendar();
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1534
|
+
function he(e, a) {
|
|
1535
1535
|
const t = e.monthDates[a];
|
|
1536
1536
|
if (a < e.monthDates.length - 1) {
|
|
1537
1537
|
const n = e.monthDates[a + 1];
|
|
1538
|
-
if (
|
|
1538
|
+
if (ke(t, n)) {
|
|
1539
1539
|
w.debug(`checkAndResolveCollisions() Col${a} - collision with Col${a + 1}, shifting forward`);
|
|
1540
|
-
const
|
|
1541
|
-
e.monthDates[a + 1] =
|
|
1540
|
+
const i = new Date(t.getFullYear(), t.getMonth() + 1, 1);
|
|
1541
|
+
e.monthDates[a + 1] = i, he(e, a + 1);
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
if (a > 0) {
|
|
1545
1545
|
const n = e.monthDates[a - 1];
|
|
1546
|
-
if (
|
|
1546
|
+
if (ke(n, t)) {
|
|
1547
1547
|
w.debug(`checkAndResolveCollisions() Col${a} - collision with Col${a - 1}, shifting backward`);
|
|
1548
|
-
const
|
|
1549
|
-
e.monthDates[a - 1] =
|
|
1548
|
+
const i = new Date(t.getFullYear(), t.getMonth() - 1, 1);
|
|
1549
|
+
e.monthDates[a - 1] = i, he(e, a - 1);
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1554
|
-
const t = e.getFullYear(), n = e.getMonth(),
|
|
1555
|
-
return t >
|
|
1553
|
+
function ke(e, a) {
|
|
1554
|
+
const t = e.getFullYear(), n = e.getMonth(), i = a.getFullYear(), r = a.getMonth();
|
|
1555
|
+
return t > i || t === i && n >= r;
|
|
1556
1556
|
}
|
|
1557
|
-
async function
|
|
1557
|
+
async function ye(e, a) {
|
|
1558
1558
|
const t = isNaN(a) ? e.activeMonthIndex : a;
|
|
1559
1559
|
e.showingRollingSelector[t] && (e.showingRollingSelector[t] = !1);
|
|
1560
|
-
const n = e.monthDates[t],
|
|
1561
|
-
if (!j(e,
|
|
1560
|
+
const n = e.monthDates[t], i = new Date(n.getFullYear(), n.getMonth() - 1, 1);
|
|
1561
|
+
if (!j(e, i.getFullYear(), i.getMonth())) {
|
|
1562
1562
|
w.debug(`prevMonth() Col${t} - navigation blocked: target month has no enabled days`);
|
|
1563
1563
|
return;
|
|
1564
1564
|
}
|
|
1565
|
-
if (!await Z(e,
|
|
1565
|
+
if (!await Z(e, i.getFullYear(), i.getMonth(), t)) {
|
|
1566
1566
|
w.debug(`prevMonth() Col${t} - navigation blocked by callback`);
|
|
1567
1567
|
return;
|
|
1568
1568
|
}
|
|
1569
|
-
if (e.monthDates[t] =
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1569
|
+
if (e.monthDates[t] = i, w.debug(`prevMonth() Col${t} - changed from ${n.getFullYear()}-${n.getMonth() + 1} to ${i.getFullYear()}-${i.getMonth() + 1}`), t > 0) {
|
|
1570
|
+
const o = e.monthDates[t - 1];
|
|
1571
|
+
ke(o, i) && (w.debug(`prevMonth() Col${t} - collision detected with Col${t - 1}, shifting previous columns back`), await ye(e, t - 1));
|
|
1572
1572
|
}
|
|
1573
1573
|
e.renderCalendar();
|
|
1574
1574
|
}
|
|
1575
|
-
async function
|
|
1575
|
+
async function ve(e, a) {
|
|
1576
1576
|
const t = isNaN(a) ? e.activeMonthIndex : a;
|
|
1577
1577
|
e.showingRollingSelector[t] && (e.showingRollingSelector[t] = !1);
|
|
1578
|
-
const n = e.monthDates[t],
|
|
1579
|
-
if (!j(e,
|
|
1578
|
+
const n = e.monthDates[t], i = new Date(n.getFullYear(), n.getMonth() + 1, 1);
|
|
1579
|
+
if (!j(e, i.getFullYear(), i.getMonth())) {
|
|
1580
1580
|
w.debug(`nextMonth() Col${t} - navigation blocked: target month has no enabled days`);
|
|
1581
1581
|
return;
|
|
1582
1582
|
}
|
|
1583
|
-
if (!await Z(e,
|
|
1583
|
+
if (!await Z(e, i.getFullYear(), i.getMonth(), t)) {
|
|
1584
1584
|
w.debug(`nextMonth() Col${t} - navigation blocked by callback`);
|
|
1585
1585
|
return;
|
|
1586
1586
|
}
|
|
1587
|
-
if (e.monthDates[t] =
|
|
1588
|
-
const
|
|
1589
|
-
|
|
1587
|
+
if (e.monthDates[t] = i, w.debug(`nextMonth() Col${t} - changed from ${n.getFullYear()}-${n.getMonth() + 1} to ${i.getFullYear()}-${i.getMonth() + 1}`), t < e.monthDates.length - 1) {
|
|
1588
|
+
const o = e.monthDates[t + 1];
|
|
1589
|
+
ke(i, o) && (w.debug(`nextMonth() Col${t} - collision detected with Col${t + 1}, shifting next columns forward`), await ve(e, t + 1));
|
|
1590
1590
|
}
|
|
1591
1591
|
e.renderCalendar();
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1594
|
-
let
|
|
1593
|
+
function me(e, a, t, n, i) {
|
|
1594
|
+
let r = a, o = 0;
|
|
1595
1595
|
const s = 60;
|
|
1596
|
-
for (;
|
|
1597
|
-
if (
|
|
1598
|
-
const l = n[
|
|
1596
|
+
for (; o < s; ) {
|
|
1597
|
+
if (r >= 0 && r < n.length) {
|
|
1598
|
+
const l = n[r].dataset.date;
|
|
1599
1599
|
if (l) {
|
|
1600
|
-
const [c,
|
|
1600
|
+
const [c, h, u] = l.split("-").map(Number), g = new Date(c, h - 1, u);
|
|
1601
1601
|
if (!e.isDateDisabledInternal(g))
|
|
1602
|
-
return { index:
|
|
1602
|
+
return { index: r, monthChanged: !1 };
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
|
-
if (
|
|
1605
|
+
if (r += t, o++, r < 0 || r >= n.length)
|
|
1606
1606
|
return { index: null, monthChanged: !0, direction: t > 0 ? "next" : "prev" };
|
|
1607
1607
|
}
|
|
1608
1608
|
return { index: null, monthChanged: !1 };
|
|
1609
1609
|
}
|
|
1610
1610
|
function dn(e, a) {
|
|
1611
|
-
var
|
|
1611
|
+
var o, s, d, l;
|
|
1612
1612
|
w.debug(`moveFocus(${a}) Col${e.activeMonthIndex} - focusedDayIndex:`, e.focusedDayIndex);
|
|
1613
1613
|
const t = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${e.activeMonthIndex}"]`);
|
|
1614
1614
|
if (!t) {
|
|
@@ -1618,84 +1618,84 @@ function dn(e, a) {
|
|
|
1618
1618
|
const n = t.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
1619
1619
|
if (w.debug(`moveFocus() Col${e.activeMonthIndex} - found ${n.length} days in column`), n.length === 0) return;
|
|
1620
1620
|
if (e.focusedDayIndex === null) {
|
|
1621
|
-
const c = Array.from(n).findIndex((
|
|
1621
|
+
const c = Array.from(n).findIndex((h) => h.classList.contains("drp-date-picker__day--today"));
|
|
1622
1622
|
e.focusedDayIndex = c !== -1 ? c : 0, w.debug(`moveFocus() Col${e.activeMonthIndex} - initialized focusedDayIndex to ${e.focusedDayIndex} (today or first day), will move by offset ${a}`);
|
|
1623
1623
|
}
|
|
1624
|
-
(
|
|
1625
|
-
const
|
|
1626
|
-
if (
|
|
1624
|
+
(o = n[e.focusedDayIndex]) == null || o.classList.remove("drp-date-picker__day--focused");
|
|
1625
|
+
const i = e.focusedDayIndex + a;
|
|
1626
|
+
if (i < 0) {
|
|
1627
1627
|
const c = e.activeMonthIndex;
|
|
1628
1628
|
if (a === -1)
|
|
1629
|
-
w.debug(`moveFocus() Col${c} - edge navigation LEFT: going to last enabled day of prev month`),
|
|
1630
|
-
var f,
|
|
1631
|
-
const
|
|
1632
|
-
if (!
|
|
1633
|
-
const u =
|
|
1634
|
-
g.index !== null && (e.focusedDayIndex = g.index, (f = u[e.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (
|
|
1629
|
+
w.debug(`moveFocus() Col${c} - edge navigation LEFT: going to last enabled day of prev month`), ye(e, e.activeMonthIndex), setTimeout(() => {
|
|
1630
|
+
var f, p;
|
|
1631
|
+
const h = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1632
|
+
if (!h) return;
|
|
1633
|
+
const u = h.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = me(e, u.length - 1, -1, u);
|
|
1634
|
+
g.index !== null && (e.focusedDayIndex = g.index, (f = u[e.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (p = u[e.focusedDayIndex]) == null || p.scrollIntoView({ block: "nearest" }));
|
|
1635
1635
|
}, 0);
|
|
1636
1636
|
else {
|
|
1637
1637
|
const u = n[e.focusedDayIndex].dataset.date;
|
|
1638
1638
|
if (u) {
|
|
1639
|
-
const [g, f,
|
|
1640
|
-
w.debug(`moveFocus() Col${c} - edge navigation UP: current day ${
|
|
1639
|
+
const [g, f, p] = u.split("-").map(Number), m = new Date(g, f - 1, p).getDay();
|
|
1640
|
+
w.debug(`moveFocus() Col${c} - edge navigation UP: current day ${p} is weekday ${m}, going to prev month`), ye(e, e.activeMonthIndex), setTimeout(() => {
|
|
1641
1641
|
var _, R;
|
|
1642
1642
|
const C = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1643
1643
|
if (!C) return;
|
|
1644
1644
|
const I = C.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), v = I[I.length - 1].dataset.date;
|
|
1645
1645
|
if (v) {
|
|
1646
|
-
const [L, y, M] = v.split("-").map(Number), E = new Date(L, y - 1, M).getDay(),
|
|
1647
|
-
e.focusedDayIndex = I.length - 1 -
|
|
1646
|
+
const [L, y, M] = v.split("-").map(Number), E = new Date(L, y - 1, M).getDay(), T = (E - m + 7) % 7;
|
|
1647
|
+
e.focusedDayIndex = I.length - 1 - T, w.debug(`moveFocus() Col${c} - last day weekday ${E}, target ${m}, focusing on day ${e.focusedDayIndex + 1}`), (_ = I[e.focusedDayIndex]) == null || _.classList.add("drp-date-picker__day--focused"), (R = I[e.focusedDayIndex]) == null || R.scrollIntoView({ block: "nearest" });
|
|
1648
1648
|
}
|
|
1649
1649
|
}, 0);
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
1652
|
return;
|
|
1653
|
-
} else if (
|
|
1653
|
+
} else if (i >= n.length) {
|
|
1654
1654
|
const c = e.activeMonthIndex;
|
|
1655
1655
|
if (a === 1)
|
|
1656
|
-
w.debug(`moveFocus() Col${c} - edge navigation RIGHT: going to first enabled day of next month`),
|
|
1657
|
-
var f,
|
|
1658
|
-
const
|
|
1659
|
-
if (!
|
|
1660
|
-
const u =
|
|
1661
|
-
g.index !== null && (e.focusedDayIndex = g.index, (f = u[e.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (
|
|
1656
|
+
w.debug(`moveFocus() Col${c} - edge navigation RIGHT: going to first enabled day of next month`), ve(e, e.activeMonthIndex), setTimeout(() => {
|
|
1657
|
+
var f, p;
|
|
1658
|
+
const h = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1659
|
+
if (!h) return;
|
|
1660
|
+
const u = h.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = me(e, 0, 1, u);
|
|
1661
|
+
g.index !== null && (e.focusedDayIndex = g.index, (f = u[e.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (p = u[e.focusedDayIndex]) == null || p.scrollIntoView({ block: "nearest" }));
|
|
1662
1662
|
}, 0);
|
|
1663
1663
|
else {
|
|
1664
1664
|
const u = n[e.focusedDayIndex].dataset.date;
|
|
1665
1665
|
if (u) {
|
|
1666
|
-
const [g, f,
|
|
1667
|
-
w.debug(`moveFocus() Col${c} - edge navigation DOWN: current day ${
|
|
1666
|
+
const [g, f, p] = u.split("-").map(Number), m = new Date(g, f - 1, p).getDay();
|
|
1667
|
+
w.debug(`moveFocus() Col${c} - edge navigation DOWN: current day ${p} is weekday ${m}, going to next month`), ve(e, e.activeMonthIndex), setTimeout(() => {
|
|
1668
1668
|
var _, R;
|
|
1669
1669
|
const C = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1670
1670
|
if (!C) return;
|
|
1671
1671
|
const I = C.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), v = I[0].dataset.date;
|
|
1672
1672
|
if (v) {
|
|
1673
|
-
const [L, y, M] = v.split("-").map(Number), E = new Date(L, y - 1, M).getDay(),
|
|
1674
|
-
e.focusedDayIndex =
|
|
1673
|
+
const [L, y, M] = v.split("-").map(Number), E = new Date(L, y - 1, M).getDay(), T = (m - E + 7) % 7;
|
|
1674
|
+
e.focusedDayIndex = T, w.debug(`moveFocus() Col${c} - first day weekday ${E}, target ${m}, focusing on day ${e.focusedDayIndex + 1}`), (_ = I[e.focusedDayIndex]) == null || _.classList.add("drp-date-picker__day--focused"), (R = I[e.focusedDayIndex]) == null || R.scrollIntoView({ block: "nearest" });
|
|
1675
1675
|
}
|
|
1676
1676
|
}, 0);
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
1679
|
return;
|
|
1680
1680
|
}
|
|
1681
|
-
const
|
|
1682
|
-
if (
|
|
1681
|
+
const r = me(e, i, a, n, e.activeMonthIndex);
|
|
1682
|
+
if (r.monthChanged) {
|
|
1683
1683
|
const c = e.activeMonthIndex;
|
|
1684
|
-
|
|
1685
|
-
var f,
|
|
1686
|
-
const
|
|
1687
|
-
if (!
|
|
1688
|
-
const u =
|
|
1684
|
+
r.direction === "next" ? ve(e, e.activeMonthIndex) : ye(e, e.activeMonthIndex), setTimeout(() => {
|
|
1685
|
+
var f, p;
|
|
1686
|
+
const h = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${c}"] .drp-date-picker__days`);
|
|
1687
|
+
if (!h) return;
|
|
1688
|
+
const u = h.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), g = me(
|
|
1689
1689
|
e,
|
|
1690
|
-
|
|
1690
|
+
r.direction === "next" ? 0 : u.length - 1,
|
|
1691
1691
|
a,
|
|
1692
1692
|
u
|
|
1693
1693
|
);
|
|
1694
|
-
g.index !== null && (e.focusedDayIndex = g.index, (f = u[e.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (
|
|
1694
|
+
g.index !== null && (e.focusedDayIndex = g.index, (f = u[e.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (p = u[e.focusedDayIndex]) == null || p.scrollIntoView({ block: "nearest" }));
|
|
1695
1695
|
}, 0);
|
|
1696
1696
|
return;
|
|
1697
1697
|
}
|
|
1698
|
-
|
|
1698
|
+
r.index !== null ? (e.focusedDayIndex = r.index, (s = n[e.focusedDayIndex]) == null || s.classList.add("drp-date-picker__day--focused"), (d = n[e.focusedDayIndex]) == null || d.scrollIntoView({ block: "nearest" })) : (w.debug("moveFocus() - no enabled day found in search range"), (l = n[e.focusedDayIndex]) == null || l.classList.add("drp-date-picker__day--focused"));
|
|
1699
1699
|
}
|
|
1700
1700
|
async function ln(e) {
|
|
1701
1701
|
if (!e.options.unifiedNavigation) return;
|
|
@@ -1705,9 +1705,9 @@ async function ln(e) {
|
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
1707
|
if (await Z(e, n.getFullYear(), n.getMonth(), a)) {
|
|
1708
|
-
for (let
|
|
1709
|
-
const
|
|
1710
|
-
e.monthDates[
|
|
1708
|
+
for (let r = 0; r < e.monthDates.length; r++) {
|
|
1709
|
+
const o = r - a;
|
|
1710
|
+
e.monthDates[r] = new Date(n.getFullYear(), n.getMonth() + o, 1);
|
|
1711
1711
|
}
|
|
1712
1712
|
e.renderCalendar();
|
|
1713
1713
|
}
|
|
@@ -1720,9 +1720,9 @@ async function cn(e) {
|
|
|
1720
1720
|
return;
|
|
1721
1721
|
}
|
|
1722
1722
|
if (await Z(e, n.getFullYear(), n.getMonth(), a)) {
|
|
1723
|
-
for (let
|
|
1724
|
-
const
|
|
1725
|
-
e.monthDates[
|
|
1723
|
+
for (let r = 0; r < e.monthDates.length; r++) {
|
|
1724
|
+
const o = r - a;
|
|
1725
|
+
e.monthDates[r] = new Date(n.getFullYear(), n.getMonth() + o, 1);
|
|
1726
1726
|
}
|
|
1727
1727
|
e.renderCalendar();
|
|
1728
1728
|
}
|
|
@@ -1731,23 +1731,23 @@ async function un(e, a) {
|
|
|
1731
1731
|
if (!e.options.unifiedNavigation) return;
|
|
1732
1732
|
const t = e.options.unifiedNavigationAnchorIndex ?? 0, n = e.monthDates[t].getFullYear();
|
|
1733
1733
|
if (w.debug(`setUnifiedMonth(${a}) - anchor index: ${t}, year: ${n}`), !!await Z(e, n, a, t)) {
|
|
1734
|
-
for (let
|
|
1735
|
-
const
|
|
1736
|
-
e.monthDates[
|
|
1734
|
+
for (let r = 0; r < e.monthDates.length; r++) {
|
|
1735
|
+
const o = r - t;
|
|
1736
|
+
e.monthDates[r] = new Date(n, a + o, 1);
|
|
1737
1737
|
}
|
|
1738
1738
|
e.showingUnifiedRollingSelector = !1, e.renderCalendar();
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1741
|
+
function hn(e) {
|
|
1742
1742
|
e.options.unifiedNavigation && (e.showingUnifiedRollingSelector = !e.showingUnifiedRollingSelector, w.debug(`toggleUnifiedRollingSelector() - now ${e.showingUnifiedRollingSelector ? "visible" : "hidden"}`), e.renderCalendar());
|
|
1743
1743
|
}
|
|
1744
1744
|
async function gn(e, a) {
|
|
1745
1745
|
if (!e.options.unifiedNavigation) return;
|
|
1746
1746
|
const t = e.options.unifiedNavigationAnchorIndex ?? 0, n = e.monthDates[t].getMonth();
|
|
1747
1747
|
if (w.debug(`setUnifiedYear(${a}) - anchor index: ${t}, month: ${n}`), !!await Z(e, a, n, t)) {
|
|
1748
|
-
for (let
|
|
1749
|
-
const
|
|
1750
|
-
e.monthDates[
|
|
1748
|
+
for (let r = 0; r < e.monthDates.length; r++) {
|
|
1749
|
+
const o = r - t;
|
|
1750
|
+
e.monthDates[r] = new Date(a, n + o, 1);
|
|
1751
1751
|
}
|
|
1752
1752
|
e.showingUnifiedRollingSelector = !1, e.renderCalendar();
|
|
1753
1753
|
}
|
|
@@ -1755,29 +1755,29 @@ async function gn(e, a) {
|
|
|
1755
1755
|
function $t(e, a, t) {
|
|
1756
1756
|
if (!e) {
|
|
1757
1757
|
if (t != null && t.normalizedMinDate || t != null && t.normalizedMaxDate) {
|
|
1758
|
-
const n = t.normalizedMinDate ? t.normalizedMinDate.getFullYear() : a - 1,
|
|
1759
|
-
return { min: n, max:
|
|
1758
|
+
const n = t.normalizedMinDate ? t.normalizedMinDate.getFullYear() : a - 1, i = t.normalizedMaxDate ? t.normalizedMaxDate.getFullYear() : a + 1;
|
|
1759
|
+
return { min: n, max: i };
|
|
1760
1760
|
}
|
|
1761
1761
|
return { min: a - 1, max: a + 1 };
|
|
1762
1762
|
}
|
|
1763
1763
|
if (e.includes("-")) {
|
|
1764
|
-
const [n,
|
|
1765
|
-
return { min: parseInt(n, 10), max: parseInt(
|
|
1764
|
+
const [n, i] = e.split("-");
|
|
1765
|
+
return { min: parseInt(n, 10), max: parseInt(i, 10) };
|
|
1766
1766
|
} else {
|
|
1767
1767
|
const n = parseInt(e, 10);
|
|
1768
1768
|
return { min: n, max: n };
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function Pt(e) {
|
|
1772
1772
|
if (!e)
|
|
1773
1773
|
return { min: 1, max: 12 };
|
|
1774
1774
|
const [a, t] = e.split("-");
|
|
1775
1775
|
return { min: parseInt(a, 10), max: parseInt(t, 10) };
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function pn(e) {
|
|
1778
1778
|
de.debug("[DatePicker 18] renderCalendar called, showingRollingSelector:", e.showingRollingSelector, `activeCol: ${e.activeMonthIndex}`), de.debug("[DatePicker 18] monthDates array:", e.monthDates.map((a, t) => `Col${t}: ${a.getFullYear()}-${a.getMonth() + 1}`).join(", ")), e.options.unifiedNavigation && e.showingUnifiedRollingSelector && mn(e);
|
|
1779
1779
|
for (let a = 0; a < e.options.visibleMonthsCount; a++)
|
|
1780
|
-
e.showingRollingSelector[a] ? Ft(e, a) :
|
|
1780
|
+
e.showingRollingSelector[a] ? Ft(e, a) : zt(e, a);
|
|
1781
1781
|
if (e.focusedDayIndex !== null) {
|
|
1782
1782
|
const a = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${e.activeMonthIndex}"]`);
|
|
1783
1783
|
if (a) {
|
|
@@ -1787,23 +1787,23 @@ function hn(e) {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
e.options.selectionMode === "range" && !e.isDragging && e.initDragListeners(), e.actionsContainer && e.renderButtons(e.actionsContainer);
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function zt(e, a) {
|
|
1791
1791
|
var I;
|
|
1792
1792
|
de.debug(`[DatePicker Col${a} 19] renderNormalView called for month`, a);
|
|
1793
1793
|
const t = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${a}"]`);
|
|
1794
1794
|
if (!t) return;
|
|
1795
1795
|
const n = t.querySelector(".drp-date-picker__rolling-selector");
|
|
1796
1796
|
n == null || n.classList.remove("drp-date-picker__rolling-selector--visible");
|
|
1797
|
-
const
|
|
1797
|
+
const i = e.monthDates[a], r = i.getFullYear(), o = i.getMonth(), s = e.monthNames[o], d = t.querySelector(".drp-date-picker__month-year");
|
|
1798
1798
|
if (d) {
|
|
1799
|
-
const S = `${
|
|
1799
|
+
const S = `${r}-${String(o).padStart(2, "0")}`;
|
|
1800
1800
|
let v;
|
|
1801
1801
|
(I = e.monthHeadersCache) != null && I.has(S) ? v = e.monthHeadersCache.get(S) : e.options.getMonthHeaderCallback ? v = e.options.getMonthHeaderCallback({
|
|
1802
|
-
month:
|
|
1802
|
+
month: i,
|
|
1803
1803
|
monthIndex: a,
|
|
1804
1804
|
monthName: s,
|
|
1805
|
-
year:
|
|
1806
|
-
}) : v = `${s} ${
|
|
1805
|
+
year: r
|
|
1806
|
+
}) : v = `${s} ${r}`, d.textContent = v;
|
|
1807
1807
|
}
|
|
1808
1808
|
if (e.options.unifiedNavigation && a === 0 && e.unifiedRangeDisplay) {
|
|
1809
1809
|
e.unifiedRollingSelector && !e.showingUnifiedRollingSelector && e.unifiedRollingSelector.classList.remove("drp-date-picker__unified-rolling-selector--visible");
|
|
@@ -1824,27 +1824,27 @@ function Pt(e, a) {
|
|
|
1824
1824
|
if (L) {
|
|
1825
1825
|
const y = S.getMonth() === 0 ? S.getFullYear() - 1 : S.getFullYear(), M = S.getMonth() === 0 ? 11 : S.getMonth() - 1, x = L.querySelector(".drp-date-picker__nav--prev");
|
|
1826
1826
|
x && (j(e, y, M) ? (x.removeAttribute("disabled"), x.classList.remove("drp-date-picker__nav--disabled")) : (x.setAttribute("disabled", "true"), x.classList.add("drp-date-picker__nav--disabled")));
|
|
1827
|
-
const E = v.getMonth() === 11 ? v.getFullYear() + 1 : v.getFullYear(),
|
|
1828
|
-
A && (j(e, E,
|
|
1827
|
+
const E = v.getMonth() === 11 ? v.getFullYear() + 1 : v.getFullYear(), T = v.getMonth() === 11 ? 0 : v.getMonth() + 1, A = L.querySelector(".drp-date-picker__nav--next");
|
|
1828
|
+
A && (j(e, E, T) ? (A.removeAttribute("disabled"), A.classList.remove("drp-date-picker__nav--disabled")) : (A.setAttribute("disabled", "true"), A.classList.add("drp-date-picker__nav--disabled")));
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
const l =
|
|
1832
|
-
g && (j(e, u,
|
|
1833
|
-
const f = c === 11 ? 0 : c + 1,
|
|
1834
|
-
D && (j(e,
|
|
1831
|
+
const l = i.getFullYear(), c = i.getMonth(), h = c === 0 ? 11 : c - 1, u = c === 0 ? l - 1 : l, g = t.querySelector(".drp-date-picker__nav--prev");
|
|
1832
|
+
g && (j(e, u, h) ? (g.removeAttribute("disabled"), g.classList.remove("drp-date-picker__nav--disabled")) : (g.setAttribute("disabled", "true"), g.classList.add("drp-date-picker__nav--disabled")));
|
|
1833
|
+
const f = c === 11 ? 0 : c + 1, p = c === 11 ? l + 1 : l, D = t.querySelector(".drp-date-picker__nav--next");
|
|
1834
|
+
D && (j(e, p, f) ? (D.removeAttribute("disabled"), D.classList.remove("drp-date-picker__nav--disabled")) : (D.setAttribute("disabled", "true"), D.classList.add("drp-date-picker__nav--disabled")));
|
|
1835
1835
|
const m = t.querySelector(".drp-date-picker__weekdays"), C = [
|
|
1836
1836
|
...e.weekdayNames.slice(e.weekStartDay),
|
|
1837
1837
|
...e.weekdayNames.slice(0, e.weekStartDay)
|
|
1838
1838
|
];
|
|
1839
|
-
m && (m.innerHTML = C.map((S) => `<div class="drp-date-picker__weekday">${S}</div>`).join("")), Nt(e, a,
|
|
1839
|
+
m && (m.innerHTML = C.map((S) => `<div class="drp-date-picker__weekday">${S}</div>`).join("")), Nt(e, a, i);
|
|
1840
1840
|
}
|
|
1841
1841
|
function Nt(e, a, t) {
|
|
1842
1842
|
de.debug(`[DatePicker Col${a} 20] renderDays called for month`, a);
|
|
1843
1843
|
const n = e.calendar.querySelector(`.drp-date-picker__month[data-month-index="${a}"]`);
|
|
1844
1844
|
if (!n) return;
|
|
1845
|
-
const
|
|
1846
|
-
de.debug(`[DatePicker Col${a} 21] Rendering days for:`,
|
|
1847
|
-
const d = (new Date(
|
|
1845
|
+
const i = n.querySelector(".drp-date-picker__days"), r = t.getFullYear(), o = t.getMonth();
|
|
1846
|
+
de.debug(`[DatePicker Col${a} 21] Rendering days for:`, r, o + 1);
|
|
1847
|
+
const d = (new Date(r, o, 1).getDay() - e.weekStartDay + 7) % 7, l = new Date(r, o + 1, 0).getDate(), c = new Date(r, o, 0).getDate(), h = new Date(r, o - 1, 1), u = h.getFullYear(), g = h.getMonth(), f = new Date(r, o + 1, 1), p = f.getFullYear(), D = f.getMonth(), m = [];
|
|
1848
1848
|
for (let _ = d - 1; _ >= 0; _--) {
|
|
1849
1849
|
const R = c - _, L = new Date(u, g, R);
|
|
1850
1850
|
m.push({
|
|
@@ -1856,21 +1856,21 @@ function Nt(e, a, t) {
|
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
1858
1858
|
for (let _ = 1; _ <= l; _++) {
|
|
1859
|
-
const R = new Date(
|
|
1859
|
+
const R = new Date(r, o, _);
|
|
1860
1860
|
m.push({
|
|
1861
1861
|
date: R,
|
|
1862
|
-
year:
|
|
1863
|
-
month:
|
|
1862
|
+
year: r,
|
|
1863
|
+
month: o,
|
|
1864
1864
|
day: _,
|
|
1865
1865
|
isOtherMonth: !1
|
|
1866
1866
|
});
|
|
1867
1867
|
}
|
|
1868
1868
|
const I = Math.ceil((d + l) / 7) * 7 - (d + l);
|
|
1869
1869
|
for (let _ = 1; _ <= I; _++) {
|
|
1870
|
-
const R = new Date(
|
|
1870
|
+
const R = new Date(p, D, _);
|
|
1871
1871
|
m.push({
|
|
1872
1872
|
date: R,
|
|
1873
|
-
year:
|
|
1873
|
+
year: p,
|
|
1874
1874
|
month: D,
|
|
1875
1875
|
day: _,
|
|
1876
1876
|
isOtherMonth: !0
|
|
@@ -1885,9 +1885,9 @@ function Nt(e, a, t) {
|
|
|
1885
1885
|
const M = e.getDateInfoInternal(y.date);
|
|
1886
1886
|
let x = (M == null ? void 0 : M.badgeTooltip) || "";
|
|
1887
1887
|
if (e.options.badgeTooltipCallback && (M != null && M.badgeText)) {
|
|
1888
|
-
const
|
|
1888
|
+
const T = {
|
|
1889
1889
|
date: y.date,
|
|
1890
|
-
dateString:
|
|
1890
|
+
dateString: be(y.date),
|
|
1891
1891
|
dayNumber: y.day,
|
|
1892
1892
|
isDisabled: e.isDateDisabledInternal(y.date),
|
|
1893
1893
|
isSelected: !1,
|
|
@@ -1901,7 +1901,7 @@ function Nt(e, a, t) {
|
|
|
1901
1901
|
element: null,
|
|
1902
1902
|
// Not available during string rendering
|
|
1903
1903
|
picker: e
|
|
1904
|
-
}, A = e.options.badgeTooltipCallback(
|
|
1904
|
+
}, A = e.options.badgeTooltipCallback(T);
|
|
1905
1905
|
A !== null && (x = A);
|
|
1906
1906
|
}
|
|
1907
1907
|
return {
|
|
@@ -1926,23 +1926,23 @@ function Nt(e, a, t) {
|
|
|
1926
1926
|
y.isOtherMonth && M.push("drp-date-picker__day--other-month");
|
|
1927
1927
|
const x = e.getDateInfoInternal(y.date), E = x && x.isDisabled !== void 0 ? x.isDisabled : e.isDateDisabledInternal(y.date);
|
|
1928
1928
|
E && M.push("drp-date-picker__day--disabled"), x && x.dayClass && M.push(x.dayClass), e.isToday(y.date) && M.push("drp-date-picker__day--today");
|
|
1929
|
-
let
|
|
1930
|
-
e.options.selectionMode === "single" ?
|
|
1929
|
+
let T = !1;
|
|
1930
|
+
e.options.selectionMode === "single" ? T = e.isSameDay(y.date, e.selectedDate) : e.options.selectionMode === "multiple" && (T = e.selectedDates.some((q) => e.isSameDay(y.date, q))), T && M.push("drp-date-picker__day--selected");
|
|
1931
1931
|
let A = !1, $ = !1, N = !1;
|
|
1932
1932
|
if (e.options.selectionMode === "range")
|
|
1933
1933
|
A = e.isSameDay(y.date, e.selectedStartDate), $ = e.isSameDay(y.date, e.selectedEndDate), N = e.isInRange(y.date), A && M.push("drp-date-picker__day--range-start"), $ && M.push("drp-date-picker__day--range-end"), N && (!E || e.options.highlightDisabledInRange) && M.push("drp-date-picker__day--in-range");
|
|
1934
1934
|
else if (e.options.selectionMode === "multiple")
|
|
1935
1935
|
for (const q of e.selectedRanges)
|
|
1936
1936
|
e.isSameDay(y.date, q.start) && (A = !0, M.push("drp-date-picker__day--range-start")), e.isSameDay(y.date, q.end) && ($ = !0, M.push("drp-date-picker__day--range-end")), y.date >= q.start && y.date <= q.end && (N = !0, (!E || e.options.highlightDisabledInRange) && M.push("drp-date-picker__day--in-range"));
|
|
1937
|
-
const
|
|
1938
|
-
let
|
|
1937
|
+
const P = `${y.year}-${String(y.month + 1).padStart(2, "0")}-${String(y.day).padStart(2, "0")}`;
|
|
1938
|
+
let z = (x == null ? void 0 : x.dayTooltip) || "";
|
|
1939
1939
|
if (e.options.dayTooltipCallback) {
|
|
1940
1940
|
const q = {
|
|
1941
1941
|
date: y.date,
|
|
1942
|
-
dateString:
|
|
1942
|
+
dateString: P,
|
|
1943
1943
|
dayNumber: y.day,
|
|
1944
1944
|
isDisabled: E,
|
|
1945
|
-
isSelected:
|
|
1945
|
+
isSelected: T,
|
|
1946
1946
|
isStartDate: A,
|
|
1947
1947
|
isEndDate: $,
|
|
1948
1948
|
isInRange: N,
|
|
@@ -1953,37 +1953,37 @@ function Nt(e, a, t) {
|
|
|
1953
1953
|
// Not available during string rendering
|
|
1954
1954
|
picker: e
|
|
1955
1955
|
}, at = e.options.dayTooltipCallback(q);
|
|
1956
|
-
at !== null && (
|
|
1956
|
+
at !== null && (z = at);
|
|
1957
1957
|
}
|
|
1958
|
-
const V =
|
|
1959
|
-
v += `<div class="${M.join(" ")}" data-date="${
|
|
1958
|
+
const V = z ? ` data-tooltip="${z.replace(/"/g, """)}"` : "";
|
|
1959
|
+
v += `<div class="${M.join(" ")}" data-date="${P}" data-day-number="${y.day}"${V}>`, v += `<slot name="day-${P}">${y.day}</slot>`, v += "</div>";
|
|
1960
1960
|
}
|
|
1961
1961
|
v += "</div>";
|
|
1962
1962
|
}
|
|
1963
|
-
|
|
1963
|
+
i && (i.innerHTML = v, fn(e, a, i));
|
|
1964
1964
|
}
|
|
1965
1965
|
function fn(e, a, t) {
|
|
1966
1966
|
if (!e.options.renderDayCallback && !e.options.renderDayContentCallback)
|
|
1967
1967
|
return;
|
|
1968
|
-
t.querySelectorAll(".drp-date-picker__day").forEach((
|
|
1969
|
-
const
|
|
1970
|
-
if (!
|
|
1971
|
-
const [d, l, c] =
|
|
1968
|
+
t.querySelectorAll(".drp-date-picker__day").forEach((i) => {
|
|
1969
|
+
const r = i, o = r.getAttribute("data-date"), s = parseInt(r.getAttribute("data-day-number") || "0", 10);
|
|
1970
|
+
if (!o) return;
|
|
1971
|
+
const [d, l, c] = o.split("-"), h = new Date(parseInt(d), parseInt(l) - 1, parseInt(c)), u = r.querySelector(`slot[name="day-${o}"]`);
|
|
1972
1972
|
if (u && u.assignedNodes().length > 0)
|
|
1973
1973
|
return;
|
|
1974
|
-
const f = e.isDateDisabledInternal(
|
|
1975
|
-
date:
|
|
1976
|
-
dateString:
|
|
1974
|
+
const f = e.isDateDisabledInternal(h), p = e.isToday(h), D = h.getDay() === 0 || h.getDay() === 6, m = e.options.selectionMode === "single" && e.isSameDay(h, e.selectedDate), C = e.options.selectionMode === "range" && e.isSameDay(h, e.selectedStartDate), I = e.options.selectionMode === "range" && e.isSameDay(h, e.selectedEndDate), S = e.options.selectionMode === "range" && e.isInRange(h), v = {
|
|
1975
|
+
date: h,
|
|
1976
|
+
dateString: o,
|
|
1977
1977
|
dayNumber: s,
|
|
1978
1978
|
isDisabled: f,
|
|
1979
1979
|
isSelected: m || C || I,
|
|
1980
1980
|
isStartDate: C,
|
|
1981
1981
|
isEndDate: I,
|
|
1982
1982
|
isInRange: S,
|
|
1983
|
-
isToday:
|
|
1983
|
+
isToday: p,
|
|
1984
1984
|
isWeekend: D,
|
|
1985
1985
|
monthIndex: a,
|
|
1986
|
-
element:
|
|
1986
|
+
element: r,
|
|
1987
1987
|
picker: e
|
|
1988
1988
|
};
|
|
1989
1989
|
if (e.options.renderDayCallback)
|
|
@@ -2007,39 +2007,39 @@ function Ft(e, a) {
|
|
|
2007
2007
|
if (!t) return;
|
|
2008
2008
|
const n = t.querySelector(".drp-date-picker__rolling-selector");
|
|
2009
2009
|
n == null || n.classList.add("drp-date-picker__rolling-selector--visible");
|
|
2010
|
-
const
|
|
2010
|
+
const i = e.monthDates[a], r = i.getFullYear(), o = i.getMonth(), s = $t(e.options.rollingYearRange, r, e), d = Pt(e.options.rollingMonthRange), l = n == null ? void 0 : n.querySelector('[data-list="years"]');
|
|
2011
2011
|
let c = "";
|
|
2012
2012
|
for (let u = s.min; u <= s.max; u++) {
|
|
2013
|
-
const g = u ===
|
|
2014
|
-
c += `<div class="drp-date-picker__rolling-item ${g} ${
|
|
2013
|
+
const g = u === r ? "drp-date-picker__rolling-item--selected" : "", p = ct(e, u) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2014
|
+
c += `<div class="drp-date-picker__rolling-item ${g} ${p}" data-year="${u}" data-month-index="${a}"><span class="drp-date-picker__rolling-item-text">${u}</span></div>`;
|
|
2015
2015
|
}
|
|
2016
2016
|
l && (l.innerHTML = c);
|
|
2017
|
-
const
|
|
2018
|
-
if (
|
|
2017
|
+
const h = n == null ? void 0 : n.querySelector('[data-list="months"]');
|
|
2018
|
+
if (h) {
|
|
2019
2019
|
let u = "";
|
|
2020
2020
|
for (let g = d.min - 1; g <= d.max - 1; g++) {
|
|
2021
|
-
const f = e.monthNames[g],
|
|
2022
|
-
u += `<div class="drp-date-picker__rolling-item ${
|
|
2021
|
+
const f = e.monthNames[g], p = g === o ? "drp-date-picker__rolling-item--selected" : "", m = j(e, r, g) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2022
|
+
u += `<div class="drp-date-picker__rolling-item ${p} ${m}" data-month="${g}" data-month-index="${a}"><span class="drp-date-picker__rolling-item-text">${f}</span></div>`;
|
|
2023
2023
|
}
|
|
2024
|
-
|
|
2024
|
+
h.innerHTML = u;
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
2027
|
function mn(e) {
|
|
2028
2028
|
if (!e.options.unifiedNavigation || !e.unifiedRollingSelector) return;
|
|
2029
2029
|
e.unifiedRollingSelector.classList.add("drp-date-picker__unified-rolling-selector--visible");
|
|
2030
|
-
const a = e.options.unifiedNavigationAnchorIndex ?? 0, t = e.monthDates[a], n = t.getFullYear(),
|
|
2030
|
+
const a = e.options.unifiedNavigationAnchorIndex ?? 0, t = e.monthDates[a], n = t.getFullYear(), i = t.getMonth(), r = e.getEffectiveYearRange(), o = e.getEffectiveMonthRange(), s = e.unifiedRollingSelector.querySelector('[data-list="years"]');
|
|
2031
2031
|
let d = "";
|
|
2032
|
-
for (let c =
|
|
2033
|
-
const
|
|
2034
|
-
d += `<div class="drp-date-picker__rolling-item ${
|
|
2032
|
+
for (let c = r.min; c <= r.max; c++) {
|
|
2033
|
+
const h = c === n ? "drp-date-picker__rolling-item--selected" : "", g = ct(e, c) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2034
|
+
d += `<div class="drp-date-picker__rolling-item ${h} ${g}" data-year="${c}" data-unified="true"><span class="drp-date-picker__rolling-item-text">${c}</span></div>`;
|
|
2035
2035
|
}
|
|
2036
2036
|
s && (s.innerHTML = d);
|
|
2037
2037
|
const l = e.unifiedRollingSelector.querySelector('[data-list="months"]');
|
|
2038
2038
|
if (l) {
|
|
2039
2039
|
let c = "";
|
|
2040
|
-
for (let
|
|
2041
|
-
const u = e.monthNames[
|
|
2042
|
-
c += `<div class="drp-date-picker__rolling-item ${g} ${
|
|
2040
|
+
for (let h = o.min - 1; h <= o.max - 1; h++) {
|
|
2041
|
+
const u = e.monthNames[h], g = h === i ? "drp-date-picker__rolling-item--selected" : "", p = j(e, n, h) ? "" : "drp-date-picker__rolling-item--disabled";
|
|
2042
|
+
c += `<div class="drp-date-picker__rolling-item ${g} ${p}" data-month="${h}" data-unified="true"><span class="drp-date-picker__rolling-item-text">${u}</span></div>`;
|
|
2043
2043
|
}
|
|
2044
2044
|
l.innerHTML = c;
|
|
2045
2045
|
}
|
|
@@ -2049,12 +2049,12 @@ function bn(e) {
|
|
|
2049
2049
|
const a = e.calendar.querySelector(".drp-date-picker__summary");
|
|
2050
2050
|
if (a)
|
|
2051
2051
|
if (e.selectedStartDate && e.selectedEndDate) {
|
|
2052
|
-
let t, n, r, o
|
|
2052
|
+
let t, n, i, r, o;
|
|
2053
2053
|
if (e.options.disabledDatesHandling === "individual" || e.options.disabledDatesHandling === "split")
|
|
2054
2054
|
n = e.getEnabledDatesInRange(
|
|
2055
2055
|
e.selectedStartDate,
|
|
2056
2056
|
e.selectedEndDate
|
|
2057
|
-
), t = n.length,
|
|
2057
|
+
), t = n.length, r = n, e.options.disabledDatesHandling === "split" && (o = e.splitRangeByDisabled(
|
|
2058
2058
|
e.selectedStartDate,
|
|
2059
2059
|
e.selectedEndDate
|
|
2060
2060
|
));
|
|
@@ -2062,7 +2062,7 @@ function bn(e) {
|
|
|
2062
2062
|
n = e.getEnabledDatesInRange(
|
|
2063
2063
|
e.selectedStartDate,
|
|
2064
2064
|
e.selectedEndDate
|
|
2065
|
-
),
|
|
2065
|
+
), i = e.getDisabledDatesInRange(
|
|
2066
2066
|
e.selectedStartDate,
|
|
2067
2067
|
e.selectedEndDate
|
|
2068
2068
|
);
|
|
@@ -2084,7 +2084,7 @@ function bn(e) {
|
|
|
2084
2084
|
localeStrings: e.localeStrings,
|
|
2085
2085
|
isPreview: !1
|
|
2086
2086
|
};
|
|
2087
|
-
n && (d.enabledDates = n),
|
|
2087
|
+
n && (d.enabledDates = n), i && (d.disabledDates = i), r && (d.dates = r), o && (d.dateRanges = o), a.innerHTML = e.options.formatSummaryCallback(d);
|
|
2088
2088
|
} else
|
|
2089
2089
|
a.innerHTML = `
|
|
2090
2090
|
<span class="drp-date-picker__summary-count">${t} ${t === 1 ? e.localeStrings.day : e.localeStrings.days}</span>
|
|
@@ -2098,12 +2098,12 @@ function Ht(e) {
|
|
|
2098
2098
|
if (e.options.selectionMode !== "range") return;
|
|
2099
2099
|
const a = e.calendar.querySelector(".drp-date-picker__summary");
|
|
2100
2100
|
if (a && e.dragPreviewStart && e.dragPreviewEnd) {
|
|
2101
|
-
let t, n, r, o
|
|
2101
|
+
let t, n, i, r, o;
|
|
2102
2102
|
if (e.options.disabledDatesHandling === "individual" || e.options.disabledDatesHandling === "split")
|
|
2103
2103
|
n = e.getEnabledDatesInRange(
|
|
2104
2104
|
e.dragPreviewStart,
|
|
2105
2105
|
e.dragPreviewEnd
|
|
2106
|
-
), t = n.length,
|
|
2106
|
+
), t = n.length, r = n, e.options.disabledDatesHandling === "split" && (o = e.splitRangeByDisabled(
|
|
2107
2107
|
e.dragPreviewStart,
|
|
2108
2108
|
e.dragPreviewEnd
|
|
2109
2109
|
));
|
|
@@ -2111,7 +2111,7 @@ function Ht(e) {
|
|
|
2111
2111
|
n = e.getEnabledDatesInRange(
|
|
2112
2112
|
e.dragPreviewStart,
|
|
2113
2113
|
e.dragPreviewEnd
|
|
2114
|
-
),
|
|
2114
|
+
), i = e.getDisabledDatesInRange(
|
|
2115
2115
|
e.dragPreviewStart,
|
|
2116
2116
|
e.dragPreviewEnd
|
|
2117
2117
|
);
|
|
@@ -2133,7 +2133,7 @@ function Ht(e) {
|
|
|
2133
2133
|
localeStrings: e.localeStrings,
|
|
2134
2134
|
isPreview: !0
|
|
2135
2135
|
};
|
|
2136
|
-
n && (d.enabledDates = n),
|
|
2136
|
+
n && (d.enabledDates = n), i && (d.disabledDates = i), r && (d.dates = r), o && (d.dateRanges = o), a.innerHTML = e.options.formatSummaryCallback(d);
|
|
2137
2137
|
} else
|
|
2138
2138
|
a.innerHTML = `
|
|
2139
2139
|
<span style="opacity: 0.7;">${e.localeStrings.preview}: </span>
|
|
@@ -2144,15 +2144,15 @@ function Ht(e) {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
}
|
|
2146
2146
|
function yn(e) {
|
|
2147
|
-
if (e.calendar.querySelectorAll(".drp-date-picker__day--drag-preview, .drp-date-picker__day--drag-invalid").forEach((
|
|
2148
|
-
|
|
2147
|
+
if (e.calendar.querySelectorAll(".drp-date-picker__day--drag-preview, .drp-date-picker__day--drag-invalid").forEach((i) => {
|
|
2148
|
+
i.classList.remove("drp-date-picker__day--drag-preview", "drp-date-picker__day--drag-invalid");
|
|
2149
2149
|
}), !e.dragPreviewStart || !e.dragPreviewEnd) return;
|
|
2150
2150
|
const t = e.options.disabledDatesHandling === "block" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd);
|
|
2151
|
-
e.calendar.querySelectorAll(".drp-date-picker__day").forEach((
|
|
2152
|
-
const
|
|
2153
|
-
if (!
|
|
2154
|
-
const [
|
|
2155
|
-
l >= e.dragPreviewStart && l <= e.dragPreviewEnd && (
|
|
2151
|
+
e.calendar.querySelectorAll(".drp-date-picker__day").forEach((i) => {
|
|
2152
|
+
const r = i.dataset.date;
|
|
2153
|
+
if (!r) return;
|
|
2154
|
+
const [o, s, d] = r.split("-").map(Number), l = new Date(o, s - 1, d);
|
|
2155
|
+
l >= e.dragPreviewStart && l <= e.dragPreviewEnd && (i.classList.add("drp-date-picker__day--drag-preview"), t && i.classList.add("drp-date-picker__day--drag-invalid"));
|
|
2156
2156
|
}), Ht(e);
|
|
2157
2157
|
}
|
|
2158
2158
|
async function Ot(e, a) {
|
|
@@ -2188,8 +2188,8 @@ async function Bt(e, a, t) {
|
|
|
2188
2188
|
return ee.debug(" PREVENT mode - range contains disabled dates"), { isValid: !1, message: "Range contains disabled dates" };
|
|
2189
2189
|
} else if (e.options.disabledDatesHandling === "block" && (ee.debug(" Checking BLOCK mode"), e.hasDisabledDatesInRange(a, t))) {
|
|
2190
2190
|
ee.debug(" BLOCK mode - range contains disabled dates, adjusting");
|
|
2191
|
-
const
|
|
2192
|
-
return ee.debug(" BLOCK mode - adjusted end:",
|
|
2191
|
+
const i = e.findLastEnabledBeforeGap(a, t);
|
|
2192
|
+
return ee.debug(" BLOCK mode - adjusted end:", i), { isValid: !0, adjustedStart: a, adjustedEnd: i };
|
|
2193
2193
|
}
|
|
2194
2194
|
const n = await Ot(e, { start: a, end: t });
|
|
2195
2195
|
return n.isValid ? n.adjustedStart || n.adjustedEnd ? {
|
|
@@ -2205,36 +2205,36 @@ async function vn(e, a) {
|
|
|
2205
2205
|
O.warn("selectDay() - called with invalid element:", a);
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
|
-
const [t, n,
|
|
2208
|
+
const [t, n, i] = a.dataset.date.split("-").map(Number), r = new Date(t, n - 1, i);
|
|
2209
2209
|
a.classList.contains("drp-date-picker__day--other-month");
|
|
2210
|
-
const
|
|
2211
|
-
if (
|
|
2212
|
-
e.activeMonthIndex = parseInt(
|
|
2213
|
-
const s =
|
|
2214
|
-
e.focusedDayIndex = Array.from(s).indexOf(a),
|
|
2210
|
+
const o = a.closest(".drp-date-picker__days");
|
|
2211
|
+
if (o && o instanceof HTMLElement) {
|
|
2212
|
+
e.activeMonthIndex = parseInt(o.dataset.monthIndex || "0") || 0, oe.debug(`Col${e.activeMonthIndex} selectDay - activeMonthIndex:`, e.activeMonthIndex);
|
|
2213
|
+
const s = o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
2214
|
+
e.focusedDayIndex = Array.from(s).indexOf(a), oe.debug(`Col${e.activeMonthIndex} selectDay - set focusedDayIndex to:`, e.focusedDayIndex);
|
|
2215
2215
|
}
|
|
2216
2216
|
if (e.options.selectionMode === "single") {
|
|
2217
|
-
const s = await Ot(e,
|
|
2217
|
+
const s = await Ot(e, r);
|
|
2218
2218
|
if (!s.isValid) {
|
|
2219
|
-
|
|
2219
|
+
oe.debug("Single mode selection prevented by beforeDateSelectCallback");
|
|
2220
2220
|
return;
|
|
2221
2221
|
}
|
|
2222
|
-
const d = s.adjustedDate ||
|
|
2222
|
+
const d = s.adjustedDate || r;
|
|
2223
2223
|
e.selectedDate = d, e.input && (e.requiresApplyButton() || (e.input.value = e.formatDate(d))), e.requiresApplyButton() ? e.pendingSelection = d : e.options.onSelect && e.options.onSelect(d), e.options.positioningMode === "floating" && e.shouldAutoClose() && e.hide();
|
|
2224
2224
|
} else if (e.options.selectionMode === "multiple") {
|
|
2225
|
-
const s = `${
|
|
2226
|
-
if (d !== -1 ? e.selectedDates.splice(d, 1) : e.selectedDates.push(new Date(
|
|
2225
|
+
const s = `${r.getFullYear()}-${String(r.getMonth() + 1).padStart(2, "0")}-${String(r.getDate()).padStart(2, "0")}`, d = e.selectedDates.findIndex((l) => `${l.getFullYear()}-${String(l.getMonth() + 1).padStart(2, "0")}-${String(l.getDate()).padStart(2, "0")}` === s);
|
|
2226
|
+
if (d !== -1 ? e.selectedDates.splice(d, 1) : e.selectedDates.push(new Date(r)), e.input && !e.requiresApplyButton()) {
|
|
2227
2227
|
const l = e.selectedDates.length + e.selectedRanges.length;
|
|
2228
2228
|
e.input.value = l > 0 ? `${l} selection(s)` : "";
|
|
2229
2229
|
}
|
|
2230
2230
|
e.selectedRanges.length > 0 && e.selectedDates.length > 0 ? e.pendingSelection = [...e.selectedRanges, ...e.selectedDates] : e.selectedRanges.length > 0 ? e.pendingSelection = e.selectedRanges : e.pendingSelection = e.selectedDates;
|
|
2231
2231
|
} else if (!e.selectedStartDate || e.selectedEndDate)
|
|
2232
|
-
e.selectedStartDate =
|
|
2232
|
+
e.selectedStartDate = r, e.selectedEndDate = null, e.input && (e.requiresApplyButton() || (e.input.value = `${e.formatDate(e.selectedStartDate)} - ...`));
|
|
2233
2233
|
else {
|
|
2234
|
-
let s = e.selectedStartDate, d =
|
|
2235
|
-
|
|
2234
|
+
let s = e.selectedStartDate, d = r;
|
|
2235
|
+
r < e.selectedStartDate && (d = e.selectedStartDate, s = r), oe.debug(" selectDay - calling validateRangeAsync with:", s, d);
|
|
2236
2236
|
const l = await Bt(e, s, d);
|
|
2237
|
-
if (
|
|
2237
|
+
if (oe.debug(" selectDay - validation result:", l), !l.isValid) {
|
|
2238
2238
|
l.message && O.warn("selectDay() - range validation failed:", l.message), e.renderCalendar(), e.updateSummary();
|
|
2239
2239
|
return;
|
|
2240
2240
|
}
|
|
@@ -2250,13 +2250,13 @@ async function vn(e, a) {
|
|
|
2250
2250
|
e.activeMonthIndex = d;
|
|
2251
2251
|
const c = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${d}"]`);
|
|
2252
2252
|
if (c) {
|
|
2253
|
-
const
|
|
2253
|
+
const h = c.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), u = Array.from(h).findIndex((g) => {
|
|
2254
2254
|
const f = g.dataset.date;
|
|
2255
2255
|
if (!f) return !1;
|
|
2256
|
-
const [
|
|
2256
|
+
const [p, D, m] = f.split("-").map(Number), C = new Date(p, D - 1, m);
|
|
2257
2257
|
return e.isSameDay(C, s);
|
|
2258
2258
|
});
|
|
2259
|
-
u !== -1 && (e.focusedDayIndex = u,
|
|
2259
|
+
u !== -1 && (e.focusedDayIndex = u, h.forEach((g) => g.classList.remove("drp-date-picker__day--focused")), h[u] && h[u].classList.add("drp-date-picker__day--focused"));
|
|
2260
2260
|
}
|
|
2261
2261
|
break;
|
|
2262
2262
|
}
|
|
@@ -2288,41 +2288,41 @@ function wn(e) {
|
|
|
2288
2288
|
function xn(e) {
|
|
2289
2289
|
e.options.selectionMode === "range" && e.calendar.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--disabled)").forEach((t) => {
|
|
2290
2290
|
t.addEventListener("mousedown", (n) => {
|
|
2291
|
-
const
|
|
2291
|
+
const i = n, r = t, o = i.clientX, s = i.clientY, d = 5;
|
|
2292
2292
|
let l = !1, c = !1;
|
|
2293
|
-
const
|
|
2293
|
+
const h = r.classList.contains("drp-date-picker__day--range-start"), u = r.classList.contains("drp-date-picker__day--range-end");
|
|
2294
2294
|
let g;
|
|
2295
|
-
|
|
2295
|
+
h && e.selectedStartDate && e.selectedEndDate ? g = "start" : u && e.selectedStartDate && e.selectedEndDate ? g = "end" : g = "start";
|
|
2296
2296
|
const f = (D) => {
|
|
2297
|
-
const m = Math.abs(D.clientX -
|
|
2298
|
-
!l && (m > d || C > d) && (l = !0), l && !c && (c = !0, Yt(e,
|
|
2299
|
-
},
|
|
2300
|
-
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup",
|
|
2297
|
+
const m = Math.abs(D.clientX - o), C = Math.abs(D.clientY - s);
|
|
2298
|
+
!l && (m > d || C > d) && (l = !0), l && !c && (c = !0, Yt(e, i, g, r), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", p));
|
|
2299
|
+
}, p = () => {
|
|
2300
|
+
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", p);
|
|
2301
2301
|
};
|
|
2302
|
-
document.addEventListener("mousemove", f), document.addEventListener("mouseup",
|
|
2302
|
+
document.addEventListener("mousemove", f), document.addEventListener("mouseup", p);
|
|
2303
2303
|
});
|
|
2304
2304
|
});
|
|
2305
2305
|
}
|
|
2306
2306
|
function Yt(e, a, t, n) {
|
|
2307
2307
|
a.preventDefault(), a.stopPropagation(), e.isDragging = !0, e.draggingType = t;
|
|
2308
|
-
const
|
|
2309
|
-
let
|
|
2310
|
-
if (
|
|
2311
|
-
const [s, d, l] =
|
|
2312
|
-
|
|
2308
|
+
const i = n, r = i.dataset.date;
|
|
2309
|
+
let o = null;
|
|
2310
|
+
if (r) {
|
|
2311
|
+
const [s, d, l] = r.split("-").map(Number);
|
|
2312
|
+
o = new Date(s, d - 1, l);
|
|
2313
2313
|
}
|
|
2314
|
-
!e.selectedStartDate && !e.selectedEndDate ?
|
|
2314
|
+
!e.selectedStartDate && !e.selectedEndDate ? o && (e.originalStartDate = o, e.originalEndDate = null, e.draggingType = "end") : o && e.selectedStartDate && !e.selectedEndDate ? o.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) => {
|
|
2315
2315
|
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");
|
|
2316
|
-
}), e.originalStartDate =
|
|
2316
|
+
}), e.originalStartDate = o, e.originalEndDate = null, e.draggingType = "end") : (e.selectedStartDate && (e.originalStartDate = new Date(e.selectedStartDate)), e.selectedEndDate && (e.originalEndDate = new Date(e.selectedEndDate))), i.classList.add("drp-date-picker__day--dragging"), U.debug(`Started dragging ${t} date`), e.onDragMoveBound = (s) => Vt(e, s), e.onDragEndBound = async (s) => await qt(e), document.addEventListener("mousemove", e.onDragMoveBound), document.addEventListener("mouseup", e.onDragEndBound), document.body.style.cursor = "grabbing";
|
|
2317
2317
|
}
|
|
2318
2318
|
function Vt(e, a) {
|
|
2319
2319
|
if (!e.isDragging) return;
|
|
2320
2320
|
let t = null;
|
|
2321
2321
|
e.containerElement instanceof ShadowRoot && "elementsFromPoint" in e.containerElement ? t = e.containerElement.elementsFromPoint(a.clientX, a.clientY)[0] || null : t = document.elementFromPoint(a.clientX, a.clientY);
|
|
2322
|
-
const n = t == null ? void 0 : t.closest(".drp-date-picker__nav--prev"),
|
|
2323
|
-
if (n ||
|
|
2322
|
+
const n = t == null ? void 0 : t.closest(".drp-date-picker__nav--prev"), i = t == null ? void 0 : t.closest(".drp-date-picker__nav--next");
|
|
2323
|
+
if (n || i) {
|
|
2324
2324
|
if (!e.navInterval) {
|
|
2325
|
-
const u = (n ||
|
|
2325
|
+
const u = (n || i).closest(".drp-date-picker__month");
|
|
2326
2326
|
if (u && u instanceof HTMLElement) {
|
|
2327
2327
|
const g = parseInt(u.dataset.monthIndex || "0"), f = !!n;
|
|
2328
2328
|
f ? e.prevMonth(g) : e.nextMonth(g), e.navInterval = window.setInterval(() => {
|
|
@@ -2333,22 +2333,22 @@ function Vt(e, a) {
|
|
|
2333
2333
|
return;
|
|
2334
2334
|
} else
|
|
2335
2335
|
e.navInterval && (clearInterval(e.navInterval), e.navInterval = null);
|
|
2336
|
-
const
|
|
2337
|
-
if (!
|
|
2338
|
-
const
|
|
2339
|
-
if (!
|
|
2340
|
-
const [s, d, l] =
|
|
2336
|
+
const r = t;
|
|
2337
|
+
if (!r || !r.classList.contains("drp-date-picker__day")) return;
|
|
2338
|
+
const o = r.dataset.date;
|
|
2339
|
+
if (!o) return;
|
|
2340
|
+
const [s, d, l] = o.split("-").map(Number);
|
|
2341
2341
|
let c = new Date(s, d - 1, l);
|
|
2342
|
-
if (
|
|
2343
|
-
const
|
|
2344
|
-
c = $e(e, c,
|
|
2342
|
+
if (r.classList.contains("drp-date-picker__day--disabled")) {
|
|
2343
|
+
const h = e.draggingType === "start" ? e.originalEndDate && c > e.originalEndDate ? "backward" : "forward" : e.originalStartDate && c < e.originalStartDate ? "forward" : "backward";
|
|
2344
|
+
c = $e(e, c, h);
|
|
2345
2345
|
}
|
|
2346
2346
|
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) {
|
|
2347
|
-
const
|
|
2348
|
-
if (U.debug("onDragMove - mode:",
|
|
2347
|
+
const h = e.options.disabledDatesHandling;
|
|
2348
|
+
if (U.debug("onDragMove - mode:", h, "start:", e.dragPreviewStart, "end:", e.dragPreviewEnd), h === "prevent" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd)) {
|
|
2349
2349
|
U.debug("PREVENT mode - range contains disabled dates, blocking preview update");
|
|
2350
2350
|
return;
|
|
2351
|
-
} else if (
|
|
2351
|
+
} else if (h === "block" && e.hasDisabledDatesInRange(e.dragPreviewStart, e.dragPreviewEnd)) {
|
|
2352
2352
|
if (U.debug("BLOCK mode - range contains disabled dates, adjusting preview"), e.draggingType === "start" && e.originalEndDate) {
|
|
2353
2353
|
const u = e.findLastEnabledBeforeGap(e.dragPreviewStart, e.originalEndDate);
|
|
2354
2354
|
U.debug("BLOCK mode - adjusted end (dragging start):", u), e.dragPreviewEnd = u;
|
|
@@ -2365,13 +2365,13 @@ async function qt(e, a) {
|
|
|
2365
2365
|
if (U.debug("Ended dragging, finalizing selection"), e.dragPreviewStart && e.dragPreviewEnd) {
|
|
2366
2366
|
let t = $e(e, e.dragPreviewStart, "forward"), n = $e(e, e.dragPreviewEnd, "backward");
|
|
2367
2367
|
t > n && ([t, n] = [n, t]), U.debug("onDragEnd - calling validateRangeAsync with:", t, n);
|
|
2368
|
-
const
|
|
2369
|
-
if (U.debug("onDragEnd - validation result:",
|
|
2370
|
-
|
|
2368
|
+
const i = await Bt(e, t, n);
|
|
2369
|
+
if (U.debug("onDragEnd - validation result:", i), !i.isValid)
|
|
2370
|
+
i.message && O.warn("onDragEnd() - drag validation failed:", i.message);
|
|
2371
2371
|
else {
|
|
2372
|
-
e.selectedStartDate =
|
|
2373
|
-
const
|
|
2374
|
-
e.requiresApplyButton() ? e.pendingSelection =
|
|
2372
|
+
e.selectedStartDate = i.adjustedStart || t, e.selectedEndDate = i.adjustedEnd || n, e.input && (e.requiresApplyButton() || (e.input.value = `${e.formatDate(e.selectedStartDate)} - ${e.formatDate(e.selectedEndDate)}`));
|
|
2373
|
+
const r = { start: e.selectedStartDate, end: e.selectedEndDate };
|
|
2374
|
+
e.requiresApplyButton() ? e.pendingSelection = r : e.options.onSelect && e.options.onSelect(r);
|
|
2375
2375
|
}
|
|
2376
2376
|
}
|
|
2377
2377
|
if (e.isDragging = !1, e.draggingType = null, e.dragPreviewStart = null, e.dragPreviewEnd = null, e.calendar.querySelectorAll(".drp-date-picker__day--dragging").forEach((t) => {
|
|
@@ -2379,18 +2379,18 @@ async function qt(e, a) {
|
|
|
2379
2379
|
}), e.onDragMoveBound && document.removeEventListener("mousemove", e.onDragMoveBound), e.onDragEndBound && document.removeEventListener("mouseup", e.onDragEndBound), e.navInterval && (clearInterval(e.navInterval), e.navInterval = null), document.body.style.cursor = "", e.renderCalendar(), e.updateSummary(), e.selectedEndDate) {
|
|
2380
2380
|
const t = e.selectedEndDate;
|
|
2381
2381
|
for (let n = 0; n < e.monthDates.length; n++) {
|
|
2382
|
-
const
|
|
2383
|
-
if (t.getFullYear() ===
|
|
2382
|
+
const i = e.monthDates[n];
|
|
2383
|
+
if (t.getFullYear() === i.getFullYear() && t.getMonth() === i.getMonth()) {
|
|
2384
2384
|
e.activeMonthIndex = n;
|
|
2385
|
-
const
|
|
2386
|
-
if (
|
|
2387
|
-
const
|
|
2385
|
+
const r = e.calendar.querySelector(`.drp-date-picker__days[data-month-index="${n}"]`);
|
|
2386
|
+
if (r) {
|
|
2387
|
+
const o = r.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), s = Array.from(o).findIndex((d) => {
|
|
2388
2388
|
const l = d.dataset.date;
|
|
2389
2389
|
if (!l) return !1;
|
|
2390
|
-
const [c,
|
|
2390
|
+
const [c, h, u] = l.split("-").map(Number), g = new Date(c, h - 1, u);
|
|
2391
2391
|
return e.isSameDay(g, t);
|
|
2392
2392
|
});
|
|
2393
|
-
s !== -1 && (e.focusedDayIndex = s,
|
|
2393
|
+
s !== -1 && (e.focusedDayIndex = s, o.forEach((d) => d.classList.remove("drp-date-picker__day--focused")), o[s] && o[s].classList.add("drp-date-picker__day--focused"));
|
|
2394
2394
|
}
|
|
2395
2395
|
break;
|
|
2396
2396
|
}
|
|
@@ -2400,93 +2400,93 @@ async function qt(e, a) {
|
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
2402
|
function $e(e, a, t = "forward") {
|
|
2403
|
-
let
|
|
2404
|
-
if (
|
|
2405
|
-
return
|
|
2406
|
-
const
|
|
2403
|
+
let i = new Date(a);
|
|
2404
|
+
if (i.setHours(0, 0, 0, 0), !e.isDateDisabledInternal(i))
|
|
2405
|
+
return i;
|
|
2406
|
+
const r = t === "forward" ? 1 : -1;
|
|
2407
2407
|
for (let s = 1; s <= 60; s++) {
|
|
2408
2408
|
const d = new Date(a);
|
|
2409
|
-
if (d.setDate(d.getDate() + s *
|
|
2409
|
+
if (d.setDate(d.getDate() + s * r), d.setHours(0, 0, 0, 0), !e.isDateDisabledInternal(d))
|
|
2410
2410
|
return d;
|
|
2411
2411
|
}
|
|
2412
|
-
const
|
|
2412
|
+
const o = -r;
|
|
2413
2413
|
for (let s = 1; s <= 60; s++) {
|
|
2414
2414
|
const d = new Date(a);
|
|
2415
|
-
if (d.setDate(d.getDate() + s *
|
|
2415
|
+
if (d.setDate(d.getDate() + s * o), d.setHours(0, 0, 0, 0), !e.isDateDisabledInternal(d))
|
|
2416
2416
|
return d;
|
|
2417
2417
|
}
|
|
2418
2418
|
return a;
|
|
2419
2419
|
}
|
|
2420
2420
|
function Mn(e, a) {
|
|
2421
|
-
const t = a.target, n = t.value,
|
|
2421
|
+
const t = a.target, n = t.value, i = t.selectionStart || 0, r = e._previousInputValue || "", o = n.length < r.length, { separator: s } = e.formatInfo;
|
|
2422
2422
|
if (e.options.selectionMode === "range") {
|
|
2423
2423
|
const d = n.replace(new RegExp(`[^0-9${s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}to ]`, "gi"), ""), l = Ut(e, d);
|
|
2424
2424
|
if (l !== n) {
|
|
2425
2425
|
t.value = l;
|
|
2426
|
-
let c =
|
|
2427
|
-
if (
|
|
2428
|
-
c =
|
|
2426
|
+
let c = i;
|
|
2427
|
+
if (o)
|
|
2428
|
+
c = i;
|
|
2429
2429
|
else if (l.length > n.length)
|
|
2430
2430
|
if (l.includes(" to ") && !n.includes(" to ")) {
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2431
|
+
const h = l.indexOf(" to ");
|
|
2432
|
+
i >= h && i <= h + 4 ? c = h + 4 : c = i + (l.length - n.length);
|
|
2433
2433
|
} else
|
|
2434
|
-
c =
|
|
2434
|
+
c = i + (l.length - n.length);
|
|
2435
2435
|
t.setSelectionRange(c, c);
|
|
2436
2436
|
}
|
|
2437
2437
|
} else {
|
|
2438
|
-
const d = n.replace(new RegExp(`[^0-9${s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}]`, "g"), ""), l =
|
|
2438
|
+
const d = n.replace(new RegExp(`[^0-9${s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}]`, "g"), ""), l = ge(e, d);
|
|
2439
2439
|
if (l !== n) {
|
|
2440
2440
|
t.value = l;
|
|
2441
|
-
let c =
|
|
2442
|
-
if (
|
|
2443
|
-
c =
|
|
2444
|
-
else if (l.length > n.length && l[
|
|
2445
|
-
c =
|
|
2441
|
+
let c = i;
|
|
2442
|
+
if (o)
|
|
2443
|
+
c = i;
|
|
2444
|
+
else if (l.length > n.length && l[i] === s)
|
|
2445
|
+
c = i + 1;
|
|
2446
2446
|
else if (l.length > n.length) {
|
|
2447
|
-
const
|
|
2448
|
-
c =
|
|
2447
|
+
const h = (n.substring(0, i).match(new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g")) || []).length, g = (l.substring(0, i).match(new RegExp(s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g")) || []).length - h;
|
|
2448
|
+
c = i + g;
|
|
2449
2449
|
}
|
|
2450
2450
|
t.setSelectionRange(c, c);
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
2453
|
e._previousInputValue = t.value, tt(e);
|
|
2454
2454
|
}
|
|
2455
|
-
function
|
|
2456
|
-
var c,
|
|
2457
|
-
const { separator: t, parts: n, maxLength:
|
|
2458
|
-
{ type: "year", pos: ((c = n.year) == null ? void 0 : c.index) ?? 0, length:
|
|
2459
|
-
{ type: "month", pos: ((
|
|
2455
|
+
function ge(e, a) {
|
|
2456
|
+
var c, h, u;
|
|
2457
|
+
const { separator: t, parts: n, maxLength: i } = e.formatInfo, r = a.replace(new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), ""), o = n.year ? n.year.length : 4, s = [
|
|
2458
|
+
{ type: "year", pos: ((c = n.year) == null ? void 0 : c.index) ?? 0, length: o },
|
|
2459
|
+
{ type: "month", pos: ((h = n.month) == null ? void 0 : h.index) ?? 1, length: 2 },
|
|
2460
2460
|
{ type: "day", pos: ((u = n.day) == null ? void 0 : u.index) ?? 2, length: 2 }
|
|
2461
2461
|
].sort((g, f) => g.pos - f.pos);
|
|
2462
2462
|
let d = "", l = 0;
|
|
2463
2463
|
for (let g = 0; g < s.length; g++) {
|
|
2464
|
-
const f = s[g],
|
|
2465
|
-
if (!
|
|
2466
|
-
d +=
|
|
2464
|
+
const f = s[g], p = r.substring(l, l + f.length);
|
|
2465
|
+
if (!p) break;
|
|
2466
|
+
d += p, l += p.length, g < s.length - 1 && p.length === f.length && (d += t);
|
|
2467
2467
|
}
|
|
2468
|
-
return d.substring(0,
|
|
2468
|
+
return d.substring(0, i);
|
|
2469
2469
|
}
|
|
2470
2470
|
function Ut(e, a) {
|
|
2471
|
-
const { separator: t, maxLength: n } = e.formatInfo,
|
|
2472
|
-
let
|
|
2473
|
-
if (a.includes(
|
|
2474
|
-
const d = a.split(
|
|
2475
|
-
|
|
2471
|
+
const { separator: t, maxLength: n } = e.formatInfo, i = " to ";
|
|
2472
|
+
let r = "", o = "";
|
|
2473
|
+
if (a.includes(i)) {
|
|
2474
|
+
const d = a.split(i);
|
|
2475
|
+
r = d[0], o = d.slice(1).join(i);
|
|
2476
2476
|
} else
|
|
2477
|
-
|
|
2478
|
-
const s =
|
|
2477
|
+
r = a;
|
|
2478
|
+
const s = ge(e, r);
|
|
2479
2479
|
if (s.length === n)
|
|
2480
|
-
if (a.includes(
|
|
2481
|
-
const d =
|
|
2482
|
-
return s +
|
|
2480
|
+
if (a.includes(i)) {
|
|
2481
|
+
const d = ge(e, o);
|
|
2482
|
+
return s + i + d;
|
|
2483
2483
|
} else
|
|
2484
|
-
return s +
|
|
2484
|
+
return s + i;
|
|
2485
2485
|
else
|
|
2486
2486
|
return s;
|
|
2487
2487
|
}
|
|
2488
2488
|
function Sn(e, a) {
|
|
2489
|
-
const { key: t, ctrlKey: n, metaKey:
|
|
2489
|
+
const { key: t, ctrlKey: n, metaKey: i } = a, { separator: r } = e.formatInfo;
|
|
2490
2490
|
if (e.calendar.classList.contains("drp-date-picker--visible") && ["ArrowUp", "ArrowDown", "Home", "End", "PageUp", "PageDown"].includes(t)) {
|
|
2491
2491
|
a.preventDefault();
|
|
2492
2492
|
return;
|
|
@@ -2503,78 +2503,78 @@ function Sn(e, a) {
|
|
|
2503
2503
|
"ArrowDown",
|
|
2504
2504
|
"Home",
|
|
2505
2505
|
"End"
|
|
2506
|
-
].includes(t) || n ||
|
|
2507
|
-
if (t ===
|
|
2506
|
+
].includes(t) || n || i)) {
|
|
2507
|
+
if (t === r) {
|
|
2508
2508
|
const s = a.target, d = s.selectionStart || 0, l = s.value;
|
|
2509
2509
|
let c = 0;
|
|
2510
2510
|
for (let u = d - 1; u >= 0; u--)
|
|
2511
|
-
if (l[u] ===
|
|
2511
|
+
if (l[u] === r || l[u] === " ") {
|
|
2512
2512
|
c = u + 1;
|
|
2513
2513
|
break;
|
|
2514
2514
|
}
|
|
2515
|
-
const
|
|
2516
|
-
if (/^\d$/.test(
|
|
2515
|
+
const h = l.substring(c, d);
|
|
2516
|
+
if (/^\d$/.test(h)) {
|
|
2517
2517
|
a.preventDefault();
|
|
2518
|
-
const u = l.substring(0, c) + "0" +
|
|
2518
|
+
const u = l.substring(0, c) + "0" + h + r + l.substring(d);
|
|
2519
2519
|
s.value = u;
|
|
2520
|
-
const g = c + 2 +
|
|
2520
|
+
const g = c + 2 + r.length;
|
|
2521
2521
|
s.setSelectionRange(g, g), e._previousInputValue = u, s.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
2522
2522
|
return;
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
2525
|
-
e.options.selectionMode === "range" ? !/^\d$/.test(t) && t !==
|
|
2525
|
+
e.options.selectionMode === "range" ? !/^\d$/.test(t) && t !== r && t !== " " && t.toLowerCase() !== "t" && t.toLowerCase() !== "o" && a.preventDefault() : !/^\d$/.test(t) && t !== r && a.preventDefault();
|
|
2526
2526
|
}
|
|
2527
2527
|
}
|
|
2528
2528
|
function Cn(e, a) {
|
|
2529
2529
|
var u;
|
|
2530
2530
|
a.preventDefault();
|
|
2531
|
-
const t = ((u = a.clipboardData) == null ? void 0 : u.getData("text")) || "", { separator: n } = e.formatInfo,
|
|
2532
|
-
|
|
2533
|
-
const
|
|
2534
|
-
|
|
2531
|
+
const t = ((u = a.clipboardData) == null ? void 0 : u.getData("text")) || "", { separator: n } = e.formatInfo, i = t.replace(new RegExp(`[^0-9${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}]`, "g"), ""), r = ge(e, i), o = a.target, s = o.selectionStart || 0, d = o.selectionEnd || 0, l = o.value, c = l.substring(0, s) + r + l.substring(d);
|
|
2532
|
+
o.value = ge(e, c);
|
|
2533
|
+
const h = s + r.length;
|
|
2534
|
+
o.setSelectionRange(h, h), o.dispatchEvent(new Event("input", { bubbles: !0 })), tt(e);
|
|
2535
2535
|
}
|
|
2536
2536
|
function tt(e) {
|
|
2537
2537
|
if (!e.input) return;
|
|
2538
2538
|
const a = e.input.value;
|
|
2539
|
-
if (
|
|
2540
|
-
const { separator: t, parts: n, maxLength:
|
|
2541
|
-
if (
|
|
2542
|
-
const
|
|
2543
|
-
|
|
2539
|
+
if (re.debug("updateCalendarFromInput - value:", a), !a) return;
|
|
2540
|
+
const { separator: t, parts: n, maxLength: i } = e.formatInfo;
|
|
2541
|
+
if (re.debug("Format info:", { separator: t, parts: n, maxLength: i }), e.options.selectionMode === "range" && a.includes(" to ")) {
|
|
2542
|
+
const o = a.split(" to "), s = o[0], d = o[1];
|
|
2543
|
+
re.debug("Range parts - start:", s, "end:", d), Ce(e, s, "start"), d && Ce(e, d, "end");
|
|
2544
2544
|
return;
|
|
2545
2545
|
}
|
|
2546
|
-
const
|
|
2547
|
-
Ce(e, a,
|
|
2546
|
+
const r = e.options.selectionMode === "range" ? "start" : "single";
|
|
2547
|
+
Ce(e, a, r);
|
|
2548
2548
|
}
|
|
2549
2549
|
function Ce(e, a, t = "single") {
|
|
2550
|
-
const { separator: n, parts:
|
|
2550
|
+
const { separator: n, parts: i, maxLength: r } = e.formatInfo, o = a.split(n);
|
|
2551
2551
|
let s = null, d = null, l = null;
|
|
2552
|
-
if (
|
|
2552
|
+
if (o.forEach((c, h) => {
|
|
2553
2553
|
if (c) {
|
|
2554
|
-
if (
|
|
2554
|
+
if (i.year && i.year.index === h) {
|
|
2555
2555
|
const u = parseInt(c, 10);
|
|
2556
|
-
|
|
2557
|
-
} else if (
|
|
2556
|
+
i.year.length === 4 && c.length === 4 ? s = u : i.year.length === 2 && c.length === 2 && (s = u < 100 ? u + 2e3 : u);
|
|
2557
|
+
} else if (i.month && i.month.index === h) {
|
|
2558
2558
|
const u = parseInt(c, 10);
|
|
2559
2559
|
c.length === 2 && u >= 1 && u <= 12 && (d = u);
|
|
2560
|
-
} else if (
|
|
2560
|
+
} else if (i.day && i.day.index === h) {
|
|
2561
2561
|
const u = parseInt(c, 10);
|
|
2562
2562
|
c.length === 2 && u >= 1 && u <= 31 && (l = u);
|
|
2563
2563
|
}
|
|
2564
2564
|
}
|
|
2565
|
-
}),
|
|
2566
|
-
const c = s || (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2565
|
+
}), re.debug(`parseAndUpdateSingleDate(${t}) - year:`, s, "month:", d, "day:", l), s !== null || d !== null) {
|
|
2566
|
+
const c = s || (/* @__PURE__ */ new Date()).getFullYear(), h = d !== null ? d - 1 : (/* @__PURE__ */ new Date()).getMonth();
|
|
2567
2567
|
if (e.options.selectionMode === "single") {
|
|
2568
2568
|
e.monthDates = [];
|
|
2569
2569
|
for (let u = 0; u < e.options.visibleMonthsCount; u++) {
|
|
2570
|
-
const g = new Date(c,
|
|
2570
|
+
const g = new Date(c, h + u, 1);
|
|
2571
2571
|
e.monthDates.push(g);
|
|
2572
2572
|
}
|
|
2573
2573
|
} else if (e.options.selectionMode === "range" && (t === "start" || !e.selectedStartDate)) {
|
|
2574
2574
|
if (e.displayMonths = [
|
|
2575
|
-
{ month:
|
|
2575
|
+
{ month: h, year: c }
|
|
2576
2576
|
], e.options.visibleMonthsCount > 1) {
|
|
2577
|
-
const u = new Date(c,
|
|
2577
|
+
const u = new Date(c, h + 1, 1);
|
|
2578
2578
|
e.displayMonths.push({
|
|
2579
2579
|
month: u.getMonth(),
|
|
2580
2580
|
year: u.getFullYear()
|
|
@@ -2590,7 +2590,7 @@ function Ce(e, a, t = "single") {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
if (s !== null && d !== null && l !== null) {
|
|
2592
2592
|
const c = new Date(s, d - 1, l);
|
|
2593
|
-
c.getMonth() === d - 1 && (t === "single" ? e.selectedDate = c : t === "start" ? e.selectedStartDate = c : t === "end" && (e.selectedEndDate = c), e.renderCalendar(), e.options.selectionMode === "range" && e.updateSummary(),
|
|
2593
|
+
c.getMonth() === d - 1 && (t === "single" ? e.selectedDate = c : t === "start" ? e.selectedStartDate = c : t === "end" && (e.selectedEndDate = c), e.renderCalendar(), e.options.selectionMode === "range" && e.updateSummary(), re.debug(`Set ${t} date:`, c));
|
|
2594
2594
|
}
|
|
2595
2595
|
}
|
|
2596
2596
|
const Ue = {
|
|
@@ -2652,9 +2652,9 @@ function En(e) {
|
|
|
2652
2652
|
const a = He(e);
|
|
2653
2653
|
try {
|
|
2654
2654
|
const t = new Intl.DateTimeFormat(a, { weekday: "short" }), n = [];
|
|
2655
|
-
for (let
|
|
2656
|
-
const
|
|
2657
|
-
n.push(t.format(
|
|
2655
|
+
for (let i = 0; i < 7; i++) {
|
|
2656
|
+
const r = new Date(2017, 0, i + 1);
|
|
2657
|
+
n.push(t.format(r));
|
|
2658
2658
|
}
|
|
2659
2659
|
return n;
|
|
2660
2660
|
} catch (t) {
|
|
@@ -2665,9 +2665,9 @@ function Rn(e) {
|
|
|
2665
2665
|
const a = He(e);
|
|
2666
2666
|
try {
|
|
2667
2667
|
const t = new Intl.DateTimeFormat(a, { month: "long" }), n = [];
|
|
2668
|
-
for (let
|
|
2669
|
-
const
|
|
2670
|
-
n.push(t.format(
|
|
2668
|
+
for (let i = 0; i < 12; i++) {
|
|
2669
|
+
const r = new Date(2017, i, 1);
|
|
2670
|
+
n.push(t.format(r));
|
|
2671
2671
|
}
|
|
2672
2672
|
return n;
|
|
2673
2673
|
} catch (t) {
|
|
@@ -2687,7 +2687,7 @@ function Rn(e) {
|
|
|
2687
2687
|
];
|
|
2688
2688
|
}
|
|
2689
2689
|
}
|
|
2690
|
-
const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--drp-spacing-scale: 1;--drp-cell-scale: 1;--drp-spacing-xs-base: calc(.4 * var(--drp-rem));--drp-spacing-sm-base: calc(.8 * var(--drp-rem));--drp-spacing-md-base: calc(1.6 * var(--drp-rem));--drp-spacing-lg-base: calc(2.4 * var(--drp-rem));--drp-spacing-xl-base: calc(3.2 * var(--drp-rem));--drp-spacing-xs: calc(var(--drp-spacing-xs-base) * var(--drp-spacing-scale));--drp-spacing-sm: calc(var(--drp-spacing-sm-base) * var(--drp-spacing-scale));--drp-spacing-md: calc(var(--drp-spacing-md-base) * var(--drp-spacing-scale));--drp-spacing-lg: calc(var(--drp-spacing-lg-base) * var(--drp-spacing-scale));--drp-spacing-xl: calc(var(--drp-spacing-xl-base) * var(--drp-spacing-scale));--drp-font-size-2xs-base: calc(1 * var(--drp-rem));--drp-font-size-xs-base: calc(1.2 * var(--drp-rem));--drp-font-size-sm-base: calc(1.4 * var(--drp-rem));--drp-font-size-base-base: calc(1.6 * var(--drp-rem));--drp-font-size-lg-base: calc(1.8 * var(--drp-rem));--drp-font-size-xl-base: calc(2 * var(--drp-rem));--drp-font-size-2xl-base: calc(2.4 * var(--drp-rem));--drp-font-weight-medium: 500;--drp-font-weight-semibold: 600;--drp-dropdown-background: #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-text-on-accent: #ffffff;--drp-button-text-color: #ffffff;--drp-tooltip-background: #111827;--drp-tooltip-text-color: #ffffff;--drp-loading-overlay-background: rgba(255, 255, 255, .8);--drp-loading-spinner-color: var(--drp-border-color);--drp-loading-spinner-accent: var(--drp-accent-color);--drp-border-width-base: 1px;--drp-border-radius: calc(.6 * var(--drp-rem));--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: calc(1.2 * var(--drp-rem));--drp-grid-columns: 3;--drp-grid-rows: 2;--drp-input-background: var(--drp-dropdown-background);--drp-input-color: var(--drp-text-primary);--drp-input-border-color: var(--drp-border-color);--drp-input-border-color-hover: var(--drp-accent-color);--drp-input-border-color-focus: var(--drp-accent-color);--drp-input-placeholder-color: var(--drp-text-secondary);--drp-input-background-disabled: var(--drp-primary-bg);--drp-input-focus-shadow-color: rgba(59, 130, 246, .1);--drp-input-focus-shadow-size: 3px;--drp-input-icon-opacity: .6;--drp-input-size-xs-font: calc(1.2 * var(--drp-rem));--drp-input-size-xs-padding-v: calc(.4 * var(--drp-rem));--drp-input-size-xs-padding-h: calc(.4 * var(--drp-rem));--drp-input-size-xs-height: calc(3.1 * var(--drp-rem));--drp-input-size-xs-icon-size: .75em;--drp-input-size-sm-font: calc(1.4 * var(--drp-rem));--drp-input-size-sm-padding-v: calc(.4 * var(--drp-rem));--drp-input-size-sm-padding-h: calc(.8 * var(--drp-rem));--drp-input-size-sm-height: calc(3.3 * var(--drp-rem));--drp-input-size-sm-icon-size: .875em;--drp-input-size-md-font: calc(1.6 * var(--drp-rem));--drp-input-size-md-padding-v: calc(.8 * var(--drp-rem));--drp-input-size-md-padding-h: calc(1.2 * var(--drp-rem));--drp-input-size-md-height: calc(3.5 * var(--drp-rem));--drp-input-size-md-icon-size: 1em;--drp-input-size-lg-font: calc(1.8 * var(--drp-rem));--drp-input-size-lg-padding-v: calc(1.6 * var(--drp-rem));--drp-input-size-lg-padding-h: calc(1.6 * var(--drp-rem));--drp-input-size-lg-height: calc(3.8 * var(--drp-rem));--drp-input-size-lg-icon-size: 1.125em;--drp-input-size-xl-font: calc(2 * var(--drp-rem));--drp-input-size-xl-padding-v: calc(1.6 * var(--drp-rem));--drp-input-size-xl-padding-h: calc(2.4 * var(--drp-rem));--drp-input-size-xl-height: calc(4.1 * var(--drp-rem));--drp-input-size-xl-icon-size: 1.25em;--drp-header-text-color: var(--drp-text-primary);--drp-header-bg-hover: var(--drp-primary-bg);--drp-header-bg-active: var(--drp-primary-bg-hover);--drp-nav-text-color: var(--drp-text-primary);--drp-nav-border-color: var(--drp-border-color);--drp-nav-bg-hover: var(--drp-primary-bg);--drp-nav-bg-active: var(--drp-primary-bg-hover);--drp-nav-border-hover: var(--drp-accent-color);--drp-rolling-bg: var(--drp-primary-bg);--drp-rolling-border-color: var(--drp-border-color);--drp-rolling-scrollbar-thumb: var(--drp-border-color);--drp-rolling-scrollbar-thumb-hover: var(--drp-accent-color);--drp-rolling-item-bg-hover: var(--drp-primary-bg);--drp-rolling-item-bg-selected: var(--drp-accent-color);--drp-rolling-item-color-selected: var(--drp-text-on-accent);--drp-rolling-item-bg-selected-hover: var(--drp-accent-color-hover);--drp-weekday-color: var(--drp-text-secondary);--drp-day-text-color: var(--drp-text-primary);--drp-day-bg-hover: var(--drp-primary-bg);--drp-day-border-hover: var(--drp-accent-color);--drp-day-today-border: var(--drp-accent-color);--drp-day-selected-bg: var(--drp-accent-color);--drp-day-selected-color: var(--drp-text-on-accent);--drp-day-selected-bg-hover: var(--drp-accent-color-hover);--drp-day-focused-outline: var(--drp-accent-color);--drp-day-disabled-color: var(--drp-text-secondary);--drp-day-other-month-color: var(--drp-text-secondary);--drp-day-range-bg: var(--drp-accent-color);--drp-day-range-color: var(--drp-text-on-accent);--drp-summary-text-color: var(--drp-text-secondary);--drp-summary-border-color: var(--drp-border-color);--drp-summary-count-color: var(--drp-accent-color);--drp-button-border-color: var(--drp-border-color);--drp-button-bg-hover: var(--drp-primary-bg);--drp-button-border-hover: var(--drp-accent-color);--drp-button-today-color: var(--drp-accent-color);--drp-button-clear-color: var(--drp-text-secondary);--drp-button-cancel-color: var(--drp-text-secondary);--drp-button-apply-bg: var(--drp-accent-color);--drp-button-apply-color: var(--drp-button-text-color);--drp-button-apply-border: var(--drp-accent-color);--drp-button-apply-bg-hover: var(--drp-accent-color-hover);--drp-badge-number-bg: var(--drp-accent-color);--drp-badge-number-color: var(--drp-text-on-accent);--drp-badge-count-bg: #ef4444;--drp-badge-count-color: #ffffff;--drp-badge-text-bg: var(--drp-text-secondary);--drp-badge-text-color: #ffffff;--drp-unified-range-text-color: var(--drp-text-primary);--drp-unified-range-bg-hover: var(--drp-primary-bg);--drp-unified-range-bg-active: var(--drp-primary-bg-hover);--drp-unified-month-color: var(--drp-text-secondary);--drp-unified-rolling-disabled-color: var(--drp-text-secondary)}.drp-input{width:100%;font-family:inherit;font-size:var(--drp-input-size-md-font);line-height:1.5;color:var(--drp-input-color);background-color:var(--drp-input-background);border:var(--drp-border-width-base) solid var(--drp-input-border-color);border-radius:var(--drp-border-radius);padding:var(--drp-input-size-md-padding-v) var(--drp-input-size-md-padding-h);padding-right:calc(var(--drp-input-size-md-padding-h) * 2.5);height:var(--drp-input-size-md-height);box-sizing:border-box;transition:border-color var(--drp-transition-fast) var(--drp-easing-snappy),box-shadow var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-input::placeholder{color:var(--drp-input-placeholder-color);opacity:.6}.drp-input:hover:not(:disabled){border-color:var(--drp-input-border-color-hover)}.drp-input:focus{outline:none;border-color:var(--drp-input-border-color-focus);box-shadow:0 0 0 var(--drp-input-focus-shadow-size) var(--drp-input-focus-shadow-color)}.drp-input:disabled{opacity:.6;cursor:not-allowed;background-color:var(--drp-input-background-disabled)}.drp-input.drp-input--xs{font-size:var(--drp-input-size-xs-font);padding:var(--drp-input-size-xs-padding-v) var(--drp-input-size-xs-padding-h);padding-right:calc(var(--drp-input-size-xs-padding-h) * 2.5);height:var(--drp-input-size-xs-height)}.drp-input.drp-input--sm{font-size:var(--drp-input-size-sm-font);padding:var(--drp-input-size-sm-padding-v) var(--drp-input-size-sm-padding-h);padding-right:calc(var(--drp-input-size-sm-padding-h) * 2.5);height:var(--drp-input-size-sm-height)}.drp-input.drp-input--lg{font-size:var(--drp-input-size-lg-font);padding:var(--drp-input-size-lg-padding-v) var(--drp-input-size-lg-padding-h);padding-right:calc(var(--drp-input-size-lg-padding-h) * 2.5);height:var(--drp-input-size-lg-height)}.drp-input.drp-input--xl{font-size:var(--drp-input-size-xl-font);padding:var(--drp-input-size-xl-padding-v) var(--drp-input-size-xl-padding-h);padding-right:calc(var(--drp-input-size-xl-padding-h) * 2.5);height:var(--drp-input-size-xl-height)}.drp-date-picker-input{position:relative;cursor:pointer;display:inline-block;width:100%}.drp-date-picker-input:after{content:"📅";position:absolute;right:var(--drp-input-size-md-padding-h);top:50%;transform:translateY(-50%);pointer-events:none;opacity:var(--drp-input-icon-opacity);font-size:var(--drp-input-size-md-icon-size)}.drp-date-picker-input.drp-date-picker-input--xs:after{right:var(--drp-input-size-xs-padding-h);font-size:var(--drp-input-size-xs-icon-size)}.drp-date-picker-input.drp-date-picker-input--sm:after{right:var(--drp-input-size-sm-padding-h);font-size:var(--drp-input-size-sm-icon-size)}.drp-date-picker-input.drp-date-picker-input--lg:after{right:var(--drp-input-size-lg-padding-h);font-size:var(--drp-input-size-lg-icon-size)}.drp-date-picker-input.drp-date-picker-input--xl:after{right:var(--drp-input-size-xl-padding-h);font-size:var(--drp-input-size-xl-icon-size)}.drp-date-picker{position:absolute;z-index:9500;background:var(--drp-dropdown-background);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-font-size-2xs: calc(var(--drp-font-size-2xs-base) * var(--drp-font-scale));--drp-font-size-xs: calc(var(--drp-font-size-xs-base) * var(--drp-font-scale));--drp-font-size-sm: calc(var(--drp-font-size-sm-base) * var(--drp-font-scale));--drp-font-size-base: calc(var(--drp-font-size-base-base) * var(--drp-font-scale));--drp-font-size-lg: calc(var(--drp-font-size-lg-base) * var(--drp-font-scale));--drp-font-size-xl: calc(var(--drp-font-size-xl-base) * var(--drp-font-scale));--drp-font-size-2xl: calc(var(--drp-font-size-2xl-base) * var(--drp-font-scale))}.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:calc(280px * var(--drp-cell-scale));display:flex;flex-direction:column}.drp-date-picker--inline .drp-date-picker__month{min-width:calc(250px * var(--drp-cell-scale))}.drp-date-picker__months--grid .drp-date-picker__month{min-width:0;width:100%}.drp-date-picker__calendar-container{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.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__header--static{justify-content:center}.drp-date-picker__header--static .drp-date-picker__month-year{cursor:default}.drp-date-picker__header--static .drp-date-picker__month-year:hover{background-color:transparent}.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-header-text-color);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__month-year:hover{background-color:var(--drp-header-bg-hover)}.drp-date-picker__month-year:active{background-color:var(--drp-header-bg-active)}.drp-date-picker__nav{width:calc(calc(3.2 * var(--drp-rem)) * var(--drp-cell-scale));height:calc(calc(3.2 * var(--drp-rem)) * var(--drp-cell-scale));display:flex;align-items:center;justify-content:center;border:var(--drp-border-width-base) solid var(--drp-nav-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-lg);color:var(--drp-nav-text-color)}.drp-date-picker__nav:hover{background-color:var(--drp-nav-bg-hover);border-color:var(--drp-nav-border-hover)}.drp-date-picker__nav:active{background-color:var(--drp-nav-bg-active)}.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-nav-border-color)}.drp-date-picker__nav--prev:before{content:"‹"}.drp-date-picker__nav--next:before{content:"›"}.drp-date-picker__rolling-selector{position:absolute;top:0;right:0;bottom:0;left:0;display:none;z-index:10}.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{visibility:hidden}.drp-date-picker__rolling-selector{gap:var(--drp-spacing-xs)}.drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-rolling-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-rolling-bg)}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-rolling-scrollbar-thumb);border-radius:3px}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-rolling-scrollbar-thumb-hover)}.drp-date-picker__rolling-item{padding:calc(.4 * var(--drp-rem)) calc(1.6 * var(--drp-rem));cursor:pointer;font-size:calc(1.4 * var(--drp-rem));min-height:calc(calc(3.2 * var(--drp-rem)) * var(--drp-cell-scale));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__rolling-item:hover{background-color:var(--drp-rolling-item-bg-hover)}.drp-date-picker__rolling-item--selected{background-color:var(--drp-rolling-item-bg-selected);color:var(--drp-rolling-item-color-selected);font-weight:600}.drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-rolling-item-bg-selected-hover)}.drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker__unified-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-lg);gap:var(--drp-spacing-sm);padding:0 var(--drp-spacing-sm)}.drp-date-picker__unified-range{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-lg);color:var(--drp-unified-range-text-color);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__unified-range:hover{background-color:var(--drp-unified-range-bg-hover)}.drp-date-picker__unified-range:active{background-color:var(--drp-unified-range-bg-active)}.drp-date-picker__unified-range--static{cursor:default!important}.drp-date-picker__unified-range--static:hover,.drp-date-picker__unified-range--static:active{background-color:transparent}.drp-date-picker__unified-rolling-selector{position:absolute;top:calc(var(--drp-spacing-lg) + var(--drp-spacing-lg) * 2);left:50%;transform:translate(-50%);width:min(90%,450px);height:350px;max-height:350px;display:none;z-index:100;background:var(--drp-dropdown-background);gap:var(--drp-spacing-xs)}.drp-date-picker__unified-rolling-selector--visible{display:flex}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-rolling-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-rolling-bg)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-rolling-scrollbar-thumb);border-radius:3px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-rolling-scrollbar-thumb-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item{padding:calc(.4 * var(--drp-rem)) calc(1.6 * var(--drp-rem));cursor:pointer;font-size:calc(1.4 * var(--drp-rem));min-height:calc(calc(3.2 * var(--drp-rem)) * var(--drp-cell-scale));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item:hover{background-color:var(--drp-rolling-item-bg-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected{background-color:var(--drp-rolling-item-bg-selected);color:var(--drp-rolling-item-color-selected);font-weight:600}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-rolling-item-bg-selected-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--disabled{color:var(--drp-unified-rolling-disabled-color);opacity:.4;cursor:not-allowed}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__nav{display:none}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year{cursor:default;font-size:var(--drp-font-size-base);font-weight:var(--drp-font-weight-normal);color:var(--drp-unified-month-color)}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year:hover{background-color:transparent}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__rolling-selector{display:none!important}.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-weekday-color);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-day-text-color);border-radius:var(--drp-border-radius);cursor:pointer;border:calc(2px * var(--drp-cell-scale)) 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-day-bg-hover);border-color:var(--drp-day-border-hover)}.drp-date-picker__day--today{border-color:var(--drp-day-today-border);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected{background-color:var(--drp-day-selected-bg);color:var(--drp-day-selected-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected:hover{background-color:var(--drp-day-selected-bg-hover)}.drp-date-picker__day--focused{outline:calc(2px * var(--drp-cell-scale)) solid var(--drp-day-focused-outline);outline-offset:calc(2px * var(--drp-cell-scale))}.drp-date-picker__day--disabled{color:var(--drp-day-disabled-color);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-day-other-month-color);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-day-range-bg);color:var(--drp-day-range-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-day-range-bg) 15%,transparent)}.drp-date-picker__day--in-range:hover{background-color:color-mix(in srgb,var(--drp-day-range-bg) 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-day-range-bg) 30%,transparent);border:calc(2px * var(--drp-cell-scale)) dashed var(--drp-day-range-bg)}.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-day-range-bg) 60%,transparent);color:var(--drp-day-range-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-unified-rolling-disabled-color);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:calc(calc(1.6 * var(--drp-rem)) * var(--drp-cell-scale));min-height:calc(calc(1.6 * var(--drp-rem)) * var(--drp-cell-scale))}.drp-date-picker__badge-cell{display:flex;align-items:center;justify-content:center;font-size:var(--drp-font-size-2xs);padding:calc(1px * var(--drp-cell-scale)) calc(2px * var(--drp-cell-scale));border-radius:2px;cursor:pointer;height:100%;max-height:calc(calc(1.6 * var(--drp-rem)) * var(--drp-cell-scale))}.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:var(--drp-badge-number-bg);color:var(--drp-badge-number-color);font-size:calc(1.12 * var(--drp-rem));font-weight:600}.drp-date-picker__badge-cell.badge-count{background-color:var(--drp-badge-count-bg);color:var(--drp-badge-count-color);font-size:calc(1.12 * var(--drp-rem));font-weight:700}.drp-date-picker__badge-cell.badge-text{background-color:var(--drp-badge-text-bg);color:var(--drp-badge-text-color);font-size:calc(1.04 * var(--drp-rem));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-summary-border-color);font-size:var(--drp-font-size-sm);color:var(--drp-summary-text-color)}.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-summary-count-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-summary-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-button-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)}.drp-date-picker__button:hover{background-color:var(--drp-button-bg-hover);border-color:var(--drp-button-border-hover)}.drp-date-picker__button:disabled,.drp-date-picker__button[disabled]{opacity:var(--drp-disabled-opacity, .6);cursor:not-allowed;pointer-events:none}.drp-date-picker__button:disabled:hover,.drp-date-picker__button[disabled]:hover{background-color:transparent;border-color:var(--drp-button-border-color)}.drp-date-picker__button--today{color:var(--drp-button-today-color)}.drp-date-picker__button--clear{color:var(--drp-button-clear-color)}.drp-date-picker__button--apply{background-color:var(--drp-button-apply-bg);color:var(--drp-button-apply-color);border-color:var(--drp-button-apply-border)}.drp-date-picker__button--apply:hover{background-color:var(--drp-button-apply-bg-hover)}.drp-date-picker__button--cancel{color:var(--drp-button-cancel-color)}.drp-date-picker__tooltip{position:absolute;z-index:9999;background-color:var(--drp-tooltip-background);color:var(--drp-tooltip-text-color);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-tooltip-background);width:8px;height:8px;transform:rotate(45deg)}.drp-date-picker__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:var(--drp-loading-overlay-background);display:flex;align-items:center;justify-content:center;z-index:9500;border-radius:var(--drp-border-radius)}.drp-date-picker__loading-spinner{width:40px;height:40px;border:4px solid var(--drp-loading-spinner-color);border-top-color:var(--drp-loading-spinner-accent);border-radius:50%;animation:drp-spin .8s linear infinite}@keyframes drp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drp-date-picker.drp-font-xs{--drp-font-scale: .6}.drp-date-picker.drp-font-sm{--drp-font-scale: .8}.drp-date-picker.drp-font-md{--drp-font-scale: 1}.drp-date-picker.drp-font-lg{--drp-font-scale: 1.5}.drp-date-picker.drp-font-xl{--drp-font-scale: 2}.drp-date-picker.drp-spacing-xs{--drp-spacing-scale: .6}.drp-date-picker.drp-spacing-sm{--drp-spacing-scale: .8}.drp-date-picker.drp-spacing-md{--drp-spacing-scale: 1}.drp-date-picker.drp-spacing-lg{--drp-spacing-scale: 1.5}.drp-date-picker.drp-spacing-xl{--drp-spacing-scale: 2}.drp-date-picker.drp-cell-xs{--drp-cell-scale: .6}.drp-date-picker.drp-cell-sm{--drp-cell-scale: .8}.drp-date-picker.drp-cell-md{--drp-cell-scale: 1}.drp-date-picker.drp-cell-lg{--drp-cell-scale: 1.5}.drp-date-picker.drp-cell-xl{--drp-cell-scale: 2}@media (max-width: 1200px){.drp-responsive.drp-font-xl{--drp-font-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-font-xl{--drp-font-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-font-lg{--drp-font-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-font-lg{--drp-font-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-font-md{--drp-font-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-font-sm{--drp-font-scale: .6}}@media (max-width: 1200px){.drp-responsive.drp-spacing-xl{--drp-spacing-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-spacing-xl{--drp-spacing-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-spacing-lg{--drp-spacing-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-spacing-lg{--drp-spacing-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-spacing-md{--drp-spacing-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-spacing-sm{--drp-spacing-scale: .6}}@media (max-width: 1200px){.drp-responsive.drp-cell-xl{--drp-cell-scale: 1.5}}@media (max-width: 768px){.drp-responsive.drp-cell-xl{--drp-cell-scale: 1}}@media (max-width: 1200px){.drp-responsive.drp-cell-lg{--drp-cell-scale: 1}}@media (max-width: 768px){.drp-responsive.drp-cell-lg{--drp-cell-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-cell-md{--drp-cell-scale: .8}}@media (max-width: 768px){.drp-responsive.drp-cell-sm{--drp-cell-scale: .6}}.drp-date-picker--xs{--drp-font-scale: .6;--drp-spacing-scale: .6;--drp-cell-scale: .6;min-width:168px}.drp-date-picker--sm{--drp-font-scale: .8;--drp-spacing-scale: .8;--drp-cell-scale: .8;min-width:224px}.drp-date-picker--lg{--drp-font-scale: 1.5;--drp-spacing-scale: 1.5;--drp-cell-scale: 1.5;min-width:420px}.drp-date-picker--xl{--drp-font-scale: 2;--drp-spacing-scale: 2;--drp-cell-scale: 2;min-width:560px}.drp-date-picker.drp-transitions-enabled .drp-date-picker__badge-cell{transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__nav,.drp-date-picker.drp-transitions-enabled .drp-date-picker__action-btn{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy),border-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__month-year,.drp-date-picker.drp-transitions-enabled .drp-date-picker__rolling-item{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker--inline{position:static;display:block;box-shadow:none}', ve = class ve {
|
|
2690
|
+
const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-spacing-xs: calc(.4 * var(--drp-rem));--drp-spacing-sm: calc(.8 * var(--drp-rem));--drp-spacing-md: calc(1.6 * var(--drp-rem));--drp-spacing-lg: calc(2.4 * var(--drp-rem));--drp-spacing-xl: calc(3.2 * var(--drp-rem));--drp-font-size-2xs: calc(var(--base-font-size-2xs, 1) * var(--drp-rem));--drp-font-size-xs: calc(var(--base-font-size-xs, 1.2) * var(--drp-rem));--drp-font-size-sm: calc(var(--base-font-size-sm, 1.4) * var(--drp-rem));--drp-font-size-base: calc(var(--base-font-size-base, 1.6) * var(--drp-rem));--drp-font-size-lg: calc(var(--base-font-size-lg, 1.8) * var(--drp-rem));--drp-font-size-xl: calc(var(--base-font-size-xl, 2) * var(--drp-rem));--drp-font-size-2xl: calc(var(--base-font-size-2xl, 2.4) * var(--drp-rem));--drp-font-weight-normal: var(--base-font-weight-normal, 400);--drp-font-weight-medium: var(--base-font-weight-medium, 500);--drp-font-weight-semibold: var(--base-font-weight-semibold, 600);--drp-line-height-tight: var(--base-line-height-tight, 1.25);--drp-line-height-normal: var(--base-line-height-normal, 1.5);--drp-line-height-relaxed: var(--base-line-height-relaxed, 1.75);--drp-dropdown-background: #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-text-on-accent: #ffffff;--drp-button-text-color: #ffffff;--drp-tooltip-background: #111827;--drp-tooltip-text-color: #ffffff;--drp-loading-overlay-background: rgba(255, 255, 255, .8);--drp-loading-spinner-color: var(--drp-border-color);--drp-loading-spinner-accent: var(--drp-accent-color);--drp-border-width-base: 1px;--drp-border-radius: calc(.6 * var(--drp-rem));--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: calc(1.2 * var(--drp-rem));--drp-grid-columns: 3;--drp-grid-rows: 2;--drp-input-background: var(--drp-dropdown-background);--drp-input-color: var(--drp-text-primary);--drp-input-border-color: var(--drp-border-color);--drp-input-border-color-hover: var(--drp-accent-color);--drp-input-border-color-focus: var(--drp-accent-color);--drp-input-placeholder-color: var(--drp-text-secondary);--drp-input-background-disabled: var(--drp-primary-bg);--drp-input-focus-shadow-color: rgba(59, 130, 246, .1);--drp-input-focus-shadow-size: 3px;--drp-input-icon-opacity: .6;--drp-input-size-xs-font: calc(1.2 * var(--drp-rem));--drp-input-size-xs-padding-v: calc(.4 * var(--drp-rem));--drp-input-size-xs-padding-h: calc(.8 * var(--drp-rem));--drp-input-size-xs-height: calc(3.1 * var(--drp-rem));--drp-input-size-xs-icon-size: .75em;--drp-input-size-sm-font: calc(1.3 * var(--drp-rem));--drp-input-size-sm-padding-v: calc(.5 * var(--drp-rem));--drp-input-size-sm-padding-h: calc(.8 * var(--drp-rem));--drp-input-size-sm-height: calc(3.3 * var(--drp-rem));--drp-input-size-sm-icon-size: .875em;--drp-input-size-md-font: calc(1.4 * var(--drp-rem));--drp-input-size-md-padding-v: calc(.8 * var(--drp-rem));--drp-input-size-md-padding-h: calc(1.2 * var(--drp-rem));--drp-input-size-md-height: calc(3.5 * var(--drp-rem));--drp-input-size-md-icon-size: 1em;--drp-input-size-lg-font: calc(1.6 * var(--drp-rem));--drp-input-size-lg-padding-v: calc(1 * var(--drp-rem));--drp-input-size-lg-padding-h: calc(1.4 * var(--drp-rem));--drp-input-size-lg-height: calc(3.8 * var(--drp-rem));--drp-input-size-lg-icon-size: 1.125em;--drp-input-size-xl-font: calc(1.8 * var(--drp-rem));--drp-input-size-xl-padding-v: calc(1.2 * var(--drp-rem));--drp-input-size-xl-padding-h: calc(1.6 * var(--drp-rem));--drp-input-size-xl-height: calc(4.1 * var(--drp-rem));--drp-input-size-xl-icon-size: 1.25em;--drp-header-text-color: var(--drp-text-primary);--drp-header-bg-hover: var(--drp-primary-bg);--drp-header-bg-active: var(--drp-primary-bg-hover);--drp-nav-text-color: var(--drp-text-primary);--drp-nav-border-color: var(--drp-border-color);--drp-nav-bg-hover: var(--drp-primary-bg);--drp-nav-bg-active: var(--drp-primary-bg-hover);--drp-nav-border-hover: var(--drp-accent-color);--drp-rolling-bg: var(--drp-primary-bg);--drp-rolling-border-color: var(--drp-border-color);--drp-rolling-scrollbar-thumb: var(--drp-border-color);--drp-rolling-scrollbar-thumb-hover: var(--drp-accent-color);--drp-rolling-item-bg-hover: var(--drp-primary-bg);--drp-rolling-item-bg-selected: var(--drp-accent-color);--drp-rolling-item-color-selected: var(--drp-text-on-accent);--drp-rolling-item-bg-selected-hover: var(--drp-accent-color-hover);--drp-weekday-color: var(--drp-text-secondary);--drp-day-text-color: var(--drp-text-primary);--drp-day-bg-hover: var(--drp-primary-bg);--drp-day-border-hover: var(--drp-accent-color);--drp-day-today-border: var(--drp-accent-color);--drp-day-selected-bg: var(--drp-accent-color);--drp-day-selected-color: var(--drp-text-on-accent);--drp-day-selected-bg-hover: var(--drp-accent-color-hover);--drp-day-focused-outline: var(--drp-accent-color);--drp-day-disabled-color: var(--drp-text-secondary);--drp-day-other-month-color: var(--drp-text-secondary);--drp-day-range-bg: var(--drp-accent-color);--drp-day-range-color: var(--drp-text-on-accent);--drp-summary-text-color: var(--drp-text-secondary);--drp-summary-border-color: var(--drp-border-color);--drp-summary-count-color: var(--drp-accent-color);--drp-button-border-color: var(--drp-border-color);--drp-button-bg-hover: var(--drp-primary-bg);--drp-button-border-hover: var(--drp-accent-color);--drp-button-today-color: var(--drp-accent-color);--drp-button-clear-color: var(--drp-text-secondary);--drp-button-cancel-color: var(--drp-text-secondary);--drp-button-apply-bg: var(--drp-accent-color);--drp-button-apply-color: var(--drp-button-text-color);--drp-button-apply-border: var(--drp-accent-color);--drp-button-apply-bg-hover: var(--drp-accent-color-hover);--drp-badge-number-bg: var(--drp-accent-color);--drp-badge-number-color: var(--drp-text-on-accent);--drp-badge-count-bg: #ef4444;--drp-badge-count-color: #ffffff;--drp-badge-text-bg: var(--drp-text-secondary);--drp-badge-text-color: #ffffff;--drp-unified-range-text-color: var(--drp-text-primary);--drp-unified-range-bg-hover: var(--drp-primary-bg);--drp-unified-range-bg-active: var(--drp-primary-bg-hover);--drp-unified-month-color: var(--drp-text-secondary);--drp-unified-rolling-disabled-color: var(--drp-text-secondary)}.drp-input{width:100%;font-family:var(--drp-font-family, var(--base-font-family, inherit));font-size:var(--drp-input-size-md-font);line-height:var(--drp-line-height-normal);color:var(--drp-input-color);background-color:var(--drp-input-background);border:var(--drp-border-width-base) solid var(--drp-input-border-color);border-radius:var(--drp-border-radius);padding:var(--drp-input-size-md-padding-v) var(--drp-input-size-md-padding-h);padding-right:calc(var(--drp-input-size-md-padding-h) * 2.5);height:var(--drp-input-size-md-height);box-sizing:border-box;transition:border-color var(--drp-transition-fast) var(--drp-easing-snappy),box-shadow var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-input::placeholder{color:var(--drp-input-placeholder-color);opacity:.6}.drp-input:hover:not(:disabled){border-color:var(--drp-input-border-color-hover)}.drp-input:focus{outline:none;border-color:var(--drp-input-border-color-focus);box-shadow:0 0 0 var(--drp-input-focus-shadow-size) var(--drp-input-focus-shadow-color)}.drp-input:disabled{opacity:.6;cursor:not-allowed;background-color:var(--drp-input-background-disabled)}.drp-input.drp-input--xs{font-size:var(--drp-input-size-xs-font);padding:var(--drp-input-size-xs-padding-v) var(--drp-input-size-xs-padding-h);padding-right:calc(var(--drp-input-size-xs-padding-h) * 2.5);height:var(--drp-input-size-xs-height)}.drp-input.drp-input--sm{font-size:var(--drp-input-size-sm-font);padding:var(--drp-input-size-sm-padding-v) var(--drp-input-size-sm-padding-h);padding-right:calc(var(--drp-input-size-sm-padding-h) * 2.5);height:var(--drp-input-size-sm-height)}.drp-input.drp-input--lg{font-size:var(--drp-input-size-lg-font);padding:var(--drp-input-size-lg-padding-v) var(--drp-input-size-lg-padding-h);padding-right:calc(var(--drp-input-size-lg-padding-h) * 2.5);height:var(--drp-input-size-lg-height)}.drp-input.drp-input--xl{font-size:var(--drp-input-size-xl-font);padding:var(--drp-input-size-xl-padding-v) var(--drp-input-size-xl-padding-h);padding-right:calc(var(--drp-input-size-xl-padding-h) * 2.5);height:var(--drp-input-size-xl-height)}.drp-date-picker-input{position:relative;cursor:pointer;display:inline-block;width:100%}.drp-date-picker-input:after{content:"📅";position:absolute;right:var(--drp-input-size-md-padding-h);top:50%;transform:translateY(-50%);pointer-events:none;opacity:var(--drp-input-icon-opacity);font-size:var(--drp-input-size-md-icon-size)}.drp-date-picker-input.drp-date-picker-input--xs:after{right:var(--drp-input-size-xs-padding-h);font-size:var(--drp-input-size-xs-icon-size)}.drp-date-picker-input.drp-date-picker-input--sm:after{right:var(--drp-input-size-sm-padding-h);font-size:var(--drp-input-size-sm-icon-size)}.drp-date-picker-input.drp-date-picker-input--lg:after{right:var(--drp-input-size-lg-padding-h);font-size:var(--drp-input-size-lg-icon-size)}.drp-date-picker-input.drp-date-picker-input--xl:after{right:var(--drp-input-size-xl-padding-h);font-size:var(--drp-input-size-xl-icon-size)}.drp-date-picker{position:absolute;z-index:9500;font-family:var(--drp-font-family, var(--base-font-family, inherit));background:var(--drp-dropdown-background);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-badge-row-height: calc(1.6 * var(--drp-rem))}.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;display:flex;flex-direction:column}.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__calendar-container{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.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__header--static{justify-content:center}.drp-date-picker__header--static .drp-date-picker__month-year{cursor:default}.drp-date-picker__header--static .drp-date-picker__month-year:hover{background-color:transparent}.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-header-text-color);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__month-year:hover{background-color:var(--drp-header-bg-hover)}.drp-date-picker__month-year:active{background-color:var(--drp-header-bg-active)}.drp-date-picker__nav{width:calc(3.2 * var(--drp-rem));height:calc(3.2 * var(--drp-rem));display:flex;align-items:center;justify-content:center;border:var(--drp-border-width-base) solid var(--drp-nav-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-size:var(--drp-font-size-lg);color:var(--drp-nav-text-color)}.drp-date-picker__nav:hover{background-color:var(--drp-nav-bg-hover);border-color:var(--drp-nav-border-hover)}.drp-date-picker__nav:active{background-color:var(--drp-nav-bg-active)}.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-nav-border-color)}.drp-date-picker__nav--prev:before{content:"‹"}.drp-date-picker__nav--next:before{content:"›"}.drp-date-picker__rolling-selector{position:absolute;top:0;right:0;bottom:0;left:0;display:none;z-index:10}.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{visibility:hidden}.drp-date-picker__rolling-selector{gap:var(--drp-spacing-xs)}.drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-rolling-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-rolling-bg)}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-rolling-scrollbar-thumb);border-radius:3px}.drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-rolling-scrollbar-thumb-hover)}.drp-date-picker__rolling-item{padding:calc(.4 * var(--drp-rem)) calc(1.6 * var(--drp-rem));cursor:pointer;font-size:calc(1.4 * var(--drp-rem));min-height:calc(3.2 * var(--drp-rem));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__rolling-item:hover{background-color:var(--drp-rolling-item-bg-hover)}.drp-date-picker__rolling-item--selected{background-color:var(--drp-rolling-item-bg-selected);color:var(--drp-rolling-item-color-selected);font-weight:600}.drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-rolling-item-bg-selected-hover)}.drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker__unified-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--drp-spacing-lg);gap:var(--drp-spacing-sm);padding:0 var(--drp-spacing-sm)}.drp-date-picker__unified-range{flex:1;text-align:center;font-weight:var(--drp-font-weight-semibold);font-size:var(--drp-font-size-lg);color:var(--drp-unified-range-text-color);padding:var(--drp-spacing-sm) var(--drp-spacing-md);border-radius:var(--drp-border-radius);cursor:pointer}.drp-date-picker__unified-range:hover{background-color:var(--drp-unified-range-bg-hover)}.drp-date-picker__unified-range:active{background-color:var(--drp-unified-range-bg-active)}.drp-date-picker__unified-range--static{cursor:default!important}.drp-date-picker__unified-range--static:hover,.drp-date-picker__unified-range--static:active{background-color:transparent}.drp-date-picker__unified-rolling-selector{position:absolute;top:calc(var(--drp-spacing-lg) + var(--drp-spacing-lg) * 2);left:50%;transform:translate(-50%);width:min(90%,450px);height:350px;max-height:350px;display:none;z-index:100;background:var(--drp-dropdown-background);gap:var(--drp-spacing-xs)}.drp-date-picker__unified-rolling-selector--visible{display:flex}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list{flex:1;min-width:0;height:100%;overflow-y:auto;border:var(--drp-border-width-base) solid var(--drp-rolling-border-color);border-radius:var(--drp-border-radius);display:flex;flex-direction:column;scroll-behavior:smooth}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar{width:6px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-track{background:var(--drp-rolling-bg)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb{background:var(--drp-rolling-scrollbar-thumb);border-radius:3px}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-list::-webkit-scrollbar-thumb:hover{background:var(--drp-rolling-scrollbar-thumb-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item{padding:calc(.4 * var(--drp-rem)) calc(1.6 * var(--drp-rem));cursor:pointer;font-size:calc(1.4 * var(--drp-rem));min-height:calc(3.2 * var(--drp-rem));flex-shrink:0;display:flex;align-items:center;justify-content:var(--drp-rolling-item-justify-content, center)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item:hover{background-color:var(--drp-rolling-item-bg-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected{background-color:var(--drp-rolling-item-bg-selected);color:var(--drp-rolling-item-color-selected);font-weight:600}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--selected:hover{background-color:var(--drp-rolling-item-bg-selected-hover)}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item--disabled{color:var(--drp-unified-rolling-disabled-color);opacity:.4;cursor:not-allowed}.drp-date-picker__unified-rolling-selector .drp-date-picker__rolling-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;min-width:0}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__nav{display:none}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year{cursor:default;font-size:var(--drp-font-size-base);font-weight:var(--drp-font-weight-normal);color:var(--drp-unified-month-color)}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__header .drp-date-picker__month-year:hover{background-color:transparent}.drp-date-picker--unified-nav .drp-date-picker__month .drp-date-picker__rolling-selector{display:none!important}.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-weekday-color);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-day-text-color);border-radius:var(--drp-border-radius);cursor:pointer;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-day-bg-hover);border-color:var(--drp-day-border-hover)}.drp-date-picker__day--today{border-color:var(--drp-day-today-border);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected{background-color:var(--drp-day-selected-bg);color:var(--drp-day-selected-color);font-weight:var(--drp-font-weight-semibold)}.drp-date-picker__day--selected:hover{background-color:var(--drp-day-selected-bg-hover)}.drp-date-picker__day--focused{outline:2px solid var(--drp-day-focused-outline);outline-offset:2px}.drp-date-picker__day--disabled{color:var(--drp-day-disabled-color);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-day-other-month-color);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-day-range-bg);color:var(--drp-day-range-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-day-range-bg) 15%,transparent)}.drp-date-picker__day--in-range:hover{background-color:color-mix(in srgb,var(--drp-day-range-bg) 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-day-range-bg) 30%,transparent);border:2px dashed var(--drp-day-range-bg)}.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-day-range-bg) 60%,transparent);color:var(--drp-day-range-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-unified-rolling-disabled-color);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);max-height:var(--drp-badge-row-height);min-height:var(--drp-badge-row-height)}.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;cursor:pointer;height:100%;max-height:var(--drp-badge-row-height)}.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:var(--drp-badge-number-bg);color:var(--drp-badge-number-color);font-size:calc(1.12 * var(--drp-rem));font-weight:600}.drp-date-picker__badge-cell.badge-count{background-color:var(--drp-badge-count-bg);color:var(--drp-badge-count-color);font-size:calc(1.12 * var(--drp-rem));font-weight:700}.drp-date-picker__badge-cell.badge-text{background-color:var(--drp-badge-text-bg);color:var(--drp-badge-text-color);font-size:calc(1.04 * var(--drp-rem));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-summary-border-color);font-size:var(--drp-font-size-sm);color:var(--drp-summary-text-color)}.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-summary-count-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-summary-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-button-border-color);border-radius:var(--drp-border-radius);background:transparent;cursor:pointer;font-family:inherit;font-size:var(--drp-font-size-sm);font-weight:var(--drp-font-weight-medium)}.drp-date-picker__button:hover{background-color:var(--drp-button-bg-hover);border-color:var(--drp-button-border-hover)}.drp-date-picker__button:disabled,.drp-date-picker__button[disabled]{opacity:var(--drp-disabled-opacity, .6);cursor:not-allowed;pointer-events:none}.drp-date-picker__button:disabled:hover,.drp-date-picker__button[disabled]:hover{background-color:transparent;border-color:var(--drp-button-border-color)}.drp-date-picker__button--today{color:var(--drp-button-today-color)}.drp-date-picker__button--clear{color:var(--drp-button-clear-color)}.drp-date-picker__button--apply{background-color:var(--drp-button-apply-bg);color:var(--drp-button-apply-color);border-color:var(--drp-button-apply-border)}.drp-date-picker__button--apply:hover{background-color:var(--drp-button-apply-bg-hover)}.drp-date-picker__button--cancel{color:var(--drp-button-cancel-color)}.drp-date-picker__tooltip{position:absolute;z-index:9999;background-color:var(--drp-tooltip-background);color:var(--drp-tooltip-text-color);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-tooltip-background);width:8px;height:8px;transform:rotate(45deg)}.drp-date-picker__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:var(--drp-loading-overlay-background);display:flex;align-items:center;justify-content:center;z-index:9500;border-radius:var(--drp-border-radius)}.drp-date-picker__loading-spinner{width:40px;height:40px;border:4px solid var(--drp-loading-spinner-color);border-top-color:var(--drp-loading-spinner-accent);border-radius:50%;animation:drp-spin .8s linear infinite}@keyframes drp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drp-date-picker.drp-transitions-enabled .drp-date-picker__badge-cell{transition:transform var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__nav,.drp-date-picker.drp-transitions-enabled .drp-date-picker__action-btn{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy),border-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker.drp-transitions-enabled .drp-date-picker__month-year,.drp-date-picker.drp-transitions-enabled .drp-date-picker__rolling-item{transition:background-color var(--drp-transition-fast) var(--drp-easing-snappy)}.drp-date-picker--inline{position:static;display:block;box-shadow:none}', De = class De {
|
|
2691
2691
|
constructor(a, t = {}) {
|
|
2692
2692
|
b(this, "input");
|
|
2693
2693
|
b(this, "options");
|
|
@@ -2827,57 +2827,57 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
2827
2827
|
showClearButton: t.showClearButton !== void 0 ? t.showClearButton : !0,
|
|
2828
2828
|
showApplyButton: t.showApplyButton !== void 0 ? t.showApplyButton : t.selectionMode === "range" || t.selectionMode === "multiple"
|
|
2829
2829
|
}, this.options.showDebugInfo ? ft() : mt(), this.options.unifiedNavigation && this.options.unifiedNavigationAnchorIndex !== void 0) {
|
|
2830
|
-
const
|
|
2831
|
-
(this.options.unifiedNavigationAnchorIndex < 0 || this.options.unifiedNavigationAnchorIndex >
|
|
2830
|
+
const i = this.options.visibleMonthsCount - 1;
|
|
2831
|
+
(this.options.unifiedNavigationAnchorIndex < 0 || this.options.unifiedNavigationAnchorIndex > i) && (console.warn(`unifiedNavigationAnchorIndex (${this.options.unifiedNavigationAnchorIndex}) out of bounds. Using 0.`), this.options.unifiedNavigationAnchorIndex = 0);
|
|
2832
2832
|
}
|
|
2833
|
-
this.weekStartDay = Xt(this.options.weekStartDay),
|
|
2833
|
+
this.weekStartDay = Xt(this.options.weekStartDay), k.debug("Week starts on day:", this.weekStartDay), k.debug("disabledDatesHandling:", this.options.disabledDatesHandling), this.locale = He(this.options.locale), this.localeStrings = In(this.locale, this.options.customStrings), this.weekdayNames = En(this.locale), this.monthNames = this.options.monthNames || Rn(this.locale), k.debug("Locale:", this.locale, "Weekdays:", this.weekdayNames, "Months:", this.monthNames), this.initializeDateRestrictions(), this.formatInfo = this.parseFormat(this.options.dateFormatMask), k.debug("Format info:", this.formatInfo), this._previousInputValue = "", this.currentDate = /* @__PURE__ */ new Date();
|
|
2834
2834
|
let n;
|
|
2835
2835
|
if (this.options.initialDate)
|
|
2836
|
-
n =
|
|
2836
|
+
n = fe(this.options.initialDate) || /* @__PURE__ */ new Date(), k.debug(`Using initialDate: ${n.toISOString()}`);
|
|
2837
2837
|
else if (this.options.rollingYearRange || this.options.rollingMonthRange) {
|
|
2838
|
-
const
|
|
2839
|
-
n = new Date(
|
|
2840
|
-
} else this.normalizedMinDate && this.normalizedMinDate > /* @__PURE__ */ new Date() ? (n = new Date(this.normalizedMinDate),
|
|
2838
|
+
const i = this.getEffectiveYearRange(), r = this.getEffectiveMonthRange(), o = i.min, s = r.min - 1;
|
|
2839
|
+
n = new Date(o, s, 1), k.debug(`Using first allowed year/month as initial: ${n.toISOString()}`);
|
|
2840
|
+
} else this.normalizedMinDate && this.normalizedMinDate > /* @__PURE__ */ new Date() ? (n = new Date(this.normalizedMinDate), k.debug(`Using minDate as initial: ${n.toISOString()}`)) : this.normalizedMaxDate && this.normalizedMaxDate < /* @__PURE__ */ new Date() ? (n = new Date(this.normalizedMaxDate), k.debug(`Using maxDate as initial: ${n.toISOString()}`)) : (n = /* @__PURE__ */ new Date(), k.debug(`Using current date as initial: ${n.toISOString()}`));
|
|
2841
2841
|
this.monthDates = [];
|
|
2842
|
-
for (let
|
|
2843
|
-
const
|
|
2844
|
-
this.monthDates.push(
|
|
2842
|
+
for (let i = 0; i < this.options.visibleMonthsCount; i++) {
|
|
2843
|
+
const r = new Date(n.getFullYear(), n.getMonth() + i, 1);
|
|
2844
|
+
this.monthDates.push(r), k.debug(`monthDates[${i}] = ${r.getFullYear()}-${r.getMonth() + 1}`);
|
|
2845
2845
|
}
|
|
2846
2846
|
if (this.options.selectionMode === "range") {
|
|
2847
2847
|
this.displayMonths = [];
|
|
2848
|
-
for (let
|
|
2849
|
-
const
|
|
2848
|
+
for (let i = 0; i < this.options.visibleMonthsCount; i++) {
|
|
2849
|
+
const r = new Date(n.getFullYear(), n.getMonth() + i, 1);
|
|
2850
2850
|
this.displayMonths.push({
|
|
2851
|
-
month:
|
|
2852
|
-
year:
|
|
2851
|
+
month: r.getMonth(),
|
|
2852
|
+
year: r.getFullYear()
|
|
2853
2853
|
});
|
|
2854
2854
|
}
|
|
2855
2855
|
}
|
|
2856
2856
|
this.selectedDate = null, this.selectedStartDate = null, this.selectedEndDate = null, this.selectedRanges = [], this.selectedDates = [], this.pendingSelection = null, this.focusedDayIndex = null, this.activeMonthIndex = 0, this.showingRollingSelector = [];
|
|
2857
|
-
for (let
|
|
2857
|
+
for (let i = 0; i < this.options.visibleMonthsCount; i++)
|
|
2858
2858
|
this.showingRollingSelector.push(!1);
|
|
2859
2859
|
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();
|
|
2860
2860
|
}
|
|
2861
2861
|
init() {
|
|
2862
|
-
|
|
2862
|
+
k.debug("Init called"), this.createCalendar(), this.input && (this.attachInputListeners(), this.input.value && (k.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, kt(this), this.clickOutsideHandler && document.addEventListener("click", this.clickOutsideHandler)), k.debug("Init complete");
|
|
2863
2863
|
}
|
|
2864
2864
|
/**
|
|
2865
2865
|
* Initialize and normalize date restrictions
|
|
2866
2866
|
*/
|
|
2867
2867
|
initializeDateRestrictions() {
|
|
2868
|
-
if (this.options.minDate && (this.normalizedMinDate =
|
|
2869
|
-
const t =
|
|
2868
|
+
if (this.options.minDate && (this.normalizedMinDate = fe(this.options.minDate)), this.options.maxDate && (this.normalizedMaxDate = fe(this.options.maxDate)), this.options.disabledDates && this.options.disabledDates.length > 0 && this.options.disabledDates.forEach((a) => {
|
|
2869
|
+
const t = fe(a);
|
|
2870
2870
|
if (t) {
|
|
2871
|
-
const n =
|
|
2871
|
+
const n = be(t);
|
|
2872
2872
|
this.normalizedDisabledDates.add(n);
|
|
2873
2873
|
}
|
|
2874
2874
|
}), this.options.specialDates && this.options.specialDates.length > 0) {
|
|
2875
2875
|
const a = this.options.dateMember || "date";
|
|
2876
2876
|
this.options.specialDates.forEach((t) => {
|
|
2877
|
-
const n =
|
|
2877
|
+
const n = fe(t[a]);
|
|
2878
2878
|
if (n) {
|
|
2879
|
-
const
|
|
2880
|
-
this.normalizedSpecialDates.set(
|
|
2879
|
+
const i = be(n);
|
|
2880
|
+
this.normalizedSpecialDates.set(i, t);
|
|
2881
2881
|
} else
|
|
2882
2882
|
console.warn("[Special Dates] Failed to normalize date:", t[a]);
|
|
2883
2883
|
});
|
|
@@ -2898,7 +2898,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
2898
2898
|
* Considers: rollingMonthRange option, or defaults to all months (1-12)
|
|
2899
2899
|
*/
|
|
2900
2900
|
getEffectiveMonthRange() {
|
|
2901
|
-
return
|
|
2901
|
+
return Pt(this.options.rollingMonthRange);
|
|
2902
2902
|
}
|
|
2903
2903
|
/**
|
|
2904
2904
|
* Render action buttons based on configuration
|
|
@@ -2916,12 +2916,12 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
2916
2916
|
return;
|
|
2917
2917
|
} else if (n.isVisible !== void 0 && !n.isVisible)
|
|
2918
2918
|
return;
|
|
2919
|
-
const
|
|
2920
|
-
|
|
2921
|
-
const
|
|
2922
|
-
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2919
|
+
const i = document.createElement("button");
|
|
2920
|
+
i.className = `drp-date-picker__button drp-date-picker__button--${n.action}`;
|
|
2921
|
+
const r = n.getClassCallback ? n.getClassCallback(this) : n.cssClass;
|
|
2922
|
+
r && (Array.isArray(r) ? i.classList.add(...r) : i.classList.add(r));
|
|
2923
|
+
const o = n.getTextCallback ? n.getTextCallback(this) : n.text;
|
|
2924
|
+
i.innerHTML = o, (n.isDisabledCallback ? n.isDisabledCallback(this) : n.isDisabled ?? !1) && (i.disabled = !0), i.dataset.action = n.action, n.onClick && (i._customOnClick = n.onClick), a.appendChild(i);
|
|
2925
2925
|
}), this.attachActionButtonTooltips();
|
|
2926
2926
|
}
|
|
2927
2927
|
/**
|
|
@@ -2946,13 +2946,13 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
2946
2946
|
attachActionButtonTooltips() {
|
|
2947
2947
|
if (!this.actionsContainer) return;
|
|
2948
2948
|
this.actionsContainer.querySelectorAll(".drp-date-picker__action").forEach((t) => {
|
|
2949
|
-
const n = t,
|
|
2950
|
-
if (!r) return;
|
|
2951
|
-
const i = (this.options.actionButtons || this.getDefaultButtons()).find((l) => l.action === r);
|
|
2949
|
+
const n = t, i = n.dataset.action;
|
|
2952
2950
|
if (!i) return;
|
|
2951
|
+
const o = (this.options.actionButtons || this.getDefaultButtons()).find((l) => l.action === i);
|
|
2952
|
+
if (!o) return;
|
|
2953
2953
|
let s;
|
|
2954
|
-
if (
|
|
2955
|
-
const d = `action-${
|
|
2954
|
+
if (o.getTooltipCallback ? s = o.getTooltipCallback(this) : s = o.tooltip, !s) return;
|
|
2955
|
+
const d = `action-${i}-${Date.now()}-${Math.random()}`;
|
|
2956
2956
|
this.createActionButtonTooltip(n, s, d);
|
|
2957
2957
|
});
|
|
2958
2958
|
}
|
|
@@ -2960,16 +2960,16 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
2960
2960
|
* Create a Floating UI tooltip for an action button
|
|
2961
2961
|
*/
|
|
2962
2962
|
createActionButtonTooltip(a, t, n) {
|
|
2963
|
-
const
|
|
2964
|
-
|
|
2965
|
-
let
|
|
2963
|
+
const i = document.createElement("div");
|
|
2964
|
+
i.className = "drp-date-picker__tooltip", i.textContent = t, (this.options.container || document.body).appendChild(i), this.actionButtonTooltips.set(n, i);
|
|
2965
|
+
let o, s;
|
|
2966
2966
|
const d = () => {
|
|
2967
|
-
clearTimeout(s),
|
|
2968
|
-
|
|
2967
|
+
clearTimeout(s), o = window.setTimeout(() => {
|
|
2968
|
+
i.classList.add("drp-date-picker__tooltip--visible"), this.positionActionButtonTooltip(a, i, n);
|
|
2969
2969
|
}, 300);
|
|
2970
2970
|
}, l = () => {
|
|
2971
|
-
clearTimeout(
|
|
2972
|
-
|
|
2971
|
+
clearTimeout(o), s = window.setTimeout(() => {
|
|
2972
|
+
i.classList.remove("drp-date-picker__tooltip--visible");
|
|
2973
2973
|
const c = this.actionButtonTooltipCleanups.get(n);
|
|
2974
2974
|
c && (c(), this.actionButtonTooltipCleanups.delete(n));
|
|
2975
2975
|
}, 100);
|
|
@@ -2980,19 +2980,19 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
2980
2980
|
* Position action button tooltip using Floating UI
|
|
2981
2981
|
*/
|
|
2982
2982
|
async positionActionButtonTooltip(a, t, n) {
|
|
2983
|
-
const { computePosition:
|
|
2984
|
-
|
|
2983
|
+
const { computePosition: i, flip: r, shift: o, offset: s, autoUpdate: d } = await Promise.resolve().then(() => en), l = d(a, t, () => {
|
|
2984
|
+
i(a, t, {
|
|
2985
2985
|
placement: "top",
|
|
2986
2986
|
strategy: "fixed",
|
|
2987
2987
|
middleware: [
|
|
2988
2988
|
s(8),
|
|
2989
|
-
|
|
2990
|
-
|
|
2989
|
+
r(),
|
|
2990
|
+
o({ padding: 8 })
|
|
2991
2991
|
]
|
|
2992
|
-
}).then(({ x: c, y:
|
|
2992
|
+
}).then(({ x: c, y: h }) => {
|
|
2993
2993
|
Object.assign(t.style, {
|
|
2994
2994
|
left: `${c}px`,
|
|
2995
|
-
top: `${
|
|
2995
|
+
top: `${h}px`
|
|
2996
2996
|
});
|
|
2997
2997
|
});
|
|
2998
2998
|
});
|
|
@@ -3015,8 +3015,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3015
3015
|
const t = this.getEffectiveYearRange(), n = a.getFullYear();
|
|
3016
3016
|
if (n < t.min || n > t.max)
|
|
3017
3017
|
return !0;
|
|
3018
|
-
const
|
|
3019
|
-
return
|
|
3018
|
+
const i = this.getEffectiveMonthRange(), r = a.getMonth() + 1;
|
|
3019
|
+
return r < i.min || r > i.max ? !0 : Jt(
|
|
3020
3020
|
a,
|
|
3021
3021
|
this.normalizedMinDate,
|
|
3022
3022
|
this.normalizedMaxDate,
|
|
@@ -3029,7 +3029,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3029
3029
|
* Priority: bulkMetadataCache > callback > specialDates
|
|
3030
3030
|
*/
|
|
3031
3031
|
getDateInfoInternal(a) {
|
|
3032
|
-
const t =
|
|
3032
|
+
const t = be(a);
|
|
3033
3033
|
if (this.bulkMetadataCache && this.bulkMetadataCache.has(t)) {
|
|
3034
3034
|
const n = this.bulkMetadataCache.get(t);
|
|
3035
3035
|
return {
|
|
@@ -3046,12 +3046,12 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3046
3046
|
};
|
|
3047
3047
|
}
|
|
3048
3048
|
if (this.normalizedSpecialDates.has(t)) {
|
|
3049
|
-
const n = this.normalizedSpecialDates.get(t),
|
|
3049
|
+
const n = this.normalizedSpecialDates.get(t), i = this.options.badgeTextMember || "badgeText", r = this.options.badgeClassMember || "badgeClass", o = this.options.dayClassMember || "dayClass", s = this.options.badgeTooltipMember || "badgeTooltip", d = this.options.dayTooltipMember || "dayTooltip", l = this.options.isDisabledMember || "isDisabled";
|
|
3050
3050
|
return {
|
|
3051
3051
|
isDisabled: n[l] !== void 0 ? n[l] : this.isDateDisabledInternal(a),
|
|
3052
|
-
badgeClass: n[
|
|
3053
|
-
dayClass: n[
|
|
3054
|
-
badgeText: n[
|
|
3052
|
+
badgeClass: n[r],
|
|
3053
|
+
dayClass: n[o],
|
|
3054
|
+
badgeText: n[i],
|
|
3055
3055
|
badgeTooltip: n[s],
|
|
3056
3056
|
dayTooltip: n[d]
|
|
3057
3057
|
};
|
|
@@ -3092,7 +3092,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3092
3092
|
return ut(a);
|
|
3093
3093
|
}
|
|
3094
3094
|
isSameDay(a, t) {
|
|
3095
|
-
return
|
|
3095
|
+
return ht(a, t);
|
|
3096
3096
|
}
|
|
3097
3097
|
isInRange(a) {
|
|
3098
3098
|
return na(a, this.selectedStartDate, this.selectedEndDate);
|
|
@@ -3112,12 +3112,12 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3112
3112
|
return this.options.selectionMode === "multiple" ? !1 : this.options.autoClose === "selection";
|
|
3113
3113
|
}
|
|
3114
3114
|
createCalendar() {
|
|
3115
|
-
if (
|
|
3115
|
+
if (k.debug("Creating calendar"), this.calendar = document.createElement("div"), this.calendar.className = "drp-date-picker", this.options.unifiedNavigation && this.calendar.classList.add("drp-date-picker--unified-nav"), this.options.unifiedNavigation) {
|
|
3116
3116
|
this.unifiedHeader = document.createElement("div"), this.unifiedHeader.className = "drp-date-picker__unified-header";
|
|
3117
|
-
const n = this.options.unifiedHeaderInteractive ? "" : " drp-date-picker__unified-range--static",
|
|
3117
|
+
const n = this.options.unifiedHeaderInteractive ? "" : " drp-date-picker__unified-range--static", i = this.options.unifiedHeaderInteractive ? ' data-action="toggle-unified-rolling"' : "";
|
|
3118
3118
|
this.unifiedHeader.innerHTML = `
|
|
3119
3119
|
<button class="drp-date-picker__nav drp-date-picker__nav--prev" data-action="unified-prev"></button>
|
|
3120
|
-
<div class="drp-date-picker__unified-range${n}"${
|
|
3120
|
+
<div class="drp-date-picker__unified-range${n}"${i}></div>
|
|
3121
3121
|
<button class="drp-date-picker__nav drp-date-picker__nav--next" data-action="unified-next"></button>
|
|
3122
3122
|
`, this.unifiedRollingSelector = document.createElement("div"), this.unifiedRollingSelector.className = "drp-date-picker__unified-rolling-selector", this.unifiedRollingSelector.innerHTML = `
|
|
3123
3123
|
<div class="drp-date-picker__rolling-list" data-list="years" data-unified="true"></div>
|
|
@@ -3127,17 +3127,17 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3127
3127
|
const a = document.createElement("div");
|
|
3128
3128
|
this.options.monthLayout === "grid" ? (a.className = "drp-date-picker__months drp-date-picker__months--grid", this.options.gridRows && a.style.setProperty("--drp-grid-rows", String(this.options.gridRows)), this.options.gridColumns && a.style.setProperty("--drp-grid-columns", String(this.options.gridColumns))) : a.className = "drp-date-picker__months drp-date-picker__months--horizontal";
|
|
3129
3129
|
for (let n = 0; n < this.options.visibleMonthsCount; n++) {
|
|
3130
|
-
const
|
|
3131
|
-
|
|
3132
|
-
const
|
|
3130
|
+
const i = document.createElement("div");
|
|
3131
|
+
i.className = "drp-date-picker__month", i.dataset.monthIndex = String(n);
|
|
3132
|
+
const r = this.options.unifiedNavigation ? `<div class="drp-date-picker__header drp-date-picker__header--static">
|
|
3133
3133
|
<div class="drp-date-picker__month-year"></div>
|
|
3134
3134
|
</div>` : `<div class="drp-date-picker__header">
|
|
3135
3135
|
<button class="drp-date-picker__nav drp-date-picker__nav--prev" data-action="prev" data-month-index="${n}"></button>
|
|
3136
3136
|
<div class="drp-date-picker__month-year" data-action="toggle-rolling" data-month-index="${n}"></div>
|
|
3137
3137
|
<button class="drp-date-picker__nav drp-date-picker__nav--next" data-action="next" data-month-index="${n}"></button>
|
|
3138
3138
|
</div>`;
|
|
3139
|
-
|
|
3140
|
-
${
|
|
3139
|
+
i.innerHTML = `
|
|
3140
|
+
${r}
|
|
3141
3141
|
<div class="drp-date-picker__calendar-container">
|
|
3142
3142
|
<div class="drp-date-picker__rolling-selector" data-month-index="${n}">
|
|
3143
3143
|
<div class="drp-date-picker__rolling-list" data-list="years" data-month-index="${n}"></div>
|
|
@@ -3146,86 +3146,86 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3146
3146
|
<div class="drp-date-picker__weekdays"></div>
|
|
3147
3147
|
<div class="drp-date-picker__days" data-month-index="${n}"></div>
|
|
3148
3148
|
</div>
|
|
3149
|
-
`, a.appendChild(
|
|
3149
|
+
`, a.appendChild(i);
|
|
3150
3150
|
}
|
|
3151
3151
|
if (this.calendar.appendChild(a), this.options.selectionMode === "range") {
|
|
3152
3152
|
const n = document.createElement("div");
|
|
3153
3153
|
n.className = "drp-date-picker__summary drp-date-picker__summary--hidden", this.calendar.appendChild(n);
|
|
3154
3154
|
}
|
|
3155
3155
|
const t = document.createElement("div");
|
|
3156
|
-
t.className = "drp-date-picker__actions", this.renderButtons(t), t.children.length > 0 && this.calendar.appendChild(t), this.containerElement.appendChild(this.calendar),
|
|
3156
|
+
t.className = "drp-date-picker__actions", this.renderButtons(t), t.children.length > 0 && this.calendar.appendChild(t), this.containerElement.appendChild(this.calendar), k.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);
|
|
3157
3157
|
}
|
|
3158
3158
|
attachInputListeners() {
|
|
3159
3159
|
if (!this.input) return;
|
|
3160
|
-
|
|
3160
|
+
k.debug("Attaching input listeners");
|
|
3161
3161
|
const a = this.options.calendarOpenTrigger || "focus";
|
|
3162
3162
|
a === "focus" ? this.input.addEventListener("focus", () => {
|
|
3163
|
-
|
|
3163
|
+
k.debug("Input focused - opening calendar"), this.show();
|
|
3164
3164
|
}) : a === "typing" && this.input.addEventListener("input", (t) => {
|
|
3165
|
-
!this.calendar.classList.contains("drp-date-picker--visible") && this.input && this.input.value.length > 0 && (
|
|
3165
|
+
!this.calendar.classList.contains("drp-date-picker--visible") && this.input && this.input.value.length > 0 && (k.debug("User started typing - opening calendar"), this.show());
|
|
3166
3166
|
}), this.input.addEventListener("input", (t) => this.handleInputMask(t)), this.input.addEventListener("keydown", (t) => this.handleKeydown(t)), this.input.addEventListener("paste", (t) => this.handlePaste(t));
|
|
3167
3167
|
}
|
|
3168
3168
|
attachCalendarListeners() {
|
|
3169
3169
|
this.calendar.addEventListener("click", async (a) => {
|
|
3170
3170
|
const t = a.target;
|
|
3171
3171
|
a.stopPropagation();
|
|
3172
|
-
const n = t.dataset.action,
|
|
3172
|
+
const n = t.dataset.action, i = t.dataset.monthIndex, r = i ? parseInt(i) : 0;
|
|
3173
3173
|
if (n === "prev" || n === "next" || n === "unified-prev" || n === "unified-next") {
|
|
3174
|
-
const
|
|
3175
|
-
if (
|
|
3174
|
+
const o = t;
|
|
3175
|
+
if (o.disabled || o.classList.contains("drp-date-picker__nav--disabled"))
|
|
3176
3176
|
return;
|
|
3177
3177
|
}
|
|
3178
|
-
if (n === "prev") this.prevMonth(
|
|
3179
|
-
else if (n === "next") this.nextMonth(
|
|
3178
|
+
if (n === "prev") this.prevMonth(r);
|
|
3179
|
+
else if (n === "next") this.nextMonth(r);
|
|
3180
3180
|
else if (n === "unified-prev") this.unifiedPrevMonth();
|
|
3181
3181
|
else if (n === "unified-next") this.unifiedNextMonth();
|
|
3182
|
-
else if (n === "toggle-rolling") this.toggleRollingSelector(
|
|
3182
|
+
else if (n === "toggle-rolling") this.toggleRollingSelector(r);
|
|
3183
3183
|
else if (n === "toggle-unified-rolling") this.toggleUnifiedRollingSelector();
|
|
3184
3184
|
else if (n === "today") this.selectToday();
|
|
3185
3185
|
else if (n === "clear") this.clearSelection();
|
|
3186
3186
|
else if (n === "apply") this.apply();
|
|
3187
3187
|
else if (n === "custom") {
|
|
3188
|
-
const
|
|
3189
|
-
|
|
3188
|
+
const o = t._customOnClick;
|
|
3189
|
+
o && await Promise.resolve(o(this));
|
|
3190
3190
|
} else if (t.closest(".drp-date-picker__day:not(.drp-date-picker__day--disabled)"))
|
|
3191
3191
|
await this.selectDay(t.closest(".drp-date-picker__day"));
|
|
3192
3192
|
else if (t.closest("[data-year]")) {
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3193
|
+
const o = t.closest("[data-year]");
|
|
3194
|
+
if (o.classList.contains("drp-date-picker__rolling-item--disabled"))
|
|
3195
3195
|
return;
|
|
3196
|
-
const s =
|
|
3197
|
-
if (
|
|
3196
|
+
const s = o.dataset.year;
|
|
3197
|
+
if (o.dataset.unified === "true")
|
|
3198
3198
|
s && this.setUnifiedYear(parseInt(s));
|
|
3199
3199
|
else {
|
|
3200
|
-
const d =
|
|
3200
|
+
const d = o.dataset.monthIndex;
|
|
3201
3201
|
s && d && this.selectYear(parseInt(s), parseInt(d));
|
|
3202
3202
|
}
|
|
3203
3203
|
} else if (t.closest("[data-month]")) {
|
|
3204
|
-
const
|
|
3205
|
-
if (
|
|
3204
|
+
const o = t.closest("[data-month]");
|
|
3205
|
+
if (o.classList.contains("drp-date-picker__rolling-item--disabled"))
|
|
3206
3206
|
return;
|
|
3207
|
-
const s =
|
|
3208
|
-
if (
|
|
3207
|
+
const s = o.dataset.month;
|
|
3208
|
+
if (o.dataset.unified === "true")
|
|
3209
3209
|
s && this.setUnifiedMonth(parseInt(s));
|
|
3210
3210
|
else {
|
|
3211
|
-
const d =
|
|
3211
|
+
const d = o.dataset.monthIndex;
|
|
3212
3212
|
s && d && this.selectMonth(parseInt(s), parseInt(d));
|
|
3213
3213
|
}
|
|
3214
3214
|
} else if (!t.closest(".drp-date-picker__rolling-selector") && !t.closest(".drp-date-picker__unified-rolling-selector")) {
|
|
3215
|
-
let
|
|
3215
|
+
let o = !1;
|
|
3216
3216
|
for (let s = 0; s < this.showingRollingSelector.length; s++)
|
|
3217
|
-
this.showingRollingSelector[s] && (this.showingRollingSelector[s] = !1,
|
|
3218
|
-
this.showingUnifiedRollingSelector && (this.showingUnifiedRollingSelector = !1,
|
|
3217
|
+
this.showingRollingSelector[s] && (this.showingRollingSelector[s] = !1, o = !0);
|
|
3218
|
+
this.showingUnifiedRollingSelector && (this.showingUnifiedRollingSelector = !1, o = !0), o && this.renderCalendar();
|
|
3219
3219
|
}
|
|
3220
3220
|
}), this.calendar.addEventListener("mouseenter", (a) => {
|
|
3221
|
-
const t = a.target, n = t.closest(".drp-date-picker__day"),
|
|
3222
|
-
if (
|
|
3223
|
-
const
|
|
3224
|
-
|
|
3221
|
+
const t = a.target, n = t.closest(".drp-date-picker__day"), i = t.closest(".drp-date-picker__badge-cell"), r = n || i;
|
|
3222
|
+
if (r && r instanceof HTMLElement) {
|
|
3223
|
+
const o = r.dataset.tooltip;
|
|
3224
|
+
o && this.showTooltip(r, o);
|
|
3225
3225
|
}
|
|
3226
3226
|
}, !0), this.calendar.addEventListener("mouseleave", (a) => {
|
|
3227
|
-
const t = a.target, n = t.closest(".drp-date-picker__day"),
|
|
3228
|
-
|
|
3227
|
+
const t = a.target, n = t.closest(".drp-date-picker__day"), i = t.closest(".drp-date-picker__badge-cell"), r = n || i;
|
|
3228
|
+
r && this.currentTooltipTarget === r && this.hideTooltip();
|
|
3229
3229
|
}, !0), this.calendar.addEventListener("mousedown", (a) => {
|
|
3230
3230
|
this.isCalendarActive = !0, a.stopPropagation();
|
|
3231
3231
|
}), this.calendar.addEventListener("focusin", () => {
|
|
@@ -3233,9 +3233,9 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3233
3233
|
}), document.addEventListener("mousedown", (a) => {
|
|
3234
3234
|
this.calendar.contains(a.target) || (this.isCalendarActive = !1);
|
|
3235
3235
|
}, !0), document.addEventListener("keydown", (a) => {
|
|
3236
|
-
var t, n,
|
|
3236
|
+
var t, n, i, r;
|
|
3237
3237
|
if (this.calendar.classList.contains("drp-date-picker--visible") && this.isCalendarActive) {
|
|
3238
|
-
if (
|
|
3238
|
+
if (k.debug("Keydown", a.key, "Ctrl:", a.ctrlKey, "Meta:", a.metaKey, "Shift:", a.shiftKey, "Alt:", a.altKey), a.key === "Escape")
|
|
3239
3239
|
this.hide(), a.preventDefault();
|
|
3240
3240
|
else if (a.key === "ArrowUp")
|
|
3241
3241
|
this.moveFocus(-7), a.preventDefault();
|
|
@@ -3244,11 +3244,11 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3244
3244
|
else if (a.key === "ArrowLeft") {
|
|
3245
3245
|
if (a.ctrlKey || a.metaKey) {
|
|
3246
3246
|
w.debug("Ctrl+Left: Navigate to previous month");
|
|
3247
|
-
const
|
|
3247
|
+
const o = this.focusedDayIndex;
|
|
3248
3248
|
this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3249
3249
|
var l, c;
|
|
3250
3250
|
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3251
|
-
d && (this.focusedDayIndex = Math.min(
|
|
3251
|
+
d && (this.focusedDayIndex = Math.min(o !== null ? o : 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" }));
|
|
3252
3252
|
}, 0);
|
|
3253
3253
|
} else
|
|
3254
3254
|
this.moveFocus(-1);
|
|
@@ -3256,25 +3256,25 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3256
3256
|
} else if (a.key === "ArrowRight") {
|
|
3257
3257
|
if (a.ctrlKey || a.metaKey) {
|
|
3258
3258
|
w.debug("Ctrl+Right: Navigate to next month");
|
|
3259
|
-
const
|
|
3259
|
+
const o = this.focusedDayIndex;
|
|
3260
3260
|
this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3261
3261
|
var l, c;
|
|
3262
3262
|
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3263
|
-
d && (this.focusedDayIndex = Math.min(
|
|
3263
|
+
d && (this.focusedDayIndex = Math.min(o !== null ? o : 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" }));
|
|
3264
3264
|
}, 0);
|
|
3265
3265
|
} else
|
|
3266
3266
|
this.moveFocus(1);
|
|
3267
3267
|
a.preventDefault();
|
|
3268
3268
|
} else if (a.key === "Enter") {
|
|
3269
3269
|
if (this.focusedDayIndex !== null) {
|
|
3270
|
-
const
|
|
3270
|
+
const o = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), s = o == null ? void 0 : o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)"), d = s == null ? void 0 : s[this.focusedDayIndex];
|
|
3271
3271
|
d && d.click();
|
|
3272
3272
|
} else
|
|
3273
3273
|
this.hide();
|
|
3274
3274
|
a.preventDefault();
|
|
3275
3275
|
} else if (a.key === "Tab") {
|
|
3276
3276
|
if (this.options.visibleMonthsCount > 1) {
|
|
3277
|
-
const
|
|
3277
|
+
const o = a.shiftKey ? -1 : 1, s = this.activeMonthIndex + o;
|
|
3278
3278
|
if (s >= 0 && s < this.monthDates.length) {
|
|
3279
3279
|
w.debug(`Tab: switching from Col${this.activeMonthIndex} to Col${s}`);
|
|
3280
3280
|
const d = this.focusedDayIndex ?? 0;
|
|
@@ -3289,60 +3289,60 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3289
3289
|
a.preventDefault();
|
|
3290
3290
|
}
|
|
3291
3291
|
} else if (a.key === "t" || a.key === "T")
|
|
3292
|
-
this.monthDates[this.activeMonthIndex] = /* @__PURE__ */ new Date(), this.renderCalendar(), setTimeout(() => {
|
|
3293
|
-
const
|
|
3292
|
+
this.monthDates[this.activeMonthIndex] = /* @__PURE__ */ new Date(), he(this, this.activeMonthIndex), this.renderCalendar(), setTimeout(() => {
|
|
3293
|
+
const o = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), s = o == null ? void 0 : o.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3294
3294
|
if (s) {
|
|
3295
3295
|
const d = Array.from(s).findIndex((l) => l.classList.contains("drp-date-picker__day--today"));
|
|
3296
3296
|
d !== -1 && (this.focusedDayIndex = d, s[d].classList.add("drp-date-picker__day--focused"), s[d].scrollIntoView({ block: "nearest" }));
|
|
3297
3297
|
}
|
|
3298
3298
|
}, 0), a.preventDefault();
|
|
3299
3299
|
else if (a.key === "PageUp") {
|
|
3300
|
-
const
|
|
3300
|
+
const o = this.focusedDayIndex;
|
|
3301
3301
|
this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3302
3302
|
var l, c;
|
|
3303
3303
|
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3304
|
-
d && (this.focusedDayIndex = Math.min(
|
|
3304
|
+
d && (this.focusedDayIndex = Math.min(o !== null ? o : 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" }));
|
|
3305
3305
|
}, 0), a.preventDefault();
|
|
3306
3306
|
} else if (a.key === "PageDown") {
|
|
3307
|
-
const
|
|
3307
|
+
const o = this.focusedDayIndex;
|
|
3308
3308
|
this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3309
3309
|
var l, c;
|
|
3310
3310
|
const s = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), d = s == null ? void 0 : s.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3311
|
-
d && (this.focusedDayIndex = Math.min(
|
|
3311
|
+
d && (this.focusedDayIndex = Math.min(o !== null ? o : 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" }));
|
|
3312
3312
|
}, 0), a.preventDefault();
|
|
3313
3313
|
} else if (a.key === "Home") {
|
|
3314
3314
|
w.debug("Home key pressed, Ctrl:", a.ctrlKey, "Meta:", a.metaKey);
|
|
3315
|
-
const
|
|
3315
|
+
const o = this.monthDates[this.activeMonthIndex].getFullYear(), s = this.monthDates[this.activeMonthIndex].getMonth();
|
|
3316
3316
|
if (a.ctrlKey || a.metaKey) {
|
|
3317
3317
|
w.debug("Ctrl+Home: Navigate to year start");
|
|
3318
3318
|
const d = s === 0, l = this.focusedDayIndex === 0;
|
|
3319
|
-
d && l ? (w.debug("Already at Jan 1, going to previous year"), this.monthDates[this.activeMonthIndex] = new Date(
|
|
3319
|
+
d && l ? (w.debug("Already at Jan 1, going to previous year"), this.monthDates[this.activeMonthIndex] = new Date(o - 1, 0, 1)) : (w.debug("Going to Jan 1 of current year"), this.monthDates[this.activeMonthIndex] = new Date(o, 0, 1)), this.renderCalendar(), setTimeout(() => {
|
|
3320
3320
|
var u, g;
|
|
3321
|
-
const c = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`),
|
|
3322
|
-
|
|
3321
|
+
const c = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), h = c == null ? void 0 : c.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3322
|
+
h && (this.focusedDayIndex = 0, (u = h[0]) == null || u.classList.add("drp-date-picker__day--focused"), (g = h[0]) == null || g.scrollIntoView({ block: "nearest" }));
|
|
3323
3323
|
}, 0);
|
|
3324
3324
|
} else if (w.debug("Home: Navigate to first day (cycles to previous month if already there)"), this.focusedDayIndex === 0)
|
|
3325
3325
|
w.debug("Already on first day, going to previous month"), this.prevMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3326
|
-
var
|
|
3326
|
+
var h, u;
|
|
3327
3327
|
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)");
|
|
3328
|
-
c && (this.focusedDayIndex = 0, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((g) => g.classList.remove("drp-date-picker__day--focused")), (
|
|
3328
|
+
c && (this.focusedDayIndex = 0, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((g) => g.classList.remove("drp-date-picker__day--focused")), (h = c[0]) == null || h.classList.add("drp-date-picker__day--focused"), (u = c[0]) == null || u.scrollIntoView({ block: "nearest" }));
|
|
3329
3329
|
}, 0);
|
|
3330
3330
|
else {
|
|
3331
3331
|
this.focusedDayIndex = 0;
|
|
3332
3332
|
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)");
|
|
3333
|
-
c && (this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((
|
|
3333
|
+
c && (this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((h) => h.classList.remove("drp-date-picker__day--focused")), (t = c[0]) == null || t.classList.add("drp-date-picker__day--focused"), (n = c[0]) == null || n.scrollIntoView({ block: "nearest" }));
|
|
3334
3334
|
}
|
|
3335
3335
|
a.preventDefault();
|
|
3336
3336
|
} else if (a.key === "End") {
|
|
3337
3337
|
w.debug("End key pressed, Ctrl:", a.ctrlKey, "Meta:", a.metaKey);
|
|
3338
|
-
const
|
|
3338
|
+
const o = this.monthDates[this.activeMonthIndex].getFullYear(), s = this.monthDates[this.activeMonthIndex].getMonth();
|
|
3339
3339
|
if (a.ctrlKey || a.metaKey) {
|
|
3340
3340
|
w.debug("Ctrl+End: Navigate to year end");
|
|
3341
|
-
const d = s === 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)"),
|
|
3342
|
-
d &&
|
|
3343
|
-
var f,
|
|
3341
|
+
const d = s === 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)"), h = c && this.focusedDayIndex === c.length - 1;
|
|
3342
|
+
d && h ? this.monthDates[this.activeMonthIndex] = new Date(o + 1, 11, 31) : this.monthDates[this.activeMonthIndex] = new Date(o, 11, 31), this.renderCalendar(), setTimeout(() => {
|
|
3343
|
+
var f, p;
|
|
3344
3344
|
const u = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), g = u == null ? void 0 : u.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3345
|
-
g && (this.focusedDayIndex = g.length - 1, (f = g[this.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (
|
|
3345
|
+
g && (this.focusedDayIndex = g.length - 1, (f = g[this.focusedDayIndex]) == null || f.classList.add("drp-date-picker__day--focused"), (p = g[this.focusedDayIndex]) == null || p.scrollIntoView({ block: "nearest" }));
|
|
3346
3346
|
}, 0);
|
|
3347
3347
|
} else {
|
|
3348
3348
|
w.debug("End: Navigate to last day (cycles to next month if already there)");
|
|
@@ -3350,17 +3350,17 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3350
3350
|
if (!l) return;
|
|
3351
3351
|
this.focusedDayIndex === l.length - 1 ? (w.debug("Already on last day, going to next month"), this.nextMonth(this.activeMonthIndex), setTimeout(() => {
|
|
3352
3352
|
var g, f;
|
|
3353
|
-
const
|
|
3354
|
-
u && (this.focusedDayIndex = u.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((
|
|
3355
|
-
}, 0)) : (this.focusedDayIndex = l.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((
|
|
3353
|
+
const h = this.calendar.querySelector(`.drp-date-picker__days[data-month-index="${this.activeMonthIndex}"]`), u = h == null ? void 0 : h.querySelectorAll(".drp-date-picker__day:not(.drp-date-picker__day--other-month)");
|
|
3354
|
+
u && (this.focusedDayIndex = u.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((p) => p.classList.remove("drp-date-picker__day--focused")), (g = u[this.focusedDayIndex]) == null || g.classList.add("drp-date-picker__day--focused"), (f = u[this.focusedDayIndex]) == null || f.scrollIntoView({ block: "nearest" }));
|
|
3355
|
+
}, 0)) : (this.focusedDayIndex = l.length - 1, this.calendar.querySelectorAll(".drp-date-picker__day--focused").forEach((h) => h.classList.remove("drp-date-picker__day--focused")), (i = l[this.focusedDayIndex]) == null || i.classList.add("drp-date-picker__day--focused"), (r = l[this.focusedDayIndex]) == null || r.scrollIntoView({ block: "nearest" }));
|
|
3356
3356
|
}
|
|
3357
3357
|
a.preventDefault();
|
|
3358
3358
|
}
|
|
3359
3359
|
}
|
|
3360
3360
|
}), this.clickOutsideHandler = (a) => {
|
|
3361
3361
|
var s;
|
|
3362
|
-
const t = a.composedPath(), n = t[0],
|
|
3363
|
-
if (!
|
|
3362
|
+
const t = a.composedPath(), n = t[0], i = t.includes(this.calendar), r = this.input && t.includes(this.input), o = (s = n.closest) == null ? void 0 : s.call(n, "[data-calendar-button]");
|
|
3363
|
+
if (!i && !r && !o)
|
|
3364
3364
|
if (this.options.positioningMode === "floating")
|
|
3365
3365
|
this.hide();
|
|
3366
3366
|
else {
|
|
@@ -3375,8 +3375,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3375
3375
|
parseFormat(a) {
|
|
3376
3376
|
const t = {};
|
|
3377
3377
|
let n = "";
|
|
3378
|
-
return a.includes("-") ? n = "-" : a.includes("/") ? n = "/" : a.includes(".") && (n = "."), a.split(n).forEach((
|
|
3379
|
-
|
|
3378
|
+
return a.includes("-") ? n = "-" : a.includes("/") ? n = "/" : a.includes(".") && (n = "."), a.split(n).forEach((r, o) => {
|
|
3379
|
+
r === "YYYY" || r === "YY" ? t.year = { index: o, length: r.length } : r === "MM" || r === "M" ? t.month = { index: o, length: 2 } : (r === "DD" || r === "D") && (t.day = { index: o, length: 2 });
|
|
3380
3380
|
}), {
|
|
3381
3381
|
format: a,
|
|
3382
3382
|
separator: n,
|
|
@@ -3386,10 +3386,10 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3386
3386
|
}
|
|
3387
3387
|
formatDate(a) {
|
|
3388
3388
|
if (!a) return "";
|
|
3389
|
-
const t = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0"),
|
|
3389
|
+
const t = a.getFullYear(), n = String(a.getMonth() + 1).padStart(2, "0"), i = String(a.getDate()).padStart(2, "0"), { format: r, separator: o, parts: s } = this.formatInfo, d = [];
|
|
3390
3390
|
for (let l = 0; l < 3; l++)
|
|
3391
|
-
s.year && s.year.index === l ? d.push(s.year.length === 2 ? String(t).slice(-2) : t) : s.month && s.month.index === l ? d.push(n) : s.day && s.day.index === l && d.push(
|
|
3392
|
-
return d.join(
|
|
3391
|
+
s.year && s.year.index === l ? d.push(s.year.length === 2 ? String(t).slice(-2) : t) : s.month && s.month.index === l ? d.push(n) : s.day && s.day.index === l && d.push(i);
|
|
3392
|
+
return d.join(o);
|
|
3393
3393
|
}
|
|
3394
3394
|
// Reactive getters/setters for programmatic control
|
|
3395
3395
|
/**
|
|
@@ -3443,7 +3443,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3443
3443
|
}
|
|
3444
3444
|
// UI methods - wrappers for pure functions
|
|
3445
3445
|
show() {
|
|
3446
|
-
return
|
|
3446
|
+
return Tt(this);
|
|
3447
3447
|
}
|
|
3448
3448
|
hide() {
|
|
3449
3449
|
return Lt(this);
|
|
@@ -3462,10 +3462,10 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3462
3462
|
}
|
|
3463
3463
|
// Rendering methods - wrappers for pure functions
|
|
3464
3464
|
renderCalendar() {
|
|
3465
|
-
return
|
|
3465
|
+
return pn(this);
|
|
3466
3466
|
}
|
|
3467
3467
|
renderNormalView(a) {
|
|
3468
|
-
return
|
|
3468
|
+
return zt(this, a);
|
|
3469
3469
|
}
|
|
3470
3470
|
renderDays(a, t) {
|
|
3471
3471
|
return Nt(this, a, t);
|
|
@@ -3484,22 +3484,22 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3484
3484
|
}
|
|
3485
3485
|
// Navigation methods - wrappers for pure functions
|
|
3486
3486
|
toggleRollingSelector(a) {
|
|
3487
|
-
return
|
|
3487
|
+
return on(this, a);
|
|
3488
3488
|
}
|
|
3489
3489
|
selectYear(a, t) {
|
|
3490
|
-
return
|
|
3490
|
+
return rn(this, a, t);
|
|
3491
3491
|
}
|
|
3492
3492
|
selectMonth(a, t) {
|
|
3493
3493
|
return sn(this, a, t);
|
|
3494
3494
|
}
|
|
3495
3495
|
checkAndResolveCollisions(a) {
|
|
3496
|
-
return
|
|
3496
|
+
return he(this, a);
|
|
3497
3497
|
}
|
|
3498
3498
|
prevMonth(a) {
|
|
3499
|
-
return
|
|
3499
|
+
return ye(this, a);
|
|
3500
3500
|
}
|
|
3501
3501
|
nextMonth(a) {
|
|
3502
|
-
return
|
|
3502
|
+
return ve(this, a);
|
|
3503
3503
|
}
|
|
3504
3504
|
// Unified navigation methods
|
|
3505
3505
|
unifiedPrevMonth() {
|
|
@@ -3509,7 +3509,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3509
3509
|
return ln(this);
|
|
3510
3510
|
}
|
|
3511
3511
|
toggleUnifiedRollingSelector() {
|
|
3512
|
-
return
|
|
3512
|
+
return hn(this);
|
|
3513
3513
|
}
|
|
3514
3514
|
setUnifiedMonth(a) {
|
|
3515
3515
|
return un(this, a);
|
|
@@ -3517,8 +3517,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3517
3517
|
setUnifiedYear(a) {
|
|
3518
3518
|
return gn(this, a);
|
|
3519
3519
|
}
|
|
3520
|
-
findNextEnabledDayIndex(a, t, n,
|
|
3521
|
-
return
|
|
3520
|
+
findNextEnabledDayIndex(a, t, n, i) {
|
|
3521
|
+
return me(this, a, t, n);
|
|
3522
3522
|
}
|
|
3523
3523
|
moveFocus(a) {
|
|
3524
3524
|
return dn(this, a);
|
|
@@ -3556,7 +3556,7 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3556
3556
|
return Mn(this, a);
|
|
3557
3557
|
}
|
|
3558
3558
|
applyMask(a) {
|
|
3559
|
-
return
|
|
3559
|
+
return ge(this, a);
|
|
3560
3560
|
}
|
|
3561
3561
|
applyRangeMask(a) {
|
|
3562
3562
|
return Ut(this, a);
|
|
@@ -3597,12 +3597,12 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3597
3597
|
* ```
|
|
3598
3598
|
*/
|
|
3599
3599
|
static injectGlobalStyles(a = !1) {
|
|
3600
|
-
if (
|
|
3601
|
-
|
|
3600
|
+
if (De.stylesInjected && !a) {
|
|
3601
|
+
k.debug("Styles already injected, skipping");
|
|
3602
3602
|
return;
|
|
3603
3603
|
}
|
|
3604
3604
|
const t = document.createElement("style");
|
|
3605
|
-
t.setAttribute("data-source", "web-daterangepicker"), t.textContent = jt, document.head.appendChild(t),
|
|
3605
|
+
t.setAttribute("data-source", "web-daterangepicker"), t.textContent = jt, document.head.appendChild(t), De.stylesInjected = !0, k.info("Global styles injected successfully");
|
|
3606
3606
|
}
|
|
3607
3607
|
/**
|
|
3608
3608
|
* Check if styles appear to be loaded
|
|
@@ -3622,8 +3622,8 @@ const jt = '@charset "UTF-8";:host,:root{--drp-rem: 10px;--drp-font-scale: 1;--d
|
|
|
3622
3622
|
}
|
|
3623
3623
|
};
|
|
3624
3624
|
// Static flag to track if styles have been injected
|
|
3625
|
-
b(
|
|
3626
|
-
let je =
|
|
3625
|
+
b(De, "stylesInjected", !1);
|
|
3626
|
+
let je = De;
|
|
3627
3627
|
class Wt extends HTMLElement {
|
|
3628
3628
|
constructor() {
|
|
3629
3629
|
super();
|
|
@@ -3684,9 +3684,6 @@ class Wt extends HTMLElement {
|
|
|
3684
3684
|
"initial-date",
|
|
3685
3685
|
"rolling-year-range",
|
|
3686
3686
|
"rolling-month-range",
|
|
3687
|
-
"spacing",
|
|
3688
|
-
"font-size",
|
|
3689
|
-
"cell-size",
|
|
3690
3687
|
"enable-transitions",
|
|
3691
3688
|
"auto-close",
|
|
3692
3689
|
"show-today-button",
|
|
@@ -3698,11 +3695,10 @@ class Wt extends HTMLElement {
|
|
|
3698
3695
|
"input-size"
|
|
3699
3696
|
];
|
|
3700
3697
|
}
|
|
3701
|
-
|
|
3698
|
+
applyTransitionStyles() {
|
|
3702
3699
|
const t = this.shadow.querySelector(".drp-date-picker");
|
|
3703
3700
|
if (!t) return;
|
|
3704
|
-
|
|
3705
|
-
t.classList.remove("drp-spacing-xs", "drp-spacing-sm", "drp-spacing-lg", "drp-spacing-xl"), t.classList.remove("drp-font-xs", "drp-font-sm", "drp-font-lg", "drp-font-xl"), t.classList.remove("drp-cell-xs", "drp-cell-sm", "drp-cell-lg", "drp-cell-xl"), n && n !== "md" && t.classList.add(`drp-spacing-${n}`), r && r !== "md" && t.classList.add(`drp-font-${r}`), o && o !== "md" && t.classList.add(`drp-cell-${o}`), i ? t.classList.add("drp-transitions-enabled") : t.classList.remove("drp-transitions-enabled");
|
|
3701
|
+
this.hasAttribute("enable-transitions") ? t.classList.add("drp-transitions-enabled") : t.classList.remove("drp-transitions-enabled");
|
|
3706
3702
|
}
|
|
3707
3703
|
applyInputSizeStyles() {
|
|
3708
3704
|
if (!this.inputElement) return;
|
|
@@ -3715,43 +3711,43 @@ class Wt extends HTMLElement {
|
|
|
3715
3711
|
disconnectedCallback() {
|
|
3716
3712
|
this.picker && this.picker.destroy();
|
|
3717
3713
|
}
|
|
3718
|
-
attributeChangedCallback(t, n,
|
|
3719
|
-
if (n !==
|
|
3720
|
-
if (t === "
|
|
3721
|
-
this.
|
|
3714
|
+
attributeChangedCallback(t, n, i) {
|
|
3715
|
+
if (n !== i) {
|
|
3716
|
+
if (t === "enable-transitions") {
|
|
3717
|
+
this.applyTransitionStyles();
|
|
3722
3718
|
return;
|
|
3723
3719
|
}
|
|
3724
3720
|
if (t === "input-size") {
|
|
3725
3721
|
this.applyInputSizeStyles();
|
|
3726
3722
|
return;
|
|
3727
3723
|
}
|
|
3728
|
-
this.picker && t !== "value" && t !== "placeholder" && (this.picker.destroy(), this.initializePicker()), t === "value" && this.inputElement &&
|
|
3724
|
+
this.picker && t !== "value" && t !== "placeholder" && (this.picker.destroy(), this.initializePicker()), t === "value" && this.inputElement && i !== null && (this.inputElement.value = i), t === "placeholder" && this.inputElement && i !== null && (this.inputElement.placeholder = i), t === "disabled" && this.inputElement && (i !== null ? this.inputElement.disabled = !0 : this.inputElement.disabled = !1);
|
|
3729
3725
|
}
|
|
3730
3726
|
}
|
|
3731
3727
|
render() {
|
|
3732
3728
|
const t = document.createElement("style");
|
|
3733
3729
|
if (t.textContent = jt, this.shadow.appendChild(t), (this.getAttribute("positioning-mode") || "floating") === "floating") {
|
|
3734
3730
|
this.inputElement = document.createElement("input"), this.inputElement.type = "text", this.inputElement.classList.add("drp-input", "drp-date-picker-input");
|
|
3735
|
-
const
|
|
3736
|
-
|
|
3737
|
-
const
|
|
3738
|
-
|
|
3731
|
+
const i = this.getAttribute("placeholder");
|
|
3732
|
+
i && (this.inputElement.placeholder = i);
|
|
3733
|
+
const r = this.getAttribute("value");
|
|
3734
|
+
r && (this.inputElement.value = r), this.hasAttribute("disabled") && (this.inputElement.disabled = !0), this.shadow.appendChild(this.inputElement), this.applyInputSizeStyles();
|
|
3739
3735
|
}
|
|
3740
3736
|
}
|
|
3741
3737
|
initializePicker() {
|
|
3742
3738
|
const t = this.getAttribute("positioning-mode") || "floating";
|
|
3743
3739
|
if (t === "floating" && !this.inputElement) return;
|
|
3744
3740
|
let n;
|
|
3745
|
-
const
|
|
3746
|
-
|
|
3747
|
-
let
|
|
3748
|
-
const
|
|
3749
|
-
if (
|
|
3750
|
-
if (
|
|
3751
|
-
|
|
3741
|
+
const i = this.getAttribute("disabled-weekdays");
|
|
3742
|
+
i && (n = i.split(",").map((l) => parseInt(l.trim())).filter((l) => !isNaN(l) && l >= 0 && l <= 6));
|
|
3743
|
+
let r;
|
|
3744
|
+
const o = this.getAttribute("week-start-day");
|
|
3745
|
+
if (o)
|
|
3746
|
+
if (o === "auto")
|
|
3747
|
+
r = "auto";
|
|
3752
3748
|
else {
|
|
3753
|
-
const l = parseInt(
|
|
3754
|
-
!isNaN(l) && l >= 0 && l <= 6 && (
|
|
3749
|
+
const l = parseInt(o);
|
|
3750
|
+
!isNaN(l) && l >= 0 && l <= 6 && (r = l);
|
|
3755
3751
|
}
|
|
3756
3752
|
const s = {
|
|
3757
3753
|
selectionMode: this.getAttribute("selection-mode") || "single",
|
|
@@ -3772,7 +3768,7 @@ class Wt extends HTMLElement {
|
|
|
3772
3768
|
// Positioning
|
|
3773
3769
|
calendarPlacement: this.getAttribute("calendar-placement") || void 0,
|
|
3774
3770
|
// New options
|
|
3775
|
-
weekStartDay:
|
|
3771
|
+
weekStartDay: r,
|
|
3776
3772
|
minDate: this.getAttribute("min-date") || void 0,
|
|
3777
3773
|
maxDate: this.getAttribute("max-date") || void 0,
|
|
3778
3774
|
initialDate: this.getAttribute("initial-date") || void 0,
|
|
@@ -3822,7 +3818,7 @@ class Wt extends HTMLElement {
|
|
|
3822
3818
|
c.className = "drp-custom-styles", c.textContent = l, this.shadow.appendChild(c);
|
|
3823
3819
|
}
|
|
3824
3820
|
}
|
|
3825
|
-
setTimeout(() => this.
|
|
3821
|
+
setTimeout(() => this.applyTransitionStyles(), 0);
|
|
3826
3822
|
}
|
|
3827
3823
|
/**
|
|
3828
3824
|
* Schedule a deferred re-initialization of the picker
|
|
@@ -3834,11 +3830,11 @@ class Wt extends HTMLElement {
|
|
|
3834
3830
|
}));
|
|
3835
3831
|
}
|
|
3836
3832
|
handleDateSelect(t) {
|
|
3837
|
-
var
|
|
3833
|
+
var r;
|
|
3838
3834
|
const n = {
|
|
3839
3835
|
date: t instanceof Date ? t : void 0,
|
|
3840
3836
|
dateRange: t instanceof Date || Array.isArray(t) ? void 0 : t,
|
|
3841
|
-
formattedValue: ((
|
|
3837
|
+
formattedValue: ((r = this.inputElement) == null ? void 0 : r.value) || ""
|
|
3842
3838
|
};
|
|
3843
3839
|
if (!this.picker) {
|
|
3844
3840
|
this.dispatchEvent(new CustomEvent("date-select", { detail: n, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: n, bubbles: !0, composed: !0 }));
|
|
@@ -3846,21 +3842,21 @@ class Wt extends HTMLElement {
|
|
|
3846
3842
|
}
|
|
3847
3843
|
if (this.picker.requiresApplyButton() && this.picker.pendingSelection)
|
|
3848
3844
|
return;
|
|
3849
|
-
const
|
|
3845
|
+
const i = this.picker.options.disabledDatesHandling;
|
|
3850
3846
|
if (!(t instanceof Date) && !Array.isArray(t) && "start" in t && "end" in t) {
|
|
3851
|
-
const
|
|
3852
|
-
switch (
|
|
3847
|
+
const o = t.start, s = t.end;
|
|
3848
|
+
switch (i) {
|
|
3853
3849
|
case "allow":
|
|
3854
|
-
n.enabledDates = this.picker.getEnabledDatesInRange(
|
|
3850
|
+
n.enabledDates = this.picker.getEnabledDatesInRange(o, s), n.disabledDates = this.picker.getDisabledDatesInRange(o, s), n.getEnabledDateCount = () => n.enabledDates.length, n.getTotalDays = () => Math.floor((s.getTime() - o.getTime()) / 864e5) + 1;
|
|
3855
3851
|
break;
|
|
3856
3852
|
case "split":
|
|
3857
|
-
n.dateRanges = this.picker.splitRangeByDisabled(
|
|
3853
|
+
n.dateRanges = this.picker.splitRangeByDisabled(o, s), n.dates = this.picker.getEnabledDatesInRange(o, s), n.dateRanges.length > 0 && (n.formattedValue = n.dateRanges.map((d) => `${this.picker.formatDate(d.start)} - ${this.picker.formatDate(d.end)}`).join(", "));
|
|
3858
3854
|
break;
|
|
3859
3855
|
case "individual":
|
|
3860
|
-
n.dates = this.picker.getEnabledDatesInRange(
|
|
3856
|
+
n.dates = this.picker.getEnabledDatesInRange(o, s), n.dateRange = null, n.dates.length > 0 && (n.formattedValue = n.dates.map((d) => this.picker.formatDate(d)).join(", "));
|
|
3861
3857
|
break;
|
|
3862
3858
|
case "block":
|
|
3863
|
-
n.dates = this.picker.getEnabledDatesInRange(
|
|
3859
|
+
n.dates = this.picker.getEnabledDatesInRange(o, s);
|
|
3864
3860
|
break;
|
|
3865
3861
|
}
|
|
3866
3862
|
}
|
|
@@ -3974,25 +3970,7 @@ class Wt extends HTMLElement {
|
|
|
3974
3970
|
set disabledWeekdays(t) {
|
|
3975
3971
|
t && t.length > 0 ? this.setAttribute("disabled-weekdays", t.join(",")) : this.removeAttribute("disabled-weekdays");
|
|
3976
3972
|
}
|
|
3977
|
-
//
|
|
3978
|
-
get spacing() {
|
|
3979
|
-
return this.getAttribute("spacing") || "md";
|
|
3980
|
-
}
|
|
3981
|
-
set spacing(t) {
|
|
3982
|
-
this.setAttribute("spacing", t);
|
|
3983
|
-
}
|
|
3984
|
-
get fontSize() {
|
|
3985
|
-
return this.getAttribute("font-size") || "md";
|
|
3986
|
-
}
|
|
3987
|
-
set fontSize(t) {
|
|
3988
|
-
this.setAttribute("font-size", t);
|
|
3989
|
-
}
|
|
3990
|
-
get cellSize() {
|
|
3991
|
-
return this.getAttribute("cell-size") || "md";
|
|
3992
|
-
}
|
|
3993
|
-
set cellSize(t) {
|
|
3994
|
-
this.setAttribute("cell-size", t);
|
|
3995
|
-
}
|
|
3973
|
+
// Transition property
|
|
3996
3974
|
get enableTransitions() {
|
|
3997
3975
|
return this.hasAttribute("enable-transitions");
|
|
3998
3976
|
}
|
|
@@ -4170,10 +4148,10 @@ function An() {
|
|
|
4170
4148
|
return Array.from(document.querySelectorAll("web-daterangepicker"));
|
|
4171
4149
|
}
|
|
4172
4150
|
typeof window < "u" && (window.components = window.components || {}, window.components["web-daterangepicker"] = {
|
|
4173
|
-
version: () => "1.
|
|
4151
|
+
version: () => "1.7.0-rc01",
|
|
4174
4152
|
config: {
|
|
4175
4153
|
name: "@keenmate/web-daterangepicker",
|
|
4176
|
-
version: "1.
|
|
4154
|
+
version: "1.7.0-rc01",
|
|
4177
4155
|
author: "Keenmate",
|
|
4178
4156
|
license: "MIT",
|
|
4179
4157
|
repository: "git+https://github.com/keenmate/web-daterangepicker.git",
|
|
@@ -4188,7 +4166,7 @@ typeof window < "u" && (window.components = window.components || {}, window.comp
|
|
|
4188
4166
|
disableLogging: mt,
|
|
4189
4167
|
setLogLevel: We,
|
|
4190
4168
|
setCategoryLevel: ua,
|
|
4191
|
-
getCategories:
|
|
4169
|
+
getCategories: ha
|
|
4192
4170
|
}
|
|
4193
4171
|
}, window.components["web-daterangepicker"].register());
|
|
4194
4172
|
export {
|