prometeo-design-system 2.8.2 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.es.js +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-WHoeSibd.js → CardProfile-BB-IP1MR.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/DatePicker.es.js +1544 -1484
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +1 -1
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/FAButton.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/{HelperComponent-BeNlTMqI.js → HelperComponent-D_Cqdf1J.js} +1 -1
- package/dist/Icons.es.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-WKzUevOQ.js → ImageGallery-CjaJ0UCN.js} +1 -1
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-Bdiozi8s.js → Input-Bdo-Acix.js} +2 -2
- package/dist/Input.es.js +1 -1
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-B6E-yOYJ.js} +1 -1
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/RadioButton.es.js +2 -2
- package/dist/SegmentedButton.es.js +1 -1
- package/dist/{Select-DpnghyhT.js → Select-D2APaG1z.js} +3 -3
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +2 -2
- package/dist/Skeleton.es.js +1 -1
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +1 -1
- package/dist/TabLinks.es.js +1 -1
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Toast.es.js +1 -1
- package/dist/ToastProvider.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +7 -7
- package/package.json +274 -272
package/dist/DatePicker.es.js
CHANGED
|
@@ -1,205 +1,205 @@
|
|
|
1
|
-
import { j as q } from "./jsx-runtime-
|
|
2
|
-
import
|
|
3
|
-
import { InputMultiple as
|
|
4
|
-
import { I as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { c as
|
|
7
|
-
import { Calendar as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
1
|
+
import { j as q } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import h, { createContext as pn, useContext as bn, useCallback as R, useRef as xe, useLayoutEffect as wn, useState as ye, useEffect as Fe, useMemo as se, memo as Mn } from "react";
|
|
3
|
+
import { InputMultiple as vn } from "./InputMultiple.es.js";
|
|
4
|
+
import { I as Dn } from "./Input-Bdo-Acix.js";
|
|
5
|
+
import { createPortal as kn } from "react-dom";
|
|
6
|
+
import { c as Ie } from "./cn-B6yFEsav.js";
|
|
7
|
+
import { Calendar as St } from "./Icons.es.js";
|
|
8
|
+
import Ct from "./Button.es.js";
|
|
9
|
+
function On(e, t, o = "long") {
|
|
10
10
|
return new Intl.DateTimeFormat("en-US", {
|
|
11
11
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
12
12
|
hour: "numeric",
|
|
13
13
|
timeZone: e,
|
|
14
|
-
timeZoneName:
|
|
14
|
+
timeZoneName: o
|
|
15
15
|
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
17
|
+
const Wn = {}, Be = {};
|
|
18
|
+
function Oe(e, t) {
|
|
19
19
|
try {
|
|
20
|
-
const
|
|
20
|
+
const n = (Wn[e] ||= new Intl.DateTimeFormat("en-US", {
|
|
21
21
|
timeZone: e,
|
|
22
22
|
timeZoneName: "longOffset"
|
|
23
23
|
}).format)(t).split("GMT")[1];
|
|
24
|
-
return
|
|
24
|
+
return n in Be ? Be[n] : xt(n, n.split(":"));
|
|
25
25
|
} catch {
|
|
26
|
-
if (e in
|
|
27
|
-
const
|
|
28
|
-
return
|
|
26
|
+
if (e in Be) return Be[e];
|
|
27
|
+
const o = e?.match(Sn);
|
|
28
|
+
return o ? xt(e, o.slice(1)) : NaN;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
return
|
|
31
|
+
const Sn = /([+-]\d\d):?(\d\d)?/;
|
|
32
|
+
function xt(e, t) {
|
|
33
|
+
const o = +(t[0] || 0), n = +(t[1] || 0), r = +(t[2] || 0) / 60;
|
|
34
|
+
return Be[e] = o * 60 + n > 0 ? o * 60 + n + r : o * 60 - n - r;
|
|
35
35
|
}
|
|
36
|
-
class
|
|
36
|
+
class ae extends Date {
|
|
37
37
|
//#region static
|
|
38
38
|
constructor(...t) {
|
|
39
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(
|
|
39
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(Oe(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), $t(this), wt(this)) : this.setTime(Date.now());
|
|
40
40
|
}
|
|
41
|
-
static tz(t, ...
|
|
42
|
-
return
|
|
41
|
+
static tz(t, ...o) {
|
|
42
|
+
return o.length ? new ae(...o, t) : new ae(Date.now(), t);
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region time zone
|
|
46
46
|
withTimeZone(t) {
|
|
47
|
-
return new
|
|
47
|
+
return new ae(+this, t);
|
|
48
48
|
}
|
|
49
49
|
getTimezoneOffset() {
|
|
50
|
-
const t = -
|
|
50
|
+
const t = -Oe(this.timeZone, this);
|
|
51
51
|
return t > 0 ? Math.floor(t) : Math.ceil(t);
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region time
|
|
55
55
|
setTime(t) {
|
|
56
|
-
return Date.prototype.setTime.apply(this, arguments),
|
|
56
|
+
return Date.prototype.setTime.apply(this, arguments), wt(this), +this;
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region date-fns integration
|
|
60
60
|
[Symbol.for("constructDateFrom")](t) {
|
|
61
|
-
return new
|
|
61
|
+
return new ae(+new Date(t), this.timeZone);
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const Nt = /^(get|set)(?!UTC)/;
|
|
66
66
|
Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
67
|
-
if (!
|
|
68
|
-
const t = e.replace(
|
|
69
|
-
|
|
67
|
+
if (!Nt.test(e)) return;
|
|
68
|
+
const t = e.replace(Nt, "$1UTC");
|
|
69
|
+
ae.prototype[t] && (e.startsWith("get") ? ae.prototype[e] = function() {
|
|
70
70
|
return this.internal[t]();
|
|
71
|
-
} : (
|
|
72
|
-
return Date.prototype[t].apply(this.internal, arguments),
|
|
73
|
-
},
|
|
74
|
-
return Date.prototype[t].apply(this, arguments),
|
|
71
|
+
} : (ae.prototype[e] = function() {
|
|
72
|
+
return Date.prototype[t].apply(this.internal, arguments), Cn(this), +this;
|
|
73
|
+
}, ae.prototype[t] = function() {
|
|
74
|
+
return Date.prototype[t].apply(this, arguments), wt(this), +this;
|
|
75
75
|
}));
|
|
76
76
|
});
|
|
77
|
-
function
|
|
78
|
-
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-
|
|
77
|
+
function wt(e) {
|
|
78
|
+
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-Oe(e.timeZone, e) * 60));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()),
|
|
80
|
+
function Cn(e) {
|
|
81
|
+
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), $t(e);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
const t =
|
|
85
|
-
|
|
86
|
-
const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(),
|
|
87
|
-
|
|
88
|
-
const c = r -
|
|
83
|
+
function $t(e) {
|
|
84
|
+
const t = Oe(e.timeZone, e), o = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
|
|
85
|
+
n.setUTCHours(n.getUTCHours() - 1);
|
|
86
|
+
const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = r - s, i = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
|
|
87
|
+
a && i && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + a);
|
|
88
|
+
const c = r - o;
|
|
89
89
|
c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
|
|
90
90
|
const d = /* @__PURE__ */ new Date(+e);
|
|
91
91
|
d.setUTCSeconds(0);
|
|
92
|
-
const l = r > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, u = Math.round(-(
|
|
92
|
+
const l = r > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, u = Math.round(-(Oe(e.timeZone, e) * 60)) % 60;
|
|
93
93
|
(u || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + u + l));
|
|
94
|
-
const f =
|
|
95
|
-
if (
|
|
96
|
-
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) +
|
|
97
|
-
const y =
|
|
98
|
-
|
|
94
|
+
const f = Oe(e.timeZone, e), w = f > 0 ? Math.floor(f) : Math.ceil(f), S = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - w, M = w !== o, k = S - c;
|
|
95
|
+
if (M && k) {
|
|
96
|
+
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + k);
|
|
97
|
+
const y = Oe(e.timeZone, e), p = y > 0 ? Math.floor(y) : Math.ceil(y), v = w - p;
|
|
98
|
+
v && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + v), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + v));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
class
|
|
101
|
+
class de extends ae {
|
|
102
102
|
//#region static
|
|
103
|
-
static tz(t, ...
|
|
104
|
-
return
|
|
103
|
+
static tz(t, ...o) {
|
|
104
|
+
return o.length ? new de(...o, t) : new de(Date.now(), t);
|
|
105
105
|
}
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region representation
|
|
108
108
|
toISOString() {
|
|
109
|
-
const [t,
|
|
109
|
+
const [t, o, n] = this.tzComponents(), r = `${t}${o}:${n}`;
|
|
110
110
|
return this.internal.toISOString().slice(0, -1) + r;
|
|
111
111
|
}
|
|
112
112
|
toString() {
|
|
113
113
|
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
114
114
|
}
|
|
115
115
|
toDateString() {
|
|
116
|
-
const [t,
|
|
117
|
-
return `${t?.slice(0, -1)} ${
|
|
116
|
+
const [t, o, n, r] = this.internal.toUTCString().split(" ");
|
|
117
|
+
return `${t?.slice(0, -1)} ${n} ${o} ${r}`;
|
|
118
118
|
}
|
|
119
119
|
toTimeString() {
|
|
120
|
-
const t = this.internal.toUTCString().split(" ")[4], [
|
|
121
|
-
return `${t} GMT${
|
|
120
|
+
const t = this.internal.toUTCString().split(" ")[4], [o, n, r] = this.tzComponents();
|
|
121
|
+
return `${t} GMT${o}${n}${r} (${On(this.timeZone, this)})`;
|
|
122
122
|
}
|
|
123
|
-
toLocaleString(t,
|
|
123
|
+
toLocaleString(t, o) {
|
|
124
124
|
return Date.prototype.toLocaleString.call(this, t, {
|
|
125
|
-
...
|
|
126
|
-
timeZone:
|
|
125
|
+
...o,
|
|
126
|
+
timeZone: o?.timeZone || this.timeZone
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
toLocaleDateString(t,
|
|
129
|
+
toLocaleDateString(t, o) {
|
|
130
130
|
return Date.prototype.toLocaleDateString.call(this, t, {
|
|
131
|
-
...
|
|
132
|
-
timeZone:
|
|
131
|
+
...o,
|
|
132
|
+
timeZone: o?.timeZone || this.timeZone
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
toLocaleTimeString(t,
|
|
135
|
+
toLocaleTimeString(t, o) {
|
|
136
136
|
return Date.prototype.toLocaleTimeString.call(this, t, {
|
|
137
|
-
...
|
|
138
|
-
timeZone:
|
|
137
|
+
...o,
|
|
138
|
+
timeZone: o?.timeZone || this.timeZone
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region private
|
|
143
143
|
tzComponents() {
|
|
144
|
-
const t = this.getTimezoneOffset(),
|
|
145
|
-
return [
|
|
144
|
+
const t = this.getTimezoneOffset(), o = t > 0 ? "-" : "+", n = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), r = String(Math.abs(t) % 60).padStart(2, "0");
|
|
145
|
+
return [o, n, r];
|
|
146
146
|
}
|
|
147
147
|
//#endregion
|
|
148
148
|
withTimeZone(t) {
|
|
149
|
-
return new
|
|
149
|
+
return new de(+this, t);
|
|
150
150
|
}
|
|
151
151
|
//#region date-fns integration
|
|
152
152
|
[Symbol.for("constructDateFrom")](t) {
|
|
153
|
-
return new
|
|
153
|
+
return new de(+new Date(t), this.timeZone);
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
156
|
}
|
|
157
|
-
const
|
|
158
|
-
function
|
|
159
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
157
|
+
const qt = 6048e5, xn = 864e5, Pt = Symbol.for("constructDateFrom");
|
|
158
|
+
function H(e, t) {
|
|
159
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && Pt in e ? e[Pt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return
|
|
161
|
+
function E(e, t) {
|
|
162
|
+
return H(t || e, e);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const
|
|
166
|
-
return isNaN(t) ?
|
|
164
|
+
function Rt(e, t, o) {
|
|
165
|
+
const n = E(e, o?.in);
|
|
166
|
+
return isNaN(t) ? H(e, NaN) : (t && n.setDate(n.getDate() + t), n);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
170
|
-
if (isNaN(t)) return
|
|
168
|
+
function Lt(e, t, o) {
|
|
169
|
+
const n = E(e, o?.in);
|
|
170
|
+
if (isNaN(t)) return H(e, NaN);
|
|
171
171
|
if (!t)
|
|
172
|
-
return
|
|
173
|
-
const r =
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
return r >=
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
return n;
|
|
173
|
+
const r = n.getDate(), s = H(e, n.getTime());
|
|
174
|
+
s.setMonth(n.getMonth() + t + 1, 0);
|
|
175
|
+
const a = s.getDate();
|
|
176
|
+
return r >= a ? s : (n.setFullYear(
|
|
177
|
+
s.getFullYear(),
|
|
178
|
+
s.getMonth(),
|
|
179
179
|
r
|
|
180
|
-
),
|
|
180
|
+
), n);
|
|
181
181
|
}
|
|
182
|
-
let
|
|
182
|
+
let Nn = {};
|
|
183
183
|
function He() {
|
|
184
|
-
return
|
|
185
|
-
}
|
|
186
|
-
function xe(e, t) {
|
|
187
|
-
const n = He(), o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, r = Y(e, t?.in), a = r.getDay(), i = (a < o ? 7 : 0) + a - o;
|
|
188
|
-
return r.setDate(r.getDate() - i), r.setHours(0, 0, 0, 0), r;
|
|
184
|
+
return Nn;
|
|
189
185
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
186
|
+
function Pe(e, t) {
|
|
187
|
+
const o = He(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, r = E(e, t?.in), s = r.getDay(), a = (s < n ? 7 : 0) + s - n;
|
|
188
|
+
return r.setDate(r.getDate() - a), r.setHours(0, 0, 0, 0), r;
|
|
192
189
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
195
|
-
r.setFullYear(o + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
196
|
-
const a = Ie(r), i = A(n, 0);
|
|
197
|
-
i.setFullYear(o, 0, 4), i.setHours(0, 0, 0, 0);
|
|
198
|
-
const s = Ie(i);
|
|
199
|
-
return n.getTime() >= a.getTime() ? o + 1 : n.getTime() >= s.getTime() ? o : o - 1;
|
|
190
|
+
function je(e, t) {
|
|
191
|
+
return Pe(e, { ...t, weekStartsOn: 1 });
|
|
200
192
|
}
|
|
201
|
-
function
|
|
202
|
-
const
|
|
193
|
+
function zt(e, t) {
|
|
194
|
+
const o = E(e, t?.in), n = o.getFullYear(), r = H(o, 0);
|
|
195
|
+
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
196
|
+
const s = je(r), a = H(o, 0);
|
|
197
|
+
a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0);
|
|
198
|
+
const i = je(a);
|
|
199
|
+
return o.getTime() >= s.getTime() ? n + 1 : o.getTime() >= i.getTime() ? n : n - 1;
|
|
200
|
+
}
|
|
201
|
+
function Tt(e) {
|
|
202
|
+
const t = E(e), o = new Date(
|
|
203
203
|
Date.UTC(
|
|
204
204
|
t.getFullYear(),
|
|
205
205
|
t.getMonth(),
|
|
@@ -210,125 +210,125 @@ function Wt(e) {
|
|
|
210
210
|
t.getMilliseconds()
|
|
211
211
|
)
|
|
212
212
|
);
|
|
213
|
-
return
|
|
213
|
+
return o.setUTCFullYear(t.getFullYear()), +e - +o;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
const
|
|
215
|
+
function Te(e, ...t) {
|
|
216
|
+
const o = H.bind(
|
|
217
217
|
null,
|
|
218
|
-
t.find((
|
|
218
|
+
t.find((n) => typeof n == "object")
|
|
219
219
|
);
|
|
220
|
-
return t.map(
|
|
220
|
+
return t.map(o);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
224
|
-
return
|
|
222
|
+
function Ae(e, t) {
|
|
223
|
+
const o = E(e, t?.in);
|
|
224
|
+
return o.setHours(0, 0, 0, 0), o;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
const [
|
|
228
|
-
|
|
226
|
+
function Gt(e, t, o) {
|
|
227
|
+
const [n, r] = Te(
|
|
228
|
+
o?.in,
|
|
229
229
|
e,
|
|
230
230
|
t
|
|
231
|
-
),
|
|
232
|
-
return Math.round((
|
|
231
|
+
), s = Ae(n), a = Ae(r), i = +s - Tt(s), c = +a - Tt(a);
|
|
232
|
+
return Math.round((i - c) / xn);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
const
|
|
236
|
-
return
|
|
234
|
+
function Pn(e, t) {
|
|
235
|
+
const o = zt(e, t), n = H(e, 0);
|
|
236
|
+
return n.setFullYear(o, 0, 4), n.setHours(0, 0, 0, 0), je(n);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
238
|
+
function Tn(e, t, o) {
|
|
239
|
+
return Rt(e, t * 7, o);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
241
|
+
function Yn(e, t, o) {
|
|
242
|
+
return Lt(e, t * 12, o);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
let
|
|
244
|
+
function En(e, t) {
|
|
245
|
+
let o, n = t?.in;
|
|
246
246
|
return e.forEach((r) => {
|
|
247
|
-
!
|
|
248
|
-
const
|
|
249
|
-
(!
|
|
250
|
-
}),
|
|
247
|
+
!n && typeof r == "object" && (n = H.bind(null, r));
|
|
248
|
+
const s = E(r, n);
|
|
249
|
+
(!o || o < s || isNaN(+s)) && (o = s);
|
|
250
|
+
}), H(n, o || NaN);
|
|
251
251
|
}
|
|
252
|
-
function
|
|
253
|
-
let
|
|
252
|
+
function _n(e, t) {
|
|
253
|
+
let o, n = t?.in;
|
|
254
254
|
return e.forEach((r) => {
|
|
255
|
-
!
|
|
256
|
-
const
|
|
257
|
-
(!
|
|
258
|
-
}),
|
|
259
|
-
}
|
|
260
|
-
function
|
|
261
|
-
const [
|
|
262
|
-
|
|
255
|
+
!n && typeof r == "object" && (n = H.bind(null, r));
|
|
256
|
+
const s = E(r, n);
|
|
257
|
+
(!o || o > s || isNaN(+s)) && (o = s);
|
|
258
|
+
}), H(n, o || NaN);
|
|
259
|
+
}
|
|
260
|
+
function Fn(e, t, o) {
|
|
261
|
+
const [n, r] = Te(
|
|
262
|
+
o?.in,
|
|
263
263
|
e,
|
|
264
264
|
t
|
|
265
265
|
);
|
|
266
|
-
return +
|
|
266
|
+
return +Ae(n) == +Ae(r);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Vt(e) {
|
|
269
269
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return !(
|
|
271
|
+
function Bn(e) {
|
|
272
|
+
return !(!Vt(e) && typeof e != "number" || isNaN(+E(e)));
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
const [
|
|
276
|
-
|
|
274
|
+
function In(e, t, o) {
|
|
275
|
+
const [n, r] = Te(
|
|
276
|
+
o?.in,
|
|
277
277
|
e,
|
|
278
278
|
t
|
|
279
|
-
),
|
|
280
|
-
return
|
|
279
|
+
), s = n.getFullYear() - r.getFullYear(), a = n.getMonth() - r.getMonth();
|
|
280
|
+
return s * 12 + a;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
const
|
|
284
|
-
return
|
|
285
|
-
}
|
|
286
|
-
function
|
|
287
|
-
const [
|
|
288
|
-
return { start:
|
|
289
|
-
}
|
|
290
|
-
function
|
|
291
|
-
const { start:
|
|
292
|
-
let r = +
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
let
|
|
282
|
+
function jn(e, t) {
|
|
283
|
+
const o = E(e, t?.in), n = o.getMonth();
|
|
284
|
+
return o.setFullYear(o.getFullYear(), n + 1, 0), o.setHours(23, 59, 59, 999), o;
|
|
285
|
+
}
|
|
286
|
+
function Xt(e, t) {
|
|
287
|
+
const [o, n] = Te(e, t.start, t.end);
|
|
288
|
+
return { start: o, end: n };
|
|
289
|
+
}
|
|
290
|
+
function An(e, t) {
|
|
291
|
+
const { start: o, end: n } = Xt(t?.in, e);
|
|
292
|
+
let r = +o > +n;
|
|
293
|
+
const s = r ? +o : +n, a = r ? n : o;
|
|
294
|
+
a.setHours(0, 0, 0, 0), a.setDate(1);
|
|
295
|
+
let i = 1;
|
|
296
296
|
const c = [];
|
|
297
|
-
for (; +
|
|
298
|
-
c.push(
|
|
297
|
+
for (; +a <= s; )
|
|
298
|
+
c.push(H(o, a)), a.setMonth(a.getMonth() + i);
|
|
299
299
|
return r ? c.reverse() : c;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
const
|
|
303
|
-
return
|
|
304
|
-
}
|
|
305
|
-
function
|
|
306
|
-
const
|
|
307
|
-
return
|
|
308
|
-
}
|
|
309
|
-
function
|
|
310
|
-
const
|
|
311
|
-
return
|
|
312
|
-
}
|
|
313
|
-
function
|
|
314
|
-
const { start:
|
|
315
|
-
let r = +
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
let
|
|
301
|
+
function Hn(e, t) {
|
|
302
|
+
const o = E(e, t?.in);
|
|
303
|
+
return o.setDate(1), o.setHours(0, 0, 0, 0), o;
|
|
304
|
+
}
|
|
305
|
+
function $n(e, t) {
|
|
306
|
+
const o = E(e, t?.in), n = o.getFullYear();
|
|
307
|
+
return o.setFullYear(n + 1, 0, 0), o.setHours(23, 59, 59, 999), o;
|
|
308
|
+
}
|
|
309
|
+
function Qt(e, t) {
|
|
310
|
+
const o = E(e, t?.in);
|
|
311
|
+
return o.setFullYear(o.getFullYear(), 0, 1), o.setHours(0, 0, 0, 0), o;
|
|
312
|
+
}
|
|
313
|
+
function qn(e, t) {
|
|
314
|
+
const { start: o, end: n } = Xt(t?.in, e);
|
|
315
|
+
let r = +o > +n;
|
|
316
|
+
const s = r ? +o : +n, a = r ? n : o;
|
|
317
|
+
a.setHours(0, 0, 0, 0), a.setMonth(0, 1);
|
|
318
|
+
let i = 1;
|
|
319
319
|
const c = [];
|
|
320
|
-
for (; +
|
|
321
|
-
c.push(
|
|
320
|
+
for (; +a <= s; )
|
|
321
|
+
c.push(H(o, a)), a.setFullYear(a.getFullYear() + i);
|
|
322
322
|
return r ? c.reverse() : c;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
const
|
|
326
|
-
return r.setDate(r.getDate() +
|
|
324
|
+
function Ut(e, t) {
|
|
325
|
+
const o = He(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, r = E(e, t?.in), s = r.getDay(), a = (s < n ? -7 : 0) + 6 - (s - n);
|
|
326
|
+
return r.setDate(r.getDate() + a), r.setHours(23, 59, 59, 999), r;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
return
|
|
328
|
+
function Rn(e, t) {
|
|
329
|
+
return Ut(e, { ...t, weekStartsOn: 1 });
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const Ln = {
|
|
332
332
|
lessThanXSeconds: {
|
|
333
333
|
one: "less than a second",
|
|
334
334
|
other: "less than {{count}} seconds"
|
|
@@ -390,77 +390,77 @@ const $n = {
|
|
|
390
390
|
one: "almost 1 year",
|
|
391
391
|
other: "almost {{count}} years"
|
|
392
392
|
}
|
|
393
|
-
},
|
|
394
|
-
let
|
|
395
|
-
const r =
|
|
396
|
-
return typeof r == "string" ?
|
|
393
|
+
}, zn = (e, t, o) => {
|
|
394
|
+
let n;
|
|
395
|
+
const r = Ln[e];
|
|
396
|
+
return typeof r == "string" ? n = r : t === 1 ? n = r.one : n = r.other.replace("{{count}}", t.toString()), o?.addSuffix ? o.comparison && o.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
397
397
|
};
|
|
398
|
-
function
|
|
398
|
+
function Ne(e) {
|
|
399
399
|
return (t = {}) => {
|
|
400
|
-
const
|
|
401
|
-
return e.formats[
|
|
400
|
+
const o = t.width ? String(t.width) : e.defaultWidth;
|
|
401
|
+
return e.formats[o] || e.formats[e.defaultWidth];
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
|
-
const
|
|
404
|
+
const Gn = {
|
|
405
405
|
full: "EEEE, MMMM do, y",
|
|
406
406
|
long: "MMMM do, y",
|
|
407
407
|
medium: "MMM d, y",
|
|
408
408
|
short: "MM/dd/yyyy"
|
|
409
|
-
},
|
|
409
|
+
}, Vn = {
|
|
410
410
|
full: "h:mm:ss a zzzz",
|
|
411
411
|
long: "h:mm:ss a z",
|
|
412
412
|
medium: "h:mm:ss a",
|
|
413
413
|
short: "h:mm a"
|
|
414
|
-
},
|
|
414
|
+
}, Xn = {
|
|
415
415
|
full: "{{date}} 'at' {{time}}",
|
|
416
416
|
long: "{{date}} 'at' {{time}}",
|
|
417
417
|
medium: "{{date}}, {{time}}",
|
|
418
418
|
short: "{{date}}, {{time}}"
|
|
419
|
-
},
|
|
420
|
-
date:
|
|
421
|
-
formats:
|
|
419
|
+
}, Qn = {
|
|
420
|
+
date: Ne({
|
|
421
|
+
formats: Gn,
|
|
422
422
|
defaultWidth: "full"
|
|
423
423
|
}),
|
|
424
|
-
time:
|
|
425
|
-
formats:
|
|
424
|
+
time: Ne({
|
|
425
|
+
formats: Vn,
|
|
426
426
|
defaultWidth: "full"
|
|
427
427
|
}),
|
|
428
|
-
dateTime:
|
|
429
|
-
formats:
|
|
428
|
+
dateTime: Ne({
|
|
429
|
+
formats: Xn,
|
|
430
430
|
defaultWidth: "full"
|
|
431
431
|
})
|
|
432
|
-
},
|
|
432
|
+
}, Un = {
|
|
433
433
|
lastWeek: "'last' eeee 'at' p",
|
|
434
434
|
yesterday: "'yesterday at' p",
|
|
435
435
|
today: "'today at' p",
|
|
436
436
|
tomorrow: "'tomorrow at' p",
|
|
437
437
|
nextWeek: "eeee 'at' p",
|
|
438
438
|
other: "P"
|
|
439
|
-
},
|
|
440
|
-
function
|
|
441
|
-
return (t,
|
|
442
|
-
const
|
|
439
|
+
}, Zn = (e, t, o, n) => Un[e];
|
|
440
|
+
function oe(e) {
|
|
441
|
+
return (t, o) => {
|
|
442
|
+
const n = o?.context ? String(o.context) : "standalone";
|
|
443
443
|
let r;
|
|
444
|
-
if (
|
|
445
|
-
const
|
|
446
|
-
r = e.formattingValues[
|
|
444
|
+
if (n === "formatting" && e.formattingValues) {
|
|
445
|
+
const a = e.defaultFormattingWidth || e.defaultWidth, i = o?.width ? String(o.width) : a;
|
|
446
|
+
r = e.formattingValues[i] || e.formattingValues[a];
|
|
447
447
|
} else {
|
|
448
|
-
const
|
|
449
|
-
r = e.values[
|
|
448
|
+
const a = e.defaultWidth, i = o?.width ? String(o.width) : e.defaultWidth;
|
|
449
|
+
r = e.values[i] || e.values[a];
|
|
450
450
|
}
|
|
451
|
-
const
|
|
452
|
-
return r[
|
|
451
|
+
const s = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
452
|
+
return r[s];
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
const
|
|
455
|
+
const Kn = {
|
|
456
456
|
narrow: ["B", "A"],
|
|
457
457
|
abbreviated: ["BC", "AD"],
|
|
458
458
|
wide: ["Before Christ", "Anno Domini"]
|
|
459
|
-
},
|
|
459
|
+
}, Jn = {
|
|
460
460
|
narrow: ["1", "2", "3", "4"],
|
|
461
461
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
462
462
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
463
|
-
},
|
|
463
|
+
}, eo = {
|
|
464
464
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
465
465
|
abbreviated: [
|
|
466
466
|
"Jan",
|
|
@@ -490,7 +490,7 @@ const Vn = {
|
|
|
490
490
|
"November",
|
|
491
491
|
"December"
|
|
492
492
|
]
|
|
493
|
-
},
|
|
493
|
+
}, to = {
|
|
494
494
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
495
495
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
496
496
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -503,7 +503,7 @@ const Vn = {
|
|
|
503
503
|
"Friday",
|
|
504
504
|
"Saturday"
|
|
505
505
|
]
|
|
506
|
-
},
|
|
506
|
+
}, no = {
|
|
507
507
|
narrow: {
|
|
508
508
|
am: "a",
|
|
509
509
|
pm: "p",
|
|
@@ -534,7 +534,7 @@ const Vn = {
|
|
|
534
534
|
evening: "evening",
|
|
535
535
|
night: "night"
|
|
536
536
|
}
|
|
537
|
-
},
|
|
537
|
+
}, oo = {
|
|
538
538
|
narrow: {
|
|
539
539
|
am: "a",
|
|
540
540
|
pm: "p",
|
|
@@ -565,101 +565,101 @@ const Vn = {
|
|
|
565
565
|
evening: "in the evening",
|
|
566
566
|
night: "at night"
|
|
567
567
|
}
|
|
568
|
-
},
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
571
|
-
switch (
|
|
568
|
+
}, ro = (e, t) => {
|
|
569
|
+
const o = Number(e), n = o % 100;
|
|
570
|
+
if (n > 20 || n < 10)
|
|
571
|
+
switch (n % 10) {
|
|
572
572
|
case 1:
|
|
573
|
-
return
|
|
573
|
+
return o + "st";
|
|
574
574
|
case 2:
|
|
575
|
-
return
|
|
575
|
+
return o + "nd";
|
|
576
576
|
case 3:
|
|
577
|
-
return
|
|
577
|
+
return o + "rd";
|
|
578
578
|
}
|
|
579
|
-
return
|
|
580
|
-
},
|
|
581
|
-
ordinalNumber:
|
|
582
|
-
era:
|
|
583
|
-
values:
|
|
579
|
+
return o + "th";
|
|
580
|
+
}, ao = {
|
|
581
|
+
ordinalNumber: ro,
|
|
582
|
+
era: oe({
|
|
583
|
+
values: Kn,
|
|
584
584
|
defaultWidth: "wide"
|
|
585
585
|
}),
|
|
586
|
-
quarter:
|
|
587
|
-
values:
|
|
586
|
+
quarter: oe({
|
|
587
|
+
values: Jn,
|
|
588
588
|
defaultWidth: "wide",
|
|
589
589
|
argumentCallback: (e) => e - 1
|
|
590
590
|
}),
|
|
591
|
-
month:
|
|
592
|
-
values:
|
|
591
|
+
month: oe({
|
|
592
|
+
values: eo,
|
|
593
593
|
defaultWidth: "wide"
|
|
594
594
|
}),
|
|
595
|
-
day:
|
|
596
|
-
values:
|
|
595
|
+
day: oe({
|
|
596
|
+
values: to,
|
|
597
597
|
defaultWidth: "wide"
|
|
598
598
|
}),
|
|
599
|
-
dayPeriod:
|
|
600
|
-
values:
|
|
599
|
+
dayPeriod: oe({
|
|
600
|
+
values: no,
|
|
601
601
|
defaultWidth: "wide",
|
|
602
|
-
formattingValues:
|
|
602
|
+
formattingValues: oo,
|
|
603
603
|
defaultFormattingWidth: "wide"
|
|
604
604
|
})
|
|
605
605
|
};
|
|
606
|
-
function
|
|
607
|
-
return (t,
|
|
608
|
-
const
|
|
609
|
-
if (!
|
|
606
|
+
function re(e) {
|
|
607
|
+
return (t, o = {}) => {
|
|
608
|
+
const n = o.width, r = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], s = t.match(r);
|
|
609
|
+
if (!s)
|
|
610
610
|
return null;
|
|
611
|
-
const
|
|
611
|
+
const a = s[0], i = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ? io(i, (u) => u.test(a)) : (
|
|
612
612
|
// [TODO] -- I challenge you to fix the type
|
|
613
|
-
|
|
613
|
+
so(i, (u) => u.test(a))
|
|
614
614
|
);
|
|
615
615
|
let d;
|
|
616
|
-
d = e.valueCallback ? e.valueCallback(c) : c, d =
|
|
616
|
+
d = e.valueCallback ? e.valueCallback(c) : c, d = o.valueCallback ? (
|
|
617
617
|
// [TODO] -- I challenge you to fix the type
|
|
618
|
-
|
|
618
|
+
o.valueCallback(d)
|
|
619
619
|
) : d;
|
|
620
|
-
const l = t.slice(
|
|
620
|
+
const l = t.slice(a.length);
|
|
621
621
|
return { value: d, rest: l };
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
for (const
|
|
626
|
-
if (Object.prototype.hasOwnProperty.call(e,
|
|
627
|
-
return
|
|
624
|
+
function so(e, t) {
|
|
625
|
+
for (const o in e)
|
|
626
|
+
if (Object.prototype.hasOwnProperty.call(e, o) && t(e[o]))
|
|
627
|
+
return o;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
for (let
|
|
631
|
-
if (t(e[
|
|
632
|
-
return
|
|
629
|
+
function io(e, t) {
|
|
630
|
+
for (let o = 0; o < e.length; o++)
|
|
631
|
+
if (t(e[o]))
|
|
632
|
+
return o;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
return (t,
|
|
636
|
-
const
|
|
637
|
-
if (!
|
|
638
|
-
const r =
|
|
639
|
-
if (!
|
|
640
|
-
let
|
|
641
|
-
|
|
642
|
-
const
|
|
643
|
-
return { value:
|
|
634
|
+
function Zt(e) {
|
|
635
|
+
return (t, o = {}) => {
|
|
636
|
+
const n = t.match(e.matchPattern);
|
|
637
|
+
if (!n) return null;
|
|
638
|
+
const r = n[0], s = t.match(e.parsePattern);
|
|
639
|
+
if (!s) return null;
|
|
640
|
+
let a = e.valueCallback ? e.valueCallback(s[0]) : s[0];
|
|
641
|
+
a = o.valueCallback ? o.valueCallback(a) : a;
|
|
642
|
+
const i = t.slice(r.length);
|
|
643
|
+
return { value: a, rest: i };
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
const
|
|
646
|
+
const co = /^(\d+)(th|st|nd|rd)?/i, uo = /\d+/i, lo = {
|
|
647
647
|
narrow: /^(b|a)/i,
|
|
648
648
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
649
649
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
650
|
-
},
|
|
650
|
+
}, fo = {
|
|
651
651
|
any: [/^b/i, /^(a|c)/i]
|
|
652
|
-
},
|
|
652
|
+
}, ho = {
|
|
653
653
|
narrow: /^[1234]/i,
|
|
654
654
|
abbreviated: /^q[1234]/i,
|
|
655
655
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
656
|
-
},
|
|
656
|
+
}, mo = {
|
|
657
657
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
658
|
-
},
|
|
658
|
+
}, yo = {
|
|
659
659
|
narrow: /^[jfmasond]/i,
|
|
660
660
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
661
661
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
662
|
-
},
|
|
662
|
+
}, go = {
|
|
663
663
|
narrow: [
|
|
664
664
|
/^j/i,
|
|
665
665
|
/^f/i,
|
|
@@ -688,18 +688,18 @@ const ro = /^(\d+)(th|st|nd|rd)?/i, ao = /\d+/i, so = {
|
|
|
688
688
|
/^n/i,
|
|
689
689
|
/^d/i
|
|
690
690
|
]
|
|
691
|
-
},
|
|
691
|
+
}, po = {
|
|
692
692
|
narrow: /^[smtwf]/i,
|
|
693
693
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
694
694
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
695
695
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
696
|
-
},
|
|
696
|
+
}, bo = {
|
|
697
697
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
698
698
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
699
|
-
},
|
|
699
|
+
}, wo = {
|
|
700
700
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
701
701
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
702
|
-
},
|
|
702
|
+
}, Mo = {
|
|
703
703
|
any: {
|
|
704
704
|
am: /^a/i,
|
|
705
705
|
pm: /^p/i,
|
|
@@ -710,184 +710,184 @@ const ro = /^(\d+)(th|st|nd|rd)?/i, ao = /\d+/i, so = {
|
|
|
710
710
|
evening: /evening/i,
|
|
711
711
|
night: /night/i
|
|
712
712
|
}
|
|
713
|
-
},
|
|
714
|
-
ordinalNumber:
|
|
715
|
-
matchPattern:
|
|
716
|
-
parsePattern:
|
|
713
|
+
}, vo = {
|
|
714
|
+
ordinalNumber: Zt({
|
|
715
|
+
matchPattern: co,
|
|
716
|
+
parsePattern: uo,
|
|
717
717
|
valueCallback: (e) => parseInt(e, 10)
|
|
718
718
|
}),
|
|
719
|
-
era:
|
|
720
|
-
matchPatterns:
|
|
719
|
+
era: re({
|
|
720
|
+
matchPatterns: lo,
|
|
721
721
|
defaultMatchWidth: "wide",
|
|
722
|
-
parsePatterns:
|
|
722
|
+
parsePatterns: fo,
|
|
723
723
|
defaultParseWidth: "any"
|
|
724
724
|
}),
|
|
725
|
-
quarter:
|
|
726
|
-
matchPatterns:
|
|
725
|
+
quarter: re({
|
|
726
|
+
matchPatterns: ho,
|
|
727
727
|
defaultMatchWidth: "wide",
|
|
728
|
-
parsePatterns:
|
|
728
|
+
parsePatterns: mo,
|
|
729
729
|
defaultParseWidth: "any",
|
|
730
730
|
valueCallback: (e) => e + 1
|
|
731
731
|
}),
|
|
732
|
-
month:
|
|
733
|
-
matchPatterns:
|
|
732
|
+
month: re({
|
|
733
|
+
matchPatterns: yo,
|
|
734
734
|
defaultMatchWidth: "wide",
|
|
735
|
-
parsePatterns:
|
|
735
|
+
parsePatterns: go,
|
|
736
736
|
defaultParseWidth: "any"
|
|
737
737
|
}),
|
|
738
|
-
day:
|
|
739
|
-
matchPatterns:
|
|
738
|
+
day: re({
|
|
739
|
+
matchPatterns: po,
|
|
740
740
|
defaultMatchWidth: "wide",
|
|
741
|
-
parsePatterns:
|
|
741
|
+
parsePatterns: bo,
|
|
742
742
|
defaultParseWidth: "any"
|
|
743
743
|
}),
|
|
744
|
-
dayPeriod:
|
|
745
|
-
matchPatterns:
|
|
744
|
+
dayPeriod: re({
|
|
745
|
+
matchPatterns: wo,
|
|
746
746
|
defaultMatchWidth: "any",
|
|
747
|
-
parsePatterns:
|
|
747
|
+
parsePatterns: Mo,
|
|
748
748
|
defaultParseWidth: "any"
|
|
749
749
|
})
|
|
750
|
-
},
|
|
750
|
+
}, vt = {
|
|
751
751
|
code: "en-US",
|
|
752
|
-
formatDistance:
|
|
753
|
-
formatLong:
|
|
754
|
-
formatRelative:
|
|
755
|
-
localize:
|
|
756
|
-
match:
|
|
752
|
+
formatDistance: zn,
|
|
753
|
+
formatLong: Qn,
|
|
754
|
+
formatRelative: Zn,
|
|
755
|
+
localize: ao,
|
|
756
|
+
match: vo,
|
|
757
757
|
options: {
|
|
758
758
|
weekStartsOn: 0,
|
|
759
759
|
firstWeekContainsDate: 1
|
|
760
760
|
}
|
|
761
761
|
};
|
|
762
|
-
function
|
|
763
|
-
const
|
|
764
|
-
return
|
|
765
|
-
}
|
|
766
|
-
function
|
|
767
|
-
const
|
|
768
|
-
return Math.round(
|
|
769
|
-
}
|
|
770
|
-
function
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
c.setFullYear(
|
|
775
|
-
const d =
|
|
776
|
-
return +
|
|
777
|
-
}
|
|
778
|
-
function
|
|
779
|
-
const
|
|
780
|
-
return
|
|
781
|
-
}
|
|
782
|
-
function
|
|
783
|
-
const
|
|
784
|
-
return Math.round(
|
|
762
|
+
function Do(e, t) {
|
|
763
|
+
const o = E(e, t?.in);
|
|
764
|
+
return Gt(o, Qt(o)) + 1;
|
|
765
|
+
}
|
|
766
|
+
function Kt(e, t) {
|
|
767
|
+
const o = E(e, t?.in), n = +je(o) - +Pn(o);
|
|
768
|
+
return Math.round(n / qt) + 1;
|
|
769
|
+
}
|
|
770
|
+
function Jt(e, t) {
|
|
771
|
+
const o = E(e, t?.in), n = o.getFullYear(), r = He(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, a = H(t?.in || e, 0);
|
|
772
|
+
a.setFullYear(n + 1, 0, s), a.setHours(0, 0, 0, 0);
|
|
773
|
+
const i = Pe(a, t), c = H(t?.in || e, 0);
|
|
774
|
+
c.setFullYear(n, 0, s), c.setHours(0, 0, 0, 0);
|
|
775
|
+
const d = Pe(c, t);
|
|
776
|
+
return +o >= +i ? n + 1 : +o >= +d ? n : n - 1;
|
|
777
|
+
}
|
|
778
|
+
function ko(e, t) {
|
|
779
|
+
const o = He(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, r = Jt(e, t), s = H(t?.in || e, 0);
|
|
780
|
+
return s.setFullYear(r, 0, n), s.setHours(0, 0, 0, 0), Pe(s, t);
|
|
781
|
+
}
|
|
782
|
+
function en(e, t) {
|
|
783
|
+
const o = E(e, t?.in), n = +Pe(o, t) - +ko(o, t);
|
|
784
|
+
return Math.round(n / qt) + 1;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
787
|
-
const
|
|
788
|
-
return
|
|
786
|
+
function Y(e, t) {
|
|
787
|
+
const o = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
|
|
788
|
+
return o + n;
|
|
789
789
|
}
|
|
790
790
|
const me = {
|
|
791
791
|
// Year
|
|
792
792
|
y(e, t) {
|
|
793
|
-
const
|
|
794
|
-
return
|
|
793
|
+
const o = e.getFullYear(), n = o > 0 ? o : 1 - o;
|
|
794
|
+
return Y(t === "yy" ? n % 100 : n, t.length);
|
|
795
795
|
},
|
|
796
796
|
// Month
|
|
797
797
|
M(e, t) {
|
|
798
|
-
const
|
|
799
|
-
return t === "M" ? String(
|
|
798
|
+
const o = e.getMonth();
|
|
799
|
+
return t === "M" ? String(o + 1) : Y(o + 1, 2);
|
|
800
800
|
},
|
|
801
801
|
// Day of the month
|
|
802
802
|
d(e, t) {
|
|
803
|
-
return
|
|
803
|
+
return Y(e.getDate(), t.length);
|
|
804
804
|
},
|
|
805
805
|
// AM or PM
|
|
806
806
|
a(e, t) {
|
|
807
|
-
const
|
|
807
|
+
const o = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
808
808
|
switch (t) {
|
|
809
809
|
case "a":
|
|
810
810
|
case "aa":
|
|
811
|
-
return
|
|
811
|
+
return o.toUpperCase();
|
|
812
812
|
case "aaa":
|
|
813
|
-
return
|
|
813
|
+
return o;
|
|
814
814
|
case "aaaaa":
|
|
815
|
-
return
|
|
815
|
+
return o[0];
|
|
816
816
|
case "aaaa":
|
|
817
817
|
default:
|
|
818
|
-
return
|
|
818
|
+
return o === "am" ? "a.m." : "p.m.";
|
|
819
819
|
}
|
|
820
820
|
},
|
|
821
821
|
// Hour [1-12]
|
|
822
822
|
h(e, t) {
|
|
823
|
-
return
|
|
823
|
+
return Y(e.getHours() % 12 || 12, t.length);
|
|
824
824
|
},
|
|
825
825
|
// Hour [0-23]
|
|
826
826
|
H(e, t) {
|
|
827
|
-
return
|
|
827
|
+
return Y(e.getHours(), t.length);
|
|
828
828
|
},
|
|
829
829
|
// Minute
|
|
830
830
|
m(e, t) {
|
|
831
|
-
return
|
|
831
|
+
return Y(e.getMinutes(), t.length);
|
|
832
832
|
},
|
|
833
833
|
// Second
|
|
834
834
|
s(e, t) {
|
|
835
|
-
return
|
|
835
|
+
return Y(e.getSeconds(), t.length);
|
|
836
836
|
},
|
|
837
837
|
// Fraction of second
|
|
838
838
|
S(e, t) {
|
|
839
|
-
const
|
|
840
|
-
|
|
839
|
+
const o = t.length, n = e.getMilliseconds(), r = Math.trunc(
|
|
840
|
+
n * Math.pow(10, o - 3)
|
|
841
841
|
);
|
|
842
|
-
return
|
|
842
|
+
return Y(r, t.length);
|
|
843
843
|
}
|
|
844
|
-
},
|
|
844
|
+
}, Ce = {
|
|
845
845
|
midnight: "midnight",
|
|
846
846
|
noon: "noon",
|
|
847
847
|
morning: "morning",
|
|
848
848
|
afternoon: "afternoon",
|
|
849
849
|
evening: "evening",
|
|
850
850
|
night: "night"
|
|
851
|
-
},
|
|
851
|
+
}, Yt = {
|
|
852
852
|
// Era
|
|
853
|
-
G: function(e, t,
|
|
854
|
-
const
|
|
853
|
+
G: function(e, t, o) {
|
|
854
|
+
const n = e.getFullYear() > 0 ? 1 : 0;
|
|
855
855
|
switch (t) {
|
|
856
856
|
// AD, BC
|
|
857
857
|
case "G":
|
|
858
858
|
case "GG":
|
|
859
859
|
case "GGG":
|
|
860
|
-
return
|
|
860
|
+
return o.era(n, { width: "abbreviated" });
|
|
861
861
|
// A, B
|
|
862
862
|
case "GGGGG":
|
|
863
|
-
return
|
|
863
|
+
return o.era(n, { width: "narrow" });
|
|
864
864
|
// Anno Domini, Before Christ
|
|
865
865
|
case "GGGG":
|
|
866
866
|
default:
|
|
867
|
-
return
|
|
867
|
+
return o.era(n, { width: "wide" });
|
|
868
868
|
}
|
|
869
869
|
},
|
|
870
870
|
// Year
|
|
871
|
-
y: function(e, t,
|
|
871
|
+
y: function(e, t, o) {
|
|
872
872
|
if (t === "yo") {
|
|
873
|
-
const
|
|
874
|
-
return
|
|
873
|
+
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
874
|
+
return o.ordinalNumber(r, { unit: "year" });
|
|
875
875
|
}
|
|
876
876
|
return me.y(e, t);
|
|
877
877
|
},
|
|
878
878
|
// Local week-numbering year
|
|
879
|
-
Y: function(e, t,
|
|
880
|
-
const r =
|
|
879
|
+
Y: function(e, t, o, n) {
|
|
880
|
+
const r = Jt(e, n), s = r > 0 ? r : 1 - r;
|
|
881
881
|
if (t === "YY") {
|
|
882
|
-
const
|
|
883
|
-
return
|
|
882
|
+
const a = s % 100;
|
|
883
|
+
return Y(a, 2);
|
|
884
884
|
}
|
|
885
|
-
return t === "Yo" ?
|
|
885
|
+
return t === "Yo" ? o.ordinalNumber(s, { unit: "year" }) : Y(s, t.length);
|
|
886
886
|
},
|
|
887
887
|
// ISO week-numbering year
|
|
888
888
|
R: function(e, t) {
|
|
889
|
-
const
|
|
890
|
-
return
|
|
889
|
+
const o = zt(e);
|
|
890
|
+
return Y(o, t.length);
|
|
891
891
|
},
|
|
892
892
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
893
893
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -899,437 +899,437 @@ const me = {
|
|
|
899
899
|
// Also `yy` always returns the last two digits of a year,
|
|
900
900
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
901
901
|
u: function(e, t) {
|
|
902
|
-
const
|
|
903
|
-
return
|
|
902
|
+
const o = e.getFullYear();
|
|
903
|
+
return Y(o, t.length);
|
|
904
904
|
},
|
|
905
905
|
// Quarter
|
|
906
|
-
Q: function(e, t,
|
|
907
|
-
const
|
|
906
|
+
Q: function(e, t, o) {
|
|
907
|
+
const n = Math.ceil((e.getMonth() + 1) / 3);
|
|
908
908
|
switch (t) {
|
|
909
909
|
// 1, 2, 3, 4
|
|
910
910
|
case "Q":
|
|
911
|
-
return String(
|
|
911
|
+
return String(n);
|
|
912
912
|
// 01, 02, 03, 04
|
|
913
913
|
case "QQ":
|
|
914
|
-
return
|
|
914
|
+
return Y(n, 2);
|
|
915
915
|
// 1st, 2nd, 3rd, 4th
|
|
916
916
|
case "Qo":
|
|
917
|
-
return
|
|
917
|
+
return o.ordinalNumber(n, { unit: "quarter" });
|
|
918
918
|
// Q1, Q2, Q3, Q4
|
|
919
919
|
case "QQQ":
|
|
920
|
-
return
|
|
920
|
+
return o.quarter(n, {
|
|
921
921
|
width: "abbreviated",
|
|
922
922
|
context: "formatting"
|
|
923
923
|
});
|
|
924
924
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
925
925
|
case "QQQQQ":
|
|
926
|
-
return
|
|
926
|
+
return o.quarter(n, {
|
|
927
927
|
width: "narrow",
|
|
928
928
|
context: "formatting"
|
|
929
929
|
});
|
|
930
930
|
// 1st quarter, 2nd quarter, ...
|
|
931
931
|
case "QQQQ":
|
|
932
932
|
default:
|
|
933
|
-
return
|
|
933
|
+
return o.quarter(n, {
|
|
934
934
|
width: "wide",
|
|
935
935
|
context: "formatting"
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
},
|
|
939
939
|
// Stand-alone quarter
|
|
940
|
-
q: function(e, t,
|
|
941
|
-
const
|
|
940
|
+
q: function(e, t, o) {
|
|
941
|
+
const n = Math.ceil((e.getMonth() + 1) / 3);
|
|
942
942
|
switch (t) {
|
|
943
943
|
// 1, 2, 3, 4
|
|
944
944
|
case "q":
|
|
945
|
-
return String(
|
|
945
|
+
return String(n);
|
|
946
946
|
// 01, 02, 03, 04
|
|
947
947
|
case "qq":
|
|
948
|
-
return
|
|
948
|
+
return Y(n, 2);
|
|
949
949
|
// 1st, 2nd, 3rd, 4th
|
|
950
950
|
case "qo":
|
|
951
|
-
return
|
|
951
|
+
return o.ordinalNumber(n, { unit: "quarter" });
|
|
952
952
|
// Q1, Q2, Q3, Q4
|
|
953
953
|
case "qqq":
|
|
954
|
-
return
|
|
954
|
+
return o.quarter(n, {
|
|
955
955
|
width: "abbreviated",
|
|
956
956
|
context: "standalone"
|
|
957
957
|
});
|
|
958
958
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
959
959
|
case "qqqqq":
|
|
960
|
-
return
|
|
960
|
+
return o.quarter(n, {
|
|
961
961
|
width: "narrow",
|
|
962
962
|
context: "standalone"
|
|
963
963
|
});
|
|
964
964
|
// 1st quarter, 2nd quarter, ...
|
|
965
965
|
case "qqqq":
|
|
966
966
|
default:
|
|
967
|
-
return
|
|
967
|
+
return o.quarter(n, {
|
|
968
968
|
width: "wide",
|
|
969
969
|
context: "standalone"
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
},
|
|
973
973
|
// Month
|
|
974
|
-
M: function(e, t,
|
|
975
|
-
const
|
|
974
|
+
M: function(e, t, o) {
|
|
975
|
+
const n = e.getMonth();
|
|
976
976
|
switch (t) {
|
|
977
977
|
case "M":
|
|
978
978
|
case "MM":
|
|
979
979
|
return me.M(e, t);
|
|
980
980
|
// 1st, 2nd, ..., 12th
|
|
981
981
|
case "Mo":
|
|
982
|
-
return
|
|
982
|
+
return o.ordinalNumber(n + 1, { unit: "month" });
|
|
983
983
|
// Jan, Feb, ..., Dec
|
|
984
984
|
case "MMM":
|
|
985
|
-
return
|
|
985
|
+
return o.month(n, {
|
|
986
986
|
width: "abbreviated",
|
|
987
987
|
context: "formatting"
|
|
988
988
|
});
|
|
989
989
|
// J, F, ..., D
|
|
990
990
|
case "MMMMM":
|
|
991
|
-
return
|
|
991
|
+
return o.month(n, {
|
|
992
992
|
width: "narrow",
|
|
993
993
|
context: "formatting"
|
|
994
994
|
});
|
|
995
995
|
// January, February, ..., December
|
|
996
996
|
case "MMMM":
|
|
997
997
|
default:
|
|
998
|
-
return
|
|
998
|
+
return o.month(n, { width: "wide", context: "formatting" });
|
|
999
999
|
}
|
|
1000
1000
|
},
|
|
1001
1001
|
// Stand-alone month
|
|
1002
|
-
L: function(e, t,
|
|
1003
|
-
const
|
|
1002
|
+
L: function(e, t, o) {
|
|
1003
|
+
const n = e.getMonth();
|
|
1004
1004
|
switch (t) {
|
|
1005
1005
|
// 1, 2, ..., 12
|
|
1006
1006
|
case "L":
|
|
1007
|
-
return String(
|
|
1007
|
+
return String(n + 1);
|
|
1008
1008
|
// 01, 02, ..., 12
|
|
1009
1009
|
case "LL":
|
|
1010
|
-
return
|
|
1010
|
+
return Y(n + 1, 2);
|
|
1011
1011
|
// 1st, 2nd, ..., 12th
|
|
1012
1012
|
case "Lo":
|
|
1013
|
-
return
|
|
1013
|
+
return o.ordinalNumber(n + 1, { unit: "month" });
|
|
1014
1014
|
// Jan, Feb, ..., Dec
|
|
1015
1015
|
case "LLL":
|
|
1016
|
-
return
|
|
1016
|
+
return o.month(n, {
|
|
1017
1017
|
width: "abbreviated",
|
|
1018
1018
|
context: "standalone"
|
|
1019
1019
|
});
|
|
1020
1020
|
// J, F, ..., D
|
|
1021
1021
|
case "LLLLL":
|
|
1022
|
-
return
|
|
1022
|
+
return o.month(n, {
|
|
1023
1023
|
width: "narrow",
|
|
1024
1024
|
context: "standalone"
|
|
1025
1025
|
});
|
|
1026
1026
|
// January, February, ..., December
|
|
1027
1027
|
case "LLLL":
|
|
1028
1028
|
default:
|
|
1029
|
-
return
|
|
1029
|
+
return o.month(n, { width: "wide", context: "standalone" });
|
|
1030
1030
|
}
|
|
1031
1031
|
},
|
|
1032
1032
|
// Local week of year
|
|
1033
|
-
w: function(e, t,
|
|
1034
|
-
const r =
|
|
1035
|
-
return t === "wo" ?
|
|
1033
|
+
w: function(e, t, o, n) {
|
|
1034
|
+
const r = en(e, n);
|
|
1035
|
+
return t === "wo" ? o.ordinalNumber(r, { unit: "week" }) : Y(r, t.length);
|
|
1036
1036
|
},
|
|
1037
1037
|
// ISO week of year
|
|
1038
|
-
I: function(e, t,
|
|
1039
|
-
const
|
|
1040
|
-
return t === "Io" ?
|
|
1038
|
+
I: function(e, t, o) {
|
|
1039
|
+
const n = Kt(e);
|
|
1040
|
+
return t === "Io" ? o.ordinalNumber(n, { unit: "week" }) : Y(n, t.length);
|
|
1041
1041
|
},
|
|
1042
1042
|
// Day of the month
|
|
1043
|
-
d: function(e, t,
|
|
1044
|
-
return t === "do" ?
|
|
1043
|
+
d: function(e, t, o) {
|
|
1044
|
+
return t === "do" ? o.ordinalNumber(e.getDate(), { unit: "date" }) : me.d(e, t);
|
|
1045
1045
|
},
|
|
1046
1046
|
// Day of year
|
|
1047
|
-
D: function(e, t,
|
|
1048
|
-
const
|
|
1049
|
-
return t === "Do" ?
|
|
1047
|
+
D: function(e, t, o) {
|
|
1048
|
+
const n = Do(e);
|
|
1049
|
+
return t === "Do" ? o.ordinalNumber(n, { unit: "dayOfYear" }) : Y(n, t.length);
|
|
1050
1050
|
},
|
|
1051
1051
|
// Day of week
|
|
1052
|
-
E: function(e, t,
|
|
1053
|
-
const
|
|
1052
|
+
E: function(e, t, o) {
|
|
1053
|
+
const n = e.getDay();
|
|
1054
1054
|
switch (t) {
|
|
1055
1055
|
// Tue
|
|
1056
1056
|
case "E":
|
|
1057
1057
|
case "EE":
|
|
1058
1058
|
case "EEE":
|
|
1059
|
-
return
|
|
1059
|
+
return o.day(n, {
|
|
1060
1060
|
width: "abbreviated",
|
|
1061
1061
|
context: "formatting"
|
|
1062
1062
|
});
|
|
1063
1063
|
// T
|
|
1064
1064
|
case "EEEEE":
|
|
1065
|
-
return
|
|
1065
|
+
return o.day(n, {
|
|
1066
1066
|
width: "narrow",
|
|
1067
1067
|
context: "formatting"
|
|
1068
1068
|
});
|
|
1069
1069
|
// Tu
|
|
1070
1070
|
case "EEEEEE":
|
|
1071
|
-
return
|
|
1071
|
+
return o.day(n, {
|
|
1072
1072
|
width: "short",
|
|
1073
1073
|
context: "formatting"
|
|
1074
1074
|
});
|
|
1075
1075
|
// Tuesday
|
|
1076
1076
|
case "EEEE":
|
|
1077
1077
|
default:
|
|
1078
|
-
return
|
|
1078
|
+
return o.day(n, {
|
|
1079
1079
|
width: "wide",
|
|
1080
1080
|
context: "formatting"
|
|
1081
1081
|
});
|
|
1082
1082
|
}
|
|
1083
1083
|
},
|
|
1084
1084
|
// Local day of week
|
|
1085
|
-
e: function(e, t,
|
|
1086
|
-
const r = e.getDay(),
|
|
1085
|
+
e: function(e, t, o, n) {
|
|
1086
|
+
const r = e.getDay(), s = (r - n.weekStartsOn + 8) % 7 || 7;
|
|
1087
1087
|
switch (t) {
|
|
1088
1088
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
1089
1089
|
case "e":
|
|
1090
|
-
return String(
|
|
1090
|
+
return String(s);
|
|
1091
1091
|
// Padded numerical value
|
|
1092
1092
|
case "ee":
|
|
1093
|
-
return
|
|
1093
|
+
return Y(s, 2);
|
|
1094
1094
|
// 1st, 2nd, ..., 7th
|
|
1095
1095
|
case "eo":
|
|
1096
|
-
return
|
|
1096
|
+
return o.ordinalNumber(s, { unit: "day" });
|
|
1097
1097
|
case "eee":
|
|
1098
|
-
return
|
|
1098
|
+
return o.day(r, {
|
|
1099
1099
|
width: "abbreviated",
|
|
1100
1100
|
context: "formatting"
|
|
1101
1101
|
});
|
|
1102
1102
|
// T
|
|
1103
1103
|
case "eeeee":
|
|
1104
|
-
return
|
|
1104
|
+
return o.day(r, {
|
|
1105
1105
|
width: "narrow",
|
|
1106
1106
|
context: "formatting"
|
|
1107
1107
|
});
|
|
1108
1108
|
// Tu
|
|
1109
1109
|
case "eeeeee":
|
|
1110
|
-
return
|
|
1110
|
+
return o.day(r, {
|
|
1111
1111
|
width: "short",
|
|
1112
1112
|
context: "formatting"
|
|
1113
1113
|
});
|
|
1114
1114
|
// Tuesday
|
|
1115
1115
|
case "eeee":
|
|
1116
1116
|
default:
|
|
1117
|
-
return
|
|
1117
|
+
return o.day(r, {
|
|
1118
1118
|
width: "wide",
|
|
1119
1119
|
context: "formatting"
|
|
1120
1120
|
});
|
|
1121
1121
|
}
|
|
1122
1122
|
},
|
|
1123
1123
|
// Stand-alone local day of week
|
|
1124
|
-
c: function(e, t,
|
|
1125
|
-
const r = e.getDay(),
|
|
1124
|
+
c: function(e, t, o, n) {
|
|
1125
|
+
const r = e.getDay(), s = (r - n.weekStartsOn + 8) % 7 || 7;
|
|
1126
1126
|
switch (t) {
|
|
1127
1127
|
// Numerical value (same as in `e`)
|
|
1128
1128
|
case "c":
|
|
1129
|
-
return String(
|
|
1129
|
+
return String(s);
|
|
1130
1130
|
// Padded numerical value
|
|
1131
1131
|
case "cc":
|
|
1132
|
-
return
|
|
1132
|
+
return Y(s, t.length);
|
|
1133
1133
|
// 1st, 2nd, ..., 7th
|
|
1134
1134
|
case "co":
|
|
1135
|
-
return
|
|
1135
|
+
return o.ordinalNumber(s, { unit: "day" });
|
|
1136
1136
|
case "ccc":
|
|
1137
|
-
return
|
|
1137
|
+
return o.day(r, {
|
|
1138
1138
|
width: "abbreviated",
|
|
1139
1139
|
context: "standalone"
|
|
1140
1140
|
});
|
|
1141
1141
|
// T
|
|
1142
1142
|
case "ccccc":
|
|
1143
|
-
return
|
|
1143
|
+
return o.day(r, {
|
|
1144
1144
|
width: "narrow",
|
|
1145
1145
|
context: "standalone"
|
|
1146
1146
|
});
|
|
1147
1147
|
// Tu
|
|
1148
1148
|
case "cccccc":
|
|
1149
|
-
return
|
|
1149
|
+
return o.day(r, {
|
|
1150
1150
|
width: "short",
|
|
1151
1151
|
context: "standalone"
|
|
1152
1152
|
});
|
|
1153
1153
|
// Tuesday
|
|
1154
1154
|
case "cccc":
|
|
1155
1155
|
default:
|
|
1156
|
-
return
|
|
1156
|
+
return o.day(r, {
|
|
1157
1157
|
width: "wide",
|
|
1158
1158
|
context: "standalone"
|
|
1159
1159
|
});
|
|
1160
1160
|
}
|
|
1161
1161
|
},
|
|
1162
1162
|
// ISO day of week
|
|
1163
|
-
i: function(e, t,
|
|
1164
|
-
const
|
|
1163
|
+
i: function(e, t, o) {
|
|
1164
|
+
const n = e.getDay(), r = n === 0 ? 7 : n;
|
|
1165
1165
|
switch (t) {
|
|
1166
1166
|
// 2
|
|
1167
1167
|
case "i":
|
|
1168
1168
|
return String(r);
|
|
1169
1169
|
// 02
|
|
1170
1170
|
case "ii":
|
|
1171
|
-
return
|
|
1171
|
+
return Y(r, t.length);
|
|
1172
1172
|
// 2nd
|
|
1173
1173
|
case "io":
|
|
1174
|
-
return
|
|
1174
|
+
return o.ordinalNumber(r, { unit: "day" });
|
|
1175
1175
|
// Tue
|
|
1176
1176
|
case "iii":
|
|
1177
|
-
return
|
|
1177
|
+
return o.day(n, {
|
|
1178
1178
|
width: "abbreviated",
|
|
1179
1179
|
context: "formatting"
|
|
1180
1180
|
});
|
|
1181
1181
|
// T
|
|
1182
1182
|
case "iiiii":
|
|
1183
|
-
return
|
|
1183
|
+
return o.day(n, {
|
|
1184
1184
|
width: "narrow",
|
|
1185
1185
|
context: "formatting"
|
|
1186
1186
|
});
|
|
1187
1187
|
// Tu
|
|
1188
1188
|
case "iiiiii":
|
|
1189
|
-
return
|
|
1189
|
+
return o.day(n, {
|
|
1190
1190
|
width: "short",
|
|
1191
1191
|
context: "formatting"
|
|
1192
1192
|
});
|
|
1193
1193
|
// Tuesday
|
|
1194
1194
|
case "iiii":
|
|
1195
1195
|
default:
|
|
1196
|
-
return
|
|
1196
|
+
return o.day(n, {
|
|
1197
1197
|
width: "wide",
|
|
1198
1198
|
context: "formatting"
|
|
1199
1199
|
});
|
|
1200
1200
|
}
|
|
1201
1201
|
},
|
|
1202
1202
|
// AM or PM
|
|
1203
|
-
a: function(e, t,
|
|
1203
|
+
a: function(e, t, o) {
|
|
1204
1204
|
const r = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1205
1205
|
switch (t) {
|
|
1206
1206
|
case "a":
|
|
1207
1207
|
case "aa":
|
|
1208
|
-
return
|
|
1208
|
+
return o.dayPeriod(r, {
|
|
1209
1209
|
width: "abbreviated",
|
|
1210
1210
|
context: "formatting"
|
|
1211
1211
|
});
|
|
1212
1212
|
case "aaa":
|
|
1213
|
-
return
|
|
1213
|
+
return o.dayPeriod(r, {
|
|
1214
1214
|
width: "abbreviated",
|
|
1215
1215
|
context: "formatting"
|
|
1216
1216
|
}).toLowerCase();
|
|
1217
1217
|
case "aaaaa":
|
|
1218
|
-
return
|
|
1218
|
+
return o.dayPeriod(r, {
|
|
1219
1219
|
width: "narrow",
|
|
1220
1220
|
context: "formatting"
|
|
1221
1221
|
});
|
|
1222
1222
|
case "aaaa":
|
|
1223
1223
|
default:
|
|
1224
|
-
return
|
|
1224
|
+
return o.dayPeriod(r, {
|
|
1225
1225
|
width: "wide",
|
|
1226
1226
|
context: "formatting"
|
|
1227
1227
|
});
|
|
1228
1228
|
}
|
|
1229
1229
|
},
|
|
1230
1230
|
// AM, PM, midnight, noon
|
|
1231
|
-
b: function(e, t,
|
|
1232
|
-
const
|
|
1231
|
+
b: function(e, t, o) {
|
|
1232
|
+
const n = e.getHours();
|
|
1233
1233
|
let r;
|
|
1234
|
-
switch (
|
|
1234
|
+
switch (n === 12 ? r = Ce.noon : n === 0 ? r = Ce.midnight : r = n / 12 >= 1 ? "pm" : "am", t) {
|
|
1235
1235
|
case "b":
|
|
1236
1236
|
case "bb":
|
|
1237
|
-
return
|
|
1237
|
+
return o.dayPeriod(r, {
|
|
1238
1238
|
width: "abbreviated",
|
|
1239
1239
|
context: "formatting"
|
|
1240
1240
|
});
|
|
1241
1241
|
case "bbb":
|
|
1242
|
-
return
|
|
1242
|
+
return o.dayPeriod(r, {
|
|
1243
1243
|
width: "abbreviated",
|
|
1244
1244
|
context: "formatting"
|
|
1245
1245
|
}).toLowerCase();
|
|
1246
1246
|
case "bbbbb":
|
|
1247
|
-
return
|
|
1247
|
+
return o.dayPeriod(r, {
|
|
1248
1248
|
width: "narrow",
|
|
1249
1249
|
context: "formatting"
|
|
1250
1250
|
});
|
|
1251
1251
|
case "bbbb":
|
|
1252
1252
|
default:
|
|
1253
|
-
return
|
|
1253
|
+
return o.dayPeriod(r, {
|
|
1254
1254
|
width: "wide",
|
|
1255
1255
|
context: "formatting"
|
|
1256
1256
|
});
|
|
1257
1257
|
}
|
|
1258
1258
|
},
|
|
1259
1259
|
// in the morning, in the afternoon, in the evening, at night
|
|
1260
|
-
B: function(e, t,
|
|
1261
|
-
const
|
|
1260
|
+
B: function(e, t, o) {
|
|
1261
|
+
const n = e.getHours();
|
|
1262
1262
|
let r;
|
|
1263
|
-
switch (
|
|
1263
|
+
switch (n >= 17 ? r = Ce.evening : n >= 12 ? r = Ce.afternoon : n >= 4 ? r = Ce.morning : r = Ce.night, t) {
|
|
1264
1264
|
case "B":
|
|
1265
1265
|
case "BB":
|
|
1266
1266
|
case "BBB":
|
|
1267
|
-
return
|
|
1267
|
+
return o.dayPeriod(r, {
|
|
1268
1268
|
width: "abbreviated",
|
|
1269
1269
|
context: "formatting"
|
|
1270
1270
|
});
|
|
1271
1271
|
case "BBBBB":
|
|
1272
|
-
return
|
|
1272
|
+
return o.dayPeriod(r, {
|
|
1273
1273
|
width: "narrow",
|
|
1274
1274
|
context: "formatting"
|
|
1275
1275
|
});
|
|
1276
1276
|
case "BBBB":
|
|
1277
1277
|
default:
|
|
1278
|
-
return
|
|
1278
|
+
return o.dayPeriod(r, {
|
|
1279
1279
|
width: "wide",
|
|
1280
1280
|
context: "formatting"
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
},
|
|
1284
1284
|
// Hour [1-12]
|
|
1285
|
-
h: function(e, t,
|
|
1285
|
+
h: function(e, t, o) {
|
|
1286
1286
|
if (t === "ho") {
|
|
1287
|
-
let
|
|
1288
|
-
return
|
|
1287
|
+
let n = e.getHours() % 12;
|
|
1288
|
+
return n === 0 && (n = 12), o.ordinalNumber(n, { unit: "hour" });
|
|
1289
1289
|
}
|
|
1290
1290
|
return me.h(e, t);
|
|
1291
1291
|
},
|
|
1292
1292
|
// Hour [0-23]
|
|
1293
|
-
H: function(e, t,
|
|
1294
|
-
return t === "Ho" ?
|
|
1293
|
+
H: function(e, t, o) {
|
|
1294
|
+
return t === "Ho" ? o.ordinalNumber(e.getHours(), { unit: "hour" }) : me.H(e, t);
|
|
1295
1295
|
},
|
|
1296
1296
|
// Hour [0-11]
|
|
1297
|
-
K: function(e, t,
|
|
1298
|
-
const
|
|
1299
|
-
return t === "Ko" ?
|
|
1297
|
+
K: function(e, t, o) {
|
|
1298
|
+
const n = e.getHours() % 12;
|
|
1299
|
+
return t === "Ko" ? o.ordinalNumber(n, { unit: "hour" }) : Y(n, t.length);
|
|
1300
1300
|
},
|
|
1301
1301
|
// Hour [1-24]
|
|
1302
|
-
k: function(e, t,
|
|
1303
|
-
let
|
|
1304
|
-
return
|
|
1302
|
+
k: function(e, t, o) {
|
|
1303
|
+
let n = e.getHours();
|
|
1304
|
+
return n === 0 && (n = 24), t === "ko" ? o.ordinalNumber(n, { unit: "hour" }) : Y(n, t.length);
|
|
1305
1305
|
},
|
|
1306
1306
|
// Minute
|
|
1307
|
-
m: function(e, t,
|
|
1308
|
-
return t === "mo" ?
|
|
1307
|
+
m: function(e, t, o) {
|
|
1308
|
+
return t === "mo" ? o.ordinalNumber(e.getMinutes(), { unit: "minute" }) : me.m(e, t);
|
|
1309
1309
|
},
|
|
1310
1310
|
// Second
|
|
1311
|
-
s: function(e, t,
|
|
1312
|
-
return t === "so" ?
|
|
1311
|
+
s: function(e, t, o) {
|
|
1312
|
+
return t === "so" ? o.ordinalNumber(e.getSeconds(), { unit: "second" }) : me.s(e, t);
|
|
1313
1313
|
},
|
|
1314
1314
|
// Fraction of second
|
|
1315
1315
|
S: function(e, t) {
|
|
1316
1316
|
return me.S(e, t);
|
|
1317
1317
|
},
|
|
1318
1318
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1319
|
-
X: function(e, t,
|
|
1320
|
-
const
|
|
1321
|
-
if (
|
|
1319
|
+
X: function(e, t, o) {
|
|
1320
|
+
const n = e.getTimezoneOffset();
|
|
1321
|
+
if (n === 0)
|
|
1322
1322
|
return "Z";
|
|
1323
1323
|
switch (t) {
|
|
1324
1324
|
// Hours and optional minutes
|
|
1325
1325
|
case "X":
|
|
1326
|
-
return
|
|
1326
|
+
return _t(n);
|
|
1327
1327
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1328
1328
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1329
1329
|
// so this token always has the same output as `XX`
|
|
1330
1330
|
case "XXXX":
|
|
1331
1331
|
case "XX":
|
|
1332
|
-
return
|
|
1332
|
+
return ke(n);
|
|
1333
1333
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1334
1334
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1335
1335
|
// so this token always has the same output as `XXX`
|
|
@@ -1337,22 +1337,22 @@ const me = {
|
|
|
1337
1337
|
case "XXX":
|
|
1338
1338
|
// Hours and minutes with `:` delimiter
|
|
1339
1339
|
default:
|
|
1340
|
-
return
|
|
1340
|
+
return ke(n, ":");
|
|
1341
1341
|
}
|
|
1342
1342
|
},
|
|
1343
1343
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1344
|
-
x: function(e, t,
|
|
1345
|
-
const
|
|
1344
|
+
x: function(e, t, o) {
|
|
1345
|
+
const n = e.getTimezoneOffset();
|
|
1346
1346
|
switch (t) {
|
|
1347
1347
|
// Hours and optional minutes
|
|
1348
1348
|
case "x":
|
|
1349
|
-
return
|
|
1349
|
+
return _t(n);
|
|
1350
1350
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1351
1351
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1352
1352
|
// so this token always has the same output as `xx`
|
|
1353
1353
|
case "xxxx":
|
|
1354
1354
|
case "xx":
|
|
1355
|
-
return
|
|
1355
|
+
return ke(n);
|
|
1356
1356
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1357
1357
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1358
1358
|
// so this token always has the same output as `xxx`
|
|
@@ -1360,61 +1360,61 @@ const me = {
|
|
|
1360
1360
|
case "xxx":
|
|
1361
1361
|
// Hours and minutes with `:` delimiter
|
|
1362
1362
|
default:
|
|
1363
|
-
return
|
|
1363
|
+
return ke(n, ":");
|
|
1364
1364
|
}
|
|
1365
1365
|
},
|
|
1366
1366
|
// Timezone (GMT)
|
|
1367
|
-
O: function(e, t,
|
|
1368
|
-
const
|
|
1367
|
+
O: function(e, t, o) {
|
|
1368
|
+
const n = e.getTimezoneOffset();
|
|
1369
1369
|
switch (t) {
|
|
1370
1370
|
// Short
|
|
1371
1371
|
case "O":
|
|
1372
1372
|
case "OO":
|
|
1373
1373
|
case "OOO":
|
|
1374
|
-
return "GMT" +
|
|
1374
|
+
return "GMT" + Et(n, ":");
|
|
1375
1375
|
// Long
|
|
1376
1376
|
case "OOOO":
|
|
1377
1377
|
default:
|
|
1378
|
-
return "GMT" +
|
|
1378
|
+
return "GMT" + ke(n, ":");
|
|
1379
1379
|
}
|
|
1380
1380
|
},
|
|
1381
1381
|
// Timezone (specific non-location)
|
|
1382
|
-
z: function(e, t,
|
|
1383
|
-
const
|
|
1382
|
+
z: function(e, t, o) {
|
|
1383
|
+
const n = e.getTimezoneOffset();
|
|
1384
1384
|
switch (t) {
|
|
1385
1385
|
// Short
|
|
1386
1386
|
case "z":
|
|
1387
1387
|
case "zz":
|
|
1388
1388
|
case "zzz":
|
|
1389
|
-
return "GMT" +
|
|
1389
|
+
return "GMT" + Et(n, ":");
|
|
1390
1390
|
// Long
|
|
1391
1391
|
case "zzzz":
|
|
1392
1392
|
default:
|
|
1393
|
-
return "GMT" +
|
|
1393
|
+
return "GMT" + ke(n, ":");
|
|
1394
1394
|
}
|
|
1395
1395
|
},
|
|
1396
1396
|
// Seconds timestamp
|
|
1397
|
-
t: function(e, t,
|
|
1398
|
-
const
|
|
1399
|
-
return
|
|
1397
|
+
t: function(e, t, o) {
|
|
1398
|
+
const n = Math.trunc(+e / 1e3);
|
|
1399
|
+
return Y(n, t.length);
|
|
1400
1400
|
},
|
|
1401
1401
|
// Milliseconds timestamp
|
|
1402
|
-
T: function(e, t,
|
|
1403
|
-
return
|
|
1402
|
+
T: function(e, t, o) {
|
|
1403
|
+
return Y(+e, t.length);
|
|
1404
1404
|
}
|
|
1405
1405
|
};
|
|
1406
|
-
function
|
|
1407
|
-
const
|
|
1408
|
-
return
|
|
1406
|
+
function Et(e, t = "") {
|
|
1407
|
+
const o = e > 0 ? "-" : "+", n = Math.abs(e), r = Math.trunc(n / 60), s = n % 60;
|
|
1408
|
+
return s === 0 ? o + String(r) : o + String(r) + t + Y(s, 2);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
1410
|
+
function _t(e, t) {
|
|
1411
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + Y(Math.abs(e) / 60, 2) : ke(e, t);
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1413
|
+
function ke(e, t = "") {
|
|
1414
|
+
const o = e > 0 ? "-" : "+", n = Math.abs(e), r = Y(Math.trunc(n / 60), 2), s = Y(n % 60, 2);
|
|
1415
|
+
return o + r + t + s;
|
|
1416
1416
|
}
|
|
1417
|
-
const
|
|
1417
|
+
const Ft = (e, t) => {
|
|
1418
1418
|
switch (e) {
|
|
1419
1419
|
case "P":
|
|
1420
1420
|
return t.date({ width: "short" });
|
|
@@ -1426,7 +1426,7 @@ const Nt = (e, t) => {
|
|
|
1426
1426
|
default:
|
|
1427
1427
|
return t.date({ width: "full" });
|
|
1428
1428
|
}
|
|
1429
|
-
},
|
|
1429
|
+
}, tn = (e, t) => {
|
|
1430
1430
|
switch (e) {
|
|
1431
1431
|
case "p":
|
|
1432
1432
|
return t.time({ width: "short" });
|
|
@@ -1438,164 +1438,164 @@ const Nt = (e, t) => {
|
|
|
1438
1438
|
default:
|
|
1439
1439
|
return t.time({ width: "full" });
|
|
1440
1440
|
}
|
|
1441
|
-
},
|
|
1442
|
-
const
|
|
1441
|
+
}, Oo = (e, t) => {
|
|
1442
|
+
const o = e.match(/(P+)(p+)?/) || [], n = o[1], r = o[2];
|
|
1443
1443
|
if (!r)
|
|
1444
|
-
return
|
|
1445
|
-
let
|
|
1446
|
-
switch (
|
|
1444
|
+
return Ft(e, t);
|
|
1445
|
+
let s;
|
|
1446
|
+
switch (n) {
|
|
1447
1447
|
case "P":
|
|
1448
|
-
|
|
1448
|
+
s = t.dateTime({ width: "short" });
|
|
1449
1449
|
break;
|
|
1450
1450
|
case "PP":
|
|
1451
|
-
|
|
1451
|
+
s = t.dateTime({ width: "medium" });
|
|
1452
1452
|
break;
|
|
1453
1453
|
case "PPP":
|
|
1454
|
-
|
|
1454
|
+
s = t.dateTime({ width: "long" });
|
|
1455
1455
|
break;
|
|
1456
1456
|
case "PPPP":
|
|
1457
1457
|
default:
|
|
1458
|
-
|
|
1458
|
+
s = t.dateTime({ width: "full" });
|
|
1459
1459
|
break;
|
|
1460
1460
|
}
|
|
1461
|
-
return
|
|
1462
|
-
},
|
|
1463
|
-
p:
|
|
1464
|
-
P:
|
|
1465
|
-
},
|
|
1466
|
-
function
|
|
1467
|
-
return
|
|
1468
|
-
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1471
|
-
}
|
|
1472
|
-
function
|
|
1473
|
-
const
|
|
1474
|
-
if (console.warn(
|
|
1475
|
-
}
|
|
1476
|
-
function
|
|
1477
|
-
const
|
|
1478
|
-
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${
|
|
1479
|
-
}
|
|
1480
|
-
const
|
|
1481
|
-
function
|
|
1482
|
-
const
|
|
1483
|
-
if (!
|
|
1461
|
+
return s.replace("{{date}}", Ft(n, t)).replace("{{time}}", tn(r, t));
|
|
1462
|
+
}, Wo = {
|
|
1463
|
+
p: tn,
|
|
1464
|
+
P: Oo
|
|
1465
|
+
}, So = /^D+$/, Co = /^Y+$/, xo = ["D", "DD", "YY", "YYYY"];
|
|
1466
|
+
function No(e) {
|
|
1467
|
+
return So.test(e);
|
|
1468
|
+
}
|
|
1469
|
+
function Po(e) {
|
|
1470
|
+
return Co.test(e);
|
|
1471
|
+
}
|
|
1472
|
+
function To(e, t, o) {
|
|
1473
|
+
const n = Yo(e, t, o);
|
|
1474
|
+
if (console.warn(n), xo.includes(e)) throw new RangeError(n);
|
|
1475
|
+
}
|
|
1476
|
+
function Yo(e, t, o) {
|
|
1477
|
+
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
1478
|
+
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1479
|
+
}
|
|
1480
|
+
const Eo = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, _o = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Fo = /^'([^]*?)'?$/, Bo = /''/g, Io = /[a-zA-Z]/;
|
|
1481
|
+
function jo(e, t, o) {
|
|
1482
|
+
const n = He(), r = o?.locale ?? n.locale ?? vt, s = o?.firstWeekContainsDate ?? o?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = o?.weekStartsOn ?? o?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = E(e, o?.in);
|
|
1483
|
+
if (!Bn(i))
|
|
1484
1484
|
throw new RangeError("Invalid time value");
|
|
1485
|
-
let c = t.match(
|
|
1485
|
+
let c = t.match(_o).map((l) => {
|
|
1486
1486
|
const u = l[0];
|
|
1487
1487
|
if (u === "p" || u === "P") {
|
|
1488
|
-
const f =
|
|
1488
|
+
const f = Wo[u];
|
|
1489
1489
|
return f(l, r.formatLong);
|
|
1490
1490
|
}
|
|
1491
1491
|
return l;
|
|
1492
|
-
}).join("").match(
|
|
1492
|
+
}).join("").match(Eo).map((l) => {
|
|
1493
1493
|
if (l === "''")
|
|
1494
1494
|
return { isToken: !1, value: "'" };
|
|
1495
1495
|
const u = l[0];
|
|
1496
1496
|
if (u === "'")
|
|
1497
|
-
return { isToken: !1, value:
|
|
1498
|
-
if (
|
|
1497
|
+
return { isToken: !1, value: Ao(l) };
|
|
1498
|
+
if (Yt[u])
|
|
1499
1499
|
return { isToken: !0, value: l };
|
|
1500
|
-
if (u.match(
|
|
1500
|
+
if (u.match(Io))
|
|
1501
1501
|
throw new RangeError(
|
|
1502
1502
|
"Format string contains an unescaped latin alphabet character `" + u + "`"
|
|
1503
1503
|
);
|
|
1504
1504
|
return { isToken: !1, value: l };
|
|
1505
1505
|
});
|
|
1506
|
-
r.localize.preprocessor && (c = r.localize.preprocessor(
|
|
1506
|
+
r.localize.preprocessor && (c = r.localize.preprocessor(i, c));
|
|
1507
1507
|
const d = {
|
|
1508
|
-
firstWeekContainsDate:
|
|
1509
|
-
weekStartsOn:
|
|
1508
|
+
firstWeekContainsDate: s,
|
|
1509
|
+
weekStartsOn: a,
|
|
1510
1510
|
locale: r
|
|
1511
1511
|
};
|
|
1512
1512
|
return c.map((l) => {
|
|
1513
1513
|
if (!l.isToken) return l.value;
|
|
1514
1514
|
const u = l.value;
|
|
1515
|
-
(!
|
|
1516
|
-
const f =
|
|
1517
|
-
return f(
|
|
1515
|
+
(!o?.useAdditionalWeekYearTokens && Po(u) || !o?.useAdditionalDayOfYearTokens && No(u)) && To(u, t, String(e));
|
|
1516
|
+
const f = Yt[u[0]];
|
|
1517
|
+
return f(i, u, r.localize, d);
|
|
1518
1518
|
}).join("");
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const t = e.match(
|
|
1522
|
-
return t ? t[1].replace(
|
|
1520
|
+
function Ao(e) {
|
|
1521
|
+
const t = e.match(Fo);
|
|
1522
|
+
return t ? t[1].replace(Bo, "'") : e;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1525
|
-
const
|
|
1526
|
-
return
|
|
1524
|
+
function Ho(e, t) {
|
|
1525
|
+
const o = E(e, t?.in), n = o.getFullYear(), r = o.getMonth(), s = H(o, 0);
|
|
1526
|
+
return s.setFullYear(n, r + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return
|
|
1528
|
+
function $o(e, t) {
|
|
1529
|
+
return E(e, t?.in).getMonth();
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1532
|
-
return
|
|
1531
|
+
function qo(e, t) {
|
|
1532
|
+
return E(e, t?.in).getFullYear();
|
|
1533
1533
|
}
|
|
1534
|
-
function
|
|
1535
|
-
return +
|
|
1534
|
+
function Ro(e, t) {
|
|
1535
|
+
return +E(e) > +E(t);
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
return +
|
|
1537
|
+
function Lo(e, t) {
|
|
1538
|
+
return +E(e) < +E(t);
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1541
|
-
const [
|
|
1542
|
-
|
|
1540
|
+
function zo(e, t, o) {
|
|
1541
|
+
const [n, r] = Te(
|
|
1542
|
+
o?.in,
|
|
1543
1543
|
e,
|
|
1544
1544
|
t
|
|
1545
1545
|
);
|
|
1546
|
-
return
|
|
1546
|
+
return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1549
|
-
const [
|
|
1550
|
-
|
|
1548
|
+
function Go(e, t, o) {
|
|
1549
|
+
const [n, r] = Te(
|
|
1550
|
+
o?.in,
|
|
1551
1551
|
e,
|
|
1552
1552
|
t
|
|
1553
1553
|
);
|
|
1554
|
-
return
|
|
1554
|
+
return n.getFullYear() === r.getFullYear();
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1559
|
-
const
|
|
1560
|
-
return
|
|
1556
|
+
function Vo(e, t, o) {
|
|
1557
|
+
const n = E(e, o?.in), r = n.getFullYear(), s = n.getDate(), a = H(e, 0);
|
|
1558
|
+
a.setFullYear(r, t, 15), a.setHours(0, 0, 0, 0);
|
|
1559
|
+
const i = Ho(a);
|
|
1560
|
+
return n.setMonth(t, Math.min(s, i)), n;
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1563
|
-
const
|
|
1564
|
-
return isNaN(+
|
|
1562
|
+
function Xo(e, t, o) {
|
|
1563
|
+
const n = E(e, o?.in);
|
|
1564
|
+
return isNaN(+n) ? H(e, NaN) : (n.setFullYear(t), n);
|
|
1565
1565
|
}
|
|
1566
|
-
const
|
|
1567
|
-
function
|
|
1568
|
-
const
|
|
1569
|
-
return t.getMonth(e) === t.getMonth(
|
|
1566
|
+
const Bt = 5, Qo = 4;
|
|
1567
|
+
function Uo(e, t) {
|
|
1568
|
+
const o = t.startOfMonth(e), n = o.getDay() > 0 ? o.getDay() : 7, r = t.addDays(e, -n + 1), s = t.addDays(r, Bt * 7 - 1);
|
|
1569
|
+
return t.getMonth(e) === t.getMonth(s) ? Bt : Qo;
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1572
|
-
const
|
|
1573
|
-
return
|
|
1571
|
+
function nn(e, t) {
|
|
1572
|
+
const o = t.startOfMonth(e), n = o.getDay();
|
|
1573
|
+
return n === 1 ? o : n === 0 ? t.addDays(o, -6) : t.addDays(o, -1 * (n - 1));
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1576
|
-
const
|
|
1577
|
-
return t.addDays(
|
|
1575
|
+
function Zo(e, t) {
|
|
1576
|
+
const o = nn(e, t), n = Uo(e, t);
|
|
1577
|
+
return t.addDays(o, n * 7 - 1);
|
|
1578
1578
|
}
|
|
1579
|
-
class
|
|
1579
|
+
class U {
|
|
1580
1580
|
/**
|
|
1581
1581
|
* Creates an instance of `DateLib`.
|
|
1582
1582
|
*
|
|
1583
1583
|
* @param options Configuration options for the date library.
|
|
1584
1584
|
* @param overrides Custom overrides for the date library functions.
|
|
1585
1585
|
*/
|
|
1586
|
-
constructor(t,
|
|
1587
|
-
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ?
|
|
1588
|
-
const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(
|
|
1589
|
-
if (
|
|
1586
|
+
constructor(t, o) {
|
|
1587
|
+
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? de.tz(this.options.timeZone) : new this.Date(), this.newDate = (n, r, s) => this.overrides?.newDate ? this.overrides.newDate(n, r, s) : this.options.timeZone ? new de(n, r, s, this.options.timeZone) : new Date(n, r, s), this.addDays = (n, r) => this.overrides?.addDays ? this.overrides.addDays(n, r) : Rt(n, r), this.addMonths = (n, r) => this.overrides?.addMonths ? this.overrides.addMonths(n, r) : Lt(n, r), this.addWeeks = (n, r) => this.overrides?.addWeeks ? this.overrides.addWeeks(n, r) : Tn(n, r), this.addYears = (n, r) => this.overrides?.addYears ? this.overrides.addYears(n, r) : Yn(n, r), this.differenceInCalendarDays = (n, r) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(n, r) : Gt(n, r), this.differenceInCalendarMonths = (n, r) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(n, r) : In(n, r), this.eachMonthOfInterval = (n) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(n) : An(n), this.eachYearOfInterval = (n) => {
|
|
1588
|
+
const r = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(n) : qn(n), s = new Set(r.map((i) => this.getYear(i)));
|
|
1589
|
+
if (s.size === r.length)
|
|
1590
1590
|
return r;
|
|
1591
|
-
const
|
|
1592
|
-
return
|
|
1593
|
-
|
|
1594
|
-
}),
|
|
1595
|
-
}, this.endOfBroadcastWeek = (
|
|
1596
|
-
const
|
|
1597
|
-
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(
|
|
1598
|
-
}, this.getISOWeek = (
|
|
1591
|
+
const a = [];
|
|
1592
|
+
return s.forEach((i) => {
|
|
1593
|
+
a.push(new Date(i, 0, 1));
|
|
1594
|
+
}), a;
|
|
1595
|
+
}, this.endOfBroadcastWeek = (n) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(n) : Zo(n, this), this.endOfISOWeek = (n) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(n) : Rn(n), this.endOfMonth = (n) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(n) : jn(n), this.endOfWeek = (n, r) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(n, r) : Ut(n, this.options), this.endOfYear = (n) => this.overrides?.endOfYear ? this.overrides.endOfYear(n) : $n(n), this.format = (n, r, s) => {
|
|
1596
|
+
const a = this.overrides?.format ? this.overrides.format(n, r, this.options) : jo(n, r, this.options);
|
|
1597
|
+
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(a) : a;
|
|
1598
|
+
}, this.getISOWeek = (n) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(n) : Kt(n), this.getMonth = (n, r) => this.overrides?.getMonth ? this.overrides.getMonth(n, this.options) : $o(n, this.options), this.getYear = (n, r) => this.overrides?.getYear ? this.overrides.getYear(n, this.options) : qo(n, this.options), this.getWeek = (n, r) => this.overrides?.getWeek ? this.overrides.getWeek(n, this.options) : en(n, this.options), this.isAfter = (n, r) => this.overrides?.isAfter ? this.overrides.isAfter(n, r) : Ro(n, r), this.isBefore = (n, r) => this.overrides?.isBefore ? this.overrides.isBefore(n, r) : Lo(n, r), this.isDate = (n) => this.overrides?.isDate ? this.overrides.isDate(n) : Vt(n), this.isSameDay = (n, r) => this.overrides?.isSameDay ? this.overrides.isSameDay(n, r) : Fn(n, r), this.isSameMonth = (n, r) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(n, r) : zo(n, r), this.isSameYear = (n, r) => this.overrides?.isSameYear ? this.overrides.isSameYear(n, r) : Go(n, r), this.max = (n) => this.overrides?.max ? this.overrides.max(n) : En(n), this.min = (n) => this.overrides?.min ? this.overrides.min(n) : _n(n), this.setMonth = (n, r) => this.overrides?.setMonth ? this.overrides.setMonth(n, r) : Vo(n, r), this.setYear = (n, r) => this.overrides?.setYear ? this.overrides.setYear(n, r) : Xo(n, r), this.startOfBroadcastWeek = (n, r) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(n, this) : nn(n, this), this.startOfDay = (n) => this.overrides?.startOfDay ? this.overrides.startOfDay(n) : Ae(n), this.startOfISOWeek = (n) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(n) : je(n), this.startOfMonth = (n) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(n) : Hn(n), this.startOfWeek = (n, r) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(n, this.options) : Pe(n, this.options), this.startOfYear = (n) => this.overrides?.startOfYear ? this.overrides.startOfYear(n) : Qt(n), this.options = { locale: vt, ...t }, this.overrides = o;
|
|
1599
1599
|
}
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -1605,12 +1605,12 @@ class K {
|
|
|
1605
1605
|
* @returns A record mapping Arabic digits to the target numerals.
|
|
1606
1606
|
*/
|
|
1607
1607
|
getDigitMap() {
|
|
1608
|
-
const { numerals: t = "latn" } = this.options,
|
|
1608
|
+
const { numerals: t = "latn" } = this.options, o = new Intl.NumberFormat("en-US", {
|
|
1609
1609
|
numberingSystem: t
|
|
1610
|
-
}),
|
|
1610
|
+
}), n = {};
|
|
1611
1611
|
for (let r = 0; r < 10; r++)
|
|
1612
|
-
|
|
1613
|
-
return
|
|
1612
|
+
n[r.toString()] = o.format(r);
|
|
1613
|
+
return n;
|
|
1614
1614
|
}
|
|
1615
1615
|
/**
|
|
1616
1616
|
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
@@ -1620,8 +1620,8 @@ class K {
|
|
|
1620
1620
|
* @returns The string with digits replaced.
|
|
1621
1621
|
*/
|
|
1622
1622
|
replaceDigits(t) {
|
|
1623
|
-
const
|
|
1624
|
-
return t.replace(/\d/g, (
|
|
1623
|
+
const o = this.getDigitMap();
|
|
1624
|
+
return t.replace(/\d/g, (n) => o[n] || n);
|
|
1625
1625
|
}
|
|
1626
1626
|
/**
|
|
1627
1627
|
* Formats a number using the configured numbering system.
|
|
@@ -1639,7 +1639,7 @@ class K {
|
|
|
1639
1639
|
*/
|
|
1640
1640
|
getMonthYearOrder() {
|
|
1641
1641
|
const t = this.options.locale?.code;
|
|
1642
|
-
return t &&
|
|
1642
|
+
return t && U.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
1643
1643
|
}
|
|
1644
1644
|
/**
|
|
1645
1645
|
* Formats the month/year pair respecting locale conventions.
|
|
@@ -1647,22 +1647,22 @@ class K {
|
|
|
1647
1647
|
* @since 9.11.0
|
|
1648
1648
|
*/
|
|
1649
1649
|
formatMonthYear(t) {
|
|
1650
|
-
const { locale:
|
|
1651
|
-
if (
|
|
1650
|
+
const { locale: o, timeZone: n, numerals: r } = this.options, s = o?.code;
|
|
1651
|
+
if (s && U.yearFirstLocales.has(s))
|
|
1652
1652
|
try {
|
|
1653
|
-
return new Intl.DateTimeFormat(
|
|
1653
|
+
return new Intl.DateTimeFormat(s, {
|
|
1654
1654
|
month: "long",
|
|
1655
1655
|
year: "numeric",
|
|
1656
|
-
timeZone:
|
|
1656
|
+
timeZone: n,
|
|
1657
1657
|
numberingSystem: r
|
|
1658
1658
|
}).format(t);
|
|
1659
1659
|
} catch {
|
|
1660
1660
|
}
|
|
1661
|
-
const
|
|
1662
|
-
return this.format(t,
|
|
1661
|
+
const a = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
1662
|
+
return this.format(t, a);
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
|
|
1665
|
+
U.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
1666
1666
|
"eu",
|
|
1667
1667
|
"hu",
|
|
1668
1668
|
"ja",
|
|
@@ -1681,10 +1681,10 @@ K.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
1681
1681
|
"zh-HK",
|
|
1682
1682
|
"zh-TW"
|
|
1683
1683
|
]);
|
|
1684
|
-
const
|
|
1685
|
-
class
|
|
1686
|
-
constructor(t,
|
|
1687
|
-
this.date = t, this.displayMonth =
|
|
1684
|
+
const ie = new U();
|
|
1685
|
+
class on {
|
|
1686
|
+
constructor(t, o, n = ie) {
|
|
1687
|
+
this.date = t, this.displayMonth = o, this.outside = !!(o && !n.isSameMonth(t, o)), this.dateLib = n, this.isoDate = n.format(t, "yyyy-MM-dd"), this.displayMonthId = n.format(o, "yyyy-MM"), this.dateMonthId = n.format(t, "yyyy-MM");
|
|
1688
1688
|
}
|
|
1689
1689
|
/**
|
|
1690
1690
|
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
@@ -1697,293 +1697,293 @@ class Qt {
|
|
|
1697
1697
|
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
class
|
|
1701
|
-
constructor(t,
|
|
1702
|
-
this.date = t, this.weeks =
|
|
1700
|
+
class Ko {
|
|
1701
|
+
constructor(t, o) {
|
|
1702
|
+
this.date = t, this.weeks = o;
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
class
|
|
1706
|
-
constructor(t,
|
|
1707
|
-
this.days =
|
|
1705
|
+
class Jo {
|
|
1706
|
+
constructor(t, o) {
|
|
1707
|
+
this.days = o, this.weekNumber = t;
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1711
|
-
return
|
|
1710
|
+
function er(e) {
|
|
1711
|
+
return h.createElement("button", { ...e });
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1714
|
-
return
|
|
1713
|
+
function tr(e) {
|
|
1714
|
+
return h.createElement("span", { ...e });
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1717
|
-
const { size: t = 24, orientation:
|
|
1716
|
+
function nr(e) {
|
|
1717
|
+
const { size: t = 24, orientation: o = "left", className: n } = e;
|
|
1718
1718
|
return (
|
|
1719
1719
|
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
1720
|
-
|
|
1720
|
+
h.createElement(
|
|
1721
1721
|
"svg",
|
|
1722
|
-
{ className:
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1722
|
+
{ className: n, width: t, height: t, viewBox: "0 0 24 24" },
|
|
1723
|
+
o === "up" && h.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
1724
|
+
o === "down" && h.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
1725
|
+
o === "left" && h.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
1726
|
+
o === "right" && h.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
1727
1727
|
)
|
|
1728
1728
|
);
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const { day: t, modifiers:
|
|
1732
|
-
return
|
|
1730
|
+
function or(e) {
|
|
1731
|
+
const { day: t, modifiers: o, ...n } = e;
|
|
1732
|
+
return h.createElement("td", { ...n });
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const { day: t, modifiers:
|
|
1736
|
-
return
|
|
1737
|
-
|
|
1738
|
-
}, [
|
|
1734
|
+
function rr(e) {
|
|
1735
|
+
const { day: t, modifiers: o, ...n } = e, r = h.useRef(null);
|
|
1736
|
+
return h.useEffect(() => {
|
|
1737
|
+
o.focused && r.current?.focus();
|
|
1738
|
+
}, [o.focused]), h.createElement("button", { ref: r, ...n });
|
|
1739
1739
|
}
|
|
1740
1740
|
var g;
|
|
1741
1741
|
(function(e) {
|
|
1742
1742
|
e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown";
|
|
1743
1743
|
})(g || (g = {}));
|
|
1744
|
-
var
|
|
1744
|
+
var I;
|
|
1745
1745
|
(function(e) {
|
|
1746
1746
|
e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today";
|
|
1747
|
-
})(
|
|
1748
|
-
var
|
|
1747
|
+
})(I || (I = {}));
|
|
1748
|
+
var K;
|
|
1749
1749
|
(function(e) {
|
|
1750
1750
|
e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
|
|
1751
|
-
})(
|
|
1752
|
-
var
|
|
1751
|
+
})(K || (K = {}));
|
|
1752
|
+
var Q;
|
|
1753
1753
|
(function(e) {
|
|
1754
1754
|
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
1755
|
-
})(
|
|
1756
|
-
function
|
|
1757
|
-
const { options: t, className:
|
|
1758
|
-
return
|
|
1755
|
+
})(Q || (Q = {}));
|
|
1756
|
+
function ar(e) {
|
|
1757
|
+
const { options: t, className: o, components: n, classNames: r, ...s } = e, a = [r[g.Dropdown], o].join(" "), i = t?.find(({ value: c }) => c === s.value);
|
|
1758
|
+
return h.createElement(
|
|
1759
1759
|
"span",
|
|
1760
|
-
{ "data-disabled":
|
|
1761
|
-
|
|
1762
|
-
|
|
1760
|
+
{ "data-disabled": s.disabled, className: r[g.DropdownRoot] },
|
|
1761
|
+
h.createElement(n.Select, { className: a, ...s }, t?.map(({ value: c, label: d, disabled: l }) => h.createElement(n.Option, { key: c, value: c, disabled: l }, d))),
|
|
1762
|
+
h.createElement(
|
|
1763
1763
|
"span",
|
|
1764
1764
|
{ className: r[g.CaptionLabel], "aria-hidden": !0 },
|
|
1765
|
-
|
|
1766
|
-
|
|
1765
|
+
i?.label,
|
|
1766
|
+
h.createElement(n.Chevron, { orientation: "down", size: 18, className: r[g.Chevron] })
|
|
1767
1767
|
)
|
|
1768
1768
|
);
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return
|
|
1770
|
+
function sr(e) {
|
|
1771
|
+
return h.createElement("div", { ...e });
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
1773
|
+
function ir(e) {
|
|
1774
|
+
return h.createElement("div", { ...e });
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1777
|
-
const { calendarMonth: t, displayIndex:
|
|
1778
|
-
return
|
|
1776
|
+
function cr(e) {
|
|
1777
|
+
const { calendarMonth: t, displayIndex: o, ...n } = e;
|
|
1778
|
+
return h.createElement("div", { ...n }, e.children);
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1781
|
-
const { calendarMonth: t, displayIndex:
|
|
1782
|
-
return
|
|
1780
|
+
function ur(e) {
|
|
1781
|
+
const { calendarMonth: t, displayIndex: o, ...n } = e;
|
|
1782
|
+
return h.createElement("div", { ...n });
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1785
|
-
return
|
|
1784
|
+
function dr(e) {
|
|
1785
|
+
return h.createElement("table", { ...e });
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1788
|
-
return
|
|
1787
|
+
function lr(e) {
|
|
1788
|
+
return h.createElement("div", { ...e });
|
|
1789
1789
|
}
|
|
1790
|
-
const
|
|
1790
|
+
const rn = pn(void 0);
|
|
1791
1791
|
function $e() {
|
|
1792
|
-
const e =
|
|
1792
|
+
const e = bn(rn);
|
|
1793
1793
|
if (e === void 0)
|
|
1794
1794
|
throw new Error("useDayPicker() must be used within a custom component.");
|
|
1795
1795
|
return e;
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1797
|
+
function fr(e) {
|
|
1798
1798
|
const { components: t } = $e();
|
|
1799
|
-
return
|
|
1799
|
+
return h.createElement(t.Dropdown, { ...e });
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1802
|
-
const { onPreviousClick: t, onNextClick:
|
|
1803
|
-
r &&
|
|
1804
|
-
}, [r,
|
|
1805
|
-
|
|
1806
|
-
}, [
|
|
1807
|
-
return
|
|
1801
|
+
function hr(e) {
|
|
1802
|
+
const { onPreviousClick: t, onNextClick: o, previousMonth: n, nextMonth: r, ...s } = e, { components: a, classNames: i, labels: { labelPrevious: c, labelNext: d } } = $e(), l = R((f) => {
|
|
1803
|
+
r && o?.(f);
|
|
1804
|
+
}, [r, o]), u = R((f) => {
|
|
1805
|
+
n && t?.(f);
|
|
1806
|
+
}, [n, t]);
|
|
1807
|
+
return h.createElement(
|
|
1808
1808
|
"nav",
|
|
1809
|
-
{ ...
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
{ type: "button", className:
|
|
1813
|
-
|
|
1809
|
+
{ ...s },
|
|
1810
|
+
h.createElement(
|
|
1811
|
+
a.PreviousMonthButton,
|
|
1812
|
+
{ type: "button", className: i[g.PreviousMonthButton], tabIndex: n ? void 0 : -1, "aria-disabled": n ? void 0 : !0, "aria-label": c(n), onClick: u },
|
|
1813
|
+
h.createElement(a.Chevron, { disabled: n ? void 0 : !0, className: i[g.Chevron], orientation: "left" })
|
|
1814
1814
|
),
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
{ type: "button", className:
|
|
1818
|
-
|
|
1815
|
+
h.createElement(
|
|
1816
|
+
a.NextMonthButton,
|
|
1817
|
+
{ type: "button", className: i[g.NextMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": d(r), onClick: l },
|
|
1818
|
+
h.createElement(a.Chevron, { disabled: r ? void 0 : !0, orientation: "right", className: i[g.Chevron] })
|
|
1819
1819
|
)
|
|
1820
1820
|
);
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function mr(e) {
|
|
1823
1823
|
const { components: t } = $e();
|
|
1824
|
-
return
|
|
1824
|
+
return h.createElement(t.Button, { ...e });
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1827
|
-
return
|
|
1826
|
+
function yr(e) {
|
|
1827
|
+
return h.createElement("option", { ...e });
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function gr(e) {
|
|
1830
1830
|
const { components: t } = $e();
|
|
1831
|
-
return
|
|
1831
|
+
return h.createElement(t.Button, { ...e });
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1834
|
-
const { rootRef: t, ...
|
|
1835
|
-
return
|
|
1833
|
+
function pr(e) {
|
|
1834
|
+
const { rootRef: t, ...o } = e;
|
|
1835
|
+
return h.createElement("div", { ...o, ref: t });
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1838
|
-
return
|
|
1837
|
+
function br(e) {
|
|
1838
|
+
return h.createElement("select", { ...e });
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1841
|
-
const { week: t, ...
|
|
1842
|
-
return
|
|
1840
|
+
function wr(e) {
|
|
1841
|
+
const { week: t, ...o } = e;
|
|
1842
|
+
return h.createElement("tr", { ...o });
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return
|
|
1844
|
+
function Mr(e) {
|
|
1845
|
+
return h.createElement("th", { ...e });
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return
|
|
1847
|
+
function vr(e) {
|
|
1848
|
+
return h.createElement(
|
|
1849
1849
|
"thead",
|
|
1850
1850
|
{ "aria-hidden": !0 },
|
|
1851
|
-
|
|
1851
|
+
h.createElement("tr", { ...e })
|
|
1852
1852
|
);
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
const { week: t, ...
|
|
1856
|
-
return
|
|
1854
|
+
function Dr(e) {
|
|
1855
|
+
const { week: t, ...o } = e;
|
|
1856
|
+
return h.createElement("th", { ...o });
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1859
|
-
return
|
|
1858
|
+
function kr(e) {
|
|
1859
|
+
return h.createElement("th", { ...e });
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1862
|
-
return
|
|
1861
|
+
function Or(e) {
|
|
1862
|
+
return h.createElement("tbody", { ...e });
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1864
|
+
function Wr(e) {
|
|
1865
1865
|
const { components: t } = $e();
|
|
1866
|
-
return
|
|
1866
|
+
return h.createElement(t.Dropdown, { ...e });
|
|
1867
1867
|
}
|
|
1868
|
-
const
|
|
1868
|
+
const Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1869
1869
|
__proto__: null,
|
|
1870
|
-
Button:
|
|
1871
|
-
CaptionLabel:
|
|
1872
|
-
Chevron:
|
|
1873
|
-
Day:
|
|
1874
|
-
DayButton:
|
|
1875
|
-
Dropdown:
|
|
1876
|
-
DropdownNav:
|
|
1877
|
-
Footer:
|
|
1878
|
-
Month:
|
|
1879
|
-
MonthCaption:
|
|
1880
|
-
MonthGrid:
|
|
1881
|
-
Months:
|
|
1882
|
-
MonthsDropdown:
|
|
1883
|
-
Nav:
|
|
1884
|
-
NextMonthButton:
|
|
1885
|
-
Option:
|
|
1886
|
-
PreviousMonthButton:
|
|
1887
|
-
Root:
|
|
1888
|
-
Select:
|
|
1889
|
-
Week:
|
|
1890
|
-
WeekNumber:
|
|
1891
|
-
WeekNumberHeader:
|
|
1892
|
-
Weekday:
|
|
1893
|
-
Weekdays:
|
|
1894
|
-
Weeks:
|
|
1895
|
-
YearsDropdown:
|
|
1870
|
+
Button: er,
|
|
1871
|
+
CaptionLabel: tr,
|
|
1872
|
+
Chevron: nr,
|
|
1873
|
+
Day: or,
|
|
1874
|
+
DayButton: rr,
|
|
1875
|
+
Dropdown: ar,
|
|
1876
|
+
DropdownNav: sr,
|
|
1877
|
+
Footer: ir,
|
|
1878
|
+
Month: cr,
|
|
1879
|
+
MonthCaption: ur,
|
|
1880
|
+
MonthGrid: dr,
|
|
1881
|
+
Months: lr,
|
|
1882
|
+
MonthsDropdown: fr,
|
|
1883
|
+
Nav: hr,
|
|
1884
|
+
NextMonthButton: mr,
|
|
1885
|
+
Option: yr,
|
|
1886
|
+
PreviousMonthButton: gr,
|
|
1887
|
+
Root: pr,
|
|
1888
|
+
Select: br,
|
|
1889
|
+
Week: wr,
|
|
1890
|
+
WeekNumber: Dr,
|
|
1891
|
+
WeekNumberHeader: kr,
|
|
1892
|
+
Weekday: Mr,
|
|
1893
|
+
Weekdays: vr,
|
|
1894
|
+
Weeks: Or,
|
|
1895
|
+
YearsDropdown: Wr
|
|
1896
1896
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1897
|
-
function
|
|
1898
|
-
let { from: r, to:
|
|
1899
|
-
const { differenceInCalendarDays:
|
|
1900
|
-
return r &&
|
|
1897
|
+
function le(e, t, o = !1, n = ie) {
|
|
1898
|
+
let { from: r, to: s } = e;
|
|
1899
|
+
const { differenceInCalendarDays: a, isSameDay: i } = n;
|
|
1900
|
+
return r && s ? (a(s, r) < 0 && ([r, s] = [s, r]), a(t, r) >= (o ? 1 : 0) && a(s, t) >= (o ? 1 : 0)) : !o && s ? i(s, t) : !o && r ? i(r, t) : !1;
|
|
1901
1901
|
}
|
|
1902
|
-
function
|
|
1902
|
+
function Dt(e) {
|
|
1903
1903
|
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function ot(e) {
|
|
1906
1906
|
return !!(e && typeof e == "object" && "from" in e);
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function kt(e) {
|
|
1909
1909
|
return !!(e && typeof e == "object" && "after" in e);
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1911
|
+
function Ot(e) {
|
|
1912
1912
|
return !!(e && typeof e == "object" && "before" in e);
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function an(e) {
|
|
1915
1915
|
return !!(e && typeof e == "object" && "dayOfWeek" in e);
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function sn(e, t) {
|
|
1918
1918
|
return Array.isArray(e) && e.every(t.isDate);
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1921
|
-
const
|
|
1922
|
-
return
|
|
1923
|
-
if (typeof
|
|
1924
|
-
return
|
|
1925
|
-
if (
|
|
1926
|
-
return r(e,
|
|
1927
|
-
if (
|
|
1928
|
-
return
|
|
1929
|
-
if (
|
|
1930
|
-
return
|
|
1931
|
-
if (
|
|
1932
|
-
return Array.isArray(
|
|
1933
|
-
if (
|
|
1934
|
-
const c =
|
|
1935
|
-
return i
|
|
1920
|
+
function fe(e, t, o = ie) {
|
|
1921
|
+
const n = Array.isArray(t) ? t : [t], { isSameDay: r, differenceInCalendarDays: s, isAfter: a } = o;
|
|
1922
|
+
return n.some((i) => {
|
|
1923
|
+
if (typeof i == "boolean")
|
|
1924
|
+
return i;
|
|
1925
|
+
if (o.isDate(i))
|
|
1926
|
+
return r(e, i);
|
|
1927
|
+
if (sn(i, o))
|
|
1928
|
+
return i.includes(e);
|
|
1929
|
+
if (ot(i))
|
|
1930
|
+
return le(i, e, !1, o);
|
|
1931
|
+
if (an(i))
|
|
1932
|
+
return Array.isArray(i.dayOfWeek) ? i.dayOfWeek.includes(e.getDay()) : i.dayOfWeek === e.getDay();
|
|
1933
|
+
if (Dt(i)) {
|
|
1934
|
+
const c = s(i.before, e), d = s(i.after, e), l = c > 0, u = d < 0;
|
|
1935
|
+
return a(i.before, i.after) ? u && l : l || u;
|
|
1936
1936
|
}
|
|
1937
|
-
return
|
|
1937
|
+
return kt(i) ? s(e, i.after) > 0 : Ot(i) ? s(i.before, e) > 0 : typeof i == "function" ? i(e) : !1;
|
|
1938
1938
|
});
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1941
|
-
const { disabled:
|
|
1942
|
-
[
|
|
1943
|
-
[
|
|
1944
|
-
[
|
|
1945
|
-
[
|
|
1946
|
-
[
|
|
1947
|
-
},
|
|
1948
|
-
for (const
|
|
1949
|
-
const { date:
|
|
1950
|
-
!d && !c && x || d && c === !1 && x, $ = u(
|
|
1951
|
-
x && p.outside.push(
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1940
|
+
function Cr(e, t, o, n, r) {
|
|
1941
|
+
const { disabled: s, hidden: a, modifiers: i, showOutsideDays: c, broadcastCalendar: d, today: l = r.today() } = t, { isSameDay: u, isSameMonth: f, startOfMonth: w, isBefore: D, endOfMonth: S, isAfter: M } = r, k = o && w(o), y = n && S(n), p = {
|
|
1942
|
+
[I.focused]: [],
|
|
1943
|
+
[I.outside]: [],
|
|
1944
|
+
[I.disabled]: [],
|
|
1945
|
+
[I.hidden]: [],
|
|
1946
|
+
[I.today]: []
|
|
1947
|
+
}, v = {};
|
|
1948
|
+
for (const b of e) {
|
|
1949
|
+
const { date: m, displayMonth: C } = b, x = !!(C && !f(m, C)), B = !!(k && D(m, k)), F = !!(y && M(m, y)), A = !!(s && fe(m, s, r)), j = !!(a && fe(m, a, r)) || B || F || // Broadcast calendar will show outside days as default
|
|
1950
|
+
!d && !c && x || d && c === !1 && x, $ = u(m, l);
|
|
1951
|
+
x && p.outside.push(b), A && p.disabled.push(b), j && p.hidden.push(b), $ && p.today.push(b), i && Object.keys(i).forEach((J) => {
|
|
1952
|
+
const he = i?.[J];
|
|
1953
|
+
he && fe(m, he, r) && (v[J] ? v[J].push(b) : v[J] = [b]);
|
|
1954
1954
|
});
|
|
1955
1955
|
}
|
|
1956
|
-
return (
|
|
1957
|
-
const
|
|
1958
|
-
[
|
|
1959
|
-
[
|
|
1960
|
-
[
|
|
1961
|
-
[
|
|
1962
|
-
[
|
|
1963
|
-
},
|
|
1956
|
+
return (b) => {
|
|
1957
|
+
const m = {
|
|
1958
|
+
[I.focused]: !1,
|
|
1959
|
+
[I.disabled]: !1,
|
|
1960
|
+
[I.hidden]: !1,
|
|
1961
|
+
[I.outside]: !1,
|
|
1962
|
+
[I.today]: !1
|
|
1963
|
+
}, C = {};
|
|
1964
1964
|
for (const x in p) {
|
|
1965
|
-
const
|
|
1966
|
-
|
|
1965
|
+
const B = p[x];
|
|
1966
|
+
m[x] = B.some((F) => F === b);
|
|
1967
1967
|
}
|
|
1968
|
-
for (const x in
|
|
1969
|
-
|
|
1968
|
+
for (const x in v)
|
|
1969
|
+
C[x] = v[x].some((B) => B === b);
|
|
1970
1970
|
return {
|
|
1971
|
-
...
|
|
1971
|
+
...m,
|
|
1972
1972
|
// custom modifiers should override all the previous ones
|
|
1973
|
-
...
|
|
1973
|
+
...C
|
|
1974
1974
|
};
|
|
1975
1975
|
};
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1978
|
-
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [
|
|
1977
|
+
function xr(e, t, o = {}) {
|
|
1978
|
+
return Object.entries(e).filter(([, r]) => r === !0).reduce((r, [s]) => (o[s] ? r.push(o[s]) : t[I[s]] ? r.push(t[I[s]]) : t[K[s]] && r.push(t[K[s]]), r), [t[g.Day]]);
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function Nr(e) {
|
|
1981
1981
|
return {
|
|
1982
|
-
...
|
|
1982
|
+
...Sr,
|
|
1983
1983
|
...e
|
|
1984
1984
|
};
|
|
1985
1985
|
}
|
|
1986
|
-
function
|
|
1986
|
+
function Pr(e) {
|
|
1987
1987
|
const t = {
|
|
1988
1988
|
"data-mode": e.mode ?? void 0,
|
|
1989
1989
|
"data-required": "required" in e ? e.required : void 0,
|
|
@@ -1992,95 +1992,95 @@ function Sr(e) {
|
|
|
1992
1992
|
"data-broadcast-calendar": e.broadcastCalendar || void 0,
|
|
1993
1993
|
"data-nav-layout": e.navLayout || void 0
|
|
1994
1994
|
};
|
|
1995
|
-
return Object.entries(e).forEach(([
|
|
1996
|
-
|
|
1995
|
+
return Object.entries(e).forEach(([o, n]) => {
|
|
1996
|
+
o.startsWith("data-") && (t[o] = n);
|
|
1997
1997
|
}), t;
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function Tr() {
|
|
2000
2000
|
const e = {};
|
|
2001
2001
|
for (const t in g)
|
|
2002
2002
|
e[g[t]] = `rdp-${g[t]}`;
|
|
2003
|
-
for (const t in
|
|
2004
|
-
e[
|
|
2005
|
-
for (const t in
|
|
2006
|
-
e[
|
|
2007
|
-
for (const t in
|
|
2008
|
-
e[
|
|
2003
|
+
for (const t in I)
|
|
2004
|
+
e[I[t]] = `rdp-${I[t]}`;
|
|
2005
|
+
for (const t in K)
|
|
2006
|
+
e[K[t]] = `rdp-${K[t]}`;
|
|
2007
|
+
for (const t in Q)
|
|
2008
|
+
e[Q[t]] = `rdp-${Q[t]}`;
|
|
2009
2009
|
return e;
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2012
|
-
return (
|
|
2011
|
+
function cn(e, t, o) {
|
|
2012
|
+
return (o ?? new U(t)).formatMonthYear(e);
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2015
|
-
function
|
|
2016
|
-
return (
|
|
2014
|
+
const Yr = cn;
|
|
2015
|
+
function Er(e, t, o) {
|
|
2016
|
+
return (o ?? new U(t)).format(e, "d");
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2018
|
+
function _r(e, t = ie) {
|
|
2019
2019
|
return t.format(e, "LLLL");
|
|
2020
2020
|
}
|
|
2021
|
-
function
|
|
2022
|
-
return (
|
|
2021
|
+
function Fr(e, t, o) {
|
|
2022
|
+
return (o ?? new U(t)).format(e, "cccccc");
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function Br(e, t = ie) {
|
|
2025
2025
|
return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function Ir() {
|
|
2028
2028
|
return "";
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function un(e, t = ie) {
|
|
2031
2031
|
return t.format(e, "yyyy");
|
|
2032
2032
|
}
|
|
2033
|
-
const
|
|
2033
|
+
const jr = un, Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2034
2034
|
__proto__: null,
|
|
2035
|
-
formatCaption:
|
|
2036
|
-
formatDay:
|
|
2037
|
-
formatMonthCaption:
|
|
2038
|
-
formatMonthDropdown:
|
|
2039
|
-
formatWeekNumber:
|
|
2040
|
-
formatWeekNumberHeader:
|
|
2041
|
-
formatWeekdayName:
|
|
2042
|
-
formatYearCaption:
|
|
2043
|
-
formatYearDropdown:
|
|
2035
|
+
formatCaption: cn,
|
|
2036
|
+
formatDay: Er,
|
|
2037
|
+
formatMonthCaption: Yr,
|
|
2038
|
+
formatMonthDropdown: _r,
|
|
2039
|
+
formatWeekNumber: Br,
|
|
2040
|
+
formatWeekNumberHeader: Ir,
|
|
2041
|
+
formatWeekdayName: Fr,
|
|
2042
|
+
formatYearCaption: jr,
|
|
2043
|
+
formatYearDropdown: un
|
|
2044
2044
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2045
|
-
function
|
|
2045
|
+
function Hr(e) {
|
|
2046
2046
|
return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
|
|
2047
|
-
...
|
|
2047
|
+
...Ar,
|
|
2048
2048
|
...e
|
|
2049
2049
|
};
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2052
|
-
const { startOfMonth:
|
|
2051
|
+
function $r(e, t, o, n, r) {
|
|
2052
|
+
const { startOfMonth: s, startOfYear: a, endOfYear: i, eachMonthOfInterval: c, getMonth: d } = r;
|
|
2053
2053
|
return c({
|
|
2054
|
-
start:
|
|
2055
|
-
end:
|
|
2054
|
+
start: a(e),
|
|
2055
|
+
end: i(e)
|
|
2056
2056
|
}).map((f) => {
|
|
2057
|
-
const w =
|
|
2058
|
-
return { value: D, label: w, disabled:
|
|
2057
|
+
const w = n.formatMonthDropdown(f, r), D = d(f), S = t && f < s(t) || o && f > s(o) || !1;
|
|
2058
|
+
return { value: D, label: w, disabled: S };
|
|
2059
2059
|
});
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2062
|
-
let
|
|
2061
|
+
function qr(e, t = {}, o = {}) {
|
|
2062
|
+
let n = { ...t?.[g.Day] };
|
|
2063
2063
|
return Object.entries(e).filter(([, r]) => r === !0).forEach(([r]) => {
|
|
2064
|
-
|
|
2065
|
-
...
|
|
2066
|
-
...
|
|
2064
|
+
n = {
|
|
2065
|
+
...n,
|
|
2066
|
+
...o?.[r]
|
|
2067
2067
|
};
|
|
2068
|
-
}),
|
|
2068
|
+
}), n;
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2071
|
-
const
|
|
2070
|
+
function Rr(e, t, o, n) {
|
|
2071
|
+
const r = n ?? e.today(), s = o ? e.startOfBroadcastWeek(r, e) : t ? e.startOfISOWeek(r) : e.startOfWeek(r), a = [];
|
|
2072
2072
|
for (let i = 0; i < 7; i++) {
|
|
2073
|
-
const
|
|
2074
|
-
a.push(
|
|
2073
|
+
const c = e.addDays(s, i);
|
|
2074
|
+
a.push(c);
|
|
2075
2075
|
}
|
|
2076
2076
|
return a;
|
|
2077
2077
|
}
|
|
2078
|
-
function
|
|
2078
|
+
function Lr(e, t, o, n, r = !1) {
|
|
2079
2079
|
if (!e || !t)
|
|
2080
2080
|
return;
|
|
2081
|
-
const { startOfYear:
|
|
2081
|
+
const { startOfYear: s, endOfYear: a, eachYearOfInterval: i, getYear: c } = n, d = s(e), l = a(t), u = i({ start: d, end: l });
|
|
2082
2082
|
return r && u.reverse(), u.map((f) => {
|
|
2083
|
-
const w =
|
|
2083
|
+
const w = o.formatYearDropdown(f, n);
|
|
2084
2084
|
return {
|
|
2085
2085
|
value: c(f),
|
|
2086
2086
|
label: w,
|
|
@@ -2088,414 +2088,472 @@ function $r(e, t, n, o, r = !1) {
|
|
|
2088
2088
|
};
|
|
2089
2089
|
});
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2092
|
-
let r = (
|
|
2091
|
+
function dn(e, t, o, n) {
|
|
2092
|
+
let r = (n ?? new U(o)).format(e, "PPPP");
|
|
2093
2093
|
return t.today && (r = `Today, ${r}`), t.selected && (r = `${r}, selected`), r;
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2096
|
-
function
|
|
2097
|
-
return (
|
|
2095
|
+
const zr = dn;
|
|
2096
|
+
function ln(e, t, o) {
|
|
2097
|
+
return (o ?? new U(t)).formatMonthYear(e);
|
|
2098
2098
|
}
|
|
2099
|
-
const
|
|
2100
|
-
function
|
|
2101
|
-
let r = (
|
|
2099
|
+
const Gr = ln;
|
|
2100
|
+
function Vr(e, t, o, n) {
|
|
2101
|
+
let r = (n ?? new U(o)).format(e, "PPPP");
|
|
2102
2102
|
return t?.today && (r = `Today, ${r}`), r;
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2104
|
+
function Xr(e) {
|
|
2105
2105
|
return "Choose the Month";
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2107
|
+
function Qr() {
|
|
2108
2108
|
return "";
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function Ur(e) {
|
|
2111
2111
|
return "Go to the Next Month";
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function Zr(e) {
|
|
2114
2114
|
return "Go to the Previous Month";
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2117
|
-
return (
|
|
2116
|
+
function Kr(e, t, o) {
|
|
2117
|
+
return (o ?? new U(t)).format(e, "cccc");
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function Jr(e, t) {
|
|
2120
2120
|
return `Week ${e}`;
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function ea(e) {
|
|
2123
2123
|
return "Week Number";
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function ta(e) {
|
|
2126
2126
|
return "Choose the Year";
|
|
2127
2127
|
}
|
|
2128
|
-
const
|
|
2128
|
+
const na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2129
2129
|
__proto__: null,
|
|
2130
|
-
labelCaption:
|
|
2131
|
-
labelDay:
|
|
2132
|
-
labelDayButton:
|
|
2133
|
-
labelGrid:
|
|
2134
|
-
labelGridcell:
|
|
2135
|
-
labelMonthDropdown:
|
|
2136
|
-
labelNav:
|
|
2137
|
-
labelNext:
|
|
2138
|
-
labelPrevious:
|
|
2139
|
-
labelWeekNumber:
|
|
2140
|
-
labelWeekNumberHeader:
|
|
2141
|
-
labelWeekday:
|
|
2142
|
-
labelYearDropdown:
|
|
2143
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2130
|
+
labelCaption: Gr,
|
|
2131
|
+
labelDay: zr,
|
|
2132
|
+
labelDayButton: dn,
|
|
2133
|
+
labelGrid: ln,
|
|
2134
|
+
labelGridcell: Vr,
|
|
2135
|
+
labelMonthDropdown: Xr,
|
|
2136
|
+
labelNav: Qr,
|
|
2137
|
+
labelNext: Ur,
|
|
2138
|
+
labelPrevious: Zr,
|
|
2139
|
+
labelWeekNumber: Jr,
|
|
2140
|
+
labelWeekNumberHeader: ea,
|
|
2141
|
+
labelWeekday: Kr,
|
|
2142
|
+
labelYearDropdown: ta
|
|
2143
|
+
}, Symbol.toStringTag, { value: "Module" })), qe = (e) => e instanceof HTMLElement ? e : null, ht = (e) => [
|
|
2144
2144
|
...e.querySelectorAll("[data-animated-month]") ?? []
|
|
2145
|
-
],
|
|
2146
|
-
function
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2149
|
-
const d =
|
|
2150
|
-
if (
|
|
2145
|
+
], oa = (e) => qe(e.querySelector("[data-animated-month]")), mt = (e) => qe(e.querySelector("[data-animated-caption]")), yt = (e) => qe(e.querySelector("[data-animated-weeks]")), ra = (e) => qe(e.querySelector("[data-animated-nav]")), aa = (e) => qe(e.querySelector("[data-animated-weekdays]"));
|
|
2146
|
+
function sa(e, t, { classNames: o, months: n, focused: r, dateLib: s }) {
|
|
2147
|
+
const a = xe(null), i = xe(n), c = xe(!1);
|
|
2148
|
+
wn(() => {
|
|
2149
|
+
const d = i.current;
|
|
2150
|
+
if (i.current = n, !t || !e.current || // safety check because the ref can be set to anything by consumers
|
|
2151
2151
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2152
|
-
|
|
2152
|
+
n.length === 0 || d.length === 0 || n.length !== d.length)
|
|
2153
2153
|
return;
|
|
2154
|
-
const l =
|
|
2155
|
-
if (
|
|
2154
|
+
const l = s.isSameMonth(n[0].date, d[0].date), u = s.isAfter(n[0].date, d[0].date), f = u ? o[Q.caption_after_enter] : o[Q.caption_before_enter], w = u ? o[Q.weeks_after_enter] : o[Q.weeks_before_enter], D = a.current, S = e.current.cloneNode(!0);
|
|
2155
|
+
if (S instanceof HTMLElement ? (ht(S).forEach((p) => {
|
|
2156
2156
|
if (!(p instanceof HTMLElement))
|
|
2157
2157
|
return;
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2164
|
-
}),
|
|
2158
|
+
const v = oa(p);
|
|
2159
|
+
v && p.contains(v) && p.removeChild(v);
|
|
2160
|
+
const b = mt(p);
|
|
2161
|
+
b && b.classList.remove(f);
|
|
2162
|
+
const m = yt(p);
|
|
2163
|
+
m && m.classList.remove(w);
|
|
2164
|
+
}), a.current = S) : a.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2165
2165
|
r)
|
|
2166
2166
|
return;
|
|
2167
|
-
const
|
|
2168
|
-
if (
|
|
2167
|
+
const M = D instanceof HTMLElement ? ht(D) : [], k = ht(e.current);
|
|
2168
|
+
if (k?.every((y) => y instanceof HTMLElement) && M && M.every((y) => y instanceof HTMLElement)) {
|
|
2169
2169
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
2170
|
-
const y =
|
|
2171
|
-
y && (y.style.zIndex = "1"),
|
|
2172
|
-
const
|
|
2173
|
-
if (!
|
|
2170
|
+
const y = ra(e.current);
|
|
2171
|
+
y && (y.style.zIndex = "1"), k.forEach((p, v) => {
|
|
2172
|
+
const b = M[v];
|
|
2173
|
+
if (!b)
|
|
2174
2174
|
return;
|
|
2175
2175
|
p.style.position = "relative", p.style.overflow = "hidden";
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2176
|
+
const m = mt(p);
|
|
2177
|
+
m && m.classList.add(f);
|
|
2178
|
+
const C = yt(p);
|
|
2179
|
+
C && C.classList.add(w);
|
|
2180
2180
|
const x = () => {
|
|
2181
|
-
c.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""),
|
|
2181
|
+
c.current = !1, e.current && (e.current.style.isolation = ""), y && (y.style.zIndex = ""), m && m.classList.remove(f), C && C.classList.remove(w), p.style.position = "", p.style.overflow = "", p.contains(b) && p.removeChild(b);
|
|
2182
2182
|
};
|
|
2183
|
-
|
|
2184
|
-
const
|
|
2185
|
-
|
|
2186
|
-
const
|
|
2187
|
-
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2183
|
+
b.style.pointerEvents = "none", b.style.position = "absolute", b.style.overflow = "hidden", b.setAttribute("aria-hidden", "true");
|
|
2184
|
+
const B = aa(b);
|
|
2185
|
+
B && (B.style.opacity = "0");
|
|
2186
|
+
const F = mt(b);
|
|
2187
|
+
F && (F.classList.add(u ? o[Q.caption_before_exit] : o[Q.caption_after_exit]), F.addEventListener("animationend", x));
|
|
2188
|
+
const A = yt(b);
|
|
2189
|
+
A && A.classList.add(u ? o[Q.weeks_before_exit] : o[Q.weeks_after_exit]), p.insertBefore(b, p.firstChild);
|
|
2190
2190
|
});
|
|
2191
2191
|
}
|
|
2192
2192
|
});
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
const r = e[0],
|
|
2196
|
-
for (let
|
|
2197
|
-
const
|
|
2198
|
-
if (t &&
|
|
2194
|
+
function ia(e, t, o, n) {
|
|
2195
|
+
const r = e[0], s = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: c } = o ?? {}, { addDays: d, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: f, endOfISOWeek: w, endOfMonth: D, endOfWeek: S, isAfter: M, startOfBroadcastWeek: k, startOfISOWeek: y, startOfWeek: p } = n, v = c ? k(r, n) : a ? y(r) : p(r), b = c ? f(s) : a ? w(D(s)) : S(D(s)), m = l(b, v), C = u(s, r) + 1, x = [];
|
|
2196
|
+
for (let A = 0; A <= m; A++) {
|
|
2197
|
+
const j = d(v, A);
|
|
2198
|
+
if (t && M(j, t))
|
|
2199
2199
|
break;
|
|
2200
|
-
x.push(
|
|
2200
|
+
x.push(j);
|
|
2201
2201
|
}
|
|
2202
|
-
const
|
|
2203
|
-
if (
|
|
2204
|
-
const
|
|
2205
|
-
for (let
|
|
2202
|
+
const F = (c ? 35 : 42) * C;
|
|
2203
|
+
if (i && x.length < F) {
|
|
2204
|
+
const A = F - x.length;
|
|
2205
|
+
for (let j = 0; j < A; j++) {
|
|
2206
2206
|
const $ = d(x[x.length - 1], 1);
|
|
2207
2207
|
x.push($);
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
return x;
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function ca(e) {
|
|
2213
2213
|
const t = [];
|
|
2214
|
-
return e.reduce((
|
|
2215
|
-
const r =
|
|
2216
|
-
return
|
|
2214
|
+
return e.reduce((o, n) => {
|
|
2215
|
+
const r = n.weeks.reduce((s, a) => s.concat(a.days.slice()), t.slice());
|
|
2216
|
+
return o.concat(r.slice());
|
|
2217
2217
|
}, t.slice());
|
|
2218
2218
|
}
|
|
2219
|
-
function
|
|
2220
|
-
const { numberOfMonths: r = 1 } =
|
|
2221
|
-
for (let
|
|
2222
|
-
const
|
|
2223
|
-
if (t &&
|
|
2219
|
+
function ua(e, t, o, n) {
|
|
2220
|
+
const { numberOfMonths: r = 1 } = o, s = [];
|
|
2221
|
+
for (let a = 0; a < r; a++) {
|
|
2222
|
+
const i = n.addMonths(e, a);
|
|
2223
|
+
if (t && i > t)
|
|
2224
2224
|
break;
|
|
2225
|
-
|
|
2225
|
+
s.push(i);
|
|
2226
2226
|
}
|
|
2227
|
-
return
|
|
2228
|
-
}
|
|
2229
|
-
function
|
|
2230
|
-
const { month: r, defaultMonth:
|
|
2231
|
-
let c = r ||
|
|
2232
|
-
const { differenceInCalendarMonths: d, addMonths: l, startOfMonth: u } =
|
|
2233
|
-
if (
|
|
2234
|
-
const f = -1 * (
|
|
2235
|
-
c = l(
|
|
2227
|
+
return s;
|
|
2228
|
+
}
|
|
2229
|
+
function It(e, t, o, n) {
|
|
2230
|
+
const { month: r, defaultMonth: s, today: a = n.today(), numberOfMonths: i = 1 } = e;
|
|
2231
|
+
let c = r || s || a;
|
|
2232
|
+
const { differenceInCalendarMonths: d, addMonths: l, startOfMonth: u } = n;
|
|
2233
|
+
if (o && d(o, c) < i - 1) {
|
|
2234
|
+
const f = -1 * (i - 1);
|
|
2235
|
+
c = l(o, f);
|
|
2236
2236
|
}
|
|
2237
2237
|
return t && d(c, t) < 0 && (c = t), u(c);
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2240
|
-
const { addDays: r, endOfBroadcastWeek:
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2243
|
-
const
|
|
2244
|
-
const
|
|
2245
|
-
return x > y && x <= r(y,
|
|
2239
|
+
function da(e, t, o, n) {
|
|
2240
|
+
const { addDays: r, endOfBroadcastWeek: s, endOfISOWeek: a, endOfMonth: i, endOfWeek: c, getISOWeek: d, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: f, startOfWeek: w } = n, D = e.reduce((S, M) => {
|
|
2241
|
+
const k = o.broadcastCalendar ? u(M, n) : o.ISOWeek ? f(M) : w(M), y = o.broadcastCalendar ? s(M) : o.ISOWeek ? a(i(M)) : c(i(M)), p = t.filter((C) => C >= k && C <= y), v = o.broadcastCalendar ? 35 : 42;
|
|
2242
|
+
if (o.fixedWeeks && p.length < v) {
|
|
2243
|
+
const C = t.filter((x) => {
|
|
2244
|
+
const B = v - p.length;
|
|
2245
|
+
return x > y && x <= r(y, B);
|
|
2246
2246
|
});
|
|
2247
|
-
p.push(...
|
|
2247
|
+
p.push(...C);
|
|
2248
2248
|
}
|
|
2249
|
-
const
|
|
2250
|
-
const
|
|
2251
|
-
return
|
|
2252
|
-
}, []),
|
|
2253
|
-
return
|
|
2249
|
+
const b = p.reduce((C, x) => {
|
|
2250
|
+
const B = o.ISOWeek ? d(x) : l(x), F = C.find((j) => j.weekNumber === B), A = new on(x, M, n);
|
|
2251
|
+
return F ? F.days.push(A) : C.push(new Jo(B, [A])), C;
|
|
2252
|
+
}, []), m = new Ko(M, b);
|
|
2253
|
+
return S.push(m), S;
|
|
2254
2254
|
}, []);
|
|
2255
|
-
return
|
|
2256
|
-
}
|
|
2257
|
-
function
|
|
2258
|
-
let { startMonth:
|
|
2259
|
-
const { startOfYear: r, startOfDay:
|
|
2260
|
-
!
|
|
2261
|
-
const
|
|
2262
|
-
return
|
|
2263
|
-
|
|
2264
|
-
|
|
2255
|
+
return o.reverseMonths ? D.reverse() : D;
|
|
2256
|
+
}
|
|
2257
|
+
function la(e, t) {
|
|
2258
|
+
let { startMonth: o, endMonth: n } = e;
|
|
2259
|
+
const { startOfYear: r, startOfDay: s, startOfMonth: a, endOfMonth: i, addYears: c, endOfYear: d, newDate: l, today: u } = t, { fromYear: f, toYear: w, fromMonth: D, toMonth: S } = e;
|
|
2260
|
+
!o && D && (o = D), !o && f && (o = t.newDate(f, 0, 1)), !n && S && (n = S), !n && w && (n = l(w, 11, 31));
|
|
2261
|
+
const M = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2262
|
+
return o ? o = a(o) : f ? o = l(f, 0, 1) : !o && M && (o = r(c(e.today ?? u(), -100))), n ? n = i(n) : w ? n = l(w, 11, 31) : !n && M && (n = d(e.today ?? u())), [
|
|
2263
|
+
o && s(o),
|
|
2264
|
+
n && s(n)
|
|
2265
2265
|
];
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2268
|
-
if (
|
|
2267
|
+
function fa(e, t, o, n) {
|
|
2268
|
+
if (o.disableNavigation)
|
|
2269
2269
|
return;
|
|
2270
|
-
const { pagedNavigation: r, numberOfMonths:
|
|
2270
|
+
const { pagedNavigation: r, numberOfMonths: s = 1 } = o, { startOfMonth: a, addMonths: i, differenceInCalendarMonths: c } = n, d = r ? s : 1, l = a(e);
|
|
2271
2271
|
if (!t)
|
|
2272
|
-
return
|
|
2273
|
-
if (!(c(t, e) <
|
|
2274
|
-
return
|
|
2272
|
+
return i(l, d);
|
|
2273
|
+
if (!(c(t, e) < s))
|
|
2274
|
+
return i(l, d);
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2277
|
-
if (
|
|
2276
|
+
function ha(e, t, o, n) {
|
|
2277
|
+
if (o.disableNavigation)
|
|
2278
2278
|
return;
|
|
2279
|
-
const { pagedNavigation: r, numberOfMonths:
|
|
2279
|
+
const { pagedNavigation: r, numberOfMonths: s } = o, { startOfMonth: a, addMonths: i, differenceInCalendarMonths: c } = n, d = r ? s ?? 1 : 1, l = a(e);
|
|
2280
2280
|
if (!t)
|
|
2281
|
-
return
|
|
2281
|
+
return i(l, -d);
|
|
2282
2282
|
if (!(c(l, t) <= 0))
|
|
2283
|
-
return
|
|
2283
|
+
return i(l, -d);
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function ma(e) {
|
|
2286
2286
|
const t = [];
|
|
2287
|
-
return e.reduce((
|
|
2287
|
+
return e.reduce((o, n) => o.concat(n.weeks.slice()), t.slice());
|
|
2288
2288
|
}
|
|
2289
|
-
function
|
|
2290
|
-
const [
|
|
2291
|
-
return [t === void 0 ?
|
|
2289
|
+
function rt(e, t) {
|
|
2290
|
+
const [o, n] = ye(e);
|
|
2291
|
+
return [t === void 0 ? o : t, n];
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2294
|
-
const [
|
|
2295
|
-
|
|
2293
|
+
function ya(e, t) {
|
|
2294
|
+
const [o, n] = la(e, t), { startOfMonth: r, endOfMonth: s } = t, a = It(e, o, n, t), [i, c] = rt(
|
|
2295
|
+
a,
|
|
2296
2296
|
// initialMonth is always computed from props.month if provided
|
|
2297
|
-
e.month ?
|
|
2297
|
+
e.month ? a : void 0
|
|
2298
2298
|
);
|
|
2299
|
-
|
|
2300
|
-
const v =
|
|
2299
|
+
Fe(() => {
|
|
2300
|
+
const v = It(e, o, n, t);
|
|
2301
2301
|
c(v);
|
|
2302
2302
|
}, [e.timeZone]);
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2303
|
+
const { months: d, weeks: l, days: u, previousMonth: f, nextMonth: w } = se(() => {
|
|
2304
|
+
const v = ua(i, n, { numberOfMonths: e.numberOfMonths }, t), b = ia(v, e.endMonth ? s(e.endMonth) : void 0, {
|
|
2305
|
+
ISOWeek: e.ISOWeek,
|
|
2306
|
+
fixedWeeks: e.fixedWeeks,
|
|
2307
|
+
broadcastCalendar: e.broadcastCalendar
|
|
2308
|
+
}, t), m = da(v, b, {
|
|
2309
|
+
broadcastCalendar: e.broadcastCalendar,
|
|
2310
|
+
fixedWeeks: e.fixedWeeks,
|
|
2311
|
+
ISOWeek: e.ISOWeek,
|
|
2312
|
+
reverseMonths: e.reverseMonths
|
|
2313
|
+
}, t), C = ma(m), x = ca(m), B = ha(i, o, e, t), F = fa(i, n, e, t);
|
|
2314
|
+
return {
|
|
2315
|
+
months: m,
|
|
2316
|
+
weeks: C,
|
|
2317
|
+
days: x,
|
|
2318
|
+
previousMonth: B,
|
|
2319
|
+
nextMonth: F
|
|
2320
|
+
};
|
|
2321
|
+
}, [
|
|
2322
|
+
t,
|
|
2323
|
+
i.getTime(),
|
|
2324
|
+
n?.getTime(),
|
|
2325
|
+
o?.getTime(),
|
|
2326
|
+
e.disableNavigation,
|
|
2327
|
+
e.broadcastCalendar,
|
|
2328
|
+
e.endMonth?.getTime(),
|
|
2329
|
+
e.fixedWeeks,
|
|
2330
|
+
e.ISOWeek,
|
|
2331
|
+
e.numberOfMonths,
|
|
2332
|
+
e.pagedNavigation,
|
|
2333
|
+
e.reverseMonths
|
|
2334
|
+
]), { disableNavigation: D, onMonthChange: S } = e, M = (v) => l.some((b) => b.days.some((m) => m.isEqualTo(v))), k = (v) => {
|
|
2335
|
+
if (D)
|
|
2305
2336
|
return;
|
|
2306
|
-
let
|
|
2307
|
-
|
|
2337
|
+
let b = r(v);
|
|
2338
|
+
o && b < r(o) && (b = r(o)), n && b > r(n) && (b = r(n)), c(b), S?.(b);
|
|
2308
2339
|
};
|
|
2309
2340
|
return {
|
|
2310
|
-
months:
|
|
2311
|
-
weeks:
|
|
2312
|
-
days:
|
|
2313
|
-
navStart:
|
|
2314
|
-
navEnd:
|
|
2315
|
-
previousMonth:
|
|
2316
|
-
nextMonth:
|
|
2317
|
-
goToMonth:
|
|
2341
|
+
months: d,
|
|
2342
|
+
weeks: l,
|
|
2343
|
+
days: u,
|
|
2344
|
+
navStart: o,
|
|
2345
|
+
navEnd: n,
|
|
2346
|
+
previousMonth: f,
|
|
2347
|
+
nextMonth: w,
|
|
2348
|
+
goToMonth: k,
|
|
2318
2349
|
goToDay: (v) => {
|
|
2319
|
-
|
|
2350
|
+
M(v) || k(v.date);
|
|
2320
2351
|
}
|
|
2321
2352
|
};
|
|
2322
2353
|
}
|
|
2323
|
-
var
|
|
2354
|
+
var ne;
|
|
2324
2355
|
(function(e) {
|
|
2325
2356
|
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
2326
|
-
})(
|
|
2327
|
-
function
|
|
2328
|
-
return !e[
|
|
2329
|
-
}
|
|
2330
|
-
function
|
|
2331
|
-
let r,
|
|
2332
|
-
for (const
|
|
2333
|
-
const
|
|
2334
|
-
|
|
2357
|
+
})(ne || (ne = {}));
|
|
2358
|
+
function jt(e) {
|
|
2359
|
+
return !e[I.disabled] && !e[I.hidden] && !e[I.outside];
|
|
2360
|
+
}
|
|
2361
|
+
function ga(e, t, o, n) {
|
|
2362
|
+
let r, s = -1;
|
|
2363
|
+
for (const a of e) {
|
|
2364
|
+
const i = t(a);
|
|
2365
|
+
jt(i) && (i[I.focused] && s < ne.FocusedModifier ? (r = a, s = ne.FocusedModifier) : n?.isEqualTo(a) && s < ne.LastFocused ? (r = a, s = ne.LastFocused) : o(a.date) && s < ne.Selected ? (r = a, s = ne.Selected) : i[I.today] && s < ne.Today && (r = a, s = ne.Today));
|
|
2335
2366
|
}
|
|
2336
|
-
return r || (r = e.find((
|
|
2367
|
+
return r || (r = e.find((a) => jt(t(a)))), r;
|
|
2337
2368
|
}
|
|
2338
|
-
function
|
|
2339
|
-
const { ISOWeek:
|
|
2340
|
-
let
|
|
2369
|
+
function pa(e, t, o, n, r, s, a) {
|
|
2370
|
+
const { ISOWeek: i, broadcastCalendar: c } = s, { addDays: d, addMonths: l, addWeeks: u, addYears: f, endOfBroadcastWeek: w, endOfISOWeek: D, endOfWeek: S, max: M, min: k, startOfBroadcastWeek: y, startOfISOWeek: p, startOfWeek: v } = a;
|
|
2371
|
+
let m = {
|
|
2341
2372
|
day: d,
|
|
2342
2373
|
week: u,
|
|
2343
2374
|
month: l,
|
|
2344
2375
|
year: f,
|
|
2345
|
-
startOfWeek: (
|
|
2346
|
-
endOfWeek: (
|
|
2347
|
-
}[e](
|
|
2348
|
-
return t === "before" &&
|
|
2376
|
+
startOfWeek: (C) => c ? y(C, a) : i ? p(C) : v(C),
|
|
2377
|
+
endOfWeek: (C) => c ? w(C) : i ? D(C) : S(C)
|
|
2378
|
+
}[e](o, t === "after" ? 1 : -1);
|
|
2379
|
+
return t === "before" && n ? m = M([n, m]) : t === "after" && r && (m = k([r, m])), m;
|
|
2349
2380
|
}
|
|
2350
|
-
function
|
|
2351
|
-
if (
|
|
2381
|
+
function fn(e, t, o, n, r, s, a, i = 0) {
|
|
2382
|
+
if (i > 365)
|
|
2352
2383
|
return;
|
|
2353
|
-
const c =
|
|
2354
|
-
return !d && !l ? f :
|
|
2384
|
+
const c = pa(e, t, o.date, n, r, s, a), d = !!(s.disabled && fe(c, s.disabled, a)), l = !!(s.hidden && fe(c, s.hidden, a)), u = c, f = new on(c, u, a);
|
|
2385
|
+
return !d && !l ? f : fn(e, t, f, n, r, s, a, i + 1);
|
|
2355
2386
|
}
|
|
2356
|
-
function
|
|
2357
|
-
const { autoFocus:
|
|
2387
|
+
function ba(e, t, o, n, r) {
|
|
2388
|
+
const { autoFocus: s } = e, [a, i] = ye(), c = ga(t.days, o, n || (() => !1), a), [d, l] = ye(s ? c : void 0);
|
|
2358
2389
|
return {
|
|
2359
|
-
isFocusTarget: (
|
|
2390
|
+
isFocusTarget: (S) => !!c?.isEqualTo(S),
|
|
2360
2391
|
setFocused: l,
|
|
2361
2392
|
focused: d,
|
|
2362
2393
|
blur: () => {
|
|
2363
|
-
|
|
2394
|
+
i(d), l(void 0);
|
|
2364
2395
|
},
|
|
2365
|
-
moveFocus: (
|
|
2396
|
+
moveFocus: (S, M) => {
|
|
2366
2397
|
if (!d)
|
|
2367
2398
|
return;
|
|
2368
|
-
const
|
|
2369
|
-
|
|
2399
|
+
const k = fn(S, M, d, t.navStart, t.navEnd, e, r);
|
|
2400
|
+
k && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(k)) || (t.goToDay(k), l(k)));
|
|
2370
2401
|
}
|
|
2371
2402
|
};
|
|
2372
2403
|
}
|
|
2373
|
-
function
|
|
2374
|
-
const { selected:
|
|
2404
|
+
function wa(e, t) {
|
|
2405
|
+
const { selected: o, required: n, onSelect: r } = e, [s, a] = rt(o, r ? o : void 0), i = r ? o : s, { isSameDay: c } = t, d = (w) => i?.some((D) => c(D, w)) ?? !1, { min: l, max: u } = e;
|
|
2375
2406
|
return {
|
|
2376
|
-
selected:
|
|
2377
|
-
select: (w, D,
|
|
2378
|
-
let
|
|
2407
|
+
selected: i,
|
|
2408
|
+
select: (w, D, S) => {
|
|
2409
|
+
let M = [...i ?? []];
|
|
2379
2410
|
if (d(w)) {
|
|
2380
|
-
if (
|
|
2411
|
+
if (i?.length === l || n && i?.length === 1)
|
|
2381
2412
|
return;
|
|
2382
|
-
|
|
2413
|
+
M = i?.filter((k) => !c(k, w));
|
|
2383
2414
|
} else
|
|
2384
|
-
|
|
2385
|
-
return r ||
|
|
2415
|
+
i?.length === u ? M = [w] : M = [...M, w];
|
|
2416
|
+
return r || a(M), r?.(M, w, D, S), M;
|
|
2386
2417
|
},
|
|
2387
2418
|
isSelected: d
|
|
2388
2419
|
};
|
|
2389
2420
|
}
|
|
2390
|
-
function
|
|
2391
|
-
const { from:
|
|
2421
|
+
function Ma(e, t, o = 0, n = 0, r = !1, s = ie) {
|
|
2422
|
+
const { from: a, to: i } = t || {}, { isSameDay: c, isAfter: d, isBefore: l } = s;
|
|
2392
2423
|
let u;
|
|
2393
|
-
if (!
|
|
2394
|
-
u = { from: e, to:
|
|
2395
|
-
else if (
|
|
2396
|
-
c(
|
|
2397
|
-
else if (
|
|
2398
|
-
if (c(
|
|
2399
|
-
r ? u = { from:
|
|
2424
|
+
if (!a && !i)
|
|
2425
|
+
u = { from: e, to: o > 0 ? void 0 : e };
|
|
2426
|
+
else if (a && !i)
|
|
2427
|
+
c(a, e) ? o === 0 ? u = { from: a, to: e } : r ? u = { from: a, to: void 0 } : u = void 0 : l(e, a) ? u = { from: e, to: a } : u = { from: a, to: e };
|
|
2428
|
+
else if (a && i)
|
|
2429
|
+
if (c(a, e) && c(i, e))
|
|
2430
|
+
r ? u = { from: a, to: i } : u = void 0;
|
|
2431
|
+
else if (c(a, e))
|
|
2432
|
+
u = { from: a, to: o > 0 ? void 0 : e };
|
|
2400
2433
|
else if (c(i, e))
|
|
2401
|
-
u = { from:
|
|
2402
|
-
else if (
|
|
2403
|
-
u = { from: e, to:
|
|
2404
|
-
else if (
|
|
2405
|
-
u = { from:
|
|
2434
|
+
u = { from: e, to: o > 0 ? void 0 : e };
|
|
2435
|
+
else if (l(e, a))
|
|
2436
|
+
u = { from: e, to: i };
|
|
2437
|
+
else if (d(e, a))
|
|
2438
|
+
u = { from: a, to: e };
|
|
2406
2439
|
else if (d(e, i))
|
|
2407
|
-
u = { from:
|
|
2408
|
-
else if (d(e, s))
|
|
2409
|
-
u = { from: i, to: e };
|
|
2440
|
+
u = { from: a, to: e };
|
|
2410
2441
|
else
|
|
2411
2442
|
throw new Error("Invalid range");
|
|
2412
2443
|
if (u?.from && u?.to) {
|
|
2413
|
-
const f =
|
|
2414
|
-
|
|
2444
|
+
const f = s.differenceInCalendarDays(u.to, u.from);
|
|
2445
|
+
n > 0 && f > n ? u = { from: e, to: void 0 } : o > 1 && f < o && (u = { from: e, to: void 0 });
|
|
2415
2446
|
}
|
|
2416
2447
|
return u;
|
|
2417
2448
|
}
|
|
2418
|
-
function
|
|
2419
|
-
const
|
|
2449
|
+
function va(e, t, o = ie) {
|
|
2450
|
+
const n = Array.isArray(t) ? t : [t];
|
|
2420
2451
|
let r = e.from;
|
|
2421
|
-
const
|
|
2422
|
-
for (let
|
|
2423
|
-
if (
|
|
2452
|
+
const s = o.differenceInCalendarDays(e.to, e.from), a = Math.min(s, 6);
|
|
2453
|
+
for (let i = 0; i <= a; i++) {
|
|
2454
|
+
if (n.includes(r.getDay()))
|
|
2424
2455
|
return !0;
|
|
2425
|
-
r =
|
|
2456
|
+
r = o.addDays(r, 1);
|
|
2426
2457
|
}
|
|
2427
2458
|
return !1;
|
|
2428
2459
|
}
|
|
2429
|
-
function
|
|
2430
|
-
return
|
|
2460
|
+
function At(e, t, o = ie) {
|
|
2461
|
+
return le(e, t.from, !1, o) || le(e, t.to, !1, o) || le(t, e.from, !1, o) || le(t, e.to, !1, o);
|
|
2431
2462
|
}
|
|
2432
|
-
function
|
|
2433
|
-
const
|
|
2434
|
-
if (
|
|
2435
|
-
from:
|
|
2436
|
-
to:
|
|
2437
|
-
},
|
|
2463
|
+
function Da(e, t, o = ie) {
|
|
2464
|
+
const n = Array.isArray(t) ? t : [t];
|
|
2465
|
+
if (n.filter((i) => typeof i != "function").some((i) => typeof i == "boolean" ? i : o.isDate(i) ? le(e, i, !1, o) : sn(i, o) ? i.some((c) => le(e, c, !1, o)) : ot(i) ? i.from && i.to ? At(e, { from: i.from, to: i.to }, o) : !1 : an(i) ? va(e, i.dayOfWeek, o) : Dt(i) ? o.isAfter(i.before, i.after) ? At(e, {
|
|
2466
|
+
from: o.addDays(i.after, 1),
|
|
2467
|
+
to: o.addDays(i.before, -1)
|
|
2468
|
+
}, o) : fe(e.from, i, o) || fe(e.to, i, o) : kt(i) || Ot(i) ? fe(e.from, i, o) || fe(e.to, i, o) : !1))
|
|
2438
2469
|
return !0;
|
|
2439
|
-
const
|
|
2440
|
-
if (
|
|
2441
|
-
let
|
|
2442
|
-
const c =
|
|
2470
|
+
const a = n.filter((i) => typeof i == "function");
|
|
2471
|
+
if (a.length) {
|
|
2472
|
+
let i = e.from;
|
|
2473
|
+
const c = o.differenceInCalendarDays(e.to, e.from);
|
|
2443
2474
|
for (let d = 0; d <= c; d++) {
|
|
2444
|
-
if (
|
|
2475
|
+
if (a.some((l) => l(i)))
|
|
2445
2476
|
return !0;
|
|
2446
|
-
|
|
2477
|
+
i = o.addDays(i, 1);
|
|
2447
2478
|
}
|
|
2448
2479
|
}
|
|
2449
2480
|
return !1;
|
|
2450
2481
|
}
|
|
2451
|
-
function
|
|
2452
|
-
const { disabled:
|
|
2482
|
+
function ka(e, t) {
|
|
2483
|
+
const { disabled: o, excludeDisabled: n, selected: r, required: s, onSelect: a } = e, [i, c] = rt(r, a ? r : void 0), d = a ? r : i;
|
|
2453
2484
|
return {
|
|
2454
2485
|
selected: d,
|
|
2455
2486
|
select: (f, w, D) => {
|
|
2456
|
-
const { min:
|
|
2457
|
-
return
|
|
2487
|
+
const { min: S, max: M } = e, k = f ? Ma(f, d, S, M, s, t) : void 0;
|
|
2488
|
+
return n && o && k?.from && k.to && Da({ from: k.from, to: k.to }, o, t) && (k.from = f, k.to = void 0), a || c(k), a?.(k, f, w, D), k;
|
|
2458
2489
|
},
|
|
2459
|
-
isSelected: (f) => d &&
|
|
2490
|
+
isSelected: (f) => d && le(d, f, !1, t)
|
|
2460
2491
|
};
|
|
2461
2492
|
}
|
|
2462
|
-
function
|
|
2463
|
-
const { selected:
|
|
2493
|
+
function Oa(e, t) {
|
|
2494
|
+
const { selected: o, required: n, onSelect: r } = e, [s, a] = rt(o, r ? o : void 0), i = r ? o : s, { isSameDay: c } = t;
|
|
2464
2495
|
return {
|
|
2465
|
-
selected:
|
|
2496
|
+
selected: i,
|
|
2466
2497
|
select: (u, f, w) => {
|
|
2467
2498
|
let D = u;
|
|
2468
|
-
return !
|
|
2499
|
+
return !n && i && i && c(u, i) && (D = void 0), r || a(D), r?.(D, u, f, w), D;
|
|
2469
2500
|
},
|
|
2470
|
-
isSelected: (u) =>
|
|
2501
|
+
isSelected: (u) => i ? c(i, u) : !1
|
|
2471
2502
|
};
|
|
2472
2503
|
}
|
|
2473
|
-
function
|
|
2474
|
-
const
|
|
2504
|
+
function Wa(e, t) {
|
|
2505
|
+
const o = Oa(e, t), n = wa(e, t), r = ka(e, t);
|
|
2475
2506
|
switch (e.mode) {
|
|
2476
2507
|
case "single":
|
|
2477
|
-
return n;
|
|
2478
|
-
case "multiple":
|
|
2479
2508
|
return o;
|
|
2509
|
+
case "multiple":
|
|
2510
|
+
return n;
|
|
2480
2511
|
case "range":
|
|
2481
2512
|
return r;
|
|
2482
2513
|
default:
|
|
2483
2514
|
return;
|
|
2484
2515
|
}
|
|
2485
2516
|
}
|
|
2486
|
-
function
|
|
2517
|
+
function z(e, t) {
|
|
2518
|
+
return e instanceof de && e.timeZone === t ? e : new de(e, t);
|
|
2519
|
+
}
|
|
2520
|
+
function Ht(e, t) {
|
|
2521
|
+
return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? z(e, t) : Array.isArray(e) ? e.map((o) => o instanceof Date ? z(o, t) : o) : ot(e) ? {
|
|
2522
|
+
...e,
|
|
2523
|
+
from: e.from ? z(e.from, t) : e.from,
|
|
2524
|
+
to: e.to ? z(e.to, t) : e.to
|
|
2525
|
+
} : Dt(e) ? {
|
|
2526
|
+
before: z(e.before, t),
|
|
2527
|
+
after: z(e.after, t)
|
|
2528
|
+
} : kt(e) ? {
|
|
2529
|
+
after: z(e.after, t)
|
|
2530
|
+
} : Ot(e) ? {
|
|
2531
|
+
before: z(e.before, t)
|
|
2532
|
+
} : e;
|
|
2533
|
+
}
|
|
2534
|
+
function gt(e, t) {
|
|
2535
|
+
return e && (Array.isArray(e) ? e.map((o) => Ht(o, t)) : Ht(e, t));
|
|
2536
|
+
}
|
|
2537
|
+
function pt(e) {
|
|
2487
2538
|
let t = e;
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2539
|
+
const o = t.timeZone;
|
|
2540
|
+
if (o && (t = {
|
|
2541
|
+
...e,
|
|
2542
|
+
timeZone: o
|
|
2543
|
+
}, t.today && (t.today = z(t.today, o)), t.month && (t.month = z(t.month, o)), t.defaultMonth && (t.defaultMonth = z(t.defaultMonth, o)), t.startMonth && (t.startMonth = z(t.startMonth, o)), t.endMonth && (t.endMonth = z(t.endMonth, o)), t.mode === "single" && t.selected ? t.selected = z(t.selected, o) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((W) => z(W, o)) : t.mode === "range" && t.selected && (t.selected = {
|
|
2544
|
+
from: t.selected.from ? z(t.selected.from, o) : t.selected.from,
|
|
2545
|
+
to: t.selected.to ? z(t.selected.to, o) : t.selected.to
|
|
2546
|
+
}), t.disabled !== void 0 && (t.disabled = gt(t.disabled, o)), t.hidden !== void 0 && (t.hidden = gt(t.hidden, o)), t.modifiers)) {
|
|
2547
|
+
const W = {};
|
|
2548
|
+
Object.keys(t.modifiers).forEach((_) => {
|
|
2549
|
+
W[_] = gt(t.modifiers?.[_], o);
|
|
2550
|
+
}), t.modifiers = W;
|
|
2551
|
+
}
|
|
2552
|
+
const { components: n, formatters: r, labels: s, dateLib: a, locale: i, classNames: c } = se(() => {
|
|
2553
|
+
const W = { ...vt, ...t.locale };
|
|
2496
2554
|
return {
|
|
2497
|
-
dateLib: new
|
|
2498
|
-
locale:
|
|
2555
|
+
dateLib: new U({
|
|
2556
|
+
locale: W,
|
|
2499
2557
|
weekStartsOn: t.broadcastCalendar ? 1 : t.weekStartsOn,
|
|
2500
2558
|
firstWeekContainsDate: t.firstWeekContainsDate,
|
|
2501
2559
|
useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
|
|
@@ -2503,11 +2561,11 @@ function ht(e) {
|
|
|
2503
2561
|
timeZone: t.timeZone,
|
|
2504
2562
|
numerals: t.numerals
|
|
2505
2563
|
}, t.dateLib),
|
|
2506
|
-
components:
|
|
2507
|
-
formatters:
|
|
2508
|
-
labels: { ...
|
|
2509
|
-
locale:
|
|
2510
|
-
classNames: { ...
|
|
2564
|
+
components: Nr(t.components),
|
|
2565
|
+
formatters: Hr(t.formatters),
|
|
2566
|
+
labels: { ...na, ...t.labels },
|
|
2567
|
+
locale: W,
|
|
2568
|
+
classNames: { ...Tr(), ...t.classNames }
|
|
2511
2569
|
};
|
|
2512
2570
|
}, [
|
|
2513
2571
|
t.locale,
|
|
@@ -2523,109 +2581,111 @@ function ht(e) {
|
|
|
2523
2581
|
t.formatters,
|
|
2524
2582
|
t.labels,
|
|
2525
2583
|
t.classNames
|
|
2526
|
-
])
|
|
2527
|
-
|
|
2528
|
-
},
|
|
2529
|
-
|
|
2530
|
-
}, [
|
|
2531
|
-
|
|
2532
|
-
}, [
|
|
2533
|
-
|
|
2534
|
-
}, [D,
|
|
2535
|
-
|
|
2536
|
-
}, [
|
|
2537
|
-
|
|
2584
|
+
]);
|
|
2585
|
+
t.today || (t = { ...t, today: a.today() });
|
|
2586
|
+
const { captionLayout: d, mode: l, navLayout: u, numberOfMonths: f = 1, onDayBlur: w, onDayClick: D, onDayFocus: S, onDayKeyDown: M, onDayMouseEnter: k, onDayMouseLeave: y, onNextClick: p, onPrevClick: v, showWeekNumber: b, styles: m } = t, { formatCaption: C, formatDay: x, formatMonthDropdown: B, formatWeekNumber: F, formatWeekNumberHeader: A, formatWeekdayName: j, formatYearDropdown: $ } = r, J = ya(t, a), { days: he, months: ce, navStart: ue, navEnd: We, previousMonth: G, nextMonth: L, goToMonth: Z } = J, ge = Cr(he, t, ue, We, a), { isSelected: X, select: Se, selected: pe } = Wa(t, a) ?? {}, { blur: Re, focused: Le, isFocusTarget: at, moveFocus: Ye, setFocused: be } = ba(t, J, ge, X ?? (() => !1), a), { labelDayButton: ze, labelGridcell: st, labelGrid: P, labelMonthDropdown: V, labelNav: ee, labelPrevious: we, labelNext: Me, labelWeekday: ve, labelWeekNumber: it, labelWeekNumberHeader: ct, labelYearDropdown: Ge } = s, Ve = se(() => Rr(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), Xe = l !== void 0 || D !== void 0, De = R(() => {
|
|
2587
|
+
G && (Z(G), v?.(G));
|
|
2588
|
+
}, [G, Z, v]), Ee = R(() => {
|
|
2589
|
+
L && (Z(L), p?.(L));
|
|
2590
|
+
}, [Z, L, p]), Qe = R((W, _) => (O) => {
|
|
2591
|
+
O.preventDefault(), O.stopPropagation(), be(W), Se?.(W.date, _, O), D?.(W.date, _, O);
|
|
2592
|
+
}, [Se, D, be]), Ue = R((W, _) => (O) => {
|
|
2593
|
+
be(W), S?.(W.date, _, O);
|
|
2594
|
+
}, [S, be]), _e = R((W, _) => (O) => {
|
|
2595
|
+
Re(), w?.(W.date, _, O);
|
|
2596
|
+
}, [Re, w]), Ze = R((W, _) => (O) => {
|
|
2597
|
+
const T = {
|
|
2538
2598
|
ArrowLeft: [
|
|
2539
|
-
|
|
2599
|
+
O.shiftKey ? "month" : "day",
|
|
2540
2600
|
t.dir === "rtl" ? "after" : "before"
|
|
2541
2601
|
],
|
|
2542
2602
|
ArrowRight: [
|
|
2543
|
-
|
|
2603
|
+
O.shiftKey ? "month" : "day",
|
|
2544
2604
|
t.dir === "rtl" ? "before" : "after"
|
|
2545
2605
|
],
|
|
2546
|
-
ArrowDown: [
|
|
2547
|
-
ArrowUp: [
|
|
2548
|
-
PageUp: [
|
|
2549
|
-
PageDown: [
|
|
2606
|
+
ArrowDown: [O.shiftKey ? "year" : "week", "after"],
|
|
2607
|
+
ArrowUp: [O.shiftKey ? "year" : "week", "before"],
|
|
2608
|
+
PageUp: [O.shiftKey ? "year" : "month", "before"],
|
|
2609
|
+
PageDown: [O.shiftKey ? "year" : "month", "after"],
|
|
2550
2610
|
Home: ["startOfWeek", "before"],
|
|
2551
2611
|
End: ["endOfWeek", "after"]
|
|
2552
2612
|
};
|
|
2553
|
-
if (
|
|
2554
|
-
|
|
2555
|
-
const [
|
|
2556
|
-
|
|
2613
|
+
if (T[O.key]) {
|
|
2614
|
+
O.preventDefault(), O.stopPropagation();
|
|
2615
|
+
const [te, N] = T[O.key];
|
|
2616
|
+
Ye(te, N);
|
|
2557
2617
|
}
|
|
2558
|
-
|
|
2559
|
-
}, [
|
|
2560
|
-
|
|
2561
|
-
}, [
|
|
2562
|
-
|
|
2563
|
-
}, [
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
}, [a,
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2569
|
-
}, [a,
|
|
2570
|
-
className: [
|
|
2571
|
-
style: { ...
|
|
2572
|
-
}), [
|
|
2573
|
-
|
|
2574
|
-
classNames:
|
|
2575
|
-
months:
|
|
2576
|
-
focused:
|
|
2618
|
+
M?.(W.date, _, O);
|
|
2619
|
+
}, [Ye, M, t.dir]), Ke = R((W, _) => (O) => {
|
|
2620
|
+
k?.(W.date, _, O);
|
|
2621
|
+
}, [k]), Je = R((W, _) => (O) => {
|
|
2622
|
+
y?.(W.date, _, O);
|
|
2623
|
+
}, [y]), et = R((W) => (_) => {
|
|
2624
|
+
const O = Number(_.target.value), T = a.setMonth(a.startOfMonth(W), O);
|
|
2625
|
+
Z(T);
|
|
2626
|
+
}, [a, Z]), ut = R((W) => (_) => {
|
|
2627
|
+
const O = Number(_.target.value), T = a.setYear(a.startOfMonth(W), O);
|
|
2628
|
+
Z(T);
|
|
2629
|
+
}, [a, Z]), { className: tt, style: nt } = se(() => ({
|
|
2630
|
+
className: [c[g.Root], t.className].filter(Boolean).join(" "),
|
|
2631
|
+
style: { ...m?.[g.Root], ...t.style }
|
|
2632
|
+
}), [c, t.className, t.style, m]), dt = Pr(t), Wt = xe(null);
|
|
2633
|
+
sa(Wt, !!t.animate, {
|
|
2634
|
+
classNames: c,
|
|
2635
|
+
months: ce,
|
|
2636
|
+
focused: Le,
|
|
2577
2637
|
dateLib: a
|
|
2578
2638
|
});
|
|
2579
|
-
const
|
|
2639
|
+
const hn = {
|
|
2580
2640
|
dayPickerProps: t,
|
|
2581
2641
|
selected: pe,
|
|
2582
|
-
select:
|
|
2583
|
-
isSelected:
|
|
2584
|
-
months:
|
|
2585
|
-
nextMonth:
|
|
2642
|
+
select: Se,
|
|
2643
|
+
isSelected: X,
|
|
2644
|
+
months: ce,
|
|
2645
|
+
nextMonth: L,
|
|
2586
2646
|
previousMonth: G,
|
|
2587
|
-
goToMonth:
|
|
2588
|
-
getModifiers:
|
|
2647
|
+
goToMonth: Z,
|
|
2648
|
+
getModifiers: ge,
|
|
2589
2649
|
components: n,
|
|
2590
|
-
classNames:
|
|
2591
|
-
styles:
|
|
2592
|
-
labels:
|
|
2593
|
-
formatters:
|
|
2650
|
+
classNames: c,
|
|
2651
|
+
styles: m,
|
|
2652
|
+
labels: s,
|
|
2653
|
+
formatters: r
|
|
2594
2654
|
};
|
|
2595
|
-
return
|
|
2596
|
-
|
|
2597
|
-
{ value:
|
|
2598
|
-
|
|
2655
|
+
return h.createElement(
|
|
2656
|
+
rn.Provider,
|
|
2657
|
+
{ value: hn },
|
|
2658
|
+
h.createElement(
|
|
2599
2659
|
n.Root,
|
|
2600
|
-
{ rootRef: t.animate ?
|
|
2601
|
-
|
|
2660
|
+
{ rootRef: t.animate ? Wt : void 0, className: tt, style: nt, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...dt },
|
|
2661
|
+
h.createElement(
|
|
2602
2662
|
n.Months,
|
|
2603
|
-
{ className:
|
|
2604
|
-
!t.hideNavigation && !
|
|
2605
|
-
|
|
2663
|
+
{ className: c[g.Months], style: m?.[g.Months] },
|
|
2664
|
+
!t.hideNavigation && !u && h.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[g.Nav], style: m?.[g.Nav], "aria-label": ee(), onPreviousClick: De, onNextClick: Ee, previousMonth: G, nextMonth: L }),
|
|
2665
|
+
ce.map((W, _) => h.createElement(
|
|
2606
2666
|
n.Month,
|
|
2607
2667
|
{
|
|
2608
2668
|
"data-animated-month": t.animate ? "true" : void 0,
|
|
2609
|
-
className:
|
|
2610
|
-
style:
|
|
2669
|
+
className: c[g.Month],
|
|
2670
|
+
style: m?.[g.Month],
|
|
2611
2671
|
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
2612
|
-
key:
|
|
2613
|
-
displayIndex:
|
|
2614
|
-
calendarMonth:
|
|
2672
|
+
key: _,
|
|
2673
|
+
displayIndex: _,
|
|
2674
|
+
calendarMonth: W
|
|
2615
2675
|
},
|
|
2616
|
-
|
|
2676
|
+
u === "around" && !t.hideNavigation && _ === 0 && h.createElement(
|
|
2617
2677
|
n.PreviousMonthButton,
|
|
2618
|
-
{ type: "button", className:
|
|
2619
|
-
|
|
2678
|
+
{ type: "button", className: c[g.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": we(G), onClick: De, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2679
|
+
h.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: c[g.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2620
2680
|
),
|
|
2621
|
-
|
|
2681
|
+
h.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: c[g.MonthCaption], style: m?.[g.MonthCaption], calendarMonth: W, displayIndex: _ }, d?.startsWith("dropdown") ? h.createElement(
|
|
2622
2682
|
n.DropdownNav,
|
|
2623
|
-
{ className:
|
|
2683
|
+
{ className: c[g.Dropdowns], style: m?.[g.Dropdowns] },
|
|
2624
2684
|
(() => {
|
|
2625
|
-
const
|
|
2626
|
-
return a.getMonthYearOrder() === "year-first" ? [
|
|
2685
|
+
const O = d === "dropdown" || d === "dropdown-months" ? h.createElement(n.MonthsDropdown, { key: "month", className: c[g.MonthsDropdown], "aria-label": V(), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: et(W.date), options: $r(W.date, ue, We, r, a), style: m?.[g.Dropdown], value: a.getMonth(W.date) }) : h.createElement("span", { key: "month" }, B(W.date, a)), T = d === "dropdown" || d === "dropdown-years" ? h.createElement(n.YearsDropdown, { key: "year", className: c[g.YearsDropdown], "aria-label": Ge(a.options), classNames: c, components: n, disabled: !!t.disableNavigation, onChange: ut(W.date), options: Lr(ue, We, r, a, !!t.reverseYears), style: m?.[g.Dropdown], value: a.getYear(W.date) }) : h.createElement("span", { key: "year" }, $(W.date, a));
|
|
2686
|
+
return a.getMonthYearOrder() === "year-first" ? [T, O] : [O, T];
|
|
2627
2687
|
})(),
|
|
2628
|
-
|
|
2688
|
+
h.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
2629
2689
|
border: 0,
|
|
2630
2690
|
clip: "rect(0 0 0 0)",
|
|
2631
2691
|
height: "1px",
|
|
@@ -2636,43 +2696,43 @@ function ht(e) {
|
|
|
2636
2696
|
width: "1px",
|
|
2637
2697
|
whiteSpace: "nowrap",
|
|
2638
2698
|
wordWrap: "normal"
|
|
2639
|
-
} },
|
|
2699
|
+
} }, C(W.date, a.options, a))
|
|
2640
2700
|
) : (
|
|
2641
2701
|
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
2642
|
-
|
|
2702
|
+
h.createElement(n.CaptionLabel, { className: c[g.CaptionLabel], role: "status", "aria-live": "polite" }, C(W.date, a.options, a))
|
|
2643
2703
|
)),
|
|
2644
|
-
|
|
2704
|
+
u === "around" && !t.hideNavigation && _ === f - 1 && h.createElement(
|
|
2645
2705
|
n.NextMonthButton,
|
|
2646
|
-
{ type: "button", className:
|
|
2647
|
-
|
|
2706
|
+
{ type: "button", className: c[g.NextMonthButton], tabIndex: L ? void 0 : -1, "aria-disabled": L ? void 0 : !0, "aria-label": Me(L), onClick: Ee, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2707
|
+
h.createElement(n.Chevron, { disabled: L ? void 0 : !0, className: c[g.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
2648
2708
|
),
|
|
2649
|
-
|
|
2650
|
-
|
|
2709
|
+
_ === f - 1 && u === "after" && !t.hideNavigation && h.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: c[g.Nav], style: m?.[g.Nav], "aria-label": ee(), onPreviousClick: De, onNextClick: Ee, previousMonth: G, nextMonth: L }),
|
|
2710
|
+
h.createElement(
|
|
2651
2711
|
n.MonthGrid,
|
|
2652
|
-
{ role: "grid", "aria-multiselectable":
|
|
2653
|
-
!t.hideWeekdays &&
|
|
2712
|
+
{ role: "grid", "aria-multiselectable": l === "multiple" || l === "range", "aria-label": P(W.date, a.options, a) || void 0, className: c[g.MonthGrid], style: m?.[g.MonthGrid] },
|
|
2713
|
+
!t.hideWeekdays && h.createElement(
|
|
2654
2714
|
n.Weekdays,
|
|
2655
|
-
{ "data-animated-weekdays": t.animate ? "true" : void 0, className:
|
|
2656
|
-
|
|
2657
|
-
|
|
2715
|
+
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: c[g.Weekdays], style: m?.[g.Weekdays] },
|
|
2716
|
+
b && h.createElement(n.WeekNumberHeader, { "aria-label": ct(a.options), className: c[g.WeekNumberHeader], style: m?.[g.WeekNumberHeader], scope: "col" }, A()),
|
|
2717
|
+
Ve.map((O) => h.createElement(n.Weekday, { "aria-label": ve(O, a.options, a), className: c[g.Weekday], key: String(O), style: m?.[g.Weekday], scope: "col" }, j(O, a.options, a)))
|
|
2658
2718
|
),
|
|
2659
|
-
|
|
2719
|
+
h.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: c[g.Weeks], style: m?.[g.Weeks] }, W.weeks.map((O) => h.createElement(
|
|
2660
2720
|
n.Week,
|
|
2661
|
-
{ className:
|
|
2662
|
-
|
|
2663
|
-
|
|
2721
|
+
{ className: c[g.Week], key: O.weekNumber, style: m?.[g.Week], week: O },
|
|
2722
|
+
b && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2723
|
+
h.createElement(n.WeekNumber, { week: O, style: m?.[g.WeekNumber], "aria-label": it(O.weekNumber, {
|
|
2664
2724
|
locale: i
|
|
2665
|
-
}), className:
|
|
2666
|
-
|
|
2667
|
-
const { date:
|
|
2668
|
-
if (
|
|
2669
|
-
const { from:
|
|
2670
|
-
|
|
2725
|
+
}), className: c[g.WeekNumber], scope: "row", role: "rowheader" }, F(O.weekNumber, a)),
|
|
2726
|
+
O.days.map((T) => {
|
|
2727
|
+
const { date: te } = T, N = ge(T);
|
|
2728
|
+
if (N[I.focused] = !N.hidden && !!Le?.isEqualTo(T), N[K.selected] = X?.(te) || N.selected, ot(pe)) {
|
|
2729
|
+
const { from: lt, to: ft } = pe;
|
|
2730
|
+
N[K.range_start] = !!(lt && ft && a.isSameDay(te, lt)), N[K.range_end] = !!(lt && ft && a.isSameDay(te, ft)), N[K.range_middle] = le(pe, te, !0, a);
|
|
2671
2731
|
}
|
|
2672
|
-
const
|
|
2732
|
+
const mn = qr(N, m, t.modifiersStyles), yn = xr(N, c, t.modifiersClassNames), gn = !Xe && !N.hidden ? st(te, N, a.options, a) : void 0;
|
|
2673
2733
|
return (
|
|
2674
2734
|
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
2675
|
-
|
|
2735
|
+
h.createElement(n.Day, { key: `${T.isoDate}_${T.displayMonthId}`, day: T, modifiers: N, className: yn.join(" "), style: mn, role: "gridcell", "aria-selected": N.selected || void 0, "aria-label": gn, "data-day": T.isoDate, "data-month": T.outside ? T.dateMonthId : void 0, "data-selected": N.selected || void 0, "data-disabled": N.disabled || void 0, "data-hidden": N.hidden || void 0, "data-outside": T.outside || void 0, "data-focused": N.focused || void 0, "data-today": N.today || void 0 }, !N.hidden && Xe ? h.createElement(n.DayButton, { className: c[g.DayButton], style: m?.[g.DayButton], type: "button", day: T, modifiers: N, disabled: !N.focused && N.disabled || void 0, "aria-disabled": N.focused && N.disabled || void 0, tabIndex: at(T) ? 0 : -1, "aria-label": ze(te, N, a.options, a), onClick: Qe(T, N), onBlur: _e(T, N), onFocus: Ue(T, N), onKeyDown: Ze(T, N), onMouseEnter: Ke(T, N), onMouseLeave: Je(T, N) }, x(te, a.options, a)) : !N.hidden && x(T.date, a.options, a))
|
|
2676
2736
|
);
|
|
2677
2737
|
})
|
|
2678
2738
|
)))
|
|
@@ -2680,11 +2740,11 @@ function ht(e) {
|
|
|
2680
2740
|
))
|
|
2681
2741
|
),
|
|
2682
2742
|
t.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2683
|
-
|
|
2743
|
+
h.createElement(n.Footer, { className: c[g.Footer], style: m?.[g.Footer], role: "status", "aria-live": "polite" }, t.footer)
|
|
2684
2744
|
)
|
|
2685
2745
|
);
|
|
2686
2746
|
}
|
|
2687
|
-
const
|
|
2747
|
+
const Sa = {
|
|
2688
2748
|
lessThanXSeconds: {
|
|
2689
2749
|
one: "menos de un segundo",
|
|
2690
2750
|
other: "menos de {{count}} segundos"
|
|
@@ -2746,61 +2806,61 @@ const Da = {
|
|
|
2746
2806
|
one: "casi 1 año",
|
|
2747
2807
|
other: "casi {{count}} años"
|
|
2748
2808
|
}
|
|
2749
|
-
},
|
|
2750
|
-
let
|
|
2751
|
-
const r =
|
|
2752
|
-
return typeof r == "string" ?
|
|
2753
|
-
},
|
|
2809
|
+
}, Ca = (e, t, o) => {
|
|
2810
|
+
let n;
|
|
2811
|
+
const r = Sa[e];
|
|
2812
|
+
return typeof r == "string" ? n = r : t === 1 ? n = r.one : n = r.other.replace("{{count}}", t.toString()), o?.addSuffix ? o.comparison && o.comparison > 0 ? "en " + n : "hace " + n : n;
|
|
2813
|
+
}, xa = {
|
|
2754
2814
|
full: "EEEE, d 'de' MMMM 'de' y",
|
|
2755
2815
|
long: "d 'de' MMMM 'de' y",
|
|
2756
2816
|
medium: "d MMM y",
|
|
2757
2817
|
short: "dd/MM/y"
|
|
2758
|
-
},
|
|
2818
|
+
}, Na = {
|
|
2759
2819
|
full: "HH:mm:ss zzzz",
|
|
2760
2820
|
long: "HH:mm:ss z",
|
|
2761
2821
|
medium: "HH:mm:ss",
|
|
2762
2822
|
short: "HH:mm"
|
|
2763
|
-
},
|
|
2823
|
+
}, Pa = {
|
|
2764
2824
|
full: "{{date}} 'a las' {{time}}",
|
|
2765
2825
|
long: "{{date}} 'a las' {{time}}",
|
|
2766
2826
|
medium: "{{date}}, {{time}}",
|
|
2767
2827
|
short: "{{date}}, {{time}}"
|
|
2768
|
-
},
|
|
2769
|
-
date:
|
|
2770
|
-
formats:
|
|
2828
|
+
}, Ta = {
|
|
2829
|
+
date: Ne({
|
|
2830
|
+
formats: xa,
|
|
2771
2831
|
defaultWidth: "full"
|
|
2772
2832
|
}),
|
|
2773
|
-
time:
|
|
2774
|
-
formats:
|
|
2833
|
+
time: Ne({
|
|
2834
|
+
formats: Na,
|
|
2775
2835
|
defaultWidth: "full"
|
|
2776
2836
|
}),
|
|
2777
|
-
dateTime:
|
|
2778
|
-
formats:
|
|
2837
|
+
dateTime: Ne({
|
|
2838
|
+
formats: Pa,
|
|
2779
2839
|
defaultWidth: "full"
|
|
2780
2840
|
})
|
|
2781
|
-
},
|
|
2841
|
+
}, Ya = {
|
|
2782
2842
|
lastWeek: "'el' eeee 'pasado a la' p",
|
|
2783
2843
|
yesterday: "'ayer a la' p",
|
|
2784
2844
|
today: "'hoy a la' p",
|
|
2785
2845
|
tomorrow: "'mañana a la' p",
|
|
2786
2846
|
nextWeek: "eeee 'a la' p",
|
|
2787
2847
|
other: "P"
|
|
2788
|
-
},
|
|
2848
|
+
}, Ea = {
|
|
2789
2849
|
lastWeek: "'el' eeee 'pasado a las' p",
|
|
2790
2850
|
yesterday: "'ayer a las' p",
|
|
2791
2851
|
today: "'hoy a las' p",
|
|
2792
2852
|
tomorrow: "'mañana a las' p",
|
|
2793
2853
|
nextWeek: "eeee 'a las' p",
|
|
2794
2854
|
other: "P"
|
|
2795
|
-
},
|
|
2855
|
+
}, _a = (e, t, o, n) => t.getHours() !== 1 ? Ea[e] : Ya[e], Fa = {
|
|
2796
2856
|
narrow: ["AC", "DC"],
|
|
2797
2857
|
abbreviated: ["AC", "DC"],
|
|
2798
2858
|
wide: ["antes de cristo", "después de cristo"]
|
|
2799
|
-
},
|
|
2859
|
+
}, Ba = {
|
|
2800
2860
|
narrow: ["1", "2", "3", "4"],
|
|
2801
2861
|
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
2802
2862
|
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
|
|
2803
|
-
},
|
|
2863
|
+
}, Ia = {
|
|
2804
2864
|
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
2805
2865
|
abbreviated: [
|
|
2806
2866
|
"ene",
|
|
@@ -2830,7 +2890,7 @@ const Da = {
|
|
|
2830
2890
|
"noviembre",
|
|
2831
2891
|
"diciembre"
|
|
2832
2892
|
]
|
|
2833
|
-
},
|
|
2893
|
+
}, ja = {
|
|
2834
2894
|
narrow: ["d", "l", "m", "m", "j", "v", "s"],
|
|
2835
2895
|
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
|
|
2836
2896
|
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
|
|
@@ -2843,7 +2903,7 @@ const Da = {
|
|
|
2843
2903
|
"viernes",
|
|
2844
2904
|
"sábado"
|
|
2845
2905
|
]
|
|
2846
|
-
},
|
|
2906
|
+
}, Aa = {
|
|
2847
2907
|
narrow: {
|
|
2848
2908
|
am: "a",
|
|
2849
2909
|
pm: "p",
|
|
@@ -2874,7 +2934,7 @@ const Da = {
|
|
|
2874
2934
|
evening: "tarde",
|
|
2875
2935
|
night: "noche"
|
|
2876
2936
|
}
|
|
2877
|
-
},
|
|
2937
|
+
}, Ha = {
|
|
2878
2938
|
narrow: {
|
|
2879
2939
|
am: "a",
|
|
2880
2940
|
pm: "p",
|
|
@@ -2905,52 +2965,52 @@ const Da = {
|
|
|
2905
2965
|
evening: "de la tarde",
|
|
2906
2966
|
night: "de la noche"
|
|
2907
2967
|
}
|
|
2908
|
-
},
|
|
2909
|
-
ordinalNumber:
|
|
2910
|
-
era:
|
|
2911
|
-
values:
|
|
2968
|
+
}, $a = (e, t) => Number(e) + "º", qa = {
|
|
2969
|
+
ordinalNumber: $a,
|
|
2970
|
+
era: oe({
|
|
2971
|
+
values: Fa,
|
|
2912
2972
|
defaultWidth: "wide"
|
|
2913
2973
|
}),
|
|
2914
|
-
quarter:
|
|
2915
|
-
values:
|
|
2974
|
+
quarter: oe({
|
|
2975
|
+
values: Ba,
|
|
2916
2976
|
defaultWidth: "wide",
|
|
2917
2977
|
argumentCallback: (e) => Number(e) - 1
|
|
2918
2978
|
}),
|
|
2919
|
-
month:
|
|
2920
|
-
values:
|
|
2979
|
+
month: oe({
|
|
2980
|
+
values: Ia,
|
|
2921
2981
|
defaultWidth: "wide"
|
|
2922
2982
|
}),
|
|
2923
|
-
day:
|
|
2924
|
-
values:
|
|
2983
|
+
day: oe({
|
|
2984
|
+
values: ja,
|
|
2925
2985
|
defaultWidth: "wide"
|
|
2926
2986
|
}),
|
|
2927
|
-
dayPeriod:
|
|
2928
|
-
values:
|
|
2987
|
+
dayPeriod: oe({
|
|
2988
|
+
values: Aa,
|
|
2929
2989
|
defaultWidth: "wide",
|
|
2930
|
-
formattingValues:
|
|
2990
|
+
formattingValues: Ha,
|
|
2931
2991
|
defaultFormattingWidth: "wide"
|
|
2932
2992
|
})
|
|
2933
|
-
},
|
|
2993
|
+
}, Ra = /^(\d+)(º)?/i, La = /\d+/i, za = {
|
|
2934
2994
|
narrow: /^(ac|dc|a|d)/i,
|
|
2935
2995
|
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
|
|
2936
2996
|
wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i
|
|
2937
|
-
},
|
|
2997
|
+
}, Ga = {
|
|
2938
2998
|
any: [/^ac/i, /^dc/i],
|
|
2939
2999
|
wide: [
|
|
2940
3000
|
/^(antes de cristo|antes de la era com[uú]n)/i,
|
|
2941
3001
|
/^(despu[eé]s de cristo|era com[uú]n)/i
|
|
2942
3002
|
]
|
|
2943
|
-
},
|
|
3003
|
+
}, Va = {
|
|
2944
3004
|
narrow: /^[1234]/i,
|
|
2945
3005
|
abbreviated: /^T[1234]/i,
|
|
2946
3006
|
wide: /^[1234](º)? trimestre/i
|
|
2947
|
-
},
|
|
3007
|
+
}, Xa = {
|
|
2948
3008
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2949
|
-
},
|
|
3009
|
+
}, Qa = {
|
|
2950
3010
|
narrow: /^[efmajsond]/i,
|
|
2951
3011
|
abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
|
|
2952
3012
|
wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i
|
|
2953
|
-
},
|
|
3013
|
+
}, Ua = {
|
|
2954
3014
|
narrow: [
|
|
2955
3015
|
/^e/i,
|
|
2956
3016
|
/^f/i,
|
|
@@ -2979,18 +3039,18 @@ const Da = {
|
|
|
2979
3039
|
/^nov/i,
|
|
2980
3040
|
/^dic/i
|
|
2981
3041
|
]
|
|
2982
|
-
},
|
|
3042
|
+
}, Za = {
|
|
2983
3043
|
narrow: /^[dlmjvs]/i,
|
|
2984
3044
|
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
|
|
2985
3045
|
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
|
|
2986
3046
|
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
|
|
2987
|
-
},
|
|
3047
|
+
}, Ka = {
|
|
2988
3048
|
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
2989
3049
|
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]
|
|
2990
|
-
},
|
|
3050
|
+
}, Ja = {
|
|
2991
3051
|
narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
|
|
2992
3052
|
any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i
|
|
2993
|
-
},
|
|
3053
|
+
}, es = {
|
|
2994
3054
|
any: {
|
|
2995
3055
|
am: /^a/i,
|
|
2996
3056
|
pm: /^p/i,
|
|
@@ -3001,65 +3061,65 @@ const Da = {
|
|
|
3001
3061
|
evening: /tarde/i,
|
|
3002
3062
|
night: /noche/i
|
|
3003
3063
|
}
|
|
3004
|
-
},
|
|
3005
|
-
ordinalNumber:
|
|
3006
|
-
matchPattern:
|
|
3007
|
-
parsePattern:
|
|
3064
|
+
}, ts = {
|
|
3065
|
+
ordinalNumber: Zt({
|
|
3066
|
+
matchPattern: Ra,
|
|
3067
|
+
parsePattern: La,
|
|
3008
3068
|
valueCallback: function(e) {
|
|
3009
3069
|
return parseInt(e, 10);
|
|
3010
3070
|
}
|
|
3011
3071
|
}),
|
|
3012
|
-
era:
|
|
3013
|
-
matchPatterns:
|
|
3072
|
+
era: re({
|
|
3073
|
+
matchPatterns: za,
|
|
3014
3074
|
defaultMatchWidth: "wide",
|
|
3015
|
-
parsePatterns:
|
|
3075
|
+
parsePatterns: Ga,
|
|
3016
3076
|
defaultParseWidth: "any"
|
|
3017
3077
|
}),
|
|
3018
|
-
quarter:
|
|
3019
|
-
matchPatterns:
|
|
3078
|
+
quarter: re({
|
|
3079
|
+
matchPatterns: Va,
|
|
3020
3080
|
defaultMatchWidth: "wide",
|
|
3021
|
-
parsePatterns:
|
|
3081
|
+
parsePatterns: Xa,
|
|
3022
3082
|
defaultParseWidth: "any",
|
|
3023
3083
|
valueCallback: (e) => e + 1
|
|
3024
3084
|
}),
|
|
3025
|
-
month:
|
|
3026
|
-
matchPatterns:
|
|
3085
|
+
month: re({
|
|
3086
|
+
matchPatterns: Qa,
|
|
3027
3087
|
defaultMatchWidth: "wide",
|
|
3028
|
-
parsePatterns:
|
|
3088
|
+
parsePatterns: Ua,
|
|
3029
3089
|
defaultParseWidth: "any"
|
|
3030
3090
|
}),
|
|
3031
|
-
day:
|
|
3032
|
-
matchPatterns:
|
|
3091
|
+
day: re({
|
|
3092
|
+
matchPatterns: Za,
|
|
3033
3093
|
defaultMatchWidth: "wide",
|
|
3034
|
-
parsePatterns:
|
|
3094
|
+
parsePatterns: Ka,
|
|
3035
3095
|
defaultParseWidth: "any"
|
|
3036
3096
|
}),
|
|
3037
|
-
dayPeriod:
|
|
3038
|
-
matchPatterns:
|
|
3097
|
+
dayPeriod: re({
|
|
3098
|
+
matchPatterns: Ja,
|
|
3039
3099
|
defaultMatchWidth: "any",
|
|
3040
|
-
parsePatterns:
|
|
3100
|
+
parsePatterns: es,
|
|
3041
3101
|
defaultParseWidth: "any"
|
|
3042
3102
|
})
|
|
3043
|
-
},
|
|
3103
|
+
}, bt = {
|
|
3044
3104
|
code: "es",
|
|
3045
|
-
formatDistance:
|
|
3046
|
-
formatLong:
|
|
3047
|
-
formatRelative:
|
|
3048
|
-
localize:
|
|
3049
|
-
match:
|
|
3105
|
+
formatDistance: Ca,
|
|
3106
|
+
formatLong: Ta,
|
|
3107
|
+
formatRelative: _a,
|
|
3108
|
+
localize: qa,
|
|
3109
|
+
match: ts,
|
|
3050
3110
|
options: {
|
|
3051
3111
|
weekStartsOn: 1,
|
|
3052
3112
|
firstWeekContainsDate: 1
|
|
3053
3113
|
}
|
|
3054
|
-
},
|
|
3114
|
+
}, ds = (e) => {
|
|
3055
3115
|
const {
|
|
3056
3116
|
mode: t = "single",
|
|
3057
|
-
required:
|
|
3058
|
-
selected:
|
|
3117
|
+
required: o = !1,
|
|
3118
|
+
selected: n,
|
|
3059
3119
|
onSelect: r,
|
|
3060
|
-
disabledDates:
|
|
3061
|
-
header:
|
|
3062
|
-
footer:
|
|
3120
|
+
disabledDates: s,
|
|
3121
|
+
header: a,
|
|
3122
|
+
footer: i,
|
|
3063
3123
|
hideOutsideDays: c = !1,
|
|
3064
3124
|
numberOfMonths: d = 1,
|
|
3065
3125
|
startMonth: l,
|
|
@@ -3067,214 +3127,214 @@ const Da = {
|
|
|
3067
3127
|
showActionButtons: f = !1,
|
|
3068
3128
|
applyLabel: w = "Aplicar",
|
|
3069
3129
|
cancelLabel: D = "Cancelar",
|
|
3070
|
-
onApply:
|
|
3071
|
-
onCancel:
|
|
3072
|
-
hideFooter:
|
|
3130
|
+
onApply: S,
|
|
3131
|
+
onCancel: M,
|
|
3132
|
+
hideFooter: k = !1,
|
|
3073
3133
|
variant: y = "input",
|
|
3074
3134
|
inputProps: p,
|
|
3075
|
-
label:
|
|
3076
|
-
name:
|
|
3077
|
-
className:
|
|
3078
|
-
} = e,
|
|
3079
|
-
|
|
3080
|
-
window.innerWidth < 768 ?
|
|
3081
|
-
}, []),
|
|
3082
|
-
f &&
|
|
3083
|
-
}, [
|
|
3084
|
-
if (y !== "input" || !
|
|
3085
|
-
const
|
|
3086
|
-
|
|
3135
|
+
label: v = "",
|
|
3136
|
+
name: b = "datepicker",
|
|
3137
|
+
className: m
|
|
3138
|
+
} = e, C = t === "range" || t === "multiple" ? e.min : void 0, x = t === "range" || t === "multiple" ? e.max : void 0, B = t === "range" ? e.excludeDisabled : void 0, [F, A] = ye({}), [j, $] = ye(!1), [J, he] = ye(!1), [ce, ue] = ye(n), [We, G] = ye(!1), L = xe(null), Z = xe(null), ge = f ? ce : n, X = f ? n : ge;
|
|
3139
|
+
Fe(() => {
|
|
3140
|
+
window.innerWidth < 768 ? G(!0) : G(!1);
|
|
3141
|
+
}, []), Fe(() => {
|
|
3142
|
+
f && ue(n);
|
|
3143
|
+
}, [n, f]), Fe(() => {
|
|
3144
|
+
if (y !== "input" || !j) return;
|
|
3145
|
+
const P = (V) => {
|
|
3146
|
+
L.current && !L.current.contains(V.target) && ($(!1), f && ue(n));
|
|
3087
3147
|
};
|
|
3088
|
-
return document.addEventListener("mousedown",
|
|
3089
|
-
document.removeEventListener("mousedown",
|
|
3148
|
+
return document.addEventListener("mousedown", P), () => {
|
|
3149
|
+
document.removeEventListener("mousedown", P);
|
|
3090
3150
|
};
|
|
3091
|
-
}, [y,
|
|
3092
|
-
if (!
|
|
3093
|
-
|
|
3151
|
+
}, [y, j, n, f]), Fe(() => {
|
|
3152
|
+
if (!j || y !== "input" || !L.current) {
|
|
3153
|
+
he(!1);
|
|
3094
3154
|
return;
|
|
3095
3155
|
}
|
|
3096
|
-
const
|
|
3097
|
-
const
|
|
3098
|
-
if (!
|
|
3099
|
-
const
|
|
3100
|
-
let
|
|
3101
|
-
|
|
3102
|
-
const
|
|
3103
|
-
|
|
3156
|
+
const P = 16, V = () => {
|
|
3157
|
+
const Me = L?.current?.getBoundingClientRect(), ve = Z?.current?.getBoundingClientRect();
|
|
3158
|
+
if (!Me || !ve) return;
|
|
3159
|
+
const it = window.innerHeight, ct = window.innerWidth, Ge = Me.height, Ve = Me.width, Xe = ve.left, De = ve.bottom, Ee = De, Qe = it - De, Ue = ct - ve.left, _e = Ve - Ue, Ze = _e > 0 && Ue >= Ve + P, Ke = Ee >= Ge + P, Je = Qe >= Ge + P, et = !Je && Ke, ut = !Je && !Ke;
|
|
3160
|
+
let tt = et ? void 0 : `${De + 8}px`, nt = et ? `${Qe + ve.height + 8}px` : void 0;
|
|
3161
|
+
ut && (tt = void 0, nt = `${P}px`);
|
|
3162
|
+
const dt = _e > 0 ? _e : 0;
|
|
3163
|
+
A(
|
|
3104
3164
|
{
|
|
3105
|
-
top:
|
|
3106
|
-
bottom:
|
|
3107
|
-
right:
|
|
3108
|
-
left:
|
|
3165
|
+
top: tt,
|
|
3166
|
+
bottom: nt,
|
|
3167
|
+
right: Ze ? "0" : void 0,
|
|
3168
|
+
left: Ze ? void 0 : `${Xe - dt}px`
|
|
3109
3169
|
}
|
|
3110
|
-
),
|
|
3111
|
-
},
|
|
3112
|
-
$(!1),
|
|
3170
|
+
), he(!0);
|
|
3171
|
+
}, ee = () => {
|
|
3172
|
+
$(!1), he(!1);
|
|
3113
3173
|
};
|
|
3114
|
-
window.addEventListener("scroll",
|
|
3115
|
-
const we = setTimeout(
|
|
3174
|
+
window.addEventListener("scroll", ee, !0);
|
|
3175
|
+
const we = setTimeout(V, 0);
|
|
3116
3176
|
return () => {
|
|
3117
|
-
clearTimeout(we), window.removeEventListener("scroll",
|
|
3177
|
+
clearTimeout(we), window.removeEventListener("scroll", ee, !0);
|
|
3118
3178
|
};
|
|
3119
|
-
}, [
|
|
3120
|
-
const
|
|
3121
|
-
|
|
3122
|
-
}, [
|
|
3123
|
-
|
|
3124
|
-
}, [
|
|
3179
|
+
}, [j, y]);
|
|
3180
|
+
const Se = R(() => {
|
|
3181
|
+
S?.(ce), r?.(ce), y === "input" && $(!1);
|
|
3182
|
+
}, [S, r, ce, y]), pe = R(() => {
|
|
3183
|
+
ue(n), M?.(), y === "input" && $(!1);
|
|
3184
|
+
}, [M, n, y]), Re = se(() => {
|
|
3125
3185
|
if (!X) return "";
|
|
3126
3186
|
if (t === "single")
|
|
3127
3187
|
return X.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
|
|
3128
3188
|
if (t === "range") {
|
|
3129
|
-
const
|
|
3130
|
-
if (!
|
|
3131
|
-
const
|
|
3132
|
-
if (!
|
|
3133
|
-
const
|
|
3134
|
-
return `${
|
|
3189
|
+
const P = X;
|
|
3190
|
+
if (!P.from) return "";
|
|
3191
|
+
const V = P.from.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
|
|
3192
|
+
if (!P.to) return V;
|
|
3193
|
+
const ee = P.to.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" });
|
|
3194
|
+
return `${V} - ${ee}`;
|
|
3135
3195
|
}
|
|
3136
3196
|
if (t === "multiple") {
|
|
3137
|
-
const
|
|
3138
|
-
return
|
|
3197
|
+
const P = X;
|
|
3198
|
+
return P.length === 0 ? "" : P.length === 1 ? P[0].toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" }) : `${P.length} fechas seleccionadas`;
|
|
3139
3199
|
}
|
|
3140
3200
|
return "";
|
|
3141
|
-
}, [X, t]),
|
|
3142
|
-
r?.(
|
|
3143
|
-
}, [r]),
|
|
3144
|
-
const
|
|
3201
|
+
}, [X, t]), Le = se(() => y === "input" || y === "input-and-calendar", [y]), at = se(() => y === "only-calendar" || y === "input-and-calendar" || y === "input", [y]), Ye = R((P) => {
|
|
3202
|
+
r?.(P);
|
|
3203
|
+
}, [r]), be = R((P) => {
|
|
3204
|
+
const V = new Date(parseInt(P.slice(6, 10)), parseInt(P.slice(3, 5)) - 1, parseInt(P.slice(0, 2)));
|
|
3145
3205
|
if (t === "multiple") {
|
|
3146
|
-
const we = (X || []).filter((
|
|
3147
|
-
f ? (r?.(we),
|
|
3206
|
+
const we = (X || []).filter((Me) => Me.getTime() !== V.getTime());
|
|
3207
|
+
f ? (r?.(we), ue(we)) : Ye(we);
|
|
3148
3208
|
}
|
|
3149
|
-
}, [t, X, f, r,
|
|
3209
|
+
}, [t, X, f, r, Ye]), ze = R((P) => {
|
|
3150
3210
|
if (f) {
|
|
3151
|
-
|
|
3211
|
+
ue(P);
|
|
3152
3212
|
return;
|
|
3153
3213
|
}
|
|
3154
|
-
y === "input" && t === "single" && $(!1), r?.(
|
|
3155
|
-
}, [f, y, t, r]),
|
|
3156
|
-
const
|
|
3214
|
+
y === "input" && t === "single" && $(!1), r?.(P);
|
|
3215
|
+
}, [f, y, t, r]), st = R(() => {
|
|
3216
|
+
const P = X || [];
|
|
3157
3217
|
return /* @__PURE__ */ q.jsx(
|
|
3158
|
-
|
|
3218
|
+
vn,
|
|
3159
3219
|
{
|
|
3160
|
-
label:
|
|
3220
|
+
label: v,
|
|
3161
3221
|
placeholder: "Seleccione una o más fechas",
|
|
3162
|
-
name:
|
|
3163
|
-
value:
|
|
3222
|
+
name: b,
|
|
3223
|
+
value: P.sort((V, ee) => V.getTime() - ee.getTime()).map((V) => V.toLocaleDateString("es-ES", { day: "2-digit", month: "2-digit", year: "numeric" })),
|
|
3164
3224
|
onChange: () => {
|
|
3165
3225
|
},
|
|
3166
3226
|
onClick: () => $(!0),
|
|
3167
|
-
className:
|
|
3227
|
+
className: Ie("w-[360px]", p?.className),
|
|
3168
3228
|
readonly: !0,
|
|
3169
|
-
onValueDelete:
|
|
3170
|
-
icon: /* @__PURE__ */ q.jsx(
|
|
3229
|
+
onValueDelete: be,
|
|
3230
|
+
icon: /* @__PURE__ */ q.jsx(St, {})
|
|
3171
3231
|
}
|
|
3172
3232
|
);
|
|
3173
|
-
}, [X,
|
|
3174
|
-
return /* @__PURE__ */ q.jsxs("div", { className:
|
|
3175
|
-
|
|
3233
|
+
}, [X, v, b, be, p]);
|
|
3234
|
+
return /* @__PURE__ */ q.jsxs("div", { className: Ie("relative w-max flex flex-col gap-2 lg:min-w-[360px] min-w-auto", p?.className), children: [
|
|
3235
|
+
Le && /* @__PURE__ */ q.jsx(
|
|
3176
3236
|
"div",
|
|
3177
3237
|
{
|
|
3178
|
-
ref:
|
|
3238
|
+
ref: Z,
|
|
3179
3239
|
className: "relative w-full",
|
|
3180
|
-
children: t === "multiple" ?
|
|
3181
|
-
|
|
3240
|
+
children: t === "multiple" ? st() : /* @__PURE__ */ q.jsx(
|
|
3241
|
+
Dn,
|
|
3182
3242
|
{
|
|
3183
3243
|
readOnly: !0,
|
|
3184
3244
|
...p,
|
|
3185
|
-
icon: /* @__PURE__ */ q.jsx(
|
|
3245
|
+
icon: /* @__PURE__ */ q.jsx(St, {}),
|
|
3186
3246
|
iconPosition: "right",
|
|
3187
3247
|
type: "text",
|
|
3188
|
-
value:
|
|
3248
|
+
value: Re,
|
|
3189
3249
|
onChange: () => {
|
|
3190
3250
|
},
|
|
3191
|
-
name:
|
|
3192
|
-
label:
|
|
3193
|
-
onFocus: (
|
|
3194
|
-
|
|
3251
|
+
name: b,
|
|
3252
|
+
label: v,
|
|
3253
|
+
onFocus: (P) => {
|
|
3254
|
+
P.stopPropagation(), y === "input" && $(!0);
|
|
3195
3255
|
}
|
|
3196
3256
|
}
|
|
3197
3257
|
)
|
|
3198
3258
|
}
|
|
3199
3259
|
),
|
|
3200
|
-
|
|
3260
|
+
at && (y === "input" ? document?.body && kn(
|
|
3201
3261
|
/* @__PURE__ */ q.jsx(
|
|
3202
|
-
|
|
3262
|
+
Mt,
|
|
3203
3263
|
{
|
|
3204
3264
|
mode: t,
|
|
3205
|
-
footer:
|
|
3206
|
-
header:
|
|
3207
|
-
selected:
|
|
3208
|
-
ref:
|
|
3265
|
+
footer: i,
|
|
3266
|
+
header: a,
|
|
3267
|
+
selected: n,
|
|
3268
|
+
ref: L,
|
|
3209
3269
|
endMonth: u,
|
|
3210
|
-
required:
|
|
3211
|
-
onApply:
|
|
3212
|
-
onCancel:
|
|
3213
|
-
hideFooter:
|
|
3270
|
+
required: o,
|
|
3271
|
+
onApply: Se,
|
|
3272
|
+
onCancel: pe,
|
|
3273
|
+
hideFooter: k,
|
|
3214
3274
|
startMonth: l,
|
|
3215
3275
|
applyLabel: w,
|
|
3216
3276
|
cancelLabel: D,
|
|
3217
|
-
displayValue:
|
|
3218
|
-
disabledDates:
|
|
3219
|
-
numberOfMonths:
|
|
3277
|
+
displayValue: ge,
|
|
3278
|
+
disabledDates: s,
|
|
3279
|
+
numberOfMonths: We ? 1 : d,
|
|
3220
3280
|
onSelect: ze,
|
|
3221
3281
|
hideOutsideDays: c,
|
|
3222
3282
|
showActionButtons: f,
|
|
3223
|
-
min:
|
|
3283
|
+
min: C,
|
|
3224
3284
|
max: x,
|
|
3225
|
-
excludeDisabled:
|
|
3226
|
-
className:
|
|
3285
|
+
excludeDisabled: B,
|
|
3286
|
+
className: Ie("bg-neutral-strong-default text-neutral-default-default shadow", m),
|
|
3227
3287
|
style: {
|
|
3228
|
-
top:
|
|
3229
|
-
left:
|
|
3230
|
-
bottom:
|
|
3231
|
-
right:
|
|
3232
|
-
opacity:
|
|
3288
|
+
top: F?.top,
|
|
3289
|
+
left: F?.left,
|
|
3290
|
+
bottom: F?.bottom,
|
|
3291
|
+
right: F?.right,
|
|
3292
|
+
opacity: J && j ? 1 : 0,
|
|
3233
3293
|
transition: "opacity 0.15s linear",
|
|
3234
3294
|
position: "fixed",
|
|
3235
3295
|
zIndex: 1e3,
|
|
3236
|
-
pointerEvents:
|
|
3296
|
+
pointerEvents: J && j ? "auto" : "none"
|
|
3237
3297
|
}
|
|
3238
3298
|
}
|
|
3239
3299
|
),
|
|
3240
3300
|
document.body
|
|
3241
3301
|
) : /* @__PURE__ */ q.jsx(
|
|
3242
|
-
|
|
3302
|
+
Mt,
|
|
3243
3303
|
{
|
|
3244
|
-
min:
|
|
3304
|
+
min: C,
|
|
3245
3305
|
max: x,
|
|
3246
3306
|
mode: t,
|
|
3247
|
-
header:
|
|
3248
|
-
footer:
|
|
3249
|
-
required:
|
|
3307
|
+
header: a,
|
|
3308
|
+
footer: i,
|
|
3309
|
+
required: o,
|
|
3250
3310
|
endMonth: u,
|
|
3251
|
-
selected:
|
|
3252
|
-
className:
|
|
3253
|
-
onApply:
|
|
3311
|
+
selected: n,
|
|
3312
|
+
className: m,
|
|
3313
|
+
onApply: Se,
|
|
3254
3314
|
startMonth: l,
|
|
3255
3315
|
applyLabel: w,
|
|
3256
|
-
hideFooter:
|
|
3257
|
-
onCancel:
|
|
3316
|
+
hideFooter: k,
|
|
3317
|
+
onCancel: pe,
|
|
3258
3318
|
cancelLabel: D,
|
|
3259
|
-
displayValue:
|
|
3260
|
-
disabledDates:
|
|
3261
|
-
numberOfMonths:
|
|
3319
|
+
displayValue: ge,
|
|
3320
|
+
disabledDates: s,
|
|
3321
|
+
numberOfMonths: We ? 1 : d,
|
|
3262
3322
|
onSelect: ze,
|
|
3263
3323
|
hideOutsideDays: c,
|
|
3264
3324
|
showActionButtons: f,
|
|
3265
|
-
excludeDisabled:
|
|
3325
|
+
excludeDisabled: B
|
|
3266
3326
|
}
|
|
3267
3327
|
))
|
|
3268
3328
|
] });
|
|
3269
|
-
},
|
|
3329
|
+
}, Mt = Mn((e) => {
|
|
3270
3330
|
const {
|
|
3271
3331
|
ref: t,
|
|
3272
|
-
min:
|
|
3273
|
-
max:
|
|
3332
|
+
min: o,
|
|
3333
|
+
max: n,
|
|
3274
3334
|
style: r,
|
|
3275
|
-
header:
|
|
3276
|
-
footer:
|
|
3277
|
-
onApply:
|
|
3335
|
+
header: s,
|
|
3336
|
+
footer: a,
|
|
3337
|
+
onApply: i,
|
|
3278
3338
|
onCancel: c,
|
|
3279
3339
|
onSelect: d,
|
|
3280
3340
|
selected: l,
|
|
@@ -3282,18 +3342,18 @@ const Da = {
|
|
|
3282
3342
|
endMonth: f,
|
|
3283
3343
|
className: w,
|
|
3284
3344
|
startMonth: D,
|
|
3285
|
-
displayValue:
|
|
3286
|
-
disabledDates:
|
|
3287
|
-
excludeDisabled:
|
|
3345
|
+
displayValue: S,
|
|
3346
|
+
disabledDates: M,
|
|
3347
|
+
excludeDisabled: k,
|
|
3288
3348
|
mode: y = "single",
|
|
3289
3349
|
readonly: p = !1,
|
|
3290
|
-
numberOfMonths:
|
|
3291
|
-
hideFooter:
|
|
3292
|
-
applyLabel:
|
|
3293
|
-
cancelLabel:
|
|
3350
|
+
numberOfMonths: v = 1,
|
|
3351
|
+
hideFooter: b = !1,
|
|
3352
|
+
applyLabel: m = "Aplicar",
|
|
3353
|
+
cancelLabel: C = "Cancelar",
|
|
3294
3354
|
hideOutsideDays: x = !1,
|
|
3295
|
-
showActionButtons:
|
|
3296
|
-
} = e,
|
|
3355
|
+
showActionButtons: B = !1
|
|
3356
|
+
} = e, F = se(() => {
|
|
3297
3357
|
if (l) {
|
|
3298
3358
|
if (y === "single")
|
|
3299
3359
|
return l;
|
|
@@ -3304,9 +3364,9 @@ const Da = {
|
|
|
3304
3364
|
return $.length > 0 ? $[0] : void 0;
|
|
3305
3365
|
}
|
|
3306
3366
|
}
|
|
3307
|
-
}, [l, y]),
|
|
3367
|
+
}, [l, y]), A = se(() => ({
|
|
3308
3368
|
formatWeekdayName: ($) => $.toLocaleDateString("es-ES", { weekday: "narrow" }).toUpperCase()
|
|
3309
|
-
}), []),
|
|
3369
|
+
}), []), j = se(() => ({
|
|
3310
3370
|
// Días de la semana (cabecera)
|
|
3311
3371
|
weekday: " prometeo-fonts-body-large text-neutral-default-default h-12 w-12 ",
|
|
3312
3372
|
// Días del mes
|
|
@@ -3332,32 +3392,32 @@ const Da = {
|
|
|
3332
3392
|
"div",
|
|
3333
3393
|
{
|
|
3334
3394
|
ref: t,
|
|
3335
|
-
className:
|
|
3395
|
+
className: Ie(
|
|
3336
3396
|
"border border-neutral-default-default rounded-lg",
|
|
3337
3397
|
w
|
|
3338
3398
|
),
|
|
3339
3399
|
style: {
|
|
3340
3400
|
...r,
|
|
3341
|
-
width:
|
|
3401
|
+
width: v * 360,
|
|
3342
3402
|
overflowX: "auto"
|
|
3343
3403
|
},
|
|
3344
3404
|
children: [
|
|
3345
|
-
|
|
3405
|
+
s && /* @__PURE__ */ q.jsx("div", { className: "pt-6 pl-6 pr-3 pb-2 min-h-[68px]", children: typeof s == "string" ? /* @__PURE__ */ q.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: s }) : s }),
|
|
3346
3406
|
y === "single" && /* @__PURE__ */ q.jsx(
|
|
3347
|
-
|
|
3407
|
+
pt,
|
|
3348
3408
|
{
|
|
3349
|
-
locale:
|
|
3409
|
+
locale: bt,
|
|
3350
3410
|
mode: "single",
|
|
3351
3411
|
captionLayout: "dropdown",
|
|
3352
|
-
formatters:
|
|
3353
|
-
classNames:
|
|
3412
|
+
formatters: A,
|
|
3413
|
+
classNames: j,
|
|
3354
3414
|
required: u,
|
|
3355
|
-
disabled:
|
|
3356
|
-
selected:
|
|
3357
|
-
defaultMonth:
|
|
3415
|
+
disabled: M,
|
|
3416
|
+
selected: S,
|
|
3417
|
+
defaultMonth: F,
|
|
3358
3418
|
className: "px-3",
|
|
3359
3419
|
showOutsideDays: !x,
|
|
3360
|
-
numberOfMonths:
|
|
3420
|
+
numberOfMonths: v,
|
|
3361
3421
|
startMonth: D,
|
|
3362
3422
|
endMonth: f,
|
|
3363
3423
|
onSelect: p ? () => {
|
|
@@ -3365,68 +3425,68 @@ const Da = {
|
|
|
3365
3425
|
}
|
|
3366
3426
|
),
|
|
3367
3427
|
y === "range" && /* @__PURE__ */ q.jsx(
|
|
3368
|
-
|
|
3428
|
+
pt,
|
|
3369
3429
|
{
|
|
3370
3430
|
mode: "range",
|
|
3371
3431
|
captionLayout: "dropdown",
|
|
3372
|
-
formatters:
|
|
3373
|
-
classNames:
|
|
3374
|
-
numberOfMonths:
|
|
3375
|
-
selected:
|
|
3376
|
-
defaultMonth:
|
|
3432
|
+
formatters: A,
|
|
3433
|
+
classNames: j,
|
|
3434
|
+
numberOfMonths: v,
|
|
3435
|
+
selected: S,
|
|
3436
|
+
defaultMonth: F,
|
|
3377
3437
|
onSelect: p ? () => {
|
|
3378
3438
|
} : d,
|
|
3379
3439
|
required: u,
|
|
3380
|
-
disabled:
|
|
3440
|
+
disabled: M,
|
|
3381
3441
|
startMonth: D,
|
|
3382
3442
|
endMonth: f,
|
|
3383
|
-
min:
|
|
3384
|
-
max:
|
|
3443
|
+
min: o,
|
|
3444
|
+
max: n,
|
|
3385
3445
|
pagedNavigation: !0,
|
|
3386
|
-
locale:
|
|
3387
|
-
excludeDisabled:
|
|
3446
|
+
locale: bt,
|
|
3447
|
+
excludeDisabled: k ?? !0
|
|
3388
3448
|
}
|
|
3389
3449
|
),
|
|
3390
3450
|
y === "multiple" && /* @__PURE__ */ q.jsx(
|
|
3391
|
-
|
|
3451
|
+
pt,
|
|
3392
3452
|
{
|
|
3393
3453
|
mode: "multiple",
|
|
3394
3454
|
captionLayout: "dropdown",
|
|
3395
|
-
formatters:
|
|
3396
|
-
classNames:
|
|
3397
|
-
selected:
|
|
3398
|
-
defaultMonth:
|
|
3455
|
+
formatters: A,
|
|
3456
|
+
classNames: j,
|
|
3457
|
+
selected: S,
|
|
3458
|
+
defaultMonth: F,
|
|
3399
3459
|
onSelect: p ? () => {
|
|
3400
3460
|
} : d,
|
|
3401
3461
|
required: u,
|
|
3402
|
-
disabled:
|
|
3462
|
+
disabled: M,
|
|
3403
3463
|
startMonth: D,
|
|
3404
3464
|
endMonth: f,
|
|
3405
|
-
min:
|
|
3406
|
-
max:
|
|
3407
|
-
locale:
|
|
3465
|
+
min: o,
|
|
3466
|
+
max: n,
|
|
3467
|
+
locale: bt
|
|
3408
3468
|
}
|
|
3409
3469
|
),
|
|
3410
|
-
!
|
|
3470
|
+
!b && /* @__PURE__ */ q.jsx("div", { className: Ie(
|
|
3411
3471
|
"w-full min-h-[40px] pt-2 px-3 pb-3 flex items-center relative"
|
|
3412
|
-
), children: typeof
|
|
3413
|
-
|
|
3472
|
+
), children: typeof a == "string" ? /* @__PURE__ */ q.jsx("p", { className: "prometeo-fonts-label-large text-neutral-medium-default w-64 ", children: a }) : a }),
|
|
3473
|
+
B && /* @__PURE__ */ q.jsxs("div", { className: "w-full px-3 pb-3 pt-2 flex gap-2 justify-end ", children: [
|
|
3414
3474
|
/* @__PURE__ */ q.jsx(
|
|
3415
|
-
|
|
3475
|
+
Ct,
|
|
3416
3476
|
{
|
|
3417
3477
|
variant: "text",
|
|
3418
3478
|
onClick: c,
|
|
3419
3479
|
color: "secondary",
|
|
3420
|
-
children:
|
|
3480
|
+
children: C
|
|
3421
3481
|
}
|
|
3422
3482
|
),
|
|
3423
3483
|
/* @__PURE__ */ q.jsx(
|
|
3424
|
-
|
|
3484
|
+
Ct,
|
|
3425
3485
|
{
|
|
3426
|
-
onClick:
|
|
3486
|
+
onClick: i,
|
|
3427
3487
|
variant: "text",
|
|
3428
3488
|
color: "primary",
|
|
3429
|
-
children:
|
|
3489
|
+
children: m
|
|
3430
3490
|
}
|
|
3431
3491
|
)
|
|
3432
3492
|
] })
|
|
@@ -3434,7 +3494,7 @@ const Da = {
|
|
|
3434
3494
|
}
|
|
3435
3495
|
);
|
|
3436
3496
|
});
|
|
3437
|
-
|
|
3497
|
+
Mt.displayName = "Calendar";
|
|
3438
3498
|
export {
|
|
3439
|
-
|
|
3499
|
+
ds as default
|
|
3440
3500
|
};
|