@planningcenter/tapestry 3.3.1 → 3.3.2-qa-891.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/Button.d.ts +1 -0
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +1 -0
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/DropdownButton.d.ts +18 -4
- package/dist/components/button/DropdownButton.d.ts.map +1 -1
- package/dist/components/button/DropdownButton.js +7 -0
- package/dist/components/button/DropdownButton.js.map +1 -1
- package/dist/components/button/DropdownIconButton.d.ts +8 -0
- package/dist/components/button/DropdownIconButton.d.ts.map +1 -1
- package/dist/components/button/DropdownIconButton.js +8 -0
- package/dist/components/button/DropdownIconButton.js.map +1 -1
- package/dist/components/button/IconButton.d.ts +1 -0
- package/dist/components/button/IconButton.d.ts.map +1 -1
- package/dist/components/button/IconButton.js +1 -0
- package/dist/components/button/IconButton.js.map +1 -1
- package/dist/components/button/LoadingButton.d.ts +1 -0
- package/dist/components/button/LoadingButton.d.ts.map +1 -1
- package/dist/components/button/LoadingButton.js +1 -0
- package/dist/components/button/LoadingButton.js.map +1 -1
- package/dist/components/button/PageHeaderActionsDropdownButton.d.ts +8 -0
- package/dist/components/button/PageHeaderActionsDropdownButton.d.ts.map +1 -1
- package/dist/components/button/PageHeaderActionsDropdownButton.js +8 -0
- package/dist/components/button/PageHeaderActionsDropdownButton.js.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/combo-box/ComboBox.d.ts +3 -1
- package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/components/combo-box/ComboBox.js +5 -1
- package/dist/components/combo-box/ComboBox.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +12 -9
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +155 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.js +103 -0
- package/dist/components/dropdown/Dropdown.js.map +1 -0
- package/dist/components/dropdown/index.d.ts +4 -0
- package/dist/components/dropdown/index.d.ts.map +1 -0
- package/dist/components/input/Input.d.ts +9 -0
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +9 -0
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/link/IconLink.d.ts +7 -0
- package/dist/components/link/IconLink.d.ts.map +1 -1
- package/dist/components/link/IconLink.js +7 -0
- package/dist/components/link/IconLink.js.map +1 -1
- package/dist/components/link/Link.d.ts +8 -0
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +8 -0
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/number-stepper/NumberStepper.d.ts +1 -1
- package/dist/components/number-stepper/NumberStepper.d.ts.map +1 -1
- package/dist/components/number-stepper/NumberStepper.js +1 -1
- package/dist/components/number-stepper/NumberStepper.js.map +1 -1
- package/dist/components/page-header/PageHeader.d.ts +8 -0
- package/dist/components/page-header/PageHeader.d.ts.map +1 -1
- package/dist/components/page-header/PageHeader.js +8 -0
- package/dist/components/page-header/PageHeader.js.map +1 -1
- package/dist/components/radio/Radio.d.ts +1 -0
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +1 -0
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio-group/RadioGroup.js +1 -0
- package/dist/components/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/select/Select.d.ts +9 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +9 -0
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/SelectNative.d.ts +10 -0
- package/dist/components/select/SelectNative.d.ts.map +1 -1
- package/dist/components/select/SelectNative.js +10 -0
- package/dist/components/select/SelectNative.js.map +1 -1
- package/dist/components/select/SelectPopover.d.ts +10 -0
- package/dist/components/select/SelectPopover.d.ts.map +1 -1
- package/dist/components/select/SelectPopover.js +10 -0
- package/dist/components/select/SelectPopover.js.map +1 -1
- package/dist/components/sidenav/Sidenav.d.ts +3 -0
- package/dist/components/sidenav/Sidenav.d.ts.map +1 -1
- package/dist/components/sidenav/Sidenav.js +3 -0
- package/dist/components/sidenav/Sidenav.js.map +1 -1
- package/dist/components/sidenav/SidenavItem.d.ts +3 -0
- package/dist/components/sidenav/SidenavItem.d.ts.map +1 -1
- package/dist/components/sidenav/SidenavItem.js +3 -0
- package/dist/components/sidenav/SidenavItem.js.map +1 -1
- package/dist/components/sidenav/SidenavSection.d.ts +3 -0
- package/dist/components/sidenav/SidenavSection.d.ts.map +1 -1
- package/dist/components/sidenav/SidenavSection.js +3 -0
- package/dist/components/sidenav/SidenavSection.js.map +1 -1
- package/dist/components/text-area/TextArea.d.ts +8 -0
- package/dist/components/text-area/TextArea.d.ts.map +1 -1
- package/dist/components/text-area/TextArea.js +8 -0
- package/dist/components/text-area/TextArea.js.map +1 -1
- package/dist/components/time-field/TimeField.d.ts +1 -1
- package/dist/components/time-field/TimeField.d.ts.map +1 -1
- package/dist/components/time-field/TimeField.js +1 -1
- package/dist/components/time-field/TimeField.js.map +1 -1
- package/dist/components/toggle-switch/ToggleSwitch.d.ts +3 -0
- package/dist/components/toggle-switch/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/toggle-switch/ToggleSwitch.js +3 -0
- package/dist/components/toggle-switch/ToggleSwitch.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/{CalendarDate.js → private/CalendarDate.js} +74 -88
- package/dist/ext/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{GregorianCalendar.js → private/calendars/GregorianCalendar.js} +26 -26
- package/dist/ext/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{conversion.js → private/conversion.js} +55 -55
- package/dist/ext/@internationalized/date/dist/private/conversion.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{manipulation.js → private/manipulation.js} +88 -91
- package/dist/ext/@internationalized/date/dist/private/manipulation.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/private/queries.js +32 -0
- package/dist/ext/@internationalized/date/dist/private/queries.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/private/string.js +51 -0
- package/dist/ext/@internationalized/date/dist/private/string.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{utils.js → private/utils.js} +2 -2
- package/dist/ext/@internationalized/date/dist/private/utils.js.map +1 -0
- package/dist/index.css +11 -6
- package/dist/index.css.map +1 -1
- package/dist/reactRender.css +1412 -1282
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +1412 -1282
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/unstable.css +136 -6
- package/dist/unstable.css.map +1 -1
- package/dist/unstable.d.ts +1 -0
- package/dist/unstable.d.ts.map +1 -1
- package/dist/unstable.js +1 -0
- package/dist/unstable.js.map +1 -1
- package/package.json +6 -6
- package/dist/ext/@internationalized/date/dist/CalendarDate.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/GregorianCalendar.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/conversion.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/manipulation.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/queries.js +0 -34
- package/dist/ext/@internationalized/date/dist/queries.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/string.js +0 -51
- package/dist/ext/@internationalized/date/dist/string.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/utils.js.map +0 -1
- package/dist/ext/@swc/helpers/esm/_check_private_redeclaration.js +0 -8
- package/dist/ext/@swc/helpers/esm/_check_private_redeclaration.js.map +0 -1
- package/dist/ext/@swc/helpers/esm/_class_private_field_init.js +0 -9
- package/dist/ext/@swc/helpers/esm/_class_private_field_init.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toCalendarDateTime as $
|
|
2
|
-
import { GregorianCalendar as $
|
|
1
|
+
import { toCalendarDateTime as $d07e34cce18680fd$export$b21e0b124e224484, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, epochFromDate as $d07e34cce18680fd$export$bd4fb2bc8bb06fb, fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032 } from './conversion.js';
|
|
2
|
+
import { GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec } from './calendars/GregorianCalendar.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -13,19 +13,19 @@ import { GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec } from '
|
|
|
13
13
|
* governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
const $
|
|
17
|
-
function $
|
|
16
|
+
const $435a2ceaa8778ed8$var$ONE_HOUR = 3600000;
|
|
17
|
+
function $435a2ceaa8778ed8$export$e16d8520af44a096(date, duration) {
|
|
18
18
|
let mutableDate = date.copy();
|
|
19
|
-
let days = 'hour' in mutableDate ? $
|
|
20
|
-
$
|
|
19
|
+
let days = 'hour' in mutableDate ? $435a2ceaa8778ed8$var$addTimeFields(mutableDate, duration) : 0;
|
|
20
|
+
$435a2ceaa8778ed8$var$addYears(mutableDate, duration.years || 0);
|
|
21
21
|
if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
|
|
22
22
|
mutableDate.month += duration.months || 0;
|
|
23
|
-
$
|
|
24
|
-
$
|
|
23
|
+
$435a2ceaa8778ed8$var$balanceYearMonth(mutableDate);
|
|
24
|
+
$435a2ceaa8778ed8$var$constrainMonthDay(mutableDate);
|
|
25
25
|
mutableDate.day += (duration.weeks || 0) * 7;
|
|
26
26
|
mutableDate.day += duration.days || 0;
|
|
27
27
|
mutableDate.day += days;
|
|
28
|
-
$
|
|
28
|
+
$435a2ceaa8778ed8$var$balanceDay(mutableDate);
|
|
29
29
|
if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
|
|
30
30
|
// Constrain in case adding ended up with a date outside the valid range for the calendar system.
|
|
31
31
|
// The behavior here is slightly different than when constraining in the `set` function in that
|
|
@@ -38,8 +38,7 @@ function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
|
|
|
38
38
|
}
|
|
39
39
|
let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
|
|
40
40
|
if (mutableDate.year > maxYear) {
|
|
41
|
-
|
|
42
|
-
let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
|
|
41
|
+
let isInverseEra = mutableDate.calendar.isInverseEra?.(mutableDate);
|
|
43
42
|
mutableDate.year = maxYear;
|
|
44
43
|
mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
|
|
45
44
|
mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
|
|
@@ -56,99 +55,98 @@ function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
|
|
|
56
55
|
mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
|
|
57
56
|
return mutableDate;
|
|
58
57
|
}
|
|
59
|
-
function $
|
|
60
|
-
|
|
61
|
-
if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;
|
|
58
|
+
function $435a2ceaa8778ed8$var$addYears(date, years) {
|
|
59
|
+
if (date.calendar.isInverseEra?.(date)) years = -years;
|
|
62
60
|
date.year += years;
|
|
63
61
|
}
|
|
64
|
-
function $
|
|
62
|
+
function $435a2ceaa8778ed8$var$balanceYearMonth(date) {
|
|
65
63
|
while(date.month < 1){
|
|
66
|
-
$
|
|
64
|
+
$435a2ceaa8778ed8$var$addYears(date, -1);
|
|
67
65
|
date.month += date.calendar.getMonthsInYear(date);
|
|
68
66
|
}
|
|
69
67
|
let monthsInYear = 0;
|
|
70
68
|
while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){
|
|
71
69
|
date.month -= monthsInYear;
|
|
72
|
-
$
|
|
70
|
+
$435a2ceaa8778ed8$var$addYears(date, 1);
|
|
73
71
|
}
|
|
74
72
|
}
|
|
75
|
-
function $
|
|
73
|
+
function $435a2ceaa8778ed8$var$balanceDay(date) {
|
|
76
74
|
while(date.day < 1){
|
|
77
75
|
date.month--;
|
|
78
|
-
$
|
|
76
|
+
$435a2ceaa8778ed8$var$balanceYearMonth(date);
|
|
79
77
|
date.day += date.calendar.getDaysInMonth(date);
|
|
80
78
|
}
|
|
81
79
|
while(date.day > date.calendar.getDaysInMonth(date)){
|
|
82
80
|
date.day -= date.calendar.getDaysInMonth(date);
|
|
83
81
|
date.month++;
|
|
84
|
-
$
|
|
82
|
+
$435a2ceaa8778ed8$var$balanceYearMonth(date);
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
|
-
function $
|
|
85
|
+
function $435a2ceaa8778ed8$var$constrainMonthDay(date) {
|
|
88
86
|
date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
|
|
89
87
|
date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
|
|
90
88
|
}
|
|
91
|
-
function $
|
|
89
|
+
function $435a2ceaa8778ed8$export$c4e2ecac49351ef2(date) {
|
|
92
90
|
if (date.calendar.constrainDate) date.calendar.constrainDate(date);
|
|
93
91
|
date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
|
|
94
|
-
$
|
|
92
|
+
$435a2ceaa8778ed8$var$constrainMonthDay(date);
|
|
95
93
|
}
|
|
96
|
-
function $
|
|
94
|
+
function $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration) {
|
|
97
95
|
let inverseDuration = {};
|
|
98
96
|
for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
|
|
99
97
|
return inverseDuration;
|
|
100
98
|
}
|
|
101
|
-
function $
|
|
102
|
-
return $
|
|
99
|
+
function $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(date, duration) {
|
|
100
|
+
return $435a2ceaa8778ed8$export$e16d8520af44a096(date, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
|
|
103
101
|
}
|
|
104
|
-
function $
|
|
102
|
+
function $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(date, fields) {
|
|
105
103
|
let mutableDate = date.copy();
|
|
106
104
|
if (fields.era != null) mutableDate.era = fields.era;
|
|
107
105
|
if (fields.year != null) mutableDate.year = fields.year;
|
|
108
106
|
if (fields.month != null) mutableDate.month = fields.month;
|
|
109
107
|
if (fields.day != null) mutableDate.day = fields.day;
|
|
110
|
-
$
|
|
108
|
+
$435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutableDate);
|
|
111
109
|
return mutableDate;
|
|
112
110
|
}
|
|
113
|
-
function $
|
|
111
|
+
function $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(value, fields) {
|
|
114
112
|
let mutableValue = value.copy();
|
|
115
113
|
if (fields.hour != null) mutableValue.hour = fields.hour;
|
|
116
114
|
if (fields.minute != null) mutableValue.minute = fields.minute;
|
|
117
115
|
if (fields.second != null) mutableValue.second = fields.second;
|
|
118
116
|
if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
|
|
119
|
-
$
|
|
117
|
+
$435a2ceaa8778ed8$export$7555de1e070510cb(mutableValue);
|
|
120
118
|
return mutableValue;
|
|
121
119
|
}
|
|
122
|
-
function $
|
|
120
|
+
function $435a2ceaa8778ed8$var$balanceTime(time) {
|
|
123
121
|
time.second += Math.floor(time.millisecond / 1000);
|
|
124
|
-
time.millisecond = $
|
|
122
|
+
time.millisecond = $435a2ceaa8778ed8$var$nonNegativeMod(time.millisecond, 1000);
|
|
125
123
|
time.minute += Math.floor(time.second / 60);
|
|
126
|
-
time.second = $
|
|
124
|
+
time.second = $435a2ceaa8778ed8$var$nonNegativeMod(time.second, 60);
|
|
127
125
|
time.hour += Math.floor(time.minute / 60);
|
|
128
|
-
time.minute = $
|
|
126
|
+
time.minute = $435a2ceaa8778ed8$var$nonNegativeMod(time.minute, 60);
|
|
129
127
|
let days = Math.floor(time.hour / 24);
|
|
130
|
-
time.hour = $
|
|
128
|
+
time.hour = $435a2ceaa8778ed8$var$nonNegativeMod(time.hour, 24);
|
|
131
129
|
return days;
|
|
132
130
|
}
|
|
133
|
-
function $
|
|
131
|
+
function $435a2ceaa8778ed8$export$7555de1e070510cb(time) {
|
|
134
132
|
time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));
|
|
135
133
|
time.second = Math.max(0, Math.min(time.second, 59));
|
|
136
134
|
time.minute = Math.max(0, Math.min(time.minute, 59));
|
|
137
135
|
time.hour = Math.max(0, Math.min(time.hour, 23));
|
|
138
136
|
}
|
|
139
|
-
function $
|
|
137
|
+
function $435a2ceaa8778ed8$var$nonNegativeMod(a, b) {
|
|
140
138
|
let result = a % b;
|
|
141
139
|
if (result < 0) result += b;
|
|
142
140
|
return result;
|
|
143
141
|
}
|
|
144
|
-
function $
|
|
142
|
+
function $435a2ceaa8778ed8$var$addTimeFields(time, duration) {
|
|
145
143
|
time.hour += duration.hours || 0;
|
|
146
144
|
time.minute += duration.minutes || 0;
|
|
147
145
|
time.second += duration.seconds || 0;
|
|
148
146
|
time.millisecond += duration.milliseconds || 0;
|
|
149
|
-
return $
|
|
147
|
+
return $435a2ceaa8778ed8$var$balanceTime(time);
|
|
150
148
|
}
|
|
151
|
-
function $
|
|
149
|
+
function $435a2ceaa8778ed8$export$d52ced6badfb9a4c(value, field, amount, options) {
|
|
152
150
|
let mutable = value.copy();
|
|
153
151
|
switch(field){
|
|
154
152
|
case 'era':
|
|
@@ -156,36 +154,35 @@ function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options
|
|
|
156
154
|
let eras = value.calendar.getEras();
|
|
157
155
|
let eraIndex = eras.indexOf(value.era);
|
|
158
156
|
if (eraIndex < 0) throw new Error('Invalid era: ' + value.era);
|
|
159
|
-
eraIndex = $
|
|
157
|
+
eraIndex = $435a2ceaa8778ed8$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options?.round);
|
|
160
158
|
mutable.era = eras[eraIndex];
|
|
161
159
|
// Constrain the year and other fields within the era, so the era doesn't change when we balance below.
|
|
162
|
-
$
|
|
160
|
+
$435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
|
|
163
161
|
break;
|
|
164
162
|
}
|
|
165
163
|
case 'year':
|
|
166
|
-
|
|
167
|
-
if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;
|
|
164
|
+
if (mutable.calendar.isInverseEra?.(mutable)) amount = -amount;
|
|
168
165
|
// The year field should not cycle within the era as that can cause weird behavior affecting other fields.
|
|
169
166
|
// We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
|
|
170
167
|
// we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.
|
|
171
|
-
mutable.year = $
|
|
168
|
+
mutable.year = $435a2ceaa8778ed8$var$cycleValue(value.year, amount, -Infinity, 9999, options?.round);
|
|
172
169
|
if (mutable.year === -Infinity) mutable.year = 1;
|
|
173
170
|
if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
|
|
174
171
|
break;
|
|
175
172
|
case 'month':
|
|
176
|
-
mutable.month = $
|
|
173
|
+
mutable.month = $435a2ceaa8778ed8$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options?.round);
|
|
177
174
|
break;
|
|
178
175
|
case 'day':
|
|
179
|
-
mutable.day = $
|
|
176
|
+
mutable.day = $435a2ceaa8778ed8$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options?.round);
|
|
180
177
|
break;
|
|
181
178
|
default:
|
|
182
179
|
throw new Error('Unsupported field ' + field);
|
|
183
180
|
}
|
|
184
181
|
if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
|
|
185
|
-
$
|
|
182
|
+
$435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
|
|
186
183
|
return mutable;
|
|
187
184
|
}
|
|
188
|
-
function $
|
|
185
|
+
function $435a2ceaa8778ed8$export$dd02b3e0007dfe28(value, field, amount, options) {
|
|
189
186
|
let mutable = value.copy();
|
|
190
187
|
switch(field){
|
|
191
188
|
case 'hour':
|
|
@@ -193,29 +190,29 @@ function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options
|
|
|
193
190
|
let hours = value.hour;
|
|
194
191
|
let min = 0;
|
|
195
192
|
let max = 23;
|
|
196
|
-
if (
|
|
193
|
+
if (options?.hourCycle === 12) {
|
|
197
194
|
let isPM = hours >= 12;
|
|
198
195
|
min = isPM ? 12 : 0;
|
|
199
196
|
max = isPM ? 23 : 11;
|
|
200
197
|
}
|
|
201
|
-
mutable.hour = $
|
|
198
|
+
mutable.hour = $435a2ceaa8778ed8$var$cycleValue(hours, amount, min, max, options?.round);
|
|
202
199
|
break;
|
|
203
200
|
}
|
|
204
201
|
case 'minute':
|
|
205
|
-
mutable.minute = $
|
|
202
|
+
mutable.minute = $435a2ceaa8778ed8$var$cycleValue(value.minute, amount, 0, 59, options?.round);
|
|
206
203
|
break;
|
|
207
204
|
case 'second':
|
|
208
|
-
mutable.second = $
|
|
205
|
+
mutable.second = $435a2ceaa8778ed8$var$cycleValue(value.second, amount, 0, 59, options?.round);
|
|
209
206
|
break;
|
|
210
207
|
case 'millisecond':
|
|
211
|
-
mutable.millisecond = $
|
|
208
|
+
mutable.millisecond = $435a2ceaa8778ed8$var$cycleValue(value.millisecond, amount, 0, 999, options?.round);
|
|
212
209
|
break;
|
|
213
210
|
default:
|
|
214
211
|
throw new Error('Unsupported field ' + field);
|
|
215
212
|
}
|
|
216
213
|
return mutable;
|
|
217
214
|
}
|
|
218
|
-
function $
|
|
215
|
+
function $435a2ceaa8778ed8$var$cycleValue(value, amount, min, max, round = false) {
|
|
219
216
|
if (round) {
|
|
220
217
|
value += Math.sign(amount);
|
|
221
218
|
if (value < min) value = max;
|
|
@@ -230,10 +227,10 @@ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false
|
|
|
230
227
|
}
|
|
231
228
|
return value;
|
|
232
229
|
}
|
|
233
|
-
function $
|
|
230
|
+
function $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, duration) {
|
|
234
231
|
let ms;
|
|
235
232
|
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) {
|
|
236
|
-
let res = $
|
|
233
|
+
let res = $435a2ceaa8778ed8$export$e16d8520af44a096(($d07e34cce18680fd$export$b21e0b124e224484)(dateTime), {
|
|
237
234
|
years: duration.years,
|
|
238
235
|
months: duration.months,
|
|
239
236
|
weeks: duration.weeks,
|
|
@@ -241,9 +238,9 @@ function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
|
|
|
241
238
|
});
|
|
242
239
|
// Changing the date may change the timezone offset, so we need to recompute
|
|
243
240
|
// using the 'compatible' disambiguation.
|
|
244
|
-
ms = ($
|
|
241
|
+
ms = ($d07e34cce18680fd$export$5107c82f94518f5c)(res, dateTime.timeZone);
|
|
245
242
|
} else // Otherwise, preserve the offset of the original date.
|
|
246
|
-
ms = ($
|
|
243
|
+
ms = ($d07e34cce18680fd$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
|
|
247
244
|
// Perform time manipulation in milliseconds rather than on the original time fields to account for DST.
|
|
248
245
|
// For example, adding one hour during a DST transition may result in the hour field staying the same or
|
|
249
246
|
// skipping an hour. This results in the offset field changing value instead of the specified field.
|
|
@@ -251,13 +248,13 @@ function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
|
|
|
251
248
|
ms += (duration.seconds || 0) * 1000;
|
|
252
249
|
ms += (duration.minutes || 0) * 60000;
|
|
253
250
|
ms += (duration.hours || 0) * 3600000;
|
|
254
|
-
let res = ($
|
|
255
|
-
return ($
|
|
251
|
+
let res = ($d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone);
|
|
252
|
+
return ($d07e34cce18680fd$export$b4a036af3fc0b032)(res, dateTime.calendar);
|
|
256
253
|
}
|
|
257
|
-
function $
|
|
258
|
-
return $
|
|
254
|
+
function $435a2ceaa8778ed8$export$6814caac34ca03c7(dateTime, duration) {
|
|
255
|
+
return $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
|
|
259
256
|
}
|
|
260
|
-
function $
|
|
257
|
+
function $435a2ceaa8778ed8$export$9a297d111fc86b79(dateTime, field, amount, options) {
|
|
261
258
|
// For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes.
|
|
262
259
|
// For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC
|
|
263
260
|
// offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition.
|
|
@@ -266,7 +263,7 @@ function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, opti
|
|
|
266
263
|
{
|
|
267
264
|
let min = 0;
|
|
268
265
|
let max = 23;
|
|
269
|
-
if (
|
|
266
|
+
if (options?.hourCycle === 12) {
|
|
270
267
|
let isPM = dateTime.hour >= 12;
|
|
271
268
|
min = isPM ? 12 : 0;
|
|
272
269
|
max = isPM ? 23 : 11;
|
|
@@ -276,60 +273,60 @@ function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, opti
|
|
|
276
273
|
// Or it might end at midnight and repeat the 11pm hour. To handle this, we get
|
|
277
274
|
// the possible absolute times for the min and max, and find the maximum range
|
|
278
275
|
// that is within the current day.
|
|
279
|
-
let plainDateTime = ($
|
|
280
|
-
let minDate = ($
|
|
276
|
+
let plainDateTime = ($d07e34cce18680fd$export$b21e0b124e224484)(dateTime);
|
|
277
|
+
let minDate = ($d07e34cce18680fd$export$b4a036af3fc0b032)($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
281
278
|
hour: min
|
|
282
|
-
}), new ($
|
|
279
|
+
}), new ($93635573935797de$export$80ee6245ec4f29ec)());
|
|
283
280
|
let minAbsolute = [
|
|
284
|
-
($
|
|
285
|
-
($
|
|
286
|
-
].filter((ms)=>($
|
|
287
|
-
let maxDate = ($
|
|
281
|
+
($d07e34cce18680fd$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'earlier'),
|
|
282
|
+
($d07e34cce18680fd$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'later')
|
|
283
|
+
].filter((ms)=>($d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === minDate.day)[0];
|
|
284
|
+
let maxDate = ($d07e34cce18680fd$export$b4a036af3fc0b032)($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, {
|
|
288
285
|
hour: max
|
|
289
|
-
}), new ($
|
|
286
|
+
}), new ($93635573935797de$export$80ee6245ec4f29ec)());
|
|
290
287
|
let maxAbsolute = [
|
|
291
|
-
($
|
|
292
|
-
($
|
|
293
|
-
].filter((ms)=>($
|
|
288
|
+
($d07e34cce18680fd$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'earlier'),
|
|
289
|
+
($d07e34cce18680fd$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'later')
|
|
290
|
+
].filter((ms)=>($d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === maxDate.day).pop();
|
|
294
291
|
// Since hours may repeat, we need to operate on the absolute time in milliseconds.
|
|
295
292
|
// This is done in hours from the Unix epoch so that cycleValue works correctly,
|
|
296
293
|
// and then converted back to milliseconds.
|
|
297
|
-
let ms = ($
|
|
298
|
-
let hours = Math.floor(ms / $
|
|
299
|
-
let remainder = ms % $
|
|
300
|
-
ms = $
|
|
294
|
+
let ms = ($d07e34cce18680fd$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
|
|
295
|
+
let hours = Math.floor(ms / $435a2ceaa8778ed8$var$ONE_HOUR);
|
|
296
|
+
let remainder = ms % $435a2ceaa8778ed8$var$ONE_HOUR;
|
|
297
|
+
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;
|
|
301
298
|
// Now compute the new timezone offset, and convert the absolute time back to local time.
|
|
302
|
-
return ($
|
|
299
|
+
return ($d07e34cce18680fd$export$b4a036af3fc0b032)(($d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
303
300
|
}
|
|
304
301
|
case 'minute':
|
|
305
302
|
case 'second':
|
|
306
303
|
case 'millisecond':
|
|
307
304
|
// @ts-ignore
|
|
308
|
-
return $
|
|
305
|
+
return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(dateTime, field, amount, options);
|
|
309
306
|
case 'era':
|
|
310
307
|
case 'year':
|
|
311
308
|
case 'month':
|
|
312
309
|
case 'day':
|
|
313
310
|
{
|
|
314
|
-
let res = $
|
|
315
|
-
let ms = ($
|
|
316
|
-
return ($
|
|
311
|
+
let res = $435a2ceaa8778ed8$export$d52ced6badfb9a4c(($d07e34cce18680fd$export$b21e0b124e224484)(dateTime), field, amount, options);
|
|
312
|
+
let ms = ($d07e34cce18680fd$export$5107c82f94518f5c)(res, dateTime.timeZone);
|
|
313
|
+
return ($d07e34cce18680fd$export$b4a036af3fc0b032)(($d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
317
314
|
}
|
|
318
315
|
default:
|
|
319
316
|
throw new Error('Unsupported field ' + field);
|
|
320
317
|
}
|
|
321
318
|
}
|
|
322
|
-
function $
|
|
319
|
+
function $435a2ceaa8778ed8$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
|
|
323
320
|
// Set the date/time fields, and recompute the UTC offset to account for DST changes.
|
|
324
321
|
// We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions.
|
|
325
|
-
let plainDateTime = ($
|
|
326
|
-
let res = $
|
|
322
|
+
let plainDateTime = ($d07e34cce18680fd$export$b21e0b124e224484)(dateTime);
|
|
323
|
+
let res = $435a2ceaa8778ed8$export$e5d5e1c1822b6e56($435a2ceaa8778ed8$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
|
|
327
324
|
// If the resulting plain date time values are equal, return the original time.
|
|
328
325
|
// We don't want to change the offset when setting the time to the same value.
|
|
329
326
|
if (res.compare(plainDateTime) === 0) return dateTime;
|
|
330
|
-
let ms = ($
|
|
331
|
-
return ($
|
|
327
|
+
let ms = ($d07e34cce18680fd$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation);
|
|
328
|
+
return ($d07e34cce18680fd$export$b4a036af3fc0b032)(($d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
332
329
|
}
|
|
333
330
|
|
|
334
|
-
export { $
|
|
331
|
+
export { $435a2ceaa8778ed8$export$e16d8520af44a096 as add, $435a2ceaa8778ed8$export$96b1d28349274637 as addZoned, $435a2ceaa8778ed8$export$c4e2ecac49351ef2 as constrain, $435a2ceaa8778ed8$export$7555de1e070510cb as constrainTime, $435a2ceaa8778ed8$export$d52ced6badfb9a4c as cycleDate, $435a2ceaa8778ed8$export$dd02b3e0007dfe28 as cycleTime, $435a2ceaa8778ed8$export$9a297d111fc86b79 as cycleZoned, $435a2ceaa8778ed8$export$3e2544e88a25bff8 as invertDuration, $435a2ceaa8778ed8$export$adaa4cf7ef1b65be as set, $435a2ceaa8778ed8$export$e5d5e1c1822b6e56 as setTime, $435a2ceaa8778ed8$export$31b5430eb18be4f8 as setZoned, $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3 as subtract, $435a2ceaa8778ed8$export$6814caac34ca03c7 as subtractZoned };
|
|
335
332
|
//# sourceMappingURL=manipulation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manipulation.js","sources":["../../../../../../../../node_modules/@internationalized/date/dist/private/manipulation.mjs"],"sourcesContent":["import {epochFromDate as $d07e34cce18680fd$export$bd4fb2bc8bb06fb, fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032, toCalendarDateTime as $d07e34cce18680fd$export$b21e0b124e224484} from \"./conversion.mjs\";\nimport {GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec} from \"./calendars/GregorianCalendar.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nconst $435a2ceaa8778ed8$var$ONE_HOUR = 3600000;\nfunction $435a2ceaa8778ed8$export$e16d8520af44a096(date, duration) {\n let mutableDate = date.copy();\n let days = 'hour' in mutableDate ? $435a2ceaa8778ed8$var$addTimeFields(mutableDate, duration) : 0;\n $435a2ceaa8778ed8$var$addYears(mutableDate, duration.years || 0);\n if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);\n mutableDate.month += duration.months || 0;\n $435a2ceaa8778ed8$var$balanceYearMonth(mutableDate);\n $435a2ceaa8778ed8$var$constrainMonthDay(mutableDate);\n mutableDate.day += (duration.weeks || 0) * 7;\n mutableDate.day += duration.days || 0;\n mutableDate.day += days;\n $435a2ceaa8778ed8$var$balanceDay(mutableDate);\n if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);\n // Constrain in case adding ended up with a date outside the valid range for the calendar system.\n // The behavior here is slightly different than when constraining in the `set` function in that\n // we adjust smaller fields to their minimum/maximum values rather than constraining each field\n // individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.\n if (mutableDate.year < 1) {\n mutableDate.year = 1;\n mutableDate.month = 1;\n mutableDate.day = 1;\n }\n let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);\n if (mutableDate.year > maxYear) {\n let isInverseEra = mutableDate.calendar.isInverseEra?.(mutableDate);\n mutableDate.year = maxYear;\n mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);\n mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);\n }\n if (mutableDate.month < 1) {\n mutableDate.month = 1;\n mutableDate.day = 1;\n }\n let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);\n if (mutableDate.month > maxMonth) {\n mutableDate.month = maxMonth;\n mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);\n }\n mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));\n return mutableDate;\n}\nfunction $435a2ceaa8778ed8$var$addYears(date, years) {\n if (date.calendar.isInverseEra?.(date)) years = -years;\n date.year += years;\n}\nfunction $435a2ceaa8778ed8$var$balanceYearMonth(date) {\n while(date.month < 1){\n $435a2ceaa8778ed8$var$addYears(date, -1);\n date.month += date.calendar.getMonthsInYear(date);\n }\n let monthsInYear = 0;\n while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){\n date.month -= monthsInYear;\n $435a2ceaa8778ed8$var$addYears(date, 1);\n }\n}\nfunction $435a2ceaa8778ed8$var$balanceDay(date) {\n while(date.day < 1){\n date.month--;\n $435a2ceaa8778ed8$var$balanceYearMonth(date);\n date.day += date.calendar.getDaysInMonth(date);\n }\n while(date.day > date.calendar.getDaysInMonth(date)){\n date.day -= date.calendar.getDaysInMonth(date);\n date.month++;\n $435a2ceaa8778ed8$var$balanceYearMonth(date);\n }\n}\nfunction $435a2ceaa8778ed8$var$constrainMonthDay(date) {\n date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));\n date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));\n}\nfunction $435a2ceaa8778ed8$export$c4e2ecac49351ef2(date) {\n if (date.calendar.constrainDate) date.calendar.constrainDate(date);\n date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));\n $435a2ceaa8778ed8$var$constrainMonthDay(date);\n}\nfunction $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration) {\n let inverseDuration = {};\n for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];\n return inverseDuration;\n}\nfunction $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(date, duration) {\n return $435a2ceaa8778ed8$export$e16d8520af44a096(date, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));\n}\nfunction $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(date, fields) {\n let mutableDate = date.copy();\n if (fields.era != null) mutableDate.era = fields.era;\n if (fields.year != null) mutableDate.year = fields.year;\n if (fields.month != null) mutableDate.month = fields.month;\n if (fields.day != null) mutableDate.day = fields.day;\n $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutableDate);\n return mutableDate;\n}\nfunction $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(value, fields) {\n let mutableValue = value.copy();\n if (fields.hour != null) mutableValue.hour = fields.hour;\n if (fields.minute != null) mutableValue.minute = fields.minute;\n if (fields.second != null) mutableValue.second = fields.second;\n if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;\n $435a2ceaa8778ed8$export$7555de1e070510cb(mutableValue);\n return mutableValue;\n}\nfunction $435a2ceaa8778ed8$var$balanceTime(time) {\n time.second += Math.floor(time.millisecond / 1000);\n time.millisecond = $435a2ceaa8778ed8$var$nonNegativeMod(time.millisecond, 1000);\n time.minute += Math.floor(time.second / 60);\n time.second = $435a2ceaa8778ed8$var$nonNegativeMod(time.second, 60);\n time.hour += Math.floor(time.minute / 60);\n time.minute = $435a2ceaa8778ed8$var$nonNegativeMod(time.minute, 60);\n let days = Math.floor(time.hour / 24);\n time.hour = $435a2ceaa8778ed8$var$nonNegativeMod(time.hour, 24);\n return days;\n}\nfunction $435a2ceaa8778ed8$export$7555de1e070510cb(time) {\n time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));\n time.second = Math.max(0, Math.min(time.second, 59));\n time.minute = Math.max(0, Math.min(time.minute, 59));\n time.hour = Math.max(0, Math.min(time.hour, 23));\n}\nfunction $435a2ceaa8778ed8$var$nonNegativeMod(a, b) {\n let result = a % b;\n if (result < 0) result += b;\n return result;\n}\nfunction $435a2ceaa8778ed8$var$addTimeFields(time, duration) {\n time.hour += duration.hours || 0;\n time.minute += duration.minutes || 0;\n time.second += duration.seconds || 0;\n time.millisecond += duration.milliseconds || 0;\n return $435a2ceaa8778ed8$var$balanceTime(time);\n}\nfunction $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, duration) {\n let res = time.copy();\n $435a2ceaa8778ed8$var$addTimeFields(res, duration);\n return res;\n}\nfunction $435a2ceaa8778ed8$export$fe34d3a381cd7501(time, duration) {\n return $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));\n}\nfunction $435a2ceaa8778ed8$export$d52ced6badfb9a4c(value, field, amount, options) {\n let mutable = value.copy();\n switch(field){\n case 'era':\n {\n let eras = value.calendar.getEras();\n let eraIndex = eras.indexOf(value.era);\n if (eraIndex < 0) throw new Error('Invalid era: ' + value.era);\n eraIndex = $435a2ceaa8778ed8$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options?.round);\n mutable.era = eras[eraIndex];\n // Constrain the year and other fields within the era, so the era doesn't change when we balance below.\n $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);\n break;\n }\n case 'year':\n if (mutable.calendar.isInverseEra?.(mutable)) amount = -amount;\n // The year field should not cycle within the era as that can cause weird behavior affecting other fields.\n // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back\n // we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.\n mutable.year = $435a2ceaa8778ed8$var$cycleValue(value.year, amount, -Infinity, 9999, options?.round);\n if (mutable.year === -Infinity) mutable.year = 1;\n if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);\n break;\n case 'month':\n mutable.month = $435a2ceaa8778ed8$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options?.round);\n break;\n case 'day':\n mutable.day = $435a2ceaa8778ed8$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options?.round);\n break;\n default:\n throw new Error('Unsupported field ' + field);\n }\n if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);\n $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);\n return mutable;\n}\nfunction $435a2ceaa8778ed8$export$dd02b3e0007dfe28(value, field, amount, options) {\n let mutable = value.copy();\n switch(field){\n case 'hour':\n {\n let hours = value.hour;\n let min = 0;\n let max = 23;\n if (options?.hourCycle === 12) {\n let isPM = hours >= 12;\n min = isPM ? 12 : 0;\n max = isPM ? 23 : 11;\n }\n mutable.hour = $435a2ceaa8778ed8$var$cycleValue(hours, amount, min, max, options?.round);\n break;\n }\n case 'minute':\n mutable.minute = $435a2ceaa8778ed8$var$cycleValue(value.minute, amount, 0, 59, options?.round);\n break;\n case 'second':\n mutable.second = $435a2ceaa8778ed8$var$cycleValue(value.second, amount, 0, 59, options?.round);\n break;\n case 'millisecond':\n mutable.millisecond = $435a2ceaa8778ed8$var$cycleValue(value.millisecond, amount, 0, 999, options?.round);\n break;\n default:\n throw new Error('Unsupported field ' + field);\n }\n return mutable;\n}\nfunction $435a2ceaa8778ed8$var$cycleValue(value, amount, min, max, round = false) {\n if (round) {\n value += Math.sign(amount);\n if (value < min) value = max;\n let div = Math.abs(amount);\n if (amount > 0) value = Math.ceil(value / div) * div;\n else value = Math.floor(value / div) * div;\n if (value > max) value = min;\n } else {\n value += amount;\n if (value < min) value = max - (min - value - 1);\n else if (value > max) value = min + (value - max - 1);\n }\n return value;\n}\nfunction $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, duration) {\n let ms;\n 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) {\n let res = $435a2ceaa8778ed8$export$e16d8520af44a096((0, $d07e34cce18680fd$export$b21e0b124e224484)(dateTime), {\n years: duration.years,\n months: duration.months,\n weeks: duration.weeks,\n days: duration.days\n });\n // Changing the date may change the timezone offset, so we need to recompute\n // using the 'compatible' disambiguation.\n ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(res, dateTime.timeZone);\n } else // Otherwise, preserve the offset of the original date.\n ms = (0, $d07e34cce18680fd$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;\n // Perform time manipulation in milliseconds rather than on the original time fields to account for DST.\n // For example, adding one hour during a DST transition may result in the hour field staying the same or\n // skipping an hour. This results in the offset field changing value instead of the specified field.\n ms += duration.milliseconds || 0;\n ms += (duration.seconds || 0) * 1000;\n ms += (duration.minutes || 0) * 60000;\n ms += (duration.hours || 0) * 3600000;\n let res = (0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone);\n return (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(res, dateTime.calendar);\n}\nfunction $435a2ceaa8778ed8$export$6814caac34ca03c7(dateTime, duration) {\n return $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));\n}\nfunction $435a2ceaa8778ed8$export$9a297d111fc86b79(dateTime, field, amount, options) {\n // For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes.\n // For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC\n // offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition.\n switch(field){\n case 'hour':\n {\n let min = 0;\n let max = 23;\n if (options?.hourCycle === 12) {\n let isPM = dateTime.hour >= 12;\n min = isPM ? 12 : 0;\n max = isPM ? 23 : 11;\n }\n // The minimum and maximum hour may be affected by daylight saving time.\n // For example, it might jump forward at midnight, and skip 1am.\n // Or it might end at midnight and repeat the 11pm hour. To handle this, we get\n // the possible absolute times for the min and max, and find the maximum range\n // that is within the current day.\n let plainDateTime = (0, $d07e34cce18680fd$export$b21e0b124e224484)(dateTime);\n let minDate = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, {\n hour: min\n }), new (0, $93635573935797de$export$80ee6245ec4f29ec)());\n let minAbsolute = [\n (0, $d07e34cce18680fd$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'earlier'),\n (0, $d07e34cce18680fd$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'later')\n ].filter((ms)=>(0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === minDate.day)[0];\n let maxDate = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, {\n hour: max\n }), new (0, $93635573935797de$export$80ee6245ec4f29ec)());\n let maxAbsolute = [\n (0, $d07e34cce18680fd$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'earlier'),\n (0, $d07e34cce18680fd$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'later')\n ].filter((ms)=>(0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === maxDate.day).pop();\n // Since hours may repeat, we need to operate on the absolute time in milliseconds.\n // This is done in hours from the Unix epoch so that cycleValue works correctly,\n // and then converted back to milliseconds.\n let ms = (0, $d07e34cce18680fd$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;\n let hours = Math.floor(ms / $435a2ceaa8778ed8$var$ONE_HOUR);\n let remainder = ms % $435a2ceaa8778ed8$var$ONE_HOUR;\n 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;\n // Now compute the new timezone offset, and convert the absolute time back to local time.\n return (0, $d07e34cce18680fd$export$b4a036af3fc0b032)((0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);\n }\n case 'minute':\n case 'second':\n case 'millisecond':\n // @ts-ignore\n return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(dateTime, field, amount, options);\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n {\n let res = $435a2ceaa8778ed8$export$d52ced6badfb9a4c((0, $d07e34cce18680fd$export$b21e0b124e224484)(dateTime), field, amount, options);\n let ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(res, dateTime.timeZone);\n return (0, $d07e34cce18680fd$export$b4a036af3fc0b032)((0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);\n }\n default:\n throw new Error('Unsupported field ' + field);\n }\n}\nfunction $435a2ceaa8778ed8$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {\n // Set the date/time fields, and recompute the UTC offset to account for DST changes.\n // We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions.\n let plainDateTime = (0, $d07e34cce18680fd$export$b21e0b124e224484)(dateTime);\n let res = $435a2ceaa8778ed8$export$e5d5e1c1822b6e56($435a2ceaa8778ed8$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);\n // If the resulting plain date time values are equal, return the original time.\n // We don't want to change the offset when setting the time to the same value.\n if (res.compare(plainDateTime) === 0) return dateTime;\n let ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation);\n return (0, $d07e34cce18680fd$export$b4a036af3fc0b032)((0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);\n}\n\n\nexport {$435a2ceaa8778ed8$export$e16d8520af44a096 as add, $435a2ceaa8778ed8$export$c4e2ecac49351ef2 as constrain, $435a2ceaa8778ed8$export$3e2544e88a25bff8 as invertDuration, $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3 as subtract, $435a2ceaa8778ed8$export$adaa4cf7ef1b65be as set, $435a2ceaa8778ed8$export$e5d5e1c1822b6e56 as setTime, $435a2ceaa8778ed8$export$7555de1e070510cb as constrainTime, $435a2ceaa8778ed8$export$7ed87b6bc2506470 as addTime, $435a2ceaa8778ed8$export$fe34d3a381cd7501 as subtractTime, $435a2ceaa8778ed8$export$d52ced6badfb9a4c as cycleDate, $435a2ceaa8778ed8$export$dd02b3e0007dfe28 as cycleTime, $435a2ceaa8778ed8$export$96b1d28349274637 as addZoned, $435a2ceaa8778ed8$export$6814caac34ca03c7 as subtractZoned, $435a2ceaa8778ed8$export$9a297d111fc86b79 as cycleZoned, $435a2ceaa8778ed8$export$31b5430eb18be4f8 as setZoned};\n//# sourceMappingURL=manipulation.mjs.map\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,8BAA8B,GAAG,OAA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C;AACrJ,gBAAgB,IAAI,EAAE,GAAG,CAAI,yCAAyC,EAAE,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC;AAC/F,gBAAgB,OAAO,CAAI,yCAAyC,EAAE,CAAI,yCAAyC,EAAE,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;AAC/J,YAAY;AACZ,QAAQ;AACR,YAAY,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC;AACzD;AACA;AACA,SAAS,yCAAyC,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE;AACrF;AACA;AACA,IAAI,IAAI,aAAa,GAAG,CAAI,yCAAyC,EAAE,QAAQ,CAAC;AAChF,IAAI,IAAI,GAAG,GAAG,yCAAyC,CAAC,yCAAyC,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC;AACjI;AACA;AACA,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,QAAQ;AACzD,IAAI,IAAI,EAAE,GAAG,CAAI,yCAAyC,EAAE,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;AACnG,IAAI,OAAO,CAAI,yCAAyC,EAAE,CAAI,yCAAyC,EAAE,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;AACnJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { toCalendarDate as $d07e34cce18680fd$export$93522d1a439f3617, fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac } from './conversion.js';
|
|
2
|
+
|
|
3
|
+
function $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {
|
|
4
|
+
return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;
|
|
5
|
+
}
|
|
6
|
+
function $ad063034c8620db8$export$461939dd4422153(timeZone) {
|
|
7
|
+
return ($d07e34cce18680fd$export$1b96692a1ba042ac)(Date.now(), timeZone);
|
|
8
|
+
}
|
|
9
|
+
function $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {
|
|
10
|
+
return ($d07e34cce18680fd$export$93522d1a439f3617)($ad063034c8620db8$export$461939dd4422153(timeZone));
|
|
11
|
+
}
|
|
12
|
+
function $ad063034c8620db8$export$68781ddf31c0090f(a, b) {
|
|
13
|
+
return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
|
|
14
|
+
}
|
|
15
|
+
function $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {
|
|
16
|
+
return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);
|
|
17
|
+
}
|
|
18
|
+
function $ad063034c8620db8$var$timeToMs(a) {
|
|
19
|
+
return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
|
|
20
|
+
}
|
|
21
|
+
let $ad063034c8620db8$var$localTimeZone = null;
|
|
22
|
+
let $ad063034c8620db8$var$localTimeZoneOverride = false;
|
|
23
|
+
function $ad063034c8620db8$export$aa8b41735afcabd2() {
|
|
24
|
+
if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
25
|
+
return $ad063034c8620db8$var$localTimeZone;
|
|
26
|
+
}
|
|
27
|
+
function $ad063034c8620db8$export$6ab69b273755230b() {
|
|
28
|
+
return $ad063034c8620db8$var$localTimeZoneOverride;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { $ad063034c8620db8$export$68781ddf31c0090f as compareDate, $ad063034c8620db8$export$c19a80a9721b80f6 as compareTime, $ad063034c8620db8$export$aa8b41735afcabd2 as getLocalTimeZone, $ad063034c8620db8$export$dbc69fd56b53d5e as isEqualCalendar, $ad063034c8620db8$export$6ab69b273755230b as isLocalTimeZoneOverridden, $ad063034c8620db8$export$461939dd4422153 as now, $ad063034c8620db8$export$d0bdf45af03a6ea3 as today };
|
|
32
|
+
//# sourceMappingURL=queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sources":["../../../../../../../../node_modules/@internationalized/date/dist/private/queries.mjs"],"sourcesContent":["import {fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032, toCalendarDate as $d07e34cce18680fd$export$93522d1a439f3617} from \"./conversion.mjs\";\nimport {weekStartData as $d2ca8165c9aa885a$export$7a5acbd77d414bd9} from \"./weekStartData.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $ad063034c8620db8$export$ea39ec197993aef0(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;\n}\nfunction $ad063034c8620db8$export$a18c89cbd24170ff(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month.\n a = $ad063034c8620db8$export$a5a3b454ada2268e(a);\n b = $ad063034c8620db8$export$a5a3b454ada2268e(b);\n return a.era === b.era && a.year === b.year && a.month === b.month;\n}\nfunction $ad063034c8620db8$export$5841f9eb9773f25f(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n a = $ad063034c8620db8$export$f91e89d3d0406102(a);\n b = $ad063034c8620db8$export$f91e89d3d0406102(b);\n return a.era === b.era && a.year === b.year;\n}\nfunction $ad063034c8620db8$export$91b62ebf2ba703ee(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$ea39ec197993aef0(a, b);\n}\nfunction $ad063034c8620db8$export$5a8da0c44a3afdf2(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$a18c89cbd24170ff(a, b);\n}\nfunction $ad063034c8620db8$export$ea840f5a6dda8147(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$5841f9eb9773f25f(a, b);\n}\nfunction $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {\n return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;\n}\nfunction $ad063034c8620db8$export$629b0a497aa65267(date, timeZone) {\n return $ad063034c8620db8$export$ea39ec197993aef0(date, $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone));\n}\nconst $ad063034c8620db8$var$DAY_MAP = {\n sun: 0,\n mon: 1,\n tue: 2,\n wed: 3,\n thu: 4,\n fri: 5,\n sat: 6\n};\nfunction $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let weekStart = firstDayOfWeek ? $ad063034c8620db8$var$DAY_MAP[firstDayOfWeek] : $ad063034c8620db8$var$getWeekStart(locale);\n let dayOfWeek = Math.ceil(julian + 1 - weekStart) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n return dayOfWeek;\n}\nfunction $ad063034c8620db8$export$461939dd4422153(timeZone) {\n return (0, $d07e34cce18680fd$export$1b96692a1ba042ac)(Date.now(), timeZone);\n}\nfunction $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {\n return (0, $d07e34cce18680fd$export$93522d1a439f3617)($ad063034c8620db8$export$461939dd4422153(timeZone));\n}\nfunction $ad063034c8620db8$export$68781ddf31c0090f(a, b) {\n return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);\n}\nfunction $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {\n return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);\n}\nfunction $ad063034c8620db8$var$timeToMs(a) {\n return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;\n}\nfunction $ad063034c8620db8$export$126c91c941de7e(a, timeZone) {\n let ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(a, timeZone);\n let tomorrow = a.add({\n days: 1\n });\n let tomorrowMs = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(tomorrow, timeZone);\n return (tomorrowMs - ms) / 3600000;\n}\nlet $ad063034c8620db8$var$localTimeZone = null;\nlet $ad063034c8620db8$var$localTimeZoneOverride = false;\nfunction $ad063034c8620db8$export$aa8b41735afcabd2() {\n if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n return $ad063034c8620db8$var$localTimeZone;\n}\nfunction $ad063034c8620db8$export$61a9d83ceb59a3dd(timeZone) {\n $ad063034c8620db8$var$localTimeZoneOverride = true;\n $ad063034c8620db8$var$localTimeZone = timeZone;\n}\nfunction $ad063034c8620db8$export$55753838ffe79333() {\n $ad063034c8620db8$var$localTimeZoneOverride = false;\n $ad063034c8620db8$var$localTimeZone = null;\n}\nfunction $ad063034c8620db8$export$6ab69b273755230b() {\n return $ad063034c8620db8$var$localTimeZoneOverride;\n}\nfunction $ad063034c8620db8$export$a5a3b454ada2268e(date) {\n // Use `subtract` instead of `set` so we don't get constrained in an era.\n return date.subtract({\n days: date.day - 1\n });\n}\nfunction $ad063034c8620db8$export$a2258d9c4118825c(date) {\n return date.add({\n days: date.calendar.getDaysInMonth(date) - date.day\n });\n}\nfunction $ad063034c8620db8$export$f91e89d3d0406102(date) {\n return $ad063034c8620db8$export$a5a3b454ada2268e(date.subtract({\n months: date.month - 1\n }));\n}\nfunction $ad063034c8620db8$export$8b7aa55c66d5569e(date) {\n return $ad063034c8620db8$export$a2258d9c4118825c(date.add({\n months: date.calendar.getMonthsInYear(date) - date.month\n }));\n}\nfunction $ad063034c8620db8$export$5412ac11713b72ad(date) {\n if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);\n return 1;\n}\nfunction $ad063034c8620db8$export$b2f4953d301981d5(date) {\n if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);\n return 1;\n}\nfunction $ad063034c8620db8$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek) {\n let dayOfWeek = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek);\n return date.subtract({\n days: dayOfWeek\n });\n}\nfunction $ad063034c8620db8$export$ef8b6d9133084f4e(date, locale, firstDayOfWeek) {\n return $ad063034c8620db8$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek).add({\n days: 6\n });\n}\nconst $ad063034c8620db8$var$cachedRegions = new Map();\nconst $ad063034c8620db8$var$cachedWeekInfo = new Map();\nfunction $ad063034c8620db8$var$getRegion(locale) {\n // If the Intl.Locale API is available, use it to get the region for the locale.\n // @ts-ignore\n if (Intl.Locale) {\n // Constructing an Intl.Locale is expensive, so cache the result.\n let region = $ad063034c8620db8$var$cachedRegions.get(locale);\n if (!region) {\n // @ts-ignore\n region = new Intl.Locale(locale).maximize().region;\n if (region) $ad063034c8620db8$var$cachedRegions.set(locale, region);\n }\n return region;\n }\n // If not, just try splitting the string.\n // If the second part of the locale string is 'u',\n // then this is a unicode extension, so ignore it.\n // Otherwise, it should be the region.\n let part = locale.split('-')[1];\n return part === 'u' ? undefined : part;\n}\nfunction $ad063034c8620db8$var$getWeekStart(locale) {\n // TODO: use Intl.Locale for this once browsers support the weekInfo property\n // https://github.com/tc39/proposal-intl-locale-info\n let weekInfo = $ad063034c8620db8$var$cachedWeekInfo.get(locale);\n if (!weekInfo) {\n if (Intl.Locale) {\n // @ts-ignore\n let localeInst = new Intl.Locale(locale);\n if ('getWeekInfo' in localeInst) {\n // @ts-expect-error\n weekInfo = localeInst.getWeekInfo();\n if (weekInfo) {\n $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);\n return weekInfo.firstDay;\n }\n }\n }\n let region = $ad063034c8620db8$var$getRegion(locale);\n if (locale.includes('-fw-')) {\n // pull the value for the attribute fw from strings such as en-US-u-ca-iso8601-fw-tue or en-US-u-ca-iso8601-fw-mon-nu-thai\n // where the fw attribute could be followed by another unicode locale extension or not\n let day = locale.split('-fw-')[1].split('-')[0];\n if (day === 'mon') weekInfo = {\n firstDay: 1\n };\n else if (day === 'tue') weekInfo = {\n firstDay: 2\n };\n else if (day === 'wed') weekInfo = {\n firstDay: 3\n };\n else if (day === 'thu') weekInfo = {\n firstDay: 4\n };\n else if (day === 'fri') weekInfo = {\n firstDay: 5\n };\n else if (day === 'sat') weekInfo = {\n firstDay: 6\n };\n else weekInfo = {\n firstDay: 0\n };\n } else if (locale.includes('-ca-iso8601')) weekInfo = {\n firstDay: 1\n };\n else weekInfo = {\n firstDay: region ? (0, $d2ca8165c9aa885a$export$7a5acbd77d414bd9)[region] || 0 : 0\n };\n $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);\n }\n return weekInfo.firstDay;\n}\nfunction $ad063034c8620db8$export$ccc1b2479e7dd654(date, locale, firstDayOfWeek) {\n let days = date.calendar.getDaysInMonth(date);\n return Math.ceil(($ad063034c8620db8$export$2061056d06d7cdf7($ad063034c8620db8$export$a5a3b454ada2268e(date), locale, firstDayOfWeek) + days) / 7);\n}\nfunction $ad063034c8620db8$export$5c333a116e949cdd(a, b) {\n if (a && b) return a.compare(b) <= 0 ? a : b;\n return a || b;\n}\nfunction $ad063034c8620db8$export$a75f2bff57811055(a, b) {\n if (a && b) return a.compare(b) >= 0 ? a : b;\n return a || b;\n}\nconst $ad063034c8620db8$var$WEEKEND_DATA = {\n AF: [\n 4,\n 5\n ],\n AE: [\n 5,\n 6\n ],\n BH: [\n 5,\n 6\n ],\n DZ: [\n 5,\n 6\n ],\n EG: [\n 5,\n 6\n ],\n IL: [\n 5,\n 6\n ],\n IQ: [\n 5,\n 6\n ],\n IR: [\n 5,\n 5\n ],\n JO: [\n 5,\n 6\n ],\n KW: [\n 5,\n 6\n ],\n LY: [\n 5,\n 6\n ],\n OM: [\n 5,\n 6\n ],\n QA: [\n 5,\n 6\n ],\n SA: [\n 5,\n 6\n ],\n SD: [\n 5,\n 6\n ],\n SY: [\n 5,\n 6\n ],\n YE: [\n 5,\n 6\n ]\n};\nfunction $ad063034c8620db8$export$618d60ea299da42(date, locale) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let dayOfWeek = Math.ceil(julian + 1) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n let region = $ad063034c8620db8$var$getRegion(locale);\n // Use Intl.Locale for this once weekInfo is supported.\n // https://github.com/tc39/proposal-intl-locale-info\n let [start, end] = $ad063034c8620db8$var$WEEKEND_DATA[region] || [\n 6,\n 0\n ];\n return dayOfWeek === start || dayOfWeek === end;\n}\nfunction $ad063034c8620db8$export$ee9d87258e1d19ed(date, locale) {\n return !$ad063034c8620db8$export$618d60ea299da42(date, locale);\n}\n\n\nexport {$ad063034c8620db8$export$ea39ec197993aef0 as isSameDay, $ad063034c8620db8$export$a18c89cbd24170ff as isSameMonth, $ad063034c8620db8$export$a5a3b454ada2268e as startOfMonth, $ad063034c8620db8$export$5841f9eb9773f25f as isSameYear, $ad063034c8620db8$export$f91e89d3d0406102 as startOfYear, $ad063034c8620db8$export$91b62ebf2ba703ee as isEqualDay, $ad063034c8620db8$export$dbc69fd56b53d5e as isEqualCalendar, $ad063034c8620db8$export$5a8da0c44a3afdf2 as isEqualMonth, $ad063034c8620db8$export$ea840f5a6dda8147 as isEqualYear, $ad063034c8620db8$export$629b0a497aa65267 as isToday, $ad063034c8620db8$export$d0bdf45af03a6ea3 as today, $ad063034c8620db8$export$2061056d06d7cdf7 as getDayOfWeek, $ad063034c8620db8$export$461939dd4422153 as now, $ad063034c8620db8$export$68781ddf31c0090f as compareDate, $ad063034c8620db8$export$c19a80a9721b80f6 as compareTime, $ad063034c8620db8$export$126c91c941de7e as getHoursInDay, $ad063034c8620db8$export$aa8b41735afcabd2 as getLocalTimeZone, $ad063034c8620db8$export$61a9d83ceb59a3dd as setLocalTimeZone, $ad063034c8620db8$export$55753838ffe79333 as resetLocalTimeZone, $ad063034c8620db8$export$6ab69b273755230b as isLocalTimeZoneOverridden, $ad063034c8620db8$export$a2258d9c4118825c as endOfMonth, $ad063034c8620db8$export$8b7aa55c66d5569e as endOfYear, $ad063034c8620db8$export$5412ac11713b72ad as getMinimumMonthInYear, $ad063034c8620db8$export$b2f4953d301981d5 as getMinimumDayInMonth, $ad063034c8620db8$export$42c81a444fbfb5d4 as startOfWeek, $ad063034c8620db8$export$ef8b6d9133084f4e as endOfWeek, $ad063034c8620db8$export$ccc1b2479e7dd654 as getWeeksInMonth, $ad063034c8620db8$export$5c333a116e949cdd as minDate, $ad063034c8620db8$export$a75f2bff57811055 as maxDate, $ad063034c8620db8$export$618d60ea299da42 as isWeekend, $ad063034c8620db8$export$ee9d87258e1d19ed as isWeekday};\n//# sourceMappingURL=queries.mjs.map\n"],"names":[],"mappings":";;AAyCA,SAAS,wCAAwC,CAAC,CAAC,EAAE,CAAC,EAAE;AACxD,IAAI,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;AAC5E;AAsBA,SAAS,wCAAwC,CAAC,QAAQ,EAAE;AAC5D,IAAI,OAAO,CAAI,yCAAyC,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC;AAC/E;AACA,SAAS,yCAAyC,CAAC,QAAQ,EAAE;AAC7D,IAAI,OAAO,CAAI,yCAAyC,EAAE,wCAAwC,CAAC,QAAQ,CAAC,CAAC;AAC7G;AACA,SAAS,yCAAyC,CAAC,CAAC,EAAE,CAAC,EAAE;AACzD,IAAI,OAAO,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;AAChE;AACA,SAAS,yCAAyC,CAAC,CAAC,EAAE,CAAC,EAAE;AACzD,IAAI,OAAO,8BAA8B,CAAC,CAAC,CAAC,GAAG,8BAA8B,CAAC,CAAC,CAAC;AAChF;AACA,SAAS,8BAA8B,CAAC,CAAC,EAAE;AAC3C,IAAI,OAAO,CAAC,CAAC,IAAI,GAAG,OAAO,GAAG,CAAC,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW;AAChF;AASA,IAAI,mCAAmC,GAAG,IAAI;AAC9C,IAAI,2CAA2C,GAAG,KAAK;AACvD,SAAS,yCAAyC,GAAG;AACrD,IAAI,IAAI,mCAAmC,IAAI,IAAI,EAAE,mCAAmC,GAAG,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ;AAC/I,IAAI,OAAO,mCAAmC;AAC9C;AASA,SAAS,yCAAyC,GAAG;AACrD,IAAI,OAAO,2CAA2C;AACtD;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CalendarDate as $2aaf608024c21ca1$export$99faa760c7908e4f } from './CalendarDate.js';
|
|
2
|
+
import { toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032 } from './conversion.js';
|
|
3
|
+
import { GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec } from './calendars/GregorianCalendar.js';
|
|
4
|
+
|
|
5
|
+
const $58246871e4652552$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
|
|
6
|
+
const $58246871e4652552$var$ABSOLUTE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
|
|
7
|
+
function $58246871e4652552$export$6b862160d295c8e(value) {
|
|
8
|
+
let m = value.match($58246871e4652552$var$DATE_RE);
|
|
9
|
+
if (!m) {
|
|
10
|
+
if ($58246871e4652552$var$ABSOLUTE_RE.test(value)) throw new Error(`Invalid ISO 8601 date string: ${value}. Use parseAbsolute() instead.`);
|
|
11
|
+
throw new Error('Invalid ISO 8601 date string: ' + value);
|
|
12
|
+
}
|
|
13
|
+
let date = new ($2aaf608024c21ca1$export$99faa760c7908e4f)($58246871e4652552$var$parseNumber(m[1], 0, 9999), $58246871e4652552$var$parseNumber(m[2], 1, 12), 1);
|
|
14
|
+
date.day = $58246871e4652552$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));
|
|
15
|
+
return date;
|
|
16
|
+
}
|
|
17
|
+
function $58246871e4652552$var$parseNumber(value, min, max) {
|
|
18
|
+
let val = Number(value);
|
|
19
|
+
if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
|
|
20
|
+
return val;
|
|
21
|
+
}
|
|
22
|
+
function $58246871e4652552$export$f59dee82248f5ad4(time) {
|
|
23
|
+
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
|
|
24
|
+
}
|
|
25
|
+
function $58246871e4652552$export$60dfd74aa96791bd(date) {
|
|
26
|
+
let gregorianDate = ($d07e34cce18680fd$export$b4a036af3fc0b032)(date, new ($93635573935797de$export$80ee6245ec4f29ec)());
|
|
27
|
+
let year;
|
|
28
|
+
if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');
|
|
29
|
+
else year = String(gregorianDate.year).padStart(4, '0');
|
|
30
|
+
return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;
|
|
31
|
+
}
|
|
32
|
+
function $58246871e4652552$export$4223de14708adc63(date) {
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
return `${$58246871e4652552$export$60dfd74aa96791bd(date)}T${$58246871e4652552$export$f59dee82248f5ad4(date)}`;
|
|
35
|
+
}
|
|
36
|
+
function $58246871e4652552$var$offsetToString(offset) {
|
|
37
|
+
let sign = Math.sign(offset) < 0 ? '-' : '+';
|
|
38
|
+
offset = Math.abs(offset);
|
|
39
|
+
let offsetHours = Math.floor(offset / 3600000);
|
|
40
|
+
let offsetMinutes = Math.floor(offset % 3600000 / 60000);
|
|
41
|
+
let offsetSeconds = Math.floor(offset % 3600000 % 60000 / 1000);
|
|
42
|
+
let stringOffset = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;
|
|
43
|
+
if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, '0')}`;
|
|
44
|
+
return stringOffset;
|
|
45
|
+
}
|
|
46
|
+
function $58246871e4652552$export$bf79f1ebf4b18792(date) {
|
|
47
|
+
return `${$58246871e4652552$export$4223de14708adc63(date)}${$58246871e4652552$var$offsetToString(date.offset)}[${date.timeZone}]`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { $58246871e4652552$export$4223de14708adc63 as dateTimeToString, $58246871e4652552$export$60dfd74aa96791bd as dateToString, $58246871e4652552$export$6b862160d295c8e as parseDate, $58246871e4652552$export$f59dee82248f5ad4 as timeToString, $58246871e4652552$export$bf79f1ebf4b18792 as zonedDateTimeToString };
|
|
51
|
+
//# sourceMappingURL=string.js.map
|