@hero-design/rn 8.112.5 → 8.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +10 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +1477 -1877
- package/jest.config.js +1 -1
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +1477 -1877
- package/package.json +2 -2
- package/src/components/Calendar/CalendarRange.tsx +1 -1
- package/src/components/Calendar/index.tsx +1 -1
- package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +5 -7
- package/src/components/DatePicker/hooks/useFormatDate.ts +1 -1
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/LocaleProvider/__tests__/utils.specs.ts +2 -1
- package/src/components/LocaleProvider/index.tsx +1 -1
- package/src/components/LocaleProvider/utils.ts +3 -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/types/components/DatePicker/types.d.ts +1 -1
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/LocaleProvider/utils.d.ts +1 -1
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/TimePicker/types.d.ts +1 -1
package/es/index.js
CHANGED
|
@@ -588,14 +588,14 @@ function _toPropertyKey(t) {
|
|
|
588
588
|
var i = _toPrimitive(t, "string");
|
|
589
589
|
return "symbol" == typeof i ? i : i + "";
|
|
590
590
|
}
|
|
591
|
-
function _typeof(o) {
|
|
591
|
+
function _typeof$1(o) {
|
|
592
592
|
"@babel/helpers - typeof";
|
|
593
593
|
|
|
594
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
594
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
595
595
|
return typeof o;
|
|
596
596
|
} : function (o) {
|
|
597
597
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
598
|
-
}, _typeof(o);
|
|
598
|
+
}, _typeof$1(o);
|
|
599
599
|
}
|
|
600
600
|
function _unsupportedIterableToArray(r, a) {
|
|
601
601
|
if (r) {
|
|
@@ -1087,7 +1087,7 @@ function requireCamelize() {
|
|
|
1087
1087
|
return walk(obj);
|
|
1088
1088
|
};
|
|
1089
1089
|
function walk(obj) {
|
|
1090
|
-
if (!obj || _typeof(obj) !== 'object') return obj;
|
|
1090
|
+
if (!obj || _typeof$1(obj) !== 'object') return obj;
|
|
1091
1091
|
if (isDate(obj) || isRegex(obj)) return obj;
|
|
1092
1092
|
if (isArray(obj)) return map(obj, walk);
|
|
1093
1093
|
return reduce(objectKeys(obj), function (acc, key) {
|
|
@@ -1450,7 +1450,7 @@ function requireCssToReactNative() {
|
|
|
1450
1450
|
value: true
|
|
1451
1451
|
});
|
|
1452
1452
|
function _interopDefault(ex) {
|
|
1453
|
-
return ex && _typeof(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
1453
|
+
return ex && _typeof$1(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
1454
1454
|
}
|
|
1455
1455
|
var parse = requireLib$1();
|
|
1456
1456
|
var parse__default = _interopDefault(parse);
|
|
@@ -3333,7 +3333,7 @@ var generated = {};
|
|
|
3333
3333
|
var buffer = '';
|
|
3334
3334
|
var lastType;
|
|
3335
3335
|
function handleInterpolation(interpolation, i, arr) {
|
|
3336
|
-
var type = _typeof(interpolation);
|
|
3336
|
+
var type = _typeof$1(interpolation);
|
|
3337
3337
|
if (type === 'string') {
|
|
3338
3338
|
// strip comments
|
|
3339
3339
|
interpolation = interpolation.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, '');
|
|
@@ -6790,7 +6790,7 @@ var _deepCompareValue = function deepCompareValue(a, b) {
|
|
|
6790
6790
|
// If either is null or undefined (but they are not strictly equal), return false
|
|
6791
6791
|
if (a == null || b == null) return false;
|
|
6792
6792
|
// If types don't match, they can't be equal
|
|
6793
|
-
if (_typeof(a) !== _typeof(b)) return false;
|
|
6793
|
+
if (_typeof$1(a) !== _typeof$1(b)) return false;
|
|
6794
6794
|
// Handle array comparison
|
|
6795
6795
|
if (Array.isArray(a) && Array.isArray(b)) {
|
|
6796
6796
|
if (a.length !== b.length) return false;
|
|
@@ -6801,7 +6801,7 @@ var _deepCompareValue = function deepCompareValue(a, b) {
|
|
|
6801
6801
|
// If one is array and the other isn't, return false
|
|
6802
6802
|
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
6803
6803
|
// Handle object comparison
|
|
6804
|
-
if (_typeof(a) === 'object' && _typeof(b) === 'object') {
|
|
6804
|
+
if (_typeof$1(a) === 'object' && _typeof$1(b) === 'object') {
|
|
6805
6805
|
var keysA = Object.keys(a);
|
|
6806
6806
|
var keysB = Object.keys(b);
|
|
6807
6807
|
if (keysA.length !== keysB.length) return false;
|
|
@@ -8234,7 +8234,7 @@ var Typography = {
|
|
|
8234
8234
|
};
|
|
8235
8235
|
|
|
8236
8236
|
// 🔴 DO NOT EDIT — This file is generated automatically.
|
|
8237
|
-
var IconList = ['activate', 'add-emoji', 'add-person', 'adjustment', 'alignment', 'antenna', 'archive', 'assignment-warning', 'bank', 'bell', 'billing', 'bolt', 'bookmark-added', 'bookmark-checked', 'bookmark', 'box-check', 'box', 'bpay', 'buildings', 'cake', 'calendar-clock', 'calendar', 'candy-box-menu', 'caret-down-small', 'caret-down', 'caret-left-small', 'caret-left', 'caret-right-small', 'caret-right', 'caret-up-small', 'caret-up', 'check-radio', 'circle-add', 'circle-cancel', 'circle-check', 'circle-down', 'circle-info', 'circle-left', 'circle-ok', 'circle-pencil', 'circle-question', 'circle-remove', 'circle-right', 'circle-up', 'circle-warning', 'clock-3', 'clock', 'cloud-download', 'cloud-upload', 'cog', 'coin', 'contacts', 'credit-card', 'diamond', 'direction-arrows', 'directory', 'document', 'dollar-coin-shine', 'dot', 'double-buildings', 'edit-template', 'envelope', 'exclude', 'expand-content', 'expense', 'explore_nearby', 'eye-circle', 'eye-invisible', 'eye', 'face-meh', 'face-sad', 'face-smiley', 'feed', 'feedbacks', 'file-certified', 'file-clone', 'file-copy', 'file-csv', 'file-dispose', 'file-doc', 'file-excel', 'file-export', 'file-lock', 'file-pdf', 'file-powerpoint', 'file-search', 'file-secured', 'file-sheets', 'file-slide', 'file-verified', 'file-word', 'file', 'filter', 'folder-user', 'folder', 'format-bold', 'format-heading1', 'format-heading2', 'format-italic', 'format-list-bulleted', 'format-list-numbered', 'format-underlined', 'funnel-filter', 'global-dollar', 'global-pound', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'hero-points', 'home', 'image', 'import', 'incident-siren', 'instapay-daily', 'instapay-now', 'instapay', 'list', 'loading-2', 'loading', 'location-on', 'location', 'lock', 'looks-one', 'looks-two', 'media-content', 'menu', 'money-notes', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'near-me', 'node', 'open-folder', 'paperclip-vertical', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane-up', 'plane', 'play-arrow', 'play-circle', 'pound-coin-shine', 'pound-sign', 'print', 'raising-hands', 'reply-arrow', 'reply', 'reschedule', 'rostering', 'salary-sacrifice', 'save', 'schedule-send', 'schedule', 'search-person', 'search', 'send', 'speaker-active', 'speaker', 'star-award', 'star-badge', 'star-circle', 'star-medal', 'star', 'steps-circle', 'stopwatch', 'suitcase', 'surfing', 'survey', 'swag-pillar-benefit', 'swag-pillar-career', 'swag-pillar-money', 'swag-pillar-work', 'swag', 'swipe-right', 'switch', 'tag', 'target', 'teams', 'thumb-down', 'thumb-up', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'wallet', 'warning', 'academic-hat-outlined', 'accommodation-outlined', 'activate-outlined', 'add-credit-card-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'afternoon-outlined', 'ai-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'application-outlined', 'arrow-down', 'arrow-downwards', 'arrow-left', 'arrow-leftwards', 'arrow-right', 'arrow-rightwards', 'arrow-up', 'arrow-upwards', 'article-outlined', 'at-sign', 'auto-graph-outlined', 'automotive-outlined', 'bakery-outlined', 'bar-outlined', 'beauty-outlined', 'beer-outlined', 'bell-active-outlined', 'bell-outlined', 'bell-slash-outlined', 'bill-management-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bolt-outlined', 'book-outlined', 'bookmark-added-outlined', 'bookmark-checked-outlined', 'bookmark-outlined', 'box-1-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calculator-outlined', 'calendar-dates-outlined', 'calendar-star-outlined', 'call-outlined', 'call-split-outlined', 'camera-outlined', 'cancel', 'car-forward-outlined', 'cashback-outlined', 'charging-station-outlined', 'chat-bubble-outlined', 'chat-unread-outlined', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-down-outlined', 'circle-info-outlined', 'circle-left-outlined', 'circle-ok-outlined', 'circle-question-outlined', 'circle-remove-outlined', 'circle-right-outlined', 'circle-up-outlined', 'circle-warning-outlined', 'clock-2-outlined', 'clock-in-outlined', 'clock-out-outlined', 'clock-outlined', 'cog-outlined', 'coin-outlined', 'coin-super-outlined', 'comment-outlined', 'contacts-outlined', 'contacts-user-outlined', 'credit-card-outlined', 'cultural-site-outlined', 'cup-outlined', 'dentistry-outlined', 'direction-arrows-outlined', 'directory-outlined', 'document-outlined', 'dollar-box-outlined', 'dollar-card-outlined', 'dollar-coin-shine-outlined', 'dollar-credit-card-outlined', 'dollar-sign', 'double-buildings-outlined', 'double-left-arrows', 'double-right-arrows', 'download-box-outlined', 'download-outlined', 'edit-template-outlined', 'electronics-outlined', 'email-outlined', 'end-break-outlined', 'enter-arrow', 'entertainment-outlined', 'envelope-outlined', 'evening-outlined', 'expense-approval-outlined', 'expense-outlined', 'explore-outlined', 'extension-outlined', 'external-link', 'eye-invisible-outlined', 'eye-outlined', 'face-id', 'face-meh-outlined', 'face-open-smiley-outlined', 'face-sad-outlined', 'face-smiley-outlined', 'fastfood-outlined', 'feed-outlined', 'file-certified-outlined', 'file-clone-outlined', 'file-copy-outlined', 'file-dispose-outlined', 'file-dollar-certified-outlined', 'file-dollar-outlined', 'file-download-outlined', 'file-export-outlined', 'file-lock-outlined', 'file-outlined', 'file-pound-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-statutory-outlined', 'file-verified-outlined', 'filter-outlined', 'fitness-outlined', 'folder-outlined', 'folder-upload-outlined', 'folder-user-outlined', 'form-outlined', 'funnel-filter-outline', 'goal-outlined', 'graph-outlined', 'grocery-outlined', 'hand-holding-user-outlined', 'handshake-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'home-active-outlined', 'home-outlined', 'id-card-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'job-search-outlined', 'leave-approval-outlined', 'link-1', 'link-2', 'list-outlined', 'live-help-outlined', 'local_mall_outlined', 'location-on-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'mail-outlined', 'map-outlined', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'morning-outlined', 'multiple-folders-outlined', 'multiple-users-outlined', 'near-me-outlined', 'node-outlined', 'number-points', 'number', 'overview-outlined', 'park-outlined', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'pound-box-outlined', 'pound-card-outlined', 'pound-coin-shine-outlined', 'pound-credit-card-outlined', 'print-outlined', 'propane-tank-outlined', 'qr-code-outlined', 'qualification-outlined', 're-assign', 'redeem', 'refresh', 'remove', 'reply-outlined', 'restart', 'restaurant-outlined', 'resume-outlined', 'return-arrow', 'rostering-outlined', 'safety-outlined', 'save-outlined', 'schedule-outlined', 'search-outlined', 'search-secured-outlined', 'send-outlined', 'share-1', 'share-2', 'share-outlined-2', 'share-outlined', 'shield-check-outlined', 'shop-outlined', 'shopping_basket_outlined', 'show-chart-outlined', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'smart-match-outlined', 'sparkle-outlined', 'speaker-active-outlined', 'speaker-outlined', 'star-circle-outlined', 'star-outlined', 'start-break-outlined', 'stash-outlined', 'stopwatch-outlined', 'strikethrough', 'styler-outlined', 'suitcase-clock-outlined', 'suitcase-outlined', 'survey-outlined', 'switch-outlined', 'sync', 'tag-outlined', 'target-outlined', 'tennis-outlined', 'thumb-down-outlined', 'thumb-up-outlined', 'ticket-outlined', 'timesheet-outlined', 'timesheets-outlined', 'today-outlined', 'transfer', 'transportation-outlined', 'trash-bin-outlined', 'umbrela-outlined', 'unavailability-outlined', 'unavailable', 'underline', 'union-outlined', 'unlock-outlined', 'upload-outlined', 'user-circle-outlined', 'user-gear-outlined', 'user-outlined', 'user-rectangle-outlined', 'video-1-outlined', 'video-2-outlined', 'volunteer-outlined', 'wallet-outlined', 'wellness-outlined'];
|
|
8237
|
+
var IconList = ['activate', 'add-emoji', 'add-person', 'adjustment', 'alignment', 'antenna', 'archive', 'assignment-warning', 'bank', 'bell', 'billing', 'bolt', 'bookmark-added', 'bookmark-checked', 'bookmark', 'box-check', 'box', 'bpay', 'buildings', 'cake', 'calendar-clock', 'calendar', 'candy-box-menu', 'caret-down-small', 'caret-down', 'caret-left-small', 'caret-left', 'caret-right-small', 'caret-right', 'caret-up-small', 'caret-up', 'check-radio', 'circle-add', 'circle-cancel', 'circle-check', 'circle-down', 'circle-info', 'circle-left', 'circle-ok', 'circle-pencil', 'circle-question', 'circle-remove', 'circle-right', 'circle-up', 'circle-warning', 'clock-3', 'clock', 'cloud-download', 'cloud-upload', 'cog', 'coin', 'contacts', 'credit-card', 'diamond', 'direction-arrows', 'directory', 'document', 'dollar-coin-shine', 'dot', 'double-buildings', 'edit-template', 'envelope', 'exclude', 'expand-content', 'expense', 'explore_nearby', 'eye-circle', 'eye-invisible', 'eye', 'face-meh', 'face-sad', 'face-smiley', 'feed', 'feedbacks', 'file-certified', 'file-clone', 'file-copy', 'file-csv', 'file-dispose', 'file-doc', 'file-excel', 'file-export', 'file-lock', 'file-pdf', 'file-powerpoint', 'file-search', 'file-secured', 'file-sheets', 'file-slide', 'file-verified', 'file-word', 'file', 'filter', 'folder-user', 'folder', 'format-bold', 'format-heading1', 'format-heading2', 'format-italic', 'format-list-bulleted', 'format-list-numbered', 'format-underlined', 'funnel-filter', 'global-dollar', 'global-pound', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'hero-points', 'home', 'image', 'import', 'incident-siren', 'instapay-daily', 'instapay-now', 'instapay', 'list', 'loading-2', 'loading', 'location-on', 'location', 'lock', 'looks-one', 'looks-two', 'media-content', 'menu', 'money-notes', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'near-me', 'node', 'open-folder', 'paperclip-vertical', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane-up', 'plane', 'play-arrow', 'play-circle', 'pound-coin-shine', 'pound-sign', 'print', 'raising-hands', 'reply-arrow', 'reply', 'reschedule', 'rostering', 'salary-sacrifice', 'save', 'schedule-send', 'schedule', 'search-person', 'search', 'send', 'speaker-active', 'speaker', 'star-award', 'star-badge', 'star-circle', 'star-medal', 'star', 'steps-circle', 'stopwatch', 'suitcase', 'surfing', 'survey', 'swag-pillar-benefit', 'swag-pillar-career', 'swag-pillar-money', 'swag-pillar-work', 'swag', 'swipe-right', 'switch', 'tag', 'target', 'teams', 'thumb-down', 'thumb-up', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'wallet', 'warning', 'academic-hat-outlined', 'accommodation-outlined', 'activate-outlined', 'add-credit-card-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'afternoon-outlined', 'ai-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'application-outlined', 'arrow-down', 'arrow-downwards', 'arrow-left', 'arrow-leftwards', 'arrow-right', 'arrow-rightwards', 'arrow-up', 'arrow-upwards', 'article-outlined', 'at-sign', 'auto-graph-outlined', 'automotive-outlined', 'bakery-outlined', 'bar-outlined', 'beauty-outlined', 'beer-outlined', 'bell-active-outlined', 'bell-outlined', 'bell-slash-outlined', 'bill-management-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bolt-outlined', 'book-outlined', 'bookmark-added-outlined', 'bookmark-checked-outlined', 'bookmark-outlined', 'box-1-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calculator-outlined', 'calendar-dates-outlined', 'calendar-star-outlined', 'call-outlined', 'call-split-outlined', 'camera-outlined', 'cancel', 'car-forward-outlined', 'cashback-outlined', 'charging-station-outlined', 'chat-bubble-outlined', 'chat-unread-outlined', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-down-outlined', 'circle-info-outlined', 'circle-left-outlined', 'circle-ok-outlined', 'circle-question-outlined', 'circle-remove-outlined', 'circle-right-outlined', 'circle-up-outlined', 'circle-warning-outlined', 'clock-2-outlined', 'clock-in-outlined', 'clock-out-outlined', 'clock-outlined', 'cog-outlined', 'coin-outlined', 'coin-super-outlined', 'comment-outlined', 'contacts-outlined', 'contacts-user-outlined', 'credit-card-outlined', 'cultural-site-outlined', 'cup-outlined', 'dentistry-outlined', 'direction-arrows-outlined', 'directory-outlined', 'document-outlined', 'dollar-box-outlined', 'dollar-card-outlined', 'dollar-coin-shine-outlined', 'dollar-credit-card-outlined', 'dollar-sign', 'double-buildings-outlined', 'double-left-arrows', 'double-right-arrows', 'download-box-outlined', 'download-outlined', 'edit-template-outlined', 'electronics-outlined', 'email-outlined', 'end-break-outlined', 'enter-arrow', 'entertainment-outlined', 'envelope-outlined', 'evening-outlined', 'expense-approval-outlined', 'expense-outlined', 'explore-outlined', 'extension-outlined', 'external-link', 'eye-invisible-outlined', 'eye-outlined', 'face-id', 'face-meh-outlined', 'face-open-smiley-outlined', 'face-sad-outlined', 'face-smiley-outlined', 'fastfood-outlined', 'feed-outlined', 'file-certified-outlined', 'file-clone-outlined', 'file-copy-outlined', 'file-dispose-outlined', 'file-dollar-certified-outlined', 'file-dollar-outlined', 'file-download-outlined', 'file-export-outlined', 'file-lock-outlined', 'file-outlined', 'file-pound-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-statutory-outlined', 'file-verified-outlined', 'filter-outlined', 'fitness-outlined', 'folder-outlined', 'folder-upload-outlined', 'folder-user-outlined', 'form-outlined', 'funnel-filter-outline', 'goal-outlined', 'graph-outlined', 'grocery-outlined', 'hand-holding-user-outlined', 'handshake-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'home-active-outlined', 'home-outlined', 'id-card-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'job-search-outlined', 'leave-approval-outlined', 'lighting-outlined', 'link-1', 'link-2', 'list-outlined', 'live-help-outlined', 'local_mall_outlined', 'location-on-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'mail-outlined', 'map-outlined', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'morning-outlined', 'multiple-folders-outlined', 'multiple-users-outlined', 'near-me-outlined', 'node-outlined', 'number-points', 'number', 'overview-outlined', 'park-outlined', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'pound-box-outlined', 'pound-card-outlined', 'pound-coin-shine-outlined', 'pound-credit-card-outlined', 'print-outlined', 'propane-tank-outlined', 'qr-code-outlined', 'qualification-outlined', 're-assign', 'redeem', 'refresh', 'remove', 'reply-outlined', 'restart', 'restaurant-outlined', 'resume-outlined', 'return-arrow', 'rostering-outlined', 'safety-outlined', 'save-outlined', 'schedule-outlined', 'search-outlined', 'search-secured-outlined', 'send-outlined', 'share-1', 'share-2', 'share-outlined-2', 'share-outlined', 'shield-check-outlined', 'shop-outlined', 'shopping_basket_outlined', 'show-chart-outlined', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'smart-match-outlined', 'sparkle-outlined', 'speaker-active-outlined', 'speaker-outlined', 'star-circle-outlined', 'star-outlined', 'start-break-outlined', 'stash-outlined', 'stopwatch-outlined', 'strikethrough', 'styler-outlined', 'suitcase-clock-outlined', 'suitcase-outlined', 'survey-outlined', 'switch-outlined', 'sync', 'tag-outlined', 'target-outlined', 'tennis-outlined', 'thumb-down-outlined', 'thumb-up-outlined', 'ticket-outlined', 'timesheet-outlined', 'timesheets-outlined', 'today-outlined', 'transfer', 'transportation-outlined', 'trash-bin-outlined', 'umbrela-outlined', 'unavailability-outlined', 'unavailable', 'underline', 'union-outlined', 'unlock-outlined', 'upload-outlined', 'user-circle-outlined', 'user-gear-outlined', 'user-outlined', 'user-rectangle-outlined', 'video-1-outlined', 'video-2-outlined', 'volunteer-outlined', 'wallet-outlined', 'wellness-outlined'];
|
|
8238
8238
|
|
|
8239
8239
|
var activate = 59000;
|
|
8240
8240
|
var adjustment = 59003;
|
|
@@ -8315,19 +8315,19 @@ var bold = 59232;
|
|
|
8315
8315
|
var cancel = 59249;
|
|
8316
8316
|
var checkmark = 59255;
|
|
8317
8317
|
var italic = 59352;
|
|
8318
|
-
var local_mall_outlined =
|
|
8319
|
-
var number$2 =
|
|
8320
|
-
var percentage =
|
|
8321
|
-
var redeem =
|
|
8322
|
-
var refresh =
|
|
8323
|
-
var remove$1 =
|
|
8324
|
-
var restart =
|
|
8325
|
-
var shopping_basket_outlined =
|
|
8326
|
-
var strikethrough =
|
|
8327
|
-
var sync =
|
|
8328
|
-
var transfer =
|
|
8329
|
-
var unavailable =
|
|
8330
|
-
var underline =
|
|
8318
|
+
var local_mall_outlined = 59360;
|
|
8319
|
+
var number$2 = 59383;
|
|
8320
|
+
var percentage = 59389;
|
|
8321
|
+
var redeem = 59403;
|
|
8322
|
+
var refresh = 59404;
|
|
8323
|
+
var remove$1 = 59405;
|
|
8324
|
+
var restart = 59407;
|
|
8325
|
+
var shopping_basket_outlined = 59424;
|
|
8326
|
+
var strikethrough = 59439;
|
|
8327
|
+
var sync = 59445;
|
|
8328
|
+
var transfer = 59455;
|
|
8329
|
+
var unavailable = 59460;
|
|
8330
|
+
var underline = 59461;
|
|
8331
8331
|
var glyphMap = {
|
|
8332
8332
|
activate: activate,
|
|
8333
8333
|
"add-emoji": 59001,
|
|
@@ -8684,124 +8684,125 @@ var glyphMap = {
|
|
|
8684
8684
|
italic: italic,
|
|
8685
8685
|
"job-search-outlined": 59353,
|
|
8686
8686
|
"leave-approval-outlined": 59354,
|
|
8687
|
-
"
|
|
8688
|
-
"link-
|
|
8689
|
-
"
|
|
8690
|
-
"
|
|
8687
|
+
"lighting-outlined": 59355,
|
|
8688
|
+
"link-1": 59356,
|
|
8689
|
+
"link-2": 59357,
|
|
8690
|
+
"list-outlined": 59358,
|
|
8691
|
+
"live-help-outlined": 59359,
|
|
8691
8692
|
local_mall_outlined: local_mall_outlined,
|
|
8692
|
-
"location-on-outlined":
|
|
8693
|
-
"location-outlined":
|
|
8694
|
-
"lock-outlined":
|
|
8695
|
-
"locked-file-outlined":
|
|
8696
|
-
"log-out":
|
|
8697
|
-
"mail-outlined":
|
|
8698
|
-
"map-outlined":
|
|
8699
|
-
"media-content-outlined":
|
|
8700
|
-
"menu-close":
|
|
8701
|
-
"menu-expand":
|
|
8702
|
-
"menu-fold-outlined":
|
|
8703
|
-
"menu-unfold-outlined":
|
|
8704
|
-
"moneybag-outlined":
|
|
8705
|
-
"moon-outlined":
|
|
8706
|
-
"more-horizontal":
|
|
8707
|
-
"more-vertical":
|
|
8708
|
-
"morning-outlined":
|
|
8709
|
-
"multiple-folders-outlined":
|
|
8710
|
-
"multiple-users-outlined":
|
|
8711
|
-
"near-me-outlined":
|
|
8712
|
-
"node-outlined":
|
|
8713
|
-
"number-points":
|
|
8693
|
+
"location-on-outlined": 59361,
|
|
8694
|
+
"location-outlined": 59362,
|
|
8695
|
+
"lock-outlined": 59363,
|
|
8696
|
+
"locked-file-outlined": 59364,
|
|
8697
|
+
"log-out": 59365,
|
|
8698
|
+
"mail-outlined": 59366,
|
|
8699
|
+
"map-outlined": 59367,
|
|
8700
|
+
"media-content-outlined": 59368,
|
|
8701
|
+
"menu-close": 59369,
|
|
8702
|
+
"menu-expand": 59370,
|
|
8703
|
+
"menu-fold-outlined": 59371,
|
|
8704
|
+
"menu-unfold-outlined": 59372,
|
|
8705
|
+
"moneybag-outlined": 59373,
|
|
8706
|
+
"moon-outlined": 59374,
|
|
8707
|
+
"more-horizontal": 59375,
|
|
8708
|
+
"more-vertical": 59376,
|
|
8709
|
+
"morning-outlined": 59377,
|
|
8710
|
+
"multiple-folders-outlined": 59378,
|
|
8711
|
+
"multiple-users-outlined": 59379,
|
|
8712
|
+
"near-me-outlined": 59380,
|
|
8713
|
+
"node-outlined": 59381,
|
|
8714
|
+
"number-points": 59382,
|
|
8714
8715
|
number: number$2,
|
|
8715
|
-
"overview-outlined":
|
|
8716
|
-
"park-outlined":
|
|
8717
|
-
"payment-summary-outlined":
|
|
8718
|
-
"payslip-outlined":
|
|
8719
|
-
"pencil-outlined":
|
|
8716
|
+
"overview-outlined": 59384,
|
|
8717
|
+
"park-outlined": 59385,
|
|
8718
|
+
"payment-summary-outlined": 59386,
|
|
8719
|
+
"payslip-outlined": 59387,
|
|
8720
|
+
"pencil-outlined": 59388,
|
|
8720
8721
|
percentage: percentage,
|
|
8721
|
-
"phone-outlined":
|
|
8722
|
-
"piggy-bank-outlined":
|
|
8723
|
-
"plane-outlined":
|
|
8724
|
-
"play-circle-outlined":
|
|
8725
|
-
"pound-box-outlined":
|
|
8726
|
-
"pound-card-outlined":
|
|
8727
|
-
"pound-coin-shine-outlined":
|
|
8728
|
-
"pound-credit-card-outlined":
|
|
8729
|
-
"print-outlined":
|
|
8730
|
-
"propane-tank-outlined":
|
|
8731
|
-
"qr-code-outlined":
|
|
8732
|
-
"qualification-outlined":
|
|
8733
|
-
"re-assign":
|
|
8722
|
+
"phone-outlined": 59390,
|
|
8723
|
+
"piggy-bank-outlined": 59391,
|
|
8724
|
+
"plane-outlined": 59392,
|
|
8725
|
+
"play-circle-outlined": 59393,
|
|
8726
|
+
"pound-box-outlined": 59394,
|
|
8727
|
+
"pound-card-outlined": 59395,
|
|
8728
|
+
"pound-coin-shine-outlined": 59396,
|
|
8729
|
+
"pound-credit-card-outlined": 59397,
|
|
8730
|
+
"print-outlined": 59398,
|
|
8731
|
+
"propane-tank-outlined": 59399,
|
|
8732
|
+
"qr-code-outlined": 59400,
|
|
8733
|
+
"qualification-outlined": 59401,
|
|
8734
|
+
"re-assign": 59402,
|
|
8734
8735
|
redeem: redeem,
|
|
8735
8736
|
refresh: refresh,
|
|
8736
8737
|
remove: remove$1,
|
|
8737
|
-
"reply-outlined":
|
|
8738
|
+
"reply-outlined": 59406,
|
|
8738
8739
|
restart: restart,
|
|
8739
|
-
"restaurant-outlined":
|
|
8740
|
-
"resume-outlined":
|
|
8741
|
-
"return-arrow":
|
|
8742
|
-
"rostering-outlined":
|
|
8743
|
-
"safety-outlined":
|
|
8744
|
-
"save-outlined":
|
|
8745
|
-
"schedule-outlined":
|
|
8746
|
-
"search-outlined":
|
|
8747
|
-
"search-secured-outlined":
|
|
8748
|
-
"send-outlined":
|
|
8749
|
-
"share-1":
|
|
8750
|
-
"share-2":
|
|
8751
|
-
"share-outlined-2":
|
|
8752
|
-
"share-outlined":
|
|
8753
|
-
"shield-check-outlined":
|
|
8754
|
-
"shop-outlined":
|
|
8740
|
+
"restaurant-outlined": 59408,
|
|
8741
|
+
"resume-outlined": 59409,
|
|
8742
|
+
"return-arrow": 59410,
|
|
8743
|
+
"rostering-outlined": 59411,
|
|
8744
|
+
"safety-outlined": 59412,
|
|
8745
|
+
"save-outlined": 59413,
|
|
8746
|
+
"schedule-outlined": 59414,
|
|
8747
|
+
"search-outlined": 59415,
|
|
8748
|
+
"search-secured-outlined": 59416,
|
|
8749
|
+
"send-outlined": 59417,
|
|
8750
|
+
"share-1": 59418,
|
|
8751
|
+
"share-2": 59419,
|
|
8752
|
+
"share-outlined-2": 59420,
|
|
8753
|
+
"share-outlined": 59421,
|
|
8754
|
+
"shield-check-outlined": 59422,
|
|
8755
|
+
"shop-outlined": 59423,
|
|
8755
8756
|
shopping_basket_outlined: shopping_basket_outlined,
|
|
8756
|
-
"show-chart-outlined":
|
|
8757
|
-
"single-down-arrow":
|
|
8758
|
-
"single-left-arrow":
|
|
8759
|
-
"single-right-arrow":
|
|
8760
|
-
"single-up-arrow":
|
|
8761
|
-
"smart-match-outlined":
|
|
8762
|
-
"sparkle-outlined":
|
|
8763
|
-
"speaker-active-outlined":
|
|
8764
|
-
"speaker-outlined":
|
|
8765
|
-
"star-circle-outlined":
|
|
8766
|
-
"star-outlined":
|
|
8767
|
-
"start-break-outlined":
|
|
8768
|
-
"stash-outlined":
|
|
8769
|
-
"stopwatch-outlined":
|
|
8757
|
+
"show-chart-outlined": 59425,
|
|
8758
|
+
"single-down-arrow": 59426,
|
|
8759
|
+
"single-left-arrow": 59427,
|
|
8760
|
+
"single-right-arrow": 59428,
|
|
8761
|
+
"single-up-arrow": 59429,
|
|
8762
|
+
"smart-match-outlined": 59430,
|
|
8763
|
+
"sparkle-outlined": 59431,
|
|
8764
|
+
"speaker-active-outlined": 59432,
|
|
8765
|
+
"speaker-outlined": 59433,
|
|
8766
|
+
"star-circle-outlined": 59434,
|
|
8767
|
+
"star-outlined": 59435,
|
|
8768
|
+
"start-break-outlined": 59436,
|
|
8769
|
+
"stash-outlined": 59437,
|
|
8770
|
+
"stopwatch-outlined": 59438,
|
|
8770
8771
|
strikethrough: strikethrough,
|
|
8771
|
-
"styler-outlined":
|
|
8772
|
-
"suitcase-clock-outlined":
|
|
8773
|
-
"suitcase-outlined":
|
|
8774
|
-
"survey-outlined":
|
|
8775
|
-
"switch-outlined":
|
|
8772
|
+
"styler-outlined": 59440,
|
|
8773
|
+
"suitcase-clock-outlined": 59441,
|
|
8774
|
+
"suitcase-outlined": 59442,
|
|
8775
|
+
"survey-outlined": 59443,
|
|
8776
|
+
"switch-outlined": 59444,
|
|
8776
8777
|
sync: sync,
|
|
8777
|
-
"tag-outlined":
|
|
8778
|
-
"target-outlined":
|
|
8779
|
-
"tennis-outlined":
|
|
8780
|
-
"thumb-down-outlined":
|
|
8781
|
-
"thumb-up-outlined":
|
|
8782
|
-
"ticket-outlined":
|
|
8783
|
-
"timesheet-outlined":
|
|
8784
|
-
"timesheets-outlined":
|
|
8785
|
-
"today-outlined":
|
|
8778
|
+
"tag-outlined": 59446,
|
|
8779
|
+
"target-outlined": 59447,
|
|
8780
|
+
"tennis-outlined": 59448,
|
|
8781
|
+
"thumb-down-outlined": 59449,
|
|
8782
|
+
"thumb-up-outlined": 59450,
|
|
8783
|
+
"ticket-outlined": 59451,
|
|
8784
|
+
"timesheet-outlined": 59452,
|
|
8785
|
+
"timesheets-outlined": 59453,
|
|
8786
|
+
"today-outlined": 59454,
|
|
8786
8787
|
transfer: transfer,
|
|
8787
|
-
"transportation-outlined":
|
|
8788
|
-
"trash-bin-outlined":
|
|
8789
|
-
"umbrela-outlined":
|
|
8790
|
-
"unavailability-outlined":
|
|
8788
|
+
"transportation-outlined": 59456,
|
|
8789
|
+
"trash-bin-outlined": 59457,
|
|
8790
|
+
"umbrela-outlined": 59458,
|
|
8791
|
+
"unavailability-outlined": 59459,
|
|
8791
8792
|
unavailable: unavailable,
|
|
8792
8793
|
underline: underline,
|
|
8793
|
-
"union-outlined":
|
|
8794
|
-
"unlock-outlined":
|
|
8795
|
-
"upload-outlined":
|
|
8796
|
-
"user-circle-outlined":
|
|
8797
|
-
"user-gear-outlined":
|
|
8798
|
-
"user-outlined":
|
|
8799
|
-
"user-rectangle-outlined":
|
|
8800
|
-
"video-1-outlined":
|
|
8801
|
-
"video-2-outlined":
|
|
8802
|
-
"volunteer-outlined":
|
|
8803
|
-
"wallet-outlined":
|
|
8804
|
-
"wellness-outlined":
|
|
8794
|
+
"union-outlined": 59462,
|
|
8795
|
+
"unlock-outlined": 59463,
|
|
8796
|
+
"upload-outlined": 59464,
|
|
8797
|
+
"user-circle-outlined": 59465,
|
|
8798
|
+
"user-gear-outlined": 59466,
|
|
8799
|
+
"user-outlined": 59467,
|
|
8800
|
+
"user-rectangle-outlined": 59468,
|
|
8801
|
+
"video-1-outlined": 59469,
|
|
8802
|
+
"video-2-outlined": 59470,
|
|
8803
|
+
"volunteer-outlined": 59471,
|
|
8804
|
+
"wallet-outlined": 59472,
|
|
8805
|
+
"wellness-outlined": 59473
|
|
8805
8806
|
};
|
|
8806
8807
|
|
|
8807
8808
|
var HeroIcon = createIconSet(glyphMap, 'hero-icons-mobile', 'hero-icons-mobile.ttf');
|
|
@@ -11336,91 +11337,57 @@ var BottomSheet$1 = Object.assign(BottomSheet, {
|
|
|
11336
11337
|
ScrollView: BottomSheetScrollView
|
|
11337
11338
|
});
|
|
11338
11339
|
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
* @summary Useful constants
|
|
11342
|
-
* @description
|
|
11343
|
-
* Collection of useful date constants.
|
|
11344
|
-
*
|
|
11345
|
-
* The constants could be imported from `date-fns/constants`:
|
|
11346
|
-
*
|
|
11347
|
-
* ```ts
|
|
11348
|
-
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
|
11349
|
-
*
|
|
11350
|
-
* function isAllowedTime(time) {
|
|
11351
|
-
* return time <= maxTime && time >= minTime;
|
|
11352
|
-
* }
|
|
11353
|
-
* ```
|
|
11354
|
-
*/
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
/**
|
|
11358
|
-
* @constant
|
|
11359
|
-
* @name millisecondsInWeek
|
|
11360
|
-
* @summary Milliseconds in 1 week.
|
|
11361
|
-
*/
|
|
11362
|
-
var millisecondsInWeek = 604800000;
|
|
11340
|
+
function _typeof(o) {
|
|
11341
|
+
"@babel/helpers - typeof";
|
|
11363
11342
|
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11343
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
11344
|
+
return typeof o;
|
|
11345
|
+
} : function (o) {
|
|
11346
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
11347
|
+
}, _typeof(o);
|
|
11348
|
+
}
|
|
11370
11349
|
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
* The symbol is used to enable the `constructFrom` function to construct a date
|
|
11377
|
-
* using a reference date and a value. It allows to transfer extra properties
|
|
11378
|
-
* from the reference date to the new date. It's useful for extensions like
|
|
11379
|
-
* [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
|
|
11380
|
-
* a constructor argument.
|
|
11381
|
-
*/
|
|
11382
|
-
var constructFromSymbol = Symbol["for"]("constructDateFrom");
|
|
11350
|
+
function requiredArgs(required, args) {
|
|
11351
|
+
if (args.length < required) {
|
|
11352
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
11353
|
+
}
|
|
11354
|
+
}
|
|
11383
11355
|
|
|
11384
11356
|
/**
|
|
11385
|
-
* @name
|
|
11386
|
-
* @category
|
|
11387
|
-
* @summary
|
|
11357
|
+
* @name isDate
|
|
11358
|
+
* @category Common Helpers
|
|
11359
|
+
* @summary Is the given value a date?
|
|
11388
11360
|
*
|
|
11389
11361
|
* @description
|
|
11390
|
-
*
|
|
11391
|
-
* date and the given value. It helps to build generic functions that accept
|
|
11392
|
-
* date extensions.
|
|
11393
|
-
*
|
|
11394
|
-
* It defaults to `Date` if the passed reference date is a number or a string.
|
|
11395
|
-
*
|
|
11396
|
-
* Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
|
|
11397
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
11398
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
11399
|
-
* that accept a time zone as a constructor argument.
|
|
11362
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
11400
11363
|
*
|
|
11401
|
-
* @
|
|
11364
|
+
* @param {*} value - the value to check
|
|
11365
|
+
* @returns {boolean} true if the given value is a date
|
|
11366
|
+
* @throws {TypeError} 1 arguments required
|
|
11402
11367
|
*
|
|
11403
|
-
* @
|
|
11404
|
-
*
|
|
11368
|
+
* @example
|
|
11369
|
+
* // For a valid date:
|
|
11370
|
+
* const result = isDate(new Date())
|
|
11371
|
+
* //=> true
|
|
11405
11372
|
*
|
|
11406
|
-
* @
|
|
11373
|
+
* @example
|
|
11374
|
+
* // For an invalid date:
|
|
11375
|
+
* const result = isDate(new Date(NaN))
|
|
11376
|
+
* //=> true
|
|
11407
11377
|
*
|
|
11408
11378
|
* @example
|
|
11409
|
-
*
|
|
11379
|
+
* // For some value:
|
|
11380
|
+
* const result = isDate('2014-02-31')
|
|
11381
|
+
* //=> false
|
|
11410
11382
|
*
|
|
11411
|
-
*
|
|
11412
|
-
*
|
|
11413
|
-
*
|
|
11414
|
-
*
|
|
11415
|
-
* date.getTime() // Use the date value to create a new date
|
|
11416
|
-
* );
|
|
11417
|
-
* }
|
|
11383
|
+
* @example
|
|
11384
|
+
* // For an object:
|
|
11385
|
+
* const result = isDate({})
|
|
11386
|
+
* //=> false
|
|
11418
11387
|
*/
|
|
11419
|
-
function
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
if (date instanceof Date) return new date.constructor(value);
|
|
11423
|
-
return new Date(value);
|
|
11388
|
+
function isDate(value) {
|
|
11389
|
+
requiredArgs(1, arguments);
|
|
11390
|
+
return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
11424
11391
|
}
|
|
11425
11392
|
|
|
11426
11393
|
/**
|
|
@@ -11437,19 +11404,11 @@ function constructFrom(date, value) {
|
|
|
11437
11404
|
*
|
|
11438
11405
|
* If the argument is none of the above, the function returns Invalid Date.
|
|
11439
11406
|
*
|
|
11440
|
-
* Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
|
|
11441
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
11442
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
11443
|
-
* that accept a time zone as a constructor argument.
|
|
11444
|
-
*
|
|
11445
11407
|
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
11446
11408
|
*
|
|
11447
|
-
* @
|
|
11448
|
-
* @
|
|
11449
|
-
*
|
|
11450
|
-
* @param argument - The value to convert
|
|
11451
|
-
*
|
|
11452
|
-
* @returns The parsed date in the local time zone
|
|
11409
|
+
* @param {Date|Number} argument - the value to convert
|
|
11410
|
+
* @returns {Date} the parsed date in the local time zone
|
|
11411
|
+
* @throws {TypeError} 1 argument required
|
|
11453
11412
|
*
|
|
11454
11413
|
* @example
|
|
11455
11414
|
* // Clone the date:
|
|
@@ -11461,344 +11420,25 @@ function constructFrom(date, value) {
|
|
|
11461
11420
|
* const result = toDate(1392098430000)
|
|
11462
11421
|
* //=> Tue Feb 11 2014 11:30:30
|
|
11463
11422
|
*/
|
|
11464
|
-
function toDate(argument
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
* @param arity - The arity of the function
|
|
11475
|
-
* @param curriedArgs - The curried arguments
|
|
11476
|
-
*
|
|
11477
|
-
* @returns FP version of the function
|
|
11478
|
-
*
|
|
11479
|
-
* @private
|
|
11480
|
-
*/
|
|
11481
|
-
function convertToFP(fn, arity) {
|
|
11482
|
-
var curriedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
11483
|
-
return curriedArgs.length >= arity ? fn.apply(void 0, _toConsumableArray(curriedArgs.slice(0, arity).reverse())) : function () {
|
|
11484
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11485
|
-
args[_key] = arguments[_key];
|
|
11486
|
-
}
|
|
11487
|
-
return convertToFP(fn, arity, curriedArgs.concat(args));
|
|
11488
|
-
};
|
|
11489
|
-
}
|
|
11490
|
-
|
|
11491
|
-
var defaultOptions = {};
|
|
11492
|
-
function getDefaultOptions() {
|
|
11493
|
-
return defaultOptions;
|
|
11494
|
-
}
|
|
11495
|
-
function setDefaultOptions$1(newOptions) {
|
|
11496
|
-
defaultOptions = newOptions;
|
|
11497
|
-
}
|
|
11498
|
-
|
|
11499
|
-
/**
|
|
11500
|
-
* The {@link startOfWeek} function options.
|
|
11501
|
-
*/
|
|
11502
|
-
|
|
11503
|
-
/**
|
|
11504
|
-
* @name startOfWeek
|
|
11505
|
-
* @category Week Helpers
|
|
11506
|
-
* @summary Return the start of a week for the given date.
|
|
11507
|
-
*
|
|
11508
|
-
* @description
|
|
11509
|
-
* Return the start of a week for the given date.
|
|
11510
|
-
* The result will be in the local timezone.
|
|
11511
|
-
*
|
|
11512
|
-
* @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).
|
|
11513
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11514
|
-
*
|
|
11515
|
-
* @param date - The original date
|
|
11516
|
-
* @param options - An object with options
|
|
11517
|
-
*
|
|
11518
|
-
* @returns The start of a week
|
|
11519
|
-
*
|
|
11520
|
-
* @example
|
|
11521
|
-
* // The start of a week for 2 September 2014 11:55:00:
|
|
11522
|
-
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
11523
|
-
* //=> Sun Aug 31 2014 00:00:00
|
|
11524
|
-
*
|
|
11525
|
-
* @example
|
|
11526
|
-
* // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
|
|
11527
|
-
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
|
|
11528
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
11529
|
-
*/
|
|
11530
|
-
function startOfWeek(date, options) {
|
|
11531
|
-
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions$local;
|
|
11532
|
-
var defaultOptions = getDefaultOptions();
|
|
11533
|
-
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;
|
|
11534
|
-
var _date = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
11535
|
-
var day = _date.getDay();
|
|
11536
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
11537
|
-
_date.setDate(_date.getDate() - diff);
|
|
11538
|
-
_date.setHours(0, 0, 0, 0);
|
|
11539
|
-
return _date;
|
|
11540
|
-
}
|
|
11541
|
-
|
|
11542
|
-
/**
|
|
11543
|
-
* The {@link startOfISOWeek} function options.
|
|
11544
|
-
*/
|
|
11545
|
-
|
|
11546
|
-
/**
|
|
11547
|
-
* @name startOfISOWeek
|
|
11548
|
-
* @category ISO Week Helpers
|
|
11549
|
-
* @summary Return the start of an ISO week for the given date.
|
|
11550
|
-
*
|
|
11551
|
-
* @description
|
|
11552
|
-
* Return the start of an ISO week for the given date.
|
|
11553
|
-
* The result will be in the local timezone.
|
|
11554
|
-
*
|
|
11555
|
-
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11556
|
-
*
|
|
11557
|
-
* @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).
|
|
11558
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11559
|
-
*
|
|
11560
|
-
* @param date - The original date
|
|
11561
|
-
* @param options - An object with options
|
|
11562
|
-
*
|
|
11563
|
-
* @returns The start of an ISO week
|
|
11564
|
-
*
|
|
11565
|
-
* @example
|
|
11566
|
-
* // The start of an ISO week for 2 September 2014 11:55:00:
|
|
11567
|
-
* const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
11568
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
11569
|
-
*/
|
|
11570
|
-
function startOfISOWeek(date, options) {
|
|
11571
|
-
return startOfWeek(date, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
11572
|
-
weekStartsOn: 1
|
|
11573
|
-
}));
|
|
11574
|
-
}
|
|
11575
|
-
|
|
11576
|
-
/**
|
|
11577
|
-
* The {@link getISOWeekYear} function options.
|
|
11578
|
-
*/
|
|
11579
|
-
|
|
11580
|
-
/**
|
|
11581
|
-
* @name getISOWeekYear
|
|
11582
|
-
* @category ISO Week-Numbering Year Helpers
|
|
11583
|
-
* @summary Get the ISO week-numbering year of the given date.
|
|
11584
|
-
*
|
|
11585
|
-
* @description
|
|
11586
|
-
* Get the ISO week-numbering year of the given date,
|
|
11587
|
-
* which always starts 3 days before the year's first Thursday.
|
|
11588
|
-
*
|
|
11589
|
-
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11590
|
-
*
|
|
11591
|
-
* @param date - The given date
|
|
11592
|
-
*
|
|
11593
|
-
* @returns The ISO week-numbering year
|
|
11594
|
-
*
|
|
11595
|
-
* @example
|
|
11596
|
-
* // Which ISO-week numbering year is 2 January 2005?
|
|
11597
|
-
* const result = getISOWeekYear(new Date(2005, 0, 2))
|
|
11598
|
-
* //=> 2004
|
|
11599
|
-
*/
|
|
11600
|
-
function getISOWeekYear(date, options) {
|
|
11601
|
-
var _date = toDate(date, void 0 );
|
|
11602
|
-
var year = _date.getFullYear();
|
|
11603
|
-
var fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
|
|
11604
|
-
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
11605
|
-
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
11606
|
-
var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
11607
|
-
var fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
|
|
11608
|
-
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
11609
|
-
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
11610
|
-
var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
11611
|
-
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
11612
|
-
return year + 1;
|
|
11613
|
-
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
11614
|
-
return year;
|
|
11423
|
+
function toDate(argument) {
|
|
11424
|
+
requiredArgs(1, arguments);
|
|
11425
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
11426
|
+
|
|
11427
|
+
// Clone the date
|
|
11428
|
+
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
11429
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
11430
|
+
return new Date(argument.getTime());
|
|
11431
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
11432
|
+
return new Date(argument);
|
|
11615
11433
|
} else {
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
11624
|
-
* and GMT+01:00:00 after that date)
|
|
11625
|
-
*
|
|
11626
|
-
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
11627
|
-
* which would lead to incorrect calculations.
|
|
11628
|
-
*
|
|
11629
|
-
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
11630
|
-
*/
|
|
11631
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
11632
|
-
var _date = toDate(date);
|
|
11633
|
-
var utcDate = new Date(Date.UTC(_date.getFullYear(), _date.getMonth(), _date.getDate(), _date.getHours(), _date.getMinutes(), _date.getSeconds(), _date.getMilliseconds()));
|
|
11634
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
11635
|
-
return +date - +utcDate;
|
|
11636
|
-
}
|
|
11637
|
-
|
|
11638
|
-
function normalizeDates(context) {
|
|
11639
|
-
for (var _len = arguments.length, dates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11640
|
-
dates[_key - 1] = arguments[_key];
|
|
11434
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
11435
|
+
// eslint-disable-next-line no-console
|
|
11436
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
11437
|
+
// eslint-disable-next-line no-console
|
|
11438
|
+
console.warn(new Error().stack);
|
|
11439
|
+
}
|
|
11440
|
+
return new Date(NaN);
|
|
11641
11441
|
}
|
|
11642
|
-
var normalize = constructFrom.bind(null, dates.find(function (date) {
|
|
11643
|
-
return _typeof(date) === "object";
|
|
11644
|
-
}));
|
|
11645
|
-
return dates.map(normalize);
|
|
11646
|
-
}
|
|
11647
|
-
|
|
11648
|
-
/**
|
|
11649
|
-
* The {@link startOfDay} function options.
|
|
11650
|
-
*/
|
|
11651
|
-
|
|
11652
|
-
/**
|
|
11653
|
-
* @name startOfDay
|
|
11654
|
-
* @category Day Helpers
|
|
11655
|
-
* @summary Return the start of a day for the given date.
|
|
11656
|
-
*
|
|
11657
|
-
* @description
|
|
11658
|
-
* Return the start of a day for the given date.
|
|
11659
|
-
* The result will be in the local timezone.
|
|
11660
|
-
*
|
|
11661
|
-
* @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).
|
|
11662
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11663
|
-
*
|
|
11664
|
-
* @param date - The original date
|
|
11665
|
-
* @param options - The options
|
|
11666
|
-
*
|
|
11667
|
-
* @returns The start of a day
|
|
11668
|
-
*
|
|
11669
|
-
* @example
|
|
11670
|
-
* // The start of a day for 2 September 2014 11:55:00:
|
|
11671
|
-
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
11672
|
-
* //=> Tue Sep 02 2014 00:00:00
|
|
11673
|
-
*/
|
|
11674
|
-
function startOfDay(date, options) {
|
|
11675
|
-
var _date = toDate(date, void 0 );
|
|
11676
|
-
_date.setHours(0, 0, 0, 0);
|
|
11677
|
-
return _date;
|
|
11678
|
-
}
|
|
11679
|
-
|
|
11680
|
-
/**
|
|
11681
|
-
* The {@link differenceInCalendarDays} function options.
|
|
11682
|
-
*/
|
|
11683
|
-
|
|
11684
|
-
/**
|
|
11685
|
-
* @name differenceInCalendarDays
|
|
11686
|
-
* @category Day Helpers
|
|
11687
|
-
* @summary Get the number of calendar days between the given dates.
|
|
11688
|
-
*
|
|
11689
|
-
* @description
|
|
11690
|
-
* Get the number of calendar days between the given dates. This means that the times are removed
|
|
11691
|
-
* from the dates and then the difference in days is calculated.
|
|
11692
|
-
*
|
|
11693
|
-
* @param laterDate - The later date
|
|
11694
|
-
* @param earlierDate - The earlier date
|
|
11695
|
-
* @param options - The options object
|
|
11696
|
-
*
|
|
11697
|
-
* @returns The number of calendar days
|
|
11698
|
-
*
|
|
11699
|
-
* @example
|
|
11700
|
-
* // How many calendar days are between
|
|
11701
|
-
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
|
|
11702
|
-
* const result = differenceInCalendarDays(
|
|
11703
|
-
* new Date(2012, 6, 2, 0, 0),
|
|
11704
|
-
* new Date(2011, 6, 2, 23, 0)
|
|
11705
|
-
* )
|
|
11706
|
-
* //=> 366
|
|
11707
|
-
* // How many calendar days are between
|
|
11708
|
-
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
|
|
11709
|
-
* const result = differenceInCalendarDays(
|
|
11710
|
-
* new Date(2011, 6, 3, 0, 1),
|
|
11711
|
-
* new Date(2011, 6, 2, 23, 59)
|
|
11712
|
-
* )
|
|
11713
|
-
* //=> 1
|
|
11714
|
-
*/
|
|
11715
|
-
function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
11716
|
-
var _normalizeDates = normalizeDates(void 0 , laterDate, earlierDate),
|
|
11717
|
-
_normalizeDates2 = _slicedToArray(_normalizeDates, 2),
|
|
11718
|
-
laterDate_ = _normalizeDates2[0],
|
|
11719
|
-
earlierDate_ = _normalizeDates2[1];
|
|
11720
|
-
var laterStartOfDay = startOfDay(laterDate_);
|
|
11721
|
-
var earlierStartOfDay = startOfDay(earlierDate_);
|
|
11722
|
-
var laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
11723
|
-
var earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
11724
|
-
|
|
11725
|
-
// Round the number of days to the nearest integer because the number of
|
|
11726
|
-
// milliseconds in a day is not constant (e.g. it's different in the week of
|
|
11727
|
-
// the daylight saving time clock shift).
|
|
11728
|
-
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
11729
|
-
}
|
|
11730
|
-
|
|
11731
|
-
/**
|
|
11732
|
-
* The {@link startOfISOWeekYear} function options.
|
|
11733
|
-
*/
|
|
11734
|
-
|
|
11735
|
-
/**
|
|
11736
|
-
* @name startOfISOWeekYear
|
|
11737
|
-
* @category ISO Week-Numbering Year Helpers
|
|
11738
|
-
* @summary Return the start of an ISO week-numbering year for the given date.
|
|
11739
|
-
*
|
|
11740
|
-
* @description
|
|
11741
|
-
* Return the start of an ISO week-numbering year,
|
|
11742
|
-
* which always starts 3 days before the year's first Thursday.
|
|
11743
|
-
* The result will be in the local timezone.
|
|
11744
|
-
*
|
|
11745
|
-
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11746
|
-
*
|
|
11747
|
-
* @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).
|
|
11748
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11749
|
-
*
|
|
11750
|
-
* @param date - The original date
|
|
11751
|
-
* @param options - An object with options
|
|
11752
|
-
*
|
|
11753
|
-
* @returns The start of an ISO week-numbering year
|
|
11754
|
-
*
|
|
11755
|
-
* @example
|
|
11756
|
-
* // The start of an ISO week-numbering year for 2 July 2005:
|
|
11757
|
-
* const result = startOfISOWeekYear(new Date(2005, 6, 2))
|
|
11758
|
-
* //=> Mon Jan 03 2005 00:00:00
|
|
11759
|
-
*/
|
|
11760
|
-
function startOfISOWeekYear(date, options) {
|
|
11761
|
-
var year = getISOWeekYear(date);
|
|
11762
|
-
var fourthOfJanuary = constructFrom(date, 0);
|
|
11763
|
-
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
11764
|
-
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
11765
|
-
return startOfISOWeek(fourthOfJanuary);
|
|
11766
|
-
}
|
|
11767
|
-
|
|
11768
|
-
/**
|
|
11769
|
-
* @name isDate
|
|
11770
|
-
* @category Common Helpers
|
|
11771
|
-
* @summary Is the given value a date?
|
|
11772
|
-
*
|
|
11773
|
-
* @description
|
|
11774
|
-
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
11775
|
-
*
|
|
11776
|
-
* @param value - The value to check
|
|
11777
|
-
*
|
|
11778
|
-
* @returns True if the given value is a date
|
|
11779
|
-
*
|
|
11780
|
-
* @example
|
|
11781
|
-
* // For a valid date:
|
|
11782
|
-
* const result = isDate(new Date())
|
|
11783
|
-
* //=> true
|
|
11784
|
-
*
|
|
11785
|
-
* @example
|
|
11786
|
-
* // For an invalid date:
|
|
11787
|
-
* const result = isDate(new Date(NaN))
|
|
11788
|
-
* //=> true
|
|
11789
|
-
*
|
|
11790
|
-
* @example
|
|
11791
|
-
* // For some value:
|
|
11792
|
-
* const result = isDate('2014-02-31')
|
|
11793
|
-
* //=> false
|
|
11794
|
-
*
|
|
11795
|
-
* @example
|
|
11796
|
-
* // For an object:
|
|
11797
|
-
* const result = isDate({})
|
|
11798
|
-
* //=> false
|
|
11799
|
-
*/
|
|
11800
|
-
function isDate(value) {
|
|
11801
|
-
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
11802
11442
|
}
|
|
11803
11443
|
|
|
11804
11444
|
/**
|
|
@@ -11808,14 +11448,14 @@ function isDate(value) {
|
|
|
11808
11448
|
*
|
|
11809
11449
|
* @description
|
|
11810
11450
|
* Returns false if argument is Invalid Date and true otherwise.
|
|
11811
|
-
* Argument is converted to Date using `toDate`. See [toDate]
|
|
11451
|
+
* Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
|
|
11812
11452
|
* Invalid Date is a Date, whose time value is NaN.
|
|
11813
11453
|
*
|
|
11814
11454
|
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
11815
11455
|
*
|
|
11816
|
-
* @param date -
|
|
11817
|
-
*
|
|
11818
|
-
* @
|
|
11456
|
+
* @param {*} date - the date to check
|
|
11457
|
+
* @returns {Boolean} the date is valid
|
|
11458
|
+
* @throws {TypeError} 1 argument required
|
|
11819
11459
|
*
|
|
11820
11460
|
* @example
|
|
11821
11461
|
* // For the valid date:
|
|
@@ -11823,7 +11463,7 @@ function isDate(value) {
|
|
|
11823
11463
|
* //=> true
|
|
11824
11464
|
*
|
|
11825
11465
|
* @example
|
|
11826
|
-
* // For the value,
|
|
11466
|
+
* // For the value, convertable into a date:
|
|
11827
11467
|
* const result = isValid(1393804800000)
|
|
11828
11468
|
* //=> true
|
|
11829
11469
|
*
|
|
@@ -11832,794 +11472,227 @@ function isDate(value) {
|
|
|
11832
11472
|
* const result = isValid(new Date(''))
|
|
11833
11473
|
* //=> false
|
|
11834
11474
|
*/
|
|
11835
|
-
function isValid(
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
/**
|
|
11840
|
-
* The {@link startOfYear} function options.
|
|
11841
|
-
*/
|
|
11842
|
-
|
|
11843
|
-
/**
|
|
11844
|
-
* @name startOfYear
|
|
11845
|
-
* @category Year Helpers
|
|
11846
|
-
* @summary Return the start of a year for the given date.
|
|
11847
|
-
*
|
|
11848
|
-
* @description
|
|
11849
|
-
* Return the start of a year for the given date.
|
|
11850
|
-
* The result will be in the local timezone.
|
|
11851
|
-
*
|
|
11852
|
-
* @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).
|
|
11853
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
11854
|
-
*
|
|
11855
|
-
* @param date - The original date
|
|
11856
|
-
* @param options - The options
|
|
11857
|
-
*
|
|
11858
|
-
* @returns The start of a year
|
|
11859
|
-
*
|
|
11860
|
-
* @example
|
|
11861
|
-
* // The start of a year for 2 September 2014 11:55:00:
|
|
11862
|
-
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
11863
|
-
* //=> Wed Jan 01 2014 00:00:00
|
|
11864
|
-
*/
|
|
11865
|
-
function startOfYear(date, options) {
|
|
11866
|
-
var date_ = toDate(date, void 0 );
|
|
11867
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
11868
|
-
date_.setHours(0, 0, 0, 0);
|
|
11869
|
-
return date_;
|
|
11870
|
-
}
|
|
11871
|
-
|
|
11872
|
-
var formatDistanceLocale$1 = {
|
|
11873
|
-
lessThanXSeconds: {
|
|
11874
|
-
one: "less than a second",
|
|
11875
|
-
other: "less than {{count}} seconds"
|
|
11876
|
-
},
|
|
11877
|
-
xSeconds: {
|
|
11878
|
-
one: "1 second",
|
|
11879
|
-
other: "{{count}} seconds"
|
|
11880
|
-
},
|
|
11881
|
-
halfAMinute: "half a minute",
|
|
11882
|
-
lessThanXMinutes: {
|
|
11883
|
-
one: "less than a minute",
|
|
11884
|
-
other: "less than {{count}} minutes"
|
|
11885
|
-
},
|
|
11886
|
-
xMinutes: {
|
|
11887
|
-
one: "1 minute",
|
|
11888
|
-
other: "{{count}} minutes"
|
|
11889
|
-
},
|
|
11890
|
-
aboutXHours: {
|
|
11891
|
-
one: "about 1 hour",
|
|
11892
|
-
other: "about {{count}} hours"
|
|
11893
|
-
},
|
|
11894
|
-
xHours: {
|
|
11895
|
-
one: "1 hour",
|
|
11896
|
-
other: "{{count}} hours"
|
|
11897
|
-
},
|
|
11898
|
-
xDays: {
|
|
11899
|
-
one: "1 day",
|
|
11900
|
-
other: "{{count}} days"
|
|
11901
|
-
},
|
|
11902
|
-
aboutXWeeks: {
|
|
11903
|
-
one: "about 1 week",
|
|
11904
|
-
other: "about {{count}} weeks"
|
|
11905
|
-
},
|
|
11906
|
-
xWeeks: {
|
|
11907
|
-
one: "1 week",
|
|
11908
|
-
other: "{{count}} weeks"
|
|
11909
|
-
},
|
|
11910
|
-
aboutXMonths: {
|
|
11911
|
-
one: "about 1 month",
|
|
11912
|
-
other: "about {{count}} months"
|
|
11913
|
-
},
|
|
11914
|
-
xMonths: {
|
|
11915
|
-
one: "1 month",
|
|
11916
|
-
other: "{{count}} months"
|
|
11917
|
-
},
|
|
11918
|
-
aboutXYears: {
|
|
11919
|
-
one: "about 1 year",
|
|
11920
|
-
other: "about {{count}} years"
|
|
11921
|
-
},
|
|
11922
|
-
xYears: {
|
|
11923
|
-
one: "1 year",
|
|
11924
|
-
other: "{{count}} years"
|
|
11925
|
-
},
|
|
11926
|
-
overXYears: {
|
|
11927
|
-
one: "over 1 year",
|
|
11928
|
-
other: "over {{count}} years"
|
|
11929
|
-
},
|
|
11930
|
-
almostXYears: {
|
|
11931
|
-
one: "almost 1 year",
|
|
11932
|
-
other: "almost {{count}} years"
|
|
11933
|
-
}
|
|
11934
|
-
};
|
|
11935
|
-
var formatDistance$1 = function formatDistance(token, count, options) {
|
|
11936
|
-
var result;
|
|
11937
|
-
var tokenValue = formatDistanceLocale$1[token];
|
|
11938
|
-
if (typeof tokenValue === "string") {
|
|
11939
|
-
result = tokenValue;
|
|
11940
|
-
} else if (count === 1) {
|
|
11941
|
-
result = tokenValue.one;
|
|
11942
|
-
} else {
|
|
11943
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
11944
|
-
}
|
|
11945
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
11946
|
-
if (options.comparison && options.comparison > 0) {
|
|
11947
|
-
return "in " + result;
|
|
11948
|
-
} else {
|
|
11949
|
-
return result + " ago";
|
|
11950
|
-
}
|
|
11475
|
+
function isValid(dirtyDate) {
|
|
11476
|
+
requiredArgs(1, arguments);
|
|
11477
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
11478
|
+
return false;
|
|
11951
11479
|
}
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
function buildFormatLongFn(args) {
|
|
11956
|
-
return function () {
|
|
11957
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11958
|
-
// TODO: Remove String()
|
|
11959
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
11960
|
-
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
11961
|
-
return format;
|
|
11962
|
-
};
|
|
11480
|
+
var date = toDate(dirtyDate);
|
|
11481
|
+
return !isNaN(Number(date));
|
|
11963
11482
|
}
|
|
11964
11483
|
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
medium: "MMM d, y",
|
|
11969
|
-
"short": "MM/dd/yyyy"
|
|
11970
|
-
};
|
|
11971
|
-
var timeFormats$2 = {
|
|
11972
|
-
full: "h:mm:ss a zzzz",
|
|
11973
|
-
"long": "h:mm:ss a z",
|
|
11974
|
-
medium: "h:mm:ss a",
|
|
11975
|
-
"short": "h:mm a"
|
|
11976
|
-
};
|
|
11977
|
-
var dateTimeFormats$2 = {
|
|
11978
|
-
full: "{{date}} 'at' {{time}}",
|
|
11979
|
-
"long": "{{date}} 'at' {{time}}",
|
|
11980
|
-
medium: "{{date}}, {{time}}",
|
|
11981
|
-
"short": "{{date}}, {{time}}"
|
|
11982
|
-
};
|
|
11983
|
-
var formatLong$2 = {
|
|
11984
|
-
date: buildFormatLongFn({
|
|
11985
|
-
formats: dateFormats$2,
|
|
11986
|
-
defaultWidth: "full"
|
|
11987
|
-
}),
|
|
11988
|
-
time: buildFormatLongFn({
|
|
11989
|
-
formats: timeFormats$2,
|
|
11990
|
-
defaultWidth: "full"
|
|
11991
|
-
}),
|
|
11992
|
-
dateTime: buildFormatLongFn({
|
|
11993
|
-
formats: dateTimeFormats$2,
|
|
11994
|
-
defaultWidth: "full"
|
|
11995
|
-
})
|
|
11996
|
-
};
|
|
11997
|
-
|
|
11998
|
-
var formatRelativeLocale = {
|
|
11999
|
-
lastWeek: "'last' eeee 'at' p",
|
|
12000
|
-
yesterday: "'yesterday at' p",
|
|
12001
|
-
today: "'today at' p",
|
|
12002
|
-
tomorrow: "'tomorrow at' p",
|
|
12003
|
-
nextWeek: "eeee 'at' p",
|
|
12004
|
-
other: "P"
|
|
12005
|
-
};
|
|
12006
|
-
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
12007
|
-
return formatRelativeLocale[token];
|
|
12008
|
-
};
|
|
12009
|
-
|
|
12010
|
-
/**
|
|
12011
|
-
* The localize function argument callback which allows to convert raw value to
|
|
12012
|
-
* the actual type.
|
|
12013
|
-
*
|
|
12014
|
-
* @param value - The value to convert
|
|
12015
|
-
*
|
|
12016
|
-
* @returns The converted value
|
|
12017
|
-
*/
|
|
12018
|
-
|
|
12019
|
-
/**
|
|
12020
|
-
* The map of localized values for each width.
|
|
12021
|
-
*/
|
|
12022
|
-
|
|
12023
|
-
/**
|
|
12024
|
-
* The index type of the locale unit value. It types conversion of units of
|
|
12025
|
-
* values that don't start at 0 (i.e. quarters).
|
|
12026
|
-
*/
|
|
12027
|
-
|
|
12028
|
-
/**
|
|
12029
|
-
* Converts the unit value to the tuple of values.
|
|
12030
|
-
*/
|
|
12031
|
-
|
|
12032
|
-
/**
|
|
12033
|
-
* The tuple of localized era values. The first element represents BC,
|
|
12034
|
-
* the second element represents AD.
|
|
12035
|
-
*/
|
|
12036
|
-
|
|
12037
|
-
/**
|
|
12038
|
-
* The tuple of localized quarter values. The first element represents Q1.
|
|
12039
|
-
*/
|
|
12040
|
-
|
|
12041
|
-
/**
|
|
12042
|
-
* The tuple of localized day values. The first element represents Sunday.
|
|
12043
|
-
*/
|
|
12044
|
-
|
|
12045
|
-
/**
|
|
12046
|
-
* The tuple of localized month values. The first element represents January.
|
|
12047
|
-
*/
|
|
12048
|
-
|
|
12049
|
-
function buildLocalizeFn(args) {
|
|
12050
|
-
return function (value, options) {
|
|
12051
|
-
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
12052
|
-
var valuesArray;
|
|
12053
|
-
if (context === "formatting" && args.formattingValues) {
|
|
12054
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
12055
|
-
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
12056
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
12057
|
-
} else {
|
|
12058
|
-
var _defaultWidth = args.defaultWidth;
|
|
12059
|
-
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
12060
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
12061
|
-
}
|
|
12062
|
-
var index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
12063
|
-
|
|
12064
|
-
// @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!
|
|
12065
|
-
return valuesArray[index];
|
|
12066
|
-
};
|
|
12067
|
-
}
|
|
12068
|
-
|
|
12069
|
-
var eraValues = {
|
|
12070
|
-
narrow: ["B", "A"],
|
|
12071
|
-
abbreviated: ["BC", "AD"],
|
|
12072
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
12073
|
-
};
|
|
12074
|
-
var quarterValues = {
|
|
12075
|
-
narrow: ["1", "2", "3", "4"],
|
|
12076
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
12077
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
12078
|
-
};
|
|
12079
|
-
|
|
12080
|
-
// Note: in English, the names of days of the week and months are capitalized.
|
|
12081
|
-
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
12082
|
-
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
12083
|
-
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
12084
|
-
var monthValues = {
|
|
12085
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
12086
|
-
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
12087
|
-
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
12088
|
-
};
|
|
12089
|
-
var dayValues = {
|
|
12090
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
12091
|
-
"short": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
12092
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
12093
|
-
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
12094
|
-
};
|
|
12095
|
-
var dayPeriodValues = {
|
|
12096
|
-
narrow: {
|
|
12097
|
-
am: "a",
|
|
12098
|
-
pm: "p",
|
|
12099
|
-
midnight: "mi",
|
|
12100
|
-
noon: "n",
|
|
12101
|
-
morning: "morning",
|
|
12102
|
-
afternoon: "afternoon",
|
|
12103
|
-
evening: "evening",
|
|
12104
|
-
night: "night"
|
|
12105
|
-
},
|
|
12106
|
-
abbreviated: {
|
|
12107
|
-
am: "AM",
|
|
12108
|
-
pm: "PM",
|
|
12109
|
-
midnight: "midnight",
|
|
12110
|
-
noon: "noon",
|
|
12111
|
-
morning: "morning",
|
|
12112
|
-
afternoon: "afternoon",
|
|
12113
|
-
evening: "evening",
|
|
12114
|
-
night: "night"
|
|
12115
|
-
},
|
|
12116
|
-
wide: {
|
|
12117
|
-
am: "a.m.",
|
|
12118
|
-
pm: "p.m.",
|
|
12119
|
-
midnight: "midnight",
|
|
12120
|
-
noon: "noon",
|
|
12121
|
-
morning: "morning",
|
|
12122
|
-
afternoon: "afternoon",
|
|
12123
|
-
evening: "evening",
|
|
12124
|
-
night: "night"
|
|
12125
|
-
}
|
|
12126
|
-
};
|
|
12127
|
-
var formattingDayPeriodValues = {
|
|
12128
|
-
narrow: {
|
|
12129
|
-
am: "a",
|
|
12130
|
-
pm: "p",
|
|
12131
|
-
midnight: "mi",
|
|
12132
|
-
noon: "n",
|
|
12133
|
-
morning: "in the morning",
|
|
12134
|
-
afternoon: "in the afternoon",
|
|
12135
|
-
evening: "in the evening",
|
|
12136
|
-
night: "at night"
|
|
12137
|
-
},
|
|
12138
|
-
abbreviated: {
|
|
12139
|
-
am: "AM",
|
|
12140
|
-
pm: "PM",
|
|
12141
|
-
midnight: "midnight",
|
|
12142
|
-
noon: "noon",
|
|
12143
|
-
morning: "in the morning",
|
|
12144
|
-
afternoon: "in the afternoon",
|
|
12145
|
-
evening: "in the evening",
|
|
12146
|
-
night: "at night"
|
|
12147
|
-
},
|
|
12148
|
-
wide: {
|
|
12149
|
-
am: "a.m.",
|
|
12150
|
-
pm: "p.m.",
|
|
12151
|
-
midnight: "midnight",
|
|
12152
|
-
noon: "noon",
|
|
12153
|
-
morning: "in the morning",
|
|
12154
|
-
afternoon: "in the afternoon",
|
|
12155
|
-
evening: "in the evening",
|
|
12156
|
-
night: "at night"
|
|
11484
|
+
function toInteger(dirtyNumber) {
|
|
11485
|
+
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
11486
|
+
return NaN;
|
|
12157
11487
|
}
|
|
12158
|
-
};
|
|
12159
|
-
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
12160
11488
|
var number = Number(dirtyNumber);
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
// if they are different for different grammatical genders,
|
|
12164
|
-
// use `options.unit`.
|
|
12165
|
-
//
|
|
12166
|
-
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
12167
|
-
// 'day', 'hour', 'minute', 'second'.
|
|
12168
|
-
|
|
12169
|
-
var rem100 = number % 100;
|
|
12170
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
12171
|
-
switch (rem100 % 10) {
|
|
12172
|
-
case 1:
|
|
12173
|
-
return number + "st";
|
|
12174
|
-
case 2:
|
|
12175
|
-
return number + "nd";
|
|
12176
|
-
case 3:
|
|
12177
|
-
return number + "rd";
|
|
12178
|
-
}
|
|
11489
|
+
if (isNaN(number)) {
|
|
11490
|
+
return number;
|
|
12179
11491
|
}
|
|
12180
|
-
return number
|
|
12181
|
-
};
|
|
12182
|
-
var localize = {
|
|
12183
|
-
ordinalNumber: ordinalNumber,
|
|
12184
|
-
era: buildLocalizeFn({
|
|
12185
|
-
values: eraValues,
|
|
12186
|
-
defaultWidth: "wide"
|
|
12187
|
-
}),
|
|
12188
|
-
quarter: buildLocalizeFn({
|
|
12189
|
-
values: quarterValues,
|
|
12190
|
-
defaultWidth: "wide",
|
|
12191
|
-
argumentCallback: function argumentCallback(quarter) {
|
|
12192
|
-
return quarter - 1;
|
|
12193
|
-
}
|
|
12194
|
-
}),
|
|
12195
|
-
month: buildLocalizeFn({
|
|
12196
|
-
values: monthValues,
|
|
12197
|
-
defaultWidth: "wide"
|
|
12198
|
-
}),
|
|
12199
|
-
day: buildLocalizeFn({
|
|
12200
|
-
values: dayValues,
|
|
12201
|
-
defaultWidth: "wide"
|
|
12202
|
-
}),
|
|
12203
|
-
dayPeriod: buildLocalizeFn({
|
|
12204
|
-
values: dayPeriodValues,
|
|
12205
|
-
defaultWidth: "wide",
|
|
12206
|
-
formattingValues: formattingDayPeriodValues,
|
|
12207
|
-
defaultFormattingWidth: "wide"
|
|
12208
|
-
})
|
|
12209
|
-
};
|
|
12210
|
-
|
|
12211
|
-
function buildMatchFn(args) {
|
|
12212
|
-
return function (string) {
|
|
12213
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12214
|
-
var width = options.width;
|
|
12215
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
12216
|
-
var matchResult = string.match(matchPattern);
|
|
12217
|
-
if (!matchResult) {
|
|
12218
|
-
return null;
|
|
12219
|
-
}
|
|
12220
|
-
var matchedString = matchResult[0];
|
|
12221
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
12222
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
12223
|
-
return pattern.test(matchedString);
|
|
12224
|
-
}) :
|
|
12225
|
-
// [TODO] -- I challenge you to fix the type
|
|
12226
|
-
findKey(parsePatterns, function (pattern) {
|
|
12227
|
-
return pattern.test(matchedString);
|
|
12228
|
-
});
|
|
12229
|
-
var value;
|
|
12230
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
12231
|
-
value = options.valueCallback ?
|
|
12232
|
-
// [TODO] -- I challenge you to fix the type
|
|
12233
|
-
options.valueCallback(value) : value;
|
|
12234
|
-
var rest = string.slice(matchedString.length);
|
|
12235
|
-
return {
|
|
12236
|
-
value: value,
|
|
12237
|
-
rest: rest
|
|
12238
|
-
};
|
|
12239
|
-
};
|
|
12240
|
-
}
|
|
12241
|
-
function findKey(object, predicate) {
|
|
12242
|
-
for (var key in object) {
|
|
12243
|
-
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
12244
|
-
return key;
|
|
12245
|
-
}
|
|
12246
|
-
}
|
|
12247
|
-
return undefined;
|
|
12248
|
-
}
|
|
12249
|
-
function findIndex(array, predicate) {
|
|
12250
|
-
for (var key = 0; key < array.length; key++) {
|
|
12251
|
-
if (predicate(array[key])) {
|
|
12252
|
-
return key;
|
|
12253
|
-
}
|
|
12254
|
-
}
|
|
12255
|
-
return undefined;
|
|
12256
|
-
}
|
|
12257
|
-
|
|
12258
|
-
function buildMatchPatternFn(args) {
|
|
12259
|
-
return function (string) {
|
|
12260
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12261
|
-
var matchResult = string.match(args.matchPattern);
|
|
12262
|
-
if (!matchResult) return null;
|
|
12263
|
-
var matchedString = matchResult[0];
|
|
12264
|
-
var parseResult = string.match(args.parsePattern);
|
|
12265
|
-
if (!parseResult) return null;
|
|
12266
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
12267
|
-
|
|
12268
|
-
// [TODO] I challenge you to fix the type
|
|
12269
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
12270
|
-
var rest = string.slice(matchedString.length);
|
|
12271
|
-
return {
|
|
12272
|
-
value: value,
|
|
12273
|
-
rest: rest
|
|
12274
|
-
};
|
|
12275
|
-
};
|
|
11492
|
+
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
12276
11493
|
}
|
|
12277
11494
|
|
|
12278
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
12279
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
12280
|
-
var matchEraPatterns = {
|
|
12281
|
-
narrow: /^(b|a)/i,
|
|
12282
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
12283
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
12284
|
-
};
|
|
12285
|
-
var parseEraPatterns = {
|
|
12286
|
-
any: [/^b/i, /^(a|c)/i]
|
|
12287
|
-
};
|
|
12288
|
-
var matchQuarterPatterns = {
|
|
12289
|
-
narrow: /^[1234]/i,
|
|
12290
|
-
abbreviated: /^q[1234]/i,
|
|
12291
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
12292
|
-
};
|
|
12293
|
-
var parseQuarterPatterns = {
|
|
12294
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
12295
|
-
};
|
|
12296
|
-
var matchMonthPatterns = {
|
|
12297
|
-
narrow: /^[jfmasond]/i,
|
|
12298
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
12299
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
12300
|
-
};
|
|
12301
|
-
var parseMonthPatterns = {
|
|
12302
|
-
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],
|
|
12303
|
-
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]
|
|
12304
|
-
};
|
|
12305
|
-
var matchDayPatterns = {
|
|
12306
|
-
narrow: /^[smtwf]/i,
|
|
12307
|
-
"short": /^(su|mo|tu|we|th|fr|sa)/i,
|
|
12308
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
12309
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
12310
|
-
};
|
|
12311
|
-
var parseDayPatterns = {
|
|
12312
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
12313
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
12314
|
-
};
|
|
12315
|
-
var matchDayPeriodPatterns = {
|
|
12316
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
12317
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
12318
|
-
};
|
|
12319
|
-
var parseDayPeriodPatterns = {
|
|
12320
|
-
any: {
|
|
12321
|
-
am: /^a/i,
|
|
12322
|
-
pm: /^p/i,
|
|
12323
|
-
midnight: /^mi/i,
|
|
12324
|
-
noon: /^no/i,
|
|
12325
|
-
morning: /morning/i,
|
|
12326
|
-
afternoon: /afternoon/i,
|
|
12327
|
-
evening: /evening/i,
|
|
12328
|
-
night: /night/i
|
|
12329
|
-
}
|
|
12330
|
-
};
|
|
12331
|
-
var match = {
|
|
12332
|
-
ordinalNumber: buildMatchPatternFn({
|
|
12333
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
12334
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
12335
|
-
valueCallback: function valueCallback(value) {
|
|
12336
|
-
return parseInt(value, 10);
|
|
12337
|
-
}
|
|
12338
|
-
}),
|
|
12339
|
-
era: buildMatchFn({
|
|
12340
|
-
matchPatterns: matchEraPatterns,
|
|
12341
|
-
defaultMatchWidth: "wide",
|
|
12342
|
-
parsePatterns: parseEraPatterns,
|
|
12343
|
-
defaultParseWidth: "any"
|
|
12344
|
-
}),
|
|
12345
|
-
quarter: buildMatchFn({
|
|
12346
|
-
matchPatterns: matchQuarterPatterns,
|
|
12347
|
-
defaultMatchWidth: "wide",
|
|
12348
|
-
parsePatterns: parseQuarterPatterns,
|
|
12349
|
-
defaultParseWidth: "any",
|
|
12350
|
-
valueCallback: function valueCallback(index) {
|
|
12351
|
-
return index + 1;
|
|
12352
|
-
}
|
|
12353
|
-
}),
|
|
12354
|
-
month: buildMatchFn({
|
|
12355
|
-
matchPatterns: matchMonthPatterns,
|
|
12356
|
-
defaultMatchWidth: "wide",
|
|
12357
|
-
parsePatterns: parseMonthPatterns,
|
|
12358
|
-
defaultParseWidth: "any"
|
|
12359
|
-
}),
|
|
12360
|
-
day: buildMatchFn({
|
|
12361
|
-
matchPatterns: matchDayPatterns,
|
|
12362
|
-
defaultMatchWidth: "wide",
|
|
12363
|
-
parsePatterns: parseDayPatterns,
|
|
12364
|
-
defaultParseWidth: "any"
|
|
12365
|
-
}),
|
|
12366
|
-
dayPeriod: buildMatchFn({
|
|
12367
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
12368
|
-
defaultMatchWidth: "any",
|
|
12369
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
12370
|
-
defaultParseWidth: "any"
|
|
12371
|
-
})
|
|
12372
|
-
};
|
|
12373
|
-
|
|
12374
11495
|
/**
|
|
12375
|
-
* @
|
|
12376
|
-
* @
|
|
12377
|
-
* @
|
|
12378
|
-
* @iso-639-2 eng
|
|
12379
|
-
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
|
|
12380
|
-
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
|
|
12381
|
-
*/
|
|
12382
|
-
var enUS = {
|
|
12383
|
-
code: "en-US",
|
|
12384
|
-
formatDistance: formatDistance$1,
|
|
12385
|
-
formatLong: formatLong$2,
|
|
12386
|
-
formatRelative: formatRelative,
|
|
12387
|
-
localize: localize,
|
|
12388
|
-
match: match,
|
|
12389
|
-
options: {
|
|
12390
|
-
weekStartsOn: 0 /* Sunday */,
|
|
12391
|
-
firstWeekContainsDate: 1
|
|
12392
|
-
}
|
|
12393
|
-
};
|
|
12394
|
-
|
|
12395
|
-
/**
|
|
12396
|
-
* The {@link getDayOfYear} function options.
|
|
12397
|
-
*/
|
|
12398
|
-
|
|
12399
|
-
/**
|
|
12400
|
-
* @name getDayOfYear
|
|
12401
|
-
* @category Day Helpers
|
|
12402
|
-
* @summary Get the day of the year of the given date.
|
|
11496
|
+
* @name addMilliseconds
|
|
11497
|
+
* @category Millisecond Helpers
|
|
11498
|
+
* @summary Add the specified number of milliseconds to the given date.
|
|
12403
11499
|
*
|
|
12404
11500
|
* @description
|
|
12405
|
-
*
|
|
12406
|
-
*
|
|
12407
|
-
* @param date - The given date
|
|
12408
|
-
* @param options - The options
|
|
11501
|
+
* Add the specified number of milliseconds to the given date.
|
|
12409
11502
|
*
|
|
12410
|
-
* @
|
|
11503
|
+
* @param {Date|Number} date - the date to be changed
|
|
11504
|
+
* @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`.
|
|
11505
|
+
* @returns {Date} the new date with the milliseconds added
|
|
11506
|
+
* @throws {TypeError} 2 arguments required
|
|
12411
11507
|
*
|
|
12412
11508
|
* @example
|
|
12413
|
-
* //
|
|
12414
|
-
* const result =
|
|
12415
|
-
* //=>
|
|
11509
|
+
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
11510
|
+
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
11511
|
+
* //=> Thu Jul 10 2014 12:45:30.750
|
|
12416
11512
|
*/
|
|
12417
|
-
function
|
|
12418
|
-
|
|
12419
|
-
var
|
|
12420
|
-
var
|
|
12421
|
-
return
|
|
11513
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
11514
|
+
requiredArgs(2, arguments);
|
|
11515
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
11516
|
+
var amount = toInteger(dirtyAmount);
|
|
11517
|
+
return new Date(timestamp + amount);
|
|
12422
11518
|
}
|
|
12423
11519
|
|
|
12424
11520
|
/**
|
|
12425
|
-
*
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
/**
|
|
12429
|
-
* @name getISOWeek
|
|
12430
|
-
* @category ISO Week Helpers
|
|
12431
|
-
* @summary Get the ISO week of the given date.
|
|
11521
|
+
* @name subMilliseconds
|
|
11522
|
+
* @category Millisecond Helpers
|
|
11523
|
+
* @summary Subtract the specified number of milliseconds from the given date.
|
|
12432
11524
|
*
|
|
12433
11525
|
* @description
|
|
12434
|
-
*
|
|
12435
|
-
*
|
|
12436
|
-
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
11526
|
+
* Subtract the specified number of milliseconds from the given date.
|
|
12437
11527
|
*
|
|
12438
|
-
* @param date -
|
|
12439
|
-
* @param
|
|
12440
|
-
*
|
|
12441
|
-
* @
|
|
11528
|
+
* @param {Date|Number} date - the date to be changed
|
|
11529
|
+
* @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`.
|
|
11530
|
+
* @returns {Date} the new date with the milliseconds subtracted
|
|
11531
|
+
* @throws {TypeError} 2 arguments required
|
|
12442
11532
|
*
|
|
12443
11533
|
* @example
|
|
12444
|
-
* //
|
|
12445
|
-
* const result =
|
|
12446
|
-
* //=>
|
|
11534
|
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
11535
|
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
11536
|
+
* //=> Thu Jul 10 2014 12:45:29.250
|
|
12447
11537
|
*/
|
|
12448
|
-
function
|
|
12449
|
-
|
|
12450
|
-
var
|
|
11538
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
11539
|
+
requiredArgs(2, arguments);
|
|
11540
|
+
var amount = toInteger(dirtyAmount);
|
|
11541
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
11542
|
+
}
|
|
11543
|
+
|
|
11544
|
+
var MILLISECONDS_IN_DAY = 86400000;
|
|
11545
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
11546
|
+
requiredArgs(1, arguments);
|
|
11547
|
+
var date = toDate(dirtyDate);
|
|
11548
|
+
var timestamp = date.getTime();
|
|
11549
|
+
date.setUTCMonth(0, 1);
|
|
11550
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
11551
|
+
var startOfYearTimestamp = date.getTime();
|
|
11552
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
11553
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
11554
|
+
}
|
|
11555
|
+
|
|
11556
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
11557
|
+
requiredArgs(1, arguments);
|
|
11558
|
+
var weekStartsOn = 1;
|
|
11559
|
+
var date = toDate(dirtyDate);
|
|
11560
|
+
var day = date.getUTCDay();
|
|
11561
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
11562
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
11563
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
11564
|
+
return date;
|
|
11565
|
+
}
|
|
11566
|
+
|
|
11567
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
11568
|
+
requiredArgs(1, arguments);
|
|
11569
|
+
var date = toDate(dirtyDate);
|
|
11570
|
+
var year = date.getUTCFullYear();
|
|
11571
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
11572
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
11573
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
11574
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
11575
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
11576
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
11577
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
11578
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
11579
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
11580
|
+
return year + 1;
|
|
11581
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
11582
|
+
return year;
|
|
11583
|
+
} else {
|
|
11584
|
+
return year - 1;
|
|
11585
|
+
}
|
|
11586
|
+
}
|
|
12451
11587
|
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
11588
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
11589
|
+
requiredArgs(1, arguments);
|
|
11590
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
11591
|
+
var fourthOfJanuary = new Date(0);
|
|
11592
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
11593
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
11594
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
11595
|
+
return date;
|
|
12456
11596
|
}
|
|
12457
11597
|
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
11598
|
+
var MILLISECONDS_IN_WEEK$1 = 604800000;
|
|
11599
|
+
function getUTCISOWeek(dirtyDate) {
|
|
11600
|
+
requiredArgs(1, arguments);
|
|
11601
|
+
var date = toDate(dirtyDate);
|
|
11602
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
12461
11603
|
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
* @returns The local week-numbering year
|
|
12480
|
-
*
|
|
12481
|
-
* @example
|
|
12482
|
-
* // Which week numbering year is 26 December 2004 with the default settings?
|
|
12483
|
-
* const result = getWeekYear(new Date(2004, 11, 26))
|
|
12484
|
-
* //=> 2005
|
|
12485
|
-
*
|
|
12486
|
-
* @example
|
|
12487
|
-
* // Which week numbering year is 26 December 2004 if week starts on Saturday?
|
|
12488
|
-
* const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
|
|
12489
|
-
* //=> 2004
|
|
12490
|
-
*
|
|
12491
|
-
* @example
|
|
12492
|
-
* // Which week numbering year is 26 December 2004 if the first week contains 4 January?
|
|
12493
|
-
* const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
|
|
12494
|
-
* //=> 2004
|
|
12495
|
-
*/
|
|
12496
|
-
function getWeekYear(date, options) {
|
|
12497
|
-
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _defaultOptions$local;
|
|
12498
|
-
var _date = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
12499
|
-
var year = _date.getFullYear();
|
|
11604
|
+
// Round the number of days to the nearest integer
|
|
11605
|
+
// because the number of milliseconds in a week is not constant
|
|
11606
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
11607
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
11608
|
+
}
|
|
11609
|
+
|
|
11610
|
+
var defaultOptions = {};
|
|
11611
|
+
function getDefaultOptions() {
|
|
11612
|
+
return defaultOptions;
|
|
11613
|
+
}
|
|
11614
|
+
function setDefaultOptions$1(newOptions) {
|
|
11615
|
+
defaultOptions = newOptions;
|
|
11616
|
+
}
|
|
11617
|
+
|
|
11618
|
+
function startOfUTCWeek(dirtyDate, options) {
|
|
11619
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
11620
|
+
requiredArgs(1, arguments);
|
|
12500
11621
|
var defaultOptions = getDefaultOptions();
|
|
12501
|
-
var
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
var
|
|
12510
|
-
|
|
11622
|
+
var weekStartsOn = toInteger((_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 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
11623
|
+
|
|
11624
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
11625
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
11626
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
11627
|
+
}
|
|
11628
|
+
var date = toDate(dirtyDate);
|
|
11629
|
+
var day = date.getUTCDay();
|
|
11630
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
11631
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
11632
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
11633
|
+
return date;
|
|
11634
|
+
}
|
|
11635
|
+
|
|
11636
|
+
function getUTCWeekYear(dirtyDate, options) {
|
|
11637
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
11638
|
+
requiredArgs(1, arguments);
|
|
11639
|
+
var date = toDate(dirtyDate);
|
|
11640
|
+
var year = date.getUTCFullYear();
|
|
11641
|
+
var defaultOptions = getDefaultOptions();
|
|
11642
|
+
var firstWeekContainsDate = toInteger((_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 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
11643
|
+
|
|
11644
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
11645
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
11646
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
11647
|
+
}
|
|
11648
|
+
var firstWeekOfNextYear = new Date(0);
|
|
11649
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
11650
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
11651
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
11652
|
+
var firstWeekOfThisYear = new Date(0);
|
|
11653
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
11654
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
11655
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
11656
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
12511
11657
|
return year + 1;
|
|
12512
|
-
} else if (
|
|
11658
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
12513
11659
|
return year;
|
|
12514
11660
|
} else {
|
|
12515
11661
|
return year - 1;
|
|
12516
11662
|
}
|
|
12517
11663
|
}
|
|
12518
11664
|
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
/**
|
|
12524
|
-
* @name startOfWeekYear
|
|
12525
|
-
* @category Week-Numbering Year Helpers
|
|
12526
|
-
* @summary Return the start of a local week-numbering year for the given date.
|
|
12527
|
-
*
|
|
12528
|
-
* @description
|
|
12529
|
-
* Return the start of a local week-numbering year.
|
|
12530
|
-
* The exact calculation depends on the values of
|
|
12531
|
-
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
12532
|
-
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
12533
|
-
* the first week of the week-numbering year)
|
|
12534
|
-
*
|
|
12535
|
-
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
12536
|
-
*
|
|
12537
|
-
* @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).
|
|
12538
|
-
* @typeParam ResultDate - The result `Date` type.
|
|
12539
|
-
*
|
|
12540
|
-
* @param date - The original date
|
|
12541
|
-
* @param options - An object with options
|
|
12542
|
-
*
|
|
12543
|
-
* @returns The start of a week-numbering year
|
|
12544
|
-
*
|
|
12545
|
-
* @example
|
|
12546
|
-
* // The start of an a week-numbering year for 2 July 2005 with default settings:
|
|
12547
|
-
* const result = startOfWeekYear(new Date(2005, 6, 2))
|
|
12548
|
-
* //=> Sun Dec 26 2004 00:00:00
|
|
12549
|
-
*
|
|
12550
|
-
* @example
|
|
12551
|
-
* // The start of a week-numbering year for 2 July 2005
|
|
12552
|
-
* // if Monday is the first day of week
|
|
12553
|
-
* // and 4 January is always in the first week of the year:
|
|
12554
|
-
* const result = startOfWeekYear(new Date(2005, 6, 2), {
|
|
12555
|
-
* weekStartsOn: 1,
|
|
12556
|
-
* firstWeekContainsDate: 4
|
|
12557
|
-
* })
|
|
12558
|
-
* //=> Mon Jan 03 2005 00:00:00
|
|
12559
|
-
*/
|
|
12560
|
-
function startOfWeekYear(date, options) {
|
|
12561
|
-
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _defaultOptions$local;
|
|
11665
|
+
function startOfUTCWeekYear(dirtyDate, options) {
|
|
11666
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
11667
|
+
requiredArgs(1, arguments);
|
|
12562
11668
|
var defaultOptions = getDefaultOptions();
|
|
12563
|
-
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
|
|
12564
|
-
var year =
|
|
12565
|
-
var firstWeek =
|
|
12566
|
-
firstWeek.
|
|
12567
|
-
firstWeek.
|
|
12568
|
-
var
|
|
12569
|
-
return
|
|
11669
|
+
var firstWeekContainsDate = toInteger((_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 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
11670
|
+
var year = getUTCWeekYear(dirtyDate, options);
|
|
11671
|
+
var firstWeek = new Date(0);
|
|
11672
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
11673
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
11674
|
+
var date = startOfUTCWeek(firstWeek, options);
|
|
11675
|
+
return date;
|
|
12570
11676
|
}
|
|
12571
11677
|
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
11678
|
+
var MILLISECONDS_IN_WEEK = 604800000;
|
|
11679
|
+
function getUTCWeek(dirtyDate, options) {
|
|
11680
|
+
requiredArgs(1, arguments);
|
|
11681
|
+
var date = toDate(dirtyDate);
|
|
11682
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
12575
11683
|
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
*
|
|
12581
|
-
* @description
|
|
12582
|
-
* Get the local week index of the given date.
|
|
12583
|
-
* The exact calculation depends on the values of
|
|
12584
|
-
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
12585
|
-
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
12586
|
-
* the first week of the week-numbering year)
|
|
12587
|
-
*
|
|
12588
|
-
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
12589
|
-
*
|
|
12590
|
-
* @param date - The given date
|
|
12591
|
-
* @param options - An object with options
|
|
12592
|
-
*
|
|
12593
|
-
* @returns The week
|
|
12594
|
-
*
|
|
12595
|
-
* @example
|
|
12596
|
-
* // Which week of the local week numbering year is 2 January 2005 with default options?
|
|
12597
|
-
* const result = getWeek(new Date(2005, 0, 2))
|
|
12598
|
-
* //=> 2
|
|
12599
|
-
*
|
|
12600
|
-
* @example
|
|
12601
|
-
* // Which week of the local week numbering year is 2 January 2005,
|
|
12602
|
-
* // if Monday is the first day of the week,
|
|
12603
|
-
* // and the first week of the year always contains 4 January?
|
|
12604
|
-
* const result = getWeek(new Date(2005, 0, 2), {
|
|
12605
|
-
* weekStartsOn: 1,
|
|
12606
|
-
* firstWeekContainsDate: 4
|
|
12607
|
-
* })
|
|
12608
|
-
* //=> 53
|
|
12609
|
-
*/
|
|
12610
|
-
function getWeek(date, options) {
|
|
12611
|
-
var _date = toDate(date, options === null || options === void 0 ? void 0 : options["in"]);
|
|
12612
|
-
var diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
12613
|
-
|
|
12614
|
-
// Round the number of weeks to the nearest integer because the number of
|
|
12615
|
-
// milliseconds in a week is not constant (e.g. it's different in the week of
|
|
12616
|
-
// the daylight saving time clock shift).
|
|
12617
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
11684
|
+
// Round the number of days to the nearest integer
|
|
11685
|
+
// because the number of milliseconds in a week is not constant
|
|
11686
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
11687
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
12618
11688
|
}
|
|
12619
11689
|
|
|
12620
11690
|
function addLeadingZeros(number, targetLength) {
|
|
12621
|
-
var sign = number < 0 ?
|
|
12622
|
-
var output = Math.abs(number).toString()
|
|
11691
|
+
var sign = number < 0 ? '-' : '';
|
|
11692
|
+
var output = Math.abs(number).toString();
|
|
11693
|
+
while (output.length < targetLength) {
|
|
11694
|
+
output = '0' + output;
|
|
11695
|
+
}
|
|
12623
11696
|
return sign + output;
|
|
12624
11697
|
}
|
|
12625
11698
|
|
|
@@ -12635,8 +11708,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
12635
11708
|
*
|
|
12636
11709
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
12637
11710
|
*/
|
|
12638
|
-
|
|
12639
|
-
var lightFormatters = {
|
|
11711
|
+
var formatters$1 = {
|
|
12640
11712
|
// Year
|
|
12641
11713
|
y: function y(date, token) {
|
|
12642
11714
|
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
@@ -12648,72 +11720,71 @@ var lightFormatters = {
|
|
|
12648
11720
|
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
12649
11721
|
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
12650
11722
|
|
|
12651
|
-
var signedYear = date.
|
|
11723
|
+
var signedYear = date.getUTCFullYear();
|
|
12652
11724
|
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
12653
11725
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
12654
|
-
return addLeadingZeros(token ===
|
|
11726
|
+
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
12655
11727
|
},
|
|
12656
11728
|
// Month
|
|
12657
11729
|
M: function M(date, token) {
|
|
12658
|
-
var month = date.
|
|
12659
|
-
return token ===
|
|
11730
|
+
var month = date.getUTCMonth();
|
|
11731
|
+
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
12660
11732
|
},
|
|
12661
11733
|
// Day of the month
|
|
12662
11734
|
d: function d(date, token) {
|
|
12663
|
-
return addLeadingZeros(date.
|
|
11735
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
12664
11736
|
},
|
|
12665
11737
|
// AM or PM
|
|
12666
11738
|
a: function a(date, token) {
|
|
12667
|
-
var dayPeriodEnumValue = date.
|
|
11739
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
12668
11740
|
switch (token) {
|
|
12669
|
-
case
|
|
12670
|
-
case
|
|
11741
|
+
case 'a':
|
|
11742
|
+
case 'aa':
|
|
12671
11743
|
return dayPeriodEnumValue.toUpperCase();
|
|
12672
|
-
case
|
|
11744
|
+
case 'aaa':
|
|
12673
11745
|
return dayPeriodEnumValue;
|
|
12674
|
-
case
|
|
11746
|
+
case 'aaaaa':
|
|
12675
11747
|
return dayPeriodEnumValue[0];
|
|
12676
|
-
case
|
|
11748
|
+
case 'aaaa':
|
|
12677
11749
|
default:
|
|
12678
|
-
return dayPeriodEnumValue ===
|
|
11750
|
+
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
12679
11751
|
}
|
|
12680
11752
|
},
|
|
12681
11753
|
// Hour [1-12]
|
|
12682
11754
|
h: function h(date, token) {
|
|
12683
|
-
return addLeadingZeros(date.
|
|
11755
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
12684
11756
|
},
|
|
12685
11757
|
// Hour [0-23]
|
|
12686
11758
|
H: function H(date, token) {
|
|
12687
|
-
return addLeadingZeros(date.
|
|
11759
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
12688
11760
|
},
|
|
12689
11761
|
// Minute
|
|
12690
11762
|
m: function m(date, token) {
|
|
12691
|
-
return addLeadingZeros(date.
|
|
11763
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
12692
11764
|
},
|
|
12693
11765
|
// Second
|
|
12694
11766
|
s: function s(date, token) {
|
|
12695
|
-
return addLeadingZeros(date.
|
|
11767
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
12696
11768
|
},
|
|
12697
11769
|
// Fraction of second
|
|
12698
11770
|
S: function S(date, token) {
|
|
12699
11771
|
var numberOfDigits = token.length;
|
|
12700
|
-
var milliseconds = date.
|
|
12701
|
-
var fractionalSeconds = Math.
|
|
11772
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
11773
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
12702
11774
|
return addLeadingZeros(fractionalSeconds, token.length);
|
|
12703
11775
|
}
|
|
12704
11776
|
};
|
|
12705
11777
|
|
|
12706
11778
|
var dayPeriodEnum = {
|
|
12707
|
-
am:
|
|
12708
|
-
pm:
|
|
12709
|
-
midnight:
|
|
12710
|
-
noon:
|
|
12711
|
-
morning:
|
|
12712
|
-
afternoon:
|
|
12713
|
-
evening:
|
|
12714
|
-
night:
|
|
11779
|
+
am: 'am',
|
|
11780
|
+
pm: 'pm',
|
|
11781
|
+
midnight: 'midnight',
|
|
11782
|
+
noon: 'noon',
|
|
11783
|
+
morning: 'morning',
|
|
11784
|
+
afternoon: 'afternoon',
|
|
11785
|
+
evening: 'evening',
|
|
11786
|
+
night: 'night'
|
|
12715
11787
|
};
|
|
12716
|
-
|
|
12717
11788
|
/*
|
|
12718
11789
|
* | | Unit | | Unit |
|
|
12719
11790
|
* |-----|--------------------------------|-----|--------------------------------|
|
|
@@ -12763,57 +11834,57 @@ var dayPeriodEnum = {
|
|
|
12763
11834
|
var formatters = {
|
|
12764
11835
|
// Era
|
|
12765
11836
|
G: function G(date, token, localize) {
|
|
12766
|
-
var era = date.
|
|
11837
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
12767
11838
|
switch (token) {
|
|
12768
11839
|
// AD, BC
|
|
12769
|
-
case
|
|
12770
|
-
case
|
|
12771
|
-
case
|
|
11840
|
+
case 'G':
|
|
11841
|
+
case 'GG':
|
|
11842
|
+
case 'GGG':
|
|
12772
11843
|
return localize.era(era, {
|
|
12773
|
-
width:
|
|
11844
|
+
width: 'abbreviated'
|
|
12774
11845
|
});
|
|
12775
11846
|
// A, B
|
|
12776
|
-
case
|
|
11847
|
+
case 'GGGGG':
|
|
12777
11848
|
return localize.era(era, {
|
|
12778
|
-
width:
|
|
11849
|
+
width: 'narrow'
|
|
12779
11850
|
});
|
|
12780
11851
|
// Anno Domini, Before Christ
|
|
12781
|
-
case
|
|
11852
|
+
case 'GGGG':
|
|
12782
11853
|
default:
|
|
12783
11854
|
return localize.era(era, {
|
|
12784
|
-
width:
|
|
11855
|
+
width: 'wide'
|
|
12785
11856
|
});
|
|
12786
11857
|
}
|
|
12787
11858
|
},
|
|
12788
11859
|
// Year
|
|
12789
11860
|
y: function y(date, token, localize) {
|
|
12790
11861
|
// Ordinal number
|
|
12791
|
-
if (token ===
|
|
12792
|
-
var signedYear = date.
|
|
11862
|
+
if (token === 'yo') {
|
|
11863
|
+
var signedYear = date.getUTCFullYear();
|
|
12793
11864
|
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
12794
11865
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
12795
11866
|
return localize.ordinalNumber(year, {
|
|
12796
|
-
unit:
|
|
11867
|
+
unit: 'year'
|
|
12797
11868
|
});
|
|
12798
11869
|
}
|
|
12799
|
-
return
|
|
11870
|
+
return formatters$1.y(date, token);
|
|
12800
11871
|
},
|
|
12801
11872
|
// Local week-numbering year
|
|
12802
11873
|
Y: function Y(date, token, localize, options) {
|
|
12803
|
-
var signedWeekYear =
|
|
11874
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
|
12804
11875
|
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
12805
11876
|
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
12806
11877
|
|
|
12807
11878
|
// Two digit year
|
|
12808
|
-
if (token ===
|
|
11879
|
+
if (token === 'YY') {
|
|
12809
11880
|
var twoDigitYear = weekYear % 100;
|
|
12810
11881
|
return addLeadingZeros(twoDigitYear, 2);
|
|
12811
11882
|
}
|
|
12812
11883
|
|
|
12813
11884
|
// Ordinal number
|
|
12814
|
-
if (token ===
|
|
11885
|
+
if (token === 'Yo') {
|
|
12815
11886
|
return localize.ordinalNumber(weekYear, {
|
|
12816
|
-
unit:
|
|
11887
|
+
unit: 'year'
|
|
12817
11888
|
});
|
|
12818
11889
|
}
|
|
12819
11890
|
|
|
@@ -12822,7 +11893,7 @@ var formatters = {
|
|
|
12822
11893
|
},
|
|
12823
11894
|
// ISO week-numbering year
|
|
12824
11895
|
R: function R(date, token) {
|
|
12825
|
-
var isoWeekYear =
|
|
11896
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
|
12826
11897
|
|
|
12827
11898
|
// Padding
|
|
12828
11899
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
@@ -12837,417 +11908,417 @@ var formatters = {
|
|
|
12837
11908
|
// Also `yy` always returns the last two digits of a year,
|
|
12838
11909
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
12839
11910
|
u: function u(date, token) {
|
|
12840
|
-
var year = date.
|
|
11911
|
+
var year = date.getUTCFullYear();
|
|
12841
11912
|
return addLeadingZeros(year, token.length);
|
|
12842
11913
|
},
|
|
12843
11914
|
// Quarter
|
|
12844
11915
|
Q: function Q(date, token, localize) {
|
|
12845
|
-
var quarter = Math.ceil((date.
|
|
11916
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
12846
11917
|
switch (token) {
|
|
12847
11918
|
// 1, 2, 3, 4
|
|
12848
|
-
case
|
|
11919
|
+
case 'Q':
|
|
12849
11920
|
return String(quarter);
|
|
12850
11921
|
// 01, 02, 03, 04
|
|
12851
|
-
case
|
|
11922
|
+
case 'QQ':
|
|
12852
11923
|
return addLeadingZeros(quarter, 2);
|
|
12853
11924
|
// 1st, 2nd, 3rd, 4th
|
|
12854
|
-
case
|
|
11925
|
+
case 'Qo':
|
|
12855
11926
|
return localize.ordinalNumber(quarter, {
|
|
12856
|
-
unit:
|
|
11927
|
+
unit: 'quarter'
|
|
12857
11928
|
});
|
|
12858
11929
|
// Q1, Q2, Q3, Q4
|
|
12859
|
-
case
|
|
11930
|
+
case 'QQQ':
|
|
12860
11931
|
return localize.quarter(quarter, {
|
|
12861
|
-
width:
|
|
12862
|
-
context:
|
|
11932
|
+
width: 'abbreviated',
|
|
11933
|
+
context: 'formatting'
|
|
12863
11934
|
});
|
|
12864
11935
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
12865
|
-
case
|
|
11936
|
+
case 'QQQQQ':
|
|
12866
11937
|
return localize.quarter(quarter, {
|
|
12867
|
-
width:
|
|
12868
|
-
context:
|
|
11938
|
+
width: 'narrow',
|
|
11939
|
+
context: 'formatting'
|
|
12869
11940
|
});
|
|
12870
11941
|
// 1st quarter, 2nd quarter, ...
|
|
12871
|
-
case
|
|
11942
|
+
case 'QQQQ':
|
|
12872
11943
|
default:
|
|
12873
11944
|
return localize.quarter(quarter, {
|
|
12874
|
-
width:
|
|
12875
|
-
context:
|
|
11945
|
+
width: 'wide',
|
|
11946
|
+
context: 'formatting'
|
|
12876
11947
|
});
|
|
12877
11948
|
}
|
|
12878
11949
|
},
|
|
12879
11950
|
// Stand-alone quarter
|
|
12880
11951
|
q: function q(date, token, localize) {
|
|
12881
|
-
var quarter = Math.ceil((date.
|
|
11952
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
12882
11953
|
switch (token) {
|
|
12883
11954
|
// 1, 2, 3, 4
|
|
12884
|
-
case
|
|
11955
|
+
case 'q':
|
|
12885
11956
|
return String(quarter);
|
|
12886
11957
|
// 01, 02, 03, 04
|
|
12887
|
-
case
|
|
11958
|
+
case 'qq':
|
|
12888
11959
|
return addLeadingZeros(quarter, 2);
|
|
12889
11960
|
// 1st, 2nd, 3rd, 4th
|
|
12890
|
-
case
|
|
11961
|
+
case 'qo':
|
|
12891
11962
|
return localize.ordinalNumber(quarter, {
|
|
12892
|
-
unit:
|
|
11963
|
+
unit: 'quarter'
|
|
12893
11964
|
});
|
|
12894
11965
|
// Q1, Q2, Q3, Q4
|
|
12895
|
-
case
|
|
11966
|
+
case 'qqq':
|
|
12896
11967
|
return localize.quarter(quarter, {
|
|
12897
|
-
width:
|
|
12898
|
-
context:
|
|
11968
|
+
width: 'abbreviated',
|
|
11969
|
+
context: 'standalone'
|
|
12899
11970
|
});
|
|
12900
11971
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
12901
|
-
case
|
|
11972
|
+
case 'qqqqq':
|
|
12902
11973
|
return localize.quarter(quarter, {
|
|
12903
|
-
width:
|
|
12904
|
-
context:
|
|
11974
|
+
width: 'narrow',
|
|
11975
|
+
context: 'standalone'
|
|
12905
11976
|
});
|
|
12906
11977
|
// 1st quarter, 2nd quarter, ...
|
|
12907
|
-
case
|
|
11978
|
+
case 'qqqq':
|
|
12908
11979
|
default:
|
|
12909
11980
|
return localize.quarter(quarter, {
|
|
12910
|
-
width:
|
|
12911
|
-
context:
|
|
11981
|
+
width: 'wide',
|
|
11982
|
+
context: 'standalone'
|
|
12912
11983
|
});
|
|
12913
11984
|
}
|
|
12914
11985
|
},
|
|
12915
11986
|
// Month
|
|
12916
11987
|
M: function M(date, token, localize) {
|
|
12917
|
-
var month = date.
|
|
11988
|
+
var month = date.getUTCMonth();
|
|
12918
11989
|
switch (token) {
|
|
12919
|
-
case
|
|
12920
|
-
case
|
|
12921
|
-
return
|
|
11990
|
+
case 'M':
|
|
11991
|
+
case 'MM':
|
|
11992
|
+
return formatters$1.M(date, token);
|
|
12922
11993
|
// 1st, 2nd, ..., 12th
|
|
12923
|
-
case
|
|
11994
|
+
case 'Mo':
|
|
12924
11995
|
return localize.ordinalNumber(month + 1, {
|
|
12925
|
-
unit:
|
|
11996
|
+
unit: 'month'
|
|
12926
11997
|
});
|
|
12927
11998
|
// Jan, Feb, ..., Dec
|
|
12928
|
-
case
|
|
11999
|
+
case 'MMM':
|
|
12929
12000
|
return localize.month(month, {
|
|
12930
|
-
width:
|
|
12931
|
-
context:
|
|
12001
|
+
width: 'abbreviated',
|
|
12002
|
+
context: 'formatting'
|
|
12932
12003
|
});
|
|
12933
12004
|
// J, F, ..., D
|
|
12934
|
-
case
|
|
12005
|
+
case 'MMMMM':
|
|
12935
12006
|
return localize.month(month, {
|
|
12936
|
-
width:
|
|
12937
|
-
context:
|
|
12007
|
+
width: 'narrow',
|
|
12008
|
+
context: 'formatting'
|
|
12938
12009
|
});
|
|
12939
12010
|
// January, February, ..., December
|
|
12940
|
-
case
|
|
12011
|
+
case 'MMMM':
|
|
12941
12012
|
default:
|
|
12942
12013
|
return localize.month(month, {
|
|
12943
|
-
width:
|
|
12944
|
-
context:
|
|
12014
|
+
width: 'wide',
|
|
12015
|
+
context: 'formatting'
|
|
12945
12016
|
});
|
|
12946
12017
|
}
|
|
12947
12018
|
},
|
|
12948
12019
|
// Stand-alone month
|
|
12949
12020
|
L: function L(date, token, localize) {
|
|
12950
|
-
var month = date.
|
|
12021
|
+
var month = date.getUTCMonth();
|
|
12951
12022
|
switch (token) {
|
|
12952
12023
|
// 1, 2, ..., 12
|
|
12953
|
-
case
|
|
12024
|
+
case 'L':
|
|
12954
12025
|
return String(month + 1);
|
|
12955
12026
|
// 01, 02, ..., 12
|
|
12956
|
-
case
|
|
12027
|
+
case 'LL':
|
|
12957
12028
|
return addLeadingZeros(month + 1, 2);
|
|
12958
12029
|
// 1st, 2nd, ..., 12th
|
|
12959
|
-
case
|
|
12030
|
+
case 'Lo':
|
|
12960
12031
|
return localize.ordinalNumber(month + 1, {
|
|
12961
|
-
unit:
|
|
12032
|
+
unit: 'month'
|
|
12962
12033
|
});
|
|
12963
12034
|
// Jan, Feb, ..., Dec
|
|
12964
|
-
case
|
|
12035
|
+
case 'LLL':
|
|
12965
12036
|
return localize.month(month, {
|
|
12966
|
-
width:
|
|
12967
|
-
context:
|
|
12037
|
+
width: 'abbreviated',
|
|
12038
|
+
context: 'standalone'
|
|
12968
12039
|
});
|
|
12969
12040
|
// J, F, ..., D
|
|
12970
|
-
case
|
|
12041
|
+
case 'LLLLL':
|
|
12971
12042
|
return localize.month(month, {
|
|
12972
|
-
width:
|
|
12973
|
-
context:
|
|
12043
|
+
width: 'narrow',
|
|
12044
|
+
context: 'standalone'
|
|
12974
12045
|
});
|
|
12975
12046
|
// January, February, ..., December
|
|
12976
|
-
case
|
|
12047
|
+
case 'LLLL':
|
|
12977
12048
|
default:
|
|
12978
12049
|
return localize.month(month, {
|
|
12979
|
-
width:
|
|
12980
|
-
context:
|
|
12050
|
+
width: 'wide',
|
|
12051
|
+
context: 'standalone'
|
|
12981
12052
|
});
|
|
12982
12053
|
}
|
|
12983
12054
|
},
|
|
12984
12055
|
// Local week of year
|
|
12985
12056
|
w: function w(date, token, localize, options) {
|
|
12986
|
-
var week =
|
|
12987
|
-
if (token ===
|
|
12057
|
+
var week = getUTCWeek(date, options);
|
|
12058
|
+
if (token === 'wo') {
|
|
12988
12059
|
return localize.ordinalNumber(week, {
|
|
12989
|
-
unit:
|
|
12060
|
+
unit: 'week'
|
|
12990
12061
|
});
|
|
12991
12062
|
}
|
|
12992
12063
|
return addLeadingZeros(week, token.length);
|
|
12993
12064
|
},
|
|
12994
12065
|
// ISO week of year
|
|
12995
12066
|
I: function I(date, token, localize) {
|
|
12996
|
-
var isoWeek =
|
|
12997
|
-
if (token ===
|
|
12067
|
+
var isoWeek = getUTCISOWeek(date);
|
|
12068
|
+
if (token === 'Io') {
|
|
12998
12069
|
return localize.ordinalNumber(isoWeek, {
|
|
12999
|
-
unit:
|
|
12070
|
+
unit: 'week'
|
|
13000
12071
|
});
|
|
13001
12072
|
}
|
|
13002
12073
|
return addLeadingZeros(isoWeek, token.length);
|
|
13003
12074
|
},
|
|
13004
12075
|
// Day of the month
|
|
13005
12076
|
d: function d(date, token, localize) {
|
|
13006
|
-
if (token ===
|
|
13007
|
-
return localize.ordinalNumber(date.
|
|
13008
|
-
unit:
|
|
12077
|
+
if (token === 'do') {
|
|
12078
|
+
return localize.ordinalNumber(date.getUTCDate(), {
|
|
12079
|
+
unit: 'date'
|
|
13009
12080
|
});
|
|
13010
12081
|
}
|
|
13011
|
-
return
|
|
12082
|
+
return formatters$1.d(date, token);
|
|
13012
12083
|
},
|
|
13013
12084
|
// Day of year
|
|
13014
12085
|
D: function D(date, token, localize) {
|
|
13015
|
-
var dayOfYear =
|
|
13016
|
-
if (token ===
|
|
12086
|
+
var dayOfYear = getUTCDayOfYear(date);
|
|
12087
|
+
if (token === 'Do') {
|
|
13017
12088
|
return localize.ordinalNumber(dayOfYear, {
|
|
13018
|
-
unit:
|
|
12089
|
+
unit: 'dayOfYear'
|
|
13019
12090
|
});
|
|
13020
12091
|
}
|
|
13021
12092
|
return addLeadingZeros(dayOfYear, token.length);
|
|
13022
12093
|
},
|
|
13023
12094
|
// Day of week
|
|
13024
12095
|
E: function E(date, token, localize) {
|
|
13025
|
-
var dayOfWeek = date.
|
|
12096
|
+
var dayOfWeek = date.getUTCDay();
|
|
13026
12097
|
switch (token) {
|
|
13027
12098
|
// Tue
|
|
13028
|
-
case
|
|
13029
|
-
case
|
|
13030
|
-
case
|
|
12099
|
+
case 'E':
|
|
12100
|
+
case 'EE':
|
|
12101
|
+
case 'EEE':
|
|
13031
12102
|
return localize.day(dayOfWeek, {
|
|
13032
|
-
width:
|
|
13033
|
-
context:
|
|
12103
|
+
width: 'abbreviated',
|
|
12104
|
+
context: 'formatting'
|
|
13034
12105
|
});
|
|
13035
12106
|
// T
|
|
13036
|
-
case
|
|
12107
|
+
case 'EEEEE':
|
|
13037
12108
|
return localize.day(dayOfWeek, {
|
|
13038
|
-
width:
|
|
13039
|
-
context:
|
|
12109
|
+
width: 'narrow',
|
|
12110
|
+
context: 'formatting'
|
|
13040
12111
|
});
|
|
13041
12112
|
// Tu
|
|
13042
|
-
case
|
|
12113
|
+
case 'EEEEEE':
|
|
13043
12114
|
return localize.day(dayOfWeek, {
|
|
13044
|
-
width:
|
|
13045
|
-
context:
|
|
12115
|
+
width: 'short',
|
|
12116
|
+
context: 'formatting'
|
|
13046
12117
|
});
|
|
13047
12118
|
// Tuesday
|
|
13048
|
-
case
|
|
12119
|
+
case 'EEEE':
|
|
13049
12120
|
default:
|
|
13050
12121
|
return localize.day(dayOfWeek, {
|
|
13051
|
-
width:
|
|
13052
|
-
context:
|
|
12122
|
+
width: 'wide',
|
|
12123
|
+
context: 'formatting'
|
|
13053
12124
|
});
|
|
13054
12125
|
}
|
|
13055
12126
|
},
|
|
13056
12127
|
// Local day of week
|
|
13057
12128
|
e: function e(date, token, localize, options) {
|
|
13058
|
-
var dayOfWeek = date.
|
|
12129
|
+
var dayOfWeek = date.getUTCDay();
|
|
13059
12130
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
13060
12131
|
switch (token) {
|
|
13061
12132
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
13062
|
-
case
|
|
12133
|
+
case 'e':
|
|
13063
12134
|
return String(localDayOfWeek);
|
|
13064
12135
|
// Padded numerical value
|
|
13065
|
-
case
|
|
12136
|
+
case 'ee':
|
|
13066
12137
|
return addLeadingZeros(localDayOfWeek, 2);
|
|
13067
12138
|
// 1st, 2nd, ..., 7th
|
|
13068
|
-
case
|
|
12139
|
+
case 'eo':
|
|
13069
12140
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
13070
|
-
unit:
|
|
12141
|
+
unit: 'day'
|
|
13071
12142
|
});
|
|
13072
|
-
case
|
|
12143
|
+
case 'eee':
|
|
13073
12144
|
return localize.day(dayOfWeek, {
|
|
13074
|
-
width:
|
|
13075
|
-
context:
|
|
12145
|
+
width: 'abbreviated',
|
|
12146
|
+
context: 'formatting'
|
|
13076
12147
|
});
|
|
13077
12148
|
// T
|
|
13078
|
-
case
|
|
12149
|
+
case 'eeeee':
|
|
13079
12150
|
return localize.day(dayOfWeek, {
|
|
13080
|
-
width:
|
|
13081
|
-
context:
|
|
12151
|
+
width: 'narrow',
|
|
12152
|
+
context: 'formatting'
|
|
13082
12153
|
});
|
|
13083
12154
|
// Tu
|
|
13084
|
-
case
|
|
12155
|
+
case 'eeeeee':
|
|
13085
12156
|
return localize.day(dayOfWeek, {
|
|
13086
|
-
width:
|
|
13087
|
-
context:
|
|
12157
|
+
width: 'short',
|
|
12158
|
+
context: 'formatting'
|
|
13088
12159
|
});
|
|
13089
12160
|
// Tuesday
|
|
13090
|
-
case
|
|
12161
|
+
case 'eeee':
|
|
13091
12162
|
default:
|
|
13092
12163
|
return localize.day(dayOfWeek, {
|
|
13093
|
-
width:
|
|
13094
|
-
context:
|
|
12164
|
+
width: 'wide',
|
|
12165
|
+
context: 'formatting'
|
|
13095
12166
|
});
|
|
13096
12167
|
}
|
|
13097
12168
|
},
|
|
13098
12169
|
// Stand-alone local day of week
|
|
13099
12170
|
c: function c(date, token, localize, options) {
|
|
13100
|
-
var dayOfWeek = date.
|
|
12171
|
+
var dayOfWeek = date.getUTCDay();
|
|
13101
12172
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
13102
12173
|
switch (token) {
|
|
13103
12174
|
// Numerical value (same as in `e`)
|
|
13104
|
-
case
|
|
12175
|
+
case 'c':
|
|
13105
12176
|
return String(localDayOfWeek);
|
|
13106
12177
|
// Padded numerical value
|
|
13107
|
-
case
|
|
12178
|
+
case 'cc':
|
|
13108
12179
|
return addLeadingZeros(localDayOfWeek, token.length);
|
|
13109
12180
|
// 1st, 2nd, ..., 7th
|
|
13110
|
-
case
|
|
12181
|
+
case 'co':
|
|
13111
12182
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
13112
|
-
unit:
|
|
12183
|
+
unit: 'day'
|
|
13113
12184
|
});
|
|
13114
|
-
case
|
|
12185
|
+
case 'ccc':
|
|
13115
12186
|
return localize.day(dayOfWeek, {
|
|
13116
|
-
width:
|
|
13117
|
-
context:
|
|
12187
|
+
width: 'abbreviated',
|
|
12188
|
+
context: 'standalone'
|
|
13118
12189
|
});
|
|
13119
12190
|
// T
|
|
13120
|
-
case
|
|
12191
|
+
case 'ccccc':
|
|
13121
12192
|
return localize.day(dayOfWeek, {
|
|
13122
|
-
width:
|
|
13123
|
-
context:
|
|
12193
|
+
width: 'narrow',
|
|
12194
|
+
context: 'standalone'
|
|
13124
12195
|
});
|
|
13125
12196
|
// Tu
|
|
13126
|
-
case
|
|
12197
|
+
case 'cccccc':
|
|
13127
12198
|
return localize.day(dayOfWeek, {
|
|
13128
|
-
width:
|
|
13129
|
-
context:
|
|
12199
|
+
width: 'short',
|
|
12200
|
+
context: 'standalone'
|
|
13130
12201
|
});
|
|
13131
12202
|
// Tuesday
|
|
13132
|
-
case
|
|
12203
|
+
case 'cccc':
|
|
13133
12204
|
default:
|
|
13134
12205
|
return localize.day(dayOfWeek, {
|
|
13135
|
-
width:
|
|
13136
|
-
context:
|
|
12206
|
+
width: 'wide',
|
|
12207
|
+
context: 'standalone'
|
|
13137
12208
|
});
|
|
13138
12209
|
}
|
|
13139
12210
|
},
|
|
13140
12211
|
// ISO day of week
|
|
13141
12212
|
i: function i(date, token, localize) {
|
|
13142
|
-
var dayOfWeek = date.
|
|
12213
|
+
var dayOfWeek = date.getUTCDay();
|
|
13143
12214
|
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
13144
12215
|
switch (token) {
|
|
13145
12216
|
// 2
|
|
13146
|
-
case
|
|
12217
|
+
case 'i':
|
|
13147
12218
|
return String(isoDayOfWeek);
|
|
13148
12219
|
// 02
|
|
13149
|
-
case
|
|
12220
|
+
case 'ii':
|
|
13150
12221
|
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
13151
12222
|
// 2nd
|
|
13152
|
-
case
|
|
12223
|
+
case 'io':
|
|
13153
12224
|
return localize.ordinalNumber(isoDayOfWeek, {
|
|
13154
|
-
unit:
|
|
12225
|
+
unit: 'day'
|
|
13155
12226
|
});
|
|
13156
12227
|
// Tue
|
|
13157
|
-
case
|
|
12228
|
+
case 'iii':
|
|
13158
12229
|
return localize.day(dayOfWeek, {
|
|
13159
|
-
width:
|
|
13160
|
-
context:
|
|
12230
|
+
width: 'abbreviated',
|
|
12231
|
+
context: 'formatting'
|
|
13161
12232
|
});
|
|
13162
12233
|
// T
|
|
13163
|
-
case
|
|
12234
|
+
case 'iiiii':
|
|
13164
12235
|
return localize.day(dayOfWeek, {
|
|
13165
|
-
width:
|
|
13166
|
-
context:
|
|
12236
|
+
width: 'narrow',
|
|
12237
|
+
context: 'formatting'
|
|
13167
12238
|
});
|
|
13168
12239
|
// Tu
|
|
13169
|
-
case
|
|
12240
|
+
case 'iiiiii':
|
|
13170
12241
|
return localize.day(dayOfWeek, {
|
|
13171
|
-
width:
|
|
13172
|
-
context:
|
|
12242
|
+
width: 'short',
|
|
12243
|
+
context: 'formatting'
|
|
13173
12244
|
});
|
|
13174
12245
|
// Tuesday
|
|
13175
|
-
case
|
|
12246
|
+
case 'iiii':
|
|
13176
12247
|
default:
|
|
13177
12248
|
return localize.day(dayOfWeek, {
|
|
13178
|
-
width:
|
|
13179
|
-
context:
|
|
12249
|
+
width: 'wide',
|
|
12250
|
+
context: 'formatting'
|
|
13180
12251
|
});
|
|
13181
12252
|
}
|
|
13182
12253
|
},
|
|
13183
12254
|
// AM or PM
|
|
13184
12255
|
a: function a(date, token, localize) {
|
|
13185
|
-
var hours = date.
|
|
13186
|
-
var dayPeriodEnumValue = hours / 12 >= 1 ?
|
|
12256
|
+
var hours = date.getUTCHours();
|
|
12257
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
13187
12258
|
switch (token) {
|
|
13188
|
-
case
|
|
13189
|
-
case
|
|
12259
|
+
case 'a':
|
|
12260
|
+
case 'aa':
|
|
13190
12261
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13191
|
-
width:
|
|
13192
|
-
context:
|
|
12262
|
+
width: 'abbreviated',
|
|
12263
|
+
context: 'formatting'
|
|
13193
12264
|
});
|
|
13194
|
-
case
|
|
12265
|
+
case 'aaa':
|
|
13195
12266
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13196
|
-
width:
|
|
13197
|
-
context:
|
|
12267
|
+
width: 'abbreviated',
|
|
12268
|
+
context: 'formatting'
|
|
13198
12269
|
}).toLowerCase();
|
|
13199
|
-
case
|
|
12270
|
+
case 'aaaaa':
|
|
13200
12271
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13201
|
-
width:
|
|
13202
|
-
context:
|
|
12272
|
+
width: 'narrow',
|
|
12273
|
+
context: 'formatting'
|
|
13203
12274
|
});
|
|
13204
|
-
case
|
|
12275
|
+
case 'aaaa':
|
|
13205
12276
|
default:
|
|
13206
12277
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13207
|
-
width:
|
|
13208
|
-
context:
|
|
12278
|
+
width: 'wide',
|
|
12279
|
+
context: 'formatting'
|
|
13209
12280
|
});
|
|
13210
12281
|
}
|
|
13211
12282
|
},
|
|
13212
12283
|
// AM, PM, midnight, noon
|
|
13213
12284
|
b: function b(date, token, localize) {
|
|
13214
|
-
var hours = date.
|
|
12285
|
+
var hours = date.getUTCHours();
|
|
13215
12286
|
var dayPeriodEnumValue;
|
|
13216
12287
|
if (hours === 12) {
|
|
13217
12288
|
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
13218
12289
|
} else if (hours === 0) {
|
|
13219
12290
|
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
13220
12291
|
} else {
|
|
13221
|
-
dayPeriodEnumValue = hours / 12 >= 1 ?
|
|
12292
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
13222
12293
|
}
|
|
13223
12294
|
switch (token) {
|
|
13224
|
-
case
|
|
13225
|
-
case
|
|
12295
|
+
case 'b':
|
|
12296
|
+
case 'bb':
|
|
13226
12297
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13227
|
-
width:
|
|
13228
|
-
context:
|
|
12298
|
+
width: 'abbreviated',
|
|
12299
|
+
context: 'formatting'
|
|
13229
12300
|
});
|
|
13230
|
-
case
|
|
12301
|
+
case 'bbb':
|
|
13231
12302
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13232
|
-
width:
|
|
13233
|
-
context:
|
|
12303
|
+
width: 'abbreviated',
|
|
12304
|
+
context: 'formatting'
|
|
13234
12305
|
}).toLowerCase();
|
|
13235
|
-
case
|
|
12306
|
+
case 'bbbbb':
|
|
13236
12307
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13237
|
-
width:
|
|
13238
|
-
context:
|
|
12308
|
+
width: 'narrow',
|
|
12309
|
+
context: 'formatting'
|
|
13239
12310
|
});
|
|
13240
|
-
case
|
|
12311
|
+
case 'bbbb':
|
|
13241
12312
|
default:
|
|
13242
12313
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13243
|
-
width:
|
|
13244
|
-
context:
|
|
12314
|
+
width: 'wide',
|
|
12315
|
+
context: 'formatting'
|
|
13245
12316
|
});
|
|
13246
12317
|
}
|
|
13247
12318
|
},
|
|
13248
12319
|
// in the morning, in the afternoon, in the evening, at night
|
|
13249
12320
|
B: function B(date, token, localize) {
|
|
13250
|
-
var hours = date.
|
|
12321
|
+
var hours = date.getUTCHours();
|
|
13251
12322
|
var dayPeriodEnumValue;
|
|
13252
12323
|
if (hours >= 17) {
|
|
13253
12324
|
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
@@ -13259,248 +12330,255 @@ var formatters = {
|
|
|
13259
12330
|
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
13260
12331
|
}
|
|
13261
12332
|
switch (token) {
|
|
13262
|
-
case
|
|
13263
|
-
case
|
|
13264
|
-
case
|
|
12333
|
+
case 'B':
|
|
12334
|
+
case 'BB':
|
|
12335
|
+
case 'BBB':
|
|
13265
12336
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13266
|
-
width:
|
|
13267
|
-
context:
|
|
12337
|
+
width: 'abbreviated',
|
|
12338
|
+
context: 'formatting'
|
|
13268
12339
|
});
|
|
13269
|
-
case
|
|
12340
|
+
case 'BBBBB':
|
|
13270
12341
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13271
|
-
width:
|
|
13272
|
-
context:
|
|
12342
|
+
width: 'narrow',
|
|
12343
|
+
context: 'formatting'
|
|
13273
12344
|
});
|
|
13274
|
-
case
|
|
12345
|
+
case 'BBBB':
|
|
13275
12346
|
default:
|
|
13276
12347
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
13277
|
-
width:
|
|
13278
|
-
context:
|
|
12348
|
+
width: 'wide',
|
|
12349
|
+
context: 'formatting'
|
|
13279
12350
|
});
|
|
13280
12351
|
}
|
|
13281
12352
|
},
|
|
13282
12353
|
// Hour [1-12]
|
|
13283
12354
|
h: function h(date, token, localize) {
|
|
13284
|
-
if (token ===
|
|
13285
|
-
var hours = date.
|
|
12355
|
+
if (token === 'ho') {
|
|
12356
|
+
var hours = date.getUTCHours() % 12;
|
|
13286
12357
|
if (hours === 0) hours = 12;
|
|
13287
12358
|
return localize.ordinalNumber(hours, {
|
|
13288
|
-
unit:
|
|
12359
|
+
unit: 'hour'
|
|
13289
12360
|
});
|
|
13290
12361
|
}
|
|
13291
|
-
return
|
|
12362
|
+
return formatters$1.h(date, token);
|
|
13292
12363
|
},
|
|
13293
12364
|
// Hour [0-23]
|
|
13294
12365
|
H: function H(date, token, localize) {
|
|
13295
|
-
if (token ===
|
|
13296
|
-
return localize.ordinalNumber(date.
|
|
13297
|
-
unit:
|
|
12366
|
+
if (token === 'Ho') {
|
|
12367
|
+
return localize.ordinalNumber(date.getUTCHours(), {
|
|
12368
|
+
unit: 'hour'
|
|
13298
12369
|
});
|
|
13299
12370
|
}
|
|
13300
|
-
return
|
|
12371
|
+
return formatters$1.H(date, token);
|
|
13301
12372
|
},
|
|
13302
12373
|
// Hour [0-11]
|
|
13303
12374
|
K: function K(date, token, localize) {
|
|
13304
|
-
var hours = date.
|
|
13305
|
-
if (token ===
|
|
12375
|
+
var hours = date.getUTCHours() % 12;
|
|
12376
|
+
if (token === 'Ko') {
|
|
13306
12377
|
return localize.ordinalNumber(hours, {
|
|
13307
|
-
unit:
|
|
12378
|
+
unit: 'hour'
|
|
13308
12379
|
});
|
|
13309
12380
|
}
|
|
13310
12381
|
return addLeadingZeros(hours, token.length);
|
|
13311
12382
|
},
|
|
13312
12383
|
// Hour [1-24]
|
|
13313
12384
|
k: function k(date, token, localize) {
|
|
13314
|
-
var hours = date.
|
|
12385
|
+
var hours = date.getUTCHours();
|
|
13315
12386
|
if (hours === 0) hours = 24;
|
|
13316
|
-
if (token ===
|
|
12387
|
+
if (token === 'ko') {
|
|
13317
12388
|
return localize.ordinalNumber(hours, {
|
|
13318
|
-
unit:
|
|
12389
|
+
unit: 'hour'
|
|
13319
12390
|
});
|
|
13320
12391
|
}
|
|
13321
12392
|
return addLeadingZeros(hours, token.length);
|
|
13322
12393
|
},
|
|
13323
12394
|
// Minute
|
|
13324
12395
|
m: function m(date, token, localize) {
|
|
13325
|
-
if (token ===
|
|
13326
|
-
return localize.ordinalNumber(date.
|
|
13327
|
-
unit:
|
|
12396
|
+
if (token === 'mo') {
|
|
12397
|
+
return localize.ordinalNumber(date.getUTCMinutes(), {
|
|
12398
|
+
unit: 'minute'
|
|
13328
12399
|
});
|
|
13329
12400
|
}
|
|
13330
|
-
return
|
|
12401
|
+
return formatters$1.m(date, token);
|
|
13331
12402
|
},
|
|
13332
12403
|
// Second
|
|
13333
12404
|
s: function s(date, token, localize) {
|
|
13334
|
-
if (token ===
|
|
13335
|
-
return localize.ordinalNumber(date.
|
|
13336
|
-
unit:
|
|
12405
|
+
if (token === 'so') {
|
|
12406
|
+
return localize.ordinalNumber(date.getUTCSeconds(), {
|
|
12407
|
+
unit: 'second'
|
|
13337
12408
|
});
|
|
13338
12409
|
}
|
|
13339
|
-
return
|
|
12410
|
+
return formatters$1.s(date, token);
|
|
13340
12411
|
},
|
|
13341
12412
|
// Fraction of second
|
|
13342
12413
|
S: function S(date, token) {
|
|
13343
|
-
return
|
|
12414
|
+
return formatters$1.S(date, token);
|
|
13344
12415
|
},
|
|
13345
12416
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
13346
|
-
X: function X(date, token, _localize) {
|
|
13347
|
-
var
|
|
12417
|
+
X: function X(date, token, _localize, options) {
|
|
12418
|
+
var originalDate = options._originalDate || date;
|
|
12419
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13348
12420
|
if (timezoneOffset === 0) {
|
|
13349
|
-
return
|
|
12421
|
+
return 'Z';
|
|
13350
12422
|
}
|
|
13351
12423
|
switch (token) {
|
|
13352
12424
|
// Hours and optional minutes
|
|
13353
|
-
case
|
|
12425
|
+
case 'X':
|
|
13354
12426
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
13355
12427
|
|
|
13356
12428
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
13357
12429
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
13358
12430
|
// so this token always has the same output as `XX`
|
|
13359
|
-
case
|
|
13360
|
-
case
|
|
12431
|
+
case 'XXXX':
|
|
12432
|
+
case 'XX':
|
|
13361
12433
|
// Hours and minutes without `:` delimiter
|
|
13362
12434
|
return formatTimezone(timezoneOffset);
|
|
13363
12435
|
|
|
13364
12436
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
13365
12437
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
13366
12438
|
// so this token always has the same output as `XXX`
|
|
13367
|
-
case
|
|
13368
|
-
case
|
|
12439
|
+
case 'XXXXX':
|
|
12440
|
+
case 'XXX': // Hours and minutes with `:` delimiter
|
|
13369
12441
|
default:
|
|
13370
|
-
return formatTimezone(timezoneOffset,
|
|
12442
|
+
return formatTimezone(timezoneOffset, ':');
|
|
13371
12443
|
}
|
|
13372
12444
|
},
|
|
13373
12445
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
13374
|
-
x: function x(date, token, _localize) {
|
|
13375
|
-
var
|
|
12446
|
+
x: function x(date, token, _localize, options) {
|
|
12447
|
+
var originalDate = options._originalDate || date;
|
|
12448
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13376
12449
|
switch (token) {
|
|
13377
12450
|
// Hours and optional minutes
|
|
13378
|
-
case
|
|
12451
|
+
case 'x':
|
|
13379
12452
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
13380
12453
|
|
|
13381
12454
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
13382
12455
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
13383
12456
|
// so this token always has the same output as `xx`
|
|
13384
|
-
case
|
|
13385
|
-
case
|
|
12457
|
+
case 'xxxx':
|
|
12458
|
+
case 'xx':
|
|
13386
12459
|
// Hours and minutes without `:` delimiter
|
|
13387
12460
|
return formatTimezone(timezoneOffset);
|
|
13388
12461
|
|
|
13389
12462
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
13390
12463
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
13391
12464
|
// so this token always has the same output as `xxx`
|
|
13392
|
-
case
|
|
13393
|
-
case
|
|
12465
|
+
case 'xxxxx':
|
|
12466
|
+
case 'xxx': // Hours and minutes with `:` delimiter
|
|
13394
12467
|
default:
|
|
13395
|
-
return formatTimezone(timezoneOffset,
|
|
12468
|
+
return formatTimezone(timezoneOffset, ':');
|
|
13396
12469
|
}
|
|
13397
12470
|
},
|
|
13398
12471
|
// Timezone (GMT)
|
|
13399
|
-
O: function O(date, token, _localize) {
|
|
13400
|
-
var
|
|
12472
|
+
O: function O(date, token, _localize, options) {
|
|
12473
|
+
var originalDate = options._originalDate || date;
|
|
12474
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13401
12475
|
switch (token) {
|
|
13402
12476
|
// Short
|
|
13403
|
-
case
|
|
13404
|
-
case
|
|
13405
|
-
case
|
|
13406
|
-
return
|
|
12477
|
+
case 'O':
|
|
12478
|
+
case 'OO':
|
|
12479
|
+
case 'OOO':
|
|
12480
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
13407
12481
|
// Long
|
|
13408
|
-
case
|
|
12482
|
+
case 'OOOO':
|
|
13409
12483
|
default:
|
|
13410
|
-
return
|
|
12484
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
13411
12485
|
}
|
|
13412
12486
|
},
|
|
13413
12487
|
// Timezone (specific non-location)
|
|
13414
|
-
z: function z(date, token, _localize) {
|
|
13415
|
-
var
|
|
12488
|
+
z: function z(date, token, _localize, options) {
|
|
12489
|
+
var originalDate = options._originalDate || date;
|
|
12490
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
13416
12491
|
switch (token) {
|
|
13417
12492
|
// Short
|
|
13418
|
-
case
|
|
13419
|
-
case
|
|
13420
|
-
case
|
|
13421
|
-
return
|
|
12493
|
+
case 'z':
|
|
12494
|
+
case 'zz':
|
|
12495
|
+
case 'zzz':
|
|
12496
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
13422
12497
|
// Long
|
|
13423
|
-
case
|
|
12498
|
+
case 'zzzz':
|
|
13424
12499
|
default:
|
|
13425
|
-
return
|
|
12500
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
13426
12501
|
}
|
|
13427
12502
|
},
|
|
13428
12503
|
// Seconds timestamp
|
|
13429
|
-
t: function t(date, token, _localize) {
|
|
13430
|
-
var
|
|
12504
|
+
t: function t(date, token, _localize, options) {
|
|
12505
|
+
var originalDate = options._originalDate || date;
|
|
12506
|
+
var timestamp = Math.floor(originalDate.getTime() / 1000);
|
|
13431
12507
|
return addLeadingZeros(timestamp, token.length);
|
|
13432
12508
|
},
|
|
13433
12509
|
// Milliseconds timestamp
|
|
13434
|
-
T: function T(date, token, _localize) {
|
|
13435
|
-
|
|
12510
|
+
T: function T(date, token, _localize, options) {
|
|
12511
|
+
var originalDate = options._originalDate || date;
|
|
12512
|
+
var timestamp = originalDate.getTime();
|
|
12513
|
+
return addLeadingZeros(timestamp, token.length);
|
|
13436
12514
|
}
|
|
13437
12515
|
};
|
|
13438
|
-
function formatTimezoneShort(offset) {
|
|
13439
|
-
var
|
|
13440
|
-
var sign = offset > 0 ? "-" : "+";
|
|
12516
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
12517
|
+
var sign = offset > 0 ? '-' : '+';
|
|
13441
12518
|
var absOffset = Math.abs(offset);
|
|
13442
|
-
var hours = Math.
|
|
12519
|
+
var hours = Math.floor(absOffset / 60);
|
|
13443
12520
|
var minutes = absOffset % 60;
|
|
13444
12521
|
if (minutes === 0) {
|
|
13445
12522
|
return sign + String(hours);
|
|
13446
12523
|
}
|
|
12524
|
+
var delimiter = dirtyDelimiter;
|
|
13447
12525
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
13448
12526
|
}
|
|
13449
|
-
function formatTimezoneWithOptionalMinutes(offset,
|
|
12527
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
13450
12528
|
if (offset % 60 === 0) {
|
|
13451
|
-
var sign = offset > 0 ?
|
|
12529
|
+
var sign = offset > 0 ? '-' : '+';
|
|
13452
12530
|
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
13453
12531
|
}
|
|
13454
|
-
return formatTimezone(offset,
|
|
12532
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
13455
12533
|
}
|
|
13456
|
-
function formatTimezone(offset) {
|
|
13457
|
-
var delimiter =
|
|
13458
|
-
var sign = offset > 0 ?
|
|
12534
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
12535
|
+
var delimiter = dirtyDelimiter || '';
|
|
12536
|
+
var sign = offset > 0 ? '-' : '+';
|
|
13459
12537
|
var absOffset = Math.abs(offset);
|
|
13460
|
-
var hours = addLeadingZeros(Math.
|
|
12538
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
13461
12539
|
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
13462
12540
|
return sign + hours + delimiter + minutes;
|
|
13463
12541
|
}
|
|
13464
12542
|
|
|
13465
12543
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
13466
12544
|
switch (pattern) {
|
|
13467
|
-
case
|
|
12545
|
+
case 'P':
|
|
13468
12546
|
return formatLong.date({
|
|
13469
|
-
width:
|
|
12547
|
+
width: 'short'
|
|
13470
12548
|
});
|
|
13471
|
-
case
|
|
12549
|
+
case 'PP':
|
|
13472
12550
|
return formatLong.date({
|
|
13473
|
-
width:
|
|
12551
|
+
width: 'medium'
|
|
13474
12552
|
});
|
|
13475
|
-
case
|
|
12553
|
+
case 'PPP':
|
|
13476
12554
|
return formatLong.date({
|
|
13477
|
-
width:
|
|
12555
|
+
width: 'long'
|
|
13478
12556
|
});
|
|
13479
|
-
case
|
|
12557
|
+
case 'PPPP':
|
|
13480
12558
|
default:
|
|
13481
12559
|
return formatLong.date({
|
|
13482
|
-
width:
|
|
12560
|
+
width: 'full'
|
|
13483
12561
|
});
|
|
13484
12562
|
}
|
|
13485
12563
|
};
|
|
13486
12564
|
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
13487
12565
|
switch (pattern) {
|
|
13488
|
-
case
|
|
12566
|
+
case 'p':
|
|
13489
12567
|
return formatLong.time({
|
|
13490
|
-
width:
|
|
12568
|
+
width: 'short'
|
|
13491
12569
|
});
|
|
13492
|
-
case
|
|
12570
|
+
case 'pp':
|
|
13493
12571
|
return formatLong.time({
|
|
13494
|
-
width:
|
|
12572
|
+
width: 'medium'
|
|
13495
12573
|
});
|
|
13496
|
-
case
|
|
12574
|
+
case 'ppp':
|
|
13497
12575
|
return formatLong.time({
|
|
13498
|
-
width:
|
|
12576
|
+
width: 'long'
|
|
13499
12577
|
});
|
|
13500
|
-
case
|
|
12578
|
+
case 'pppp':
|
|
13501
12579
|
default:
|
|
13502
12580
|
return formatLong.time({
|
|
13503
|
-
width:
|
|
12581
|
+
width: 'full'
|
|
13504
12582
|
});
|
|
13505
12583
|
}
|
|
13506
12584
|
};
|
|
@@ -13513,55 +12591,550 @@ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong)
|
|
|
13513
12591
|
}
|
|
13514
12592
|
var dateTimeFormat;
|
|
13515
12593
|
switch (datePattern) {
|
|
13516
|
-
case
|
|
12594
|
+
case 'P':
|
|
13517
12595
|
dateTimeFormat = formatLong.dateTime({
|
|
13518
|
-
width:
|
|
12596
|
+
width: 'short'
|
|
13519
12597
|
});
|
|
13520
12598
|
break;
|
|
13521
|
-
case
|
|
12599
|
+
case 'PP':
|
|
13522
12600
|
dateTimeFormat = formatLong.dateTime({
|
|
13523
|
-
width:
|
|
12601
|
+
width: 'medium'
|
|
13524
12602
|
});
|
|
13525
12603
|
break;
|
|
13526
|
-
case
|
|
12604
|
+
case 'PPP':
|
|
13527
12605
|
dateTimeFormat = formatLong.dateTime({
|
|
13528
|
-
width:
|
|
12606
|
+
width: 'long'
|
|
13529
12607
|
});
|
|
13530
12608
|
break;
|
|
13531
|
-
case
|
|
12609
|
+
case 'PPPP':
|
|
13532
12610
|
default:
|
|
13533
12611
|
dateTimeFormat = formatLong.dateTime({
|
|
13534
|
-
width:
|
|
12612
|
+
width: 'full'
|
|
13535
12613
|
});
|
|
13536
12614
|
break;
|
|
13537
12615
|
}
|
|
13538
|
-
return dateTimeFormat.replace(
|
|
12616
|
+
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
13539
12617
|
};
|
|
13540
12618
|
var longFormatters = {
|
|
13541
12619
|
p: timeLongFormatter,
|
|
13542
12620
|
P: dateTimeLongFormatter
|
|
13543
12621
|
};
|
|
13544
12622
|
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
12623
|
+
/**
|
|
12624
|
+
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
12625
|
+
* They usually appear for dates that denote time before the timezones were introduced
|
|
12626
|
+
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
12627
|
+
* and GMT+01:00:00 after that date)
|
|
12628
|
+
*
|
|
12629
|
+
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
12630
|
+
* which would lead to incorrect calculations.
|
|
12631
|
+
*
|
|
12632
|
+
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
12633
|
+
*/
|
|
12634
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
12635
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
12636
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
12637
|
+
return date.getTime() - utcDate.getTime();
|
|
12638
|
+
}
|
|
12639
|
+
|
|
12640
|
+
var protectedDayOfYearTokens = ['D', 'DD'];
|
|
12641
|
+
var protectedWeekYearTokens = ['YY', 'YYYY'];
|
|
13548
12642
|
function isProtectedDayOfYearToken(token) {
|
|
13549
|
-
return
|
|
12643
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
13550
12644
|
}
|
|
13551
12645
|
function isProtectedWeekYearToken(token) {
|
|
13552
|
-
return
|
|
12646
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
12647
|
+
}
|
|
12648
|
+
function throwProtectedError(token, format, input) {
|
|
12649
|
+
if (token === 'YYYY') {
|
|
12650
|
+
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"));
|
|
12651
|
+
} else if (token === 'YY') {
|
|
12652
|
+
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"));
|
|
12653
|
+
} else if (token === 'D') {
|
|
12654
|
+
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"));
|
|
12655
|
+
} else if (token === 'DD') {
|
|
12656
|
+
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"));
|
|
12657
|
+
}
|
|
13553
12658
|
}
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
|
|
12659
|
+
|
|
12660
|
+
var formatDistanceLocale$1 = {
|
|
12661
|
+
lessThanXSeconds: {
|
|
12662
|
+
one: 'less than a second',
|
|
12663
|
+
other: 'less than {{count}} seconds'
|
|
12664
|
+
},
|
|
12665
|
+
xSeconds: {
|
|
12666
|
+
one: '1 second',
|
|
12667
|
+
other: '{{count}} seconds'
|
|
12668
|
+
},
|
|
12669
|
+
halfAMinute: 'half a minute',
|
|
12670
|
+
lessThanXMinutes: {
|
|
12671
|
+
one: 'less than a minute',
|
|
12672
|
+
other: 'less than {{count}} minutes'
|
|
12673
|
+
},
|
|
12674
|
+
xMinutes: {
|
|
12675
|
+
one: '1 minute',
|
|
12676
|
+
other: '{{count}} minutes'
|
|
12677
|
+
},
|
|
12678
|
+
aboutXHours: {
|
|
12679
|
+
one: 'about 1 hour',
|
|
12680
|
+
other: 'about {{count}} hours'
|
|
12681
|
+
},
|
|
12682
|
+
xHours: {
|
|
12683
|
+
one: '1 hour',
|
|
12684
|
+
other: '{{count}} hours'
|
|
12685
|
+
},
|
|
12686
|
+
xDays: {
|
|
12687
|
+
one: '1 day',
|
|
12688
|
+
other: '{{count}} days'
|
|
12689
|
+
},
|
|
12690
|
+
aboutXWeeks: {
|
|
12691
|
+
one: 'about 1 week',
|
|
12692
|
+
other: 'about {{count}} weeks'
|
|
12693
|
+
},
|
|
12694
|
+
xWeeks: {
|
|
12695
|
+
one: '1 week',
|
|
12696
|
+
other: '{{count}} weeks'
|
|
12697
|
+
},
|
|
12698
|
+
aboutXMonths: {
|
|
12699
|
+
one: 'about 1 month',
|
|
12700
|
+
other: 'about {{count}} months'
|
|
12701
|
+
},
|
|
12702
|
+
xMonths: {
|
|
12703
|
+
one: '1 month',
|
|
12704
|
+
other: '{{count}} months'
|
|
12705
|
+
},
|
|
12706
|
+
aboutXYears: {
|
|
12707
|
+
one: 'about 1 year',
|
|
12708
|
+
other: 'about {{count}} years'
|
|
12709
|
+
},
|
|
12710
|
+
xYears: {
|
|
12711
|
+
one: '1 year',
|
|
12712
|
+
other: '{{count}} years'
|
|
12713
|
+
},
|
|
12714
|
+
overXYears: {
|
|
12715
|
+
one: 'over 1 year',
|
|
12716
|
+
other: 'over {{count}} years'
|
|
12717
|
+
},
|
|
12718
|
+
almostXYears: {
|
|
12719
|
+
one: 'almost 1 year',
|
|
12720
|
+
other: 'almost {{count}} years'
|
|
12721
|
+
}
|
|
12722
|
+
};
|
|
12723
|
+
var formatDistance$1 = function formatDistance(token, count, options) {
|
|
12724
|
+
var result;
|
|
12725
|
+
var tokenValue = formatDistanceLocale$1[token];
|
|
12726
|
+
if (typeof tokenValue === 'string') {
|
|
12727
|
+
result = tokenValue;
|
|
12728
|
+
} else if (count === 1) {
|
|
12729
|
+
result = tokenValue.one;
|
|
12730
|
+
} else {
|
|
12731
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
12732
|
+
}
|
|
12733
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
12734
|
+
if (options.comparison && options.comparison > 0) {
|
|
12735
|
+
return 'in ' + result;
|
|
12736
|
+
} else {
|
|
12737
|
+
return result + ' ago';
|
|
12738
|
+
}
|
|
12739
|
+
}
|
|
12740
|
+
return result;
|
|
12741
|
+
};
|
|
12742
|
+
|
|
12743
|
+
function buildFormatLongFn(args) {
|
|
12744
|
+
return function () {
|
|
12745
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12746
|
+
// TODO: Remove String()
|
|
12747
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
12748
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
12749
|
+
return format;
|
|
12750
|
+
};
|
|
13558
12751
|
}
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
12752
|
+
|
|
12753
|
+
var dateFormats$2 = {
|
|
12754
|
+
full: 'EEEE, MMMM do, y',
|
|
12755
|
+
"long": 'MMMM do, y',
|
|
12756
|
+
medium: 'MMM d, y',
|
|
12757
|
+
"short": 'MM/dd/yyyy'
|
|
12758
|
+
};
|
|
12759
|
+
var timeFormats$2 = {
|
|
12760
|
+
full: 'h:mm:ss a zzzz',
|
|
12761
|
+
"long": 'h:mm:ss a z',
|
|
12762
|
+
medium: 'h:mm:ss a',
|
|
12763
|
+
"short": 'h:mm a'
|
|
12764
|
+
};
|
|
12765
|
+
var dateTimeFormats$2 = {
|
|
12766
|
+
full: "{{date}} 'at' {{time}}",
|
|
12767
|
+
"long": "{{date}} 'at' {{time}}",
|
|
12768
|
+
medium: '{{date}}, {{time}}',
|
|
12769
|
+
"short": '{{date}}, {{time}}'
|
|
12770
|
+
};
|
|
12771
|
+
var formatLong$2 = {
|
|
12772
|
+
date: buildFormatLongFn({
|
|
12773
|
+
formats: dateFormats$2,
|
|
12774
|
+
defaultWidth: 'full'
|
|
12775
|
+
}),
|
|
12776
|
+
time: buildFormatLongFn({
|
|
12777
|
+
formats: timeFormats$2,
|
|
12778
|
+
defaultWidth: 'full'
|
|
12779
|
+
}),
|
|
12780
|
+
dateTime: buildFormatLongFn({
|
|
12781
|
+
formats: dateTimeFormats$2,
|
|
12782
|
+
defaultWidth: 'full'
|
|
12783
|
+
})
|
|
12784
|
+
};
|
|
12785
|
+
|
|
12786
|
+
var formatRelativeLocale = {
|
|
12787
|
+
lastWeek: "'last' eeee 'at' p",
|
|
12788
|
+
yesterday: "'yesterday at' p",
|
|
12789
|
+
today: "'today at' p",
|
|
12790
|
+
tomorrow: "'tomorrow at' p",
|
|
12791
|
+
nextWeek: "eeee 'at' p",
|
|
12792
|
+
other: 'P'
|
|
12793
|
+
};
|
|
12794
|
+
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
12795
|
+
return formatRelativeLocale[token];
|
|
12796
|
+
};
|
|
12797
|
+
|
|
12798
|
+
function buildLocalizeFn(args) {
|
|
12799
|
+
return function (dirtyIndex, options) {
|
|
12800
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
|
|
12801
|
+
var valuesArray;
|
|
12802
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
12803
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
12804
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
12805
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
12806
|
+
} else {
|
|
12807
|
+
var _defaultWidth = args.defaultWidth;
|
|
12808
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
12809
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
12810
|
+
}
|
|
12811
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
12812
|
+
// @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!
|
|
12813
|
+
return valuesArray[index];
|
|
12814
|
+
};
|
|
13562
12815
|
}
|
|
13563
12816
|
|
|
13564
|
-
|
|
12817
|
+
var eraValues = {
|
|
12818
|
+
narrow: ['B', 'A'],
|
|
12819
|
+
abbreviated: ['BC', 'AD'],
|
|
12820
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
12821
|
+
};
|
|
12822
|
+
var quarterValues = {
|
|
12823
|
+
narrow: ['1', '2', '3', '4'],
|
|
12824
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
12825
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
12826
|
+
};
|
|
12827
|
+
|
|
12828
|
+
// Note: in English, the names of days of the week and months are capitalized.
|
|
12829
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
12830
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
12831
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
12832
|
+
var monthValues = {
|
|
12833
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
12834
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
12835
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
12836
|
+
};
|
|
12837
|
+
var dayValues = {
|
|
12838
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
12839
|
+
"short": ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
12840
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
12841
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
12842
|
+
};
|
|
12843
|
+
var dayPeriodValues = {
|
|
12844
|
+
narrow: {
|
|
12845
|
+
am: 'a',
|
|
12846
|
+
pm: 'p',
|
|
12847
|
+
midnight: 'mi',
|
|
12848
|
+
noon: 'n',
|
|
12849
|
+
morning: 'morning',
|
|
12850
|
+
afternoon: 'afternoon',
|
|
12851
|
+
evening: 'evening',
|
|
12852
|
+
night: 'night'
|
|
12853
|
+
},
|
|
12854
|
+
abbreviated: {
|
|
12855
|
+
am: 'AM',
|
|
12856
|
+
pm: 'PM',
|
|
12857
|
+
midnight: 'midnight',
|
|
12858
|
+
noon: 'noon',
|
|
12859
|
+
morning: 'morning',
|
|
12860
|
+
afternoon: 'afternoon',
|
|
12861
|
+
evening: 'evening',
|
|
12862
|
+
night: 'night'
|
|
12863
|
+
},
|
|
12864
|
+
wide: {
|
|
12865
|
+
am: 'a.m.',
|
|
12866
|
+
pm: 'p.m.',
|
|
12867
|
+
midnight: 'midnight',
|
|
12868
|
+
noon: 'noon',
|
|
12869
|
+
morning: 'morning',
|
|
12870
|
+
afternoon: 'afternoon',
|
|
12871
|
+
evening: 'evening',
|
|
12872
|
+
night: 'night'
|
|
12873
|
+
}
|
|
12874
|
+
};
|
|
12875
|
+
var formattingDayPeriodValues = {
|
|
12876
|
+
narrow: {
|
|
12877
|
+
am: 'a',
|
|
12878
|
+
pm: 'p',
|
|
12879
|
+
midnight: 'mi',
|
|
12880
|
+
noon: 'n',
|
|
12881
|
+
morning: 'in the morning',
|
|
12882
|
+
afternoon: 'in the afternoon',
|
|
12883
|
+
evening: 'in the evening',
|
|
12884
|
+
night: 'at night'
|
|
12885
|
+
},
|
|
12886
|
+
abbreviated: {
|
|
12887
|
+
am: 'AM',
|
|
12888
|
+
pm: 'PM',
|
|
12889
|
+
midnight: 'midnight',
|
|
12890
|
+
noon: 'noon',
|
|
12891
|
+
morning: 'in the morning',
|
|
12892
|
+
afternoon: 'in the afternoon',
|
|
12893
|
+
evening: 'in the evening',
|
|
12894
|
+
night: 'at night'
|
|
12895
|
+
},
|
|
12896
|
+
wide: {
|
|
12897
|
+
am: 'a.m.',
|
|
12898
|
+
pm: 'p.m.',
|
|
12899
|
+
midnight: 'midnight',
|
|
12900
|
+
noon: 'noon',
|
|
12901
|
+
morning: 'in the morning',
|
|
12902
|
+
afternoon: 'in the afternoon',
|
|
12903
|
+
evening: 'in the evening',
|
|
12904
|
+
night: 'at night'
|
|
12905
|
+
}
|
|
12906
|
+
};
|
|
12907
|
+
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
12908
|
+
var number = Number(dirtyNumber);
|
|
12909
|
+
|
|
12910
|
+
// If ordinal numbers depend on context, for example,
|
|
12911
|
+
// if they are different for different grammatical genders,
|
|
12912
|
+
// use `options.unit`.
|
|
12913
|
+
//
|
|
12914
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
12915
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
12916
|
+
|
|
12917
|
+
var rem100 = number % 100;
|
|
12918
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
12919
|
+
switch (rem100 % 10) {
|
|
12920
|
+
case 1:
|
|
12921
|
+
return number + 'st';
|
|
12922
|
+
case 2:
|
|
12923
|
+
return number + 'nd';
|
|
12924
|
+
case 3:
|
|
12925
|
+
return number + 'rd';
|
|
12926
|
+
}
|
|
12927
|
+
}
|
|
12928
|
+
return number + 'th';
|
|
12929
|
+
};
|
|
12930
|
+
var localize = {
|
|
12931
|
+
ordinalNumber: ordinalNumber,
|
|
12932
|
+
era: buildLocalizeFn({
|
|
12933
|
+
values: eraValues,
|
|
12934
|
+
defaultWidth: 'wide'
|
|
12935
|
+
}),
|
|
12936
|
+
quarter: buildLocalizeFn({
|
|
12937
|
+
values: quarterValues,
|
|
12938
|
+
defaultWidth: 'wide',
|
|
12939
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
12940
|
+
return quarter - 1;
|
|
12941
|
+
}
|
|
12942
|
+
}),
|
|
12943
|
+
month: buildLocalizeFn({
|
|
12944
|
+
values: monthValues,
|
|
12945
|
+
defaultWidth: 'wide'
|
|
12946
|
+
}),
|
|
12947
|
+
day: buildLocalizeFn({
|
|
12948
|
+
values: dayValues,
|
|
12949
|
+
defaultWidth: 'wide'
|
|
12950
|
+
}),
|
|
12951
|
+
dayPeriod: buildLocalizeFn({
|
|
12952
|
+
values: dayPeriodValues,
|
|
12953
|
+
defaultWidth: 'wide',
|
|
12954
|
+
formattingValues: formattingDayPeriodValues,
|
|
12955
|
+
defaultFormattingWidth: 'wide'
|
|
12956
|
+
})
|
|
12957
|
+
};
|
|
12958
|
+
|
|
12959
|
+
function buildMatchFn(args) {
|
|
12960
|
+
return function (string) {
|
|
12961
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12962
|
+
var width = options.width;
|
|
12963
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
12964
|
+
var matchResult = string.match(matchPattern);
|
|
12965
|
+
if (!matchResult) {
|
|
12966
|
+
return null;
|
|
12967
|
+
}
|
|
12968
|
+
var matchedString = matchResult[0];
|
|
12969
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
12970
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
12971
|
+
return pattern.test(matchedString);
|
|
12972
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
12973
|
+
return pattern.test(matchedString);
|
|
12974
|
+
});
|
|
12975
|
+
var value;
|
|
12976
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
12977
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
12978
|
+
var rest = string.slice(matchedString.length);
|
|
12979
|
+
return {
|
|
12980
|
+
value: value,
|
|
12981
|
+
rest: rest
|
|
12982
|
+
};
|
|
12983
|
+
};
|
|
12984
|
+
}
|
|
12985
|
+
function findKey(object, predicate) {
|
|
12986
|
+
for (var key in object) {
|
|
12987
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
12988
|
+
return key;
|
|
12989
|
+
}
|
|
12990
|
+
}
|
|
12991
|
+
return undefined;
|
|
12992
|
+
}
|
|
12993
|
+
function findIndex(array, predicate) {
|
|
12994
|
+
for (var key = 0; key < array.length; key++) {
|
|
12995
|
+
if (predicate(array[key])) {
|
|
12996
|
+
return key;
|
|
12997
|
+
}
|
|
12998
|
+
}
|
|
12999
|
+
return undefined;
|
|
13000
|
+
}
|
|
13001
|
+
|
|
13002
|
+
function buildMatchPatternFn(args) {
|
|
13003
|
+
return function (string) {
|
|
13004
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13005
|
+
var matchResult = string.match(args.matchPattern);
|
|
13006
|
+
if (!matchResult) return null;
|
|
13007
|
+
var matchedString = matchResult[0];
|
|
13008
|
+
var parseResult = string.match(args.parsePattern);
|
|
13009
|
+
if (!parseResult) return null;
|
|
13010
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
13011
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
13012
|
+
var rest = string.slice(matchedString.length);
|
|
13013
|
+
return {
|
|
13014
|
+
value: value,
|
|
13015
|
+
rest: rest
|
|
13016
|
+
};
|
|
13017
|
+
};
|
|
13018
|
+
}
|
|
13019
|
+
|
|
13020
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
13021
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
13022
|
+
var matchEraPatterns = {
|
|
13023
|
+
narrow: /^(b|a)/i,
|
|
13024
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
13025
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
13026
|
+
};
|
|
13027
|
+
var parseEraPatterns = {
|
|
13028
|
+
any: [/^b/i, /^(a|c)/i]
|
|
13029
|
+
};
|
|
13030
|
+
var matchQuarterPatterns = {
|
|
13031
|
+
narrow: /^[1234]/i,
|
|
13032
|
+
abbreviated: /^q[1234]/i,
|
|
13033
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
13034
|
+
};
|
|
13035
|
+
var parseQuarterPatterns = {
|
|
13036
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
13037
|
+
};
|
|
13038
|
+
var matchMonthPatterns = {
|
|
13039
|
+
narrow: /^[jfmasond]/i,
|
|
13040
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
13041
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
13042
|
+
};
|
|
13043
|
+
var parseMonthPatterns = {
|
|
13044
|
+
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],
|
|
13045
|
+
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]
|
|
13046
|
+
};
|
|
13047
|
+
var matchDayPatterns = {
|
|
13048
|
+
narrow: /^[smtwf]/i,
|
|
13049
|
+
"short": /^(su|mo|tu|we|th|fr|sa)/i,
|
|
13050
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
13051
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
13052
|
+
};
|
|
13053
|
+
var parseDayPatterns = {
|
|
13054
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
13055
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
13056
|
+
};
|
|
13057
|
+
var matchDayPeriodPatterns = {
|
|
13058
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
13059
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
13060
|
+
};
|
|
13061
|
+
var parseDayPeriodPatterns = {
|
|
13062
|
+
any: {
|
|
13063
|
+
am: /^a/i,
|
|
13064
|
+
pm: /^p/i,
|
|
13065
|
+
midnight: /^mi/i,
|
|
13066
|
+
noon: /^no/i,
|
|
13067
|
+
morning: /morning/i,
|
|
13068
|
+
afternoon: /afternoon/i,
|
|
13069
|
+
evening: /evening/i,
|
|
13070
|
+
night: /night/i
|
|
13071
|
+
}
|
|
13072
|
+
};
|
|
13073
|
+
var match = {
|
|
13074
|
+
ordinalNumber: buildMatchPatternFn({
|
|
13075
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
13076
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
13077
|
+
valueCallback: function valueCallback(value) {
|
|
13078
|
+
return parseInt(value, 10);
|
|
13079
|
+
}
|
|
13080
|
+
}),
|
|
13081
|
+
era: buildMatchFn({
|
|
13082
|
+
matchPatterns: matchEraPatterns,
|
|
13083
|
+
defaultMatchWidth: 'wide',
|
|
13084
|
+
parsePatterns: parseEraPatterns,
|
|
13085
|
+
defaultParseWidth: 'any'
|
|
13086
|
+
}),
|
|
13087
|
+
quarter: buildMatchFn({
|
|
13088
|
+
matchPatterns: matchQuarterPatterns,
|
|
13089
|
+
defaultMatchWidth: 'wide',
|
|
13090
|
+
parsePatterns: parseQuarterPatterns,
|
|
13091
|
+
defaultParseWidth: 'any',
|
|
13092
|
+
valueCallback: function valueCallback(index) {
|
|
13093
|
+
return index + 1;
|
|
13094
|
+
}
|
|
13095
|
+
}),
|
|
13096
|
+
month: buildMatchFn({
|
|
13097
|
+
matchPatterns: matchMonthPatterns,
|
|
13098
|
+
defaultMatchWidth: 'wide',
|
|
13099
|
+
parsePatterns: parseMonthPatterns,
|
|
13100
|
+
defaultParseWidth: 'any'
|
|
13101
|
+
}),
|
|
13102
|
+
day: buildMatchFn({
|
|
13103
|
+
matchPatterns: matchDayPatterns,
|
|
13104
|
+
defaultMatchWidth: 'wide',
|
|
13105
|
+
parsePatterns: parseDayPatterns,
|
|
13106
|
+
defaultParseWidth: 'any'
|
|
13107
|
+
}),
|
|
13108
|
+
dayPeriod: buildMatchFn({
|
|
13109
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
13110
|
+
defaultMatchWidth: 'any',
|
|
13111
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
13112
|
+
defaultParseWidth: 'any'
|
|
13113
|
+
})
|
|
13114
|
+
};
|
|
13115
|
+
|
|
13116
|
+
/**
|
|
13117
|
+
* @type {Locale}
|
|
13118
|
+
* @category Locales
|
|
13119
|
+
* @summary English locale (United States).
|
|
13120
|
+
* @language English
|
|
13121
|
+
* @iso-639-2 eng
|
|
13122
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
13123
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
13124
|
+
*/
|
|
13125
|
+
var locale$5 = {
|
|
13126
|
+
code: 'en-US',
|
|
13127
|
+
formatDistance: formatDistance$1,
|
|
13128
|
+
formatLong: formatLong$2,
|
|
13129
|
+
formatRelative: formatRelative,
|
|
13130
|
+
localize: localize,
|
|
13131
|
+
match: match,
|
|
13132
|
+
options: {
|
|
13133
|
+
weekStartsOn: 0 /* Sunday */,
|
|
13134
|
+
firstWeekContainsDate: 1
|
|
13135
|
+
}
|
|
13136
|
+
};
|
|
13137
|
+
|
|
13565
13138
|
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
13566
13139
|
// (one of the certain letters followed by `o`)
|
|
13567
13140
|
// - (\w)\1* matches any sequences of the same letter
|
|
@@ -13581,13 +13154,8 @@ var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
|
13581
13154
|
var doubleQuoteRegExp = /''/g;
|
|
13582
13155
|
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
13583
13156
|
|
|
13584
|
-
/**
|
|
13585
|
-
* The {@link format} function options.
|
|
13586
|
-
*/
|
|
13587
|
-
|
|
13588
13157
|
/**
|
|
13589
13158
|
* @name format
|
|
13590
|
-
* @alias formatDate
|
|
13591
13159
|
* @category Common Helpers
|
|
13592
13160
|
* @summary Format the date.
|
|
13593
13161
|
*
|
|
@@ -13814,8 +13382,8 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
13814
13382
|
*
|
|
13815
13383
|
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
|
|
13816
13384
|
* except local week-numbering years are dependent on `options.weekStartsOn`
|
|
13817
|
-
* and `options.firstWeekContainsDate` (compare [getISOWeekYear]
|
|
13818
|
-
* and [getWeekYear]
|
|
13385
|
+
* and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
|
|
13386
|
+
* and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
|
|
13819
13387
|
*
|
|
13820
13388
|
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
|
|
13821
13389
|
* so right now these tokens fall back to GMT timezones.
|
|
@@ -13836,20 +13404,28 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
13836
13404
|
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
|
|
13837
13405
|
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13838
13406
|
*
|
|
13839
|
-
* @param date -
|
|
13840
|
-
* @param format -
|
|
13841
|
-
* @param options -
|
|
13842
|
-
*
|
|
13843
|
-
* @
|
|
13844
|
-
*
|
|
13845
|
-
* @
|
|
13846
|
-
*
|
|
13847
|
-
* @
|
|
13848
|
-
*
|
|
13849
|
-
* @
|
|
13850
|
-
* @throws
|
|
13851
|
-
* @throws
|
|
13852
|
-
* @throws
|
|
13407
|
+
* @param {Date|Number} date - the original date
|
|
13408
|
+
* @param {String} format - the string of tokens
|
|
13409
|
+
* @param {Object} [options] - an object with options.
|
|
13410
|
+
* @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
|
13411
|
+
* @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
|
|
13412
|
+
* @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
|
|
13413
|
+
* @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
|
|
13414
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13415
|
+
* @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
|
|
13416
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
13417
|
+
* @returns {String} the formatted date string
|
|
13418
|
+
* @throws {TypeError} 2 arguments required
|
|
13419
|
+
* @throws {RangeError} `date` must not be Invalid Date
|
|
13420
|
+
* @throws {RangeError} `options.locale` must contain `localize` property
|
|
13421
|
+
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
13422
|
+
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
13423
|
+
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
13424
|
+
* @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
|
|
13425
|
+
* @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
|
|
13426
|
+
* @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
|
|
13427
|
+
* @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
|
|
13428
|
+
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
13853
13429
|
*
|
|
13854
13430
|
* @example
|
|
13855
13431
|
* // Represent 11 February 2014 in middle-endian format:
|
|
@@ -13869,71 +13445,79 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
13869
13445
|
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
|
|
13870
13446
|
* //=> "3 o'clock"
|
|
13871
13447
|
*/
|
|
13872
|
-
|
|
13873
|
-
|
|
13448
|
+
|
|
13449
|
+
function format$1(dirtyDate, dirtyFormatStr, options) {
|
|
13450
|
+
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;
|
|
13451
|
+
requiredArgs(2, arguments);
|
|
13452
|
+
var formatStr = String(dirtyFormatStr);
|
|
13874
13453
|
var defaultOptions = getDefaultOptions();
|
|
13875
|
-
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 :
|
|
13876
|
-
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
|
|
13877
|
-
|
|
13878
|
-
|
|
13454
|
+
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 : locale$5;
|
|
13455
|
+
var firstWeekContainsDate = toInteger((_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 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
13456
|
+
|
|
13457
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
13458
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
13459
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
13460
|
+
}
|
|
13461
|
+
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);
|
|
13462
|
+
|
|
13463
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
13464
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
13465
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
13466
|
+
}
|
|
13467
|
+
if (!locale.localize) {
|
|
13468
|
+
throw new RangeError('locale must contain localize property');
|
|
13469
|
+
}
|
|
13470
|
+
if (!locale.formatLong) {
|
|
13471
|
+
throw new RangeError('locale must contain formatLong property');
|
|
13472
|
+
}
|
|
13473
|
+
var originalDate = toDate(dirtyDate);
|
|
13879
13474
|
if (!isValid(originalDate)) {
|
|
13880
|
-
throw new RangeError(
|
|
13475
|
+
throw new RangeError('Invalid time value');
|
|
13881
13476
|
}
|
|
13882
|
-
|
|
13477
|
+
|
|
13478
|
+
// Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
13479
|
+
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
13480
|
+
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
13481
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
13482
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
13483
|
+
var formatterOptions = {
|
|
13484
|
+
firstWeekContainsDate: firstWeekContainsDate,
|
|
13485
|
+
weekStartsOn: weekStartsOn,
|
|
13486
|
+
locale: locale,
|
|
13487
|
+
_originalDate: originalDate
|
|
13488
|
+
};
|
|
13489
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
13883
13490
|
var firstCharacter = substring[0];
|
|
13884
|
-
if (firstCharacter ===
|
|
13491
|
+
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
13885
13492
|
var longFormatter = longFormatters[firstCharacter];
|
|
13886
13493
|
return longFormatter(substring, locale.formatLong);
|
|
13887
13494
|
}
|
|
13888
13495
|
return substring;
|
|
13889
|
-
}).join(
|
|
13496
|
+
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
13890
13497
|
// Replace two single quote characters with one single quote character
|
|
13891
13498
|
if (substring === "''") {
|
|
13892
|
-
return
|
|
13893
|
-
isToken: false,
|
|
13894
|
-
value: "'"
|
|
13895
|
-
};
|
|
13499
|
+
return "'";
|
|
13896
13500
|
}
|
|
13897
13501
|
var firstCharacter = substring[0];
|
|
13898
13502
|
if (firstCharacter === "'") {
|
|
13899
|
-
return
|
|
13900
|
-
isToken: false,
|
|
13901
|
-
value: cleanEscapedString(substring)
|
|
13902
|
-
};
|
|
13503
|
+
return cleanEscapedString(substring);
|
|
13903
13504
|
}
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
}
|
|
13505
|
+
var formatter = formatters[firstCharacter];
|
|
13506
|
+
if (formatter) {
|
|
13507
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
13508
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
13509
|
+
}
|
|
13510
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
13511
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
13512
|
+
}
|
|
13513
|
+
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
13909
13514
|
}
|
|
13910
13515
|
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
13911
|
-
throw new RangeError(
|
|
13912
|
-
}
|
|
13913
|
-
return {
|
|
13914
|
-
isToken: false,
|
|
13915
|
-
value: substring
|
|
13916
|
-
};
|
|
13917
|
-
});
|
|
13918
|
-
|
|
13919
|
-
// invoke localize preprocessor (only for french locales at the moment)
|
|
13920
|
-
if (locale.localize.preprocessor) {
|
|
13921
|
-
parts = locale.localize.preprocessor(originalDate, parts);
|
|
13922
|
-
}
|
|
13923
|
-
var formatterOptions = {
|
|
13924
|
-
firstWeekContainsDate: firstWeekContainsDate,
|
|
13925
|
-
weekStartsOn: weekStartsOn,
|
|
13926
|
-
locale: locale
|
|
13927
|
-
};
|
|
13928
|
-
return parts.map(function (part) {
|
|
13929
|
-
if (!part.isToken) return part.value;
|
|
13930
|
-
var token = part.value;
|
|
13931
|
-
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token) || !(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
|
|
13932
|
-
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
13516
|
+
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
13933
13517
|
}
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13518
|
+
return substring;
|
|
13519
|
+
}).join('');
|
|
13520
|
+
return result;
|
|
13937
13521
|
}
|
|
13938
13522
|
function cleanEscapedString(input) {
|
|
13939
13523
|
var matched = input.match(escapedStringRegExp);
|
|
@@ -13943,9 +13527,21 @@ function cleanEscapedString(input) {
|
|
|
13943
13527
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
13944
13528
|
}
|
|
13945
13529
|
|
|
13946
|
-
|
|
13530
|
+
function convertToFP(fn, arity) {
|
|
13531
|
+
var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
13532
|
+
if (a.length >= arity) {
|
|
13533
|
+
return fn.apply(null, a.slice(0, arity).reverse());
|
|
13534
|
+
}
|
|
13535
|
+
return function () {
|
|
13536
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13537
|
+
args[_key] = arguments[_key];
|
|
13538
|
+
}
|
|
13539
|
+
return convertToFP(fn, arity, a.concat(args));
|
|
13540
|
+
};
|
|
13541
|
+
}
|
|
13947
13542
|
|
|
13948
|
-
|
|
13543
|
+
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
|
|
13544
|
+
var formatTime = convertToFP(format$1, 2);
|
|
13949
13545
|
|
|
13950
13546
|
var Wrapper = index$c(View)(function () {
|
|
13951
13547
|
return {
|
|
@@ -14439,7 +14035,7 @@ var CalendarRange = function CalendarRange(_ref) {
|
|
|
14439
14035
|
return /*#__PURE__*/React__default.createElement(StyledContainer$7, {
|
|
14440
14036
|
testID: testID
|
|
14441
14037
|
}, /*#__PURE__*/React__default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default.createElement(ContentNavigator, {
|
|
14442
|
-
value: !shouldShowMonthPicker ?
|
|
14038
|
+
value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
14443
14039
|
testID: "calendar-month-picker",
|
|
14444
14040
|
onPress: function onPress() {
|
|
14445
14041
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
@@ -14455,7 +14051,7 @@ var CalendarRange = function CalendarRange(_ref) {
|
|
|
14455
14051
|
textAlign: 'center',
|
|
14456
14052
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
14457
14053
|
}
|
|
14458
|
-
},
|
|
14054
|
+
}, formatTime('MMMM yyyy', visibleDate)), /*#__PURE__*/React__default.createElement(Icon, {
|
|
14459
14055
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
14460
14056
|
size: "small"
|
|
14461
14057
|
}))),
|
|
@@ -14575,7 +14171,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
14575
14171
|
return /*#__PURE__*/React__default.createElement(StyledContainer$7, {
|
|
14576
14172
|
testID: testID
|
|
14577
14173
|
}, /*#__PURE__*/React__default.createElement(StyledCalendarHeader, null, /*#__PURE__*/React__default.createElement(ContentNavigator, {
|
|
14578
|
-
value: !shouldShowMonthPicker ?
|
|
14174
|
+
value: !shouldShowMonthPicker ? formatTime('MMMM yyyy', visibleDate) : /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
14579
14175
|
testID: "calendar-month-picker",
|
|
14580
14176
|
onPress: function onPress() {
|
|
14581
14177
|
onToggleMonthPicker === null || onToggleMonthPicker === void 0 || onToggleMonthPicker(!monthPickerVisible);
|
|
@@ -14591,7 +14187,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
14591
14187
|
textAlign: 'center',
|
|
14592
14188
|
marginRight: theme.__hd__.calendar.space.headerMarginRight
|
|
14593
14189
|
}
|
|
14594
|
-
},
|
|
14190
|
+
}, formatTime('MMMM yyyy', visibleDate)), /*#__PURE__*/React__default.createElement(Icon, {
|
|
14595
14191
|
icon: monthPickerVisible ? 'arrow-up' : 'arrow-down',
|
|
14596
14192
|
size: "small"
|
|
14597
14193
|
}))),
|
|
@@ -15116,7 +14712,7 @@ var StyledPageControlWrapper = index$c(View)(function (_ref7) {
|
|
|
15116
14712
|
});
|
|
15117
14713
|
|
|
15118
14714
|
function isCarouselImageProps(image) {
|
|
15119
|
-
return _typeof(image) === 'object';
|
|
14715
|
+
return _typeof$1(image) === 'object';
|
|
15120
14716
|
}
|
|
15121
14717
|
var CarouselItem = function CarouselItem(_ref) {
|
|
15122
14718
|
var width = _ref.width,
|
|
@@ -15840,7 +15436,7 @@ function intern_delete(_ref3, value) {
|
|
|
15840
15436
|
return value;
|
|
15841
15437
|
}
|
|
15842
15438
|
function keyof(value) {
|
|
15843
|
-
return value !== null && _typeof(value) === "object" ? value.valueOf() : value;
|
|
15439
|
+
return value !== null && _typeof$1(value) === "object" ? value.valueOf() : value;
|
|
15844
15440
|
}
|
|
15845
15441
|
|
|
15846
15442
|
var e10 = Math.sqrt(50),
|
|
@@ -16286,7 +15882,7 @@ function selection_data (value, key) {
|
|
|
16286
15882
|
// cause the data to change while iterating by using a key function, but please
|
|
16287
15883
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
16288
15884
|
function arraylike(data) {
|
|
16289
|
-
return _typeof(data) === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
15885
|
+
return _typeof$1(data) === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
16290
15886
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
16291
15887
|
}
|
|
16292
15888
|
|
|
@@ -17300,8 +16896,8 @@ function object (a, b) {
|
|
|
17300
16896
|
var i = {},
|
|
17301
16897
|
c = {},
|
|
17302
16898
|
k;
|
|
17303
|
-
if (a === null || _typeof(a) !== "object") a = {};
|
|
17304
|
-
if (b === null || _typeof(b) !== "object") b = {};
|
|
16899
|
+
if (a === null || _typeof$1(a) !== "object") a = {};
|
|
16900
|
+
if (b === null || _typeof$1(b) !== "object") b = {};
|
|
17305
16901
|
for (k in b) {
|
|
17306
16902
|
if (k in a) {
|
|
17307
16903
|
i[k] = interpolate$1(a[k], b[k]);
|
|
@@ -17384,7 +16980,7 @@ function interpolateString (a, b) {
|
|
|
17384
16980
|
}
|
|
17385
16981
|
|
|
17386
16982
|
function interpolate$1 (a, b) {
|
|
17387
|
-
var t = _typeof(b),
|
|
16983
|
+
var t = _typeof$1(b),
|
|
17388
16984
|
c;
|
|
17389
16985
|
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);
|
|
17390
16986
|
}
|
|
@@ -17524,8 +17120,8 @@ var frame = 0,
|
|
|
17524
17120
|
clockLast = 0,
|
|
17525
17121
|
clockNow = 0,
|
|
17526
17122
|
clockSkew = 0,
|
|
17527
|
-
clock = (typeof performance === "undefined" ? "undefined" : _typeof(performance)) === "object" && performance.now ? performance : Date,
|
|
17528
|
-
setFrame = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
17123
|
+
clock = (typeof performance === "undefined" ? "undefined" : _typeof$1(performance)) === "object" && performance.now ? performance : Date,
|
|
17124
|
+
setFrame = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
17529
17125
|
setTimeout(f, 17);
|
|
17530
17126
|
};
|
|
17531
17127
|
function now() {
|
|
@@ -18852,7 +18448,7 @@ function formatLocale (locale) {
|
|
|
18852
18448
|
};
|
|
18853
18449
|
}
|
|
18854
18450
|
|
|
18855
|
-
var locale$
|
|
18451
|
+
var locale$4;
|
|
18856
18452
|
var format;
|
|
18857
18453
|
var formatPrefix;
|
|
18858
18454
|
defaultLocale({
|
|
@@ -18861,10 +18457,10 @@ defaultLocale({
|
|
|
18861
18457
|
currency: ["$", ""]
|
|
18862
18458
|
});
|
|
18863
18459
|
function defaultLocale(definition) {
|
|
18864
|
-
locale$
|
|
18865
|
-
format = locale$
|
|
18866
|
-
formatPrefix = locale$
|
|
18867
|
-
return locale$
|
|
18460
|
+
locale$4 = formatLocale(definition);
|
|
18461
|
+
format = locale$4.format;
|
|
18462
|
+
formatPrefix = locale$4.formatPrefix;
|
|
18463
|
+
return locale$4;
|
|
18868
18464
|
}
|
|
18869
18465
|
|
|
18870
18466
|
function precisionFixed (step) {
|
|
@@ -19227,7 +18823,7 @@ function withPath(shape) {
|
|
|
19227
18823
|
}
|
|
19228
18824
|
|
|
19229
18825
|
function array (x) {
|
|
19230
|
-
return _typeof(x) === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
|
|
18826
|
+
return _typeof$1(x) === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
|
|
19231
18827
|
: Array.from(x); // Map, Set, iterable, string, or anything else
|
|
19232
18828
|
}
|
|
19233
18829
|
|
|
@@ -21244,18 +20840,18 @@ var useCalculateDate = function useCalculateDate(_ref) {
|
|
|
21244
20840
|
}, [maxDate, minDate, value]);
|
|
21245
20841
|
};
|
|
21246
20842
|
|
|
21247
|
-
var locale$
|
|
20843
|
+
var locale$3 = {
|
|
21248
20844
|
lang: 'en-AU',
|
|
21249
20845
|
dateTimeFormats: {
|
|
21250
20846
|
fullDate: 'dd/MM/yyyy'
|
|
21251
20847
|
}
|
|
21252
20848
|
};
|
|
21253
20849
|
|
|
21254
|
-
var LocaleContext = /*#__PURE__*/createContext(locale$
|
|
20850
|
+
var LocaleContext = /*#__PURE__*/createContext(locale$3);
|
|
21255
20851
|
|
|
21256
20852
|
var useLocale = function useLocale() {
|
|
21257
20853
|
var context = useContext(LocaleContext);
|
|
21258
|
-
if (!context) return locale$
|
|
20854
|
+
if (!context) return locale$3;
|
|
21259
20855
|
return context;
|
|
21260
20856
|
};
|
|
21261
20857
|
var useDateTimeFormat = function useDateTimeFormat() {
|
|
@@ -21269,7 +20865,7 @@ var useDateTimeFormat = function useDateTimeFormat() {
|
|
|
21269
20865
|
};
|
|
21270
20866
|
};
|
|
21271
20867
|
|
|
21272
|
-
var locale = {
|
|
20868
|
+
var locale$2 = {
|
|
21273
20869
|
lang: 'en-CA',
|
|
21274
20870
|
dateTimeFormats: {
|
|
21275
20871
|
fullDate: 'MMM dd, yyyy'
|
|
@@ -21277,8 +20873,8 @@ var locale = {
|
|
|
21277
20873
|
};
|
|
21278
20874
|
|
|
21279
20875
|
var locales = {
|
|
21280
|
-
'en-AU': locale$
|
|
21281
|
-
'en-CA': locale
|
|
20876
|
+
'en-AU': locale$3,
|
|
20877
|
+
'en-CA': locale$2
|
|
21282
20878
|
};
|
|
21283
20879
|
|
|
21284
20880
|
// Function to get the date format based on the displayFormat and locale,
|
|
@@ -21313,7 +20909,7 @@ var useFormatDate = function useFormatDate(_ref) {
|
|
|
21313
20909
|
locale: locale,
|
|
21314
20910
|
localizeDateTime: localizeDateTime
|
|
21315
20911
|
});
|
|
21316
|
-
var displayValue = value ?
|
|
20912
|
+
var displayValue = value ? formatTime(format, value) : '';
|
|
21317
20913
|
return {
|
|
21318
20914
|
displayValue: displayValue,
|
|
21319
20915
|
format: format
|
|
@@ -24831,7 +24427,11 @@ var Toast = {
|
|
|
24831
24427
|
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
|
|
24832
24428
|
* arguments for all functions.
|
|
24833
24429
|
*
|
|
24834
|
-
* @param
|
|
24430
|
+
* @param {Object} newOptions - an object with options.
|
|
24431
|
+
* @param {Locale} [newOptions.locale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
|
24432
|
+
* @param {0|1|2|3|4|5|6} [newOptions.weekStartsOn] - the index of the first day of the week (0 - Sunday)
|
|
24433
|
+
* @param {1|2|3|4|5|6|7} [newOptions.firstWeekContainsDate] - the day of January, which is always in the first week of the year
|
|
24434
|
+
* @throws {TypeError} 1 argument required
|
|
24835
24435
|
*
|
|
24836
24436
|
* @example
|
|
24837
24437
|
* // Set global locale:
|
|
@@ -24865,23 +24465,21 @@ var Toast = {
|
|
|
24865
24465
|
* const result = startOfWeek(new Date(2014, 8, 2))
|
|
24866
24466
|
* //=> Sun Aug 31 2014 00:00:00
|
|
24867
24467
|
*/
|
|
24868
|
-
function setDefaultOptions(
|
|
24468
|
+
function setDefaultOptions(newOptions) {
|
|
24469
|
+
requiredArgs(1, arguments);
|
|
24869
24470
|
var result = {};
|
|
24870
24471
|
var defaultOptions = getDefaultOptions();
|
|
24871
24472
|
for (var property in defaultOptions) {
|
|
24872
24473
|
if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {
|
|
24873
|
-
// [TODO] I challenge you to fix the type
|
|
24874
24474
|
result[property] = defaultOptions[property];
|
|
24875
24475
|
}
|
|
24876
24476
|
}
|
|
24877
|
-
for (var _property in
|
|
24878
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
24879
|
-
if (
|
|
24880
|
-
// [TODO] I challenge you to fix the type
|
|
24477
|
+
for (var _property in newOptions) {
|
|
24478
|
+
if (Object.prototype.hasOwnProperty.call(newOptions, _property)) {
|
|
24479
|
+
if (newOptions[_property] === undefined) {
|
|
24881
24480
|
delete result[_property];
|
|
24882
24481
|
} else {
|
|
24883
|
-
|
|
24884
|
-
result[_property] = options[_property];
|
|
24482
|
+
result[_property] = newOptions[_property];
|
|
24885
24483
|
}
|
|
24886
24484
|
}
|
|
24887
24485
|
}
|
|
@@ -24889,47 +24487,48 @@ function setDefaultOptions(options) {
|
|
|
24889
24487
|
}
|
|
24890
24488
|
|
|
24891
24489
|
var dateFormats$1 = {
|
|
24892
|
-
full:
|
|
24893
|
-
"long":
|
|
24894
|
-
medium:
|
|
24895
|
-
"short":
|
|
24490
|
+
full: 'EEEE, d MMMM yyyy',
|
|
24491
|
+
"long": 'd MMMM yyyy',
|
|
24492
|
+
medium: 'd MMM yyyy',
|
|
24493
|
+
"short": 'dd/MM/yyyy'
|
|
24896
24494
|
};
|
|
24897
24495
|
var timeFormats$1 = {
|
|
24898
|
-
full:
|
|
24899
|
-
"long":
|
|
24900
|
-
medium:
|
|
24901
|
-
"short":
|
|
24496
|
+
full: 'h:mm:ss a zzzz',
|
|
24497
|
+
"long": 'h:mm:ss a z',
|
|
24498
|
+
medium: 'h:mm:ss a',
|
|
24499
|
+
"short": 'h:mm a'
|
|
24902
24500
|
};
|
|
24903
24501
|
var dateTimeFormats$1 = {
|
|
24904
24502
|
full: "{{date}} 'at' {{time}}",
|
|
24905
24503
|
"long": "{{date}} 'at' {{time}}",
|
|
24906
|
-
medium:
|
|
24907
|
-
"short":
|
|
24504
|
+
medium: '{{date}}, {{time}}',
|
|
24505
|
+
"short": '{{date}}, {{time}}'
|
|
24908
24506
|
};
|
|
24909
24507
|
var formatLong$1 = {
|
|
24910
24508
|
date: buildFormatLongFn({
|
|
24911
24509
|
formats: dateFormats$1,
|
|
24912
|
-
defaultWidth:
|
|
24510
|
+
defaultWidth: 'full'
|
|
24913
24511
|
}),
|
|
24914
24512
|
time: buildFormatLongFn({
|
|
24915
24513
|
formats: timeFormats$1,
|
|
24916
|
-
defaultWidth:
|
|
24514
|
+
defaultWidth: 'full'
|
|
24917
24515
|
}),
|
|
24918
24516
|
dateTime: buildFormatLongFn({
|
|
24919
24517
|
formats: dateTimeFormats$1,
|
|
24920
|
-
defaultWidth:
|
|
24518
|
+
defaultWidth: 'full'
|
|
24921
24519
|
})
|
|
24922
24520
|
};
|
|
24923
24521
|
|
|
24924
24522
|
/**
|
|
24523
|
+
* @type {Locale}
|
|
24925
24524
|
* @category Locales
|
|
24926
24525
|
* @summary English locale (Australia).
|
|
24927
24526
|
* @language English
|
|
24928
24527
|
* @iso-639-2 eng
|
|
24929
|
-
* @author Julien Malige [@JulienMalige]
|
|
24528
|
+
* @author Julien Malige [@JulienMalige]{@link https://github.com/JulienMalige}
|
|
24930
24529
|
*/
|
|
24931
|
-
var
|
|
24932
|
-
code:
|
|
24530
|
+
var locale$1 = {
|
|
24531
|
+
code: 'en-AU',
|
|
24933
24532
|
formatDistance: formatDistance$1,
|
|
24934
24533
|
formatLong: formatLong$1,
|
|
24935
24534
|
formatRelative: formatRelative,
|
|
@@ -24943,130 +24542,131 @@ var enAU = {
|
|
|
24943
24542
|
|
|
24944
24543
|
var formatDistanceLocale = {
|
|
24945
24544
|
lessThanXSeconds: {
|
|
24946
|
-
one:
|
|
24947
|
-
other:
|
|
24545
|
+
one: 'less than a second',
|
|
24546
|
+
other: 'less than {{count}} seconds'
|
|
24948
24547
|
},
|
|
24949
24548
|
xSeconds: {
|
|
24950
|
-
one:
|
|
24951
|
-
other:
|
|
24549
|
+
one: 'a second',
|
|
24550
|
+
other: '{{count}} seconds'
|
|
24952
24551
|
},
|
|
24953
|
-
halfAMinute:
|
|
24552
|
+
halfAMinute: 'half a minute',
|
|
24954
24553
|
lessThanXMinutes: {
|
|
24955
|
-
one:
|
|
24956
|
-
other:
|
|
24554
|
+
one: 'less than a minute',
|
|
24555
|
+
other: 'less than {{count}} minutes'
|
|
24957
24556
|
},
|
|
24958
24557
|
xMinutes: {
|
|
24959
|
-
one:
|
|
24960
|
-
other:
|
|
24558
|
+
one: 'a minute',
|
|
24559
|
+
other: '{{count}} minutes'
|
|
24961
24560
|
},
|
|
24962
24561
|
aboutXHours: {
|
|
24963
|
-
one:
|
|
24964
|
-
other:
|
|
24562
|
+
one: 'about an hour',
|
|
24563
|
+
other: 'about {{count}} hours'
|
|
24965
24564
|
},
|
|
24966
24565
|
xHours: {
|
|
24967
|
-
one:
|
|
24968
|
-
other:
|
|
24566
|
+
one: 'an hour',
|
|
24567
|
+
other: '{{count}} hours'
|
|
24969
24568
|
},
|
|
24970
24569
|
xDays: {
|
|
24971
|
-
one:
|
|
24972
|
-
other:
|
|
24570
|
+
one: 'a day',
|
|
24571
|
+
other: '{{count}} days'
|
|
24973
24572
|
},
|
|
24974
24573
|
aboutXWeeks: {
|
|
24975
|
-
one:
|
|
24976
|
-
other:
|
|
24574
|
+
one: 'about a week',
|
|
24575
|
+
other: 'about {{count}} weeks'
|
|
24977
24576
|
},
|
|
24978
24577
|
xWeeks: {
|
|
24979
|
-
one:
|
|
24980
|
-
other:
|
|
24578
|
+
one: 'a week',
|
|
24579
|
+
other: '{{count}} weeks'
|
|
24981
24580
|
},
|
|
24982
24581
|
aboutXMonths: {
|
|
24983
|
-
one:
|
|
24984
|
-
other:
|
|
24582
|
+
one: 'about a month',
|
|
24583
|
+
other: 'about {{count}} months'
|
|
24985
24584
|
},
|
|
24986
24585
|
xMonths: {
|
|
24987
|
-
one:
|
|
24988
|
-
other:
|
|
24586
|
+
one: 'a month',
|
|
24587
|
+
other: '{{count}} months'
|
|
24989
24588
|
},
|
|
24990
24589
|
aboutXYears: {
|
|
24991
|
-
one:
|
|
24992
|
-
other:
|
|
24590
|
+
one: 'about a year',
|
|
24591
|
+
other: 'about {{count}} years'
|
|
24993
24592
|
},
|
|
24994
24593
|
xYears: {
|
|
24995
|
-
one:
|
|
24996
|
-
other:
|
|
24594
|
+
one: 'a year',
|
|
24595
|
+
other: '{{count}} years'
|
|
24997
24596
|
},
|
|
24998
24597
|
overXYears: {
|
|
24999
|
-
one:
|
|
25000
|
-
other:
|
|
24598
|
+
one: 'over a year',
|
|
24599
|
+
other: 'over {{count}} years'
|
|
25001
24600
|
},
|
|
25002
24601
|
almostXYears: {
|
|
25003
|
-
one:
|
|
25004
|
-
other:
|
|
24602
|
+
one: 'almost a year',
|
|
24603
|
+
other: 'almost {{count}} years'
|
|
25005
24604
|
}
|
|
25006
24605
|
};
|
|
25007
24606
|
var formatDistance = function formatDistance(token, count, options) {
|
|
25008
24607
|
var result;
|
|
25009
24608
|
var tokenValue = formatDistanceLocale[token];
|
|
25010
|
-
if (typeof tokenValue ===
|
|
24609
|
+
if (typeof tokenValue === 'string') {
|
|
25011
24610
|
result = tokenValue;
|
|
25012
24611
|
} else if (count === 1) {
|
|
25013
24612
|
result = tokenValue.one;
|
|
25014
24613
|
} else {
|
|
25015
|
-
result = tokenValue.other.replace(
|
|
24614
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
25016
24615
|
}
|
|
25017
24616
|
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
25018
24617
|
if (options.comparison && options.comparison > 0) {
|
|
25019
|
-
return
|
|
24618
|
+
return 'in ' + result;
|
|
25020
24619
|
} else {
|
|
25021
|
-
return result +
|
|
24620
|
+
return result + ' ago';
|
|
25022
24621
|
}
|
|
25023
24622
|
}
|
|
25024
24623
|
return result;
|
|
25025
24624
|
};
|
|
25026
24625
|
|
|
25027
24626
|
var dateFormats = {
|
|
25028
|
-
full:
|
|
25029
|
-
"long":
|
|
25030
|
-
medium:
|
|
25031
|
-
"short":
|
|
24627
|
+
full: 'EEEE, MMMM do, yyyy',
|
|
24628
|
+
"long": 'MMMM do, yyyy',
|
|
24629
|
+
medium: 'MMM d, yyyy',
|
|
24630
|
+
"short": 'yyyy-MM-dd'
|
|
25032
24631
|
};
|
|
25033
24632
|
var timeFormats = {
|
|
25034
|
-
full:
|
|
25035
|
-
"long":
|
|
25036
|
-
medium:
|
|
25037
|
-
"short":
|
|
24633
|
+
full: 'h:mm:ss a zzzz',
|
|
24634
|
+
"long": 'h:mm:ss a z',
|
|
24635
|
+
medium: 'h:mm:ss a',
|
|
24636
|
+
"short": 'h:mm a'
|
|
25038
24637
|
};
|
|
25039
24638
|
var dateTimeFormats = {
|
|
25040
24639
|
full: "{{date}} 'at' {{time}}",
|
|
25041
24640
|
"long": "{{date}} 'at' {{time}}",
|
|
25042
|
-
medium:
|
|
25043
|
-
"short":
|
|
24641
|
+
medium: '{{date}}, {{time}}',
|
|
24642
|
+
"short": '{{date}}, {{time}}'
|
|
25044
24643
|
};
|
|
25045
24644
|
var formatLong = {
|
|
25046
24645
|
date: buildFormatLongFn({
|
|
25047
24646
|
formats: dateFormats,
|
|
25048
|
-
defaultWidth:
|
|
24647
|
+
defaultWidth: 'full'
|
|
25049
24648
|
}),
|
|
25050
24649
|
time: buildFormatLongFn({
|
|
25051
24650
|
formats: timeFormats,
|
|
25052
|
-
defaultWidth:
|
|
24651
|
+
defaultWidth: 'full'
|
|
25053
24652
|
}),
|
|
25054
24653
|
dateTime: buildFormatLongFn({
|
|
25055
24654
|
formats: dateTimeFormats,
|
|
25056
|
-
defaultWidth:
|
|
24655
|
+
defaultWidth: 'full'
|
|
25057
24656
|
})
|
|
25058
24657
|
};
|
|
25059
24658
|
|
|
25060
24659
|
/**
|
|
24660
|
+
* @type {Locale}
|
|
25061
24661
|
* @category Locales
|
|
25062
24662
|
* @summary English locale (Canada).
|
|
25063
24663
|
* @language English
|
|
25064
24664
|
* @iso-639-2 eng
|
|
25065
|
-
* @author Mark Owsiak [@markowsiak]
|
|
25066
|
-
* @author Marco Imperatore [@mimperatore]
|
|
24665
|
+
* @author Mark Owsiak [@markowsiak]{@link https://github.com/markowsiak}
|
|
24666
|
+
* @author Marco Imperatore [@mimperatore]{@link https://github.com/mimperatore}
|
|
25067
24667
|
*/
|
|
25068
|
-
var
|
|
25069
|
-
code:
|
|
24668
|
+
var locale = {
|
|
24669
|
+
code: 'en-CA',
|
|
25070
24670
|
formatDistance: formatDistance,
|
|
25071
24671
|
formatLong: formatLong,
|
|
25072
24672
|
formatRelative: formatRelative,
|
|
@@ -25079,8 +24679,8 @@ var enCA = {
|
|
|
25079
24679
|
};
|
|
25080
24680
|
|
|
25081
24681
|
var Locales = {
|
|
25082
|
-
'en-AU':
|
|
25083
|
-
'en-CA':
|
|
24682
|
+
'en-AU': locale$1,
|
|
24683
|
+
'en-CA': locale
|
|
25084
24684
|
};
|
|
25085
24685
|
function getDateFnsLocale(locale) {
|
|
25086
24686
|
var fallbackLocale = Locales['en-AU'];
|
|
@@ -25110,7 +24710,7 @@ var LocaleProvider = function LocaleProvider(props) {
|
|
|
25110
24710
|
var HeroDesignProvider = function HeroDesignProvider(_ref) {
|
|
25111
24711
|
var theme = _ref.theme,
|
|
25112
24712
|
_ref$locale = _ref.locale,
|
|
25113
|
-
locale = _ref$locale === void 0 ? locale$
|
|
24713
|
+
locale = _ref$locale === void 0 ? locale$3 : _ref$locale,
|
|
25114
24714
|
children = _ref.children;
|
|
25115
24715
|
return /*#__PURE__*/React__default.createElement(LocaleProvider, {
|
|
25116
24716
|
locale: locale
|
|
@@ -26551,7 +26151,7 @@ var isOptionSelected = function isOptionSelected(value, option) {
|
|
|
26551
26151
|
if (!value || !option || option.value === null || option.value === undefined) {
|
|
26552
26152
|
return false;
|
|
26553
26153
|
}
|
|
26554
|
-
if (_typeof(option.value) !== 'object') {
|
|
26154
|
+
if (_typeof$1(option.value) !== 'object') {
|
|
26555
26155
|
return value.includes(option.value);
|
|
26556
26156
|
}
|
|
26557
26157
|
return value.some(function (v) {
|
|
@@ -28284,7 +27884,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
28284
27884
|
open = _useState2[0],
|
|
28285
27885
|
setOpen = _useState2[1];
|
|
28286
27886
|
var is12Hour = displayFormat.includes('hh');
|
|
28287
|
-
var displayValue = value ?
|
|
27887
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
28288
27888
|
var pickerInitValue = value || new Date();
|
|
28289
27889
|
var InputComponent = TextInputComponent || TextInput;
|
|
28290
27890
|
var onPress = useCallback(function () {
|
|
@@ -28357,7 +27957,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
28357
27957
|
open = _useState4[0],
|
|
28358
27958
|
setOpen = _useState4[1];
|
|
28359
27959
|
var is12Hour = displayFormat.includes('hh');
|
|
28360
|
-
var displayValue = value ?
|
|
27960
|
+
var displayValue = value ? formatTime(displayFormat, value) : '';
|
|
28361
27961
|
var theme = useTheme();
|
|
28362
27962
|
// Determine locale based on time format preference
|
|
28363
27963
|
// For 12-hour format: use en-US locale to ensure 12-hour display regardless of device settings
|
|
@@ -29129,7 +28729,7 @@ function requireScheduler_production_min() {
|
|
|
29129
28729
|
var c = a.sortIndex - b.sortIndex;
|
|
29130
28730
|
return 0 !== c ? c : a.id - b.id;
|
|
29131
28731
|
}
|
|
29132
|
-
if ("object" === (typeof performance === "undefined" ? "undefined" : _typeof(performance)) && "function" === typeof performance.now) {
|
|
28732
|
+
if ("object" === (typeof performance === "undefined" ? "undefined" : _typeof$1(performance)) && "function" === typeof performance.now) {
|
|
29133
28733
|
var l = performance;
|
|
29134
28734
|
exports.unstable_now = function () {
|
|
29135
28735
|
return l.now();
|
|
@@ -29300,7 +28900,7 @@ function requireScheduler_production_min() {
|
|
|
29300
28900
|
};
|
|
29301
28901
|
exports.unstable_scheduleCallback = function (a, b, c) {
|
|
29302
28902
|
var d = exports.unstable_now();
|
|
29303
|
-
"object" === _typeof(c) && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
|
|
28903
|
+
"object" === _typeof$1(c) && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
|
|
29304
28904
|
switch (a) {
|
|
29305
28905
|
case 1:
|
|
29306
28906
|
var e = -1;
|
|
@@ -29390,7 +28990,7 @@ function requireReactDom_production_min() {
|
|
|
29390
28990
|
}
|
|
29391
28991
|
function pa(a, b, c, d) {
|
|
29392
28992
|
if (null !== c && 0 === c.type) return !1;
|
|
29393
|
-
switch (_typeof(b)) {
|
|
28993
|
+
switch (_typeof$1(b)) {
|
|
29394
28994
|
case "function":
|
|
29395
28995
|
case "symbol":
|
|
29396
28996
|
return !0;
|
|
@@ -29500,7 +29100,7 @@ function requireReactDom_production_min() {
|
|
|
29500
29100
|
var Ia = Symbol["for"]("react.offscreen");
|
|
29501
29101
|
var Ja = Symbol.iterator;
|
|
29502
29102
|
function Ka(a) {
|
|
29503
|
-
if (null === a || "object" !== _typeof(a)) return null;
|
|
29103
|
+
if (null === a || "object" !== _typeof$1(a)) return null;
|
|
29504
29104
|
a = Ja && a[Ja] || a["@@iterator"];
|
|
29505
29105
|
return "function" === typeof a ? a : null;
|
|
29506
29106
|
}
|
|
@@ -29529,7 +29129,7 @@ function requireReactDom_production_min() {
|
|
|
29529
29129
|
set: function set() {
|
|
29530
29130
|
throw Error();
|
|
29531
29131
|
}
|
|
29532
|
-
}), "object" === (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && Reflect.construct) {
|
|
29132
|
+
}), "object" === (typeof Reflect === "undefined" ? "undefined" : _typeof$1(Reflect)) && Reflect.construct) {
|
|
29533
29133
|
try {
|
|
29534
29134
|
Reflect.construct(b, []);
|
|
29535
29135
|
} catch (l) {
|
|
@@ -29611,7 +29211,7 @@ function requireReactDom_production_min() {
|
|
|
29611
29211
|
case Fa:
|
|
29612
29212
|
return "SuspenseList";
|
|
29613
29213
|
}
|
|
29614
|
-
if ("object" === _typeof(a)) switch (a.$$typeof) {
|
|
29214
|
+
if ("object" === _typeof$1(a)) switch (a.$$typeof) {
|
|
29615
29215
|
case Ca:
|
|
29616
29216
|
return (a.displayName || "Context") + ".Consumer";
|
|
29617
29217
|
case Ba:
|
|
@@ -29683,7 +29283,7 @@ function requireReactDom_production_min() {
|
|
|
29683
29283
|
return null;
|
|
29684
29284
|
}
|
|
29685
29285
|
function Sa(a) {
|
|
29686
|
-
switch (_typeof(a)) {
|
|
29286
|
+
switch (_typeof$1(a)) {
|
|
29687
29287
|
case "boolean":
|
|
29688
29288
|
case "number":
|
|
29689
29289
|
case "string":
|
|
@@ -29994,9 +29594,9 @@ function requireReactDom_production_min() {
|
|
|
29994
29594
|
if (tb[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(p(137, a));
|
|
29995
29595
|
if (null != b.dangerouslySetInnerHTML) {
|
|
29996
29596
|
if (null != b.children) throw Error(p(60));
|
|
29997
|
-
if ("object" !== _typeof(b.dangerouslySetInnerHTML) || !("__html" in b.dangerouslySetInnerHTML)) throw Error(p(61));
|
|
29597
|
+
if ("object" !== _typeof$1(b.dangerouslySetInnerHTML) || !("__html" in b.dangerouslySetInnerHTML)) throw Error(p(61));
|
|
29998
29598
|
}
|
|
29999
|
-
if (null != b.style && "object" !== _typeof(b.style)) throw Error(p(62));
|
|
29599
|
+
if (null != b.style && "object" !== _typeof$1(b.style)) throw Error(p(62));
|
|
30000
29600
|
}
|
|
30001
29601
|
}
|
|
30002
29602
|
function vb(a, b) {
|
|
@@ -30082,7 +29682,7 @@ function requireReactDom_production_min() {
|
|
|
30082
29682
|
a = !1;
|
|
30083
29683
|
}
|
|
30084
29684
|
if (a) return null;
|
|
30085
|
-
if (c && "function" !== typeof c) throw Error(p(231, b, _typeof(c)));
|
|
29685
|
+
if (c && "function" !== typeof c) throw Error(p(231, b, _typeof$1(c)));
|
|
30086
29686
|
return c;
|
|
30087
29687
|
}
|
|
30088
29688
|
var Lb = !1;
|
|
@@ -30996,7 +30596,7 @@ function requireReactDom_production_min() {
|
|
|
30996
30596
|
}
|
|
30997
30597
|
function he(a) {
|
|
30998
30598
|
a = a.detail;
|
|
30999
|
-
return "object" === _typeof(a) && "data" in a ? a.data : null;
|
|
30599
|
+
return "object" === _typeof$1(a) && "data" in a ? a.data : null;
|
|
31000
30600
|
}
|
|
31001
30601
|
var ie = !1;
|
|
31002
30602
|
function je(a, b) {
|
|
@@ -31113,7 +30713,7 @@ function requireReactDom_production_min() {
|
|
|
31113
30713
|
var He = "function" === typeof Object.is ? Object.is : Ge;
|
|
31114
30714
|
function Ie(a, b) {
|
|
31115
30715
|
if (He(a, b)) return !0;
|
|
31116
|
-
if ("object" !== _typeof(a) || null === a || "object" !== _typeof(b) || null === b) return !1;
|
|
30716
|
+
if ("object" !== _typeof$1(a) || null === a || "object" !== _typeof$1(b) || null === b) return !1;
|
|
31117
30717
|
var c = Object.keys(a),
|
|
31118
30718
|
d = Object.keys(b);
|
|
31119
30719
|
if (c.length !== d.length) return !1;
|
|
@@ -31640,7 +31240,7 @@ function requireReactDom_production_min() {
|
|
|
31640
31240
|
var Cf = null,
|
|
31641
31241
|
Df = null;
|
|
31642
31242
|
function Ef(a, b) {
|
|
31643
|
-
return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === _typeof(b.dangerouslySetInnerHTML) && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;
|
|
31243
|
+
return "textarea" === a || "noscript" === a || "string" === typeof b.children || "number" === typeof b.children || "object" === _typeof$1(b.dangerouslySetInnerHTML) && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;
|
|
31644
31244
|
}
|
|
31645
31245
|
var Ff = "function" === typeof setTimeout ? setTimeout : void 0,
|
|
31646
31246
|
Gf = "function" === typeof clearTimeout ? clearTimeout : void 0,
|
|
@@ -32288,7 +31888,7 @@ function requireReactDom_production_min() {
|
|
|
32288
31888
|
var d = !1,
|
|
32289
31889
|
e = Vf;
|
|
32290
31890
|
var f = b.contextType;
|
|
32291
|
-
"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);
|
|
31891
|
+
"object" === _typeof$1(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);
|
|
32292
31892
|
b = new b(c, f);
|
|
32293
31893
|
a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;
|
|
32294
31894
|
b.updater = nh;
|
|
@@ -32310,7 +31910,7 @@ function requireReactDom_production_min() {
|
|
|
32310
31910
|
e.refs = jh;
|
|
32311
31911
|
ah(a);
|
|
32312
31912
|
var f = b.contextType;
|
|
32313
|
-
"object" === _typeof(f) && null !== f ? e.context = Vg(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f));
|
|
31913
|
+
"object" === _typeof$1(f) && null !== f ? e.context = Vg(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f));
|
|
32314
31914
|
e.state = a.memoizedState;
|
|
32315
31915
|
f = b.getDerivedStateFromProps;
|
|
32316
31916
|
"function" === typeof f && (kh(a, b, f, c), e.state = a.memoizedState);
|
|
@@ -32319,7 +31919,7 @@ function requireReactDom_production_min() {
|
|
|
32319
31919
|
}
|
|
32320
31920
|
function sh(a, b, c) {
|
|
32321
31921
|
a = c.ref;
|
|
32322
|
-
if (null !== a && "function" !== typeof a && "object" !== _typeof(a)) {
|
|
31922
|
+
if (null !== a && "function" !== typeof a && "object" !== _typeof$1(a)) {
|
|
32323
31923
|
if (c._owner) {
|
|
32324
31924
|
c = c._owner;
|
|
32325
31925
|
if (c) {
|
|
@@ -32394,7 +31994,7 @@ function requireReactDom_production_min() {
|
|
|
32394
31994
|
function k(a, b, c, d) {
|
|
32395
31995
|
var f = c.type;
|
|
32396
31996
|
if (f === ya) return m(a, b, c.props.children, d, c.key);
|
|
32397
|
-
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;
|
|
31997
|
+
if (null !== b && (b.elementType === f || "object" === _typeof$1(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;
|
|
32398
31998
|
d = yh(c.type, c.key, c.props, null, a.mode, d);
|
|
32399
31999
|
d.ref = sh(a, b, c);
|
|
32400
32000
|
d["return"] = a;
|
|
@@ -32414,7 +32014,7 @@ function requireReactDom_production_min() {
|
|
|
32414
32014
|
}
|
|
32415
32015
|
function q(a, b, c) {
|
|
32416
32016
|
if ("string" === typeof b && "" !== b || "number" === typeof b) return b = xh("" + b, a.mode, c), b["return"] = a, b;
|
|
32417
|
-
if ("object" === _typeof(b) && null !== b) {
|
|
32017
|
+
if ("object" === _typeof$1(b) && null !== b) {
|
|
32418
32018
|
switch (b.$$typeof) {
|
|
32419
32019
|
case va:
|
|
32420
32020
|
return c = yh(b.type, b.key, b.props, null, a.mode, c), c.ref = sh(a, null, b), c["return"] = a, c;
|
|
@@ -32432,7 +32032,7 @@ function requireReactDom_production_min() {
|
|
|
32432
32032
|
function r(a, b, c, d) {
|
|
32433
32033
|
var e = null !== b ? b.key : null;
|
|
32434
32034
|
if ("string" === typeof c && "" !== c || "number" === typeof c) return null !== e ? null : h(a, b, "" + c, d);
|
|
32435
|
-
if ("object" === _typeof(c) && null !== c) {
|
|
32035
|
+
if ("object" === _typeof$1(c) && null !== c) {
|
|
32436
32036
|
switch (c.$$typeof) {
|
|
32437
32037
|
case va:
|
|
32438
32038
|
return c.key === e ? k(a, b, c, d) : null;
|
|
@@ -32448,7 +32048,7 @@ function requireReactDom_production_min() {
|
|
|
32448
32048
|
}
|
|
32449
32049
|
function y(a, b, c, d, e) {
|
|
32450
32050
|
if ("string" === typeof d && "" !== d || "number" === typeof d) return a = a.get(c) || null, h(b, a, "" + d, e);
|
|
32451
|
-
if ("object" === _typeof(d) && null !== d) {
|
|
32051
|
+
if ("object" === _typeof$1(d) && null !== d) {
|
|
32452
32052
|
switch (d.$$typeof) {
|
|
32453
32053
|
case va:
|
|
32454
32054
|
return a = a.get(null === d.key ? c : d.key) || null, k(b, a, d, e);
|
|
@@ -32522,8 +32122,8 @@ function requireReactDom_production_min() {
|
|
|
32522
32122
|
return l;
|
|
32523
32123
|
}
|
|
32524
32124
|
function J(a, d, f, h) {
|
|
32525
|
-
"object" === _typeof(f) && null !== f && f.type === ya && null === f.key && (f = f.props.children);
|
|
32526
|
-
if ("object" === _typeof(f) && null !== f) {
|
|
32125
|
+
"object" === _typeof$1(f) && null !== f && f.type === ya && null === f.key && (f = f.props.children);
|
|
32126
|
+
if ("object" === _typeof$1(f) && null !== f) {
|
|
32527
32127
|
switch (f.$$typeof) {
|
|
32528
32128
|
case va:
|
|
32529
32129
|
a: {
|
|
@@ -32538,7 +32138,7 @@ function requireReactDom_production_min() {
|
|
|
32538
32138
|
a = d;
|
|
32539
32139
|
break a;
|
|
32540
32140
|
}
|
|
32541
|
-
} else if (l.elementType === k || "object" === _typeof(k) && null !== k && k.$$typeof === Ha && uh(k) === l.type) {
|
|
32141
|
+
} else if (l.elementType === k || "object" === _typeof$1(k) && null !== k && k.$$typeof === Ha && uh(k) === l.type) {
|
|
32542
32142
|
c(a, l.sibling);
|
|
32543
32143
|
d = e(l, f.props);
|
|
32544
32144
|
d.ref = sh(a, l, f);
|
|
@@ -33423,7 +33023,7 @@ function requireReactDom_production_min() {
|
|
|
33423
33023
|
g.props = h;
|
|
33424
33024
|
var k = g.context,
|
|
33425
33025
|
l = c.contextType;
|
|
33426
|
-
"object" === _typeof(l) && null !== l ? l = Vg(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
|
|
33026
|
+
"object" === _typeof$1(l) && null !== l ? l = Vg(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
|
|
33427
33027
|
var m = c.getDerivedStateFromProps,
|
|
33428
33028
|
q = "function" === typeof m || "function" === typeof g.getSnapshotBeforeUpdate;
|
|
33429
33029
|
q || "function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && qh(b, g, d, l);
|
|
@@ -33442,7 +33042,7 @@ function requireReactDom_production_min() {
|
|
|
33442
33042
|
q = b.pendingProps;
|
|
33443
33043
|
r = g.context;
|
|
33444
33044
|
k = c.contextType;
|
|
33445
|
-
"object" === _typeof(k) && null !== k ? k = Vg(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
|
|
33045
|
+
"object" === _typeof$1(k) && null !== k ? k = Vg(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
|
|
33446
33046
|
var y = c.getDerivedStateFromProps;
|
|
33447
33047
|
(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);
|
|
33448
33048
|
$g = !1;
|
|
@@ -35355,7 +34955,7 @@ function requireReactDom_production_min() {
|
|
|
35355
34955
|
k = b;
|
|
35356
34956
|
b = Z;
|
|
35357
34957
|
h.flags |= 32768;
|
|
35358
|
-
if (null !== k && "object" === _typeof(k) && "function" === typeof k.then) {
|
|
34958
|
+
if (null !== k && "object" === _typeof$1(k) && "function" === typeof k.then) {
|
|
35359
34959
|
var l = k,
|
|
35360
34960
|
m = h,
|
|
35361
34961
|
q = m.tag;
|
|
@@ -35776,7 +35376,7 @@ function requireReactDom_production_min() {
|
|
|
35776
35376
|
e = Xh(null, b, d, a, e, c);
|
|
35777
35377
|
var f = bi();
|
|
35778
35378
|
b.flags |= 1;
|
|
35779
|
-
"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);
|
|
35379
|
+
"object" === _typeof$1(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);
|
|
35780
35380
|
return b;
|
|
35781
35381
|
case 16:
|
|
35782
35382
|
d = b.elementType;
|
|
@@ -36017,7 +35617,7 @@ function requireReactDom_production_min() {
|
|
|
36017
35617
|
case Ia:
|
|
36018
35618
|
return qj(c, e, f, b);
|
|
36019
35619
|
default:
|
|
36020
|
-
if ("object" === _typeof(a) && null !== a) switch (a.$$typeof) {
|
|
35620
|
+
if ("object" === _typeof$1(a) && null !== a) switch (a.$$typeof) {
|
|
36021
35621
|
case Ba:
|
|
36022
35622
|
g = 10;
|
|
36023
35623
|
break a;
|
|
@@ -36035,7 +35635,7 @@ function requireReactDom_production_min() {
|
|
|
36035
35635
|
d = null;
|
|
36036
35636
|
break a;
|
|
36037
35637
|
}
|
|
36038
|
-
throw Error(p(130, null == a ? a : _typeof(a), ""));
|
|
35638
|
+
throw Error(p(130, null == a ? a : _typeof$1(a), ""));
|
|
36039
35639
|
}
|
|
36040
35640
|
b = Bg(g, c, b, e);
|
|
36041
35641
|
b.elementType = a;
|
|
@@ -36683,7 +36283,7 @@ function requireLib() {
|
|
|
36683
36283
|
};
|
|
36684
36284
|
},
|
|
36685
36285
|
380: function _(e, t, r) {
|
|
36686
|
-
var n = "object" == _typeof(r.g) && r.g && r.g.Object === Object && r.g;
|
|
36286
|
+
var n = "object" == _typeof$1(r.g) && r.g && r.g.Object === Object && r.g;
|
|
36687
36287
|
e.exports = n;
|
|
36688
36288
|
},
|
|
36689
36289
|
903: function _(e, t, r) {
|
|
@@ -36711,7 +36311,7 @@ function requireLib() {
|
|
|
36711
36311
|
},
|
|
36712
36312
|
433: function _(e, t, r) {
|
|
36713
36313
|
var n = r(380),
|
|
36714
|
-
o = "object" == (typeof self === "undefined" ? "undefined" : _typeof(self)) && self && self.Object === Object && self,
|
|
36314
|
+
o = "object" == (typeof self === "undefined" ? "undefined" : _typeof$1(self)) && self && self.Object === Object && self,
|
|
36715
36315
|
u = n || o || Function("return this")();
|
|
36716
36316
|
e.exports = u;
|
|
36717
36317
|
},
|
|
@@ -36780,20 +36380,20 @@ function requireLib() {
|
|
|
36780
36380
|
},
|
|
36781
36381
|
953: function _(e) {
|
|
36782
36382
|
e.exports = function (e) {
|
|
36783
|
-
var t = _typeof(e);
|
|
36383
|
+
var t = _typeof$1(e);
|
|
36784
36384
|
return null != e && ("object" == t || "function" == t);
|
|
36785
36385
|
};
|
|
36786
36386
|
},
|
|
36787
36387
|
934: function _(e) {
|
|
36788
36388
|
e.exports = function (e) {
|
|
36789
|
-
return null != e && "object" == _typeof(e);
|
|
36389
|
+
return null != e && "object" == _typeof$1(e);
|
|
36790
36390
|
};
|
|
36791
36391
|
},
|
|
36792
36392
|
414: function _(e, t, r) {
|
|
36793
36393
|
var n = r(148),
|
|
36794
36394
|
o = r(934);
|
|
36795
36395
|
e.exports = function (e) {
|
|
36796
|
-
return "symbol" == _typeof(e) || o(e) && "[object Symbol]" == n(e);
|
|
36396
|
+
return "symbol" == _typeof$1(e) || o(e) && "[object Symbol]" == n(e);
|
|
36797
36397
|
};
|
|
36798
36398
|
},
|
|
36799
36399
|
664: function _(e, t, r) {
|
|
@@ -36870,11 +36470,11 @@ function requireLib() {
|
|
|
36870
36470
|
get: t[r]
|
|
36871
36471
|
});
|
|
36872
36472
|
}, o.g = function () {
|
|
36873
|
-
if ("object" == (typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis))) return globalThis;
|
|
36473
|
+
if ("object" == (typeof globalThis === "undefined" ? "undefined" : _typeof$1(globalThis))) return globalThis;
|
|
36874
36474
|
try {
|
|
36875
36475
|
return this || new Function("return this")();
|
|
36876
36476
|
} catch (e) {
|
|
36877
|
-
if ("object" == (typeof window === "undefined" ? "undefined" : _typeof(window))) return window;
|
|
36477
|
+
if ("object" == (typeof window === "undefined" ? "undefined" : _typeof$1(window))) return window;
|
|
36878
36478
|
}
|
|
36879
36479
|
}(), o.o = function (e, t) {
|
|
36880
36480
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
@@ -36999,7 +36599,7 @@ function requireLib() {
|
|
|
36999
36599
|
}
|
|
37000
36600
|
var h = Object.prototype.constructor.toString();
|
|
37001
36601
|
function v(e) {
|
|
37002
|
-
if (!e || "object" != _typeof(e)) return !1;
|
|
36602
|
+
if (!e || "object" != _typeof$1(e)) return !1;
|
|
37003
36603
|
var t = c(e);
|
|
37004
36604
|
if (null === t) return !0;
|
|
37005
36605
|
var r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
@@ -37296,7 +36896,7 @@ function requireLib() {
|
|
|
37296
36896
|
}
|
|
37297
36897
|
return S(_o4, r), R(n, _o4);
|
|
37298
36898
|
}
|
|
37299
|
-
if (!e || "object" != _typeof(e)) {
|
|
36899
|
+
if (!e || "object" != _typeof$1(e)) {
|
|
37300
36900
|
if (n = t(e), void 0 === n && (n = e), n === a && (n = void 0), _this.autoFreeze_ && E(n, !0), r) {
|
|
37301
36901
|
var _t6 = [],
|
|
37302
36902
|
_o5 = [];
|
|
@@ -37573,10 +37173,10 @@ function requireLib() {
|
|
|
37573
37173
|
}
|
|
37574
37174
|
};
|
|
37575
37175
|
function se(e) {
|
|
37576
|
-
return se = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
37577
|
-
return _typeof(e);
|
|
37176
|
+
return se = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
37177
|
+
return _typeof$1(e);
|
|
37578
37178
|
} : function (e) {
|
|
37579
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
37179
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
37580
37180
|
}, se(e);
|
|
37581
37181
|
}
|
|
37582
37182
|
function le(e, t, r) {
|
|
@@ -42260,7 +41860,7 @@ function requireLib() {
|
|
|
42260
41860
|
Jt = o(858),
|
|
42261
41861
|
Zt = o.n(Jt);
|
|
42262
41862
|
var Yt = function Yt(e) {
|
|
42263
|
-
return "object" == _typeof(e) && null != e && 1 === e.nodeType;
|
|
41863
|
+
return "object" == _typeof$1(e) && null != e && 1 === e.nodeType;
|
|
42264
41864
|
},
|
|
42265
41865
|
Gt = function Gt(e, t) {
|
|
42266
41866
|
return (!t || "hidden" !== e) && "visible" !== e && "clip" !== e;
|
|
@@ -42480,10 +42080,10 @@ function requireLib() {
|
|
|
42480
42080
|
"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);
|
|
42481
42081
|
var Tr = (!Or || !xr) && !Ar && "undefined" != typeof globalThis && globalThis.InputEvent && "function" == typeof globalThis.InputEvent.prototype.getTargetRanges;
|
|
42482
42082
|
function Mr(e) {
|
|
42483
|
-
return Mr = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
42484
|
-
return _typeof(e);
|
|
42083
|
+
return Mr = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
42084
|
+
return _typeof$1(e);
|
|
42485
42085
|
} : function (e) {
|
|
42486
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
42086
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
42487
42087
|
}, Mr(e);
|
|
42488
42088
|
}
|
|
42489
42089
|
function Rr(e, t, r) {
|
|
@@ -43556,10 +43156,10 @@ function requireLib() {
|
|
|
43556
43156
|
return o;
|
|
43557
43157
|
}
|
|
43558
43158
|
function yo(e) {
|
|
43559
|
-
return yo = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
43560
|
-
return _typeof(e);
|
|
43159
|
+
return yo = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
43160
|
+
return _typeof$1(e);
|
|
43561
43161
|
} : function (e) {
|
|
43562
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
43162
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
43563
43163
|
}, yo(e);
|
|
43564
43164
|
}
|
|
43565
43165
|
function Bo(e, t, r) {
|
|
@@ -45308,7 +44908,7 @@ function requireLib() {
|
|
|
45308
44908
|
};
|
|
45309
44909
|
}(e);
|
|
45310
44910
|
if (function (e) {
|
|
45311
|
-
return "object" == _typeof(e) && "function" == typeof e.behavior;
|
|
44911
|
+
return "object" == _typeof$1(e) && "function" == typeof e.behavior;
|
|
45312
44912
|
}(t)) return t.behavior(rr(e, t));
|
|
45313
44913
|
var n = "boolean" == typeof t || null == t ? void 0 : t.behavior;
|
|
45314
44914
|
var _iterator47 = _createForOfIteratorHelper(rr(e, function (e) {
|
|
@@ -45930,10 +45530,10 @@ function requireLib() {
|
|
|
45930
45530
|
};
|
|
45931
45531
|
};
|
|
45932
45532
|
function Wu(e) {
|
|
45933
|
-
return Wu = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
45934
|
-
return _typeof(e);
|
|
45533
|
+
return Wu = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
45534
|
+
return _typeof$1(e);
|
|
45935
45535
|
} : function (e) {
|
|
45936
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
45536
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
45937
45537
|
}, Wu(e);
|
|
45938
45538
|
}
|
|
45939
45539
|
function Vu(e, t) {
|
|
@@ -46102,10 +45702,10 @@ function requireLib() {
|
|
|
46102
45702
|
};
|
|
46103
45703
|
};
|
|
46104
45704
|
function ha(e) {
|
|
46105
|
-
return ha = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
46106
|
-
return _typeof(e);
|
|
45705
|
+
return ha = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
45706
|
+
return _typeof$1(e);
|
|
46107
45707
|
} : function (e) {
|
|
46108
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
45708
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
46109
45709
|
}, ha(e);
|
|
46110
45710
|
}
|
|
46111
45711
|
function va(e, t) {
|
|
@@ -46295,10 +45895,10 @@ function requireLib() {
|
|
|
46295
45895
|
window.postMessage(o, "*"), null === (n = window.ReactNativeWebView) || void 0 === n || n.postMessage(JSON.stringify(o));
|
|
46296
45896
|
};
|
|
46297
45897
|
function Na(e) {
|
|
46298
|
-
return Na = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
46299
|
-
return _typeof(e);
|
|
45898
|
+
return Na = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
45899
|
+
return _typeof$1(e);
|
|
46300
45900
|
} : function (e) {
|
|
46301
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
45901
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
46302
45902
|
}, Na(e);
|
|
46303
45903
|
}
|
|
46304
45904
|
var _a = ["active"];
|
|
@@ -46689,10 +46289,10 @@ function requireLib() {
|
|
|
46689
46289
|
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"));
|
|
46690
46290
|
};
|
|
46691
46291
|
function bi(e) {
|
|
46692
|
-
return bi = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
46693
|
-
return _typeof(e);
|
|
46292
|
+
return bi = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
46293
|
+
return _typeof$1(e);
|
|
46694
46294
|
} : function (e) {
|
|
46695
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
46295
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
46696
46296
|
}, bi(e);
|
|
46697
46297
|
}
|
|
46698
46298
|
function Ei(e, t) {
|
|
@@ -47101,10 +46701,10 @@ function requireLib() {
|
|
|
47101
46701
|
});
|
|
47102
46702
|
};
|
|
47103
46703
|
function Hi(e) {
|
|
47104
|
-
return Hi = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
47105
|
-
return _typeof(e);
|
|
46704
|
+
return Hi = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
46705
|
+
return _typeof$1(e);
|
|
47106
46706
|
} : function (e) {
|
|
47107
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
46707
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
47108
46708
|
}, Hi(e);
|
|
47109
46709
|
}
|
|
47110
46710
|
function Ui(e, t) {
|
|
@@ -47680,10 +47280,10 @@ function requireLib() {
|
|
|
47680
47280
|
});
|
|
47681
47281
|
var Ts = ks;
|
|
47682
47282
|
function Ms(e) {
|
|
47683
|
-
return Ms = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) {
|
|
47684
|
-
return _typeof(e);
|
|
47283
|
+
return Ms = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
|
|
47284
|
+
return _typeof$1(e);
|
|
47685
47285
|
} : function (e) {
|
|
47686
|
-
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
|
|
47286
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
|
|
47687
47287
|
}, Ms(e);
|
|
47688
47288
|
}
|
|
47689
47289
|
function Rs() {
|