@limetech/lime-elements 40.6.0 → 40.6.2

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 (457) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/{adapt-color-contrast-Beo1IEl_.js → adapt-color-contrast-h6iwOfZd.js} +1 -1
  3. package/dist/cjs/{checkbox.template-BPk8WkQF.js → checkbox.template-CoNVC4Nf.js} +2 -2
  4. package/dist/cjs/{component-CFk7Dfoi.js → component-Cz24PdGy.js} +3 -3
  5. package/dist/cjs/{component-BrNWuGdj.js → component-DNiVfYHV.js} +1 -1
  6. package/dist/cjs/{component-y8swlNNR.js → component-GW2n79GH.js} +1 -1
  7. package/dist/cjs/{component-UyqdiWGc.js → component-xiw46M1b.js} +1 -1
  8. package/dist/cjs/{files-DI4jItxi.js → files-DpGigQ8k.js} +1 -1
  9. package/dist/cjs/{format-bytes-CpUKKU86.js → format-bytes-WTHVI718.js} +1 -4
  10. package/dist/cjs/{hotkeys-BtR8uxvl.js → hotkeys-D761KWnZ.js} +1 -0
  11. package/dist/cjs/{image-resize-CG2fitJT.js → image-resize-JlRLB97I.js} +1 -0
  12. package/dist/cjs/{image.template-DY7qwbuy.js → image.template-DlF-f23b.js} +1 -1
  13. package/dist/cjs/{index--B6-r0uo.js → index-BlsqxTB1.js} +1 -7
  14. package/dist/cjs/index.cjs.js +1 -1
  15. package/dist/cjs/{keycodes-k-EdzcMX.js → keycodes-BQ_AERli.js} +4 -0
  16. package/dist/cjs/{language-CaqPKPyW.js → language-v-MMS6ym.js} +1 -1
  17. package/dist/cjs/lime-elements.cjs.js +2 -2
  18. package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +2 -2
  19. package/dist/cjs/limel-action-bar_3.cjs.entry.js +20 -18
  20. package/dist/cjs/limel-ai-avatar.cjs.entry.js +5 -5
  21. package/dist/cjs/limel-badge.cjs.entry.js +3 -3
  22. package/dist/cjs/limel-banner.cjs.entry.js +2 -2
  23. package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +86 -86
  24. package/dist/cjs/limel-button-group.cjs.entry.js +3 -3
  25. package/dist/cjs/limel-button.cjs.entry.js +4 -4
  26. package/dist/cjs/limel-callout.cjs.entry.js +6 -6
  27. package/dist/cjs/limel-card.cjs.entry.js +8 -7
  28. package/dist/cjs/limel-chart.cjs.entry.js +5 -5
  29. package/dist/cjs/limel-checkbox.cjs.entry.js +12 -10
  30. package/dist/cjs/limel-chip-set.cjs.entry.js +35 -44
  31. package/dist/cjs/limel-chip_2.cjs.entry.js +10 -10
  32. package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
  33. package/dist/cjs/limel-code-diff.cjs.entry.js +25 -28
  34. package/dist/cjs/limel-code-editor.cjs.entry.js +17 -12
  35. package/dist/cjs/limel-collapsible-section.cjs.entry.js +8 -8
  36. package/dist/cjs/limel-color-picker-palette.cjs.entry.js +3 -3
  37. package/dist/cjs/limel-color-picker.cjs.entry.js +6 -5
  38. package/dist/cjs/limel-config.cjs.entry.js +3 -3
  39. package/dist/cjs/limel-date-picker.cjs.entry.js +12 -15
  40. package/dist/cjs/limel-dialog.cjs.entry.js +8 -11
  41. package/dist/cjs/limel-dock-button.cjs.entry.js +6 -11
  42. package/dist/cjs/limel-dock.cjs.entry.js +3 -3
  43. package/dist/cjs/limel-drag-handle.cjs.entry.js +6 -6
  44. package/dist/cjs/limel-dynamic-label.cjs.entry.js +1 -1
  45. package/dist/cjs/limel-email-viewer.cjs.entry.js +11 -17
  46. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +11 -12
  47. package/dist/cjs/limel-file-viewer.cjs.entry.js +1098 -1146
  48. package/dist/cjs/limel-file.cjs.entry.js +17 -16
  49. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +100 -94
  50. package/dist/cjs/limel-flex-container.cjs.entry.js +2 -2
  51. package/dist/cjs/limel-form.cjs.entry.js +65 -50
  52. package/dist/cjs/limel-grid.cjs.entry.js +2 -2
  53. package/dist/cjs/limel-header.cjs.entry.js +2 -2
  54. package/dist/cjs/limel-help-content.cjs.entry.js +2 -2
  55. package/dist/cjs/limel-help.cjs.entry.js +3 -3
  56. package/dist/cjs/limel-helper-line_3.cjs.entry.js +14 -16
  57. package/dist/cjs/limel-hotkey_4.cjs.entry.js +23 -23
  58. package/dist/cjs/limel-icon-button.cjs.entry.js +4 -4
  59. package/dist/cjs/limel-icon.cjs.entry.js +15 -13
  60. package/dist/cjs/limel-info-tile.cjs.entry.js +10 -10
  61. package/dist/cjs/limel-list-item.cjs.entry.js +10 -10
  62. package/dist/cjs/limel-markdown.cjs.entry.js +25 -22
  63. package/dist/cjs/limel-masonry-layout.cjs.entry.js +6 -5
  64. package/dist/cjs/limel-menu-item-meta.cjs.entry.js +3 -3
  65. package/dist/cjs/limel-pagination-jump.cjs.entry.js +18 -16
  66. package/dist/cjs/limel-pagination.cjs.entry.js +10 -9
  67. package/dist/cjs/limel-picker.cjs.entry.js +32 -30
  68. package/dist/cjs/limel-popover_2.cjs.entry.js +26 -22
  69. package/dist/cjs/limel-profile-picture.cjs.entry.js +12 -11
  70. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
  71. package/dist/cjs/limel-progress-flow.cjs.entry.js +11 -10
  72. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +475 -407
  73. package/dist/cjs/limel-radio-button-group.cjs.entry.js +2 -2
  74. package/dist/cjs/limel-radio-button.cjs.entry.js +3 -3
  75. package/dist/cjs/limel-scroller.cjs.entry.js +180 -0
  76. package/dist/cjs/limel-select.cjs.entry.js +20 -20
  77. package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
  78. package/dist/cjs/limel-slider.cjs.entry.js +18 -27
  79. package/dist/cjs/limel-snackbar.cjs.entry.js +5 -5
  80. package/dist/cjs/limel-split-button.cjs.entry.js +1 -1
  81. package/dist/cjs/limel-switch.cjs.entry.js +3 -3
  82. package/dist/cjs/limel-tab-bar.cjs.entry.js +235 -2036
  83. package/dist/cjs/limel-tab-panel.cjs.entry.js +12 -9
  84. package/dist/cjs/limel-table.cjs.entry.js +527 -106
  85. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +16 -15
  86. package/dist/cjs/limel-text-editor.cjs.entry.js +3 -3
  87. package/dist/cjs/loader.cjs.js +2 -2
  88. package/dist/cjs/{make-enter-clickable-NuTMC9MU.js → make-enter-clickable-BZHEWIJD.js} +19 -12
  89. package/dist/cjs/{markdown-exporter-9p7d3Q76.js → markdown-exporter-C-UW43FF.js} +1 -1
  90. package/dist/cjs/{markdown-parser-Cgv5Y9Z4.js → markdown-parser-ssDij8_l.js} +24 -22
  91. package/dist/cjs/{moment-CqRdiK10.js → moment-Cfsz2WF1.js} +1062 -833
  92. package/dist/cjs/{ponyfill-BgIFyUG5.js → ponyfill-CHp7Zocr.js} +0 -1
  93. package/dist/cjs/{random-string-BTzDB2ee.js → random-string-CFCtFh5l.js} +1 -0
  94. package/dist/cjs/{render-list-component-5ZKWpCnM.js → render-list-component-BtAliHQp.js} +3 -5
  95. package/dist/cjs/{sv-BSR4W58y.js → sv-Co78RX70.js} +31 -3
  96. package/dist/cjs/{translations-DFFpR6AZ.js → translations-CNTWud2a.js} +5 -8
  97. package/dist/collection/collection-manifest.json +1 -0
  98. package/dist/collection/components/3d-hover-effect-glow/3d-hover-effect-glow.js +1 -1
  99. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js +8 -7
  100. package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
  101. package/dist/collection/components/action-bar/action-bar.js +6 -5
  102. package/dist/collection/components/ai-avatar/ai-avatar.js +1 -1
  103. package/dist/collection/components/badge/badge.js +2 -2
  104. package/dist/collection/components/banner/banner.js +1 -1
  105. package/dist/collection/components/breadcrumbs/breadcrumbs.js +2 -2
  106. package/dist/collection/components/button/button.js +2 -2
  107. package/dist/collection/components/button-group/button-group.js +1 -1
  108. package/dist/collection/components/callout/callout.js +1 -1
  109. package/dist/collection/components/card/card.js +6 -5
  110. package/dist/collection/components/checkbox/checkbox.js +9 -7
  111. package/dist/collection/components/checkbox/checkbox.template.js +1 -1
  112. package/dist/collection/components/chip/chip.js +1 -1
  113. package/dist/collection/components/chip-set/chip-set-input-helpers.js +18 -21
  114. package/dist/collection/components/chip-set/chip-set.js +7 -13
  115. package/dist/collection/components/circular-progress/circular-progress.js +1 -1
  116. package/dist/collection/components/code-diff/code-diff.js +19 -22
  117. package/dist/collection/components/code-diff/diff-engine.js +2 -2
  118. package/dist/collection/components/code-editor/code-editor.js +8 -3
  119. package/dist/collection/components/collapsible-section/collapsible-section.js +1 -1
  120. package/dist/collection/components/color-picker/color-picker-palette.js +2 -2
  121. package/dist/collection/components/color-picker/color-picker.js +5 -4
  122. package/dist/collection/components/config/config.js +2 -2
  123. package/dist/collection/components/date-picker/date-picker.js +3 -6
  124. package/dist/collection/components/date-picker/flatpickr-adapter/deferred-destroy.js +4 -3
  125. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
  126. package/dist/collection/components/date-picker/pickers/month-picker.js +40 -36
  127. package/dist/collection/components/date-picker/pickers/quarter-picker.js +35 -30
  128. package/dist/collection/components/date-picker/pickers/year-picker.js +16 -20
  129. package/dist/collection/components/dialog/dialog.js +4 -7
  130. package/dist/collection/components/dock/dock-button/dock-button.js +4 -9
  131. package/dist/collection/components/dock/dock.js +2 -2
  132. package/dist/collection/components/drag-handle/drag-handle.js +1 -1
  133. package/dist/collection/components/email-viewer/email-loader.js +14 -10
  134. package/dist/collection/components/email-viewer/email-viewer.js +1 -1
  135. package/dist/collection/components/email-viewer/sanitize-email-html.js +1 -4
  136. package/dist/collection/components/email-viewer/split-email-address-list.js +4 -10
  137. package/dist/collection/components/file/file.js +11 -10
  138. package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
  139. package/dist/collection/components/file-input/file-input.js +7 -8
  140. package/dist/collection/components/file-viewer/file-viewer.js +12 -9
  141. package/dist/collection/components/flex-container/flex-container.js +1 -1
  142. package/dist/collection/components/form/fields/schema-field.js +1 -1
  143. package/dist/collection/components/form/form.js +2 -5
  144. package/dist/collection/components/form/form.test-schemas.js +8 -10
  145. package/dist/collection/components/form/templates/array-field.js +7 -9
  146. package/dist/collection/components/form/templates/common.js +19 -19
  147. package/dist/collection/components/form/templates/object-field.js +1 -1
  148. package/dist/collection/components/form/validation-display.js +2 -2
  149. package/dist/collection/components/form/validators/format.js +1 -0
  150. package/dist/collection/components/form/widgets/code-editor.js +6 -9
  151. package/dist/collection/components/form/widgets/date-picker.js +1 -3
  152. package/dist/collection/components/grid/grid.js +1 -1
  153. package/dist/collection/components/header/header.js +1 -1
  154. package/dist/collection/components/help/help-content.js +1 -1
  155. package/dist/collection/components/help/help.js +2 -2
  156. package/dist/collection/components/helper-line/helper-line.js +3 -3
  157. package/dist/collection/components/hotkey/hotkey.js +1 -1
  158. package/dist/collection/components/icon/icon.js +11 -9
  159. package/dist/collection/components/icon-button/icon-button.js +1 -1
  160. package/dist/collection/components/info-tile/info-tile.js +9 -9
  161. package/dist/collection/components/input-field/input-field.js +11 -11
  162. package/dist/collection/components/list/list-renderer.js +5 -7
  163. package/dist/collection/components/list/list.js +2 -2
  164. package/dist/collection/components/list-item/list-item.js +2 -2
  165. package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
  166. package/dist/collection/components/markdown/hydrate-custom-elements.js +6 -5
  167. package/dist/collection/components/markdown/image-intersection-observer.js +9 -8
  168. package/dist/collection/components/markdown/image-markdown-plugin.js +9 -7
  169. package/dist/collection/components/markdown/link-markdown-plugin.js +11 -10
  170. package/dist/collection/components/markdown/markdown.js +6 -5
  171. package/dist/collection/components/markdown/remove-empty-paragraphs-plugin.js +4 -5
  172. package/dist/collection/components/masonry-layout/masonry-layout.js +5 -4
  173. package/dist/collection/components/menu/menu.js +48 -46
  174. package/dist/collection/components/menu-list/menu-list-renderer.js +8 -8
  175. package/dist/collection/components/menu-list/menu-list.js +1 -1
  176. package/dist/collection/components/menu-surface/menu-surface.js +6 -8
  177. package/dist/collection/components/notched-outline/notched-outline.js +1 -1
  178. package/dist/collection/components/pagination/jump/pagination-jump.js +13 -11
  179. package/dist/collection/components/pagination/pagination.js +5 -4
  180. package/dist/collection/components/picker/picker.js +25 -23
  181. package/dist/collection/components/popover/popover.js +13 -10
  182. package/dist/collection/components/popover-surface/popover-surface.js +1 -1
  183. package/dist/collection/components/portal/contains.js +9 -8
  184. package/dist/collection/components/portal/portal.js +16 -16
  185. package/dist/collection/components/profile-picture/profile-picture.js +4 -3
  186. package/dist/collection/components/progress-flow/progress-flow.js +10 -9
  187. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  188. package/dist/collection/components/radio-button-group/radio-button.js +2 -2
  189. package/dist/collection/components/scroller/scroller.css +317 -0
  190. package/dist/collection/components/scroller/scroller.js +284 -0
  191. package/dist/collection/components/select/select.js +13 -11
  192. package/dist/collection/components/select/select.template.js +1 -3
  193. package/dist/collection/components/slider/get-percentage-class.js +9 -18
  194. package/dist/collection/components/slider/slider.js +2 -2
  195. package/dist/collection/components/tab-bar/tab-bar.css +7 -289
  196. package/dist/collection/components/tab-bar/tab-bar.js +98 -128
  197. package/dist/collection/components/tab-panel/tab-panel.js +11 -8
  198. package/dist/collection/components/table/columns.js +1 -3
  199. package/dist/collection/components/table/element-pool.js +1 -1
  200. package/dist/collection/components/table/table-selection.js +6 -5
  201. package/dist/collection/components/table/table.css +15 -17
  202. package/dist/collection/components/table/table.js +44 -39
  203. package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +11 -10
  204. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-command-utils/list-utils.js +1 -1
  205. package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +6 -10
  206. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/inserter.js +37 -40
  207. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js +2 -1
  208. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link/link-plugin.js +21 -20
  209. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/menu-state-tracking-plugin.js +6 -5
  210. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/factory-helpers/detect-trigger-removal.js +15 -14
  211. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +40 -34
  212. package/dist/collection/components/text-editor/text-editor.js +1 -1
  213. package/dist/collection/components/text-editor/utils/metadata-utils.js +1 -1
  214. package/dist/collection/components/text-editor/utils/plugin-factory.js +3 -3
  215. package/dist/collection/components/tooltip/tooltip-content.js +1 -1
  216. package/dist/collection/components/tooltip/tooltip.js +2 -2
  217. package/dist/collection/global/icon-cache/factory.js +2 -3
  218. package/dist/collection/global/icon-cache/in-memory-icon-cache.js +2 -0
  219. package/dist/collection/global/translations.js +1 -3
  220. package/dist/collection/translations/fr.js +3 -3
  221. package/dist/collection/util/adapt-color-contrast.js +1 -1
  222. package/dist/collection/util/files.js +1 -1
  223. package/dist/collection/util/format-bytes.js +1 -4
  224. package/dist/collection/util/hotkeys.js +1 -0
  225. package/dist/collection/util/image-resize.js +1 -0
  226. package/dist/collection/util/keyboard-navigation.js +144 -0
  227. package/dist/collection/util/keycodes.js +2 -0
  228. package/dist/collection/util/language.js +1 -1
  229. package/dist/collection/util/make-enter-clickable.js +19 -12
  230. package/dist/collection/util/random-string.js +1 -0
  231. package/dist/collection/util/render-list-component.js +2 -4
  232. package/dist/esm/{adapt-color-contrast-Dgcw_h7C.js → adapt-color-contrast-BQoih_t0.js} +1 -1
  233. package/dist/esm/{checkbox.template-Cx_3u92S.js → checkbox.template-IDyv2bgn.js} +2 -2
  234. package/dist/esm/{component-wGVqvUmL.js → component-CVihTrav.js} +3 -3
  235. package/dist/esm/{component-7QB0OUSF.js → component-CrjPGt1I.js} +1 -1
  236. package/dist/esm/{component-D4qgwaTf.js → component-CyFeUQ0l.js} +1 -1
  237. package/dist/esm/{component-B2Vy44Z3.js → component-kP1jCDLp.js} +1 -1
  238. package/dist/esm/{files-DnkFEKoB.js → files-CKnLqPDj.js} +1 -1
  239. package/dist/esm/{format-bytes-u_sd2HMb.js → format-bytes-24yUSW40.js} +1 -4
  240. package/dist/esm/{hotkeys-BxrRWYts.js → hotkeys-DjmlD0Mw.js} +1 -0
  241. package/dist/esm/{image-resize-BTSG--2-.js → image-resize-Dv2HOgWN.js} +1 -0
  242. package/dist/esm/{image.template-wqMwmOF-.js → image.template-BGjw97m_.js} +1 -1
  243. package/dist/esm/{index-Bnc9lzk2.js → index-BU9IJqli.js} +1 -7
  244. package/dist/esm/index.js +1 -1
  245. package/dist/esm/{keycodes-C4_9qUMP.js → keycodes-DQ5DmW_Y.js} +3 -1
  246. package/dist/esm/{language-C3hECvXE.js → language-ChagAaNf.js} +1 -1
  247. package/dist/esm/lime-elements.js +3 -3
  248. package/dist/esm/limel-3d-hover-effect-glow.entry.js +2 -2
  249. package/dist/esm/limel-action-bar_3.entry.js +20 -18
  250. package/dist/esm/limel-ai-avatar.entry.js +5 -5
  251. package/dist/esm/limel-badge.entry.js +3 -3
  252. package/dist/esm/limel-banner.entry.js +2 -2
  253. package/dist/esm/limel-breadcrumbs_6.entry.js +86 -86
  254. package/dist/esm/limel-button-group.entry.js +3 -3
  255. package/dist/esm/limel-button.entry.js +4 -4
  256. package/dist/esm/limel-callout.entry.js +6 -6
  257. package/dist/esm/limel-card.entry.js +8 -7
  258. package/dist/esm/limel-chart.entry.js +5 -5
  259. package/dist/esm/limel-checkbox.entry.js +12 -10
  260. package/dist/esm/limel-chip-set.entry.js +35 -44
  261. package/dist/esm/limel-chip_2.entry.js +10 -10
  262. package/dist/esm/limel-circular-progress.entry.js +2 -2
  263. package/dist/esm/limel-code-diff.entry.js +25 -28
  264. package/dist/esm/limel-code-editor.entry.js +17 -12
  265. package/dist/esm/limel-collapsible-section.entry.js +8 -8
  266. package/dist/esm/limel-color-picker-palette.entry.js +3 -3
  267. package/dist/esm/limel-color-picker.entry.js +6 -5
  268. package/dist/esm/limel-config.entry.js +3 -3
  269. package/dist/esm/limel-date-picker.entry.js +12 -15
  270. package/dist/esm/limel-dialog.entry.js +8 -11
  271. package/dist/esm/limel-dock-button.entry.js +6 -11
  272. package/dist/esm/limel-dock.entry.js +3 -3
  273. package/dist/esm/limel-drag-handle.entry.js +6 -6
  274. package/dist/esm/limel-dynamic-label.entry.js +1 -1
  275. package/dist/esm/limel-email-viewer.entry.js +11 -17
  276. package/dist/esm/limel-file-dropzone_2.entry.js +11 -12
  277. package/dist/esm/limel-file-viewer.entry.js +1098 -1146
  278. package/dist/esm/limel-file.entry.js +17 -16
  279. package/dist/esm/limel-flatpickr-adapter.entry.js +100 -94
  280. package/dist/esm/limel-flex-container.entry.js +2 -2
  281. package/dist/esm/limel-form.entry.js +65 -50
  282. package/dist/esm/limel-grid.entry.js +2 -2
  283. package/dist/esm/limel-header.entry.js +2 -2
  284. package/dist/esm/limel-help-content.entry.js +2 -2
  285. package/dist/esm/limel-help.entry.js +3 -3
  286. package/dist/esm/limel-helper-line_3.entry.js +14 -16
  287. package/dist/esm/limel-hotkey_4.entry.js +23 -23
  288. package/dist/esm/limel-icon-button.entry.js +4 -4
  289. package/dist/esm/limel-icon.entry.js +15 -13
  290. package/dist/esm/limel-info-tile.entry.js +10 -10
  291. package/dist/esm/limel-list-item.entry.js +10 -10
  292. package/dist/esm/limel-markdown.entry.js +25 -22
  293. package/dist/esm/limel-masonry-layout.entry.js +6 -5
  294. package/dist/esm/limel-menu-item-meta.entry.js +3 -3
  295. package/dist/esm/limel-pagination-jump.entry.js +18 -16
  296. package/dist/esm/limel-pagination.entry.js +10 -9
  297. package/dist/esm/limel-picker.entry.js +32 -30
  298. package/dist/esm/limel-popover_2.entry.js +26 -22
  299. package/dist/esm/limel-profile-picture.entry.js +12 -11
  300. package/dist/esm/limel-progress-flow-item.entry.js +1 -1
  301. package/dist/esm/limel-progress-flow.entry.js +11 -10
  302. package/dist/esm/limel-prosemirror-adapter.entry.js +475 -407
  303. package/dist/esm/limel-radio-button-group.entry.js +2 -2
  304. package/dist/esm/limel-radio-button.entry.js +3 -3
  305. package/dist/esm/limel-scroller.entry.js +178 -0
  306. package/dist/esm/limel-select.entry.js +20 -20
  307. package/dist/esm/limel-shortcut.entry.js +1 -1
  308. package/dist/esm/limel-slider.entry.js +18 -27
  309. package/dist/esm/limel-snackbar.entry.js +5 -5
  310. package/dist/esm/limel-split-button.entry.js +1 -1
  311. package/dist/esm/limel-switch.entry.js +3 -3
  312. package/dist/esm/limel-tab-bar.entry.js +235 -2036
  313. package/dist/esm/limel-tab-panel.entry.js +12 -9
  314. package/dist/esm/limel-table.entry.js +527 -106
  315. package/dist/esm/limel-text-editor-link-menu.entry.js +16 -15
  316. package/dist/esm/limel-text-editor.entry.js +3 -3
  317. package/dist/esm/loader.js +3 -3
  318. package/dist/esm/{make-enter-clickable-BgTwPGeH.js → make-enter-clickable-CIf8aGSd.js} +19 -12
  319. package/dist/esm/{markdown-exporter--3_MaqwD.js → markdown-exporter-DblYRMhY.js} +1 -1
  320. package/dist/esm/{markdown-parser-DCf-3dKZ.js → markdown-parser-CAPDx7i8.js} +24 -22
  321. package/dist/esm/{moment-DQRNe8qq.js → moment-_DadZLWp.js} +1062 -833
  322. package/dist/esm/{ponyfill-ChRGk668.js → ponyfill-6YuZiAPi.js} +1 -1
  323. package/dist/esm/{random-string-JbKhhoXs.js → random-string-BrjD-ITe.js} +1 -0
  324. package/dist/esm/{render-list-component-cicbMp0l.js → render-list-component-J1IzNpbv.js} +3 -5
  325. package/dist/esm/{sv-CY-6-yEp.js → sv-DpsDSi7k.js} +31 -3
  326. package/dist/esm/{translations-DMtX4tTX.js → translations-Y4i8PVc9.js} +5 -8
  327. package/dist/lime-elements/index.esm.js +1 -1
  328. package/dist/lime-elements/lime-elements.esm.js +1 -1
  329. package/dist/lime-elements/p-02a06cf7.entry.js +1 -0
  330. package/dist/lime-elements/{p-3916b316.entry.js → p-03cb609e.entry.js} +1 -1
  331. package/dist/lime-elements/p-05038bbb.entry.js +1 -0
  332. package/dist/lime-elements/{p-835149c4.entry.js → p-0d6925f4.entry.js} +1 -1
  333. package/dist/lime-elements/p-0e13ec91.entry.js +1 -0
  334. package/dist/lime-elements/p-0ece667e.entry.js +1 -0
  335. package/dist/lime-elements/{p-19344984.entry.js → p-107654bb.entry.js} +4 -4
  336. package/dist/lime-elements/p-120ca628.entry.js +1 -0
  337. package/dist/lime-elements/{p-BwJGg-WI.js → p-1CgnIGyd.js} +4 -4
  338. package/dist/lime-elements/p-22fd1c87.entry.js +1 -0
  339. package/dist/lime-elements/p-24yUSW40.js +1 -0
  340. package/dist/lime-elements/{p-f717cd7a.entry.js → p-271662d4.entry.js} +1 -1
  341. package/dist/lime-elements/{p-c2a60508.entry.js → p-29c73bdf.entry.js} +1 -1
  342. package/dist/lime-elements/{p-deceda00.entry.js → p-2a902e77.entry.js} +1 -1
  343. package/dist/lime-elements/{p-d0cec424.entry.js → p-2b033dfa.entry.js} +1 -1
  344. package/dist/lime-elements/{p-acba5700.entry.js → p-2b2253d4.entry.js} +1 -1
  345. package/dist/lime-elements/p-2e33d2a4.entry.js +1 -0
  346. package/dist/lime-elements/p-32a050a3.entry.js +1 -0
  347. package/dist/lime-elements/{p-3735111e.entry.js → p-3cfe0eaf.entry.js} +1 -1
  348. package/dist/lime-elements/{p-fbcd99a3.entry.js → p-3d3bdf45.entry.js} +1 -1
  349. package/dist/lime-elements/p-45461ec5.entry.js +1 -0
  350. package/dist/lime-elements/p-45c39fb4.entry.js +1 -0
  351. package/dist/lime-elements/p-45fde7a1.entry.js +1 -0
  352. package/dist/lime-elements/p-48afa6b7.entry.js +1 -0
  353. package/dist/lime-elements/{p-f04f7c8e.entry.js → p-4a88d365.entry.js} +1 -1
  354. package/dist/lime-elements/p-4b75e653.entry.js +1 -0
  355. package/dist/lime-elements/{p-5698e493.entry.js → p-4ecbc9f4.entry.js} +1 -1
  356. package/dist/lime-elements/{p-2e568c56.entry.js → p-54a9f48f.entry.js} +1 -1
  357. package/dist/lime-elements/{p-0fba64eb.entry.js → p-5df21b25.entry.js} +2 -2
  358. package/dist/lime-elements/p-5e448070.entry.js +1 -0
  359. package/dist/lime-elements/{p-408c4dcb.entry.js → p-5f5c6e7d.entry.js} +1 -1
  360. package/dist/lime-elements/{p-052c3bc6.entry.js → p-681cb6de.entry.js} +1 -1
  361. package/dist/lime-elements/{p-ChRGk668.js → p-6YuZiAPi.js} +3 -3
  362. package/dist/lime-elements/{p-90df3e1b.entry.js → p-6d9961f7.entry.js} +1 -1
  363. package/dist/lime-elements/p-74060535.entry.js +159 -0
  364. package/dist/lime-elements/{p-74bd0c1a.entry.js → p-7b4351f6.entry.js} +1 -1
  365. package/dist/lime-elements/{p-3fd7e8aa.entry.js → p-7eab1341.entry.js} +1 -1
  366. package/dist/lime-elements/p-7fa85785.entry.js +23 -0
  367. package/dist/lime-elements/{p-35fa1063.entry.js → p-85318636.entry.js} +1 -1
  368. package/dist/lime-elements/{p-4ffbfc79.entry.js → p-8ac79ef5.entry.js} +1 -1
  369. package/dist/lime-elements/{p-4902fb3f.entry.js → p-9218fa6a.entry.js} +1 -1
  370. package/dist/lime-elements/{p-38b09f87.entry.js → p-9415411e.entry.js} +1 -1
  371. package/dist/lime-elements/{p-be8610ff.entry.js → p-958396b5.entry.js} +1 -1
  372. package/dist/lime-elements/p-95ccd9e7.entry.js +1 -0
  373. package/dist/lime-elements/p-970e0810.entry.js +1 -0
  374. package/dist/lime-elements/{p-cb407bef.entry.js → p-9afa4721.entry.js} +1 -1
  375. package/dist/lime-elements/{p-54dcf46f.entry.js → p-9c8c2fb7.entry.js} +1 -1
  376. package/dist/lime-elements/p-9e084e7c.entry.js +1 -0
  377. package/dist/lime-elements/{p-B8hoCfhT.js → p-B3YP9GOq.js} +1 -1
  378. package/dist/lime-elements/{p-Dgcw_h7C.js → p-BQoih_t0.js} +1 -1
  379. package/dist/lime-elements/{p-Bnc9lzk2.js → p-BU9IJqli.js} +1 -1
  380. package/dist/lime-elements/{p-BN1-aIOw.js → p-BZXGwiAr.js} +1 -1
  381. package/dist/lime-elements/{p-CGVVDGcv.js → p-Bkvc4sus.js} +1 -1
  382. package/dist/lime-elements/{p-BPzhuHcl.js → p-Bvyt2bmV.js} +1 -1
  383. package/dist/lime-elements/{p-DZkKQUDM.js → p-C1FFnUvf.js} +3 -3
  384. package/dist/lime-elements/{p-BgTwPGeH.js → p-CIf8aGSd.js} +1 -1
  385. package/dist/lime-elements/{p-C3hECvXE.js → p-ChagAaNf.js} +1 -1
  386. package/dist/lime-elements/{p-C9yTLqR8.js → p-CmtleG1y.js} +1 -1
  387. package/dist/lime-elements/{p-C4_9qUMP.js → p-DQ5DmW_Y.js} +1 -1
  388. package/dist/lime-elements/p-DTcfed02.js +3 -0
  389. package/dist/lime-elements/{p-BY85K-4J.js → p-DqQOawxc.js} +1 -1
  390. package/dist/lime-elements/{p-CC4Usa-Q.js → p-I0PrvthC.js} +1 -1
  391. package/dist/lime-elements/p-N9vxZMhe.js +1 -0
  392. package/dist/lime-elements/{p-DsDkl4Sy.js → p-ZDFVISfu.js} +3 -3
  393. package/dist/lime-elements/p-a1c69e0c.entry.js +1 -0
  394. package/dist/lime-elements/{p-2daf0482.entry.js → p-a1d1470c.entry.js} +1 -1
  395. package/dist/lime-elements/{p-cef66e53.entry.js → p-a2e6f16e.entry.js} +1 -1
  396. package/dist/lime-elements/{p-36ce4fbc.entry.js → p-a42f8c2d.entry.js} +1 -1
  397. package/dist/lime-elements/p-a550ba18.entry.js +1 -0
  398. package/dist/lime-elements/{p-d146feda.entry.js → p-a65eb58e.entry.js} +1 -1
  399. package/dist/lime-elements/{p-03fb2603.entry.js → p-b22b52a1.entry.js} +1 -1
  400. package/dist/lime-elements/{p-c2a3ca7c.entry.js → p-b6d39581.entry.js} +1 -1
  401. package/dist/lime-elements/{p-8475a3b8.entry.js → p-c439b68b.entry.js} +1 -1
  402. package/dist/lime-elements/p-d19c7a3a.entry.js +1 -0
  403. package/dist/lime-elements/{p-d3bd4b80.entry.js → p-d1b7cc55.entry.js} +3 -3
  404. package/dist/lime-elements/{p-7cbf50fc.entry.js → p-d1e5dd12.entry.js} +1 -1
  405. package/dist/lime-elements/p-de4719a6.entry.js +1 -0
  406. package/dist/lime-elements/{p-b81a2728.entry.js → p-e02e2c5f.entry.js} +1 -1
  407. package/dist/lime-elements/{p-d351b9ae.entry.js → p-e6a34047.entry.js} +1 -1
  408. package/dist/lime-elements/p-eF09GxA_.js +1 -0
  409. package/dist/lime-elements/{p-8fa9c9ea.entry.js → p-ee719744.entry.js} +1 -1
  410. package/dist/lime-elements/p-f3cae1e7.entry.js +1 -0
  411. package/dist/lime-elements/{p-8115da75.entry.js → p-f4a0b1bc.entry.js} +1 -1
  412. package/dist/lime-elements/{p-4855dc9b.entry.js → p-f82f72e7.entry.js} +1 -1
  413. package/dist/lime-elements/{p-2d84ea04.entry.js → p-f97ec7a5.entry.js} +1 -1
  414. package/dist/lime-elements/{p-21109d9b.entry.js → p-fdd674fc.entry.js} +1 -1
  415. package/dist/lime-elements/{p-459eea13.entry.js → p-fdec09e9.entry.js} +1 -1
  416. package/dist/lime-elements/{p-2f57c3fa.entry.js → p-fe492ff3.entry.js} +1 -1
  417. package/dist/lime-elements/{p-65cded0e.entry.js → p-ff1a8b2e.entry.js} +1 -1
  418. package/dist/types/components/chip-set/chip-set-input-helpers.d.ts +1 -1
  419. package/dist/types/components/pagination/jump/pagination-jump.d.ts +1 -1
  420. package/dist/types/components/scroller/scroller.d.ts +67 -0
  421. package/dist/types/components/tab-bar/tab-bar.d.ts +23 -21
  422. package/dist/types/components.d.ts +132 -0
  423. package/dist/types/global/icon-cache/factory.d.ts +2 -2
  424. package/dist/types/global/translations.d.ts +2 -2
  425. package/dist/types/util/keyboard-navigation.d.ts +105 -0
  426. package/dist/types/util/keycodes.d.ts +2 -0
  427. package/package.json +12 -12
  428. package/dist/lime-elements/p-1e93473a.entry.js +0 -1
  429. package/dist/lime-elements/p-20658306.entry.js +0 -1
  430. package/dist/lime-elements/p-26c5c6b9.entry.js +0 -1
  431. package/dist/lime-elements/p-452b9b01.entry.js +0 -1
  432. package/dist/lime-elements/p-4aae63bd.entry.js +0 -1
  433. package/dist/lime-elements/p-507cc8a1.entry.js +0 -159
  434. package/dist/lime-elements/p-531b6a64.entry.js +0 -1
  435. package/dist/lime-elements/p-54793c06.entry.js +0 -1
  436. package/dist/lime-elements/p-5d974afa.entry.js +0 -1
  437. package/dist/lime-elements/p-66b125f2.entry.js +0 -1
  438. package/dist/lime-elements/p-7e212fa7.entry.js +0 -1
  439. package/dist/lime-elements/p-82696d24.entry.js +0 -1
  440. package/dist/lime-elements/p-9ac39039.entry.js +0 -1
  441. package/dist/lime-elements/p-9b631363.entry.js +0 -1
  442. package/dist/lime-elements/p-DQJU9gzh.js +0 -1
  443. package/dist/lime-elements/p-DpJgXIWf.js +0 -1
  444. package/dist/lime-elements/p-a1de9bbe.entry.js +0 -1
  445. package/dist/lime-elements/p-a71f6e87.entry.js +0 -67
  446. package/dist/lime-elements/p-bd7b3f8e.entry.js +0 -1
  447. package/dist/lime-elements/p-c72e5007.entry.js +0 -1
  448. package/dist/lime-elements/p-cafec335.entry.js +0 -1
  449. package/dist/lime-elements/p-d6dadc61.entry.js +0 -1
  450. package/dist/lime-elements/p-d93b7b9f.entry.js +0 -23
  451. package/dist/lime-elements/p-dc9cd793.entry.js +0 -1
  452. package/dist/lime-elements/p-dd62042a.entry.js +0 -1
  453. package/dist/lime-elements/p-u_sd2HMb.js +0 -1
  454. package/dist/lime-elements/p-zo6O9LC9.js +0 -3
  455. /package/dist/lime-elements/{p-JbKhhoXs.js → p-BrjD-ITe.js} +0 -0
  456. /package/dist/lime-elements/{p-BxrRWYts.js → p-DjmlD0Mw.js} +0 -0
  457. /package/dist/lime-elements/{p-BTSG--2-.js → p-Dv2HOgWN.js} +0 -0
@@ -124,6 +124,7 @@ function requireMoment () {
124
124
  nullInput: false,
125
125
  invalidEra: null,
126
126
  invalidMonth: null,
127
+ invalidOffset: null,
127
128
  invalidFormat: false,
128
129
  userInvalidated: false,
129
130
  iso: false,
@@ -161,7 +162,7 @@ function requireMoment () {
161
162
  };
162
163
  }
163
164
 
164
- function isValid(m) {
165
+ function isValid$2(m) {
165
166
  var flags = null,
166
167
  parsedParts = false,
167
168
  isNowValid = m._d && !isNaN(m._d.getTime());
@@ -175,6 +176,7 @@ function requireMoment () {
175
176
  !flags.empty &&
176
177
  !flags.invalidEra &&
177
178
  !flags.invalidMonth &&
179
+ !flags.invalidOffset &&
178
180
  !flags.invalidWeekday &&
179
181
  !flags.weekdayMismatch &&
180
182
  !flags.nullInput &&
@@ -197,7 +199,7 @@ function requireMoment () {
197
199
  return m._isValid;
198
200
  }
199
201
 
200
- function createInvalid(flags) {
202
+ function createInvalid$1(flags) {
201
203
  var m = createUTC(NaN);
202
204
  if (flags != null) {
203
205
  extend(getParsingFlags(m), flags);
@@ -343,7 +345,7 @@ function requireMoment () {
343
345
  hooks.deprecationHandler(name, msg);
344
346
  }
345
347
  if (!deprecations[name]) {
346
- warn(msg);
348
+ warn(msg + '\n' + new Error().stack);
347
349
  deprecations[name] = true;
348
350
  }
349
351
  }
@@ -358,93 +360,111 @@ function requireMoment () {
358
360
  );
359
361
  }
360
362
 
361
- function set(config) {
362
- var prop, i;
363
- for (i in config) {
364
- if (hasOwnProp(config, i)) {
365
- prop = config[i];
366
- if (isFunction(prop)) {
367
- this[i] = prop;
368
- } else {
369
- this['_' + i] = prop;
370
- }
371
- }
372
- }
373
- this._config = config;
374
- // Lenient ordinal parsing accepts just a number in addition to
375
- // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
376
- // TODO: Remove "ordinalParse" fallback in next major release.
377
- this._dayOfMonthOrdinalParseLenient = new RegExp(
378
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
379
- '|' +
380
- /\d{1,2}/.source
381
- );
363
+ var aliases = {
364
+ D: 'date',
365
+ dates: 'date',
366
+ date: 'date',
367
+ d: 'day',
368
+ days: 'day',
369
+ day: 'day',
370
+ e: 'weekday',
371
+ weekdays: 'weekday',
372
+ weekday: 'weekday',
373
+ E: 'isoWeekday',
374
+ isoweekdays: 'isoWeekday',
375
+ isoweekday: 'isoWeekday',
376
+ DDD: 'dayOfYear',
377
+ dayofyears: 'dayOfYear',
378
+ dayofyear: 'dayOfYear',
379
+ h: 'hour',
380
+ hours: 'hour',
381
+ hour: 'hour',
382
+ ms: 'millisecond',
383
+ milliseconds: 'millisecond',
384
+ millisecond: 'millisecond',
385
+ m: 'minute',
386
+ minutes: 'minute',
387
+ minute: 'minute',
388
+ M: 'month',
389
+ months: 'month',
390
+ month: 'month',
391
+ Q: 'quarter',
392
+ quarters: 'quarter',
393
+ quarter: 'quarter',
394
+ s: 'second',
395
+ seconds: 'second',
396
+ second: 'second',
397
+ gg: 'weekYear',
398
+ weekyears: 'weekYear',
399
+ weekyear: 'weekYear',
400
+ GG: 'isoWeekYear',
401
+ isoweekyears: 'isoWeekYear',
402
+ isoweekyear: 'isoWeekYear',
403
+ w: 'week',
404
+ weeks: 'week',
405
+ week: 'week',
406
+ W: 'isoWeek',
407
+ isoweeks: 'isoWeek',
408
+ isoweek: 'isoWeek',
409
+ y: 'year',
410
+ years: 'year',
411
+ year: 'year',
412
+ };
413
+
414
+ function normalizeUnits(units) {
415
+ return typeof units === 'string'
416
+ ? aliases[units] || aliases[units.toLowerCase()]
417
+ : undefined;
382
418
  }
383
419
 
384
- function mergeConfigs(parentConfig, childConfig) {
385
- var res = extend({}, parentConfig),
420
+ function normalizeObjectUnits(inputObject) {
421
+ var normalizedInput = {},
422
+ normalizedProp,
386
423
  prop;
387
- for (prop in childConfig) {
388
- if (hasOwnProp(childConfig, prop)) {
389
- if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
390
- res[prop] = {};
391
- extend(res[prop], parentConfig[prop]);
392
- extend(res[prop], childConfig[prop]);
393
- } else if (childConfig[prop] != null) {
394
- res[prop] = childConfig[prop];
395
- } else {
396
- delete res[prop];
424
+
425
+ for (prop in inputObject) {
426
+ if (hasOwnProp(inputObject, prop)) {
427
+ normalizedProp = normalizeUnits(prop);
428
+ if (normalizedProp) {
429
+ normalizedInput[normalizedProp] = inputObject[prop];
397
430
  }
398
431
  }
399
432
  }
400
- for (prop in parentConfig) {
401
- if (
402
- hasOwnProp(parentConfig, prop) &&
403
- !hasOwnProp(childConfig, prop) &&
404
- isObject(parentConfig[prop])
405
- ) {
406
- // make sure changes to properties don't modify parent config
407
- res[prop] = extend({}, res[prop]);
408
- }
409
- }
410
- return res;
411
- }
412
-
413
- function Locale(config) {
414
- if (config != null) {
415
- this.set(config);
416
- }
417
- }
418
-
419
- var keys;
420
433
 
421
- if (Object.keys) {
422
- keys = Object.keys;
423
- } else {
424
- keys = function (obj) {
425
- var i,
426
- res = [];
427
- for (i in obj) {
428
- if (hasOwnProp(obj, i)) {
429
- res.push(i);
430
- }
431
- }
432
- return res;
433
- };
434
+ return normalizedInput;
434
435
  }
435
436
 
436
- var defaultCalendar = {
437
- sameDay: '[Today at] LT',
438
- nextDay: '[Tomorrow at] LT',
439
- nextWeek: 'dddd [at] LT',
440
- lastDay: '[Yesterday at] LT',
441
- lastWeek: '[Last] dddd [at] LT',
442
- sameElse: 'L',
437
+ var priorities = {
438
+ date: 9,
439
+ day: 11,
440
+ weekday: 11,
441
+ isoWeekday: 11,
442
+ dayOfYear: 4,
443
+ hour: 13,
444
+ millisecond: 16,
445
+ minute: 14,
446
+ month: 8,
447
+ quarter: 7,
448
+ second: 15,
449
+ weekYear: 1,
450
+ isoWeekYear: 1,
451
+ week: 5,
452
+ isoWeek: 5,
453
+ year: 1,
443
454
  };
444
455
 
445
- function calendar(key, mom, now) {
446
- var output = this._calendar[key] || this._calendar['sameElse'];
447
- return isFunction(output) ? output.call(mom, now) : output;
456
+ function getPrioritizedUnits(unitsObj) {
457
+ var units = [],
458
+ u;
459
+ for (u in unitsObj) {
460
+ if (hasOwnProp(unitsObj, u)) {
461
+ units.push({ unit: u, priority: priorities[u] });
462
+ }
463
+ }
464
+ units.sort(function (a, b) {
465
+ return a.priority - b.priority;
466
+ });
467
+ return units;
448
468
  }
449
469
 
450
470
  function zeroFill(number, targetLength, forceSign) {
@@ -459,7 +479,7 @@ function requireMoment () {
459
479
  }
460
480
 
461
481
  var formattingTokens =
462
- /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
482
+ /(\[[^\[]*\])|(\\e)|(\\)?(eHHmm|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
463
483
  localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
464
484
  formatFunctions = {},
465
485
  formatTokenFunctions = {};
@@ -532,10 +552,12 @@ function requireMoment () {
532
552
  }
533
553
 
534
554
  format = expandFormat(format, m.localeData());
535
- formatFunctions[format] =
536
- formatFunctions[format] || makeFormatFunction(format);
555
+ var cacheKey = '$' + format;
556
+ if (!hasOwnProp(formatFunctions, cacheKey)) {
557
+ formatFunctions[cacheKey] = makeFormatFunction(format);
558
+ }
537
559
 
538
- return formatFunctions[format](m);
560
+ return formatFunctions[cacheKey](m);
539
561
  }
540
562
 
541
563
  function expandFormat(format, locale) {
@@ -558,250 +580,64 @@ function requireMoment () {
558
580
  return format;
559
581
  }
560
582
 
561
- var defaultLongDateFormat = {
562
- LTS: 'h:mm:ss A',
563
- LT: 'h:mm A',
564
- L: 'MM/DD/YYYY',
565
- LL: 'MMMM D, YYYY',
566
- LLL: 'MMMM D, YYYY h:mm A',
567
- LLLL: 'dddd, MMMM D, YYYY h:mm A',
568
- };
569
-
570
- function longDateFormat(key) {
571
- var format = this._longDateFormat[key],
572
- formatUpper = this._longDateFormat[key.toUpperCase()];
573
-
574
- if (format || !formatUpper) {
575
- return format;
576
- }
583
+ var match1 = /\d/, // 0 - 9
584
+ match2 = /\d\d/, // 00 - 99
585
+ match3 = /\d{3}/, // 000 - 999
586
+ match4 = /\d{4}/, // 0000 - 9999
587
+ match6 = /[+-]?\d{6}/, // -999999 - 999999
588
+ match1to2 = /\d\d?/, // 0 - 99
589
+ match3to4 = /\d\d\d\d?/, // 999 - 9999
590
+ match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
591
+ match1to3 = /\d{1,3}/, // 0 - 999
592
+ match1to4 = /\d{1,4}/, // 0 - 9999
593
+ match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
594
+ matchUnsigned = /\d+/, // 0 - inf
595
+ matchSigned = /[+-]?\d+/, // -inf - inf
596
+ matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
597
+ matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
598
+ matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
599
+ // any word (or two) characters or numbers including two/three word month in arabic.
600
+ // includes scottish gaelic two word and hyphenated months
601
+ matchWord =
602
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
603
+ match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
604
+ match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
605
+ regexes;
577
606
 
578
- this._longDateFormat[key] = formatUpper
579
- .match(formattingTokens)
580
- .map(function (tok) {
581
- if (
582
- tok === 'MMMM' ||
583
- tok === 'MM' ||
584
- tok === 'DD' ||
585
- tok === 'dddd'
586
- ) {
587
- return tok.slice(1);
588
- }
589
- return tok;
590
- })
591
- .join('');
607
+ regexes = {};
592
608
 
593
- return this._longDateFormat[key];
609
+ function addRegexToken(token, regex, strictRegex) {
610
+ regexes[token] = isFunction(regex)
611
+ ? regex
612
+ : function (isStrict, localeData) {
613
+ return isStrict && strictRegex ? strictRegex : regex;
614
+ };
594
615
  }
595
616
 
596
- var defaultInvalidDate = 'Invalid date';
617
+ function getParseRegexForToken(token, config) {
618
+ if (!hasOwnProp(regexes, token)) {
619
+ return new RegExp(unescapeFormat(token));
620
+ }
597
621
 
598
- function invalidDate() {
599
- return this._invalidDate;
622
+ return regexes[token](config._strict, config._locale);
600
623
  }
601
624
 
602
- var defaultOrdinal = '%d',
603
- defaultDayOfMonthOrdinalParse = /\d{1,2}/;
625
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
626
+ function unescapeFormat(s) {
627
+ return regexEscape(
628
+ s
629
+ .replace('\\', '')
630
+ .replace(
631
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
632
+ function (matched, p1, p2, p3, p4) {
633
+ return p1 || p2 || p3 || p4;
634
+ }
635
+ )
636
+ );
637
+ }
604
638
 
605
- function ordinal(number) {
606
- return this._ordinal.replace('%d', number);
607
- }
608
-
609
- var defaultRelativeTime = {
610
- future: 'in %s',
611
- past: '%s ago',
612
- s: 'a few seconds',
613
- ss: '%d seconds',
614
- m: 'a minute',
615
- mm: '%d minutes',
616
- h: 'an hour',
617
- hh: '%d hours',
618
- d: 'a day',
619
- dd: '%d days',
620
- w: 'a week',
621
- ww: '%d weeks',
622
- M: 'a month',
623
- MM: '%d months',
624
- y: 'a year',
625
- yy: '%d years',
626
- };
627
-
628
- function relativeTime(number, withoutSuffix, string, isFuture) {
629
- var output = this._relativeTime[string];
630
- return isFunction(output)
631
- ? output(number, withoutSuffix, string, isFuture)
632
- : output.replace(/%d/i, number);
633
- }
634
-
635
- function pastFuture(diff, output) {
636
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
637
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
638
- }
639
-
640
- var aliases = {
641
- D: 'date',
642
- dates: 'date',
643
- date: 'date',
644
- d: 'day',
645
- days: 'day',
646
- day: 'day',
647
- e: 'weekday',
648
- weekdays: 'weekday',
649
- weekday: 'weekday',
650
- E: 'isoWeekday',
651
- isoweekdays: 'isoWeekday',
652
- isoweekday: 'isoWeekday',
653
- DDD: 'dayOfYear',
654
- dayofyears: 'dayOfYear',
655
- dayofyear: 'dayOfYear',
656
- h: 'hour',
657
- hours: 'hour',
658
- hour: 'hour',
659
- ms: 'millisecond',
660
- milliseconds: 'millisecond',
661
- millisecond: 'millisecond',
662
- m: 'minute',
663
- minutes: 'minute',
664
- minute: 'minute',
665
- M: 'month',
666
- months: 'month',
667
- month: 'month',
668
- Q: 'quarter',
669
- quarters: 'quarter',
670
- quarter: 'quarter',
671
- s: 'second',
672
- seconds: 'second',
673
- second: 'second',
674
- gg: 'weekYear',
675
- weekyears: 'weekYear',
676
- weekyear: 'weekYear',
677
- GG: 'isoWeekYear',
678
- isoweekyears: 'isoWeekYear',
679
- isoweekyear: 'isoWeekYear',
680
- w: 'week',
681
- weeks: 'week',
682
- week: 'week',
683
- W: 'isoWeek',
684
- isoweeks: 'isoWeek',
685
- isoweek: 'isoWeek',
686
- y: 'year',
687
- years: 'year',
688
- year: 'year',
689
- };
690
-
691
- function normalizeUnits(units) {
692
- return typeof units === 'string'
693
- ? aliases[units] || aliases[units.toLowerCase()]
694
- : undefined;
695
- }
696
-
697
- function normalizeObjectUnits(inputObject) {
698
- var normalizedInput = {},
699
- normalizedProp,
700
- prop;
701
-
702
- for (prop in inputObject) {
703
- if (hasOwnProp(inputObject, prop)) {
704
- normalizedProp = normalizeUnits(prop);
705
- if (normalizedProp) {
706
- normalizedInput[normalizedProp] = inputObject[prop];
707
- }
708
- }
709
- }
710
-
711
- return normalizedInput;
712
- }
713
-
714
- var priorities = {
715
- date: 9,
716
- day: 11,
717
- weekday: 11,
718
- isoWeekday: 11,
719
- dayOfYear: 4,
720
- hour: 13,
721
- millisecond: 16,
722
- minute: 14,
723
- month: 8,
724
- quarter: 7,
725
- second: 15,
726
- weekYear: 1,
727
- isoWeekYear: 1,
728
- week: 5,
729
- isoWeek: 5,
730
- year: 1,
731
- };
732
-
733
- function getPrioritizedUnits(unitsObj) {
734
- var units = [],
735
- u;
736
- for (u in unitsObj) {
737
- if (hasOwnProp(unitsObj, u)) {
738
- units.push({ unit: u, priority: priorities[u] });
739
- }
740
- }
741
- units.sort(function (a, b) {
742
- return a.priority - b.priority;
743
- });
744
- return units;
745
- }
746
-
747
- var match1 = /\d/, // 0 - 9
748
- match2 = /\d\d/, // 00 - 99
749
- match3 = /\d{3}/, // 000 - 999
750
- match4 = /\d{4}/, // 0000 - 9999
751
- match6 = /[+-]?\d{6}/, // -999999 - 999999
752
- match1to2 = /\d\d?/, // 0 - 99
753
- match3to4 = /\d\d\d\d?/, // 999 - 9999
754
- match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
755
- match1to3 = /\d{1,3}/, // 0 - 999
756
- match1to4 = /\d{1,4}/, // 0 - 9999
757
- match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
758
- matchUnsigned = /\d+/, // 0 - inf
759
- matchSigned = /[+-]?\d+/, // -inf - inf
760
- matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
761
- matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
762
- matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
763
- // any word (or two) characters or numbers including two/three word month in arabic.
764
- // includes scottish gaelic two word and hyphenated months
765
- matchWord =
766
- /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
767
- match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
768
- match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
769
- regexes;
770
-
771
- regexes = {};
772
-
773
- function addRegexToken(token, regex, strictRegex) {
774
- regexes[token] = isFunction(regex)
775
- ? regex
776
- : function (isStrict, localeData) {
777
- return isStrict && strictRegex ? strictRegex : regex;
778
- };
779
- }
780
-
781
- function getParseRegexForToken(token, config) {
782
- if (!hasOwnProp(regexes, token)) {
783
- return new RegExp(unescapeFormat(token));
784
- }
785
-
786
- return regexes[token](config._strict, config._locale);
787
- }
788
-
789
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
790
- function unescapeFormat(s) {
791
- return regexEscape(
792
- s
793
- .replace('\\', '')
794
- .replace(
795
- /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
796
- function (matched, p1, p2, p3, p4) {
797
- return p1 || p2 || p3 || p4;
798
- }
799
- )
800
- );
801
- }
802
-
803
- function regexEscape(s) {
804
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
639
+ function regexEscape(s) {
640
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
805
641
  }
806
642
 
807
643
  function absFloor(number) {
@@ -933,12 +769,12 @@ function requireMoment () {
933
769
  hooks.updateOffset(this, keepTime);
934
770
  return this;
935
771
  } else {
936
- return get(this, unit);
772
+ return get$2(this, unit);
937
773
  }
938
774
  };
939
775
  }
940
776
 
941
- function get(mom, unit) {
777
+ function get$2(mom, unit) {
942
778
  if (!mom.isValid()) {
943
779
  return NaN;
944
780
  }
@@ -1038,7 +874,7 @@ function requireMoment () {
1038
874
  return this;
1039
875
  }
1040
876
 
1041
- function mod(n, x) {
877
+ function mod$1(n, x) {
1042
878
  return ((n % x) + x) % x;
1043
879
  }
1044
880
 
@@ -1063,7 +899,7 @@ function requireMoment () {
1063
899
  if (isNaN(year) || isNaN(month)) {
1064
900
  return NaN;
1065
901
  }
1066
- var modMonth = mod(month, 12);
902
+ var modMonth = mod$1(month, 12);
1067
903
  year += (month - modMonth) / 12;
1068
904
  return modMonth === 1
1069
905
  ? isLeapYear(year)
@@ -1121,7 +957,26 @@ function requireMoment () {
1121
957
  'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
1122
958
  MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
1123
959
  defaultMonthsShortRegex = matchWord,
1124
- defaultMonthsRegex = matchWord;
960
+ defaultMonthsRegex = matchWord,
961
+ monthsParseProperties = [
962
+ 'monthsParse',
963
+ 'longMonthsParse',
964
+ 'shortMonthsParse',
965
+ 'monthsRegex',
966
+ 'monthsShortRegex',
967
+ 'monthsStrictRegex',
968
+ 'monthsShortStrictRegex',
969
+ ];
970
+
971
+ function clearMonthsParseCache(locale, config) {
972
+ var i, prop;
973
+ for (i = 0; i < monthsParseProperties.length; i++) {
974
+ prop = monthsParseProperties[i];
975
+ if (!hasOwnProp(config, prop)) {
976
+ delete locale['_' + prop];
977
+ }
978
+ }
979
+ }
1125
980
 
1126
981
  function localeMonths(m, format) {
1127
982
  if (!m) {
@@ -1151,7 +1006,7 @@ function requireMoment () {
1151
1006
  ][m.month()];
1152
1007
  }
1153
1008
 
1154
- function handleStrictParse(monthName, format, strict) {
1009
+ function handleStrictParse$1(monthName, format, strict) {
1155
1010
  var i,
1156
1011
  ii,
1157
1012
  mom,
@@ -1202,7 +1057,7 @@ function requireMoment () {
1202
1057
  var i, mom, regex;
1203
1058
 
1204
1059
  if (this._monthsParseExact) {
1205
- return handleStrictParse.call(this, monthName, format, strict);
1060
+ return handleStrictParse$1.call(this, monthName, format, strict);
1206
1061
  }
1207
1062
 
1208
1063
  if (!this._monthsParse) {
@@ -1287,7 +1142,7 @@ function requireMoment () {
1287
1142
  hooks.updateOffset(this, true);
1288
1143
  return this;
1289
1144
  } else {
1290
- return get(this, 'Month');
1145
+ return get$2(this, 'Month');
1291
1146
  }
1292
1147
  }
1293
1148
 
@@ -1375,182 +1230,39 @@ function requireMoment () {
1375
1230
  );
1376
1231
  }
1377
1232
 
1378
- function createDate(y, m, d, h, M, s, ms) {
1379
- // can't just apply() to create a date:
1380
- // https://stackoverflow.com/q/181348
1381
- var date;
1382
- // the date constructor remaps years 0-99 to 1900-1999
1383
- if (y < 100 && y >= 0) {
1384
- // preserve leap years using a full 400 year cycle, then reset
1385
- date = new Date(y + 400, m, d, h, M, s, ms);
1386
- if (isFinite(date.getFullYear())) {
1387
- date.setFullYear(y);
1388
- }
1389
- } else {
1390
- date = new Date(y, m, d, h, M, s, ms);
1391
- }
1392
-
1393
- return date;
1394
- }
1233
+ // FORMATTING
1395
1234
 
1396
- function createUTCDate(y) {
1397
- var date, args;
1398
- // the Date.UTC function remaps years 0-99 to 1900-1999
1399
- if (y < 100 && y >= 0) {
1400
- args = Array.prototype.slice.call(arguments);
1401
- // preserve leap years using a full 400 year cycle, then reset
1402
- args[0] = y + 400;
1403
- date = new Date(Date.UTC.apply(null, args));
1404
- if (isFinite(date.getUTCFullYear())) {
1405
- date.setUTCFullYear(y);
1406
- }
1407
- } else {
1408
- date = new Date(Date.UTC.apply(null, arguments));
1409
- }
1235
+ addFormatToken('d', 0, 'do', 'day');
1410
1236
 
1411
- return date;
1412
- }
1237
+ addFormatToken('dd', 0, 0, function (format) {
1238
+ return this.localeData().weekdaysMin(this, format);
1239
+ });
1413
1240
 
1414
- // start-of-first-week - start-of-year
1415
- function firstWeekOffset(year, dow, doy) {
1416
- var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1417
- fwd = 7 + dow - doy,
1418
- // first-week day local weekday -- which local weekday is fwd
1419
- fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1241
+ addFormatToken('ddd', 0, 0, function (format) {
1242
+ return this.localeData().weekdaysShort(this, format);
1243
+ });
1420
1244
 
1421
- return -fwdlw + fwd - 1;
1422
- }
1423
-
1424
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1425
- function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1426
- var localWeekday = (7 + weekday - dow) % 7,
1427
- weekOffset = firstWeekOffset(year, dow, doy),
1428
- dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1429
- resYear,
1430
- resDayOfYear;
1431
-
1432
- if (dayOfYear <= 0) {
1433
- resYear = year - 1;
1434
- resDayOfYear = daysInYear(resYear) + dayOfYear;
1435
- } else if (dayOfYear > daysInYear(year)) {
1436
- resYear = year + 1;
1437
- resDayOfYear = dayOfYear - daysInYear(year);
1438
- } else {
1439
- resYear = year;
1440
- resDayOfYear = dayOfYear;
1441
- }
1442
-
1443
- return {
1444
- year: resYear,
1445
- dayOfYear: resDayOfYear,
1446
- };
1447
- }
1448
-
1449
- function weekOfYear(mom, dow, doy) {
1450
- var weekOffset = firstWeekOffset(mom.year(), dow, doy),
1451
- week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
1452
- resWeek,
1453
- resYear;
1454
-
1455
- if (week < 1) {
1456
- resYear = mom.year() - 1;
1457
- resWeek = week + weeksInYear(resYear, dow, doy);
1458
- } else if (week > weeksInYear(mom.year(), dow, doy)) {
1459
- resWeek = week - weeksInYear(mom.year(), dow, doy);
1460
- resYear = mom.year() + 1;
1461
- } else {
1462
- resYear = mom.year();
1463
- resWeek = week;
1464
- }
1465
-
1466
- return {
1467
- week: resWeek,
1468
- year: resYear,
1469
- };
1470
- }
1471
-
1472
- function weeksInYear(year, dow, doy) {
1473
- var weekOffset = firstWeekOffset(year, dow, doy),
1474
- weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
1475
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
1476
- }
1477
-
1478
- // FORMATTING
1479
-
1480
- addFormatToken('w', ['ww', 2], 'wo', 'week');
1481
- addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1482
-
1483
- // PARSING
1484
-
1485
- addRegexToken('w', match1to2, match1to2NoLeadingZero);
1486
- addRegexToken('ww', match1to2, match2);
1487
- addRegexToken('W', match1to2, match1to2NoLeadingZero);
1488
- addRegexToken('WW', match1to2, match2);
1489
-
1490
- addWeekParseToken(
1491
- ['w', 'ww', 'W', 'WW'],
1492
- function (input, week, config, token) {
1493
- week[token.substr(0, 1)] = toInt(input);
1494
- }
1495
- );
1496
-
1497
- // HELPERS
1498
-
1499
- // LOCALES
1500
-
1501
- function localeWeek(mom) {
1502
- return weekOfYear(mom, this._week.dow, this._week.doy).week;
1503
- }
1504
-
1505
- var defaultLocaleWeek = {
1506
- dow: 0, // Sunday is the first day of the week.
1507
- doy: 6, // The week that contains Jan 6th is the first week of the year.
1508
- };
1509
-
1510
- function localeFirstDayOfWeek() {
1511
- return this._week.dow;
1512
- }
1513
-
1514
- function localeFirstDayOfYear() {
1515
- return this._week.doy;
1516
- }
1517
-
1518
- // MOMENTS
1519
-
1520
- function getSetWeek(input) {
1521
- var week = this.localeData().week(this);
1522
- return input == null ? week : this.add((input - week) * 7, 'd');
1523
- }
1524
-
1525
- function getSetISOWeek(input) {
1526
- var week = weekOfYear(this, 1, 4).week;
1527
- return input == null ? week : this.add((input - week) * 7, 'd');
1528
- }
1529
-
1530
- // FORMATTING
1531
-
1532
- addFormatToken('d', 0, 'do', 'day');
1533
-
1534
- addFormatToken('dd', 0, 0, function (format) {
1535
- return this.localeData().weekdaysMin(this, format);
1536
- });
1537
-
1538
- addFormatToken('ddd', 0, 0, function (format) {
1539
- return this.localeData().weekdaysShort(this, format);
1540
- });
1541
-
1542
- addFormatToken('dddd', 0, 0, function (format) {
1543
- return this.localeData().weekdays(this, format);
1544
- });
1245
+ addFormatToken('dddd', 0, 0, function (format) {
1246
+ return this.localeData().weekdays(this, format);
1247
+ });
1545
1248
 
1546
1249
  addFormatToken('e', 0, 0, 'weekday');
1547
1250
  addFormatToken('E', 0, 0, 'isoWeekday');
1251
+ addFormatToken('eHHmm', 0, 0, function () {
1252
+ return (
1253
+ '' +
1254
+ this.weekday() +
1255
+ zeroFill(this.hours(), 2) +
1256
+ zeroFill(this.minutes(), 2)
1257
+ );
1258
+ });
1548
1259
 
1549
1260
  // PARSING
1550
1261
 
1551
1262
  addRegexToken('d', match1to2);
1552
1263
  addRegexToken('e', match1to2);
1553
1264
  addRegexToken('E', match1to2);
1265
+ addRegexToken('eHHmm', match5to6);
1554
1266
  addRegexToken('dd', function (isStrict, locale) {
1555
1267
  return locale.weekdaysMinRegex(isStrict);
1556
1268
  });
@@ -1575,6 +1287,14 @@ function requireMoment () {
1575
1287
  week[token] = toInt(input);
1576
1288
  });
1577
1289
 
1290
+ addWeekParseToken('eHHmm', function (input, week, config) {
1291
+ var weekdayEnd = input.length - 4;
1292
+
1293
+ week.e = toInt(input.substr(0, weekdayEnd));
1294
+ config._a[HOUR] = toInt(input.substr(weekdayEnd, 2));
1295
+ config._a[MINUTE] = toInt(input.substr(weekdayEnd + 2));
1296
+ });
1297
+
1578
1298
  // HELPERS
1579
1299
 
1580
1300
  function parseWeekday(input, locale) {
@@ -1612,7 +1332,29 @@ function requireMoment () {
1612
1332
  defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
1613
1333
  defaultWeekdaysRegex = matchWord,
1614
1334
  defaultWeekdaysShortRegex = matchWord,
1615
- defaultWeekdaysMinRegex = matchWord;
1335
+ defaultWeekdaysMinRegex = matchWord,
1336
+ weekdaysParseProperties = [
1337
+ 'weekdaysParse',
1338
+ 'fullWeekdaysParse',
1339
+ 'shortWeekdaysParse',
1340
+ 'minWeekdaysParse',
1341
+ 'weekdaysRegex',
1342
+ 'weekdaysShortRegex',
1343
+ 'weekdaysMinRegex',
1344
+ 'weekdaysStrictRegex',
1345
+ 'weekdaysShortStrictRegex',
1346
+ 'weekdaysMinStrictRegex',
1347
+ ];
1348
+
1349
+ function clearWeekdaysParseCache(locale, config) {
1350
+ var i, prop;
1351
+ for (i = 0; i < weekdaysParseProperties.length; i++) {
1352
+ prop = weekdaysParseProperties[i];
1353
+ if (!hasOwnProp(config, prop)) {
1354
+ delete locale['_' + prop];
1355
+ }
1356
+ }
1357
+ }
1616
1358
 
1617
1359
  function localeWeekdays(m, format) {
1618
1360
  var weekdays = isArray(this._weekdays)
@@ -1645,7 +1387,7 @@ function requireMoment () {
1645
1387
  : this._weekdaysMin;
1646
1388
  }
1647
1389
 
1648
- function handleStrictParse$1(weekdayName, format, strict) {
1390
+ function handleStrictParse(weekdayName, format, strict) {
1649
1391
  var i,
1650
1392
  ii,
1651
1393
  mom,
@@ -1722,7 +1464,7 @@ function requireMoment () {
1722
1464
  var i, mom, regex;
1723
1465
 
1724
1466
  if (this._weekdaysParseExact) {
1725
- return handleStrictParse$1.call(this, weekdayName, format, strict);
1467
+ return handleStrictParse.call(this, weekdayName, format, strict);
1726
1468
  }
1727
1469
 
1728
1470
  if (!this._weekdaysParse) {
@@ -1785,157 +1527,532 @@ function requireMoment () {
1785
1527
  }
1786
1528
  }
1787
1529
 
1788
- // MOMENTS
1530
+ // MOMENTS
1531
+
1532
+ function getSetDayOfWeek(input) {
1533
+ if (!this.isValid()) {
1534
+ return input != null ? this : NaN;
1535
+ }
1536
+
1537
+ var day = get$2(this, 'Day');
1538
+ if (input != null) {
1539
+ input = parseWeekday(input, this.localeData());
1540
+ return this.add(input - day, 'd');
1541
+ } else {
1542
+ return day;
1543
+ }
1544
+ }
1545
+
1546
+ function getSetLocaleDayOfWeek(input) {
1547
+ if (!this.isValid()) {
1548
+ return input != null ? this : NaN;
1549
+ }
1550
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
1551
+ return input == null ? weekday : this.add(input - weekday, 'd');
1552
+ }
1553
+
1554
+ function getSetISODayOfWeek(input) {
1555
+ if (!this.isValid()) {
1556
+ return input != null ? this : NaN;
1557
+ }
1558
+
1559
+ // behaves the same as moment#day except
1560
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
1561
+ // as a setter, sunday should belong to the previous week.
1562
+
1563
+ if (input != null) {
1564
+ var weekday = parseIsoWeekday(input, this.localeData());
1565
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
1566
+ } else {
1567
+ return this.day() || 7;
1568
+ }
1569
+ }
1570
+
1571
+ function weekdaysRegex(isStrict) {
1572
+ if (this._weekdaysParseExact) {
1573
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1574
+ computeWeekdaysParse.call(this);
1575
+ }
1576
+ if (isStrict) {
1577
+ return this._weekdaysStrictRegex;
1578
+ } else {
1579
+ return this._weekdaysRegex;
1580
+ }
1581
+ } else {
1582
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1583
+ this._weekdaysRegex = defaultWeekdaysRegex;
1584
+ }
1585
+ return this._weekdaysStrictRegex && isStrict
1586
+ ? this._weekdaysStrictRegex
1587
+ : this._weekdaysRegex;
1588
+ }
1589
+ }
1590
+
1591
+ function weekdaysShortRegex(isStrict) {
1592
+ if (this._weekdaysParseExact) {
1593
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1594
+ computeWeekdaysParse.call(this);
1595
+ }
1596
+ if (isStrict) {
1597
+ return this._weekdaysShortStrictRegex;
1598
+ } else {
1599
+ return this._weekdaysShortRegex;
1600
+ }
1601
+ } else {
1602
+ if (!hasOwnProp(this, '_weekdaysShortRegex')) {
1603
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
1604
+ }
1605
+ return this._weekdaysShortStrictRegex && isStrict
1606
+ ? this._weekdaysShortStrictRegex
1607
+ : this._weekdaysShortRegex;
1608
+ }
1609
+ }
1610
+
1611
+ function weekdaysMinRegex(isStrict) {
1612
+ if (this._weekdaysParseExact) {
1613
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1614
+ computeWeekdaysParse.call(this);
1615
+ }
1616
+ if (isStrict) {
1617
+ return this._weekdaysMinStrictRegex;
1618
+ } else {
1619
+ return this._weekdaysMinRegex;
1620
+ }
1621
+ } else {
1622
+ if (!hasOwnProp(this, '_weekdaysMinRegex')) {
1623
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
1624
+ }
1625
+ return this._weekdaysMinStrictRegex && isStrict
1626
+ ? this._weekdaysMinStrictRegex
1627
+ : this._weekdaysMinRegex;
1628
+ }
1629
+ }
1630
+
1631
+ function computeWeekdaysParse() {
1632
+ function cmpLenRev(a, b) {
1633
+ return b.length - a.length;
1634
+ }
1635
+
1636
+ var minPieces = [],
1637
+ shortPieces = [],
1638
+ longPieces = [],
1639
+ mixedPieces = [],
1640
+ i,
1641
+ mom,
1642
+ minp,
1643
+ shortp,
1644
+ longp;
1645
+ for (i = 0; i < 7; i++) {
1646
+ // make the regex if we don't have it already
1647
+ mom = createUTC([2000, 1]).day(i);
1648
+ minp = regexEscape(this.weekdaysMin(mom, ''));
1649
+ shortp = regexEscape(this.weekdaysShort(mom, ''));
1650
+ longp = regexEscape(this.weekdays(mom, ''));
1651
+ minPieces.push(minp);
1652
+ shortPieces.push(shortp);
1653
+ longPieces.push(longp);
1654
+ mixedPieces.push(minp);
1655
+ mixedPieces.push(shortp);
1656
+ mixedPieces.push(longp);
1657
+ }
1658
+ // Sorting makes sure if one weekday (or abbr) is a prefix of another it
1659
+ // will match the longer piece.
1660
+ minPieces.sort(cmpLenRev);
1661
+ shortPieces.sort(cmpLenRev);
1662
+ longPieces.sort(cmpLenRev);
1663
+ mixedPieces.sort(cmpLenRev);
1664
+
1665
+ this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1666
+ this._weekdaysShortRegex = this._weekdaysRegex;
1667
+ this._weekdaysMinRegex = this._weekdaysRegex;
1668
+
1669
+ this._weekdaysStrictRegex = new RegExp(
1670
+ '^(' + longPieces.join('|') + ')',
1671
+ 'i'
1672
+ );
1673
+ this._weekdaysShortStrictRegex = new RegExp(
1674
+ '^(' + shortPieces.join('|') + ')',
1675
+ 'i'
1676
+ );
1677
+ this._weekdaysMinStrictRegex = new RegExp(
1678
+ '^(' + minPieces.join('|') + ')',
1679
+ 'i'
1680
+ );
1681
+ }
1682
+
1683
+ function set(config) {
1684
+ var prop, i;
1685
+ clearMonthsParseCache(this, config);
1686
+ clearWeekdaysParseCache(this, config);
1687
+ for (i in config) {
1688
+ if (hasOwnProp(config, i)) {
1689
+ prop = config[i];
1690
+ if (isFunction(prop)) {
1691
+ this[i] = prop;
1692
+ } else {
1693
+ this['_' + i] = prop;
1694
+ }
1695
+ }
1696
+ }
1697
+ this._config = config;
1698
+ // Lenient ordinal parsing accepts just a number in addition to
1699
+ // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
1700
+ // TODO: Remove "ordinalParse" fallback in next major release.
1701
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
1702
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
1703
+ '|' +
1704
+ /\d{1,2}/.source
1705
+ );
1706
+ }
1707
+
1708
+ function mergeConfigs(parentConfig, childConfig) {
1709
+ var res = extend({}, parentConfig),
1710
+ prop;
1711
+ for (prop in childConfig) {
1712
+ if (hasOwnProp(childConfig, prop)) {
1713
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
1714
+ res[prop] = {};
1715
+ extend(res[prop], parentConfig[prop]);
1716
+ extend(res[prop], childConfig[prop]);
1717
+ } else if (childConfig[prop] != null) {
1718
+ res[prop] = childConfig[prop];
1719
+ } else {
1720
+ delete res[prop];
1721
+ }
1722
+ }
1723
+ }
1724
+ for (prop in parentConfig) {
1725
+ if (
1726
+ hasOwnProp(parentConfig, prop) &&
1727
+ !hasOwnProp(childConfig, prop) &&
1728
+ isObject(parentConfig[prop])
1729
+ ) {
1730
+ // make sure changes to properties don't modify parent config
1731
+ res[prop] = extend({}, res[prop]);
1732
+ }
1733
+ }
1734
+ return res;
1735
+ }
1736
+
1737
+ function Locale(config) {
1738
+ if (config != null) {
1739
+ this.set(config);
1740
+ }
1741
+ }
1742
+
1743
+ var keys;
1744
+
1745
+ if (Object.keys) {
1746
+ keys = Object.keys;
1747
+ } else {
1748
+ keys = function (obj) {
1749
+ var i,
1750
+ res = [];
1751
+ for (i in obj) {
1752
+ if (hasOwnProp(obj, i)) {
1753
+ res.push(i);
1754
+ }
1755
+ }
1756
+ return res;
1757
+ };
1758
+ }
1759
+
1760
+ var defaultCalendar = {
1761
+ sameDay: '[Today at] LT',
1762
+ nextDay: '[Tomorrow at] LT',
1763
+ nextWeek: 'dddd [at] LT',
1764
+ lastDay: '[Yesterday at] LT',
1765
+ lastWeek: '[Last] dddd [at] LT',
1766
+ sameElse: 'L',
1767
+ };
1768
+
1769
+ function calendar$1(key, mom, now) {
1770
+ var output = this._calendar[key] || this._calendar['sameElse'];
1771
+ return isFunction(output) ? output.call(mom, now) : output;
1772
+ }
1773
+
1774
+ var defaultLongDateFormat = {
1775
+ LTS: 'h:mm:ss A',
1776
+ LT: 'h:mm A',
1777
+ L: 'MM/DD/YYYY',
1778
+ LL: 'MMMM D, YYYY',
1779
+ LLL: 'MMMM D, YYYY h:mm A',
1780
+ LLLL: 'dddd, MMMM D, YYYY h:mm A',
1781
+ };
1782
+
1783
+ function longDateFormat(key) {
1784
+ var format = this._longDateFormat[key],
1785
+ formatUpper = this._longDateFormat[key.toUpperCase()],
1786
+ formatCache = this._longDateFormatCache;
1787
+
1788
+ if (format || !formatUpper) {
1789
+ return format;
1790
+ }
1791
+
1792
+ if (
1793
+ formatCache &&
1794
+ formatCache[key] &&
1795
+ formatCache[key].formatUpper === formatUpper
1796
+ ) {
1797
+ return formatCache[key].format;
1798
+ }
1799
+
1800
+ format = formatUpper
1801
+ .match(formattingTokens)
1802
+ .map(function (tok) {
1803
+ if (
1804
+ tok === 'MMMM' ||
1805
+ tok === 'MM' ||
1806
+ tok === 'DD' ||
1807
+ tok === 'dddd'
1808
+ ) {
1809
+ return tok.slice(1);
1810
+ }
1811
+ return tok;
1812
+ })
1813
+ .join('');
1814
+
1815
+ if (!formatCache) {
1816
+ formatCache = this._longDateFormatCache = {};
1817
+ }
1818
+ formatCache[key] = {
1819
+ formatUpper: formatUpper,
1820
+ format: format,
1821
+ };
1822
+ return format;
1823
+ }
1824
+
1825
+ var defaultInvalidDate = 'Invalid date';
1826
+
1827
+ function invalidDate() {
1828
+ return this._invalidDate;
1829
+ }
1830
+
1831
+ var defaultOrdinal = '%d',
1832
+ defaultDayOfMonthOrdinalParse = /\d{1,2}/;
1833
+
1834
+ function ordinal(number) {
1835
+ return this._ordinal.replace('%d', number);
1836
+ }
1837
+
1838
+ var defaultRelativeTime = {
1839
+ future: 'in %s',
1840
+ past: '%s ago',
1841
+ s: 'a few seconds',
1842
+ ss: '%d seconds',
1843
+ m: 'a minute',
1844
+ mm: '%d minutes',
1845
+ h: 'an hour',
1846
+ hh: '%d hours',
1847
+ d: 'a day',
1848
+ dd: '%d days',
1849
+ w: 'a week',
1850
+ ww: '%d weeks',
1851
+ M: 'a month',
1852
+ MM: '%d months',
1853
+ y: 'a year',
1854
+ yy: '%d years',
1855
+ };
1856
+
1857
+ function relativeTimeWithoutPostformat(
1858
+ number,
1859
+ withoutSuffix,
1860
+ string,
1861
+ isFuture
1862
+ ) {
1863
+ var output = this._relativeTime[string];
1864
+ return isFunction(output)
1865
+ ? output(number, withoutSuffix, string, isFuture)
1866
+ : output.replace(/%d/i, number);
1867
+ }
1868
+
1869
+ function relativeTime$1(number, withoutSuffix, string, isFuture) {
1870
+ return this.postformat(
1871
+ relativeTimeWithoutPostformat.call(
1872
+ this,
1873
+ number,
1874
+ withoutSuffix,
1875
+ string,
1876
+ isFuture
1877
+ )
1878
+ );
1879
+ }
1880
+
1881
+ function pastFutureWithoutPostformat(diff, output) {
1882
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
1883
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
1884
+ }
1885
+
1886
+ function pastFuture(diff, output) {
1887
+ return this.postformat(
1888
+ pastFutureWithoutPostformat.call(this, diff, output)
1889
+ );
1890
+ }
1891
+
1892
+ function createDate(y, m, d, h, M, s, ms) {
1893
+ // can't just apply() to create a date:
1894
+ // https://stackoverflow.com/q/181348
1895
+ var date;
1896
+ // the date constructor remaps years 0-99 to 1900-1999
1897
+ if (y < 100 && y >= 0) {
1898
+ // preserve leap years using a full 400 year cycle, then reset
1899
+ date = new Date(y + 400, m, d, h, M, s, ms);
1900
+ if (isFinite(date.getFullYear())) {
1901
+ date.setFullYear(y);
1902
+ }
1903
+ } else {
1904
+ date = new Date(y, m, d, h, M, s, ms);
1905
+ }
1906
+
1907
+ return date;
1908
+ }
1909
+
1910
+ function createUTCDate(y) {
1911
+ var date, args;
1912
+ // the Date.UTC function remaps years 0-99 to 1900-1999
1913
+ if (y < 100 && y >= 0) {
1914
+ args = Array.prototype.slice.call(arguments);
1915
+ // preserve leap years using a full 400 year cycle, then reset
1916
+ args[0] = y + 400;
1917
+ date = new Date(Date.UTC.apply(null, args));
1918
+ if (isFinite(date.getUTCFullYear())) {
1919
+ date.setUTCFullYear(y);
1920
+ }
1921
+ } else {
1922
+ date = new Date(Date.UTC.apply(null, arguments));
1923
+ }
1924
+
1925
+ return date;
1926
+ }
1927
+
1928
+ // start-of-first-week - start-of-year
1929
+ function firstWeekOffset(year, dow, doy) {
1930
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1931
+ fwd = 7 + dow - doy,
1932
+ // first-week day local weekday -- which local weekday is fwd
1933
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1934
+
1935
+ return -fwdlw + fwd - 1;
1936
+ }
1937
+
1938
+ // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1939
+ function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1940
+ var localWeekday = (7 + weekday - dow) % 7,
1941
+ weekOffset = firstWeekOffset(year, dow, doy),
1942
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1943
+ resYear,
1944
+ resDayOfYear;
1945
+
1946
+ if (dayOfYear <= 0) {
1947
+ resYear = year - 1;
1948
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
1949
+ } else if (dayOfYear > daysInYear(year)) {
1950
+ resYear = year + 1;
1951
+ resDayOfYear = dayOfYear - daysInYear(year);
1952
+ } else {
1953
+ resYear = year;
1954
+ resDayOfYear = dayOfYear;
1955
+ }
1956
+
1957
+ return {
1958
+ year: resYear,
1959
+ dayOfYear: resDayOfYear,
1960
+ };
1961
+ }
1962
+
1963
+ function weekOfYearFromDayOfYear(year, dayOfYear, dow, doy) {
1964
+ var weekOffset = firstWeekOffset(year, dow, doy),
1965
+ week = Math.floor((dayOfYear - weekOffset - 1) / 7) + 1,
1966
+ resWeek,
1967
+ resYear;
1968
+
1969
+ if (week < 1) {
1970
+ resYear = year - 1;
1971
+ resWeek = week + weeksInYear(resYear, dow, doy);
1972
+ } else if (week > weeksInYear(year, dow, doy)) {
1973
+ resWeek = week - weeksInYear(year, dow, doy);
1974
+ resYear = year + 1;
1975
+ } else {
1976
+ resYear = year;
1977
+ resWeek = week;
1978
+ }
1979
+
1980
+ return {
1981
+ week: resWeek,
1982
+ year: resYear,
1983
+ };
1984
+ }
1985
+
1986
+ function weekOfYear(mom, dow, doy) {
1987
+ return weekOfYearFromDayOfYear(mom.year(), mom.dayOfYear(), dow, doy);
1988
+ }
1989
+
1990
+ function weekOfYearFromDate(year, month, date, dow, doy) {
1991
+ var dayOfYear =
1992
+ Math.round(
1993
+ (createUTCDate(year, month, date) - createUTCDate(year, 0, 1)) /
1994
+ 864e5
1995
+ ) + 1;
1996
+
1997
+ return weekOfYearFromDayOfYear(year, dayOfYear, dow, doy);
1998
+ }
1999
+
2000
+ function weeksInYear(year, dow, doy) {
2001
+ var weekOffset = firstWeekOffset(year, dow, doy),
2002
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
2003
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
2004
+ }
2005
+
2006
+ // FORMATTING
1789
2007
 
1790
- function getSetDayOfWeek(input) {
1791
- if (!this.isValid()) {
1792
- return input != null ? this : NaN;
1793
- }
2008
+ addFormatToken('w', ['ww', 2], 'wo', 'week');
2009
+ addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1794
2010
 
1795
- var day = get(this, 'Day');
1796
- if (input != null) {
1797
- input = parseWeekday(input, this.localeData());
1798
- return this.add(input - day, 'd');
1799
- } else {
1800
- return day;
1801
- }
1802
- }
2011
+ // PARSING
1803
2012
 
1804
- function getSetLocaleDayOfWeek(input) {
1805
- if (!this.isValid()) {
1806
- return input != null ? this : NaN;
1807
- }
1808
- var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
1809
- return input == null ? weekday : this.add(input - weekday, 'd');
1810
- }
2013
+ addRegexToken('w', match1to2, match1to2NoLeadingZero);
2014
+ addRegexToken('ww', match1to2, match2);
2015
+ addRegexToken('W', match1to2, match1to2NoLeadingZero);
2016
+ addRegexToken('WW', match1to2, match2);
1811
2017
 
1812
- function getSetISODayOfWeek(input) {
1813
- if (!this.isValid()) {
1814
- return input != null ? this : NaN;
2018
+ addWeekParseToken(
2019
+ ['w', 'ww', 'W', 'WW'],
2020
+ function (input, week, config, token) {
2021
+ week[token.substr(0, 1)] = toInt(input);
1815
2022
  }
2023
+ );
1816
2024
 
1817
- // behaves the same as moment#day except
1818
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
1819
- // as a setter, sunday should belong to the previous week.
2025
+ // HELPERS
1820
2026
 
1821
- if (input != null) {
1822
- var weekday = parseIsoWeekday(input, this.localeData());
1823
- return this.day(this.day() % 7 ? weekday : weekday - 7);
1824
- } else {
1825
- return this.day() || 7;
1826
- }
1827
- }
2027
+ // LOCALES
1828
2028
 
1829
- function weekdaysRegex(isStrict) {
1830
- if (this._weekdaysParseExact) {
1831
- if (!hasOwnProp(this, '_weekdaysRegex')) {
1832
- computeWeekdaysParse.call(this);
1833
- }
1834
- if (isStrict) {
1835
- return this._weekdaysStrictRegex;
1836
- } else {
1837
- return this._weekdaysRegex;
1838
- }
1839
- } else {
1840
- if (!hasOwnProp(this, '_weekdaysRegex')) {
1841
- this._weekdaysRegex = defaultWeekdaysRegex;
1842
- }
1843
- return this._weekdaysStrictRegex && isStrict
1844
- ? this._weekdaysStrictRegex
1845
- : this._weekdaysRegex;
1846
- }
2029
+ function localeWeek(mom) {
2030
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
1847
2031
  }
1848
2032
 
1849
- function weekdaysShortRegex(isStrict) {
1850
- if (this._weekdaysParseExact) {
1851
- if (!hasOwnProp(this, '_weekdaysRegex')) {
1852
- computeWeekdaysParse.call(this);
1853
- }
1854
- if (isStrict) {
1855
- return this._weekdaysShortStrictRegex;
1856
- } else {
1857
- return this._weekdaysShortRegex;
1858
- }
1859
- } else {
1860
- if (!hasOwnProp(this, '_weekdaysShortRegex')) {
1861
- this._weekdaysShortRegex = defaultWeekdaysShortRegex;
1862
- }
1863
- return this._weekdaysShortStrictRegex && isStrict
1864
- ? this._weekdaysShortStrictRegex
1865
- : this._weekdaysShortRegex;
1866
- }
1867
- }
2033
+ var defaultLocaleWeek = {
2034
+ dow: 0, // Sunday is the first day of the week.
2035
+ doy: 6, // The week that contains Jan 6th is the first week of the year.
2036
+ };
1868
2037
 
1869
- function weekdaysMinRegex(isStrict) {
1870
- if (this._weekdaysParseExact) {
1871
- if (!hasOwnProp(this, '_weekdaysRegex')) {
1872
- computeWeekdaysParse.call(this);
1873
- }
1874
- if (isStrict) {
1875
- return this._weekdaysMinStrictRegex;
1876
- } else {
1877
- return this._weekdaysMinRegex;
1878
- }
1879
- } else {
1880
- if (!hasOwnProp(this, '_weekdaysMinRegex')) {
1881
- this._weekdaysMinRegex = defaultWeekdaysMinRegex;
1882
- }
1883
- return this._weekdaysMinStrictRegex && isStrict
1884
- ? this._weekdaysMinStrictRegex
1885
- : this._weekdaysMinRegex;
1886
- }
2038
+ function localeFirstDayOfWeek() {
2039
+ return this._week.dow;
1887
2040
  }
1888
2041
 
1889
- function computeWeekdaysParse() {
1890
- function cmpLenRev(a, b) {
1891
- return b.length - a.length;
1892
- }
2042
+ function localeFirstDayOfYear() {
2043
+ return this._week.doy;
2044
+ }
1893
2045
 
1894
- var minPieces = [],
1895
- shortPieces = [],
1896
- longPieces = [],
1897
- mixedPieces = [],
1898
- i,
1899
- mom,
1900
- minp,
1901
- shortp,
1902
- longp;
1903
- for (i = 0; i < 7; i++) {
1904
- // make the regex if we don't have it already
1905
- mom = createUTC([2000, 1]).day(i);
1906
- minp = regexEscape(this.weekdaysMin(mom, ''));
1907
- shortp = regexEscape(this.weekdaysShort(mom, ''));
1908
- longp = regexEscape(this.weekdays(mom, ''));
1909
- minPieces.push(minp);
1910
- shortPieces.push(shortp);
1911
- longPieces.push(longp);
1912
- mixedPieces.push(minp);
1913
- mixedPieces.push(shortp);
1914
- mixedPieces.push(longp);
1915
- }
1916
- // Sorting makes sure if one weekday (or abbr) is a prefix of another it
1917
- // will match the longer piece.
1918
- minPieces.sort(cmpLenRev);
1919
- shortPieces.sort(cmpLenRev);
1920
- longPieces.sort(cmpLenRev);
1921
- mixedPieces.sort(cmpLenRev);
2046
+ // MOMENTS
1922
2047
 
1923
- this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1924
- this._weekdaysShortRegex = this._weekdaysRegex;
1925
- this._weekdaysMinRegex = this._weekdaysRegex;
2048
+ function getSetWeek(input) {
2049
+ var week = this.localeData().week(this);
2050
+ return input == null ? week : this.add((input - week) * 7, 'd');
2051
+ }
1926
2052
 
1927
- this._weekdaysStrictRegex = new RegExp(
1928
- '^(' + longPieces.join('|') + ')',
1929
- 'i'
1930
- );
1931
- this._weekdaysShortStrictRegex = new RegExp(
1932
- '^(' + shortPieces.join('|') + ')',
1933
- 'i'
1934
- );
1935
- this._weekdaysMinStrictRegex = new RegExp(
1936
- '^(' + minPieces.join('|') + ')',
1937
- 'i'
1938
- );
2053
+ function getSetISOWeek(input) {
2054
+ var week = weekOfYear(this, 1, 4).week;
2055
+ return input == null ? week : this.add((input - week) * 7, 'd');
1939
2056
  }
1940
2057
 
1941
2058
  // FORMATTING
@@ -2150,34 +2267,48 @@ function requireMoment () {
2150
2267
  }
2151
2268
 
2152
2269
  function isLocaleNameSane(name) {
2153
- // Prevent names that look like filesystem paths, i.e contain '/' or '\'
2154
- // Ensure name is available and function returns boolean
2155
- return !!(name && name.match('^[^/\\\\]*$'));
2270
+ // Only canonical locale module names are safe to append to the require path.
2271
+ return typeof name === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(name);
2156
2272
  }
2157
2273
 
2158
2274
  function loadLocale(name) {
2159
2275
  var oldLocale = null,
2160
- aliasedRequire;
2276
+ aliasedRequire,
2277
+ normalizedName;
2278
+
2279
+ // Preserve exact custom locale names before trying the canonical built-in name.
2280
+ // Use hasOwnProp rather than a plain lookup so that names like "__proto__",
2281
+ // "constructor", or "prototype" can't resolve to an inherited Object.prototype
2282
+ // property instead of a real (or missing) locale entry.
2283
+ if (hasOwnProp(locales, name)) {
2284
+ return locales[name];
2285
+ }
2286
+
2287
+ normalizedName = normalizeLocale(name);
2288
+ if (hasOwnProp(locales, normalizedName)) {
2289
+ return locales[normalizedName];
2290
+ }
2291
+
2161
2292
  // TODO: Find a better way to register and load all the locales in Node
2162
2293
  if (
2163
- locales[name] === undefined &&
2164
- 'object' !== 'undefined' &&
2165
2294
  module &&
2166
2295
  module.exports &&
2167
- isLocaleNameSane(name)
2296
+ isLocaleNameSane(normalizedName)
2168
2297
  ) {
2169
2298
  try {
2170
2299
  oldLocale = globalLocale._abbr;
2171
2300
  aliasedRequire = commonjsRequire;
2172
- aliasedRequire('./locale/' + name);
2301
+ aliasedRequire('./locale/' + normalizedName);
2173
2302
  getSetGlobalLocale(oldLocale);
2174
2303
  } catch (e) {
2175
2304
  // mark as not found to avoid repeating expensive file require call causing high CPU
2176
2305
  // when trying to find en-US, en_US, en-us for every format call
2177
- locales[name] = null; // null means not found
2306
+ locales[normalizedName] = null; // null means not found
2178
2307
  }
2179
2308
  }
2180
- return locales[name];
2309
+ if (hasOwnProp(locales, normalizedName)) {
2310
+ return locales[normalizedName];
2311
+ }
2181
2312
  }
2182
2313
 
2183
2314
  // This function will load locale and then set the global locale. If
@@ -2263,17 +2394,20 @@ function requireMoment () {
2263
2394
  }
2264
2395
 
2265
2396
  function updateLocale(name, config) {
2266
- if (config != null) {
2267
- var locale,
2268
- tmpLocale,
2269
- parentConfig = baseConfig;
2397
+ var locale,
2398
+ tmpLocale = loadLocale(name),
2399
+ parentConfig = baseConfig;
2270
2400
 
2401
+ if (tmpLocale != null) {
2402
+ name = tmpLocale._abbr;
2403
+ }
2404
+
2405
+ if (config != null) {
2271
2406
  if (locales[name] != null && locales[name].parentLocale != null) {
2272
2407
  // Update existing child locale in-place to avoid memory-leaks
2273
2408
  locales[name].set(mergeConfigs(locales[name]._config, config));
2274
2409
  } else {
2275
2410
  // MERGE
2276
- tmpLocale = loadLocale(name);
2277
2411
  if (tmpLocale != null) {
2278
2412
  parentConfig = tmpLocale._config;
2279
2413
  }
@@ -2641,9 +2775,46 @@ function requireMoment () {
2641
2775
  return c;
2642
2776
  }
2643
2777
 
2644
- function currentDateArray(config) {
2778
+ function currentDateArray(config, now, forWeek) {
2779
+ var hadWeekContext = Object.prototype.hasOwnProperty.call(
2780
+ config,
2781
+ '_isDefaultDatePartsForWeek'
2782
+ ),
2783
+ weekContext = config._isDefaultDatePartsForWeek;
2784
+
2645
2785
  // hooks is actually the exported moment object
2646
- var nowValue = new Date(hooks.now());
2786
+ config._isDefaultDatePartsForWeek = !!forWeek;
2787
+ try {
2788
+ return hooks._getDefaultDateParts(config, now, forWeek);
2789
+ } finally {
2790
+ if (hadWeekContext) {
2791
+ config._isDefaultDatePartsForWeek = weekContext;
2792
+ } else {
2793
+ delete config._isDefaultDatePartsForWeek;
2794
+ }
2795
+ }
2796
+ }
2797
+
2798
+ function currentDateNow(config) {
2799
+ var now = config._defaultDatePartsNow;
2800
+
2801
+ if (!now) {
2802
+ return hooks.now();
2803
+ }
2804
+ if (!now.hasValue) {
2805
+ now.value = hooks.now();
2806
+ now.hasValue = true;
2807
+ }
2808
+ return now.value;
2809
+ }
2810
+
2811
+ // Internal hook for extensions that supply omitted calendar fields.
2812
+ function getDefaultDateParts(config, now, forWeek) {
2813
+ var useWeekDefaults = forWeek || config._isDefaultDatePartsForWeek,
2814
+ nowValue = useWeekDefaults ? createLocal(now) : new Date(now);
2815
+ if (useWeekDefaults) {
2816
+ return [nowValue.year(), nowValue.month(), nowValue.date()];
2817
+ }
2647
2818
  if (config._useUTC) {
2648
2819
  return [
2649
2820
  nowValue.getUTCFullYear(),
@@ -2654,6 +2825,8 @@ function requireMoment () {
2654
2825
  return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
2655
2826
  }
2656
2827
 
2828
+ hooks._getDefaultDateParts = getDefaultDateParts;
2829
+
2657
2830
  // convert an array to a date.
2658
2831
  // the array should mirror the parameters below
2659
2832
  // note: all values past the year are optional and will default to the lowest possible value.
@@ -2662,24 +2835,34 @@ function requireMoment () {
2662
2835
  var i,
2663
2836
  date,
2664
2837
  input = [],
2838
+ now,
2665
2839
  currentDate,
2666
2840
  expectedWeekday,
2667
- yearToUse;
2841
+ yearToUse,
2842
+ dateIsDefaulted;
2668
2843
 
2669
2844
  if (config._d) {
2670
2845
  return;
2671
2846
  }
2672
2847
 
2673
- currentDate = currentDateArray(config);
2848
+ if (
2849
+ config._a[YEAR] == null ||
2850
+ config._a[MONTH] == null ||
2851
+ config._a[DATE] == null
2852
+ ) {
2853
+ now = currentDateNow(config);
2854
+ currentDate = currentDateArray(config, now);
2855
+ }
2674
2856
 
2675
2857
  //compute day of the year from weeks and weekdays
2676
2858
  if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
2677
- dayOfYearFromWeekInfo(config);
2859
+ dayOfYearFromWeekInfo(config, currentDateArray(config, now, true));
2678
2860
  }
2679
2861
 
2680
2862
  //if the day of the year is set, figure out what it is
2681
2863
  if (config._dayOfYear != null) {
2682
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
2864
+ yearToUse =
2865
+ config._a[YEAR] != null ? config._a[YEAR] : currentDate[YEAR];
2683
2866
 
2684
2867
  if (
2685
2868
  config._dayOfYear > daysInYear(yearToUse) ||
@@ -2693,6 +2876,11 @@ function requireMoment () {
2693
2876
  config._a[DATE] = date.getUTCDate();
2694
2877
  }
2695
2878
 
2879
+ dateIsDefaulted =
2880
+ config._a[YEAR] == null ||
2881
+ config._a[MONTH] == null ||
2882
+ config._a[DATE] == null;
2883
+
2696
2884
  // Default to current date.
2697
2885
  // * if no year, month, day of month are given, default to today
2698
2886
  // * if day of month is given, default month and year
@@ -2741,13 +2929,14 @@ function requireMoment () {
2741
2929
  if (
2742
2930
  config._w &&
2743
2931
  typeof config._w.d !== 'undefined' &&
2932
+ !dateIsDefaulted &&
2744
2933
  config._w.d !== expectedWeekday
2745
2934
  ) {
2746
2935
  getParsingFlags(config).weekdayMismatch = true;
2747
2936
  }
2748
2937
  }
2749
2938
 
2750
- function dayOfYearFromWeekInfo(config) {
2939
+ function dayOfYearFromWeekInfo(config, currentDate) {
2751
2940
  var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
2752
2941
 
2753
2942
  w = config._w;
@@ -2762,7 +2951,13 @@ function requireMoment () {
2762
2951
  weekYear = defaults(
2763
2952
  w.GG,
2764
2953
  config._a[YEAR],
2765
- weekOfYear(createLocal(), 1, 4).year
2954
+ weekOfYearFromDate(
2955
+ currentDate[YEAR],
2956
+ currentDate[MONTH],
2957
+ currentDate[DATE],
2958
+ 1,
2959
+ 4
2960
+ ).year
2766
2961
  );
2767
2962
  week = defaults(w.W, 1);
2768
2963
  weekday = defaults(w.E, 1);
@@ -2773,7 +2968,13 @@ function requireMoment () {
2773
2968
  dow = config._locale._week.dow;
2774
2969
  doy = config._locale._week.doy;
2775
2970
 
2776
- curWeek = weekOfYear(createLocal(), dow, doy);
2971
+ curWeek = weekOfYearFromDate(
2972
+ currentDate[YEAR],
2973
+ currentDate[MONTH],
2974
+ currentDate[DATE],
2975
+ dow,
2976
+ doy
2977
+ );
2777
2978
 
2778
2979
  weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
2779
2980
 
@@ -2939,6 +3140,7 @@ function requireMoment () {
2939
3140
  currentScore,
2940
3141
  validFormatFound,
2941
3142
  bestFormatIsValid = false,
3143
+ defaultDatePartsNow = {},
2942
3144
  configfLen = config._f.length;
2943
3145
 
2944
3146
  if (configfLen === 0) {
@@ -2954,10 +3156,11 @@ function requireMoment () {
2954
3156
  if (config._useUTC != null) {
2955
3157
  tempConfig._useUTC = config._useUTC;
2956
3158
  }
3159
+ tempConfig._defaultDatePartsNow = defaultDatePartsNow;
2957
3160
  tempConfig._f = config._f[i];
2958
3161
  configFromStringAndFormat(tempConfig);
2959
3162
 
2960
- if (isValid(tempConfig)) {
3163
+ if (isValid$2(tempConfig)) {
2961
3164
  validFormatFound = true;
2962
3165
  }
2963
3166
 
@@ -3027,7 +3230,7 @@ function requireMoment () {
3027
3230
  config._locale = config._locale || getLocale(config._l);
3028
3231
 
3029
3232
  if (input === null || (format === undefined && input === '')) {
3030
- return createInvalid({ nullInput: true });
3233
+ return createInvalid$1({ nullInput: true });
3031
3234
  }
3032
3235
 
3033
3236
  if (typeof input === 'string') {
@@ -3046,7 +3249,7 @@ function requireMoment () {
3046
3249
  configFromInput(config);
3047
3250
  }
3048
3251
 
3049
- if (!isValid(config)) {
3252
+ if (!isValid$2(config)) {
3050
3253
  config._d = null;
3051
3254
  }
3052
3255
 
@@ -3118,7 +3321,7 @@ function requireMoment () {
3118
3321
  if (this.isValid() && other.isValid()) {
3119
3322
  return other < this ? this : other;
3120
3323
  } else {
3121
- return createInvalid();
3324
+ return createInvalid$1();
3122
3325
  }
3123
3326
  }
3124
3327
  ),
@@ -3129,7 +3332,7 @@ function requireMoment () {
3129
3332
  if (this.isValid() && other.isValid()) {
3130
3333
  return other > this ? this : other;
3131
3334
  } else {
3132
- return createInvalid();
3335
+ return createInvalid$1();
3133
3336
  }
3134
3337
  }
3135
3338
  );
@@ -3147,9 +3350,20 @@ function requireMoment () {
3147
3350
  if (!moments.length) {
3148
3351
  return createLocal();
3149
3352
  }
3150
- res = moments[0];
3151
- for (i = 1; i < moments.length; ++i) {
3152
- if (!moments[i].isValid() || moments[i][fn](res)) {
3353
+ for (i = 0; i < moments.length; ++i) {
3354
+ if (isMoment(moments[i])) {
3355
+ res = moments[i];
3356
+ break;
3357
+ }
3358
+ }
3359
+ if (!res) {
3360
+ return createInvalid$1();
3361
+ }
3362
+ for (++i; i < moments.length; ++i) {
3363
+ if (
3364
+ isMoment(moments[i]) &&
3365
+ (!moments[i].isValid() || moments[i][fn](res))
3366
+ ) {
3153
3367
  res = moments[i];
3154
3368
  }
3155
3369
  }
@@ -3220,7 +3434,7 @@ function requireMoment () {
3220
3434
  return this._isValid;
3221
3435
  }
3222
3436
 
3223
- function createInvalid$1() {
3437
+ function createInvalid() {
3224
3438
  return createDuration(NaN);
3225
3439
  }
3226
3440
 
@@ -3314,8 +3528,12 @@ function requireMoment () {
3314
3528
  addRegexToken('Z', matchShortOffset);
3315
3529
  addRegexToken('ZZ', matchShortOffset);
3316
3530
  addParseToken(['Z', 'ZZ'], function (input, array, config) {
3531
+ var offset = offsetFromString(matchShortOffset, input);
3317
3532
  config._useUTC = true;
3318
- config._tzm = offsetFromString(matchShortOffset, input);
3533
+ config._tzm = offset;
3534
+ if (offset === null) {
3535
+ getParsingFlags(config).invalidOffset = input;
3536
+ }
3319
3537
  });
3320
3538
 
3321
3539
  // HELPERS
@@ -3339,6 +3557,13 @@ function requireMoment () {
3339
3557
  parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
3340
3558
  minutes = +(parts[1] * 60) + toInt(parts[2]);
3341
3559
 
3560
+ if (
3561
+ toInt(parts[2]) > 59 ||
3562
+ (parts[0] === '+' ? minutes > 14 * 60 : minutes > 12 * 60)
3563
+ ) {
3564
+ return null;
3565
+ }
3566
+
3342
3567
  return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
3343
3568
  }
3344
3569
 
@@ -3409,7 +3634,7 @@ function requireMoment () {
3409
3634
  }
3410
3635
  if (offset !== input) {
3411
3636
  if (!keepLocalTime || this._changeInProgress) {
3412
- addSubtract(
3637
+ addSubtract$1(
3413
3638
  this,
3414
3639
  createDuration(input - offset, 'm'),
3415
3640
  1,
@@ -3602,7 +3827,7 @@ function requireMoment () {
3602
3827
  }
3603
3828
 
3604
3829
  createDuration.fn = Duration.prototype;
3605
- createDuration.invalid = createInvalid$1;
3830
+ createDuration.invalid = createInvalid;
3606
3831
 
3607
3832
  function parseIso(inp, sign) {
3608
3833
  // We'd normally use ~~inp for this, but unfortunately it also
@@ -3666,12 +3891,12 @@ function requireMoment () {
3666
3891
  }
3667
3892
 
3668
3893
  dur = createDuration(val, period);
3669
- addSubtract(this, dur, direction);
3894
+ addSubtract$1(this, dur, direction);
3670
3895
  return this;
3671
3896
  };
3672
3897
  }
3673
3898
 
3674
- function addSubtract(mom, duration, isAdding, updateOffset) {
3899
+ function addSubtract$1(mom, duration, isAdding, updateOffset) {
3675
3900
  var milliseconds = duration._milliseconds,
3676
3901
  days = absRound(duration._days),
3677
3902
  months = absRound(duration._months);
@@ -3684,10 +3909,10 @@ function requireMoment () {
3684
3909
  updateOffset = updateOffset == null ? true : updateOffset;
3685
3910
 
3686
3911
  if (months) {
3687
- setMonth(mom, get(mom, 'Month') + months * isAdding);
3912
+ setMonth(mom, get$2(mom, 'Month') + months * isAdding);
3688
3913
  }
3689
3914
  if (days) {
3690
- set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
3915
+ set$1(mom, 'Date', get$2(mom, 'Date') + days * isAdding);
3691
3916
  }
3692
3917
  if (milliseconds) {
3693
3918
  mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
@@ -3697,8 +3922,8 @@ function requireMoment () {
3697
3922
  }
3698
3923
  }
3699
3924
 
3700
- var add = createAdder(1, 'add'),
3701
- subtract = createAdder(-1, 'subtract');
3925
+ var add$1 = createAdder(1, 'add'),
3926
+ subtract$1 = createAdder(-1, 'subtract');
3702
3927
 
3703
3928
  function isString(input) {
3704
3929
  return typeof input === 'string' || input instanceof String;
@@ -3810,7 +4035,7 @@ function requireMoment () {
3810
4035
  : 'sameElse';
3811
4036
  }
3812
4037
 
3813
- function calendar$1(time, formats) {
4038
+ function calendar(time, formats) {
3814
4039
  // Support for single parameter, formats only overload to the calendar function
3815
4040
  if (arguments.length === 1) {
3816
4041
  if (!arguments[0]) {
@@ -3840,7 +4065,7 @@ function requireMoment () {
3840
4065
  );
3841
4066
  }
3842
4067
 
3843
- function clone() {
4068
+ function clone$1() {
3844
4069
  return new Moment(this);
3845
4070
  }
3846
4071
 
@@ -3996,7 +4221,7 @@ function requireMoment () {
3996
4221
  return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
3997
4222
  }
3998
4223
 
3999
- function toISOString(keepOffset) {
4224
+ function toISOString$1(keepOffset) {
4000
4225
  if (!this.isValid()) {
4001
4226
  return null;
4002
4227
  }
@@ -4136,7 +4361,7 @@ function requireMoment () {
4136
4361
  MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
4137
4362
 
4138
4363
  // actual modulo - handles negative numbers (for dates before 1970):
4139
- function mod$1(dividend, divisor) {
4364
+ function mod(dividend, divisor) {
4140
4365
  return ((dividend % divisor) + divisor) % divisor;
4141
4366
  }
4142
4367
 
@@ -4203,18 +4428,18 @@ function requireMoment () {
4203
4428
  break;
4204
4429
  case 'hour':
4205
4430
  time = this._d.valueOf();
4206
- time -= mod$1(
4431
+ time -= mod(
4207
4432
  time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
4208
4433
  MS_PER_HOUR
4209
4434
  );
4210
4435
  break;
4211
4436
  case 'minute':
4212
4437
  time = this._d.valueOf();
4213
- time -= mod$1(time, MS_PER_MINUTE);
4438
+ time -= mod(time, MS_PER_MINUTE);
4214
4439
  break;
4215
4440
  case 'second':
4216
4441
  time = this._d.valueOf();
4217
- time -= mod$1(time, MS_PER_SECOND);
4442
+ time -= mod(time, MS_PER_SECOND);
4218
4443
  break;
4219
4444
  }
4220
4445
 
@@ -4271,7 +4496,7 @@ function requireMoment () {
4271
4496
  time = this._d.valueOf();
4272
4497
  time +=
4273
4498
  MS_PER_HOUR -
4274
- mod$1(
4499
+ mod(
4275
4500
  time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
4276
4501
  MS_PER_HOUR
4277
4502
  ) -
@@ -4279,11 +4504,11 @@ function requireMoment () {
4279
4504
  break;
4280
4505
  case 'minute':
4281
4506
  time = this._d.valueOf();
4282
- time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
4507
+ time += MS_PER_MINUTE - mod(time, MS_PER_MINUTE) - 1;
4283
4508
  break;
4284
4509
  case 'second':
4285
4510
  time = this._d.valueOf();
4286
- time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
4511
+ time += MS_PER_SECOND - mod(time, MS_PER_SECOND) - 1;
4287
4512
  break;
4288
4513
  }
4289
4514
 
@@ -4292,7 +4517,7 @@ function requireMoment () {
4292
4517
  return this;
4293
4518
  }
4294
4519
 
4295
- function valueOf() {
4520
+ function valueOf$1() {
4296
4521
  return this._d.valueOf() - (this._offset || 0) * 60000;
4297
4522
  }
4298
4523
 
@@ -4335,8 +4560,8 @@ function requireMoment () {
4335
4560
  return this.isValid() ? this.toISOString() : null;
4336
4561
  }
4337
4562
 
4338
- function isValid$2() {
4339
- return isValid(this);
4563
+ function isValid() {
4564
+ return isValid$2(this);
4340
4565
  }
4341
4566
 
4342
4567
  function parsingFlags() {
@@ -4911,106 +5136,106 @@ function requireMoment () {
4911
5136
  return this._isUTC ? 'Coordinated Universal Time' : '';
4912
5137
  }
4913
5138
 
4914
- var proto = Moment.prototype;
5139
+ var proto$2 = Moment.prototype;
4915
5140
 
4916
- proto.add = add;
4917
- proto.calendar = calendar$1;
4918
- proto.clone = clone;
4919
- proto.diff = diff;
4920
- proto.endOf = endOf;
4921
- proto.format = format;
4922
- proto.from = from;
4923
- proto.fromNow = fromNow;
4924
- proto.to = to;
4925
- proto.toNow = toNow;
4926
- proto.get = stringGet;
4927
- proto.invalidAt = invalidAt;
4928
- proto.isAfter = isAfter;
4929
- proto.isBefore = isBefore;
4930
- proto.isBetween = isBetween;
4931
- proto.isSame = isSame;
4932
- proto.isSameOrAfter = isSameOrAfter;
4933
- proto.isSameOrBefore = isSameOrBefore;
4934
- proto.isValid = isValid$2;
4935
- proto.lang = lang;
4936
- proto.locale = locale;
4937
- proto.localeData = localeData;
4938
- proto.max = prototypeMax;
4939
- proto.min = prototypeMin;
4940
- proto.parsingFlags = parsingFlags;
4941
- proto.set = stringSet;
4942
- proto.startOf = startOf;
4943
- proto.subtract = subtract;
4944
- proto.toArray = toArray;
4945
- proto.toObject = toObject;
4946
- proto.toDate = toDate;
4947
- proto.toISOString = toISOString;
4948
- proto.inspect = inspect;
5141
+ proto$2.add = add$1;
5142
+ proto$2.calendar = calendar;
5143
+ proto$2.clone = clone$1;
5144
+ proto$2.diff = diff;
5145
+ proto$2.endOf = endOf;
5146
+ proto$2.format = format;
5147
+ proto$2.from = from;
5148
+ proto$2.fromNow = fromNow;
5149
+ proto$2.to = to;
5150
+ proto$2.toNow = toNow;
5151
+ proto$2.get = stringGet;
5152
+ proto$2.invalidAt = invalidAt;
5153
+ proto$2.isAfter = isAfter;
5154
+ proto$2.isBefore = isBefore;
5155
+ proto$2.isBetween = isBetween;
5156
+ proto$2.isSame = isSame;
5157
+ proto$2.isSameOrAfter = isSameOrAfter;
5158
+ proto$2.isSameOrBefore = isSameOrBefore;
5159
+ proto$2.isValid = isValid;
5160
+ proto$2.lang = lang;
5161
+ proto$2.locale = locale;
5162
+ proto$2.localeData = localeData;
5163
+ proto$2.max = prototypeMax;
5164
+ proto$2.min = prototypeMin;
5165
+ proto$2.parsingFlags = parsingFlags;
5166
+ proto$2.set = stringSet;
5167
+ proto$2.startOf = startOf;
5168
+ proto$2.subtract = subtract$1;
5169
+ proto$2.toArray = toArray;
5170
+ proto$2.toObject = toObject;
5171
+ proto$2.toDate = toDate;
5172
+ proto$2.toISOString = toISOString$1;
5173
+ proto$2.inspect = inspect;
4949
5174
  if (typeof Symbol !== 'undefined' && Symbol.for != null) {
4950
- proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
5175
+ proto$2[Symbol.for('nodejs.util.inspect.custom')] = function () {
4951
5176
  return 'Moment<' + this.format() + '>';
4952
5177
  };
4953
5178
  }
4954
- proto.toJSON = toJSON;
4955
- proto.toString = toString;
4956
- proto.unix = unix;
4957
- proto.valueOf = valueOf;
4958
- proto.creationData = creationData;
4959
- proto.eraName = getEraName;
4960
- proto.eraNarrow = getEraNarrow;
4961
- proto.eraAbbr = getEraAbbr;
4962
- proto.eraYear = getEraYear;
4963
- proto.year = getSetYear;
4964
- proto.isLeapYear = getIsLeapYear;
4965
- proto.weekYear = getSetWeekYear;
4966
- proto.isoWeekYear = getSetISOWeekYear;
4967
- proto.quarter = proto.quarters = getSetQuarter;
4968
- proto.month = getSetMonth;
4969
- proto.daysInMonth = getDaysInMonth;
4970
- proto.week = proto.weeks = getSetWeek;
4971
- proto.isoWeek = proto.isoWeeks = getSetISOWeek;
4972
- proto.weeksInYear = getWeeksInYear;
4973
- proto.weeksInWeekYear = getWeeksInWeekYear;
4974
- proto.isoWeeksInYear = getISOWeeksInYear;
4975
- proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
4976
- proto.date = getSetDayOfMonth;
4977
- proto.day = proto.days = getSetDayOfWeek;
4978
- proto.weekday = getSetLocaleDayOfWeek;
4979
- proto.isoWeekday = getSetISODayOfWeek;
4980
- proto.dayOfYear = getSetDayOfYear;
4981
- proto.hour = proto.hours = getSetHour;
4982
- proto.minute = proto.minutes = getSetMinute;
4983
- proto.second = proto.seconds = getSetSecond;
4984
- proto.millisecond = proto.milliseconds = getSetMillisecond;
4985
- proto.utcOffset = getSetOffset;
4986
- proto.utc = setOffsetToUTC;
4987
- proto.local = setOffsetToLocal;
4988
- proto.parseZone = setOffsetToParsedOffset;
4989
- proto.hasAlignedHourOffset = hasAlignedHourOffset;
4990
- proto.isDST = isDaylightSavingTime;
4991
- proto.isLocal = isLocal;
4992
- proto.isUtcOffset = isUtcOffset;
4993
- proto.isUtc = isUtc;
4994
- proto.isUTC = isUtc;
4995
- proto.zoneAbbr = getZoneAbbr;
4996
- proto.zoneName = getZoneName;
4997
- proto.dates = deprecate(
5179
+ proto$2.toJSON = toJSON;
5180
+ proto$2.toString = toString;
5181
+ proto$2.unix = unix;
5182
+ proto$2.valueOf = valueOf$1;
5183
+ proto$2.creationData = creationData;
5184
+ proto$2.eraName = getEraName;
5185
+ proto$2.eraNarrow = getEraNarrow;
5186
+ proto$2.eraAbbr = getEraAbbr;
5187
+ proto$2.eraYear = getEraYear;
5188
+ proto$2.year = getSetYear;
5189
+ proto$2.isLeapYear = getIsLeapYear;
5190
+ proto$2.weekYear = getSetWeekYear;
5191
+ proto$2.isoWeekYear = getSetISOWeekYear;
5192
+ proto$2.quarter = proto$2.quarters = getSetQuarter;
5193
+ proto$2.month = getSetMonth;
5194
+ proto$2.daysInMonth = getDaysInMonth;
5195
+ proto$2.week = proto$2.weeks = getSetWeek;
5196
+ proto$2.isoWeek = proto$2.isoWeeks = getSetISOWeek;
5197
+ proto$2.weeksInYear = getWeeksInYear;
5198
+ proto$2.weeksInWeekYear = getWeeksInWeekYear;
5199
+ proto$2.isoWeeksInYear = getISOWeeksInYear;
5200
+ proto$2.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
5201
+ proto$2.date = getSetDayOfMonth;
5202
+ proto$2.day = proto$2.days = getSetDayOfWeek;
5203
+ proto$2.weekday = getSetLocaleDayOfWeek;
5204
+ proto$2.isoWeekday = getSetISODayOfWeek;
5205
+ proto$2.dayOfYear = getSetDayOfYear;
5206
+ proto$2.hour = proto$2.hours = getSetHour;
5207
+ proto$2.minute = proto$2.minutes = getSetMinute;
5208
+ proto$2.second = proto$2.seconds = getSetSecond;
5209
+ proto$2.millisecond = proto$2.milliseconds = getSetMillisecond;
5210
+ proto$2.utcOffset = getSetOffset;
5211
+ proto$2.utc = setOffsetToUTC;
5212
+ proto$2.local = setOffsetToLocal;
5213
+ proto$2.parseZone = setOffsetToParsedOffset;
5214
+ proto$2.hasAlignedHourOffset = hasAlignedHourOffset;
5215
+ proto$2.isDST = isDaylightSavingTime;
5216
+ proto$2.isLocal = isLocal;
5217
+ proto$2.isUtcOffset = isUtcOffset;
5218
+ proto$2.isUtc = isUtc;
5219
+ proto$2.isUTC = isUtc;
5220
+ proto$2.zoneAbbr = getZoneAbbr;
5221
+ proto$2.zoneName = getZoneName;
5222
+ proto$2.dates = deprecate(
4998
5223
  'dates accessor is deprecated. Use date instead.',
4999
5224
  getSetDayOfMonth
5000
5225
  );
5001
- proto.months = deprecate(
5226
+ proto$2.months = deprecate(
5002
5227
  'months accessor is deprecated. Use month instead',
5003
5228
  getSetMonth
5004
5229
  );
5005
- proto.years = deprecate(
5230
+ proto$2.years = deprecate(
5006
5231
  'years accessor is deprecated. Use year instead',
5007
5232
  getSetYear
5008
5233
  );
5009
- proto.zone = deprecate(
5234
+ proto$2.zone = deprecate(
5010
5235
  'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
5011
5236
  getSetZone
5012
5237
  );
5013
- proto.isDSTShifted = deprecate(
5238
+ proto$2.isDSTShifted = deprecate(
5014
5239
  'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
5015
5240
  isDaylightSavingTimeShifted
5016
5241
  );
@@ -5029,13 +5254,13 @@ function requireMoment () {
5029
5254
 
5030
5255
  var proto$1 = Locale.prototype;
5031
5256
 
5032
- proto$1.calendar = calendar;
5257
+ proto$1.calendar = calendar$1;
5033
5258
  proto$1.longDateFormat = longDateFormat;
5034
5259
  proto$1.invalidDate = invalidDate;
5035
5260
  proto$1.ordinal = ordinal;
5036
5261
  proto$1.preparse = preParsePostFormat;
5037
5262
  proto$1.postformat = preParsePostFormat;
5038
- proto$1.relativeTime = relativeTime;
5263
+ proto$1.relativeTime = relativeTime$1;
5039
5264
  proto$1.pastFuture = pastFuture;
5040
5265
  proto$1.set = set;
5041
5266
  proto$1.eras = localeEras;
@@ -5205,7 +5430,7 @@ function requireMoment () {
5205
5430
 
5206
5431
  var mathAbs = Math.abs;
5207
5432
 
5208
- function abs() {
5433
+ function abs$1() {
5209
5434
  var data = this._data;
5210
5435
 
5211
5436
  this._milliseconds = mathAbs(this._milliseconds);
@@ -5222,7 +5447,7 @@ function requireMoment () {
5222
5447
  return this;
5223
5448
  }
5224
5449
 
5225
- function addSubtract$1(duration, input, value, direction) {
5450
+ function addSubtract(duration, input, value, direction) {
5226
5451
  var other = createDuration(input, value);
5227
5452
 
5228
5453
  duration._milliseconds += direction * other._milliseconds;
@@ -5233,13 +5458,13 @@ function requireMoment () {
5233
5458
  }
5234
5459
 
5235
5460
  // supports only 2.0-style add(1, 's') or add(duration)
5236
- function add$1(input, value) {
5237
- return addSubtract$1(this, input, value, 1);
5461
+ function add(input, value) {
5462
+ return addSubtract(this, input, value, 1);
5238
5463
  }
5239
5464
 
5240
5465
  // supports only 2.0-style subtract(1, 's') or subtract(duration)
5241
- function subtract$1(input, value) {
5242
- return addSubtract$1(this, input, value, -1);
5466
+ function subtract(input, value) {
5467
+ return addSubtract(this, input, value, -1);
5243
5468
  }
5244
5469
 
5245
5470
  function absCeil(number) {
@@ -5263,12 +5488,10 @@ function requireMoment () {
5263
5488
 
5264
5489
  // if we have a mix of positive and negative values, bubble down first
5265
5490
  // check: https://github.com/moment/moment/issues/2166
5266
- if (
5267
- !(
5268
- (milliseconds >= 0 && days >= 0 && months >= 0) ||
5269
- (milliseconds <= 0 && days <= 0 && months <= 0)
5270
- )
5271
- ) {
5491
+ if (!(
5492
+ (milliseconds >= 0 && days >= 0 && months >= 0) ||
5493
+ (milliseconds <= 0 && days <= 0 && months <= 0)
5494
+ )) {
5272
5495
  milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
5273
5496
  days = 0;
5274
5497
  months = 0;
@@ -5375,13 +5598,13 @@ function requireMoment () {
5375
5598
  asMonths = makeAs('M'),
5376
5599
  asQuarters = makeAs('Q'),
5377
5600
  asYears = makeAs('y'),
5378
- valueOf$1 = asMilliseconds;
5601
+ valueOf = asMilliseconds;
5379
5602
 
5380
- function clone$1() {
5603
+ function clone() {
5381
5604
  return createDuration(this);
5382
5605
  }
5383
5606
 
5384
- function get$2(units) {
5607
+ function get(units) {
5385
5608
  units = normalizeUnits(units);
5386
5609
  return this.isValid() ? this[units + 's']() : NaN;
5387
5610
  }
@@ -5417,10 +5640,16 @@ function requireMoment () {
5417
5640
 
5418
5641
  // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
5419
5642
  function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
5420
- return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
5643
+ return relativeTimeWithoutPostformat.call(
5644
+ locale,
5645
+ number || 1,
5646
+ !!withoutSuffix,
5647
+ string,
5648
+ isFuture
5649
+ );
5421
5650
  }
5422
5651
 
5423
- function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
5652
+ function relativeTime(posNegDuration, withoutSuffix, thresholds, locale) {
5424
5653
  var duration = createDuration(posNegDuration).abs(),
5425
5654
  seconds = round(duration.as('s')),
5426
5655
  minutes = round(duration.as('m')),
@@ -5501,29 +5730,29 @@ function requireMoment () {
5501
5730
  withSuffix = argWithSuffix;
5502
5731
  }
5503
5732
  if (typeof argThresholds === 'object') {
5504
- th = Object.assign({}, thresholds, argThresholds);
5733
+ th = extend(extend({}, thresholds), argThresholds || {});
5505
5734
  if (argThresholds.s != null && argThresholds.ss == null) {
5506
5735
  th.ss = argThresholds.s - 1;
5507
5736
  }
5508
5737
  }
5509
5738
 
5510
5739
  locale = this.localeData();
5511
- output = relativeTime$1(this, !withSuffix, th, locale);
5740
+ output = relativeTime(this, !withSuffix, th, locale);
5512
5741
 
5513
5742
  if (withSuffix) {
5514
- output = locale.pastFuture(+this, output);
5743
+ output = pastFutureWithoutPostformat.call(locale, +this, output);
5515
5744
  }
5516
5745
 
5517
5746
  return locale.postformat(output);
5518
5747
  }
5519
5748
 
5520
- var abs$1 = Math.abs;
5749
+ var abs = Math.abs;
5521
5750
 
5522
5751
  function sign(x) {
5523
5752
  return (x > 0) - (x < 0) || +x;
5524
5753
  }
5525
5754
 
5526
- function toISOString$1() {
5755
+ function toISOString() {
5527
5756
  // for ISO strings we do not use the normal bubbling rules:
5528
5757
  // * milliseconds bubble up until they become hours
5529
5758
  // * days do not bubble at all
@@ -5535,9 +5764,9 @@ function requireMoment () {
5535
5764
  return this.localeData().invalidDate();
5536
5765
  }
5537
5766
 
5538
- var seconds = abs$1(this._milliseconds) / 1000,
5539
- days = abs$1(this._days),
5540
- months = abs$1(this._months),
5767
+ var seconds = abs(this._milliseconds) / 1000,
5768
+ days = abs(this._days),
5769
+ months = abs(this._months),
5541
5770
  minutes,
5542
5771
  hours,
5543
5772
  years,
@@ -5585,46 +5814,46 @@ function requireMoment () {
5585
5814
  );
5586
5815
  }
5587
5816
 
5588
- var proto$2 = Duration.prototype;
5817
+ var proto = Duration.prototype;
5589
5818
 
5590
- proto$2.isValid = isValid$1;
5591
- proto$2.abs = abs;
5592
- proto$2.add = add$1;
5593
- proto$2.subtract = subtract$1;
5594
- proto$2.as = as;
5595
- proto$2.asMilliseconds = asMilliseconds;
5596
- proto$2.asSeconds = asSeconds;
5597
- proto$2.asMinutes = asMinutes;
5598
- proto$2.asHours = asHours;
5599
- proto$2.asDays = asDays;
5600
- proto$2.asWeeks = asWeeks;
5601
- proto$2.asMonths = asMonths;
5602
- proto$2.asQuarters = asQuarters;
5603
- proto$2.asYears = asYears;
5604
- proto$2.valueOf = valueOf$1;
5605
- proto$2._bubble = bubble;
5606
- proto$2.clone = clone$1;
5607
- proto$2.get = get$2;
5608
- proto$2.milliseconds = milliseconds;
5609
- proto$2.seconds = seconds;
5610
- proto$2.minutes = minutes;
5611
- proto$2.hours = hours;
5612
- proto$2.days = days;
5613
- proto$2.weeks = weeks;
5614
- proto$2.months = months;
5615
- proto$2.years = years;
5616
- proto$2.humanize = humanize;
5617
- proto$2.toISOString = toISOString$1;
5618
- proto$2.toString = toISOString$1;
5619
- proto$2.toJSON = toISOString$1;
5620
- proto$2.locale = locale;
5621
- proto$2.localeData = localeData;
5819
+ proto.isValid = isValid$1;
5820
+ proto.abs = abs$1;
5821
+ proto.add = add;
5822
+ proto.subtract = subtract;
5823
+ proto.as = as;
5824
+ proto.asMilliseconds = asMilliseconds;
5825
+ proto.asSeconds = asSeconds;
5826
+ proto.asMinutes = asMinutes;
5827
+ proto.asHours = asHours;
5828
+ proto.asDays = asDays;
5829
+ proto.asWeeks = asWeeks;
5830
+ proto.asMonths = asMonths;
5831
+ proto.asQuarters = asQuarters;
5832
+ proto.asYears = asYears;
5833
+ proto.valueOf = valueOf;
5834
+ proto._bubble = bubble;
5835
+ proto.clone = clone;
5836
+ proto.get = get;
5837
+ proto.milliseconds = milliseconds;
5838
+ proto.seconds = seconds;
5839
+ proto.minutes = minutes;
5840
+ proto.hours = hours;
5841
+ proto.days = days;
5842
+ proto.weeks = weeks;
5843
+ proto.months = months;
5844
+ proto.years = years;
5845
+ proto.humanize = humanize;
5846
+ proto.toISOString = toISOString;
5847
+ proto.toString = toISOString;
5848
+ proto.toJSON = toISOString;
5849
+ proto.locale = locale;
5850
+ proto.localeData = localeData;
5622
5851
 
5623
- proto$2.toIsoString = deprecate(
5852
+ proto.toIsoString = deprecate(
5624
5853
  'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
5625
- toISOString$1
5854
+ toISOString
5626
5855
  );
5627
- proto$2.lang = lang;
5856
+ proto.lang = lang;
5628
5857
 
5629
5858
  // FORMATTING
5630
5859
 
@@ -5644,11 +5873,11 @@ function requireMoment () {
5644
5873
 
5645
5874
  //! moment.js
5646
5875
 
5647
- hooks.version = '2.30.1';
5876
+ hooks.version = '2.31.0';
5648
5877
 
5649
5878
  setHookCallback(createLocal);
5650
5879
 
5651
- hooks.fn = proto;
5880
+ hooks.fn = proto$2;
5652
5881
  hooks.min = min;
5653
5882
  hooks.max = max;
5654
5883
  hooks.now = now;
@@ -5657,7 +5886,7 @@ function requireMoment () {
5657
5886
  hooks.months = listMonths;
5658
5887
  hooks.isDate = isDate;
5659
5888
  hooks.locale = getSetGlobalLocale;
5660
- hooks.invalid = createInvalid;
5889
+ hooks.invalid = createInvalid$1;
5661
5890
  hooks.duration = createDuration;
5662
5891
  hooks.isMoment = isMoment;
5663
5892
  hooks.weekdays = listWeekdays;
@@ -5674,7 +5903,7 @@ function requireMoment () {
5674
5903
  hooks.relativeTimeRounding = getSetRelativeTimeRounding;
5675
5904
  hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
5676
5905
  hooks.calendarFormat = getCalendarFormat;
5677
- hooks.prototype = proto;
5906
+ hooks.prototype = proto$2;
5678
5907
 
5679
5908
  // currently HTML5 input type only supports 24-hour formats
5680
5909
  hooks.HTML5_FMT = {