karsten-design-system 1.1.38 → 1.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/index.js +4877 -38
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/dist/.storybook/index.css.js +0 -7
  5. package/dist/.storybook/index.css.js.map +0 -1
  6. package/dist/_virtual/jsx-runtime.js +0 -6
  7. package/dist/_virtual/jsx-runtime.js.map +0 -1
  8. package/dist/_virtual/jsx-runtime2.js +0 -4
  9. package/dist/_virtual/jsx-runtime2.js.map +0 -1
  10. package/dist/_virtual/react-jsx-runtime.development.js +0 -4
  11. package/dist/_virtual/react-jsx-runtime.development.js.map +0 -1
  12. package/dist/_virtual/react-jsx-runtime.production.js +0 -4
  13. package/dist/_virtual/react-jsx-runtime.production.js.map +0 -1
  14. package/dist/assets/icons/error.js +0 -8
  15. package/dist/assets/icons/error.js.map +0 -1
  16. package/dist/assets/icons/filter.js +0 -8
  17. package/dist/assets/icons/filter.js.map +0 -1
  18. package/dist/assets/icons/info.js +0 -8
  19. package/dist/assets/icons/info.js.map +0 -1
  20. package/dist/assets/icons/success.js +0 -8
  21. package/dist/assets/icons/success.js.map +0 -1
  22. package/dist/assets/icons/text.js +0 -8
  23. package/dist/assets/icons/text.js.map +0 -1
  24. package/dist/assets/logoSmall.js +0 -8
  25. package/dist/assets/logoSmall.js.map +0 -1
  26. package/dist/components/floating-label/index.js +0 -14
  27. package/dist/components/floating-label/index.js.map +0 -1
  28. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
  29. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
  30. package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -8
  31. package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
  32. package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -776
  33. package/dist/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
  34. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -95
  35. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
  36. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -67
  37. package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
  38. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -32
  39. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
  40. package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -12
  41. package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
  42. package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -26
  43. package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
  44. package/dist/node_modules/date-fns/constants.js +0 -47
  45. package/dist/node_modules/date-fns/constants.js.map +0 -1
  46. package/dist/node_modules/date-fns/constructFrom.js +0 -50
  47. package/dist/node_modules/date-fns/constructFrom.js.map +0 -1
  48. package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -63
  49. package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
  50. package/dist/node_modules/date-fns/format.js +0 -424
  51. package/dist/node_modules/date-fns/format.js.map +0 -1
  52. package/dist/node_modules/date-fns/getDayOfYear.js +0 -35
  53. package/dist/node_modules/date-fns/getDayOfYear.js.map +0 -1
  54. package/dist/node_modules/date-fns/getISOWeek.js +0 -41
  55. package/dist/node_modules/date-fns/getISOWeek.js.map +0 -1
  56. package/dist/node_modules/date-fns/getISOWeekYear.js +0 -53
  57. package/dist/node_modules/date-fns/getISOWeekYear.js.map +0 -1
  58. package/dist/node_modules/date-fns/getWeek.js +0 -55
  59. package/dist/node_modules/date-fns/getWeek.js.map +0 -1
  60. package/dist/node_modules/date-fns/getWeekYear.js +0 -76
  61. package/dist/node_modules/date-fns/getWeekYear.js.map +0 -1
  62. package/dist/node_modules/date-fns/isDate.js +0 -42
  63. package/dist/node_modules/date-fns/isDate.js.map +0 -1
  64. package/dist/node_modules/date-fns/isValid.js +0 -40
  65. package/dist/node_modules/date-fns/isValid.js.map +0 -1
  66. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -11
  67. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
  68. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -65
  69. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
  70. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -60
  71. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
  72. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -23
  73. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
  74. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -104
  75. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
  76. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -42
  77. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
  78. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -14
  79. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
  80. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -190
  81. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
  82. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -135
  83. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
  84. package/dist/node_modules/date-fns/locale/en-US.js +0 -29
  85. package/dist/node_modules/date-fns/locale/en-US.js.map +0 -1
  86. package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js +0 -104
  87. package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js.map +0 -1
  88. package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatLong.js +0 -42
  89. package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatLong.js.map +0 -1
  90. package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatRelative.js +0 -25
  91. package/dist/node_modules/date-fns/locale/pt-BR/_lib/formatRelative.js.map +0 -1
  92. package/dist/node_modules/date-fns/locale/pt-BR/_lib/localize.js +0 -180
  93. package/dist/node_modules/date-fns/locale/pt-BR/_lib/localize.js.map +0 -1
  94. package/dist/node_modules/date-fns/locale/pt-BR/_lib/match.js +0 -137
  95. package/dist/node_modules/date-fns/locale/pt-BR/_lib/match.js.map +0 -1
  96. package/dist/node_modules/date-fns/locale/pt-BR.js +0 -29
  97. package/dist/node_modules/date-fns/locale/pt-BR.js.map +0 -1
  98. package/dist/node_modules/date-fns/startOfDay.js +0 -36
  99. package/dist/node_modules/date-fns/startOfDay.js.map +0 -1
  100. package/dist/node_modules/date-fns/startOfISOWeek.js +0 -36
  101. package/dist/node_modules/date-fns/startOfISOWeek.js.map +0 -1
  102. package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -43
  103. package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
  104. package/dist/node_modules/date-fns/startOfWeek.js +0 -54
  105. package/dist/node_modules/date-fns/startOfWeek.js.map +0 -1
  106. package/dist/node_modules/date-fns/startOfWeekYear.js +0 -65
  107. package/dist/node_modules/date-fns/startOfWeekYear.js.map +0 -1
  108. package/dist/node_modules/date-fns/startOfYear.js +0 -37
  109. package/dist/node_modules/date-fns/startOfYear.js.map +0 -1
  110. package/dist/node_modules/date-fns/toDate.js +0 -47
  111. package/dist/node_modules/date-fns/toDate.js.map +0 -1
  112. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -369
  113. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
  114. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -45
  115. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +0 -1
  116. package/dist/node_modules/react/jsx-runtime.js +0 -20
  117. package/dist/node_modules/react/jsx-runtime.js.map +0 -1
  118. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -29
  119. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
  120. package/dist/stories/components/accordion.js +0 -30
  121. package/dist/stories/components/accordion.js.map +0 -1
  122. package/dist/stories/components/autoComplete.js +0 -30
  123. package/dist/stories/components/autoComplete.js.map +0 -1
  124. package/dist/stories/components/basicHeader.js +0 -9
  125. package/dist/stories/components/basicHeader.js.map +0 -1
  126. package/dist/stories/components/breadcrumb.js +0 -10
  127. package/dist/stories/components/breadcrumb.js.map +0 -1
  128. package/dist/stories/components/button.js +0 -19
  129. package/dist/stories/components/button.js.map +0 -1
  130. package/dist/stories/components/calendarInput.js +0 -99
  131. package/dist/stories/components/calendarInput.js.map +0 -1
  132. package/dist/stories/components/card.js +0 -9
  133. package/dist/stories/components/card.js.map +0 -1
  134. package/dist/stories/components/cardButton.js +0 -11
  135. package/dist/stories/components/cardButton.js.map +0 -1
  136. package/dist/stories/components/cardIconsButton.js +0 -11
  137. package/dist/stories/components/cardIconsButton.js.map +0 -1
  138. package/dist/stories/components/chart.js +0 -9
  139. package/dist/stories/components/chart.js.map +0 -1
  140. package/dist/stories/components/dialog.js +0 -10
  141. package/dist/stories/components/dialog.js.map +0 -1
  142. package/dist/stories/components/divider.js +0 -9
  143. package/dist/stories/components/divider.js.map +0 -1
  144. package/dist/stories/components/emptyContent.js +0 -8
  145. package/dist/stories/components/emptyContent.js.map +0 -1
  146. package/dist/stories/components/expandablePanel.js +0 -10
  147. package/dist/stories/components/expandablePanel.js.map +0 -1
  148. package/dist/stories/components/fileUpload.js +0 -96
  149. package/dist/stories/components/fileUpload.js.map +0 -1
  150. package/dist/stories/components/filterButton.js +0 -33
  151. package/dist/stories/components/filterButton.js.map +0 -1
  152. package/dist/stories/components/header.js +0 -37
  153. package/dist/stories/components/header.js.map +0 -1
  154. package/dist/stories/components/iconButton.js +0 -14
  155. package/dist/stories/components/iconButton.js.map +0 -1
  156. package/dist/stories/components/infoCard.js +0 -9
  157. package/dist/stories/components/infoCard.js.map +0 -1
  158. package/dist/stories/components/input.js +0 -60
  159. package/dist/stories/components/input.js.map +0 -1
  160. package/dist/stories/components/inputSwitch.js +0 -14
  161. package/dist/stories/components/inputSwitch.js.map +0 -1
  162. package/dist/stories/components/inputTextArea.js +0 -20
  163. package/dist/stories/components/inputTextArea.js.map +0 -1
  164. package/dist/stories/components/internalMenu.js +0 -30
  165. package/dist/stories/components/internalMenu.js.map +0 -1
  166. package/dist/stories/components/link.js +0 -8
  167. package/dist/stories/components/link.js.map +0 -1
  168. package/dist/stories/components/megaMenu.js +0 -13
  169. package/dist/stories/components/megaMenu.js.map +0 -1
  170. package/dist/stories/components/modal.js +0 -38
  171. package/dist/stories/components/modal.js.map +0 -1
  172. package/dist/stories/components/multiselect.js +0 -125
  173. package/dist/stories/components/multiselect.js.map +0 -1
  174. package/dist/stories/components/notification.js +0 -16
  175. package/dist/stories/components/notification.js.map +0 -1
  176. package/dist/stories/components/notificationItem.js +0 -16
  177. package/dist/stories/components/notificationItem.js.map +0 -1
  178. package/dist/stories/components/paginator.js +0 -28
  179. package/dist/stories/components/paginator.js.map +0 -1
  180. package/dist/stories/components/radioButton.js +0 -17
  181. package/dist/stories/components/radioButton.js.map +0 -1
  182. package/dist/stories/components/select.js +0 -98
  183. package/dist/stories/components/select.js.map +0 -1
  184. package/dist/stories/components/sidebar.js +0 -17
  185. package/dist/stories/components/sidebar.js.map +0 -1
  186. package/dist/stories/components/skeleton.js +0 -9
  187. package/dist/stories/components/skeleton.js.map +0 -1
  188. package/dist/stories/components/spinner.js +0 -18
  189. package/dist/stories/components/spinner.js.map +0 -1
  190. package/dist/stories/components/table.js +0 -167
  191. package/dist/stories/components/table.js.map +0 -1
  192. package/dist/stories/components/tagStatus.js +0 -33
  193. package/dist/stories/components/tagStatus.js.map +0 -1
  194. package/dist/stories/components/toast.js +0 -18
  195. package/dist/stories/components/toast.js.map +0 -1
  196. package/dist/utils/masks/index.js +0 -90
  197. package/dist/utils/masks/index.js.map +0 -1
  198. package/dist/utils/nestedValue.js +0 -9
  199. package/dist/utils/nestedValue.js.map +0 -1
  200. package/dist/utils/sortData.js +0 -48
  201. package/dist/utils/sortData.js.map +0 -1
@@ -1,55 +0,0 @@
1
- import { millisecondsInWeek } from './constants.js';
2
- import { startOfWeek } from './startOfWeek.js';
3
- import { startOfWeekYear } from './startOfWeekYear.js';
4
- import { toDate } from './toDate.js';
5
-
6
- /**
7
- * The {@link getWeek} function options.
8
- */
9
-
10
- /**
11
- * @name getWeek
12
- * @category Week Helpers
13
- * @summary Get the local week index of the given date.
14
- *
15
- * @description
16
- * Get the local week index of the given date.
17
- * The exact calculation depends on the values of
18
- * `options.weekStartsOn` (which is the index of the first day of the week)
19
- * and `options.firstWeekContainsDate` (which is the day of January, which is always in
20
- * the first week of the week-numbering year)
21
- *
22
- * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
23
- *
24
- * @param date - The given date
25
- * @param options - An object with options
26
- *
27
- * @returns The week
28
- *
29
- * @example
30
- * // Which week of the local week numbering year is 2 January 2005 with default options?
31
- * const result = getWeek(new Date(2005, 0, 2))
32
- * //=> 2
33
- *
34
- * @example
35
- * // Which week of the local week numbering year is 2 January 2005,
36
- * // if Monday is the first day of the week,
37
- * // and the first week of the year always contains 4 January?
38
- * const result = getWeek(new Date(2005, 0, 2), {
39
- * weekStartsOn: 1,
40
- * firstWeekContainsDate: 4
41
- * })
42
- * //=> 53
43
- */
44
- function getWeek(date, options) {
45
- const _date = toDate(date, options?.in);
46
- const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
47
-
48
- // Round the number of weeks to the nearest integer because the number of
49
- // milliseconds in a week is not constant (e.g. it's different in the week of
50
- // the daylight saving time clock shift).
51
- return Math.round(diff / millisecondsInWeek) + 1;
52
- }
53
-
54
- export { getWeek as default, getWeek };
55
- //# sourceMappingURL=getWeek.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getWeek.js","sources":["../../../node_modules/date-fns/getWeek.js"],"sourcesContent":["import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n"],"names":[],"mappings":";;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE;AACvC,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;AACzC,EAAE,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC;;AAE9E;AACA;AACA;AACA,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC,GAAG,CAAC;AAClD;;;;","x_google_ignoreList":[0]}
@@ -1,76 +0,0 @@
1
- import { getDefaultOptions } from './_lib/defaultOptions.js';
2
- import { constructFrom } from './constructFrom.js';
3
- import { startOfWeek } from './startOfWeek.js';
4
- import { toDate } from './toDate.js';
5
-
6
- /**
7
- * The {@link getWeekYear} function options.
8
- */
9
-
10
- /**
11
- * @name getWeekYear
12
- * @category Week-Numbering Year Helpers
13
- * @summary Get the local week-numbering year of the given date.
14
- *
15
- * @description
16
- * Get the local week-numbering year of the given date.
17
- * The exact calculation depends on the values of
18
- * `options.weekStartsOn` (which is the index of the first day of the week)
19
- * and `options.firstWeekContainsDate` (which is the day of January, which is always in
20
- * the first week of the week-numbering year)
21
- *
22
- * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
23
- *
24
- * @param date - The given date
25
- * @param options - An object with options.
26
- *
27
- * @returns The local week-numbering year
28
- *
29
- * @example
30
- * // Which week numbering year is 26 December 2004 with the default settings?
31
- * const result = getWeekYear(new Date(2004, 11, 26))
32
- * //=> 2005
33
- *
34
- * @example
35
- * // Which week numbering year is 26 December 2004 if week starts on Saturday?
36
- * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
37
- * //=> 2004
38
- *
39
- * @example
40
- * // Which week numbering year is 26 December 2004 if the first week contains 4 January?
41
- * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
42
- * //=> 2004
43
- */
44
- function getWeekYear(date, options) {
45
- const _date = toDate(date, options?.in);
46
- const year = _date.getFullYear();
47
-
48
- const defaultOptions = getDefaultOptions();
49
- const firstWeekContainsDate =
50
- options?.firstWeekContainsDate ??
51
- options?.locale?.options?.firstWeekContainsDate ??
52
- defaultOptions.firstWeekContainsDate ??
53
- defaultOptions.locale?.options?.firstWeekContainsDate ??
54
- 1;
55
-
56
- const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
57
- firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
58
- firstWeekOfNextYear.setHours(0, 0, 0, 0);
59
- const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
60
-
61
- const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
62
- firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
63
- firstWeekOfThisYear.setHours(0, 0, 0, 0);
64
- const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
65
-
66
- if (+_date >= +startOfNextYear) {
67
- return year + 1;
68
- } else if (+_date >= +startOfThisYear) {
69
- return year;
70
- } else {
71
- return year - 1;
72
- }
73
- }
74
-
75
- export { getWeekYear as default, getWeekYear };
76
- //# sourceMappingURL=getWeekYear.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getWeekYear.js","sources":["../../../node_modules/date-fns/getWeekYear.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n"],"names":[],"mappings":";;;;;AAKA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC3C,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;AACzC,EAAE,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE;;AAElC,EAAE,MAAM,cAAc,GAAG,iBAAiB,EAAE;AAC5C,EAAE,MAAM,qBAAqB;AAC7B,IAAI,OAAO,EAAE,qBAAqB;AAClC,IAAI,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;AACnD,IAAI,cAAc,CAAC,qBAAqB;AACxC,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,qBAAqB;AACzD,IAAI,CAAC;;AAEL,EAAE,MAAM,mBAAmB,GAAG,aAAa,CAAC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AACnE,EAAE,mBAAmB,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC;AACrE,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1C,EAAE,MAAM,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC;;AAEnE,EAAE,MAAM,mBAAmB,GAAG,aAAa,CAAC,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AACnE,EAAE,mBAAmB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,qBAAqB,CAAC;AACjE,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1C,EAAE,MAAM,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC;;AAEnE,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,eAAe,EAAE;AAClC,IAAI,OAAO,IAAI,GAAG,CAAC;AACnB,GAAG,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,eAAe,EAAE;AACzC,IAAI,OAAO,IAAI;AACf,GAAG,MAAM;AACT,IAAI,OAAO,IAAI,GAAG,CAAC;AACnB;AACA;;;;","x_google_ignoreList":[0]}
@@ -1,42 +0,0 @@
1
- /**
2
- * @name isDate
3
- * @category Common Helpers
4
- * @summary Is the given value a date?
5
- *
6
- * @description
7
- * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
8
- *
9
- * @param value - The value to check
10
- *
11
- * @returns True if the given value is a date
12
- *
13
- * @example
14
- * // For a valid date:
15
- * const result = isDate(new Date())
16
- * //=> true
17
- *
18
- * @example
19
- * // For an invalid date:
20
- * const result = isDate(new Date(NaN))
21
- * //=> true
22
- *
23
- * @example
24
- * // For some value:
25
- * const result = isDate('2014-02-31')
26
- * //=> false
27
- *
28
- * @example
29
- * // For an object:
30
- * const result = isDate({})
31
- * //=> false
32
- */
33
- function isDate(value) {
34
- return (
35
- value instanceof Date ||
36
- (typeof value === "object" &&
37
- Object.prototype.toString.call(value) === "[object Date]")
38
- );
39
- }
40
-
41
- export { isDate as default, isDate };
42
- //# sourceMappingURL=isDate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isDate.js","sources":["../../../node_modules/date-fns/isDate.js"],"sourcesContent":["/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,KAAK,EAAE;AAC9B,EAAE;AACF,IAAI,KAAK,YAAY,IAAI;AACzB,KAAK,OAAO,KAAK,KAAK,QAAQ;AAC9B,MAAM,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,eAAe;AAC/D;AACA;;;;","x_google_ignoreList":[0]}
@@ -1,40 +0,0 @@
1
- import { isDate } from './isDate.js';
2
- import { toDate } from './toDate.js';
3
-
4
- /**
5
- * @name isValid
6
- * @category Common Helpers
7
- * @summary Is the given date valid?
8
- *
9
- * @description
10
- * Returns false if argument is Invalid Date and true otherwise.
11
- * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
12
- * Invalid Date is a Date, whose time value is NaN.
13
- *
14
- * Time value of Date: http://es5.github.io/#x15.9.1.1
15
- *
16
- * @param date - The date to check
17
- *
18
- * @returns The date is valid
19
- *
20
- * @example
21
- * // For the valid date:
22
- * const result = isValid(new Date(2014, 1, 31))
23
- * //=> true
24
- *
25
- * @example
26
- * // For the value, convertible into a date:
27
- * const result = isValid(1393804800000)
28
- * //=> true
29
- *
30
- * @example
31
- * // For the invalid date:
32
- * const result = isValid(new Date(''))
33
- * //=> false
34
- */
35
- function isValid(date) {
36
- return !((!isDate(date) && typeof date !== "number") || isNaN(+toDate(date)));
37
- }
38
-
39
- export { isValid as default, isValid };
40
- //# sourceMappingURL=isValid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isValid.js","sources":["../../../node_modules/date-fns/isValid.js"],"sourcesContent":["import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,IAAI,EAAE;AAC9B,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,KAAK,QAAQ,KAAK,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/E;;;;","x_google_ignoreList":[0]}
@@ -1,11 +0,0 @@
1
- function buildFormatLongFn(args) {
2
- return (options = {}) => {
3
- // TODO: Remove String()
4
- const width = options.width ? String(options.width) : args.defaultWidth;
5
- const format = args.formats[width] || args.formats[args.defaultWidth];
6
- return format;
7
- };
8
- }
9
-
10
- export { buildFormatLongFn };
11
- //# sourceMappingURL=buildFormatLongFn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildFormatLongFn.js","sources":["../../../../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js"],"sourcesContent":["export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n"],"names":[],"mappings":"AAAO,SAAS,iBAAiB,CAAC,IAAI,EAAE;AACxC,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,KAAK;AAC3B;AACA,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY;AAC3E,IAAI,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;AACzE,IAAI,OAAO,MAAM;AACjB,GAAG;AACH;;;;","x_google_ignoreList":[0]}
@@ -1,65 +0,0 @@
1
- /**
2
- * The localize function argument callback which allows to convert raw value to
3
- * the actual type.
4
- *
5
- * @param value - The value to convert
6
- *
7
- * @returns The converted value
8
- */
9
-
10
- /**
11
- * The map of localized values for each width.
12
- */
13
-
14
- /**
15
- * The index type of the locale unit value. It types conversion of units of
16
- * values that don't start at 0 (i.e. quarters).
17
- */
18
-
19
- /**
20
- * Converts the unit value to the tuple of values.
21
- */
22
-
23
- /**
24
- * The tuple of localized era values. The first element represents BC,
25
- * the second element represents AD.
26
- */
27
-
28
- /**
29
- * The tuple of localized quarter values. The first element represents Q1.
30
- */
31
-
32
- /**
33
- * The tuple of localized day values. The first element represents Sunday.
34
- */
35
-
36
- /**
37
- * The tuple of localized month values. The first element represents January.
38
- */
39
-
40
- function buildLocalizeFn(args) {
41
- return (value, options) => {
42
- const context = options?.context ? String(options.context) : "standalone";
43
-
44
- let valuesArray;
45
- if (context === "formatting" && args.formattingValues) {
46
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
47
- const width = options?.width ? String(options.width) : defaultWidth;
48
-
49
- valuesArray =
50
- args.formattingValues[width] || args.formattingValues[defaultWidth];
51
- } else {
52
- const defaultWidth = args.defaultWidth;
53
- const width = options?.width ? String(options.width) : args.defaultWidth;
54
-
55
- valuesArray = args.values[width] || args.values[defaultWidth];
56
- }
57
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
58
-
59
- // @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!
60
- return valuesArray[index];
61
- };
62
- }
63
-
64
- export { buildLocalizeFn };
65
- //# sourceMappingURL=buildLocalizeFn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildLocalizeFn.js","sources":["../../../../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js"],"sourcesContent":["/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @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!\n return valuesArray[index];\n };\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEO,SAAS,eAAe,CAAC,IAAI,EAAE;AACtC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,KAAK;AAC7B,IAAI,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,YAAY;;AAE7E,IAAI,IAAI,WAAW;AACnB,IAAI,IAAI,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,gBAAgB,EAAE;AAC3D,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,YAAY;AAC3E,MAAM,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY;;AAEzE,MAAM,WAAW;AACjB,QAAQ,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;AAC3E,KAAK,MAAM;AACX,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY;AAC5C,MAAM,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY;;AAE9E,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;AACnE;AACA,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,KAAK;;AAE9E;AACA,IAAI,OAAO,WAAW,CAAC,KAAK,CAAC;AAC7B,GAAG;AACH;;;;","x_google_ignoreList":[0]}
@@ -1,60 +0,0 @@
1
- function buildMatchFn(args) {
2
- return (string, options = {}) => {
3
- const width = options.width;
4
-
5
- const matchPattern =
6
- (width && args.matchPatterns[width]) ||
7
- args.matchPatterns[args.defaultMatchWidth];
8
- const matchResult = string.match(matchPattern);
9
-
10
- if (!matchResult) {
11
- return null;
12
- }
13
- const matchedString = matchResult[0];
14
-
15
- const parsePatterns =
16
- (width && args.parsePatterns[width]) ||
17
- args.parsePatterns[args.defaultParseWidth];
18
-
19
- const key = Array.isArray(parsePatterns)
20
- ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
21
- : // [TODO] -- I challenge you to fix the type
22
- findKey(parsePatterns, (pattern) => pattern.test(matchedString));
23
-
24
- let value;
25
-
26
- value = args.valueCallback ? args.valueCallback(key) : key;
27
- value = options.valueCallback
28
- ? // [TODO] -- I challenge you to fix the type
29
- options.valueCallback(value)
30
- : value;
31
-
32
- const rest = string.slice(matchedString.length);
33
-
34
- return { value, rest };
35
- };
36
- }
37
-
38
- function findKey(object, predicate) {
39
- for (const key in object) {
40
- if (
41
- Object.prototype.hasOwnProperty.call(object, key) &&
42
- predicate(object[key])
43
- ) {
44
- return key;
45
- }
46
- }
47
- return undefined;
48
- }
49
-
50
- function findIndex(array, predicate) {
51
- for (let key = 0; key < array.length; key++) {
52
- if (predicate(array[key])) {
53
- return key;
54
- }
55
- }
56
- return undefined;
57
- }
58
-
59
- export { buildMatchFn };
60
- //# sourceMappingURL=buildMatchFn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildMatchFn.js","sources":["../../../../../node_modules/date-fns/locale/_lib/buildMatchFn.js"],"sourcesContent":["export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,CAAC,IAAI,EAAE;AACnC,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,KAAK;AACnC,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK;;AAE/B,IAAI,MAAM,YAAY;AACtB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AACzC,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAiB,CAAC;AAChD,IAAI,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;;AAElD,IAAI,IAAI,CAAC,WAAW,EAAE;AACtB,MAAM,OAAO,IAAI;AACjB;AACA,IAAI,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,CAAC;;AAExC,IAAI,MAAM,aAAa;AACvB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;AACzC,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAiB,CAAC;;AAEhD,IAAI,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa;AAC3C,QAAQ,SAAS,CAAC,aAAa,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;AACzE;AACA,QAAQ,OAAO,CAAC,aAAa,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;;AAExE,IAAI,IAAI,KAAK;;AAEb,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,GAAG;AAC9D,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB;AACA,QAAQ,OAAO,CAAC,aAAa,CAAC,KAAK;AACnC,QAAQ,KAAK;;AAEb,IAAI,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;;AAEnD,IAAI,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;AAC1B,GAAG;AACH;;AAEA,SAAS,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE;AACpC,EAAE,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;AAC5B,IAAI;AACJ,MAAM,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;AACvD,MAAM,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;AAC3B,MAAM;AACN,MAAM,OAAO,GAAG;AAChB;AACA;AACA,EAAE,OAAO,SAAS;AAClB;;AAEA,SAAS,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE;AACrC,EAAE,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;AAC/C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;AAC/B,MAAM,OAAO,GAAG;AAChB;AACA;AACA,EAAE,OAAO,SAAS;AAClB;;;;","x_google_ignoreList":[0]}
@@ -1,23 +0,0 @@
1
- function buildMatchPatternFn(args) {
2
- return (string, options = {}) => {
3
- const matchResult = string.match(args.matchPattern);
4
- if (!matchResult) return null;
5
- const matchedString = matchResult[0];
6
-
7
- const parseResult = string.match(args.parsePattern);
8
- if (!parseResult) return null;
9
- let value = args.valueCallback
10
- ? args.valueCallback(parseResult[0])
11
- : parseResult[0];
12
-
13
- // [TODO] I challenge you to fix the type
14
- value = options.valueCallback ? options.valueCallback(value) : value;
15
-
16
- const rest = string.slice(matchedString.length);
17
-
18
- return { value, rest };
19
- };
20
- }
21
-
22
- export { buildMatchPatternFn };
23
- //# sourceMappingURL=buildMatchPatternFn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildMatchPatternFn.js","sources":["../../../../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js"],"sourcesContent":["export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n"],"names":[],"mappings":"AAAO,SAAS,mBAAmB,CAAC,IAAI,EAAE;AAC1C,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,KAAK;AACnC,IAAI,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;AACvD,IAAI,IAAI,CAAC,WAAW,EAAE,OAAO,IAAI;AACjC,IAAI,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,CAAC;;AAExC,IAAI,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;AACvD,IAAI,IAAI,CAAC,WAAW,EAAE,OAAO,IAAI;AACjC,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC;AACrB,QAAQ,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AACzC,QAAQ,WAAW,CAAC,CAAC,CAAC;;AAEtB;AACA,IAAI,KAAK,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK;;AAExE,IAAI,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;;AAEnD,IAAI,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;AAC1B,GAAG;AACH;;;;","x_google_ignoreList":[0]}
@@ -1,104 +0,0 @@
1
- const formatDistanceLocale = {
2
- lessThanXSeconds: {
3
- one: "less than a second",
4
- other: "less than {{count}} seconds",
5
- },
6
-
7
- xSeconds: {
8
- one: "1 second",
9
- other: "{{count}} seconds",
10
- },
11
-
12
- halfAMinute: "half a minute",
13
-
14
- lessThanXMinutes: {
15
- one: "less than a minute",
16
- other: "less than {{count}} minutes",
17
- },
18
-
19
- xMinutes: {
20
- one: "1 minute",
21
- other: "{{count}} minutes",
22
- },
23
-
24
- aboutXHours: {
25
- one: "about 1 hour",
26
- other: "about {{count}} hours",
27
- },
28
-
29
- xHours: {
30
- one: "1 hour",
31
- other: "{{count}} hours",
32
- },
33
-
34
- xDays: {
35
- one: "1 day",
36
- other: "{{count}} days",
37
- },
38
-
39
- aboutXWeeks: {
40
- one: "about 1 week",
41
- other: "about {{count}} weeks",
42
- },
43
-
44
- xWeeks: {
45
- one: "1 week",
46
- other: "{{count}} weeks",
47
- },
48
-
49
- aboutXMonths: {
50
- one: "about 1 month",
51
- other: "about {{count}} months",
52
- },
53
-
54
- xMonths: {
55
- one: "1 month",
56
- other: "{{count}} months",
57
- },
58
-
59
- aboutXYears: {
60
- one: "about 1 year",
61
- other: "about {{count}} years",
62
- },
63
-
64
- xYears: {
65
- one: "1 year",
66
- other: "{{count}} years",
67
- },
68
-
69
- overXYears: {
70
- one: "over 1 year",
71
- other: "over {{count}} years",
72
- },
73
-
74
- almostXYears: {
75
- one: "almost 1 year",
76
- other: "almost {{count}} years",
77
- },
78
- };
79
-
80
- const formatDistance = (token, count, options) => {
81
- let result;
82
-
83
- const tokenValue = formatDistanceLocale[token];
84
- if (typeof tokenValue === "string") {
85
- result = tokenValue;
86
- } else if (count === 1) {
87
- result = tokenValue.one;
88
- } else {
89
- result = tokenValue.other.replace("{{count}}", count.toString());
90
- }
91
-
92
- if (options?.addSuffix) {
93
- if (options.comparison && options.comparison > 0) {
94
- return "in " + result;
95
- } else {
96
- return result + " ago";
97
- }
98
- }
99
-
100
- return result;
101
- };
102
-
103
- export { formatDistance };
104
- //# sourceMappingURL=formatDistance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatDistance.js","sources":["../../../../../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js"],"sourcesContent":["const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG;AAC7B,EAAE,gBAAgB,EAAE;AACpB,IAAI,GAAG,EAAE,oBAAoB;AAC7B,IAAI,KAAK,EAAE,6BAA6B;AACxC,GAAG;;AAEH,EAAE,QAAQ,EAAE;AACZ,IAAI,GAAG,EAAE,UAAU;AACnB,IAAI,KAAK,EAAE,mBAAmB;AAC9B,GAAG;;AAEH,EAAE,WAAW,EAAE,eAAe;;AAE9B,EAAE,gBAAgB,EAAE;AACpB,IAAI,GAAG,EAAE,oBAAoB;AAC7B,IAAI,KAAK,EAAE,6BAA6B;AACxC,GAAG;;AAEH,EAAE,QAAQ,EAAE;AACZ,IAAI,GAAG,EAAE,UAAU;AACnB,IAAI,KAAK,EAAE,mBAAmB;AAC9B,GAAG;;AAEH,EAAE,WAAW,EAAE;AACf,IAAI,GAAG,EAAE,cAAc;AACvB,IAAI,KAAK,EAAE,uBAAuB;AAClC,GAAG;;AAEH,EAAE,MAAM,EAAE;AACV,IAAI,GAAG,EAAE,QAAQ;AACjB,IAAI,KAAK,EAAE,iBAAiB;AAC5B,GAAG;;AAEH,EAAE,KAAK,EAAE;AACT,IAAI,GAAG,EAAE,OAAO;AAChB,IAAI,KAAK,EAAE,gBAAgB;AAC3B,GAAG;;AAEH,EAAE,WAAW,EAAE;AACf,IAAI,GAAG,EAAE,cAAc;AACvB,IAAI,KAAK,EAAE,uBAAuB;AAClC,GAAG;;AAEH,EAAE,MAAM,EAAE;AACV,IAAI,GAAG,EAAE,QAAQ;AACjB,IAAI,KAAK,EAAE,iBAAiB;AAC5B,GAAG;;AAEH,EAAE,YAAY,EAAE;AAChB,IAAI,GAAG,EAAE,eAAe;AACxB,IAAI,KAAK,EAAE,wBAAwB;AACnC,GAAG;;AAEH,EAAE,OAAO,EAAE;AACX,IAAI,GAAG,EAAE,SAAS;AAClB,IAAI,KAAK,EAAE,kBAAkB;AAC7B,GAAG;;AAEH,EAAE,WAAW,EAAE;AACf,IAAI,GAAG,EAAE,cAAc;AACvB,IAAI,KAAK,EAAE,uBAAuB;AAClC,GAAG;;AAEH,EAAE,MAAM,EAAE;AACV,IAAI,GAAG,EAAE,QAAQ;AACjB,IAAI,KAAK,EAAE,iBAAiB;AAC5B,GAAG;;AAEH,EAAE,UAAU,EAAE;AACd,IAAI,GAAG,EAAE,aAAa;AACtB,IAAI,KAAK,EAAE,sBAAsB;AACjC,GAAG;;AAEH,EAAE,YAAY,EAAE;AAChB,IAAI,GAAG,EAAE,eAAe;AACxB,IAAI,KAAK,EAAE,wBAAwB;AACnC,GAAG;AACH,CAAC;;AAEW,MAAC,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK;AACzD,EAAE,IAAI,MAAM;;AAEZ,EAAE,MAAM,UAAU,GAAG,oBAAoB,CAAC,KAAK,CAAC;AAChD,EAAE,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;AACtC,IAAI,MAAM,GAAG,UAAU;AACvB,GAAG,MAAM,IAAI,KAAK,KAAK,CAAC,EAAE;AAC1B,IAAI,MAAM,GAAG,UAAU,CAAC,GAAG;AAC3B,GAAG,MAAM;AACT,IAAI,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;AACpE;;AAEA,EAAE,IAAI,OAAO,EAAE,SAAS,EAAE;AAC1B,IAAI,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,GAAG,CAAC,EAAE;AACtD,MAAM,OAAO,KAAK,GAAG,MAAM;AAC3B,KAAK,MAAM;AACX,MAAM,OAAO,MAAM,GAAG,MAAM;AAC5B;AACA;;AAEA,EAAE,OAAO,MAAM;AACf;;;;","x_google_ignoreList":[0]}
@@ -1,42 +0,0 @@
1
- import { buildFormatLongFn } from '../../_lib/buildFormatLongFn.js';
2
-
3
- const dateFormats = {
4
- full: "EEEE, MMMM do, y",
5
- long: "MMMM do, y",
6
- medium: "MMM d, y",
7
- short: "MM/dd/yyyy",
8
- };
9
-
10
- const timeFormats = {
11
- full: "h:mm:ss a zzzz",
12
- long: "h:mm:ss a z",
13
- medium: "h:mm:ss a",
14
- short: "h:mm a",
15
- };
16
-
17
- const dateTimeFormats = {
18
- full: "{{date}} 'at' {{time}}",
19
- long: "{{date}} 'at' {{time}}",
20
- medium: "{{date}}, {{time}}",
21
- short: "{{date}}, {{time}}",
22
- };
23
-
24
- const formatLong = {
25
- date: buildFormatLongFn({
26
- formats: dateFormats,
27
- defaultWidth: "full",
28
- }),
29
-
30
- time: buildFormatLongFn({
31
- formats: timeFormats,
32
- defaultWidth: "full",
33
- }),
34
-
35
- dateTime: buildFormatLongFn({
36
- formats: dateTimeFormats,
37
- defaultWidth: "full",
38
- }),
39
- };
40
-
41
- export { formatLong };
42
- //# sourceMappingURL=formatLong.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatLong.js","sources":["../../../../../../node_modules/date-fns/locale/en-US/_lib/formatLong.js"],"sourcesContent":["import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n"],"names":[],"mappings":";;AAEA,MAAM,WAAW,GAAG;AACpB,EAAE,IAAI,EAAE,kBAAkB;AAC1B,EAAE,IAAI,EAAE,YAAY;AACpB,EAAE,MAAM,EAAE,UAAU;AACpB,EAAE,KAAK,EAAE,YAAY;AACrB,CAAC;;AAED,MAAM,WAAW,GAAG;AACpB,EAAE,IAAI,EAAE,gBAAgB;AACxB,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,MAAM,EAAE,WAAW;AACrB,EAAE,KAAK,EAAE,QAAQ;AACjB,CAAC;;AAED,MAAM,eAAe,GAAG;AACxB,EAAE,IAAI,EAAE,wBAAwB;AAChC,EAAE,IAAI,EAAE,wBAAwB;AAChC,EAAE,MAAM,EAAE,oBAAoB;AAC9B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,CAAC;;AAEW,MAAC,UAAU,GAAG;AAC1B,EAAE,IAAI,EAAE,iBAAiB,CAAC;AAC1B,IAAI,OAAO,EAAE,WAAW;AACxB,IAAI,YAAY,EAAE,MAAM;AACxB,GAAG,CAAC;;AAEJ,EAAE,IAAI,EAAE,iBAAiB,CAAC;AAC1B,IAAI,OAAO,EAAE,WAAW;AACxB,IAAI,YAAY,EAAE,MAAM;AACxB,GAAG,CAAC;;AAEJ,EAAE,QAAQ,EAAE,iBAAiB,CAAC;AAC9B,IAAI,OAAO,EAAE,eAAe;AAC5B,IAAI,YAAY,EAAE,MAAM;AACxB,GAAG,CAAC;AACJ;;;;","x_google_ignoreList":[0]}
@@ -1,14 +0,0 @@
1
- const formatRelativeLocale = {
2
- lastWeek: "'last' eeee 'at' p",
3
- yesterday: "'yesterday at' p",
4
- today: "'today at' p",
5
- tomorrow: "'tomorrow at' p",
6
- nextWeek: "eeee 'at' p",
7
- other: "P",
8
- };
9
-
10
- const formatRelative = (token, _date, _baseDate, _options) =>
11
- formatRelativeLocale[token];
12
-
13
- export { formatRelative };
14
- //# sourceMappingURL=formatRelative.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatRelative.js","sources":["../../../../../../node_modules/date-fns/locale/en-US/_lib/formatRelative.js"],"sourcesContent":["const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG;AAC7B,EAAE,QAAQ,EAAE,oBAAoB;AAChC,EAAE,SAAS,EAAE,kBAAkB;AAC/B,EAAE,KAAK,EAAE,cAAc;AACvB,EAAE,QAAQ,EAAE,iBAAiB;AAC7B,EAAE,QAAQ,EAAE,aAAa;AACzB,EAAE,KAAK,EAAE,GAAG;AACZ,CAAC;;AAEW,MAAC,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ;AAChE,EAAE,oBAAoB,CAAC,KAAK;;;;","x_google_ignoreList":[0]}