@orchidui/dashboard 1.8.1-96 → 1.8.1-97

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 (166) hide show
  1. package/dist/Dashboard/Card/OcCard.js +1 -1
  2. package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
  3. package/dist/{OcCard-B3SCzVwn.js → OcCard-D3be6IMj.js} +58 -54
  4. package/dist/OcCodeBlock-uFQyGnLq.js +37 -0
  5. package/dist/{OcLottieAnimation-DeMoIDaX.js → OcLottieAnimation-BB7AK2AO.js} +62 -62
  6. package/dist/{QuillEditor-hFQ0MJZO.js → QuillEditor-DRwC0sgJ.js} +579 -556
  7. package/dist/index.js +4 -4
  8. package/package.json +3 -265
  9. package/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +0 -295
  10. package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +0 -891
  11. package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +0 -68
  12. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +0 -172
  13. package/dist/CollapsibleTrigger-fCarY5DJ.js +0 -154
  14. package/dist/Collection-COudIl-A.js +0 -55
  15. package/dist/ConfigProvider-7mV0D7Sp.js +0 -6
  16. package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +0 -68
  17. package/dist/DialogOverlay-Cj3UTjZ8.js +0 -309
  18. package/dist/DialogPortal-zAvO8zt4.js +0 -23
  19. package/dist/DialogTrigger-BIF1A4hk.js +0 -72
  20. package/dist/DismissableLayer-C7IJliOb.js +0 -151
  21. package/dist/FocusScope--pJ6bboI.js +0 -121
  22. package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +0 -92
  23. package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +0 -27
  24. package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +0 -51
  25. package/dist/ListboxItem-CjMk-mEX.js +0 -417
  26. package/dist/MenuSubTrigger-CUrxnPwO.js +0 -845
  27. package/dist/OcCodeBlock-CBdVqav7.js +0 -37
  28. package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +0 -394
  29. package/dist/PopperContent-BT3Svcc3.js +0 -1465
  30. package/dist/Presence-CxfTrw6l.js +0 -133
  31. package/dist/Primitive-B3twiLO1.js +0 -44
  32. package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +0 -297
  33. package/dist/RovingFocusGroup-0OHdFQl0.js +0 -92
  34. package/dist/RovingFocusItem-s7Ug6oxb.js +0 -82
  35. package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +0 -1255
  36. package/dist/Separator-DRam5i7g.js +0 -54
  37. package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +0 -27
  38. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +0 -17
  39. package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +0 -135
  40. package/dist/Teleport-DnUewq5H.js +0 -25
  41. package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +0 -27
  42. package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +0 -426
  43. package/dist/VisuallyHidden-DMAU4heD.js +0 -41
  44. package/dist/VisuallyHiddenInput-DvJnsVHt.js +0 -59
  45. package/dist/_commonjsHelpers-B4e78b8K.js +0 -28
  46. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  47. package/dist/array-CqVTtuYm.js +0 -6
  48. package/dist/arrays-4jDZqbdb.js +0 -20
  49. package/dist/check-C2tzJ0Gk.js +0 -11
  50. package/dist/chevron-down-CnpAlizg.js +0 -13
  51. package/dist/chevron-left-BOwFasou.js +0 -13
  52. package/dist/chevron-right-D308801z.js +0 -13
  53. package/dist/circle-A-6NpYiX.js +0 -13
  54. package/dist/clamp-BL1Rb24G.js +0 -22
  55. package/dist/constant-CuDQlTIy.js +0 -3433
  56. package/dist/createContext-CZEfaSVa.js +0 -17
  57. package/dist/createLucideIcon-eXqDwUWj.js +0 -71
  58. package/dist/ellipsis-CEG9G7eN.js +0 -15
  59. package/dist/getActiveElement-B-HWdUIb.js +0 -11
  60. package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +0 -11
  61. package/dist/index-B3LW8uSH.js +0 -133
  62. package/dist/index-BIlpXuWX.js +0 -3430
  63. package/dist/index-BlGEiPHj.js +0 -1246
  64. package/dist/index-BwPb_idr.js +0 -574
  65. package/dist/index-C9julNQm.js +0 -173
  66. package/dist/index-C_aI-Wfj.js +0 -34
  67. package/dist/index-CumjCvqB.js +0 -5703
  68. package/dist/index-LqWMCtOd.js +0 -809
  69. package/dist/index-OpE2oGce.js +0 -110
  70. package/dist/isValueEqualOrExist-BDSMUv8t.js +0 -8
  71. package/dist/lib/utils.js +0 -5
  72. package/dist/nullish-CjWwlQS3.js +0 -6
  73. package/dist/ohash.D__AXeF1-DX2n0b2C.js +0 -106
  74. package/dist/plus-CgluTYQY.js +0 -14
  75. package/dist/text-zwICaAnx.js +0 -743
  76. package/dist/ui/accordion/index.js +0 -7
  77. package/dist/ui/alert/index.js +0 -64
  78. package/dist/ui/alert-dialog/index.js +0 -356
  79. package/dist/ui/aspect-ratio/index.js +0 -50
  80. package/dist/ui/auto-form/constant.js +0 -5
  81. package/dist/ui/auto-form/dependencies.js +0 -61
  82. package/dist/ui/auto-form/index.js +0 -227
  83. package/dist/ui/auto-form/interface.js +0 -4
  84. package/dist/ui/auto-form/utils.js +0 -89
  85. package/dist/ui/avatar/index.js +0 -189
  86. package/dist/ui/badge/index.js +0 -37
  87. package/dist/ui/breadcrumb/index.js +0 -126
  88. package/dist/ui/button/index.js +0 -55
  89. package/dist/ui/calendar/index.js +0 -15
  90. package/dist/ui/card/index.js +0 -38
  91. package/dist/ui/carousel/index.js +0 -174
  92. package/dist/ui/carousel/interface.js +0 -1
  93. package/dist/ui/carousel/useCarousel.js +0 -1288
  94. package/dist/ui/chart/index.js +0 -8
  95. package/dist/ui/chart/interface.js +0 -1
  96. package/dist/ui/chart-area/index.js +0 -331
  97. package/dist/ui/chart-bar/index.js +0 -490
  98. package/dist/ui/chart-donut/index.js +0 -509
  99. package/dist/ui/chart-line/index.js +0 -110
  100. package/dist/ui/checkbox/index.js +0 -4
  101. package/dist/ui/collapsible/index.js +0 -60
  102. package/dist/ui/combobox/index.js +0 -877
  103. package/dist/ui/command/index.js +0 -323
  104. package/dist/ui/context-menu/index.js +0 -734
  105. package/dist/ui/dialog/index.js +0 -169
  106. package/dist/ui/drawer/index.js +0 -971
  107. package/dist/ui/dropdown-menu/index.js +0 -723
  108. package/dist/ui/form/index.js +0 -13
  109. package/dist/ui/form/injectionKeys.js +0 -4
  110. package/dist/ui/form/useFormField.js +0 -25
  111. package/dist/ui/hover-card/index.js +0 -331
  112. package/dist/ui/input/index.js +0 -4
  113. package/dist/ui/label/index.js +0 -4
  114. package/dist/ui/menubar/index.js +0 -862
  115. package/dist/ui/navigation-menu/index.js +0 -873
  116. package/dist/ui/number-field/index.js +0 -682
  117. package/dist/ui/pagination/index.js +0 -444
  118. package/dist/ui/pin-input/index.js +0 -308
  119. package/dist/ui/popover/index.js +0 -6
  120. package/dist/ui/progress/index.js +0 -137
  121. package/dist/ui/radio-group/index.js +0 -5
  122. package/dist/ui/range-calendar/index.js +0 -986
  123. package/dist/ui/resizable/index.js +0 -1432
  124. package/dist/ui/scroll-area/index.js +0 -775
  125. package/dist/ui/select/index.js +0 -135
  126. package/dist/ui/separator/index.js +0 -4
  127. package/dist/ui/sheet/index.js +0 -188
  128. package/dist/ui/sidebar/index.js +0 -652
  129. package/dist/ui/sidebar/utils.js +0 -12
  130. package/dist/ui/skeleton/index.js +0 -4
  131. package/dist/ui/slider/index.js +0 -478
  132. package/dist/ui/sonner/index.js +0 -892
  133. package/dist/ui/stepper/index.js +0 -442
  134. package/dist/ui/switch/index.js +0 -4
  135. package/dist/ui/table/index.js +0 -153
  136. package/dist/ui/tabs/index.js +0 -280
  137. package/dist/ui/tags-input/index.js +0 -449
  138. package/dist/ui/textarea/index.js +0 -4
  139. package/dist/ui/toast/index.js +0 -738
  140. package/dist/ui/toast/use-toast.js +0 -85
  141. package/dist/ui/toggle/index.js +0 -6
  142. package/dist/ui/toggle-group/index.js +0 -112
  143. package/dist/ui/tooltip/index.js +0 -29
  144. package/dist/useArrowNavigation-BRMPveaB.js +0 -49
  145. package/dist/useBodyScrollLock-CazCRZjZ.js +0 -153
  146. package/dist/useDirection-C3C_TLKm.js +0 -14
  147. package/dist/useFocusGuards-CyjC9cG9.js +0 -26
  148. package/dist/useFormControl-CFVC51Lp.js +0 -11
  149. package/dist/useForwardExpose-DZT6mL_U.js +0 -37
  150. package/dist/useForwardPropsEmits-0XKBv1pB.js +0 -33
  151. package/dist/useGraceArea-D7-GP1ii.js +0 -137
  152. package/dist/useId-reAg216X.js +0 -13
  153. package/dist/useKbd-BJNupnml.js +0 -41
  154. package/dist/useLocale-BfU0LC8Z.js +0 -14
  155. package/dist/useNonce-C1ZOgOp5.js +0 -14
  156. package/dist/usePrimitiveElement-BjwUvHih.js +0 -15
  157. package/dist/useSingleOrMultipleValue-BkTAaaJB.js +0 -43
  158. package/dist/useSize-BnyQ8FZF.js +0 -37
  159. package/dist/useTypeahead-oSidjyFF.js +0 -40
  160. package/dist/utils-DKNaYMZh.js +0 -57
  161. package/dist/utils-Dx9la83v.js +0 -35
  162. package/dist/utils-DxQ_ywGa.js +0 -55
  163. package/dist/utils-SFgRDk1R.js +0 -2748
  164. package/dist/utils-W-UiqiPE.js +0 -1869
  165. package/dist/vee-validate-Cf8JDJ_k.js +0 -2232
  166. package/dist/x-Cl6YllUK.js +0 -14
@@ -1,1869 +0,0 @@
1
- import { ref as ot, computed as L, watch as Ue } from "vue";
2
- function N(t, e) {
3
- return t - e * Math.floor(t / e);
4
- }
5
- const ut = 1721426;
6
- function R(t, e, r, n) {
7
- e = j(t, e);
8
- let a = e - 1, o = -2;
9
- return r <= 2 ? o = 0 : B(e) && (o = -1), ut - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * r - 362) / 12 + o + n);
10
- }
11
- function B(t) {
12
- return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
13
- }
14
- function j(t, e) {
15
- return t === "BC" ? 1 - e : e;
16
- }
17
- function fe(t) {
18
- let e = "AD";
19
- return t <= 0 && (e = "BC", t = 1 - t), [
20
- e,
21
- t
22
- ];
23
- }
24
- const Ot = {
25
- standard: [
26
- 31,
27
- 28,
28
- 31,
29
- 30,
30
- 31,
31
- 30,
32
- 31,
33
- 31,
34
- 30,
35
- 31,
36
- 30,
37
- 31
38
- ],
39
- leapyear: [
40
- 31,
41
- 29,
42
- 31,
43
- 30,
44
- 31,
45
- 30,
46
- 31,
47
- 31,
48
- 30,
49
- 31,
50
- 30,
51
- 31
52
- ]
53
- };
54
- class C {
55
- fromJulianDay(e) {
56
- let r = e, n = r - ut, a = Math.floor(n / 146097), o = N(n, 146097), u = Math.floor(o / 36524), l = N(o, 36524), c = Math.floor(l / 1461), h = N(l, 1461), D = Math.floor(h / 365), m = a * 400 + u * 100 + c * 4 + D + (u !== 4 && D !== 4 ? 1 : 0), [v, g] = fe(m), M = r - R(v, g, 1, 1), f = 2;
57
- r < R(v, g, 3, 1) ? f = 0 : B(g) && (f = 1);
58
- let i = Math.floor(((M + f) * 12 + 373) / 367), s = r - R(v, g, i, 1) + 1;
59
- return new y(v, g, i, s);
60
- }
61
- toJulianDay(e) {
62
- return R(e.era, e.year, e.month, e.day);
63
- }
64
- getDaysInMonth(e) {
65
- return Ot[B(e.year) ? "leapyear" : "standard"][e.month - 1];
66
- }
67
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
68
- getMonthsInYear(e) {
69
- return 12;
70
- }
71
- getDaysInYear(e) {
72
- return B(e.year) ? 366 : 365;
73
- }
74
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
75
- getYearsInEra(e) {
76
- return 9999;
77
- }
78
- getEras() {
79
- return [
80
- "BC",
81
- "AD"
82
- ];
83
- }
84
- isInverseEra(e) {
85
- return e.era === "BC";
86
- }
87
- balanceDate(e) {
88
- e.year <= 0 && (e.era = e.era === "BC" ? "AD" : "BC", e.year = 1 - e.year);
89
- }
90
- constructor() {
91
- this.identifier = "gregory";
92
- }
93
- }
94
- const Yt = {
95
- "001": 1,
96
- AD: 1,
97
- AE: 6,
98
- AF: 6,
99
- AI: 1,
100
- AL: 1,
101
- AM: 1,
102
- AN: 1,
103
- AR: 1,
104
- AT: 1,
105
- AU: 1,
106
- AX: 1,
107
- AZ: 1,
108
- BA: 1,
109
- BE: 1,
110
- BG: 1,
111
- BH: 6,
112
- BM: 1,
113
- BN: 1,
114
- BY: 1,
115
- CH: 1,
116
- CL: 1,
117
- CM: 1,
118
- CN: 1,
119
- CR: 1,
120
- CY: 1,
121
- CZ: 1,
122
- DE: 1,
123
- DJ: 6,
124
- DK: 1,
125
- DZ: 6,
126
- EC: 1,
127
- EE: 1,
128
- EG: 6,
129
- ES: 1,
130
- FI: 1,
131
- FJ: 1,
132
- FO: 1,
133
- FR: 1,
134
- GB: 1,
135
- GE: 1,
136
- GF: 1,
137
- GP: 1,
138
- GR: 1,
139
- HR: 1,
140
- HU: 1,
141
- IE: 1,
142
- IQ: 6,
143
- IR: 6,
144
- IS: 1,
145
- IT: 1,
146
- JO: 6,
147
- KG: 1,
148
- KW: 6,
149
- KZ: 1,
150
- LB: 1,
151
- LI: 1,
152
- LK: 1,
153
- LT: 1,
154
- LU: 1,
155
- LV: 1,
156
- LY: 6,
157
- MC: 1,
158
- MD: 1,
159
- ME: 1,
160
- MK: 1,
161
- MN: 1,
162
- MQ: 1,
163
- MV: 5,
164
- MY: 1,
165
- NL: 1,
166
- NO: 1,
167
- NZ: 1,
168
- OM: 6,
169
- PL: 1,
170
- QA: 6,
171
- RE: 1,
172
- RO: 1,
173
- RS: 1,
174
- RU: 1,
175
- SD: 6,
176
- SE: 1,
177
- SI: 1,
178
- SK: 1,
179
- SM: 1,
180
- SY: 6,
181
- TJ: 1,
182
- TM: 1,
183
- TR: 1,
184
- UA: 1,
185
- UY: 1,
186
- UZ: 1,
187
- VA: 1,
188
- VN: 1,
189
- XK: 1
190
- };
191
- function ae(t, e) {
192
- return e = w(e, t.calendar), t.era === e.era && t.year === e.year && t.month === e.month && t.day === e.day;
193
- }
194
- function kt(t, e) {
195
- return e = w(e, t.calendar), t = De(t), e = De(e), t.era === e.era && t.year === e.year && t.month === e.month;
196
- }
197
- function Nr(t, e) {
198
- return Se(t.calendar, e.calendar) && ae(t, e);
199
- }
200
- function Le(t, e) {
201
- return Se(t.calendar, e.calendar) && kt(t, e);
202
- }
203
- function Se(t, e) {
204
- var r, n, a, o;
205
- return (o = (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 && o !== void 0 ? o : t.identifier === e.identifier;
206
- }
207
- function Fr(t, e) {
208
- return ae(t, it(e));
209
- }
210
- function lt(t, e, r) {
211
- let n = t.calendar.toJulianDay(t), a = Rt(e), o = Math.ceil(n + 1 - a) % 7;
212
- return o < 0 && (o += 7), o;
213
- }
214
- function Bt(t) {
215
- return O(Date.now(), t);
216
- }
217
- function it(t) {
218
- return Lt(Bt(t));
219
- }
220
- function ct(t, e) {
221
- return t.calendar.toJulianDay(t) - e.calendar.toJulianDay(e);
222
- }
223
- function Tt(t, e) {
224
- return Ne(t) - Ne(e);
225
- }
226
- function Ne(t) {
227
- return t.hour * 36e5 + t.minute * 6e4 + t.second * 1e3 + t.millisecond;
228
- }
229
- let ye = null;
230
- function se() {
231
- return ye == null && (ye = new Intl.DateTimeFormat().resolvedOptions().timeZone), ye;
232
- }
233
- function De(t) {
234
- return t.subtract({
235
- days: t.day - 1
236
- });
237
- }
238
- function Fe(t) {
239
- return t.add({
240
- days: t.calendar.getDaysInMonth(t) - t.day
241
- });
242
- }
243
- const Qe = /* @__PURE__ */ new Map();
244
- function Jt(t) {
245
- if (Intl.Locale) {
246
- let r = Qe.get(t);
247
- return r || (r = new Intl.Locale(t).maximize().region, r && Qe.set(t, r)), r;
248
- }
249
- let e = t.split("-")[1];
250
- return e === "u" ? void 0 : e;
251
- }
252
- function Rt(t) {
253
- let e = Jt(t);
254
- return e && Yt[e] || 0;
255
- }
256
- function _(t) {
257
- t = w(t, new C());
258
- let e = j(t.era, t.year);
259
- return ft(e, t.month, t.day, t.hour, t.minute, t.second, t.millisecond);
260
- }
261
- function ft(t, e, r, n, a, o, u) {
262
- let l = /* @__PURE__ */ new Date();
263
- return l.setUTCHours(n, a, o, u), l.setUTCFullYear(t, e - 1, r), l.getTime();
264
- }
265
- function we(t, e) {
266
- if (e === "UTC") return 0;
267
- if (t > 0 && e === se()) return new Date(t).getTimezoneOffset() * -6e4;
268
- let { year: r, month: n, day: a, hour: o, minute: u, second: l } = st(t, e);
269
- return ft(r, n, a, o, u, l, 0) - Math.floor(t / 1e3) * 1e3;
270
- }
271
- const _e = /* @__PURE__ */ new Map();
272
- function st(t, e) {
273
- let r = _e.get(e);
274
- r || (r = new Intl.DateTimeFormat("en-US", {
275
- timeZone: e,
276
- hour12: !1,
277
- era: "short",
278
- year: "numeric",
279
- month: "numeric",
280
- day: "numeric",
281
- hour: "numeric",
282
- minute: "numeric",
283
- second: "numeric"
284
- }), _e.set(e, r));
285
- let n = r.formatToParts(new Date(t)), a = {};
286
- for (let o of n) o.type !== "literal" && (a[o.type] = o.value);
287
- return {
288
- // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
289
- year: a.era === "BC" || a.era === "B" ? -a.year + 1 : +a.year,
290
- month: +a.month,
291
- day: +a.day,
292
- hour: a.hour === "24" ? 0 : +a.hour,
293
- minute: +a.minute,
294
- second: +a.second
295
- };
296
- }
297
- const We = 864e5;
298
- function Pt(t, e, r, n) {
299
- return (r === n ? [
300
- r
301
- ] : [
302
- r,
303
- n
304
- ]).filter((o) => Ut(t, e, o));
305
- }
306
- function Ut(t, e, r) {
307
- let n = st(r, e);
308
- 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;
309
- }
310
- function I(t, e, r = "compatible") {
311
- let n = W(t);
312
- if (e === "UTC") return _(n);
313
- if (e === se() && r === "compatible") {
314
- n = w(n, new C());
315
- let c = /* @__PURE__ */ new Date(), h = j(n.era, n.year);
316
- return c.setFullYear(h, n.month - 1, n.day), c.setHours(n.hour, n.minute, n.second, n.millisecond), c.getTime();
317
- }
318
- let a = _(n), o = we(a - We, e), u = we(a + We, e), l = Pt(n, e, a - o, a - u);
319
- if (l.length === 1) return l[0];
320
- if (l.length > 1) switch (r) {
321
- // 'compatible' means 'earlier' for "fall back" transitions
322
- case "compatible":
323
- case "earlier":
324
- return l[0];
325
- case "later":
326
- return l[l.length - 1];
327
- case "reject":
328
- throw new RangeError("Multiple possible absolute times found");
329
- }
330
- switch (r) {
331
- case "earlier":
332
- return Math.min(a - o, a - u);
333
- // 'compatible' means 'later' for "spring forward" transitions
334
- case "compatible":
335
- case "later":
336
- return Math.max(a - o, a - u);
337
- case "reject":
338
- throw new RangeError("No such absolute time found");
339
- }
340
- }
341
- function ht(t, e, r = "compatible") {
342
- return new Date(I(t, e, r));
343
- }
344
- function O(t, e) {
345
- let r = we(t, e), n = new Date(t + r), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, u = n.getUTCDate(), l = n.getUTCHours(), c = n.getUTCMinutes(), h = n.getUTCSeconds(), D = n.getUTCMilliseconds();
346
- return new V(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, u, e, r, l, c, h, D);
347
- }
348
- function Lt(t) {
349
- return new y(t.calendar, t.era, t.year, t.month, t.day);
350
- }
351
- function W(t, e) {
352
- let r = 0, n = 0, a = 0, o = 0;
353
- if ("timeZone" in t) ({ hour: r, minute: n, second: a, millisecond: o } = t);
354
- else if ("hour" in t && !e) return t;
355
- return e && ({ hour: r, minute: n, second: a, millisecond: o } = e), new q(t.calendar, t.era, t.year, t.month, t.day, r, n, a, o);
356
- }
357
- function w(t, e) {
358
- if (Se(t.calendar, e)) return t;
359
- let r = e.fromJulianDay(t.calendar.toJulianDay(t)), n = t.copy();
360
- return n.calendar = e, n.era = r.era, n.year = r.year, n.month = r.month, n.day = r.day, P(n), n;
361
- }
362
- function Nt(t, e, r) {
363
- if (t instanceof V)
364
- return t.timeZone === e ? t : Qt(t, e);
365
- let n = I(t, e, r);
366
- return O(n, e);
367
- }
368
- function Ft(t) {
369
- let e = _(t) - t.offset;
370
- return new Date(e);
371
- }
372
- function Qt(t, e) {
373
- let r = _(t) - t.offset;
374
- return w(O(r, e), t.calendar);
375
- }
376
- const Z = 36e5;
377
- function he(t, e) {
378
- let r = t.copy(), n = "hour" in r ? Vt(r, e) : 0;
379
- Ae(r, e.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, t), r.month += e.months || 0, xe(r), dt(r), r.day += (e.weeks || 0) * 7, r.day += e.days || 0, r.day += n, _t(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
380
- let a = r.calendar.getYearsInEra(r);
381
- if (r.year > a) {
382
- var o, u;
383
- let c = (o = (u = r.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(u, r);
384
- r.year = a, r.month = c ? 1 : r.calendar.getMonthsInYear(r), r.day = c ? 1 : r.calendar.getDaysInMonth(r);
385
- }
386
- r.month < 1 && (r.month = 1, r.day = 1);
387
- let l = r.calendar.getMonthsInYear(r);
388
- return r.month > l && (r.month = l, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
389
- }
390
- function Ae(t, e) {
391
- var r, n;
392
- !((r = (n = t.calendar).isInverseEra) === null || r === void 0) && r.call(n, t) && (e = -e), t.year += e;
393
- }
394
- function xe(t) {
395
- for (; t.month < 1; )
396
- Ae(t, -1), t.month += t.calendar.getMonthsInYear(t);
397
- let e = 0;
398
- for (; t.month > (e = t.calendar.getMonthsInYear(t)); )
399
- t.month -= e, Ae(t, 1);
400
- }
401
- function _t(t) {
402
- for (; t.day < 1; )
403
- t.month--, xe(t), t.day += t.calendar.getDaysInMonth(t);
404
- for (; t.day > t.calendar.getDaysInMonth(t); )
405
- t.day -= t.calendar.getDaysInMonth(t), t.month++, xe(t);
406
- }
407
- function dt(t) {
408
- 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));
409
- }
410
- function P(t) {
411
- t.calendar.constrainDate && t.calendar.constrainDate(t), t.year = Math.max(1, Math.min(t.calendar.getYearsInEra(t), t.year)), dt(t);
412
- }
413
- function yt(t) {
414
- let e = {};
415
- for (let r in t) typeof t[r] == "number" && (e[r] = -t[r]);
416
- return e;
417
- }
418
- function $t(t, e) {
419
- return he(t, yt(e));
420
- }
421
- function Oe(t, e) {
422
- let r = t.copy();
423
- 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), P(r), r;
424
- }
425
- function oe(t, e) {
426
- let r = t.copy();
427
- 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), qt(r), r;
428
- }
429
- function Wt(t) {
430
- t.second += Math.floor(t.millisecond / 1e3), t.millisecond = X(t.millisecond, 1e3), t.minute += Math.floor(t.second / 60), t.second = X(t.second, 60), t.hour += Math.floor(t.minute / 60), t.minute = X(t.minute, 60);
431
- let e = Math.floor(t.hour / 24);
432
- return t.hour = X(t.hour, 24), e;
433
- }
434
- function qt(t) {
435
- 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));
436
- }
437
- function X(t, e) {
438
- let r = t % e;
439
- return r < 0 && (r += e), r;
440
- }
441
- function Vt(t, e) {
442
- return t.hour += e.hours || 0, t.minute += e.minutes || 0, t.second += e.seconds || 0, t.millisecond += e.milliseconds || 0, Wt(t);
443
- }
444
- function Ye(t, e, r, n) {
445
- let a = t.copy();
446
- switch (e) {
447
- case "era": {
448
- let l = t.calendar.getEras(), c = l.indexOf(t.era);
449
- if (c < 0) throw new Error("Invalid era: " + t.era);
450
- c = Y(c, r, 0, l.length - 1, n == null ? void 0 : n.round), a.era = l[c], P(a);
451
- break;
452
- }
453
- case "year":
454
- var o, u;
455
- !((o = (u = a.calendar).isInverseEra) === null || o === void 0) && o.call(u, a) && (r = -r), a.year = Y(t.year, r, -1 / 0, 9999, n == null ? void 0 : n.round), a.year === -1 / 0 && (a.year = 1), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, t);
456
- break;
457
- case "month":
458
- a.month = Y(t.month, r, 1, t.calendar.getMonthsInYear(t), n == null ? void 0 : n.round);
459
- break;
460
- case "day":
461
- a.day = Y(t.day, r, 1, t.calendar.getDaysInMonth(t), n == null ? void 0 : n.round);
462
- break;
463
- default:
464
- throw new Error("Unsupported field " + e);
465
- }
466
- return t.calendar.balanceDate && t.calendar.balanceDate(a), P(a), a;
467
- }
468
- function mt(t, e, r, n) {
469
- let a = t.copy();
470
- switch (e) {
471
- case "hour": {
472
- let o = t.hour, u = 0, l = 23;
473
- if ((n == null ? void 0 : n.hourCycle) === 12) {
474
- let c = o >= 12;
475
- u = c ? 12 : 0, l = c ? 23 : 11;
476
- }
477
- a.hour = Y(o, r, u, l, n == null ? void 0 : n.round);
478
- break;
479
- }
480
- case "minute":
481
- a.minute = Y(t.minute, r, 0, 59, n == null ? void 0 : n.round);
482
- break;
483
- case "second":
484
- a.second = Y(t.second, r, 0, 59, n == null ? void 0 : n.round);
485
- break;
486
- case "millisecond":
487
- a.millisecond = Y(t.millisecond, r, 0, 999, n == null ? void 0 : n.round);
488
- break;
489
- default:
490
- throw new Error("Unsupported field " + e);
491
- }
492
- return a;
493
- }
494
- function Y(t, e, r, n, a = !1) {
495
- if (a) {
496
- t += Math.sign(e), t < r && (t = n);
497
- let o = Math.abs(e);
498
- e > 0 ? t = Math.ceil(t / o) * o : t = Math.floor(t / o) * o, t > n && (t = r);
499
- } else
500
- t += e, t < r ? t = n - (r - t - 1) : t > n && (t = r + (t - n - 1));
501
- return t;
502
- }
503
- function vt(t, e) {
504
- let r;
505
- 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) {
506
- let a = he(W(t), {
507
- years: e.years,
508
- months: e.months,
509
- weeks: e.weeks,
510
- days: e.days
511
- });
512
- r = I(a, t.timeZone);
513
- } else
514
- r = _(t) - t.offset;
515
- r += e.milliseconds || 0, r += (e.seconds || 0) * 1e3, r += (e.minutes || 0) * 6e4, r += (e.hours || 0) * 36e5;
516
- let n = O(r, t.timeZone);
517
- return w(n, t.calendar);
518
- }
519
- function Zt(t, e) {
520
- return vt(t, yt(e));
521
- }
522
- function Gt(t, e, r, n) {
523
- switch (e) {
524
- case "hour": {
525
- let a = 0, o = 23;
526
- if ((n == null ? void 0 : n.hourCycle) === 12) {
527
- let M = t.hour >= 12;
528
- a = M ? 12 : 0, o = M ? 23 : 11;
529
- }
530
- let u = W(t), l = w(oe(u, {
531
- hour: a
532
- }), new C()), c = [
533
- I(l, t.timeZone, "earlier"),
534
- I(l, t.timeZone, "later")
535
- ].filter((M) => O(M, t.timeZone).day === l.day)[0], h = w(oe(u, {
536
- hour: o
537
- }), new C()), D = [
538
- I(h, t.timeZone, "earlier"),
539
- I(h, t.timeZone, "later")
540
- ].filter((M) => O(M, t.timeZone).day === h.day).pop(), m = _(t) - t.offset, v = Math.floor(m / Z), g = m % Z;
541
- return m = Y(v, r, Math.floor(c / Z), Math.floor(D / Z), n == null ? void 0 : n.round) * Z + g, w(O(m, t.timeZone), t.calendar);
542
- }
543
- case "minute":
544
- case "second":
545
- case "millisecond":
546
- return mt(t, e, r, n);
547
- case "era":
548
- case "year":
549
- case "month":
550
- case "day": {
551
- let a = Ye(W(t), e, r, n), o = I(a, t.timeZone);
552
- return w(O(o, t.timeZone), t.calendar);
553
- }
554
- default:
555
- throw new Error("Unsupported field " + e);
556
- }
557
- }
558
- function Ht(t, e, r) {
559
- let n = W(t), a = oe(Oe(n, e), e);
560
- if (a.compare(n) === 0) return t;
561
- let o = I(a, t.timeZone, r);
562
- return w(O(o, t.timeZone), t.calendar);
563
- }
564
- function Kt(t) {
565
- 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) : ""}`;
566
- }
567
- function bt(t) {
568
- let e = w(t, new C()), r;
569
- 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")}`;
570
- }
571
- function gt(t) {
572
- return `${bt(t)}T${Kt(t)}`;
573
- }
574
- function jt(t) {
575
- let e = Math.sign(t) < 0 ? "-" : "+";
576
- t = Math.abs(t);
577
- let r = Math.floor(t / 36e5), n = t % 36e5 / 6e4;
578
- return `${e}${String(r).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
579
- }
580
- function Xt(t) {
581
- return `${gt(t)}${jt(t.offset)}[${t.timeZone}]`;
582
- }
583
- function zt(t, e) {
584
- if (e.has(t))
585
- throw new TypeError("Cannot initialize the same private elements twice on an object");
586
- }
587
- function ke(t, e, r) {
588
- zt(t, e), e.set(t, r);
589
- }
590
- function Be(t) {
591
- let e = typeof t[0] == "object" ? t.shift() : new C(), r;
592
- if (typeof t[0] == "string") r = t.shift();
593
- else {
594
- let u = e.getEras();
595
- r = u[u.length - 1];
596
- }
597
- let n = t.shift(), a = t.shift(), o = t.shift();
598
- return [
599
- e,
600
- r,
601
- n,
602
- a,
603
- o
604
- ];
605
- }
606
- var pt = /* @__PURE__ */ new WeakMap();
607
- class y {
608
- /** Returns a copy of this date. */
609
- copy() {
610
- return this.era ? new y(this.calendar, this.era, this.year, this.month, this.day) : new y(this.calendar, this.year, this.month, this.day);
611
- }
612
- /** Returns a new `CalendarDate` with the given duration added to it. */
613
- add(e) {
614
- return he(this, e);
615
- }
616
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */
617
- subtract(e) {
618
- return $t(this, e);
619
- }
620
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
621
- set(e) {
622
- return Oe(this, e);
623
- }
624
- /**
625
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
626
- * When the resulting value reaches the limits of the field, it wraps around.
627
- */
628
- cycle(e, r, n) {
629
- return Ye(this, e, r, n);
630
- }
631
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
632
- toDate(e) {
633
- return ht(this, e);
634
- }
635
- /** Converts the date to an ISO 8601 formatted string. */
636
- toString() {
637
- return bt(this);
638
- }
639
- /** 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. */
640
- compare(e) {
641
- return ct(this, e);
642
- }
643
- constructor(...e) {
644
- ke(this, pt, {
645
- writable: !0,
646
- value: void 0
647
- });
648
- let [r, n, a, o, u] = Be(e);
649
- this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = u, P(this);
650
- }
651
- }
652
- var er = /* @__PURE__ */ new WeakMap();
653
- class q {
654
- /** Returns a copy of this date. */
655
- copy() {
656
- return this.era ? new q(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new q(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
657
- }
658
- /** Returns a new `CalendarDateTime` with the given duration added to it. */
659
- add(e) {
660
- return he(this, e);
661
- }
662
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
663
- subtract(e) {
664
- return $t(this, e);
665
- }
666
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
667
- set(e) {
668
- return Oe(oe(this, e), e);
669
- }
670
- /**
671
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
672
- * When the resulting value reaches the limits of the field, it wraps around.
673
- */
674
- cycle(e, r, n) {
675
- switch (e) {
676
- case "era":
677
- case "year":
678
- case "month":
679
- case "day":
680
- return Ye(this, e, r, n);
681
- default:
682
- return mt(this, e, r, n);
683
- }
684
- }
685
- /** Converts the date to a native JavaScript Date object in the given time zone. */
686
- toDate(e, r) {
687
- return ht(this, e, r);
688
- }
689
- /** Converts the date to an ISO 8601 formatted string. */
690
- toString() {
691
- return gt(this);
692
- }
693
- /** 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. */
694
- compare(e) {
695
- let r = ct(this, e);
696
- return r === 0 ? Tt(this, W(e)) : r;
697
- }
698
- constructor(...e) {
699
- ke(this, er, {
700
- writable: !0,
701
- value: void 0
702
- });
703
- let [r, n, a, o, u] = Be(e);
704
- this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = u, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, P(this);
705
- }
706
- }
707
- var tr = /* @__PURE__ */ new WeakMap();
708
- class V {
709
- /** Returns a copy of this date. */
710
- copy() {
711
- return this.era ? new V(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new V(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
712
- }
713
- /** Returns a new `ZonedDateTime` with the given duration added to it. */
714
- add(e) {
715
- return vt(this, e);
716
- }
717
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
718
- subtract(e) {
719
- return Zt(this, e);
720
- }
721
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
722
- set(e, r) {
723
- return Ht(this, e, r);
724
- }
725
- /**
726
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
727
- * When the resulting value reaches the limits of the field, it wraps around.
728
- */
729
- cycle(e, r, n) {
730
- return Gt(this, e, r, n);
731
- }
732
- /** Converts the date to a native JavaScript Date object. */
733
- toDate() {
734
- return Ft(this);
735
- }
736
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
737
- toString() {
738
- return Xt(this);
739
- }
740
- /** Converts the date to an ISO 8601 formatted string in UTC. */
741
- toAbsoluteString() {
742
- return this.toDate().toISOString();
743
- }
744
- /** 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. */
745
- compare(e) {
746
- return this.toDate().getTime() - Nt(e, this.timeZone).toDate().getTime();
747
- }
748
- constructor(...e) {
749
- ke(this, tr, {
750
- writable: !0,
751
- value: void 0
752
- });
753
- let [r, n, a, o, u] = Be(e), l = e.shift(), c = e.shift();
754
- this.calendar = r, this.era = n, this.year = a, this.month = o, this.day = u, this.timeZone = l, this.offset = c, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, P(this);
755
- }
756
- }
757
- const F = [
758
- [
759
- 1868,
760
- 9,
761
- 8
762
- ],
763
- [
764
- 1912,
765
- 7,
766
- 30
767
- ],
768
- [
769
- 1926,
770
- 12,
771
- 25
772
- ],
773
- [
774
- 1989,
775
- 1,
776
- 8
777
- ],
778
- [
779
- 2019,
780
- 5,
781
- 1
782
- ]
783
- ], rr = [
784
- [
785
- 1912,
786
- 7,
787
- 29
788
- ],
789
- [
790
- 1926,
791
- 12,
792
- 24
793
- ],
794
- [
795
- 1989,
796
- 1,
797
- 7
798
- ],
799
- [
800
- 2019,
801
- 4,
802
- 30
803
- ]
804
- ], p = [
805
- 1867,
806
- 1911,
807
- 1925,
808
- 1988,
809
- 2018
810
- ], k = [
811
- "meiji",
812
- "taisho",
813
- "showa",
814
- "heisei",
815
- "reiwa"
816
- ];
817
- function qe(t) {
818
- const e = F.findIndex(([r, n, a]) => t.year < r || t.year === r && t.month < n || t.year === r && t.month === n && t.day < a);
819
- return e === -1 ? F.length - 1 : e === 0 ? 0 : e - 1;
820
- }
821
- function $e(t) {
822
- let e = p[k.indexOf(t.era)];
823
- if (!e) throw new Error("Unknown era: " + t.era);
824
- return new y(t.year + e, t.month, t.day);
825
- }
826
- class nr extends C {
827
- fromJulianDay(e) {
828
- let r = super.fromJulianDay(e), n = qe(r);
829
- return new y(this, k[n], r.year - p[n], r.month, r.day);
830
- }
831
- toJulianDay(e) {
832
- return super.toJulianDay($e(e));
833
- }
834
- balanceDate(e) {
835
- let r = $e(e), n = qe(r);
836
- k[n] !== e.era && (e.era = k[n], e.year = r.year - p[n]), this.constrainDate(e);
837
- }
838
- constrainDate(e) {
839
- let r = k.indexOf(e.era), n = rr[r];
840
- if (n != null) {
841
- let [a, o, u] = n, l = a - p[r];
842
- e.year = Math.max(1, Math.min(l, e.year)), e.year === l && (e.month = Math.min(o, e.month), e.month === o && (e.day = Math.min(u, e.day)));
843
- }
844
- if (e.year === 1 && r >= 0) {
845
- let [, a, o] = F[r];
846
- e.month = Math.max(a, e.month), e.month === a && (e.day = Math.max(o, e.day));
847
- }
848
- }
849
- getEras() {
850
- return k;
851
- }
852
- getYearsInEra(e) {
853
- let r = k.indexOf(e.era), n = F[r], a = F[r + 1];
854
- if (a == null)
855
- return 9999 - n[0] + 1;
856
- let o = a[0] - n[0];
857
- return (e.month < a[1] || e.month === a[1] && e.day < a[2]) && o++, o;
858
- }
859
- getDaysInMonth(e) {
860
- return super.getDaysInMonth($e(e));
861
- }
862
- getMinimumMonthInYear(e) {
863
- let r = Ve(e);
864
- return r ? r[1] : 1;
865
- }
866
- getMinimumDayInMonth(e) {
867
- let r = Ve(e);
868
- return r && e.month === r[1] ? r[2] : 1;
869
- }
870
- constructor(...e) {
871
- super(...e), this.identifier = "japanese";
872
- }
873
- }
874
- function Ve(t) {
875
- if (t.year === 1) {
876
- let e = k.indexOf(t.era);
877
- return F[e];
878
- }
879
- }
880
- const Mt = -543;
881
- class ar extends C {
882
- fromJulianDay(e) {
883
- let r = super.fromJulianDay(e), n = j(r.era, r.year);
884
- return new y(this, n - Mt, r.month, r.day);
885
- }
886
- toJulianDay(e) {
887
- return super.toJulianDay(Ze(e));
888
- }
889
- getEras() {
890
- return [
891
- "BE"
892
- ];
893
- }
894
- getDaysInMonth(e) {
895
- return super.getDaysInMonth(Ze(e));
896
- }
897
- balanceDate() {
898
- }
899
- constructor(...e) {
900
- super(...e), this.identifier = "buddhist";
901
- }
902
- }
903
- function Ze(t) {
904
- let [e, r] = fe(t.year + Mt);
905
- return new y(e, r, t.month, t.day);
906
- }
907
- const ue = 1911;
908
- function Dt(t) {
909
- return t.era === "minguo" ? t.year + ue : 1 - t.year + ue;
910
- }
911
- function Ge(t) {
912
- let e = t - ue;
913
- return e > 0 ? [
914
- "minguo",
915
- e
916
- ] : [
917
- "before_minguo",
918
- 1 - e
919
- ];
920
- }
921
- class or extends C {
922
- fromJulianDay(e) {
923
- let r = super.fromJulianDay(e), n = j(r.era, r.year), [a, o] = Ge(n);
924
- return new y(this, a, o, r.month, r.day);
925
- }
926
- toJulianDay(e) {
927
- return super.toJulianDay(He(e));
928
- }
929
- getEras() {
930
- return [
931
- "before_minguo",
932
- "minguo"
933
- ];
934
- }
935
- balanceDate(e) {
936
- let [r, n] = Ge(Dt(e));
937
- e.era = r, e.year = n;
938
- }
939
- isInverseEra(e) {
940
- return e.era === "before_minguo";
941
- }
942
- getDaysInMonth(e) {
943
- return super.getDaysInMonth(He(e));
944
- }
945
- getYearsInEra(e) {
946
- return e.era === "before_minguo" ? 9999 : 9999 - ue;
947
- }
948
- constructor(...e) {
949
- super(...e), this.identifier = "roc";
950
- }
951
- }
952
- function He(t) {
953
- let [e, r] = fe(Dt(t));
954
- return new y(e, r, t.month, t.day);
955
- }
956
- const Ke = 1948320, je = [
957
- 0,
958
- 31,
959
- 62,
960
- 93,
961
- 124,
962
- 155,
963
- 186,
964
- 216,
965
- 246,
966
- 276,
967
- 306,
968
- 336
969
- // Esfand
970
- ];
971
- class ur {
972
- fromJulianDay(e) {
973
- let r = e - Ke, n = 1 + Math.floor((33 * r + 3) / 12053), a = 365 * (n - 1) + Math.floor((8 * n + 21) / 33), o = r - a, u = o < 216 ? Math.floor(o / 31) : Math.floor((o - 6) / 30), l = o - je[u] + 1;
974
- return new y(this, n, u + 1, l);
975
- }
976
- toJulianDay(e) {
977
- let r = Ke - 1 + 365 * (e.year - 1) + Math.floor((8 * e.year + 21) / 33);
978
- return r += je[e.month - 1], r += e.day, r;
979
- }
980
- getMonthsInYear() {
981
- return 12;
982
- }
983
- getDaysInMonth(e) {
984
- return e.month <= 6 ? 31 : e.month <= 11 || N(25 * e.year + 11, 33) < 8 ? 30 : 29;
985
- }
986
- getEras() {
987
- return [
988
- "AP"
989
- ];
990
- }
991
- getYearsInEra() {
992
- return 9377;
993
- }
994
- constructor() {
995
- this.identifier = "persian";
996
- }
997
- }
998
- const me = 78, Xe = 80;
999
- class lr extends C {
1000
- fromJulianDay(e) {
1001
- let r = super.fromJulianDay(e), n = r.year - me, a = e - R(r.era, r.year, 1, 1), o;
1002
- a < Xe ? (n--, o = B(r.year - 1) ? 31 : 30, a += o + 155 + 90 + 10) : (o = B(r.year) ? 31 : 30, a -= Xe);
1003
- let u, l;
1004
- if (a < o)
1005
- u = 1, l = a + 1;
1006
- else {
1007
- let c = a - o;
1008
- c < 155 ? (u = Math.floor(c / 31) + 2, l = c % 31 + 1) : (c -= 155, u = Math.floor(c / 30) + 7, l = c % 30 + 1);
1009
- }
1010
- return new y(this, n, u, l);
1011
- }
1012
- toJulianDay(e) {
1013
- let r = e.year + me, [n, a] = fe(r), o, u;
1014
- return B(a) ? (o = 31, u = R(n, a, 3, 21)) : (o = 30, u = R(n, a, 3, 22)), e.month === 1 ? u + e.day - 1 : (u += o + Math.min(e.month - 2, 5) * 31, e.month >= 8 && (u += (e.month - 7) * 30), u += e.day - 1, u);
1015
- }
1016
- getDaysInMonth(e) {
1017
- return e.month === 1 && B(e.year + me) || e.month >= 2 && e.month <= 6 ? 31 : 30;
1018
- }
1019
- getYearsInEra() {
1020
- return 9919;
1021
- }
1022
- getEras() {
1023
- return [
1024
- "saka"
1025
- ];
1026
- }
1027
- balanceDate() {
1028
- }
1029
- constructor(...e) {
1030
- super(...e), this.identifier = "indian";
1031
- }
1032
- }
1033
- const le = 1948440, ze = 1948439, A = 1300, U = 1600, ir = 460322;
1034
- function ie(t, e, r, n) {
1035
- return n + Math.ceil(29.5 * (r - 1)) + (e - 1) * 354 + Math.floor((3 + 11 * e) / 30) + t - 1;
1036
- }
1037
- function wt(t, e, r) {
1038
- let n = Math.floor((30 * (r - e) + 10646) / 10631), a = Math.min(12, Math.ceil((r - (29 + ie(e, n, 1, 1))) / 29.5) + 1), o = r - ie(e, n, a, 1) + 1;
1039
- return new y(t, n, a, o);
1040
- }
1041
- function pe(t) {
1042
- return (14 + 11 * t) % 30 < 11;
1043
- }
1044
- class Te {
1045
- fromJulianDay(e) {
1046
- return wt(this, le, e);
1047
- }
1048
- toJulianDay(e) {
1049
- return ie(le, e.year, e.month, e.day);
1050
- }
1051
- getDaysInMonth(e) {
1052
- let r = 29 + e.month % 2;
1053
- return e.month === 12 && pe(e.year) && r++, r;
1054
- }
1055
- getMonthsInYear() {
1056
- return 12;
1057
- }
1058
- getDaysInYear(e) {
1059
- return pe(e.year) ? 355 : 354;
1060
- }
1061
- getYearsInEra() {
1062
- return 9665;
1063
- }
1064
- getEras() {
1065
- return [
1066
- "AH"
1067
- ];
1068
- }
1069
- constructor() {
1070
- this.identifier = "islamic-civil";
1071
- }
1072
- }
1073
- class cr extends Te {
1074
- fromJulianDay(e) {
1075
- return wt(this, ze, e);
1076
- }
1077
- toJulianDay(e) {
1078
- return ie(ze, e.year, e.month, e.day);
1079
- }
1080
- constructor(...e) {
1081
- super(...e), this.identifier = "islamic-tbla";
1082
- }
1083
- }
1084
- const fr = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";
1085
- let Ce, Q;
1086
- function ee(t) {
1087
- return ir + Q[t - A];
1088
- }
1089
- function G(t, e) {
1090
- let r = t - A, n = 1 << 11 - (e - 1);
1091
- return (Ce[r] & n) === 0 ? 29 : 30;
1092
- }
1093
- function et(t, e) {
1094
- let r = ee(t);
1095
- for (let n = 1; n < e; n++) r += G(t, n);
1096
- return r;
1097
- }
1098
- function tt(t) {
1099
- return Q[t + 1 - A] - Q[t - A];
1100
- }
1101
- class sr extends Te {
1102
- fromJulianDay(e) {
1103
- let r = e - le, n = ee(A), a = ee(U);
1104
- if (r < n || r > a) return super.fromJulianDay(e);
1105
- {
1106
- let o = A - 1, u = 1, l = 1;
1107
- for (; l > 0; ) {
1108
- o++, l = r - ee(o) + 1;
1109
- let c = tt(o);
1110
- if (l === c) {
1111
- u = 12;
1112
- break;
1113
- } else if (l < c) {
1114
- let h = G(o, u);
1115
- for (u = 1; l > h; )
1116
- l -= h, u++, h = G(o, u);
1117
- break;
1118
- }
1119
- }
1120
- return new y(this, o, u, r - et(o, u) + 1);
1121
- }
1122
- }
1123
- toJulianDay(e) {
1124
- return e.year < A || e.year > U ? super.toJulianDay(e) : le + et(e.year, e.month) + (e.day - 1);
1125
- }
1126
- getDaysInMonth(e) {
1127
- return e.year < A || e.year > U ? super.getDaysInMonth(e) : G(e.year, e.month);
1128
- }
1129
- getDaysInYear(e) {
1130
- return e.year < A || e.year > U ? super.getDaysInYear(e) : tt(e.year);
1131
- }
1132
- constructor() {
1133
- if (super(), this.identifier = "islamic-umalqura", Ce || (Ce = new Uint16Array(Uint8Array.from(atob(fr), (e) => e.charCodeAt(0)).buffer)), !Q) {
1134
- Q = new Uint32Array(U - A + 1);
1135
- let e = 0;
1136
- for (let r = A; r <= U; r++) {
1137
- Q[r - A] = e;
1138
- for (let n = 1; n <= 12; n++) e += G(r, n);
1139
- }
1140
- }
1141
- }
1142
- }
1143
- const rt = 347997, At = 1080, xt = 24 * At, hr = 29, dr = 12 * At + 793, yr = hr * xt + dr;
1144
- function J(t) {
1145
- return N(t * 7 + 1, 19) < 7;
1146
- }
1147
- function te(t) {
1148
- let e = Math.floor((235 * t - 234) / 19), r = 12084 + 13753 * e, n = e * 29 + Math.floor(r / 25920);
1149
- return N(3 * (n + 1), 7) < 3 && (n += 1), n;
1150
- }
1151
- function $r(t) {
1152
- let e = te(t - 1), r = te(t);
1153
- return te(t + 1) - r === 356 ? 2 : r - e === 382 ? 1 : 0;
1154
- }
1155
- function H(t) {
1156
- return te(t) + $r(t);
1157
- }
1158
- function Ct(t) {
1159
- return H(t + 1) - H(t);
1160
- }
1161
- function mr(t) {
1162
- let e = Ct(t);
1163
- switch (e > 380 && (e -= 30), e) {
1164
- case 353:
1165
- return 0;
1166
- // deficient
1167
- case 354:
1168
- return 1;
1169
- // normal
1170
- case 355:
1171
- return 2;
1172
- }
1173
- }
1174
- function z(t, e) {
1175
- if (e >= 6 && !J(t) && e++, e === 4 || e === 7 || e === 9 || e === 11 || e === 13) return 29;
1176
- let r = mr(t);
1177
- return e === 2 ? r === 2 ? 30 : 29 : e === 3 ? r === 0 ? 29 : 30 : e === 6 ? J(t) ? 30 : 0 : 30;
1178
- }
1179
- class vr {
1180
- fromJulianDay(e) {
1181
- let r = e - rt, n = r * xt / yr, a = Math.floor((19 * n + 234) / 235) + 1, o = H(a), u = Math.floor(r - o);
1182
- for (; u < 1; )
1183
- a--, o = H(a), u = Math.floor(r - o);
1184
- let l = 1, c = 0;
1185
- for (; c < u; )
1186
- c += z(a, l), l++;
1187
- l--, c -= z(a, l);
1188
- let h = u - c;
1189
- return new y(this, a, l, h);
1190
- }
1191
- toJulianDay(e) {
1192
- let r = H(e.year);
1193
- for (let n = 1; n < e.month; n++) r += z(e.year, n);
1194
- return r + e.day + rt;
1195
- }
1196
- getDaysInMonth(e) {
1197
- return z(e.year, e.month);
1198
- }
1199
- getMonthsInYear(e) {
1200
- return J(e.year) ? 13 : 12;
1201
- }
1202
- getDaysInYear(e) {
1203
- return Ct(e.year);
1204
- }
1205
- getYearsInEra() {
1206
- return 9999;
1207
- }
1208
- getEras() {
1209
- return [
1210
- "AM"
1211
- ];
1212
- }
1213
- balanceYearMonth(e, r) {
1214
- r.year !== e.year && (J(r.year) && !J(e.year) && r.month > 6 ? e.month-- : !J(r.year) && J(e.year) && r.month > 6 && e.month++);
1215
- }
1216
- constructor() {
1217
- this.identifier = "hebrew";
1218
- }
1219
- }
1220
- const Ee = 1723856, nt = 1824665, Ie = 5500;
1221
- function ce(t, e, r, n) {
1222
- return t + 365 * e + Math.floor(e / 4) + 30 * (r - 1) + n - 1;
1223
- }
1224
- function Je(t, e) {
1225
- let r = Math.floor(4 * (e - t) / 1461), n = 1 + Math.floor((e - ce(t, r, 1, 1)) / 30), a = e + 1 - ce(t, r, n, 1);
1226
- return [
1227
- r,
1228
- n,
1229
- a
1230
- ];
1231
- }
1232
- function Et(t) {
1233
- return Math.floor(t % 4 / 3);
1234
- }
1235
- function It(t, e) {
1236
- return e % 13 !== 0 ? 30 : Et(t) + 5;
1237
- }
1238
- class Re {
1239
- fromJulianDay(e) {
1240
- let [r, n, a] = Je(Ee, e), o = "AM";
1241
- return r <= 0 && (o = "AA", r += Ie), new y(this, o, r, n, a);
1242
- }
1243
- toJulianDay(e) {
1244
- let r = e.year;
1245
- return e.era === "AA" && (r -= Ie), ce(Ee, r, e.month, e.day);
1246
- }
1247
- getDaysInMonth(e) {
1248
- return It(e.year, e.month);
1249
- }
1250
- getMonthsInYear() {
1251
- return 13;
1252
- }
1253
- getDaysInYear(e) {
1254
- return 365 + Et(e.year);
1255
- }
1256
- getYearsInEra(e) {
1257
- return e.era === "AA" ? 9999 : 9991;
1258
- }
1259
- getEras() {
1260
- return [
1261
- "AA",
1262
- "AM"
1263
- ];
1264
- }
1265
- constructor() {
1266
- this.identifier = "ethiopic";
1267
- }
1268
- }
1269
- class br extends Re {
1270
- fromJulianDay(e) {
1271
- let [r, n, a] = Je(Ee, e);
1272
- return r += Ie, new y(this, "AA", r, n, a);
1273
- }
1274
- getEras() {
1275
- return [
1276
- "AA"
1277
- ];
1278
- }
1279
- getYearsInEra() {
1280
- return 9999;
1281
- }
1282
- constructor(...e) {
1283
- super(...e), this.identifier = "ethioaa";
1284
- }
1285
- }
1286
- class gr extends Re {
1287
- fromJulianDay(e) {
1288
- let [r, n, a] = Je(nt, e), o = "CE";
1289
- return r <= 0 && (o = "BCE", r = 1 - r), new y(this, o, r, n, a);
1290
- }
1291
- toJulianDay(e) {
1292
- let r = e.year;
1293
- return e.era === "BCE" && (r = 1 - r), ce(nt, r, e.month, e.day);
1294
- }
1295
- getDaysInMonth(e) {
1296
- let r = e.year;
1297
- return e.era === "BCE" && (r = 1 - r), It(r, e.month);
1298
- }
1299
- isInverseEra(e) {
1300
- return e.era === "BCE";
1301
- }
1302
- balanceDate(e) {
1303
- e.year <= 0 && (e.era = e.era === "BCE" ? "CE" : "BCE", e.year = 1 - e.year);
1304
- }
1305
- getEras() {
1306
- return [
1307
- "BCE",
1308
- "CE"
1309
- ];
1310
- }
1311
- getYearsInEra(e) {
1312
- return e.era === "BCE" ? 9999 : 9715;
1313
- }
1314
- constructor(...e) {
1315
- super(...e), this.identifier = "coptic";
1316
- }
1317
- }
1318
- function Mr(t) {
1319
- switch (t) {
1320
- case "buddhist":
1321
- return new ar();
1322
- case "ethiopic":
1323
- return new Re();
1324
- case "ethioaa":
1325
- return new br();
1326
- case "coptic":
1327
- return new gr();
1328
- case "hebrew":
1329
- return new vr();
1330
- case "indian":
1331
- return new lr();
1332
- case "islamic-civil":
1333
- return new Te();
1334
- case "islamic-tbla":
1335
- return new cr();
1336
- case "islamic-umalqura":
1337
- return new sr();
1338
- case "japanese":
1339
- return new nr();
1340
- case "persian":
1341
- return new ur();
1342
- case "roc":
1343
- return new or();
1344
- case "gregory":
1345
- default:
1346
- return new C();
1347
- }
1348
- }
1349
- let ve = /* @__PURE__ */ new Map();
1350
- class E {
1351
- /** Formats a date as a string according to the locale and format options passed to the constructor. */
1352
- format(e) {
1353
- return this.formatter.format(e);
1354
- }
1355
- /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
1356
- formatToParts(e) {
1357
- return this.formatter.formatToParts(e);
1358
- }
1359
- /** Formats a date range as a string. */
1360
- formatRange(e, r) {
1361
- if (typeof this.formatter.formatRange == "function")
1362
- return this.formatter.formatRange(e, r);
1363
- if (r < e) throw new RangeError("End date must be >= start date");
1364
- return `${this.formatter.format(e)} – ${this.formatter.format(r)}`;
1365
- }
1366
- /** Formats a date range as an array of parts. */
1367
- formatRangeToParts(e, r) {
1368
- if (typeof this.formatter.formatRangeToParts == "function")
1369
- return this.formatter.formatRangeToParts(e, r);
1370
- if (r < e) throw new RangeError("End date must be >= start date");
1371
- let n = this.formatter.formatToParts(e), a = this.formatter.formatToParts(r);
1372
- return [
1373
- ...n.map((o) => ({
1374
- ...o,
1375
- source: "startRange"
1376
- })),
1377
- {
1378
- type: "literal",
1379
- value: " – ",
1380
- source: "shared"
1381
- },
1382
- ...a.map((o) => ({
1383
- ...o,
1384
- source: "endRange"
1385
- }))
1386
- ];
1387
- }
1388
- /** Returns the resolved formatting options based on the values passed to the constructor. */
1389
- resolvedOptions() {
1390
- let e = this.formatter.resolvedOptions();
1391
- return Ar() && (this.resolvedHourCycle || (this.resolvedHourCycle = xr(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;
1392
- }
1393
- constructor(e, r = {}) {
1394
- this.formatter = St(e, r), this.options = r;
1395
- }
1396
- }
1397
- const Dr = {
1398
- true: {
1399
- // Only Japanese uses the h11 style for 12 hour time. All others use h12.
1400
- ja: "h11"
1401
- },
1402
- false: {}
1403
- };
1404
- function St(t, e = {}) {
1405
- if (typeof e.hour12 == "boolean" && wr()) {
1406
- e = {
1407
- ...e
1408
- };
1409
- let a = Dr[String(e.hour12)][t.split("-")[0]], o = e.hour12 ? "h12" : "h23";
1410
- e.hourCycle = a ?? o, delete e.hour12;
1411
- }
1412
- let r = t + (e ? Object.entries(e).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
1413
- if (ve.has(r)) return ve.get(r);
1414
- let n = new Intl.DateTimeFormat(t, e);
1415
- return ve.set(r, n), n;
1416
- }
1417
- let be = null;
1418
- function wr() {
1419
- return be == null && (be = new Intl.DateTimeFormat("en-US", {
1420
- hour: "numeric",
1421
- hour12: !1
1422
- }).format(new Date(2020, 2, 3, 0)) === "24"), be;
1423
- }
1424
- let ge = null;
1425
- function Ar() {
1426
- return ge == null && (ge = new Intl.DateTimeFormat("fr", {
1427
- hour: "numeric",
1428
- hour12: !1
1429
- }).resolvedOptions().hourCycle === "h12"), ge;
1430
- }
1431
- function xr(t, e) {
1432
- if (!e.timeStyle && !e.hour) return;
1433
- t = t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), t += (t.includes("-u-") ? "" : "-u") + "-nu-latn";
1434
- let r = St(t, {
1435
- ...e,
1436
- timeZone: void 0
1437
- // use local timezone
1438
- }), n = parseInt(r.formatToParts(new Date(2020, 2, 3, 0)).find((o) => o.type === "hour").value, 10), a = parseInt(r.formatToParts(new Date(2020, 2, 3, 23)).find((o) => o.type === "hour").value, 10);
1439
- if (n === 0 && a === 23) return "h23";
1440
- if (n === 24 && a === 23) return "h24";
1441
- if (n === 0 && a === 11) return "h11";
1442
- if (n === 12 && a === 11) return "h12";
1443
- throw new Error("Unexpected hour cycle result");
1444
- }
1445
- function Qr(t) {
1446
- const { defaultValue: e, defaultPlaceholder: r, granularity: n = "day", locale: a = "en" } = t;
1447
- if (Array.isArray(e) && e.length)
1448
- return e.at(-1).copy();
1449
- if (e && !Array.isArray(e))
1450
- return e.copy();
1451
- if (r)
1452
- return r.copy();
1453
- const o = /* @__PURE__ */ new Date(), u = o.getFullYear(), l = o.getMonth() + 1, c = o.getDate(), h = ["hour", "minute", "second"], D = new E(a), m = Mr(D.resolvedOptions().calendar);
1454
- return h.includes(n ?? "day") ? w(new q(u, l, c, 0, 0, 0), m) : w(new y(u, l, c), m);
1455
- }
1456
- function S(t, e = se()) {
1457
- return Pe(t) ? t.toDate() : t.toDate(e);
1458
- }
1459
- function Cr(t) {
1460
- return t instanceof q;
1461
- }
1462
- function Pe(t) {
1463
- return t instanceof V;
1464
- }
1465
- function Er(t) {
1466
- return Cr(t) || Pe(t);
1467
- }
1468
- function K(t) {
1469
- if (t instanceof Date) {
1470
- const e = t.getFullYear(), r = t.getMonth() + 1;
1471
- return new Date(e, r, 0).getDate();
1472
- } else
1473
- return t.set({ day: 100 }).day;
1474
- }
1475
- function re(t, e) {
1476
- return t.compare(e) < 0;
1477
- }
1478
- function ne(t, e) {
1479
- return t.compare(e) > 0;
1480
- }
1481
- function Ir(t, e) {
1482
- return t.compare(e) <= 0;
1483
- }
1484
- function Sr(t, e) {
1485
- return t.compare(e) >= 0;
1486
- }
1487
- function _r(t, e, r) {
1488
- return Sr(t, e) && Ir(t, r);
1489
- }
1490
- function Wr(t, e, r) {
1491
- return ne(t, e) && re(t, r);
1492
- }
1493
- function Or(t, e, r) {
1494
- const n = lt(t, r);
1495
- return e > n ? t.subtract({ days: n + 7 - e }) : e === n ? t : t.subtract({ days: n - e });
1496
- }
1497
- function Yr(t, e, r) {
1498
- const n = lt(t, r), a = e === 0 ? 6 : e - 1;
1499
- return n === a ? t : n > a ? t.add({ days: 7 - n + a }) : t.add({ days: a - n });
1500
- }
1501
- function qr(t, e, r, n, a) {
1502
- if (r === void 0 && n === void 0 && a === void 0)
1503
- return !0;
1504
- let o = t.add({ days: 1 });
1505
- if ((n != null && n(o) || r != null && r(o)) && !(a != null && a(o)))
1506
- return !1;
1507
- const u = e;
1508
- for (; o.compare(u) < 0; )
1509
- if (o = o.add({ days: 1 }), (n != null && n(o) || r != null && r(o)) && !(a != null && a(o)))
1510
- return !1;
1511
- return !0;
1512
- }
1513
- function kr(t, e) {
1514
- const r = [];
1515
- for (let n = 0; n < t.length; n += e)
1516
- r.push(t.slice(n, n + e));
1517
- return r;
1518
- }
1519
- function Vr(t) {
1520
- const e = t.querySelector("[data-selected]");
1521
- if (e)
1522
- return e.focus();
1523
- const r = t.querySelector("[data-today]");
1524
- if (r)
1525
- return r.focus();
1526
- const n = t.querySelector("[data-reka-calendar-day]");
1527
- if (n)
1528
- return n.focus();
1529
- }
1530
- function at(t, e) {
1531
- const r = [];
1532
- let n = t.add({ days: 1 });
1533
- const a = e;
1534
- for (; n.compare(a) < 0; )
1535
- r.push(n), n = n.add({ days: 1 });
1536
- return r;
1537
- }
1538
- function Me(t) {
1539
- const { dateObj: e, weekStartsOn: r, fixedWeeks: n, locale: a } = t, o = K(e), u = Array.from({ length: o }, (i, s) => e.set({ day: s + 1 })), l = De(e), c = Fe(e), h = Or(l, r, a), D = Yr(c, r, a), m = at(h.subtract({ days: 1 }), l), v = at(c, D.add({ days: 1 })), g = m.length + u.length + v.length;
1540
- if (n && g < 42) {
1541
- const i = 42 - g;
1542
- let s = v[v.length - 1];
1543
- s || (s = Fe(e));
1544
- const d = Array.from({ length: i }, (b, $) => {
1545
- const x = $ + 1;
1546
- return s.add({ days: x });
1547
- });
1548
- v.push(...d);
1549
- }
1550
- const M = m.concat(u, v), f = kr(M, 7);
1551
- return {
1552
- value: e,
1553
- cells: M,
1554
- rows: f
1555
- };
1556
- }
1557
- function T(t) {
1558
- const { numberOfMonths: e, dateObj: r, ...n } = t, a = [];
1559
- if (!e || e === 1)
1560
- return a.push(
1561
- Me({
1562
- ...n,
1563
- dateObj: r
1564
- })
1565
- ), a;
1566
- a.push(
1567
- Me({
1568
- ...n,
1569
- dateObj: r
1570
- })
1571
- );
1572
- for (let o = 1; o < e; o++) {
1573
- const u = r.add({ months: o });
1574
- a.push(
1575
- Me({
1576
- ...n,
1577
- dateObj: u
1578
- })
1579
- );
1580
- }
1581
- return a;
1582
- }
1583
- function Br(t, e = {}) {
1584
- const r = ot(t);
1585
- function n() {
1586
- return r.value;
1587
- }
1588
- function a(i) {
1589
- r.value = i;
1590
- }
1591
- function o(i, s) {
1592
- return new E(r.value, { ...e, ...s }).format(i);
1593
- }
1594
- function u(i, s = !0) {
1595
- return Er(i) && s ? o(S(i), {
1596
- dateStyle: "long",
1597
- timeStyle: "long"
1598
- }) : o(S(i), {
1599
- dateStyle: "long"
1600
- });
1601
- }
1602
- function l(i, s = {}) {
1603
- return new E(r.value, { ...e, month: "long", year: "numeric", ...s }).format(i);
1604
- }
1605
- function c(i, s = {}) {
1606
- return new E(r.value, { ...e, month: "long", ...s }).format(i);
1607
- }
1608
- function h() {
1609
- const i = it(se());
1610
- return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((d) => ({ label: c(S(i.set({ month: d }))), value: d }));
1611
- }
1612
- function D(i, s = {}) {
1613
- return new E(r.value, { ...e, year: "numeric", ...s }).format(i);
1614
- }
1615
- function m(i, s) {
1616
- return Pe(i) ? new E(r.value, {
1617
- ...e,
1618
- ...s,
1619
- timeZone: i.timeZone
1620
- }).formatToParts(S(i)) : new E(r.value, { ...e, ...s }).formatToParts(S(i));
1621
- }
1622
- function v(i, s = "narrow") {
1623
- return new E(r.value, { ...e, weekday: s }).format(i);
1624
- }
1625
- function g(i) {
1626
- var b;
1627
- return ((b = new E(r.value, {
1628
- ...e,
1629
- hour: "numeric",
1630
- minute: "numeric"
1631
- }).formatToParts(i).find(($) => $.type === "dayPeriod")) == null ? void 0 : b.value) === "PM" ? "PM" : "AM";
1632
- }
1633
- const M = {
1634
- year: "numeric",
1635
- month: "numeric",
1636
- day: "numeric",
1637
- hour: "numeric",
1638
- minute: "numeric",
1639
- second: "numeric"
1640
- };
1641
- function f(i, s, d = {}) {
1642
- const b = { ...M, ...d }, x = m(i, b).find((de) => de.type === s);
1643
- return x ? x.value : "";
1644
- }
1645
- return {
1646
- setLocale: a,
1647
- getLocale: n,
1648
- fullMonth: c,
1649
- fullYear: D,
1650
- fullMonthAndYear: l,
1651
- toParts: m,
1652
- custom: o,
1653
- part: f,
1654
- dayPeriod: g,
1655
- selectedDate: u,
1656
- dayOfWeek: v,
1657
- getMonths: h
1658
- };
1659
- }
1660
- function Zr(t) {
1661
- function e(n) {
1662
- return Array.isArray(t.date.value) ? t.date.value.some((a) => ae(a, n)) : t.date.value ? ae(t.date.value, n) : !1;
1663
- }
1664
- const r = L(
1665
- () => {
1666
- var n, a, o, u;
1667
- if (Array.isArray(t.date.value)) {
1668
- if (!t.date.value.length)
1669
- return !1;
1670
- for (const l of t.date.value)
1671
- if ((n = t.isDateDisabled) != null && n.call(t, l) || (a = t.isDateUnavailable) != null && a.call(t, l))
1672
- return !0;
1673
- } else {
1674
- if (!t.date.value)
1675
- return !1;
1676
- if ((o = t.isDateDisabled) != null && o.call(t, t.date.value) || (u = t.isDateUnavailable) != null && u.call(t, t.date.value))
1677
- return !0;
1678
- }
1679
- return !1;
1680
- }
1681
- );
1682
- return {
1683
- isDateSelected: e,
1684
- isInvalid: r
1685
- };
1686
- }
1687
- function Tr(t, e) {
1688
- const r = e(t), n = r.compare(t), a = {};
1689
- return n >= 7 && (a.day = 1), n >= K(t) && (a.month = 1), r.set({ ...a });
1690
- }
1691
- function Jr(t, e) {
1692
- const r = e(t), n = t.compare(r), a = {};
1693
- return n >= 7 && (a.day = 35), n >= K(t) && (a.month = 13), r.set({ ...a });
1694
- }
1695
- function Rr(t, e) {
1696
- return e(t);
1697
- }
1698
- function Pr(t, e) {
1699
- return e(t);
1700
- }
1701
- function Gr(t) {
1702
- const e = Br(t.locale.value), r = L(() => {
1703
- const f = {
1704
- calendar: t.placeholder.value.calendar.identifier
1705
- };
1706
- return t.placeholder.value.calendar.identifier === "gregory" && t.placeholder.value.era === "BC" && (f.era = "short"), f;
1707
- }), n = ot(T({
1708
- dateObj: t.placeholder.value,
1709
- weekStartsOn: t.weekStartsOn.value,
1710
- locale: t.locale.value,
1711
- fixedWeeks: t.fixedWeeks.value,
1712
- numberOfMonths: t.numberOfMonths.value
1713
- })), a = L(() => n.value.map((f) => f.value));
1714
- function o(f) {
1715
- return !a.value.some((i) => Le(f, i));
1716
- }
1717
- const u = (f) => {
1718
- if (!t.maxValue.value || !n.value.length)
1719
- return !1;
1720
- if (t.disabled.value)
1721
- return !0;
1722
- const i = n.value[n.value.length - 1].value;
1723
- if (!f && !t.nextPage.value) {
1724
- const d = i.add({ months: 1 }).set({ day: 1 });
1725
- return ne(d, t.maxValue.value);
1726
- }
1727
- const s = Tr(i, f || t.nextPage.value);
1728
- return ne(s, t.maxValue.value);
1729
- }, l = (f) => {
1730
- if (!t.minValue.value || !n.value.length)
1731
- return !1;
1732
- if (t.disabled.value)
1733
- return !0;
1734
- const i = n.value[0].value;
1735
- if (!f && !t.prevPage.value) {
1736
- const d = i.subtract({ months: 1 }).set({ day: 35 });
1737
- return re(d, t.minValue.value);
1738
- }
1739
- const s = Jr(i, f || t.prevPage.value);
1740
- return re(s, t.minValue.value);
1741
- };
1742
- function c(f) {
1743
- var i;
1744
- return !!((i = t.isDateDisabled) != null && i.call(t, f) || t.disabled.value || t.maxValue.value && ne(f, t.maxValue.value) || t.minValue.value && re(f, t.minValue.value));
1745
- }
1746
- const h = (f) => {
1747
- var i;
1748
- return !!((i = t.isDateUnavailable) != null && i.call(t, f));
1749
- }, D = L(() => n.value.length ? n.value[0].rows[0].map((f) => e.dayOfWeek(S(f), t.weekdayFormat.value)) : []), m = (f) => {
1750
- const i = n.value[0].value;
1751
- if (!f && !t.nextPage.value) {
1752
- const $ = i.add({ months: t.pagedNavigation.value ? t.numberOfMonths.value : 1 }), x = T({
1753
- dateObj: $,
1754
- weekStartsOn: t.weekStartsOn.value,
1755
- locale: t.locale.value,
1756
- fixedWeeks: t.fixedWeeks.value,
1757
- numberOfMonths: t.numberOfMonths.value
1758
- });
1759
- n.value = x, t.placeholder.value = x[0].value.set({ day: 1 });
1760
- return;
1761
- }
1762
- const s = Rr(i, f || t.nextPage.value), d = T({
1763
- dateObj: s,
1764
- weekStartsOn: t.weekStartsOn.value,
1765
- locale: t.locale.value,
1766
- fixedWeeks: t.fixedWeeks.value,
1767
- numberOfMonths: t.numberOfMonths.value
1768
- });
1769
- n.value = d;
1770
- const b = {};
1771
- if (!f) {
1772
- const $ = d[0].value.compare(i);
1773
- $ >= K(i) && (b.day = 1), $ >= 365 && (b.month = 1);
1774
- }
1775
- t.placeholder.value = d[0].value.set({ ...b });
1776
- }, v = (f) => {
1777
- const i = n.value[0].value;
1778
- if (!f && !t.prevPage.value) {
1779
- const $ = i.subtract({ months: t.pagedNavigation.value ? t.numberOfMonths.value : 1 }), x = T({
1780
- dateObj: $,
1781
- weekStartsOn: t.weekStartsOn.value,
1782
- locale: t.locale.value,
1783
- fixedWeeks: t.fixedWeeks.value,
1784
- numberOfMonths: t.numberOfMonths.value
1785
- });
1786
- n.value = x, t.placeholder.value = x[0].value.set({ day: 1 });
1787
- return;
1788
- }
1789
- const s = Pr(i, f || t.prevPage.value), d = T({
1790
- dateObj: s,
1791
- weekStartsOn: t.weekStartsOn.value,
1792
- locale: t.locale.value,
1793
- fixedWeeks: t.fixedWeeks.value,
1794
- numberOfMonths: t.numberOfMonths.value
1795
- });
1796
- n.value = d;
1797
- const b = {};
1798
- if (!f) {
1799
- const $ = i.compare(d[0].value);
1800
- $ >= K(i) && (b.day = 1), $ >= 365 && (b.month = 1);
1801
- }
1802
- t.placeholder.value = d[0].value.set({ ...b });
1803
- };
1804
- Ue(t.placeholder, (f) => {
1805
- a.value.some((i) => Le(i, f)) || (n.value = T({
1806
- dateObj: f,
1807
- weekStartsOn: t.weekStartsOn.value,
1808
- locale: t.locale.value,
1809
- fixedWeeks: t.fixedWeeks.value,
1810
- numberOfMonths: t.numberOfMonths.value
1811
- }));
1812
- }), Ue([t.locale, t.weekStartsOn, t.fixedWeeks, t.numberOfMonths], () => {
1813
- n.value = T({
1814
- dateObj: t.placeholder.value,
1815
- weekStartsOn: t.weekStartsOn.value,
1816
- locale: t.locale.value,
1817
- fixedWeeks: t.fixedWeeks.value,
1818
- numberOfMonths: t.numberOfMonths.value
1819
- });
1820
- });
1821
- const g = L(() => {
1822
- if (!n.value.length)
1823
- return "";
1824
- if (t.locale.value !== e.getLocale() && e.setLocale(t.locale.value), n.value.length === 1) {
1825
- const de = n.value[0].value;
1826
- return `${e.fullMonthAndYear(S(de), r.value)}`;
1827
- }
1828
- const f = S(n.value[0].value), i = S(n.value[n.value.length - 1].value), s = e.fullMonth(f, r.value), d = e.fullMonth(i, r.value), b = e.fullYear(f, r.value), $ = e.fullYear(i, r.value);
1829
- return b === $ ? `${s} - ${d} ${$}` : `${s} ${b} - ${d} ${$}`;
1830
- }), M = L(() => `${t.calendarLabel.value ?? "Event Date"}, ${g.value}`);
1831
- return {
1832
- isDateDisabled: c,
1833
- isDateUnavailable: h,
1834
- isNextButtonDisabled: u,
1835
- isPrevButtonDisabled: l,
1836
- grid: n,
1837
- weekdays: D,
1838
- visibleView: a,
1839
- isOutsideVisibleView: o,
1840
- formatter: e,
1841
- nextPage: m,
1842
- prevPage: v,
1843
- headingValue: g,
1844
- fullCalendarLabel: M
1845
- };
1846
- }
1847
- const Ur = "[data-reka-calendar-cell-trigger]:not([data-outside-view]):not([data-outside-visible-view])";
1848
- function Hr(t) {
1849
- return Array.from(t.querySelectorAll(Ur)) ?? [];
1850
- }
1851
- export {
1852
- E as $,
1853
- se as a,
1854
- Zr as b,
1855
- Nr as c,
1856
- ae as d,
1857
- Fr as e,
1858
- kt as f,
1859
- Qr as g,
1860
- Vr as h,
1861
- Hr as i,
1862
- K as j,
1863
- re as k,
1864
- qr as l,
1865
- Wr as m,
1866
- _r as n,
1867
- S as t,
1868
- Gr as u
1869
- };