@arc-ui/components 12.0.0-alpha.0 → 12.0.0-beta.10

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 (739) hide show
  1. package/dist/Alert/Alert.cjs.js +9 -14
  2. package/dist/Alert/Alert.esm.js +8 -13
  3. package/dist/Alert/styles.css +1 -0
  4. package/dist/Align/Align.cjs.js +6 -7
  5. package/dist/Align/Align.esm.js +1 -2
  6. package/dist/Align/styles.css +1 -0
  7. package/dist/AppButton/AppButton.cjs.js +74 -0
  8. package/dist/AppButton/AppButton.esm.js +66 -0
  9. package/dist/AppButton/package.json +7 -0
  10. package/dist/AppButton/styles.css +1 -0
  11. package/dist/Avatar/Avatar.cjs.js +17 -0
  12. package/dist/Avatar/Avatar.esm.js +9 -0
  13. package/dist/Avatar/package.json +7 -0
  14. package/dist/Avatar/styles.css +1 -0
  15. package/dist/AvatarGroup/AvatarGroup.cjs.js +37 -0
  16. package/dist/AvatarGroup/AvatarGroup.esm.js +29 -0
  17. package/dist/AvatarGroup/package.json +7 -0
  18. package/dist/AvatarGroup/styles.css +1 -0
  19. package/dist/Badge/Badge.cjs.js +5 -28
  20. package/dist/Badge/Badge.esm.js +4 -27
  21. package/dist/Badge/styles.css +1 -0
  22. package/dist/Banner/Banner.cjs.js +21 -0
  23. package/dist/Banner/Banner.esm.js +13 -0
  24. package/dist/Banner/package.json +7 -0
  25. package/dist/Banner/styles.css +1 -0
  26. package/dist/BannerWithTabs/BannerWithTabs.cjs.js +62 -0
  27. package/dist/BannerWithTabs/BannerWithTabs.esm.js +54 -0
  28. package/dist/BannerWithTabs/package.json +7 -0
  29. package/dist/BannerWithTabs/styles.css +1 -0
  30. package/dist/Box/Box.cjs.js +6 -25
  31. package/dist/Box/Box.esm.js +5 -24
  32. package/dist/Box/styles.css +1 -0
  33. package/dist/BrandLogo/BrandLogo.cjs.js +3 -4
  34. package/dist/BrandLogo/BrandLogo.esm.js +3 -4
  35. package/dist/BrandLogo/styles.css +1 -0
  36. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +7 -6
  37. package/dist/Breadcrumbs/Breadcrumbs.esm.js +7 -6
  38. package/dist/Breadcrumbs/styles.css +1 -0
  39. package/dist/Button/Button.cjs.js +5 -6
  40. package/dist/Button/Button.esm.js +5 -6
  41. package/dist/Button/styles.css +1 -0
  42. package/dist/ButtonV2/ButtonV2.cjs.js +15 -0
  43. package/dist/ButtonV2/ButtonV2.esm.js +7 -0
  44. package/dist/ButtonV2/package.json +7 -0
  45. package/dist/ButtonV2/styles.css +1 -0
  46. package/dist/Calendar/Calendar.cjs.js +21 -0
  47. package/dist/Calendar/Calendar.esm.js +13 -0
  48. package/dist/Calendar/package.json +7 -0
  49. package/dist/Calendar/styles.css +1 -0
  50. package/dist/CardFooter/CardFooter.cjs.js +17 -0
  51. package/dist/CardFooter/CardFooter.esm.js +9 -0
  52. package/dist/CardFooter/package.json +7 -0
  53. package/dist/CardFooter/styles.css +1 -0
  54. package/dist/CardHeading/CardHeading.cjs.js +14 -0
  55. package/dist/CardHeading/CardHeading.esm.js +6 -0
  56. package/dist/CardHeading/package.json +7 -0
  57. package/dist/CardHeading/styles.css +1 -0
  58. package/dist/Carousel/Carousel.cjs.js +1921 -0
  59. package/dist/Carousel/Carousel.esm.js +1913 -0
  60. package/dist/Carousel/package.json +7 -0
  61. package/dist/Carousel/styles.css +1 -0
  62. package/dist/Checkbox/Checkbox.cjs.js +8 -8
  63. package/dist/Checkbox/Checkbox.esm.js +8 -8
  64. package/dist/Checkbox/styles.css +1 -0
  65. package/dist/Columns/Columns.cjs.js +2 -3
  66. package/dist/Columns/Columns.esm.js +2 -3
  67. package/dist/Columns/styles.css +1 -0
  68. package/dist/ConditionalWrapper/ConditionalWrapper.cjs.js +10 -0
  69. package/dist/ConditionalWrapper/ConditionalWrapper.esm.js +2 -0
  70. package/dist/ConditionalWrapper/package.json +7 -0
  71. package/dist/ContentSwitcher/ContentSwitcher.cjs.js +20 -0
  72. package/dist/ContentSwitcher/ContentSwitcher.esm.js +12 -0
  73. package/dist/ContentSwitcher/package.json +7 -0
  74. package/dist/ContentSwitcher/styles.css +1 -0
  75. package/dist/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs.js +23 -0
  76. package/dist/ContentSwitcherDropdown/ContentSwitcherDropdown.esm.js +15 -0
  77. package/dist/ContentSwitcherDropdown/package.json +7 -0
  78. package/dist/ContentSwitcherDropdown/styles.css +1 -0
  79. package/dist/DatePicker/DatePicker.cjs.js +36 -0
  80. package/dist/DatePicker/DatePicker.esm.js +23 -0
  81. package/dist/DatePicker/package.json +7 -0
  82. package/dist/DatePicker/styles.css +1 -0
  83. package/dist/Disclosure/Disclosure.cjs.js +13 -11
  84. package/dist/Disclosure/Disclosure.esm.js +11 -9
  85. package/dist/Disclosure/styles.css +1 -0
  86. package/dist/DisclosureMini/DisclosureMini.cjs.js +5 -6
  87. package/dist/DisclosureMini/DisclosureMini.esm.js +5 -6
  88. package/dist/DisclosureMini/styles.css +1 -0
  89. package/dist/Download/Download.cjs.js +16 -0
  90. package/dist/Download/Download.esm.js +8 -0
  91. package/dist/Download/package.json +7 -0
  92. package/dist/Download/styles.css +1 -0
  93. package/dist/Elevation/Elevation.cjs.js +4 -4
  94. package/dist/Elevation/Elevation.esm.js +1 -1
  95. package/dist/Elevation/styles.css +1 -0
  96. package/dist/Filter/Filter.cjs.js +4 -3
  97. package/dist/Filter/Filter.esm.js +4 -3
  98. package/dist/Filter/styles.css +1 -0
  99. package/dist/FormControl/FormControl.cjs.js +7 -7
  100. package/dist/FormControl/FormControl.esm.js +7 -7
  101. package/dist/FormControl/styles.css +1 -0
  102. package/dist/Grid/Grid.cjs.js +12 -0
  103. package/dist/Grid/Grid.esm.js +4 -0
  104. package/dist/Grid/package.json +7 -0
  105. package/dist/Grid/styles.css +1 -0
  106. package/dist/Group/Group.cjs.js +3 -3
  107. package/dist/Group/Group.esm.js +3 -3
  108. package/dist/Group/styles.css +1 -0
  109. package/dist/Heading/Heading.cjs.js +3 -4
  110. package/dist/Heading/Heading.esm.js +3 -4
  111. package/dist/Heading/styles.css +1 -0
  112. package/dist/HeroBanner/HeroBanner.cjs.js +28 -0
  113. package/dist/HeroBanner/HeroBanner.esm.js +20 -0
  114. package/dist/HeroBanner/package.json +7 -0
  115. package/dist/HeroButton/HeroButton.cjs.js +15 -0
  116. package/dist/HeroButton/HeroButton.esm.js +7 -0
  117. package/dist/HeroButton/package.json +7 -0
  118. package/dist/HeroButton/styles.css +1 -0
  119. package/dist/Hidden/Hidden.cjs.js +24 -0
  120. package/dist/Hidden/Hidden.esm.js +16 -0
  121. package/dist/Hidden/package.json +7 -0
  122. package/dist/Hidden/styles.css +1 -0
  123. package/dist/Icon/Icon.cjs.js +3 -4
  124. package/dist/Icon/Icon.esm.js +3 -4
  125. package/dist/Icon/styles.css +1 -0
  126. package/dist/Image/Image.cjs.js +2 -3
  127. package/dist/Image/Image.esm.js +2 -3
  128. package/dist/Image/styles.css +1 -0
  129. package/dist/ImpactCard/ImpactCard.cjs.js +43 -0
  130. package/dist/ImpactCard/ImpactCard.esm.js +35 -0
  131. package/dist/ImpactCard/package.json +7 -0
  132. package/dist/ImpactCard/styles.css +1 -0
  133. package/dist/InformationCard/InformationCard.cjs.js +60 -0
  134. package/dist/InformationCard/InformationCard.esm.js +52 -0
  135. package/dist/InformationCard/package.json +7 -0
  136. package/dist/InformationCard/styles.css +1 -0
  137. package/dist/Link/Link.cjs.js +75 -0
  138. package/dist/Link/Link.esm.js +67 -0
  139. package/dist/Link/package.json +7 -0
  140. package/dist/Link/styles.css +1 -0
  141. package/dist/Markup/Markup.cjs.js +5 -5
  142. package/dist/Markup/Markup.esm.js +2 -2
  143. package/dist/Markup/styles.css +1 -0
  144. package/dist/MediaCard/MediaCard.cjs.js +26 -0
  145. package/dist/MediaCard/MediaCard.esm.js +18 -0
  146. package/dist/MediaCard/package.json +7 -0
  147. package/dist/MediaCard/styles.css +1 -0
  148. package/dist/Modal/Modal.cjs.js +341 -547
  149. package/dist/Modal/Modal.esm.js +323 -547
  150. package/dist/Modal/styles.css +1 -0
  151. package/dist/PageBanner/PageBanner.cjs.js +28 -0
  152. package/dist/PageBanner/PageBanner.esm.js +20 -0
  153. package/dist/PageBanner/package.json +7 -0
  154. package/dist/Pagination/Pagination.cjs.js +8 -12
  155. package/dist/Pagination/Pagination.esm.js +6 -10
  156. package/dist/Pagination/styles.css +1 -0
  157. package/dist/PaginationSimple/PaginationSimple.cjs.js +91 -26
  158. package/dist/PaginationSimple/PaginationSimple.esm.js +90 -25
  159. package/dist/PaginationSimple/styles.css +1 -0
  160. package/dist/Poster/Poster.cjs.js +4 -5
  161. package/dist/Poster/Poster.esm.js +4 -5
  162. package/dist/Poster/styles.css +1 -0
  163. package/dist/ProgressBar/ProgressBar.cjs.js +19 -17
  164. package/dist/ProgressBar/ProgressBar.esm.js +16 -14
  165. package/dist/ProgressBar/styles.css +1 -0
  166. package/dist/ProgressStepper/ProgressStepper.cjs.js +5 -7
  167. package/dist/ProgressStepper/ProgressStepper.esm.js +5 -7
  168. package/dist/ProgressStepper/styles.css +1 -0
  169. package/dist/RadioGroup/RadioGroup.cjs.js +9 -8
  170. package/dist/RadioGroup/RadioGroup.esm.js +8 -8
  171. package/dist/RadioGroup/styles.css +1 -0
  172. package/dist/Rule/Rule.cjs.js +14 -4
  173. package/dist/Rule/Rule.esm.js +15 -5
  174. package/dist/Rule/styles.css +1 -0
  175. package/dist/ScrollToTop/ScrollToTop.cjs.js +27 -10
  176. package/dist/ScrollToTop/ScrollToTop.esm.js +24 -7
  177. package/dist/ScrollToTop/styles.css +1 -0
  178. package/dist/Section/Section.cjs.js +2 -2
  179. package/dist/Section/Section.esm.js +2 -2
  180. package/dist/Section/styles.css +1 -0
  181. package/dist/Select/Select.cjs.js +52 -1726
  182. package/dist/Select/Select.esm.js +53 -1708
  183. package/dist/Select/styles.css +1 -0
  184. package/dist/SiteFooter/SiteFooter.cjs.js +9 -33
  185. package/dist/SiteFooter/SiteFooter.esm.js +9 -33
  186. package/dist/SiteFooter/styles.css +1 -0
  187. package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +24 -0
  188. package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +16 -0
  189. package/dist/SiteHeaderV2/package.json +7 -0
  190. package/dist/SiteHeaderV2/styles.css +1 -0
  191. package/dist/SkipLink/SkipLink.cjs.js +24 -0
  192. package/dist/SkipLink/SkipLink.esm.js +16 -0
  193. package/dist/SkipLink/package.json +7 -0
  194. package/dist/SkipLink/styles.css +1 -0
  195. package/dist/Spinner/Spinner.cjs.js +12 -0
  196. package/dist/Spinner/Spinner.esm.js +4 -0
  197. package/dist/Spinner/package.json +7 -0
  198. package/dist/Spinner/styles.css +1 -0
  199. package/dist/Surface/Surface.cjs.js +2 -2
  200. package/dist/Surface/Surface.esm.js +2 -2
  201. package/dist/Surface/styles.css +1 -0
  202. package/dist/Switch/Switch.cjs.js +26 -73
  203. package/dist/Switch/Switch.esm.js +16 -63
  204. package/dist/Switch/styles.css +1 -0
  205. package/dist/Tabs/Tabs.cjs.js +9 -10
  206. package/dist/Tabs/Tabs.esm.js +9 -10
  207. package/dist/Tabs/styles.css +1 -0
  208. package/dist/Tag/Tag.cjs.js +51 -17
  209. package/dist/Tag/Tag.esm.js +50 -16
  210. package/dist/Tag/styles.css +1 -0
  211. package/dist/Text/Text.cjs.js +3 -4
  212. package/dist/Text/Text.esm.js +3 -4
  213. package/dist/Text/styles.css +1 -0
  214. package/dist/TextArea/TextArea.cjs.js +70 -45
  215. package/dist/TextArea/TextArea.esm.js +70 -45
  216. package/dist/TextArea/styles.css +1 -0
  217. package/dist/TextInput/TextInput.cjs.js +8 -9
  218. package/dist/TextInput/TextInput.esm.js +8 -9
  219. package/dist/TextInput/styles.css +1 -0
  220. package/dist/Theme/Theme.cjs.js +16 -4
  221. package/dist/Theme/Theme.esm.js +16 -4
  222. package/dist/Theme/styles.css +1 -0
  223. package/dist/ThemeIcon/ThemeIcon.cjs.js +13 -0
  224. package/dist/ThemeIcon/ThemeIcon.esm.js +5 -0
  225. package/dist/ThemeIcon/package.json +7 -0
  226. package/dist/ThemeIcon/styles.css +1 -0
  227. package/dist/Toast/Toast.cjs.js +8 -9
  228. package/dist/Toast/Toast.esm.js +8 -9
  229. package/dist/Toast/styles.css +1 -0
  230. package/dist/Truncate/Truncate.cjs.js +3 -3
  231. package/dist/Truncate/Truncate.esm.js +3 -3
  232. package/dist/Truncate/styles.css +1 -0
  233. package/dist/TypographyCard/TypographyCard.cjs.js +40 -0
  234. package/dist/TypographyCard/TypographyCard.esm.js +32 -0
  235. package/dist/TypographyCard/package.json +7 -0
  236. package/dist/TypographyCard/styles.css +1 -0
  237. package/dist/UniversalHeader/UniversalHeader.cjs.js +3 -3
  238. package/dist/UniversalHeader/UniversalHeader.esm.js +3 -3
  239. package/dist/UniversalHeader/styles.css +1 -0
  240. package/dist/VerticalSpace/VerticalSpace.cjs.js +2 -2
  241. package/dist/VerticalSpace/VerticalSpace.esm.js +2 -2
  242. package/dist/VerticalSpace/styles.css +1 -0
  243. package/dist/VideoPlayer/VideoPlayer.cjs.js +3025 -0
  244. package/dist/VideoPlayer/VideoPlayer.esm.js +3017 -0
  245. package/dist/VideoPlayer/package.json +7 -0
  246. package/dist/VideoPlayer/styles.css +1 -0
  247. package/dist/Visible/Visible.cjs.js +24 -0
  248. package/dist/Visible/Visible.esm.js +16 -0
  249. package/dist/Visible/package.json +7 -0
  250. package/dist/Visible/styles.css +1 -0
  251. package/dist/VisuallyHidden/VisuallyHidden.cjs.js +2 -1
  252. package/dist/VisuallyHidden/VisuallyHidden.esm.js +2 -1
  253. package/dist/VisuallyHidden/styles.css +1 -0
  254. package/dist/_shared/cjs/Avatar-d37e7dee.js +48 -0
  255. package/dist/_shared/cjs/Badge-e5e57c0d.js +17 -0
  256. package/dist/_shared/cjs/Banner-a28364b4.js +66 -0
  257. package/dist/_shared/cjs/Box-a8f42d4f.js +29 -0
  258. package/dist/_shared/cjs/{BrandLogo-aea340c8.js → BrandLogo-5aef900a.js} +6 -7
  259. package/dist/_shared/cjs/{Breadcrumbs-f3385e2e.js → Breadcrumbs-edf76698.js} +18 -17
  260. package/dist/_shared/cjs/BtIconArrowRight.esm-6053bb79.js +30 -0
  261. package/dist/_shared/cjs/BtIconChevronRight2Px.esm-2e4d117e.js +44 -0
  262. package/dist/_shared/cjs/BtIconChevronRightMid.esm-3e8d18a9.js +28 -0
  263. package/dist/_shared/cjs/BtIconPlayFill.esm-b8997cfc.js +30 -0
  264. package/dist/_shared/cjs/{Button-5c958ce9.js → Button-82df14c9.js} +11 -12
  265. package/dist/_shared/cjs/ButtonV2-0679b44b.js +53 -0
  266. package/dist/_shared/cjs/Calendar-d2511ee9.js +1927 -0
  267. package/dist/_shared/cjs/CardFooter-facb09e6.js +79 -0
  268. package/dist/_shared/cjs/CardHeading-a7d8d472.js +16 -0
  269. package/dist/_shared/cjs/Checkbox-d34c19c4.js +70 -0
  270. package/dist/_shared/cjs/{Columns-ae4f8cef.js → Columns-e5f9406b.js} +8 -16
  271. package/dist/_shared/cjs/Combination-06cc56d0.js +1203 -0
  272. package/dist/_shared/cjs/ConditionalWrapper-bf944594.js +14 -0
  273. package/dist/_shared/cjs/ContentSwitcher-df2381c9.js +99 -0
  274. package/dist/_shared/cjs/ContentSwitcherDropdown-91856b98.js +64 -0
  275. package/dist/_shared/cjs/DatePicker-3abcf361.js +939 -0
  276. package/dist/_shared/cjs/{DisclosureMini-145105a4.js → DisclosureMini-64a1c682.js} +10 -13
  277. package/dist/_shared/cjs/Download-45dc0d20.js +43 -0
  278. package/dist/_shared/cjs/{Filter-1bde635c.js → Filter-c93d809e.js} +32 -24
  279. package/dist/_shared/cjs/{FormControl-30f2330f.js → FormControl-09c28bbb.js} +31 -16
  280. package/dist/_shared/cjs/Grid-102905c8.js +45 -0
  281. package/dist/_shared/cjs/{Group-0429741a.js → Group-33f84a2f.js} +8 -15
  282. package/dist/_shared/cjs/{Heading-27cba320.js → Heading-b4b65724.js} +8 -8
  283. package/dist/_shared/cjs/HeroButton-db55ff2a.js +126 -0
  284. package/dist/_shared/cjs/Icon-5dd78f2b.js +47 -0
  285. package/dist/_shared/cjs/Image-bb696c61.js +55 -0
  286. package/dist/_shared/cjs/MediaCard-158890b3.js +65 -0
  287. package/dist/_shared/cjs/{Poster-499b78da.js → Poster-11d2f8af.js} +13 -14
  288. package/dist/_shared/cjs/Preview-0bf3f6e8.js +167 -0
  289. package/dist/_shared/cjs/ProgressStepper-65294193.js +97 -0
  290. package/dist/_shared/cjs/RadioGroup-4fe1c546.js +85 -0
  291. package/dist/_shared/cjs/{Section-59804166.js → Section-4415d756.js} +4 -4
  292. package/dist/_shared/cjs/{SiteFooter-0638c27c.js → SiteFooter-e741eb87.js} +13 -12
  293. package/dist/_shared/cjs/SiteHeaderV2-e0ae0718.js +654 -0
  294. package/dist/_shared/cjs/Spinner-0f578e7f.js +24 -0
  295. package/dist/_shared/cjs/Surface-ca708a8c.js +175 -0
  296. package/dist/_shared/cjs/Tabs-a587b50f.js +90 -0
  297. package/dist/_shared/cjs/{Text-606ca3a2.js → Text-1b3e4fb6.js} +7 -7
  298. package/dist/_shared/cjs/TextInput-5e533805.js +103 -0
  299. package/dist/_shared/cjs/{ThemeIcon-9534f091.js → ThemeIcon-cf6ddb34.js} +6 -7
  300. package/dist/_shared/cjs/{Toast-6d4021d7.js → Toast-e088fa5d.js} +282 -44
  301. package/dist/_shared/cjs/UniversalHeader-de415648.js +29 -0
  302. package/dist/_shared/cjs/{VerticalSpace-dc53bb70.js → VerticalSpace-a5cf4d4e.js} +8 -8
  303. package/dist/_shared/cjs/VisuallyHidden-c691ea4d.js +18 -0
  304. package/dist/_shared/cjs/_commonjsHelpers-56412ec5.js +21 -0
  305. package/dist/_shared/cjs/{index-38d3848e.js → component-aa9fcdbb.js} +154 -435
  306. package/dist/_shared/cjs/{debounce-123468fb.js → debounce-a74c28cf.js} +2 -2
  307. package/dist/_shared/cjs/floating-ui.react-dom-08b8b87c.js +1908 -0
  308. package/dist/_shared/cjs/{Tabs-ade6d6b6.js → index-1e7a1fce.js} +20 -109
  309. package/dist/_shared/cjs/index-28fbfd5b.js +2206 -0
  310. package/dist/_shared/cjs/index-2bf59363.js +44 -0
  311. package/dist/_shared/cjs/index-527f962b.js +131 -0
  312. package/dist/_shared/cjs/index-568ebc78.js +2204 -0
  313. package/dist/_shared/cjs/{index.module-7d7228b3.js → index-76f7dd53.js} +32 -34
  314. package/dist/_shared/cjs/{index-d75774a9.js → index-879e71ee.js} +8 -1
  315. package/dist/_shared/cjs/index-ba3141f5.js +72 -0
  316. package/dist/_shared/cjs/{index-23b4f49f.js → index-dbc843d3.js} +1 -1
  317. package/dist/_shared/cjs/index.es-0c2c97f4.js +355 -0
  318. package/dist/_shared/cjs/index.es-0f681622.js +13 -0
  319. package/dist/_shared/cjs/{index.es-77def0c9.js → use-media-query-d34c83b9.js} +0 -9
  320. package/dist/_shared/esm/Avatar-f9df2686.js +42 -0
  321. package/dist/_shared/esm/Badge-ec093004.js +11 -0
  322. package/dist/_shared/esm/Banner-1b709fc7.js +60 -0
  323. package/dist/_shared/esm/Box-0516cf8c.js +23 -0
  324. package/dist/_shared/esm/{BrandLogo-1af78f76.js → BrandLogo-640e58ed.js} +2 -3
  325. package/dist/_shared/esm/{Breadcrumbs-c4b65cff.js → Breadcrumbs-58ab8ba0.js} +16 -15
  326. package/dist/_shared/esm/BtIconArrowRight.esm-93da96bb.js +24 -0
  327. package/dist/_shared/esm/BtIconChevronRight2Px.esm-c939e317.js +37 -0
  328. package/dist/_shared/esm/BtIconChevronRightMid.esm-4764708f.js +22 -0
  329. package/dist/_shared/esm/BtIconPlayFill.esm-05fc0344.js +24 -0
  330. package/dist/_shared/esm/{Button-c3348ed8.js → Button-6d09ead2.js} +5 -6
  331. package/dist/_shared/esm/ButtonV2-b35cea64.js +47 -0
  332. package/dist/_shared/esm/Calendar-d56cdead.js +1918 -0
  333. package/dist/_shared/esm/CardFooter-97261b1c.js +73 -0
  334. package/dist/_shared/esm/CardHeading-4e020d2e.js +10 -0
  335. package/dist/_shared/esm/Checkbox-a687c6cd.js +64 -0
  336. package/dist/_shared/esm/{Columns-d96b7425.js → Columns-767e7860.js} +2 -10
  337. package/dist/_shared/esm/Combination-71be1a15.js +1163 -0
  338. package/dist/_shared/esm/ConditionalWrapper-b85979de.js +8 -0
  339. package/dist/_shared/esm/ContentSwitcher-bc952e2f.js +93 -0
  340. package/dist/_shared/esm/ContentSwitcherDropdown-1675387e.js +58 -0
  341. package/dist/_shared/esm/DatePicker-dd060b1c.js +910 -0
  342. package/dist/_shared/esm/{DisclosureMini-bf95a9db.js → DisclosureMini-9caa350c.js} +8 -11
  343. package/dist/_shared/esm/Download-07f5e3dd.js +37 -0
  344. package/dist/_shared/esm/{Filter-58a42358.js → Filter-284297be.js} +29 -21
  345. package/dist/_shared/esm/{FormControl-433228f5.js → FormControl-350bb1c8.js} +29 -14
  346. package/dist/_shared/esm/Grid-5d1afe1a.js +39 -0
  347. package/dist/_shared/esm/{Group-73fdb896.js → Group-64dee285.js} +3 -10
  348. package/dist/_shared/esm/{Heading-d16e0e53.js → Heading-e83f0d49.js} +5 -5
  349. package/dist/_shared/esm/HeroButton-32fec849.js +120 -0
  350. package/dist/_shared/esm/Icon-6fef56b3.js +41 -0
  351. package/dist/_shared/esm/{Image-12fbd327.js → Image-45c7760b.js} +14 -5
  352. package/dist/_shared/esm/MediaCard-38c7a943.js +59 -0
  353. package/dist/_shared/esm/{Poster-699dc89b.js → Poster-f248e28b.js} +6 -7
  354. package/dist/_shared/esm/Preview-43b2a75d.js +161 -0
  355. package/dist/_shared/esm/ProgressStepper-9bb4706f.js +91 -0
  356. package/dist/_shared/esm/RadioGroup-84c7ca35.js +78 -0
  357. package/dist/_shared/esm/{Section-73781b56.js → Section-3ab74edb.js} +1 -1
  358. package/dist/_shared/esm/{SiteFooter-d21da7ab.js → SiteFooter-7317b40e.js} +9 -8
  359. package/dist/_shared/esm/SiteHeaderV2-6d4af7e5.js +648 -0
  360. package/dist/_shared/esm/Spinner-7c6f320f.js +18 -0
  361. package/dist/_shared/esm/Surface-201aa0d6.js +165 -0
  362. package/dist/_shared/esm/Tabs-ab8e189d.js +84 -0
  363. package/dist/_shared/esm/{Text-14f586ac.js → Text-dc3f9cb5.js} +5 -5
  364. package/dist/_shared/esm/TextInput-0707edc3.js +96 -0
  365. package/dist/_shared/esm/{ThemeIcon-eab5a4d0.js → ThemeIcon-69de5351.js} +2 -3
  366. package/dist/_shared/esm/{Toast-dce2d01e.js → Toast-e3ab54f9.js} +260 -23
  367. package/dist/_shared/esm/{UniversalHeader-b4c1577c.js → UniversalHeader-15169a0d.js} +9 -14
  368. package/dist/_shared/esm/{VerticalSpace-43cd9138.js → VerticalSpace-4b6b7468.js} +5 -5
  369. package/dist/_shared/esm/VisuallyHidden-59f004f5.js +12 -0
  370. package/dist/_shared/esm/_commonjsHelpers-0109d574.js +18 -0
  371. package/dist/_shared/esm/{index-ffd720d0.js → component-4448135f.js} +144 -432
  372. package/dist/_shared/esm/{debounce-6fed6b84.js → debounce-c8e41002.js} +1 -1
  373. package/dist/_shared/esm/floating-ui.react-dom-1bb71aae.js +1878 -0
  374. package/dist/_shared/esm/index-0ae42785.js +2169 -0
  375. package/dist/_shared/esm/{index-3147c5b0.js → index-13458236.js} +9 -2
  376. package/dist/_shared/esm/{index-65264b4e.js → index-2403936c.js} +1 -1
  377. package/dist/_shared/esm/index-6bdce6c5.js +69 -0
  378. package/dist/_shared/esm/index-7868cc59.js +129 -0
  379. package/dist/_shared/esm/{index.module-50b2c98a.js → index-7f23bb37.js} +28 -30
  380. package/dist/_shared/esm/index-a41a5e50.js +41 -0
  381. package/dist/_shared/esm/{Tabs-39d24a7d.js → index-b051f161.js} +6 -94
  382. package/dist/_shared/esm/index-ce6dee84.js +2197 -0
  383. package/dist/_shared/esm/index.es-be971b8d.js +9 -0
  384. package/dist/_shared/esm/index.es-fc59ba8f.js +348 -0
  385. package/dist/_shared/esm/{index.es-00cb3bcb.js → use-media-query-d3622da8.js} +1 -8
  386. package/dist/index.es.js +18793 -37648
  387. package/dist/index.es.js.map +1 -1
  388. package/dist/index.js +18806 -37643
  389. package/dist/index.js.map +1 -1
  390. package/dist/styles.css +9 -38
  391. package/dist/types/components/Alert/Alert.d.ts +1 -1
  392. package/dist/types/components/AppButton/AppButton.d.ts +9 -0
  393. package/dist/types/components/AppButton/icons/AppStore.d.ts +2 -0
  394. package/dist/types/components/AppButton/icons/GooglePlay.d.ts +2 -0
  395. package/dist/types/components/AppButton/index.d.ts +1 -0
  396. package/dist/types/components/Avatar/Avatar.d.ts +14 -0
  397. package/dist/types/components/Avatar/components/AvatarContent/AvatarContent.d.ts +9 -0
  398. package/dist/types/components/Avatar/index.d.ts +1 -0
  399. package/dist/types/components/Avatar/types/avatar-icon-size.d.ts +1 -0
  400. package/dist/types/components/Avatar/types/avatar-image.d.ts +2 -0
  401. package/dist/types/components/Avatar/types/avatar-size.d.ts +1 -0
  402. package/dist/types/components/Avatar/types/avatar-text-size.d.ts +2 -0
  403. package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +14 -0
  404. package/dist/types/components/AvatarGroup/index.d.ts +1 -0
  405. package/dist/types/components/AvatarGroup/types/group-avatar.d.ts +2 -0
  406. package/dist/types/components/AvatarGroup/utils/get-avatars.d.ts +2 -0
  407. package/dist/types/components/Badge/Badge.d.ts +1 -9
  408. package/dist/types/components/Banner/Banner.d.ts +68 -0
  409. package/dist/types/components/Banner/index.d.ts +1 -0
  410. package/dist/types/components/BannerWithTabs/BannerWithTabs.d.ts +17 -0
  411. package/dist/types/components/BannerWithTabs/index.d.ts +1 -0
  412. package/dist/types/components/Box/Box.d.ts +4 -0
  413. package/dist/types/components/Button/Button.d.ts +1 -1
  414. package/dist/types/components/ButtonV2/ButtonV2.d.ts +79 -0
  415. package/dist/types/components/ButtonV2/index.d.ts +1 -0
  416. package/dist/types/components/Calendar/Calendar.d.ts +50 -0
  417. package/dist/types/components/Calendar/Calendar.provider.d.ts +21 -0
  418. package/dist/types/components/Calendar/components/CalendarDateSelect/CalendarDateSelect.d.ts +15 -0
  419. package/dist/types/components/Calendar/components/CalendarDateSelect/index.d.ts +1 -0
  420. package/dist/types/components/Calendar/components/CalendarDayGrid/CalendarDayGrid.d.ts +6 -0
  421. package/dist/types/components/Calendar/components/CalendarDayGrid/index.d.ts +1 -0
  422. package/dist/types/components/Calendar/components/CalendarDayNumber/CalendarDayNumber.d.ts +8 -0
  423. package/dist/types/components/Calendar/components/CalendarDayNumber/index.d.ts +1 -0
  424. package/dist/types/components/Calendar/components/CalendarDoubleMonthView/CalendarDoubleMonthView.d.ts +9 -0
  425. package/dist/types/components/Calendar/components/CalendarDoubleMonthView/index.d.ts +1 -0
  426. package/dist/types/components/Calendar/components/CalendarFooter/CalendarFooter.d.ts +6 -0
  427. package/dist/types/components/Calendar/components/CalendarFooter/index.d.ts +1 -0
  428. package/dist/types/components/Calendar/components/CalendarMonthView/CalendarMonthView.d.ts +9 -0
  429. package/dist/types/components/Calendar/components/CalendarMonthView/index.d.ts +1 -0
  430. package/dist/types/components/Calendar/components/CalendarMonthYearView/CalendarMonthYearView.d.ts +11 -0
  431. package/dist/types/components/Calendar/components/CalendarMonthYearView/index.d.ts +1 -0
  432. package/dist/types/components/Calendar/components/CalendarNavButton/CalendarNavButton.d.ts +10 -0
  433. package/dist/types/components/Calendar/components/CalendarNavButton/index.d.ts +1 -0
  434. package/dist/types/components/Calendar/components/CalendarWrapper/CalendarWrapper.d.ts +5 -0
  435. package/dist/types/components/Calendar/components/CalendarWrapper/index.d.ts +1 -0
  436. package/dist/types/components/Calendar/components/index.d.ts +6 -0
  437. package/dist/types/components/Calendar/constants/day-names.d.ts +5 -0
  438. package/dist/types/components/Calendar/constants/index.d.ts +1 -0
  439. package/dist/types/components/Calendar/helpers/contains-date.d.ts +1 -0
  440. package/dist/types/components/Calendar/helpers/contains-date.test.d.ts +1 -0
  441. package/dist/types/components/Calendar/helpers/date-without-time.d.ts +1 -0
  442. package/dist/types/components/Calendar/helpers/date-without-time.test.d.ts +1 -0
  443. package/dist/types/components/Calendar/helpers/get-calendar-type.d.ts +2 -0
  444. package/dist/types/components/Calendar/helpers/get-calendar-type.test.d.ts +1 -0
  445. package/dist/types/components/Calendar/helpers/get-dates-in-month.d.ts +1 -0
  446. package/dist/types/components/Calendar/helpers/get-dates-in-month.test.d.ts +1 -0
  447. package/dist/types/components/Calendar/helpers/get-double-month-display-range.d.ts +1 -0
  448. package/dist/types/components/Calendar/helpers/get-double-month-display-range.test.d.ts +1 -0
  449. package/dist/types/components/Calendar/helpers/get-focus-date.d.ts +5 -0
  450. package/dist/types/components/Calendar/helpers/get-focus-date.test.d.ts +1 -0
  451. package/dist/types/components/Calendar/helpers/get-highlighted-range.d.ts +6 -0
  452. package/dist/types/components/Calendar/helpers/get-highlighted-range.test.d.ts +1 -0
  453. package/dist/types/components/Calendar/helpers/get-keydown-date.d.ts +6 -0
  454. package/dist/types/components/Calendar/helpers/get-keydown-date.test.d.ts +1 -0
  455. package/dist/types/components/Calendar/helpers/index.d.ts +13 -0
  456. package/dist/types/components/Calendar/helpers/is-day.d.ts +2 -0
  457. package/dist/types/components/Calendar/helpers/is-day.test.d.ts +1 -0
  458. package/dist/types/components/Calendar/helpers/is-disabled-date.d.ts +1 -0
  459. package/dist/types/components/Calendar/helpers/is-disabled-date.test.d.ts +1 -0
  460. package/dist/types/components/Calendar/helpers/is-month-after-max-date.d.ts +1 -0
  461. package/dist/types/components/Calendar/helpers/is-month-after-max-date.test.d.ts +1 -0
  462. package/dist/types/components/Calendar/helpers/is-month-before-min-date.d.ts +1 -0
  463. package/dist/types/components/Calendar/helpers/is-month-before-min-date.test.d.ts +1 -0
  464. package/dist/types/components/Calendar/helpers/process-selected-range.d.ts +9 -0
  465. package/dist/types/components/Calendar/helpers/process-selected-range.test.d.ts +1 -0
  466. package/dist/types/components/Calendar/index.d.ts +2 -0
  467. package/dist/types/components/Calendar/state/handlers/calendar-keydown-handler.d.ts +3 -0
  468. package/dist/types/components/Calendar/state/handlers/day-grid-leave-handler.d.ts +3 -0
  469. package/dist/types/components/Calendar/state/handlers/day-number-select-handler.d.ts +3 -0
  470. package/dist/types/components/Calendar/state/handlers/default-handler.d.ts +2 -0
  471. package/dist/types/components/Calendar/state/handlers/dropdown-change-month-handler.d.ts +3 -0
  472. package/dist/types/components/Calendar/state/handlers/dropdown-change-year-handler.d.ts +3 -0
  473. package/dist/types/components/Calendar/state/handlers/highlight-range-handler.d.ts +3 -0
  474. package/dist/types/components/Calendar/state/handlers/index.d.ts +12 -0
  475. package/dist/types/components/Calendar/state/handlers/range-select-handler.d.ts +3 -0
  476. package/dist/types/components/Calendar/state/handlers/show-next-double-month-handler.d.ts +3 -0
  477. package/dist/types/components/Calendar/state/handlers/show-next-month-handler.d.ts +3 -0
  478. package/dist/types/components/Calendar/state/handlers/show-previous-double-month-handler.d.ts +3 -0
  479. package/dist/types/components/Calendar/state/handlers/show-previous-month-handler.d.ts +3 -0
  480. package/dist/types/components/Calendar/state/index.d.ts +2 -0
  481. package/dist/types/components/Calendar/state/reducer.d.ts +3 -0
  482. package/dist/types/components/Calendar/state/reducer.test.d.ts +1 -0
  483. package/dist/types/components/Calendar/state/types/actions.d.ts +81 -0
  484. package/dist/types/components/Calendar/state/types/state-handler.d.ts +3 -0
  485. package/dist/types/components/Calendar/state/types/state.d.ts +5 -0
  486. package/dist/types/components/Calendar/types/calendar-type.d.ts +1 -0
  487. package/dist/types/components/Calendar/types/date-select-value.d.ts +2 -0
  488. package/dist/types/components/Calendar/types/index.d.ts +6 -0
  489. package/dist/types/components/Calendar/types/key-names.d.ts +13 -0
  490. package/dist/types/components/Calendar/types/range-selection.d.ts +10 -0
  491. package/dist/types/components/Calendar/types/selection-type.d.ts +1 -0
  492. package/dist/types/components/Calendar/types/week-days.d.ts +18 -0
  493. package/dist/types/components/CardFooter/CardFooter.d.ts +11 -0
  494. package/dist/types/components/CardFooter/index.d.ts +1 -0
  495. package/dist/types/components/CardHeading/CardHeading.d.ts +19 -0
  496. package/dist/types/components/CardHeading/index.d.ts +1 -0
  497. package/dist/types/components/Carousel/Carousel.d.ts +34 -0
  498. package/dist/types/components/Carousel/components/DotButton.d.ts +10 -0
  499. package/dist/types/components/Carousel/constants/breakpoints.d.ts +5 -0
  500. package/dist/types/components/Carousel/helpers/get-options.d.ts +3 -0
  501. package/dist/types/components/Carousel/helpers/get-slide-width.d.ts +12 -0
  502. package/dist/types/components/Carousel/index.d.ts +1 -0
  503. package/dist/types/components/Carousel/types/breakpoints.d.ts +1 -0
  504. package/dist/types/components/Carousel/types/keynames.d.ts +5 -0
  505. package/dist/types/components/Carousel/types/responsive.d.ts +3 -0
  506. package/dist/types/components/Carousel/types/screen-sizes.d.ts +2 -0
  507. package/dist/types/components/Carousel/types/slide-config.d.ts +5 -0
  508. package/dist/types/components/Checkbox/Checkbox.d.ts +8 -5
  509. package/dist/types/components/ConditionalWrapper/ConditionalWrapper.d.ts +7 -0
  510. package/dist/types/components/ConditionalWrapper/index.d.ts +1 -0
  511. package/dist/types/components/ContentSwitcher/ContentSwitcher.d.ts +32 -0
  512. package/dist/types/components/ContentSwitcher/ContentSwitcherContent/ContentSwitcherContent.d.ts +12 -0
  513. package/dist/types/components/ContentSwitcher/ContentSwitcherContent/index.d.ts +1 -0
  514. package/dist/types/components/ContentSwitcher/ContentSwitcherList/ContentSwitcherList.d.ts +24 -0
  515. package/dist/types/components/ContentSwitcher/ContentSwitcherList/index.d.ts +1 -0
  516. package/dist/types/components/ContentSwitcher/ContentSwitcherTab/ContentSwitcherTab.d.ts +17 -0
  517. package/dist/types/components/ContentSwitcher/ContentSwitcherTab/index.d.ts +1 -0
  518. package/dist/types/components/ContentSwitcher/index.d.ts +1 -0
  519. package/dist/types/components/ContentSwitcherDropdown/ContentSwitcherDropdown.d.ts +57 -0
  520. package/dist/types/components/ContentSwitcherDropdown/index.d.ts +1 -0
  521. package/dist/types/components/DatePicker/DatePicker.d.ts +20 -0
  522. package/dist/types/components/DatePicker/constants/date-format.d.ts +1 -0
  523. package/dist/types/components/DatePicker/constants/index.d.ts +1 -0
  524. package/dist/types/components/DatePicker/helpers/convert-date-string-to-date.d.ts +1 -0
  525. package/dist/types/components/DatePicker/helpers/convert-date-string-to-date.test.d.ts +1 -0
  526. package/dist/types/components/DatePicker/helpers/convert-range-string-to-dates.d.ts +1 -0
  527. package/dist/types/components/DatePicker/helpers/convert-range-string-to-dates.test.d.ts +1 -0
  528. package/dist/types/components/DatePicker/helpers/format-date.d.ts +1 -0
  529. package/dist/types/components/DatePicker/helpers/format-date.test.d.ts +1 -0
  530. package/dist/types/components/DatePicker/helpers/index.d.ts +8 -0
  531. package/dist/types/components/DatePicker/helpers/is-date-valid.d.ts +1 -0
  532. package/dist/types/components/DatePicker/helpers/is-date-valid.test.d.ts +1 -0
  533. package/dist/types/components/DatePicker/helpers/is-disabled-date.d.ts +1 -0
  534. package/dist/types/components/DatePicker/helpers/is-disabled-date.test.d.ts +1 -0
  535. package/dist/types/components/DatePicker/helpers/is-range-valid.d.ts +1 -0
  536. package/dist/types/components/DatePicker/helpers/is-range-valid.test.d.ts +1 -0
  537. package/dist/types/components/DatePicker/helpers/parse-date-string.d.ts +5 -0
  538. package/dist/types/components/DatePicker/helpers/parse-date-string.test.d.ts +1 -0
  539. package/dist/types/components/DatePicker/helpers/parse-range-string.d.ts +14 -0
  540. package/dist/types/components/DatePicker/helpers/parse-range-string.test.d.ts +1 -0
  541. package/dist/types/components/DatePicker/index.d.ts +6 -0
  542. package/dist/types/components/Disclosure/Disclosure.d.ts +1 -2
  543. package/dist/types/components/Disclosure/index.d.ts +1 -1
  544. package/dist/types/components/DisclosureMini/DisclosureMini.d.ts +1 -2
  545. package/dist/types/components/Download/Download.d.ts +41 -0
  546. package/dist/types/components/Download/index.d.ts +1 -0
  547. package/dist/types/components/Filter/Filter.d.ts +1 -1
  548. package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +4 -0
  549. package/dist/types/components/FormControl/FormControl.d.ts +5 -1
  550. package/dist/types/components/Grid/Grid.constants.d.ts +1 -0
  551. package/dist/types/components/Grid/Grid.d.ts +28 -0
  552. package/dist/types/components/Grid/Grid.types.d.ts +10 -0
  553. package/dist/types/components/Grid/components/Col/Col.d.ts +10 -0
  554. package/dist/types/components/Grid/components/Col/index.d.ts +1 -0
  555. package/dist/types/components/Grid/components/Row/Row.d.ts +10 -0
  556. package/dist/types/components/Grid/components/Row/index.d.ts +1 -0
  557. package/dist/types/components/Grid/index.d.ts +2 -0
  558. package/dist/types/components/Heading/Heading.d.ts +4 -0
  559. package/dist/types/components/Heading/index.d.ts +1 -1
  560. package/dist/types/components/HeroBanner/HeroBanner.d.ts +5 -0
  561. package/dist/types/components/HeroBanner/index.d.ts +1 -0
  562. package/dist/types/components/HeroButton/HeroButton.d.ts +66 -0
  563. package/dist/types/components/HeroButton/index.d.ts +1 -0
  564. package/dist/types/components/Hidden/Hidden.d.ts +11 -0
  565. package/dist/types/components/Hidden/index.d.ts +1 -0
  566. package/dist/types/components/Icon/Icon.d.ts +6 -2
  567. package/dist/types/components/Image/Image.d.ts +4 -0
  568. package/dist/types/components/ImpactCard/ImpactCard.d.ts +58 -0
  569. package/dist/types/components/ImpactCard/index.d.ts +1 -0
  570. package/dist/types/components/InformationCard/InformationCard.d.ts +62 -0
  571. package/dist/types/components/InformationCard/index.d.ts +1 -0
  572. package/dist/types/components/Link/Link.d.ts +52 -0
  573. package/dist/types/components/Link/index.d.ts +1 -0
  574. package/dist/types/components/MediaCard/MediaCard.d.ts +27 -28
  575. package/dist/types/components/MediaCard/index.d.ts +1 -1
  576. package/dist/types/components/MediaCard/types/index.d.ts +2 -0
  577. package/dist/types/components/MediaCard/types/media-card-image.d.ts +4 -0
  578. package/dist/types/components/MediaCard/types/media-card-video.d.ts +4 -0
  579. package/dist/types/components/Modal/Modal.d.ts +3 -3
  580. package/dist/types/components/PageBanner/PageBanner.d.ts +5 -0
  581. package/dist/types/components/PageBanner/index.d.ts +1 -0
  582. package/dist/types/components/Pagination/Pagination.d.ts +1 -1
  583. package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +26 -10
  584. package/dist/types/components/Poster/Poster.d.ts +1 -1
  585. package/dist/types/components/ProgressBar/ProgressBar.d.ts +4 -0
  586. package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +2 -2
  587. package/dist/types/components/ProgressStepper/ProgressStepperItem/ProgressStepperItem.d.ts +3 -7
  588. package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Complete.d.ts +2 -0
  589. package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Current.d.ts +2 -0
  590. package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Error.d.ts +2 -0
  591. package/dist/types/components/ProgressStepper/ProgressStepperItem/icons/Warning.d.ts +2 -0
  592. package/dist/types/components/RadioGroup/RadioButton/RadioButton.d.ts +17 -23
  593. package/dist/types/components/RadioGroup/RadioButtonGroupInput/RadioButtonGroupInput.d.ts +36 -0
  594. package/dist/types/components/RadioGroup/RadioButtonGroupInput/index.d.ts +1 -0
  595. package/dist/types/components/RadioGroup/RadioGroup.d.ts +11 -3
  596. package/dist/types/components/RadioGroup/context.d.ts +1 -1
  597. package/dist/types/components/RadioGroup/index.d.ts +1 -0
  598. package/dist/types/components/Rule/Rule.d.ts +2 -1
  599. package/dist/types/components/Select/Select.d.ts +53 -0
  600. package/dist/types/components/SiteFooter/index.d.ts +0 -1
  601. package/dist/types/components/SiteHeaderV2/SiteHeaderV2.d.ts +82 -0
  602. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/BackButton/BackButton.d.ts +1 -0
  603. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/Column/Column.d.ts +1 -1
  604. package/dist/types/components/SiteHeaderV2/components/HorizontalPanel/HorizontalPanel.d.ts +13 -0
  605. package/dist/types/components/SiteHeaderV2/components/HorizontalPanel/index.d.ts +1 -0
  606. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/ItemGroup/ItemGroup.d.ts +1 -0
  607. package/dist/types/components/SiteHeaderV2/components/ItemGroup/index.d.ts +1 -0
  608. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/NavItem/NavItem.d.ts +5 -6
  609. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/NavItem/NavItemWithSubNav.d.ts +13 -4
  610. package/dist/types/components/SiteHeaderV2/components/NavItem/index.d.ts +2 -0
  611. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/NodeItem/NodeItem.d.ts +1 -1
  612. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/Panel/Panel.d.ts +8 -2
  613. package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/SubNavItem/SubNavItem.d.ts +5 -7
  614. package/dist/types/components/SiteHeaderV2/components/SubNavItem/index.d.ts +1 -0
  615. package/dist/types/components/SiteHeaderV2/components/VerticalDivider/VerticalDivider.d.ts +2 -0
  616. package/dist/types/components/SiteHeaderV2/components/VerticalDivider/index.d.ts +1 -0
  617. package/dist/types/components/SiteHeaderV2/index.d.ts +1 -0
  618. package/dist/types/components/SkipLink/SkipLink.d.ts +12 -0
  619. package/dist/types/components/SkipLink/SkipLinkItem/SkipLinkItem.d.ts +16 -0
  620. package/dist/types/components/SkipLink/index.d.ts +1 -0
  621. package/dist/types/components/Spinner/Spinner.d.ts +16 -0
  622. package/dist/types/components/Spinner/index.d.ts +1 -0
  623. package/dist/types/components/Surface/Surface.d.ts +7 -3
  624. package/dist/types/components/Switch/Switch.d.ts +6 -2
  625. package/dist/types/components/Tabs/Tabs.d.ts +1 -0
  626. package/dist/types/components/Tabs/TabsList/TabsList.d.ts +5 -0
  627. package/dist/types/components/Tag/Tag.d.ts +5 -1
  628. package/dist/types/components/Text/Text.d.ts +4 -0
  629. package/dist/types/components/TextArea/TextArea.d.ts +17 -0
  630. package/dist/types/components/TextInput/TextInput.d.ts +46 -6
  631. package/dist/types/components/Theme/Theme.d.ts +11 -3
  632. package/dist/types/components/Theme/index.d.ts +1 -1
  633. package/dist/types/components/ThemeIcon/icon-names.d.ts +1 -1
  634. package/dist/types/components/Toast/Toast.d.ts +1 -1
  635. package/dist/types/components/Truncate/Truncate.d.ts +1 -1
  636. package/dist/types/components/TypographyCard/TypographyCard.d.ts +58 -0
  637. package/dist/types/components/TypographyCard/index.d.ts +1 -0
  638. package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +4 -0
  639. package/dist/types/components/VideoPlayer/VideoPlayer.d.ts +27 -0
  640. package/dist/types/components/VideoPlayer/index.d.ts +1 -0
  641. package/dist/types/components/Visible/Visible.d.ts +11 -0
  642. package/dist/types/components/Visible/index.d.ts +1 -0
  643. package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  644. package/dist/types/components/index.d.ts +24 -5
  645. package/dist/types/helpers/get-theme-img.d.ts +6 -0
  646. package/dist/types/helpers/index.d.ts +1 -2
  647. package/dist/types/hooks/index.d.ts +2 -4
  648. package/dist/types/hooks/private/index.d.ts +5 -0
  649. package/dist/types/hooks/private/use-aria-describedby/index.d.ts +1 -0
  650. package/dist/types/hooks/private/use-interaction-mode/index.d.ts +1 -0
  651. package/dist/types/hooks/private/use-numeric-input/index.d.ts +1 -0
  652. package/dist/types/hooks/{use-numeric-input.d.ts → private/use-numeric-input/use-numeric-input.d.ts} +3 -3
  653. package/dist/types/hooks/private/use-pagination/index.d.ts +1 -0
  654. package/dist/types/hooks/private/use-theme-element/index.d.ts +1 -0
  655. package/dist/types/hooks/public/index.d.ts +1 -0
  656. package/dist/types/hooks/public/use-media-query/index.d.ts +1 -0
  657. package/dist/types/hooks/{use-media-query.d.ts → public/use-media-query/use-media-query.d.ts} +1 -1
  658. package/dist/types/index.d.ts +1 -0
  659. package/dist/types/styles.d.ts +29 -6
  660. package/dist/types/types/auto-complete-types.d.ts +1 -0
  661. package/dist/use-media-query/package.json +7 -0
  662. package/dist/use-media-query/use-media-query.cjs.js +10 -0
  663. package/dist/use-media-query/use-media-query.esm.js +2 -0
  664. package/package.json +64 -40
  665. package/dist/Base/Base.cjs.js +0 -11
  666. package/dist/Base/Base.esm.js +0 -3
  667. package/dist/Base/package.json +0 -7
  668. package/dist/Card/Card.cjs.js +0 -18
  669. package/dist/Card/Card.esm.js +0 -10
  670. package/dist/Card/package.json +0 -7
  671. package/dist/Clock/Clock.cjs.js +0 -43
  672. package/dist/Clock/Clock.esm.js +0 -34
  673. package/dist/Clock/package.json +0 -7
  674. package/dist/SiteHeader/SiteHeader.cjs.js +0 -22
  675. package/dist/SiteHeader/SiteHeader.esm.js +0 -13
  676. package/dist/SiteHeader/package.json +0 -7
  677. package/dist/_shared/cjs/Base-f5a86eed.js +0 -22
  678. package/dist/_shared/cjs/Card-eb1c20c1.js +0 -121
  679. package/dist/_shared/cjs/Checkbox-5f14bb0d.js +0 -61
  680. package/dist/_shared/cjs/Icon-a47b6c0a.js +0 -33
  681. package/dist/_shared/cjs/Image-e873b8fc.js +0 -46
  682. package/dist/_shared/cjs/ProgressStepper-74ee1eec.js +0 -88
  683. package/dist/_shared/cjs/RadioGroup-9bc96f6a.js +0 -69
  684. package/dist/_shared/cjs/SiteHeader.rehydrator-42c4a0e0.js +0 -670
  685. package/dist/_shared/cjs/Surface-038db6e1.js +0 -57
  686. package/dist/_shared/cjs/TextInput-a5f72f6f.js +0 -81
  687. package/dist/_shared/cjs/UniversalHeader-5e43d320.js +0 -34
  688. package/dist/_shared/cjs/VisuallyHidden-e2c8b291.js +0 -17
  689. package/dist/_shared/cjs/extends-8c5e4b48.js +0 -18
  690. package/dist/_shared/cjs/filter-data-attrs-1c9a530c.js +0 -227
  691. package/dist/_shared/cjs/index-4aa11039.js +0 -490
  692. package/dist/_shared/cjs/index-4dd46cbe.js +0 -289
  693. package/dist/_shared/cjs/suffix-modifier-64dcd338.js +0 -19
  694. package/dist/_shared/esm/Base-f200653c.js +0 -15
  695. package/dist/_shared/esm/Card-45e8e10a.js +0 -115
  696. package/dist/_shared/esm/Checkbox-2a623386.js +0 -55
  697. package/dist/_shared/esm/Icon-9ecaaeab.js +0 -27
  698. package/dist/_shared/esm/ProgressStepper-5de34269.js +0 -82
  699. package/dist/_shared/esm/RadioGroup-002a32ba.js +0 -63
  700. package/dist/_shared/esm/SiteHeader.rehydrator-97900e11.js +0 -663
  701. package/dist/_shared/esm/Surface-0ca6817d.js +0 -48
  702. package/dist/_shared/esm/TextInput-28f18769.js +0 -75
  703. package/dist/_shared/esm/VisuallyHidden-b9eebf71.js +0 -11
  704. package/dist/_shared/esm/extends-8cc61aad.js +0 -16
  705. package/dist/_shared/esm/filter-data-attrs-ea8f4ed4.js +0 -220
  706. package/dist/_shared/esm/index-4f8d3888.js +0 -280
  707. package/dist/_shared/esm/index-87a828b8.js +0 -479
  708. package/dist/_shared/esm/suffix-modifier-3d548e45.js +0 -17
  709. package/dist/types/components/Base/Base.d.ts +0 -16
  710. package/dist/types/components/Base/index.d.ts +0 -1
  711. package/dist/types/components/Card/Card.d.ts +0 -128
  712. package/dist/types/components/Card/index.d.ts +0 -1
  713. package/dist/types/components/Clock/Clock.d.ts +0 -12
  714. package/dist/types/components/Clock/Clock.rehydrator.d.ts +0 -2
  715. package/dist/types/components/Clock/index.d.ts +0 -2
  716. package/dist/types/components/MediaCard/MediaCard.stories-wip.d.ts +0 -15
  717. package/dist/types/components/SiteFooter/SiteFooter.rehydrator.d.ts +0 -2
  718. package/dist/types/components/SiteHeader/SiteHeader.d.ts +0 -75
  719. package/dist/types/components/SiteHeader/SiteHeader.rehydrator.d.ts +0 -8
  720. package/dist/types/components/SiteHeader/components/ItemGroup/ItemGroup.rehydrator.d.ts +0 -2
  721. package/dist/types/components/SiteHeader/components/ItemGroup/index.d.ts +0 -2
  722. package/dist/types/components/SiteHeader/components/NavItem/NavItem.rehydrator.d.ts +0 -2
  723. package/dist/types/components/SiteHeader/components/NavItem/NavItemWithSubNav.rehydrator.d.ts +0 -2
  724. package/dist/types/components/SiteHeader/components/NavItem/index.d.ts +0 -4
  725. package/dist/types/components/SiteHeader/components/SubNavItem/SubNavItem.rehydrator.d.ts +0 -2
  726. package/dist/types/components/SiteHeader/components/SubNavItem/index.d.ts +0 -2
  727. package/dist/types/components/SiteHeader/index.d.ts +0 -2
  728. package/dist/types/helpers/filter-data-attrs.d.ts +0 -1
  729. package/dist/types/helpers/suffix-modifier.d.ts +0 -9
  730. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/BackButton/index.d.ts +0 -0
  731. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/Column/index.d.ts +0 -0
  732. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/Item/Item.d.ts +0 -0
  733. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/Item/index.d.ts +0 -0
  734. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/MenuButton/MenuButton.d.ts +0 -0
  735. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/MenuButton/index.d.ts +0 -0
  736. /package/dist/types/components/{SiteHeader → SiteHeaderV2}/components/Panel/index.d.ts +0 -0
  737. /package/dist/types/hooks/{use-aria-describedby.d.ts → private/use-aria-describedby/use-aria-describedby.d.ts} +0 -0
  738. /package/dist/types/hooks/{use-interaction-mode.d.ts → private/use-interaction-mode/use-interaction-mode.d.ts} +0 -0
  739. /package/dist/types/hooks/{use-pagination.d.ts → private/use-pagination/use-pagination.d.ts} +0 -0
@@ -0,0 +1,2206 @@
1
+ 'use strict';
2
+
3
+ function toInteger(dirtyNumber) {
4
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
5
+ return NaN;
6
+ }
7
+ var number = Number(dirtyNumber);
8
+ if (isNaN(number)) {
9
+ return number;
10
+ }
11
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
12
+ }
13
+
14
+ function _typeof(o) {
15
+ "@babel/helpers - typeof";
16
+
17
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
18
+ return typeof o;
19
+ } : function (o) {
20
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
21
+ }, _typeof(o);
22
+ }
23
+
24
+ function requiredArgs(required, args) {
25
+ if (args.length < required) {
26
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
27
+ }
28
+ }
29
+
30
+ /**
31
+ * @name toDate
32
+ * @category Common Helpers
33
+ * @summary Convert the given argument to an instance of Date.
34
+ *
35
+ * @description
36
+ * Convert the given argument to an instance of Date.
37
+ *
38
+ * If the argument is an instance of Date, the function returns its clone.
39
+ *
40
+ * If the argument is a number, it is treated as a timestamp.
41
+ *
42
+ * If the argument is none of the above, the function returns Invalid Date.
43
+ *
44
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
45
+ *
46
+ * @param {Date|Number} argument - the value to convert
47
+ * @returns {Date} the parsed date in the local time zone
48
+ * @throws {TypeError} 1 argument required
49
+ *
50
+ * @example
51
+ * // Clone the date:
52
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
53
+ * //=> Tue Feb 11 2014 11:30:30
54
+ *
55
+ * @example
56
+ * // Convert the timestamp to date:
57
+ * const result = toDate(1392098430000)
58
+ * //=> Tue Feb 11 2014 11:30:30
59
+ */
60
+ function toDate(argument) {
61
+ requiredArgs(1, arguments);
62
+ var argStr = Object.prototype.toString.call(argument);
63
+
64
+ // Clone the date
65
+ if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
66
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
67
+ return new Date(argument.getTime());
68
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
69
+ return new Date(argument);
70
+ } else {
71
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
72
+ // eslint-disable-next-line no-console
73
+ 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");
74
+ // eslint-disable-next-line no-console
75
+ console.warn(new Error().stack);
76
+ }
77
+ return new Date(NaN);
78
+ }
79
+ }
80
+
81
+ var defaultOptions = {};
82
+ function getDefaultOptions() {
83
+ return defaultOptions;
84
+ }
85
+
86
+ /**
87
+ * @name isDate
88
+ * @category Common Helpers
89
+ * @summary Is the given value a date?
90
+ *
91
+ * @description
92
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
93
+ *
94
+ * @param {*} value - the value to check
95
+ * @returns {boolean} true if the given value is a date
96
+ * @throws {TypeError} 1 arguments required
97
+ *
98
+ * @example
99
+ * // For a valid date:
100
+ * const result = isDate(new Date())
101
+ * //=> true
102
+ *
103
+ * @example
104
+ * // For an invalid date:
105
+ * const result = isDate(new Date(NaN))
106
+ * //=> true
107
+ *
108
+ * @example
109
+ * // For some value:
110
+ * const result = isDate('2014-02-31')
111
+ * //=> false
112
+ *
113
+ * @example
114
+ * // For an object:
115
+ * const result = isDate({})
116
+ * //=> false
117
+ */
118
+ function isDate(value) {
119
+ requiredArgs(1, arguments);
120
+ return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
121
+ }
122
+
123
+ /**
124
+ * @name isValid
125
+ * @category Common Helpers
126
+ * @summary Is the given date valid?
127
+ *
128
+ * @description
129
+ * Returns false if argument is Invalid Date and true otherwise.
130
+ * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
131
+ * Invalid Date is a Date, whose time value is NaN.
132
+ *
133
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
134
+ *
135
+ * @param {*} date - the date to check
136
+ * @returns {Boolean} the date is valid
137
+ * @throws {TypeError} 1 argument required
138
+ *
139
+ * @example
140
+ * // For the valid date:
141
+ * const result = isValid(new Date(2014, 1, 31))
142
+ * //=> true
143
+ *
144
+ * @example
145
+ * // For the value, convertable into a date:
146
+ * const result = isValid(1393804800000)
147
+ * //=> true
148
+ *
149
+ * @example
150
+ * // For the invalid date:
151
+ * const result = isValid(new Date(''))
152
+ * //=> false
153
+ */
154
+ function isValid(dirtyDate) {
155
+ requiredArgs(1, arguments);
156
+ if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
157
+ return false;
158
+ }
159
+ var date = toDate(dirtyDate);
160
+ return !isNaN(Number(date));
161
+ }
162
+
163
+ /**
164
+ * @name addMilliseconds
165
+ * @category Millisecond Helpers
166
+ * @summary Add the specified number of milliseconds to the given date.
167
+ *
168
+ * @description
169
+ * Add the specified number of milliseconds to the given date.
170
+ *
171
+ * @param {Date|Number} date - the date to be changed
172
+ * @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`.
173
+ * @returns {Date} the new date with the milliseconds added
174
+ * @throws {TypeError} 2 arguments required
175
+ *
176
+ * @example
177
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
178
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
179
+ * //=> Thu Jul 10 2014 12:45:30.750
180
+ */
181
+ function addMilliseconds(dirtyDate, dirtyAmount) {
182
+ requiredArgs(2, arguments);
183
+ var timestamp = toDate(dirtyDate).getTime();
184
+ var amount = toInteger(dirtyAmount);
185
+ return new Date(timestamp + amount);
186
+ }
187
+
188
+ /**
189
+ * @name subMilliseconds
190
+ * @category Millisecond Helpers
191
+ * @summary Subtract the specified number of milliseconds from the given date.
192
+ *
193
+ * @description
194
+ * Subtract the specified number of milliseconds from the given date.
195
+ *
196
+ * @param {Date|Number} date - the date to be changed
197
+ * @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`.
198
+ * @returns {Date} the new date with the milliseconds subtracted
199
+ * @throws {TypeError} 2 arguments required
200
+ *
201
+ * @example
202
+ * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
203
+ * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
204
+ * //=> Thu Jul 10 2014 12:45:29.250
205
+ */
206
+ function subMilliseconds(dirtyDate, dirtyAmount) {
207
+ requiredArgs(2, arguments);
208
+ var amount = toInteger(dirtyAmount);
209
+ return addMilliseconds(dirtyDate, -amount);
210
+ }
211
+
212
+ var MILLISECONDS_IN_DAY = 86400000;
213
+ function getUTCDayOfYear(dirtyDate) {
214
+ requiredArgs(1, arguments);
215
+ var date = toDate(dirtyDate);
216
+ var timestamp = date.getTime();
217
+ date.setUTCMonth(0, 1);
218
+ date.setUTCHours(0, 0, 0, 0);
219
+ var startOfYearTimestamp = date.getTime();
220
+ var difference = timestamp - startOfYearTimestamp;
221
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
222
+ }
223
+
224
+ function startOfUTCISOWeek(dirtyDate) {
225
+ requiredArgs(1, arguments);
226
+ var weekStartsOn = 1;
227
+ var date = toDate(dirtyDate);
228
+ var day = date.getUTCDay();
229
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
230
+ date.setUTCDate(date.getUTCDate() - diff);
231
+ date.setUTCHours(0, 0, 0, 0);
232
+ return date;
233
+ }
234
+
235
+ function getUTCISOWeekYear(dirtyDate) {
236
+ requiredArgs(1, arguments);
237
+ var date = toDate(dirtyDate);
238
+ var year = date.getUTCFullYear();
239
+ var fourthOfJanuaryOfNextYear = new Date(0);
240
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
241
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
242
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
243
+ var fourthOfJanuaryOfThisYear = new Date(0);
244
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
245
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
246
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
247
+ if (date.getTime() >= startOfNextYear.getTime()) {
248
+ return year + 1;
249
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
250
+ return year;
251
+ } else {
252
+ return year - 1;
253
+ }
254
+ }
255
+
256
+ function startOfUTCISOWeekYear(dirtyDate) {
257
+ requiredArgs(1, arguments);
258
+ var year = getUTCISOWeekYear(dirtyDate);
259
+ var fourthOfJanuary = new Date(0);
260
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
261
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
262
+ var date = startOfUTCISOWeek(fourthOfJanuary);
263
+ return date;
264
+ }
265
+
266
+ var MILLISECONDS_IN_WEEK$1 = 604800000;
267
+ function getUTCISOWeek(dirtyDate) {
268
+ requiredArgs(1, arguments);
269
+ var date = toDate(dirtyDate);
270
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
271
+
272
+ // Round the number of days to the nearest integer
273
+ // because the number of milliseconds in a week is not constant
274
+ // (e.g. it's different in the week of the daylight saving time clock shift)
275
+ return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
276
+ }
277
+
278
+ function startOfUTCWeek(dirtyDate, options) {
279
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
280
+ requiredArgs(1, arguments);
281
+ var defaultOptions = getDefaultOptions();
282
+ 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);
283
+
284
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
285
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
286
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
287
+ }
288
+ var date = toDate(dirtyDate);
289
+ var day = date.getUTCDay();
290
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
291
+ date.setUTCDate(date.getUTCDate() - diff);
292
+ date.setUTCHours(0, 0, 0, 0);
293
+ return date;
294
+ }
295
+
296
+ function getUTCWeekYear(dirtyDate, options) {
297
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
298
+ requiredArgs(1, arguments);
299
+ var date = toDate(dirtyDate);
300
+ var year = date.getUTCFullYear();
301
+ var defaultOptions = getDefaultOptions();
302
+ 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);
303
+
304
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
305
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
306
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
307
+ }
308
+ var firstWeekOfNextYear = new Date(0);
309
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
310
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
311
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
312
+ var firstWeekOfThisYear = new Date(0);
313
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
314
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
315
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
316
+ if (date.getTime() >= startOfNextYear.getTime()) {
317
+ return year + 1;
318
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
319
+ return year;
320
+ } else {
321
+ return year - 1;
322
+ }
323
+ }
324
+
325
+ function startOfUTCWeekYear(dirtyDate, options) {
326
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
327
+ requiredArgs(1, arguments);
328
+ var defaultOptions = getDefaultOptions();
329
+ 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);
330
+ var year = getUTCWeekYear(dirtyDate, options);
331
+ var firstWeek = new Date(0);
332
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
333
+ firstWeek.setUTCHours(0, 0, 0, 0);
334
+ var date = startOfUTCWeek(firstWeek, options);
335
+ return date;
336
+ }
337
+
338
+ var MILLISECONDS_IN_WEEK = 604800000;
339
+ function getUTCWeek(dirtyDate, options) {
340
+ requiredArgs(1, arguments);
341
+ var date = toDate(dirtyDate);
342
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
343
+
344
+ // Round the number of days to the nearest integer
345
+ // because the number of milliseconds in a week is not constant
346
+ // (e.g. it's different in the week of the daylight saving time clock shift)
347
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
348
+ }
349
+
350
+ function addLeadingZeros(number, targetLength) {
351
+ var sign = number < 0 ? '-' : '';
352
+ var output = Math.abs(number).toString();
353
+ while (output.length < targetLength) {
354
+ output = '0' + output;
355
+ }
356
+ return sign + output;
357
+ }
358
+
359
+ /*
360
+ * | | Unit | | Unit |
361
+ * |-----|--------------------------------|-----|--------------------------------|
362
+ * | a | AM, PM | A* | |
363
+ * | d | Day of month | D | |
364
+ * | h | Hour [1-12] | H | Hour [0-23] |
365
+ * | m | Minute | M | Month |
366
+ * | s | Second | S | Fraction of second |
367
+ * | y | Year (abs) | Y | |
368
+ *
369
+ * Letters marked by * are not implemented but reserved by Unicode standard.
370
+ */
371
+ var formatters$2 = {
372
+ // Year
373
+ y: function y(date, token) {
374
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
375
+ // | Year | y | yy | yyy | yyyy | yyyyy |
376
+ // |----------|-------|----|-------|-------|-------|
377
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
378
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
379
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
380
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
381
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
382
+
383
+ var signedYear = date.getUTCFullYear();
384
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
385
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
386
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
387
+ },
388
+ // Month
389
+ M: function M(date, token) {
390
+ var month = date.getUTCMonth();
391
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
392
+ },
393
+ // Day of the month
394
+ d: function d(date, token) {
395
+ return addLeadingZeros(date.getUTCDate(), token.length);
396
+ },
397
+ // AM or PM
398
+ a: function a(date, token) {
399
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
400
+ switch (token) {
401
+ case 'a':
402
+ case 'aa':
403
+ return dayPeriodEnumValue.toUpperCase();
404
+ case 'aaa':
405
+ return dayPeriodEnumValue;
406
+ case 'aaaaa':
407
+ return dayPeriodEnumValue[0];
408
+ case 'aaaa':
409
+ default:
410
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
411
+ }
412
+ },
413
+ // Hour [1-12]
414
+ h: function h(date, token) {
415
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
416
+ },
417
+ // Hour [0-23]
418
+ H: function H(date, token) {
419
+ return addLeadingZeros(date.getUTCHours(), token.length);
420
+ },
421
+ // Minute
422
+ m: function m(date, token) {
423
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
424
+ },
425
+ // Second
426
+ s: function s(date, token) {
427
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
428
+ },
429
+ // Fraction of second
430
+ S: function S(date, token) {
431
+ var numberOfDigits = token.length;
432
+ var milliseconds = date.getUTCMilliseconds();
433
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
434
+ return addLeadingZeros(fractionalSeconds, token.length);
435
+ }
436
+ };
437
+ var formatters$3 = formatters$2;
438
+
439
+ var dayPeriodEnum = {
440
+ am: 'am',
441
+ pm: 'pm',
442
+ midnight: 'midnight',
443
+ noon: 'noon',
444
+ morning: 'morning',
445
+ afternoon: 'afternoon',
446
+ evening: 'evening',
447
+ night: 'night'
448
+ };
449
+ /*
450
+ * | | Unit | | Unit |
451
+ * |-----|--------------------------------|-----|--------------------------------|
452
+ * | a | AM, PM | A* | Milliseconds in day |
453
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
454
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
455
+ * | d | Day of month | D | Day of year |
456
+ * | e | Local day of week | E | Day of week |
457
+ * | f | | F* | Day of week in month |
458
+ * | g* | Modified Julian day | G | Era |
459
+ * | h | Hour [1-12] | H | Hour [0-23] |
460
+ * | i! | ISO day of week | I! | ISO week of year |
461
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
462
+ * | k | Hour [1-24] | K | Hour [0-11] |
463
+ * | l* | (deprecated) | L | Stand-alone month |
464
+ * | m | Minute | M | Month |
465
+ * | n | | N | |
466
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
467
+ * | p! | Long localized time | P! | Long localized date |
468
+ * | q | Stand-alone quarter | Q | Quarter |
469
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
470
+ * | s | Second | S | Fraction of second |
471
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
472
+ * | u | Extended year | U* | Cyclic year |
473
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
474
+ * | w | Local week of year | W* | Week of month |
475
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
476
+ * | y | Year (abs) | Y | Local week-numbering year |
477
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
478
+ *
479
+ * Letters marked by * are not implemented but reserved by Unicode standard.
480
+ *
481
+ * Letters marked by ! are non-standard, but implemented by date-fns:
482
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
483
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
484
+ * i.e. 7 for Sunday, 1 for Monday, etc.
485
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
486
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
487
+ * `R` is supposed to be used in conjunction with `I` and `i`
488
+ * for universal ISO week-numbering date, whereas
489
+ * `Y` is supposed to be used in conjunction with `w` and `e`
490
+ * for week-numbering date specific to the locale.
491
+ * - `P` is long localized date format
492
+ * - `p` is long localized time format
493
+ */
494
+
495
+ var formatters = {
496
+ // Era
497
+ G: function G(date, token, localize) {
498
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
499
+ switch (token) {
500
+ // AD, BC
501
+ case 'G':
502
+ case 'GG':
503
+ case 'GGG':
504
+ return localize.era(era, {
505
+ width: 'abbreviated'
506
+ });
507
+ // A, B
508
+ case 'GGGGG':
509
+ return localize.era(era, {
510
+ width: 'narrow'
511
+ });
512
+ // Anno Domini, Before Christ
513
+ case 'GGGG':
514
+ default:
515
+ return localize.era(era, {
516
+ width: 'wide'
517
+ });
518
+ }
519
+ },
520
+ // Year
521
+ y: function y(date, token, localize) {
522
+ // Ordinal number
523
+ if (token === 'yo') {
524
+ var signedYear = date.getUTCFullYear();
525
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
526
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
527
+ return localize.ordinalNumber(year, {
528
+ unit: 'year'
529
+ });
530
+ }
531
+ return formatters$3.y(date, token);
532
+ },
533
+ // Local week-numbering year
534
+ Y: function Y(date, token, localize, options) {
535
+ var signedWeekYear = getUTCWeekYear(date, options);
536
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
537
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
538
+
539
+ // Two digit year
540
+ if (token === 'YY') {
541
+ var twoDigitYear = weekYear % 100;
542
+ return addLeadingZeros(twoDigitYear, 2);
543
+ }
544
+
545
+ // Ordinal number
546
+ if (token === 'Yo') {
547
+ return localize.ordinalNumber(weekYear, {
548
+ unit: 'year'
549
+ });
550
+ }
551
+
552
+ // Padding
553
+ return addLeadingZeros(weekYear, token.length);
554
+ },
555
+ // ISO week-numbering year
556
+ R: function R(date, token) {
557
+ var isoWeekYear = getUTCISOWeekYear(date);
558
+
559
+ // Padding
560
+ return addLeadingZeros(isoWeekYear, token.length);
561
+ },
562
+ // Extended year. This is a single number designating the year of this calendar system.
563
+ // The main difference between `y` and `u` localizers are B.C. years:
564
+ // | Year | `y` | `u` |
565
+ // |------|-----|-----|
566
+ // | AC 1 | 1 | 1 |
567
+ // | BC 1 | 1 | 0 |
568
+ // | BC 2 | 2 | -1 |
569
+ // Also `yy` always returns the last two digits of a year,
570
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
571
+ u: function u(date, token) {
572
+ var year = date.getUTCFullYear();
573
+ return addLeadingZeros(year, token.length);
574
+ },
575
+ // Quarter
576
+ Q: function Q(date, token, localize) {
577
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
578
+ switch (token) {
579
+ // 1, 2, 3, 4
580
+ case 'Q':
581
+ return String(quarter);
582
+ // 01, 02, 03, 04
583
+ case 'QQ':
584
+ return addLeadingZeros(quarter, 2);
585
+ // 1st, 2nd, 3rd, 4th
586
+ case 'Qo':
587
+ return localize.ordinalNumber(quarter, {
588
+ unit: 'quarter'
589
+ });
590
+ // Q1, Q2, Q3, Q4
591
+ case 'QQQ':
592
+ return localize.quarter(quarter, {
593
+ width: 'abbreviated',
594
+ context: 'formatting'
595
+ });
596
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
597
+ case 'QQQQQ':
598
+ return localize.quarter(quarter, {
599
+ width: 'narrow',
600
+ context: 'formatting'
601
+ });
602
+ // 1st quarter, 2nd quarter, ...
603
+ case 'QQQQ':
604
+ default:
605
+ return localize.quarter(quarter, {
606
+ width: 'wide',
607
+ context: 'formatting'
608
+ });
609
+ }
610
+ },
611
+ // Stand-alone quarter
612
+ q: function q(date, token, localize) {
613
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
614
+ switch (token) {
615
+ // 1, 2, 3, 4
616
+ case 'q':
617
+ return String(quarter);
618
+ // 01, 02, 03, 04
619
+ case 'qq':
620
+ return addLeadingZeros(quarter, 2);
621
+ // 1st, 2nd, 3rd, 4th
622
+ case 'qo':
623
+ return localize.ordinalNumber(quarter, {
624
+ unit: 'quarter'
625
+ });
626
+ // Q1, Q2, Q3, Q4
627
+ case 'qqq':
628
+ return localize.quarter(quarter, {
629
+ width: 'abbreviated',
630
+ context: 'standalone'
631
+ });
632
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
633
+ case 'qqqqq':
634
+ return localize.quarter(quarter, {
635
+ width: 'narrow',
636
+ context: 'standalone'
637
+ });
638
+ // 1st quarter, 2nd quarter, ...
639
+ case 'qqqq':
640
+ default:
641
+ return localize.quarter(quarter, {
642
+ width: 'wide',
643
+ context: 'standalone'
644
+ });
645
+ }
646
+ },
647
+ // Month
648
+ M: function M(date, token, localize) {
649
+ var month = date.getUTCMonth();
650
+ switch (token) {
651
+ case 'M':
652
+ case 'MM':
653
+ return formatters$3.M(date, token);
654
+ // 1st, 2nd, ..., 12th
655
+ case 'Mo':
656
+ return localize.ordinalNumber(month + 1, {
657
+ unit: 'month'
658
+ });
659
+ // Jan, Feb, ..., Dec
660
+ case 'MMM':
661
+ return localize.month(month, {
662
+ width: 'abbreviated',
663
+ context: 'formatting'
664
+ });
665
+ // J, F, ..., D
666
+ case 'MMMMM':
667
+ return localize.month(month, {
668
+ width: 'narrow',
669
+ context: 'formatting'
670
+ });
671
+ // January, February, ..., December
672
+ case 'MMMM':
673
+ default:
674
+ return localize.month(month, {
675
+ width: 'wide',
676
+ context: 'formatting'
677
+ });
678
+ }
679
+ },
680
+ // Stand-alone month
681
+ L: function L(date, token, localize) {
682
+ var month = date.getUTCMonth();
683
+ switch (token) {
684
+ // 1, 2, ..., 12
685
+ case 'L':
686
+ return String(month + 1);
687
+ // 01, 02, ..., 12
688
+ case 'LL':
689
+ return addLeadingZeros(month + 1, 2);
690
+ // 1st, 2nd, ..., 12th
691
+ case 'Lo':
692
+ return localize.ordinalNumber(month + 1, {
693
+ unit: 'month'
694
+ });
695
+ // Jan, Feb, ..., Dec
696
+ case 'LLL':
697
+ return localize.month(month, {
698
+ width: 'abbreviated',
699
+ context: 'standalone'
700
+ });
701
+ // J, F, ..., D
702
+ case 'LLLLL':
703
+ return localize.month(month, {
704
+ width: 'narrow',
705
+ context: 'standalone'
706
+ });
707
+ // January, February, ..., December
708
+ case 'LLLL':
709
+ default:
710
+ return localize.month(month, {
711
+ width: 'wide',
712
+ context: 'standalone'
713
+ });
714
+ }
715
+ },
716
+ // Local week of year
717
+ w: function w(date, token, localize, options) {
718
+ var week = getUTCWeek(date, options);
719
+ if (token === 'wo') {
720
+ return localize.ordinalNumber(week, {
721
+ unit: 'week'
722
+ });
723
+ }
724
+ return addLeadingZeros(week, token.length);
725
+ },
726
+ // ISO week of year
727
+ I: function I(date, token, localize) {
728
+ var isoWeek = getUTCISOWeek(date);
729
+ if (token === 'Io') {
730
+ return localize.ordinalNumber(isoWeek, {
731
+ unit: 'week'
732
+ });
733
+ }
734
+ return addLeadingZeros(isoWeek, token.length);
735
+ },
736
+ // Day of the month
737
+ d: function d(date, token, localize) {
738
+ if (token === 'do') {
739
+ return localize.ordinalNumber(date.getUTCDate(), {
740
+ unit: 'date'
741
+ });
742
+ }
743
+ return formatters$3.d(date, token);
744
+ },
745
+ // Day of year
746
+ D: function D(date, token, localize) {
747
+ var dayOfYear = getUTCDayOfYear(date);
748
+ if (token === 'Do') {
749
+ return localize.ordinalNumber(dayOfYear, {
750
+ unit: 'dayOfYear'
751
+ });
752
+ }
753
+ return addLeadingZeros(dayOfYear, token.length);
754
+ },
755
+ // Day of week
756
+ E: function E(date, token, localize) {
757
+ var dayOfWeek = date.getUTCDay();
758
+ switch (token) {
759
+ // Tue
760
+ case 'E':
761
+ case 'EE':
762
+ case 'EEE':
763
+ return localize.day(dayOfWeek, {
764
+ width: 'abbreviated',
765
+ context: 'formatting'
766
+ });
767
+ // T
768
+ case 'EEEEE':
769
+ return localize.day(dayOfWeek, {
770
+ width: 'narrow',
771
+ context: 'formatting'
772
+ });
773
+ // Tu
774
+ case 'EEEEEE':
775
+ return localize.day(dayOfWeek, {
776
+ width: 'short',
777
+ context: 'formatting'
778
+ });
779
+ // Tuesday
780
+ case 'EEEE':
781
+ default:
782
+ return localize.day(dayOfWeek, {
783
+ width: 'wide',
784
+ context: 'formatting'
785
+ });
786
+ }
787
+ },
788
+ // Local day of week
789
+ e: function e(date, token, localize, options) {
790
+ var dayOfWeek = date.getUTCDay();
791
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
792
+ switch (token) {
793
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
794
+ case 'e':
795
+ return String(localDayOfWeek);
796
+ // Padded numerical value
797
+ case 'ee':
798
+ return addLeadingZeros(localDayOfWeek, 2);
799
+ // 1st, 2nd, ..., 7th
800
+ case 'eo':
801
+ return localize.ordinalNumber(localDayOfWeek, {
802
+ unit: 'day'
803
+ });
804
+ case 'eee':
805
+ return localize.day(dayOfWeek, {
806
+ width: 'abbreviated',
807
+ context: 'formatting'
808
+ });
809
+ // T
810
+ case 'eeeee':
811
+ return localize.day(dayOfWeek, {
812
+ width: 'narrow',
813
+ context: 'formatting'
814
+ });
815
+ // Tu
816
+ case 'eeeeee':
817
+ return localize.day(dayOfWeek, {
818
+ width: 'short',
819
+ context: 'formatting'
820
+ });
821
+ // Tuesday
822
+ case 'eeee':
823
+ default:
824
+ return localize.day(dayOfWeek, {
825
+ width: 'wide',
826
+ context: 'formatting'
827
+ });
828
+ }
829
+ },
830
+ // Stand-alone local day of week
831
+ c: function c(date, token, localize, options) {
832
+ var dayOfWeek = date.getUTCDay();
833
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
834
+ switch (token) {
835
+ // Numerical value (same as in `e`)
836
+ case 'c':
837
+ return String(localDayOfWeek);
838
+ // Padded numerical value
839
+ case 'cc':
840
+ return addLeadingZeros(localDayOfWeek, token.length);
841
+ // 1st, 2nd, ..., 7th
842
+ case 'co':
843
+ return localize.ordinalNumber(localDayOfWeek, {
844
+ unit: 'day'
845
+ });
846
+ case 'ccc':
847
+ return localize.day(dayOfWeek, {
848
+ width: 'abbreviated',
849
+ context: 'standalone'
850
+ });
851
+ // T
852
+ case 'ccccc':
853
+ return localize.day(dayOfWeek, {
854
+ width: 'narrow',
855
+ context: 'standalone'
856
+ });
857
+ // Tu
858
+ case 'cccccc':
859
+ return localize.day(dayOfWeek, {
860
+ width: 'short',
861
+ context: 'standalone'
862
+ });
863
+ // Tuesday
864
+ case 'cccc':
865
+ default:
866
+ return localize.day(dayOfWeek, {
867
+ width: 'wide',
868
+ context: 'standalone'
869
+ });
870
+ }
871
+ },
872
+ // ISO day of week
873
+ i: function i(date, token, localize) {
874
+ var dayOfWeek = date.getUTCDay();
875
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
876
+ switch (token) {
877
+ // 2
878
+ case 'i':
879
+ return String(isoDayOfWeek);
880
+ // 02
881
+ case 'ii':
882
+ return addLeadingZeros(isoDayOfWeek, token.length);
883
+ // 2nd
884
+ case 'io':
885
+ return localize.ordinalNumber(isoDayOfWeek, {
886
+ unit: 'day'
887
+ });
888
+ // Tue
889
+ case 'iii':
890
+ return localize.day(dayOfWeek, {
891
+ width: 'abbreviated',
892
+ context: 'formatting'
893
+ });
894
+ // T
895
+ case 'iiiii':
896
+ return localize.day(dayOfWeek, {
897
+ width: 'narrow',
898
+ context: 'formatting'
899
+ });
900
+ // Tu
901
+ case 'iiiiii':
902
+ return localize.day(dayOfWeek, {
903
+ width: 'short',
904
+ context: 'formatting'
905
+ });
906
+ // Tuesday
907
+ case 'iiii':
908
+ default:
909
+ return localize.day(dayOfWeek, {
910
+ width: 'wide',
911
+ context: 'formatting'
912
+ });
913
+ }
914
+ },
915
+ // AM or PM
916
+ a: function a(date, token, localize) {
917
+ var hours = date.getUTCHours();
918
+ var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
919
+ switch (token) {
920
+ case 'a':
921
+ case 'aa':
922
+ return localize.dayPeriod(dayPeriodEnumValue, {
923
+ width: 'abbreviated',
924
+ context: 'formatting'
925
+ });
926
+ case 'aaa':
927
+ return localize.dayPeriod(dayPeriodEnumValue, {
928
+ width: 'abbreviated',
929
+ context: 'formatting'
930
+ }).toLowerCase();
931
+ case 'aaaaa':
932
+ return localize.dayPeriod(dayPeriodEnumValue, {
933
+ width: 'narrow',
934
+ context: 'formatting'
935
+ });
936
+ case 'aaaa':
937
+ default:
938
+ return localize.dayPeriod(dayPeriodEnumValue, {
939
+ width: 'wide',
940
+ context: 'formatting'
941
+ });
942
+ }
943
+ },
944
+ // AM, PM, midnight, noon
945
+ b: function b(date, token, localize) {
946
+ var hours = date.getUTCHours();
947
+ var dayPeriodEnumValue;
948
+ if (hours === 12) {
949
+ dayPeriodEnumValue = dayPeriodEnum.noon;
950
+ } else if (hours === 0) {
951
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
952
+ } else {
953
+ dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
954
+ }
955
+ switch (token) {
956
+ case 'b':
957
+ case 'bb':
958
+ return localize.dayPeriod(dayPeriodEnumValue, {
959
+ width: 'abbreviated',
960
+ context: 'formatting'
961
+ });
962
+ case 'bbb':
963
+ return localize.dayPeriod(dayPeriodEnumValue, {
964
+ width: 'abbreviated',
965
+ context: 'formatting'
966
+ }).toLowerCase();
967
+ case 'bbbbb':
968
+ return localize.dayPeriod(dayPeriodEnumValue, {
969
+ width: 'narrow',
970
+ context: 'formatting'
971
+ });
972
+ case 'bbbb':
973
+ default:
974
+ return localize.dayPeriod(dayPeriodEnumValue, {
975
+ width: 'wide',
976
+ context: 'formatting'
977
+ });
978
+ }
979
+ },
980
+ // in the morning, in the afternoon, in the evening, at night
981
+ B: function B(date, token, localize) {
982
+ var hours = date.getUTCHours();
983
+ var dayPeriodEnumValue;
984
+ if (hours >= 17) {
985
+ dayPeriodEnumValue = dayPeriodEnum.evening;
986
+ } else if (hours >= 12) {
987
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
988
+ } else if (hours >= 4) {
989
+ dayPeriodEnumValue = dayPeriodEnum.morning;
990
+ } else {
991
+ dayPeriodEnumValue = dayPeriodEnum.night;
992
+ }
993
+ switch (token) {
994
+ case 'B':
995
+ case 'BB':
996
+ case 'BBB':
997
+ return localize.dayPeriod(dayPeriodEnumValue, {
998
+ width: 'abbreviated',
999
+ context: 'formatting'
1000
+ });
1001
+ case 'BBBBB':
1002
+ return localize.dayPeriod(dayPeriodEnumValue, {
1003
+ width: 'narrow',
1004
+ context: 'formatting'
1005
+ });
1006
+ case 'BBBB':
1007
+ default:
1008
+ return localize.dayPeriod(dayPeriodEnumValue, {
1009
+ width: 'wide',
1010
+ context: 'formatting'
1011
+ });
1012
+ }
1013
+ },
1014
+ // Hour [1-12]
1015
+ h: function h(date, token, localize) {
1016
+ if (token === 'ho') {
1017
+ var hours = date.getUTCHours() % 12;
1018
+ if (hours === 0) hours = 12;
1019
+ return localize.ordinalNumber(hours, {
1020
+ unit: 'hour'
1021
+ });
1022
+ }
1023
+ return formatters$3.h(date, token);
1024
+ },
1025
+ // Hour [0-23]
1026
+ H: function H(date, token, localize) {
1027
+ if (token === 'Ho') {
1028
+ return localize.ordinalNumber(date.getUTCHours(), {
1029
+ unit: 'hour'
1030
+ });
1031
+ }
1032
+ return formatters$3.H(date, token);
1033
+ },
1034
+ // Hour [0-11]
1035
+ K: function K(date, token, localize) {
1036
+ var hours = date.getUTCHours() % 12;
1037
+ if (token === 'Ko') {
1038
+ return localize.ordinalNumber(hours, {
1039
+ unit: 'hour'
1040
+ });
1041
+ }
1042
+ return addLeadingZeros(hours, token.length);
1043
+ },
1044
+ // Hour [1-24]
1045
+ k: function k(date, token, localize) {
1046
+ var hours = date.getUTCHours();
1047
+ if (hours === 0) hours = 24;
1048
+ if (token === 'ko') {
1049
+ return localize.ordinalNumber(hours, {
1050
+ unit: 'hour'
1051
+ });
1052
+ }
1053
+ return addLeadingZeros(hours, token.length);
1054
+ },
1055
+ // Minute
1056
+ m: function m(date, token, localize) {
1057
+ if (token === 'mo') {
1058
+ return localize.ordinalNumber(date.getUTCMinutes(), {
1059
+ unit: 'minute'
1060
+ });
1061
+ }
1062
+ return formatters$3.m(date, token);
1063
+ },
1064
+ // Second
1065
+ s: function s(date, token, localize) {
1066
+ if (token === 'so') {
1067
+ return localize.ordinalNumber(date.getUTCSeconds(), {
1068
+ unit: 'second'
1069
+ });
1070
+ }
1071
+ return formatters$3.s(date, token);
1072
+ },
1073
+ // Fraction of second
1074
+ S: function S(date, token) {
1075
+ return formatters$3.S(date, token);
1076
+ },
1077
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1078
+ X: function X(date, token, _localize, options) {
1079
+ var originalDate = options._originalDate || date;
1080
+ var timezoneOffset = originalDate.getTimezoneOffset();
1081
+ if (timezoneOffset === 0) {
1082
+ return 'Z';
1083
+ }
1084
+ switch (token) {
1085
+ // Hours and optional minutes
1086
+ case 'X':
1087
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1088
+
1089
+ // Hours, minutes and optional seconds without `:` delimiter
1090
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1091
+ // so this token always has the same output as `XX`
1092
+ case 'XXXX':
1093
+ case 'XX':
1094
+ // Hours and minutes without `:` delimiter
1095
+ return formatTimezone(timezoneOffset);
1096
+
1097
+ // Hours, minutes and optional seconds with `:` delimiter
1098
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1099
+ // so this token always has the same output as `XXX`
1100
+ case 'XXXXX':
1101
+ case 'XXX': // Hours and minutes with `:` delimiter
1102
+ default:
1103
+ return formatTimezone(timezoneOffset, ':');
1104
+ }
1105
+ },
1106
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1107
+ x: function x(date, token, _localize, options) {
1108
+ var originalDate = options._originalDate || date;
1109
+ var timezoneOffset = originalDate.getTimezoneOffset();
1110
+ switch (token) {
1111
+ // Hours and optional minutes
1112
+ case 'x':
1113
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
1114
+
1115
+ // Hours, minutes and optional seconds without `:` delimiter
1116
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1117
+ // so this token always has the same output as `xx`
1118
+ case 'xxxx':
1119
+ case 'xx':
1120
+ // Hours and minutes without `:` delimiter
1121
+ return formatTimezone(timezoneOffset);
1122
+
1123
+ // Hours, minutes and optional seconds with `:` delimiter
1124
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1125
+ // so this token always has the same output as `xxx`
1126
+ case 'xxxxx':
1127
+ case 'xxx': // Hours and minutes with `:` delimiter
1128
+ default:
1129
+ return formatTimezone(timezoneOffset, ':');
1130
+ }
1131
+ },
1132
+ // Timezone (GMT)
1133
+ O: function O(date, token, _localize, options) {
1134
+ var originalDate = options._originalDate || date;
1135
+ var timezoneOffset = originalDate.getTimezoneOffset();
1136
+ switch (token) {
1137
+ // Short
1138
+ case 'O':
1139
+ case 'OO':
1140
+ case 'OOO':
1141
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1142
+ // Long
1143
+ case 'OOOO':
1144
+ default:
1145
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1146
+ }
1147
+ },
1148
+ // Timezone (specific non-location)
1149
+ z: function z(date, token, _localize, options) {
1150
+ var originalDate = options._originalDate || date;
1151
+ var timezoneOffset = originalDate.getTimezoneOffset();
1152
+ switch (token) {
1153
+ // Short
1154
+ case 'z':
1155
+ case 'zz':
1156
+ case 'zzz':
1157
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
1158
+ // Long
1159
+ case 'zzzz':
1160
+ default:
1161
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
1162
+ }
1163
+ },
1164
+ // Seconds timestamp
1165
+ t: function t(date, token, _localize, options) {
1166
+ var originalDate = options._originalDate || date;
1167
+ var timestamp = Math.floor(originalDate.getTime() / 1000);
1168
+ return addLeadingZeros(timestamp, token.length);
1169
+ },
1170
+ // Milliseconds timestamp
1171
+ T: function T(date, token, _localize, options) {
1172
+ var originalDate = options._originalDate || date;
1173
+ var timestamp = originalDate.getTime();
1174
+ return addLeadingZeros(timestamp, token.length);
1175
+ }
1176
+ };
1177
+ function formatTimezoneShort(offset, dirtyDelimiter) {
1178
+ var sign = offset > 0 ? '-' : '+';
1179
+ var absOffset = Math.abs(offset);
1180
+ var hours = Math.floor(absOffset / 60);
1181
+ var minutes = absOffset % 60;
1182
+ if (minutes === 0) {
1183
+ return sign + String(hours);
1184
+ }
1185
+ var delimiter = dirtyDelimiter || '';
1186
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
1187
+ }
1188
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
1189
+ if (offset % 60 === 0) {
1190
+ var sign = offset > 0 ? '-' : '+';
1191
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
1192
+ }
1193
+ return formatTimezone(offset, dirtyDelimiter);
1194
+ }
1195
+ function formatTimezone(offset, dirtyDelimiter) {
1196
+ var delimiter = dirtyDelimiter || '';
1197
+ var sign = offset > 0 ? '-' : '+';
1198
+ var absOffset = Math.abs(offset);
1199
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
1200
+ var minutes = addLeadingZeros(absOffset % 60, 2);
1201
+ return sign + hours + delimiter + minutes;
1202
+ }
1203
+ var formatters$1 = formatters;
1204
+
1205
+ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
1206
+ switch (pattern) {
1207
+ case 'P':
1208
+ return formatLong.date({
1209
+ width: 'short'
1210
+ });
1211
+ case 'PP':
1212
+ return formatLong.date({
1213
+ width: 'medium'
1214
+ });
1215
+ case 'PPP':
1216
+ return formatLong.date({
1217
+ width: 'long'
1218
+ });
1219
+ case 'PPPP':
1220
+ default:
1221
+ return formatLong.date({
1222
+ width: 'full'
1223
+ });
1224
+ }
1225
+ };
1226
+ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
1227
+ switch (pattern) {
1228
+ case 'p':
1229
+ return formatLong.time({
1230
+ width: 'short'
1231
+ });
1232
+ case 'pp':
1233
+ return formatLong.time({
1234
+ width: 'medium'
1235
+ });
1236
+ case 'ppp':
1237
+ return formatLong.time({
1238
+ width: 'long'
1239
+ });
1240
+ case 'pppp':
1241
+ default:
1242
+ return formatLong.time({
1243
+ width: 'full'
1244
+ });
1245
+ }
1246
+ };
1247
+ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
1248
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
1249
+ var datePattern = matchResult[1];
1250
+ var timePattern = matchResult[2];
1251
+ if (!timePattern) {
1252
+ return dateLongFormatter(pattern, formatLong);
1253
+ }
1254
+ var dateTimeFormat;
1255
+ switch (datePattern) {
1256
+ case 'P':
1257
+ dateTimeFormat = formatLong.dateTime({
1258
+ width: 'short'
1259
+ });
1260
+ break;
1261
+ case 'PP':
1262
+ dateTimeFormat = formatLong.dateTime({
1263
+ width: 'medium'
1264
+ });
1265
+ break;
1266
+ case 'PPP':
1267
+ dateTimeFormat = formatLong.dateTime({
1268
+ width: 'long'
1269
+ });
1270
+ break;
1271
+ case 'PPPP':
1272
+ default:
1273
+ dateTimeFormat = formatLong.dateTime({
1274
+ width: 'full'
1275
+ });
1276
+ break;
1277
+ }
1278
+ return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
1279
+ };
1280
+ var longFormatters = {
1281
+ p: timeLongFormatter,
1282
+ P: dateTimeLongFormatter
1283
+ };
1284
+ var longFormatters$1 = longFormatters;
1285
+
1286
+ /**
1287
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
1288
+ * They usually appear for dates that denote time before the timezones were introduced
1289
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
1290
+ * and GMT+01:00:00 after that date)
1291
+ *
1292
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
1293
+ * which would lead to incorrect calculations.
1294
+ *
1295
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
1296
+ */
1297
+ function getTimezoneOffsetInMilliseconds(date) {
1298
+ var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
1299
+ utcDate.setUTCFullYear(date.getFullYear());
1300
+ return date.getTime() - utcDate.getTime();
1301
+ }
1302
+
1303
+ var protectedDayOfYearTokens = ['D', 'DD'];
1304
+ var protectedWeekYearTokens = ['YY', 'YYYY'];
1305
+ function isProtectedDayOfYearToken(token) {
1306
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
1307
+ }
1308
+ function isProtectedWeekYearToken(token) {
1309
+ return protectedWeekYearTokens.indexOf(token) !== -1;
1310
+ }
1311
+ function throwProtectedError(token, format, input) {
1312
+ if (token === 'YYYY') {
1313
+ 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"));
1314
+ } else if (token === 'YY') {
1315
+ 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"));
1316
+ } else if (token === 'D') {
1317
+ 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"));
1318
+ } else if (token === 'DD') {
1319
+ 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"));
1320
+ }
1321
+ }
1322
+
1323
+ var formatDistanceLocale = {
1324
+ lessThanXSeconds: {
1325
+ one: 'less than a second',
1326
+ other: 'less than {{count}} seconds'
1327
+ },
1328
+ xSeconds: {
1329
+ one: '1 second',
1330
+ other: '{{count}} seconds'
1331
+ },
1332
+ halfAMinute: 'half a minute',
1333
+ lessThanXMinutes: {
1334
+ one: 'less than a minute',
1335
+ other: 'less than {{count}} minutes'
1336
+ },
1337
+ xMinutes: {
1338
+ one: '1 minute',
1339
+ other: '{{count}} minutes'
1340
+ },
1341
+ aboutXHours: {
1342
+ one: 'about 1 hour',
1343
+ other: 'about {{count}} hours'
1344
+ },
1345
+ xHours: {
1346
+ one: '1 hour',
1347
+ other: '{{count}} hours'
1348
+ },
1349
+ xDays: {
1350
+ one: '1 day',
1351
+ other: '{{count}} days'
1352
+ },
1353
+ aboutXWeeks: {
1354
+ one: 'about 1 week',
1355
+ other: 'about {{count}} weeks'
1356
+ },
1357
+ xWeeks: {
1358
+ one: '1 week',
1359
+ other: '{{count}} weeks'
1360
+ },
1361
+ aboutXMonths: {
1362
+ one: 'about 1 month',
1363
+ other: 'about {{count}} months'
1364
+ },
1365
+ xMonths: {
1366
+ one: '1 month',
1367
+ other: '{{count}} months'
1368
+ },
1369
+ aboutXYears: {
1370
+ one: 'about 1 year',
1371
+ other: 'about {{count}} years'
1372
+ },
1373
+ xYears: {
1374
+ one: '1 year',
1375
+ other: '{{count}} years'
1376
+ },
1377
+ overXYears: {
1378
+ one: 'over 1 year',
1379
+ other: 'over {{count}} years'
1380
+ },
1381
+ almostXYears: {
1382
+ one: 'almost 1 year',
1383
+ other: 'almost {{count}} years'
1384
+ }
1385
+ };
1386
+ var formatDistance = function formatDistance(token, count, options) {
1387
+ var result;
1388
+ var tokenValue = formatDistanceLocale[token];
1389
+ if (typeof tokenValue === 'string') {
1390
+ result = tokenValue;
1391
+ } else if (count === 1) {
1392
+ result = tokenValue.one;
1393
+ } else {
1394
+ result = tokenValue.other.replace('{{count}}', count.toString());
1395
+ }
1396
+ if (options !== null && options !== void 0 && options.addSuffix) {
1397
+ if (options.comparison && options.comparison > 0) {
1398
+ return 'in ' + result;
1399
+ } else {
1400
+ return result + ' ago';
1401
+ }
1402
+ }
1403
+ return result;
1404
+ };
1405
+ var formatDistance$1 = formatDistance;
1406
+
1407
+ function buildFormatLongFn(args) {
1408
+ return function () {
1409
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1410
+ // TODO: Remove String()
1411
+ var width = options.width ? String(options.width) : args.defaultWidth;
1412
+ var format = args.formats[width] || args.formats[args.defaultWidth];
1413
+ return format;
1414
+ };
1415
+ }
1416
+
1417
+ var dateFormats = {
1418
+ full: 'EEEE, MMMM do, y',
1419
+ long: 'MMMM do, y',
1420
+ medium: 'MMM d, y',
1421
+ short: 'MM/dd/yyyy'
1422
+ };
1423
+ var timeFormats = {
1424
+ full: 'h:mm:ss a zzzz',
1425
+ long: 'h:mm:ss a z',
1426
+ medium: 'h:mm:ss a',
1427
+ short: 'h:mm a'
1428
+ };
1429
+ var dateTimeFormats = {
1430
+ full: "{{date}} 'at' {{time}}",
1431
+ long: "{{date}} 'at' {{time}}",
1432
+ medium: '{{date}}, {{time}}',
1433
+ short: '{{date}}, {{time}}'
1434
+ };
1435
+ var formatLong = {
1436
+ date: buildFormatLongFn({
1437
+ formats: dateFormats,
1438
+ defaultWidth: 'full'
1439
+ }),
1440
+ time: buildFormatLongFn({
1441
+ formats: timeFormats,
1442
+ defaultWidth: 'full'
1443
+ }),
1444
+ dateTime: buildFormatLongFn({
1445
+ formats: dateTimeFormats,
1446
+ defaultWidth: 'full'
1447
+ })
1448
+ };
1449
+ var formatLong$1 = formatLong;
1450
+
1451
+ var formatRelativeLocale = {
1452
+ lastWeek: "'last' eeee 'at' p",
1453
+ yesterday: "'yesterday at' p",
1454
+ today: "'today at' p",
1455
+ tomorrow: "'tomorrow at' p",
1456
+ nextWeek: "eeee 'at' p",
1457
+ other: 'P'
1458
+ };
1459
+ var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
1460
+ return formatRelativeLocale[token];
1461
+ };
1462
+ var formatRelative$1 = formatRelative;
1463
+
1464
+ function buildLocalizeFn(args) {
1465
+ return function (dirtyIndex, options) {
1466
+ var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
1467
+ var valuesArray;
1468
+ if (context === 'formatting' && args.formattingValues) {
1469
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1470
+ var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
1471
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1472
+ } else {
1473
+ var _defaultWidth = args.defaultWidth;
1474
+ var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
1475
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
1476
+ }
1477
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
1478
+ // @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!
1479
+ return valuesArray[index];
1480
+ };
1481
+ }
1482
+
1483
+ var eraValues = {
1484
+ narrow: ['B', 'A'],
1485
+ abbreviated: ['BC', 'AD'],
1486
+ wide: ['Before Christ', 'Anno Domini']
1487
+ };
1488
+ var quarterValues = {
1489
+ narrow: ['1', '2', '3', '4'],
1490
+ abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
1491
+ wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
1492
+ };
1493
+
1494
+ // Note: in English, the names of days of the week and months are capitalized.
1495
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1496
+ // Generally, formatted dates should look like they are in the middle of a sentence,
1497
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
1498
+ var monthValues = {
1499
+ narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
1500
+ abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
1501
+ wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
1502
+ };
1503
+ var dayValues = {
1504
+ narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
1505
+ short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
1506
+ abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
1507
+ wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
1508
+ };
1509
+ var dayPeriodValues = {
1510
+ narrow: {
1511
+ am: 'a',
1512
+ pm: 'p',
1513
+ midnight: 'mi',
1514
+ noon: 'n',
1515
+ morning: 'morning',
1516
+ afternoon: 'afternoon',
1517
+ evening: 'evening',
1518
+ night: 'night'
1519
+ },
1520
+ abbreviated: {
1521
+ am: 'AM',
1522
+ pm: 'PM',
1523
+ midnight: 'midnight',
1524
+ noon: 'noon',
1525
+ morning: 'morning',
1526
+ afternoon: 'afternoon',
1527
+ evening: 'evening',
1528
+ night: 'night'
1529
+ },
1530
+ wide: {
1531
+ am: 'a.m.',
1532
+ pm: 'p.m.',
1533
+ midnight: 'midnight',
1534
+ noon: 'noon',
1535
+ morning: 'morning',
1536
+ afternoon: 'afternoon',
1537
+ evening: 'evening',
1538
+ night: 'night'
1539
+ }
1540
+ };
1541
+ var formattingDayPeriodValues = {
1542
+ narrow: {
1543
+ am: 'a',
1544
+ pm: 'p',
1545
+ midnight: 'mi',
1546
+ noon: 'n',
1547
+ morning: 'in the morning',
1548
+ afternoon: 'in the afternoon',
1549
+ evening: 'in the evening',
1550
+ night: 'at night'
1551
+ },
1552
+ abbreviated: {
1553
+ am: 'AM',
1554
+ pm: 'PM',
1555
+ midnight: 'midnight',
1556
+ noon: 'noon',
1557
+ morning: 'in the morning',
1558
+ afternoon: 'in the afternoon',
1559
+ evening: 'in the evening',
1560
+ night: 'at night'
1561
+ },
1562
+ wide: {
1563
+ am: 'a.m.',
1564
+ pm: 'p.m.',
1565
+ midnight: 'midnight',
1566
+ noon: 'noon',
1567
+ morning: 'in the morning',
1568
+ afternoon: 'in the afternoon',
1569
+ evening: 'in the evening',
1570
+ night: 'at night'
1571
+ }
1572
+ };
1573
+ var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
1574
+ var number = Number(dirtyNumber);
1575
+
1576
+ // If ordinal numbers depend on context, for example,
1577
+ // if they are different for different grammatical genders,
1578
+ // use `options.unit`.
1579
+ //
1580
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
1581
+ // 'day', 'hour', 'minute', 'second'.
1582
+
1583
+ var rem100 = number % 100;
1584
+ if (rem100 > 20 || rem100 < 10) {
1585
+ switch (rem100 % 10) {
1586
+ case 1:
1587
+ return number + 'st';
1588
+ case 2:
1589
+ return number + 'nd';
1590
+ case 3:
1591
+ return number + 'rd';
1592
+ }
1593
+ }
1594
+ return number + 'th';
1595
+ };
1596
+ var localize = {
1597
+ ordinalNumber: ordinalNumber,
1598
+ era: buildLocalizeFn({
1599
+ values: eraValues,
1600
+ defaultWidth: 'wide'
1601
+ }),
1602
+ quarter: buildLocalizeFn({
1603
+ values: quarterValues,
1604
+ defaultWidth: 'wide',
1605
+ argumentCallback: function argumentCallback(quarter) {
1606
+ return quarter - 1;
1607
+ }
1608
+ }),
1609
+ month: buildLocalizeFn({
1610
+ values: monthValues,
1611
+ defaultWidth: 'wide'
1612
+ }),
1613
+ day: buildLocalizeFn({
1614
+ values: dayValues,
1615
+ defaultWidth: 'wide'
1616
+ }),
1617
+ dayPeriod: buildLocalizeFn({
1618
+ values: dayPeriodValues,
1619
+ defaultWidth: 'wide',
1620
+ formattingValues: formattingDayPeriodValues,
1621
+ defaultFormattingWidth: 'wide'
1622
+ })
1623
+ };
1624
+ var localize$1 = localize;
1625
+
1626
+ function buildMatchFn(args) {
1627
+ return function (string) {
1628
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1629
+ var width = options.width;
1630
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1631
+ var matchResult = string.match(matchPattern);
1632
+ if (!matchResult) {
1633
+ return null;
1634
+ }
1635
+ var matchedString = matchResult[0];
1636
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1637
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
1638
+ return pattern.test(matchedString);
1639
+ }) : findKey(parsePatterns, function (pattern) {
1640
+ return pattern.test(matchedString);
1641
+ });
1642
+ var value;
1643
+ value = args.valueCallback ? args.valueCallback(key) : key;
1644
+ value = options.valueCallback ? options.valueCallback(value) : value;
1645
+ var rest = string.slice(matchedString.length);
1646
+ return {
1647
+ value: value,
1648
+ rest: rest
1649
+ };
1650
+ };
1651
+ }
1652
+ function findKey(object, predicate) {
1653
+ for (var key in object) {
1654
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
1655
+ return key;
1656
+ }
1657
+ }
1658
+ return undefined;
1659
+ }
1660
+ function findIndex(array, predicate) {
1661
+ for (var key = 0; key < array.length; key++) {
1662
+ if (predicate(array[key])) {
1663
+ return key;
1664
+ }
1665
+ }
1666
+ return undefined;
1667
+ }
1668
+
1669
+ function buildMatchPatternFn(args) {
1670
+ return function (string) {
1671
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1672
+ var matchResult = string.match(args.matchPattern);
1673
+ if (!matchResult) return null;
1674
+ var matchedString = matchResult[0];
1675
+ var parseResult = string.match(args.parsePattern);
1676
+ if (!parseResult) return null;
1677
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
1678
+ value = options.valueCallback ? options.valueCallback(value) : value;
1679
+ var rest = string.slice(matchedString.length);
1680
+ return {
1681
+ value: value,
1682
+ rest: rest
1683
+ };
1684
+ };
1685
+ }
1686
+
1687
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
1688
+ var parseOrdinalNumberPattern = /\d+/i;
1689
+ var matchEraPatterns = {
1690
+ narrow: /^(b|a)/i,
1691
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1692
+ wide: /^(before christ|before common era|anno domini|common era)/i
1693
+ };
1694
+ var parseEraPatterns = {
1695
+ any: [/^b/i, /^(a|c)/i]
1696
+ };
1697
+ var matchQuarterPatterns = {
1698
+ narrow: /^[1234]/i,
1699
+ abbreviated: /^q[1234]/i,
1700
+ wide: /^[1234](th|st|nd|rd)? quarter/i
1701
+ };
1702
+ var parseQuarterPatterns = {
1703
+ any: [/1/i, /2/i, /3/i, /4/i]
1704
+ };
1705
+ var matchMonthPatterns = {
1706
+ narrow: /^[jfmasond]/i,
1707
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1708
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1709
+ };
1710
+ var parseMonthPatterns = {
1711
+ 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],
1712
+ 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]
1713
+ };
1714
+ var matchDayPatterns = {
1715
+ narrow: /^[smtwf]/i,
1716
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1717
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1718
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1719
+ };
1720
+ var parseDayPatterns = {
1721
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1722
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1723
+ };
1724
+ var matchDayPeriodPatterns = {
1725
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1726
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1727
+ };
1728
+ var parseDayPeriodPatterns = {
1729
+ any: {
1730
+ am: /^a/i,
1731
+ pm: /^p/i,
1732
+ midnight: /^mi/i,
1733
+ noon: /^no/i,
1734
+ morning: /morning/i,
1735
+ afternoon: /afternoon/i,
1736
+ evening: /evening/i,
1737
+ night: /night/i
1738
+ }
1739
+ };
1740
+ var match = {
1741
+ ordinalNumber: buildMatchPatternFn({
1742
+ matchPattern: matchOrdinalNumberPattern,
1743
+ parsePattern: parseOrdinalNumberPattern,
1744
+ valueCallback: function valueCallback(value) {
1745
+ return parseInt(value, 10);
1746
+ }
1747
+ }),
1748
+ era: buildMatchFn({
1749
+ matchPatterns: matchEraPatterns,
1750
+ defaultMatchWidth: 'wide',
1751
+ parsePatterns: parseEraPatterns,
1752
+ defaultParseWidth: 'any'
1753
+ }),
1754
+ quarter: buildMatchFn({
1755
+ matchPatterns: matchQuarterPatterns,
1756
+ defaultMatchWidth: 'wide',
1757
+ parsePatterns: parseQuarterPatterns,
1758
+ defaultParseWidth: 'any',
1759
+ valueCallback: function valueCallback(index) {
1760
+ return index + 1;
1761
+ }
1762
+ }),
1763
+ month: buildMatchFn({
1764
+ matchPatterns: matchMonthPatterns,
1765
+ defaultMatchWidth: 'wide',
1766
+ parsePatterns: parseMonthPatterns,
1767
+ defaultParseWidth: 'any'
1768
+ }),
1769
+ day: buildMatchFn({
1770
+ matchPatterns: matchDayPatterns,
1771
+ defaultMatchWidth: 'wide',
1772
+ parsePatterns: parseDayPatterns,
1773
+ defaultParseWidth: 'any'
1774
+ }),
1775
+ dayPeriod: buildMatchFn({
1776
+ matchPatterns: matchDayPeriodPatterns,
1777
+ defaultMatchWidth: 'any',
1778
+ parsePatterns: parseDayPeriodPatterns,
1779
+ defaultParseWidth: 'any'
1780
+ })
1781
+ };
1782
+ var match$1 = match;
1783
+
1784
+ /**
1785
+ * @type {Locale}
1786
+ * @category Locales
1787
+ * @summary English locale (United States).
1788
+ * @language English
1789
+ * @iso-639-2 eng
1790
+ * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
1791
+ * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
1792
+ */
1793
+ var locale = {
1794
+ code: 'en-US',
1795
+ formatDistance: formatDistance$1,
1796
+ formatLong: formatLong$1,
1797
+ formatRelative: formatRelative$1,
1798
+ localize: localize$1,
1799
+ match: match$1,
1800
+ options: {
1801
+ weekStartsOn: 0 /* Sunday */,
1802
+ firstWeekContainsDate: 1
1803
+ }
1804
+ };
1805
+ var defaultLocale = locale;
1806
+
1807
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
1808
+ // (one of the certain letters followed by `o`)
1809
+ // - (\w)\1* matches any sequences of the same letter
1810
+ // - '' matches two quote characters in a row
1811
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
1812
+ // except a single quote symbol, which ends the sequence.
1813
+ // Two quote characters do not end the sequence.
1814
+ // If there is no matching single quote
1815
+ // then the sequence will continue until the end of the string.
1816
+ // - . matches any single character unmatched by previous parts of the RegExps
1817
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
1818
+
1819
+ // This RegExp catches symbols escaped by quotes, and also
1820
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
1821
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
1822
+ var escapedStringRegExp = /^'([^]*?)'?$/;
1823
+ var doubleQuoteRegExp = /''/g;
1824
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
1825
+
1826
+ /**
1827
+ * @name format
1828
+ * @category Common Helpers
1829
+ * @summary Format the date.
1830
+ *
1831
+ * @description
1832
+ * Return the formatted date string in the given format. The result may vary by locale.
1833
+ *
1834
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
1835
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1836
+ *
1837
+ * The characters wrapped between two single quotes characters (') are escaped.
1838
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
1839
+ * (see the last example)
1840
+ *
1841
+ * Format of the string is based on Unicode Technical Standard #35:
1842
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
1843
+ * with a few additions (see note 7 below the table).
1844
+ *
1845
+ * Accepted patterns:
1846
+ * | Unit | Pattern | Result examples | Notes |
1847
+ * |---------------------------------|---------|-----------------------------------|-------|
1848
+ * | Era | G..GGG | AD, BC | |
1849
+ * | | GGGG | Anno Domini, Before Christ | 2 |
1850
+ * | | GGGGG | A, B | |
1851
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
1852
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
1853
+ * | | yy | 44, 01, 00, 17 | 5 |
1854
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
1855
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
1856
+ * | | yyyyy | ... | 3,5 |
1857
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
1858
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
1859
+ * | | YY | 44, 01, 00, 17 | 5,8 |
1860
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
1861
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
1862
+ * | | YYYYY | ... | 3,5 |
1863
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
1864
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
1865
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
1866
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
1867
+ * | | RRRRR | ... | 3,5,7 |
1868
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
1869
+ * | | uu | -43, 01, 1900, 2017 | 5 |
1870
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
1871
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
1872
+ * | | uuuuu | ... | 3,5 |
1873
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
1874
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
1875
+ * | | QQ | 01, 02, 03, 04 | |
1876
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
1877
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
1878
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
1879
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
1880
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
1881
+ * | | qq | 01, 02, 03, 04 | |
1882
+ * | | qqq | Q1, Q2, Q3, Q4 | |
1883
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
1884
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
1885
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
1886
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
1887
+ * | | MM | 01, 02, ..., 12 | |
1888
+ * | | MMM | Jan, Feb, ..., Dec | |
1889
+ * | | MMMM | January, February, ..., December | 2 |
1890
+ * | | MMMMM | J, F, ..., D | |
1891
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
1892
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
1893
+ * | | LL | 01, 02, ..., 12 | |
1894
+ * | | LLL | Jan, Feb, ..., Dec | |
1895
+ * | | LLLL | January, February, ..., December | 2 |
1896
+ * | | LLLLL | J, F, ..., D | |
1897
+ * | Local week of year | w | 1, 2, ..., 53 | |
1898
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
1899
+ * | | ww | 01, 02, ..., 53 | |
1900
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
1901
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
1902
+ * | | II | 01, 02, ..., 53 | 7 |
1903
+ * | Day of month | d | 1, 2, ..., 31 | |
1904
+ * | | do | 1st, 2nd, ..., 31st | 7 |
1905
+ * | | dd | 01, 02, ..., 31 | |
1906
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
1907
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
1908
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
1909
+ * | | DDD | 001, 002, ..., 365, 366 | |
1910
+ * | | DDDD | ... | 3 |
1911
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
1912
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
1913
+ * | | EEEEE | M, T, W, T, F, S, S | |
1914
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
1915
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
1916
+ * | | io | 1st, 2nd, ..., 7th | 7 |
1917
+ * | | ii | 01, 02, ..., 07 | 7 |
1918
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
1919
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
1920
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
1921
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
1922
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
1923
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
1924
+ * | | ee | 02, 03, ..., 01 | |
1925
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
1926
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
1927
+ * | | eeeee | M, T, W, T, F, S, S | |
1928
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
1929
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
1930
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
1931
+ * | | cc | 02, 03, ..., 01 | |
1932
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
1933
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
1934
+ * | | ccccc | M, T, W, T, F, S, S | |
1935
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
1936
+ * | AM, PM | a..aa | AM, PM | |
1937
+ * | | aaa | am, pm | |
1938
+ * | | aaaa | a.m., p.m. | 2 |
1939
+ * | | aaaaa | a, p | |
1940
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
1941
+ * | | bbb | am, pm, noon, midnight | |
1942
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
1943
+ * | | bbbbb | a, p, n, mi | |
1944
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
1945
+ * | | BBBB | at night, in the morning, ... | 2 |
1946
+ * | | BBBBB | at night, in the morning, ... | |
1947
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
1948
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
1949
+ * | | hh | 01, 02, ..., 11, 12 | |
1950
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
1951
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
1952
+ * | | HH | 00, 01, 02, ..., 23 | |
1953
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
1954
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
1955
+ * | | KK | 01, 02, ..., 11, 00 | |
1956
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
1957
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
1958
+ * | | kk | 24, 01, 02, ..., 23 | |
1959
+ * | Minute | m | 0, 1, ..., 59 | |
1960
+ * | | mo | 0th, 1st, ..., 59th | 7 |
1961
+ * | | mm | 00, 01, ..., 59 | |
1962
+ * | Second | s | 0, 1, ..., 59 | |
1963
+ * | | so | 0th, 1st, ..., 59th | 7 |
1964
+ * | | ss | 00, 01, ..., 59 | |
1965
+ * | Fraction of second | S | 0, 1, ..., 9 | |
1966
+ * | | SS | 00, 01, ..., 99 | |
1967
+ * | | SSS | 000, 001, ..., 999 | |
1968
+ * | | SSSS | ... | 3 |
1969
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
1970
+ * | | XX | -0800, +0530, Z | |
1971
+ * | | XXX | -08:00, +05:30, Z | |
1972
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
1973
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
1974
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
1975
+ * | | xx | -0800, +0530, +0000 | |
1976
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
1977
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
1978
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
1979
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
1980
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
1981
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
1982
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
1983
+ * | Seconds timestamp | t | 512969520 | 7 |
1984
+ * | | tt | ... | 3,7 |
1985
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
1986
+ * | | TT | ... | 3,7 |
1987
+ * | Long localized date | P | 04/29/1453 | 7 |
1988
+ * | | PP | Apr 29, 1453 | 7 |
1989
+ * | | PPP | April 29th, 1453 | 7 |
1990
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
1991
+ * | Long localized time | p | 12:00 AM | 7 |
1992
+ * | | pp | 12:00:00 AM | 7 |
1993
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
1994
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
1995
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
1996
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
1997
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
1998
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
1999
+ * Notes:
2000
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
2001
+ * are the same as "stand-alone" units, but are different in some languages.
2002
+ * "Formatting" units are declined according to the rules of the language
2003
+ * in the context of a date. "Stand-alone" units are always nominative singular:
2004
+ *
2005
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
2006
+ *
2007
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
2008
+ *
2009
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
2010
+ * the single quote characters (see below).
2011
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
2012
+ * the output will be the same as default pattern for this unit, usually
2013
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
2014
+ * are marked with "2" in the last column of the table.
2015
+ *
2016
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
2017
+ *
2018
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
2019
+ *
2020
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
2021
+ *
2022
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
2023
+ *
2024
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
2025
+ *
2026
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
2027
+ * The output will be padded with zeros to match the length of the pattern.
2028
+ *
2029
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
2030
+ *
2031
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
2032
+ * These tokens represent the shortest form of the quarter.
2033
+ *
2034
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
2035
+ *
2036
+ * | Year | `y` | `u` |
2037
+ * |------|-----|-----|
2038
+ * | AC 1 | 1 | 1 |
2039
+ * | BC 1 | 1 | 0 |
2040
+ * | BC 2 | 2 | -1 |
2041
+ *
2042
+ * Also `yy` always returns the last two digits of a year,
2043
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
2044
+ *
2045
+ * | Year | `yy` | `uu` |
2046
+ * |------|------|------|
2047
+ * | 1 | 01 | 01 |
2048
+ * | 14 | 14 | 14 |
2049
+ * | 376 | 76 | 376 |
2050
+ * | 1453 | 53 | 1453 |
2051
+ *
2052
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
2053
+ * except local week-numbering years are dependent on `options.weekStartsOn`
2054
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
2055
+ * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
2056
+ *
2057
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
2058
+ * so right now these tokens fall back to GMT timezones.
2059
+ *
2060
+ * 7. These patterns are not in the Unicode Technical Standard #35:
2061
+ * - `i`: ISO day of week
2062
+ * - `I`: ISO week of year
2063
+ * - `R`: ISO week-numbering year
2064
+ * - `t`: seconds timestamp
2065
+ * - `T`: milliseconds timestamp
2066
+ * - `o`: ordinal number modifier
2067
+ * - `P`: long localized date
2068
+ * - `p`: long localized time
2069
+ *
2070
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
2071
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2072
+ *
2073
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
2074
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2075
+ *
2076
+ * @param {Date|Number} date - the original date
2077
+ * @param {String} format - the string of tokens
2078
+ * @param {Object} [options] - an object with options.
2079
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
2080
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
2081
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
2082
+ * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
2083
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2084
+ * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
2085
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
2086
+ * @returns {String} the formatted date string
2087
+ * @throws {TypeError} 2 arguments required
2088
+ * @throws {RangeError} `date` must not be Invalid Date
2089
+ * @throws {RangeError} `options.locale` must contain `localize` property
2090
+ * @throws {RangeError} `options.locale` must contain `formatLong` property
2091
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
2092
+ * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
2093
+ * @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
2094
+ * @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
2095
+ * @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
2096
+ * @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
2097
+ * @throws {RangeError} format string contains an unescaped latin alphabet character
2098
+ *
2099
+ * @example
2100
+ * // Represent 11 February 2014 in middle-endian format:
2101
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
2102
+ * //=> '02/11/2014'
2103
+ *
2104
+ * @example
2105
+ * // Represent 2 July 2014 in Esperanto:
2106
+ * import { eoLocale } from 'date-fns/locale/eo'
2107
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
2108
+ * locale: eoLocale
2109
+ * })
2110
+ * //=> '2-a de julio 2014'
2111
+ *
2112
+ * @example
2113
+ * // Escape string by single quote characters:
2114
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
2115
+ * //=> "3 o'clock"
2116
+ */
2117
+
2118
+ function format(dirtyDate, dirtyFormatStr, options) {
2119
+ 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;
2120
+ requiredArgs(2, arguments);
2121
+ var formatStr = String(dirtyFormatStr);
2122
+ var defaultOptions = getDefaultOptions();
2123
+ 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 : defaultLocale;
2124
+ 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);
2125
+
2126
+ // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
2127
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
2128
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
2129
+ }
2130
+ 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);
2131
+
2132
+ // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
2133
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
2134
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
2135
+ }
2136
+ if (!locale.localize) {
2137
+ throw new RangeError('locale must contain localize property');
2138
+ }
2139
+ if (!locale.formatLong) {
2140
+ throw new RangeError('locale must contain formatLong property');
2141
+ }
2142
+ var originalDate = toDate(dirtyDate);
2143
+ if (!isValid(originalDate)) {
2144
+ throw new RangeError('Invalid time value');
2145
+ }
2146
+
2147
+ // Convert the date in system timezone to the same date in UTC+00:00 timezone.
2148
+ // This ensures that when UTC functions will be implemented, locales will be compatible with them.
2149
+ // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
2150
+ var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
2151
+ var utcDate = subMilliseconds(originalDate, timezoneOffset);
2152
+ var formatterOptions = {
2153
+ firstWeekContainsDate: firstWeekContainsDate,
2154
+ weekStartsOn: weekStartsOn,
2155
+ locale: locale,
2156
+ _originalDate: originalDate
2157
+ };
2158
+ var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
2159
+ var firstCharacter = substring[0];
2160
+ if (firstCharacter === 'p' || firstCharacter === 'P') {
2161
+ var longFormatter = longFormatters$1[firstCharacter];
2162
+ return longFormatter(substring, locale.formatLong);
2163
+ }
2164
+ return substring;
2165
+ }).join('').match(formattingTokensRegExp).map(function (substring) {
2166
+ // Replace two single quote characters with one single quote character
2167
+ if (substring === "''") {
2168
+ return "'";
2169
+ }
2170
+ var firstCharacter = substring[0];
2171
+ if (firstCharacter === "'") {
2172
+ return cleanEscapedString(substring);
2173
+ }
2174
+ var formatter = formatters$1[firstCharacter];
2175
+ if (formatter) {
2176
+ if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
2177
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2178
+ }
2179
+ if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
2180
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
2181
+ }
2182
+ return formatter(utcDate, substring, locale.localize, formatterOptions);
2183
+ }
2184
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
2185
+ throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
2186
+ }
2187
+ return substring;
2188
+ }).join('');
2189
+ return result;
2190
+ }
2191
+ function cleanEscapedString(input) {
2192
+ var matched = input.match(escapedStringRegExp);
2193
+ if (!matched) {
2194
+ return input;
2195
+ }
2196
+ return matched[1].replace(doubleQuoteRegExp, "'");
2197
+ }
2198
+
2199
+ exports._typeof = _typeof;
2200
+ exports.format = format;
2201
+ exports.getDefaultOptions = getDefaultOptions;
2202
+ exports.isDate = isDate;
2203
+ exports.isValid = isValid;
2204
+ exports.requiredArgs = requiredArgs;
2205
+ exports.toDate = toDate;
2206
+ exports.toInteger = toInteger;