@adamosuiteservices/ui 2.9.15 → 2.10.0
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/accordion-rounded.cjs +12 -17
- package/dist/accordion-rounded.js +37 -46
- package/dist/accordion.cjs +8 -7
- package/dist/accordion.js +19 -17
- package/dist/alert.cjs +7 -3
- package/dist/alert.js +14 -10
- package/dist/avatar.cjs +2 -0
- package/dist/avatar.js +42 -40
- package/dist/badge.cjs +9 -2
- package/dist/badge.js +19 -12
- package/dist/breadcrumb.cjs +7 -3
- package/dist/breadcrumb.js +30 -24
- package/dist/{button-B7ZP4LZN.js → button-CUNnLccZ.js} +11 -6
- package/dist/{button-D-qFRXiM.cjs → button-CxGyLoeN.cjs} +7 -2
- package/dist/button-group.cjs +2 -0
- package/dist/button-group.js +15 -13
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.cjs +8 -6
- package/dist/calendar.js +507 -492
- package/dist/card.cjs +9 -4
- package/dist/card.js +8 -3
- package/dist/checkbox-CFGlO5wt.cjs +22 -0
- package/dist/{checkbox-DhBcmKze.js → checkbox-DsN1IQGA.js} +70 -68
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/combobox.cjs +10 -13
- package/dist/combobox.js +90 -99
- package/dist/components/ui/icon/icon.d.ts +1 -3
- package/dist/components/ui/icon/icon.stories.d.ts +0 -5
- package/dist/components/ui/spinner/spinner.d.ts +1 -1
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +0 -1
- package/dist/context-menu.cjs +10 -8
- package/dist/context-menu.js +126 -120
- package/dist/custom-layered-styles.css +1 -1
- package/dist/dialog.cjs +10 -7
- package/dist/dialog.js +43 -40
- package/dist/dropdown-menu.cjs +25 -10
- package/dist/dropdown-menu.js +179 -166
- package/dist/icon-D0vVkV-A.js +35 -0
- package/dist/icon-SWksUOv5.cjs +6 -0
- package/dist/icon.cjs +1 -1
- package/dist/icon.js +1 -1
- package/dist/icons.css +1 -1
- package/dist/input-group.cjs +14 -6
- package/dist/input-group.js +25 -17
- package/dist/kbd.cjs +3 -3
- package/dist/kbd.js +1 -0
- package/dist/pagination.cjs +4 -4
- package/dist/pagination.js +41 -43
- package/dist/radio-group.cjs +5 -5
- package/dist/radio-group.js +44 -42
- package/dist/radius.css +1 -1
- package/dist/select.cjs +12 -13
- package/dist/select.js +182 -187
- package/dist/{sheet-Q3dBOQG-.js → sheet-DM7b3ckK.js} +18 -18
- package/dist/{sheet-CGahUP7F.cjs → sheet-DfRu4ByS.cjs} +4 -4
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +6 -11
- package/dist/sidebar.js +38 -49
- package/dist/spinner.cjs +1 -6
- package/dist/spinner.js +10 -16
- package/dist/styles.css +1 -1
- package/dist/tabs-underline.cjs +6 -3
- package/dist/tabs-underline.js +8 -5
- package/dist/tabs.cjs +6 -3
- package/dist/tabs.js +8 -5
- package/dist/toggle.cjs +5 -2
- package/dist/toggle.js +14 -11
- package/docs/components/layout/sidebar.md +18 -23
- package/docs/components/ui/accordion-rounded.md +584 -583
- package/docs/components/ui/accordion.md +3 -1
- package/docs/components/ui/alert.md +650 -671
- package/docs/components/ui/avatar.md +587 -588
- package/docs/components/ui/badge.md +1019 -1024
- package/docs/components/ui/breadcrumb.md +14 -14
- package/docs/components/ui/button-group.md +69 -87
- package/docs/components/ui/button.md +17 -17
- package/docs/components/ui/calendar.md +6 -6
- package/docs/components/ui/card.md +21 -27
- package/docs/components/ui/collapsible.md +16 -13
- package/docs/components/ui/combobox.md +14 -14
- package/docs/components/ui/command.md +6 -6
- package/docs/components/ui/context-menu.md +23 -23
- package/docs/components/ui/dialog.md +16 -16
- package/docs/components/ui/dropdown-menu.md +44 -66
- package/docs/components/ui/hover-card.md +5 -5
- package/docs/components/ui/icon.md +87 -88
- package/docs/components/ui/input-group.md +523 -509
- package/docs/components/ui/kbd.md +8 -8
- package/docs/components/ui/label.md +5 -5
- package/docs/components/ui/pagination.md +5 -5
- package/docs/components/ui/popover.md +14 -14
- package/docs/components/ui/progress.md +2 -2
- package/docs/components/ui/radio-group.md +2 -2
- package/docs/components/ui/select.md +6 -6
- package/docs/components/ui/spinner.md +15 -15
- package/docs/components/ui/switch.md +15 -9
- package/docs/components/ui/tabs-underline.md +4 -4
- package/docs/components/ui/tabs.md +5 -5
- package/docs/components/ui/toggle.md +17 -23
- package/docs/components/ui/tooltip.md +7 -10
- package/package.json +1 -1
- package/dist/check-CLxNVljQ.cjs +0 -6
- package/dist/check-Ci0GjV-B.js +0 -11
- package/dist/checkbox-CdnZ8VFJ.cjs +0 -21
- package/dist/chevron-down-BqEHzml5.cjs +0 -6
- package/dist/chevron-down-CpVS2Z7w.js +0 -11
- package/dist/chevron-left-B8QsBNvc.cjs +0 -6
- package/dist/chevron-left-Eal-WYLp.js +0 -11
- package/dist/chevron-right-BpzggHsr.cjs +0 -6
- package/dist/chevron-right-Cnc2tB4-.js +0 -11
- package/dist/circle-CX7JIirj.cjs +0 -6
- package/dist/circle-DYv-7Qb9.js +0 -11
- package/dist/createLucideIcon-B_8CJpcQ.js +0 -94
- package/dist/createLucideIcon-CAtnV-yz.cjs +0 -21
- package/dist/ellipsis-CryjZKZn.js +0 -15
- package/dist/ellipsis-Ct9VTDOG.cjs +0 -6
- package/dist/icon-DTx6Y_mx.cjs +0 -6
- package/dist/icon-DmU_SEHC.js +0 -36
- package/dist/minus-C0pHPx21.cjs +0 -6
- package/dist/minus-DE-onYs2.js +0 -11
- package/dist/x-CBKgg4YL.cjs +0 -6
- package/dist/x-Dl66o_vF.js +0 -14
package/dist/calendar.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { j as ne } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { b as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { C as gn } from "./chevron-down-CpVS2Z7w.js";
|
|
9
|
-
function pn(e, t, n = "long") {
|
|
2
|
+
import { b as Xe, B as un } from "./button-CUNnLccZ.js";
|
|
3
|
+
import { I as Te } from "./icon-D0vVkV-A.js";
|
|
4
|
+
import { c as N } from "./index-CRiPKpXj.js";
|
|
5
|
+
import * as Ue from "react";
|
|
6
|
+
import f, { createContext as ln, useContext as fn, useCallback as $, useRef as De, useLayoutEffect as mn, useState as He, useEffect as hn, useMemo as Ee } from "react";
|
|
7
|
+
function yn(e, t, n = "long") {
|
|
10
8
|
return new Intl.DateTimeFormat("en-US", {
|
|
11
9
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
12
10
|
hour: "numeric",
|
|
@@ -14,29 +12,29 @@ function pn(e, t, n = "long") {
|
|
|
14
12
|
timeZoneName: n
|
|
15
13
|
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
16
14
|
}
|
|
17
|
-
const
|
|
15
|
+
const gn = {}, me = {};
|
|
18
16
|
function oe(e, t) {
|
|
19
17
|
try {
|
|
20
|
-
const r = (
|
|
18
|
+
const r = (gn[e] ||= new Intl.DateTimeFormat("en-US", {
|
|
21
19
|
timeZone: e,
|
|
22
20
|
timeZoneName: "longOffset"
|
|
23
21
|
}).format)(t).split("GMT")[1];
|
|
24
|
-
return r in me ? me[r] :
|
|
22
|
+
return r in me ? me[r] : Ve(r, r.split(":"));
|
|
25
23
|
} catch {
|
|
26
24
|
if (e in me) return me[e];
|
|
27
|
-
const n = e?.match(
|
|
28
|
-
return n ?
|
|
25
|
+
const n = e?.match(pn);
|
|
26
|
+
return n ? Ve(e, n.slice(1)) : NaN;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
|
-
const
|
|
32
|
-
function
|
|
29
|
+
const pn = /([+-]\d\d):?(\d\d)?/;
|
|
30
|
+
function Ve(e, t) {
|
|
33
31
|
const n = +(t[0] || 0), r = +(t[1] || 0), o = +(t[2] || 0) / 60;
|
|
34
32
|
return me[e] = n * 60 + r > 0 ? n * 60 + r + o : n * 60 - r - o;
|
|
35
33
|
}
|
|
36
34
|
class U extends Date {
|
|
37
35
|
//#region static
|
|
38
36
|
constructor(...t) {
|
|
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)),
|
|
37
|
+
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)), dt(this), qe(this)) : this.setTime(Date.now());
|
|
40
38
|
}
|
|
41
39
|
static tz(t, ...n) {
|
|
42
40
|
return n.length ? new U(...n, t) : new U(Date.now(), t);
|
|
@@ -53,7 +51,7 @@ class U extends Date {
|
|
|
53
51
|
//#endregion
|
|
54
52
|
//#region time
|
|
55
53
|
setTime(t) {
|
|
56
|
-
return Date.prototype.setTime.apply(this, arguments),
|
|
54
|
+
return Date.prototype.setTime.apply(this, arguments), qe(this), +this;
|
|
57
55
|
}
|
|
58
56
|
//#endregion
|
|
59
57
|
//#region date-fns integration
|
|
@@ -62,25 +60,25 @@ class U extends Date {
|
|
|
62
60
|
}
|
|
63
61
|
//#endregion
|
|
64
62
|
}
|
|
65
|
-
const
|
|
63
|
+
const Ke = /^(get|set)(?!UTC)/;
|
|
66
64
|
Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
67
|
-
if (!
|
|
68
|
-
const t = e.replace(
|
|
65
|
+
if (!Ke.test(e)) return;
|
|
66
|
+
const t = e.replace(Ke, "$1UTC");
|
|
69
67
|
U.prototype[t] && (e.startsWith("get") ? U.prototype[e] = function() {
|
|
70
68
|
return this.internal[t]();
|
|
71
69
|
} : (U.prototype[e] = function() {
|
|
72
|
-
return Date.prototype[t].apply(this.internal, arguments),
|
|
70
|
+
return Date.prototype[t].apply(this.internal, arguments), wn(this), +this;
|
|
73
71
|
}, U.prototype[t] = function() {
|
|
74
|
-
return Date.prototype[t].apply(this, arguments),
|
|
72
|
+
return Date.prototype[t].apply(this, arguments), qe(this), +this;
|
|
75
73
|
}));
|
|
76
74
|
});
|
|
77
|
-
function
|
|
75
|
+
function qe(e) {
|
|
78
76
|
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-oe(e.timeZone, e) * 60));
|
|
79
77
|
}
|
|
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()),
|
|
78
|
+
function wn(e) {
|
|
79
|
+
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()), dt(e);
|
|
82
80
|
}
|
|
83
|
-
function
|
|
81
|
+
function dt(e) {
|
|
84
82
|
const t = oe(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), r = /* @__PURE__ */ new Date(+e);
|
|
85
83
|
r.setUTCHours(r.getUTCHours() - 1);
|
|
86
84
|
const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+r)).getTimezoneOffset(), i = o - a, s = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
|
|
@@ -118,7 +116,7 @@ class H extends U {
|
|
|
118
116
|
}
|
|
119
117
|
toTimeString() {
|
|
120
118
|
const t = this.internal.toUTCString().split(" ")[4], [n, r, o] = this.tzComponents();
|
|
121
|
-
return `${t} GMT${n}${r}${o} (${
|
|
119
|
+
return `${t} GMT${n}${r}${o} (${yn(this.timeZone, this)})`;
|
|
122
120
|
}
|
|
123
121
|
toLocaleString(t, n) {
|
|
124
122
|
return Date.prototype.toLocaleString.call(this, t, {
|
|
@@ -154,18 +152,18 @@ class H extends U {
|
|
|
154
152
|
}
|
|
155
153
|
//#endregion
|
|
156
154
|
}
|
|
157
|
-
const
|
|
155
|
+
const ut = 6048e5, bn = 864e5, Je = Symbol.for("constructDateFrom");
|
|
158
156
|
function B(e, t) {
|
|
159
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
157
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && Je in e ? e[Je](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
160
158
|
}
|
|
161
159
|
function Y(e, t) {
|
|
162
160
|
return B(t || e, e);
|
|
163
161
|
}
|
|
164
|
-
function
|
|
162
|
+
function lt(e, t, n) {
|
|
165
163
|
const r = Y(e, n?.in);
|
|
166
164
|
return isNaN(t) ? B(e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
167
165
|
}
|
|
168
|
-
function
|
|
166
|
+
function ft(e, t, n) {
|
|
169
167
|
const r = Y(e, n?.in);
|
|
170
168
|
if (isNaN(t)) return B(e, NaN);
|
|
171
169
|
if (!t)
|
|
@@ -179,9 +177,9 @@ function lt(e, t, n) {
|
|
|
179
177
|
o
|
|
180
178
|
), r);
|
|
181
179
|
}
|
|
182
|
-
let
|
|
180
|
+
let Mn = {};
|
|
183
181
|
function ge() {
|
|
184
|
-
return
|
|
182
|
+
return Mn;
|
|
185
183
|
}
|
|
186
184
|
function de(e, t) {
|
|
187
185
|
const n = ge(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
@@ -190,7 +188,7 @@ function de(e, t) {
|
|
|
190
188
|
function he(e, t) {
|
|
191
189
|
return de(e, { ...t, weekStartsOn: 1 });
|
|
192
190
|
}
|
|
193
|
-
function
|
|
191
|
+
function mt(e, t) {
|
|
194
192
|
const n = Y(e, t?.in), r = n.getFullYear(), o = B(n, 0);
|
|
195
193
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
196
194
|
const a = he(o), i = B(n, 0);
|
|
@@ -198,7 +196,7 @@ function ft(e, t) {
|
|
|
198
196
|
const s = he(i);
|
|
199
197
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
200
198
|
}
|
|
201
|
-
function
|
|
199
|
+
function et(e) {
|
|
202
200
|
const t = Y(e), n = new Date(
|
|
203
201
|
Date.UTC(
|
|
204
202
|
t.getFullYear(),
|
|
@@ -223,25 +221,25 @@ function ye(e, t) {
|
|
|
223
221
|
const n = Y(e, t?.in);
|
|
224
222
|
return n.setHours(0, 0, 0, 0), n;
|
|
225
223
|
}
|
|
226
|
-
function
|
|
224
|
+
function ht(e, t, n) {
|
|
227
225
|
const [r, o] = ue(
|
|
228
226
|
n?.in,
|
|
229
227
|
e,
|
|
230
228
|
t
|
|
231
|
-
), a = ye(r), i = ye(o), s = +a -
|
|
232
|
-
return Math.round((s - c) /
|
|
229
|
+
), a = ye(r), i = ye(o), s = +a - et(a), c = +i - et(i);
|
|
230
|
+
return Math.round((s - c) / bn);
|
|
233
231
|
}
|
|
234
|
-
function
|
|
235
|
-
const n =
|
|
232
|
+
function kn(e, t) {
|
|
233
|
+
const n = mt(e, t), r = B(e, 0);
|
|
236
234
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), he(r);
|
|
237
235
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
236
|
+
function Dn(e, t, n) {
|
|
237
|
+
return lt(e, t * 7, n);
|
|
240
238
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
239
|
+
function vn(e, t, n) {
|
|
240
|
+
return ft(e, t * 12, n);
|
|
243
241
|
}
|
|
244
|
-
function
|
|
242
|
+
function On(e, t) {
|
|
245
243
|
let n, r = t?.in;
|
|
246
244
|
return e.forEach((o) => {
|
|
247
245
|
!r && typeof o == "object" && (r = B.bind(null, o));
|
|
@@ -249,7 +247,7 @@ function Sn(e, t) {
|
|
|
249
247
|
(!n || n < a || isNaN(+a)) && (n = a);
|
|
250
248
|
}), B(r, n || NaN);
|
|
251
249
|
}
|
|
252
|
-
function
|
|
250
|
+
function Wn(e, t) {
|
|
253
251
|
let n, r = t?.in;
|
|
254
252
|
return e.forEach((o) => {
|
|
255
253
|
!r && typeof o == "object" && (r = B.bind(null, o));
|
|
@@ -257,7 +255,7 @@ function Cn(e, t) {
|
|
|
257
255
|
(!n || n > a || isNaN(+a)) && (n = a);
|
|
258
256
|
}), B(r, n || NaN);
|
|
259
257
|
}
|
|
260
|
-
function
|
|
258
|
+
function Sn(e, t, n) {
|
|
261
259
|
const [r, o] = ue(
|
|
262
260
|
n?.in,
|
|
263
261
|
e,
|
|
@@ -265,13 +263,13 @@ function Nn(e, t, n) {
|
|
|
265
263
|
);
|
|
266
264
|
return +ye(r) == +ye(o);
|
|
267
265
|
}
|
|
268
|
-
function
|
|
266
|
+
function yt(e) {
|
|
269
267
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
270
268
|
}
|
|
271
|
-
function
|
|
272
|
-
return !(!
|
|
269
|
+
function Cn(e) {
|
|
270
|
+
return !(!yt(e) && typeof e != "number" || isNaN(+Y(e)));
|
|
273
271
|
}
|
|
274
|
-
function
|
|
272
|
+
function xn(e, t, n) {
|
|
275
273
|
const [r, o] = ue(
|
|
276
274
|
n?.in,
|
|
277
275
|
e,
|
|
@@ -279,16 +277,16 @@ function _n(e, t, n) {
|
|
|
279
277
|
), a = r.getFullYear() - o.getFullYear(), i = r.getMonth() - o.getMonth();
|
|
280
278
|
return a * 12 + i;
|
|
281
279
|
}
|
|
282
|
-
function
|
|
280
|
+
function Nn(e, t) {
|
|
283
281
|
const n = Y(e, t?.in), r = n.getMonth();
|
|
284
282
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
285
283
|
}
|
|
286
|
-
function
|
|
284
|
+
function gt(e, t) {
|
|
287
285
|
const [n, r] = ue(e, t.start, t.end);
|
|
288
286
|
return { start: n, end: r };
|
|
289
287
|
}
|
|
290
|
-
function
|
|
291
|
-
const { start: n, end: r } =
|
|
288
|
+
function _n(e, t) {
|
|
289
|
+
const { start: n, end: r } = gt(t?.in, e);
|
|
292
290
|
let o = +n > +r;
|
|
293
291
|
const a = o ? +n : +r, i = o ? r : n;
|
|
294
292
|
i.setHours(0, 0, 0, 0), i.setDate(1);
|
|
@@ -298,20 +296,20 @@ function Tn(e, t) {
|
|
|
298
296
|
c.push(B(n, i)), i.setMonth(i.getMonth() + s);
|
|
299
297
|
return o ? c.reverse() : c;
|
|
300
298
|
}
|
|
301
|
-
function
|
|
299
|
+
function Yn(e, t) {
|
|
302
300
|
const n = Y(e, t?.in);
|
|
303
301
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
304
302
|
}
|
|
305
|
-
function
|
|
303
|
+
function Tn(e, t) {
|
|
306
304
|
const n = Y(e, t?.in), r = n.getFullYear();
|
|
307
305
|
return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
|
|
308
306
|
}
|
|
309
|
-
function
|
|
307
|
+
function pt(e, t) {
|
|
310
308
|
const n = Y(e, t?.in);
|
|
311
309
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
312
310
|
}
|
|
313
|
-
function
|
|
314
|
-
const { start: n, end: r } =
|
|
311
|
+
function En(e, t) {
|
|
312
|
+
const { start: n, end: r } = gt(t?.in, e);
|
|
315
313
|
let o = +n > +r;
|
|
316
314
|
const a = o ? +n : +r, i = o ? r : n;
|
|
317
315
|
i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
|
|
@@ -321,14 +319,14 @@ function Fn(e, t) {
|
|
|
321
319
|
c.push(B(n, i)), i.setFullYear(i.getFullYear() + s);
|
|
322
320
|
return o ? c.reverse() : c;
|
|
323
321
|
}
|
|
324
|
-
function
|
|
322
|
+
function wt(e, t) {
|
|
325
323
|
const n = ge(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), a = o.getDay(), i = (a < r ? -7 : 0) + 6 - (a - r);
|
|
326
324
|
return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
|
|
327
325
|
}
|
|
328
|
-
function
|
|
329
|
-
return
|
|
326
|
+
function Pn(e, t) {
|
|
327
|
+
return wt(e, { ...t, weekStartsOn: 1 });
|
|
330
328
|
}
|
|
331
|
-
const
|
|
329
|
+
const Fn = {
|
|
332
330
|
lessThanXSeconds: {
|
|
333
331
|
one: "less than a second",
|
|
334
332
|
other: "less than {{count}} seconds"
|
|
@@ -390,53 +388,53 @@ const In = {
|
|
|
390
388
|
one: "almost 1 year",
|
|
391
389
|
other: "almost {{count}} years"
|
|
392
390
|
}
|
|
393
|
-
},
|
|
391
|
+
}, Bn = (e, t, n) => {
|
|
394
392
|
let r;
|
|
395
|
-
const o =
|
|
393
|
+
const o = Fn[e];
|
|
396
394
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
397
395
|
};
|
|
398
|
-
function
|
|
396
|
+
function Pe(e) {
|
|
399
397
|
return (t = {}) => {
|
|
400
398
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
401
399
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
402
400
|
};
|
|
403
401
|
}
|
|
404
|
-
const
|
|
402
|
+
const In = {
|
|
405
403
|
full: "EEEE, MMMM do, y",
|
|
406
404
|
long: "MMMM do, y",
|
|
407
405
|
medium: "MMM d, y",
|
|
408
406
|
short: "MM/dd/yyyy"
|
|
409
|
-
},
|
|
407
|
+
}, Hn = {
|
|
410
408
|
full: "h:mm:ss a zzzz",
|
|
411
409
|
long: "h:mm:ss a z",
|
|
412
410
|
medium: "h:mm:ss a",
|
|
413
411
|
short: "h:mm a"
|
|
414
|
-
},
|
|
412
|
+
}, qn = {
|
|
415
413
|
full: "{{date}} 'at' {{time}}",
|
|
416
414
|
long: "{{date}} 'at' {{time}}",
|
|
417
415
|
medium: "{{date}}, {{time}}",
|
|
418
416
|
short: "{{date}}, {{time}}"
|
|
419
|
-
},
|
|
420
|
-
date:
|
|
421
|
-
formats:
|
|
417
|
+
}, An = {
|
|
418
|
+
date: Pe({
|
|
419
|
+
formats: In,
|
|
422
420
|
defaultWidth: "full"
|
|
423
421
|
}),
|
|
424
|
-
time:
|
|
425
|
-
formats:
|
|
422
|
+
time: Pe({
|
|
423
|
+
formats: Hn,
|
|
426
424
|
defaultWidth: "full"
|
|
427
425
|
}),
|
|
428
|
-
dateTime:
|
|
429
|
-
formats:
|
|
426
|
+
dateTime: Pe({
|
|
427
|
+
formats: qn,
|
|
430
428
|
defaultWidth: "full"
|
|
431
429
|
})
|
|
432
|
-
},
|
|
430
|
+
}, jn = {
|
|
433
431
|
lastWeek: "'last' eeee 'at' p",
|
|
434
432
|
yesterday: "'yesterday at' p",
|
|
435
433
|
today: "'today at' p",
|
|
436
434
|
tomorrow: "'tomorrow at' p",
|
|
437
435
|
nextWeek: "eeee 'at' p",
|
|
438
436
|
other: "P"
|
|
439
|
-
},
|
|
437
|
+
}, zn = (e, t, n, r) => jn[e];
|
|
440
438
|
function le(e) {
|
|
441
439
|
return (t, n) => {
|
|
442
440
|
const r = n?.context ? String(n.context) : "standalone";
|
|
@@ -452,15 +450,15 @@ function le(e) {
|
|
|
452
450
|
return o[a];
|
|
453
451
|
};
|
|
454
452
|
}
|
|
455
|
-
const
|
|
453
|
+
const Rn = {
|
|
456
454
|
narrow: ["B", "A"],
|
|
457
455
|
abbreviated: ["BC", "AD"],
|
|
458
456
|
wide: ["Before Christ", "Anno Domini"]
|
|
459
|
-
},
|
|
457
|
+
}, $n = {
|
|
460
458
|
narrow: ["1", "2", "3", "4"],
|
|
461
459
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
462
460
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
463
|
-
},
|
|
461
|
+
}, Zn = {
|
|
464
462
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
465
463
|
abbreviated: [
|
|
466
464
|
"Jan",
|
|
@@ -490,7 +488,7 @@ const Zn = {
|
|
|
490
488
|
"November",
|
|
491
489
|
"December"
|
|
492
490
|
]
|
|
493
|
-
},
|
|
491
|
+
}, Gn = {
|
|
494
492
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
495
493
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
496
494
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -503,7 +501,7 @@ const Zn = {
|
|
|
503
501
|
"Friday",
|
|
504
502
|
"Saturday"
|
|
505
503
|
]
|
|
506
|
-
},
|
|
504
|
+
}, Ln = {
|
|
507
505
|
narrow: {
|
|
508
506
|
am: "a",
|
|
509
507
|
pm: "p",
|
|
@@ -534,7 +532,7 @@ const Zn = {
|
|
|
534
532
|
evening: "evening",
|
|
535
533
|
night: "night"
|
|
536
534
|
}
|
|
537
|
-
},
|
|
535
|
+
}, Qn = {
|
|
538
536
|
narrow: {
|
|
539
537
|
am: "a",
|
|
540
538
|
pm: "p",
|
|
@@ -565,7 +563,7 @@ const Zn = {
|
|
|
565
563
|
evening: "in the evening",
|
|
566
564
|
night: "at night"
|
|
567
565
|
}
|
|
568
|
-
},
|
|
566
|
+
}, Xn = (e, t) => {
|
|
569
567
|
const n = Number(e), r = n % 100;
|
|
570
568
|
if (r > 20 || r < 10)
|
|
571
569
|
switch (r % 10) {
|
|
@@ -577,29 +575,29 @@ const Zn = {
|
|
|
577
575
|
return n + "rd";
|
|
578
576
|
}
|
|
579
577
|
return n + "th";
|
|
580
|
-
},
|
|
581
|
-
ordinalNumber:
|
|
578
|
+
}, Un = {
|
|
579
|
+
ordinalNumber: Xn,
|
|
582
580
|
era: le({
|
|
583
|
-
values:
|
|
581
|
+
values: Rn,
|
|
584
582
|
defaultWidth: "wide"
|
|
585
583
|
}),
|
|
586
584
|
quarter: le({
|
|
587
|
-
values:
|
|
585
|
+
values: $n,
|
|
588
586
|
defaultWidth: "wide",
|
|
589
587
|
argumentCallback: (e) => e - 1
|
|
590
588
|
}),
|
|
591
589
|
month: le({
|
|
592
|
-
values:
|
|
590
|
+
values: Zn,
|
|
593
591
|
defaultWidth: "wide"
|
|
594
592
|
}),
|
|
595
593
|
day: le({
|
|
596
|
-
values:
|
|
594
|
+
values: Gn,
|
|
597
595
|
defaultWidth: "wide"
|
|
598
596
|
}),
|
|
599
597
|
dayPeriod: le({
|
|
600
|
-
values:
|
|
598
|
+
values: Ln,
|
|
601
599
|
defaultWidth: "wide",
|
|
602
|
-
formattingValues:
|
|
600
|
+
formattingValues: Qn,
|
|
603
601
|
defaultFormattingWidth: "wide"
|
|
604
602
|
})
|
|
605
603
|
};
|
|
@@ -608,9 +606,9 @@ function fe(e) {
|
|
|
608
606
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
609
607
|
if (!a)
|
|
610
608
|
return null;
|
|
611
|
-
const i = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ?
|
|
609
|
+
const i = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Kn(s, (d) => d.test(i)) : (
|
|
612
610
|
// [TODO] -- I challenge you to fix the type
|
|
613
|
-
|
|
611
|
+
Vn(s, (d) => d.test(i))
|
|
614
612
|
);
|
|
615
613
|
let u;
|
|
616
614
|
u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
|
|
@@ -621,17 +619,17 @@ function fe(e) {
|
|
|
621
619
|
return { value: u, rest: l };
|
|
622
620
|
};
|
|
623
621
|
}
|
|
624
|
-
function
|
|
622
|
+
function Vn(e, t) {
|
|
625
623
|
for (const n in e)
|
|
626
624
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
627
625
|
return n;
|
|
628
626
|
}
|
|
629
|
-
function
|
|
627
|
+
function Kn(e, t) {
|
|
630
628
|
for (let n = 0; n < e.length; n++)
|
|
631
629
|
if (t(e[n]))
|
|
632
630
|
return n;
|
|
633
631
|
}
|
|
634
|
-
function
|
|
632
|
+
function Jn(e) {
|
|
635
633
|
return (t, n = {}) => {
|
|
636
634
|
const r = t.match(e.matchPattern);
|
|
637
635
|
if (!r) return null;
|
|
@@ -643,23 +641,23 @@ function tr(e) {
|
|
|
643
641
|
return { value: i, rest: s };
|
|
644
642
|
};
|
|
645
643
|
}
|
|
646
|
-
const
|
|
644
|
+
const er = /^(\d+)(th|st|nd|rd)?/i, tr = /\d+/i, nr = {
|
|
647
645
|
narrow: /^(b|a)/i,
|
|
648
646
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
649
647
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
650
|
-
},
|
|
648
|
+
}, rr = {
|
|
651
649
|
any: [/^b/i, /^(a|c)/i]
|
|
652
|
-
},
|
|
650
|
+
}, or = {
|
|
653
651
|
narrow: /^[1234]/i,
|
|
654
652
|
abbreviated: /^q[1234]/i,
|
|
655
653
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
656
|
-
},
|
|
654
|
+
}, ar = {
|
|
657
655
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
658
|
-
},
|
|
656
|
+
}, sr = {
|
|
659
657
|
narrow: /^[jfmasond]/i,
|
|
660
658
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
661
659
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
662
|
-
},
|
|
660
|
+
}, ir = {
|
|
663
661
|
narrow: [
|
|
664
662
|
/^j/i,
|
|
665
663
|
/^f/i,
|
|
@@ -688,18 +686,18 @@ const nr = /^(\d+)(th|st|nd|rd)?/i, rr = /\d+/i, or = {
|
|
|
688
686
|
/^n/i,
|
|
689
687
|
/^d/i
|
|
690
688
|
]
|
|
691
|
-
},
|
|
689
|
+
}, cr = {
|
|
692
690
|
narrow: /^[smtwf]/i,
|
|
693
691
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
694
692
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
695
693
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
696
|
-
},
|
|
694
|
+
}, dr = {
|
|
697
695
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
698
696
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
699
|
-
},
|
|
697
|
+
}, ur = {
|
|
700
698
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
701
699
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
702
|
-
},
|
|
700
|
+
}, lr = {
|
|
703
701
|
any: {
|
|
704
702
|
am: /^a/i,
|
|
705
703
|
pm: /^p/i,
|
|
@@ -710,64 +708,64 @@ const nr = /^(\d+)(th|st|nd|rd)?/i, rr = /\d+/i, or = {
|
|
|
710
708
|
evening: /evening/i,
|
|
711
709
|
night: /night/i
|
|
712
710
|
}
|
|
713
|
-
},
|
|
714
|
-
ordinalNumber:
|
|
715
|
-
matchPattern:
|
|
716
|
-
parsePattern:
|
|
711
|
+
}, fr = {
|
|
712
|
+
ordinalNumber: Jn({
|
|
713
|
+
matchPattern: er,
|
|
714
|
+
parsePattern: tr,
|
|
717
715
|
valueCallback: (e) => parseInt(e, 10)
|
|
718
716
|
}),
|
|
719
717
|
era: fe({
|
|
720
|
-
matchPatterns:
|
|
718
|
+
matchPatterns: nr,
|
|
721
719
|
defaultMatchWidth: "wide",
|
|
722
|
-
parsePatterns:
|
|
720
|
+
parsePatterns: rr,
|
|
723
721
|
defaultParseWidth: "any"
|
|
724
722
|
}),
|
|
725
723
|
quarter: fe({
|
|
726
|
-
matchPatterns:
|
|
724
|
+
matchPatterns: or,
|
|
727
725
|
defaultMatchWidth: "wide",
|
|
728
|
-
parsePatterns:
|
|
726
|
+
parsePatterns: ar,
|
|
729
727
|
defaultParseWidth: "any",
|
|
730
728
|
valueCallback: (e) => e + 1
|
|
731
729
|
}),
|
|
732
730
|
month: fe({
|
|
733
|
-
matchPatterns:
|
|
731
|
+
matchPatterns: sr,
|
|
734
732
|
defaultMatchWidth: "wide",
|
|
735
|
-
parsePatterns:
|
|
733
|
+
parsePatterns: ir,
|
|
736
734
|
defaultParseWidth: "any"
|
|
737
735
|
}),
|
|
738
736
|
day: fe({
|
|
739
|
-
matchPatterns:
|
|
737
|
+
matchPatterns: cr,
|
|
740
738
|
defaultMatchWidth: "wide",
|
|
741
|
-
parsePatterns:
|
|
739
|
+
parsePatterns: dr,
|
|
742
740
|
defaultParseWidth: "any"
|
|
743
741
|
}),
|
|
744
742
|
dayPeriod: fe({
|
|
745
|
-
matchPatterns:
|
|
743
|
+
matchPatterns: ur,
|
|
746
744
|
defaultMatchWidth: "any",
|
|
747
|
-
parsePatterns:
|
|
745
|
+
parsePatterns: lr,
|
|
748
746
|
defaultParseWidth: "any"
|
|
749
747
|
})
|
|
750
|
-
},
|
|
748
|
+
}, Ae = {
|
|
751
749
|
code: "en-US",
|
|
752
|
-
formatDistance:
|
|
753
|
-
formatLong:
|
|
754
|
-
formatRelative:
|
|
755
|
-
localize:
|
|
756
|
-
match:
|
|
750
|
+
formatDistance: Bn,
|
|
751
|
+
formatLong: An,
|
|
752
|
+
formatRelative: zn,
|
|
753
|
+
localize: Un,
|
|
754
|
+
match: fr,
|
|
757
755
|
options: {
|
|
758
756
|
weekStartsOn: 0,
|
|
759
757
|
firstWeekContainsDate: 1
|
|
760
758
|
}
|
|
761
759
|
};
|
|
762
|
-
function
|
|
760
|
+
function mr(e, t) {
|
|
763
761
|
const n = Y(e, t?.in);
|
|
764
|
-
return
|
|
765
|
-
}
|
|
766
|
-
function wt(e, t) {
|
|
767
|
-
const n = Y(e, t?.in), r = +he(n) - +vn(n);
|
|
768
|
-
return Math.round(r / dt) + 1;
|
|
762
|
+
return ht(n, pt(n)) + 1;
|
|
769
763
|
}
|
|
770
764
|
function bt(e, t) {
|
|
765
|
+
const n = Y(e, t?.in), r = +he(n) - +kn(n);
|
|
766
|
+
return Math.round(r / ut) + 1;
|
|
767
|
+
}
|
|
768
|
+
function Mt(e, t) {
|
|
771
769
|
const n = Y(e, t?.in), r = n.getFullYear(), o = ge(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = B(t?.in || e, 0);
|
|
772
770
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
773
771
|
const s = de(i, t), c = B(t?.in || e, 0);
|
|
@@ -775,13 +773,13 @@ function bt(e, t) {
|
|
|
775
773
|
const u = de(c, t);
|
|
776
774
|
return +n >= +s ? r + 1 : +n >= +u ? r : r - 1;
|
|
777
775
|
}
|
|
778
|
-
function
|
|
779
|
-
const n = ge(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o =
|
|
776
|
+
function hr(e, t) {
|
|
777
|
+
const n = ge(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = Mt(e, t), a = B(t?.in || e, 0);
|
|
780
778
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), de(a, t);
|
|
781
779
|
}
|
|
782
|
-
function
|
|
783
|
-
const n = Y(e, t?.in), r = +de(n, t) - +
|
|
784
|
-
return Math.round(r /
|
|
780
|
+
function kt(e, t) {
|
|
781
|
+
const n = Y(e, t?.in), r = +de(n, t) - +hr(n, t);
|
|
782
|
+
return Math.round(r / ut) + 1;
|
|
785
783
|
}
|
|
786
784
|
function _(e, t) {
|
|
787
785
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
@@ -848,7 +846,7 @@ const te = {
|
|
|
848
846
|
afternoon: "afternoon",
|
|
849
847
|
evening: "evening",
|
|
850
848
|
night: "night"
|
|
851
|
-
},
|
|
849
|
+
}, tt = {
|
|
852
850
|
// Era
|
|
853
851
|
G: function(e, t, n) {
|
|
854
852
|
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -877,7 +875,7 @@ const te = {
|
|
|
877
875
|
},
|
|
878
876
|
// Local week-numbering year
|
|
879
877
|
Y: function(e, t, n, r) {
|
|
880
|
-
const o =
|
|
878
|
+
const o = Mt(e, r), a = o > 0 ? o : 1 - o;
|
|
881
879
|
if (t === "YY") {
|
|
882
880
|
const i = a % 100;
|
|
883
881
|
return _(i, 2);
|
|
@@ -886,7 +884,7 @@ const te = {
|
|
|
886
884
|
},
|
|
887
885
|
// ISO week-numbering year
|
|
888
886
|
R: function(e, t) {
|
|
889
|
-
const n =
|
|
887
|
+
const n = mt(e);
|
|
890
888
|
return _(n, t.length);
|
|
891
889
|
},
|
|
892
890
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1031,12 +1029,12 @@ const te = {
|
|
|
1031
1029
|
},
|
|
1032
1030
|
// Local week of year
|
|
1033
1031
|
w: function(e, t, n, r) {
|
|
1034
|
-
const o =
|
|
1032
|
+
const o = kt(e, r);
|
|
1035
1033
|
return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : _(o, t.length);
|
|
1036
1034
|
},
|
|
1037
1035
|
// ISO week of year
|
|
1038
1036
|
I: function(e, t, n) {
|
|
1039
|
-
const r =
|
|
1037
|
+
const r = bt(e);
|
|
1040
1038
|
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : _(r, t.length);
|
|
1041
1039
|
},
|
|
1042
1040
|
// Day of the month
|
|
@@ -1045,7 +1043,7 @@ const te = {
|
|
|
1045
1043
|
},
|
|
1046
1044
|
// Day of year
|
|
1047
1045
|
D: function(e, t, n) {
|
|
1048
|
-
const r =
|
|
1046
|
+
const r = mr(e);
|
|
1049
1047
|
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : _(r, t.length);
|
|
1050
1048
|
},
|
|
1051
1049
|
// Day of week
|
|
@@ -1323,7 +1321,7 @@ const te = {
|
|
|
1323
1321
|
switch (t) {
|
|
1324
1322
|
// Hours and optional minutes
|
|
1325
1323
|
case "X":
|
|
1326
|
-
return
|
|
1324
|
+
return rt(r);
|
|
1327
1325
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1328
1326
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1329
1327
|
// so this token always has the same output as `XX`
|
|
@@ -1346,7 +1344,7 @@ const te = {
|
|
|
1346
1344
|
switch (t) {
|
|
1347
1345
|
// Hours and optional minutes
|
|
1348
1346
|
case "x":
|
|
1349
|
-
return
|
|
1347
|
+
return rt(r);
|
|
1350
1348
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1351
1349
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1352
1350
|
// so this token always has the same output as `xx`
|
|
@@ -1371,7 +1369,7 @@ const te = {
|
|
|
1371
1369
|
case "O":
|
|
1372
1370
|
case "OO":
|
|
1373
1371
|
case "OOO":
|
|
1374
|
-
return "GMT" +
|
|
1372
|
+
return "GMT" + nt(r, ":");
|
|
1375
1373
|
// Long
|
|
1376
1374
|
case "OOOO":
|
|
1377
1375
|
default:
|
|
@@ -1386,7 +1384,7 @@ const te = {
|
|
|
1386
1384
|
case "z":
|
|
1387
1385
|
case "zz":
|
|
1388
1386
|
case "zzz":
|
|
1389
|
-
return "GMT" +
|
|
1387
|
+
return "GMT" + nt(r, ":");
|
|
1390
1388
|
// Long
|
|
1391
1389
|
case "zzzz":
|
|
1392
1390
|
default:
|
|
@@ -1403,18 +1401,18 @@ const te = {
|
|
|
1403
1401
|
return _(+e, t.length);
|
|
1404
1402
|
}
|
|
1405
1403
|
};
|
|
1406
|
-
function
|
|
1404
|
+
function nt(e, t = "") {
|
|
1407
1405
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
|
|
1408
1406
|
return a === 0 ? n + String(o) : n + String(o) + t + _(a, 2);
|
|
1409
1407
|
}
|
|
1410
|
-
function
|
|
1408
|
+
function rt(e, t) {
|
|
1411
1409
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + _(Math.abs(e) / 60, 2) : re(e, t);
|
|
1412
1410
|
}
|
|
1413
1411
|
function re(e, t = "") {
|
|
1414
1412
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = _(Math.trunc(r / 60), 2), a = _(r % 60, 2);
|
|
1415
1413
|
return n + o + t + a;
|
|
1416
1414
|
}
|
|
1417
|
-
const
|
|
1415
|
+
const ot = (e, t) => {
|
|
1418
1416
|
switch (e) {
|
|
1419
1417
|
case "P":
|
|
1420
1418
|
return t.date({ width: "short" });
|
|
@@ -1426,7 +1424,7 @@ const rt = (e, t) => {
|
|
|
1426
1424
|
default:
|
|
1427
1425
|
return t.date({ width: "full" });
|
|
1428
1426
|
}
|
|
1429
|
-
},
|
|
1427
|
+
}, Dt = (e, t) => {
|
|
1430
1428
|
switch (e) {
|
|
1431
1429
|
case "p":
|
|
1432
1430
|
return t.time({ width: "short" });
|
|
@@ -1438,10 +1436,10 @@ const rt = (e, t) => {
|
|
|
1438
1436
|
default:
|
|
1439
1437
|
return t.time({ width: "full" });
|
|
1440
1438
|
}
|
|
1441
|
-
},
|
|
1439
|
+
}, yr = (e, t) => {
|
|
1442
1440
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
1443
1441
|
if (!o)
|
|
1444
|
-
return
|
|
1442
|
+
return ot(e, t);
|
|
1445
1443
|
let a;
|
|
1446
1444
|
switch (r) {
|
|
1447
1445
|
case "P":
|
|
@@ -1458,46 +1456,46 @@ const rt = (e, t) => {
|
|
|
1458
1456
|
a = t.dateTime({ width: "full" });
|
|
1459
1457
|
break;
|
|
1460
1458
|
}
|
|
1461
|
-
return a.replace("{{date}}",
|
|
1462
|
-
},
|
|
1463
|
-
p:
|
|
1464
|
-
P:
|
|
1465
|
-
},
|
|
1466
|
-
function
|
|
1467
|
-
return
|
|
1468
|
-
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1471
|
-
}
|
|
1472
|
-
function
|
|
1473
|
-
const r =
|
|
1474
|
-
if (console.warn(r),
|
|
1475
|
-
}
|
|
1476
|
-
function
|
|
1459
|
+
return a.replace("{{date}}", ot(r, t)).replace("{{time}}", Dt(o, t));
|
|
1460
|
+
}, gr = {
|
|
1461
|
+
p: Dt,
|
|
1462
|
+
P: yr
|
|
1463
|
+
}, pr = /^D+$/, wr = /^Y+$/, br = ["D", "DD", "YY", "YYYY"];
|
|
1464
|
+
function Mr(e) {
|
|
1465
|
+
return pr.test(e);
|
|
1466
|
+
}
|
|
1467
|
+
function kr(e) {
|
|
1468
|
+
return wr.test(e);
|
|
1469
|
+
}
|
|
1470
|
+
function Dr(e, t, n) {
|
|
1471
|
+
const r = vr(e, t, n);
|
|
1472
|
+
if (console.warn(r), br.includes(e)) throw new RangeError(r);
|
|
1473
|
+
}
|
|
1474
|
+
function vr(e, t, n) {
|
|
1477
1475
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1478
1476
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1479
1477
|
}
|
|
1480
|
-
const
|
|
1481
|
-
function
|
|
1482
|
-
const r = ge(), o = n?.locale ?? r.locale ??
|
|
1483
|
-
if (!
|
|
1478
|
+
const Or = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Wr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Sr = /^'([^]*?)'?$/, Cr = /''/g, xr = /[a-zA-Z]/;
|
|
1479
|
+
function Nr(e, t, n) {
|
|
1480
|
+
const r = ge(), o = n?.locale ?? r.locale ?? Ae, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = Y(e, n?.in);
|
|
1481
|
+
if (!Cn(s))
|
|
1484
1482
|
throw new RangeError("Invalid time value");
|
|
1485
|
-
let c = t.match(
|
|
1483
|
+
let c = t.match(Wr).map((l) => {
|
|
1486
1484
|
const d = l[0];
|
|
1487
1485
|
if (d === "p" || d === "P") {
|
|
1488
|
-
const m =
|
|
1486
|
+
const m = gr[d];
|
|
1489
1487
|
return m(l, o.formatLong);
|
|
1490
1488
|
}
|
|
1491
1489
|
return l;
|
|
1492
|
-
}).join("").match(
|
|
1490
|
+
}).join("").match(Or).map((l) => {
|
|
1493
1491
|
if (l === "''")
|
|
1494
1492
|
return { isToken: !1, value: "'" };
|
|
1495
1493
|
const d = l[0];
|
|
1496
1494
|
if (d === "'")
|
|
1497
|
-
return { isToken: !1, value:
|
|
1498
|
-
if (
|
|
1495
|
+
return { isToken: !1, value: _r(l) };
|
|
1496
|
+
if (tt[d])
|
|
1499
1497
|
return { isToken: !0, value: l };
|
|
1500
|
-
if (d.match(
|
|
1498
|
+
if (d.match(xr))
|
|
1501
1499
|
throw new RangeError(
|
|
1502
1500
|
"Format string contains an unescaped latin alphabet character `" + d + "`"
|
|
1503
1501
|
);
|
|
@@ -1512,32 +1510,32 @@ function Yr(e, t, n) {
|
|
|
1512
1510
|
return c.map((l) => {
|
|
1513
1511
|
if (!l.isToken) return l.value;
|
|
1514
1512
|
const d = l.value;
|
|
1515
|
-
(!n?.useAdditionalWeekYearTokens &&
|
|
1516
|
-
const m =
|
|
1513
|
+
(!n?.useAdditionalWeekYearTokens && kr(d) || !n?.useAdditionalDayOfYearTokens && Mr(d)) && Dr(d, t, String(e));
|
|
1514
|
+
const m = tt[d[0]];
|
|
1517
1515
|
return m(s, d, o.localize, u);
|
|
1518
1516
|
}).join("");
|
|
1519
1517
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const t = e.match(
|
|
1522
|
-
return t ? t[1].replace(
|
|
1518
|
+
function _r(e) {
|
|
1519
|
+
const t = e.match(Sr);
|
|
1520
|
+
return t ? t[1].replace(Cr, "'") : e;
|
|
1523
1521
|
}
|
|
1524
|
-
function
|
|
1522
|
+
function Yr(e, t) {
|
|
1525
1523
|
const n = Y(e, t?.in), r = n.getFullYear(), o = n.getMonth(), a = B(n, 0);
|
|
1526
1524
|
return a.setFullYear(r, o + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
|
|
1527
1525
|
}
|
|
1528
|
-
function
|
|
1526
|
+
function Tr(e, t) {
|
|
1529
1527
|
return Y(e, t?.in).getMonth();
|
|
1530
1528
|
}
|
|
1531
|
-
function
|
|
1529
|
+
function Er(e, t) {
|
|
1532
1530
|
return Y(e, t?.in).getFullYear();
|
|
1533
1531
|
}
|
|
1534
|
-
function
|
|
1532
|
+
function Pr(e, t) {
|
|
1535
1533
|
return +Y(e) > +Y(t);
|
|
1536
1534
|
}
|
|
1537
|
-
function
|
|
1535
|
+
function Fr(e, t) {
|
|
1538
1536
|
return +Y(e) < +Y(t);
|
|
1539
1537
|
}
|
|
1540
|
-
function
|
|
1538
|
+
function Br(e, t, n) {
|
|
1541
1539
|
const [r, o] = ue(
|
|
1542
1540
|
n?.in,
|
|
1543
1541
|
e,
|
|
@@ -1545,7 +1543,7 @@ function Hr(e, t, n) {
|
|
|
1545
1543
|
);
|
|
1546
1544
|
return r.getFullYear() === o.getFullYear() && r.getMonth() === o.getMonth();
|
|
1547
1545
|
}
|
|
1548
|
-
function
|
|
1546
|
+
function Ir(e, t, n) {
|
|
1549
1547
|
const [r, o] = ue(
|
|
1550
1548
|
n?.in,
|
|
1551
1549
|
e,
|
|
@@ -1553,27 +1551,27 @@ function qr(e, t, n) {
|
|
|
1553
1551
|
);
|
|
1554
1552
|
return r.getFullYear() === o.getFullYear();
|
|
1555
1553
|
}
|
|
1556
|
-
function
|
|
1554
|
+
function Hr(e, t, n) {
|
|
1557
1555
|
const r = Y(e, n?.in), o = r.getFullYear(), a = r.getDate(), i = B(e, 0);
|
|
1558
1556
|
i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
|
|
1559
|
-
const s =
|
|
1557
|
+
const s = Yr(i);
|
|
1560
1558
|
return r.setMonth(t, Math.min(a, s)), r;
|
|
1561
1559
|
}
|
|
1562
|
-
function
|
|
1560
|
+
function qr(e, t, n) {
|
|
1563
1561
|
const r = Y(e, n?.in);
|
|
1564
1562
|
return isNaN(+r) ? B(e, NaN) : (r.setFullYear(t), r);
|
|
1565
1563
|
}
|
|
1566
|
-
const
|
|
1567
|
-
function
|
|
1568
|
-
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o,
|
|
1569
|
-
return t.getMonth(e) === t.getMonth(a) ?
|
|
1564
|
+
const at = 5, Ar = 4;
|
|
1565
|
+
function jr(e, t) {
|
|
1566
|
+
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o, at * 7 - 1);
|
|
1567
|
+
return t.getMonth(e) === t.getMonth(a) ? at : Ar;
|
|
1570
1568
|
}
|
|
1571
|
-
function
|
|
1569
|
+
function vt(e, t) {
|
|
1572
1570
|
const n = t.startOfMonth(e), r = n.getDay();
|
|
1573
1571
|
return r === 1 ? n : r === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (r - 1));
|
|
1574
1572
|
}
|
|
1575
|
-
function
|
|
1576
|
-
const n =
|
|
1573
|
+
function zr(e, t) {
|
|
1574
|
+
const n = vt(e, t), r = jr(e, t);
|
|
1577
1575
|
return t.addDays(n, r * 7 - 1);
|
|
1578
1576
|
}
|
|
1579
1577
|
class R {
|
|
@@ -1584,18 +1582,18 @@ class R {
|
|
|
1584
1582
|
* @param overrides Custom overrides for the date library functions.
|
|
1585
1583
|
*/
|
|
1586
1584
|
constructor(t, n) {
|
|
1587
|
-
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? H.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, o, a) => this.overrides?.newDate ? this.overrides.newDate(r, o, a) : this.options.timeZone ? new H(r, o, a, this.options.timeZone) : new Date(r, o, a), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) :
|
|
1588
|
-
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) :
|
|
1585
|
+
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? H.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, o, a) => this.overrides?.newDate ? this.overrides.newDate(r, o, a) : this.options.timeZone ? new H(r, o, a, this.options.timeZone) : new Date(r, o, a), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) : lt(r, o), this.addMonths = (r, o) => this.overrides?.addMonths ? this.overrides.addMonths(r, o) : ft(r, o), this.addWeeks = (r, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, o) : Dn(r, o), this.addYears = (r, o) => this.overrides?.addYears ? this.overrides.addYears(r, o) : vn(r, o), this.differenceInCalendarDays = (r, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : ht(r, o), this.differenceInCalendarMonths = (r, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : xn(r, o), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : _n(r), this.eachYearOfInterval = (r) => {
|
|
1586
|
+
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : En(r), a = new Set(o.map((s) => this.getYear(s)));
|
|
1589
1587
|
if (a.size === o.length)
|
|
1590
1588
|
return o;
|
|
1591
1589
|
const i = [];
|
|
1592
1590
|
return a.forEach((s) => {
|
|
1593
1591
|
i.push(new Date(s, 0, 1));
|
|
1594
1592
|
}), i;
|
|
1595
|
-
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) :
|
|
1596
|
-
const i = this.overrides?.format ? this.overrides.format(r, o, this.options) :
|
|
1593
|
+
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : zr(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : Pn(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : Nn(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : wt(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : Tn(r), this.format = (r, o, a) => {
|
|
1594
|
+
const i = this.overrides?.format ? this.overrides.format(r, o, this.options) : Nr(r, o, this.options);
|
|
1597
1595
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
|
|
1598
|
-
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) :
|
|
1596
|
+
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : bt(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Tr(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : Er(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : kt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : Pr(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : Fr(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : yt(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : Sn(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : Br(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : Ir(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : On(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : Wn(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : Hr(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : qr(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : vt(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : ye(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : he(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : Yn(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : de(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : pt(r), this.options = { locale: Ae, ...t }, this.overrides = n;
|
|
1599
1597
|
}
|
|
1600
1598
|
/**
|
|
1601
1599
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -1682,7 +1680,7 @@ R.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
1682
1680
|
"zh-TW"
|
|
1683
1681
|
]);
|
|
1684
1682
|
const V = new R();
|
|
1685
|
-
class
|
|
1683
|
+
class Ot {
|
|
1686
1684
|
constructor(t, n, r = V) {
|
|
1687
1685
|
this.date = t, this.displayMonth = n, this.outside = !!(n && !r.isSameMonth(t, n)), this.dateLib = r;
|
|
1688
1686
|
}
|
|
@@ -1697,23 +1695,23 @@ class vt {
|
|
|
1697
1695
|
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
1698
1696
|
}
|
|
1699
1697
|
}
|
|
1700
|
-
class
|
|
1698
|
+
class Rr {
|
|
1701
1699
|
constructor(t, n) {
|
|
1702
1700
|
this.date = t, this.weeks = n;
|
|
1703
1701
|
}
|
|
1704
1702
|
}
|
|
1705
|
-
class
|
|
1703
|
+
class $r {
|
|
1706
1704
|
constructor(t, n) {
|
|
1707
1705
|
this.days = n, this.weekNumber = t;
|
|
1708
1706
|
}
|
|
1709
1707
|
}
|
|
1710
|
-
function
|
|
1708
|
+
function Zr(e) {
|
|
1711
1709
|
return f.createElement("button", { ...e });
|
|
1712
1710
|
}
|
|
1713
|
-
function
|
|
1711
|
+
function Gr(e) {
|
|
1714
1712
|
return f.createElement("span", { ...e });
|
|
1715
1713
|
}
|
|
1716
|
-
function
|
|
1714
|
+
function Lr(e) {
|
|
1717
1715
|
const { size: t = 24, orientation: n = "left", className: r } = e;
|
|
1718
1716
|
return (
|
|
1719
1717
|
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
@@ -1727,11 +1725,11 @@ function Xr(e) {
|
|
|
1727
1725
|
)
|
|
1728
1726
|
);
|
|
1729
1727
|
}
|
|
1730
|
-
function
|
|
1728
|
+
function Qr(e) {
|
|
1731
1729
|
const { day: t, modifiers: n, ...r } = e;
|
|
1732
1730
|
return f.createElement("td", { ...r });
|
|
1733
1731
|
}
|
|
1734
|
-
function
|
|
1732
|
+
function Xr(e) {
|
|
1735
1733
|
const { day: t, modifiers: n, ...r } = e, o = f.useRef(null);
|
|
1736
1734
|
return f.useEffect(() => {
|
|
1737
1735
|
n.focused && o.current?.focus();
|
|
@@ -1753,7 +1751,7 @@ var z;
|
|
|
1753
1751
|
(function(e) {
|
|
1754
1752
|
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
1753
|
})(z || (z = {}));
|
|
1756
|
-
function
|
|
1754
|
+
function Ur(e) {
|
|
1757
1755
|
const { options: t, className: n, components: r, classNames: o, ...a } = e, i = [o[h.Dropdown], n].join(" "), s = t?.find(({ value: c }) => c === a.value);
|
|
1758
1756
|
return f.createElement(
|
|
1759
1757
|
"span",
|
|
@@ -1767,38 +1765,38 @@ function Kr(e) {
|
|
|
1767
1765
|
)
|
|
1768
1766
|
);
|
|
1769
1767
|
}
|
|
1770
|
-
function
|
|
1768
|
+
function Vr(e) {
|
|
1771
1769
|
return f.createElement("div", { ...e });
|
|
1772
1770
|
}
|
|
1773
|
-
function
|
|
1771
|
+
function Kr(e) {
|
|
1774
1772
|
return f.createElement("div", { ...e });
|
|
1775
1773
|
}
|
|
1776
|
-
function
|
|
1774
|
+
function Jr(e) {
|
|
1777
1775
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1778
1776
|
return f.createElement("div", { ...r }, e.children);
|
|
1779
1777
|
}
|
|
1780
|
-
function
|
|
1778
|
+
function eo(e) {
|
|
1781
1779
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1782
1780
|
return f.createElement("div", { ...r });
|
|
1783
1781
|
}
|
|
1784
|
-
function
|
|
1782
|
+
function to(e) {
|
|
1785
1783
|
return f.createElement("table", { ...e });
|
|
1786
1784
|
}
|
|
1787
|
-
function
|
|
1785
|
+
function no(e) {
|
|
1788
1786
|
return f.createElement("div", { ...e });
|
|
1789
1787
|
}
|
|
1790
|
-
const
|
|
1788
|
+
const Wt = ln(void 0);
|
|
1791
1789
|
function pe() {
|
|
1792
|
-
const e =
|
|
1790
|
+
const e = fn(Wt);
|
|
1793
1791
|
if (e === void 0)
|
|
1794
1792
|
throw new Error("useDayPicker() must be used within a custom component.");
|
|
1795
1793
|
return e;
|
|
1796
1794
|
}
|
|
1797
|
-
function
|
|
1795
|
+
function ro(e) {
|
|
1798
1796
|
const { components: t } = pe();
|
|
1799
1797
|
return f.createElement(t.Dropdown, { ...e });
|
|
1800
1798
|
}
|
|
1801
|
-
function
|
|
1799
|
+
function oo(e) {
|
|
1802
1800
|
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: u } } = pe(), l = $((m) => {
|
|
1803
1801
|
o && n?.(m);
|
|
1804
1802
|
}, [o, n]), d = $((m) => {
|
|
@@ -1819,102 +1817,102 @@ function so(e) {
|
|
|
1819
1817
|
)
|
|
1820
1818
|
);
|
|
1821
1819
|
}
|
|
1822
|
-
function
|
|
1820
|
+
function ao(e) {
|
|
1823
1821
|
const { components: t } = pe();
|
|
1824
1822
|
return f.createElement(t.Button, { ...e });
|
|
1825
1823
|
}
|
|
1826
|
-
function
|
|
1824
|
+
function so(e) {
|
|
1827
1825
|
return f.createElement("option", { ...e });
|
|
1828
1826
|
}
|
|
1829
|
-
function
|
|
1827
|
+
function io(e) {
|
|
1830
1828
|
const { components: t } = pe();
|
|
1831
1829
|
return f.createElement(t.Button, { ...e });
|
|
1832
1830
|
}
|
|
1833
|
-
function
|
|
1831
|
+
function co(e) {
|
|
1834
1832
|
const { rootRef: t, ...n } = e;
|
|
1835
1833
|
return f.createElement("div", { ...n, ref: t });
|
|
1836
1834
|
}
|
|
1837
|
-
function
|
|
1835
|
+
function uo(e) {
|
|
1838
1836
|
return f.createElement("select", { ...e });
|
|
1839
1837
|
}
|
|
1840
|
-
function
|
|
1838
|
+
function lo(e) {
|
|
1841
1839
|
const { week: t, ...n } = e;
|
|
1842
1840
|
return f.createElement("tr", { ...n });
|
|
1843
1841
|
}
|
|
1844
|
-
function
|
|
1842
|
+
function fo(e) {
|
|
1845
1843
|
return f.createElement("th", { ...e });
|
|
1846
1844
|
}
|
|
1847
|
-
function
|
|
1845
|
+
function mo(e) {
|
|
1848
1846
|
return f.createElement(
|
|
1849
1847
|
"thead",
|
|
1850
1848
|
{ "aria-hidden": !0 },
|
|
1851
1849
|
f.createElement("tr", { ...e })
|
|
1852
1850
|
);
|
|
1853
1851
|
}
|
|
1854
|
-
function
|
|
1852
|
+
function ho(e) {
|
|
1855
1853
|
const { week: t, ...n } = e;
|
|
1856
1854
|
return f.createElement("th", { ...n });
|
|
1857
1855
|
}
|
|
1858
|
-
function
|
|
1856
|
+
function yo(e) {
|
|
1859
1857
|
return f.createElement("th", { ...e });
|
|
1860
1858
|
}
|
|
1861
|
-
function
|
|
1859
|
+
function go(e) {
|
|
1862
1860
|
return f.createElement("tbody", { ...e });
|
|
1863
1861
|
}
|
|
1864
|
-
function
|
|
1862
|
+
function po(e) {
|
|
1865
1863
|
const { components: t } = pe();
|
|
1866
1864
|
return f.createElement(t.Dropdown, { ...e });
|
|
1867
1865
|
}
|
|
1868
|
-
const
|
|
1866
|
+
const wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1869
1867
|
__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:
|
|
1868
|
+
Button: Zr,
|
|
1869
|
+
CaptionLabel: Gr,
|
|
1870
|
+
Chevron: Lr,
|
|
1871
|
+
Day: Qr,
|
|
1872
|
+
DayButton: Xr,
|
|
1873
|
+
Dropdown: Ur,
|
|
1874
|
+
DropdownNav: Vr,
|
|
1875
|
+
Footer: Kr,
|
|
1876
|
+
Month: Jr,
|
|
1877
|
+
MonthCaption: eo,
|
|
1878
|
+
MonthGrid: to,
|
|
1879
|
+
Months: no,
|
|
1880
|
+
MonthsDropdown: ro,
|
|
1881
|
+
Nav: oo,
|
|
1882
|
+
NextMonthButton: ao,
|
|
1883
|
+
Option: so,
|
|
1884
|
+
PreviousMonthButton: io,
|
|
1885
|
+
Root: co,
|
|
1886
|
+
Select: uo,
|
|
1887
|
+
Week: lo,
|
|
1888
|
+
WeekNumber: ho,
|
|
1889
|
+
WeekNumberHeader: yo,
|
|
1890
|
+
Weekday: fo,
|
|
1891
|
+
Weekdays: mo,
|
|
1892
|
+
Weeks: go,
|
|
1893
|
+
YearsDropdown: po
|
|
1896
1894
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1897
1895
|
function J(e, t, n = !1, r = V) {
|
|
1898
1896
|
let { from: o, to: a } = e;
|
|
1899
1897
|
const { differenceInCalendarDays: i, isSameDay: s } = r;
|
|
1900
1898
|
return o && a ? (i(a, o) < 0 && ([o, a] = [a, o]), i(t, o) >= (n ? 1 : 0) && i(a, t) >= (n ? 1 : 0)) : !n && a ? s(a, t) : !n && o ? s(o, t) : !1;
|
|
1901
1899
|
}
|
|
1902
|
-
function
|
|
1900
|
+
function St(e) {
|
|
1903
1901
|
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
1904
1902
|
}
|
|
1905
|
-
function
|
|
1903
|
+
function je(e) {
|
|
1906
1904
|
return !!(e && typeof e == "object" && "from" in e);
|
|
1907
1905
|
}
|
|
1908
|
-
function
|
|
1906
|
+
function Ct(e) {
|
|
1909
1907
|
return !!(e && typeof e == "object" && "after" in e);
|
|
1910
1908
|
}
|
|
1911
|
-
function
|
|
1909
|
+
function xt(e) {
|
|
1912
1910
|
return !!(e && typeof e == "object" && "before" in e);
|
|
1913
1911
|
}
|
|
1914
1912
|
function Nt(e) {
|
|
1915
1913
|
return !!(e && typeof e == "object" && "dayOfWeek" in e);
|
|
1916
1914
|
}
|
|
1917
|
-
function
|
|
1915
|
+
function _t(e, t) {
|
|
1918
1916
|
return Array.isArray(e) && e.every(t.isDate);
|
|
1919
1917
|
}
|
|
1920
1918
|
function ee(e, t, n = V) {
|
|
@@ -1924,20 +1922,20 @@ function ee(e, t, n = V) {
|
|
|
1924
1922
|
return s;
|
|
1925
1923
|
if (n.isDate(s))
|
|
1926
1924
|
return o(e, s);
|
|
1927
|
-
if (
|
|
1925
|
+
if (_t(s, n))
|
|
1928
1926
|
return s.includes(e);
|
|
1929
|
-
if (
|
|
1927
|
+
if (je(s))
|
|
1930
1928
|
return J(s, e, !1, n);
|
|
1931
1929
|
if (Nt(s))
|
|
1932
1930
|
return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
|
|
1933
|
-
if (
|
|
1931
|
+
if (St(s)) {
|
|
1934
1932
|
const c = a(s.before, e), u = a(s.after, e), l = c > 0, d = u < 0;
|
|
1935
1933
|
return i(s.before, s.after) ? d && l : l || d;
|
|
1936
1934
|
}
|
|
1937
|
-
return
|
|
1935
|
+
return Ct(s) ? a(e, s.after) > 0 : xt(s) ? a(s.before, e) > 0 : typeof s == "function" ? s(e) : !1;
|
|
1938
1936
|
});
|
|
1939
1937
|
}
|
|
1940
|
-
function
|
|
1938
|
+
function bo(e, t, n, r, o) {
|
|
1941
1939
|
const { disabled: a, hidden: i, modifiers: s, showOutsideDays: c, broadcastCalendar: u, today: l } = t, { isSameDay: d, isSameMonth: m, startOfMonth: g, isBefore: v, endOfMonth: W, isAfter: M } = o, O = n && g(n), C = r && W(r), p = {
|
|
1942
1940
|
[F.focused]: [],
|
|
1943
1941
|
[F.outside]: [],
|
|
@@ -1946,9 +1944,9 @@ function ko(e, t, n, r, o) {
|
|
|
1946
1944
|
[F.today]: []
|
|
1947
1945
|
}, T = {};
|
|
1948
1946
|
for (const y of e) {
|
|
1949
|
-
const { date: k, displayMonth: b } = y,
|
|
1950
|
-
!u && !c &&
|
|
1951
|
-
|
|
1947
|
+
const { date: k, displayMonth: b } = y, x = !!(b && !m(k, b)), I = !!(O && v(k, O)), q = !!(C && M(k, C)), A = !!(a && ee(k, a, o)), Z = !!(i && ee(k, i, o)) || I || q || // Broadcast calendar will show outside days as default
|
|
1948
|
+
!u && !c && x || u && c === !1 && x, ae = d(k, l ?? o.today());
|
|
1949
|
+
x && p.outside.push(y), A && p.disabled.push(y), Z && p.hidden.push(y), ae && p.today.push(y), s && Object.keys(s).forEach((se) => {
|
|
1952
1950
|
const ie = s?.[se];
|
|
1953
1951
|
ie && ee(k, ie, o) && (T[se] ? T[se].push(y) : T[se] = [y]);
|
|
1954
1952
|
});
|
|
@@ -1961,12 +1959,12 @@ function ko(e, t, n, r, o) {
|
|
|
1961
1959
|
[F.outside]: !1,
|
|
1962
1960
|
[F.today]: !1
|
|
1963
1961
|
}, b = {};
|
|
1964
|
-
for (const
|
|
1965
|
-
const I = p[
|
|
1966
|
-
k[
|
|
1962
|
+
for (const x in p) {
|
|
1963
|
+
const I = p[x];
|
|
1964
|
+
k[x] = I.some((q) => q === y);
|
|
1967
1965
|
}
|
|
1968
|
-
for (const
|
|
1969
|
-
b[
|
|
1966
|
+
for (const x in T)
|
|
1967
|
+
b[x] = T[x].some((I) => I === y);
|
|
1970
1968
|
return {
|
|
1971
1969
|
...k,
|
|
1972
1970
|
// custom modifiers should override all the previous ones
|
|
@@ -1974,16 +1972,16 @@ function ko(e, t, n, r, o) {
|
|
|
1974
1972
|
};
|
|
1975
1973
|
};
|
|
1976
1974
|
}
|
|
1977
|
-
function
|
|
1975
|
+
function Mo(e, t, n = {}) {
|
|
1978
1976
|
return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [a]) => (n[a] ? o.push(n[a]) : t[F[a]] ? o.push(t[F[a]]) : t[Q[a]] && o.push(t[Q[a]]), o), [t[h.Day]]);
|
|
1979
1977
|
}
|
|
1980
|
-
function
|
|
1978
|
+
function ko(e) {
|
|
1981
1979
|
return {
|
|
1982
|
-
...
|
|
1980
|
+
...wo,
|
|
1983
1981
|
...e
|
|
1984
1982
|
};
|
|
1985
1983
|
}
|
|
1986
|
-
function
|
|
1984
|
+
function Do(e) {
|
|
1987
1985
|
const t = {
|
|
1988
1986
|
"data-mode": e.mode ?? void 0,
|
|
1989
1987
|
"data-required": "required" in e ? e.required : void 0,
|
|
@@ -1996,7 +1994,7 @@ function Oo(e) {
|
|
|
1996
1994
|
n.startsWith("data-") && (t[n] = r);
|
|
1997
1995
|
}), t;
|
|
1998
1996
|
}
|
|
1999
|
-
function
|
|
1997
|
+
function ze() {
|
|
2000
1998
|
const e = {};
|
|
2001
1999
|
for (const t in h)
|
|
2002
2000
|
e[h[t]] = `rdp-${h[t]}`;
|
|
@@ -2008,47 +2006,47 @@ function je() {
|
|
|
2008
2006
|
e[z[t]] = `rdp-${z[t]}`;
|
|
2009
2007
|
return e;
|
|
2010
2008
|
}
|
|
2011
|
-
function
|
|
2009
|
+
function Yt(e, t, n) {
|
|
2012
2010
|
return (n ?? new R(t)).formatMonthYear(e);
|
|
2013
2011
|
}
|
|
2014
|
-
const
|
|
2015
|
-
function
|
|
2012
|
+
const vo = Yt;
|
|
2013
|
+
function Oo(e, t, n) {
|
|
2016
2014
|
return (n ?? new R(t)).format(e, "d");
|
|
2017
2015
|
}
|
|
2018
|
-
function
|
|
2016
|
+
function Wo(e, t = V) {
|
|
2019
2017
|
return t.format(e, "LLLL");
|
|
2020
2018
|
}
|
|
2021
|
-
function
|
|
2019
|
+
function So(e, t, n) {
|
|
2022
2020
|
return (n ?? new R(t)).format(e, "cccccc");
|
|
2023
2021
|
}
|
|
2024
|
-
function
|
|
2022
|
+
function Co(e, t = V) {
|
|
2025
2023
|
return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
|
|
2026
2024
|
}
|
|
2027
|
-
function
|
|
2025
|
+
function xo() {
|
|
2028
2026
|
return "";
|
|
2029
2027
|
}
|
|
2030
|
-
function
|
|
2028
|
+
function Tt(e, t = V) {
|
|
2031
2029
|
return t.format(e, "yyyy");
|
|
2032
2030
|
}
|
|
2033
|
-
const
|
|
2031
|
+
const No = Tt, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2034
2032
|
__proto__: null,
|
|
2035
|
-
formatCaption:
|
|
2036
|
-
formatDay:
|
|
2037
|
-
formatMonthCaption:
|
|
2038
|
-
formatMonthDropdown:
|
|
2039
|
-
formatWeekNumber:
|
|
2040
|
-
formatWeekNumberHeader:
|
|
2041
|
-
formatWeekdayName:
|
|
2042
|
-
formatYearCaption:
|
|
2043
|
-
formatYearDropdown:
|
|
2033
|
+
formatCaption: Yt,
|
|
2034
|
+
formatDay: Oo,
|
|
2035
|
+
formatMonthCaption: vo,
|
|
2036
|
+
formatMonthDropdown: Wo,
|
|
2037
|
+
formatWeekNumber: Co,
|
|
2038
|
+
formatWeekNumberHeader: xo,
|
|
2039
|
+
formatWeekdayName: So,
|
|
2040
|
+
formatYearCaption: No,
|
|
2041
|
+
formatYearDropdown: Tt
|
|
2044
2042
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2045
|
-
function
|
|
2043
|
+
function Yo(e) {
|
|
2046
2044
|
return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
|
|
2047
|
-
...
|
|
2045
|
+
..._o,
|
|
2048
2046
|
...e
|
|
2049
2047
|
};
|
|
2050
2048
|
}
|
|
2051
|
-
function
|
|
2049
|
+
function To(e, t, n, r, o) {
|
|
2052
2050
|
const { startOfMonth: a, startOfYear: i, endOfYear: s, eachMonthOfInterval: c, getMonth: u } = o;
|
|
2053
2051
|
return c({
|
|
2054
2052
|
start: i(e),
|
|
@@ -2058,7 +2056,7 @@ function Po(e, t, n, r, o) {
|
|
|
2058
2056
|
return { value: v, label: g, disabled: W };
|
|
2059
2057
|
});
|
|
2060
2058
|
}
|
|
2061
|
-
function
|
|
2059
|
+
function Eo(e, t = {}, n = {}) {
|
|
2062
2060
|
let r = { ...t?.[h.Day] };
|
|
2063
2061
|
return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
|
|
2064
2062
|
r = {
|
|
@@ -2067,7 +2065,7 @@ function Fo(e, t = {}, n = {}) {
|
|
|
2067
2065
|
};
|
|
2068
2066
|
}), r;
|
|
2069
2067
|
}
|
|
2070
|
-
function
|
|
2068
|
+
function Po(e, t, n) {
|
|
2071
2069
|
const r = e.today(), o = t ? e.startOfISOWeek(r) : e.startOfWeek(r), a = [];
|
|
2072
2070
|
for (let i = 0; i < 7; i++) {
|
|
2073
2071
|
const s = e.addDays(o, i);
|
|
@@ -2075,7 +2073,7 @@ function Bo(e, t, n) {
|
|
|
2075
2073
|
}
|
|
2076
2074
|
return a;
|
|
2077
2075
|
}
|
|
2078
|
-
function
|
|
2076
|
+
function Fo(e, t, n, r, o = !1) {
|
|
2079
2077
|
if (!e || !t)
|
|
2080
2078
|
return;
|
|
2081
2079
|
const { startOfYear: a, endOfYear: i, eachYearOfInterval: s, getYear: c } = r, u = a(e), l = i(t), d = s({ start: u, end: l });
|
|
@@ -2088,135 +2086,135 @@ function Io(e, t, n, r, o = !1) {
|
|
|
2088
2086
|
};
|
|
2089
2087
|
});
|
|
2090
2088
|
}
|
|
2091
|
-
function
|
|
2089
|
+
function Et(e, t, n, r) {
|
|
2092
2090
|
let o = (r ?? new R(n)).format(e, "PPPP");
|
|
2093
2091
|
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
2094
2092
|
}
|
|
2095
|
-
const
|
|
2096
|
-
function
|
|
2093
|
+
const Bo = Et;
|
|
2094
|
+
function Pt(e, t, n) {
|
|
2097
2095
|
return (n ?? new R(t)).formatMonthYear(e);
|
|
2098
2096
|
}
|
|
2099
|
-
const
|
|
2100
|
-
function
|
|
2097
|
+
const Io = Pt;
|
|
2098
|
+
function Ho(e, t, n, r) {
|
|
2101
2099
|
let o = (r ?? new R(n)).format(e, "PPPP");
|
|
2102
2100
|
return t?.today && (o = `Today, ${o}`), o;
|
|
2103
2101
|
}
|
|
2104
|
-
function
|
|
2102
|
+
function qo(e) {
|
|
2105
2103
|
return "Choose the Month";
|
|
2106
2104
|
}
|
|
2107
|
-
function
|
|
2105
|
+
function Ao() {
|
|
2108
2106
|
return "";
|
|
2109
2107
|
}
|
|
2110
|
-
function
|
|
2108
|
+
function jo(e) {
|
|
2111
2109
|
return "Go to the Next Month";
|
|
2112
2110
|
}
|
|
2113
|
-
function
|
|
2111
|
+
function zo(e) {
|
|
2114
2112
|
return "Go to the Previous Month";
|
|
2115
2113
|
}
|
|
2116
|
-
function
|
|
2114
|
+
function Ro(e, t, n) {
|
|
2117
2115
|
return (n ?? new R(t)).format(e, "cccc");
|
|
2118
2116
|
}
|
|
2119
|
-
function
|
|
2117
|
+
function $o(e, t) {
|
|
2120
2118
|
return `Week ${e}`;
|
|
2121
2119
|
}
|
|
2122
|
-
function
|
|
2120
|
+
function Zo(e) {
|
|
2123
2121
|
return "Week Number";
|
|
2124
2122
|
}
|
|
2125
|
-
function
|
|
2123
|
+
function Go(e) {
|
|
2126
2124
|
return "Choose the Year";
|
|
2127
2125
|
}
|
|
2128
|
-
const
|
|
2126
|
+
const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2129
2127
|
__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" })), we = (e) => e instanceof HTMLElement ? e : null,
|
|
2128
|
+
labelCaption: Io,
|
|
2129
|
+
labelDay: Bo,
|
|
2130
|
+
labelDayButton: Et,
|
|
2131
|
+
labelGrid: Pt,
|
|
2132
|
+
labelGridcell: Ho,
|
|
2133
|
+
labelMonthDropdown: qo,
|
|
2134
|
+
labelNav: Ao,
|
|
2135
|
+
labelNext: jo,
|
|
2136
|
+
labelPrevious: zo,
|
|
2137
|
+
labelWeekNumber: $o,
|
|
2138
|
+
labelWeekNumberHeader: Zo,
|
|
2139
|
+
labelWeekday: Ro,
|
|
2140
|
+
labelYearDropdown: Go
|
|
2141
|
+
}, Symbol.toStringTag, { value: "Module" })), we = (e) => e instanceof HTMLElement ? e : null, Fe = (e) => [
|
|
2144
2142
|
...e.querySelectorAll("[data-animated-month]") ?? []
|
|
2145
|
-
],
|
|
2146
|
-
function
|
|
2143
|
+
], Qo = (e) => we(e.querySelector("[data-animated-month]")), Be = (e) => we(e.querySelector("[data-animated-caption]")), Ie = (e) => we(e.querySelector("[data-animated-weeks]")), Xo = (e) => we(e.querySelector("[data-animated-nav]")), Uo = (e) => we(e.querySelector("[data-animated-weekdays]"));
|
|
2144
|
+
function Vo(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
2147
2145
|
const i = De(null), s = De(r), c = De(!1);
|
|
2148
|
-
|
|
2146
|
+
mn(() => {
|
|
2149
2147
|
const u = s.current;
|
|
2150
2148
|
if (s.current = r, !t || !e.current || // safety check because the ref can be set to anything by consumers
|
|
2151
2149
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2152
2150
|
r.length === 0 || u.length === 0 || r.length !== u.length)
|
|
2153
2151
|
return;
|
|
2154
2152
|
const l = a.isSameMonth(r[0].date, u[0].date), d = a.isAfter(r[0].date, u[0].date), m = d ? n[z.caption_after_enter] : n[z.caption_before_enter], g = d ? n[z.weeks_after_enter] : n[z.weeks_before_enter], v = i.current, W = e.current.cloneNode(!0);
|
|
2155
|
-
if (W instanceof HTMLElement ? (
|
|
2153
|
+
if (W instanceof HTMLElement ? (Fe(W).forEach((p) => {
|
|
2156
2154
|
if (!(p instanceof HTMLElement))
|
|
2157
2155
|
return;
|
|
2158
|
-
const T =
|
|
2156
|
+
const T = Qo(p);
|
|
2159
2157
|
T && p.contains(T) && p.removeChild(T);
|
|
2160
|
-
const y =
|
|
2158
|
+
const y = Be(p);
|
|
2161
2159
|
y && y.classList.remove(m);
|
|
2162
|
-
const k =
|
|
2160
|
+
const k = Ie(p);
|
|
2163
2161
|
k && k.classList.remove(g);
|
|
2164
2162
|
}), i.current = W) : i.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
2163
|
o)
|
|
2166
2164
|
return;
|
|
2167
|
-
const M = v instanceof HTMLElement ?
|
|
2165
|
+
const M = v instanceof HTMLElement ? Fe(v) : [], O = Fe(e.current);
|
|
2168
2166
|
if (O?.every((C) => C instanceof HTMLElement) && M && M.every((C) => C instanceof HTMLElement)) {
|
|
2169
2167
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
2170
|
-
const C =
|
|
2168
|
+
const C = Xo(e.current);
|
|
2171
2169
|
C && (C.style.zIndex = "1"), O.forEach((p, T) => {
|
|
2172
2170
|
const y = M[T];
|
|
2173
2171
|
if (!y)
|
|
2174
2172
|
return;
|
|
2175
2173
|
p.style.position = "relative", p.style.overflow = "hidden";
|
|
2176
|
-
const k =
|
|
2174
|
+
const k = Be(p);
|
|
2177
2175
|
k && k.classList.add(m);
|
|
2178
|
-
const b =
|
|
2176
|
+
const b = Ie(p);
|
|
2179
2177
|
b && b.classList.add(g);
|
|
2180
|
-
const
|
|
2178
|
+
const x = () => {
|
|
2181
2179
|
c.current = !1, e.current && (e.current.style.isolation = ""), C && (C.style.zIndex = ""), k && k.classList.remove(m), b && b.classList.remove(g), p.style.position = "", p.style.overflow = "", p.contains(y) && p.removeChild(y);
|
|
2182
2180
|
};
|
|
2183
2181
|
y.style.pointerEvents = "none", y.style.position = "absolute", y.style.overflow = "hidden", y.setAttribute("aria-hidden", "true");
|
|
2184
|
-
const I =
|
|
2182
|
+
const I = Uo(y);
|
|
2185
2183
|
I && (I.style.opacity = "0");
|
|
2186
|
-
const q =
|
|
2187
|
-
q && (q.classList.add(d ? n[z.caption_before_exit] : n[z.caption_after_exit]), q.addEventListener("animationend",
|
|
2188
|
-
const A =
|
|
2184
|
+
const q = Be(y);
|
|
2185
|
+
q && (q.classList.add(d ? n[z.caption_before_exit] : n[z.caption_after_exit]), q.addEventListener("animationend", x));
|
|
2186
|
+
const A = Ie(y);
|
|
2189
2187
|
A && A.classList.add(d ? n[z.weeks_before_exit] : n[z.weeks_after_exit]), p.insertBefore(y, p.firstChild);
|
|
2190
2188
|
});
|
|
2191
2189
|
}
|
|
2192
2190
|
});
|
|
2193
2191
|
}
|
|
2194
|
-
function
|
|
2195
|
-
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: m, endOfISOWeek: g, endOfMonth: v, endOfWeek: W, isAfter: M, startOfBroadcastWeek: O, startOfISOWeek: C, startOfWeek: p } = r, T = c ? O(o, r) : i ? C(o) : p(o), y = c ? m(a) : i ? g(v(a)) : W(v(a)), k = l(y, T), b = d(a, o) + 1,
|
|
2192
|
+
function Ko(e, t, n, r) {
|
|
2193
|
+
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: u, differenceInCalendarDays: l, differenceInCalendarMonths: d, endOfBroadcastWeek: m, endOfISOWeek: g, endOfMonth: v, endOfWeek: W, isAfter: M, startOfBroadcastWeek: O, startOfISOWeek: C, startOfWeek: p } = r, T = c ? O(o, r) : i ? C(o) : p(o), y = c ? m(a) : i ? g(v(a)) : W(v(a)), k = l(y, T), b = d(a, o) + 1, x = [];
|
|
2196
2194
|
for (let A = 0; A <= k; A++) {
|
|
2197
2195
|
const Z = u(T, A);
|
|
2198
2196
|
if (t && M(Z, t))
|
|
2199
2197
|
break;
|
|
2200
|
-
|
|
2198
|
+
x.push(Z);
|
|
2201
2199
|
}
|
|
2202
2200
|
const q = (c ? 35 : 42) * b;
|
|
2203
|
-
if (s &&
|
|
2204
|
-
const A = q -
|
|
2201
|
+
if (s && x.length < q) {
|
|
2202
|
+
const A = q - x.length;
|
|
2205
2203
|
for (let Z = 0; Z < A; Z++) {
|
|
2206
|
-
const ae = u(
|
|
2207
|
-
|
|
2204
|
+
const ae = u(x[x.length - 1], 1);
|
|
2205
|
+
x.push(ae);
|
|
2208
2206
|
}
|
|
2209
2207
|
}
|
|
2210
|
-
return
|
|
2208
|
+
return x;
|
|
2211
2209
|
}
|
|
2212
|
-
function
|
|
2210
|
+
function Jo(e) {
|
|
2213
2211
|
const t = [];
|
|
2214
2212
|
return e.reduce((n, r) => {
|
|
2215
2213
|
const o = r.weeks.reduce((a, i) => a.concat(i.days.slice()), t.slice());
|
|
2216
2214
|
return n.concat(o.slice());
|
|
2217
2215
|
}, t.slice());
|
|
2218
2216
|
}
|
|
2219
|
-
function
|
|
2217
|
+
function ea(e, t, n, r) {
|
|
2220
2218
|
const { numberOfMonths: o = 1 } = n, a = [];
|
|
2221
2219
|
for (let i = 0; i < o; i++) {
|
|
2222
2220
|
const s = r.addMonths(e, i);
|
|
@@ -2226,7 +2224,7 @@ function na(e, t, n, r) {
|
|
|
2226
2224
|
}
|
|
2227
2225
|
return a;
|
|
2228
2226
|
}
|
|
2229
|
-
function
|
|
2227
|
+
function st(e, t, n, r) {
|
|
2230
2228
|
const { month: o, defaultMonth: a, today: i = r.today(), numberOfMonths: s = 1 } = e;
|
|
2231
2229
|
let c = o || a || i;
|
|
2232
2230
|
const { differenceInCalendarMonths: u, addMonths: l, startOfMonth: d } = r;
|
|
@@ -2236,25 +2234,25 @@ function at(e, t, n, r) {
|
|
|
2236
2234
|
}
|
|
2237
2235
|
return t && u(c, t) < 0 && (c = t), d(c);
|
|
2238
2236
|
}
|
|
2239
|
-
function
|
|
2237
|
+
function ta(e, t, n, r) {
|
|
2240
2238
|
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: u, getWeek: l, startOfBroadcastWeek: d, startOfISOWeek: m, startOfWeek: g } = r, v = e.reduce((W, M) => {
|
|
2241
2239
|
const O = n.broadcastCalendar ? d(M, r) : n.ISOWeek ? m(M) : g(M), C = n.broadcastCalendar ? a(M) : n.ISOWeek ? i(s(M)) : c(s(M)), p = t.filter((b) => b >= O && b <= C), T = n.broadcastCalendar ? 35 : 42;
|
|
2242
2240
|
if (n.fixedWeeks && p.length < T) {
|
|
2243
|
-
const b = t.filter((
|
|
2241
|
+
const b = t.filter((x) => {
|
|
2244
2242
|
const I = T - p.length;
|
|
2245
|
-
return
|
|
2243
|
+
return x > C && x <= o(C, I);
|
|
2246
2244
|
});
|
|
2247
2245
|
p.push(...b);
|
|
2248
2246
|
}
|
|
2249
|
-
const y = p.reduce((b,
|
|
2250
|
-
const I = n.ISOWeek ? u(
|
|
2251
|
-
return q ? q.days.push(A) : b.push(new
|
|
2252
|
-
}, []), k = new
|
|
2247
|
+
const y = p.reduce((b, x) => {
|
|
2248
|
+
const I = n.ISOWeek ? u(x) : l(x), q = b.find((Z) => Z.weekNumber === I), A = new Ot(x, M, r);
|
|
2249
|
+
return q ? q.days.push(A) : b.push(new $r(I, [A])), b;
|
|
2250
|
+
}, []), k = new Rr(M, y);
|
|
2253
2251
|
return W.push(k), W;
|
|
2254
2252
|
}, []);
|
|
2255
2253
|
return n.reverseMonths ? v.reverse() : v;
|
|
2256
2254
|
}
|
|
2257
|
-
function
|
|
2255
|
+
function na(e, t) {
|
|
2258
2256
|
let { startMonth: n, endMonth: r } = e;
|
|
2259
2257
|
const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: u, newDate: l, today: d } = t, { fromYear: m, toYear: g, fromMonth: v, toMonth: W } = e;
|
|
2260
2258
|
!n && v && (n = v), !n && m && (n = t.newDate(m, 0, 1)), !r && W && (r = W), !r && g && (r = l(g, 11, 31));
|
|
@@ -2264,7 +2262,7 @@ function oa(e, t) {
|
|
|
2264
2262
|
r && a(r)
|
|
2265
2263
|
];
|
|
2266
2264
|
}
|
|
2267
|
-
function
|
|
2265
|
+
function ra(e, t, n, r) {
|
|
2268
2266
|
if (n.disableNavigation)
|
|
2269
2267
|
return;
|
|
2270
2268
|
const { pagedNavigation: o, numberOfMonths: a = 1 } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, u = o ? a : 1, l = i(e);
|
|
@@ -2273,7 +2271,7 @@ function aa(e, t, n, r) {
|
|
|
2273
2271
|
if (!(c(t, e) < a))
|
|
2274
2272
|
return s(l, u);
|
|
2275
2273
|
}
|
|
2276
|
-
function
|
|
2274
|
+
function oa(e, t, n, r) {
|
|
2277
2275
|
if (n.disableNavigation)
|
|
2278
2276
|
return;
|
|
2279
2277
|
const { pagedNavigation: o, numberOfMonths: a } = n, { startOfMonth: i, addMonths: s, differenceInCalendarMonths: c } = r, u = o ? a ?? 1 : 1, l = i(e);
|
|
@@ -2282,25 +2280,25 @@ function sa(e, t, n, r) {
|
|
|
2282
2280
|
if (!(c(l, t) <= 0))
|
|
2283
2281
|
return s(l, -u);
|
|
2284
2282
|
}
|
|
2285
|
-
function
|
|
2283
|
+
function aa(e) {
|
|
2286
2284
|
const t = [];
|
|
2287
2285
|
return e.reduce((n, r) => n.concat(r.weeks.slice()), t.slice());
|
|
2288
2286
|
}
|
|
2289
2287
|
function ve(e, t) {
|
|
2290
|
-
const [n, r] =
|
|
2288
|
+
const [n, r] = He(e);
|
|
2291
2289
|
return [t === void 0 ? n : t, r];
|
|
2292
2290
|
}
|
|
2293
|
-
function
|
|
2294
|
-
const [n, r] =
|
|
2291
|
+
function sa(e, t) {
|
|
2292
|
+
const [n, r] = na(e, t), { startOfMonth: o, endOfMonth: a } = t, i = st(e, n, r, t), [s, c] = ve(
|
|
2295
2293
|
i,
|
|
2296
2294
|
// initialMonth is always computed from props.month if provided
|
|
2297
2295
|
e.month ? i : void 0
|
|
2298
2296
|
);
|
|
2299
|
-
|
|
2300
|
-
const k =
|
|
2297
|
+
hn(() => {
|
|
2298
|
+
const k = st(e, n, r, t);
|
|
2301
2299
|
c(k);
|
|
2302
2300
|
}, [e.timeZone]);
|
|
2303
|
-
const u =
|
|
2301
|
+
const u = ea(s, r, e, t), l = Ko(u, e.endMonth ? a(e.endMonth) : void 0, e, t), d = ta(u, l, e, t), m = aa(d), g = Jo(d), v = oa(s, n, e, t), W = ra(s, r, e, t), { disableNavigation: M, onMonthChange: O } = e, C = (k) => m.some((b) => b.days.some((x) => x.isEqualTo(k))), p = (k) => {
|
|
2304
2302
|
if (M)
|
|
2305
2303
|
return;
|
|
2306
2304
|
let b = o(k);
|
|
@@ -2324,18 +2322,18 @@ var X;
|
|
|
2324
2322
|
(function(e) {
|
|
2325
2323
|
e[e.Today = 0] = "Today", e[e.Selected = 1] = "Selected", e[e.LastFocused = 2] = "LastFocused", e[e.FocusedModifier = 3] = "FocusedModifier";
|
|
2326
2324
|
})(X || (X = {}));
|
|
2327
|
-
function
|
|
2325
|
+
function it(e) {
|
|
2328
2326
|
return !e[F.disabled] && !e[F.hidden] && !e[F.outside];
|
|
2329
2327
|
}
|
|
2330
|
-
function
|
|
2328
|
+
function ia(e, t, n, r) {
|
|
2331
2329
|
let o, a = -1;
|
|
2332
2330
|
for (const i of e) {
|
|
2333
2331
|
const s = t(i);
|
|
2334
|
-
|
|
2332
|
+
it(s) && (s[F.focused] && a < X.FocusedModifier ? (o = i, a = X.FocusedModifier) : r?.isEqualTo(i) && a < X.LastFocused ? (o = i, a = X.LastFocused) : n(i.date) && a < X.Selected ? (o = i, a = X.Selected) : s[F.today] && a < X.Today && (o = i, a = X.Today));
|
|
2335
2333
|
}
|
|
2336
|
-
return o || (o = e.find((i) =>
|
|
2334
|
+
return o || (o = e.find((i) => it(t(i)))), o;
|
|
2337
2335
|
}
|
|
2338
|
-
function
|
|
2336
|
+
function ca(e, t, n, r, o, a, i) {
|
|
2339
2337
|
const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: u, addMonths: l, addWeeks: d, addYears: m, endOfBroadcastWeek: g, endOfISOWeek: v, endOfWeek: W, max: M, min: O, startOfBroadcastWeek: C, startOfISOWeek: p, startOfWeek: T } = i;
|
|
2340
2338
|
let k = {
|
|
2341
2339
|
day: u,
|
|
@@ -2347,14 +2345,14 @@ function ua(e, t, n, r, o, a, i) {
|
|
|
2347
2345
|
}[e](n, t === "after" ? 1 : -1);
|
|
2348
2346
|
return t === "before" && r ? k = M([r, k]) : t === "after" && o && (k = O([o, k])), k;
|
|
2349
2347
|
}
|
|
2350
|
-
function
|
|
2348
|
+
function Ft(e, t, n, r, o, a, i, s = 0) {
|
|
2351
2349
|
if (s > 365)
|
|
2352
2350
|
return;
|
|
2353
|
-
const c =
|
|
2354
|
-
return !u && !l ? m :
|
|
2351
|
+
const c = ca(e, t, n.date, r, o, a, i), u = !!(a.disabled && ee(c, a.disabled, i)), l = !!(a.hidden && ee(c, a.hidden, i)), d = c, m = new Ot(c, d, i);
|
|
2352
|
+
return !u && !l ? m : Ft(e, t, m, r, o, a, i, s + 1);
|
|
2355
2353
|
}
|
|
2356
|
-
function
|
|
2357
|
-
const { autoFocus: a } = e, [i, s] =
|
|
2354
|
+
function da(e, t, n, r, o) {
|
|
2355
|
+
const { autoFocus: a } = e, [i, s] = He(), c = ia(t.days, n, r || (() => !1), i), [u, l] = He(a ? c : void 0);
|
|
2358
2356
|
return {
|
|
2359
2357
|
isFocusTarget: (W) => !!c?.isEqualTo(W),
|
|
2360
2358
|
setFocused: l,
|
|
@@ -2365,12 +2363,12 @@ function la(e, t, n, r, o) {
|
|
|
2365
2363
|
moveFocus: (W, M) => {
|
|
2366
2364
|
if (!u)
|
|
2367
2365
|
return;
|
|
2368
|
-
const O =
|
|
2366
|
+
const O = Ft(W, M, u, t.navStart, t.navEnd, e, o);
|
|
2369
2367
|
O && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(O)) || (t.goToDay(O), l(O)));
|
|
2370
2368
|
}
|
|
2371
2369
|
};
|
|
2372
2370
|
}
|
|
2373
|
-
function
|
|
2371
|
+
function ua(e, t) {
|
|
2374
2372
|
const { selected: n, required: r, onSelect: o } = e, [a, i] = ve(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, u = (g) => s?.some((v) => c(v, g)) ?? !1, { min: l, max: d } = e;
|
|
2375
2373
|
return {
|
|
2376
2374
|
selected: s,
|
|
@@ -2387,7 +2385,7 @@ function fa(e, t) {
|
|
|
2387
2385
|
isSelected: u
|
|
2388
2386
|
};
|
|
2389
2387
|
}
|
|
2390
|
-
function
|
|
2388
|
+
function la(e, t, n = 0, r = 0, o = !1, a = V) {
|
|
2391
2389
|
const { from: i, to: s } = t || {}, { isSameDay: c, isAfter: u, isBefore: l } = a;
|
|
2392
2390
|
let d;
|
|
2393
2391
|
if (!i && !s)
|
|
@@ -2415,7 +2413,7 @@ function ma(e, t, n = 0, r = 0, o = !1, a = V) {
|
|
|
2415
2413
|
}
|
|
2416
2414
|
return d;
|
|
2417
2415
|
}
|
|
2418
|
-
function
|
|
2416
|
+
function fa(e, t, n = V) {
|
|
2419
2417
|
const r = Array.isArray(t) ? t : [t];
|
|
2420
2418
|
let o = e.from;
|
|
2421
2419
|
const a = n.differenceInCalendarDays(e.to, e.from), i = Math.min(a, 6);
|
|
@@ -2426,15 +2424,15 @@ function ha(e, t, n = V) {
|
|
|
2426
2424
|
}
|
|
2427
2425
|
return !1;
|
|
2428
2426
|
}
|
|
2429
|
-
function
|
|
2427
|
+
function ct(e, t, n = V) {
|
|
2430
2428
|
return J(e, t.from, !1, n) || J(e, t.to, !1, n) || J(t, e.from, !1, n) || J(t, e.to, !1, n);
|
|
2431
2429
|
}
|
|
2432
|
-
function
|
|
2430
|
+
function ma(e, t, n = V) {
|
|
2433
2431
|
const r = Array.isArray(t) ? t : [t];
|
|
2434
|
-
if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? J(e, s, !1, n) :
|
|
2432
|
+
if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? J(e, s, !1, n) : _t(s, n) ? s.some((c) => J(e, c, !1, n)) : je(s) ? s.from && s.to ? ct(e, { from: s.from, to: s.to }, n) : !1 : Nt(s) ? fa(e, s.dayOfWeek, n) : St(s) ? n.isAfter(s.before, s.after) ? ct(e, {
|
|
2435
2433
|
from: n.addDays(s.after, 1),
|
|
2436
2434
|
to: n.addDays(s.before, -1)
|
|
2437
|
-
}, n) : ee(e.from, s, n) || ee(e.to, s, n) :
|
|
2435
|
+
}, n) : ee(e.from, s, n) || ee(e.to, s, n) : Ct(s) || xt(s) ? ee(e.from, s, n) || ee(e.to, s, n) : !1))
|
|
2438
2436
|
return !0;
|
|
2439
2437
|
const i = r.filter((s) => typeof s == "function");
|
|
2440
2438
|
if (i.length) {
|
|
@@ -2448,18 +2446,18 @@ function ya(e, t, n = V) {
|
|
|
2448
2446
|
}
|
|
2449
2447
|
return !1;
|
|
2450
2448
|
}
|
|
2451
|
-
function
|
|
2449
|
+
function ha(e, t) {
|
|
2452
2450
|
const { disabled: n, excludeDisabled: r, selected: o, required: a, onSelect: i } = e, [s, c] = ve(o, i ? o : void 0), u = i ? o : s;
|
|
2453
2451
|
return {
|
|
2454
2452
|
selected: u,
|
|
2455
2453
|
select: (m, g, v) => {
|
|
2456
|
-
const { min: W, max: M } = e, O = m ?
|
|
2457
|
-
return r && n && O?.from && O.to &&
|
|
2454
|
+
const { min: W, max: M } = e, O = m ? la(m, u, W, M, a, t) : void 0;
|
|
2455
|
+
return r && n && O?.from && O.to && ma({ from: O.from, to: O.to }, n, t) && (O.from = m, O.to = void 0), i || c(O), i?.(O, m, g, v), O;
|
|
2458
2456
|
},
|
|
2459
2457
|
isSelected: (m) => u && J(u, m, !1, t)
|
|
2460
2458
|
};
|
|
2461
2459
|
}
|
|
2462
|
-
function
|
|
2460
|
+
function ya(e, t) {
|
|
2463
2461
|
const { selected: n, required: r, onSelect: o } = e, [a, i] = ve(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t;
|
|
2464
2462
|
return {
|
|
2465
2463
|
selected: s,
|
|
@@ -2470,8 +2468,8 @@ function pa(e, t) {
|
|
|
2470
2468
|
isSelected: (d) => s ? c(s, d) : !1
|
|
2471
2469
|
};
|
|
2472
2470
|
}
|
|
2473
|
-
function
|
|
2474
|
-
const n =
|
|
2471
|
+
function ga(e, t) {
|
|
2472
|
+
const n = ya(e, t), r = ua(e, t), o = ha(e, t);
|
|
2475
2473
|
switch (e.mode) {
|
|
2476
2474
|
case "single":
|
|
2477
2475
|
return n;
|
|
@@ -2483,7 +2481,7 @@ function wa(e, t) {
|
|
|
2483
2481
|
return;
|
|
2484
2482
|
}
|
|
2485
2483
|
}
|
|
2486
|
-
function
|
|
2484
|
+
function pa(e) {
|
|
2487
2485
|
let t = e;
|
|
2488
2486
|
t.timeZone && (t = {
|
|
2489
2487
|
...e
|
|
@@ -2491,8 +2489,8 @@ function ba(e) {
|
|
|
2491
2489
|
from: t.selected.from ? new H(t.selected.from, t.timeZone) : void 0,
|
|
2492
2490
|
to: t.selected.to ? new H(t.selected.to, t.timeZone) : void 0
|
|
2493
2491
|
}));
|
|
2494
|
-
const { components: n, formatters: r, labels: o, dateLib: a, locale: i, classNames: s } =
|
|
2495
|
-
const D = { ...
|
|
2492
|
+
const { components: n, formatters: r, labels: o, dateLib: a, locale: i, classNames: s } = Ee(() => {
|
|
2493
|
+
const D = { ...Ae, ...t.locale };
|
|
2496
2494
|
return {
|
|
2497
2495
|
dateLib: new R({
|
|
2498
2496
|
locale: D,
|
|
@@ -2503,11 +2501,11 @@ function ba(e) {
|
|
|
2503
2501
|
timeZone: t.timeZone,
|
|
2504
2502
|
numerals: t.numerals
|
|
2505
2503
|
}, t.dateLib),
|
|
2506
|
-
components:
|
|
2507
|
-
formatters:
|
|
2508
|
-
labels: { ...
|
|
2504
|
+
components: ko(t.components),
|
|
2505
|
+
formatters: Yo(t.formatters),
|
|
2506
|
+
labels: { ...Lo, ...t.labels },
|
|
2509
2507
|
locale: D,
|
|
2510
|
-
classNames: { ...
|
|
2508
|
+
classNames: { ...ze(), ...t.classNames }
|
|
2511
2509
|
};
|
|
2512
2510
|
}, [
|
|
2513
2511
|
t.locale,
|
|
@@ -2523,17 +2521,17 @@ function ba(e) {
|
|
|
2523
2521
|
t.formatters,
|
|
2524
2522
|
t.labels,
|
|
2525
2523
|
t.classNames
|
|
2526
|
-
]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: m, onDayClick: g, onDayFocus: v, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: O, onNextClick: C, onPrevClick: p, showWeekNumber: T, styles: y } = t, { formatCaption: k, formatDay: b, formatMonthDropdown:
|
|
2524
|
+
]), { captionLayout: c, mode: u, navLayout: l, numberOfMonths: d = 1, onDayBlur: m, onDayClick: g, onDayFocus: v, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: O, onNextClick: C, onPrevClick: p, showWeekNumber: T, styles: y } = t, { formatCaption: k, formatDay: b, formatMonthDropdown: x, formatWeekNumber: I, formatWeekNumberHeader: q, formatWeekdayName: A, formatYearDropdown: Z } = r, ae = sa(t, a), { days: se, months: ie, navStart: be, navEnd: Oe, previousMonth: G, nextMonth: L, goToMonth: K } = ae, We = bo(se, t, be, Oe, a), { isSelected: Se, select: Ce, selected: Me } = ga(t, a) ?? {}, { blur: Re, focused: $e, isFocusTarget: Bt, moveFocus: Ze, setFocused: ke } = da(t, ae, We, Se ?? (() => !1), a), { labelDayButton: It, labelGridcell: Ht, labelGrid: qt, labelMonthDropdown: At, labelNav: Ge, labelPrevious: jt, labelNext: zt, labelWeekday: Rt, labelWeekNumber: $t, labelWeekNumberHeader: Zt, labelYearDropdown: Gt } = o, Lt = Ee(() => Po(a, t.ISOWeek), [a, t.ISOWeek]), Le = u !== void 0 || g !== void 0, xe = $(() => {
|
|
2527
2525
|
G && (K(G), p?.(G));
|
|
2528
|
-
}, [G, K, p]),
|
|
2526
|
+
}, [G, K, p]), Ne = $(() => {
|
|
2529
2527
|
L && (K(L), C?.(L));
|
|
2530
|
-
}, [K, L, C]),
|
|
2528
|
+
}, [K, L, C]), Qt = $((D, P) => (w) => {
|
|
2531
2529
|
w.preventDefault(), w.stopPropagation(), ke(D), Ce?.(D.date, P, w), g?.(D.date, P, w);
|
|
2532
|
-
}, [Ce, g, ke]),
|
|
2530
|
+
}, [Ce, g, ke]), Xt = $((D, P) => (w) => {
|
|
2533
2531
|
ke(D), v?.(D.date, P, w);
|
|
2534
|
-
}, [v, ke]),
|
|
2535
|
-
|
|
2536
|
-
}, [
|
|
2532
|
+
}, [v, ke]), Ut = $((D, P) => (w) => {
|
|
2533
|
+
Re(), m?.(D.date, P, w);
|
|
2534
|
+
}, [Re, m]), Vt = $((D, P) => (w) => {
|
|
2537
2535
|
const E = {
|
|
2538
2536
|
ArrowLeft: [
|
|
2539
2537
|
w.shiftKey ? "month" : "day",
|
|
@@ -2553,30 +2551,30 @@ function ba(e) {
|
|
|
2553
2551
|
if (E[w.key]) {
|
|
2554
2552
|
w.preventDefault(), w.stopPropagation();
|
|
2555
2553
|
const [j, S] = E[w.key];
|
|
2556
|
-
|
|
2554
|
+
Ze(j, S);
|
|
2557
2555
|
}
|
|
2558
2556
|
W?.(D.date, P, w);
|
|
2559
|
-
}, [
|
|
2557
|
+
}, [Ze, W, t.dir]), Kt = $((D, P) => (w) => {
|
|
2560
2558
|
M?.(D.date, P, w);
|
|
2561
|
-
}, [M]),
|
|
2559
|
+
}, [M]), Jt = $((D, P) => (w) => {
|
|
2562
2560
|
O?.(D.date, P, w);
|
|
2563
|
-
}, [O]),
|
|
2561
|
+
}, [O]), en = $((D) => (P) => {
|
|
2564
2562
|
const w = Number(P.target.value), E = a.setMonth(a.startOfMonth(D), w);
|
|
2565
2563
|
K(E);
|
|
2566
|
-
}, [a, K]),
|
|
2564
|
+
}, [a, K]), tn = $((D) => (P) => {
|
|
2567
2565
|
const w = Number(P.target.value), E = a.setYear(a.startOfMonth(D), w);
|
|
2568
2566
|
K(E);
|
|
2569
|
-
}, [a, K]), { className:
|
|
2567
|
+
}, [a, K]), { className: nn, style: rn } = Ee(() => ({
|
|
2570
2568
|
className: [s[h.Root], t.className].filter(Boolean).join(" "),
|
|
2571
2569
|
style: { ...y?.[h.Root], ...t.style }
|
|
2572
|
-
}), [s, t.className, t.style, y]),
|
|
2573
|
-
|
|
2570
|
+
}), [s, t.className, t.style, y]), on = Do(t), Qe = De(null);
|
|
2571
|
+
Vo(Qe, !!t.animate, {
|
|
2574
2572
|
classNames: s,
|
|
2575
2573
|
months: ie,
|
|
2576
|
-
focused:
|
|
2574
|
+
focused: $e,
|
|
2577
2575
|
dateLib: a
|
|
2578
2576
|
});
|
|
2579
|
-
const
|
|
2577
|
+
const an = {
|
|
2580
2578
|
dayPickerProps: t,
|
|
2581
2579
|
selected: Me,
|
|
2582
2580
|
select: Ce,
|
|
@@ -2593,15 +2591,15 @@ function ba(e) {
|
|
|
2593
2591
|
formatters: r
|
|
2594
2592
|
};
|
|
2595
2593
|
return f.createElement(
|
|
2596
|
-
|
|
2597
|
-
{ value:
|
|
2594
|
+
Wt.Provider,
|
|
2595
|
+
{ value: an },
|
|
2598
2596
|
f.createElement(
|
|
2599
2597
|
n.Root,
|
|
2600
|
-
{ rootRef: t.animate ?
|
|
2598
|
+
{ rootRef: t.animate ? Qe : void 0, className: nn, style: rn, 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"], ...on },
|
|
2601
2599
|
f.createElement(
|
|
2602
2600
|
n.Months,
|
|
2603
2601
|
{ className: s[h.Months], style: y?.[h.Months] },
|
|
2604
|
-
!t.hideNavigation && !l && f.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[h.Nav], style: y?.[h.Nav], "aria-label":
|
|
2602
|
+
!t.hideNavigation && !l && f.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[h.Nav], style: y?.[h.Nav], "aria-label": Ge(), onPreviousClick: xe, onNextClick: Ne, previousMonth: G, nextMonth: L }),
|
|
2605
2603
|
ie.map((D, P) => f.createElement(
|
|
2606
2604
|
n.Month,
|
|
2607
2605
|
{
|
|
@@ -2615,14 +2613,14 @@ function ba(e) {
|
|
|
2615
2613
|
},
|
|
2616
2614
|
l === "around" && !t.hideNavigation && P === 0 && f.createElement(
|
|
2617
2615
|
n.PreviousMonthButton,
|
|
2618
|
-
{ type: "button", className: s[h.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label":
|
|
2616
|
+
{ type: "button", className: s[h.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": jt(G), onClick: xe, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2619
2617
|
f.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[h.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2620
2618
|
),
|
|
2621
2619
|
f.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[h.MonthCaption], style: y?.[h.MonthCaption], calendarMonth: D, displayIndex: P }, c?.startsWith("dropdown") ? f.createElement(
|
|
2622
2620
|
n.DropdownNav,
|
|
2623
2621
|
{ className: s[h.Dropdowns], style: y?.[h.Dropdowns] },
|
|
2624
2622
|
(() => {
|
|
2625
|
-
const w = c === "dropdown" || c === "dropdown-months" ? f.createElement(n.MonthsDropdown, { key: "month", className: s[h.MonthsDropdown], "aria-label":
|
|
2623
|
+
const w = c === "dropdown" || c === "dropdown-months" ? f.createElement(n.MonthsDropdown, { key: "month", className: s[h.MonthsDropdown], "aria-label": At(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: en(D.date), options: To(D.date, be, Oe, r, a), style: y?.[h.Dropdown], value: a.getMonth(D.date) }) : f.createElement("span", { key: "month" }, x(D.date, a)), E = c === "dropdown" || c === "dropdown-years" ? f.createElement(n.YearsDropdown, { key: "year", className: s[h.YearsDropdown], "aria-label": Gt(a.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: tn(D.date), options: Fo(be, Oe, r, a, !!t.reverseYears), style: y?.[h.Dropdown], value: a.getYear(D.date) }) : f.createElement("span", { key: "year" }, Z(D.date, a));
|
|
2626
2624
|
return a.getMonthYearOrder() === "year-first" ? [E, w] : [w, E];
|
|
2627
2625
|
})(),
|
|
2628
2626
|
f.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
@@ -2643,36 +2641,36 @@ function ba(e) {
|
|
|
2643
2641
|
)),
|
|
2644
2642
|
l === "around" && !t.hideNavigation && P === d - 1 && f.createElement(
|
|
2645
2643
|
n.NextMonthButton,
|
|
2646
|
-
{ type: "button", className: s[h.NextMonthButton], tabIndex: L ? void 0 : -1, "aria-disabled": L ? void 0 : !0, "aria-label":
|
|
2644
|
+
{ type: "button", className: s[h.NextMonthButton], tabIndex: L ? void 0 : -1, "aria-disabled": L ? void 0 : !0, "aria-label": zt(L), onClick: Ne, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2647
2645
|
f.createElement(n.Chevron, { disabled: L ? void 0 : !0, className: s[h.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
2648
2646
|
),
|
|
2649
|
-
P === d - 1 && l === "after" && !t.hideNavigation && f.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[h.Nav], style: y?.[h.Nav], "aria-label":
|
|
2647
|
+
P === d - 1 && l === "after" && !t.hideNavigation && f.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[h.Nav], style: y?.[h.Nav], "aria-label": Ge(), onPreviousClick: xe, onNextClick: Ne, previousMonth: G, nextMonth: L }),
|
|
2650
2648
|
f.createElement(
|
|
2651
2649
|
n.MonthGrid,
|
|
2652
|
-
{ role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label":
|
|
2650
|
+
{ role: "grid", "aria-multiselectable": u === "multiple" || u === "range", "aria-label": qt(D.date, a.options, a) || void 0, className: s[h.MonthGrid], style: y?.[h.MonthGrid] },
|
|
2653
2651
|
!t.hideWeekdays && f.createElement(
|
|
2654
2652
|
n.Weekdays,
|
|
2655
2653
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: s[h.Weekdays], style: y?.[h.Weekdays] },
|
|
2656
|
-
T && f.createElement(n.WeekNumberHeader, { "aria-label":
|
|
2657
|
-
|
|
2654
|
+
T && f.createElement(n.WeekNumberHeader, { "aria-label": Zt(a.options), className: s[h.WeekNumberHeader], style: y?.[h.WeekNumberHeader], scope: "col" }, q()),
|
|
2655
|
+
Lt.map((w) => f.createElement(n.Weekday, { "aria-label": Rt(w, a.options, a), className: s[h.Weekday], key: String(w), style: y?.[h.Weekday], scope: "col" }, A(w, a.options, a)))
|
|
2658
2656
|
),
|
|
2659
2657
|
f.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[h.Weeks], style: y?.[h.Weeks] }, D.weeks.map((w) => f.createElement(
|
|
2660
2658
|
n.Week,
|
|
2661
2659
|
{ className: s[h.Week], key: w.weekNumber, style: y?.[h.Week], week: w },
|
|
2662
2660
|
T && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2663
|
-
f.createElement(n.WeekNumber, { week: w, style: y?.[h.WeekNumber], "aria-label":
|
|
2661
|
+
f.createElement(n.WeekNumber, { week: w, style: y?.[h.WeekNumber], "aria-label": $t(w.weekNumber, {
|
|
2664
2662
|
locale: i
|
|
2665
2663
|
}), className: s[h.WeekNumber], scope: "row", role: "rowheader" }, I(w.weekNumber, a)),
|
|
2666
2664
|
w.days.map((E) => {
|
|
2667
2665
|
const { date: j } = E, S = We(E);
|
|
2668
|
-
if (S[F.focused] = !S.hidden &&
|
|
2666
|
+
if (S[F.focused] = !S.hidden && !!$e?.isEqualTo(E), S[Q.selected] = Se?.(j) || S.selected, je(Me)) {
|
|
2669
2667
|
const { from: _e, to: Ye } = Me;
|
|
2670
2668
|
S[Q.range_start] = !!(_e && Ye && a.isSameDay(j, _e)), S[Q.range_end] = !!(_e && Ye && a.isSameDay(j, Ye)), S[Q.range_middle] = J(Me, j, !0, a);
|
|
2671
2669
|
}
|
|
2672
|
-
const
|
|
2670
|
+
const sn = Eo(S, y, t.modifiersStyles), cn = Mo(S, s, t.modifiersClassNames), dn = !Le && !S.hidden ? Ht(j, S, a.options, a) : void 0;
|
|
2673
2671
|
return (
|
|
2674
2672
|
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
2675
|
-
f.createElement(n.Day, { key: `${a.format(j, "yyyy-MM-dd")}_${a.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: S, className:
|
|
2673
|
+
f.createElement(n.Day, { key: `${a.format(j, "yyyy-MM-dd")}_${a.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: S, className: cn.join(" "), style: sn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": dn, "data-day": a.format(j, "yyyy-MM-dd"), "data-month": E.outside ? a.format(j, "yyyy-MM") : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && Le ? f.createElement(n.DayButton, { className: s[h.DayButton], style: y?.[h.DayButton], type: "button", day: E, modifiers: S, disabled: S.disabled || void 0, tabIndex: Bt(E) ? 0 : -1, "aria-label": It(j, S, a.options, a), onClick: Qt(E, S), onBlur: Ut(E, S), onFocus: Xt(E, S), onKeyDown: Vt(E, S), onMouseEnter: Kt(E, S), onMouseLeave: Jt(E, S) }, b(j, a.options, a)) : !S.hidden && b(E.date, a.options, a))
|
|
2676
2674
|
);
|
|
2677
2675
|
})
|
|
2678
2676
|
)))
|
|
@@ -2684,7 +2682,7 @@ function ba(e) {
|
|
|
2684
2682
|
)
|
|
2685
2683
|
);
|
|
2686
2684
|
}
|
|
2687
|
-
function
|
|
2685
|
+
function Oa({
|
|
2688
2686
|
className: e,
|
|
2689
2687
|
classNames: t,
|
|
2690
2688
|
showOutsideDays: n = !0,
|
|
@@ -2694,12 +2692,12 @@ function Na({
|
|
|
2694
2692
|
components: i,
|
|
2695
2693
|
...s
|
|
2696
2694
|
}) {
|
|
2697
|
-
const c =
|
|
2695
|
+
const c = ze();
|
|
2698
2696
|
return /* @__PURE__ */ ne.jsx(
|
|
2699
|
-
|
|
2697
|
+
pa,
|
|
2700
2698
|
{
|
|
2701
2699
|
showOutsideDays: n,
|
|
2702
|
-
className:
|
|
2700
|
+
className: N(
|
|
2703
2701
|
`
|
|
2704
2702
|
adm:group/calendar adm:bg-background adm:p-3
|
|
2705
2703
|
adm:[--cell-size:--spacing(8)]
|
|
@@ -2716,53 +2714,53 @@ function Na({
|
|
|
2716
2714
|
...a
|
|
2717
2715
|
},
|
|
2718
2716
|
classNames: {
|
|
2719
|
-
root:
|
|
2720
|
-
months:
|
|
2717
|
+
root: N("adm:w-fit", c.root),
|
|
2718
|
+
months: N(
|
|
2721
2719
|
`
|
|
2722
2720
|
adm:relative adm:flex adm:flex-col adm:gap-4
|
|
2723
2721
|
adm:md:flex-row
|
|
2724
2722
|
`,
|
|
2725
2723
|
c.months
|
|
2726
2724
|
),
|
|
2727
|
-
month:
|
|
2728
|
-
nav:
|
|
2725
|
+
month: N("adm:flex adm:w-full adm:flex-col adm:gap-4", c.month),
|
|
2726
|
+
nav: N(
|
|
2729
2727
|
`
|
|
2730
2728
|
adm:absolute adm:inset-x-0 adm:top-0 adm:flex adm:w-full
|
|
2731
2729
|
adm:items-center adm:justify-between adm:gap-1
|
|
2732
2730
|
`,
|
|
2733
2731
|
c.nav
|
|
2734
2732
|
),
|
|
2735
|
-
button_previous:
|
|
2736
|
-
|
|
2733
|
+
button_previous: N(
|
|
2734
|
+
Xe({ variant: o }),
|
|
2737
2735
|
`
|
|
2738
2736
|
adm:size-(--cell-size) adm:p-0 adm:select-none
|
|
2739
2737
|
adm:aria-disabled:opacity-50
|
|
2740
2738
|
`,
|
|
2741
2739
|
c.button_previous
|
|
2742
2740
|
),
|
|
2743
|
-
button_next:
|
|
2744
|
-
|
|
2741
|
+
button_next: N(
|
|
2742
|
+
Xe({ variant: o }),
|
|
2745
2743
|
`
|
|
2746
2744
|
adm:size-(--cell-size) adm:p-0 adm:select-none
|
|
2747
2745
|
adm:aria-disabled:opacity-50
|
|
2748
2746
|
`,
|
|
2749
2747
|
c.button_next
|
|
2750
2748
|
),
|
|
2751
|
-
month_caption:
|
|
2749
|
+
month_caption: N(
|
|
2752
2750
|
`
|
|
2753
2751
|
adm:flex adm:h-(--cell-size) adm:w-full adm:items-center
|
|
2754
2752
|
adm:justify-center adm:px-(--cell-size)
|
|
2755
2753
|
`,
|
|
2756
2754
|
c.month_caption
|
|
2757
2755
|
),
|
|
2758
|
-
dropdowns:
|
|
2756
|
+
dropdowns: N(
|
|
2759
2757
|
`
|
|
2760
2758
|
adm:flex adm:h-(--cell-size) adm:w-full adm:items-center
|
|
2761
2759
|
adm:justify-center adm:gap-1.5 adm:text-sm adm:font-medium
|
|
2762
2760
|
`,
|
|
2763
2761
|
c.dropdowns
|
|
2764
2762
|
),
|
|
2765
|
-
dropdown_root:
|
|
2763
|
+
dropdown_root: N(
|
|
2766
2764
|
`
|
|
2767
2765
|
adm:relative adm:rounded-md adm:border adm:border-input
|
|
2768
2766
|
adm:shadow-xs
|
|
@@ -2771,38 +2769,40 @@ function Na({
|
|
|
2771
2769
|
`,
|
|
2772
2770
|
c.dropdown_root
|
|
2773
2771
|
),
|
|
2774
|
-
dropdown:
|
|
2772
|
+
dropdown: N(
|
|
2775
2773
|
"adm:absolute adm:inset-0 adm:bg-popover adm:opacity-0",
|
|
2776
2774
|
c.dropdown
|
|
2777
2775
|
),
|
|
2778
|
-
caption_label:
|
|
2776
|
+
caption_label: N(
|
|
2779
2777
|
"adm:font-medium adm:select-none",
|
|
2780
2778
|
r === "label" ? "adm:text-sm" : `
|
|
2781
2779
|
adm:flex adm:h-8 adm:items-center adm:gap-1 adm:rounded-md
|
|
2782
2780
|
adm:pr-1 adm:pl-2 adm:text-sm
|
|
2781
|
+
adm:[&>[data-slot=icon]]:text-base
|
|
2782
|
+
adm:[&>[data-slot=icon]]:text-muted-foreground
|
|
2783
2783
|
adm:[&>svg]:size-3.5 adm:[&>svg]:text-muted-foreground
|
|
2784
2784
|
`,
|
|
2785
2785
|
c.caption_label
|
|
2786
2786
|
),
|
|
2787
2787
|
table: "adm:w-full adm:border-collapse",
|
|
2788
|
-
weekdays:
|
|
2789
|
-
weekday:
|
|
2788
|
+
weekdays: N("adm:flex", c.weekdays),
|
|
2789
|
+
weekday: N(
|
|
2790
2790
|
`
|
|
2791
2791
|
adm:flex-1 adm:rounded-md adm:text-[0.8rem] adm:font-normal
|
|
2792
2792
|
adm:text-muted-foreground adm:select-none
|
|
2793
2793
|
`,
|
|
2794
2794
|
c.weekday
|
|
2795
2795
|
),
|
|
2796
|
-
week:
|
|
2797
|
-
week_number_header:
|
|
2796
|
+
week: N("adm:mt-2 adm:flex adm:w-full", c.week),
|
|
2797
|
+
week_number_header: N(
|
|
2798
2798
|
"adm:w-(--cell-size) adm:select-none",
|
|
2799
2799
|
c.week_number_header
|
|
2800
2800
|
),
|
|
2801
|
-
week_number:
|
|
2801
|
+
week_number: N(
|
|
2802
2802
|
"adm:text-[0.8rem] adm:text-muted-foreground adm:select-none",
|
|
2803
2803
|
c.week_number
|
|
2804
2804
|
),
|
|
2805
|
-
day:
|
|
2805
|
+
day: N(
|
|
2806
2806
|
`
|
|
2807
2807
|
adm:group/day adm:relative adm:aspect-square adm:h-full adm:w-full
|
|
2808
2808
|
adm:p-0 adm:text-center adm:select-none
|
|
@@ -2811,31 +2811,31 @@ function Na({
|
|
|
2811
2811
|
`,
|
|
2812
2812
|
c.day
|
|
2813
2813
|
),
|
|
2814
|
-
range_start:
|
|
2814
|
+
range_start: N(
|
|
2815
2815
|
"adm:rounded-l-md adm:bg-accent",
|
|
2816
2816
|
c.range_start
|
|
2817
2817
|
),
|
|
2818
|
-
range_middle:
|
|
2819
|
-
range_end:
|
|
2820
|
-
today:
|
|
2818
|
+
range_middle: N("adm:rounded-none", c.range_middle),
|
|
2819
|
+
range_end: N("adm:rounded-r-md adm:bg-accent", c.range_end),
|
|
2820
|
+
today: N(
|
|
2821
2821
|
`
|
|
2822
2822
|
adm:rounded-md adm:bg-accent adm:text-accent-foreground
|
|
2823
2823
|
adm:data-[selected=true]:rounded-none
|
|
2824
2824
|
`,
|
|
2825
2825
|
c.today
|
|
2826
2826
|
),
|
|
2827
|
-
outside:
|
|
2827
|
+
outside: N(
|
|
2828
2828
|
`
|
|
2829
2829
|
adm:text-muted-foreground
|
|
2830
2830
|
adm:aria-selected:text-muted-foreground
|
|
2831
2831
|
`,
|
|
2832
2832
|
c.outside
|
|
2833
2833
|
),
|
|
2834
|
-
disabled:
|
|
2834
|
+
disabled: N(
|
|
2835
2835
|
"adm:text-muted-foreground adm:opacity-50",
|
|
2836
2836
|
c.disabled
|
|
2837
2837
|
),
|
|
2838
|
-
hidden:
|
|
2838
|
+
hidden: N("adm:invisible", c.hidden),
|
|
2839
2839
|
...t
|
|
2840
2840
|
},
|
|
2841
2841
|
components: {
|
|
@@ -2844,18 +2844,33 @@ function Na({
|
|
|
2844
2844
|
{
|
|
2845
2845
|
"data-slot": "calendar",
|
|
2846
2846
|
ref: l,
|
|
2847
|
-
className:
|
|
2847
|
+
className: N(u),
|
|
2848
2848
|
...d
|
|
2849
2849
|
}
|
|
2850
2850
|
),
|
|
2851
|
-
Chevron: ({ className: u, orientation: l, ...d }) => l === "left" ? /* @__PURE__ */ ne.jsx(
|
|
2852
|
-
|
|
2851
|
+
Chevron: ({ className: u, orientation: l, ...d }) => l === "left" ? /* @__PURE__ */ ne.jsx(
|
|
2852
|
+
Te,
|
|
2853
|
+
{
|
|
2854
|
+
symbol: "chevron_left",
|
|
2855
|
+
className: N("adm:text-lg", u),
|
|
2856
|
+
...d
|
|
2857
|
+
}
|
|
2858
|
+
) : l === "right" ? /* @__PURE__ */ ne.jsx(
|
|
2859
|
+
Te,
|
|
2853
2860
|
{
|
|
2854
|
-
|
|
2861
|
+
symbol: "chevron_right",
|
|
2862
|
+
className: N("adm:text-lg", u),
|
|
2855
2863
|
...d
|
|
2856
2864
|
}
|
|
2857
|
-
) : /* @__PURE__ */ ne.jsx(
|
|
2858
|
-
|
|
2865
|
+
) : /* @__PURE__ */ ne.jsx(
|
|
2866
|
+
Te,
|
|
2867
|
+
{
|
|
2868
|
+
symbol: "keyboard_arrow_down",
|
|
2869
|
+
className: N("adm:text-lg", u),
|
|
2870
|
+
...d
|
|
2871
|
+
}
|
|
2872
|
+
),
|
|
2873
|
+
DayButton: wa,
|
|
2859
2874
|
WeekNumber: ({ children: u, ...l }) => /* @__PURE__ */ ne.jsx("td", { ...l, children: /* @__PURE__ */ ne.jsx(
|
|
2860
2875
|
"div",
|
|
2861
2876
|
{
|
|
@@ -2872,17 +2887,17 @@ function Na({
|
|
|
2872
2887
|
}
|
|
2873
2888
|
);
|
|
2874
2889
|
}
|
|
2875
|
-
function
|
|
2890
|
+
function wa({
|
|
2876
2891
|
className: e,
|
|
2877
2892
|
day: t,
|
|
2878
2893
|
modifiers: n,
|
|
2879
2894
|
...r
|
|
2880
2895
|
}) {
|
|
2881
|
-
const o =
|
|
2882
|
-
return
|
|
2896
|
+
const o = ze(), a = Ue.useRef(null);
|
|
2897
|
+
return Ue.useEffect(() => {
|
|
2883
2898
|
n.focused && a.current?.focus();
|
|
2884
2899
|
}, [n.focused]), /* @__PURE__ */ ne.jsx(
|
|
2885
|
-
|
|
2900
|
+
un,
|
|
2886
2901
|
{
|
|
2887
2902
|
ref: a,
|
|
2888
2903
|
variant: "ghost",
|
|
@@ -2892,7 +2907,7 @@ function Ma({
|
|
|
2892
2907
|
"data-range-start": n.range_start,
|
|
2893
2908
|
"data-range-end": n.range_end,
|
|
2894
2909
|
"data-range-middle": n.range_middle,
|
|
2895
|
-
className:
|
|
2910
|
+
className: N(
|
|
2896
2911
|
`
|
|
2897
2912
|
adm:flex adm:aspect-square adm:size-auto adm:w-full
|
|
2898
2913
|
adm:min-w-(--cell-size) adm:flex-col adm:gap-1 adm:leading-none
|
|
@@ -2926,6 +2941,6 @@ function Ma({
|
|
|
2926
2941
|
);
|
|
2927
2942
|
}
|
|
2928
2943
|
export {
|
|
2929
|
-
|
|
2930
|
-
|
|
2944
|
+
Oa as Calendar,
|
|
2945
|
+
wa as CalendarDayButton
|
|
2931
2946
|
};
|