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