bootstrap-vue-next 1.2.4 → 1.2.5

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 (167) hide show
  1. package/dist/{BAccordion-ByAMZCS9.js → BAccordion-BfaVicrj.js} +2 -2
  2. package/dist/{BAccordion-ByAMZCS9.js.map → BAccordion-BfaVicrj.js.map} +1 -1
  3. package/dist/{BAlert-DdfFcjWF.js → BAlert-Czy83dU3.js} +5 -5
  4. package/dist/{BAlert-DdfFcjWF.js.map → BAlert-Czy83dU3.js.map} +1 -1
  5. package/dist/BAutocomplete-Bh4Bp5AI.js +437 -0
  6. package/dist/BAutocomplete-Bh4Bp5AI.js.map +1 -0
  7. package/dist/{BAvatar-BsStQrBF.js → BAvatar-BJNeQ1fe.js} +2 -2
  8. package/dist/{BAvatar-BsStQrBF.js.map → BAvatar-BJNeQ1fe.js.map} +1 -1
  9. package/dist/{BButton-KZu5jczf.js → BButton-DlOQ5sem.js} +2 -2
  10. package/dist/{BButton-KZu5jczf.js.map → BButton-DlOQ5sem.js.map} +1 -1
  11. package/dist/{BCard-DELccMG-.js → BCard-Bc1wed-3.js} +2 -2
  12. package/dist/{BCard-DELccMG-.js.map → BCard-Bc1wed-3.js.map} +1 -1
  13. package/dist/{BCarousel-qHGRSVFe.js → BCarousel-B-WZR469.js} +3 -4
  14. package/dist/{BCarousel-qHGRSVFe.js.map → BCarousel-B-WZR469.js.map} +1 -1
  15. package/dist/{BCollapse-DtuJwN7B.js → BCollapse-DCjKiTxo.js} +2 -2
  16. package/dist/{BCollapse-DtuJwN7B.js.map → BCollapse-DCjKiTxo.js.map} +1 -1
  17. package/dist/BDateField-Oh-cU-4i.js +456 -0
  18. package/dist/BDateField-Oh-cU-4i.js.map +1 -0
  19. package/dist/BDatePicker-HNI11eCe.js +632 -0
  20. package/dist/BDatePicker-HNI11eCe.js.map +1 -0
  21. package/dist/{BDropdown-BY-E0SHv.js → BDropdown-04nGcMhm.js} +6 -7
  22. package/dist/{BDropdown-BY-E0SHv.js.map → BDropdown-04nGcMhm.js.map} +1 -1
  23. package/dist/{BFormCheckbox-BYNGQgr2.js → BFormCheckbox-zjr8OsNd.js} +2 -2
  24. package/dist/{BFormCheckbox-BYNGQgr2.js.map → BFormCheckbox-zjr8OsNd.js.map} +1 -1
  25. package/dist/{BFormFile-C2DnrbK7.js → BFormFile-D_s8tf1m.js} +2 -2
  26. package/dist/{BFormFile-C2DnrbK7.js.map → BFormFile-D_s8tf1m.js.map} +1 -1
  27. package/dist/{BFormInput-_AkAy6Wk.js → BFormInput-DnIBPLCx.js} +2 -2
  28. package/dist/{BFormInput-_AkAy6Wk.js.map → BFormInput-DnIBPLCx.js.map} +1 -1
  29. package/dist/BFormOtp-Dx2RxPAW.js +150 -0
  30. package/dist/BFormOtp-Dx2RxPAW.js.map +1 -0
  31. package/dist/{BFormRadio-DAddcnfE.js → BFormRadio-DUz60sBI.js} +2 -2
  32. package/dist/{BFormRadio-DAddcnfE.js.map → BFormRadio-DUz60sBI.js.map} +1 -1
  33. package/dist/{BFormRating-iKFgSFet.js → BFormRating-CtMmDgrF.js} +2 -2
  34. package/dist/{BFormRating-iKFgSFet.js.map → BFormRating-CtMmDgrF.js.map} +1 -1
  35. package/dist/{BFormSelect-CSS-_kul.js → BFormSelect-CeslPN3i.js} +2 -3
  36. package/dist/{BFormSelect-CSS-_kul.js.map → BFormSelect-CeslPN3i.js.map} +1 -1
  37. package/dist/{BFormSpinbutton-fkVMbQC3.js → BFormSpinbutton-BR9YTfYy.js} +2 -3
  38. package/dist/{BFormSpinbutton-fkVMbQC3.js.map → BFormSpinbutton-BR9YTfYy.js.map} +1 -1
  39. package/dist/{BFormTags-CUcyRTCK.js → BFormTags-6qQn0Vlv.js} +2 -3
  40. package/dist/{BFormTags-CUcyRTCK.js.map → BFormTags-6qQn0Vlv.js.map} +1 -1
  41. package/dist/{BFormTextarea-CBBlEcrV.js → BFormTextarea-DvLrtG08.js} +3 -3
  42. package/dist/{BFormTextarea-CBBlEcrV.js.map → BFormTextarea-DvLrtG08.js.map} +1 -1
  43. package/dist/{BImg-knz2UZQE.js → BImg-Dd8Pc1Ln.js} +2 -2
  44. package/dist/{BImg-knz2UZQE.js.map → BImg-Dd8Pc1Ln.js.map} +1 -1
  45. package/dist/{BModal-DtQlIFNn.js → BModal-DOmTYI6F.js} +5 -6
  46. package/dist/{BModal-DtQlIFNn.js.map → BModal-DOmTYI6F.js.map} +1 -1
  47. package/dist/{BNav-BMWNXoNo.js → BNav-D3XbyI1R.js} +2 -2
  48. package/dist/{BNav-BMWNXoNo.js.map → BNav-D3XbyI1R.js.map} +1 -1
  49. package/dist/{BOffcanvas-BtvIDgH7.js → BOffcanvas-DyPG7s8I.js} +5 -5
  50. package/dist/{BOffcanvas-BtvIDgH7.js.map → BOffcanvas-DyPG7s8I.js.map} +1 -1
  51. package/dist/{BPagination-C85wHRgS.js → BPagination-DGvgWeYG.js} +2 -2
  52. package/dist/{BPagination-C85wHRgS.js.map → BPagination-DGvgWeYG.js.map} +1 -1
  53. package/dist/{BPlaceholder-DI12zz0a.js → BPlaceholder-BrBmbfIg.js} +3 -3
  54. package/dist/{BPlaceholder-DI12zz0a.js.map → BPlaceholder-BrBmbfIg.js.map} +1 -1
  55. package/dist/{BProgress-BNxYppi-.js → BProgress-CXhe6hsN.js} +2 -2
  56. package/dist/{BProgress-BNxYppi-.js.map → BProgress-CXhe6hsN.js.map} +1 -1
  57. package/dist/{BTable-BZxX17YU.js → BTable-8jp3wPAI.js} +2 -2
  58. package/dist/{BTable-BZxX17YU.js.map → BTable-8jp3wPAI.js.map} +1 -1
  59. package/dist/BTimeField-vdultTwg.js +138 -0
  60. package/dist/BTimeField-vdultTwg.js.map +1 -0
  61. package/dist/{BToast-Cm7TZlZq.js → BToast-vxfpFGe3.js} +5 -5
  62. package/dist/{BToast-Cm7TZlZq.js.map → BToast-vxfpFGe3.js.map} +1 -1
  63. package/dist/{BTooltip-CAgQ77tS.js → BTooltip-CV5Ogidy.js} +2 -2
  64. package/dist/{BTooltip-CAgQ77tS.js.map → BTooltip-CV5Ogidy.js.map} +1 -1
  65. package/dist/bootstrap-vue-next.mjs +33 -33
  66. package/dist/{floatingUi-CSJCHfOw.js → floatingUi-BhgR4GBJ.js} +10 -168
  67. package/dist/floatingUi-BhgR4GBJ.js.map +1 -0
  68. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  69. package/dist/src/components/BAccordion/index.mjs +1 -1
  70. package/dist/src/components/BAlert/index.mjs +1 -1
  71. package/dist/src/components/BAutocomplete/index.mjs +1 -1
  72. package/dist/src/components/BAvatar/index.mjs +1 -1
  73. package/dist/src/components/BButton/index.mjs +1 -1
  74. package/dist/src/components/BCard/index.mjs +1 -1
  75. package/dist/src/components/BCarousel/index.mjs +1 -1
  76. package/dist/src/components/BCollapse/index.mjs +1 -1
  77. package/dist/src/components/BDateField/index.mjs +1 -1
  78. package/dist/src/components/BDatePicker/index.mjs +1 -1
  79. package/dist/src/components/BDropdown/index.mjs +1 -1
  80. package/dist/src/components/BFormCheckbox/index.mjs +1 -1
  81. package/dist/src/components/BFormFile/index.mjs +1 -1
  82. package/dist/src/components/BFormInput/index.mjs +1 -1
  83. package/dist/src/components/BFormOtp/index.mjs +1 -1
  84. package/dist/src/components/BFormRadio/index.mjs +1 -1
  85. package/dist/src/components/BFormRating/index.mjs +1 -1
  86. package/dist/src/components/BFormSelect/index.mjs +1 -1
  87. package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
  88. package/dist/src/components/BFormTags/index.mjs +1 -1
  89. package/dist/src/components/BFormTextarea/index.mjs +1 -1
  90. package/dist/src/components/BImg/index.mjs +1 -1
  91. package/dist/src/components/BModal/index.mjs +1 -1
  92. package/dist/src/components/BNav/index.mjs +1 -1
  93. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  94. package/dist/src/components/BPagination/index.mjs +1 -1
  95. package/dist/src/components/BPlaceholder/index.mjs +1 -1
  96. package/dist/src/components/BPopover/index.mjs +1 -1
  97. package/dist/src/components/BProgress/index.mjs +1 -1
  98. package/dist/src/components/BTable/index.mjs +1 -1
  99. package/dist/src/components/BTimeField/index.mjs +1 -1
  100. package/dist/src/components/BToast/index.mjs +1 -1
  101. package/dist/src/components/BTooltip/index.mjs +1 -1
  102. package/dist/src/components/index.mjs +34 -34
  103. package/dist/src/composables/index.mjs +1 -1
  104. package/dist/src/composables/useColorMode/index.mjs +1 -1
  105. package/dist/src/composables/useModal/index.mjs +1 -1
  106. package/dist/src/composables/usePopover/index.mjs +2 -2
  107. package/dist/src/composables/useScrollLock/index.mjs +1 -2
  108. package/dist/src/composables/useScrollLock/index.mjs.map +1 -1
  109. package/dist/src/composables/useScrollspy/index.mjs +1 -2
  110. package/dist/src/composables/useScrollspy/index.mjs.map +1 -1
  111. package/dist/src/composables/useToast/index.mjs +1 -1
  112. package/dist/src/directives/BPopover/index.mjs +2 -2
  113. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  114. package/dist/src/directives/BToggle/index.mjs +1 -1
  115. package/dist/src/directives/BTooltip/index.mjs +2 -2
  116. package/dist/src/directives/index.mjs +1 -1
  117. package/dist/src/plugins/index.mjs +1 -1
  118. package/dist/src/resolvers/index.mjs +1 -1
  119. package/dist/src/types/index.mjs +1 -1
  120. package/dist/src/utils/index.mjs +1 -1
  121. package/dist/{useCountdownHover-BN8vJIQW.js → useCountdownHover-HZSJZkHq.js} +2 -2
  122. package/dist/{useCountdownHover-BN8vJIQW.js.map → useCountdownHover-HZSJZkHq.js.map} +1 -1
  123. package/dist/{useFormInput-C-iXRxog.js → useFormInput-CMtXFoM2.js} +2 -3
  124. package/dist/{useFormInput-C-iXRxog.js.map → useFormInput-CMtXFoM2.js.map} +1 -1
  125. package/dist/useSafeScrollLock-BT4KKhxB.js +89 -0
  126. package/dist/useSafeScrollLock-BT4KKhxB.js.map +1 -0
  127. package/dist/{useShowHide-Dpld86ys.js → useShowHide-BLIZLD9E.js} +2 -3
  128. package/dist/{useShowHide-Dpld86ys.js.map → useShowHide-BLIZLD9E.js.map} +1 -1
  129. package/dist/{utils-DYdkCKBf.js → utils-CvjliJBf.js} +2 -2
  130. package/dist/{utils-DYdkCKBf.js.map → utils-CvjliJBf.js.map} +1 -1
  131. package/package.json +3 -23
  132. package/dist/BAutocomplete-BFbbKtpz.js +0 -2490
  133. package/dist/BAutocomplete-BFbbKtpz.js.map +0 -1
  134. package/dist/BDateField-Bj-Jz7u4.js +0 -906
  135. package/dist/BDateField-Bj-Jz7u4.js.map +0 -1
  136. package/dist/BDatePicker-AVTYcVLy.js +0 -5210
  137. package/dist/BDatePicker-AVTYcVLy.js.map +0 -1
  138. package/dist/BFormOtp-ClDACqXM.js +0 -577
  139. package/dist/BFormOtp-ClDACqXM.js.map +0 -1
  140. package/dist/BTimeField-CbRGjaI6.js +0 -516
  141. package/dist/BTimeField-CbRGjaI6.js.map +0 -1
  142. package/dist/DateRangeFieldInput-Cbzjg8iF.js +0 -761
  143. package/dist/DateRangeFieldInput-Cbzjg8iF.js.map +0 -1
  144. package/dist/PopperContent-C9eeL6LH.js +0 -1726
  145. package/dist/PopperContent-C9eeL6LH.js.map +0 -1
  146. package/dist/VisuallyHidden-BYzyjJiY.js +0 -182
  147. package/dist/VisuallyHidden-BYzyjJiY.js.map +0 -1
  148. package/dist/VisuallyHiddenInput-CUrc8XXa.js +0 -180
  149. package/dist/VisuallyHiddenInput-CUrc8XXa.js.map +0 -1
  150. package/dist/dist-9-XTMhb-.js +0 -1302
  151. package/dist/dist-9-XTMhb-.js.map +0 -1
  152. package/dist/dist-B-regXAP.js +0 -123
  153. package/dist/dist-B-regXAP.js.map +0 -1
  154. package/dist/dist-DKc2ivHS.js +0 -411
  155. package/dist/dist-DKc2ivHS.js.map +0 -1
  156. package/dist/floating-ui.dom-C7UZexJK.js +0 -1484
  157. package/dist/floating-ui.dom-C7UZexJK.js.map +0 -1
  158. package/dist/floatingUi-CSJCHfOw.js.map +0 -1
  159. package/dist/rolldown-runtime-BBjsoOtd.js +0 -27
  160. package/dist/useDateField-CQZb799C.js +0 -3679
  161. package/dist/useDateField-CQZb799C.js.map +0 -1
  162. package/dist/useForwardExpose-DDvk7mir.js +0 -60
  163. package/dist/useForwardExpose-DDvk7mir.js.map +0 -1
  164. package/dist/useKbd-DRsaFU_f.js +0 -76
  165. package/dist/useKbd-DRsaFU_f.js.map +0 -1
  166. package/dist/useSafeScrollLock-PVgSASYu.js +0 -1326
  167. package/dist/useSafeScrollLock-PVgSASYu.js.map +0 -1
@@ -1,3679 +0,0 @@
1
- import { c as getActiveElement, o as injectConfigProviderContext } from "./VisuallyHidden-BYzyjJiY.js";
2
- import { n as defu, t as useKbd } from "./useKbd-DRsaFU_f.js";
3
- import { computed, ref } from "vue";
4
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/clamp.js
5
- /**
6
- * The function `roundToStepPrecision` rounds a number to a specified precision step.
7
- * @param {number} value - The `value` parameter is the number that you want to round to a specific
8
- * precision based on the `step` parameter.
9
- * @param {number} step - The `step` parameter in the `roundToStepPrecision` function represents the
10
- * interval at which you want to round the `value`. For example, if `step` is 0.5, the `value` will be
11
- * rounded to the nearest half.
12
- * @returns the `roundedValue` after rounding it to the precision specified by the `step`.
13
- */
14
- function roundToStepPrecision(value, step) {
15
- let roundedValue = value;
16
- const stepString = step.toString();
17
- const pointIndex = stepString.indexOf(".");
18
- const precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
19
- if (precision > 0) {
20
- const pow = 10 ** precision;
21
- roundedValue = Math.round(roundedValue * pow) / pow;
22
- }
23
- return roundedValue;
24
- }
25
- /**
26
- * The function `snapValueToStep` snaps a given value to the nearest step within a specified range.
27
- * @param {number} value - The `value` parameter represents the number that you want to snap to the
28
- * nearest step value.
29
- * @param {number | undefined} min - The `min` parameter represents the minimum value that the `value`
30
- * should be snapped to. If `value` is less than `min`, it will be snapped to `min`. If `min` is not
31
- * provided (undefined), then the snapping will not consider a minimum value.
32
- * @param {number | undefined} max - The `max` parameter represents the maximum value that the `value`
33
- * should be snapped to. It ensures that the snapped value does not exceed this maximum value.
34
- * @param {number} step - The `step` parameter in the `snapValueToStep` function represents the
35
- * interval at which the `value` should be snapped to. It determines the granularity of the snapping
36
- * operation. For example, if `step` is 5, the `value` will be snapped to the nearest multiple of
37
- * @returns a number that has been snapped to the nearest step value within the specified range of minimum and maximum values.
38
- */
39
- function snapValueToStep(value, min, max, step) {
40
- min = Number(min);
41
- max = Number(max);
42
- const remainder = (value - (Number.isNaN(min) ? 0 : min)) % step;
43
- let snappedValue = roundToStepPrecision(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
44
- if (!Number.isNaN(min)) {
45
- if (snappedValue < min) snappedValue = min;
46
- else if (!Number.isNaN(max) && snappedValue > max) snappedValue = min + Math.floor(roundToStepPrecision((max - min) / step, step)) * step;
47
- } else if (!Number.isNaN(max) && snappedValue > max) snappedValue = Math.floor(roundToStepPrecision(max / step, step)) * step;
48
- snappedValue = roundToStepPrecision(snappedValue, step);
49
- return snappedValue;
50
- }
51
- //#endregion
52
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/utils.mjs
53
- function $09ec6a572d60460f$export$842a2cf37af977e1(amount, numerator) {
54
- return amount - numerator * Math.floor(amount / numerator);
55
- }
56
- //#endregion
57
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.mjs
58
- var $93635573935797de$var$EPOCH = 1721426;
59
- function $93635573935797de$export$f297eb839006d339(era, year, month, day) {
60
- year = $93635573935797de$export$c36e0ecb2d4fa69d(era, year);
61
- let y1 = year - 1;
62
- let monthOffset = -2;
63
- if (month <= 2) monthOffset = 0;
64
- else if ($93635573935797de$export$553d7fa8e3805fc0(year)) monthOffset = -1;
65
- return 1721425 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
66
- }
67
- function $93635573935797de$export$553d7fa8e3805fc0(year) {
68
- return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
69
- }
70
- function $93635573935797de$export$c36e0ecb2d4fa69d(era, year) {
71
- return era === "BC" ? 1 - year : year;
72
- }
73
- function $93635573935797de$export$4475b7e617eb123c(year) {
74
- let era = "AD";
75
- if (year <= 0) {
76
- era = "BC";
77
- year = 1 - year;
78
- }
79
- return [era, year];
80
- }
81
- var $93635573935797de$var$daysInMonth = {
82
- standard: [
83
- 31,
84
- 28,
85
- 31,
86
- 30,
87
- 31,
88
- 30,
89
- 31,
90
- 31,
91
- 30,
92
- 31,
93
- 30,
94
- 31
95
- ],
96
- leapyear: [
97
- 31,
98
- 29,
99
- 31,
100
- 30,
101
- 31,
102
- 30,
103
- 31,
104
- 31,
105
- 30,
106
- 31,
107
- 30,
108
- 31
109
- ]
110
- };
111
- var $93635573935797de$export$80ee6245ec4f29ec = class {
112
- fromJulianDay(jd) {
113
- let jd0 = jd;
114
- let depoch = jd0 - $93635573935797de$var$EPOCH;
115
- let quadricent = Math.floor(depoch / 146097);
116
- let dqc = $09ec6a572d60460f$export$842a2cf37af977e1(depoch, 146097);
117
- let cent = Math.floor(dqc / 36524);
118
- let dcent = $09ec6a572d60460f$export$842a2cf37af977e1(dqc, 36524);
119
- let quad = Math.floor(dcent / 1461);
120
- let dquad = $09ec6a572d60460f$export$842a2cf37af977e1(dcent, 1461);
121
- let yindex = Math.floor(dquad / 365);
122
- let [era, year] = $93635573935797de$export$4475b7e617eb123c(quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0));
123
- let yearDay = jd0 - $93635573935797de$export$f297eb839006d339(era, year, 1, 1);
124
- let leapAdj = 2;
125
- if (jd0 < $93635573935797de$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;
126
- else if ($93635573935797de$export$553d7fa8e3805fc0(year)) leapAdj = 1;
127
- let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
128
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, month, jd0 - $93635573935797de$export$f297eb839006d339(era, year, month, 1) + 1);
129
- }
130
- toJulianDay(date) {
131
- return $93635573935797de$export$f297eb839006d339(date.era, date.year, date.month, date.day);
132
- }
133
- getDaysInMonth(date) {
134
- return $93635573935797de$var$daysInMonth[$93635573935797de$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1];
135
- }
136
- getMonthsInYear(date) {
137
- return 12;
138
- }
139
- getDaysInYear(date) {
140
- return $93635573935797de$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
141
- }
142
- getMaximumMonthsInYear() {
143
- return 12;
144
- }
145
- getMaximumDaysInMonth() {
146
- return 31;
147
- }
148
- getYearsInEra(date) {
149
- return 9999;
150
- }
151
- getEras() {
152
- return ["BC", "AD"];
153
- }
154
- isInverseEra(date) {
155
- return date.era === "BC";
156
- }
157
- balanceDate(date) {
158
- if (date.year <= 0) {
159
- date.era = date.era === "BC" ? "AD" : "BC";
160
- date.year = 1 - date.year;
161
- }
162
- }
163
- constructor() {
164
- this.identifier = "gregory";
165
- }
166
- };
167
- //#endregion
168
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/weekStartData.mjs
169
- var $d2ca8165c9aa885a$export$7a5acbd77d414bd9 = {
170
- "001": 1,
171
- AD: 1,
172
- AE: 6,
173
- AF: 6,
174
- AI: 1,
175
- AL: 1,
176
- AM: 1,
177
- AN: 1,
178
- AR: 1,
179
- AT: 1,
180
- AU: 1,
181
- AX: 1,
182
- AZ: 1,
183
- BA: 1,
184
- BE: 1,
185
- BG: 1,
186
- BH: 6,
187
- BM: 1,
188
- BN: 1,
189
- BY: 1,
190
- CH: 1,
191
- CL: 1,
192
- CM: 1,
193
- CN: 1,
194
- CR: 1,
195
- CY: 1,
196
- CZ: 1,
197
- DE: 1,
198
- DJ: 6,
199
- DK: 1,
200
- DZ: 6,
201
- EC: 1,
202
- EE: 1,
203
- EG: 6,
204
- ES: 1,
205
- FI: 1,
206
- FJ: 1,
207
- FO: 1,
208
- FR: 1,
209
- GB: 1,
210
- GE: 1,
211
- GF: 1,
212
- GP: 1,
213
- GR: 1,
214
- HR: 1,
215
- HU: 1,
216
- IE: 1,
217
- IQ: 6,
218
- IR: 6,
219
- IS: 1,
220
- IT: 1,
221
- JO: 6,
222
- KG: 1,
223
- KW: 6,
224
- KZ: 1,
225
- LB: 1,
226
- LI: 1,
227
- LK: 1,
228
- LT: 1,
229
- LU: 1,
230
- LV: 1,
231
- LY: 6,
232
- MC: 1,
233
- MD: 1,
234
- ME: 1,
235
- MK: 1,
236
- MN: 1,
237
- MQ: 1,
238
- MV: 5,
239
- MY: 1,
240
- NL: 1,
241
- NO: 1,
242
- NZ: 1,
243
- OM: 6,
244
- PL: 1,
245
- QA: 6,
246
- RE: 1,
247
- RO: 1,
248
- RS: 1,
249
- RU: 1,
250
- SD: 6,
251
- SE: 1,
252
- SI: 1,
253
- SK: 1,
254
- SM: 1,
255
- SY: 6,
256
- TJ: 1,
257
- TM: 1,
258
- TR: 1,
259
- UA: 1,
260
- UY: 1,
261
- UZ: 1,
262
- VA: 1,
263
- VN: 1,
264
- XK: 1
265
- };
266
- //#endregion
267
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/queries.mjs
268
- function $ad063034c8620db8$export$ea39ec197993aef0(a, b) {
269
- b = $d07e34cce18680fd$export$b4a036af3fc0b032(b, a.calendar);
270
- return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
271
- }
272
- function $ad063034c8620db8$export$a18c89cbd24170ff(a, b) {
273
- b = $d07e34cce18680fd$export$b4a036af3fc0b032(b, a.calendar);
274
- a = $ad063034c8620db8$export$a5a3b454ada2268e(a);
275
- b = $ad063034c8620db8$export$a5a3b454ada2268e(b);
276
- return a.era === b.era && a.year === b.year && a.month === b.month;
277
- }
278
- function $ad063034c8620db8$export$91b62ebf2ba703ee(a, b) {
279
- return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$ea39ec197993aef0(a, b);
280
- }
281
- function $ad063034c8620db8$export$5a8da0c44a3afdf2(a, b) {
282
- return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$a18c89cbd24170ff(a, b);
283
- }
284
- function $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {
285
- return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;
286
- }
287
- function $ad063034c8620db8$export$629b0a497aa65267(date, timeZone) {
288
- return $ad063034c8620db8$export$ea39ec197993aef0(date, $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone));
289
- }
290
- var $ad063034c8620db8$var$DAY_MAP = {
291
- sun: 0,
292
- mon: 1,
293
- tue: 2,
294
- wed: 3,
295
- thu: 4,
296
- fri: 5,
297
- sat: 6
298
- };
299
- function $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek) {
300
- let julian = date.calendar.toJulianDay(date);
301
- let weekStart = firstDayOfWeek ? $ad063034c8620db8$var$DAY_MAP[firstDayOfWeek] : $ad063034c8620db8$var$getWeekStart(locale);
302
- let dayOfWeek = Math.ceil(julian + 1 - weekStart) % 7;
303
- if (dayOfWeek < 0) dayOfWeek += 7;
304
- return dayOfWeek;
305
- }
306
- function $ad063034c8620db8$export$461939dd4422153(timeZone) {
307
- return $d07e34cce18680fd$export$1b96692a1ba042ac(Date.now(), timeZone);
308
- }
309
- function $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {
310
- return $d07e34cce18680fd$export$93522d1a439f3617($ad063034c8620db8$export$461939dd4422153(timeZone));
311
- }
312
- function $ad063034c8620db8$export$68781ddf31c0090f(a, b) {
313
- return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
314
- }
315
- function $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {
316
- return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);
317
- }
318
- function $ad063034c8620db8$var$timeToMs(a) {
319
- return a.hour * 36e5 + a.minute * 6e4 + a.second * 1e3 + a.millisecond;
320
- }
321
- var $ad063034c8620db8$var$localTimeZone = null;
322
- var $ad063034c8620db8$var$localTimeZoneOverride = false;
323
- function $ad063034c8620db8$export$aa8b41735afcabd2() {
324
- if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
325
- return $ad063034c8620db8$var$localTimeZone;
326
- }
327
- function $ad063034c8620db8$export$6ab69b273755230b() {
328
- return $ad063034c8620db8$var$localTimeZoneOverride;
329
- }
330
- function $ad063034c8620db8$export$a5a3b454ada2268e(date) {
331
- return date.subtract({ days: date.day - 1 });
332
- }
333
- function $ad063034c8620db8$export$a2258d9c4118825c(date) {
334
- return date.add({ days: date.calendar.getDaysInMonth(date) - date.day });
335
- }
336
- var $ad063034c8620db8$var$cachedRegions = /* @__PURE__ */ new Map();
337
- var $ad063034c8620db8$var$cachedWeekInfo = /* @__PURE__ */ new Map();
338
- function $ad063034c8620db8$var$getRegion(locale) {
339
- if (Intl.Locale) {
340
- let region = $ad063034c8620db8$var$cachedRegions.get(locale);
341
- if (!region) {
342
- region = new Intl.Locale(locale).maximize().region;
343
- if (region) $ad063034c8620db8$var$cachedRegions.set(locale, region);
344
- }
345
- return region;
346
- }
347
- let part = locale.split("-")[1];
348
- return part === "u" ? void 0 : part;
349
- }
350
- function $ad063034c8620db8$var$getWeekStart(locale) {
351
- let weekInfo = $ad063034c8620db8$var$cachedWeekInfo.get(locale);
352
- if (!weekInfo) {
353
- if (Intl.Locale) {
354
- let localeInst = new Intl.Locale(locale);
355
- if ("getWeekInfo" in localeInst) {
356
- weekInfo = localeInst.getWeekInfo();
357
- if (weekInfo) {
358
- $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);
359
- return weekInfo.firstDay;
360
- }
361
- }
362
- }
363
- let region = $ad063034c8620db8$var$getRegion(locale);
364
- if (locale.includes("-fw-")) {
365
- let day = locale.split("-fw-")[1].split("-")[0];
366
- if (day === "mon") weekInfo = { firstDay: 1 };
367
- else if (day === "tue") weekInfo = { firstDay: 2 };
368
- else if (day === "wed") weekInfo = { firstDay: 3 };
369
- else if (day === "thu") weekInfo = { firstDay: 4 };
370
- else if (day === "fri") weekInfo = { firstDay: 5 };
371
- else if (day === "sat") weekInfo = { firstDay: 6 };
372
- else weekInfo = { firstDay: 0 };
373
- } else if (locale.includes("-ca-iso8601")) weekInfo = { firstDay: 1 };
374
- else weekInfo = { firstDay: region ? $d2ca8165c9aa885a$export$7a5acbd77d414bd9[region] || 0 : 0 };
375
- $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);
376
- }
377
- return weekInfo.firstDay;
378
- }
379
- //#endregion
380
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.mjs
381
- function $d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) {
382
- date = $d07e34cce18680fd$export$b4a036af3fc0b032(date, new $93635573935797de$export$80ee6245ec4f29ec());
383
- return $d07e34cce18680fd$var$epochFromParts($93635573935797de$export$c36e0ecb2d4fa69d(date.era, date.year), date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
384
- }
385
- function $d07e34cce18680fd$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
386
- let date = /* @__PURE__ */ new Date();
387
- date.setUTCHours(hour, minute, second, millisecond);
388
- date.setUTCFullYear(year, month - 1, day);
389
- return date.getTime();
390
- }
391
- function $d07e34cce18680fd$export$59c99f3515d3493f(ms, timeZone) {
392
- if (timeZone === "UTC") return 0;
393
- if (ms > 0 && timeZone === $ad063034c8620db8$export$aa8b41735afcabd2() && !$ad063034c8620db8$export$6ab69b273755230b()) return new Date(ms).getTimezoneOffset() * -6e4;
394
- let { year, month, day, hour, minute, second } = $d07e34cce18680fd$var$getTimeZoneParts(ms, timeZone);
395
- return $d07e34cce18680fd$var$epochFromParts(year, month, day, hour, minute, second, 0) - Math.floor(ms / 1e3) * 1e3;
396
- }
397
- var $d07e34cce18680fd$var$formattersByTimeZone = /* @__PURE__ */ new Map();
398
- function $d07e34cce18680fd$var$getTimeZoneParts(ms, timeZone) {
399
- let formatter = $d07e34cce18680fd$var$formattersByTimeZone.get(timeZone);
400
- if (!formatter) {
401
- formatter = new Intl.DateTimeFormat("en-US", {
402
- timeZone,
403
- hour12: false,
404
- era: "short",
405
- year: "numeric",
406
- month: "numeric",
407
- day: "numeric",
408
- hour: "numeric",
409
- minute: "numeric",
410
- second: "numeric"
411
- });
412
- $d07e34cce18680fd$var$formattersByTimeZone.set(timeZone, formatter);
413
- }
414
- let parts = formatter.formatToParts(new Date(ms));
415
- let namedParts = {};
416
- for (let part of parts) if (part.type !== "literal") namedParts[part.type] = part.value;
417
- return {
418
- year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year,
419
- month: +namedParts.month,
420
- day: +namedParts.day,
421
- hour: namedParts.hour === "24" ? 0 : +namedParts.hour,
422
- minute: +namedParts.minute,
423
- second: +namedParts.second
424
- };
425
- }
426
- var $d07e34cce18680fd$var$DAYMILLIS = 864e5;
427
- function $d07e34cce18680fd$var$getValidWallTimes(date, timeZone, earlier, later) {
428
- return (earlier === later ? [earlier] : [earlier, later]).filter((absolute) => $d07e34cce18680fd$var$isValidWallTime(date, timeZone, absolute));
429
- }
430
- function $d07e34cce18680fd$var$isValidWallTime(date, timeZone, absolute) {
431
- let parts = $d07e34cce18680fd$var$getTimeZoneParts(absolute, timeZone);
432
- return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
433
- }
434
- function $d07e34cce18680fd$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
435
- let dateTime = $d07e34cce18680fd$export$b21e0b124e224484(date);
436
- if (timeZone === "UTC") return $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime);
437
- if (timeZone === $ad063034c8620db8$export$aa8b41735afcabd2() && disambiguation === "compatible" && !$ad063034c8620db8$export$6ab69b273755230b()) {
438
- dateTime = $d07e34cce18680fd$export$b4a036af3fc0b032(dateTime, new $93635573935797de$export$80ee6245ec4f29ec());
439
- let date = /* @__PURE__ */ new Date();
440
- let year = $93635573935797de$export$c36e0ecb2d4fa69d(dateTime.era, dateTime.year);
441
- date.setFullYear(year, dateTime.month - 1, dateTime.day);
442
- date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
443
- return date.getTime();
444
- }
445
- let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime);
446
- let offsetBefore = $d07e34cce18680fd$export$59c99f3515d3493f(ms - $d07e34cce18680fd$var$DAYMILLIS, timeZone);
447
- let offsetAfter = $d07e34cce18680fd$export$59c99f3515d3493f(ms + $d07e34cce18680fd$var$DAYMILLIS, timeZone);
448
- let valid = $d07e34cce18680fd$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
449
- if (valid.length === 1) return valid[0];
450
- if (valid.length > 1) switch (disambiguation) {
451
- case "compatible":
452
- case "earlier": return valid[0];
453
- case "later": return valid[valid.length - 1];
454
- case "reject": throw new RangeError("Multiple possible absolute times found");
455
- }
456
- switch (disambiguation) {
457
- case "earlier": return Math.min(ms - offsetBefore, ms - offsetAfter);
458
- case "compatible":
459
- case "later": return Math.max(ms - offsetBefore, ms - offsetAfter);
460
- case "reject": throw new RangeError("No such absolute time found");
461
- }
462
- }
463
- function $d07e34cce18680fd$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") {
464
- return new Date($d07e34cce18680fd$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
465
- }
466
- function $d07e34cce18680fd$export$1b96692a1ba042ac(ms, timeZone) {
467
- let offset = $d07e34cce18680fd$export$59c99f3515d3493f(ms, timeZone);
468
- let date = new Date(ms + offset);
469
- let year = date.getUTCFullYear();
470
- let month = date.getUTCMonth() + 1;
471
- let day = date.getUTCDate();
472
- let hour = date.getUTCHours();
473
- let minute = date.getUTCMinutes();
474
- let second = date.getUTCSeconds();
475
- let millisecond = date.getUTCMilliseconds();
476
- return new $2aaf608024c21ca1$export$d3b7288e7994edea(year < 1 ? "BC" : "AD", year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
477
- }
478
- function $d07e34cce18680fd$export$93522d1a439f3617(dateTime) {
479
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
480
- }
481
- function $d07e34cce18680fd$export$b21e0b124e224484(date, time) {
482
- let hour = 0, minute = 0, second = 0, millisecond = 0;
483
- if ("timeZone" in date) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = date);
484
- else if ("hour" in date && !time) return date;
485
- if (time) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = time);
486
- return new $2aaf608024c21ca1$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
487
- }
488
- function $d07e34cce18680fd$export$b4a036af3fc0b032(date, calendar) {
489
- if ($ad063034c8620db8$export$dbc69fd56b53d5e(date.calendar, calendar)) return date;
490
- let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
491
- let copy = date.copy();
492
- copy.calendar = calendar;
493
- copy.era = calendarDate.era;
494
- copy.year = calendarDate.year;
495
- copy.month = calendarDate.month;
496
- copy.day = calendarDate.day;
497
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(copy);
498
- return copy;
499
- }
500
- function $d07e34cce18680fd$export$84c95a83c799e074(date, timeZone, disambiguation) {
501
- if (date instanceof $2aaf608024c21ca1$export$d3b7288e7994edea) {
502
- if (date.timeZone === timeZone) return date;
503
- return $d07e34cce18680fd$export$538b00033cc11c75(date, timeZone);
504
- }
505
- return $d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c(date, timeZone, disambiguation), timeZone);
506
- }
507
- function $d07e34cce18680fd$export$83aac07b4c37b25(date) {
508
- let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) - date.offset;
509
- return new Date(ms);
510
- }
511
- function $d07e34cce18680fd$export$538b00033cc11c75(date, timeZone) {
512
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) - date.offset, timeZone), date.calendar);
513
- }
514
- //#endregion
515
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.mjs
516
- var $435a2ceaa8778ed8$var$ONE_HOUR = 36e5;
517
- function $435a2ceaa8778ed8$export$e16d8520af44a096(date, duration) {
518
- let mutableDate = date.copy();
519
- let days = "hour" in mutableDate ? $435a2ceaa8778ed8$var$addTimeFields(mutableDate, duration) : 0;
520
- $435a2ceaa8778ed8$var$addYears(mutableDate, duration.years || 0);
521
- if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
522
- mutableDate.month += duration.months || 0;
523
- $435a2ceaa8778ed8$var$balanceYearMonth(mutableDate);
524
- $435a2ceaa8778ed8$var$constrainMonthDay(mutableDate);
525
- mutableDate.day += (duration.weeks || 0) * 7;
526
- mutableDate.day += duration.days || 0;
527
- mutableDate.day += days;
528
- $435a2ceaa8778ed8$var$balanceDay(mutableDate);
529
- if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
530
- if (mutableDate.year < 1) {
531
- mutableDate.year = 1;
532
- mutableDate.month = 1;
533
- mutableDate.day = 1;
534
- }
535
- let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
536
- if (mutableDate.year > maxYear) {
537
- let isInverseEra = mutableDate.calendar.isInverseEra?.(mutableDate);
538
- mutableDate.year = maxYear;
539
- mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
540
- mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
541
- }
542
- if (mutableDate.month < 1) {
543
- mutableDate.month = 1;
544
- mutableDate.day = 1;
545
- }
546
- let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
547
- if (mutableDate.month > maxMonth) {
548
- mutableDate.month = maxMonth;
549
- mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
550
- }
551
- mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
552
- return mutableDate;
553
- }
554
- function $435a2ceaa8778ed8$var$addYears(date, years) {
555
- if (date.calendar.isInverseEra?.(date)) years = -years;
556
- date.year += years;
557
- }
558
- function $435a2ceaa8778ed8$var$balanceYearMonth(date) {
559
- while (date.month < 1) {
560
- $435a2ceaa8778ed8$var$addYears(date, -1);
561
- date.month += date.calendar.getMonthsInYear(date);
562
- }
563
- let monthsInYear = 0;
564
- while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {
565
- date.month -= monthsInYear;
566
- $435a2ceaa8778ed8$var$addYears(date, 1);
567
- }
568
- }
569
- function $435a2ceaa8778ed8$var$balanceDay(date) {
570
- while (date.day < 1) {
571
- date.month--;
572
- $435a2ceaa8778ed8$var$balanceYearMonth(date);
573
- date.day += date.calendar.getDaysInMonth(date);
574
- }
575
- while (date.day > date.calendar.getDaysInMonth(date)) {
576
- date.day -= date.calendar.getDaysInMonth(date);
577
- date.month++;
578
- $435a2ceaa8778ed8$var$balanceYearMonth(date);
579
- }
580
- }
581
- function $435a2ceaa8778ed8$var$constrainMonthDay(date) {
582
- date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
583
- date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
584
- }
585
- function $435a2ceaa8778ed8$export$c4e2ecac49351ef2(date) {
586
- if (date.calendar.constrainDate) date.calendar.constrainDate(date);
587
- date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
588
- $435a2ceaa8778ed8$var$constrainMonthDay(date);
589
- }
590
- function $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration) {
591
- let inverseDuration = {};
592
- for (let key in duration) if (typeof duration[key] === "number") inverseDuration[key] = -duration[key];
593
- return inverseDuration;
594
- }
595
- function $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(date, duration) {
596
- return $435a2ceaa8778ed8$export$e16d8520af44a096(date, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
597
- }
598
- function $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(date, fields) {
599
- let mutableDate = date.copy();
600
- if (fields.era != null) mutableDate.era = fields.era;
601
- if (fields.year != null) mutableDate.year = fields.year;
602
- if (fields.month != null) mutableDate.month = fields.month;
603
- if (fields.day != null) mutableDate.day = fields.day;
604
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutableDate);
605
- return mutableDate;
606
- }
607
- function $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(value, fields) {
608
- let mutableValue = value.copy();
609
- if (fields.hour != null) mutableValue.hour = fields.hour;
610
- if (fields.minute != null) mutableValue.minute = fields.minute;
611
- if (fields.second != null) mutableValue.second = fields.second;
612
- if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
613
- $435a2ceaa8778ed8$export$7555de1e070510cb(mutableValue);
614
- return mutableValue;
615
- }
616
- function $435a2ceaa8778ed8$var$balanceTime(time) {
617
- time.second += Math.floor(time.millisecond / 1e3);
618
- time.millisecond = $435a2ceaa8778ed8$var$nonNegativeMod(time.millisecond, 1e3);
619
- time.minute += Math.floor(time.second / 60);
620
- time.second = $435a2ceaa8778ed8$var$nonNegativeMod(time.second, 60);
621
- time.hour += Math.floor(time.minute / 60);
622
- time.minute = $435a2ceaa8778ed8$var$nonNegativeMod(time.minute, 60);
623
- let days = Math.floor(time.hour / 24);
624
- time.hour = $435a2ceaa8778ed8$var$nonNegativeMod(time.hour, 24);
625
- return days;
626
- }
627
- function $435a2ceaa8778ed8$export$7555de1e070510cb(time) {
628
- time.millisecond = Math.max(0, Math.min(time.millisecond, 999));
629
- time.second = Math.max(0, Math.min(time.second, 59));
630
- time.minute = Math.max(0, Math.min(time.minute, 59));
631
- time.hour = Math.max(0, Math.min(time.hour, 23));
632
- }
633
- function $435a2ceaa8778ed8$var$nonNegativeMod(a, b) {
634
- let result = a % b;
635
- if (result < 0) result += b;
636
- return result;
637
- }
638
- function $435a2ceaa8778ed8$var$addTimeFields(time, duration) {
639
- time.hour += duration.hours || 0;
640
- time.minute += duration.minutes || 0;
641
- time.second += duration.seconds || 0;
642
- time.millisecond += duration.milliseconds || 0;
643
- return $435a2ceaa8778ed8$var$balanceTime(time);
644
- }
645
- function $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, duration) {
646
- let res = time.copy();
647
- $435a2ceaa8778ed8$var$addTimeFields(res, duration);
648
- return res;
649
- }
650
- function $435a2ceaa8778ed8$export$fe34d3a381cd7501(time, duration) {
651
- return $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
652
- }
653
- function $435a2ceaa8778ed8$export$d52ced6badfb9a4c(value, field, amount, options) {
654
- let mutable = value.copy();
655
- switch (field) {
656
- case "era": {
657
- let eras = value.calendar.getEras();
658
- let eraIndex = eras.indexOf(value.era);
659
- if (eraIndex < 0) throw new Error("Invalid era: " + value.era);
660
- eraIndex = $435a2ceaa8778ed8$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options?.round);
661
- mutable.era = eras[eraIndex];
662
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
663
- break;
664
- }
665
- case "year":
666
- if (mutable.calendar.isInverseEra?.(mutable)) amount = -amount;
667
- mutable.year = $435a2ceaa8778ed8$var$cycleValue(value.year, amount, -Infinity, 9999, options?.round);
668
- if (mutable.year === -Infinity) mutable.year = 1;
669
- if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
670
- break;
671
- case "month":
672
- mutable.month = $435a2ceaa8778ed8$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options?.round);
673
- break;
674
- case "day":
675
- mutable.day = $435a2ceaa8778ed8$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options?.round);
676
- break;
677
- default: throw new Error("Unsupported field " + field);
678
- }
679
- if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
680
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
681
- return mutable;
682
- }
683
- function $435a2ceaa8778ed8$export$dd02b3e0007dfe28(value, field, amount, options) {
684
- let mutable = value.copy();
685
- switch (field) {
686
- case "hour": {
687
- let hours = value.hour;
688
- let min = 0;
689
- let max = 23;
690
- if (options?.hourCycle === 12) {
691
- let isPM = hours >= 12;
692
- min = isPM ? 12 : 0;
693
- max = isPM ? 23 : 11;
694
- }
695
- mutable.hour = $435a2ceaa8778ed8$var$cycleValue(hours, amount, min, max, options?.round);
696
- break;
697
- }
698
- case "minute":
699
- mutable.minute = $435a2ceaa8778ed8$var$cycleValue(value.minute, amount, 0, 59, options?.round);
700
- break;
701
- case "second":
702
- mutable.second = $435a2ceaa8778ed8$var$cycleValue(value.second, amount, 0, 59, options?.round);
703
- break;
704
- case "millisecond":
705
- mutable.millisecond = $435a2ceaa8778ed8$var$cycleValue(value.millisecond, amount, 0, 999, options?.round);
706
- break;
707
- default: throw new Error("Unsupported field " + field);
708
- }
709
- return mutable;
710
- }
711
- function $435a2ceaa8778ed8$var$cycleValue(value, amount, min, max, round = false) {
712
- if (round) {
713
- value += Math.sign(amount);
714
- if (value < min) value = max;
715
- let div = Math.abs(amount);
716
- if (amount > 0) value = Math.ceil(value / div) * div;
717
- else value = Math.floor(value / div) * div;
718
- if (value > max) value = min;
719
- } else {
720
- value += amount;
721
- if (value < min) value = max - (min - value - 1);
722
- else if (value > max) value = min + (value - max - 1);
723
- }
724
- return value;
725
- }
726
- function $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, duration) {
727
- let ms;
728
- if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) ms = $d07e34cce18680fd$export$5107c82f94518f5c($435a2ceaa8778ed8$export$e16d8520af44a096($d07e34cce18680fd$export$b21e0b124e224484(dateTime), {
729
- years: duration.years,
730
- months: duration.months,
731
- weeks: duration.weeks,
732
- days: duration.days
733
- }), dateTime.timeZone);
734
- else ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
735
- ms += duration.milliseconds || 0;
736
- ms += (duration.seconds || 0) * 1e3;
737
- ms += (duration.minutes || 0) * 6e4;
738
- ms += (duration.hours || 0) * 36e5;
739
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
740
- }
741
- function $435a2ceaa8778ed8$export$6814caac34ca03c7(dateTime, duration) {
742
- return $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
743
- }
744
- function $435a2ceaa8778ed8$export$9a297d111fc86b79(dateTime, field, amount, options) {
745
- switch (field) {
746
- case "hour": {
747
- let min = 0;
748
- let max = 23;
749
- if (options?.hourCycle === 12) {
750
- let isPM = dateTime.hour >= 12;
751
- min = isPM ? 12 : 0;
752
- max = isPM ? 23 : 11;
753
- }
754
- let plainDateTime = $d07e34cce18680fd$export$b21e0b124e224484(dateTime);
755
- let minDate = $d07e34cce18680fd$export$b4a036af3fc0b032($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, { hour: min }), new $93635573935797de$export$80ee6245ec4f29ec());
756
- let minAbsolute = [$d07e34cce18680fd$export$5107c82f94518f5c(minDate, dateTime.timeZone, "earlier"), $d07e34cce18680fd$export$5107c82f94518f5c(minDate, dateTime.timeZone, "later")].filter((ms) => $d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone).day === minDate.day)[0];
757
- let maxDate = $d07e34cce18680fd$export$b4a036af3fc0b032($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, { hour: max }), new $93635573935797de$export$80ee6245ec4f29ec());
758
- let maxAbsolute = [$d07e34cce18680fd$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "earlier"), $d07e34cce18680fd$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "later")].filter((ms) => $d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone).day === maxDate.day).pop();
759
- let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
760
- let hours = Math.floor(ms / $435a2ceaa8778ed8$var$ONE_HOUR);
761
- let remainder = ms % $435a2ceaa8778ed8$var$ONE_HOUR;
762
- ms = $435a2ceaa8778ed8$var$cycleValue(hours, amount, Math.floor(minAbsolute / $435a2ceaa8778ed8$var$ONE_HOUR), Math.floor(maxAbsolute / $435a2ceaa8778ed8$var$ONE_HOUR), options?.round) * $435a2ceaa8778ed8$var$ONE_HOUR + remainder;
763
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
764
- }
765
- case "minute":
766
- case "second":
767
- case "millisecond": return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(dateTime, field, amount, options);
768
- case "era":
769
- case "year":
770
- case "month":
771
- case "day": return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c($435a2ceaa8778ed8$export$d52ced6badfb9a4c($d07e34cce18680fd$export$b21e0b124e224484(dateTime), field, amount, options), dateTime.timeZone), dateTime.timeZone), dateTime.calendar);
772
- default: throw new Error("Unsupported field " + field);
773
- }
774
- }
775
- function $435a2ceaa8778ed8$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
776
- let plainDateTime = $d07e34cce18680fd$export$b21e0b124e224484(dateTime);
777
- let res = $435a2ceaa8778ed8$export$e5d5e1c1822b6e56($435a2ceaa8778ed8$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
778
- if (res.compare(plainDateTime) === 0) return dateTime;
779
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c(res, dateTime.timeZone, disambiguation), dateTime.timeZone), dateTime.calendar);
780
- }
781
- function $58246871e4652552$export$f59dee82248f5ad4(time) {
782
- return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
783
- }
784
- function $58246871e4652552$export$60dfd74aa96791bd(date) {
785
- let gregorianDate = $d07e34cce18680fd$export$b4a036af3fc0b032(date, new $93635573935797de$export$80ee6245ec4f29ec());
786
- let year;
787
- if (gregorianDate.era === "BC") year = gregorianDate.year === 1 ? "0000" : "-" + String(Math.abs(1 - gregorianDate.year)).padStart(6, "00");
788
- else year = String(gregorianDate.year).padStart(4, "0");
789
- return `${year}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`;
790
- }
791
- function $58246871e4652552$export$4223de14708adc63(date) {
792
- return `${$58246871e4652552$export$60dfd74aa96791bd(date)}T${$58246871e4652552$export$f59dee82248f5ad4(date)}`;
793
- }
794
- function $58246871e4652552$var$offsetToString(offset) {
795
- let sign = Math.sign(offset) < 0 ? "-" : "+";
796
- offset = Math.abs(offset);
797
- let offsetHours = Math.floor(offset / 36e5);
798
- let offsetMinutes = Math.floor(offset % 36e5 / 6e4);
799
- let offsetSeconds = Math.floor(offset % 36e5 % 6e4 / 1e3);
800
- let stringOffset = `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`;
801
- if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, "0")}`;
802
- return stringOffset;
803
- }
804
- function $58246871e4652552$export$bf79f1ebf4b18792(date) {
805
- return `${$58246871e4652552$export$4223de14708adc63(date)}${$58246871e4652552$var$offsetToString(date.offset)}[${date.timeZone}]`;
806
- }
807
- //#endregion
808
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.mjs
809
- function $2aaf608024c21ca1$var$shiftArgs(args) {
810
- let calendar = typeof args[0] === "object" ? args.shift() : new $93635573935797de$export$80ee6245ec4f29ec();
811
- let era;
812
- if (typeof args[0] === "string") era = args.shift();
813
- else {
814
- let eras = calendar.getEras();
815
- era = eras[eras.length - 1];
816
- }
817
- let year = args.shift();
818
- let month = args.shift();
819
- let day = args.shift();
820
- return [
821
- calendar,
822
- era,
823
- year,
824
- month,
825
- day
826
- ];
827
- }
828
- var $2aaf608024c21ca1$export$99faa760c7908e4f = class $2aaf608024c21ca1$export$99faa760c7908e4f {
829
- #type;
830
- constructor(...args) {
831
- let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
832
- this.calendar = calendar;
833
- this.era = era;
834
- this.year = year;
835
- this.month = month;
836
- this.day = day;
837
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
838
- }
839
- /** Returns a copy of this date. */ copy() {
840
- if (this.era) return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
841
- else return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
842
- }
843
- /** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
844
- return $435a2ceaa8778ed8$export$e16d8520af44a096(this, duration);
845
- }
846
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
847
- return $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(this, duration);
848
- }
849
- /**
850
- * Returns a new `CalendarDate` with the given fields set to the provided values. Other fields
851
- * will be constrained accordingly.
852
- */ set(fields) {
853
- return $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(this, fields);
854
- }
855
- /**
856
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
857
- * When the resulting value reaches the limits of the field, it wraps around.
858
- */ cycle(field, amount, options) {
859
- return $435a2ceaa8778ed8$export$d52ced6badfb9a4c(this, field, amount, options);
860
- }
861
- /**
862
- * Converts the date to a native JavaScript Date object, with the time set to midnight in the
863
- * given time zone.
864
- */ toDate(timeZone) {
865
- return $d07e34cce18680fd$export$e67a095c620b86fe(this, timeZone);
866
- }
867
- /** Converts the date to an ISO 8601 formatted string. */ toString() {
868
- return $58246871e4652552$export$60dfd74aa96791bd(this);
869
- }
870
- /**
871
- * Compares this date with another. A negative result indicates that this date is before the given
872
- * one, and a positive date indicates that it is after.
873
- */ compare(b) {
874
- return $ad063034c8620db8$export$68781ddf31c0090f(this, b);
875
- }
876
- };
877
- var $2aaf608024c21ca1$export$680ea196effce5f = class $2aaf608024c21ca1$export$680ea196effce5f {
878
- #type;
879
- constructor(hour = 0, minute = 0, second = 0, millisecond = 0) {
880
- this.hour = hour;
881
- this.minute = minute;
882
- this.second = second;
883
- this.millisecond = millisecond;
884
- $435a2ceaa8778ed8$export$7555de1e070510cb(this);
885
- }
886
- /** Returns a copy of this time. */ copy() {
887
- return new $2aaf608024c21ca1$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
888
- }
889
- /** Returns a new `Time` with the given duration added to it. */ add(duration) {
890
- return $435a2ceaa8778ed8$export$7ed87b6bc2506470(this, duration);
891
- }
892
- /** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
893
- return $435a2ceaa8778ed8$export$fe34d3a381cd7501(this, duration);
894
- }
895
- /**
896
- * Returns a new `Time` with the given fields set to the provided values. Other fields will be
897
- * constrained accordingly.
898
- */ set(fields) {
899
- return $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(this, fields);
900
- }
901
- /**
902
- * Returns a new `Time` with the given field adjusted by a specified amount.
903
- * When the resulting value reaches the limits of the field, it wraps around.
904
- */ cycle(field, amount, options) {
905
- return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(this, field, amount, options);
906
- }
907
- /** Converts the time to an ISO 8601 formatted string. */ toString() {
908
- return $58246871e4652552$export$f59dee82248f5ad4(this);
909
- }
910
- /**
911
- * Compares this time with another. A negative result indicates that this time is before the given
912
- * one, and a positive time indicates that it is after.
913
- */ compare(b) {
914
- return $ad063034c8620db8$export$c19a80a9721b80f6(this, b);
915
- }
916
- };
917
- var $2aaf608024c21ca1$export$ca871e8dbb80966f = class $2aaf608024c21ca1$export$ca871e8dbb80966f {
918
- #type;
919
- constructor(...args) {
920
- let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
921
- this.calendar = calendar;
922
- this.era = era;
923
- this.year = year;
924
- this.month = month;
925
- this.day = day;
926
- this.hour = args.shift() || 0;
927
- this.minute = args.shift() || 0;
928
- this.second = args.shift() || 0;
929
- this.millisecond = args.shift() || 0;
930
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
931
- }
932
- /** Returns a copy of this date. */ copy() {
933
- if (this.era) return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
934
- else return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
935
- }
936
- /** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
937
- return $435a2ceaa8778ed8$export$e16d8520af44a096(this, duration);
938
- }
939
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
940
- return $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(this, duration);
941
- }
942
- /**
943
- * Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields
944
- * will be constrained accordingly.
945
- */ set(fields) {
946
- return $435a2ceaa8778ed8$export$adaa4cf7ef1b65be($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(this, fields), fields);
947
- }
948
- /**
949
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
950
- * When the resulting value reaches the limits of the field, it wraps around.
951
- */ cycle(field, amount, options) {
952
- switch (field) {
953
- case "era":
954
- case "year":
955
- case "month":
956
- case "day": return $435a2ceaa8778ed8$export$d52ced6badfb9a4c(this, field, amount, options);
957
- default: return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(this, field, amount, options);
958
- }
959
- }
960
- /** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
961
- return $d07e34cce18680fd$export$e67a095c620b86fe(this, timeZone, disambiguation);
962
- }
963
- /** Converts the date to an ISO 8601 formatted string. */ toString() {
964
- return $58246871e4652552$export$4223de14708adc63(this);
965
- }
966
- /**
967
- * Compares this date with another. A negative result indicates that this date is before the given
968
- * one, and a positive date indicates that it is after.
969
- */ compare(b) {
970
- let res = $ad063034c8620db8$export$68781ddf31c0090f(this, b);
971
- if (res === 0) return $ad063034c8620db8$export$c19a80a9721b80f6(this, $d07e34cce18680fd$export$b21e0b124e224484(b));
972
- return res;
973
- }
974
- };
975
- var $2aaf608024c21ca1$export$d3b7288e7994edea = class $2aaf608024c21ca1$export$d3b7288e7994edea {
976
- #type;
977
- constructor(...args) {
978
- let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
979
- let timeZone = args.shift();
980
- let offset = args.shift();
981
- this.calendar = calendar;
982
- this.era = era;
983
- this.year = year;
984
- this.month = month;
985
- this.day = day;
986
- this.timeZone = timeZone;
987
- this.offset = offset;
988
- this.hour = args.shift() || 0;
989
- this.minute = args.shift() || 0;
990
- this.second = args.shift() || 0;
991
- this.millisecond = args.shift() || 0;
992
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
993
- }
994
- /** Returns a copy of this date. */ copy() {
995
- if (this.era) return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
996
- else return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
997
- }
998
- /** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {
999
- return $435a2ceaa8778ed8$export$96b1d28349274637(this, duration);
1000
- }
1001
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {
1002
- return $435a2ceaa8778ed8$export$6814caac34ca03c7(this, duration);
1003
- }
1004
- /**
1005
- * Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields
1006
- * will be constrained accordingly.
1007
- */ set(fields, disambiguation) {
1008
- return $435a2ceaa8778ed8$export$31b5430eb18be4f8(this, fields, disambiguation);
1009
- }
1010
- /**
1011
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
1012
- * When the resulting value reaches the limits of the field, it wraps around.
1013
- */ cycle(field, amount, options) {
1014
- return $435a2ceaa8778ed8$export$9a297d111fc86b79(this, field, amount, options);
1015
- }
1016
- /** Converts the date to a native JavaScript Date object. */ toDate() {
1017
- return $d07e34cce18680fd$export$83aac07b4c37b25(this);
1018
- }
1019
- /**
1020
- * Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone
1021
- * identifier.
1022
- */ toString() {
1023
- return $58246871e4652552$export$bf79f1ebf4b18792(this);
1024
- }
1025
- /** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {
1026
- return this.toDate().toISOString();
1027
- }
1028
- /**
1029
- * Compares this date with another. A negative result indicates that this date is before the given
1030
- * one, and a positive date indicates that it is after.
1031
- */ compare(b) {
1032
- return this.toDate().getTime() - $d07e34cce18680fd$export$84c95a83c799e074(b, this.timeZone).toDate().getTime();
1033
- }
1034
- };
1035
- //#endregion
1036
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/JapaneseCalendar.mjs
1037
- var $34b940b49ba042df$var$ERA_START_DATES = [
1038
- [
1039
- 1868,
1040
- 9,
1041
- 8
1042
- ],
1043
- [
1044
- 1912,
1045
- 7,
1046
- 30
1047
- ],
1048
- [
1049
- 1926,
1050
- 12,
1051
- 25
1052
- ],
1053
- [
1054
- 1989,
1055
- 1,
1056
- 8
1057
- ],
1058
- [
1059
- 2019,
1060
- 5,
1061
- 1
1062
- ]
1063
- ];
1064
- var $34b940b49ba042df$var$ERA_END_DATES = [
1065
- [
1066
- 1912,
1067
- 7,
1068
- 29
1069
- ],
1070
- [
1071
- 1926,
1072
- 12,
1073
- 24
1074
- ],
1075
- [
1076
- 1989,
1077
- 1,
1078
- 7
1079
- ],
1080
- [
1081
- 2019,
1082
- 4,
1083
- 30
1084
- ]
1085
- ];
1086
- var $34b940b49ba042df$var$ERA_ADDENDS = [
1087
- 1867,
1088
- 1911,
1089
- 1925,
1090
- 1988,
1091
- 2018
1092
- ];
1093
- var $34b940b49ba042df$var$ERA_NAMES = [
1094
- "meiji",
1095
- "taisho",
1096
- "showa",
1097
- "heisei",
1098
- "reiwa"
1099
- ];
1100
- function $34b940b49ba042df$var$findEraFromGregorianDate(date) {
1101
- const idx = $34b940b49ba042df$var$ERA_START_DATES.findIndex(([year, month, day]) => {
1102
- if (date.year < year) return true;
1103
- if (date.year === year && date.month < month) return true;
1104
- if (date.year === year && date.month === month && date.day < day) return true;
1105
- return false;
1106
- });
1107
- if (idx === -1) return $34b940b49ba042df$var$ERA_START_DATES.length - 1;
1108
- if (idx === 0) return 0;
1109
- return idx - 1;
1110
- }
1111
- function $34b940b49ba042df$var$toGregorian(date) {
1112
- let eraAddend = $34b940b49ba042df$var$ERA_ADDENDS[$34b940b49ba042df$var$ERA_NAMES.indexOf(date.era)];
1113
- if (!eraAddend) throw new Error("Unknown era: " + date.era);
1114
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(date.year + eraAddend, date.month, date.day);
1115
- }
1116
- var $34b940b49ba042df$export$b746ab2b60cdffbf = class extends $93635573935797de$export$80ee6245ec4f29ec {
1117
- fromJulianDay(jd) {
1118
- let date = super.fromJulianDay(jd);
1119
- let era = $34b940b49ba042df$var$findEraFromGregorianDate(date);
1120
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, $34b940b49ba042df$var$ERA_NAMES[era], date.year - $34b940b49ba042df$var$ERA_ADDENDS[era], date.month, date.day);
1121
- }
1122
- toJulianDay(date) {
1123
- return super.toJulianDay($34b940b49ba042df$var$toGregorian(date));
1124
- }
1125
- balanceDate(date) {
1126
- let gregorianDate = $34b940b49ba042df$var$toGregorian(date);
1127
- let era = $34b940b49ba042df$var$findEraFromGregorianDate(gregorianDate);
1128
- if ($34b940b49ba042df$var$ERA_NAMES[era] !== date.era) {
1129
- date.era = $34b940b49ba042df$var$ERA_NAMES[era];
1130
- date.year = gregorianDate.year - $34b940b49ba042df$var$ERA_ADDENDS[era];
1131
- }
1132
- this.constrainDate(date);
1133
- }
1134
- constrainDate(date) {
1135
- let idx = $34b940b49ba042df$var$ERA_NAMES.indexOf(date.era);
1136
- let end = $34b940b49ba042df$var$ERA_END_DATES[idx];
1137
- if (end != null) {
1138
- let [endYear, endMonth, endDay] = end;
1139
- let maxYear = endYear - $34b940b49ba042df$var$ERA_ADDENDS[idx];
1140
- date.year = Math.max(1, Math.min(maxYear, date.year));
1141
- if (date.year === maxYear) {
1142
- date.month = Math.min(endMonth, date.month);
1143
- if (date.month === endMonth) date.day = Math.min(endDay, date.day);
1144
- }
1145
- }
1146
- if (date.year === 1 && idx >= 0) {
1147
- let [, startMonth, startDay] = $34b940b49ba042df$var$ERA_START_DATES[idx];
1148
- date.month = Math.max(startMonth, date.month);
1149
- if (date.month === startMonth) date.day = Math.max(startDay, date.day);
1150
- }
1151
- }
1152
- getEras() {
1153
- return $34b940b49ba042df$var$ERA_NAMES;
1154
- }
1155
- getYearsInEra(date) {
1156
- let era = $34b940b49ba042df$var$ERA_NAMES.indexOf(date.era);
1157
- let cur = $34b940b49ba042df$var$ERA_START_DATES[era];
1158
- let next = $34b940b49ba042df$var$ERA_START_DATES[era + 1];
1159
- if (next == null) return 9999 - cur[0] + 1;
1160
- let years = next[0] - cur[0];
1161
- if (date.month < next[1] || date.month === next[1] && date.day < next[2]) years++;
1162
- return years;
1163
- }
1164
- getDaysInMonth(date) {
1165
- return super.getDaysInMonth($34b940b49ba042df$var$toGregorian(date));
1166
- }
1167
- getMinimumMonthInYear(date) {
1168
- let start = $34b940b49ba042df$var$getMinimums(date);
1169
- return start ? start[1] : 1;
1170
- }
1171
- getMinimumDayInMonth(date) {
1172
- let start = $34b940b49ba042df$var$getMinimums(date);
1173
- return start && date.month === start[1] ? start[2] : 1;
1174
- }
1175
- constructor(...args) {
1176
- super(...args), this.identifier = "japanese";
1177
- }
1178
- };
1179
- function $34b940b49ba042df$var$getMinimums(date) {
1180
- if (date.year === 1) return $34b940b49ba042df$var$ERA_START_DATES[$34b940b49ba042df$var$ERA_NAMES.indexOf(date.era)];
1181
- }
1182
- //#endregion
1183
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/BuddhistCalendar.mjs
1184
- var $63d4eafd4d826996$var$BUDDHIST_ERA_START = -543;
1185
- var $63d4eafd4d826996$export$42d20a78301dee44 = class extends $93635573935797de$export$80ee6245ec4f29ec {
1186
- fromJulianDay(jd) {
1187
- let gregorianDate = super.fromJulianDay(jd);
1188
- let year = $93635573935797de$export$c36e0ecb2d4fa69d(gregorianDate.era, gregorianDate.year);
1189
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, year - $63d4eafd4d826996$var$BUDDHIST_ERA_START, gregorianDate.month, gregorianDate.day);
1190
- }
1191
- toJulianDay(date) {
1192
- return super.toJulianDay($63d4eafd4d826996$var$toGregorian(date));
1193
- }
1194
- getEras() {
1195
- return ["BE"];
1196
- }
1197
- getDaysInMonth(date) {
1198
- return super.getDaysInMonth($63d4eafd4d826996$var$toGregorian(date));
1199
- }
1200
- balanceDate() {}
1201
- constructor(...args) {
1202
- super(...args), this.identifier = "buddhist";
1203
- }
1204
- };
1205
- function $63d4eafd4d826996$var$toGregorian(date) {
1206
- let [era, year] = $93635573935797de$export$4475b7e617eb123c(date.year + $63d4eafd4d826996$var$BUDDHIST_ERA_START);
1207
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, date.month, date.day);
1208
- }
1209
- //#endregion
1210
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/TaiwanCalendar.mjs
1211
- var $c009cc5f64923054$var$TAIWAN_ERA_START = 1911;
1212
- function $c009cc5f64923054$var$gregorianYear(date) {
1213
- return date.era === "minguo" ? date.year + $c009cc5f64923054$var$TAIWAN_ERA_START : 1 - date.year + $c009cc5f64923054$var$TAIWAN_ERA_START;
1214
- }
1215
- function $c009cc5f64923054$var$gregorianToTaiwan(year) {
1216
- let y = year - $c009cc5f64923054$var$TAIWAN_ERA_START;
1217
- if (y > 0) return ["minguo", y];
1218
- else return ["before_minguo", 1 - y];
1219
- }
1220
- var $c009cc5f64923054$export$65e01080afcb0799 = class extends $93635573935797de$export$80ee6245ec4f29ec {
1221
- fromJulianDay(jd) {
1222
- let date = super.fromJulianDay(jd);
1223
- let [era, year] = $c009cc5f64923054$var$gregorianToTaiwan($93635573935797de$export$c36e0ecb2d4fa69d(date.era, date.year));
1224
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, era, year, date.month, date.day);
1225
- }
1226
- toJulianDay(date) {
1227
- return super.toJulianDay($c009cc5f64923054$var$toGregorian(date));
1228
- }
1229
- getEras() {
1230
- return ["before_minguo", "minguo"];
1231
- }
1232
- balanceDate(date) {
1233
- let [era, year] = $c009cc5f64923054$var$gregorianToTaiwan($c009cc5f64923054$var$gregorianYear(date));
1234
- date.era = era;
1235
- date.year = year;
1236
- }
1237
- isInverseEra(date) {
1238
- return date.era === "before_minguo";
1239
- }
1240
- getDaysInMonth(date) {
1241
- return super.getDaysInMonth($c009cc5f64923054$var$toGregorian(date));
1242
- }
1243
- getYearsInEra(date) {
1244
- return date.era === "before_minguo" ? 9999 : 8088;
1245
- }
1246
- constructor(...args) {
1247
- super(...args), this.identifier = "roc";
1248
- }
1249
- };
1250
- function $c009cc5f64923054$var$toGregorian(date) {
1251
- let [era, year] = $93635573935797de$export$4475b7e617eb123c($c009cc5f64923054$var$gregorianYear(date));
1252
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, date.month, date.day);
1253
- }
1254
- //#endregion
1255
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/PersianCalendar.mjs
1256
- var $a0cc0739a536c3b1$var$PERSIAN_EPOCH = 1948320;
1257
- var $a0cc0739a536c3b1$var$MONTH_START = [
1258
- 0,
1259
- 31,
1260
- 62,
1261
- 93,
1262
- 124,
1263
- 155,
1264
- 186,
1265
- 216,
1266
- 246,
1267
- 276,
1268
- 306,
1269
- 336
1270
- ];
1271
- var $a0cc0739a536c3b1$export$37fccdbfd14c5939 = class {
1272
- fromJulianDay(jd) {
1273
- let daysSinceEpoch = jd - $a0cc0739a536c3b1$var$PERSIAN_EPOCH;
1274
- let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);
1275
- let dayOfYear = daysSinceEpoch - (365 * (year - 1) + Math.floor((8 * year + 21) / 33));
1276
- let month = dayOfYear < 216 ? Math.floor(dayOfYear / 31) : Math.floor((dayOfYear - 6) / 30);
1277
- let day = dayOfYear - $a0cc0739a536c3b1$var$MONTH_START[month] + 1;
1278
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, year, month + 1, day);
1279
- }
1280
- toJulianDay(date) {
1281
- let jd = 1948319 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);
1282
- jd += $a0cc0739a536c3b1$var$MONTH_START[date.month - 1];
1283
- jd += date.day;
1284
- return jd;
1285
- }
1286
- getMonthsInYear() {
1287
- return 12;
1288
- }
1289
- getDaysInMonth(date) {
1290
- if (date.month <= 6) return 31;
1291
- if (date.month <= 11) return 30;
1292
- return $09ec6a572d60460f$export$842a2cf37af977e1(25 * date.year + 11, 33) < 8 ? 30 : 29;
1293
- }
1294
- getMaximumMonthsInYear() {
1295
- return 12;
1296
- }
1297
- getMaximumDaysInMonth() {
1298
- return 31;
1299
- }
1300
- getEras() {
1301
- return ["AP"];
1302
- }
1303
- getYearsInEra() {
1304
- return 9377;
1305
- }
1306
- constructor() {
1307
- this.identifier = "persian";
1308
- }
1309
- };
1310
- //#endregion
1311
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/IndianCalendar.mjs
1312
- var $11fa67a177e45470$var$INDIAN_ERA_START = 78;
1313
- var $11fa67a177e45470$var$INDIAN_YEAR_START = 80;
1314
- var $11fa67a177e45470$export$39f31c639fa15726 = class extends $93635573935797de$export$80ee6245ec4f29ec {
1315
- fromJulianDay(jd) {
1316
- let date = super.fromJulianDay(jd);
1317
- let indianYear = date.year - $11fa67a177e45470$var$INDIAN_ERA_START;
1318
- let yDay = jd - $93635573935797de$export$f297eb839006d339(date.era, date.year, 1, 1);
1319
- let leapMonth;
1320
- if (yDay < $11fa67a177e45470$var$INDIAN_YEAR_START) {
1321
- indianYear--;
1322
- leapMonth = $93635573935797de$export$553d7fa8e3805fc0(date.year - 1) ? 31 : 30;
1323
- yDay += leapMonth + 155 + 90 + 10;
1324
- } else {
1325
- leapMonth = $93635573935797de$export$553d7fa8e3805fc0(date.year) ? 31 : 30;
1326
- yDay -= $11fa67a177e45470$var$INDIAN_YEAR_START;
1327
- }
1328
- let indianMonth;
1329
- let indianDay;
1330
- if (yDay < leapMonth) {
1331
- indianMonth = 1;
1332
- indianDay = yDay + 1;
1333
- } else {
1334
- let mDay = yDay - leapMonth;
1335
- if (mDay < 155) {
1336
- indianMonth = Math.floor(mDay / 31) + 2;
1337
- indianDay = mDay % 31 + 1;
1338
- } else {
1339
- mDay -= 155;
1340
- indianMonth = Math.floor(mDay / 30) + 7;
1341
- indianDay = mDay % 30 + 1;
1342
- }
1343
- }
1344
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, indianYear, indianMonth, indianDay);
1345
- }
1346
- toJulianDay(date) {
1347
- let [era, year] = $93635573935797de$export$4475b7e617eb123c(date.year + $11fa67a177e45470$var$INDIAN_ERA_START);
1348
- let leapMonth;
1349
- let jd;
1350
- if ($93635573935797de$export$553d7fa8e3805fc0(year)) {
1351
- leapMonth = 31;
1352
- jd = $93635573935797de$export$f297eb839006d339(era, year, 3, 21);
1353
- } else {
1354
- leapMonth = 30;
1355
- jd = $93635573935797de$export$f297eb839006d339(era, year, 3, 22);
1356
- }
1357
- if (date.month === 1) return jd + date.day - 1;
1358
- jd += leapMonth + Math.min(date.month - 2, 5) * 31;
1359
- if (date.month >= 8) jd += (date.month - 7) * 30;
1360
- jd += date.day - 1;
1361
- return jd;
1362
- }
1363
- getDaysInMonth(date) {
1364
- if (date.month === 1 && $93635573935797de$export$553d7fa8e3805fc0(date.year + $11fa67a177e45470$var$INDIAN_ERA_START)) return 31;
1365
- if (date.month >= 2 && date.month <= 6) return 31;
1366
- return 30;
1367
- }
1368
- getYearsInEra() {
1369
- return 9919;
1370
- }
1371
- getEras() {
1372
- return ["saka"];
1373
- }
1374
- balanceDate() {}
1375
- constructor(...args) {
1376
- super(...args), this.identifier = "indian";
1377
- }
1378
- };
1379
- //#endregion
1380
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/IslamicCalendar.mjs
1381
- var $fd4f9bc1ba0e49a8$var$CIVIL_EPOC = 1948440;
1382
- var $fd4f9bc1ba0e49a8$var$ASTRONOMICAL_EPOC = 1948439;
1383
- var $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START = 1300;
1384
- var $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END = 1600;
1385
- var $fd4f9bc1ba0e49a8$var$UMALQURA_START_DAYS = 460322;
1386
- function $fd4f9bc1ba0e49a8$var$islamicToJulianDay(epoch, year, month, day) {
1387
- return day + Math.ceil(29.5 * (month - 1)) + (year - 1) * 354 + Math.floor((3 + 11 * year) / 30) + epoch - 1;
1388
- }
1389
- function $fd4f9bc1ba0e49a8$var$julianDayToIslamic(calendar, epoch, jd) {
1390
- let year = Math.floor((30 * (jd - epoch) + 10646) / 10631);
1391
- let month = Math.min(12, Math.ceil((jd - (29 + $fd4f9bc1ba0e49a8$var$islamicToJulianDay(epoch, year, 1, 1))) / 29.5) + 1);
1392
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(calendar, year, month, jd - $fd4f9bc1ba0e49a8$var$islamicToJulianDay(epoch, year, month, 1) + 1);
1393
- }
1394
- function $fd4f9bc1ba0e49a8$var$isLeapYear(year) {
1395
- return (14 + 11 * year) % 30 < 11;
1396
- }
1397
- var $fd4f9bc1ba0e49a8$export$2066795aadd37bfc = class {
1398
- fromJulianDay(jd) {
1399
- return $fd4f9bc1ba0e49a8$var$julianDayToIslamic(this, $fd4f9bc1ba0e49a8$var$CIVIL_EPOC, jd);
1400
- }
1401
- toJulianDay(date) {
1402
- return $fd4f9bc1ba0e49a8$var$islamicToJulianDay($fd4f9bc1ba0e49a8$var$CIVIL_EPOC, date.year, date.month, date.day);
1403
- }
1404
- getDaysInMonth(date) {
1405
- let length = 29 + date.month % 2;
1406
- if (date.month === 12 && $fd4f9bc1ba0e49a8$var$isLeapYear(date.year)) length++;
1407
- return length;
1408
- }
1409
- getMonthsInYear() {
1410
- return 12;
1411
- }
1412
- getDaysInYear(date) {
1413
- return $fd4f9bc1ba0e49a8$var$isLeapYear(date.year) ? 355 : 354;
1414
- }
1415
- getMaximumMonthsInYear() {
1416
- return 12;
1417
- }
1418
- getMaximumDaysInMonth() {
1419
- return 30;
1420
- }
1421
- getYearsInEra() {
1422
- return 9665;
1423
- }
1424
- getEras() {
1425
- return ["AH"];
1426
- }
1427
- constructor() {
1428
- this.identifier = "islamic-civil";
1429
- }
1430
- };
1431
- var $fd4f9bc1ba0e49a8$export$37f0887f2f9d22f7 = class extends $fd4f9bc1ba0e49a8$export$2066795aadd37bfc {
1432
- fromJulianDay(jd) {
1433
- return $fd4f9bc1ba0e49a8$var$julianDayToIslamic(this, $fd4f9bc1ba0e49a8$var$ASTRONOMICAL_EPOC, jd);
1434
- }
1435
- toJulianDay(date) {
1436
- return $fd4f9bc1ba0e49a8$var$islamicToJulianDay($fd4f9bc1ba0e49a8$var$ASTRONOMICAL_EPOC, date.year, date.month, date.day);
1437
- }
1438
- constructor(...args) {
1439
- super(...args), this.identifier = "islamic-tbla";
1440
- }
1441
- };
1442
- var $fd4f9bc1ba0e49a8$var$UMALQURA_DATA = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";
1443
- var $fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH;
1444
- var $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE;
1445
- function $fd4f9bc1ba0e49a8$var$umalquraYearStart(year) {
1446
- return $fd4f9bc1ba0e49a8$var$UMALQURA_START_DAYS + $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START];
1447
- }
1448
- function $fd4f9bc1ba0e49a8$var$umalquraMonthLength(year, month) {
1449
- let idx = year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START;
1450
- let mask = 1 << 11 - (month - 1);
1451
- if (($fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH[idx] & mask) === 0) return 29;
1452
- else return 30;
1453
- }
1454
- function $fd4f9bc1ba0e49a8$var$umalquraMonthStart(year, month) {
1455
- let day = $fd4f9bc1ba0e49a8$var$umalquraYearStart(year);
1456
- for (let i = 1; i < month; i++) day += $fd4f9bc1ba0e49a8$var$umalquraMonthLength(year, i);
1457
- return day;
1458
- }
1459
- function $fd4f9bc1ba0e49a8$var$umalquraYearLength(year) {
1460
- return $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year + 1 - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START] - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START];
1461
- }
1462
- var $fd4f9bc1ba0e49a8$export$5baab4758c231076 = class extends $fd4f9bc1ba0e49a8$export$2066795aadd37bfc {
1463
- constructor() {
1464
- super(), this.identifier = "islamic-umalqura";
1465
- if (!$fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH) $fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob($fd4f9bc1ba0e49a8$var$UMALQURA_DATA), (c) => c.charCodeAt(0)).buffer);
1466
- if (!$fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE) {
1467
- $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE = /* @__PURE__ */ new Uint32Array(301);
1468
- let yearStart = 0;
1469
- for (let year = $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START; year <= $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END; year++) {
1470
- $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START] = yearStart;
1471
- for (let i = 1; i <= 12; i++) yearStart += $fd4f9bc1ba0e49a8$var$umalquraMonthLength(year, i);
1472
- }
1473
- }
1474
- }
1475
- fromJulianDay(jd) {
1476
- let days = jd - $fd4f9bc1ba0e49a8$var$CIVIL_EPOC;
1477
- let startDays = $fd4f9bc1ba0e49a8$var$umalquraYearStart($fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START);
1478
- let endDays = $fd4f9bc1ba0e49a8$var$umalquraYearStart($fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END);
1479
- if (days < startDays || days > endDays) return super.fromJulianDay(jd);
1480
- else {
1481
- let y = 1299;
1482
- let m = 1;
1483
- let d = 1;
1484
- while (d > 0) {
1485
- y++;
1486
- d = days - $fd4f9bc1ba0e49a8$var$umalquraYearStart(y) + 1;
1487
- let yearLength = $fd4f9bc1ba0e49a8$var$umalquraYearLength(y);
1488
- if (d === yearLength) {
1489
- m = 12;
1490
- break;
1491
- } else if (d < yearLength) {
1492
- let monthLength = $fd4f9bc1ba0e49a8$var$umalquraMonthLength(y, m);
1493
- m = 1;
1494
- while (d > monthLength) {
1495
- d -= monthLength;
1496
- m++;
1497
- monthLength = $fd4f9bc1ba0e49a8$var$umalquraMonthLength(y, m);
1498
- }
1499
- break;
1500
- }
1501
- }
1502
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, y, m, days - $fd4f9bc1ba0e49a8$var$umalquraMonthStart(y, m) + 1);
1503
- }
1504
- }
1505
- toJulianDay(date) {
1506
- if (date.year < $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START || date.year > $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END) return super.toJulianDay(date);
1507
- return $fd4f9bc1ba0e49a8$var$CIVIL_EPOC + $fd4f9bc1ba0e49a8$var$umalquraMonthStart(date.year, date.month) + (date.day - 1);
1508
- }
1509
- getDaysInMonth(date) {
1510
- if (date.year < $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START || date.year > $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END) return super.getDaysInMonth(date);
1511
- return $fd4f9bc1ba0e49a8$var$umalquraMonthLength(date.year, date.month);
1512
- }
1513
- getDaysInYear(date) {
1514
- if (date.year < $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START || date.year > $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END) return super.getDaysInYear(date);
1515
- return $fd4f9bc1ba0e49a8$var$umalquraYearLength(date.year);
1516
- }
1517
- };
1518
- //#endregion
1519
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/HebrewCalendar.mjs
1520
- var $f39495b96f9dbac6$var$HEBREW_EPOCH = 347997;
1521
- var $f39495b96f9dbac6$var$DAY_PARTS = 25920;
1522
- var $f39495b96f9dbac6$var$MONTH_PARTS = 765433;
1523
- function $f39495b96f9dbac6$var$isLeapYear(year) {
1524
- return $09ec6a572d60460f$export$842a2cf37af977e1(year * 7 + 1, 19) < 7;
1525
- }
1526
- function $f39495b96f9dbac6$var$hebrewDelay1(year) {
1527
- let months = Math.floor((235 * year - 234) / 19);
1528
- let parts = 12084 + 13753 * months;
1529
- let day = months * 29 + Math.floor(parts / 25920);
1530
- if ($09ec6a572d60460f$export$842a2cf37af977e1(3 * (day + 1), 7) < 3) day += 1;
1531
- return day;
1532
- }
1533
- function $f39495b96f9dbac6$var$hebrewDelay2(year) {
1534
- let last = $f39495b96f9dbac6$var$hebrewDelay1(year - 1);
1535
- let present = $f39495b96f9dbac6$var$hebrewDelay1(year);
1536
- if ($f39495b96f9dbac6$var$hebrewDelay1(year + 1) - present === 356) return 2;
1537
- if (present - last === 382) return 1;
1538
- return 0;
1539
- }
1540
- function $f39495b96f9dbac6$var$startOfYear(year) {
1541
- return $f39495b96f9dbac6$var$hebrewDelay1(year) + $f39495b96f9dbac6$var$hebrewDelay2(year);
1542
- }
1543
- function $f39495b96f9dbac6$var$getDaysInYear(year) {
1544
- return $f39495b96f9dbac6$var$startOfYear(year + 1) - $f39495b96f9dbac6$var$startOfYear(year);
1545
- }
1546
- function $f39495b96f9dbac6$var$getYearType(year) {
1547
- let yearLength = $f39495b96f9dbac6$var$getDaysInYear(year);
1548
- if (yearLength > 380) yearLength -= 30;
1549
- switch (yearLength) {
1550
- case 353: return 0;
1551
- case 354: return 1;
1552
- case 355: return 2;
1553
- }
1554
- }
1555
- function $f39495b96f9dbac6$var$getDaysInMonth(year, month) {
1556
- if (month >= 6 && !$f39495b96f9dbac6$var$isLeapYear(year)) month++;
1557
- if (month === 4 || month === 7 || month === 9 || month === 11 || month === 13) return 29;
1558
- let yearType = $f39495b96f9dbac6$var$getYearType(year);
1559
- if (month === 2) return yearType === 2 ? 30 : 29;
1560
- if (month === 3) return yearType === 0 ? 29 : 30;
1561
- if (month === 6) return $f39495b96f9dbac6$var$isLeapYear(year) ? 30 : 0;
1562
- return 30;
1563
- }
1564
- var $f39495b96f9dbac6$export$ca405048b8fb5af = class {
1565
- fromJulianDay(jd) {
1566
- let d = jd - $f39495b96f9dbac6$var$HEBREW_EPOCH;
1567
- let m = d * $f39495b96f9dbac6$var$DAY_PARTS / $f39495b96f9dbac6$var$MONTH_PARTS;
1568
- let year = Math.floor((19 * m + 234) / 235) + 1;
1569
- let ys = $f39495b96f9dbac6$var$startOfYear(year);
1570
- let dayOfYear = Math.floor(d - ys);
1571
- while (dayOfYear < 1) {
1572
- year--;
1573
- ys = $f39495b96f9dbac6$var$startOfYear(year);
1574
- dayOfYear = Math.floor(d - ys);
1575
- }
1576
- let month = 1;
1577
- let monthStart = 0;
1578
- while (monthStart < dayOfYear) {
1579
- monthStart += $f39495b96f9dbac6$var$getDaysInMonth(year, month);
1580
- month++;
1581
- }
1582
- month--;
1583
- monthStart -= $f39495b96f9dbac6$var$getDaysInMonth(year, month);
1584
- let day = dayOfYear - monthStart;
1585
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, year, month, day);
1586
- }
1587
- toJulianDay(date) {
1588
- let jd = $f39495b96f9dbac6$var$startOfYear(date.year);
1589
- for (let month = 1; month < date.month; month++) jd += $f39495b96f9dbac6$var$getDaysInMonth(date.year, month);
1590
- return jd + date.day + $f39495b96f9dbac6$var$HEBREW_EPOCH;
1591
- }
1592
- getDaysInMonth(date) {
1593
- return $f39495b96f9dbac6$var$getDaysInMonth(date.year, date.month);
1594
- }
1595
- getMonthsInYear(date) {
1596
- return $f39495b96f9dbac6$var$isLeapYear(date.year) ? 13 : 12;
1597
- }
1598
- getDaysInYear(date) {
1599
- return $f39495b96f9dbac6$var$getDaysInYear(date.year);
1600
- }
1601
- getMaximumMonthsInYear() {
1602
- return 13;
1603
- }
1604
- getMaximumDaysInMonth() {
1605
- return 30;
1606
- }
1607
- getYearsInEra() {
1608
- return 9999;
1609
- }
1610
- getEras() {
1611
- return ["AM"];
1612
- }
1613
- balanceYearMonth(date, previousDate) {
1614
- if (previousDate.year !== date.year) {
1615
- if ($f39495b96f9dbac6$var$isLeapYear(previousDate.year) && !$f39495b96f9dbac6$var$isLeapYear(date.year) && previousDate.month > 6) date.month--;
1616
- else if (!$f39495b96f9dbac6$var$isLeapYear(previousDate.year) && $f39495b96f9dbac6$var$isLeapYear(date.year) && previousDate.month > 6) date.month++;
1617
- }
1618
- }
1619
- constructor() {
1620
- this.identifier = "hebrew";
1621
- }
1622
- };
1623
- //#endregion
1624
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/EthiopicCalendar.mjs
1625
- var $97cfca9efd59523d$var$ETHIOPIC_EPOCH = 1723856;
1626
- var $97cfca9efd59523d$var$COPTIC_EPOCH = 1824665;
1627
- var $97cfca9efd59523d$var$AMETE_MIHRET_DELTA = 5500;
1628
- function $97cfca9efd59523d$var$ceToJulianDay(epoch, year, month, day) {
1629
- return epoch + 365 * year + Math.floor(year / 4) + 30 * (month - 1) + day - 1;
1630
- }
1631
- function $97cfca9efd59523d$var$julianDayToCE(epoch, jd) {
1632
- let year = Math.floor(4 * (jd - epoch) / 1461);
1633
- let month = 1 + Math.floor((jd - $97cfca9efd59523d$var$ceToJulianDay(epoch, year, 1, 1)) / 30);
1634
- return [
1635
- year,
1636
- month,
1637
- jd + 1 - $97cfca9efd59523d$var$ceToJulianDay(epoch, year, month, 1)
1638
- ];
1639
- }
1640
- function $97cfca9efd59523d$var$getLeapDay(year) {
1641
- return Math.floor(year % 4 / 3);
1642
- }
1643
- function $97cfca9efd59523d$var$getDaysInMonth(year, month) {
1644
- if (month % 13 !== 0) return 30;
1645
- else return $97cfca9efd59523d$var$getLeapDay(year) + 5;
1646
- }
1647
- var $97cfca9efd59523d$export$26ba6eab5e20cd7d = class {
1648
- fromJulianDay(jd) {
1649
- let [year, month, day] = $97cfca9efd59523d$var$julianDayToCE($97cfca9efd59523d$var$ETHIOPIC_EPOCH, jd);
1650
- let era = "AM";
1651
- if (year <= 0) {
1652
- era = "AA";
1653
- year += $97cfca9efd59523d$var$AMETE_MIHRET_DELTA;
1654
- }
1655
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, era, year, month, day);
1656
- }
1657
- toJulianDay(date) {
1658
- let year = date.year;
1659
- if (date.era === "AA") year -= $97cfca9efd59523d$var$AMETE_MIHRET_DELTA;
1660
- return $97cfca9efd59523d$var$ceToJulianDay($97cfca9efd59523d$var$ETHIOPIC_EPOCH, year, date.month, date.day);
1661
- }
1662
- getDaysInMonth(date) {
1663
- return $97cfca9efd59523d$var$getDaysInMonth(date.year, date.month);
1664
- }
1665
- getMonthsInYear() {
1666
- return 13;
1667
- }
1668
- getDaysInYear(date) {
1669
- return 365 + $97cfca9efd59523d$var$getLeapDay(date.year);
1670
- }
1671
- getMaximumMonthsInYear() {
1672
- return 13;
1673
- }
1674
- getMaximumDaysInMonth() {
1675
- return 30;
1676
- }
1677
- getYearsInEra(date) {
1678
- return date.era === "AA" ? 9999 : 9991;
1679
- }
1680
- getEras() {
1681
- return ["AA", "AM"];
1682
- }
1683
- constructor() {
1684
- this.identifier = "ethiopic";
1685
- }
1686
- };
1687
- var $97cfca9efd59523d$export$d72e0c37005a4914 = class extends $97cfca9efd59523d$export$26ba6eab5e20cd7d {
1688
- fromJulianDay(jd) {
1689
- let [year, month, day] = $97cfca9efd59523d$var$julianDayToCE($97cfca9efd59523d$var$ETHIOPIC_EPOCH, jd);
1690
- year += $97cfca9efd59523d$var$AMETE_MIHRET_DELTA;
1691
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, "AA", year, month, day);
1692
- }
1693
- getEras() {
1694
- return ["AA"];
1695
- }
1696
- getYearsInEra() {
1697
- return 9999;
1698
- }
1699
- constructor(...args) {
1700
- super(...args), this.identifier = "ethioaa";
1701
- }
1702
- };
1703
- var $97cfca9efd59523d$export$fe6243cbe1a4b7c1 = class extends $97cfca9efd59523d$export$26ba6eab5e20cd7d {
1704
- fromJulianDay(jd) {
1705
- let [year, month, day] = $97cfca9efd59523d$var$julianDayToCE($97cfca9efd59523d$var$COPTIC_EPOCH, jd);
1706
- let era = "CE";
1707
- if (year <= 0) {
1708
- era = "BCE";
1709
- year = 1 - year;
1710
- }
1711
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, era, year, month, day);
1712
- }
1713
- toJulianDay(date) {
1714
- let year = date.year;
1715
- if (date.era === "BCE") year = 1 - year;
1716
- return $97cfca9efd59523d$var$ceToJulianDay($97cfca9efd59523d$var$COPTIC_EPOCH, year, date.month, date.day);
1717
- }
1718
- getDaysInMonth(date) {
1719
- let year = date.year;
1720
- if (date.era === "BCE") year = 1 - year;
1721
- return $97cfca9efd59523d$var$getDaysInMonth(year, date.month);
1722
- }
1723
- isInverseEra(date) {
1724
- return date.era === "BCE";
1725
- }
1726
- balanceDate(date) {
1727
- if (date.year <= 0) {
1728
- date.era = date.era === "BCE" ? "CE" : "BCE";
1729
- date.year = 1 - date.year;
1730
- }
1731
- }
1732
- getEras() {
1733
- return ["BCE", "CE"];
1734
- }
1735
- getYearsInEra(date) {
1736
- return date.era === "BCE" ? 9999 : 9715;
1737
- }
1738
- constructor(...args) {
1739
- super(...args), this.identifier = "coptic";
1740
- }
1741
- };
1742
- //#endregion
1743
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/createCalendar.mjs
1744
- function $84102b64e5ca022f$export$dd0bbc9b26defe37(name) {
1745
- switch (name) {
1746
- case "buddhist": return new $63d4eafd4d826996$export$42d20a78301dee44();
1747
- case "ethiopic": return new $97cfca9efd59523d$export$26ba6eab5e20cd7d();
1748
- case "ethioaa": return new $97cfca9efd59523d$export$d72e0c37005a4914();
1749
- case "coptic": return new $97cfca9efd59523d$export$fe6243cbe1a4b7c1();
1750
- case "hebrew": return new $f39495b96f9dbac6$export$ca405048b8fb5af();
1751
- case "indian": return new $11fa67a177e45470$export$39f31c639fa15726();
1752
- case "islamic-civil": return new $fd4f9bc1ba0e49a8$export$2066795aadd37bfc();
1753
- case "islamic-tbla": return new $fd4f9bc1ba0e49a8$export$37f0887f2f9d22f7();
1754
- case "islamic-umalqura": return new $fd4f9bc1ba0e49a8$export$5baab4758c231076();
1755
- case "japanese": return new $34b940b49ba042df$export$b746ab2b60cdffbf();
1756
- case "persian": return new $a0cc0739a536c3b1$export$37fccdbfd14c5939();
1757
- case "roc": return new $c009cc5f64923054$export$65e01080afcb0799();
1758
- default: return new $93635573935797de$export$80ee6245ec4f29ec();
1759
- }
1760
- }
1761
- //#endregion
1762
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.mjs
1763
- var $12a3c853105e5a70$var$formatterCache = /* @__PURE__ */ new Map();
1764
- var $12a3c853105e5a70$export$ad991b66133851cf = class {
1765
- constructor(locale, options = {}) {
1766
- this.formatter = $12a3c853105e5a70$var$getCachedDateFormatter(locale, options);
1767
- this.options = options;
1768
- }
1769
- /**
1770
- * Formats a date as a string according to the locale and format options passed to the
1771
- * constructor.
1772
- */ format(value) {
1773
- return this.formatter.format(value);
1774
- }
1775
- /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */ formatToParts(value) {
1776
- return this.formatter.formatToParts(value);
1777
- }
1778
- /** Formats a date range as a string. */ formatRange(start, end) {
1779
- if (typeof this.formatter.formatRange === "function") return this.formatter.formatRange(start, end);
1780
- if (end < start) throw new RangeError("End date must be >= start date");
1781
- return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
1782
- }
1783
- /** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
1784
- if (typeof this.formatter.formatRangeToParts === "function") return this.formatter.formatRangeToParts(start, end);
1785
- if (end < start) throw new RangeError("End date must be >= start date");
1786
- let startParts = this.formatter.formatToParts(start);
1787
- let endParts = this.formatter.formatToParts(end);
1788
- return [
1789
- ...startParts.map((p) => ({
1790
- ...p,
1791
- source: "startRange"
1792
- })),
1793
- {
1794
- type: "literal",
1795
- value: " – ",
1796
- source: "shared"
1797
- },
1798
- ...endParts.map((p) => ({
1799
- ...p,
1800
- source: "endRange"
1801
- }))
1802
- ];
1803
- }
1804
- /** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
1805
- let resolvedOptions = this.formatter.resolvedOptions();
1806
- if ($12a3c853105e5a70$var$hasBuggyResolvedHourCycle()) {
1807
- if (!this.resolvedHourCycle) this.resolvedHourCycle = $12a3c853105e5a70$var$getResolvedHourCycle(resolvedOptions.locale, this.options);
1808
- resolvedOptions.hourCycle = this.resolvedHourCycle;
1809
- resolvedOptions.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12";
1810
- }
1811
- if (resolvedOptions.calendar === "ethiopic-amete-alem") resolvedOptions.calendar = "ethioaa";
1812
- return resolvedOptions;
1813
- }
1814
- };
1815
- var $12a3c853105e5a70$var$hour12Preferences = {
1816
- true: { ja: "h11" },
1817
- false: {}
1818
- };
1819
- function $12a3c853105e5a70$var$getCachedDateFormatter(locale, options = {}) {
1820
- if (typeof options.hour12 === "boolean" && $12a3c853105e5a70$var$hasBuggyHour12Behavior()) {
1821
- options = { ...options };
1822
- let pref = $12a3c853105e5a70$var$hour12Preferences[String(options.hour12)][locale.split("-")[0]];
1823
- let defaultHourCycle = options.hour12 ? "h12" : "h23";
1824
- options.hourCycle = pref ?? defaultHourCycle;
1825
- delete options.hour12;
1826
- }
1827
- let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
1828
- if ($12a3c853105e5a70$var$formatterCache.has(cacheKey)) return $12a3c853105e5a70$var$formatterCache.get(cacheKey);
1829
- let numberFormatter = new Intl.DateTimeFormat(locale, options);
1830
- $12a3c853105e5a70$var$formatterCache.set(cacheKey, numberFormatter);
1831
- return numberFormatter;
1832
- }
1833
- var $12a3c853105e5a70$var$_hasBuggyHour12Behavior = null;
1834
- function $12a3c853105e5a70$var$hasBuggyHour12Behavior() {
1835
- if ($12a3c853105e5a70$var$_hasBuggyHour12Behavior == null) $12a3c853105e5a70$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat("en-US", {
1836
- hour: "numeric",
1837
- hour12: false
1838
- }).format(new Date(2020, 2, 3, 0)) === "24";
1839
- return $12a3c853105e5a70$var$_hasBuggyHour12Behavior;
1840
- }
1841
- var $12a3c853105e5a70$var$_hasBuggyResolvedHourCycle = null;
1842
- function $12a3c853105e5a70$var$hasBuggyResolvedHourCycle() {
1843
- if ($12a3c853105e5a70$var$_hasBuggyResolvedHourCycle == null) $12a3c853105e5a70$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat("fr", {
1844
- hour: "numeric",
1845
- hour12: false
1846
- }).resolvedOptions().hourCycle === "h12";
1847
- return $12a3c853105e5a70$var$_hasBuggyResolvedHourCycle;
1848
- }
1849
- function $12a3c853105e5a70$var$getResolvedHourCycle(locale, options) {
1850
- if (!options.timeStyle && !options.hour) return void 0;
1851
- locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, "");
1852
- locale += (locale.includes("-u-") ? "" : "-u") + "-nu-latn";
1853
- let formatter = $12a3c853105e5a70$var$getCachedDateFormatter(locale, {
1854
- ...options,
1855
- timeZone: void 0
1856
- });
1857
- let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p) => p.type === "hour").value, 10);
1858
- let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p) => p.type === "hour").value, 10);
1859
- if (min === 0 && max === 23) return "h23";
1860
- if (min === 24 && max === 23) return "h24";
1861
- if (min === 0 && max === 11) return "h11";
1862
- if (min === 12 && max === 11) return "h12";
1863
- throw new Error("Unexpected hour cycle result");
1864
- }
1865
- //#endregion
1866
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/comparators.js
1867
- /**
1868
- * Given a `DateValue` object, convert it to a native `Date` object.
1869
- * If a timezone is provided, the date will be converted to that timezone.
1870
- * If no timezone is provided, the date will be converted to the local timezone.
1871
- */
1872
- function toDate(dateValue, tz = $ad063034c8620db8$export$aa8b41735afcabd2()) {
1873
- if (isZonedDateTime(dateValue)) return dateValue.toDate();
1874
- else return dateValue.toDate(tz);
1875
- }
1876
- function isCalendarDateTime(dateValue) {
1877
- return dateValue instanceof $2aaf608024c21ca1$export$ca871e8dbb80966f;
1878
- }
1879
- function isZonedDateTime(dateValue) {
1880
- return dateValue instanceof $2aaf608024c21ca1$export$d3b7288e7994edea;
1881
- }
1882
- function hasTime(dateValue) {
1883
- return isCalendarDateTime(dateValue) || isZonedDateTime(dateValue);
1884
- }
1885
- /**
1886
- * Given a date, return the number of days in the month.
1887
- */
1888
- function getDaysInMonth(date) {
1889
- if (date instanceof Date) {
1890
- const year = date.getFullYear();
1891
- const month = date.getMonth() + 1;
1892
- /**
1893
- * By using zero as the day, we get the
1894
- * last day of the previous month, which
1895
- * is the month we originally passed in.
1896
- */
1897
- return new Date(year, month, 0).getDate();
1898
- } else return date.set({ day: 100 }).day;
1899
- }
1900
- /**
1901
- * Determine if a date is before the reference date.
1902
- * @param dateToCompare - is this date before the `referenceDate`
1903
- * @param referenceDate - is the `dateToCompare` before this date
1904
- *
1905
- * @see {@link isBeforeOrSame} for inclusive
1906
- */
1907
- function isBefore(dateToCompare, referenceDate) {
1908
- return dateToCompare.compare(referenceDate) < 0;
1909
- }
1910
- /**
1911
- * Determine if a date is after the reference date.
1912
- * @param dateToCompare - is this date after the `referenceDate`
1913
- * @param referenceDate - is the `dateToCompare` after this date
1914
- *
1915
- * @see {@link isAfterOrSame} for inclusive
1916
- */
1917
- function isAfter(dateToCompare, referenceDate) {
1918
- return dateToCompare.compare(referenceDate) > 0;
1919
- }
1920
- /**
1921
- * Determine if a date is before or the same as the reference date.
1922
- *
1923
- * @param dateToCompare - the date to compare
1924
- * @param referenceDate - the reference date to make the comparison against
1925
- *
1926
- * @see {@link isBefore} for non-inclusive
1927
- */
1928
- function isBeforeOrSame(dateToCompare, referenceDate) {
1929
- return dateToCompare.compare(referenceDate) <= 0;
1930
- }
1931
- /**
1932
- * Determine if a date is after or the same as the reference date.
1933
- *
1934
- * @param dateToCompare - is this date after or the same as the `referenceDate`
1935
- * @param referenceDate - is the `dateToCompare` after or the same as this date
1936
- *
1937
- * @see {@link isAfter} for non-inclusive
1938
- */
1939
- function isAfterOrSame(dateToCompare, referenceDate) {
1940
- return dateToCompare.compare(referenceDate) >= 0;
1941
- }
1942
- /**
1943
- * Determine if a date is inclusively between a start and end reference date.
1944
- *
1945
- * @param date - is this date inclusively between the `start` and `end` dates
1946
- * @param start - the start reference date to make the comparison against
1947
- * @param end - the end reference date to make the comparison against
1948
- *
1949
- * @see {@link isBetween} for non-inclusive
1950
- */
1951
- function isBetweenInclusive(date, start, end) {
1952
- return isAfterOrSame(date, start) && isBeforeOrSame(date, end);
1953
- }
1954
- /**
1955
- * Determine if a date is between a start and end reference date.
1956
- *
1957
- * @param date - is this date between the `start` and `end` dates
1958
- * @param start - the start reference date to make the comparison against
1959
- * @param end - the end reference date to make the comparison against
1960
- *
1961
- * @see {@link isBetweenInclusive} for inclusive
1962
- */
1963
- function isBetween(date, start, end) {
1964
- return isAfter(date, start) && isBefore(date, end);
1965
- }
1966
- function getLastFirstDayOfWeek(date, firstDayOfWeek, locale) {
1967
- /**
1968
- * "firstDayOfWeek" is fixed to 0(Sunday) to avoid confusion regarding locales.
1969
- * This also aligns with other date libraries, e.g., date-fns.
1970
- *
1971
- * #see https://github.com/unovue/reka-ui/issues/2157
1972
- */
1973
- const day = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, "sun");
1974
- if (firstDayOfWeek > day) return date.subtract({ days: day + 7 - firstDayOfWeek });
1975
- if (firstDayOfWeek === day) return date;
1976
- return date.subtract({ days: day - firstDayOfWeek });
1977
- }
1978
- function getNextLastDayOfWeek(date, firstDayOfWeek, locale) {
1979
- /**
1980
- * "firstDayOfWeek" is fixed to 0(Sunday) to avoid confusion regarding locales.
1981
- * This also aligns with other date libraries, e.g., date-fns.
1982
- *
1983
- * #see https://github.com/unovue/reka-ui/issues/2157
1984
- */
1985
- const day = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, "sun");
1986
- const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
1987
- if (day === lastDayOfWeek) return date;
1988
- if (day > lastDayOfWeek) return date.add({ days: 7 - day + lastDayOfWeek });
1989
- return date.add({ days: lastDayOfWeek - day });
1990
- }
1991
- function areAllDaysBetweenValid(start, end, isUnavailable, isDisabled, isHighlightable) {
1992
- if (isUnavailable === void 0 && isDisabled === void 0 && isHighlightable === void 0) return true;
1993
- let dCurrent = start.add({ days: 1 });
1994
- if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent)) && !isHighlightable?.(dCurrent)) return false;
1995
- const dEnd = end;
1996
- while (dCurrent.compare(dEnd) < 0) {
1997
- dCurrent = dCurrent.add({ days: 1 });
1998
- if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent)) && !isHighlightable?.(dCurrent)) return false;
1999
- }
2000
- return true;
2001
- }
2002
- /**
2003
- * A helper function used throughout the various date builders
2004
- * to generate a default `DateValue` using the `defaultValue`,
2005
- * `defaultPlaceholder`, and `granularity` props.
2006
- *
2007
- * It's important to match the `DateValue` type being used
2008
- * elsewhere in the builder, so they behave according to the
2009
- * behavior the user expects based on the props they've provided.
2010
- *
2011
- */
2012
- function getDefaultDate(props) {
2013
- const { defaultValue, defaultPlaceholder, granularity = "day", locale = "en" } = props;
2014
- if (Array.isArray(defaultValue) && defaultValue.length) return defaultValue.at(-1).copy();
2015
- if (defaultValue && !Array.isArray(defaultValue)) return defaultValue.copy();
2016
- if (defaultPlaceholder) return defaultPlaceholder.copy();
2017
- const date = /* @__PURE__ */ new Date();
2018
- const year = date.getFullYear();
2019
- const month = date.getMonth() + 1;
2020
- const day = date.getDate();
2021
- const calendarDateTimeGranularities = [
2022
- "hour",
2023
- "minute",
2024
- "second"
2025
- ];
2026
- const calendar = $84102b64e5ca022f$export$dd0bbc9b26defe37(new $12a3c853105e5a70$export$ad991b66133851cf(locale).resolvedOptions().calendar);
2027
- if (calendarDateTimeGranularities.includes(granularity ?? "day")) return $d07e34cce18680fd$export$b4a036af3fc0b032(new $2aaf608024c21ca1$export$ca871e8dbb80966f(year, month, day, 0, 0, 0), calendar);
2028
- return $d07e34cce18680fd$export$b4a036af3fc0b032(new $2aaf608024c21ca1$export$99faa760c7908e4f(year, month, day), calendar);
2029
- }
2030
- function getDefaultTime(props) {
2031
- const { defaultValue, defaultPlaceholder } = props;
2032
- if (defaultValue) return defaultValue.copy();
2033
- if (defaultPlaceholder) return defaultPlaceholder.copy();
2034
- return new $2aaf608024c21ca1$export$680ea196effce5f(0, 0, 0);
2035
- }
2036
- //#endregion
2037
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/utils.js
2038
- /**
2039
- * Splits an array into chunks of a given size.
2040
- * @param arr The array to split.
2041
- * @param size The size of each chunk.
2042
- * @returns An array of arrays, where each sub-array has `size` elements from the original array.
2043
- * @example ```ts
2044
- * const arr = [1, 2, 3, 4, 5, 6, 7, 8];
2045
- * const chunks = chunk(arr, 3);
2046
- * // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]
2047
- * ```
2048
- */
2049
- function chunk(arr, size) {
2050
- const result = [];
2051
- for (let i = 0; i < arr.length; i += size) result.push(arr.slice(i, i + size));
2052
- return result;
2053
- }
2054
- function getOptsByGranularity(granularity, hourCycle, isTimeValue = false) {
2055
- const opts = {
2056
- year: "numeric",
2057
- month: "2-digit",
2058
- day: "2-digit",
2059
- hour: "2-digit",
2060
- minute: "2-digit",
2061
- second: "2-digit",
2062
- timeZoneName: "short",
2063
- hourCycle: normalizeHourCycle(hourCycle),
2064
- hour12: normalizeHour12(hourCycle)
2065
- };
2066
- if (isTimeValue) {
2067
- delete opts.year;
2068
- delete opts.month;
2069
- delete opts.day;
2070
- }
2071
- if (granularity === "day") {
2072
- delete opts.second;
2073
- delete opts.hour;
2074
- delete opts.minute;
2075
- delete opts.timeZoneName;
2076
- }
2077
- if (granularity === "hour") {
2078
- delete opts.minute;
2079
- delete opts.second;
2080
- }
2081
- if (granularity === "minute") delete opts.second;
2082
- return opts;
2083
- }
2084
- function normalizeDateStep(props) {
2085
- return defu(props?.step, {
2086
- year: 1,
2087
- month: 1,
2088
- day: 1,
2089
- hour: 1,
2090
- minute: 1,
2091
- second: 1,
2092
- millisecond: 1
2093
- });
2094
- }
2095
- function handleCalendarInitialFocus(calendar) {
2096
- const selectedDay = calendar.querySelector("[data-selected]");
2097
- if (selectedDay) return selectedDay.focus();
2098
- const today = calendar.querySelector("[data-today]");
2099
- if (today) return today.focus();
2100
- const firstDay = calendar.querySelector("[data-value]:not([data-outside-view]):not([data-disabled])");
2101
- if (firstDay) return firstDay.focus();
2102
- }
2103
- function normalizeHourCycle(hourCycle) {
2104
- if (hourCycle === 24) return "h23";
2105
- if (hourCycle === 12) return "h11";
2106
- }
2107
- function normalizeHour12(hourCycle) {
2108
- if (hourCycle === 24) return false;
2109
- if (hourCycle === 12) return true;
2110
- }
2111
- function getInputType(granularity) {
2112
- return granularity === "day" ? "date" : "datetime-local";
2113
- }
2114
- function normalizeInputValue(date, granularity) {
2115
- if (!date) return "";
2116
- const type = getInputType(granularity);
2117
- const year = String(date.year).padStart(4, "0");
2118
- const month = String(date.month).padStart(2, "0");
2119
- const day = String(date.day).padStart(2, "0");
2120
- if (type === "date") return `${year}-${month}-${day}`;
2121
- const hour = String("hour" in date ? date.hour : 0).padStart(2, "0");
2122
- const minute = String("minute" in date ? date.minute : 0).padStart(2, "0");
2123
- if (granularity === "second") return `${year}-${month}-${day}T${hour}:${minute}:${String("second" in date ? date.second : 0).padStart(2, "0")}`;
2124
- return `${year}-${month}-${day}T${hour}:${minute}`;
2125
- }
2126
- //#endregion
2127
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useDateFormatter.js
2128
- /**
2129
- * Creates a wrapper around the `DateFormatter`, which is
2130
- * an improved version of the {@link Intl.DateTimeFormat} API,
2131
- * that is used internally by the various date builders to
2132
- * easily format dates in a consistent way.
2133
- *
2134
- * @see [DateFormatter](https://react-spectrum.adobe.com/internationalized/date/DateFormatter.html)
2135
- */
2136
- function useDateFormatter(initialLocale, opts = {}) {
2137
- const locale = ref(initialLocale);
2138
- function getLocale() {
2139
- return locale.value;
2140
- }
2141
- function setLocale(newLocale) {
2142
- locale.value = newLocale;
2143
- }
2144
- function custom(date, options) {
2145
- return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2146
- ...opts,
2147
- ...options
2148
- }).format(date);
2149
- }
2150
- function selectedDate(date, includeTime = true) {
2151
- if (hasTime(date) && includeTime) return custom(toDate(date), {
2152
- dateStyle: "long",
2153
- timeStyle: "long"
2154
- });
2155
- else return custom(toDate(date), { dateStyle: "long" });
2156
- }
2157
- function fullMonthAndYear(date, options = {}) {
2158
- return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2159
- ...opts,
2160
- month: "long",
2161
- year: "numeric",
2162
- ...options
2163
- }).format(date);
2164
- }
2165
- function fullMonth(date, options = {}) {
2166
- return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2167
- ...opts,
2168
- month: "long",
2169
- ...options
2170
- }).format(date);
2171
- }
2172
- function getMonths() {
2173
- const defaultDate = $ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2());
2174
- return [
2175
- 1,
2176
- 2,
2177
- 3,
2178
- 4,
2179
- 5,
2180
- 6,
2181
- 7,
2182
- 8,
2183
- 9,
2184
- 10,
2185
- 11,
2186
- 12
2187
- ].map((item) => ({
2188
- label: fullMonth(toDate(defaultDate.set({ month: item }))),
2189
- value: item
2190
- }));
2191
- }
2192
- function fullYear(date, options = {}) {
2193
- return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2194
- ...opts,
2195
- year: "numeric",
2196
- ...options
2197
- }).format(date);
2198
- }
2199
- function toParts(date, options) {
2200
- if (isZonedDateTime(date)) return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2201
- ...opts,
2202
- ...options,
2203
- timeZone: date.timeZone
2204
- }).formatToParts(toDate(date));
2205
- else return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2206
- ...opts,
2207
- ...options
2208
- }).formatToParts(toDate(date));
2209
- }
2210
- function dayOfWeek(date, length = "narrow") {
2211
- return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2212
- ...opts,
2213
- weekday: length
2214
- }).format(date);
2215
- }
2216
- function dayPeriod(date) {
2217
- const value = new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
2218
- ...opts,
2219
- hour: "numeric",
2220
- minute: "numeric"
2221
- }).formatToParts(date).find((p) => p.type === "dayPeriod")?.value;
2222
- if (value === "PM" || value === "pm" || value === "p.m.") return "PM";
2223
- return "AM";
2224
- }
2225
- const defaultPartOptions = {
2226
- year: "numeric",
2227
- month: "numeric",
2228
- day: "numeric",
2229
- hour: "numeric",
2230
- minute: "numeric",
2231
- second: "numeric"
2232
- };
2233
- function part(dateObj, type, options = {}) {
2234
- const part$1 = toParts(dateObj, {
2235
- ...defaultPartOptions,
2236
- ...options
2237
- }).find((p) => p.type === type);
2238
- return part$1 ? part$1.value : "";
2239
- }
2240
- return {
2241
- setLocale,
2242
- getLocale,
2243
- fullMonth,
2244
- fullYear,
2245
- fullMonthAndYear,
2246
- toParts,
2247
- custom,
2248
- part,
2249
- dayPeriod,
2250
- selectedDate,
2251
- dayOfWeek,
2252
- getMonths
2253
- };
2254
- }
2255
- //#endregion
2256
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useLocale.js
2257
- /**
2258
- * The `useLocale` function provides a way to access the current locale in your application.
2259
- * @param {Ref<string | undefined>} [locale] - An optional ref containing the locale.
2260
- * @returns A computed ref holding the resolved locale.
2261
- */
2262
- function useLocale(locale) {
2263
- const context = injectConfigProviderContext({ locale: ref("en") });
2264
- return computed(() => locale?.value || context.locale?.value || "en");
2265
- }
2266
- //#endregion
2267
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/parts.js
2268
- var DATE_SEGMENT_PARTS = [
2269
- "day",
2270
- "month",
2271
- "year"
2272
- ];
2273
- var TIME_SEGMENT_PARTS = [
2274
- "hour",
2275
- "minute",
2276
- "second",
2277
- "dayPeriod"
2278
- ];
2279
- var NON_EDITABLE_SEGMENT_PARTS = ["literal", "timeZoneName"];
2280
- var EDITABLE_SEGMENT_PARTS = [...DATE_SEGMENT_PARTS, ...TIME_SEGMENT_PARTS];
2281
- [...TIME_SEGMENT_PARTS];
2282
- [...EDITABLE_SEGMENT_PARTS, ...NON_EDITABLE_SEGMENT_PARTS].filter((part) => part !== "literal");
2283
- function isDateSegmentPart(part) {
2284
- return DATE_SEGMENT_PARTS.includes(part);
2285
- }
2286
- function isSegmentPart(part) {
2287
- return EDITABLE_SEGMENT_PARTS.includes(part);
2288
- }
2289
- //#endregion
2290
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/placeholders.js
2291
- var supportedLocales = [
2292
- "ach",
2293
- "af",
2294
- "am",
2295
- "an",
2296
- "ar",
2297
- "ast",
2298
- "az",
2299
- "be",
2300
- "bg",
2301
- "bn",
2302
- "br",
2303
- "bs",
2304
- "ca",
2305
- "cak",
2306
- "ckb",
2307
- "cs",
2308
- "cy",
2309
- "da",
2310
- "de",
2311
- "dsb",
2312
- "el",
2313
- "en",
2314
- "eo",
2315
- "es",
2316
- "et",
2317
- "eu",
2318
- "fa",
2319
- "ff",
2320
- "fi",
2321
- "fr",
2322
- "fy",
2323
- "ga",
2324
- "gd",
2325
- "gl",
2326
- "he",
2327
- "hr",
2328
- "hsb",
2329
- "hu",
2330
- "ia",
2331
- "id",
2332
- "it",
2333
- "ja",
2334
- "ka",
2335
- "kk",
2336
- "kn",
2337
- "ko",
2338
- "lb",
2339
- "lo",
2340
- "lt",
2341
- "lv",
2342
- "meh",
2343
- "ml",
2344
- "ms",
2345
- "nl",
2346
- "nn",
2347
- "no",
2348
- "oc",
2349
- "pl",
2350
- "pt",
2351
- "rm",
2352
- "ro",
2353
- "ru",
2354
- "sc",
2355
- "scn",
2356
- "sk",
2357
- "sl",
2358
- "sr",
2359
- "sv",
2360
- "szl",
2361
- "tg",
2362
- "th",
2363
- "tr",
2364
- "uk",
2365
- "zh-CN",
2366
- "zh-TW"
2367
- ];
2368
- var placeholderFields = [
2369
- "year",
2370
- "month",
2371
- "day"
2372
- ];
2373
- var placeholders = {
2374
- "ach": {
2375
- year: "mwaka",
2376
- month: "dwe",
2377
- day: "nino"
2378
- },
2379
- "af": {
2380
- year: "jjjj",
2381
- month: "mm",
2382
- day: "dd"
2383
- },
2384
- "am": {
2385
- year: "ዓዓዓዓ",
2386
- month: "ሚሜ",
2387
- day: "ቀቀ"
2388
- },
2389
- "an": {
2390
- year: "aaaa",
2391
- month: "mm",
2392
- day: "dd"
2393
- },
2394
- "ar": {
2395
- year: "سنة",
2396
- month: "شهر",
2397
- day: "يوم"
2398
- },
2399
- "ast": {
2400
- year: "aaaa",
2401
- month: "mm",
2402
- day: "dd"
2403
- },
2404
- "az": {
2405
- year: "iiii",
2406
- month: "aa",
2407
- day: "gg"
2408
- },
2409
- "be": {
2410
- year: "гггг",
2411
- month: "мм",
2412
- day: "дд"
2413
- },
2414
- "bg": {
2415
- year: "гггг",
2416
- month: "мм",
2417
- day: "дд"
2418
- },
2419
- "bn": {
2420
- year: "yyyy",
2421
- month: "মিমি",
2422
- day: "dd"
2423
- },
2424
- "br": {
2425
- year: "bbbb",
2426
- month: "mm",
2427
- day: "dd"
2428
- },
2429
- "bs": {
2430
- year: "gggg",
2431
- month: "mm",
2432
- day: "dd"
2433
- },
2434
- "ca": {
2435
- year: "aaaa",
2436
- month: "mm",
2437
- day: "dd"
2438
- },
2439
- "cak": {
2440
- year: "jjjj",
2441
- month: "ii",
2442
- day: "q'q'"
2443
- },
2444
- "ckb": {
2445
- year: "ساڵ",
2446
- month: "مانگ",
2447
- day: "ڕۆژ"
2448
- },
2449
- "cs": {
2450
- year: "rrrr",
2451
- month: "mm",
2452
- day: "dd"
2453
- },
2454
- "cy": {
2455
- year: "bbbb",
2456
- month: "mm",
2457
- day: "dd"
2458
- },
2459
- "da": {
2460
- year: "åååå",
2461
- month: "mm",
2462
- day: "dd"
2463
- },
2464
- "de": {
2465
- year: "jjjj",
2466
- month: "mm",
2467
- day: "tt"
2468
- },
2469
- "dsb": {
2470
- year: "llll",
2471
- month: "mm",
2472
- day: "źź"
2473
- },
2474
- "el": {
2475
- year: "εεεε",
2476
- month: "μμ",
2477
- day: "ηη"
2478
- },
2479
- "en": {
2480
- year: "yyyy",
2481
- month: "mm",
2482
- day: "dd"
2483
- },
2484
- "eo": {
2485
- year: "jjjj",
2486
- month: "mm",
2487
- day: "tt"
2488
- },
2489
- "es": {
2490
- year: "aaaa",
2491
- month: "mm",
2492
- day: "dd"
2493
- },
2494
- "et": {
2495
- year: "aaaa",
2496
- month: "kk",
2497
- day: "pp"
2498
- },
2499
- "eu": {
2500
- year: "uuuu",
2501
- month: "hh",
2502
- day: "ee"
2503
- },
2504
- "fa": {
2505
- year: "سال",
2506
- month: "ماه",
2507
- day: "روز"
2508
- },
2509
- "ff": {
2510
- year: "hhhh",
2511
- month: "ll",
2512
- day: "ññ"
2513
- },
2514
- "fi": {
2515
- year: "vvvv",
2516
- month: "kk",
2517
- day: "pp"
2518
- },
2519
- "fr": {
2520
- year: "aaaa",
2521
- month: "mm",
2522
- day: "jj"
2523
- },
2524
- "fy": {
2525
- year: "jjjj",
2526
- month: "mm",
2527
- day: "dd"
2528
- },
2529
- "ga": {
2530
- year: "bbbb",
2531
- month: "mm",
2532
- day: "ll"
2533
- },
2534
- "gd": {
2535
- year: "bbbb",
2536
- month: "mm",
2537
- day: "ll"
2538
- },
2539
- "gl": {
2540
- year: "aaaa",
2541
- month: "mm",
2542
- day: "dd"
2543
- },
2544
- "he": {
2545
- year: "שנה",
2546
- month: "חודש",
2547
- day: "יום"
2548
- },
2549
- "hr": {
2550
- year: "gggg",
2551
- month: "mm",
2552
- day: "dd"
2553
- },
2554
- "hsb": {
2555
- year: "llll",
2556
- month: "mm",
2557
- day: "dd"
2558
- },
2559
- "hu": {
2560
- year: "éééé",
2561
- month: "hh",
2562
- day: "nn"
2563
- },
2564
- "ia": {
2565
- year: "aaaa",
2566
- month: "mm",
2567
- day: "dd"
2568
- },
2569
- "id": {
2570
- year: "tttt",
2571
- month: "bb",
2572
- day: "hh"
2573
- },
2574
- "it": {
2575
- year: "aaaa",
2576
- month: "mm",
2577
- day: "gg"
2578
- },
2579
- "ja": {
2580
- year: " 年 ",
2581
- month: "月",
2582
- day: "日"
2583
- },
2584
- "ka": {
2585
- year: "წწწწ",
2586
- month: "თთ",
2587
- day: "რრ"
2588
- },
2589
- "kk": {
2590
- year: "жжжж",
2591
- month: "аа",
2592
- day: "кк"
2593
- },
2594
- "kn": {
2595
- year: "ವವವವ",
2596
- month: "ಮಿಮೀ",
2597
- day: "ದಿದಿ"
2598
- },
2599
- "ko": {
2600
- year: "연도",
2601
- month: "월",
2602
- day: "일"
2603
- },
2604
- "lb": {
2605
- year: "jjjj",
2606
- month: "mm",
2607
- day: "dd"
2608
- },
2609
- "lo": {
2610
- year: "ປປປປ",
2611
- month: "ດດ",
2612
- day: "ວວ"
2613
- },
2614
- "lt": {
2615
- year: "mmmm",
2616
- month: "mm",
2617
- day: "dd"
2618
- },
2619
- "lv": {
2620
- year: "gggg",
2621
- month: "mm",
2622
- day: "dd"
2623
- },
2624
- "meh": {
2625
- year: "aaaa",
2626
- month: "mm",
2627
- day: "dd"
2628
- },
2629
- "ml": {
2630
- year: "വർഷം",
2631
- month: "മാസം",
2632
- day: "തീയതി"
2633
- },
2634
- "ms": {
2635
- year: "tttt",
2636
- month: "mm",
2637
- day: "hh"
2638
- },
2639
- "nl": {
2640
- year: "jjjj",
2641
- month: "mm",
2642
- day: "dd"
2643
- },
2644
- "nn": {
2645
- year: "åååå",
2646
- month: "mm",
2647
- day: "dd"
2648
- },
2649
- "no": {
2650
- year: "åååå",
2651
- month: "mm",
2652
- day: "dd"
2653
- },
2654
- "oc": {
2655
- year: "aaaa",
2656
- month: "mm",
2657
- day: "jj"
2658
- },
2659
- "pl": {
2660
- year: "rrrr",
2661
- month: "mm",
2662
- day: "dd"
2663
- },
2664
- "pt": {
2665
- year: "aaaa",
2666
- month: "mm",
2667
- day: "dd"
2668
- },
2669
- "rm": {
2670
- year: "oooo",
2671
- month: "mm",
2672
- day: "dd"
2673
- },
2674
- "ro": {
2675
- year: "aaaa",
2676
- month: "ll",
2677
- day: "zz"
2678
- },
2679
- "ru": {
2680
- year: "гггг",
2681
- month: "мм",
2682
- day: "дд"
2683
- },
2684
- "sc": {
2685
- year: "aaaa",
2686
- month: "mm",
2687
- day: "dd"
2688
- },
2689
- "scn": {
2690
- year: "aaaa",
2691
- month: "mm",
2692
- day: "jj"
2693
- },
2694
- "sk": {
2695
- year: "rrrr",
2696
- month: "mm",
2697
- day: "dd"
2698
- },
2699
- "sl": {
2700
- year: "llll",
2701
- month: "mm",
2702
- day: "dd"
2703
- },
2704
- "sr": {
2705
- year: "гггг",
2706
- month: "мм",
2707
- day: "дд"
2708
- },
2709
- "sv": {
2710
- year: "åååå",
2711
- month: "mm",
2712
- day: "dd"
2713
- },
2714
- "szl": {
2715
- year: "rrrr",
2716
- month: "mm",
2717
- day: "dd"
2718
- },
2719
- "tg": {
2720
- year: "сссс",
2721
- month: "мм",
2722
- day: "рр"
2723
- },
2724
- "th": {
2725
- year: "ปปปป",
2726
- month: "ดด",
2727
- day: "วว"
2728
- },
2729
- "tr": {
2730
- year: "yyyy",
2731
- month: "aa",
2732
- day: "gg"
2733
- },
2734
- "uk": {
2735
- year: "рррр",
2736
- month: "мм",
2737
- day: "дд"
2738
- },
2739
- "zh-CN": {
2740
- year: "年",
2741
- month: "月",
2742
- day: "日"
2743
- },
2744
- "zh-TW": {
2745
- year: "年",
2746
- month: "月",
2747
- day: "日"
2748
- }
2749
- };
2750
- function getPlaceholderObj(locale) {
2751
- if (!isSupportedLocale(locale)) {
2752
- const localeLanguage = getLocaleLanguage(locale);
2753
- if (!isSupportedLocale(localeLanguage)) return placeholders.en;
2754
- else return placeholders[localeLanguage];
2755
- } else return placeholders[locale];
2756
- }
2757
- function getPlaceholder(field, value, locale) {
2758
- if (isPlaceholderField(field)) return getPlaceholderObj(locale)[field];
2759
- if (isDefaultField(field)) return value;
2760
- if (isTimeField(field)) return "––";
2761
- return "";
2762
- }
2763
- function isSupportedLocale(locale) {
2764
- return supportedLocales.includes(locale);
2765
- }
2766
- function isPlaceholderField(field) {
2767
- return placeholderFields.includes(field);
2768
- }
2769
- function isTimeField(field) {
2770
- return field === "hour" || field === "minute" || field === "second";
2771
- }
2772
- function isDefaultField(field) {
2773
- return field === "era" || field === "dayPeriod";
2774
- }
2775
- function getLocaleLanguage(locale) {
2776
- if (Intl.Locale) return new Intl.Locale(locale).language;
2777
- return locale.split("-")[0];
2778
- }
2779
- //#endregion
2780
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/parser.js
2781
- var calendarDateTimeGranularities = [
2782
- "hour",
2783
- "minute",
2784
- "second"
2785
- ];
2786
- function syncTimeSegmentValues(props) {
2787
- return Object.fromEntries(TIME_SEGMENT_PARTS.map((part) => {
2788
- if (part === "dayPeriod") return [part, props.formatter.dayPeriod(toDate(props.value))];
2789
- return [part, props.value[part]];
2790
- }));
2791
- }
2792
- function syncSegmentValues(props) {
2793
- const { formatter } = props;
2794
- const dateValues = DATE_SEGMENT_PARTS.map((part) => {
2795
- return [part, props.value[part]];
2796
- });
2797
- if ("hour" in props.value) {
2798
- const timeValues = syncTimeSegmentValues({
2799
- value: props.value,
2800
- formatter
2801
- });
2802
- return {
2803
- ...Object.fromEntries(dateValues),
2804
- ...timeValues
2805
- };
2806
- }
2807
- return Object.fromEntries(dateValues);
2808
- }
2809
- function initializeTimeSegmentValues(granularity) {
2810
- return Object.fromEntries(TIME_SEGMENT_PARTS.map((part) => {
2811
- if (part === "dayPeriod") return [part, "AM"];
2812
- return [part, null];
2813
- }).filter(([key]) => {
2814
- if (key === "literal" || key === null) return false;
2815
- if (granularity === "minute" && key === "second") return false;
2816
- if (granularity === "hour" && (key === "second" || key === "minute")) return false;
2817
- else return true;
2818
- }));
2819
- }
2820
- function initializeSegmentValues(granularity) {
2821
- const initialParts = EDITABLE_SEGMENT_PARTS.map((part) => {
2822
- if (part === "dayPeriod") return [part, "AM"];
2823
- return [part, null];
2824
- }).filter(([key]) => {
2825
- if (key === "literal" || key === null) return false;
2826
- if (granularity === "minute" && key === "second") return false;
2827
- if (granularity === "hour" && (key === "second" || key === "minute")) return false;
2828
- if (granularity === "day") return !calendarDateTimeGranularities.includes(key) && key !== "dayPeriod";
2829
- else return true;
2830
- });
2831
- return Object.fromEntries(initialParts);
2832
- }
2833
- function createContentObj(props) {
2834
- const { segmentValues, formatter, locale } = props;
2835
- function getPartContent(part) {
2836
- if ("hour" in segmentValues) {
2837
- const value = segmentValues[part];
2838
- if (value !== null) {
2839
- if (part === "day") return formatter.part(props.dateRef.set({
2840
- [part]: value,
2841
- month: segmentValues.month ?? 1
2842
- }), part, { hourCycle: normalizeHourCycle(props.hourCycle) });
2843
- return formatter.part(props.dateRef.set({ [part]: value }), part, { hourCycle: normalizeHourCycle(props.hourCycle) });
2844
- } else return getPlaceholder(part, "", locale.value);
2845
- } else {
2846
- if (isDateSegmentPart(part)) {
2847
- const value = segmentValues[part];
2848
- if (value !== null) {
2849
- if (part === "day") return formatter.part(props.dateRef.set({
2850
- [part]: value,
2851
- month: segmentValues.month ?? 1
2852
- }), part);
2853
- return formatter.part(props.dateRef.set({ [part]: value }), part);
2854
- } else return getPlaceholder(part, "", locale.value);
2855
- }
2856
- return "";
2857
- }
2858
- }
2859
- return Object.keys(segmentValues).reduce((obj, part) => {
2860
- if (!isSegmentPart(part)) return obj;
2861
- if ("hour" in segmentValues && part === "dayPeriod") {
2862
- const value = segmentValues[part];
2863
- if (value !== null) obj[part] = value;
2864
- else obj[part] = getPlaceholder(part, "AM", locale.value);
2865
- } else obj[part] = getPartContent(part);
2866
- return obj;
2867
- }, {});
2868
- }
2869
- function createContentArr(props) {
2870
- const { granularity, formatter, contentObj, hideTimeZone, hourCycle, isTimeValue } = props;
2871
- return formatter.toParts(props.dateRef, getOptsByGranularity(granularity, hourCycle, isTimeValue)).map((part) => {
2872
- if ([
2873
- "literal",
2874
- "timeZoneName",
2875
- null
2876
- ].includes(part.type) || !isSegmentPart(part.type)) return {
2877
- part: part.type,
2878
- value: part.value
2879
- };
2880
- return {
2881
- part: part.type,
2882
- value: contentObj[part.type]
2883
- };
2884
- }).filter((segment) => {
2885
- if (segment.part === null || segment.value === null) return false;
2886
- if (segment.part === "timeZoneName" && (!isZonedDateTime(props.dateRef) || hideTimeZone)) return false;
2887
- if ((!isZonedDateTime(props.dateRef) || hideTimeZone) && segment.part === "literal" && ["[", "]"].includes(segment.value.trim())) return false;
2888
- return true;
2889
- });
2890
- }
2891
- function createContent(props) {
2892
- const contentObj = createContentObj(props);
2893
- return {
2894
- obj: contentObj,
2895
- arr: createContentArr({
2896
- contentObj,
2897
- ...props
2898
- })
2899
- };
2900
- }
2901
- //#endregion
2902
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/segment.js
2903
- function isSegmentNavigationKey(key) {
2904
- const kbd = useKbd();
2905
- if (key === kbd.ARROW_RIGHT || key === kbd.ARROW_LEFT) return true;
2906
- return false;
2907
- }
2908
- function isNumberString(value) {
2909
- if (Number.isNaN(Number.parseInt(value))) return false;
2910
- return true;
2911
- }
2912
- function isAcceptableSegmentKey(key) {
2913
- const kbd = useKbd();
2914
- if ([
2915
- kbd.ENTER,
2916
- kbd.ARROW_UP,
2917
- kbd.ARROW_DOWN,
2918
- kbd.ARROW_LEFT,
2919
- kbd.ARROW_RIGHT,
2920
- kbd.BACKSPACE,
2921
- kbd.SPACE,
2922
- "a",
2923
- "A",
2924
- "p",
2925
- "P"
2926
- ].includes(key)) return true;
2927
- if (isNumberString(key)) return true;
2928
- return false;
2929
- }
2930
- function getSegmentElements(parentElement) {
2931
- return Array.from(parentElement.querySelectorAll("[data-reka-date-field-segment]")).filter((item) => item.getAttribute("data-reka-date-field-segment") !== "literal");
2932
- }
2933
- function getTimeFieldSegmentElements(parentElement) {
2934
- return Array.from(parentElement.querySelectorAll("[data-reka-time-field-segment]")).filter((item) => item.getAttribute("data-reka-time-field-segment") !== "literal");
2935
- }
2936
- //#endregion
2937
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/useDateField.js
2938
- var DIGIT_REG = /^\d$/;
2939
- function commonSegmentAttrs(props) {
2940
- return {
2941
- role: "spinbutton",
2942
- contenteditable: true,
2943
- tabindex: props.disabled ? void 0 : 0,
2944
- spellcheck: false,
2945
- inputmode: "numeric",
2946
- autocorrect: "off",
2947
- enterkeyhint: "next",
2948
- style: "caret-color: transparent;"
2949
- };
2950
- }
2951
- function daySegmentAttrs(props) {
2952
- const { segmentValues, placeholder } = props;
2953
- const isEmpty = segmentValues.day === null;
2954
- const dateFields = {};
2955
- if (segmentValues.day) dateFields.day = segmentValues.day;
2956
- if (segmentValues.month) dateFields.month = segmentValues.month;
2957
- const date = Object.keys(dateFields).length > 0 ? placeholder.set(dateFields) : placeholder;
2958
- const valueNow = date.day;
2959
- const valueMin = 1;
2960
- const valueMax = getDaysInMonth(date);
2961
- const valueText = isEmpty ? "Empty" : `${valueNow}`;
2962
- return {
2963
- ...commonSegmentAttrs(props),
2964
- "aria-label": "day,",
2965
- "aria-valuemin": valueMin,
2966
- "aria-valuemax": valueMax,
2967
- "aria-valuenow": valueNow,
2968
- "aria-valuetext": valueText,
2969
- "data-placeholder": isEmpty ? "" : void 0
2970
- };
2971
- }
2972
- function monthSegmentAttrs(props) {
2973
- const { segmentValues, placeholder, formatter } = props;
2974
- const isEmpty = segmentValues.month === null;
2975
- const date = segmentValues.month ? placeholder.set({ month: segmentValues.month }) : placeholder;
2976
- const valueNow = date.month;
2977
- const valueMin = 1;
2978
- const valueMax = 12;
2979
- const valueText = isEmpty ? "Empty" : `${valueNow} - ${formatter.fullMonth(toDate(date))}`;
2980
- return {
2981
- ...commonSegmentAttrs(props),
2982
- "aria-label": "month, ",
2983
- "contenteditable": true,
2984
- "aria-valuemin": valueMin,
2985
- "aria-valuemax": valueMax,
2986
- "aria-valuenow": valueNow,
2987
- "aria-valuetext": valueText,
2988
- "data-placeholder": isEmpty ? "" : void 0
2989
- };
2990
- }
2991
- function yearSegmentAttrs(props) {
2992
- const { segmentValues, placeholder } = props;
2993
- const isEmpty = segmentValues.year === null;
2994
- const date = segmentValues.year ? placeholder.set({ year: segmentValues.year }) : placeholder;
2995
- const valueMin = 1;
2996
- const valueMax = 9999;
2997
- const valueNow = date.year;
2998
- const valueText = isEmpty ? "Empty" : `${valueNow}`;
2999
- return {
3000
- ...commonSegmentAttrs(props),
3001
- "aria-label": "year, ",
3002
- "aria-valuemin": valueMin,
3003
- "aria-valuemax": valueMax,
3004
- "aria-valuenow": valueNow,
3005
- "aria-valuetext": valueText,
3006
- "data-placeholder": isEmpty ? "" : void 0
3007
- };
3008
- }
3009
- function hourSegmentAttrs(props) {
3010
- const { segmentValues, hourCycle, placeholder } = props;
3011
- if (!("hour" in segmentValues) || !("hour" in placeholder)) return {};
3012
- const isEmpty = segmentValues.hour === null;
3013
- const date = segmentValues.hour ? placeholder.set({ hour: segmentValues.hour }) : placeholder;
3014
- const valueMin = hourCycle === 12 ? 1 : 0;
3015
- const valueMax = hourCycle === 12 ? 12 : 23;
3016
- const valueNow = date.hour;
3017
- const valueText = isEmpty ? "Empty" : `${valueNow} ${segmentValues.dayPeriod ?? ""}`;
3018
- return {
3019
- ...commonSegmentAttrs(props),
3020
- "aria-label": "hour, ",
3021
- "aria-valuemin": valueMin,
3022
- "aria-valuemax": valueMax,
3023
- "aria-valuenow": valueNow,
3024
- "aria-valuetext": valueText,
3025
- "data-placeholder": isEmpty ? "" : void 0
3026
- };
3027
- }
3028
- function minuteSegmentAttrs(props) {
3029
- const { segmentValues, placeholder } = props;
3030
- if (!("minute" in segmentValues) || !("minute" in placeholder)) return {};
3031
- const isEmpty = segmentValues.minute === null;
3032
- const valueNow = (segmentValues.minute ? placeholder.set({ minute: segmentValues.minute }) : placeholder).minute;
3033
- const valueMin = 0;
3034
- const valueMax = 59;
3035
- const valueText = isEmpty ? "Empty" : `${valueNow}`;
3036
- return {
3037
- ...commonSegmentAttrs(props),
3038
- "aria-label": "minute, ",
3039
- "aria-valuemin": valueMin,
3040
- "aria-valuemax": valueMax,
3041
- "aria-valuenow": valueNow,
3042
- "aria-valuetext": valueText,
3043
- "data-placeholder": isEmpty ? "" : void 0
3044
- };
3045
- }
3046
- function secondSegmentAttrs(props) {
3047
- const { segmentValues, placeholder } = props;
3048
- if (!("second" in segmentValues) || !("second" in placeholder)) return {};
3049
- const isEmpty = segmentValues.second === null;
3050
- const valueNow = (segmentValues.second ? placeholder.set({ second: segmentValues.second }) : placeholder).second;
3051
- const valueMin = 0;
3052
- const valueMax = 59;
3053
- const valueText = isEmpty ? "Empty" : `${valueNow}`;
3054
- return {
3055
- ...commonSegmentAttrs(props),
3056
- "aria-label": "second, ",
3057
- "aria-valuemin": valueMin,
3058
- "aria-valuemax": valueMax,
3059
- "aria-valuenow": valueNow,
3060
- "aria-valuetext": valueText,
3061
- "data-placeholder": isEmpty ? "" : void 0
3062
- };
3063
- }
3064
- function dayPeriodSegmentAttrs(props) {
3065
- const { segmentValues } = props;
3066
- if (!("dayPeriod" in segmentValues)) return {};
3067
- const valueMin = 0;
3068
- const valueMax = 12;
3069
- const valueNow = segmentValues.hour ? segmentValues.hour > 12 ? segmentValues.hour - 12 : segmentValues.hour : 0;
3070
- const valueText = segmentValues.dayPeriod ?? "AM";
3071
- return {
3072
- ...commonSegmentAttrs(props),
3073
- "inputmode": "text",
3074
- "aria-label": "AM/PM",
3075
- "aria-valuemin": valueMin,
3076
- "aria-valuemax": valueMax,
3077
- "aria-valuenow": valueNow,
3078
- "aria-valuetext": valueText
3079
- };
3080
- }
3081
- function literalSegmentAttrs(_props) {
3082
- return {
3083
- "aria-hidden": true,
3084
- "data-segment": "literal"
3085
- };
3086
- }
3087
- function timeZoneSegmentAttrs(props) {
3088
- return {
3089
- "role": "textbox",
3090
- "aria-label": "timezone, ",
3091
- "data-readonly": true,
3092
- "data-segment": "timeZoneName",
3093
- "tabindex": props.disabled ? void 0 : 0,
3094
- "style": "caret-color: transparent;"
3095
- };
3096
- }
3097
- function eraSegmentAttrs(props) {
3098
- const { segmentValues, placeholder } = props;
3099
- const valueMin = 0;
3100
- const valueMax = 0;
3101
- const valueNow = 0;
3102
- const valueText = "era" in segmentValues ? segmentValues.era : placeholder.era;
3103
- return {
3104
- ...commonSegmentAttrs(props),
3105
- "aria-label": "era",
3106
- "aria-valuemin": valueMin,
3107
- "aria-valuemax": valueMax,
3108
- "aria-valuenow": valueNow,
3109
- "aria-valuetext": valueText
3110
- };
3111
- }
3112
- var segmentBuilders = {
3113
- day: { attrs: daySegmentAttrs },
3114
- month: { attrs: monthSegmentAttrs },
3115
- year: { attrs: yearSegmentAttrs },
3116
- hour: { attrs: hourSegmentAttrs },
3117
- minute: { attrs: minuteSegmentAttrs },
3118
- second: { attrs: secondSegmentAttrs },
3119
- dayPeriod: { attrs: dayPeriodSegmentAttrs },
3120
- literal: { attrs: literalSegmentAttrs },
3121
- timeZoneName: { attrs: timeZoneSegmentAttrs },
3122
- era: { attrs: eraSegmentAttrs }
3123
- };
3124
- function useDateField(props) {
3125
- const kbd = useKbd();
3126
- function minuteSecondIncrementation({ e, part, dateRef, prevValue }) {
3127
- const step = props.step.value[part] ?? 1;
3128
- const sign = e.key === kbd.ARROW_UP ? step : -step;
3129
- const min = 0;
3130
- const max = 59;
3131
- if (prevValue === null) return sign > 0 ? min : max;
3132
- const cycleArgs = [part, sign];
3133
- return dateRef.set({ [part]: prevValue }).cycle(...cycleArgs)[part];
3134
- }
3135
- function deleteValue(prevValue) {
3136
- props.hasLeftFocus.value = false;
3137
- if (prevValue === null) return prevValue;
3138
- const str = prevValue.toString();
3139
- if (str.length === 1) {
3140
- props.modelValue.value = void 0;
3141
- return null;
3142
- }
3143
- return Number.parseInt(str.slice(0, -1));
3144
- }
3145
- function dateTimeValueIncrementation({ e, part, dateRef, prevValue }) {
3146
- const step = props.step.value[part] ?? 1;
3147
- const sign = e.key === kbd.ARROW_UP ? step : -step;
3148
- if (prevValue === null) return dateRef[part];
3149
- if (part === "hour" && "hour" in dateRef) {
3150
- const cycleArgs$1 = [part, sign];
3151
- return dateRef.set({ [part]: prevValue }).cycle(...cycleArgs$1)[part];
3152
- }
3153
- const cycleArgs = [part, sign];
3154
- if (part === "day") return dateRef.set({
3155
- [part]: prevValue,
3156
- month: props.segmentValues.value.month ?? 1
3157
- }).cycle(...cycleArgs)[part];
3158
- return dateRef.set({ [part]: prevValue }).cycle(...cycleArgs)[part];
3159
- }
3160
- function updateDayOrMonth(max, num, prev) {
3161
- let moveToNext = false;
3162
- const maxStart = Math.floor(max / 10);
3163
- /**
3164
- * If the user has left the segment, we want to reset the
3165
- * `prev` value so that we can start the segment over again
3166
- * when the user types a number.
3167
- */
3168
- if (props.hasLeftFocus.value) {
3169
- props.hasLeftFocus.value = false;
3170
- props.lastKeyZero.value = false;
3171
- prev = null;
3172
- }
3173
- if (prev === null) {
3174
- /**
3175
- * If the user types a 0 as the first number, we want
3176
- * to keep track of that so that when they type the next
3177
- * number, we can move to the next segment.
3178
- */
3179
- if (num === 0) {
3180
- props.lastKeyZero.value = true;
3181
- return {
3182
- value: null,
3183
- moveToNext
3184
- };
3185
- }
3186
- /**
3187
- * If the last key was a 0, or if the first number is
3188
- * greater than the max start digit (0-3 in most cases), then
3189
- * we want to move to the next segment, since it's not possible
3190
- * to continue typing a valid number in this segment.
3191
- */
3192
- if (props.lastKeyZero.value || num > maxStart) moveToNext = true;
3193
- props.lastKeyZero.value = false;
3194
- /**
3195
- * If none of the above conditions are met, then we can just
3196
- * return the number as the segment value and continue typing
3197
- * in this segment.
3198
- */
3199
- return {
3200
- value: num,
3201
- moveToNext
3202
- };
3203
- }
3204
- /**
3205
- * If the number of digits is 2, or if the total with the existing digit
3206
- * and the pressed digit is greater than the maximum value for this
3207
- * month, then we will reset the segment as if the user had pressed the
3208
- * backspace key and then typed the number.
3209
- */
3210
- const digits = prev.toString().length;
3211
- const total = Number.parseInt(prev.toString() + num.toString());
3212
- /**
3213
- * If the number of digits is 2, or if the total with the existing digit
3214
- * and the pressed digit is greater than the maximum value for this
3215
- * month, then we will reset the segment as if the user had pressed the
3216
- * backspace key and then typed the number.
3217
- */
3218
- if (digits === 2 || total > max) {
3219
- /**
3220
- * As we're doing elsewhere, we're checking if the number is greater
3221
- * than the max start digit (0-3 in most months), and if so, we're
3222
- * going to move to the next segment.
3223
- */
3224
- if (num > maxStart || total > max) moveToNext = true;
3225
- return {
3226
- value: num,
3227
- moveToNext
3228
- };
3229
- }
3230
- moveToNext = true;
3231
- return {
3232
- value: total,
3233
- moveToNext
3234
- };
3235
- }
3236
- function updateMinuteOrSecond(num, prev) {
3237
- const max = 59;
3238
- let moveToNext = false;
3239
- const maxStart = Math.floor(max / 10);
3240
- /**
3241
- * If the user has left the segment, we want to reset the
3242
- * `prev` value so that we can start the segment over again
3243
- * when the user types a number.
3244
- */
3245
- if (props.hasLeftFocus.value) {
3246
- props.hasLeftFocus.value = false;
3247
- props.lastKeyZero.value = false;
3248
- prev = null;
3249
- }
3250
- if (prev === null) {
3251
- /**
3252
- * If the user types a 0 as the first number, we want
3253
- * to keep track of that so that when they type the next
3254
- * number, we can move to the next segment.
3255
- */
3256
- if (num === 0) {
3257
- props.lastKeyZero.value = true;
3258
- return {
3259
- value: 0,
3260
- moveToNext
3261
- };
3262
- }
3263
- /**
3264
- * If the last key was a 0, or if the first number is
3265
- * greater than the max start digit (0-3 in most cases), then
3266
- * we want to move to the next segment, since it's not possible
3267
- * to continue typing a valid number in this segment.
3268
- */
3269
- if (props.lastKeyZero.value || num > maxStart) moveToNext = true;
3270
- props.lastKeyZero.value = false;
3271
- /**
3272
- * If none of the above conditions are met, then we can just
3273
- * return the number as the segment value and continue typing
3274
- * in this segment.
3275
- */
3276
- return {
3277
- value: num,
3278
- moveToNext
3279
- };
3280
- }
3281
- /**
3282
- * If the number of digits is 2, or if the total with the existing digit
3283
- * and the pressed digit is greater than the maximum value for this
3284
- * month, then we will reset the segment as if the user had pressed the
3285
- * backspace key and then typed the number.
3286
- */
3287
- const digits = prev.toString().length;
3288
- const total = Number.parseInt(prev.toString() + num.toString());
3289
- /**
3290
- * If the number of digits is 2, or if the total with the existing digit
3291
- * and the pressed digit is greater than the maximum value for this
3292
- * month, then we will reset the segment as if the user had pressed the
3293
- * backspace key and then typed the number.
3294
- */
3295
- if (digits === 2 || total > max) {
3296
- /**
3297
- * As we're doing elsewhere, we're checking if the number is greater
3298
- * than the max start digit (0-3 in most months), and if so, we're
3299
- * going to move to the next segment.
3300
- */
3301
- if (num > maxStart) moveToNext = true;
3302
- return {
3303
- value: num,
3304
- moveToNext
3305
- };
3306
- }
3307
- moveToNext = true;
3308
- return {
3309
- value: total,
3310
- moveToNext
3311
- };
3312
- }
3313
- function updateHour(max, num, prev) {
3314
- let moveToNext = false;
3315
- const maxStart = Math.floor(max / 10);
3316
- /**
3317
- * If the user has left the segment, we want to reset the
3318
- * `prev` value so that we can start the segment over again
3319
- * when the user types a number.
3320
- */
3321
- if (props.hasLeftFocus.value) {
3322
- props.hasLeftFocus.value = false;
3323
- props.lastKeyZero.value = false;
3324
- prev = null;
3325
- }
3326
- if (prev === null) {
3327
- /**
3328
- * If the user types a 0 as the first number, we want
3329
- * to keep track of that so that when they type the next
3330
- * number, we can move to the next segment.
3331
- */
3332
- if (num === 0) {
3333
- props.lastKeyZero.value = true;
3334
- return {
3335
- value: 0,
3336
- moveToNext
3337
- };
3338
- }
3339
- /**
3340
- * If the last key was a 0, or if the first number is
3341
- * greater than the max start digit (0-3 in most cases), then
3342
- * we want to move to the next segment, since it's not possible
3343
- * to continue typing a valid number in this segment.
3344
- */
3345
- if (props.lastKeyZero.value || num > maxStart) moveToNext = true;
3346
- props.lastKeyZero.value = false;
3347
- /**
3348
- * If none of the above conditions are met, then we can just
3349
- * return the number as the segment value and continue typing
3350
- * in this segment.
3351
- */
3352
- return {
3353
- value: num,
3354
- moveToNext
3355
- };
3356
- }
3357
- /**
3358
- * If the number of digits is 2, or if the total with the existing digit
3359
- * and the pressed digit is greater than the maximum value for this
3360
- * month, then we will reset the segment as if the user had pressed the
3361
- * backspace key and then typed the number.
3362
- */
3363
- const digits = prev.toString().length;
3364
- const total = Number.parseInt(prev.toString() + num.toString());
3365
- /**
3366
- * If the number of digits is 2, or if the total with the existing digit
3367
- * and the pressed digit is greater than the maximum value for this
3368
- * month, then we will reset the segment as if the user had pressed the
3369
- * backspace key and then typed the number.
3370
- */
3371
- if (digits === 2 || total > max) {
3372
- /**
3373
- * As we're doing elsewhere, we're checking if the number is greater
3374
- * than the max start digit (0-3 in most months), and if so, we're
3375
- * going to move to the next segment.
3376
- */
3377
- if (num > maxStart) moveToNext = true;
3378
- return {
3379
- value: num,
3380
- moveToNext
3381
- };
3382
- }
3383
- moveToNext = true;
3384
- return {
3385
- value: total,
3386
- moveToNext
3387
- };
3388
- }
3389
- function updateYear(num, prev) {
3390
- let moveToNext = false;
3391
- /**
3392
- * If the user has left the segment, we want to reset the
3393
- * `prev` value so that we can start the segment over again
3394
- * when the user types a number.
3395
- */
3396
- if (props.hasLeftFocus.value) {
3397
- props.hasLeftFocus.value = false;
3398
- prev = null;
3399
- }
3400
- if (prev === null) return {
3401
- value: num === 0 ? 1 : num,
3402
- moveToNext
3403
- };
3404
- const str = prev.toString() + num.toString();
3405
- if (str.length > 4) return {
3406
- value: num === 0 ? 1 : num,
3407
- moveToNext
3408
- };
3409
- if (str.length === 4) moveToNext = true;
3410
- return {
3411
- value: Number.parseInt(str),
3412
- moveToNext
3413
- };
3414
- }
3415
- const attributes = computed(() => segmentBuilders[props.part]?.attrs({
3416
- disabled: props.disabled.value,
3417
- placeholder: props.placeholder.value,
3418
- hourCycle: props.hourCycle,
3419
- segmentValues: props.segmentValues.value,
3420
- formatter: props.formatter
3421
- }) ?? {});
3422
- function handleDaySegmentKeydown(e) {
3423
- if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;
3424
- const prevValue = props.segmentValues.value.day;
3425
- if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {
3426
- props.segmentValues.value.day = dateTimeValueIncrementation({
3427
- e,
3428
- part: "day",
3429
- dateRef: props.placeholder.value,
3430
- prevValue
3431
- });
3432
- return;
3433
- }
3434
- if (isNumberString(e.key)) {
3435
- const num = Number.parseInt(e.key);
3436
- const segmentMonthValue = props.segmentValues.value.month;
3437
- const { value, moveToNext } = updateDayOrMonth(segmentMonthValue ? getDaysInMonth(props.placeholder.value.set({ month: segmentMonthValue })) : 31, num, prevValue);
3438
- props.segmentValues.value.day = value;
3439
- if (moveToNext) props.focusNext();
3440
- }
3441
- if (e.key === kbd.BACKSPACE) {
3442
- props.hasLeftFocus.value = false;
3443
- props.segmentValues.value.day = deleteValue(prevValue);
3444
- }
3445
- }
3446
- function handleMonthSegmentKeydown(e) {
3447
- if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;
3448
- const prevValue = props.segmentValues.value.month;
3449
- if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {
3450
- props.segmentValues.value.month = dateTimeValueIncrementation({
3451
- e,
3452
- part: "month",
3453
- dateRef: props.placeholder.value,
3454
- prevValue
3455
- });
3456
- return;
3457
- }
3458
- if (isNumberString(e.key)) {
3459
- const { value, moveToNext } = updateDayOrMonth(12, Number.parseInt(e.key), prevValue);
3460
- props.segmentValues.value.month = value;
3461
- if (moveToNext) props.focusNext();
3462
- }
3463
- if (e.key === kbd.BACKSPACE) {
3464
- props.hasLeftFocus.value = false;
3465
- props.segmentValues.value.month = deleteValue(prevValue);
3466
- }
3467
- }
3468
- function handleYearSegmentKeydown(e) {
3469
- if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;
3470
- const prevValue = props.segmentValues.value.year;
3471
- if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {
3472
- props.segmentValues.value.year = dateTimeValueIncrementation({
3473
- e,
3474
- part: "year",
3475
- dateRef: props.placeholder.value,
3476
- prevValue
3477
- });
3478
- return;
3479
- }
3480
- if (isNumberString(e.key)) {
3481
- const { value, moveToNext } = updateYear(Number.parseInt(e.key), prevValue);
3482
- props.segmentValues.value.year = value;
3483
- if (moveToNext) props.focusNext();
3484
- }
3485
- if (e.key === kbd.BACKSPACE) {
3486
- props.hasLeftFocus.value = false;
3487
- props.segmentValues.value.year = deleteValue(prevValue);
3488
- }
3489
- }
3490
- function uses12HourFormat(locale) {
3491
- const hourCycle = new $12a3c853105e5a70$export$ad991b66133851cf(locale, { hour: "numeric" }).resolvedOptions().hourCycle;
3492
- return hourCycle === "h11" || hourCycle === "h12";
3493
- }
3494
- function handleHourSegmentKeydown(e) {
3495
- const dateRef = props.placeholder.value;
3496
- if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !("hour" in dateRef) || !("hour" in props.segmentValues.value)) return;
3497
- const prevValue = props.segmentValues.value.hour;
3498
- if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {
3499
- const newHour = dateTimeValueIncrementation({
3500
- e,
3501
- part: "hour",
3502
- dateRef: props.placeholder.value,
3503
- prevValue
3504
- });
3505
- props.segmentValues.value.hour = newHour;
3506
- if ("dayPeriod" in props.segmentValues.value && newHour !== null) props.segmentValues.value.dayPeriod = newHour >= 12 ? "PM" : "AM";
3507
- return;
3508
- }
3509
- if (isNumberString(e.key)) {
3510
- const num = Number.parseInt(e.key);
3511
- const is12Hour = props.hourCycle !== void 0 ? props.hourCycle === 12 : uses12HourFormat(props.formatter.getLocale());
3512
- const max = is12Hour ? 12 : 24;
3513
- let displayPrev = prevValue;
3514
- if (is12Hour && prevValue !== null) displayPrev = prevValue % 12 === 0 ? 0 : prevValue > 12 ? prevValue - 12 : prevValue;
3515
- const { value, moveToNext } = updateHour(max, num, displayPrev);
3516
- let internalValue = value;
3517
- if (is12Hour && value !== null) {
3518
- const period = props.segmentValues.value.dayPeriod || "AM";
3519
- if (value === 12) internalValue = period === "AM" ? 0 : 12;
3520
- else internalValue = period === "PM" ? value + 12 : value;
3521
- }
3522
- props.segmentValues.value.hour = internalValue;
3523
- if (moveToNext) props.focusNext();
3524
- }
3525
- if (e.key === kbd.BACKSPACE) {
3526
- props.hasLeftFocus.value = false;
3527
- props.segmentValues.value.hour = deleteValue(prevValue);
3528
- }
3529
- }
3530
- function handleMinuteSegmentKeydown(e) {
3531
- const dateRef = props.placeholder.value;
3532
- if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !("minute" in dateRef) || !("minute" in props.segmentValues.value)) return;
3533
- const prevValue = props.segmentValues.value.minute;
3534
- if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) props.segmentValues.value.minute = minuteSecondIncrementation({
3535
- e,
3536
- part: "minute",
3537
- dateRef: props.placeholder.value,
3538
- prevValue
3539
- });
3540
- if (isNumberString(e.key)) {
3541
- const { value, moveToNext } = updateMinuteOrSecond(Number.parseInt(e.key), prevValue);
3542
- props.segmentValues.value.minute = value;
3543
- if (moveToNext) props.focusNext();
3544
- }
3545
- if (e.key === kbd.BACKSPACE) {
3546
- props.hasLeftFocus.value = false;
3547
- props.segmentValues.value.minute = deleteValue(prevValue);
3548
- }
3549
- }
3550
- function handleSecondSegmentKeydown(e) {
3551
- const dateRef = props.placeholder.value;
3552
- if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !("second" in dateRef) || !("second" in props.segmentValues.value)) return;
3553
- const prevValue = props.segmentValues.value.second;
3554
- if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) props.segmentValues.value.second = minuteSecondIncrementation({
3555
- e,
3556
- part: "second",
3557
- dateRef: props.placeholder.value,
3558
- prevValue
3559
- });
3560
- if (isNumberString(e.key)) {
3561
- const { value, moveToNext } = updateMinuteOrSecond(Number.parseInt(e.key), prevValue);
3562
- props.segmentValues.value.second = value;
3563
- if (moveToNext) props.focusNext();
3564
- }
3565
- if (e.key === kbd.BACKSPACE) {
3566
- props.hasLeftFocus.value = false;
3567
- props.segmentValues.value.second = deleteValue(prevValue);
3568
- }
3569
- }
3570
- function handleDayPeriodSegmentKeydown(e) {
3571
- if ((!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) && e.key !== "a" && e.key !== "p" || !("hour" in props.placeholder.value) || !("dayPeriod" in props.segmentValues.value)) return;
3572
- if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {
3573
- if (props.segmentValues.value.dayPeriod === "AM") {
3574
- props.segmentValues.value.dayPeriod = "PM";
3575
- props.segmentValues.value.hour = props.segmentValues.value.hour + 12;
3576
- return;
3577
- }
3578
- props.segmentValues.value.dayPeriod = "AM";
3579
- props.segmentValues.value.hour = props.segmentValues.value.hour - 12;
3580
- return;
3581
- }
3582
- if (["a", "A"].includes(e.key) && props.segmentValues.value.dayPeriod !== "AM") {
3583
- props.segmentValues.value.dayPeriod = "AM";
3584
- props.segmentValues.value.hour = props.segmentValues.value.hour - 12;
3585
- return;
3586
- }
3587
- if (["p", "P"].includes(e.key) && props.segmentValues.value.dayPeriod !== "PM") {
3588
- props.segmentValues.value.dayPeriod = "PM";
3589
- props.segmentValues.value.hour = props.segmentValues.value.hour + 12;
3590
- }
3591
- }
3592
- function handleSegmentClick(e) {
3593
- if (props.disabled.value) e.preventDefault();
3594
- }
3595
- function handleSegmentKeydown(e) {
3596
- if (e.isComposing || e.key === "Process") return;
3597
- const disabled = props.disabled.value;
3598
- const readonly = props.readonly.value;
3599
- if (disabled || readonly) return;
3600
- if (e.key !== kbd.TAB) e.preventDefault();
3601
- ({
3602
- day: handleDaySegmentKeydown,
3603
- month: handleMonthSegmentKeydown,
3604
- year: handleYearSegmentKeydown,
3605
- hour: handleHourSegmentKeydown,
3606
- minute: handleMinuteSegmentKeydown,
3607
- second: handleSecondSegmentKeydown,
3608
- dayPeriod: handleDayPeriodSegmentKeydown,
3609
- timeZoneName: () => {}
3610
- })[props.part](e);
3611
- if (![kbd.ARROW_LEFT, kbd.ARROW_RIGHT].includes(e.key) && e.key !== kbd.TAB && e.key !== kbd.SHIFT && isAcceptableSegmentKey(e.key)) {
3612
- if (Object.values(props.segmentValues.value).every((item) => item !== null)) {
3613
- const updateObject = { ...props.segmentValues.value };
3614
- const dateRef = props.placeholder.value.set(updateObject);
3615
- props.modelValue.value = dateRef.copy();
3616
- }
3617
- }
3618
- }
3619
- function handleSegmentFocusOut() {
3620
- if (!props.stepSnapping?.value) return;
3621
- if (props.part === "hour" && "hour" in props.segmentValues.value && props.segmentValues.value.hour !== null && props.step.value.hour && props.step.value.hour > 1) {
3622
- props.segmentValues.value.hour = snapValueToStep(props.segmentValues.value.hour, 0, 23, props.step.value.hour);
3623
- if ("dayPeriod" in props.segmentValues.value) {
3624
- if (props.segmentValues.value.hour < 12) props.segmentValues.value.dayPeriod = "AM";
3625
- else if (props.segmentValues.value.hour) props.segmentValues.value.dayPeriod = "PM";
3626
- }
3627
- } else if (props.part === "minute" && "minute" in props.segmentValues.value && props.segmentValues.value.minute !== null && props.step.value.minute && props.step.value.minute > 1) props.segmentValues.value.minute = snapValueToStep(props.segmentValues.value.minute, 0, 59, props.step.value.minute);
3628
- else if (props.part === "second" && "second" in props.segmentValues.value && props.segmentValues.value.second !== null && props.step.value.second && props.step.value.second > 1) props.segmentValues.value.second = snapValueToStep(props.segmentValues.value.second, 0, 59, props.step.value.second);
3629
- if (Object.values(props.segmentValues.value).every((item) => item !== null)) {
3630
- const dateRef = props.placeholder.value.set({ ...props.segmentValues.value });
3631
- props.modelValue.value = dateRef.copy();
3632
- }
3633
- }
3634
- let preCompositionNodes = null;
3635
- function handleSegmentBeforeInput(e) {
3636
- if (!e.isComposing) e.preventDefault();
3637
- }
3638
- function handleSegmentCompositionStart(e) {
3639
- const el = e.target;
3640
- preCompositionNodes = Array.from(el.childNodes, (node) => ({
3641
- node,
3642
- value: node.nodeValue
3643
- }));
3644
- }
3645
- function handleSegmentCompositionEnd(e) {
3646
- const el = e.target;
3647
- const original = preCompositionNodes;
3648
- preCompositionNodes = null;
3649
- if (original) {
3650
- for (const { node, value } of original) node.nodeValue = value;
3651
- el.replaceChildren(...original.map((o) => o.node));
3652
- }
3653
- const data = e.data;
3654
- if (!data) return;
3655
- for (const char of data) {
3656
- if (!DIGIT_REG.test(char)) continue;
3657
- const target = getActiveElement();
3658
- if (!(target instanceof HTMLElement)) break;
3659
- target.dispatchEvent(new KeyboardEvent("keydown", {
3660
- key: char,
3661
- bubbles: true,
3662
- cancelable: true
3663
- }));
3664
- }
3665
- }
3666
- return {
3667
- handleSegmentClick,
3668
- handleSegmentKeydown,
3669
- handleSegmentBeforeInput,
3670
- handleSegmentCompositionStart,
3671
- handleSegmentCompositionEnd,
3672
- handleSegmentFocusOut,
3673
- attributes
3674
- };
3675
- }
3676
- //#endregion
3677
- export { toDate as A, $ad063034c8620db8$export$a5a3b454ada2268e as B, getNextLastDayOfWeek as C, isBeforeOrSame as D, isBefore as E, $ad063034c8620db8$export$5a8da0c44a3afdf2 as F, $ad063034c8620db8$export$d0bdf45af03a6ea3 as H, $ad063034c8620db8$export$629b0a497aa65267 as I, $ad063034c8620db8$export$91b62ebf2ba703ee as L, $2aaf608024c21ca1$export$99faa760c7908e4f as M, $d07e34cce18680fd$export$b21e0b124e224484 as N, isBetween as O, $ad063034c8620db8$export$2061056d06d7cdf7 as P, $ad063034c8620db8$export$a18c89cbd24170ff as R, getLastFirstDayOfWeek as S, isAfter as T, $ad063034c8620db8$export$ea39ec197993aef0 as U, $ad063034c8620db8$export$aa8b41735afcabd2 as V, normalizeInputValue as _, createContent as a, getDefaultDate as b, syncSegmentValues as c, useDateFormatter as d, chunk as f, normalizeHourCycle as g, normalizeDateStep as h, isSegmentNavigationKey as i, $2aaf608024c21ca1$export$680ea196effce5f as j, isBetweenInclusive as k, syncTimeSegmentValues as l, handleCalendarInitialFocus as m, getSegmentElements as n, initializeSegmentValues as o, getInputType as p, getTimeFieldSegmentElements as r, initializeTimeSegmentValues as s, useDateField as t, useLocale as u, areAllDaysBetweenValid as v, hasTime as w, getDefaultTime as x, getDaysInMonth as y, $ad063034c8620db8$export$a2258d9c4118825c as z };
3678
-
3679
- //# sourceMappingURL=useDateField-CQZb799C.js.map