@midas-ds/components 15.4.0 → 15.4.1

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/accordion/index.js +1 -1
  3. package/badge/index.js +1 -1
  4. package/breadcrumbs/index.js +1 -1
  5. package/button/index.js +2 -2
  6. package/calendar/index.js +1 -1
  7. package/card/index.js +1 -1
  8. package/character-counter/index.js +1 -1
  9. package/checkbox/index.js +2 -2
  10. package/chunks/{AccordionItem-BCoomT4-.js → AccordionItem-69q6FXXl.js} +37 -37
  11. package/chunks/{BadgeContainer-BJAC-kV0.js → BadgeContainer-CKVsfTlF.js} +1 -1
  12. package/chunks/Breadcrumbs-By2bMbQd.js +28 -0
  13. package/chunks/Button-BMf7mX0N.js +46 -0
  14. package/chunks/{ButtonGroup-B6mr4JGY.js → ButtonGroup-Dr6HOBo2.js} +1 -1
  15. package/chunks/Card-ia98VoKL.js +130 -0
  16. package/chunks/CharacterCounter-DeuE2det.js +21 -0
  17. package/chunks/Checkbox-ClhO-AzB.js +122 -0
  18. package/chunks/CheckboxGroup-C3FOm8N8.js +84 -0
  19. package/chunks/{ColorSchemeSwitch-Cd6VSXql.js → ColorSchemeSwitch-DugvPh6T.js} +17 -17
  20. package/chunks/ComboBox-BqRZMi8W.js +108 -0
  21. package/chunks/DateField-12KSJHls.js +46 -0
  22. package/chunks/DateInputDivider-CkTB5q5k.js +36 -0
  23. package/chunks/DateRangePicker-BLRFvUp0.js +117 -0
  24. package/chunks/Dialog-C-X_qUR6.js +66 -0
  25. package/chunks/Dropdown-D7HQo9eM.js +79 -0
  26. package/chunks/FieldError-C0HRIcAx.js +23 -0
  27. package/chunks/FileUpload-h1PxqQmb.js +16 -0
  28. package/chunks/{Grid-DeB7TdcZ.js → Grid-B-WgMwON.js} +2 -2
  29. package/chunks/{GridItem-B_3FFhPs.js → GridItem-5t1Z14sM.js} +1 -1
  30. package/chunks/Heading-D8tNNJkt.js +38 -0
  31. package/chunks/{InfoBanner-Bw3rjGtB.js → InfoBanner-Cc3GhryE.js} +3 -3
  32. package/chunks/Label-D6WuwdAj.js +73 -0
  33. package/chunks/{Layout-InD0Hl7F.js → Layout-DGCDkyf3.js} +70 -70
  34. package/chunks/Link-yTNUNv3C.js +54 -0
  35. package/chunks/LinkButton-3nAekUJ4.js +63 -0
  36. package/chunks/{ListBox-CKDglhFH.js → ListBox-D4tO_OrO.js} +18 -18
  37. package/chunks/ListBoxLoadMoreItem-Bo0eLhpt.js +41 -0
  38. package/chunks/ListBoxSection-DKHba2X0.js +49 -0
  39. package/chunks/{Logo-D80UDT1x.js → Logo-InDSslpO.js} +2 -2
  40. package/chunks/Popover-BAdqdN6C.js +38 -0
  41. package/chunks/ProgressBar-zeJLxHVL.js +53 -0
  42. package/chunks/Radio-kvQP7E9s.js +43 -0
  43. package/chunks/RangeCalendar-CnquULdq.js +99 -0
  44. package/chunks/{SearchField-Dr3DAs9W.js → SearchField-B6ygRRL4.js} +39 -39
  45. package/chunks/Select-Cm5VZRTx.js +576 -0
  46. package/chunks/{Select-fDRXxmLm.js → Select-qmCuJm2x.js} +48 -46
  47. package/chunks/Separator-BcnQEA9f.js +76 -0
  48. package/chunks/{Skeleton-Bcg_xgAx.js → Skeleton-DqIHQLQl.js} +1 -1
  49. package/chunks/Spinner-Pll5zpx8.js +48 -0
  50. package/chunks/TabList-D2XV5ixe.js +81 -0
  51. package/chunks/Table-B1rlSIhS.js +139 -0
  52. package/chunks/Tag-Ca8wKXOy.js +53 -0
  53. package/chunks/{Text-WP6RbnnK.js → Text-TWzJxnto.js} +9 -9
  54. package/chunks/TextArea-UU7gFMEb.js +124 -0
  55. package/chunks/Toast-Cm2Zqq-F.js +162 -0
  56. package/chunks/ToggleButtonGroup-CXKTrLbb.js +29 -0
  57. package/chunks/Tooltip-CtstfI8u.js +46 -0
  58. package/chunks/clsx-AexbMWKp.js +24 -0
  59. package/chunks/useLocalizedStringFormatter-ZgRJmvHC.js +25 -0
  60. package/color-scheme-switch/index.js +1 -1
  61. package/combobox/index.js +1 -1
  62. package/date-field/index.js +2 -2
  63. package/date-picker/index.js +1 -1
  64. package/dropdown/index.js +1 -1
  65. package/field-error/index.js +1 -1
  66. package/file-upload/index.js +1 -1
  67. package/grid/index.js +2 -2
  68. package/heading/index.js +1 -1
  69. package/index.js +68 -68
  70. package/info-banner/index.js +1 -1
  71. package/label/index.js +1 -1
  72. package/layout/index.js +1 -1
  73. package/legacy-select/index.js +1 -1
  74. package/link/index.js +3 -3
  75. package/link-button/index.js +3 -3
  76. package/list-box/index.js +3 -3
  77. package/logo/index.js +1 -1
  78. package/menu/index.js +5 -5
  79. package/modal/index.js +2 -2
  80. package/package.json +2 -3
  81. package/popover/index.js +1 -1
  82. package/progress-bar/index.js +1 -1
  83. package/radio/index.js +1 -1
  84. package/search-field/index.js +1 -1
  85. package/select/index.js +1 -1
  86. package/skeleton/index.js +1 -1
  87. package/spinner/index.js +1 -1
  88. package/table/index.js +1 -1
  89. package/tabs/index.js +1 -1
  90. package/tag/index.js +1 -1
  91. package/text/index.js +1 -1
  92. package/textfield/index.js +1 -1
  93. package/toast/index.js +1 -1
  94. package/toggle-button/index.js +1 -1
  95. package/tooltip/index.js +1 -1
  96. package/chunks/Breadcrumbs-CnuqEeOL.js +0 -28
  97. package/chunks/Button-CHs1wv7n.js +0 -46
  98. package/chunks/Card-D58EJCcV.js +0 -130
  99. package/chunks/CharacterCounter-CzCvDmNP.js +0 -21
  100. package/chunks/Checkbox-CogzFDe3.js +0 -119
  101. package/chunks/CheckboxGroup-BLx25gqn.js +0 -83
  102. package/chunks/ComboBox-8YAwADqL.js +0 -108
  103. package/chunks/DateField-CpbYROK1.js +0 -46
  104. package/chunks/DateInputDivider-C43xP4is.js +0 -36
  105. package/chunks/DateRangePicker-CICkmtXG.js +0 -116
  106. package/chunks/Dialog-DBn9L3SP.js +0 -66
  107. package/chunks/Dropdown-Cctv2Qpv.js +0 -79
  108. package/chunks/FieldError-CZKAYQ-n.js +0 -23
  109. package/chunks/FileUpload-DILt4rAn.js +0 -16
  110. package/chunks/Heading-DIw3iLMN.js +0 -38
  111. package/chunks/Label-CKe9pgXT.js +0 -73
  112. package/chunks/Link-C3w5O2wT.js +0 -54
  113. package/chunks/LinkButton-D6X0Dvoz.js +0 -63
  114. package/chunks/ListBoxLoadMoreItem-y9pCuqRe.js +0 -41
  115. package/chunks/ListBoxSection-CvtRigQb.js +0 -49
  116. package/chunks/Popover-DktRiuCr.js +0 -38
  117. package/chunks/ProgressBar-Bjxi5TgY.js +0 -53
  118. package/chunks/Radio-DqFFcFra.js +0 -43
  119. package/chunks/RangeCalendar-CIxwICEf.js +0 -99
  120. package/chunks/Select-BSqv5Qi-.js +0 -566
  121. package/chunks/Separator-Cw1vlSYO.js +0 -76
  122. package/chunks/Spinner-B2EAm49Z.js +0 -48
  123. package/chunks/TabList-BIBQcX2n.js +0 -81
  124. package/chunks/Table-Cy-R3Ma8.js +0 -139
  125. package/chunks/Tag-BZnq1_yZ.js +0 -53
  126. package/chunks/TextArea-3fPkKmNx.js +0 -124
  127. package/chunks/Toast-CP_V12b3.js +0 -161
  128. package/chunks/ToggleButtonGroup-CgNeypuW.js +0 -29
  129. package/chunks/Tooltip-C53p0sfk.js +0 -46
  130. package/chunks/clsx-CuNqTHjr.js +0 -11
  131. package/chunks/internationalized-C9snpc7V.js +0 -1955
  132. package/chunks/react-aria-components-mIKW9wOa.js +0 -22645
  133. package/chunks/react-stately-DRNKkAB0.js +0 -2586
  134. package/chunks/useLocalizedStringFormatter-CPwiI7nv.js +0 -25
  135. package/chunks/variables-BkqZ2WGF.js +0 -5
@@ -1,1955 +0,0 @@
1
- const Ot = Symbol.for("react-aria.i18n.locale"), kt = Symbol.for("react-aria.i18n.strings");
2
- let R;
3
- class at {
4
- /** Returns a localized string for the given key and locale. */
5
- getStringForLocale(e, r) {
6
- let a = this.getStringsForLocale(r)[e];
7
- if (!a) throw new Error(`Could not find intl message ${e} in ${r} locale`);
8
- return a;
9
- }
10
- /** Returns all localized strings for the given locale. */
11
- getStringsForLocale(e) {
12
- let r = this.strings[e];
13
- return r || (r = _t(e, this.strings, this.defaultLocale), this.strings[e] = r), r;
14
- }
15
- static getGlobalDictionaryForPackage(e) {
16
- if (typeof window > "u") return null;
17
- let r = window[Ot];
18
- if (R === void 0) {
19
- let a = window[kt];
20
- if (!a) return null;
21
- R = {};
22
- for (let i in a) R[i] = new at({
23
- [r]: a[i]
24
- }, r);
25
- }
26
- let n = R?.[e];
27
- if (!n) throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
28
- return n;
29
- }
30
- constructor(e, r = "en-US") {
31
- this.strings = Object.fromEntries(Object.entries(e).filter(([, n]) => n)), this.defaultLocale = r;
32
- }
33
- }
34
- function _t(t, e, r = "en-US") {
35
- if (e[t]) return e[t];
36
- let n = Qt(t);
37
- if (e[n]) return e[n];
38
- for (let a in e)
39
- if (a.startsWith(n + "-")) return e[a];
40
- return e[r];
41
- }
42
- function Qt(t) {
43
- return Intl.Locale ? new Intl.Locale(t).language : t.split("-")[0];
44
- }
45
- const Pe = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map();
46
- class Kr {
47
- /** Formats a localized string for the given key with the provided variables. */
48
- format(e, r) {
49
- let n = this.strings.getStringForLocale(e, this.locale);
50
- return typeof n == "function" ? n(r, this) : n;
51
- }
52
- plural(e, r, n = "cardinal") {
53
- let a = r["=" + e];
54
- if (a) return typeof a == "function" ? a() : a;
55
- let i = this.locale + ":" + n, s = Pe.get(i);
56
- s || (s = new Intl.PluralRules(this.locale, {
57
- type: n
58
- }), Pe.set(i, s));
59
- let o = s.select(e);
60
- return a = r[o] || r.other, typeof a == "function" ? a() : a;
61
- }
62
- number(e) {
63
- let r = Be.get(this.locale);
64
- return r || (r = new Intl.NumberFormat(this.locale), Be.set(this.locale, r)), r.format(e);
65
- }
66
- select(e, r) {
67
- let n = e[r] || e.other;
68
- return typeof n == "function" ? n() : n;
69
- }
70
- constructor(e, r) {
71
- this.locale = e, this.strings = r;
72
- }
73
- }
74
- function Y(t, e) {
75
- return t - e * Math.floor(t / e);
76
- }
77
- const it = 1721426;
78
- function A(t, e, r, n) {
79
- e = q(t, e);
80
- let a = e - 1, i = -2;
81
- return r <= 2 ? i = 0 : x(e) && (i = -1), it - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * r - 362) / 12 + i + n);
82
- }
83
- function x(t) {
84
- return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
85
- }
86
- function q(t, e) {
87
- return t === "BC" ? 1 - e : e;
88
- }
89
- function ae(t) {
90
- let e = "AD";
91
- return t <= 0 && (e = "BC", t = 1 - t), [
92
- e,
93
- t
94
- ];
95
- }
96
- const qt = {
97
- standard: [
98
- 31,
99
- 28,
100
- 31,
101
- 30,
102
- 31,
103
- 30,
104
- 31,
105
- 31,
106
- 30,
107
- 31,
108
- 30,
109
- 31
110
- ],
111
- leapyear: [
112
- 31,
113
- 29,
114
- 31,
115
- 30,
116
- 31,
117
- 30,
118
- 31,
119
- 31,
120
- 30,
121
- 31,
122
- 30,
123
- 31
124
- ]
125
- };
126
- class m {
127
- fromJulianDay(e) {
128
- let r = e, n = r - it, a = Math.floor(n / 146097), i = Y(n, 146097), s = Math.floor(i / 36524), o = Y(i, 36524), l = Math.floor(o / 1461), u = Y(o, 1461), M = Math.floor(u / 365), v = a * 400 + s * 100 + l * 4 + M + (s !== 4 && M !== 4 ? 1 : 0), [y, g] = ae(v), h = r - A(y, g, 1, 1), W = 2;
129
- r < A(y, g, 3, 1) ? W = 0 : x(g) && (W = 1);
130
- let H = Math.floor(((h + W) * 12 + 373) / 367), oe = r - A(y, g, H, 1) + 1;
131
- return new f(y, g, H, oe);
132
- }
133
- toJulianDay(e) {
134
- return A(e.era, e.year, e.month, e.day);
135
- }
136
- getDaysInMonth(e) {
137
- return qt[x(e.year) ? "leapyear" : "standard"][e.month - 1];
138
- }
139
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
140
- getMonthsInYear(e) {
141
- return 12;
142
- }
143
- getDaysInYear(e) {
144
- return x(e.year) ? 366 : 365;
145
- }
146
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
147
- getYearsInEra(e) {
148
- return 9999;
149
- }
150
- getEras() {
151
- return [
152
- "BC",
153
- "AD"
154
- ];
155
- }
156
- isInverseEra(e) {
157
- return e.era === "BC";
158
- }
159
- balanceDate(e) {
160
- e.year <= 0 && (e.era = e.era === "BC" ? "AD" : "BC", e.year = 1 - e.year);
161
- }
162
- constructor() {
163
- this.identifier = "gregory";
164
- }
165
- }
166
- const Wt = {
167
- "001": 1,
168
- AD: 1,
169
- AE: 6,
170
- AF: 6,
171
- AI: 1,
172
- AL: 1,
173
- AM: 1,
174
- AN: 1,
175
- AR: 1,
176
- AT: 1,
177
- AU: 1,
178
- AX: 1,
179
- AZ: 1,
180
- BA: 1,
181
- BE: 1,
182
- BG: 1,
183
- BH: 6,
184
- BM: 1,
185
- BN: 1,
186
- BY: 1,
187
- CH: 1,
188
- CL: 1,
189
- CM: 1,
190
- CN: 1,
191
- CR: 1,
192
- CY: 1,
193
- CZ: 1,
194
- DE: 1,
195
- DJ: 6,
196
- DK: 1,
197
- DZ: 6,
198
- EC: 1,
199
- EE: 1,
200
- EG: 6,
201
- ES: 1,
202
- FI: 1,
203
- FJ: 1,
204
- FO: 1,
205
- FR: 1,
206
- GB: 1,
207
- GE: 1,
208
- GF: 1,
209
- GP: 1,
210
- GR: 1,
211
- HR: 1,
212
- HU: 1,
213
- IE: 1,
214
- IQ: 6,
215
- IR: 6,
216
- IS: 1,
217
- IT: 1,
218
- JO: 6,
219
- KG: 1,
220
- KW: 6,
221
- KZ: 1,
222
- LB: 1,
223
- LI: 1,
224
- LK: 1,
225
- LT: 1,
226
- LU: 1,
227
- LV: 1,
228
- LY: 6,
229
- MC: 1,
230
- MD: 1,
231
- ME: 1,
232
- MK: 1,
233
- MN: 1,
234
- MQ: 1,
235
- MV: 5,
236
- MY: 1,
237
- NL: 1,
238
- NO: 1,
239
- NZ: 1,
240
- OM: 6,
241
- PL: 1,
242
- QA: 6,
243
- RE: 1,
244
- RO: 1,
245
- RS: 1,
246
- RU: 1,
247
- SD: 6,
248
- SE: 1,
249
- SI: 1,
250
- SK: 1,
251
- SM: 1,
252
- SY: 6,
253
- TJ: 1,
254
- TM: 1,
255
- TR: 1,
256
- UA: 1,
257
- UY: 1,
258
- UZ: 1,
259
- VA: 1,
260
- VN: 1,
261
- XK: 1
262
- };
263
- function st(t, e) {
264
- return e = $(e, t.calendar), t.era === e.era && t.year === e.year && t.month === e.month && t.day === e.day;
265
- }
266
- function zr(t, e) {
267
- return e = $(e, t.calendar), t = z(t), e = z(e), t.era === e.era && t.year === e.year && t.month === e.month;
268
- }
269
- function Xr(t, e) {
270
- return ot(t.calendar, e.calendar) && st(t, e);
271
- }
272
- function ot(t, e) {
273
- var r, n, a, i;
274
- return (i = (a = (r = t.isEqual) === null || r === void 0 ? void 0 : r.call(t, e)) !== null && a !== void 0 ? a : (n = e.isEqual) === null || n === void 0 ? void 0 : n.call(e, t)) !== null && i !== void 0 ? i : t.identifier === e.identifier;
275
- }
276
- function en(t, e) {
277
- return st(t, Zt(e));
278
- }
279
- const Ht = {
280
- sun: 0,
281
- mon: 1,
282
- tue: 2,
283
- wed: 3,
284
- thu: 4,
285
- fri: 5,
286
- sat: 6
287
- };
288
- function lt(t, e, r) {
289
- let n = t.calendar.toJulianDay(t), a = r ? Ht[r] : Kt(e), i = Math.ceil(n + 1 - a) % 7;
290
- return i < 0 && (i += 7), i;
291
- }
292
- function Vt(t) {
293
- return D(Date.now(), t);
294
- }
295
- function Zt(t) {
296
- return er(Vt(t));
297
- }
298
- function ct(t, e) {
299
- return t.calendar.toJulianDay(t) - e.calendar.toJulianDay(e);
300
- }
301
- function ft(t, e) {
302
- return Ue(t) - Ue(e);
303
- }
304
- function Ue(t) {
305
- return t.hour * 36e5 + t.minute * 6e4 + t.second * 1e3 + t.millisecond;
306
- }
307
- let le = null;
308
- function ut() {
309
- return le == null && (le = new Intl.DateTimeFormat().resolvedOptions().timeZone), le;
310
- }
311
- function z(t) {
312
- return t.subtract({
313
- days: t.day - 1
314
- });
315
- }
316
- function tn(t) {
317
- return t.add({
318
- days: t.calendar.getDaysInMonth(t) - t.day
319
- });
320
- }
321
- function rn(t) {
322
- return z(t.subtract({
323
- months: t.month - 1
324
- }));
325
- }
326
- function nn(t) {
327
- return t.calendar.getMinimumMonthInYear ? t.calendar.getMinimumMonthInYear(t) : 1;
328
- }
329
- function an(t) {
330
- return t.calendar.getMinimumDayInMonth ? t.calendar.getMinimumDayInMonth(t) : 1;
331
- }
332
- function Gt(t, e, r) {
333
- let n = lt(t, e, r);
334
- return t.subtract({
335
- days: n
336
- });
337
- }
338
- function sn(t, e, r) {
339
- return Gt(t, e, r).add({
340
- days: 6
341
- });
342
- }
343
- const Je = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map();
344
- function jt(t) {
345
- if (Intl.Locale) {
346
- let r = Je.get(t);
347
- return r || (r = new Intl.Locale(t).maximize().region, r && Je.set(t, r)), r;
348
- }
349
- let e = t.split("-")[1];
350
- return e === "u" ? void 0 : e;
351
- }
352
- function Kt(t) {
353
- let e = ce.get(t);
354
- if (!e) {
355
- if (Intl.Locale) {
356
- let n = new Intl.Locale(t);
357
- if ("getWeekInfo" in n && (e = n.getWeekInfo(), e))
358
- return ce.set(t, e), e.firstDay;
359
- }
360
- let r = jt(t);
361
- if (t.includes("-fw-")) {
362
- let n = t.split("-fw-")[1].split("-")[0];
363
- n === "mon" ? e = {
364
- firstDay: 1
365
- } : n === "tue" ? e = {
366
- firstDay: 2
367
- } : n === "wed" ? e = {
368
- firstDay: 3
369
- } : n === "thu" ? e = {
370
- firstDay: 4
371
- } : n === "fri" ? e = {
372
- firstDay: 5
373
- } : n === "sat" ? e = {
374
- firstDay: 6
375
- } : e = {
376
- firstDay: 0
377
- };
378
- } else t.includes("-ca-iso8601") ? e = {
379
- firstDay: 1
380
- } : e = {
381
- firstDay: r && Wt[r] || 0
382
- };
383
- ce.set(t, e);
384
- }
385
- return e.firstDay;
386
- }
387
- function on(t, e, r) {
388
- let n = t.calendar.getDaysInMonth(t);
389
- return Math.ceil((lt(z(t), e, r) + n) / 7);
390
- }
391
- function ln(t, e) {
392
- return t && e ? t.compare(e) <= 0 ? t : e : t || e;
393
- }
394
- function cn(t, e) {
395
- return t && e ? t.compare(e) >= 0 ? t : e : t || e;
396
- }
397
- function U(t) {
398
- t = $(t, new m());
399
- let e = q(t.era, t.year);
400
- return ht(e, t.month, t.day, t.hour, t.minute, t.second, t.millisecond);
401
- }
402
- function ht(t, e, r, n, a, i, s) {
403
- let o = /* @__PURE__ */ new Date();
404
- return o.setUTCHours(n, a, i, s), o.setUTCFullYear(t, e - 1, r), o.getTime();
405
- }
406
- function be(t, e) {
407
- if (e === "UTC") return 0;
408
- if (t > 0 && e === ut()) return new Date(t).getTimezoneOffset() * -6e4;
409
- let { year: r, month: n, day: a, hour: i, minute: s, second: o } = dt(t, e);
410
- return ht(r, n, a, i, s, o, 0) - Math.floor(t / 1e3) * 1e3;
411
- }
412
- const Le = /* @__PURE__ */ new Map();
413
- function dt(t, e) {
414
- let r = Le.get(e);
415
- r || (r = new Intl.DateTimeFormat("en-US", {
416
- timeZone: e,
417
- hour12: !1,
418
- era: "short",
419
- year: "numeric",
420
- month: "numeric",
421
- day: "numeric",
422
- hour: "numeric",
423
- minute: "numeric",
424
- second: "numeric"
425
- }), Le.set(e, r));
426
- let n = r.formatToParts(new Date(t)), a = {};
427
- for (let i of n) i.type !== "literal" && (a[i.type] = i.value);
428
- return {
429
- // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
430
- year: a.era === "BC" || a.era === "B" ? -a.year + 1 : +a.year,
431
- month: +a.month,
432
- day: +a.day,
433
- hour: a.hour === "24" ? 0 : +a.hour,
434
- minute: +a.minute,
435
- second: +a.second
436
- };
437
- }
438
- const Ne = 864e5;
439
- function zt(t, e, r, n) {
440
- return (r === n ? [
441
- r
442
- ] : [
443
- r,
444
- n
445
- ]).filter((i) => Xt(t, e, i));
446
- }
447
- function Xt(t, e, r) {
448
- let n = dt(r, e);
449
- return t.year === n.year && t.month === n.month && t.day === n.day && t.hour === n.hour && t.minute === n.minute && t.second === n.second;
450
- }
451
- function p(t, e, r = "compatible") {
452
- let n = J(t);
453
- if (e === "UTC") return U(n);
454
- if (e === ut() && r === "compatible") {
455
- n = $(n, new m());
456
- let l = /* @__PURE__ */ new Date(), u = q(n.era, n.year);
457
- return l.setFullYear(u, n.month - 1, n.day), l.setHours(n.hour, n.minute, n.second, n.millisecond), l.getTime();
458
- }
459
- let a = U(n), i = be(a - Ne, e), s = be(a + Ne, e), o = zt(n, e, a - i, a - s);
460
- if (o.length === 1) return o[0];
461
- if (o.length > 1) switch (r) {
462
- // 'compatible' means 'earlier' for "fall back" transitions
463
- case "compatible":
464
- case "earlier":
465
- return o[0];
466
- case "later":
467
- return o[o.length - 1];
468
- case "reject":
469
- throw new RangeError("Multiple possible absolute times found");
470
- }
471
- switch (r) {
472
- case "earlier":
473
- return Math.min(a - i, a - s);
474
- // 'compatible' means 'later' for "spring forward" transitions
475
- case "compatible":
476
- case "later":
477
- return Math.max(a - i, a - s);
478
- case "reject":
479
- throw new RangeError("No such absolute time found");
480
- }
481
- }
482
- function $t(t, e, r = "compatible") {
483
- return new Date(p(t, e, r));
484
- }
485
- function D(t, e) {
486
- let r = be(t, e), n = new Date(t + r), a = n.getUTCFullYear(), i = n.getUTCMonth() + 1, s = n.getUTCDate(), o = n.getUTCHours(), l = n.getUTCMinutes(), u = n.getUTCSeconds(), M = n.getUTCMilliseconds();
487
- return new Q(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, i, s, e, r, o, l, u, M);
488
- }
489
- function er(t) {
490
- return new f(t.calendar, t.era, t.year, t.month, t.day);
491
- }
492
- function J(t, e) {
493
- let r = 0, n = 0, a = 0, i = 0;
494
- if ("timeZone" in t) ({ hour: r, minute: n, second: a, millisecond: i } = t);
495
- else if ("hour" in t && !e) return t;
496
- return e && ({ hour: r, minute: n, second: a, millisecond: i } = e), new _(t.calendar, t.era, t.year, t.month, t.day, r, n, a, i);
497
- }
498
- function $(t, e) {
499
- if (ot(t.calendar, e)) return t;
500
- let r = e.fromJulianDay(t.calendar.toJulianDay(t)), n = t.copy();
501
- return n.calendar = e, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, C(n), n;
502
- }
503
- function tr(t, e, r) {
504
- if (t instanceof Q)
505
- return t.timeZone === e ? t : nr(t, e);
506
- let n = p(t, e, r);
507
- return D(n, e);
508
- }
509
- function rr(t) {
510
- let e = U(t) - t.offset;
511
- return new Date(e);
512
- }
513
- function nr(t, e) {
514
- let r = U(t) - t.offset;
515
- return $(D(r, e), t.calendar);
516
- }
517
- const L = 36e5;
518
- function ie(t, e) {
519
- let r = t.copy(), n = "hour" in r ? gt(r, e) : 0;
520
- ge(r, e.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, t), r.month += e.months || 0, pe(r), mt(r), r.day += (e.weeks || 0) * 7, r.day += e.days || 0, r.day += n, ar(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
521
- let a = r.calendar.getYearsInEra(r);
522
- if (r.year > a) {
523
- var i, s;
524
- let l = (i = (s = r.calendar).isInverseEra) === null || i === void 0 ? void 0 : i.call(s, r);
525
- r.year = a, r.month = l ? 1 : r.calendar.getMonthsInYear(r), r.day = l ? 1 : r.calendar.getDaysInMonth(r);
526
- }
527
- r.month < 1 && (r.month = 1, r.day = 1);
528
- let o = r.calendar.getMonthsInYear(r);
529
- return r.month > o && (r.month = o, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
530
- }
531
- function ge(t, e) {
532
- var r, n;
533
- !((r = (n = t.calendar).isInverseEra) === null || r === void 0) && r.call(n, t) && (e = -e), t.year += e;
534
- }
535
- function pe(t) {
536
- for (; t.month < 1; )
537
- ge(t, -1), t.month += t.calendar.getMonthsInYear(t);
538
- let e = 0;
539
- for (; t.month > (e = t.calendar.getMonthsInYear(t)); )
540
- t.month -= e, ge(t, 1);
541
- }
542
- function ar(t) {
543
- for (; t.day < 1; )
544
- t.month--, pe(t), t.day += t.calendar.getDaysInMonth(t);
545
- for (; t.day > t.calendar.getDaysInMonth(t); )
546
- t.day -= t.calendar.getDaysInMonth(t), t.month++, pe(t);
547
- }
548
- function mt(t) {
549
- t.month = Math.max(1, Math.min(t.calendar.getMonthsInYear(t), t.month)), t.day = Math.max(1, Math.min(t.calendar.getDaysInMonth(t), t.day));
550
- }
551
- function C(t) {
552
- t.calendar.constrainDate && t.calendar.constrainDate(t), t.year = Math.max(1, Math.min(t.calendar.getYearsInEra(t), t.year)), mt(t);
553
- }
554
- function Ee(t) {
555
- let e = {};
556
- for (let r in t) typeof t[r] == "number" && (e[r] = -t[r]);
557
- return e;
558
- }
559
- function yt(t, e) {
560
- return ie(t, Ee(e));
561
- }
562
- function xe(t, e) {
563
- let r = t.copy();
564
- return e.era != null && (r.era = e.era), e.year != null && (r.year = e.year), e.month != null && (r.month = e.month), e.day != null && (r.day = e.day), C(r), r;
565
- }
566
- function k(t, e) {
567
- let r = t.copy();
568
- return e.hour != null && (r.hour = e.hour), e.minute != null && (r.minute = e.minute), e.second != null && (r.second = e.second), e.millisecond != null && (r.millisecond = e.millisecond), bt(r), r;
569
- }
570
- function ir(t) {
571
- t.second += Math.floor(t.millisecond / 1e3), t.millisecond = V(t.millisecond, 1e3), t.minute += Math.floor(t.second / 60), t.second = V(t.second, 60), t.hour += Math.floor(t.minute / 60), t.minute = V(t.minute, 60);
572
- let e = Math.floor(t.hour / 24);
573
- return t.hour = V(t.hour, 24), e;
574
- }
575
- function bt(t) {
576
- t.millisecond = Math.max(0, Math.min(t.millisecond, 1e3)), t.second = Math.max(0, Math.min(t.second, 59)), t.minute = Math.max(0, Math.min(t.minute, 59)), t.hour = Math.max(0, Math.min(t.hour, 23));
577
- }
578
- function V(t, e) {
579
- let r = t % e;
580
- return r < 0 && (r += e), r;
581
- }
582
- function gt(t, e) {
583
- return t.hour += e.hours || 0, t.minute += e.minutes || 0, t.second += e.seconds || 0, t.millisecond += e.milliseconds || 0, ir(t);
584
- }
585
- function pt(t, e) {
586
- let r = t.copy();
587
- return gt(r, e), r;
588
- }
589
- function sr(t, e) {
590
- return pt(t, Ee(e));
591
- }
592
- function Ie(t, e, r, n) {
593
- let a = t.copy();
594
- switch (e) {
595
- case "era": {
596
- let o = t.calendar.getEras(), l = o.indexOf(t.era);
597
- if (l < 0) throw new Error("Invalid era: " + t.era);
598
- l = w(l, r, 0, o.length - 1, n?.round), a.era = o[l], C(a);
599
- break;
600
- }
601
- case "year":
602
- var i, s;
603
- !((i = (s = a.calendar).isInverseEra) === null || i === void 0) && i.call(s, a) && (r = -r), a.year = w(t.year, r, -1 / 0, 9999, n?.round), a.year === -1 / 0 && (a.year = 1), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, t);
604
- break;
605
- case "month":
606
- a.month = w(t.month, r, 1, t.calendar.getMonthsInYear(t), n?.round);
607
- break;
608
- case "day":
609
- a.day = w(t.day, r, 1, t.calendar.getDaysInMonth(t), n?.round);
610
- break;
611
- default:
612
- throw new Error("Unsupported field " + e);
613
- }
614
- return t.calendar.balanceDate && t.calendar.balanceDate(a), C(a), a;
615
- }
616
- function Se(t, e, r, n) {
617
- let a = t.copy();
618
- switch (e) {
619
- case "hour": {
620
- let i = t.hour, s = 0, o = 23;
621
- if (n?.hourCycle === 12) {
622
- let l = i >= 12;
623
- s = l ? 12 : 0, o = l ? 23 : 11;
624
- }
625
- a.hour = w(i, r, s, o, n?.round);
626
- break;
627
- }
628
- case "minute":
629
- a.minute = w(t.minute, r, 0, 59, n?.round);
630
- break;
631
- case "second":
632
- a.second = w(t.second, r, 0, 59, n?.round);
633
- break;
634
- case "millisecond":
635
- a.millisecond = w(t.millisecond, r, 0, 999, n?.round);
636
- break;
637
- default:
638
- throw new Error("Unsupported field " + e);
639
- }
640
- return a;
641
- }
642
- function w(t, e, r, n, a = !1) {
643
- if (a) {
644
- t += Math.sign(e), t < r && (t = n);
645
- let i = Math.abs(e);
646
- e > 0 ? t = Math.ceil(t / i) * i : t = Math.floor(t / i) * i, t > n && (t = r);
647
- } else
648
- t += e, t < r ? t = n - (r - t - 1) : t > n && (t = r + (t - n - 1));
649
- return t;
650
- }
651
- function Dt(t, e) {
652
- let r;
653
- if (e.years != null && e.years !== 0 || e.months != null && e.months !== 0 || e.weeks != null && e.weeks !== 0 || e.days != null && e.days !== 0) {
654
- let a = ie(J(t), {
655
- years: e.years,
656
- months: e.months,
657
- weeks: e.weeks,
658
- days: e.days
659
- });
660
- r = p(a, t.timeZone);
661
- } else
662
- r = U(t) - t.offset;
663
- r += e.milliseconds || 0, r += (e.seconds || 0) * 1e3, r += (e.minutes || 0) * 6e4, r += (e.hours || 0) * 36e5;
664
- let n = D(r, t.timeZone);
665
- return $(n, t.calendar);
666
- }
667
- function or(t, e) {
668
- return Dt(t, Ee(e));
669
- }
670
- function lr(t, e, r, n) {
671
- switch (e) {
672
- case "hour": {
673
- let a = 0, i = 23;
674
- if (n?.hourCycle === 12) {
675
- let h = t.hour >= 12;
676
- a = h ? 12 : 0, i = h ? 23 : 11;
677
- }
678
- let s = J(t), o = $(k(s, {
679
- hour: a
680
- }), new m()), l = [
681
- p(o, t.timeZone, "earlier"),
682
- p(o, t.timeZone, "later")
683
- ].filter((h) => D(h, t.timeZone).day === o.day)[0], u = $(k(s, {
684
- hour: i
685
- }), new m()), M = [
686
- p(u, t.timeZone, "earlier"),
687
- p(u, t.timeZone, "later")
688
- ].filter((h) => D(h, t.timeZone).day === u.day).pop(), v = U(t) - t.offset, y = Math.floor(v / L), g = v % L;
689
- return v = w(y, r, Math.floor(l / L), Math.floor(M / L), n?.round) * L + g, $(D(v, t.timeZone), t.calendar);
690
- }
691
- case "minute":
692
- case "second":
693
- case "millisecond":
694
- return Se(t, e, r, n);
695
- case "era":
696
- case "year":
697
- case "month":
698
- case "day": {
699
- let a = Ie(J(t), e, r, n), i = p(a, t.timeZone);
700
- return $(D(i, t.timeZone), t.calendar);
701
- }
702
- default:
703
- throw new Error("Unsupported field " + e);
704
- }
705
- }
706
- function cr(t, e, r) {
707
- let n = J(t), a = k(xe(n, e), e);
708
- if (a.compare(n) === 0) return t;
709
- let i = p(a, t.timeZone, r);
710
- return $(D(i, t.timeZone), t.calendar);
711
- }
712
- const fr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, ur = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
713
- function fn(t) {
714
- let e = t.match(fr);
715
- if (!e) throw new Error("Invalid ISO 8601 date string: " + t);
716
- let r = new f(b(e[1], 0, 9999), b(e[2], 1, 12), 1);
717
- return r.day = b(e[3], 1, r.calendar.getDaysInMonth(r)), r;
718
- }
719
- function un(t) {
720
- let e = t.match(ur);
721
- if (!e) throw new Error("Invalid ISO 8601 date time string: " + t);
722
- let r = b(e[1], -9999, 9999), n = r < 1 ? "BC" : "AD", a = new _(n, r < 1 ? -r + 1 : r, b(e[2], 1, 12), 1, e[4] ? b(e[4], 0, 23) : 0, e[5] ? b(e[5], 0, 59) : 0, e[6] ? b(e[6], 0, 59) : 0, e[7] ? b(e[7], 0, 1 / 0) * 1e3 : 0);
723
- return a.day = b(e[3], 0, a.calendar.getDaysInMonth(a)), a;
724
- }
725
- function b(t, e, r) {
726
- let n = Number(t);
727
- if (n < e || n > r) throw new RangeError(`Value out of range: ${e} <= ${n} <= ${r}`);
728
- return n;
729
- }
730
- function wt(t) {
731
- return `${String(t.hour).padStart(2, "0")}:${String(t.minute).padStart(2, "0")}:${String(t.second).padStart(2, "0")}${t.millisecond ? String(t.millisecond / 1e3).slice(1) : ""}`;
732
- }
733
- function Mt(t) {
734
- let e = $(t, new m()), r;
735
- return e.era === "BC" ? r = e.year === 1 ? "0000" : "-" + String(Math.abs(1 - e.year)).padStart(6, "00") : r = String(e.year).padStart(4, "0"), `${r}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
736
- }
737
- function vt(t) {
738
- return `${Mt(t)}T${wt(t)}`;
739
- }
740
- function hr(t) {
741
- let e = Math.sign(t) < 0 ? "-" : "+";
742
- t = Math.abs(t);
743
- let r = Math.floor(t / 36e5), n = Math.floor(t % 36e5 / 6e4), a = Math.floor(t % 36e5 % 6e4 / 1e3), i = `${e}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
744
- return a !== 0 && (i += `:${String(a).padStart(2, "0")}`), i;
745
- }
746
- function dr(t) {
747
- return `${vt(t)}${hr(t.offset)}[${t.timeZone}]`;
748
- }
749
- function $r(t, e) {
750
- if (e.has(t))
751
- throw new TypeError("Cannot initialize the same private elements twice on an object");
752
- }
753
- function se(t, e, r) {
754
- $r(t, e), e.set(t, r);
755
- }
756
- function Ae(t) {
757
- let e = typeof t[0] == "object" ? t.shift() : new m(), r;
758
- if (typeof t[0] == "string") r = t.shift();
759
- else {
760
- let s = e.getEras();
761
- r = s[s.length - 1];
762
- }
763
- let n = t.shift(), a = t.shift(), i = t.shift();
764
- return [
765
- e,
766
- r,
767
- n,
768
- a,
769
- i
770
- ];
771
- }
772
- var mr = /* @__PURE__ */ new WeakMap();
773
- class f {
774
- /** Returns a copy of this date. */
775
- copy() {
776
- return this.era ? new f(this.calendar, this.era, this.year, this.month, this.day) : new f(this.calendar, this.year, this.month, this.day);
777
- }
778
- /** Returns a new `CalendarDate` with the given duration added to it. */
779
- add(e) {
780
- return ie(this, e);
781
- }
782
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */
783
- subtract(e) {
784
- return yt(this, e);
785
- }
786
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
787
- set(e) {
788
- return xe(this, e);
789
- }
790
- /**
791
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
792
- * When the resulting value reaches the limits of the field, it wraps around.
793
- */
794
- cycle(e, r, n) {
795
- return Ie(this, e, r, n);
796
- }
797
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
798
- toDate(e) {
799
- return $t(this, e);
800
- }
801
- /** Converts the date to an ISO 8601 formatted string. */
802
- toString() {
803
- return Mt(this);
804
- }
805
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
806
- compare(e) {
807
- return ct(this, e);
808
- }
809
- constructor(...e) {
810
- se(this, mr, {
811
- writable: !0,
812
- value: void 0
813
- });
814
- let [r, n, a, i, s] = Ae(e);
815
- this.calendar = r, this.era = n, this.year = a, this.month = i, this.day = s, C(this);
816
- }
817
- }
818
- var yr = /* @__PURE__ */ new WeakMap();
819
- class Et {
820
- /** Returns a copy of this time. */
821
- copy() {
822
- return new Et(this.hour, this.minute, this.second, this.millisecond);
823
- }
824
- /** Returns a new `Time` with the given duration added to it. */
825
- add(e) {
826
- return pt(this, e);
827
- }
828
- /** Returns a new `Time` with the given duration subtracted from it. */
829
- subtract(e) {
830
- return sr(this, e);
831
- }
832
- /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */
833
- set(e) {
834
- return k(this, e);
835
- }
836
- /**
837
- * Returns a new `Time` with the given field adjusted by a specified amount.
838
- * When the resulting value reaches the limits of the field, it wraps around.
839
- */
840
- cycle(e, r, n) {
841
- return Se(this, e, r, n);
842
- }
843
- /** Converts the time to an ISO 8601 formatted string. */
844
- toString() {
845
- return wt(this);
846
- }
847
- /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */
848
- compare(e) {
849
- return ft(this, e);
850
- }
851
- constructor(e = 0, r = 0, n = 0, a = 0) {
852
- se(this, yr, {
853
- writable: !0,
854
- value: void 0
855
- }), this.hour = e, this.minute = r, this.second = n, this.millisecond = a, bt(this);
856
- }
857
- }
858
- var br = /* @__PURE__ */ new WeakMap();
859
- class _ {
860
- /** Returns a copy of this date. */
861
- copy() {
862
- return this.era ? new _(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new _(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
863
- }
864
- /** Returns a new `CalendarDateTime` with the given duration added to it. */
865
- add(e) {
866
- return ie(this, e);
867
- }
868
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
869
- subtract(e) {
870
- return yt(this, e);
871
- }
872
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
873
- set(e) {
874
- return xe(k(this, e), e);
875
- }
876
- /**
877
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
878
- * When the resulting value reaches the limits of the field, it wraps around.
879
- */
880
- cycle(e, r, n) {
881
- switch (e) {
882
- case "era":
883
- case "year":
884
- case "month":
885
- case "day":
886
- return Ie(this, e, r, n);
887
- default:
888
- return Se(this, e, r, n);
889
- }
890
- }
891
- /** Converts the date to a native JavaScript Date object in the given time zone. */
892
- toDate(e, r) {
893
- return $t(this, e, r);
894
- }
895
- /** Converts the date to an ISO 8601 formatted string. */
896
- toString() {
897
- return vt(this);
898
- }
899
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
900
- compare(e) {
901
- let r = ct(this, e);
902
- return r === 0 ? ft(this, J(e)) : r;
903
- }
904
- constructor(...e) {
905
- se(this, br, {
906
- writable: !0,
907
- value: void 0
908
- });
909
- let [r, n, a, i, s] = Ae(e);
910
- this.calendar = r, this.era = n, this.year = a, this.month = i, this.day = s, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, C(this);
911
- }
912
- }
913
- var gr = /* @__PURE__ */ new WeakMap();
914
- class Q {
915
- /** Returns a copy of this date. */
916
- copy() {
917
- return this.era ? new Q(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new Q(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
918
- }
919
- /** Returns a new `ZonedDateTime` with the given duration added to it. */
920
- add(e) {
921
- return Dt(this, e);
922
- }
923
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
924
- subtract(e) {
925
- return or(this, e);
926
- }
927
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
928
- set(e, r) {
929
- return cr(this, e, r);
930
- }
931
- /**
932
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
933
- * When the resulting value reaches the limits of the field, it wraps around.
934
- */
935
- cycle(e, r, n) {
936
- return lr(this, e, r, n);
937
- }
938
- /** Converts the date to a native JavaScript Date object. */
939
- toDate() {
940
- return rr(this);
941
- }
942
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
943
- toString() {
944
- return dr(this);
945
- }
946
- /** Converts the date to an ISO 8601 formatted string in UTC. */
947
- toAbsoluteString() {
948
- return this.toDate().toISOString();
949
- }
950
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
951
- compare(e) {
952
- return this.toDate().getTime() - tr(e, this.timeZone).toDate().getTime();
953
- }
954
- constructor(...e) {
955
- se(this, gr, {
956
- writable: !0,
957
- value: void 0
958
- });
959
- let [r, n, a, i, s] = Ae(e), o = e.shift(), l = e.shift();
960
- this.calendar = r, this.era = n, this.year = a, this.month = i, this.day = s, this.timeZone = o, this.offset = l, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, C(this);
961
- }
962
- }
963
- const P = [
964
- [
965
- 1868,
966
- 9,
967
- 8
968
- ],
969
- [
970
- 1912,
971
- 7,
972
- 30
973
- ],
974
- [
975
- 1926,
976
- 12,
977
- 25
978
- ],
979
- [
980
- 1989,
981
- 1,
982
- 8
983
- ],
984
- [
985
- 2019,
986
- 5,
987
- 1
988
- ]
989
- ], pr = [
990
- [
991
- 1912,
992
- 7,
993
- 29
994
- ],
995
- [
996
- 1926,
997
- 12,
998
- 24
999
- ],
1000
- [
1001
- 1989,
1002
- 1,
1003
- 7
1004
- ],
1005
- [
1006
- 2019,
1007
- 4,
1008
- 30
1009
- ]
1010
- ], G = [
1011
- 1867,
1012
- 1911,
1013
- 1925,
1014
- 1988,
1015
- 2018
1016
- ], E = [
1017
- "meiji",
1018
- "taisho",
1019
- "showa",
1020
- "heisei",
1021
- "reiwa"
1022
- ];
1023
- function Oe(t) {
1024
- const e = P.findIndex(([r, n, a]) => t.year < r || t.year === r && t.month < n || t.year === r && t.month === n && t.day < a);
1025
- return e === -1 ? P.length - 1 : e === 0 ? 0 : e - 1;
1026
- }
1027
- function fe(t) {
1028
- let e = G[E.indexOf(t.era)];
1029
- if (!e) throw new Error("Unknown era: " + t.era);
1030
- return new f(t.year + e, t.month, t.day);
1031
- }
1032
- class Dr extends m {
1033
- fromJulianDay(e) {
1034
- let r = super.fromJulianDay(e), n = Oe(r);
1035
- return new f(this, E[n], r.year - G[n], r.month, r.day);
1036
- }
1037
- toJulianDay(e) {
1038
- return super.toJulianDay(fe(e));
1039
- }
1040
- balanceDate(e) {
1041
- let r = fe(e), n = Oe(r);
1042
- E[n] !== e.era && (e.era = E[n], e.year = r.year - G[n]), this.constrainDate(e);
1043
- }
1044
- constrainDate(e) {
1045
- let r = E.indexOf(e.era), n = pr[r];
1046
- if (n != null) {
1047
- let [a, i, s] = n, o = a - G[r];
1048
- e.year = Math.max(1, Math.min(o, e.year)), e.year === o && (e.month = Math.min(i, e.month), e.month === i && (e.day = Math.min(s, e.day)));
1049
- }
1050
- if (e.year === 1 && r >= 0) {
1051
- let [, a, i] = P[r];
1052
- e.month = Math.max(a, e.month), e.month === a && (e.day = Math.max(i, e.day));
1053
- }
1054
- }
1055
- getEras() {
1056
- return E;
1057
- }
1058
- getYearsInEra(e) {
1059
- let r = E.indexOf(e.era), n = P[r], a = P[r + 1];
1060
- if (a == null)
1061
- return 9999 - n[0] + 1;
1062
- let i = a[0] - n[0];
1063
- return (e.month < a[1] || e.month === a[1] && e.day < a[2]) && i++, i;
1064
- }
1065
- getDaysInMonth(e) {
1066
- return super.getDaysInMonth(fe(e));
1067
- }
1068
- getMinimumMonthInYear(e) {
1069
- let r = ke(e);
1070
- return r ? r[1] : 1;
1071
- }
1072
- getMinimumDayInMonth(e) {
1073
- let r = ke(e);
1074
- return r && e.month === r[1] ? r[2] : 1;
1075
- }
1076
- constructor(...e) {
1077
- super(...e), this.identifier = "japanese";
1078
- }
1079
- }
1080
- function ke(t) {
1081
- if (t.year === 1) {
1082
- let e = E.indexOf(t.era);
1083
- return P[e];
1084
- }
1085
- }
1086
- const xt = -543;
1087
- class wr extends m {
1088
- fromJulianDay(e) {
1089
- let r = super.fromJulianDay(e), n = q(r.era, r.year);
1090
- return new f(this, n - xt, r.month, r.day);
1091
- }
1092
- toJulianDay(e) {
1093
- return super.toJulianDay(_e(e));
1094
- }
1095
- getEras() {
1096
- return [
1097
- "BE"
1098
- ];
1099
- }
1100
- getDaysInMonth(e) {
1101
- return super.getDaysInMonth(_e(e));
1102
- }
1103
- balanceDate() {
1104
- }
1105
- constructor(...e) {
1106
- super(...e), this.identifier = "buddhist";
1107
- }
1108
- }
1109
- function _e(t) {
1110
- let [e, r] = ae(t.year + xt);
1111
- return new f(e, r, t.month, t.day);
1112
- }
1113
- const X = 1911;
1114
- function It(t) {
1115
- return t.era === "minguo" ? t.year + X : 1 - t.year + X;
1116
- }
1117
- function Qe(t) {
1118
- let e = t - X;
1119
- return e > 0 ? [
1120
- "minguo",
1121
- e
1122
- ] : [
1123
- "before_minguo",
1124
- 1 - e
1125
- ];
1126
- }
1127
- class Mr extends m {
1128
- fromJulianDay(e) {
1129
- let r = super.fromJulianDay(e), n = q(r.era, r.year), [a, i] = Qe(n);
1130
- return new f(this, a, i, r.month, r.day);
1131
- }
1132
- toJulianDay(e) {
1133
- return super.toJulianDay(qe(e));
1134
- }
1135
- getEras() {
1136
- return [
1137
- "before_minguo",
1138
- "minguo"
1139
- ];
1140
- }
1141
- balanceDate(e) {
1142
- let [r, n] = Qe(It(e));
1143
- e.era = r, e.year = n;
1144
- }
1145
- isInverseEra(e) {
1146
- return e.era === "before_minguo";
1147
- }
1148
- getDaysInMonth(e) {
1149
- return super.getDaysInMonth(qe(e));
1150
- }
1151
- getYearsInEra(e) {
1152
- return e.era === "before_minguo" ? 9999 : 9999 - X;
1153
- }
1154
- constructor(...e) {
1155
- super(...e), this.identifier = "roc";
1156
- }
1157
- }
1158
- function qe(t) {
1159
- let [e, r] = ae(It(t));
1160
- return new f(e, r, t.month, t.day);
1161
- }
1162
- const We = 1948320, He = [
1163
- 0,
1164
- 31,
1165
- 62,
1166
- 93,
1167
- 124,
1168
- 155,
1169
- 186,
1170
- 216,
1171
- 246,
1172
- 276,
1173
- 306,
1174
- 336
1175
- // Esfand
1176
- ];
1177
- class vr {
1178
- fromJulianDay(e) {
1179
- let r = e - We, n = 1 + Math.floor((33 * r + 3) / 12053), a = 365 * (n - 1) + Math.floor((8 * n + 21) / 33), i = r - a, s = i < 216 ? Math.floor(i / 31) : Math.floor((i - 6) / 30), o = i - He[s] + 1;
1180
- return new f(this, n, s + 1, o);
1181
- }
1182
- toJulianDay(e) {
1183
- let r = We - 1 + 365 * (e.year - 1) + Math.floor((8 * e.year + 21) / 33);
1184
- return r += He[e.month - 1], r += e.day, r;
1185
- }
1186
- getMonthsInYear() {
1187
- return 12;
1188
- }
1189
- getDaysInMonth(e) {
1190
- return e.month <= 6 ? 31 : e.month <= 11 || Y(25 * e.year + 11, 33) < 8 ? 30 : 29;
1191
- }
1192
- getEras() {
1193
- return [
1194
- "AP"
1195
- ];
1196
- }
1197
- getYearsInEra() {
1198
- return 9377;
1199
- }
1200
- constructor() {
1201
- this.identifier = "persian";
1202
- }
1203
- }
1204
- const ue = 78, Ve = 80;
1205
- class Er extends m {
1206
- fromJulianDay(e) {
1207
- let r = super.fromJulianDay(e), n = r.year - ue, a = e - A(r.era, r.year, 1, 1), i;
1208
- a < Ve ? (n--, i = x(r.year - 1) ? 31 : 30, a += i + 155 + 90 + 10) : (i = x(r.year) ? 31 : 30, a -= Ve);
1209
- let s, o;
1210
- if (a < i)
1211
- s = 1, o = a + 1;
1212
- else {
1213
- let l = a - i;
1214
- l < 155 ? (s = Math.floor(l / 31) + 2, o = l % 31 + 1) : (l -= 155, s = Math.floor(l / 30) + 7, o = l % 30 + 1);
1215
- }
1216
- return new f(this, n, s, o);
1217
- }
1218
- toJulianDay(e) {
1219
- let r = e.year + ue, [n, a] = ae(r), i, s;
1220
- return x(a) ? (i = 31, s = A(n, a, 3, 21)) : (i = 30, s = A(n, a, 3, 22)), e.month === 1 ? s + e.day - 1 : (s += i + Math.min(e.month - 2, 5) * 31, e.month >= 8 && (s += (e.month - 7) * 30), s += e.day - 1, s);
1221
- }
1222
- getDaysInMonth(e) {
1223
- return e.month === 1 && x(e.year + ue) || e.month >= 2 && e.month <= 6 ? 31 : 30;
1224
- }
1225
- getYearsInEra() {
1226
- return 9919;
1227
- }
1228
- getEras() {
1229
- return [
1230
- "saka"
1231
- ];
1232
- }
1233
- balanceDate() {
1234
- }
1235
- constructor(...e) {
1236
- super(...e), this.identifier = "indian";
1237
- }
1238
- }
1239
- const ee = 1948440, Ze = 1948439, d = 1300, F = 1600, xr = 460322;
1240
- function te(t, e, r, n) {
1241
- return n + Math.ceil(29.5 * (r - 1)) + (e - 1) * 354 + Math.floor((3 + 11 * e) / 30) + t - 1;
1242
- }
1243
- function St(t, e, r) {
1244
- let n = Math.floor((30 * (r - e) + 10646) / 10631), a = Math.min(12, Math.ceil((r - (29 + te(e, n, 1, 1))) / 29.5) + 1), i = r - te(e, n, a, 1) + 1;
1245
- return new f(t, n, a, i);
1246
- }
1247
- function Ge(t) {
1248
- return (14 + 11 * t) % 30 < 11;
1249
- }
1250
- class Ce {
1251
- fromJulianDay(e) {
1252
- return St(this, ee, e);
1253
- }
1254
- toJulianDay(e) {
1255
- return te(ee, e.year, e.month, e.day);
1256
- }
1257
- getDaysInMonth(e) {
1258
- let r = 29 + e.month % 2;
1259
- return e.month === 12 && Ge(e.year) && r++, r;
1260
- }
1261
- getMonthsInYear() {
1262
- return 12;
1263
- }
1264
- getDaysInYear(e) {
1265
- return Ge(e.year) ? 355 : 354;
1266
- }
1267
- getYearsInEra() {
1268
- return 9665;
1269
- }
1270
- getEras() {
1271
- return [
1272
- "AH"
1273
- ];
1274
- }
1275
- constructor() {
1276
- this.identifier = "islamic-civil";
1277
- }
1278
- }
1279
- class Ir extends Ce {
1280
- fromJulianDay(e) {
1281
- return St(this, Ze, e);
1282
- }
1283
- toJulianDay(e) {
1284
- return te(Ze, e.year, e.month, e.day);
1285
- }
1286
- constructor(...e) {
1287
- super(...e), this.identifier = "islamic-tbla";
1288
- }
1289
- }
1290
- const Sr = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";
1291
- let De, B;
1292
- function j(t) {
1293
- return xr + B[t - d];
1294
- }
1295
- function N(t, e) {
1296
- let r = t - d, n = 1 << 11 - (e - 1);
1297
- return (De[r] & n) === 0 ? 29 : 30;
1298
- }
1299
- function je(t, e) {
1300
- let r = j(t);
1301
- for (let n = 1; n < e; n++) r += N(t, n);
1302
- return r;
1303
- }
1304
- function Ke(t) {
1305
- return B[t + 1 - d] - B[t - d];
1306
- }
1307
- class Ar extends Ce {
1308
- fromJulianDay(e) {
1309
- let r = e - ee, n = j(d), a = j(F);
1310
- if (r < n || r > a) return super.fromJulianDay(e);
1311
- {
1312
- let i = d - 1, s = 1, o = 1;
1313
- for (; o > 0; ) {
1314
- i++, o = r - j(i) + 1;
1315
- let l = Ke(i);
1316
- if (o === l) {
1317
- s = 12;
1318
- break;
1319
- } else if (o < l) {
1320
- let u = N(i, s);
1321
- for (s = 1; o > u; )
1322
- o -= u, s++, u = N(i, s);
1323
- break;
1324
- }
1325
- }
1326
- return new f(this, i, s, r - je(i, s) + 1);
1327
- }
1328
- }
1329
- toJulianDay(e) {
1330
- return e.year < d || e.year > F ? super.toJulianDay(e) : ee + je(e.year, e.month) + (e.day - 1);
1331
- }
1332
- getDaysInMonth(e) {
1333
- return e.year < d || e.year > F ? super.getDaysInMonth(e) : N(e.year, e.month);
1334
- }
1335
- getDaysInYear(e) {
1336
- return e.year < d || e.year > F ? super.getDaysInYear(e) : Ke(e.year);
1337
- }
1338
- constructor() {
1339
- if (super(), this.identifier = "islamic-umalqura", De || (De = new Uint16Array(Uint8Array.from(atob(Sr), (e) => e.charCodeAt(0)).buffer)), !B) {
1340
- B = new Uint32Array(F - d + 1);
1341
- let e = 0;
1342
- for (let r = d; r <= F; r++) {
1343
- B[r - d] = e;
1344
- for (let n = 1; n <= 12; n++) e += N(r, n);
1345
- }
1346
- }
1347
- }
1348
- }
1349
- const ze = 347997, At = 1080, Ct = 24 * At, Cr = 29, Rr = 12 * At + 793, Fr = Cr * Ct + Rr;
1350
- function S(t) {
1351
- return Y(t * 7 + 1, 19) < 7;
1352
- }
1353
- function K(t) {
1354
- let e = Math.floor((235 * t - 234) / 19), r = 12084 + 13753 * e, n = e * 29 + Math.floor(r / 25920);
1355
- return Y(3 * (n + 1), 7) < 3 && (n += 1), n;
1356
- }
1357
- function Tr(t) {
1358
- let e = K(t - 1), r = K(t);
1359
- return K(t + 1) - r === 356 ? 2 : r - e === 382 ? 1 : 0;
1360
- }
1361
- function O(t) {
1362
- return K(t) + Tr(t);
1363
- }
1364
- function Rt(t) {
1365
- return O(t + 1) - O(t);
1366
- }
1367
- function Yr(t) {
1368
- let e = Rt(t);
1369
- switch (e > 380 && (e -= 30), e) {
1370
- case 353:
1371
- return 0;
1372
- // deficient
1373
- case 354:
1374
- return 1;
1375
- // normal
1376
- case 355:
1377
- return 2;
1378
- }
1379
- }
1380
- function Z(t, e) {
1381
- if (e >= 6 && !S(t) && e++, e === 4 || e === 7 || e === 9 || e === 11 || e === 13) return 29;
1382
- let r = Yr(t);
1383
- return e === 2 ? r === 2 ? 30 : 29 : e === 3 ? r === 0 ? 29 : 30 : e === 6 ? S(t) ? 30 : 0 : 30;
1384
- }
1385
- class Pr {
1386
- fromJulianDay(e) {
1387
- let r = e - ze, n = r * Ct / Fr, a = Math.floor((19 * n + 234) / 235) + 1, i = O(a), s = Math.floor(r - i);
1388
- for (; s < 1; )
1389
- a--, i = O(a), s = Math.floor(r - i);
1390
- let o = 1, l = 0;
1391
- for (; l < s; )
1392
- l += Z(a, o), o++;
1393
- o--, l -= Z(a, o);
1394
- let u = s - l;
1395
- return new f(this, a, o, u);
1396
- }
1397
- toJulianDay(e) {
1398
- let r = O(e.year);
1399
- for (let n = 1; n < e.month; n++) r += Z(e.year, n);
1400
- return r + e.day + ze;
1401
- }
1402
- getDaysInMonth(e) {
1403
- return Z(e.year, e.month);
1404
- }
1405
- getMonthsInYear(e) {
1406
- return S(e.year) ? 13 : 12;
1407
- }
1408
- getDaysInYear(e) {
1409
- return Rt(e.year);
1410
- }
1411
- getYearsInEra() {
1412
- return 9999;
1413
- }
1414
- getEras() {
1415
- return [
1416
- "AM"
1417
- ];
1418
- }
1419
- balanceYearMonth(e, r) {
1420
- r.year !== e.year && (S(r.year) && !S(e.year) && r.month > 6 ? e.month-- : !S(r.year) && S(e.year) && r.month > 6 && e.month++);
1421
- }
1422
- constructor() {
1423
- this.identifier = "hebrew";
1424
- }
1425
- }
1426
- const we = 1723856, Xe = 1824665, Me = 5500;
1427
- function re(t, e, r, n) {
1428
- return t + 365 * e + Math.floor(e / 4) + 30 * (r - 1) + n - 1;
1429
- }
1430
- function Re(t, e) {
1431
- let r = Math.floor(4 * (e - t) / 1461), n = 1 + Math.floor((e - re(t, r, 1, 1)) / 30), a = e + 1 - re(t, r, n, 1);
1432
- return [
1433
- r,
1434
- n,
1435
- a
1436
- ];
1437
- }
1438
- function Ft(t) {
1439
- return Math.floor(t % 4 / 3);
1440
- }
1441
- function Tt(t, e) {
1442
- return e % 13 !== 0 ? 30 : Ft(t) + 5;
1443
- }
1444
- class Fe {
1445
- fromJulianDay(e) {
1446
- let [r, n, a] = Re(we, e), i = "AM";
1447
- return r <= 0 && (i = "AA", r += Me), new f(this, i, r, n, a);
1448
- }
1449
- toJulianDay(e) {
1450
- let r = e.year;
1451
- return e.era === "AA" && (r -= Me), re(we, r, e.month, e.day);
1452
- }
1453
- getDaysInMonth(e) {
1454
- return Tt(e.year, e.month);
1455
- }
1456
- getMonthsInYear() {
1457
- return 13;
1458
- }
1459
- getDaysInYear(e) {
1460
- return 365 + Ft(e.year);
1461
- }
1462
- getYearsInEra(e) {
1463
- return e.era === "AA" ? 9999 : 9991;
1464
- }
1465
- getEras() {
1466
- return [
1467
- "AA",
1468
- "AM"
1469
- ];
1470
- }
1471
- constructor() {
1472
- this.identifier = "ethiopic";
1473
- }
1474
- }
1475
- class Br extends Fe {
1476
- fromJulianDay(e) {
1477
- let [r, n, a] = Re(we, e);
1478
- return r += Me, new f(this, "AA", r, n, a);
1479
- }
1480
- getEras() {
1481
- return [
1482
- "AA"
1483
- ];
1484
- }
1485
- getYearsInEra() {
1486
- return 9999;
1487
- }
1488
- constructor(...e) {
1489
- super(...e), this.identifier = "ethioaa";
1490
- }
1491
- }
1492
- class Ur extends Fe {
1493
- fromJulianDay(e) {
1494
- let [r, n, a] = Re(Xe, e), i = "CE";
1495
- return r <= 0 && (i = "BCE", r = 1 - r), new f(this, i, r, n, a);
1496
- }
1497
- toJulianDay(e) {
1498
- let r = e.year;
1499
- return e.era === "BCE" && (r = 1 - r), re(Xe, r, e.month, e.day);
1500
- }
1501
- getDaysInMonth(e) {
1502
- let r = e.year;
1503
- return e.era === "BCE" && (r = 1 - r), Tt(r, e.month);
1504
- }
1505
- isInverseEra(e) {
1506
- return e.era === "BCE";
1507
- }
1508
- balanceDate(e) {
1509
- e.year <= 0 && (e.era = e.era === "BCE" ? "CE" : "BCE", e.year = 1 - e.year);
1510
- }
1511
- getEras() {
1512
- return [
1513
- "BCE",
1514
- "CE"
1515
- ];
1516
- }
1517
- getYearsInEra(e) {
1518
- return e.era === "BCE" ? 9999 : 9715;
1519
- }
1520
- constructor(...e) {
1521
- super(...e), this.identifier = "coptic";
1522
- }
1523
- }
1524
- function hn(t) {
1525
- switch (t) {
1526
- case "buddhist":
1527
- return new wr();
1528
- case "ethiopic":
1529
- return new Fe();
1530
- case "ethioaa":
1531
- return new Br();
1532
- case "coptic":
1533
- return new Ur();
1534
- case "hebrew":
1535
- return new Pr();
1536
- case "indian":
1537
- return new Er();
1538
- case "islamic-civil":
1539
- return new Ce();
1540
- case "islamic-tbla":
1541
- return new Ir();
1542
- case "islamic-umalqura":
1543
- return new Ar();
1544
- case "japanese":
1545
- return new Dr();
1546
- case "persian":
1547
- return new vr();
1548
- case "roc":
1549
- return new Mr();
1550
- case "gregory":
1551
- default:
1552
- return new m();
1553
- }
1554
- }
1555
- let he = /* @__PURE__ */ new Map();
1556
- class dn {
1557
- /** Formats a date as a string according to the locale and format options passed to the constructor. */
1558
- format(e) {
1559
- return this.formatter.format(e);
1560
- }
1561
- /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
1562
- formatToParts(e) {
1563
- return this.formatter.formatToParts(e);
1564
- }
1565
- /** Formats a date range as a string. */
1566
- formatRange(e, r) {
1567
- if (typeof this.formatter.formatRange == "function")
1568
- return this.formatter.formatRange(e, r);
1569
- if (r < e) throw new RangeError("End date must be >= start date");
1570
- return `${this.formatter.format(e)} – ${this.formatter.format(r)}`;
1571
- }
1572
- /** Formats a date range as an array of parts. */
1573
- formatRangeToParts(e, r) {
1574
- if (typeof this.formatter.formatRangeToParts == "function")
1575
- return this.formatter.formatRangeToParts(e, r);
1576
- if (r < e) throw new RangeError("End date must be >= start date");
1577
- let n = this.formatter.formatToParts(e), a = this.formatter.formatToParts(r);
1578
- return [
1579
- ...n.map((i) => ({
1580
- ...i,
1581
- source: "startRange"
1582
- })),
1583
- {
1584
- type: "literal",
1585
- value: " – ",
1586
- source: "shared"
1587
- },
1588
- ...a.map((i) => ({
1589
- ...i,
1590
- source: "endRange"
1591
- }))
1592
- ];
1593
- }
1594
- /** Returns the resolved formatting options based on the values passed to the constructor. */
1595
- resolvedOptions() {
1596
- let e = this.formatter.resolvedOptions();
1597
- return Nr() && (this.resolvedHourCycle || (this.resolvedHourCycle = Or(e.locale, this.options)), e.hourCycle = this.resolvedHourCycle, e.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), e.calendar === "ethiopic-amete-alem" && (e.calendar = "ethioaa"), e;
1598
- }
1599
- constructor(e, r = {}) {
1600
- this.formatter = Yt(e, r), this.options = r;
1601
- }
1602
- }
1603
- const Jr = {
1604
- true: {
1605
- // Only Japanese uses the h11 style for 12 hour time. All others use h12.
1606
- ja: "h11"
1607
- },
1608
- false: {}
1609
- };
1610
- function Yt(t, e = {}) {
1611
- if (typeof e.hour12 == "boolean" && Lr()) {
1612
- e = {
1613
- ...e
1614
- };
1615
- let a = Jr[String(e.hour12)][t.split("-")[0]], i = e.hour12 ? "h12" : "h23";
1616
- e.hourCycle = a ?? i, delete e.hour12;
1617
- }
1618
- let r = t + (e ? Object.entries(e).sort((a, i) => a[0] < i[0] ? -1 : 1).join() : "");
1619
- if (he.has(r)) return he.get(r);
1620
- let n = new Intl.DateTimeFormat(t, e);
1621
- return he.set(r, n), n;
1622
- }
1623
- let de = null;
1624
- function Lr() {
1625
- return de == null && (de = new Intl.DateTimeFormat("en-US", {
1626
- hour: "numeric",
1627
- hour12: !1
1628
- }).format(new Date(2020, 2, 3, 0)) === "24"), de;
1629
- }
1630
- let $e = null;
1631
- function Nr() {
1632
- return $e == null && ($e = new Intl.DateTimeFormat("fr", {
1633
- hour: "numeric",
1634
- hour12: !1
1635
- }).resolvedOptions().hourCycle === "h12"), $e;
1636
- }
1637
- function Or(t, e) {
1638
- if (!e.timeStyle && !e.hour) return;
1639
- t = t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), t += (t.includes("-u-") ? "" : "-u") + "-nu-latn";
1640
- let r = Yt(t, {
1641
- ...e,
1642
- timeZone: void 0
1643
- // use local timezone
1644
- }), n = parseInt(r.formatToParts(new Date(2020, 2, 3, 0)).find((i) => i.type === "hour").value, 10), a = parseInt(r.formatToParts(new Date(2020, 2, 3, 23)).find((i) => i.type === "hour").value, 10);
1645
- if (n === 0 && a === 23) return "h23";
1646
- if (n === 24 && a === 23) return "h24";
1647
- if (n === 0 && a === 11) return "h11";
1648
- if (n === 12 && a === 11) return "h12";
1649
- throw new Error("Unexpected hour cycle result");
1650
- }
1651
- let me = /* @__PURE__ */ new Map(), ve = !1;
1652
- try {
1653
- ve = new Intl.NumberFormat("de-DE", {
1654
- signDisplay: "exceptZero"
1655
- }).resolvedOptions().signDisplay === "exceptZero";
1656
- } catch {
1657
- }
1658
- let ne = !1;
1659
- try {
1660
- ne = new Intl.NumberFormat("de-DE", {
1661
- style: "unit",
1662
- unit: "degree"
1663
- }).resolvedOptions().style === "unit";
1664
- } catch {
1665
- }
1666
- const Pt = {
1667
- degree: {
1668
- narrow: {
1669
- default: "°",
1670
- "ja-JP": " 度",
1671
- "zh-TW": "度",
1672
- "sl-SI": " °"
1673
- }
1674
- }
1675
- };
1676
- class kr {
1677
- /** Formats a number value as a string, according to the locale and options provided to the constructor. */
1678
- format(e) {
1679
- let r = "";
1680
- if (!ve && this.options.signDisplay != null ? r = Qr(this.numberFormatter, this.options.signDisplay, e) : r = this.numberFormatter.format(e), this.options.style === "unit" && !ne) {
1681
- var n;
1682
- let { unit: a, unitDisplay: i = "short", locale: s } = this.resolvedOptions();
1683
- if (!a) return r;
1684
- let o = (n = Pt[a]) === null || n === void 0 ? void 0 : n[i];
1685
- r += o[s] || o.default;
1686
- }
1687
- return r;
1688
- }
1689
- /** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
1690
- formatToParts(e) {
1691
- return this.numberFormatter.formatToParts(e);
1692
- }
1693
- /** Formats a number range as a string. */
1694
- formatRange(e, r) {
1695
- if (typeof this.numberFormatter.formatRange == "function") return this.numberFormatter.formatRange(e, r);
1696
- if (r < e) throw new RangeError("End date must be >= start date");
1697
- return `${this.format(e)} – ${this.format(r)}`;
1698
- }
1699
- /** Formats a number range as an array of parts. */
1700
- formatRangeToParts(e, r) {
1701
- if (typeof this.numberFormatter.formatRangeToParts == "function") return this.numberFormatter.formatRangeToParts(e, r);
1702
- if (r < e) throw new RangeError("End date must be >= start date");
1703
- let n = this.numberFormatter.formatToParts(e), a = this.numberFormatter.formatToParts(r);
1704
- return [
1705
- ...n.map((i) => ({
1706
- ...i,
1707
- source: "startRange"
1708
- })),
1709
- {
1710
- type: "literal",
1711
- value: " – ",
1712
- source: "shared"
1713
- },
1714
- ...a.map((i) => ({
1715
- ...i,
1716
- source: "endRange"
1717
- }))
1718
- ];
1719
- }
1720
- /** Returns the resolved formatting options based on the values passed to the constructor. */
1721
- resolvedOptions() {
1722
- let e = this.numberFormatter.resolvedOptions();
1723
- return !ve && this.options.signDisplay != null && (e = {
1724
- ...e,
1725
- signDisplay: this.options.signDisplay
1726
- }), !ne && this.options.style === "unit" && (e = {
1727
- ...e,
1728
- style: "unit",
1729
- unit: this.options.unit,
1730
- unitDisplay: this.options.unitDisplay
1731
- }), e;
1732
- }
1733
- constructor(e, r = {}) {
1734
- this.numberFormatter = _r(e, r), this.options = r;
1735
- }
1736
- }
1737
- function _r(t, e = {}) {
1738
- let { numberingSystem: r } = e;
1739
- if (r && t.includes("-nu-") && (t.includes("-u-") || (t += "-u-"), t += `-nu-${r}`), e.style === "unit" && !ne) {
1740
- var n;
1741
- let { unit: s, unitDisplay: o = "short" } = e;
1742
- if (!s) throw new Error('unit option must be provided with style: "unit"');
1743
- if (!(!((n = Pt[s]) === null || n === void 0) && n[o])) throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);
1744
- e = {
1745
- ...e,
1746
- style: "decimal"
1747
- };
1748
- }
1749
- let a = t + (e ? Object.entries(e).sort((s, o) => s[0] < o[0] ? -1 : 1).join() : "");
1750
- if (me.has(a)) return me.get(a);
1751
- let i = new Intl.NumberFormat(t, e);
1752
- return me.set(a, i), i;
1753
- }
1754
- function Qr(t, e, r) {
1755
- if (e === "auto") return t.format(r);
1756
- if (e === "never") return t.format(Math.abs(r));
1757
- {
1758
- let n = !1;
1759
- if (e === "always" ? n = r > 0 || Object.is(r, 0) : e === "exceptZero" && (Object.is(r, -0) || Object.is(r, 0) ? r = Math.abs(r) : n = r > 0), n) {
1760
- let a = t.format(-r), i = t.format(r), s = a.replace(i, "").replace(/\u200e|\u061C/, "");
1761
- return [
1762
- ...s
1763
- ].length !== 1 && console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"), a.replace(i, "!!!").replace(s, "+").replace("!!!", i);
1764
- } else return t.format(r);
1765
- }
1766
- }
1767
- const qr = new RegExp("^.*\\(.*\\).*$"), Wr = [
1768
- "latn",
1769
- "arab",
1770
- "hanidec",
1771
- "deva",
1772
- "beng",
1773
- "fullwide"
1774
- ];
1775
- class Hr {
1776
- /**
1777
- * Parses the given string to a number. Returns NaN if a valid number could not be parsed.
1778
- */
1779
- parse(e) {
1780
- return ye(this.locale, this.options, e).parse(e);
1781
- }
1782
- /**
1783
- * Returns whether the given string could potentially be a valid number. This should be used to
1784
- * validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity
1785
- * of the minus/plus sign characters can be checked.
1786
- */
1787
- isValidPartialNumber(e, r, n) {
1788
- return ye(this.locale, this.options, e).isValidPartialNumber(e, r, n);
1789
- }
1790
- /**
1791
- * Returns a numbering system for which the given string is valid in the current locale.
1792
- * If no numbering system could be detected, the default numbering system for the current
1793
- * locale is returned.
1794
- */
1795
- getNumberingSystem(e) {
1796
- return ye(this.locale, this.options, e).options.numberingSystem;
1797
- }
1798
- constructor(e, r = {}) {
1799
- this.locale = e, this.options = r;
1800
- }
1801
- }
1802
- const et = /* @__PURE__ */ new Map();
1803
- function ye(t, e, r) {
1804
- let n = tt(t, e);
1805
- if (!t.includes("-nu-") && !n.isValidPartialNumber(r)) {
1806
- for (let a of Wr) if (a !== n.options.numberingSystem) {
1807
- let i = tt(t + (t.includes("-u-") ? "-nu-" : "-u-nu-") + a, e);
1808
- if (i.isValidPartialNumber(r)) return i;
1809
- }
1810
- }
1811
- return n;
1812
- }
1813
- function tt(t, e) {
1814
- let r = t + (e ? Object.entries(e).sort((a, i) => a[0] < i[0] ? -1 : 1).join() : ""), n = et.get(r);
1815
- return n || (n = new Vr(t, e), et.set(r, n)), n;
1816
- }
1817
- class Vr {
1818
- parse(e) {
1819
- let r = this.sanitize(e);
1820
- if (this.symbols.group && (r = T(r, this.symbols.group, "")), this.symbols.decimal && (r = r.replace(this.symbols.decimal, ".")), this.symbols.minusSign && (r = r.replace(this.symbols.minusSign, "-")), r = r.replace(this.symbols.numeral, this.symbols.index), this.options.style === "percent") {
1821
- let s = r.indexOf("-");
1822
- r = r.replace("-", ""), r = r.replace("+", "");
1823
- let o = r.indexOf(".");
1824
- o === -1 && (o = r.length), r = r.replace(".", ""), o - 2 === 0 ? r = `0.${r}` : o - 2 === -1 ? r = `0.0${r}` : o - 2 === -2 ? r = "0.00" : r = `${r.slice(0, o - 2)}.${r.slice(o - 2)}`, s > -1 && (r = `-${r}`);
1825
- }
1826
- let n = r ? +r : NaN;
1827
- if (isNaN(n)) return NaN;
1828
- if (this.options.style === "percent") {
1829
- var a, i;
1830
- let s = {
1831
- ...this.options,
1832
- style: "decimal",
1833
- minimumFractionDigits: Math.min(((a = this.options.minimumFractionDigits) !== null && a !== void 0 ? a : 0) + 2, 20),
1834
- maximumFractionDigits: Math.min(((i = this.options.maximumFractionDigits) !== null && i !== void 0 ? i : 0) + 2, 20)
1835
- };
1836
- return new Hr(this.locale, s).parse(new kr(this.locale, s).format(n));
1837
- }
1838
- return this.options.currencySign === "accounting" && qr.test(e) && (n = -1 * n), n;
1839
- }
1840
- sanitize(e) {
1841
- return e = e.replace(this.symbols.literals, ""), this.symbols.minusSign && (e = e.replace("-", this.symbols.minusSign)), this.options.numberingSystem === "arab" && (this.symbols.decimal && (e = e.replace(",", this.symbols.decimal), e = e.replace("،", this.symbols.decimal)), this.symbols.group && (e = T(e, ".", this.symbols.group))), this.symbols.group === "’" && e.includes("'") && (e = T(e, "'", this.symbols.group)), this.options.locale === "fr-FR" && this.symbols.group && (e = T(e, " ", this.symbols.group), e = T(e, /\u00A0/g, this.symbols.group)), e;
1842
- }
1843
- isValidPartialNumber(e, r = -1 / 0, n = 1 / 0) {
1844
- return e = this.sanitize(e), this.symbols.minusSign && e.startsWith(this.symbols.minusSign) && r < 0 ? e = e.slice(this.symbols.minusSign.length) : this.symbols.plusSign && e.startsWith(this.symbols.plusSign) && n > 0 && (e = e.slice(this.symbols.plusSign.length)), this.symbols.group && e.startsWith(this.symbols.group) || this.symbols.decimal && e.indexOf(this.symbols.decimal) > -1 && this.options.maximumFractionDigits === 0 ? !1 : (this.symbols.group && (e = T(e, this.symbols.group, "")), e = e.replace(this.symbols.numeral, ""), this.symbols.decimal && (e = e.replace(this.symbols.decimal, "")), e.length === 0);
1845
- }
1846
- constructor(e, r = {}) {
1847
- this.locale = e, r.roundingIncrement !== 1 && r.roundingIncrement != null && (r.maximumFractionDigits == null && r.minimumFractionDigits == null ? (r.maximumFractionDigits = 0, r.minimumFractionDigits = 0) : r.maximumFractionDigits == null ? r.maximumFractionDigits = r.minimumFractionDigits : r.minimumFractionDigits == null && (r.minimumFractionDigits = r.maximumFractionDigits)), this.formatter = new Intl.NumberFormat(e, r), this.options = this.formatter.resolvedOptions(), this.symbols = Gr(e, this.formatter, this.options, r);
1848
- var n, a;
1849
- this.options.style === "percent" && (((n = this.options.minimumFractionDigits) !== null && n !== void 0 ? n : 0) > 18 || ((a = this.options.maximumFractionDigits) !== null && a !== void 0 ? a : 0) > 18) && console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");
1850
- }
1851
- }
1852
- const rt = /* @__PURE__ */ new Set([
1853
- "decimal",
1854
- "fraction",
1855
- "integer",
1856
- "minusSign",
1857
- "plusSign",
1858
- "group"
1859
- ]), Zr = [
1860
- 0,
1861
- 4,
1862
- 2,
1863
- 1,
1864
- 11,
1865
- 20,
1866
- 3,
1867
- 7,
1868
- 100,
1869
- 21,
1870
- 0.1,
1871
- 1.1
1872
- ];
1873
- function Gr(t, e, r, n) {
1874
- var a, i, s, o;
1875
- let l = new Intl.NumberFormat(t, {
1876
- ...r,
1877
- // Resets so we get the full range of symbols
1878
- minimumSignificantDigits: 1,
1879
- maximumSignificantDigits: 21,
1880
- roundingIncrement: 1,
1881
- roundingPriority: "auto",
1882
- roundingMode: "halfExpand"
1883
- }), u = l.formatToParts(-10000.111), M = l.formatToParts(10000.111), v = Zr.map((c) => l.formatToParts(c));
1884
- var y;
1885
- let g = (y = (a = u.find((c) => c.type === "minusSign")) === null || a === void 0 ? void 0 : a.value) !== null && y !== void 0 ? y : "-", h = (i = M.find((c) => c.type === "plusSign")) === null || i === void 0 ? void 0 : i.value;
1886
- !h && (n?.signDisplay === "exceptZero" || n?.signDisplay === "always") && (h = "+");
1887
- let H = (s = new Intl.NumberFormat(t, {
1888
- ...r,
1889
- minimumFractionDigits: 2,
1890
- maximumFractionDigits: 2
1891
- }).formatToParts(1e-3).find((c) => c.type === "decimal")) === null || s === void 0 ? void 0 : s.value, oe = (o = u.find((c) => c.type === "group")) === null || o === void 0 ? void 0 : o.value, Bt = u.filter((c) => !rt.has(c.type)).map((c) => nt(c.value)), Ut = v.flatMap((c) => c.filter((I) => !rt.has(I.type)).map((I) => nt(I.value))), Te = [
1892
- .../* @__PURE__ */ new Set([
1893
- ...Bt,
1894
- ...Ut
1895
- ])
1896
- ].sort((c, I) => I.length - c.length), Jt = Te.length === 0 ? new RegExp("[\\p{White_Space}]", "gu") : new RegExp(`${Te.join("|")}|[\\p{White_Space}]`, "gu"), Ye = [
1897
- ...new Intl.NumberFormat(r.locale, {
1898
- useGrouping: !1
1899
- }).format(9876543210)
1900
- ].reverse(), Lt = new Map(Ye.map((c, I) => [
1901
- c,
1902
- I
1903
- ])), Nt = new RegExp(`[${Ye.join("")}]`, "g");
1904
- return {
1905
- minusSign: g,
1906
- plusSign: h,
1907
- decimal: H,
1908
- group: oe,
1909
- literals: Jt,
1910
- numeral: Nt,
1911
- index: (c) => String(Lt.get(c))
1912
- };
1913
- }
1914
- function T(t, e, r) {
1915
- return t.replaceAll ? t.replaceAll(e, r) : t.split(e).join(r);
1916
- }
1917
- function nt(t) {
1918
- return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1919
- }
1920
- export {
1921
- Kr as $,
1922
- Vt as A,
1923
- ut as B,
1924
- J as C,
1925
- Et as D,
1926
- an as E,
1927
- nn as F,
1928
- se as _,
1929
- at as a,
1930
- dn as b,
1931
- kr as c,
1932
- st as d,
1933
- z as e,
1934
- tn as f,
1935
- Gt as g,
1936
- Zt as h,
1937
- on as i,
1938
- Xr as j,
1939
- en as k,
1940
- Hr as l,
1941
- $ as m,
1942
- f as n,
1943
- hn as o,
1944
- zr as p,
1945
- un as q,
1946
- fn as r,
1947
- cn as s,
1948
- er as t,
1949
- ln as u,
1950
- rn as v,
1951
- ot as w,
1952
- lt as x,
1953
- sn as y,
1954
- m as z
1955
- };