@hero-design/rn 8.112.4 → 8.112.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.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/es/index.js +1760 -1359
- package/jest.config.js +1 -1
- package/lib/index.js +1760 -1359
- package/package.json +2 -2
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/AnimatedScroller/AnimatedScrollable.tsx +1 -1
- package/src/components/AnimatedScroller/SectionListWithFAB.tsx +1 -1
- package/src/components/Button/UtilityButton/index.tsx +1 -1
- package/src/components/Calendar/CalendarRange.tsx +1 -1
- package/src/components/Calendar/CalendarRowItem.tsx +1 -1
- package/src/components/Calendar/index.tsx +1 -1
- package/src/components/Chart/Line/Line.tsx +3 -4
- package/src/components/Chart/index.tsx +0 -2
- package/src/components/Chart/shared/ChartHeader.tsx +1 -1
- package/src/components/Chart/shared/hooks/useColorScale.ts +2 -2
- package/src/components/Chart/shared/hooks/useGenerateTicks.ts +2 -2
- package/src/components/Chart/shared/hooks/useScaleBandX.ts +3 -3
- package/src/components/Chart/shared/hooks/useScaleLinearY.ts +3 -4
- package/src/components/Chart/types.ts +0 -8
- package/src/components/Checkbox/utils.ts +1 -1
- package/src/components/Chip/index.tsx +1 -1
- package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +7 -5
- package/src/components/DatePicker/hooks/useFormatDate.ts +1 -1
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/FloatingIsland/index.tsx +1 -1
- package/src/components/Illustration/index.tsx +1 -1
- package/src/components/List/BasicListItem.tsx +1 -1
- package/src/components/List/StyledListItem.tsx +2 -2
- package/src/components/LocaleProvider/__tests__/utils.specs.ts +1 -2
- package/src/components/LocaleProvider/index.tsx +1 -1
- package/src/components/LocaleProvider/utils.ts +2 -3
- package/src/components/Portal/index.tsx +1 -1
- package/src/components/Portal/types.tsx +2 -2
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/Rate/index.tsx +2 -2
- package/src/components/RefreshControl/index.tsx +1 -1
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -1
- package/src/components/RichTextEditor/utils/events.ts +1 -1
- package/src/components/Search/SearchOneLine.tsx +1 -1
- package/src/components/Search/StyledSearch.tsx +1 -1
- package/src/components/SectionHeading/index.tsx +1 -1
- package/src/components/Select/helpers.tsx +1 -1
- package/src/components/Skeleton/index.tsx +1 -1
- package/src/components/Slider/RangeSlider.tsx +1 -1
- package/src/components/StatusScreens/Success/index.tsx +1 -1
- package/src/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.tsx +1 -1
- package/src/components/Tabs/TabWithBadge.tsx +2 -2
- package/src/components/TextInput/index.tsx +2 -2
- package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
- package/src/components/TimePicker/types.ts +1 -1
- package/src/components/Toast/ToastContext.ts +1 -1
- package/src/components/Toolbar/index.tsx +1 -1
- package/src/components/Typography/Label/index.tsx +1 -1
- package/src/theme/global/colors/types.ts +1 -1
- package/src/theme/global/shadows/index.ts +0 -3
- package/src/theme/global/shadows/types.ts +1 -1
- package/src/theme/global/sizes.ts +1 -0
- package/src/theme/global/typography.ts +2 -1
- package/types/components/Accordion/AccordionItem.d.ts +1 -1
- package/types/components/AnimatedScroller/AnimatedScrollable.d.ts +1 -1
- package/types/components/AnimatedScroller/SectionListWithFAB.d.ts +1 -1
- package/types/components/Button/UtilityButton/index.d.ts +1 -1
- package/types/components/Calendar/CalendarRowItem.d.ts +1 -1
- package/types/components/Chart/index.d.ts +0 -3
- package/types/components/Chart/shared/ChartHeader.d.ts +1 -1
- package/types/components/Chart/shared/hooks/useScaleBandX.d.ts +2 -3
- package/types/components/Chart/shared/hooks/useScaleLinearY.d.ts +2 -3
- package/types/components/Chart/types.d.ts +1 -7
- package/types/components/Checkbox/utils.d.ts +2 -1
- package/types/components/Chip/index.d.ts +1 -1
- package/types/components/DatePicker/types.d.ts +1 -1
- package/types/components/FloatingIsland/index.d.ts +1 -1
- package/types/components/Illustration/index.d.ts +1 -1
- package/types/components/List/BasicListItem.d.ts +1 -1
- package/types/components/List/StyledListItem.d.ts +2 -2
- package/types/components/LocaleProvider/utils.d.ts +1 -1
- package/types/components/Portal/index.d.ts +1 -1
- package/types/components/Portal/types.d.ts +3 -2
- package/types/components/Radio/Radio.d.ts +1 -1
- package/types/components/Rate/index.d.ts +2 -2
- package/types/components/RefreshControl/index.d.ts +1 -1
- package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -4
- package/types/components/RichTextEditor/utils/events.d.ts +2 -1
- package/types/components/Search/SearchOneLine.d.ts +1 -1
- package/types/components/Search/StyledSearch.d.ts +2 -1
- package/types/components/SectionHeading/index.d.ts +1 -1
- package/types/components/Select/helpers.d.ts +2 -1
- package/types/components/Skeleton/index.d.ts +1 -1
- package/types/components/Slider/RangeSlider.d.ts +1 -1
- package/types/components/StatusScreens/Success/index.d.ts +1 -1
- package/types/components/Tabs/ScrollableTabsHeader/ScrollableTabsHeader.d.ts +1 -1
- package/types/components/Tabs/TabWithBadge.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +2 -2
- package/types/components/TimePicker/types.d.ts +1 -1
- package/types/components/Toast/ToastContext.d.ts +2 -1
- package/types/components/Toolbar/index.d.ts +1 -1
- package/types/components/Typography/Label/index.d.ts +1 -1
- package/types/theme/components/alert.d.ts +10 -1
- package/types/theme/components/bottomNavigation.d.ts +10 -1
- package/types/theme/components/chip.d.ts +10 -1
- package/types/theme/components/fab.d.ts +10 -1
- package/types/theme/components/floatingIsland.d.ts +10 -1
- package/types/theme/components/list.d.ts +10 -1
- package/types/theme/components/search.d.ts +10 -1
- package/types/theme/components/segmentedControl.d.ts +10 -1
- package/types/theme/components/slider.d.ts +10 -1
- package/types/theme/components/toast.d.ts +10 -1
- package/types/theme/global/colors/types.d.ts +2 -1
- package/types/theme/global/index.d.ts +1 -1
- package/types/theme/global/shadows/index.d.ts +0 -2
- package/types/theme/global/shadows/types.d.ts +2 -1
- package/types/theme/global/typography.d.ts +1 -1
- package/.cursor/rules/performance-optimization.mdc +0 -64
- package/.cursor/rules/rn-rules.mdc +0 -165
- package/.cursor/rules/testing-rules.mdc +0 -114
package/lib/index.js
CHANGED
|
@@ -617,14 +617,14 @@ function _toPropertyKey(t) {
|
|
|
617
617
|
var i = _toPrimitive(t, "string");
|
|
618
618
|
return "symbol" == typeof i ? i : i + "";
|
|
619
619
|
}
|
|
620
|
-
function _typeof
|
|
620
|
+
function _typeof(o) {
|
|
621
621
|
"@babel/helpers - typeof";
|
|
622
622
|
|
|
623
|
-
return _typeof
|
|
623
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
624
624
|
return typeof o;
|
|
625
625
|
} : function (o) {
|
|
626
626
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
627
|
-
}, _typeof
|
|
627
|
+
}, _typeof(o);
|
|
628
628
|
}
|
|
629
629
|
function _unsupportedIterableToArray(r, a) {
|
|
630
630
|
if (r) {
|
|
@@ -1116,7 +1116,7 @@ function requireCamelize() {
|
|
|
1116
1116
|
return walk(obj);
|
|
1117
1117
|
};
|
|
1118
1118
|
function walk(obj) {
|
|
1119
|
-
if (!obj || _typeof
|
|
1119
|
+
if (!obj || _typeof(obj) !== 'object') return obj;
|
|
1120
1120
|
if (isDate(obj) || isRegex(obj)) return obj;
|
|
1121
1121
|
if (isArray(obj)) return map(obj, walk);
|
|
1122
1122
|
return reduce(objectKeys(obj), function (acc, key) {
|
|
@@ -1479,7 +1479,7 @@ function requireCssToReactNative() {
|
|
|
1479
1479
|
value: true
|
|
1480
1480
|
});
|
|
1481
1481
|
function _interopDefault(ex) {
|
|
1482
|
-
return ex && _typeof
|
|
1482
|
+
return ex && _typeof(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
1483
1483
|
}
|
|
1484
1484
|
var parse = requireLib$1();
|
|
1485
1485
|
var parse__default = _interopDefault(parse);
|
|
@@ -3362,7 +3362,7 @@ var generated = {};
|
|
|
3362
3362
|
var buffer = '';
|
|
3363
3363
|
var lastType;
|
|
3364
3364
|
function handleInterpolation(interpolation, i, arr) {
|
|
3365
|
-
var type = _typeof
|
|
3365
|
+
var type = _typeof(interpolation);
|
|
3366
3366
|
if (type === 'string') {
|
|
3367
3367
|
// strip comments
|
|
3368
3368
|
interpolation = interpolation.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, '');
|
|
@@ -6819,7 +6819,7 @@ var _deepCompareValue = function deepCompareValue(a, b) {
|
|
|
6819
6819
|
// If either is null or undefined (but they are not strictly equal), return false
|
|
6820
6820
|
if (a == null || b == null) return false;
|
|
6821
6821
|
// If types don't match, they can't be equal
|
|
6822
|
-
if (_typeof
|
|
6822
|
+
if (_typeof(a) !== _typeof(b)) return false;
|
|
6823
6823
|
// Handle array comparison
|
|
6824
6824
|
if (Array.isArray(a) && Array.isArray(b)) {
|
|
6825
6825
|
if (a.length !== b.length) return false;
|
|
@@ -6830,7 +6830,7 @@ var _deepCompareValue = function deepCompareValue(a, b) {
|
|
|
6830
6830
|
// If one is array and the other isn't, return false
|
|
6831
6831
|
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
6832
6832
|
// Handle object comparison
|
|
6833
|
-
if (_typeof
|
|
6833
|
+
if (_typeof(a) === 'object' && _typeof(b) === 'object') {
|
|
6834
6834
|
var keysA = Object.keys(a);
|
|
6835
6835
|
var keysB = Object.keys(b);
|
|
6836
6836
|
if (keysA.length !== keysB.length) return false;
|
|
@@ -11365,57 +11365,91 @@ var BottomSheet$1 = Object.assign(BottomSheet, {
|
|
|
11365
11365
|
ScrollView: BottomSheetScrollView
|
|
11366
11366
|
});
|
|
11367
11367
|
|
|
11368
|
-
|
|
11369
|
-
|
|
11368
|
+
/**
|
|
11369
|
+
* @module constants
|
|
11370
|
+
* @summary Useful constants
|
|
11371
|
+
* @description
|
|
11372
|
+
* Collection of useful date constants.
|
|
11373
|
+
*
|
|
11374
|
+
* The constants could be imported from `date-fns/constants`:
|
|
11375
|
+
*
|
|
11376
|
+
* ```ts
|
|
11377
|
+
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
|
11378
|
+
*
|
|
11379
|
+
* function isAllowedTime(time) {
|
|
11380
|
+
* return time <= maxTime && time >= minTime;
|
|
11381
|
+
* }
|
|
11382
|
+
* ```
|
|
11383
|
+
*/
|
|
11370
11384
|
|
|
11371
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
11372
|
-
return typeof o;
|
|
11373
|
-
} : function (o) {
|
|
11374
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
11375
|
-
}, _typeof(o);
|
|
11376
|
-
}
|
|
11377
11385
|
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11386
|
+
/**
|
|
11387
|
+
* @constant
|
|
11388
|
+
* @name millisecondsInWeek
|
|
11389
|
+
* @summary Milliseconds in 1 week.
|
|
11390
|
+
*/
|
|
11391
|
+
var millisecondsInWeek = 604800000;
|
|
11383
11392
|
|
|
11384
11393
|
/**
|
|
11385
|
-
* @
|
|
11386
|
-
* @
|
|
11387
|
-
* @summary
|
|
11394
|
+
* @constant
|
|
11395
|
+
* @name millisecondsInDay
|
|
11396
|
+
* @summary Milliseconds in 1 day.
|
|
11397
|
+
*/
|
|
11398
|
+
var millisecondsInDay = 86400000;
|
|
11399
|
+
|
|
11400
|
+
/**
|
|
11401
|
+
* @constant
|
|
11402
|
+
* @name constructFromSymbol
|
|
11403
|
+
* @summary Symbol enabling Date extensions to inherit properties from the reference date.
|
|
11404
|
+
*
|
|
11405
|
+
* The symbol is used to enable the `constructFrom` function to construct a date
|
|
11406
|
+
* using a reference date and a value. It allows to transfer extra properties
|
|
11407
|
+
* from the reference date to the new date. It's useful for extensions like
|
|
11408
|
+
* [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
|
|
11409
|
+
* a constructor argument.
|
|
11410
|
+
*/
|
|
11411
|
+
var constructFromSymbol = Symbol["for"]("constructDateFrom");
|
|
11412
|
+
|
|
11413
|
+
/**
|
|
11414
|
+
* @name constructFrom
|
|
11415
|
+
* @category Generic Helpers
|
|
11416
|
+
* @summary Constructs a date using the reference date and the value
|
|
11388
11417
|
*
|
|
11389
11418
|
* @description
|
|
11390
|
-
*
|
|
11419
|
+
* The function constructs a new date using the constructor from the reference
|
|
11420
|
+
* date and the given value. It helps to build generic functions that accept
|
|
11421
|
+
* date extensions.
|
|
11391
11422
|
*
|
|
11392
|
-
*
|
|
11393
|
-
* @returns {boolean} true if the given value is a date
|
|
11394
|
-
* @throws {TypeError} 1 arguments required
|
|
11423
|
+
* It defaults to `Date` if the passed reference date is a number or a string.
|
|
11395
11424
|
*
|
|
11396
|
-
*
|
|
11397
|
-
*
|
|
11398
|
-
*
|
|
11399
|
-
*
|
|
11425
|
+
* Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
|
|
11426
|
+
* enabling to transfer extra properties from the reference date to the new date.
|
|
11427
|
+
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
11428
|
+
* that accept a time zone as a constructor argument.
|
|
11400
11429
|
*
|
|
11401
|
-
* @
|
|
11402
|
-
* // For an invalid date:
|
|
11403
|
-
* const result = isDate(new Date(NaN))
|
|
11404
|
-
* //=> true
|
|
11430
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11405
11431
|
*
|
|
11406
|
-
* @
|
|
11407
|
-
*
|
|
11408
|
-
*
|
|
11409
|
-
*
|
|
11432
|
+
* @param date - The reference date to take constructor from
|
|
11433
|
+
* @param value - The value to create the date
|
|
11434
|
+
*
|
|
11435
|
+
* @returns Date initialized using the given date and value
|
|
11410
11436
|
*
|
|
11411
11437
|
* @example
|
|
11412
|
-
*
|
|
11413
|
-
*
|
|
11414
|
-
*
|
|
11438
|
+
* import { constructFrom } from "./constructFrom/date-fns";
|
|
11439
|
+
*
|
|
11440
|
+
* // A function that clones a date preserving the original type
|
|
11441
|
+
* function cloneDate<DateType extends Date>(date: DateType): DateType {
|
|
11442
|
+
* return constructFrom(
|
|
11443
|
+
* date, // Use constructor from the given date
|
|
11444
|
+
* date.getTime() // Use the date value to create a new date
|
|
11445
|
+
* );
|
|
11446
|
+
* }
|
|
11415
11447
|
*/
|
|
11416
|
-
function
|
|
11417
|
-
|
|
11418
|
-
|
|
11448
|
+
function constructFrom(date, value) {
|
|
11449
|
+
if (typeof date === "function") return date(value);
|
|
11450
|
+
if (date && _typeof(date) === "object" && constructFromSymbol in date) return date[constructFromSymbol](value);
|
|
11451
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
11452
|
+
return new Date(value);
|
|
11419
11453
|
}
|
|
11420
11454
|
|
|
11421
11455
|
/**
|
|
@@ -11432,11 +11466,19 @@ function isDate(value) {
|
|
|
11432
11466
|
*
|
|
11433
11467
|
* If the argument is none of the above, the function returns Invalid Date.
|
|
11434
11468
|
*
|
|
11469
|
+
* Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
|
|
11470
|
+
* enabling to transfer extra properties from the reference date to the new date.
|
|
11471
|
+
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
11472
|
+
* that accept a time zone as a constructor argument.
|
|
11473
|
+
*
|
|
11435
11474
|
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
11436
11475
|
*
|
|
11437
|
-
* @
|
|
11438
|
-
* @
|
|
11439
|
-
*
|
|
11476
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11477
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11478
|
+
*
|
|
11479
|
+
* @param argument - The value to convert
|
|
11480
|
+
*
|
|
11481
|
+
* @returns The parsed date in the local time zone
|
|
11440
11482
|
*
|
|
11441
11483
|
* @example
|
|
11442
11484
|
* // Clone the date:
|
|
@@ -11448,27 +11490,346 @@ function isDate(value) {
|
|
|
11448
11490
|
* const result = toDate(1392098430000)
|
|
11449
11491
|
* //=> Tue Feb 11 2014 11:30:30
|
|
11450
11492
|
*/
|
|
11451
|
-
function toDate(argument) {
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11493
|
+
function toDate(argument, context) {
|
|
11494
|
+
// [TODO] Get rid of `toDate` or `constructFrom`?
|
|
11495
|
+
return constructFrom(context || argument, argument);
|
|
11496
|
+
}
|
|
11497
|
+
|
|
11498
|
+
/**
|
|
11499
|
+
* Converts a function to a curried function that accepts arguments in reverse
|
|
11500
|
+
* order.
|
|
11501
|
+
*
|
|
11502
|
+
* @param fn - The function to convert to FP
|
|
11503
|
+
* @param arity - The arity of the function
|
|
11504
|
+
* @param curriedArgs - The curried arguments
|
|
11505
|
+
*
|
|
11506
|
+
* @returns FP version of the function
|
|
11507
|
+
*
|
|
11508
|
+
* @private
|
|
11509
|
+
*/
|
|
11510
|
+
function convertToFP(fn, arity) {
|
|
11511
|
+
var curriedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
11512
|
+
return curriedArgs.length >= arity ? fn.apply(void 0, _toConsumableArray(curriedArgs.slice(0, arity).reverse())) : function () {
|
|
11513
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11514
|
+
args[_key] = arguments[_key];
|
|
11467
11515
|
}
|
|
11468
|
-
return
|
|
11516
|
+
return convertToFP(fn, arity, curriedArgs.concat(args));
|
|
11517
|
+
};
|
|
11518
|
+
}
|
|
11519
|
+
|
|
11520
|
+
var defaultOptions = {};
|
|
11521
|
+
function getDefaultOptions() {
|
|
11522
|
+
return defaultOptions;
|
|
11523
|
+
}
|
|
11524
|
+
function setDefaultOptions$1(newOptions) {
|
|
11525
|
+
defaultOptions = newOptions;
|
|
11526
|
+
}
|
|
11527
|
+
|
|
11528
|
+
/**
|
|
11529
|
+
* The {@link startOfWeek} function options.
|
|
11530
|
+
*/
|
|
11531
|
+
|
|
11532
|
+
/**
|
|
11533
|
+
* @name startOfWeek
|
|
11534
|
+
* @category Week Helpers
|
|
11535
|
+
* @summary Return the start of a week for the given date.
|
|
11536
|
+
*
|
|
11537
|
+
* @description
|
|
11538
|
+
* Return the start of a week for the given date.
|
|
11539
|
+
* The result will be in the local timezone.
|
|
11540
|
+
*
|
|
11541
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11542
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11543
|
+
*
|
|
11544
|
+
* @param date - The original date
|
|
11545
|
+
* @param options - An object with options
|
|
11546
|
+
*
|
|
11547
|
+
* @returns The start of a week
|
|
11548
|
+
*
|
|
11549
|
+
* @example
|
|
11550
|
+
* // The start of a week for 2 September 2014 11:55:00:
|
|
11551
|
+
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
11552
|
+
* //=> Sun Aug 31 2014 00:00:00
|
|
11553
|
+
*
|
|
11554
|
+
* @example
|
|
11555
|
+
* // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
|
|
11556
|
+
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
|
|
11557
|
+
* //=> Mon Sep 01 2014 00:00:00
|
|
11558
|
+
*/
|
|
11559
|
+
function startOfWeek(date, options) {
|
|
11560
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions$local;
|
|
11561
|
+
var defaultOptions = getDefaultOptions();
|
|
11562
|
+
var weekStartsOn = (_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 || (_defaultOptions$local = _defaultOptions$local.options) === null || _defaultOptions$local === void 0 ? void 0 : _defaultOptions$local.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0;
|
|
11563
|
+
var _date = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
11564
|
+
var day = _date.getDay();
|
|
11565
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
11566
|
+
_date.setDate(_date.getDate() - diff);
|
|
11567
|
+
_date.setHours(0, 0, 0, 0);
|
|
11568
|
+
return _date;
|
|
11569
|
+
}
|
|
11570
|
+
|
|
11571
|
+
/**
|
|
11572
|
+
* The {@link startOfISOWeek} function options.
|
|
11573
|
+
*/
|
|
11574
|
+
|
|
11575
|
+
/**
|
|
11576
|
+
* @name startOfISOWeek
|
|
11577
|
+
* @category ISO Week Helpers
|
|
11578
|
+
* @summary Return the start of an ISO week for the given date.
|
|
11579
|
+
*
|
|
11580
|
+
* @description
|
|
11581
|
+
* Return the start of an ISO week for the given date.
|
|
11582
|
+
* The result will be in the local timezone.
|
|
11583
|
+
*
|
|
11584
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11585
|
+
*
|
|
11586
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11587
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11588
|
+
*
|
|
11589
|
+
* @param date - The original date
|
|
11590
|
+
* @param options - An object with options
|
|
11591
|
+
*
|
|
11592
|
+
* @returns The start of an ISO week
|
|
11593
|
+
*
|
|
11594
|
+
* @example
|
|
11595
|
+
* // The start of an ISO week for 2 September 2014 11:55:00:
|
|
11596
|
+
* const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
11597
|
+
* //=> Mon Sep 01 2014 00:00:00
|
|
11598
|
+
*/
|
|
11599
|
+
function startOfISOWeek(date, options) {
|
|
11600
|
+
return startOfWeek(date, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
11601
|
+
weekStartsOn: 1
|
|
11602
|
+
}));
|
|
11603
|
+
}
|
|
11604
|
+
|
|
11605
|
+
/**
|
|
11606
|
+
* The {@link getISOWeekYear} function options.
|
|
11607
|
+
*/
|
|
11608
|
+
|
|
11609
|
+
/**
|
|
11610
|
+
* @name getISOWeekYear
|
|
11611
|
+
* @category ISO Week-Numbering Year Helpers
|
|
11612
|
+
* @summary Get the ISO week-numbering year of the given date.
|
|
11613
|
+
*
|
|
11614
|
+
* @description
|
|
11615
|
+
* Get the ISO week-numbering year of the given date,
|
|
11616
|
+
* which always starts 3 days before the year's first Thursday.
|
|
11617
|
+
*
|
|
11618
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11619
|
+
*
|
|
11620
|
+
* @param date - The given date
|
|
11621
|
+
*
|
|
11622
|
+
* @returns The ISO week-numbering year
|
|
11623
|
+
*
|
|
11624
|
+
* @example
|
|
11625
|
+
* // Which ISO-week numbering year is 2 January 2005?
|
|
11626
|
+
* const result = getISOWeekYear(new Date(2005, 0, 2))
|
|
11627
|
+
* //=> 2004
|
|
11628
|
+
*/
|
|
11629
|
+
function getISOWeekYear(date, options) {
|
|
11630
|
+
var _date = toDate(date, void 0 );
|
|
11631
|
+
var year = _date.getFullYear();
|
|
11632
|
+
var fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
|
|
11633
|
+
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
11634
|
+
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
11635
|
+
var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
11636
|
+
var fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
|
|
11637
|
+
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
11638
|
+
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
11639
|
+
var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
11640
|
+
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
11641
|
+
return year + 1;
|
|
11642
|
+
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
11643
|
+
return year;
|
|
11644
|
+
} else {
|
|
11645
|
+
return year - 1;
|
|
11469
11646
|
}
|
|
11470
11647
|
}
|
|
11471
11648
|
|
|
11649
|
+
/**
|
|
11650
|
+
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
11651
|
+
* They usually appear for dates that denote time before the timezones were introduced
|
|
11652
|
+
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
11653
|
+
* and GMT+01:00:00 after that date)
|
|
11654
|
+
*
|
|
11655
|
+
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
11656
|
+
* which would lead to incorrect calculations.
|
|
11657
|
+
*
|
|
11658
|
+
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
11659
|
+
*/
|
|
11660
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
11661
|
+
var _date = toDate(date);
|
|
11662
|
+
var utcDate = new Date(Date.UTC(_date.getFullYear(), _date.getMonth(), _date.getDate(), _date.getHours(), _date.getMinutes(), _date.getSeconds(), _date.getMilliseconds()));
|
|
11663
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
11664
|
+
return +date - +utcDate;
|
|
11665
|
+
}
|
|
11666
|
+
|
|
11667
|
+
function normalizeDates(context) {
|
|
11668
|
+
for (var _len = arguments.length, dates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11669
|
+
dates[_key - 1] = arguments[_key];
|
|
11670
|
+
}
|
|
11671
|
+
var normalize = constructFrom.bind(null, dates.find(function (date) {
|
|
11672
|
+
return _typeof(date) === "object";
|
|
11673
|
+
}));
|
|
11674
|
+
return dates.map(normalize);
|
|
11675
|
+
}
|
|
11676
|
+
|
|
11677
|
+
/**
|
|
11678
|
+
* The {@link startOfDay} function options.
|
|
11679
|
+
*/
|
|
11680
|
+
|
|
11681
|
+
/**
|
|
11682
|
+
* @name startOfDay
|
|
11683
|
+
* @category Day Helpers
|
|
11684
|
+
* @summary Return the start of a day for the given date.
|
|
11685
|
+
*
|
|
11686
|
+
* @description
|
|
11687
|
+
* Return the start of a day for the given date.
|
|
11688
|
+
* The result will be in the local timezone.
|
|
11689
|
+
*
|
|
11690
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11691
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11692
|
+
*
|
|
11693
|
+
* @param date - The original date
|
|
11694
|
+
* @param options - The options
|
|
11695
|
+
*
|
|
11696
|
+
* @returns The start of a day
|
|
11697
|
+
*
|
|
11698
|
+
* @example
|
|
11699
|
+
* // The start of a day for 2 September 2014 11:55:00:
|
|
11700
|
+
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
11701
|
+
* //=> Tue Sep 02 2014 00:00:00
|
|
11702
|
+
*/
|
|
11703
|
+
function startOfDay(date, options) {
|
|
11704
|
+
var _date = toDate(date, void 0 );
|
|
11705
|
+
_date.setHours(0, 0, 0, 0);
|
|
11706
|
+
return _date;
|
|
11707
|
+
}
|
|
11708
|
+
|
|
11709
|
+
/**
|
|
11710
|
+
* The {@link differenceInCalendarDays} function options.
|
|
11711
|
+
*/
|
|
11712
|
+
|
|
11713
|
+
/**
|
|
11714
|
+
* @name differenceInCalendarDays
|
|
11715
|
+
* @category Day Helpers
|
|
11716
|
+
* @summary Get the number of calendar days between the given dates.
|
|
11717
|
+
*
|
|
11718
|
+
* @description
|
|
11719
|
+
* Get the number of calendar days between the given dates. This means that the times are removed
|
|
11720
|
+
* from the dates and then the difference in days is calculated.
|
|
11721
|
+
*
|
|
11722
|
+
* @param laterDate - The later date
|
|
11723
|
+
* @param earlierDate - The earlier date
|
|
11724
|
+
* @param options - The options object
|
|
11725
|
+
*
|
|
11726
|
+
* @returns The number of calendar days
|
|
11727
|
+
*
|
|
11728
|
+
* @example
|
|
11729
|
+
* // How many calendar days are between
|
|
11730
|
+
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
|
|
11731
|
+
* const result = differenceInCalendarDays(
|
|
11732
|
+
* new Date(2012, 6, 2, 0, 0),
|
|
11733
|
+
* new Date(2011, 6, 2, 23, 0)
|
|
11734
|
+
* )
|
|
11735
|
+
* //=> 366
|
|
11736
|
+
* // How many calendar days are between
|
|
11737
|
+
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
|
|
11738
|
+
* const result = differenceInCalendarDays(
|
|
11739
|
+
* new Date(2011, 6, 3, 0, 1),
|
|
11740
|
+
* new Date(2011, 6, 2, 23, 59)
|
|
11741
|
+
* )
|
|
11742
|
+
* //=> 1
|
|
11743
|
+
*/
|
|
11744
|
+
function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
11745
|
+
var _normalizeDates = normalizeDates(void 0 , laterDate, earlierDate),
|
|
11746
|
+
_normalizeDates2 = _slicedToArray(_normalizeDates, 2),
|
|
11747
|
+
laterDate_ = _normalizeDates2[0],
|
|
11748
|
+
earlierDate_ = _normalizeDates2[1];
|
|
11749
|
+
var laterStartOfDay = startOfDay(laterDate_);
|
|
11750
|
+
var earlierStartOfDay = startOfDay(earlierDate_);
|
|
11751
|
+
var laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
11752
|
+
var earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
11753
|
+
|
|
11754
|
+
// Round the number of days to the nearest integer because the number of
|
|
11755
|
+
// milliseconds in a day is not constant (e.g. it's different in the week of
|
|
11756
|
+
// the daylight saving time clock shift).
|
|
11757
|
+
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
11758
|
+
}
|
|
11759
|
+
|
|
11760
|
+
/**
|
|
11761
|
+
* The {@link startOfISOWeekYear} function options.
|
|
11762
|
+
*/
|
|
11763
|
+
|
|
11764
|
+
/**
|
|
11765
|
+
* @name startOfISOWeekYear
|
|
11766
|
+
* @category ISO Week-Numbering Year Helpers
|
|
11767
|
+
* @summary Return the start of an ISO week-numbering year for the given date.
|
|
11768
|
+
*
|
|
11769
|
+
* @description
|
|
11770
|
+
* Return the start of an ISO week-numbering year,
|
|
11771
|
+
* which always starts 3 days before the year's first Thursday.
|
|
11772
|
+
* The result will be in the local timezone.
|
|
11773
|
+
*
|
|
11774
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11775
|
+
*
|
|
11776
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11777
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11778
|
+
*
|
|
11779
|
+
* @param date - The original date
|
|
11780
|
+
* @param options - An object with options
|
|
11781
|
+
*
|
|
11782
|
+
* @returns The start of an ISO week-numbering year
|
|
11783
|
+
*
|
|
11784
|
+
* @example
|
|
11785
|
+
* // The start of an ISO week-numbering year for 2 July 2005:
|
|
11786
|
+
* const result = startOfISOWeekYear(new Date(2005, 6, 2))
|
|
11787
|
+
* //=> Mon Jan 03 2005 00:00:00
|
|
11788
|
+
*/
|
|
11789
|
+
function startOfISOWeekYear(date, options) {
|
|
11790
|
+
var year = getISOWeekYear(date);
|
|
11791
|
+
var fourthOfJanuary = constructFrom(date, 0);
|
|
11792
|
+
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
11793
|
+
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
11794
|
+
return startOfISOWeek(fourthOfJanuary);
|
|
11795
|
+
}
|
|
11796
|
+
|
|
11797
|
+
/**
|
|
11798
|
+
* @name isDate
|
|
11799
|
+
* @category Common Helpers
|
|
11800
|
+
* @summary Is the given value a date?
|
|
11801
|
+
*
|
|
11802
|
+
* @description
|
|
11803
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
11804
|
+
*
|
|
11805
|
+
* @param value - The value to check
|
|
11806
|
+
*
|
|
11807
|
+
* @returns True if the given value is a date
|
|
11808
|
+
*
|
|
11809
|
+
* @example
|
|
11810
|
+
* // For a valid date:
|
|
11811
|
+
* const result = isDate(new Date())
|
|
11812
|
+
* //=> true
|
|
11813
|
+
*
|
|
11814
|
+
* @example
|
|
11815
|
+
* // For an invalid date:
|
|
11816
|
+
* const result = isDate(new Date(NaN))
|
|
11817
|
+
* //=> true
|
|
11818
|
+
*
|
|
11819
|
+
* @example
|
|
11820
|
+
* // For some value:
|
|
11821
|
+
* const result = isDate('2014-02-31')
|
|
11822
|
+
* //=> false
|
|
11823
|
+
*
|
|
11824
|
+
* @example
|
|
11825
|
+
* // For an object:
|
|
11826
|
+
* const result = isDate({})
|
|
11827
|
+
* //=> false
|
|
11828
|
+
*/
|
|
11829
|
+
function isDate(value) {
|
|
11830
|
+
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
11831
|
+
}
|
|
11832
|
+
|
|
11472
11833
|
/**
|
|
11473
11834
|
* @name isValid
|
|
11474
11835
|
* @category Common Helpers
|
|
@@ -11476,14 +11837,14 @@ function toDate(argument) {
|
|
|
11476
11837
|
*
|
|
11477
11838
|
* @description
|
|
11478
11839
|
* Returns false if argument is Invalid Date and true otherwise.
|
|
11479
|
-
* Argument is converted to Date using `toDate`. See [toDate]
|
|
11840
|
+
* Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
|
|
11480
11841
|
* Invalid Date is a Date, whose time value is NaN.
|
|
11481
11842
|
*
|
|
11482
11843
|
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
11483
11844
|
*
|
|
11484
|
-
* @param
|
|
11485
|
-
*
|
|
11486
|
-
* @
|
|
11845
|
+
* @param date - The date to check
|
|
11846
|
+
*
|
|
11847
|
+
* @returns The date is valid
|
|
11487
11848
|
*
|
|
11488
11849
|
* @example
|
|
11489
11850
|
* // For the valid date:
|
|
@@ -11491,7 +11852,7 @@ function toDate(argument) {
|
|
|
11491
11852
|
* //=> true
|
|
11492
11853
|
*
|
|
11493
11854
|
* @example
|
|
11494
|
-
* // For the value,
|
|
11855
|
+
* // For the value, convertible into a date:
|
|
11495
11856
|
* const result = isValid(1393804800000)
|
|
11496
11857
|
* //=> true
|
|
11497
11858
|
*
|
|
@@ -11500,227 +11861,794 @@ function toDate(argument) {
|
|
|
11500
11861
|
* const result = isValid(new Date(''))
|
|
11501
11862
|
* //=> false
|
|
11502
11863
|
*/
|
|
11503
|
-
function isValid(
|
|
11504
|
-
|
|
11505
|
-
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
11506
|
-
return false;
|
|
11507
|
-
}
|
|
11508
|
-
var date = toDate(dirtyDate);
|
|
11509
|
-
return !isNaN(Number(date));
|
|
11864
|
+
function isValid(date) {
|
|
11865
|
+
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
11510
11866
|
}
|
|
11511
11867
|
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
}
|
|
11516
|
-
var number = Number(dirtyNumber);
|
|
11517
|
-
if (isNaN(number)) {
|
|
11518
|
-
return number;
|
|
11519
|
-
}
|
|
11520
|
-
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
11521
|
-
}
|
|
11868
|
+
/**
|
|
11869
|
+
* The {@link startOfYear} function options.
|
|
11870
|
+
*/
|
|
11522
11871
|
|
|
11523
11872
|
/**
|
|
11524
|
-
* @name
|
|
11525
|
-
* @category
|
|
11526
|
-
* @summary
|
|
11873
|
+
* @name startOfYear
|
|
11874
|
+
* @category Year Helpers
|
|
11875
|
+
* @summary Return the start of a year for the given date.
|
|
11527
11876
|
*
|
|
11528
11877
|
* @description
|
|
11529
|
-
*
|
|
11878
|
+
* Return the start of a year for the given date.
|
|
11879
|
+
* The result will be in the local timezone.
|
|
11880
|
+
*
|
|
11881
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
11882
|
+
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11883
|
+
*
|
|
11884
|
+
* @param date - The original date
|
|
11885
|
+
* @param options - The options
|
|
11530
11886
|
*
|
|
11531
|
-
* @
|
|
11532
|
-
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
11533
|
-
* @returns {Date} the new date with the milliseconds added
|
|
11534
|
-
* @throws {TypeError} 2 arguments required
|
|
11887
|
+
* @returns The start of a year
|
|
11535
11888
|
*
|
|
11536
11889
|
* @example
|
|
11537
|
-
* //
|
|
11538
|
-
* const result =
|
|
11539
|
-
* //=>
|
|
11890
|
+
* // The start of a year for 2 September 2014 11:55:00:
|
|
11891
|
+
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
11892
|
+
* //=> Wed Jan 01 2014 00:00:00
|
|
11540
11893
|
*/
|
|
11541
|
-
function
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
return
|
|
11894
|
+
function startOfYear(date, options) {
|
|
11895
|
+
var date_ = toDate(date, void 0 );
|
|
11896
|
+
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
11897
|
+
date_.setHours(0, 0, 0, 0);
|
|
11898
|
+
return date_;
|
|
11546
11899
|
}
|
|
11547
11900
|
|
|
11901
|
+
var formatDistanceLocale$1 = {
|
|
11902
|
+
lessThanXSeconds: {
|
|
11903
|
+
one: "less than a second",
|
|
11904
|
+
other: "less than {{count}} seconds"
|
|
11905
|
+
},
|
|
11906
|
+
xSeconds: {
|
|
11907
|
+
one: "1 second",
|
|
11908
|
+
other: "{{count}} seconds"
|
|
11909
|
+
},
|
|
11910
|
+
halfAMinute: "half a minute",
|
|
11911
|
+
lessThanXMinutes: {
|
|
11912
|
+
one: "less than a minute",
|
|
11913
|
+
other: "less than {{count}} minutes"
|
|
11914
|
+
},
|
|
11915
|
+
xMinutes: {
|
|
11916
|
+
one: "1 minute",
|
|
11917
|
+
other: "{{count}} minutes"
|
|
11918
|
+
},
|
|
11919
|
+
aboutXHours: {
|
|
11920
|
+
one: "about 1 hour",
|
|
11921
|
+
other: "about {{count}} hours"
|
|
11922
|
+
},
|
|
11923
|
+
xHours: {
|
|
11924
|
+
one: "1 hour",
|
|
11925
|
+
other: "{{count}} hours"
|
|
11926
|
+
},
|
|
11927
|
+
xDays: {
|
|
11928
|
+
one: "1 day",
|
|
11929
|
+
other: "{{count}} days"
|
|
11930
|
+
},
|
|
11931
|
+
aboutXWeeks: {
|
|
11932
|
+
one: "about 1 week",
|
|
11933
|
+
other: "about {{count}} weeks"
|
|
11934
|
+
},
|
|
11935
|
+
xWeeks: {
|
|
11936
|
+
one: "1 week",
|
|
11937
|
+
other: "{{count}} weeks"
|
|
11938
|
+
},
|
|
11939
|
+
aboutXMonths: {
|
|
11940
|
+
one: "about 1 month",
|
|
11941
|
+
other: "about {{count}} months"
|
|
11942
|
+
},
|
|
11943
|
+
xMonths: {
|
|
11944
|
+
one: "1 month",
|
|
11945
|
+
other: "{{count}} months"
|
|
11946
|
+
},
|
|
11947
|
+
aboutXYears: {
|
|
11948
|
+
one: "about 1 year",
|
|
11949
|
+
other: "about {{count}} years"
|
|
11950
|
+
},
|
|
11951
|
+
xYears: {
|
|
11952
|
+
one: "1 year",
|
|
11953
|
+
other: "{{count}} years"
|
|
11954
|
+
},
|
|
11955
|
+
overXYears: {
|
|
11956
|
+
one: "over 1 year",
|
|
11957
|
+
other: "over {{count}} years"
|
|
11958
|
+
},
|
|
11959
|
+
almostXYears: {
|
|
11960
|
+
one: "almost 1 year",
|
|
11961
|
+
other: "almost {{count}} years"
|
|
11962
|
+
}
|
|
11963
|
+
};
|
|
11964
|
+
var formatDistance$1 = function formatDistance(token, count, options) {
|
|
11965
|
+
var result;
|
|
11966
|
+
var tokenValue = formatDistanceLocale$1[token];
|
|
11967
|
+
if (typeof tokenValue === "string") {
|
|
11968
|
+
result = tokenValue;
|
|
11969
|
+
} else if (count === 1) {
|
|
11970
|
+
result = tokenValue.one;
|
|
11971
|
+
} else {
|
|
11972
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
11973
|
+
}
|
|
11974
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
11975
|
+
if (options.comparison && options.comparison > 0) {
|
|
11976
|
+
return "in " + result;
|
|
11977
|
+
} else {
|
|
11978
|
+
return result + " ago";
|
|
11979
|
+
}
|
|
11980
|
+
}
|
|
11981
|
+
return result;
|
|
11982
|
+
};
|
|
11983
|
+
|
|
11984
|
+
function buildFormatLongFn(args) {
|
|
11985
|
+
return function () {
|
|
11986
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11987
|
+
// TODO: Remove String()
|
|
11988
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
11989
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
11990
|
+
return format;
|
|
11991
|
+
};
|
|
11992
|
+
}
|
|
11993
|
+
|
|
11994
|
+
var dateFormats$2 = {
|
|
11995
|
+
full: "EEEE, MMMM do, y",
|
|
11996
|
+
"long": "MMMM do, y",
|
|
11997
|
+
medium: "MMM d, y",
|
|
11998
|
+
"short": "MM/dd/yyyy"
|
|
11999
|
+
};
|
|
12000
|
+
var timeFormats$2 = {
|
|
12001
|
+
full: "h:mm:ss a zzzz",
|
|
12002
|
+
"long": "h:mm:ss a z",
|
|
12003
|
+
medium: "h:mm:ss a",
|
|
12004
|
+
"short": "h:mm a"
|
|
12005
|
+
};
|
|
12006
|
+
var dateTimeFormats$2 = {
|
|
12007
|
+
full: "{{date}} 'at' {{time}}",
|
|
12008
|
+
"long": "{{date}} 'at' {{time}}",
|
|
12009
|
+
medium: "{{date}}, {{time}}",
|
|
12010
|
+
"short": "{{date}}, {{time}}"
|
|
12011
|
+
};
|
|
12012
|
+
var formatLong$2 = {
|
|
12013
|
+
date: buildFormatLongFn({
|
|
12014
|
+
formats: dateFormats$2,
|
|
12015
|
+
defaultWidth: "full"
|
|
12016
|
+
}),
|
|
12017
|
+
time: buildFormatLongFn({
|
|
12018
|
+
formats: timeFormats$2,
|
|
12019
|
+
defaultWidth: "full"
|
|
12020
|
+
}),
|
|
12021
|
+
dateTime: buildFormatLongFn({
|
|
12022
|
+
formats: dateTimeFormats$2,
|
|
12023
|
+
defaultWidth: "full"
|
|
12024
|
+
})
|
|
12025
|
+
};
|
|
12026
|
+
|
|
12027
|
+
var formatRelativeLocale = {
|
|
12028
|
+
lastWeek: "'last' eeee 'at' p",
|
|
12029
|
+
yesterday: "'yesterday at' p",
|
|
12030
|
+
today: "'today at' p",
|
|
12031
|
+
tomorrow: "'tomorrow at' p",
|
|
12032
|
+
nextWeek: "eeee 'at' p",
|
|
12033
|
+
other: "P"
|
|
12034
|
+
};
|
|
12035
|
+
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
12036
|
+
return formatRelativeLocale[token];
|
|
12037
|
+
};
|
|
12038
|
+
|
|
11548
12039
|
/**
|
|
11549
|
-
*
|
|
11550
|
-
*
|
|
11551
|
-
* @summary Subtract the specified number of milliseconds from the given date.
|
|
12040
|
+
* The localize function argument callback which allows to convert raw value to
|
|
12041
|
+
* the actual type.
|
|
11552
12042
|
*
|
|
11553
|
-
* @
|
|
11554
|
-
* Subtract the specified number of milliseconds from the given date.
|
|
11555
|
-
*
|
|
11556
|
-
* @param {Date|Number} date - the date to be changed
|
|
11557
|
-
* @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
11558
|
-
* @returns {Date} the new date with the milliseconds subtracted
|
|
11559
|
-
* @throws {TypeError} 2 arguments required
|
|
12043
|
+
* @param value - The value to convert
|
|
11560
12044
|
*
|
|
11561
|
-
* @
|
|
11562
|
-
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
11563
|
-
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
11564
|
-
* //=> Thu Jul 10 2014 12:45:29.250
|
|
12045
|
+
* @returns The converted value
|
|
11565
12046
|
*/
|
|
11566
|
-
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
11567
|
-
requiredArgs(2, arguments);
|
|
11568
|
-
var amount = toInteger(dirtyAmount);
|
|
11569
|
-
return addMilliseconds(dirtyDate, -amount);
|
|
11570
|
-
}
|
|
11571
|
-
|
|
11572
|
-
var MILLISECONDS_IN_DAY = 86400000;
|
|
11573
|
-
function getUTCDayOfYear(dirtyDate) {
|
|
11574
|
-
requiredArgs(1, arguments);
|
|
11575
|
-
var date = toDate(dirtyDate);
|
|
11576
|
-
var timestamp = date.getTime();
|
|
11577
|
-
date.setUTCMonth(0, 1);
|
|
11578
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
11579
|
-
var startOfYearTimestamp = date.getTime();
|
|
11580
|
-
var difference = timestamp - startOfYearTimestamp;
|
|
11581
|
-
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
11582
|
-
}
|
|
11583
|
-
|
|
11584
|
-
function startOfUTCISOWeek(dirtyDate) {
|
|
11585
|
-
requiredArgs(1, arguments);
|
|
11586
|
-
var weekStartsOn = 1;
|
|
11587
|
-
var date = toDate(dirtyDate);
|
|
11588
|
-
var day = date.getUTCDay();
|
|
11589
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
11590
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
11591
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
11592
|
-
return date;
|
|
11593
|
-
}
|
|
11594
|
-
|
|
11595
|
-
function getUTCISOWeekYear(dirtyDate) {
|
|
11596
|
-
requiredArgs(1, arguments);
|
|
11597
|
-
var date = toDate(dirtyDate);
|
|
11598
|
-
var year = date.getUTCFullYear();
|
|
11599
|
-
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
11600
|
-
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
11601
|
-
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
11602
|
-
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
11603
|
-
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
11604
|
-
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
11605
|
-
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
11606
|
-
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
11607
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
11608
|
-
return year + 1;
|
|
11609
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
11610
|
-
return year;
|
|
11611
|
-
} else {
|
|
11612
|
-
return year - 1;
|
|
11613
|
-
}
|
|
11614
|
-
}
|
|
11615
12047
|
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
var fourthOfJanuary = new Date(0);
|
|
11620
|
-
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
11621
|
-
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
11622
|
-
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
11623
|
-
return date;
|
|
11624
|
-
}
|
|
12048
|
+
/**
|
|
12049
|
+
* The map of localized values for each width.
|
|
12050
|
+
*/
|
|
11625
12051
|
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
12052
|
+
/**
|
|
12053
|
+
* The index type of the locale unit value. It types conversion of units of
|
|
12054
|
+
* values that don't start at 0 (i.e. quarters).
|
|
12055
|
+
*/
|
|
12056
|
+
|
|
12057
|
+
/**
|
|
12058
|
+
* Converts the unit value to the tuple of values.
|
|
12059
|
+
*/
|
|
11631
12060
|
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
12061
|
+
/**
|
|
12062
|
+
* The tuple of localized era values. The first element represents BC,
|
|
12063
|
+
* the second element represents AD.
|
|
12064
|
+
*/
|
|
12065
|
+
|
|
12066
|
+
/**
|
|
12067
|
+
* The tuple of localized quarter values. The first element represents Q1.
|
|
12068
|
+
*/
|
|
12069
|
+
|
|
12070
|
+
/**
|
|
12071
|
+
* The tuple of localized day values. The first element represents Sunday.
|
|
12072
|
+
*/
|
|
12073
|
+
|
|
12074
|
+
/**
|
|
12075
|
+
* The tuple of localized month values. The first element represents January.
|
|
12076
|
+
*/
|
|
12077
|
+
|
|
12078
|
+
function buildLocalizeFn(args) {
|
|
12079
|
+
return function (value, options) {
|
|
12080
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
12081
|
+
var valuesArray;
|
|
12082
|
+
if (context === "formatting" && args.formattingValues) {
|
|
12083
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
12084
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
12085
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
12086
|
+
} else {
|
|
12087
|
+
var _defaultWidth = args.defaultWidth;
|
|
12088
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
12089
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
12090
|
+
}
|
|
12091
|
+
var index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
12092
|
+
|
|
12093
|
+
// @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
12094
|
+
return valuesArray[index];
|
|
12095
|
+
};
|
|
11636
12096
|
}
|
|
11637
12097
|
|
|
11638
|
-
var
|
|
11639
|
-
|
|
11640
|
-
|
|
12098
|
+
var eraValues = {
|
|
12099
|
+
narrow: ["B", "A"],
|
|
12100
|
+
abbreviated: ["BC", "AD"],
|
|
12101
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
12102
|
+
};
|
|
12103
|
+
var quarterValues = {
|
|
12104
|
+
narrow: ["1", "2", "3", "4"],
|
|
12105
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
12106
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
12107
|
+
};
|
|
12108
|
+
|
|
12109
|
+
// Note: in English, the names of days of the week and months are capitalized.
|
|
12110
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
12111
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
12112
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
12113
|
+
var monthValues = {
|
|
12114
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
12115
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
12116
|
+
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
12117
|
+
};
|
|
12118
|
+
var dayValues = {
|
|
12119
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
12120
|
+
"short": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
12121
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
12122
|
+
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
12123
|
+
};
|
|
12124
|
+
var dayPeriodValues = {
|
|
12125
|
+
narrow: {
|
|
12126
|
+
am: "a",
|
|
12127
|
+
pm: "p",
|
|
12128
|
+
midnight: "mi",
|
|
12129
|
+
noon: "n",
|
|
12130
|
+
morning: "morning",
|
|
12131
|
+
afternoon: "afternoon",
|
|
12132
|
+
evening: "evening",
|
|
12133
|
+
night: "night"
|
|
12134
|
+
},
|
|
12135
|
+
abbreviated: {
|
|
12136
|
+
am: "AM",
|
|
12137
|
+
pm: "PM",
|
|
12138
|
+
midnight: "midnight",
|
|
12139
|
+
noon: "noon",
|
|
12140
|
+
morning: "morning",
|
|
12141
|
+
afternoon: "afternoon",
|
|
12142
|
+
evening: "evening",
|
|
12143
|
+
night: "night"
|
|
12144
|
+
},
|
|
12145
|
+
wide: {
|
|
12146
|
+
am: "a.m.",
|
|
12147
|
+
pm: "p.m.",
|
|
12148
|
+
midnight: "midnight",
|
|
12149
|
+
noon: "noon",
|
|
12150
|
+
morning: "morning",
|
|
12151
|
+
afternoon: "afternoon",
|
|
12152
|
+
evening: "evening",
|
|
12153
|
+
night: "night"
|
|
12154
|
+
}
|
|
12155
|
+
};
|
|
12156
|
+
var formattingDayPeriodValues = {
|
|
12157
|
+
narrow: {
|
|
12158
|
+
am: "a",
|
|
12159
|
+
pm: "p",
|
|
12160
|
+
midnight: "mi",
|
|
12161
|
+
noon: "n",
|
|
12162
|
+
morning: "in the morning",
|
|
12163
|
+
afternoon: "in the afternoon",
|
|
12164
|
+
evening: "in the evening",
|
|
12165
|
+
night: "at night"
|
|
12166
|
+
},
|
|
12167
|
+
abbreviated: {
|
|
12168
|
+
am: "AM",
|
|
12169
|
+
pm: "PM",
|
|
12170
|
+
midnight: "midnight",
|
|
12171
|
+
noon: "noon",
|
|
12172
|
+
morning: "in the morning",
|
|
12173
|
+
afternoon: "in the afternoon",
|
|
12174
|
+
evening: "in the evening",
|
|
12175
|
+
night: "at night"
|
|
12176
|
+
},
|
|
12177
|
+
wide: {
|
|
12178
|
+
am: "a.m.",
|
|
12179
|
+
pm: "p.m.",
|
|
12180
|
+
midnight: "midnight",
|
|
12181
|
+
noon: "noon",
|
|
12182
|
+
morning: "in the morning",
|
|
12183
|
+
afternoon: "in the afternoon",
|
|
12184
|
+
evening: "in the evening",
|
|
12185
|
+
night: "at night"
|
|
12186
|
+
}
|
|
12187
|
+
};
|
|
12188
|
+
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
12189
|
+
var number = Number(dirtyNumber);
|
|
12190
|
+
|
|
12191
|
+
// If ordinal numbers depend on context, for example,
|
|
12192
|
+
// if they are different for different grammatical genders,
|
|
12193
|
+
// use `options.unit`.
|
|
12194
|
+
//
|
|
12195
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
12196
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
12197
|
+
|
|
12198
|
+
var rem100 = number % 100;
|
|
12199
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
12200
|
+
switch (rem100 % 10) {
|
|
12201
|
+
case 1:
|
|
12202
|
+
return number + "st";
|
|
12203
|
+
case 2:
|
|
12204
|
+
return number + "nd";
|
|
12205
|
+
case 3:
|
|
12206
|
+
return number + "rd";
|
|
12207
|
+
}
|
|
12208
|
+
}
|
|
12209
|
+
return number + "th";
|
|
12210
|
+
};
|
|
12211
|
+
var localize = {
|
|
12212
|
+
ordinalNumber: ordinalNumber,
|
|
12213
|
+
era: buildLocalizeFn({
|
|
12214
|
+
values: eraValues,
|
|
12215
|
+
defaultWidth: "wide"
|
|
12216
|
+
}),
|
|
12217
|
+
quarter: buildLocalizeFn({
|
|
12218
|
+
values: quarterValues,
|
|
12219
|
+
defaultWidth: "wide",
|
|
12220
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
12221
|
+
return quarter - 1;
|
|
12222
|
+
}
|
|
12223
|
+
}),
|
|
12224
|
+
month: buildLocalizeFn({
|
|
12225
|
+
values: monthValues,
|
|
12226
|
+
defaultWidth: "wide"
|
|
12227
|
+
}),
|
|
12228
|
+
day: buildLocalizeFn({
|
|
12229
|
+
values: dayValues,
|
|
12230
|
+
defaultWidth: "wide"
|
|
12231
|
+
}),
|
|
12232
|
+
dayPeriod: buildLocalizeFn({
|
|
12233
|
+
values: dayPeriodValues,
|
|
12234
|
+
defaultWidth: "wide",
|
|
12235
|
+
formattingValues: formattingDayPeriodValues,
|
|
12236
|
+
defaultFormattingWidth: "wide"
|
|
12237
|
+
})
|
|
12238
|
+
};
|
|
12239
|
+
|
|
12240
|
+
function buildMatchFn(args) {
|
|
12241
|
+
return function (string) {
|
|
12242
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12243
|
+
var width = options.width;
|
|
12244
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
12245
|
+
var matchResult = string.match(matchPattern);
|
|
12246
|
+
if (!matchResult) {
|
|
12247
|
+
return null;
|
|
12248
|
+
}
|
|
12249
|
+
var matchedString = matchResult[0];
|
|
12250
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
12251
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
12252
|
+
return pattern.test(matchedString);
|
|
12253
|
+
}) :
|
|
12254
|
+
// [TODO] -- I challenge you to fix the type
|
|
12255
|
+
findKey(parsePatterns, function (pattern) {
|
|
12256
|
+
return pattern.test(matchedString);
|
|
12257
|
+
});
|
|
12258
|
+
var value;
|
|
12259
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
12260
|
+
value = options.valueCallback ?
|
|
12261
|
+
// [TODO] -- I challenge you to fix the type
|
|
12262
|
+
options.valueCallback(value) : value;
|
|
12263
|
+
var rest = string.slice(matchedString.length);
|
|
12264
|
+
return {
|
|
12265
|
+
value: value,
|
|
12266
|
+
rest: rest
|
|
12267
|
+
};
|
|
12268
|
+
};
|
|
11641
12269
|
}
|
|
11642
|
-
function
|
|
11643
|
-
|
|
12270
|
+
function findKey(object, predicate) {
|
|
12271
|
+
for (var key in object) {
|
|
12272
|
+
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
12273
|
+
return key;
|
|
12274
|
+
}
|
|
12275
|
+
}
|
|
12276
|
+
return undefined;
|
|
12277
|
+
}
|
|
12278
|
+
function findIndex(array, predicate) {
|
|
12279
|
+
for (var key = 0; key < array.length; key++) {
|
|
12280
|
+
if (predicate(array[key])) {
|
|
12281
|
+
return key;
|
|
12282
|
+
}
|
|
12283
|
+
}
|
|
12284
|
+
return undefined;
|
|
11644
12285
|
}
|
|
11645
12286
|
|
|
11646
|
-
function
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
12287
|
+
function buildMatchPatternFn(args) {
|
|
12288
|
+
return function (string) {
|
|
12289
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12290
|
+
var matchResult = string.match(args.matchPattern);
|
|
12291
|
+
if (!matchResult) return null;
|
|
12292
|
+
var matchedString = matchResult[0];
|
|
12293
|
+
var parseResult = string.match(args.parsePattern);
|
|
12294
|
+
if (!parseResult) return null;
|
|
12295
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
12296
|
+
|
|
12297
|
+
// [TODO] I challenge you to fix the type
|
|
12298
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
12299
|
+
var rest = string.slice(matchedString.length);
|
|
12300
|
+
return {
|
|
12301
|
+
value: value,
|
|
12302
|
+
rest: rest
|
|
12303
|
+
};
|
|
12304
|
+
};
|
|
12305
|
+
}
|
|
12306
|
+
|
|
12307
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
12308
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
12309
|
+
var matchEraPatterns = {
|
|
12310
|
+
narrow: /^(b|a)/i,
|
|
12311
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
12312
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
12313
|
+
};
|
|
12314
|
+
var parseEraPatterns = {
|
|
12315
|
+
any: [/^b/i, /^(a|c)/i]
|
|
12316
|
+
};
|
|
12317
|
+
var matchQuarterPatterns = {
|
|
12318
|
+
narrow: /^[1234]/i,
|
|
12319
|
+
abbreviated: /^q[1234]/i,
|
|
12320
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
12321
|
+
};
|
|
12322
|
+
var parseQuarterPatterns = {
|
|
12323
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
12324
|
+
};
|
|
12325
|
+
var matchMonthPatterns = {
|
|
12326
|
+
narrow: /^[jfmasond]/i,
|
|
12327
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
12328
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
12329
|
+
};
|
|
12330
|
+
var parseMonthPatterns = {
|
|
12331
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
12332
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
12333
|
+
};
|
|
12334
|
+
var matchDayPatterns = {
|
|
12335
|
+
narrow: /^[smtwf]/i,
|
|
12336
|
+
"short": /^(su|mo|tu|we|th|fr|sa)/i,
|
|
12337
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
12338
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
12339
|
+
};
|
|
12340
|
+
var parseDayPatterns = {
|
|
12341
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
12342
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
12343
|
+
};
|
|
12344
|
+
var matchDayPeriodPatterns = {
|
|
12345
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
12346
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
12347
|
+
};
|
|
12348
|
+
var parseDayPeriodPatterns = {
|
|
12349
|
+
any: {
|
|
12350
|
+
am: /^a/i,
|
|
12351
|
+
pm: /^p/i,
|
|
12352
|
+
midnight: /^mi/i,
|
|
12353
|
+
noon: /^no/i,
|
|
12354
|
+
morning: /morning/i,
|
|
12355
|
+
afternoon: /afternoon/i,
|
|
12356
|
+
evening: /evening/i,
|
|
12357
|
+
night: /night/i
|
|
12358
|
+
}
|
|
12359
|
+
};
|
|
12360
|
+
var match = {
|
|
12361
|
+
ordinalNumber: buildMatchPatternFn({
|
|
12362
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
12363
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
12364
|
+
valueCallback: function valueCallback(value) {
|
|
12365
|
+
return parseInt(value, 10);
|
|
12366
|
+
}
|
|
12367
|
+
}),
|
|
12368
|
+
era: buildMatchFn({
|
|
12369
|
+
matchPatterns: matchEraPatterns,
|
|
12370
|
+
defaultMatchWidth: "wide",
|
|
12371
|
+
parsePatterns: parseEraPatterns,
|
|
12372
|
+
defaultParseWidth: "any"
|
|
12373
|
+
}),
|
|
12374
|
+
quarter: buildMatchFn({
|
|
12375
|
+
matchPatterns: matchQuarterPatterns,
|
|
12376
|
+
defaultMatchWidth: "wide",
|
|
12377
|
+
parsePatterns: parseQuarterPatterns,
|
|
12378
|
+
defaultParseWidth: "any",
|
|
12379
|
+
valueCallback: function valueCallback(index) {
|
|
12380
|
+
return index + 1;
|
|
12381
|
+
}
|
|
12382
|
+
}),
|
|
12383
|
+
month: buildMatchFn({
|
|
12384
|
+
matchPatterns: matchMonthPatterns,
|
|
12385
|
+
defaultMatchWidth: "wide",
|
|
12386
|
+
parsePatterns: parseMonthPatterns,
|
|
12387
|
+
defaultParseWidth: "any"
|
|
12388
|
+
}),
|
|
12389
|
+
day: buildMatchFn({
|
|
12390
|
+
matchPatterns: matchDayPatterns,
|
|
12391
|
+
defaultMatchWidth: "wide",
|
|
12392
|
+
parsePatterns: parseDayPatterns,
|
|
12393
|
+
defaultParseWidth: "any"
|
|
12394
|
+
}),
|
|
12395
|
+
dayPeriod: buildMatchFn({
|
|
12396
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
12397
|
+
defaultMatchWidth: "any",
|
|
12398
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
12399
|
+
defaultParseWidth: "any"
|
|
12400
|
+
})
|
|
12401
|
+
};
|
|
11651
12402
|
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
12403
|
+
/**
|
|
12404
|
+
* @category Locales
|
|
12405
|
+
* @summary English locale (United States).
|
|
12406
|
+
* @language English
|
|
12407
|
+
* @iso-639-2 eng
|
|
12408
|
+
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
|
|
12409
|
+
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
|
|
12410
|
+
*/
|
|
12411
|
+
var enUS = {
|
|
12412
|
+
code: "en-US",
|
|
12413
|
+
formatDistance: formatDistance$1,
|
|
12414
|
+
formatLong: formatLong$2,
|
|
12415
|
+
formatRelative: formatRelative,
|
|
12416
|
+
localize: localize,
|
|
12417
|
+
match: match,
|
|
12418
|
+
options: {
|
|
12419
|
+
weekStartsOn: 0 /* Sunday */,
|
|
12420
|
+
firstWeekContainsDate: 1
|
|
11655
12421
|
}
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
12422
|
+
};
|
|
12423
|
+
|
|
12424
|
+
/**
|
|
12425
|
+
* The {@link getDayOfYear} function options.
|
|
12426
|
+
*/
|
|
12427
|
+
|
|
12428
|
+
/**
|
|
12429
|
+
* @name getDayOfYear
|
|
12430
|
+
* @category Day Helpers
|
|
12431
|
+
* @summary Get the day of the year of the given date.
|
|
12432
|
+
*
|
|
12433
|
+
* @description
|
|
12434
|
+
* Get the day of the year of the given date.
|
|
12435
|
+
*
|
|
12436
|
+
* @param date - The given date
|
|
12437
|
+
* @param options - The options
|
|
12438
|
+
*
|
|
12439
|
+
* @returns The day of year
|
|
12440
|
+
*
|
|
12441
|
+
* @example
|
|
12442
|
+
* // Which day of the year is 2 July 2014?
|
|
12443
|
+
* const result = getDayOfYear(new Date(2014, 6, 2))
|
|
12444
|
+
* //=> 183
|
|
12445
|
+
*/
|
|
12446
|
+
function getDayOfYear(date, options) {
|
|
12447
|
+
var _date = toDate(date, void 0 );
|
|
12448
|
+
var diff = differenceInCalendarDays(_date, startOfYear(_date));
|
|
12449
|
+
var dayOfYear = diff + 1;
|
|
12450
|
+
return dayOfYear;
|
|
12451
|
+
}
|
|
12452
|
+
|
|
12453
|
+
/**
|
|
12454
|
+
* The {@link getISOWeek} function options.
|
|
12455
|
+
*/
|
|
12456
|
+
|
|
12457
|
+
/**
|
|
12458
|
+
* @name getISOWeek
|
|
12459
|
+
* @category ISO Week Helpers
|
|
12460
|
+
* @summary Get the ISO week of the given date.
|
|
12461
|
+
*
|
|
12462
|
+
* @description
|
|
12463
|
+
* Get the ISO week of the given date.
|
|
12464
|
+
*
|
|
12465
|
+
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
12466
|
+
*
|
|
12467
|
+
* @param date - The given date
|
|
12468
|
+
* @param options - The options
|
|
12469
|
+
*
|
|
12470
|
+
* @returns The ISO week
|
|
12471
|
+
*
|
|
12472
|
+
* @example
|
|
12473
|
+
* // Which week of the ISO-week numbering year is 2 January 2005?
|
|
12474
|
+
* const result = getISOWeek(new Date(2005, 0, 2))
|
|
12475
|
+
* //=> 53
|
|
12476
|
+
*/
|
|
12477
|
+
function getISOWeek(date, options) {
|
|
12478
|
+
var _date = toDate(date, void 0 );
|
|
12479
|
+
var diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
|
|
12480
|
+
|
|
12481
|
+
// Round the number of weeks to the nearest integer because the number of
|
|
12482
|
+
// milliseconds in a week is not constant (e.g. it's different in the week of
|
|
12483
|
+
// the daylight saving time clock shift).
|
|
12484
|
+
return Math.round(diff / millisecondsInWeek) + 1;
|
|
11662
12485
|
}
|
|
11663
12486
|
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
12487
|
+
/**
|
|
12488
|
+
* The {@link getWeekYear} function options.
|
|
12489
|
+
*/
|
|
12490
|
+
|
|
12491
|
+
/**
|
|
12492
|
+
* @name getWeekYear
|
|
12493
|
+
* @category Week-Numbering Year Helpers
|
|
12494
|
+
* @summary Get the local week-numbering year of the given date.
|
|
12495
|
+
*
|
|
12496
|
+
* @description
|
|
12497
|
+
* Get the local week-numbering year of the given date.
|
|
12498
|
+
* The exact calculation depends on the values of
|
|
12499
|
+
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
12500
|
+
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
12501
|
+
* the first week of the week-numbering year)
|
|
12502
|
+
*
|
|
12503
|
+
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
12504
|
+
*
|
|
12505
|
+
* @param date - The given date
|
|
12506
|
+
* @param options - An object with options.
|
|
12507
|
+
*
|
|
12508
|
+
* @returns The local week-numbering year
|
|
12509
|
+
*
|
|
12510
|
+
* @example
|
|
12511
|
+
* // Which week numbering year is 26 December 2004 with the default settings?
|
|
12512
|
+
* const result = getWeekYear(new Date(2004, 11, 26))
|
|
12513
|
+
* //=> 2005
|
|
12514
|
+
*
|
|
12515
|
+
* @example
|
|
12516
|
+
* // Which week numbering year is 26 December 2004 if week starts on Saturday?
|
|
12517
|
+
* const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
|
|
12518
|
+
* //=> 2004
|
|
12519
|
+
*
|
|
12520
|
+
* @example
|
|
12521
|
+
* // Which week numbering year is 26 December 2004 if the first week contains 4 January?
|
|
12522
|
+
* const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
|
|
12523
|
+
* //=> 2004
|
|
12524
|
+
*/
|
|
12525
|
+
function getWeekYear(date, options) {
|
|
12526
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _defaultOptions$local;
|
|
12527
|
+
var _date = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
12528
|
+
var year = _date.getFullYear();
|
|
11669
12529
|
var defaultOptions = getDefaultOptions();
|
|
11670
|
-
var firstWeekContainsDate =
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
var firstWeekOfThisYear = new Date(0);
|
|
11681
|
-
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
11682
|
-
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
11683
|
-
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
11684
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
12530
|
+
var firstWeekContainsDate = (_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 || (_defaultOptions$local = _defaultOptions$local.options) === null || _defaultOptions$local === void 0 ? void 0 : _defaultOptions$local.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1;
|
|
12531
|
+
var firstWeekOfNextYear = constructFrom((options === null || options === void 0 ? void 0 : options["in"]) || date, 0);
|
|
12532
|
+
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
12533
|
+
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
12534
|
+
var startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
|
|
12535
|
+
var firstWeekOfThisYear = constructFrom((options === null || options === void 0 ? void 0 : options["in"]) || date, 0);
|
|
12536
|
+
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
|
|
12537
|
+
firstWeekOfThisYear.setHours(0, 0, 0, 0);
|
|
12538
|
+
var startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
|
|
12539
|
+
if (+_date >= +startOfNextYear) {
|
|
11685
12540
|
return year + 1;
|
|
11686
|
-
} else if (
|
|
12541
|
+
} else if (+_date >= +startOfThisYear) {
|
|
11687
12542
|
return year;
|
|
11688
12543
|
} else {
|
|
11689
12544
|
return year - 1;
|
|
11690
12545
|
}
|
|
11691
12546
|
}
|
|
11692
12547
|
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
12548
|
+
/**
|
|
12549
|
+
* The {@link startOfWeekYear} function options.
|
|
12550
|
+
*/
|
|
12551
|
+
|
|
12552
|
+
/**
|
|
12553
|
+
* @name startOfWeekYear
|
|
12554
|
+
* @category Week-Numbering Year Helpers
|
|
12555
|
+
* @summary Return the start of a local week-numbering year for the given date.
|
|
12556
|
+
*
|
|
12557
|
+
* @description
|
|
12558
|
+
* Return the start of a local week-numbering year.
|
|
12559
|
+
* The exact calculation depends on the values of
|
|
12560
|
+
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
12561
|
+
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
12562
|
+
* the first week of the week-numbering year)
|
|
12563
|
+
*
|
|
12564
|
+
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
12565
|
+
*
|
|
12566
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
12567
|
+
* @typeParam ResultDate - The result `Date` type.
|
|
12568
|
+
*
|
|
12569
|
+
* @param date - The original date
|
|
12570
|
+
* @param options - An object with options
|
|
12571
|
+
*
|
|
12572
|
+
* @returns The start of a week-numbering year
|
|
12573
|
+
*
|
|
12574
|
+
* @example
|
|
12575
|
+
* // The start of an a week-numbering year for 2 July 2005 with default settings:
|
|
12576
|
+
* const result = startOfWeekYear(new Date(2005, 6, 2))
|
|
12577
|
+
* //=> Sun Dec 26 2004 00:00:00
|
|
12578
|
+
*
|
|
12579
|
+
* @example
|
|
12580
|
+
* // The start of a week-numbering year for 2 July 2005
|
|
12581
|
+
* // if Monday is the first day of week
|
|
12582
|
+
* // and 4 January is always in the first week of the year:
|
|
12583
|
+
* const result = startOfWeekYear(new Date(2005, 6, 2), {
|
|
12584
|
+
* weekStartsOn: 1,
|
|
12585
|
+
* firstWeekContainsDate: 4
|
|
12586
|
+
* })
|
|
12587
|
+
* //=> Mon Jan 03 2005 00:00:00
|
|
12588
|
+
*/
|
|
12589
|
+
function startOfWeekYear(date, options) {
|
|
12590
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _defaultOptions$local;
|
|
11696
12591
|
var defaultOptions = getDefaultOptions();
|
|
11697
|
-
var firstWeekContainsDate =
|
|
11698
|
-
var year =
|
|
11699
|
-
var firstWeek =
|
|
11700
|
-
firstWeek.
|
|
11701
|
-
firstWeek.
|
|
11702
|
-
var
|
|
11703
|
-
return
|
|
12592
|
+
var firstWeekContainsDate = (_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 || (_defaultOptions$local = _defaultOptions$local.options) === null || _defaultOptions$local === void 0 ? void 0 : _defaultOptions$local.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1;
|
|
12593
|
+
var year = getWeekYear(date, options);
|
|
12594
|
+
var firstWeek = constructFrom((options === null || options === void 0 ? void 0 : options["in"]) || date, 0);
|
|
12595
|
+
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
12596
|
+
firstWeek.setHours(0, 0, 0, 0);
|
|
12597
|
+
var _date = startOfWeek(firstWeek, options);
|
|
12598
|
+
return _date;
|
|
11704
12599
|
}
|
|
11705
12600
|
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
var date = toDate(dirtyDate);
|
|
11710
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
12601
|
+
/**
|
|
12602
|
+
* The {@link getWeek} function options.
|
|
12603
|
+
*/
|
|
11711
12604
|
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
12605
|
+
/**
|
|
12606
|
+
* @name getWeek
|
|
12607
|
+
* @category Week Helpers
|
|
12608
|
+
* @summary Get the local week index of the given date.
|
|
12609
|
+
*
|
|
12610
|
+
* @description
|
|
12611
|
+
* Get the local week index of the given date.
|
|
12612
|
+
* The exact calculation depends on the values of
|
|
12613
|
+
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
12614
|
+
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
12615
|
+
* the first week of the week-numbering year)
|
|
12616
|
+
*
|
|
12617
|
+
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
12618
|
+
*
|
|
12619
|
+
* @param date - The given date
|
|
12620
|
+
* @param options - An object with options
|
|
12621
|
+
*
|
|
12622
|
+
* @returns The week
|
|
12623
|
+
*
|
|
12624
|
+
* @example
|
|
12625
|
+
* // Which week of the local week numbering year is 2 January 2005 with default options?
|
|
12626
|
+
* const result = getWeek(new Date(2005, 0, 2))
|
|
12627
|
+
* //=> 2
|
|
12628
|
+
*
|
|
12629
|
+
* @example
|
|
12630
|
+
* // Which week of the local week numbering year is 2 January 2005,
|
|
12631
|
+
* // if Monday is the first day of the week,
|
|
12632
|
+
* // and the first week of the year always contains 4 January?
|
|
12633
|
+
* const result = getWeek(new Date(2005, 0, 2), {
|
|
12634
|
+
* weekStartsOn: 1,
|
|
12635
|
+
* firstWeekContainsDate: 4
|
|
12636
|
+
* })
|
|
12637
|
+
* //=> 53
|
|
12638
|
+
*/
|
|
12639
|
+
function getWeek(date, options) {
|
|
12640
|
+
var _date = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
12641
|
+
var diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
12642
|
+
|
|
12643
|
+
// Round the number of weeks to the nearest integer because the number of
|
|
12644
|
+
// milliseconds in a week is not constant (e.g. it's different in the week of
|
|
12645
|
+
// the daylight saving time clock shift).
|
|
12646
|
+
return Math.round(diff / millisecondsInWeek) + 1;
|
|
11716
12647
|
}
|
|
11717
12648
|
|
|
11718
12649
|
function addLeadingZeros(number, targetLength) {
|
|
11719
|
-
var sign = number < 0 ?
|
|
11720
|
-
var output = Math.abs(number).toString();
|
|
11721
|
-
while (output.length < targetLength) {
|
|
11722
|
-
output = '0' + output;
|
|
11723
|
-
}
|
|
12650
|
+
var sign = number < 0 ? "-" : "";
|
|
12651
|
+
var output = Math.abs(number).toString().padStart(targetLength, "0");
|
|
11724
12652
|
return sign + output;
|
|
11725
12653
|
}
|
|
11726
12654
|
|
|
@@ -11736,7 +12664,8 @@ function addLeadingZeros(number, targetLength) {
|
|
|
11736
12664
|
*
|
|
11737
12665
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
11738
12666
|
*/
|
|
11739
|
-
|
|
12667
|
+
|
|
12668
|
+
var lightFormatters = {
|
|
11740
12669
|
// Year
|
|
11741
12670
|
y: function y(date, token) {
|
|
11742
12671
|
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
@@ -11748,71 +12677,72 @@ var formatters$1 = {
|
|
|
11748
12677
|
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
11749
12678
|
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
11750
12679
|
|
|
11751
|
-
var signedYear = date.
|
|
12680
|
+
var signedYear = date.getFullYear();
|
|
11752
12681
|
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
11753
12682
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
11754
|
-
return addLeadingZeros(token ===
|
|
12683
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
11755
12684
|
},
|
|
11756
12685
|
// Month
|
|
11757
12686
|
M: function M(date, token) {
|
|
11758
|
-
var month = date.
|
|
11759
|
-
return token ===
|
|
12687
|
+
var month = date.getMonth();
|
|
12688
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
11760
12689
|
},
|
|
11761
12690
|
// Day of the month
|
|
11762
12691
|
d: function d(date, token) {
|
|
11763
|
-
return addLeadingZeros(date.
|
|
12692
|
+
return addLeadingZeros(date.getDate(), token.length);
|
|
11764
12693
|
},
|
|
11765
12694
|
// AM or PM
|
|
11766
12695
|
a: function a(date, token) {
|
|
11767
|
-
var dayPeriodEnumValue = date.
|
|
12696
|
+
var dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
|
11768
12697
|
switch (token) {
|
|
11769
|
-
case
|
|
11770
|
-
case
|
|
12698
|
+
case "a":
|
|
12699
|
+
case "aa":
|
|
11771
12700
|
return dayPeriodEnumValue.toUpperCase();
|
|
11772
|
-
case
|
|
12701
|
+
case "aaa":
|
|
11773
12702
|
return dayPeriodEnumValue;
|
|
11774
|
-
case
|
|
12703
|
+
case "aaaaa":
|
|
11775
12704
|
return dayPeriodEnumValue[0];
|
|
11776
|
-
case
|
|
12705
|
+
case "aaaa":
|
|
11777
12706
|
default:
|
|
11778
|
-
return dayPeriodEnumValue ===
|
|
12707
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
11779
12708
|
}
|
|
11780
12709
|
},
|
|
11781
12710
|
// Hour [1-12]
|
|
11782
12711
|
h: function h(date, token) {
|
|
11783
|
-
return addLeadingZeros(date.
|
|
12712
|
+
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
|
|
11784
12713
|
},
|
|
11785
12714
|
// Hour [0-23]
|
|
11786
12715
|
H: function H(date, token) {
|
|
11787
|
-
return addLeadingZeros(date.
|
|
12716
|
+
return addLeadingZeros(date.getHours(), token.length);
|
|
11788
12717
|
},
|
|
11789
12718
|
// Minute
|
|
11790
12719
|
m: function m(date, token) {
|
|
11791
|
-
return addLeadingZeros(date.
|
|
12720
|
+
return addLeadingZeros(date.getMinutes(), token.length);
|
|
11792
12721
|
},
|
|
11793
12722
|
// Second
|
|
11794
12723
|
s: function s(date, token) {
|
|
11795
|
-
return addLeadingZeros(date.
|
|
12724
|
+
return addLeadingZeros(date.getSeconds(), token.length);
|
|
11796
12725
|
},
|
|
11797
12726
|
// Fraction of second
|
|
11798
12727
|
S: function S(date, token) {
|
|
11799
12728
|
var numberOfDigits = token.length;
|
|
11800
|
-
var milliseconds = date.
|
|
11801
|
-
var fractionalSeconds = Math.
|
|
12729
|
+
var milliseconds = date.getMilliseconds();
|
|
12730
|
+
var fractionalSeconds = Math.trunc(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
11802
12731
|
return addLeadingZeros(fractionalSeconds, token.length);
|
|
11803
12732
|
}
|
|
11804
12733
|
};
|
|
11805
12734
|
|
|
11806
12735
|
var dayPeriodEnum = {
|
|
11807
|
-
am:
|
|
11808
|
-
pm:
|
|
11809
|
-
midnight:
|
|
11810
|
-
noon:
|
|
11811
|
-
morning:
|
|
11812
|
-
afternoon:
|
|
11813
|
-
evening:
|
|
11814
|
-
night:
|
|
12736
|
+
am: "am",
|
|
12737
|
+
pm: "pm",
|
|
12738
|
+
midnight: "midnight",
|
|
12739
|
+
noon: "noon",
|
|
12740
|
+
morning: "morning",
|
|
12741
|
+
afternoon: "afternoon",
|
|
12742
|
+
evening: "evening",
|
|
12743
|
+
night: "night"
|
|
11815
12744
|
};
|
|
12745
|
+
|
|
11816
12746
|
/*
|
|
11817
12747
|
* | | Unit | | Unit |
|
|
11818
12748
|
* |-----|--------------------------------|-----|--------------------------------|
|
|
@@ -11862,57 +12792,57 @@ var dayPeriodEnum = {
|
|
|
11862
12792
|
var formatters = {
|
|
11863
12793
|
// Era
|
|
11864
12794
|
G: function G(date, token, localize) {
|
|
11865
|
-
var era = date.
|
|
12795
|
+
var era = date.getFullYear() > 0 ? 1 : 0;
|
|
11866
12796
|
switch (token) {
|
|
11867
12797
|
// AD, BC
|
|
11868
|
-
case
|
|
11869
|
-
case
|
|
11870
|
-
case
|
|
12798
|
+
case "G":
|
|
12799
|
+
case "GG":
|
|
12800
|
+
case "GGG":
|
|
11871
12801
|
return localize.era(era, {
|
|
11872
|
-
width:
|
|
12802
|
+
width: "abbreviated"
|
|
11873
12803
|
});
|
|
11874
12804
|
// A, B
|
|
11875
|
-
case
|
|
12805
|
+
case "GGGGG":
|
|
11876
12806
|
return localize.era(era, {
|
|
11877
|
-
width:
|
|
12807
|
+
width: "narrow"
|
|
11878
12808
|
});
|
|
11879
12809
|
// Anno Domini, Before Christ
|
|
11880
|
-
case
|
|
12810
|
+
case "GGGG":
|
|
11881
12811
|
default:
|
|
11882
12812
|
return localize.era(era, {
|
|
11883
|
-
width:
|
|
12813
|
+
width: "wide"
|
|
11884
12814
|
});
|
|
11885
12815
|
}
|
|
11886
12816
|
},
|
|
11887
12817
|
// Year
|
|
11888
12818
|
y: function y(date, token, localize) {
|
|
11889
12819
|
// Ordinal number
|
|
11890
|
-
if (token ===
|
|
11891
|
-
var signedYear = date.
|
|
12820
|
+
if (token === "yo") {
|
|
12821
|
+
var signedYear = date.getFullYear();
|
|
11892
12822
|
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
11893
12823
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
11894
12824
|
return localize.ordinalNumber(year, {
|
|
11895
|
-
unit:
|
|
12825
|
+
unit: "year"
|
|
11896
12826
|
});
|
|
11897
12827
|
}
|
|
11898
|
-
return
|
|
12828
|
+
return lightFormatters.y(date, token);
|
|
11899
12829
|
},
|
|
11900
12830
|
// Local week-numbering year
|
|
11901
12831
|
Y: function Y(date, token, localize, options) {
|
|
11902
|
-
var signedWeekYear =
|
|
12832
|
+
var signedWeekYear = getWeekYear(date, options);
|
|
11903
12833
|
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
11904
12834
|
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
11905
12835
|
|
|
11906
12836
|
// Two digit year
|
|
11907
|
-
if (token ===
|
|
12837
|
+
if (token === "YY") {
|
|
11908
12838
|
var twoDigitYear = weekYear % 100;
|
|
11909
12839
|
return addLeadingZeros(twoDigitYear, 2);
|
|
11910
12840
|
}
|
|
11911
12841
|
|
|
11912
12842
|
// Ordinal number
|
|
11913
|
-
if (token ===
|
|
12843
|
+
if (token === "Yo") {
|
|
11914
12844
|
return localize.ordinalNumber(weekYear, {
|
|
11915
|
-
unit:
|
|
12845
|
+
unit: "year"
|
|
11916
12846
|
});
|
|
11917
12847
|
}
|
|
11918
12848
|
|
|
@@ -11921,7 +12851,7 @@ var formatters = {
|
|
|
11921
12851
|
},
|
|
11922
12852
|
// ISO week-numbering year
|
|
11923
12853
|
R: function R(date, token) {
|
|
11924
|
-
var isoWeekYear =
|
|
12854
|
+
var isoWeekYear = getISOWeekYear(date);
|
|
11925
12855
|
|
|
11926
12856
|
// Padding
|
|
11927
12857
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
@@ -11936,417 +12866,417 @@ var formatters = {
|
|
|
11936
12866
|
// Also `yy` always returns the last two digits of a year,
|
|
11937
12867
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
11938
12868
|
u: function u(date, token) {
|
|
11939
|
-
var year = date.
|
|
12869
|
+
var year = date.getFullYear();
|
|
11940
12870
|
return addLeadingZeros(year, token.length);
|
|
11941
12871
|
},
|
|
11942
12872
|
// Quarter
|
|
11943
12873
|
Q: function Q(date, token, localize) {
|
|
11944
|
-
var quarter = Math.ceil((date.
|
|
12874
|
+
var quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
11945
12875
|
switch (token) {
|
|
11946
12876
|
// 1, 2, 3, 4
|
|
11947
|
-
case
|
|
12877
|
+
case "Q":
|
|
11948
12878
|
return String(quarter);
|
|
11949
12879
|
// 01, 02, 03, 04
|
|
11950
|
-
case
|
|
12880
|
+
case "QQ":
|
|
11951
12881
|
return addLeadingZeros(quarter, 2);
|
|
11952
12882
|
// 1st, 2nd, 3rd, 4th
|
|
11953
|
-
case
|
|
12883
|
+
case "Qo":
|
|
11954
12884
|
return localize.ordinalNumber(quarter, {
|
|
11955
|
-
unit:
|
|
12885
|
+
unit: "quarter"
|
|
11956
12886
|
});
|
|
11957
12887
|
// Q1, Q2, Q3, Q4
|
|
11958
|
-
case
|
|
12888
|
+
case "QQQ":
|
|
11959
12889
|
return localize.quarter(quarter, {
|
|
11960
|
-
width:
|
|
11961
|
-
context:
|
|
12890
|
+
width: "abbreviated",
|
|
12891
|
+
context: "formatting"
|
|
11962
12892
|
});
|
|
11963
12893
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
11964
|
-
case
|
|
12894
|
+
case "QQQQQ":
|
|
11965
12895
|
return localize.quarter(quarter, {
|
|
11966
|
-
width:
|
|
11967
|
-
context:
|
|
12896
|
+
width: "narrow",
|
|
12897
|
+
context: "formatting"
|
|
11968
12898
|
});
|
|
11969
12899
|
// 1st quarter, 2nd quarter, ...
|
|
11970
|
-
case
|
|
12900
|
+
case "QQQQ":
|
|
11971
12901
|
default:
|
|
11972
12902
|
return localize.quarter(quarter, {
|
|
11973
|
-
width:
|
|
11974
|
-
context:
|
|
12903
|
+
width: "wide",
|
|
12904
|
+
context: "formatting"
|
|
11975
12905
|
});
|
|
11976
12906
|
}
|
|
11977
12907
|
},
|
|
11978
12908
|
// Stand-alone quarter
|
|
11979
12909
|
q: function q(date, token, localize) {
|
|
11980
|
-
var quarter = Math.ceil((date.
|
|
12910
|
+
var quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
11981
12911
|
switch (token) {
|
|
11982
12912
|
// 1, 2, 3, 4
|
|
11983
|
-
case
|
|
12913
|
+
case "q":
|
|
11984
12914
|
return String(quarter);
|
|
11985
12915
|
// 01, 02, 03, 04
|
|
11986
|
-
case
|
|
12916
|
+
case "qq":
|
|
11987
12917
|
return addLeadingZeros(quarter, 2);
|
|
11988
12918
|
// 1st, 2nd, 3rd, 4th
|
|
11989
|
-
case
|
|
12919
|
+
case "qo":
|
|
11990
12920
|
return localize.ordinalNumber(quarter, {
|
|
11991
|
-
unit:
|
|
12921
|
+
unit: "quarter"
|
|
11992
12922
|
});
|
|
11993
12923
|
// Q1, Q2, Q3, Q4
|
|
11994
|
-
case
|
|
12924
|
+
case "qqq":
|
|
11995
12925
|
return localize.quarter(quarter, {
|
|
11996
|
-
width:
|
|
11997
|
-
context:
|
|
12926
|
+
width: "abbreviated",
|
|
12927
|
+
context: "standalone"
|
|
11998
12928
|
});
|
|
11999
12929
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
12000
|
-
case
|
|
12930
|
+
case "qqqqq":
|
|
12001
12931
|
return localize.quarter(quarter, {
|
|
12002
|
-
width:
|
|
12003
|
-
context:
|
|
12932
|
+
width: "narrow",
|
|
12933
|
+
context: "standalone"
|
|
12004
12934
|
});
|
|
12005
12935
|
// 1st quarter, 2nd quarter, ...
|
|
12006
|
-
case
|
|
12936
|
+
case "qqqq":
|
|
12007
12937
|
default:
|
|
12008
12938
|
return localize.quarter(quarter, {
|
|
12009
|
-
width:
|
|
12010
|
-
context:
|
|
12939
|
+
width: "wide",
|
|
12940
|
+
context: "standalone"
|
|
12011
12941
|
});
|
|
12012
12942
|
}
|
|
12013
12943
|
},
|
|
12014
12944
|
// Month
|
|
12015
12945
|
M: function M(date, token, localize) {
|
|
12016
|
-
var month = date.
|
|
12946
|
+
var month = date.getMonth();
|
|
12017
12947
|
switch (token) {
|
|
12018
|
-
case
|
|
12019
|
-
case
|
|
12020
|
-
return
|
|
12948
|
+
case "M":
|
|
12949
|
+
case "MM":
|
|
12950
|
+
return lightFormatters.M(date, token);
|
|
12021
12951
|
// 1st, 2nd, ..., 12th
|
|
12022
|
-
case
|
|
12952
|
+
case "Mo":
|
|
12023
12953
|
return localize.ordinalNumber(month + 1, {
|
|
12024
|
-
unit:
|
|
12954
|
+
unit: "month"
|
|
12025
12955
|
});
|
|
12026
12956
|
// Jan, Feb, ..., Dec
|
|
12027
|
-
case
|
|
12957
|
+
case "MMM":
|
|
12028
12958
|
return localize.month(month, {
|
|
12029
|
-
width:
|
|
12030
|
-
context:
|
|
12959
|
+
width: "abbreviated",
|
|
12960
|
+
context: "formatting"
|
|
12031
12961
|
});
|
|
12032
12962
|
// J, F, ..., D
|
|
12033
|
-
case
|
|
12963
|
+
case "MMMMM":
|
|
12034
12964
|
return localize.month(month, {
|
|
12035
|
-
width:
|
|
12036
|
-
context:
|
|
12965
|
+
width: "narrow",
|
|
12966
|
+
context: "formatting"
|
|
12037
12967
|
});
|
|
12038
12968
|
// January, February, ..., December
|
|
12039
|
-
case
|
|
12969
|
+
case "MMMM":
|
|
12040
12970
|
default:
|
|
12041
12971
|
return localize.month(month, {
|
|
12042
|
-
width:
|
|
12043
|
-
context:
|
|
12972
|
+
width: "wide",
|
|
12973
|
+
context: "formatting"
|
|
12044
12974
|
});
|
|
12045
12975
|
}
|
|
12046
12976
|
},
|
|
12047
12977
|
// Stand-alone month
|
|
12048
12978
|
L: function L(date, token, localize) {
|
|
12049
|
-
var month = date.
|
|
12979
|
+
var month = date.getMonth();
|
|
12050
12980
|
switch (token) {
|
|
12051
12981
|
// 1, 2, ..., 12
|
|
12052
|
-
case
|
|
12982
|
+
case "L":
|
|
12053
12983
|
return String(month + 1);
|
|
12054
12984
|
// 01, 02, ..., 12
|
|
12055
|
-
case
|
|
12985
|
+
case "LL":
|
|
12056
12986
|
return addLeadingZeros(month + 1, 2);
|
|
12057
12987
|
// 1st, 2nd, ..., 12th
|
|
12058
|
-
case
|
|
12988
|
+
case "Lo":
|
|
12059
12989
|
return localize.ordinalNumber(month + 1, {
|
|
12060
|
-
unit:
|
|
12990
|
+
unit: "month"
|
|
12061
12991
|
});
|
|
12062
12992
|
// Jan, Feb, ..., Dec
|
|
12063
|
-
case
|
|
12993
|
+
case "LLL":
|
|
12064
12994
|
return localize.month(month, {
|
|
12065
|
-
width:
|
|
12066
|
-
context:
|
|
12995
|
+
width: "abbreviated",
|
|
12996
|
+
context: "standalone"
|
|
12067
12997
|
});
|
|
12068
12998
|
// J, F, ..., D
|
|
12069
|
-
case
|
|
12999
|
+
case "LLLLL":
|
|
12070
13000
|
return localize.month(month, {
|
|
12071
|
-
width:
|
|
12072
|
-
context:
|
|
13001
|
+
width: "narrow",
|
|
13002
|
+
context: "standalone"
|
|
12073
13003
|
});
|
|
12074
13004
|
// January, February, ..., December
|
|
12075
|
-
case
|
|
13005
|
+
case "LLLL":
|
|
12076
13006
|
default:
|
|
12077
13007
|
return localize.month(month, {
|
|
12078
|
-
width:
|
|
12079
|
-
context:
|
|
13008
|
+
width: "wide",
|
|
13009
|
+
context: "standalone"
|
|
12080
13010
|
});
|
|
12081
13011
|
}
|
|
12082
13012
|
},
|
|
12083
13013
|
// Local week of year
|
|
12084
13014
|
w: function w(date, token, localize, options) {
|
|
12085
|
-
var week =
|
|
12086
|
-
if (token ===
|
|
13015
|
+
var week = getWeek(date, options);
|
|
13016
|
+
if (token === "wo") {
|
|
12087
13017
|
return localize.ordinalNumber(week, {
|
|
12088
|
-
unit:
|
|
13018
|
+
unit: "week"
|
|
12089
13019
|
});
|
|
12090
13020
|
}
|
|
12091
13021
|
return addLeadingZeros(week, token.length);
|
|
12092
13022
|
},
|
|
12093
13023
|
// ISO week of year
|
|
12094
13024
|
I: function I(date, token, localize) {
|
|
12095
|
-
var isoWeek =
|
|
12096
|
-
if (token ===
|
|
13025
|
+
var isoWeek = getISOWeek(date);
|
|
13026
|
+
if (token === "Io") {
|
|
12097
13027
|
return localize.ordinalNumber(isoWeek, {
|
|
12098
|
-
unit:
|
|
13028
|
+
unit: "week"
|
|
12099
13029
|
});
|
|
12100
13030
|
}
|
|
12101
13031
|
return addLeadingZeros(isoWeek, token.length);
|
|
12102
13032
|
},
|
|
12103
13033
|
// Day of the month
|
|
12104
13034
|
d: function d(date, token, localize) {
|
|
12105
|
-
if (token ===
|
|
12106
|
-
return localize.ordinalNumber(date.
|
|
12107
|
-
unit:
|
|
13035
|
+
if (token === "do") {
|
|
13036
|
+
return localize.ordinalNumber(date.getDate(), {
|
|
13037
|
+
unit: "date"
|
|
12108
13038
|
});
|
|
12109
13039
|
}
|
|
12110
|
-
return
|
|
13040
|
+
return lightFormatters.d(date, token);
|
|
12111
13041
|
},
|
|
12112
13042
|
// Day of year
|
|
12113
13043
|
D: function D(date, token, localize) {
|
|
12114
|
-
var dayOfYear =
|
|
12115
|
-
if (token ===
|
|
13044
|
+
var dayOfYear = getDayOfYear(date);
|
|
13045
|
+
if (token === "Do") {
|
|
12116
13046
|
return localize.ordinalNumber(dayOfYear, {
|
|
12117
|
-
unit:
|
|
13047
|
+
unit: "dayOfYear"
|
|
12118
13048
|
});
|
|
12119
13049
|
}
|
|
12120
13050
|
return addLeadingZeros(dayOfYear, token.length);
|
|
12121
13051
|
},
|
|
12122
13052
|
// Day of week
|
|
12123
13053
|
E: function E(date, token, localize) {
|
|
12124
|
-
var dayOfWeek = date.
|
|
13054
|
+
var dayOfWeek = date.getDay();
|
|
12125
13055
|
switch (token) {
|
|
12126
13056
|
// Tue
|
|
12127
|
-
case
|
|
12128
|
-
case
|
|
12129
|
-
case
|
|
13057
|
+
case "E":
|
|
13058
|
+
case "EE":
|
|
13059
|
+
case "EEE":
|
|
12130
13060
|
return localize.day(dayOfWeek, {
|
|
12131
|
-
width:
|
|
12132
|
-
context:
|
|
13061
|
+
width: "abbreviated",
|
|
13062
|
+
context: "formatting"
|
|
12133
13063
|
});
|
|
12134
13064
|
// T
|
|
12135
|
-
case
|
|
13065
|
+
case "EEEEE":
|
|
12136
13066
|
return localize.day(dayOfWeek, {
|
|
12137
|
-
width:
|
|
12138
|
-
context:
|
|
13067
|
+
width: "narrow",
|
|
13068
|
+
context: "formatting"
|
|
12139
13069
|
});
|
|
12140
13070
|
// Tu
|
|
12141
|
-
case
|
|
13071
|
+
case "EEEEEE":
|
|
12142
13072
|
return localize.day(dayOfWeek, {
|
|
12143
|
-
width:
|
|
12144
|
-
context:
|
|
13073
|
+
width: "short",
|
|
13074
|
+
context: "formatting"
|
|
12145
13075
|
});
|
|
12146
13076
|
// Tuesday
|
|
12147
|
-
case
|
|
13077
|
+
case "EEEE":
|
|
12148
13078
|
default:
|
|
12149
13079
|
return localize.day(dayOfWeek, {
|
|
12150
|
-
width:
|
|
12151
|
-
context:
|
|
13080
|
+
width: "wide",
|
|
13081
|
+
context: "formatting"
|
|
12152
13082
|
});
|
|
12153
13083
|
}
|
|
12154
13084
|
},
|
|
12155
13085
|
// Local day of week
|
|
12156
13086
|
e: function e(date, token, localize, options) {
|
|
12157
|
-
var dayOfWeek = date.
|
|
13087
|
+
var dayOfWeek = date.getDay();
|
|
12158
13088
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
12159
13089
|
switch (token) {
|
|
12160
13090
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
12161
|
-
case
|
|
13091
|
+
case "e":
|
|
12162
13092
|
return String(localDayOfWeek);
|
|
12163
13093
|
// Padded numerical value
|
|
12164
|
-
case
|
|
13094
|
+
case "ee":
|
|
12165
13095
|
return addLeadingZeros(localDayOfWeek, 2);
|
|
12166
13096
|
// 1st, 2nd, ..., 7th
|
|
12167
|
-
case
|
|
13097
|
+
case "eo":
|
|
12168
13098
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
12169
|
-
unit:
|
|
13099
|
+
unit: "day"
|
|
12170
13100
|
});
|
|
12171
|
-
case
|
|
13101
|
+
case "eee":
|
|
12172
13102
|
return localize.day(dayOfWeek, {
|
|
12173
|
-
width:
|
|
12174
|
-
context:
|
|
13103
|
+
width: "abbreviated",
|
|
13104
|
+
context: "formatting"
|
|
12175
13105
|
});
|
|
12176
13106
|
// T
|
|
12177
|
-
case
|
|
13107
|
+
case "eeeee":
|
|
12178
13108
|
return localize.day(dayOfWeek, {
|
|
12179
|
-
width:
|
|
12180
|
-
context:
|
|
13109
|
+
width: "narrow",
|
|
13110
|
+
context: "formatting"
|
|
12181
13111
|
});
|
|
12182
13112
|
// Tu
|
|
12183
|
-
case
|
|
13113
|
+
case "eeeeee":
|
|
12184
13114
|
return localize.day(dayOfWeek, {
|
|
12185
|
-
width:
|
|
12186
|
-
context:
|
|
13115
|
+
width: "short",
|
|
13116
|
+
context: "formatting"
|
|
12187
13117
|
});
|
|
12188
13118
|
// Tuesday
|
|
12189
|
-
case
|
|
13119
|
+
case "eeee":
|
|
12190
13120
|
default:
|
|
12191
13121
|
return localize.day(dayOfWeek, {
|
|
12192
|
-
width:
|
|
12193
|
-
context:
|
|
13122
|
+
width: "wide",
|
|
13123
|
+
context: "formatting"
|
|
12194
13124
|
});
|
|
12195
13125
|
}
|
|
12196
13126
|
},
|
|
12197
13127
|
// Stand-alone local day of week
|
|
12198
13128
|
c: function c(date, token, localize, options) {
|
|
12199
|
-
var dayOfWeek = date.
|
|
13129
|
+
var dayOfWeek = date.getDay();
|
|
12200
13130
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
12201
13131
|
switch (token) {
|
|
12202
13132
|
// Numerical value (same as in `e`)
|
|
12203
|
-
case
|
|
13133
|
+
case "c":
|
|
12204
13134
|
return String(localDayOfWeek);
|
|
12205
13135
|
// Padded numerical value
|
|
12206
|
-
case
|
|
13136
|
+
case "cc":
|
|
12207
13137
|
return addLeadingZeros(localDayOfWeek, token.length);
|
|
12208
13138
|
// 1st, 2nd, ..., 7th
|
|
12209
|
-
case
|
|
13139
|
+
case "co":
|
|
12210
13140
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
12211
|
-
unit:
|
|
13141
|
+
unit: "day"
|
|
12212
13142
|
});
|
|
12213
|
-
case
|
|
13143
|
+
case "ccc":
|
|
12214
13144
|
return localize.day(dayOfWeek, {
|
|
12215
|
-
width:
|
|
12216
|
-
context:
|
|
13145
|
+
width: "abbreviated",
|
|
13146
|
+
context: "standalone"
|
|
12217
13147
|
});
|
|
12218
13148
|
// T
|
|
12219
|
-
case
|
|
13149
|
+
case "ccccc":
|
|
12220
13150
|
return localize.day(dayOfWeek, {
|
|
12221
|
-
width:
|
|
12222
|
-
context:
|
|
13151
|
+
width: "narrow",
|
|
13152
|
+
context: "standalone"
|
|
12223
13153
|
});
|
|
12224
13154
|
// Tu
|
|
12225
|
-
case
|
|
13155
|
+
case "cccccc":
|
|
12226
13156
|
return localize.day(dayOfWeek, {
|
|
12227
|
-
width:
|
|
12228
|
-
context:
|
|
13157
|
+
width: "short",
|
|
13158
|
+
context: "standalone"
|
|
12229
13159
|
});
|
|
12230
13160
|
// Tuesday
|
|
12231
|
-
case
|
|
13161
|
+
case "cccc":
|
|
12232
13162
|
default:
|
|
12233
13163
|
return localize.day(dayOfWeek, {
|
|
12234
|
-
width:
|
|
12235
|
-
context:
|
|
13164
|
+
width: "wide",
|
|
13165
|
+
context: "standalone"
|
|
12236
13166
|
});
|
|
12237
13167
|
}
|
|
12238
13168
|
},
|
|
12239
13169
|
// ISO day of week
|
|
12240
13170
|
i: function i(date, token, localize) {
|
|
12241
|
-
var dayOfWeek = date.
|
|
13171
|
+
var dayOfWeek = date.getDay();
|
|
12242
13172
|
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
12243
13173
|
switch (token) {
|
|
12244
13174
|
// 2
|
|
12245
|
-
case
|
|
13175
|
+
case "i":
|
|
12246
13176
|
return String(isoDayOfWeek);
|
|
12247
13177
|
// 02
|
|
12248
|
-
case
|
|
13178
|
+
case "ii":
|
|
12249
13179
|
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
12250
13180
|
// 2nd
|
|
12251
|
-
case
|
|
13181
|
+
case "io":
|
|
12252
13182
|
return localize.ordinalNumber(isoDayOfWeek, {
|
|
12253
|
-
unit:
|
|
13183
|
+
unit: "day"
|
|
12254
13184
|
});
|
|
12255
13185
|
// Tue
|
|
12256
|
-
case
|
|
13186
|
+
case "iii":
|
|
12257
13187
|
return localize.day(dayOfWeek, {
|
|
12258
|
-
width:
|
|
12259
|
-
context:
|
|
13188
|
+
width: "abbreviated",
|
|
13189
|
+
context: "formatting"
|
|
12260
13190
|
});
|
|
12261
13191
|
// T
|
|
12262
|
-
case
|
|
13192
|
+
case "iiiii":
|
|
12263
13193
|
return localize.day(dayOfWeek, {
|
|
12264
|
-
width:
|
|
12265
|
-
context:
|
|
13194
|
+
width: "narrow",
|
|
13195
|
+
context: "formatting"
|
|
12266
13196
|
});
|
|
12267
13197
|
// Tu
|
|
12268
|
-
case
|
|
13198
|
+
case "iiiiii":
|
|
12269
13199
|
return localize.day(dayOfWeek, {
|
|
12270
|
-
width:
|
|
12271
|
-
context:
|
|
13200
|
+
width: "short",
|
|
13201
|
+
context: "formatting"
|
|
12272
13202
|
});
|
|
12273
13203
|
// Tuesday
|
|
12274
|
-
case
|
|
13204
|
+
case "iiii":
|
|
12275
13205
|
default:
|
|
12276
13206
|
return localize.day(dayOfWeek, {
|
|
12277
|
-
width:
|
|
12278
|
-
context:
|
|
13207
|
+
width: "wide",
|
|
13208
|
+
context: "formatting"
|
|
12279
13209
|
});
|
|
12280
13210
|
}
|
|
12281
13211
|
},
|
|
12282
13212
|
// AM or PM
|
|
12283
13213
|
a: function a(date, token, localize) {
|
|
12284
|
-
var hours = date.
|
|
12285
|
-
var dayPeriodEnumValue = hours / 12 >= 1 ?
|
|
13214
|
+
var hours = date.getHours();
|
|
13215
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
12286
13216
|
switch (token) {
|
|
12287
|
-
case
|
|
12288
|
-
case
|
|
13217
|
+
case "a":
|
|
13218
|
+
case "aa":
|
|
12289
13219
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12290
|
-
width:
|
|
12291
|
-
context:
|
|
13220
|
+
width: "abbreviated",
|
|
13221
|
+
context: "formatting"
|
|
12292
13222
|
});
|
|
12293
|
-
case
|
|
13223
|
+
case "aaa":
|
|
12294
13224
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12295
|
-
width:
|
|
12296
|
-
context:
|
|
13225
|
+
width: "abbreviated",
|
|
13226
|
+
context: "formatting"
|
|
12297
13227
|
}).toLowerCase();
|
|
12298
|
-
case
|
|
13228
|
+
case "aaaaa":
|
|
12299
13229
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12300
|
-
width:
|
|
12301
|
-
context:
|
|
13230
|
+
width: "narrow",
|
|
13231
|
+
context: "formatting"
|
|
12302
13232
|
});
|
|
12303
|
-
case
|
|
13233
|
+
case "aaaa":
|
|
12304
13234
|
default:
|
|
12305
13235
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12306
|
-
width:
|
|
12307
|
-
context:
|
|
13236
|
+
width: "wide",
|
|
13237
|
+
context: "formatting"
|
|
12308
13238
|
});
|
|
12309
13239
|
}
|
|
12310
13240
|
},
|
|
12311
13241
|
// AM, PM, midnight, noon
|
|
12312
13242
|
b: function b(date, token, localize) {
|
|
12313
|
-
var hours = date.
|
|
13243
|
+
var hours = date.getHours();
|
|
12314
13244
|
var dayPeriodEnumValue;
|
|
12315
13245
|
if (hours === 12) {
|
|
12316
13246
|
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
12317
13247
|
} else if (hours === 0) {
|
|
12318
13248
|
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
12319
13249
|
} else {
|
|
12320
|
-
dayPeriodEnumValue = hours / 12 >= 1 ?
|
|
13250
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
12321
13251
|
}
|
|
12322
13252
|
switch (token) {
|
|
12323
|
-
case
|
|
12324
|
-
case
|
|
13253
|
+
case "b":
|
|
13254
|
+
case "bb":
|
|
12325
13255
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12326
|
-
width:
|
|
12327
|
-
context:
|
|
13256
|
+
width: "abbreviated",
|
|
13257
|
+
context: "formatting"
|
|
12328
13258
|
});
|
|
12329
|
-
case
|
|
13259
|
+
case "bbb":
|
|
12330
13260
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12331
|
-
width:
|
|
12332
|
-
context:
|
|
13261
|
+
width: "abbreviated",
|
|
13262
|
+
context: "formatting"
|
|
12333
13263
|
}).toLowerCase();
|
|
12334
|
-
case
|
|
13264
|
+
case "bbbbb":
|
|
12335
13265
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12336
|
-
width:
|
|
12337
|
-
context:
|
|
13266
|
+
width: "narrow",
|
|
13267
|
+
context: "formatting"
|
|
12338
13268
|
});
|
|
12339
|
-
case
|
|
13269
|
+
case "bbbb":
|
|
12340
13270
|
default:
|
|
12341
13271
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12342
|
-
width:
|
|
12343
|
-
context:
|
|
13272
|
+
width: "wide",
|
|
13273
|
+
context: "formatting"
|
|
12344
13274
|
});
|
|
12345
13275
|
}
|
|
12346
13276
|
},
|
|
12347
13277
|
// in the morning, in the afternoon, in the evening, at night
|
|
12348
13278
|
B: function B(date, token, localize) {
|
|
12349
|
-
var hours = date.
|
|
13279
|
+
var hours = date.getHours();
|
|
12350
13280
|
var dayPeriodEnumValue;
|
|
12351
13281
|
if (hours >= 17) {
|
|
12352
13282
|
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
@@ -12358,255 +13288,248 @@ var formatters = {
|
|
|
12358
13288
|
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
12359
13289
|
}
|
|
12360
13290
|
switch (token) {
|
|
12361
|
-
case
|
|
12362
|
-
case
|
|
12363
|
-
case
|
|
13291
|
+
case "B":
|
|
13292
|
+
case "BB":
|
|
13293
|
+
case "BBB":
|
|
12364
13294
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12365
|
-
width:
|
|
12366
|
-
context:
|
|
13295
|
+
width: "abbreviated",
|
|
13296
|
+
context: "formatting"
|
|
12367
13297
|
});
|
|
12368
|
-
case
|
|
13298
|
+
case "BBBBB":
|
|
12369
13299
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12370
|
-
width:
|
|
12371
|
-
context:
|
|
13300
|
+
width: "narrow",
|
|
13301
|
+
context: "formatting"
|
|
12372
13302
|
});
|
|
12373
|
-
case
|
|
13303
|
+
case "BBBB":
|
|
12374
13304
|
default:
|
|
12375
13305
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
12376
|
-
width:
|
|
12377
|
-
context:
|
|
13306
|
+
width: "wide",
|
|
13307
|
+
context: "formatting"
|
|
12378
13308
|
});
|
|
12379
13309
|
}
|
|
12380
13310
|
},
|
|
12381
13311
|
// Hour [1-12]
|
|
12382
13312
|
h: function h(date, token, localize) {
|
|
12383
|
-
if (token ===
|
|
12384
|
-
var hours = date.
|
|
13313
|
+
if (token === "ho") {
|
|
13314
|
+
var hours = date.getHours() % 12;
|
|
12385
13315
|
if (hours === 0) hours = 12;
|
|
12386
13316
|
return localize.ordinalNumber(hours, {
|
|
12387
|
-
unit:
|
|
13317
|
+
unit: "hour"
|
|
12388
13318
|
});
|
|
12389
13319
|
}
|
|
12390
|
-
return
|
|
13320
|
+
return lightFormatters.h(date, token);
|
|
12391
13321
|
},
|
|
12392
13322
|
// Hour [0-23]
|
|
12393
13323
|
H: function H(date, token, localize) {
|
|
12394
|
-
if (token ===
|
|
12395
|
-
return localize.ordinalNumber(date.
|
|
12396
|
-
unit:
|
|
13324
|
+
if (token === "Ho") {
|
|
13325
|
+
return localize.ordinalNumber(date.getHours(), {
|
|
13326
|
+
unit: "hour"
|
|
12397
13327
|
});
|
|
12398
13328
|
}
|
|
12399
|
-
return
|
|
13329
|
+
return lightFormatters.H(date, token);
|
|
12400
13330
|
},
|
|
12401
13331
|
// Hour [0-11]
|
|
12402
13332
|
K: function K(date, token, localize) {
|
|
12403
|
-
var hours = date.
|
|
12404
|
-
if (token ===
|
|
13333
|
+
var hours = date.getHours() % 12;
|
|
13334
|
+
if (token === "Ko") {
|
|
12405
13335
|
return localize.ordinalNumber(hours, {
|
|
12406
|
-
unit:
|
|
13336
|
+
unit: "hour"
|
|
12407
13337
|
});
|
|
12408
13338
|
}
|
|
12409
13339
|
return addLeadingZeros(hours, token.length);
|
|
12410
13340
|
},
|
|
12411
13341
|
// Hour [1-24]
|
|
12412
13342
|
k: function k(date, token, localize) {
|
|
12413
|
-
var hours = date.
|
|
13343
|
+
var hours = date.getHours();
|
|
12414
13344
|
if (hours === 0) hours = 24;
|
|
12415
|
-
if (token ===
|
|
13345
|
+
if (token === "ko") {
|
|
12416
13346
|
return localize.ordinalNumber(hours, {
|
|
12417
|
-
unit:
|
|
13347
|
+
unit: "hour"
|
|
12418
13348
|
});
|
|
12419
13349
|
}
|
|
12420
13350
|
return addLeadingZeros(hours, token.length);
|
|
12421
13351
|
},
|
|
12422
13352
|
// Minute
|
|
12423
13353
|
m: function m(date, token, localize) {
|
|
12424
|
-
if (token ===
|
|
12425
|
-
return localize.ordinalNumber(date.
|
|
12426
|
-
unit:
|
|
13354
|
+
if (token === "mo") {
|
|
13355
|
+
return localize.ordinalNumber(date.getMinutes(), {
|
|
13356
|
+
unit: "minute"
|
|
12427
13357
|
});
|
|
12428
13358
|
}
|
|
12429
|
-
return
|
|
13359
|
+
return lightFormatters.m(date, token);
|
|
12430
13360
|
},
|
|
12431
13361
|
// Second
|
|
12432
13362
|
s: function s(date, token, localize) {
|
|
12433
|
-
if (token ===
|
|
12434
|
-
return localize.ordinalNumber(date.
|
|
12435
|
-
unit:
|
|
13363
|
+
if (token === "so") {
|
|
13364
|
+
return localize.ordinalNumber(date.getSeconds(), {
|
|
13365
|
+
unit: "second"
|
|
12436
13366
|
});
|
|
12437
13367
|
}
|
|
12438
|
-
return
|
|
13368
|
+
return lightFormatters.s(date, token);
|
|
12439
13369
|
},
|
|
12440
13370
|
// Fraction of second
|
|
12441
13371
|
S: function S(date, token) {
|
|
12442
|
-
return
|
|
13372
|
+
return lightFormatters.S(date, token);
|
|
12443
13373
|
},
|
|
12444
13374
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
12445
|
-
X: function X(date, token, _localize
|
|
12446
|
-
var
|
|
12447
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13375
|
+
X: function X(date, token, _localize) {
|
|
13376
|
+
var timezoneOffset = date.getTimezoneOffset();
|
|
12448
13377
|
if (timezoneOffset === 0) {
|
|
12449
|
-
return
|
|
13378
|
+
return "Z";
|
|
12450
13379
|
}
|
|
12451
13380
|
switch (token) {
|
|
12452
13381
|
// Hours and optional minutes
|
|
12453
|
-
case
|
|
13382
|
+
case "X":
|
|
12454
13383
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
12455
13384
|
|
|
12456
13385
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
12457
13386
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12458
13387
|
// so this token always has the same output as `XX`
|
|
12459
|
-
case
|
|
12460
|
-
case
|
|
13388
|
+
case "XXXX":
|
|
13389
|
+
case "XX":
|
|
12461
13390
|
// Hours and minutes without `:` delimiter
|
|
12462
13391
|
return formatTimezone(timezoneOffset);
|
|
12463
13392
|
|
|
12464
13393
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
12465
13394
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12466
13395
|
// so this token always has the same output as `XXX`
|
|
12467
|
-
case
|
|
12468
|
-
case
|
|
13396
|
+
case "XXXXX":
|
|
13397
|
+
case "XXX": // Hours and minutes with `:` delimiter
|
|
12469
13398
|
default:
|
|
12470
|
-
return formatTimezone(timezoneOffset,
|
|
13399
|
+
return formatTimezone(timezoneOffset, ":");
|
|
12471
13400
|
}
|
|
12472
13401
|
},
|
|
12473
13402
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
12474
|
-
x: function x(date, token, _localize
|
|
12475
|
-
var
|
|
12476
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13403
|
+
x: function x(date, token, _localize) {
|
|
13404
|
+
var timezoneOffset = date.getTimezoneOffset();
|
|
12477
13405
|
switch (token) {
|
|
12478
13406
|
// Hours and optional minutes
|
|
12479
|
-
case
|
|
13407
|
+
case "x":
|
|
12480
13408
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
12481
13409
|
|
|
12482
13410
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
12483
13411
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12484
13412
|
// so this token always has the same output as `xx`
|
|
12485
|
-
case
|
|
12486
|
-
case
|
|
13413
|
+
case "xxxx":
|
|
13414
|
+
case "xx":
|
|
12487
13415
|
// Hours and minutes without `:` delimiter
|
|
12488
13416
|
return formatTimezone(timezoneOffset);
|
|
12489
13417
|
|
|
12490
13418
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
12491
13419
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
12492
13420
|
// so this token always has the same output as `xxx`
|
|
12493
|
-
case
|
|
12494
|
-
case
|
|
13421
|
+
case "xxxxx":
|
|
13422
|
+
case "xxx": // Hours and minutes with `:` delimiter
|
|
12495
13423
|
default:
|
|
12496
|
-
return formatTimezone(timezoneOffset,
|
|
13424
|
+
return formatTimezone(timezoneOffset, ":");
|
|
12497
13425
|
}
|
|
12498
13426
|
},
|
|
12499
13427
|
// Timezone (GMT)
|
|
12500
|
-
O: function O(date, token, _localize
|
|
12501
|
-
var
|
|
12502
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13428
|
+
O: function O(date, token, _localize) {
|
|
13429
|
+
var timezoneOffset = date.getTimezoneOffset();
|
|
12503
13430
|
switch (token) {
|
|
12504
13431
|
// Short
|
|
12505
|
-
case
|
|
12506
|
-
case
|
|
12507
|
-
case
|
|
12508
|
-
return
|
|
13432
|
+
case "O":
|
|
13433
|
+
case "OO":
|
|
13434
|
+
case "OOO":
|
|
13435
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
12509
13436
|
// Long
|
|
12510
|
-
case
|
|
13437
|
+
case "OOOO":
|
|
12511
13438
|
default:
|
|
12512
|
-
return
|
|
13439
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
12513
13440
|
}
|
|
12514
13441
|
},
|
|
12515
13442
|
// Timezone (specific non-location)
|
|
12516
|
-
z: function z(date, token, _localize
|
|
12517
|
-
var
|
|
12518
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13443
|
+
z: function z(date, token, _localize) {
|
|
13444
|
+
var timezoneOffset = date.getTimezoneOffset();
|
|
12519
13445
|
switch (token) {
|
|
12520
13446
|
// Short
|
|
12521
|
-
case
|
|
12522
|
-
case
|
|
12523
|
-
case
|
|
12524
|
-
return
|
|
13447
|
+
case "z":
|
|
13448
|
+
case "zz":
|
|
13449
|
+
case "zzz":
|
|
13450
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
12525
13451
|
// Long
|
|
12526
|
-
case
|
|
13452
|
+
case "zzzz":
|
|
12527
13453
|
default:
|
|
12528
|
-
return
|
|
13454
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
12529
13455
|
}
|
|
12530
13456
|
},
|
|
12531
13457
|
// Seconds timestamp
|
|
12532
|
-
t: function t(date, token, _localize
|
|
12533
|
-
var
|
|
12534
|
-
var timestamp = Math.floor(originalDate.getTime() / 1000);
|
|
13458
|
+
t: function t(date, token, _localize) {
|
|
13459
|
+
var timestamp = Math.trunc(+date / 1000);
|
|
12535
13460
|
return addLeadingZeros(timestamp, token.length);
|
|
12536
13461
|
},
|
|
12537
13462
|
// Milliseconds timestamp
|
|
12538
|
-
T: function T(date, token, _localize
|
|
12539
|
-
|
|
12540
|
-
var timestamp = originalDate.getTime();
|
|
12541
|
-
return addLeadingZeros(timestamp, token.length);
|
|
13463
|
+
T: function T(date, token, _localize) {
|
|
13464
|
+
return addLeadingZeros(+date, token.length);
|
|
12542
13465
|
}
|
|
12543
13466
|
};
|
|
12544
|
-
function formatTimezoneShort(offset
|
|
12545
|
-
var
|
|
13467
|
+
function formatTimezoneShort(offset) {
|
|
13468
|
+
var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
13469
|
+
var sign = offset > 0 ? "-" : "+";
|
|
12546
13470
|
var absOffset = Math.abs(offset);
|
|
12547
|
-
var hours = Math.
|
|
13471
|
+
var hours = Math.trunc(absOffset / 60);
|
|
12548
13472
|
var minutes = absOffset % 60;
|
|
12549
13473
|
if (minutes === 0) {
|
|
12550
13474
|
return sign + String(hours);
|
|
12551
13475
|
}
|
|
12552
|
-
var delimiter = dirtyDelimiter;
|
|
12553
13476
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
12554
13477
|
}
|
|
12555
|
-
function formatTimezoneWithOptionalMinutes(offset,
|
|
13478
|
+
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
|
|
12556
13479
|
if (offset % 60 === 0) {
|
|
12557
|
-
var sign = offset > 0 ?
|
|
13480
|
+
var sign = offset > 0 ? "-" : "+";
|
|
12558
13481
|
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
12559
13482
|
}
|
|
12560
|
-
return formatTimezone(offset,
|
|
13483
|
+
return formatTimezone(offset, delimiter);
|
|
12561
13484
|
}
|
|
12562
|
-
function formatTimezone(offset
|
|
12563
|
-
var delimiter =
|
|
12564
|
-
var sign = offset > 0 ?
|
|
13485
|
+
function formatTimezone(offset) {
|
|
13486
|
+
var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
13487
|
+
var sign = offset > 0 ? "-" : "+";
|
|
12565
13488
|
var absOffset = Math.abs(offset);
|
|
12566
|
-
var hours = addLeadingZeros(Math.
|
|
13489
|
+
var hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
12567
13490
|
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
12568
13491
|
return sign + hours + delimiter + minutes;
|
|
12569
13492
|
}
|
|
12570
13493
|
|
|
12571
13494
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
12572
13495
|
switch (pattern) {
|
|
12573
|
-
case
|
|
13496
|
+
case "P":
|
|
12574
13497
|
return formatLong.date({
|
|
12575
|
-
width:
|
|
13498
|
+
width: "short"
|
|
12576
13499
|
});
|
|
12577
|
-
case
|
|
13500
|
+
case "PP":
|
|
12578
13501
|
return formatLong.date({
|
|
12579
|
-
width:
|
|
13502
|
+
width: "medium"
|
|
12580
13503
|
});
|
|
12581
|
-
case
|
|
13504
|
+
case "PPP":
|
|
12582
13505
|
return formatLong.date({
|
|
12583
|
-
width:
|
|
13506
|
+
width: "long"
|
|
12584
13507
|
});
|
|
12585
|
-
case
|
|
13508
|
+
case "PPPP":
|
|
12586
13509
|
default:
|
|
12587
13510
|
return formatLong.date({
|
|
12588
|
-
width:
|
|
13511
|
+
width: "full"
|
|
12589
13512
|
});
|
|
12590
13513
|
}
|
|
12591
13514
|
};
|
|
12592
13515
|
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
12593
13516
|
switch (pattern) {
|
|
12594
|
-
case
|
|
13517
|
+
case "p":
|
|
12595
13518
|
return formatLong.time({
|
|
12596
|
-
width:
|
|
13519
|
+
width: "short"
|
|
12597
13520
|
});
|
|
12598
|
-
case
|
|
13521
|
+
case "pp":
|
|
12599
13522
|
return formatLong.time({
|
|
12600
|
-
width:
|
|
13523
|
+
width: "medium"
|
|
12601
13524
|
});
|
|
12602
|
-
case
|
|
13525
|
+
case "ppp":
|
|
12603
13526
|
return formatLong.time({
|
|
12604
|
-
width:
|
|
13527
|
+
width: "long"
|
|
12605
13528
|
});
|
|
12606
|
-
case
|
|
13529
|
+
case "pppp":
|
|
12607
13530
|
default:
|
|
12608
13531
|
return formatLong.time({
|
|
12609
|
-
width:
|
|
13532
|
+
width: "full"
|
|
12610
13533
|
});
|
|
12611
13534
|
}
|
|
12612
13535
|
};
|
|
@@ -12619,550 +13542,55 @@ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong)
|
|
|
12619
13542
|
}
|
|
12620
13543
|
var dateTimeFormat;
|
|
12621
13544
|
switch (datePattern) {
|
|
12622
|
-
case
|
|
13545
|
+
case "P":
|
|
12623
13546
|
dateTimeFormat = formatLong.dateTime({
|
|
12624
|
-
width:
|
|
13547
|
+
width: "short"
|
|
12625
13548
|
});
|
|
12626
13549
|
break;
|
|
12627
|
-
case
|
|
13550
|
+
case "PP":
|
|
12628
13551
|
dateTimeFormat = formatLong.dateTime({
|
|
12629
|
-
width:
|
|
13552
|
+
width: "medium"
|
|
12630
13553
|
});
|
|
12631
13554
|
break;
|
|
12632
|
-
case
|
|
13555
|
+
case "PPP":
|
|
12633
13556
|
dateTimeFormat = formatLong.dateTime({
|
|
12634
|
-
width:
|
|
13557
|
+
width: "long"
|
|
12635
13558
|
});
|
|
12636
13559
|
break;
|
|
12637
|
-
case
|
|
13560
|
+
case "PPPP":
|
|
12638
13561
|
default:
|
|
12639
13562
|
dateTimeFormat = formatLong.dateTime({
|
|
12640
|
-
width:
|
|
13563
|
+
width: "full"
|
|
12641
13564
|
});
|
|
12642
13565
|
break;
|
|
12643
13566
|
}
|
|
12644
|
-
return dateTimeFormat.replace(
|
|
13567
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong)).replace("{{time}}", timeLongFormatter(timePattern, formatLong));
|
|
12645
13568
|
};
|
|
12646
13569
|
var longFormatters = {
|
|
12647
13570
|
p: timeLongFormatter,
|
|
12648
13571
|
P: dateTimeLongFormatter
|
|
12649
13572
|
};
|
|
12650
13573
|
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
12655
|
-
* and GMT+01:00:00 after that date)
|
|
12656
|
-
*
|
|
12657
|
-
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
12658
|
-
* which would lead to incorrect calculations.
|
|
12659
|
-
*
|
|
12660
|
-
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
12661
|
-
*/
|
|
12662
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
12663
|
-
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
12664
|
-
utcDate.setUTCFullYear(date.getFullYear());
|
|
12665
|
-
return date.getTime() - utcDate.getTime();
|
|
12666
|
-
}
|
|
12667
|
-
|
|
12668
|
-
var protectedDayOfYearTokens = ['D', 'DD'];
|
|
12669
|
-
var protectedWeekYearTokens = ['YY', 'YYYY'];
|
|
13574
|
+
var dayOfYearTokenRE = /^D+$/;
|
|
13575
|
+
var weekYearTokenRE = /^Y+$/;
|
|
13576
|
+
var throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
12670
13577
|
function isProtectedDayOfYearToken(token) {
|
|
12671
|
-
return
|
|
13578
|
+
return dayOfYearTokenRE.test(token);
|
|
12672
13579
|
}
|
|
12673
13580
|
function isProtectedWeekYearToken(token) {
|
|
12674
|
-
return
|
|
12675
|
-
}
|
|
12676
|
-
function throwProtectedError(token, format, input) {
|
|
12677
|
-
if (token === 'YYYY') {
|
|
12678
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12679
|
-
} else if (token === 'YY') {
|
|
12680
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12681
|
-
} else if (token === 'D') {
|
|
12682
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12683
|
-
} else if (token === 'DD') {
|
|
12684
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
12685
|
-
}
|
|
13581
|
+
return weekYearTokenRE.test(token);
|
|
12686
13582
|
}
|
|
12687
|
-
|
|
12688
|
-
var
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
other: 'less than {{count}} seconds'
|
|
12692
|
-
},
|
|
12693
|
-
xSeconds: {
|
|
12694
|
-
one: '1 second',
|
|
12695
|
-
other: '{{count}} seconds'
|
|
12696
|
-
},
|
|
12697
|
-
halfAMinute: 'half a minute',
|
|
12698
|
-
lessThanXMinutes: {
|
|
12699
|
-
one: 'less than a minute',
|
|
12700
|
-
other: 'less than {{count}} minutes'
|
|
12701
|
-
},
|
|
12702
|
-
xMinutes: {
|
|
12703
|
-
one: '1 minute',
|
|
12704
|
-
other: '{{count}} minutes'
|
|
12705
|
-
},
|
|
12706
|
-
aboutXHours: {
|
|
12707
|
-
one: 'about 1 hour',
|
|
12708
|
-
other: 'about {{count}} hours'
|
|
12709
|
-
},
|
|
12710
|
-
xHours: {
|
|
12711
|
-
one: '1 hour',
|
|
12712
|
-
other: '{{count}} hours'
|
|
12713
|
-
},
|
|
12714
|
-
xDays: {
|
|
12715
|
-
one: '1 day',
|
|
12716
|
-
other: '{{count}} days'
|
|
12717
|
-
},
|
|
12718
|
-
aboutXWeeks: {
|
|
12719
|
-
one: 'about 1 week',
|
|
12720
|
-
other: 'about {{count}} weeks'
|
|
12721
|
-
},
|
|
12722
|
-
xWeeks: {
|
|
12723
|
-
one: '1 week',
|
|
12724
|
-
other: '{{count}} weeks'
|
|
12725
|
-
},
|
|
12726
|
-
aboutXMonths: {
|
|
12727
|
-
one: 'about 1 month',
|
|
12728
|
-
other: 'about {{count}} months'
|
|
12729
|
-
},
|
|
12730
|
-
xMonths: {
|
|
12731
|
-
one: '1 month',
|
|
12732
|
-
other: '{{count}} months'
|
|
12733
|
-
},
|
|
12734
|
-
aboutXYears: {
|
|
12735
|
-
one: 'about 1 year',
|
|
12736
|
-
other: 'about {{count}} years'
|
|
12737
|
-
},
|
|
12738
|
-
xYears: {
|
|
12739
|
-
one: '1 year',
|
|
12740
|
-
other: '{{count}} years'
|
|
12741
|
-
},
|
|
12742
|
-
overXYears: {
|
|
12743
|
-
one: 'over 1 year',
|
|
12744
|
-
other: 'over {{count}} years'
|
|
12745
|
-
},
|
|
12746
|
-
almostXYears: {
|
|
12747
|
-
one: 'almost 1 year',
|
|
12748
|
-
other: 'almost {{count}} years'
|
|
12749
|
-
}
|
|
12750
|
-
};
|
|
12751
|
-
var formatDistance$1 = function formatDistance(token, count, options) {
|
|
12752
|
-
var result;
|
|
12753
|
-
var tokenValue = formatDistanceLocale$1[token];
|
|
12754
|
-
if (typeof tokenValue === 'string') {
|
|
12755
|
-
result = tokenValue;
|
|
12756
|
-
} else if (count === 1) {
|
|
12757
|
-
result = tokenValue.one;
|
|
12758
|
-
} else {
|
|
12759
|
-
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
12760
|
-
}
|
|
12761
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
12762
|
-
if (options.comparison && options.comparison > 0) {
|
|
12763
|
-
return 'in ' + result;
|
|
12764
|
-
} else {
|
|
12765
|
-
return result + ' ago';
|
|
12766
|
-
}
|
|
12767
|
-
}
|
|
12768
|
-
return result;
|
|
12769
|
-
};
|
|
12770
|
-
|
|
12771
|
-
function buildFormatLongFn(args) {
|
|
12772
|
-
return function () {
|
|
12773
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12774
|
-
// TODO: Remove String()
|
|
12775
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
12776
|
-
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
12777
|
-
return format;
|
|
12778
|
-
};
|
|
13583
|
+
function warnOrThrowProtectedError(token, format, input) {
|
|
13584
|
+
var _message = message(token, format, input);
|
|
13585
|
+
console.warn(_message);
|
|
13586
|
+
if (throwTokens.includes(token)) throw new RangeError(_message);
|
|
12779
13587
|
}
|
|
12780
|
-
|
|
12781
|
-
var
|
|
12782
|
-
|
|
12783
|
-
"long": 'MMMM do, y',
|
|
12784
|
-
medium: 'MMM d, y',
|
|
12785
|
-
"short": 'MM/dd/yyyy'
|
|
12786
|
-
};
|
|
12787
|
-
var timeFormats$2 = {
|
|
12788
|
-
full: 'h:mm:ss a zzzz',
|
|
12789
|
-
"long": 'h:mm:ss a z',
|
|
12790
|
-
medium: 'h:mm:ss a',
|
|
12791
|
-
"short": 'h:mm a'
|
|
12792
|
-
};
|
|
12793
|
-
var dateTimeFormats$2 = {
|
|
12794
|
-
full: "{{date}} 'at' {{time}}",
|
|
12795
|
-
"long": "{{date}} 'at' {{time}}",
|
|
12796
|
-
medium: '{{date}}, {{time}}',
|
|
12797
|
-
"short": '{{date}}, {{time}}'
|
|
12798
|
-
};
|
|
12799
|
-
var formatLong$2 = {
|
|
12800
|
-
date: buildFormatLongFn({
|
|
12801
|
-
formats: dateFormats$2,
|
|
12802
|
-
defaultWidth: 'full'
|
|
12803
|
-
}),
|
|
12804
|
-
time: buildFormatLongFn({
|
|
12805
|
-
formats: timeFormats$2,
|
|
12806
|
-
defaultWidth: 'full'
|
|
12807
|
-
}),
|
|
12808
|
-
dateTime: buildFormatLongFn({
|
|
12809
|
-
formats: dateTimeFormats$2,
|
|
12810
|
-
defaultWidth: 'full'
|
|
12811
|
-
})
|
|
12812
|
-
};
|
|
12813
|
-
|
|
12814
|
-
var formatRelativeLocale = {
|
|
12815
|
-
lastWeek: "'last' eeee 'at' p",
|
|
12816
|
-
yesterday: "'yesterday at' p",
|
|
12817
|
-
today: "'today at' p",
|
|
12818
|
-
tomorrow: "'tomorrow at' p",
|
|
12819
|
-
nextWeek: "eeee 'at' p",
|
|
12820
|
-
other: 'P'
|
|
12821
|
-
};
|
|
12822
|
-
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
12823
|
-
return formatRelativeLocale[token];
|
|
12824
|
-
};
|
|
12825
|
-
|
|
12826
|
-
function buildLocalizeFn(args) {
|
|
12827
|
-
return function (dirtyIndex, options) {
|
|
12828
|
-
var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
|
|
12829
|
-
var valuesArray;
|
|
12830
|
-
if (context === 'formatting' && args.formattingValues) {
|
|
12831
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
12832
|
-
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
12833
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
12834
|
-
} else {
|
|
12835
|
-
var _defaultWidth = args.defaultWidth;
|
|
12836
|
-
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
12837
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
12838
|
-
}
|
|
12839
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
12840
|
-
// @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
12841
|
-
return valuesArray[index];
|
|
12842
|
-
};
|
|
13588
|
+
function message(token, format, input) {
|
|
13589
|
+
var subject = token[0] === "Y" ? "years" : "days of the month";
|
|
13590
|
+
return "Use `".concat(token.toLowerCase(), "` instead of `").concat(token, "` (in `").concat(format, "`) for formatting ").concat(subject, " to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md");
|
|
12843
13591
|
}
|
|
12844
13592
|
|
|
12845
|
-
|
|
12846
|
-
narrow: ['B', 'A'],
|
|
12847
|
-
abbreviated: ['BC', 'AD'],
|
|
12848
|
-
wide: ['Before Christ', 'Anno Domini']
|
|
12849
|
-
};
|
|
12850
|
-
var quarterValues = {
|
|
12851
|
-
narrow: ['1', '2', '3', '4'],
|
|
12852
|
-
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
12853
|
-
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
12854
|
-
};
|
|
12855
|
-
|
|
12856
|
-
// Note: in English, the names of days of the week and months are capitalized.
|
|
12857
|
-
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
12858
|
-
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
12859
|
-
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
12860
|
-
var monthValues = {
|
|
12861
|
-
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
12862
|
-
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
12863
|
-
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
12864
|
-
};
|
|
12865
|
-
var dayValues = {
|
|
12866
|
-
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
12867
|
-
"short": ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
12868
|
-
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
12869
|
-
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
12870
|
-
};
|
|
12871
|
-
var dayPeriodValues = {
|
|
12872
|
-
narrow: {
|
|
12873
|
-
am: 'a',
|
|
12874
|
-
pm: 'p',
|
|
12875
|
-
midnight: 'mi',
|
|
12876
|
-
noon: 'n',
|
|
12877
|
-
morning: 'morning',
|
|
12878
|
-
afternoon: 'afternoon',
|
|
12879
|
-
evening: 'evening',
|
|
12880
|
-
night: 'night'
|
|
12881
|
-
},
|
|
12882
|
-
abbreviated: {
|
|
12883
|
-
am: 'AM',
|
|
12884
|
-
pm: 'PM',
|
|
12885
|
-
midnight: 'midnight',
|
|
12886
|
-
noon: 'noon',
|
|
12887
|
-
morning: 'morning',
|
|
12888
|
-
afternoon: 'afternoon',
|
|
12889
|
-
evening: 'evening',
|
|
12890
|
-
night: 'night'
|
|
12891
|
-
},
|
|
12892
|
-
wide: {
|
|
12893
|
-
am: 'a.m.',
|
|
12894
|
-
pm: 'p.m.',
|
|
12895
|
-
midnight: 'midnight',
|
|
12896
|
-
noon: 'noon',
|
|
12897
|
-
morning: 'morning',
|
|
12898
|
-
afternoon: 'afternoon',
|
|
12899
|
-
evening: 'evening',
|
|
12900
|
-
night: 'night'
|
|
12901
|
-
}
|
|
12902
|
-
};
|
|
12903
|
-
var formattingDayPeriodValues = {
|
|
12904
|
-
narrow: {
|
|
12905
|
-
am: 'a',
|
|
12906
|
-
pm: 'p',
|
|
12907
|
-
midnight: 'mi',
|
|
12908
|
-
noon: 'n',
|
|
12909
|
-
morning: 'in the morning',
|
|
12910
|
-
afternoon: 'in the afternoon',
|
|
12911
|
-
evening: 'in the evening',
|
|
12912
|
-
night: 'at night'
|
|
12913
|
-
},
|
|
12914
|
-
abbreviated: {
|
|
12915
|
-
am: 'AM',
|
|
12916
|
-
pm: 'PM',
|
|
12917
|
-
midnight: 'midnight',
|
|
12918
|
-
noon: 'noon',
|
|
12919
|
-
morning: 'in the morning',
|
|
12920
|
-
afternoon: 'in the afternoon',
|
|
12921
|
-
evening: 'in the evening',
|
|
12922
|
-
night: 'at night'
|
|
12923
|
-
},
|
|
12924
|
-
wide: {
|
|
12925
|
-
am: 'a.m.',
|
|
12926
|
-
pm: 'p.m.',
|
|
12927
|
-
midnight: 'midnight',
|
|
12928
|
-
noon: 'noon',
|
|
12929
|
-
morning: 'in the morning',
|
|
12930
|
-
afternoon: 'in the afternoon',
|
|
12931
|
-
evening: 'in the evening',
|
|
12932
|
-
night: 'at night'
|
|
12933
|
-
}
|
|
12934
|
-
};
|
|
12935
|
-
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
12936
|
-
var number = Number(dirtyNumber);
|
|
12937
|
-
|
|
12938
|
-
// If ordinal numbers depend on context, for example,
|
|
12939
|
-
// if they are different for different grammatical genders,
|
|
12940
|
-
// use `options.unit`.
|
|
12941
|
-
//
|
|
12942
|
-
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
12943
|
-
// 'day', 'hour', 'minute', 'second'.
|
|
12944
|
-
|
|
12945
|
-
var rem100 = number % 100;
|
|
12946
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
12947
|
-
switch (rem100 % 10) {
|
|
12948
|
-
case 1:
|
|
12949
|
-
return number + 'st';
|
|
12950
|
-
case 2:
|
|
12951
|
-
return number + 'nd';
|
|
12952
|
-
case 3:
|
|
12953
|
-
return number + 'rd';
|
|
12954
|
-
}
|
|
12955
|
-
}
|
|
12956
|
-
return number + 'th';
|
|
12957
|
-
};
|
|
12958
|
-
var localize = {
|
|
12959
|
-
ordinalNumber: ordinalNumber,
|
|
12960
|
-
era: buildLocalizeFn({
|
|
12961
|
-
values: eraValues,
|
|
12962
|
-
defaultWidth: 'wide'
|
|
12963
|
-
}),
|
|
12964
|
-
quarter: buildLocalizeFn({
|
|
12965
|
-
values: quarterValues,
|
|
12966
|
-
defaultWidth: 'wide',
|
|
12967
|
-
argumentCallback: function argumentCallback(quarter) {
|
|
12968
|
-
return quarter - 1;
|
|
12969
|
-
}
|
|
12970
|
-
}),
|
|
12971
|
-
month: buildLocalizeFn({
|
|
12972
|
-
values: monthValues,
|
|
12973
|
-
defaultWidth: 'wide'
|
|
12974
|
-
}),
|
|
12975
|
-
day: buildLocalizeFn({
|
|
12976
|
-
values: dayValues,
|
|
12977
|
-
defaultWidth: 'wide'
|
|
12978
|
-
}),
|
|
12979
|
-
dayPeriod: buildLocalizeFn({
|
|
12980
|
-
values: dayPeriodValues,
|
|
12981
|
-
defaultWidth: 'wide',
|
|
12982
|
-
formattingValues: formattingDayPeriodValues,
|
|
12983
|
-
defaultFormattingWidth: 'wide'
|
|
12984
|
-
})
|
|
12985
|
-
};
|
|
12986
|
-
|
|
12987
|
-
function buildMatchFn(args) {
|
|
12988
|
-
return function (string) {
|
|
12989
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12990
|
-
var width = options.width;
|
|
12991
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
12992
|
-
var matchResult = string.match(matchPattern);
|
|
12993
|
-
if (!matchResult) {
|
|
12994
|
-
return null;
|
|
12995
|
-
}
|
|
12996
|
-
var matchedString = matchResult[0];
|
|
12997
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
12998
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
12999
|
-
return pattern.test(matchedString);
|
|
13000
|
-
}) : findKey(parsePatterns, function (pattern) {
|
|
13001
|
-
return pattern.test(matchedString);
|
|
13002
|
-
});
|
|
13003
|
-
var value;
|
|
13004
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
13005
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
13006
|
-
var rest = string.slice(matchedString.length);
|
|
13007
|
-
return {
|
|
13008
|
-
value: value,
|
|
13009
|
-
rest: rest
|
|
13010
|
-
};
|
|
13011
|
-
};
|
|
13012
|
-
}
|
|
13013
|
-
function findKey(object, predicate) {
|
|
13014
|
-
for (var key in object) {
|
|
13015
|
-
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
13016
|
-
return key;
|
|
13017
|
-
}
|
|
13018
|
-
}
|
|
13019
|
-
return undefined;
|
|
13020
|
-
}
|
|
13021
|
-
function findIndex(array, predicate) {
|
|
13022
|
-
for (var key = 0; key < array.length; key++) {
|
|
13023
|
-
if (predicate(array[key])) {
|
|
13024
|
-
return key;
|
|
13025
|
-
}
|
|
13026
|
-
}
|
|
13027
|
-
return undefined;
|
|
13028
|
-
}
|
|
13029
|
-
|
|
13030
|
-
function buildMatchPatternFn(args) {
|
|
13031
|
-
return function (string) {
|
|
13032
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13033
|
-
var matchResult = string.match(args.matchPattern);
|
|
13034
|
-
if (!matchResult) return null;
|
|
13035
|
-
var matchedString = matchResult[0];
|
|
13036
|
-
var parseResult = string.match(args.parsePattern);
|
|
13037
|
-
if (!parseResult) return null;
|
|
13038
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
13039
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
13040
|
-
var rest = string.slice(matchedString.length);
|
|
13041
|
-
return {
|
|
13042
|
-
value: value,
|
|
13043
|
-
rest: rest
|
|
13044
|
-
};
|
|
13045
|
-
};
|
|
13046
|
-
}
|
|
13047
|
-
|
|
13048
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
13049
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
13050
|
-
var matchEraPatterns = {
|
|
13051
|
-
narrow: /^(b|a)/i,
|
|
13052
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
13053
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
13054
|
-
};
|
|
13055
|
-
var parseEraPatterns = {
|
|
13056
|
-
any: [/^b/i, /^(a|c)/i]
|
|
13057
|
-
};
|
|
13058
|
-
var matchQuarterPatterns = {
|
|
13059
|
-
narrow: /^[1234]/i,
|
|
13060
|
-
abbreviated: /^q[1234]/i,
|
|
13061
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
13062
|
-
};
|
|
13063
|
-
var parseQuarterPatterns = {
|
|
13064
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
13065
|
-
};
|
|
13066
|
-
var matchMonthPatterns = {
|
|
13067
|
-
narrow: /^[jfmasond]/i,
|
|
13068
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
13069
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
13070
|
-
};
|
|
13071
|
-
var parseMonthPatterns = {
|
|
13072
|
-
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
13073
|
-
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
13074
|
-
};
|
|
13075
|
-
var matchDayPatterns = {
|
|
13076
|
-
narrow: /^[smtwf]/i,
|
|
13077
|
-
"short": /^(su|mo|tu|we|th|fr|sa)/i,
|
|
13078
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
13079
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
13080
|
-
};
|
|
13081
|
-
var parseDayPatterns = {
|
|
13082
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
13083
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
13084
|
-
};
|
|
13085
|
-
var matchDayPeriodPatterns = {
|
|
13086
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
13087
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
13088
|
-
};
|
|
13089
|
-
var parseDayPeriodPatterns = {
|
|
13090
|
-
any: {
|
|
13091
|
-
am: /^a/i,
|
|
13092
|
-
pm: /^p/i,
|
|
13093
|
-
midnight: /^mi/i,
|
|
13094
|
-
noon: /^no/i,
|
|
13095
|
-
morning: /morning/i,
|
|
13096
|
-
afternoon: /afternoon/i,
|
|
13097
|
-
evening: /evening/i,
|
|
13098
|
-
night: /night/i
|
|
13099
|
-
}
|
|
13100
|
-
};
|
|
13101
|
-
var match = {
|
|
13102
|
-
ordinalNumber: buildMatchPatternFn({
|
|
13103
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
13104
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
13105
|
-
valueCallback: function valueCallback(value) {
|
|
13106
|
-
return parseInt(value, 10);
|
|
13107
|
-
}
|
|
13108
|
-
}),
|
|
13109
|
-
era: buildMatchFn({
|
|
13110
|
-
matchPatterns: matchEraPatterns,
|
|
13111
|
-
defaultMatchWidth: 'wide',
|
|
13112
|
-
parsePatterns: parseEraPatterns,
|
|
13113
|
-
defaultParseWidth: 'any'
|
|
13114
|
-
}),
|
|
13115
|
-
quarter: buildMatchFn({
|
|
13116
|
-
matchPatterns: matchQuarterPatterns,
|
|
13117
|
-
defaultMatchWidth: 'wide',
|
|
13118
|
-
parsePatterns: parseQuarterPatterns,
|
|
13119
|
-
defaultParseWidth: 'any',
|
|
13120
|
-
valueCallback: function valueCallback(index) {
|
|
13121
|
-
return index + 1;
|
|
13122
|
-
}
|
|
13123
|
-
}),
|
|
13124
|
-
month: buildMatchFn({
|
|
13125
|
-
matchPatterns: matchMonthPatterns,
|
|
13126
|
-
defaultMatchWidth: 'wide',
|
|
13127
|
-
parsePatterns: parseMonthPatterns,
|
|
13128
|
-
defaultParseWidth: 'any'
|
|
13129
|
-
}),
|
|
13130
|
-
day: buildMatchFn({
|
|
13131
|
-
matchPatterns: matchDayPatterns,
|
|
13132
|
-
defaultMatchWidth: 'wide',
|
|
13133
|
-
parsePatterns: parseDayPatterns,
|
|
13134
|
-
defaultParseWidth: 'any'
|
|
13135
|
-
}),
|
|
13136
|
-
dayPeriod: buildMatchFn({
|
|
13137
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
13138
|
-
defaultMatchWidth: 'any',
|
|
13139
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
13140
|
-
defaultParseWidth: 'any'
|
|
13141
|
-
})
|
|
13142
|
-
};
|
|
13143
|
-
|
|
13144
|
-
/**
|
|
13145
|
-
* @type {Locale}
|
|
13146
|
-
* @category Locales
|
|
13147
|
-
* @summary English locale (United States).
|
|
13148
|
-
* @language English
|
|
13149
|
-
* @iso-639-2 eng
|
|
13150
|
-
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
13151
|
-
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
13152
|
-
*/
|
|
13153
|
-
var locale$5 = {
|
|
13154
|
-
code: 'en-US',
|
|
13155
|
-
formatDistance: formatDistance$1,
|
|
13156
|
-
formatLong: formatLong$2,
|
|
13157
|
-
formatRelative: formatRelative,
|
|
13158
|
-
localize: localize,
|
|
13159
|
-
match: match,
|
|
13160
|
-
options: {
|
|
13161
|
-
weekStartsOn: 0 /* Sunday */,
|
|
13162
|
-
firstWeekContainsDate: 1
|
|
13163
|
-
}
|
|
13164
|
-
};
|
|
13165
|
-
|
|
13593
|
+
// This RegExp consists of three parts separated by `|`:
|
|
13166
13594
|
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
13167
13595
|
// (one of the certain letters followed by `o`)
|
|
13168
13596
|
// - (\w)\1* matches any sequences of the same letter
|
|
@@ -13182,8 +13610,13 @@ var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
|
13182
13610
|
var doubleQuoteRegExp = /''/g;
|
|
13183
13611
|
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
13184
13612
|
|
|
13613
|
+
/**
|
|
13614
|
+
* The {@link format} function options.
|
|
13615
|
+
*/
|
|
13616
|
+
|
|
13185
13617
|
/**
|
|
13186
13618
|
* @name format
|
|
13619
|
+
* @alias formatDate
|
|
13187
13620
|
* @category Common Helpers
|
|
13188
13621
|
* @summary Format the date.
|
|
13189
13622
|
*
|
|
@@ -13410,8 +13843,8 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
13410
13843
|
*
|
|
13411
13844
|
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
|
|
13412
13845
|
* except local week-numbering years are dependent on `options.weekStartsOn`
|
|
13413
|
-
* and `options.firstWeekContainsDate` (compare [getISOWeekYear]
|
|
13414
|
-
* and [getWeekYear]
|
|
13846
|
+
* and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
|
|
13847
|
+
* and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
|
|
13415
13848
|
*
|
|
13416
13849
|
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
|
|
13417
13850
|
* so right now these tokens fall back to GMT timezones.
|
|
@@ -13432,28 +13865,20 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
13432
13865
|
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
|
|
13433
13866
|
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13434
13867
|
*
|
|
13435
|
-
* @param
|
|
13436
|
-
* @param
|
|
13437
|
-
* @param
|
|
13438
|
-
*
|
|
13439
|
-
* @
|
|
13440
|
-
*
|
|
13441
|
-
* @
|
|
13442
|
-
*
|
|
13443
|
-
* @
|
|
13444
|
-
*
|
|
13445
|
-
* @
|
|
13446
|
-
* @throws
|
|
13447
|
-
* @throws
|
|
13448
|
-
* @throws
|
|
13449
|
-
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
13450
|
-
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
13451
|
-
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
13452
|
-
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13453
|
-
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13454
|
-
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13455
|
-
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13456
|
-
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
13868
|
+
* @param date - The original date
|
|
13869
|
+
* @param format - The string of tokens
|
|
13870
|
+
* @param options - An object with options
|
|
13871
|
+
*
|
|
13872
|
+
* @returns The formatted date string
|
|
13873
|
+
*
|
|
13874
|
+
* @throws `date` must not be Invalid Date
|
|
13875
|
+
* @throws `options.locale` must contain `localize` property
|
|
13876
|
+
* @throws `options.locale` must contain `formatLong` property
|
|
13877
|
+
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13878
|
+
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13879
|
+
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13880
|
+
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13881
|
+
* @throws format string contains an unescaped latin alphabet character
|
|
13457
13882
|
*
|
|
13458
13883
|
* @example
|
|
13459
13884
|
* // Represent 11 February 2014 in middle-endian format:
|
|
@@ -13473,79 +13898,71 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
13473
13898
|
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
|
|
13474
13899
|
* //=> "3 o'clock"
|
|
13475
13900
|
*/
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
13479
|
-
requiredArgs(2, arguments);
|
|
13480
|
-
var formatStr = String(dirtyFormatStr);
|
|
13901
|
+
function format$2(date, formatStr, options) {
|
|
13902
|
+
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _defaultOptions$local, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _defaultOptions$local2;
|
|
13481
13903
|
var defaultOptions = getDefaultOptions();
|
|
13482
|
-
var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref :
|
|
13483
|
-
var firstWeekContainsDate =
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
13487
|
-
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
13488
|
-
}
|
|
13489
|
-
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
13490
|
-
|
|
13491
|
-
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
13492
|
-
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
13493
|
-
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
13494
|
-
}
|
|
13495
|
-
if (!locale.localize) {
|
|
13496
|
-
throw new RangeError('locale must contain localize property');
|
|
13497
|
-
}
|
|
13498
|
-
if (!locale.formatLong) {
|
|
13499
|
-
throw new RangeError('locale must contain formatLong property');
|
|
13500
|
-
}
|
|
13501
|
-
var originalDate = toDate(dirtyDate);
|
|
13904
|
+
var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : enUS;
|
|
13905
|
+
var firstWeekContainsDate = (_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 || (_options$locale2 = options.locale) === null || _options$locale2 === void 0 || (_options$locale2 = _options$locale2.options) === null || _options$locale2 === void 0 ? void 0 : _options$locale2.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 || (_defaultOptions$local = _defaultOptions$local.options) === null || _defaultOptions$local === void 0 ? void 0 : _defaultOptions$local.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1;
|
|
13906
|
+
var weekStartsOn = (_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale3 = options.locale) === null || _options$locale3 === void 0 || (_options$locale3 = _options$locale3.options) === null || _options$locale3 === void 0 ? void 0 : _options$locale3.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local2 = defaultOptions.locale) === null || _defaultOptions$local2 === void 0 || (_defaultOptions$local2 = _defaultOptions$local2.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0;
|
|
13907
|
+
var originalDate = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
13502
13908
|
if (!isValid(originalDate)) {
|
|
13503
|
-
throw new RangeError(
|
|
13909
|
+
throw new RangeError("Invalid time value");
|
|
13504
13910
|
}
|
|
13505
|
-
|
|
13506
|
-
// Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
13507
|
-
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
13508
|
-
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
13509
|
-
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
13510
|
-
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
13511
|
-
var formatterOptions = {
|
|
13512
|
-
firstWeekContainsDate: firstWeekContainsDate,
|
|
13513
|
-
weekStartsOn: weekStartsOn,
|
|
13514
|
-
locale: locale,
|
|
13515
|
-
_originalDate: originalDate
|
|
13516
|
-
};
|
|
13517
|
-
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
13911
|
+
var parts = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
13518
13912
|
var firstCharacter = substring[0];
|
|
13519
|
-
if (firstCharacter ===
|
|
13913
|
+
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
13520
13914
|
var longFormatter = longFormatters[firstCharacter];
|
|
13521
13915
|
return longFormatter(substring, locale.formatLong);
|
|
13522
13916
|
}
|
|
13523
13917
|
return substring;
|
|
13524
|
-
}).join(
|
|
13918
|
+
}).join("").match(formattingTokensRegExp).map(function (substring) {
|
|
13525
13919
|
// Replace two single quote characters with one single quote character
|
|
13526
13920
|
if (substring === "''") {
|
|
13527
|
-
return
|
|
13921
|
+
return {
|
|
13922
|
+
isToken: false,
|
|
13923
|
+
value: "'"
|
|
13924
|
+
};
|
|
13528
13925
|
}
|
|
13529
13926
|
var firstCharacter = substring[0];
|
|
13530
13927
|
if (firstCharacter === "'") {
|
|
13531
|
-
return
|
|
13928
|
+
return {
|
|
13929
|
+
isToken: false,
|
|
13930
|
+
value: cleanEscapedString(substring)
|
|
13931
|
+
};
|
|
13532
13932
|
}
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
}
|
|
13538
|
-
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
13539
|
-
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
13540
|
-
}
|
|
13541
|
-
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
13933
|
+
if (formatters[firstCharacter]) {
|
|
13934
|
+
return {
|
|
13935
|
+
isToken: true,
|
|
13936
|
+
value: substring
|
|
13937
|
+
};
|
|
13542
13938
|
}
|
|
13543
13939
|
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
13544
|
-
throw new RangeError(
|
|
13940
|
+
throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
|
|
13545
13941
|
}
|
|
13546
|
-
return
|
|
13547
|
-
|
|
13548
|
-
|
|
13942
|
+
return {
|
|
13943
|
+
isToken: false,
|
|
13944
|
+
value: substring
|
|
13945
|
+
};
|
|
13946
|
+
});
|
|
13947
|
+
|
|
13948
|
+
// invoke localize preprocessor (only for french locales at the moment)
|
|
13949
|
+
if (locale.localize.preprocessor) {
|
|
13950
|
+
parts = locale.localize.preprocessor(originalDate, parts);
|
|
13951
|
+
}
|
|
13952
|
+
var formatterOptions = {
|
|
13953
|
+
firstWeekContainsDate: firstWeekContainsDate,
|
|
13954
|
+
weekStartsOn: weekStartsOn,
|
|
13955
|
+
locale: locale
|
|
13956
|
+
};
|
|
13957
|
+
return parts.map(function (part) {
|
|
13958
|
+
if (!part.isToken) return part.value;
|
|
13959
|
+
var token = part.value;
|
|
13960
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token) || !(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
|
|
13961
|
+
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
13962
|
+
}
|
|
13963
|
+
var formatter = formatters[token[0]];
|
|
13964
|
+
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
13965
|
+
}).join("");
|
|
13549
13966
|
}
|
|
13550
13967
|
function cleanEscapedString(input) {
|
|
13551
13968
|
var matched = input.match(escapedStringRegExp);
|
|
@@ -13555,21 +13972,9 @@ function cleanEscapedString(input) {
|
|
|
13555
13972
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
13556
13973
|
}
|
|
13557
13974
|
|
|
13558
|
-
function convertToFP(fn, arity) {
|
|
13559
|
-
var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
13560
|
-
if (a.length >= arity) {
|
|
13561
|
-
return fn.apply(null, a.slice(0, arity).reverse());
|
|
13562
|
-
}
|
|
13563
|
-
return function () {
|
|
13564
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13565
|
-
args[_key] = arguments[_key];
|
|
13566
|
-
}
|
|
13567
|
-
return convertToFP(fn, arity, a.concat(args));
|
|
13568
|
-
};
|
|
13569
|
-
}
|
|
13570
|
-
|
|
13571
13975
|
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
|
13572
|
-
|
|
13976
|
+
|
|
13977
|
+
var format$1 = convertToFP(format$2, 2);
|
|
13573
13978
|
|
|
13574
13979
|
var Wrapper = index$c(reactNative.View)(function () {
|
|
13575
13980
|
return {
|
|
@@ -14063,7 +14468,7 @@ var CalendarRange = function CalendarRange(_ref) {
|
|
|
14063
14468
|
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
|
|
14064
14469
|
testID: testID
|
|
14065
14470
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
|
|
14066
|
-
value: !shouldShowMonthPicker ?
|
|
14471
|
+
value: !shouldShowMonthPicker ? format$1('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
14067
14472
|
testID: "calendar-month-picker",
|
|
14068
14473
|
onPress: function onPress() {
|
|
14069
14474
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
@@ -14079,7 +14484,7 @@ var CalendarRange = function CalendarRange(_ref) {
|
|
|
14079
14484
|
textAlign: 'center',
|
|
14080
14485
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
14081
14486
|
}
|
|
14082
|
-
},
|
|
14487
|
+
}, format$1('MMMM yyyy', visibleDate)), /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
14083
14488
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
14084
14489
|
size: "small"
|
|
14085
14490
|
}))),
|
|
@@ -14199,7 +14604,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
14199
14604
|
return /*#__PURE__*/React__namespace.default.createElement(StyledContainer$7, {
|
|
14200
14605
|
testID: testID
|
|
14201
14606
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__namespace.default.createElement(ContentNavigator, {
|
|
14202
|
-
value: !shouldShowMonthPicker ?
|
|
14607
|
+
value: !shouldShowMonthPicker ? format$1('MMMM yyyy', visibleDate) : /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
14203
14608
|
testID: "calendar-month-picker",
|
|
14204
14609
|
onPress: function onPress() {
|
|
14205
14610
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
@@ -14215,7 +14620,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
14215
14620
|
textAlign: 'center',
|
|
14216
14621
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
14217
14622
|
}
|
|
14218
|
-
},
|
|
14623
|
+
}, format$1('MMMM yyyy', visibleDate)), /*#__PURE__*/React__namespace.default.createElement(Icon, {
|
|
14219
14624
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
14220
14625
|
size: "small"
|
|
14221
14626
|
}))),
|
|
@@ -14740,7 +15145,7 @@ var StyledPageControlWrapper = index$c(reactNative.View)(function (_ref7) {
|
|
|
14740
15145
|
});
|
|
14741
15146
|
|
|
14742
15147
|
function isCarouselImageProps(image) {
|
|
14743
|
-
return _typeof
|
|
15148
|
+
return _typeof(image) === 'object';
|
|
14744
15149
|
}
|
|
14745
15150
|
var CarouselItem = function CarouselItem(_ref) {
|
|
14746
15151
|
var width = _ref.width,
|
|
@@ -15464,7 +15869,7 @@ function intern_delete(_ref3, value) {
|
|
|
15464
15869
|
return value;
|
|
15465
15870
|
}
|
|
15466
15871
|
function keyof(value) {
|
|
15467
|
-
return value !== null && _typeof
|
|
15872
|
+
return value !== null && _typeof(value) === "object" ? value.valueOf() : value;
|
|
15468
15873
|
}
|
|
15469
15874
|
|
|
15470
15875
|
var e10 = Math.sqrt(50),
|
|
@@ -15910,7 +16315,7 @@ function selection_data (value, key) {
|
|
|
15910
16315
|
// cause the data to change while iterating by using a key function, but please
|
|
15911
16316
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
15912
16317
|
function arraylike(data) {
|
|
15913
|
-
return _typeof
|
|
16318
|
+
return _typeof(data) === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
15914
16319
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
15915
16320
|
}
|
|
15916
16321
|
|
|
@@ -16924,8 +17329,8 @@ function object (a, b) {
|
|
|
16924
17329
|
var i = {},
|
|
16925
17330
|
c = {},
|
|
16926
17331
|
k;
|
|
16927
|
-
if (a === null || _typeof
|
|
16928
|
-
if (b === null || _typeof
|
|
17332
|
+
if (a === null || _typeof(a) !== "object") a = {};
|
|
17333
|
+
if (b === null || _typeof(b) !== "object") b = {};
|
|
16929
17334
|
for (k in b) {
|
|
16930
17335
|
if (k in a) {
|
|
16931
17336
|
i[k] = interpolate$1(a[k], b[k]);
|
|
@@ -17008,7 +17413,7 @@ function interpolateString (a, b) {
|
|
|
17008
17413
|
}
|
|
17009
17414
|
|
|
17010
17415
|
function interpolate$1 (a, b) {
|
|
17011
|
-
var t = _typeof
|
|
17416
|
+
var t = _typeof(b),
|
|
17012
17417
|
c;
|
|
17013
17418
|
return b == null || t === "boolean" ? constant$1(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color(b)) ? (b = c, interpolateRgb) : interpolateString : b instanceof color ? interpolateRgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b);
|
|
17014
17419
|
}
|
|
@@ -17148,8 +17553,8 @@ var frame = 0,
|
|
|
17148
17553
|
clockLast = 0,
|
|
17149
17554
|
clockNow = 0,
|
|
17150
17555
|
clockSkew = 0,
|
|
17151
|
-
clock = (typeof performance === "undefined" ? "undefined" : _typeof
|
|
17152
|
-
setFrame = (typeof window === "undefined" ? "undefined" : _typeof
|
|
17556
|
+
clock = (typeof performance === "undefined" ? "undefined" : _typeof(performance)) === "object" && performance.now ? performance : Date,
|
|
17557
|
+
setFrame = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
17153
17558
|
setTimeout(f, 17);
|
|
17154
17559
|
};
|
|
17155
17560
|
function now() {
|
|
@@ -18476,7 +18881,7 @@ function formatLocale (locale) {
|
|
|
18476
18881
|
};
|
|
18477
18882
|
}
|
|
18478
18883
|
|
|
18479
|
-
var locale$
|
|
18884
|
+
var locale$2;
|
|
18480
18885
|
var format;
|
|
18481
18886
|
var formatPrefix;
|
|
18482
18887
|
defaultLocale({
|
|
@@ -18485,10 +18890,10 @@ defaultLocale({
|
|
|
18485
18890
|
currency: ["$", ""]
|
|
18486
18891
|
});
|
|
18487
18892
|
function defaultLocale(definition) {
|
|
18488
|
-
locale$
|
|
18489
|
-
format = locale$
|
|
18490
|
-
formatPrefix = locale$
|
|
18491
|
-
return locale$
|
|
18893
|
+
locale$2 = formatLocale(definition);
|
|
18894
|
+
format = locale$2.format;
|
|
18895
|
+
formatPrefix = locale$2.formatPrefix;
|
|
18896
|
+
return locale$2;
|
|
18492
18897
|
}
|
|
18493
18898
|
|
|
18494
18899
|
function precisionFixed (step) {
|
|
@@ -18851,7 +19256,7 @@ function withPath(shape) {
|
|
|
18851
19256
|
}
|
|
18852
19257
|
|
|
18853
19258
|
function array (x) {
|
|
18854
|
-
return _typeof
|
|
19259
|
+
return _typeof(x) === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
|
|
18855
19260
|
: Array.from(x); // Map, Set, iterable, string, or anything else
|
|
18856
19261
|
}
|
|
18857
19262
|
|
|
@@ -18991,7 +19396,7 @@ Basis.prototype = {
|
|
|
18991
19396
|
this._y0 = this._y1, this._y1 = y;
|
|
18992
19397
|
}
|
|
18993
19398
|
};
|
|
18994
|
-
function
|
|
19399
|
+
function curveBasis (context) {
|
|
18995
19400
|
return new Basis(context);
|
|
18996
19401
|
}
|
|
18997
19402
|
|
|
@@ -19550,7 +19955,7 @@ var Line = function Line(_ref) {
|
|
|
19550
19955
|
return ((_xScale = xScale(labels[i])) !== null && _xScale !== void 0 ? _xScale : 0) + xScale.bandwidth() / 2;
|
|
19551
19956
|
}).y(function (d) {
|
|
19552
19957
|
return yScale(d !== null && d !== void 0 ? d : 0);
|
|
19553
|
-
}).curve(
|
|
19958
|
+
}).curve(curveBasis);
|
|
19554
19959
|
}, [xScale, yScale, labels]);
|
|
19555
19960
|
// Generate path data
|
|
19556
19961
|
var pathData = React.useMemo(function () {
|
|
@@ -20868,18 +21273,18 @@ var useCalculateDate = function useCalculateDate(_ref) {
|
|
|
20868
21273
|
}, [maxDate, minDate, value]);
|
|
20869
21274
|
};
|
|
20870
21275
|
|
|
20871
|
-
var locale$
|
|
21276
|
+
var locale$1 = {
|
|
20872
21277
|
lang: 'en-AU',
|
|
20873
21278
|
dateTimeFormats: {
|
|
20874
21279
|
fullDate: 'dd/MM/yyyy'
|
|
20875
21280
|
}
|
|
20876
21281
|
};
|
|
20877
21282
|
|
|
20878
|
-
var LocaleContext = /*#__PURE__*/React.createContext(locale$
|
|
21283
|
+
var LocaleContext = /*#__PURE__*/React.createContext(locale$1);
|
|
20879
21284
|
|
|
20880
21285
|
var useLocale = function useLocale() {
|
|
20881
21286
|
var context = React.useContext(LocaleContext);
|
|
20882
|
-
if (!context) return locale$
|
|
21287
|
+
if (!context) return locale$1;
|
|
20883
21288
|
return context;
|
|
20884
21289
|
};
|
|
20885
21290
|
var useDateTimeFormat = function useDateTimeFormat() {
|
|
@@ -20893,7 +21298,7 @@ var useDateTimeFormat = function useDateTimeFormat() {
|
|
|
20893
21298
|
};
|
|
20894
21299
|
};
|
|
20895
21300
|
|
|
20896
|
-
var locale
|
|
21301
|
+
var locale = {
|
|
20897
21302
|
lang: 'en-CA',
|
|
20898
21303
|
dateTimeFormats: {
|
|
20899
21304
|
fullDate: 'MMM dd, yyyy'
|
|
@@ -20901,8 +21306,8 @@ var locale$2 = {
|
|
|
20901
21306
|
};
|
|
20902
21307
|
|
|
20903
21308
|
var locales = {
|
|
20904
|
-
'en-AU': locale$
|
|
20905
|
-
'en-CA': locale
|
|
21309
|
+
'en-AU': locale$1,
|
|
21310
|
+
'en-CA': locale
|
|
20906
21311
|
};
|
|
20907
21312
|
|
|
20908
21313
|
// Function to get the date format based on the displayFormat and locale,
|
|
@@ -20937,7 +21342,7 @@ var useFormatDate = function useFormatDate(_ref) {
|
|
|
20937
21342
|
locale: locale,
|
|
20938
21343
|
localizeDateTime: localizeDateTime
|
|
20939
21344
|
});
|
|
20940
|
-
var displayValue = value ?
|
|
21345
|
+
var displayValue = value ? format$1(format, value) : '';
|
|
20941
21346
|
return {
|
|
20942
21347
|
displayValue: displayValue,
|
|
20943
21348
|
format: format
|
|
@@ -24455,11 +24860,7 @@ var Toast = {
|
|
|
24455
24860
|
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
|
|
24456
24861
|
* arguments for all functions.
|
|
24457
24862
|
*
|
|
24458
|
-
* @param
|
|
24459
|
-
* @param {Locale} [newOptions.locale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
|
24460
|
-
* @param {0|1|2|3|4|5|6} [newOptions.weekStartsOn] - the index of the first day of the week (0 - Sunday)
|
|
24461
|
-
* @param {1|2|3|4|5|6|7} [newOptions.firstWeekContainsDate] - the day of January, which is always in the first week of the year
|
|
24462
|
-
* @throws {TypeError} 1 argument required
|
|
24863
|
+
* @param options - An object with options
|
|
24463
24864
|
*
|
|
24464
24865
|
* @example
|
|
24465
24866
|
* // Set global locale:
|
|
@@ -24493,21 +24894,23 @@ var Toast = {
|
|
|
24493
24894
|
* const result = startOfWeek(new Date(2014, 8, 2))
|
|
24494
24895
|
* //=> Sun Aug 31 2014 00:00:00
|
|
24495
24896
|
*/
|
|
24496
|
-
function setDefaultOptions(
|
|
24497
|
-
requiredArgs(1, arguments);
|
|
24897
|
+
function setDefaultOptions(options) {
|
|
24498
24898
|
var result = {};
|
|
24499
24899
|
var defaultOptions = getDefaultOptions();
|
|
24500
24900
|
for (var property in defaultOptions) {
|
|
24501
24901
|
if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {
|
|
24902
|
+
// [TODO] I challenge you to fix the type
|
|
24502
24903
|
result[property] = defaultOptions[property];
|
|
24503
24904
|
}
|
|
24504
24905
|
}
|
|
24505
|
-
for (var _property in
|
|
24506
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
24507
|
-
if (
|
|
24906
|
+
for (var _property in options) {
|
|
24907
|
+
if (Object.prototype.hasOwnProperty.call(options, _property)) {
|
|
24908
|
+
if (options[_property] === undefined) {
|
|
24909
|
+
// [TODO] I challenge you to fix the type
|
|
24508
24910
|
delete result[_property];
|
|
24509
24911
|
} else {
|
|
24510
|
-
|
|
24912
|
+
// [TODO] I challenge you to fix the type
|
|
24913
|
+
result[_property] = options[_property];
|
|
24511
24914
|
}
|
|
24512
24915
|
}
|
|
24513
24916
|
}
|
|
@@ -24515,48 +24918,47 @@ function setDefaultOptions(newOptions) {
|
|
|
24515
24918
|
}
|
|
24516
24919
|
|
|
24517
24920
|
var dateFormats$1 = {
|
|
24518
|
-
full:
|
|
24519
|
-
"long":
|
|
24520
|
-
medium:
|
|
24521
|
-
"short":
|
|
24921
|
+
full: "EEEE, d MMMM yyyy",
|
|
24922
|
+
"long": "d MMMM yyyy",
|
|
24923
|
+
medium: "d MMM yyyy",
|
|
24924
|
+
"short": "dd/MM/yyyy"
|
|
24522
24925
|
};
|
|
24523
24926
|
var timeFormats$1 = {
|
|
24524
|
-
full:
|
|
24525
|
-
"long":
|
|
24526
|
-
medium:
|
|
24527
|
-
"short":
|
|
24927
|
+
full: "h:mm:ss a zzzz",
|
|
24928
|
+
"long": "h:mm:ss a z",
|
|
24929
|
+
medium: "h:mm:ss a",
|
|
24930
|
+
"short": "h:mm a"
|
|
24528
24931
|
};
|
|
24529
24932
|
var dateTimeFormats$1 = {
|
|
24530
24933
|
full: "{{date}} 'at' {{time}}",
|
|
24531
24934
|
"long": "{{date}} 'at' {{time}}",
|
|
24532
|
-
medium:
|
|
24533
|
-
"short":
|
|
24935
|
+
medium: "{{date}}, {{time}}",
|
|
24936
|
+
"short": "{{date}}, {{time}}"
|
|
24534
24937
|
};
|
|
24535
24938
|
var formatLong$1 = {
|
|
24536
24939
|
date: buildFormatLongFn({
|
|
24537
24940
|
formats: dateFormats$1,
|
|
24538
|
-
defaultWidth:
|
|
24941
|
+
defaultWidth: "full"
|
|
24539
24942
|
}),
|
|
24540
24943
|
time: buildFormatLongFn({
|
|
24541
24944
|
formats: timeFormats$1,
|
|
24542
|
-
defaultWidth:
|
|
24945
|
+
defaultWidth: "full"
|
|
24543
24946
|
}),
|
|
24544
24947
|
dateTime: buildFormatLongFn({
|
|
24545
24948
|
formats: dateTimeFormats$1,
|
|
24546
|
-
defaultWidth:
|
|
24949
|
+
defaultWidth: "full"
|
|
24547
24950
|
})
|
|
24548
24951
|
};
|
|
24549
24952
|
|
|
24550
24953
|
/**
|
|
24551
|
-
* @type {Locale}
|
|
24552
24954
|
* @category Locales
|
|
24553
24955
|
* @summary English locale (Australia).
|
|
24554
24956
|
* @language English
|
|
24555
24957
|
* @iso-639-2 eng
|
|
24556
|
-
* @author Julien Malige [@JulienMalige]
|
|
24958
|
+
* @author Julien Malige [@JulienMalige](https://github.com/JulienMalige)
|
|
24557
24959
|
*/
|
|
24558
|
-
var
|
|
24559
|
-
code:
|
|
24960
|
+
var enAU = {
|
|
24961
|
+
code: "en-AU",
|
|
24560
24962
|
formatDistance: formatDistance$1,
|
|
24561
24963
|
formatLong: formatLong$1,
|
|
24562
24964
|
formatRelative: formatRelative,
|
|
@@ -24570,131 +24972,130 @@ var locale$1 = {
|
|
|
24570
24972
|
|
|
24571
24973
|
var formatDistanceLocale = {
|
|
24572
24974
|
lessThanXSeconds: {
|
|
24573
|
-
one:
|
|
24574
|
-
other:
|
|
24975
|
+
one: "less than a second",
|
|
24976
|
+
other: "less than {{count}} seconds"
|
|
24575
24977
|
},
|
|
24576
24978
|
xSeconds: {
|
|
24577
|
-
one:
|
|
24578
|
-
other:
|
|
24979
|
+
one: "a second",
|
|
24980
|
+
other: "{{count}} seconds"
|
|
24579
24981
|
},
|
|
24580
|
-
halfAMinute:
|
|
24982
|
+
halfAMinute: "half a minute",
|
|
24581
24983
|
lessThanXMinutes: {
|
|
24582
|
-
one:
|
|
24583
|
-
other:
|
|
24984
|
+
one: "less than a minute",
|
|
24985
|
+
other: "less than {{count}} minutes"
|
|
24584
24986
|
},
|
|
24585
24987
|
xMinutes: {
|
|
24586
|
-
one:
|
|
24587
|
-
other:
|
|
24988
|
+
one: "a minute",
|
|
24989
|
+
other: "{{count}} minutes"
|
|
24588
24990
|
},
|
|
24589
24991
|
aboutXHours: {
|
|
24590
|
-
one:
|
|
24591
|
-
other:
|
|
24992
|
+
one: "about an hour",
|
|
24993
|
+
other: "about {{count}} hours"
|
|
24592
24994
|
},
|
|
24593
24995
|
xHours: {
|
|
24594
|
-
one:
|
|
24595
|
-
other:
|
|
24996
|
+
one: "an hour",
|
|
24997
|
+
other: "{{count}} hours"
|
|
24596
24998
|
},
|
|
24597
24999
|
xDays: {
|
|
24598
|
-
one:
|
|
24599
|
-
other:
|
|
25000
|
+
one: "a day",
|
|
25001
|
+
other: "{{count}} days"
|
|
24600
25002
|
},
|
|
24601
25003
|
aboutXWeeks: {
|
|
24602
|
-
one:
|
|
24603
|
-
other:
|
|
25004
|
+
one: "about a week",
|
|
25005
|
+
other: "about {{count}} weeks"
|
|
24604
25006
|
},
|
|
24605
25007
|
xWeeks: {
|
|
24606
|
-
one:
|
|
24607
|
-
other:
|
|
25008
|
+
one: "a week",
|
|
25009
|
+
other: "{{count}} weeks"
|
|
24608
25010
|
},
|
|
24609
25011
|
aboutXMonths: {
|
|
24610
|
-
one:
|
|
24611
|
-
other:
|
|
25012
|
+
one: "about a month",
|
|
25013
|
+
other: "about {{count}} months"
|
|
24612
25014
|
},
|
|
24613
25015
|
xMonths: {
|
|
24614
|
-
one:
|
|
24615
|
-
other:
|
|
25016
|
+
one: "a month",
|
|
25017
|
+
other: "{{count}} months"
|
|
24616
25018
|
},
|
|
24617
25019
|
aboutXYears: {
|
|
24618
|
-
one:
|
|
24619
|
-
other:
|
|
25020
|
+
one: "about a year",
|
|
25021
|
+
other: "about {{count}} years"
|
|
24620
25022
|
},
|
|
24621
25023
|
xYears: {
|
|
24622
|
-
one:
|
|
24623
|
-
other:
|
|
25024
|
+
one: "a year",
|
|
25025
|
+
other: "{{count}} years"
|
|
24624
25026
|
},
|
|
24625
25027
|
overXYears: {
|
|
24626
|
-
one:
|
|
24627
|
-
other:
|
|
25028
|
+
one: "over a year",
|
|
25029
|
+
other: "over {{count}} years"
|
|
24628
25030
|
},
|
|
24629
25031
|
almostXYears: {
|
|
24630
|
-
one:
|
|
24631
|
-
other:
|
|
25032
|
+
one: "almost a year",
|
|
25033
|
+
other: "almost {{count}} years"
|
|
24632
25034
|
}
|
|
24633
25035
|
};
|
|
24634
25036
|
var formatDistance = function formatDistance(token, count, options) {
|
|
24635
25037
|
var result;
|
|
24636
25038
|
var tokenValue = formatDistanceLocale[token];
|
|
24637
|
-
if (typeof tokenValue ===
|
|
25039
|
+
if (typeof tokenValue === "string") {
|
|
24638
25040
|
result = tokenValue;
|
|
24639
25041
|
} else if (count === 1) {
|
|
24640
25042
|
result = tokenValue.one;
|
|
24641
25043
|
} else {
|
|
24642
|
-
result = tokenValue.other.replace(
|
|
25044
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
24643
25045
|
}
|
|
24644
25046
|
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
24645
25047
|
if (options.comparison && options.comparison > 0) {
|
|
24646
|
-
return
|
|
25048
|
+
return "in " + result;
|
|
24647
25049
|
} else {
|
|
24648
|
-
return result +
|
|
25050
|
+
return result + " ago";
|
|
24649
25051
|
}
|
|
24650
25052
|
}
|
|
24651
25053
|
return result;
|
|
24652
25054
|
};
|
|
24653
25055
|
|
|
24654
25056
|
var dateFormats = {
|
|
24655
|
-
full:
|
|
24656
|
-
"long":
|
|
24657
|
-
medium:
|
|
24658
|
-
"short":
|
|
25057
|
+
full: "EEEE, MMMM do, yyyy",
|
|
25058
|
+
"long": "MMMM do, yyyy",
|
|
25059
|
+
medium: "MMM d, yyyy",
|
|
25060
|
+
"short": "yyyy-MM-dd"
|
|
24659
25061
|
};
|
|
24660
25062
|
var timeFormats = {
|
|
24661
|
-
full:
|
|
24662
|
-
"long":
|
|
24663
|
-
medium:
|
|
24664
|
-
"short":
|
|
25063
|
+
full: "h:mm:ss a zzzz",
|
|
25064
|
+
"long": "h:mm:ss a z",
|
|
25065
|
+
medium: "h:mm:ss a",
|
|
25066
|
+
"short": "h:mm a"
|
|
24665
25067
|
};
|
|
24666
25068
|
var dateTimeFormats = {
|
|
24667
25069
|
full: "{{date}} 'at' {{time}}",
|
|
24668
25070
|
"long": "{{date}} 'at' {{time}}",
|
|
24669
|
-
medium:
|
|
24670
|
-
"short":
|
|
25071
|
+
medium: "{{date}}, {{time}}",
|
|
25072
|
+
"short": "{{date}}, {{time}}"
|
|
24671
25073
|
};
|
|
24672
25074
|
var formatLong = {
|
|
24673
25075
|
date: buildFormatLongFn({
|
|
24674
25076
|
formats: dateFormats,
|
|
24675
|
-
defaultWidth:
|
|
25077
|
+
defaultWidth: "full"
|
|
24676
25078
|
}),
|
|
24677
25079
|
time: buildFormatLongFn({
|
|
24678
25080
|
formats: timeFormats,
|
|
24679
|
-
defaultWidth:
|
|
25081
|
+
defaultWidth: "full"
|
|
24680
25082
|
}),
|
|
24681
25083
|
dateTime: buildFormatLongFn({
|
|
24682
25084
|
formats: dateTimeFormats,
|
|
24683
|
-
defaultWidth:
|
|
25085
|
+
defaultWidth: "full"
|
|
24684
25086
|
})
|
|
24685
25087
|
};
|
|
24686
25088
|
|
|
24687
25089
|
/**
|
|
24688
|
-
* @type {Locale}
|
|
24689
25090
|
* @category Locales
|
|
24690
25091
|
* @summary English locale (Canada).
|
|
24691
25092
|
* @language English
|
|
24692
25093
|
* @iso-639-2 eng
|
|
24693
|
-
* @author Mark Owsiak [@markowsiak]
|
|
24694
|
-
* @author Marco Imperatore [@mimperatore]
|
|
25094
|
+
* @author Mark Owsiak [@markowsiak](https://github.com/markowsiak)
|
|
25095
|
+
* @author Marco Imperatore [@mimperatore](https://github.com/mimperatore)
|
|
24695
25096
|
*/
|
|
24696
|
-
var
|
|
24697
|
-
code:
|
|
25097
|
+
var enCA = {
|
|
25098
|
+
code: "en-CA",
|
|
24698
25099
|
formatDistance: formatDistance,
|
|
24699
25100
|
formatLong: formatLong,
|
|
24700
25101
|
formatRelative: formatRelative,
|
|
@@ -24707,8 +25108,8 @@ var locale = {
|
|
|
24707
25108
|
};
|
|
24708
25109
|
|
|
24709
25110
|
var Locales = {
|
|
24710
|
-
'en-AU':
|
|
24711
|
-
'en-CA':
|
|
25111
|
+
'en-AU': enAU,
|
|
25112
|
+
'en-CA': enCA
|
|
24712
25113
|
};
|
|
24713
25114
|
function getDateFnsLocale(locale) {
|
|
24714
25115
|
var fallbackLocale = Locales['en-AU'];
|
|
@@ -24738,7 +25139,7 @@ var LocaleProvider = function LocaleProvider(props) {
|
|
|
24738
25139
|
var HeroDesignProvider = function HeroDesignProvider(_ref) {
|
|
24739
25140
|
var theme = _ref.theme,
|
|
24740
25141
|
_ref$locale = _ref.locale,
|
|
24741
|
-
locale = _ref$locale === void 0 ? locale$
|
|
25142
|
+
locale = _ref$locale === void 0 ? locale$1 : _ref$locale,
|
|
24742
25143
|
children = _ref.children;
|
|
24743
25144
|
return /*#__PURE__*/React__namespace.default.createElement(LocaleProvider, {
|
|
24744
25145
|
locale: locale
|
|
@@ -26179,7 +26580,7 @@ var isOptionSelected = function isOptionSelected(value, option) {
|
|
|
26179
26580
|
if (!value || !option || option.value === null || option.value === undefined) {
|
|
26180
26581
|
return false;
|
|
26181
26582
|
}
|
|
26182
|
-
if (_typeof
|
|
26583
|
+
if (_typeof(option.value) !== 'object') {
|
|
26183
26584
|
return value.includes(option.value);
|
|
26184
26585
|
}
|
|
26185
26586
|
return value.some(function (v) {
|
|
@@ -27912,7 +28313,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
27912
28313
|
open = _useState2[0],
|
|
27913
28314
|
setOpen = _useState2[1];
|
|
27914
28315
|
var is12Hour = displayFormat.includes('hh');
|
|
27915
|
-
var displayValue = value ?
|
|
28316
|
+
var displayValue = value ? format$1(displayFormat, value) : '';
|
|
27916
28317
|
var pickerInitValue = value || new Date();
|
|
27917
28318
|
var InputComponent = TextInputComponent || TextInput;
|
|
27918
28319
|
var onPress = React.useCallback(function () {
|
|
@@ -27985,7 +28386,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
27985
28386
|
open = _useState4[0],
|
|
27986
28387
|
setOpen = _useState4[1];
|
|
27987
28388
|
var is12Hour = displayFormat.includes('hh');
|
|
27988
|
-
var displayValue = value ?
|
|
28389
|
+
var displayValue = value ? format$1(displayFormat, value) : '';
|
|
27989
28390
|
var theme = useTheme();
|
|
27990
28391
|
// Determine locale based on time format preference
|
|
27991
28392
|
// For 12-hour format: use en-US locale to ensure 12-hour display regardless of device settings
|
|
@@ -28757,7 +29158,7 @@ function requireScheduler_production_min() {
|
|
|
28757
29158
|
var c = a.sortIndex - b.sortIndex;
|
|
28758
29159
|
return 0 !== c ? c : a.id - b.id;
|
|
28759
29160
|
}
|
|
28760
|
-
if ("object" === (typeof performance === "undefined" ? "undefined" : _typeof
|
|
29161
|
+
if ("object" === (typeof performance === "undefined" ? "undefined" : _typeof(performance)) && "function" === typeof performance.now) {
|
|
28761
29162
|
var l = performance;
|
|
28762
29163
|
exports.unstable_now = function () {
|
|
28763
29164
|
return l.now();
|
|
@@ -28928,7 +29329,7 @@ function requireScheduler_production_min() {
|
|
|
28928
29329
|
};
|
|
28929
29330
|
exports.unstable_scheduleCallback = function (a, b, c) {
|
|
28930
29331
|
var d = exports.unstable_now();
|
|
28931
|
-
"object" === _typeof
|
|
29332
|
+
"object" === _typeof(c) && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
|
|
28932
29333
|
switch (a) {
|
|
28933
29334
|
case 1:
|
|
28934
29335
|
var e = -1;
|
|
@@ -29018,7 +29419,7 @@ function requireReactDom_production_min() {
|
|
|
29018
29419
|
}
|
|
29019
29420
|
function pa(a, b, c, d) {
|
|
29020
29421
|
if (null !== c && 0 === c.type) return !1;
|
|
29021
|
-
switch (_typeof
|
|
29422
|
+
switch (_typeof(b)) {
|
|
29022
29423
|
case "function":
|
|
29023
29424
|
case "symbol":
|
|
29024
29425
|
return !0;
|
|
@@ -29128,7 +29529,7 @@ function requireReactDom_production_min() {
|
|
|
29128
29529
|
var Ia = Symbol["for"]("react.offscreen");
|
|
29129
29530
|
var Ja = Symbol.iterator;
|
|
29130
29531
|
function Ka(a) {
|
|
29131
|
-
if (null === a || "object" !== _typeof
|
|
29532
|
+
if (null === a || "object" !== _typeof(a)) return null;
|
|
29132
29533
|
a = Ja && a[Ja] || a["@@iterator"];
|
|
29133
29534
|
return "function" === typeof a ? a : null;
|
|
29134
29535
|
}
|
|
@@ -29157,7 +29558,7 @@ function requireReactDom_production_min() {
|
|
|
29157
29558
|
set: function set() {
|
|
29158
29559
|
throw Error();
|
|
29159
29560
|
}
|
|
29160
|
-
}), "object" === (typeof Reflect === "undefined" ? "undefined" : _typeof
|
|
29561
|
+
}), "object" === (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && Reflect.construct) {
|
|
29161
29562
|
try {
|
|
29162
29563
|
Reflect.construct(b, []);
|
|
29163
29564
|
} catch (l) {
|
|
@@ -29239,7 +29640,7 @@ function requireReactDom_production_min() {
|
|
|
29239
29640
|
case Fa:
|
|
29240
29641
|
return "SuspenseList";
|
|
29241
29642
|
}
|
|
29242
|
-
if ("object" === _typeof
|
|
29643
|
+
if ("object" === _typeof(a)) switch (a.$$typeof) {
|
|
29243
29644
|
case Ca:
|
|
29244
29645
|
return (a.displayName || "Context") + ".Consumer";
|
|
29245
29646
|
case Ba:
|
|
@@ -29311,7 +29712,7 @@ function requireReactDom_production_min() {
|
|
|
29311
29712
|
return null;
|
|
29312
29713
|
}
|
|
29313
29714
|
function Sa(a) {
|
|
29314
|
-
switch (_typeof
|
|
29715
|
+
switch (_typeof(a)) {
|
|
29315
29716
|
case "boolean":
|
|
29316
29717
|
case "number":
|
|
29317
29718
|
case "string":
|
|
@@ -29622,9 +30023,9 @@ function requireReactDom_production_min() {
|
|
|
29622
30023
|
if (tb[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(p(137, a));
|
|
29623
30024
|
if (null != b.dangerouslySetInnerHTML) {
|
|
29624
30025
|
if (null != b.children) throw Error(p(60));
|
|
29625
|
-
if ("object" !== _typeof
|
|
30026
|
+
if ("object" !== _typeof(b.dangerouslySetInnerHTML) || !("__html" in b.dangerouslySetInnerHTML)) throw Error(p(61));
|
|
29626
30027
|
}
|
|
29627
|
-
if (null != b.style && "object" !== _typeof
|
|
30028
|
+
if (null != b.style && "object" !== _typeof(b.style)) throw Error(p(62));
|
|
29628
30029
|
}
|
|
29629
30030
|
}
|
|
29630
30031
|
function vb(a, b) {
|
|
@@ -29710,7 +30111,7 @@ function requireReactDom_production_min() {
|
|
|
29710
30111
|
a = !1;
|
|
29711
30112
|
}
|
|
29712
30113
|
if (a) return null;
|
|
29713
|
-
if (c && "function" !== typeof c) throw Error(p(231, b, _typeof
|
|
30114
|
+
if (c && "function" !== typeof c) throw Error(p(231, b, _typeof(c)));
|
|
29714
30115
|
return c;
|
|
29715
30116
|
}
|
|
29716
30117
|
var Lb = !1;
|
|
@@ -30624,7 +31025,7 @@ function requireReactDom_production_min() {
|
|
|
30624
31025
|
}
|
|
30625
31026
|
function he(a) {
|
|
30626
31027
|
a = a.detail;
|
|
30627
|
-
return "object" === _typeof
|
|
31028
|
+
return "object" === _typeof(a) && "data" in a ? a.data : null;
|
|
30628
31029
|
}
|
|
30629
31030
|
var ie = !1;
|
|
30630
31031
|
function je(a, b) {
|
|
@@ -30741,7 +31142,7 @@ function requireReactDom_production_min() {
|
|
|
30741
31142
|
var He = "function" === typeof Object.is ? Object.is : Ge;
|
|
30742
31143
|
function Ie(a, b) {
|
|
30743
31144
|
if (He(a, b)) return !0;
|
|
30744
|
-
if ("object" !== _typeof
|
|
31145
|
+
if ("object" !== _typeof(a) || null === a || "object" !== _typeof(b) || null === b) return !1;
|
|
30745
31146
|
var c = Object.keys(a),
|
|
30746
31147
|
d = Object.keys(b);
|
|
30747
31148
|
if (c.length !== d.length) return !1;
|
|
@@ -31268,7 +31669,7 @@ function requireReactDom_production_min() {
|
|
|
31268
31669
|
var Cf = null,
|
|
31269
31670
|
Df = null;
|
|
31270
31671
|
function Ef(a, b) {
|
|
31271
|
-
return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === _typeof
|
|
31672
|
+
return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === _typeof(b.dangerouslySetInnerHTML) && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;
|
|
31272
31673
|
}
|
|
31273
31674
|
var Ff = "function" === typeof setTimeout ? setTimeout : void 0,
|
|
31274
31675
|
Gf = "function" === typeof clearTimeout ? clearTimeout : void 0,
|
|
@@ -31916,7 +32317,7 @@ function requireReactDom_production_min() {
|
|
|
31916
32317
|
var d = !1,
|
|
31917
32318
|
e = Vf;
|
|
31918
32319
|
var f = b.contextType;
|
|
31919
|
-
"object" === _typeof
|
|
32320
|
+
"object" === _typeof(f) && null !== f ? f = Vg(f) : (e = Zf(b) ? Xf : H.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Yf(a, e) : Vf);
|
|
31920
32321
|
b = new b(c, f);
|
|
31921
32322
|
a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;
|
|
31922
32323
|
b.updater = nh;
|
|
@@ -31938,7 +32339,7 @@ function requireReactDom_production_min() {
|
|
|
31938
32339
|
e.refs = jh;
|
|
31939
32340
|
ah(a);
|
|
31940
32341
|
var f = b.contextType;
|
|
31941
|
-
"object" === _typeof
|
|
32342
|
+
"object" === _typeof(f) && null !== f ? e.context = Vg(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f));
|
|
31942
32343
|
e.state = a.memoizedState;
|
|
31943
32344
|
f = b.getDerivedStateFromProps;
|
|
31944
32345
|
"function" === typeof f && (kh(a, b, f, c), e.state = a.memoizedState);
|
|
@@ -31947,7 +32348,7 @@ function requireReactDom_production_min() {
|
|
|
31947
32348
|
}
|
|
31948
32349
|
function sh(a, b, c) {
|
|
31949
32350
|
a = c.ref;
|
|
31950
|
-
if (null !== a && "function" !== typeof a && "object" !== _typeof
|
|
32351
|
+
if (null !== a && "function" !== typeof a && "object" !== _typeof(a)) {
|
|
31951
32352
|
if (c._owner) {
|
|
31952
32353
|
c = c._owner;
|
|
31953
32354
|
if (c) {
|
|
@@ -32022,7 +32423,7 @@ function requireReactDom_production_min() {
|
|
|
32022
32423
|
function k(a, b, c, d) {
|
|
32023
32424
|
var f = c.type;
|
|
32024
32425
|
if (f === ya) return m(a, b, c.props.children, d, c.key);
|
|
32025
|
-
if (null !== b && (b.elementType === f || "object" === _typeof
|
|
32426
|
+
if (null !== b && (b.elementType === f || "object" === _typeof(f) && null !== f && f.$$typeof === Ha && uh(f) === b.type)) return d = e(b, c.props), d.ref = sh(a, b, c), d["return"] = a, d;
|
|
32026
32427
|
d = yh(c.type, c.key, c.props, null, a.mode, d);
|
|
32027
32428
|
d.ref = sh(a, b, c);
|
|
32028
32429
|
d["return"] = a;
|
|
@@ -32042,7 +32443,7 @@ function requireReactDom_production_min() {
|
|
|
32042
32443
|
}
|
|
32043
32444
|
function q(a, b, c) {
|
|
32044
32445
|
if ("string" === typeof b && "" !== b || "number" === typeof b) return b = xh("" + b, a.mode, c), b["return"] = a, b;
|
|
32045
|
-
if ("object" === _typeof
|
|
32446
|
+
if ("object" === _typeof(b) && null !== b) {
|
|
32046
32447
|
switch (b.$$typeof) {
|
|
32047
32448
|
case va:
|
|
32048
32449
|
return c = yh(b.type, b.key, b.props, null, a.mode, c), c.ref = sh(a, null, b), c["return"] = a, c;
|
|
@@ -32060,7 +32461,7 @@ function requireReactDom_production_min() {
|
|
|
32060
32461
|
function r(a, b, c, d) {
|
|
32061
32462
|
var e = null !== b ? b.key : null;
|
|
32062
32463
|
if ("string" === typeof c && "" !== c || "number" === typeof c) return null !== e ? null : h(a, b, "" + c, d);
|
|
32063
|
-
if ("object" === _typeof
|
|
32464
|
+
if ("object" === _typeof(c) && null !== c) {
|
|
32064
32465
|
switch (c.$$typeof) {
|
|
32065
32466
|
case va:
|
|
32066
32467
|
return c.key === e ? k(a, b, c, d) : null;
|
|
@@ -32076,7 +32477,7 @@ function requireReactDom_production_min() {
|
|
|
32076
32477
|
}
|
|
32077
32478
|
function y(a, b, c, d, e) {
|
|
32078
32479
|
if ("string" === typeof d && "" !== d || "number" === typeof d) return a = a.get(c) || null, h(b, a, "" + d, e);
|
|
32079
|
-
if ("object" === _typeof
|
|
32480
|
+
if ("object" === _typeof(d) && null !== d) {
|
|
32080
32481
|
switch (d.$$typeof) {
|
|
32081
32482
|
case va:
|
|
32082
32483
|
return a = a.get(null === d.key ? c : d.key) || null, k(b, a, d, e);
|
|
@@ -32150,8 +32551,8 @@ function requireReactDom_production_min() {
|
|
|
32150
32551
|
return l;
|
|
32151
32552
|
}
|
|
32152
32553
|
function J(a, d, f, h) {
|
|
32153
|
-
"object" === _typeof
|
|
32154
|
-
if ("object" === _typeof
|
|
32554
|
+
"object" === _typeof(f) && null !== f && f.type === ya && null === f.key && (f = f.props.children);
|
|
32555
|
+
if ("object" === _typeof(f) && null !== f) {
|
|
32155
32556
|
switch (f.$$typeof) {
|
|
32156
32557
|
case va:
|
|
32157
32558
|
a: {
|
|
@@ -32166,7 +32567,7 @@ function requireReactDom_production_min() {
|
|
|
32166
32567
|
a = d;
|
|
32167
32568
|
break a;
|
|
32168
32569
|
}
|
|
32169
|
-
} else if (l.elementType === k || "object" === _typeof
|
|
32570
|
+
} else if (l.elementType === k || "object" === _typeof(k) && null !== k && k.$$typeof === Ha && uh(k) === l.type) {
|
|
32170
32571
|
c(a, l.sibling);
|
|
32171
32572
|
d = e(l, f.props);
|
|
32172
32573
|
d.ref = sh(a, l, f);
|
|
@@ -33051,7 +33452,7 @@ function requireReactDom_production_min() {
|
|
|
33051
33452
|
g.props = h;
|
|
33052
33453
|
var k = g.context,
|
|
33053
33454
|
l = c.contextType;
|
|
33054
|
-
"object" === _typeof
|
|
33455
|
+
"object" === _typeof(l) && null !== l ? l = Vg(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
|
|
33055
33456
|
var m = c.getDerivedStateFromProps,
|
|
33056
33457
|
q = "function" === typeof m || "function" === typeof g.getSnapshotBeforeUpdate;
|
|
33057
33458
|
q || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && qh(b, g, d, l);
|
|
@@ -33070,7 +33471,7 @@ function requireReactDom_production_min() {
|
|
|
33070
33471
|
q = b.pendingProps;
|
|
33071
33472
|
r = g.context;
|
|
33072
33473
|
k = c.contextType;
|
|
33073
|
-
"object" === _typeof
|
|
33474
|
+
"object" === _typeof(k) && null !== k ? k = Vg(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
|
|
33074
33475
|
var y = c.getDerivedStateFromProps;
|
|
33075
33476
|
(m = "function" === typeof y || "function" === typeof g.getSnapshotBeforeUpdate) || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== q || r !== k) && qh(b, g, d, k);
|
|
33076
33477
|
$g = !1;
|
|
@@ -34983,7 +35384,7 @@ function requireReactDom_production_min() {
|
|
|
34983
35384
|
k = b;
|
|
34984
35385
|
b = Z;
|
|
34985
35386
|
h.flags |= 32768;
|
|
34986
|
-
if (null !== k && "object" === _typeof
|
|
35387
|
+
if (null !== k && "object" === _typeof(k) && "function" === typeof k.then) {
|
|
34987
35388
|
var l = k,
|
|
34988
35389
|
m = h,
|
|
34989
35390
|
q = m.tag;
|
|
@@ -35404,7 +35805,7 @@ function requireReactDom_production_min() {
|
|
|
35404
35805
|
e = Xh(null, b, d, a, e, c);
|
|
35405
35806
|
var f = bi();
|
|
35406
35807
|
b.flags |= 1;
|
|
35407
|
-
"object" === _typeof
|
|
35808
|
+
"object" === _typeof(e) && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b.tag = 1, b.memoizedState = null, b.updateQueue = null, Zf(d) ? (f = !0, cg(b)) : f = !1, b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, ah(b), e.updater = nh, b.stateNode = e, e._reactInternals = b, rh(b, d, a, c), b = kj(null, b, d, !0, f, c)) : (b.tag = 0, I && f && vg(b), Yi(null, b, e, c), b = b.child);
|
|
35408
35809
|
return b;
|
|
35409
35810
|
case 16:
|
|
35410
35811
|
d = b.elementType;
|
|
@@ -35645,7 +36046,7 @@ function requireReactDom_production_min() {
|
|
|
35645
36046
|
case Ia:
|
|
35646
36047
|
return qj(c, e, f, b);
|
|
35647
36048
|
default:
|
|
35648
|
-
if ("object" === _typeof
|
|
36049
|
+
if ("object" === _typeof(a) && null !== a) switch (a.$$typeof) {
|
|
35649
36050
|
case Ba:
|
|
35650
36051
|
g = 10;
|
|
35651
36052
|
break a;
|
|
@@ -35663,7 +36064,7 @@ function requireReactDom_production_min() {
|
|
|
35663
36064
|
d = null;
|
|
35664
36065
|
break a;
|
|
35665
36066
|
}
|
|
35666
|
-
throw Error(p(130, null == a ? a : _typeof
|
|
36067
|
+
throw Error(p(130, null == a ? a : _typeof(a), ""));
|
|
35667
36068
|
}
|
|
35668
36069
|
b = Bg(g, c, b, e);
|
|
35669
36070
|
b.elementType = a;
|
|
@@ -36311,7 +36712,7 @@ function requireLib() {
|
|
|
36311
36712
|
};
|
|
36312
36713
|
},
|
|
36313
36714
|
380: function _(e, t, r) {
|
|
36314
|
-
var n = "object" == _typeof
|
|
36715
|
+
var n = "object" == _typeof(r.g) && r.g && r.g.Object === Object && r.g;
|
|
36315
36716
|
e.exports = n;
|
|
36316
36717
|
},
|
|
36317
36718
|
903: function _(e, t, r) {
|
|
@@ -36339,7 +36740,7 @@ function requireLib() {
|
|
|
36339
36740
|
},
|
|
36340
36741
|
433: function _(e, t, r) {
|
|
36341
36742
|
var n = r(380),
|
|
36342
|
-
o = "object" == (typeof self === "undefined" ? "undefined" : _typeof
|
|
36743
|
+
o = "object" == (typeof self === "undefined" ? "undefined" : _typeof(self)) && self && self.Object === Object && self,
|
|
36343
36744
|
u = n || o || Function("return this")();
|
|
36344
36745
|
e.exports = u;
|
|
36345
36746
|
},
|
|
@@ -36408,20 +36809,20 @@ function requireLib() {
|
|
|
36408
36809
|
},
|
|
36409
36810
|
953: function _(e) {
|
|
36410
36811
|
e.exports = function (e) {
|
|
36411
|
-
var t = _typeof
|
|
36812
|
+
var t = _typeof(e);
|
|
36412
36813
|
return null != e && ("object" == t || "function" == t);
|
|
36413
36814
|
};
|
|
36414
36815
|
},
|
|
36415
36816
|
934: function _(e) {
|
|
36416
36817
|
e.exports = function (e) {
|
|
36417
|
-
return null != e && "object" == _typeof
|
|
36818
|
+
return null != e && "object" == _typeof(e);
|
|
36418
36819
|
};
|
|
36419
36820
|
},
|
|
36420
36821
|
414: function _(e, t, r) {
|
|
36421
36822
|
var n = r(148),
|
|
36422
36823
|
o = r(934);
|
|
36423
36824
|
e.exports = function (e) {
|
|
36424
|
-
return "symbol" == _typeof
|
|
36825
|
+
return "symbol" == _typeof(e) || o(e) && "[object Symbol]" == n(e);
|
|
36425
36826
|
};
|
|
36426
36827
|
},
|
|
36427
36828
|
664: function _(e, t, r) {
|
|
@@ -36498,11 +36899,11 @@ function requireLib() {
|
|
|
36498
36899
|
get: t[r]
|
|
36499
36900
|
});
|
|
36500
36901
|
}, o.g = function () {
|
|
36501
|
-
if ("object" == (typeof globalThis === "undefined" ? "undefined" : _typeof
|
|
36902
|
+
if ("object" == (typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis))) return globalThis;
|
|
36502
36903
|
try {
|
|
36503
36904
|
return this || new Function("return this")();
|
|
36504
36905
|
} catch (e) {
|
|
36505
|
-
if ("object" == (typeof window === "undefined" ? "undefined" : _typeof
|
|
36906
|
+
if ("object" == (typeof window === "undefined" ? "undefined" : _typeof(window))) return window;
|
|
36506
36907
|
}
|
|
36507
36908
|
}(), o.o = function (e, t) {
|
|
36508
36909
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
@@ -36627,7 +37028,7 @@ function requireLib() {
|
|
|
36627
37028
|
}
|
|
36628
37029
|
var h = Object.prototype.constructor.toString();
|
|
36629
37030
|
function v(e) {
|
|
36630
|
-
if (!e || "object" != _typeof
|
|
37031
|
+
if (!e || "object" != _typeof(e)) return !1;
|
|
36631
37032
|
var t = c(e);
|
|
36632
37033
|
if (null === t) return !0;
|
|
36633
37034
|
var r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
@@ -36924,7 +37325,7 @@ function requireLib() {
|
|
|
36924
37325
|
}
|
|
36925
37326
|
return S(_o4, r), R(n, _o4);
|
|
36926
37327
|
}
|
|
36927
|
-
if (!e || "object" != _typeof
|
|
37328
|
+
if (!e || "object" != _typeof(e)) {
|
|
36928
37329
|
if (n = t(e), void 0 === n && (n = e), n === a && (n = void 0), _this.autoFreeze_ && E(n, !0), r) {
|
|
36929
37330
|
var _t6 = [],
|
|
36930
37331
|
_o5 = [];
|
|
@@ -37201,10 +37602,10 @@ function requireLib() {
|
|
|
37201
37602
|
}
|
|
37202
37603
|
};
|
|
37203
37604
|
function se(e) {
|
|
37204
|
-
return se = "function" == typeof Symbol && "symbol" == _typeof
|
|
37205
|
-
return _typeof
|
|
37605
|
+
return se = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
37606
|
+
return _typeof(e);
|
|
37206
37607
|
} : function (e) {
|
|
37207
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
37608
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
37208
37609
|
}, se(e);
|
|
37209
37610
|
}
|
|
37210
37611
|
function le(e, t, r) {
|
|
@@ -41888,7 +42289,7 @@ function requireLib() {
|
|
|
41888
42289
|
Jt = o(858),
|
|
41889
42290
|
Zt = o.n(Jt);
|
|
41890
42291
|
var Yt = function Yt(e) {
|
|
41891
|
-
return "object" == _typeof
|
|
42292
|
+
return "object" == _typeof(e) && null != e && 1 === e.nodeType;
|
|
41892
42293
|
},
|
|
41893
42294
|
Gt = function Gt(e, t) {
|
|
41894
42295
|
return (!t || "hidden" !== e) && "visible" !== e && "clip" !== e;
|
|
@@ -42108,10 +42509,10 @@ function requireLib() {
|
|
|
42108
42509
|
"undefined" != typeof navigator && /Safari/.test(navigator.userAgent) && /Version\/(\d+)/.test(navigator.userAgent) && null !== (nr = navigator.userAgent.match(/Version\/(\d+)/)) && void 0 !== nr && nr[1] && parseInt(null === (or = navigator.userAgent.match(/Version\/(\d+)/)) || void 0 === or ? void 0 : or[1], 10);
|
|
42109
42510
|
var Tr = (!Or || !xr) && !Ar && "undefined" != typeof globalThis && globalThis.InputEvent && "function" == typeof globalThis.InputEvent.prototype.getTargetRanges;
|
|
42110
42511
|
function Mr(e) {
|
|
42111
|
-
return Mr = "function" == typeof Symbol && "symbol" == _typeof
|
|
42112
|
-
return _typeof
|
|
42512
|
+
return Mr = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
42513
|
+
return _typeof(e);
|
|
42113
42514
|
} : function (e) {
|
|
42114
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
42515
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
42115
42516
|
}, Mr(e);
|
|
42116
42517
|
}
|
|
42117
42518
|
function Rr(e, t, r) {
|
|
@@ -43184,10 +43585,10 @@ function requireLib() {
|
|
|
43184
43585
|
return o;
|
|
43185
43586
|
}
|
|
43186
43587
|
function yo(e) {
|
|
43187
|
-
return yo = "function" == typeof Symbol && "symbol" == _typeof
|
|
43188
|
-
return _typeof
|
|
43588
|
+
return yo = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
43589
|
+
return _typeof(e);
|
|
43189
43590
|
} : function (e) {
|
|
43190
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
43591
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
43191
43592
|
}, yo(e);
|
|
43192
43593
|
}
|
|
43193
43594
|
function Bo(e, t, r) {
|
|
@@ -44936,7 +45337,7 @@ function requireLib() {
|
|
|
44936
45337
|
};
|
|
44937
45338
|
}(e);
|
|
44938
45339
|
if (function (e) {
|
|
44939
|
-
return "object" == _typeof
|
|
45340
|
+
return "object" == _typeof(e) && "function" == typeof e.behavior;
|
|
44940
45341
|
}(t)) return t.behavior(rr(e, t));
|
|
44941
45342
|
var n = "boolean" == typeof t || null == t ? void 0 : t.behavior;
|
|
44942
45343
|
var _iterator47 = _createForOfIteratorHelper(rr(e, function (e) {
|
|
@@ -45558,10 +45959,10 @@ function requireLib() {
|
|
|
45558
45959
|
};
|
|
45559
45960
|
};
|
|
45560
45961
|
function Wu(e) {
|
|
45561
|
-
return Wu = "function" == typeof Symbol && "symbol" == _typeof
|
|
45562
|
-
return _typeof
|
|
45962
|
+
return Wu = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
45963
|
+
return _typeof(e);
|
|
45563
45964
|
} : function (e) {
|
|
45564
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
45965
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
45565
45966
|
}, Wu(e);
|
|
45566
45967
|
}
|
|
45567
45968
|
function Vu(e, t) {
|
|
@@ -45730,10 +46131,10 @@ function requireLib() {
|
|
|
45730
46131
|
};
|
|
45731
46132
|
};
|
|
45732
46133
|
function ha(e) {
|
|
45733
|
-
return ha = "function" == typeof Symbol && "symbol" == _typeof
|
|
45734
|
-
return _typeof
|
|
46134
|
+
return ha = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
46135
|
+
return _typeof(e);
|
|
45735
46136
|
} : function (e) {
|
|
45736
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
46137
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
45737
46138
|
}, ha(e);
|
|
45738
46139
|
}
|
|
45739
46140
|
function va(e, t) {
|
|
@@ -45923,10 +46324,10 @@ function requireLib() {
|
|
|
45923
46324
|
window.postMessage(o, "*"), null === (n = window.ReactNativeWebView) || void 0 === n || n.postMessage(JSON.stringify(o));
|
|
45924
46325
|
};
|
|
45925
46326
|
function Na(e) {
|
|
45926
|
-
return Na = "function" == typeof Symbol && "symbol" == _typeof
|
|
45927
|
-
return _typeof
|
|
46327
|
+
return Na = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
46328
|
+
return _typeof(e);
|
|
45928
46329
|
} : function (e) {
|
|
45929
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
46330
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
45930
46331
|
}, Na(e);
|
|
45931
46332
|
}
|
|
45932
46333
|
var _a = ["active"];
|
|
@@ -46317,10 +46718,10 @@ function requireLib() {
|
|
|
46317
46718
|
r.style.display = "block", r.style.top = "calc(".concat(u.top, "px + ").concat(s, ")"), f > d ? (r.style.left = "".concat(l, "px"), r.style.right = "unset", r.style.maxWidth = "".concat(Math.min(f, a.width), "px")) : (r.style.left = "unset", r.style.right = "".concat(c, "px"), r.style.maxWidth = "".concat(Math.min(d, a.width), "px"));
|
|
46318
46719
|
};
|
|
46319
46720
|
function bi(e) {
|
|
46320
|
-
return bi = "function" == typeof Symbol && "symbol" == _typeof
|
|
46321
|
-
return _typeof
|
|
46721
|
+
return bi = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
46722
|
+
return _typeof(e);
|
|
46322
46723
|
} : function (e) {
|
|
46323
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
46724
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
46324
46725
|
}, bi(e);
|
|
46325
46726
|
}
|
|
46326
46727
|
function Ei(e, t) {
|
|
@@ -46729,10 +47130,10 @@ function requireLib() {
|
|
|
46729
47130
|
});
|
|
46730
47131
|
};
|
|
46731
47132
|
function Hi(e) {
|
|
46732
|
-
return Hi = "function" == typeof Symbol && "symbol" == _typeof
|
|
46733
|
-
return _typeof
|
|
47133
|
+
return Hi = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
47134
|
+
return _typeof(e);
|
|
46734
47135
|
} : function (e) {
|
|
46735
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
47136
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
46736
47137
|
}, Hi(e);
|
|
46737
47138
|
}
|
|
46738
47139
|
function Ui(e, t) {
|
|
@@ -47308,10 +47709,10 @@ function requireLib() {
|
|
|
47308
47709
|
});
|
|
47309
47710
|
var Ts = ks;
|
|
47310
47711
|
function Ms(e) {
|
|
47311
|
-
return Ms = "function" == typeof Symbol && "symbol" == _typeof
|
|
47312
|
-
return _typeof
|
|
47712
|
+
return Ms = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
47713
|
+
return _typeof(e);
|
|
47313
47714
|
} : function (e) {
|
|
47314
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof
|
|
47715
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
47315
47716
|
}, Ms(e);
|
|
47316
47717
|
}
|
|
47317
47718
|
function Rs() {
|