bt-core-app 2.1.37 → 2.2.1

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 (478) hide show
  1. package/dist/_virtual/_commonjs-dynamic-modules.mjs +6 -0
  2. package/dist/_virtual/_commonjsHelpers.mjs +30 -0
  3. package/dist/_virtual/_plugin-vue_export-helper.mjs +9 -0
  4. package/dist/_virtual/index.mjs +4 -0
  5. package/dist/_virtual/localforage.mjs +4 -0
  6. package/dist/_virtual/luxon.mjs +6 -0
  7. package/dist/_virtual/matcher.mjs +4 -0
  8. package/dist/_virtual/parser.mjs +4 -0
  9. package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/index.mjs +12 -0
  10. package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/matcher.mjs +220 -0
  11. package/dist/bt-core/core/node_modules/@datasert/cronjs-parser/dist/parser.mjs +186 -0
  12. package/dist/bt-core/core/node_modules/@mdi/js/mdi.mjs +70 -0
  13. package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/main.css.mjs +1 -0
  14. package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs +5210 -0
  15. package/dist/bt-core/core/node_modules/date-fns/_lib/addLeadingZeros.mjs +7 -0
  16. package/dist/bt-core/core/node_modules/date-fns/_lib/defaultOptions.mjs +7 -0
  17. package/dist/bt-core/core/node_modules/date-fns/_lib/format/formatters.mjs +517 -0
  18. package/dist/bt-core/core/node_modules/date-fns/_lib/format/lightFormatters.mjs +59 -0
  19. package/dist/bt-core/core/node_modules/date-fns/_lib/format/longFormatters.mjs +52 -0
  20. package/dist/bt-core/core/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs +18 -0
  21. package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeDates.mjs +11 -0
  22. package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeInterval.mjs +8 -0
  23. package/dist/bt-core/core/node_modules/date-fns/_lib/protectedTokens.mjs +21 -0
  24. package/dist/bt-core/core/node_modules/date-fns/add.mjs +20 -0
  25. package/dist/bt-core/core/node_modules/date-fns/addDays.mjs +10 -0
  26. package/dist/bt-core/core/node_modules/date-fns/addHours.mjs +9 -0
  27. package/dist/bt-core/core/node_modules/date-fns/addMilliseconds.mjs +9 -0
  28. package/dist/bt-core/core/node_modules/date-fns/addMonths.mjs +21 -0
  29. package/dist/bt-core/core/node_modules/date-fns/addQuarters.mjs +8 -0
  30. package/dist/bt-core/core/node_modules/date-fns/addYears.mjs +8 -0
  31. package/dist/bt-core/core/node_modules/date-fns/compareAsc.mjs +9 -0
  32. package/dist/bt-core/core/node_modules/date-fns/constants.mjs +9 -0
  33. package/dist/bt-core/core/node_modules/date-fns/constructFrom.mjs +8 -0
  34. package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarDays.mjs +16 -0
  35. package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarYears.mjs +13 -0
  36. package/dist/bt-core/core/node_modules/date-fns/differenceInYears.mjs +17 -0
  37. package/dist/bt-core/core/node_modules/date-fns/eachDayOfInterval.mjs +20 -0
  38. package/dist/bt-core/core/node_modules/date-fns/eachQuarterOfInterval.mjs +21 -0
  39. package/dist/bt-core/core/node_modules/date-fns/endOfQuarter.mjs +9 -0
  40. package/dist/bt-core/core/node_modules/date-fns/endOfWeek.mjs +11 -0
  41. package/dist/bt-core/core/node_modules/date-fns/endOfYear.mjs +9 -0
  42. package/dist/bt-core/core/node_modules/date-fns/format.mjs +60 -0
  43. package/dist/bt-core/core/node_modules/date-fns/getDay.mjs +8 -0
  44. package/dist/bt-core/core/node_modules/date-fns/getDayOfYear.mjs +11 -0
  45. package/dist/bt-core/core/node_modules/date-fns/getDaysInMonth.mjs +10 -0
  46. package/dist/bt-core/core/node_modules/date-fns/getDefaultOptions.mjs +8 -0
  47. package/dist/bt-core/core/node_modules/date-fns/getHours.mjs +8 -0
  48. package/dist/bt-core/core/node_modules/date-fns/getISODay.mjs +9 -0
  49. package/dist/bt-core/core/node_modules/date-fns/getISOWeek.mjs +12 -0
  50. package/dist/bt-core/core/node_modules/date-fns/getISOWeekYear.mjs +15 -0
  51. package/dist/bt-core/core/node_modules/date-fns/getMinutes.mjs +8 -0
  52. package/dist/bt-core/core/node_modules/date-fns/getMonth.mjs +8 -0
  53. package/dist/bt-core/core/node_modules/date-fns/getQuarter.mjs +9 -0
  54. package/dist/bt-core/core/node_modules/date-fns/getSeconds.mjs +8 -0
  55. package/dist/bt-core/core/node_modules/date-fns/getWeek.mjs +12 -0
  56. package/dist/bt-core/core/node_modules/date-fns/getWeekYear.mjs +17 -0
  57. package/dist/bt-core/core/node_modules/date-fns/getYear.mjs +8 -0
  58. package/dist/bt-core/core/node_modules/date-fns/isAfter.mjs +8 -0
  59. package/dist/bt-core/core/node_modules/date-fns/isBefore.mjs +8 -0
  60. package/dist/bt-core/core/node_modules/date-fns/isDate.mjs +7 -0
  61. package/dist/bt-core/core/node_modules/date-fns/isEqual.mjs +8 -0
  62. package/dist/bt-core/core/node_modules/date-fns/isSameQuarter.mjs +14 -0
  63. package/dist/bt-core/core/node_modules/date-fns/isValid.mjs +9 -0
  64. package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs +9 -0
  65. package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs +18 -0
  66. package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchFn.mjs +31 -0
  67. package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs +17 -0
  68. package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs +70 -0
  69. package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs +33 -0
  70. package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs +11 -0
  71. package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/localize.mjs +155 -0
  72. package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/match.mjs +110 -0
  73. package/dist/bt-core/core/node_modules/date-fns/locale/en-US.mjs +21 -0
  74. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Parser.mjs +22 -0
  75. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Setter.mjs +41 -0
  76. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/constants.mjs +49 -0
  77. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs +49 -0
  78. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs +49 -0
  79. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DateParser.mjs +61 -0
  80. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs +51 -0
  81. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayParser.mjs +45 -0
  82. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs +49 -0
  83. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/EraParser.mjs +30 -0
  84. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs +21 -0
  85. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs +22 -0
  86. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs +32 -0
  87. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs +32 -0
  88. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs +33 -0
  89. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs +33 -0
  90. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs +99 -0
  91. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs +48 -0
  92. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs +48 -0
  93. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs +49 -0
  94. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs +40 -0
  95. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs +74 -0
  96. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs +48 -0
  97. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs +69 -0
  98. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs +32 -0
  99. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs +71 -0
  100. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs +70 -0
  101. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs +32 -0
  102. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs +74 -0
  103. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs +71 -0
  104. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs +70 -0
  105. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs +22 -0
  106. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs +22 -0
  107. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/YearParser.mjs +49 -0
  108. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers.mjs +67 -0
  109. package/dist/bt-core/core/node_modules/date-fns/parse/_lib/utils.mjs +103 -0
  110. package/dist/bt-core/core/node_modules/date-fns/parse.mjs +90 -0
  111. package/dist/bt-core/core/node_modules/date-fns/set.mjs +11 -0
  112. package/dist/bt-core/core/node_modules/date-fns/setDay.mjs +12 -0
  113. package/dist/bt-core/core/node_modules/date-fns/setHours.mjs +9 -0
  114. package/dist/bt-core/core/node_modules/date-fns/setISODay.mjs +11 -0
  115. package/dist/bt-core/core/node_modules/date-fns/setISOWeek.mjs +10 -0
  116. package/dist/bt-core/core/node_modules/date-fns/setMilliseconds.mjs +9 -0
  117. package/dist/bt-core/core/node_modules/date-fns/setMinutes.mjs +9 -0
  118. package/dist/bt-core/core/node_modules/date-fns/setMonth.mjs +13 -0
  119. package/dist/bt-core/core/node_modules/date-fns/setSeconds.mjs +9 -0
  120. package/dist/bt-core/core/node_modules/date-fns/setWeek.mjs +10 -0
  121. package/dist/bt-core/core/node_modules/date-fns/setYear.mjs +10 -0
  122. package/dist/bt-core/core/node_modules/date-fns/startOfDay.mjs +9 -0
  123. package/dist/bt-core/core/node_modules/date-fns/startOfISOWeek.mjs +8 -0
  124. package/dist/bt-core/core/node_modules/date-fns/startOfISOWeekYear.mjs +11 -0
  125. package/dist/bt-core/core/node_modules/date-fns/startOfMonth.mjs +9 -0
  126. package/dist/bt-core/core/node_modules/date-fns/startOfQuarter.mjs +9 -0
  127. package/dist/bt-core/core/node_modules/date-fns/startOfWeek.mjs +11 -0
  128. package/dist/bt-core/core/node_modules/date-fns/startOfWeekYear.mjs +13 -0
  129. package/dist/bt-core/core/node_modules/date-fns/startOfYear.mjs +9 -0
  130. package/dist/bt-core/core/node_modules/date-fns/sub.mjs +19 -0
  131. package/dist/bt-core/core/node_modules/date-fns/subDays.mjs +8 -0
  132. package/dist/bt-core/core/node_modules/date-fns/subMonths.mjs +8 -0
  133. package/dist/bt-core/core/node_modules/date-fns/subYears.mjs +8 -0
  134. package/dist/bt-core/core/node_modules/date-fns/toDate.mjs +8 -0
  135. package/dist/bt-core/core/node_modules/date-fns/transpose.mjs +18 -0
  136. package/dist/bt-core/core/node_modules/localforage/dist/localforage.mjs +1454 -0
  137. package/dist/bt-core/core/node_modules/luxon/src/datetime.mjs +1855 -0
  138. package/dist/bt-core/core/node_modules/luxon/src/duration.mjs +753 -0
  139. package/dist/bt-core/core/node_modules/luxon/src/errors.mjs +40 -0
  140. package/dist/bt-core/core/node_modules/luxon/src/impl/conversions.mjs +92 -0
  141. package/dist/bt-core/core/node_modules/luxon/src/impl/diff.mjs +36 -0
  142. package/dist/bt-core/core/node_modules/luxon/src/impl/digits.mjs +77 -0
  143. package/dist/bt-core/core/node_modules/luxon/src/impl/english.mjs +138 -0
  144. package/dist/bt-core/core/node_modules/luxon/src/impl/formats.mjs +150 -0
  145. package/dist/bt-core/core/node_modules/luxon/src/impl/formatter.mjs +258 -0
  146. package/dist/bt-core/core/node_modules/luxon/src/impl/invalid.mjs +11 -0
  147. package/dist/bt-core/core/node_modules/luxon/src/impl/locale.mjs +294 -0
  148. package/dist/bt-core/core/node_modules/luxon/src/impl/regexParser.mjs +202 -0
  149. package/dist/bt-core/core/node_modules/luxon/src/impl/tokenParser.mjs +329 -0
  150. package/dist/bt-core/core/node_modules/luxon/src/impl/util.mjs +220 -0
  151. package/dist/bt-core/core/node_modules/luxon/src/impl/zoneUtil.mjs +20 -0
  152. package/dist/bt-core/core/node_modules/luxon/src/info.mjs +180 -0
  153. package/dist/bt-core/core/node_modules/luxon/src/interval.mjs +481 -0
  154. package/dist/bt-core/core/node_modules/luxon/src/luxon.mjs +24 -0
  155. package/dist/bt-core/core/node_modules/luxon/src/settings.mjs +150 -0
  156. package/dist/bt-core/core/node_modules/luxon/src/zone.mjs +88 -0
  157. package/dist/bt-core/core/node_modules/luxon/src/zones/IANAZone.mjs +183 -0
  158. package/dist/bt-core/core/node_modules/luxon/src/zones/fixedOffsetZone.mjs +125 -0
  159. package/dist/bt-core/core/node_modules/luxon/src/zones/invalidZone.mjs +41 -0
  160. package/dist/bt-core/core/node_modules/luxon/src/zones/systemZone.mjs +47 -0
  161. package/dist/bt-core/core/node_modules/merge-images/dist/index.es2015.mjs +47 -0
  162. package/dist/bt-core/core/node_modules/signature_pad/dist/signature_pad.mjs +248 -0
  163. package/dist/bt-core/core/node_modules/thenby/thenBy.module.mjs +38 -0
  164. package/dist/bt-core/core/node_modules/vue-picture-cropper/lib/index.mjs +1643 -0
  165. package/dist/bt-core/core/node_modules/vue-signature-pad/dist/vue-signature-pad.esm.mjs +173 -0
  166. package/dist/bt-core/core/node_modules/vue-use-spring/dist/index.mjs +204 -0
  167. package/dist/bt-core/core/node_modules/vuetify/lib/composables/defaults.mjs +61 -0
  168. package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +82 -0
  169. package/dist/bt-core/core/node_modules/vuetify/lib/iconsets/mdi-svg.mjs +74 -0
  170. package/dist/bt-core/core/node_modules/vuetify/lib/util/colors.mjs +322 -0
  171. package/dist/bt-core/core/node_modules/vuetify/lib/util/console.mjs +7 -0
  172. package/dist/bt-core/core/node_modules/vuetify/lib/util/defineComponent.mjs +34 -0
  173. package/dist/bt-core/core/node_modules/vuetify/lib/util/getCurrentInstance.mjs +10 -0
  174. package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +44 -0
  175. package/dist/bt-core/core/node_modules/vuetify/lib/util/injectSelf.mjs +12 -0
  176. package/dist/bt-core/core/node_modules/vuetify/lib/util/propsFactory.mjs +14 -0
  177. package/dist/components/BT-Assistant-Menu.vue.d.ts +19 -0
  178. package/dist/components/BT-Assistant-Menu.vue.mjs +464 -0
  179. package/dist/components/BT-Assistant-Menu.vue2.mjs +4 -0
  180. package/dist/components/BT-Avatar.vue.d.ts +16 -0
  181. package/dist/components/BT-Avatar.vue.mjs +41 -0
  182. package/dist/components/BT-Avatar.vue2.mjs +4 -0
  183. package/dist/components/BT-Background-Task.vue.d.ts +61 -0
  184. package/dist/components/BT-Background-Task.vue.mjs +89 -0
  185. package/dist/components/BT-Background-Task.vue2.mjs +4 -0
  186. package/dist/components/BT-Blade-Item.vue.d.ts +578 -0
  187. package/dist/components/BT-Blade-Item.vue.mjs +441 -0
  188. package/dist/components/BT-Blade-Item.vue2.mjs +4 -0
  189. package/dist/components/BT-Blade-Items.vue.d.ts +2358 -0
  190. package/dist/components/BT-Blade-Items.vue.mjs +7 -0
  191. package/dist/components/BT-Blade-Items.vue2.mjs +943 -0
  192. package/dist/components/BT-Blade-Items.vue3.mjs +1 -0
  193. package/dist/components/BT-Blade-Steps.vue.d.ts +1740 -0
  194. package/dist/components/BT-Blade-Steps.vue.mjs +7 -0
  195. package/dist/components/BT-Blade-Steps.vue2.mjs +1305 -0
  196. package/dist/components/BT-Blade-Steps.vue3.mjs +1 -0
  197. package/dist/components/BT-Blade.vue.d.ts +109 -0
  198. package/dist/components/BT-Blade.vue.mjs +268 -0
  199. package/dist/components/BT-Blade.vue2.mjs +4 -0
  200. package/dist/components/BT-Btn.vue.d.ts +47 -0
  201. package/dist/components/BT-Btn.vue.mjs +43 -0
  202. package/dist/components/BT-Btn.vue2.mjs +4 -0
  203. package/dist/components/BT-Camera-Overlay.vue.d.ts +57 -0
  204. package/dist/components/BT-Camera-Overlay.vue.mjs +173 -0
  205. package/dist/components/BT-Camera-Overlay.vue2.mjs +4 -0
  206. package/dist/components/BT-Col.vue.d.ts +49 -0
  207. package/dist/components/BT-Col.vue.mjs +33 -0
  208. package/dist/components/BT-Col.vue2.mjs +4 -0
  209. package/dist/components/BT-Color-Picker-Menu.vue.d.ts +23 -0
  210. package/dist/components/BT-Color-Picker-Menu.vue.mjs +63 -0
  211. package/dist/components/BT-Color-Picker-Menu.vue2.mjs +4 -0
  212. package/dist/components/BT-Cosmetics-Menu.vue.d.ts +14 -0
  213. package/dist/components/BT-Cosmetics-Menu.vue.mjs +211 -0
  214. package/dist/components/BT-Cosmetics-Menu.vue2.mjs +4 -0
  215. package/dist/components/BT-Cron-Span.vue.d.ts +21 -0
  216. package/dist/components/BT-Cron-Span.vue.mjs +66 -0
  217. package/dist/components/BT-Cron-Span.vue2.mjs +4 -0
  218. package/dist/components/BT-Cron.vue.d.ts +37 -0
  219. package/dist/components/BT-Cron.vue.mjs +538 -0
  220. package/dist/components/BT-Cron.vue2.mjs +4 -0
  221. package/dist/components/BT-Date-Select.vue.d.ts +46 -0
  222. package/dist/components/BT-Date-Select.vue.mjs +71 -0
  223. package/dist/components/BT-Date-Select.vue2.mjs +4 -0
  224. package/dist/components/BT-Date.vue.d.ts +53 -0
  225. package/dist/components/BT-Date.vue.mjs +55 -0
  226. package/dist/components/BT-Date.vue2.mjs +4 -0
  227. package/dist/components/BT-Demo-Profile-Select.vue.d.ts +17 -0
  228. package/dist/components/BT-Demo-Profile-Select.vue.mjs +52 -0
  229. package/dist/components/BT-Demo-Profile-Select.vue2.mjs +4 -0
  230. package/dist/components/BT-Dialog-Confirm.vue.d.ts +2 -0
  231. package/dist/components/BT-Dialog-Confirm.vue.mjs +63 -0
  232. package/dist/components/BT-Dialog-Confirm.vue2.mjs +4 -0
  233. package/dist/components/BT-Dialog-Date.vue.d.ts +2 -0
  234. package/dist/components/BT-Dialog-Date.vue.mjs +79 -0
  235. package/dist/components/BT-Dialog-Date.vue2.mjs +4 -0
  236. package/dist/components/BT-Dialog-Number.vue.d.ts +2 -0
  237. package/dist/components/BT-Dialog-Number.vue.mjs +178 -0
  238. package/dist/components/BT-Dialog-Number.vue2.mjs +4 -0
  239. package/dist/components/BT-Dialog-Select.vue.d.ts +2 -0
  240. package/dist/components/BT-Dialog-Select.vue.mjs +235 -0
  241. package/dist/components/BT-Dialog-Select.vue2.mjs +4 -0
  242. package/dist/components/BT-Divider.vue.d.ts +24 -0
  243. package/dist/components/BT-Divider.vue.mjs +31 -0
  244. package/dist/components/BT-Divider.vue2.mjs +4 -0
  245. package/dist/components/BT-Drag-Counter.vue.d.ts +114 -0
  246. package/dist/components/BT-Drag-Counter.vue.mjs +7 -0
  247. package/dist/components/BT-Drag-Counter.vue2.mjs +156 -0
  248. package/dist/components/BT-Drag-Counter.vue3.mjs +1 -0
  249. package/dist/components/BT-Entity.vue.d.ts +82 -0
  250. package/dist/components/BT-Entity.vue.mjs +172 -0
  251. package/dist/components/BT-Entity.vue2.mjs +4 -0
  252. package/dist/components/BT-Error.vue.d.ts +15 -0
  253. package/dist/components/BT-Error.vue.mjs +35 -0
  254. package/dist/components/BT-Error.vue2.mjs +4 -0
  255. package/dist/components/BT-Field-Checkbox.vue.d.ts +57 -0
  256. package/dist/components/BT-Field-Checkbox.vue.mjs +61 -0
  257. package/dist/components/BT-Field-Checkbox.vue2.mjs +4 -0
  258. package/dist/components/BT-Field-Date.vue.d.ts +69 -0
  259. package/dist/components/BT-Field-Date.vue.mjs +120 -0
  260. package/dist/components/BT-Field-Date.vue2.mjs +4 -0
  261. package/dist/components/BT-Field-Entity.vue.d.ts +48 -0
  262. package/dist/components/BT-Field-Entity.vue.mjs +55 -0
  263. package/dist/components/BT-Field-Entity.vue2.mjs +4 -0
  264. package/dist/components/BT-Field-Select-Simple.vue.d.ts +55 -0
  265. package/dist/components/BT-Field-Select-Simple.vue.mjs +52 -0
  266. package/dist/components/BT-Field-Select-Simple.vue2.mjs +4 -0
  267. package/dist/components/BT-Field-Select.vue.d.ts +70 -0
  268. package/dist/components/BT-Field-Select.vue.mjs +60 -0
  269. package/dist/components/BT-Field-Select.vue2.mjs +4 -0
  270. package/dist/components/BT-Field-String.vue.d.ts +57 -0
  271. package/dist/components/BT-Field-String.vue.mjs +87 -0
  272. package/dist/components/BT-Field-String.vue2.mjs +4 -0
  273. package/dist/components/BT-Field-Switch.vue.d.ts +51 -0
  274. package/dist/components/BT-Field-Switch.vue.mjs +64 -0
  275. package/dist/components/BT-Field-Switch.vue2.mjs +4 -0
  276. package/dist/components/BT-Field-Tags.vue.d.ts +53 -0
  277. package/dist/components/BT-Field-Tags.vue.mjs +80 -0
  278. package/dist/components/BT-Field-Tags.vue2.mjs +4 -0
  279. package/dist/components/BT-Field-Textarea.vue.d.ts +53 -0
  280. package/dist/components/BT-Field-Textarea.vue.mjs +66 -0
  281. package/dist/components/BT-Field-Textarea.vue2.mjs +4 -0
  282. package/dist/components/BT-Field-Trigger.vue.d.ts +113 -0
  283. package/dist/components/BT-Field-Trigger.vue.mjs +368 -0
  284. package/dist/components/BT-Field-Trigger.vue2.mjs +4 -0
  285. package/dist/components/BT-Field.vue.d.ts +49 -0
  286. package/dist/components/BT-Field.vue.mjs +59 -0
  287. package/dist/components/BT-Field.vue2.mjs +4 -0
  288. package/dist/components/BT-Form-Builder.vue.d.ts +74 -0
  289. package/dist/components/BT-Form-Builder.vue.mjs +762 -0
  290. package/dist/components/BT-Form-Builder.vue2.mjs +4 -0
  291. package/dist/components/BT-Form-Field.vue.d.ts +41 -0
  292. package/dist/components/BT-Form-Field.vue.mjs +186 -0
  293. package/dist/components/BT-Form-Field.vue2.mjs +4 -0
  294. package/dist/components/BT-Form.vue.d.ts +95 -0
  295. package/dist/components/BT-Form.vue.mjs +635 -0
  296. package/dist/components/BT-Form.vue2.mjs +4 -0
  297. package/dist/components/BT-Header-Option.vue.d.ts +18 -0
  298. package/dist/components/BT-Header-Option.vue.mjs +62 -0
  299. package/dist/components/BT-Header-Option.vue2.mjs +4 -0
  300. package/dist/components/BT-Image-Select.vue.d.ts +71 -0
  301. package/dist/components/BT-Image-Select.vue.mjs +219 -0
  302. package/dist/components/BT-Image-Select.vue2.mjs +4 -0
  303. package/dist/components/BT-Json.vue.d.ts +6 -0
  304. package/dist/components/BT-Json.vue.mjs +38 -0
  305. package/dist/components/BT-Json.vue2.mjs +1 -0
  306. package/dist/components/BT-Json.vue3.mjs +5 -0
  307. package/dist/components/BT-Loader.vue.d.ts +6 -0
  308. package/dist/components/BT-Loader.vue.mjs +37 -0
  309. package/dist/components/BT-Loader.vue2.mjs +4 -0
  310. package/dist/components/BT-Nav-Sidebar.vue.d.ts +25 -0
  311. package/dist/components/BT-Nav-Sidebar.vue.mjs +138 -0
  312. package/dist/components/BT-Nav-Sidebar.vue2.mjs +4 -0
  313. package/dist/components/BT-Number.vue.d.ts +23 -0
  314. package/dist/components/BT-Number.vue.mjs +7 -0
  315. package/dist/components/BT-Number.vue2.mjs +43 -0
  316. package/dist/components/BT-Number.vue3.mjs +1 -0
  317. package/dist/components/BT-Numpad.vue.d.ts +68 -0
  318. package/dist/components/BT-Numpad.vue.mjs +191 -0
  319. package/dist/components/BT-Numpad.vue2.mjs +4 -0
  320. package/dist/components/BT-Select-Inline.vue.d.ts +121 -0
  321. package/dist/components/BT-Select-Inline.vue.mjs +74 -0
  322. package/dist/components/BT-Select-Inline.vue2.mjs +24 -0
  323. package/dist/components/BT-Select-Inline.vue3.mjs +1 -0
  324. package/dist/components/BT-Select-List-Box.vue.d.ts +137 -0
  325. package/dist/components/BT-Select-List-Box.vue.mjs +414 -0
  326. package/dist/components/BT-Select-List-Box.vue2.mjs +4 -0
  327. package/dist/components/BT-Select-Simple.vue.d.ts +58 -0
  328. package/dist/components/BT-Select-Simple.vue.mjs +126 -0
  329. package/dist/components/BT-Select-Simple.vue2.mjs +4 -0
  330. package/dist/components/BT-Select.vue.d.ts +73 -0
  331. package/dist/components/BT-Select.vue.mjs +138 -0
  332. package/dist/components/BT-Select.vue2.mjs +4 -0
  333. package/dist/components/BT-Signature-Overlay.vue.d.ts +65 -0
  334. package/dist/components/BT-Signature-Overlay.vue.mjs +146 -0
  335. package/dist/components/BT-Signature-Overlay.vue2.mjs +4 -0
  336. package/dist/components/BT-Signature.vue.d.ts +70 -0
  337. package/dist/components/BT-Signature.vue.mjs +155 -0
  338. package/dist/components/BT-Signature.vue2.mjs +4 -0
  339. package/dist/components/BT-Slider.vue.d.ts +37 -0
  340. package/dist/components/BT-Slider.vue.mjs +126 -0
  341. package/dist/components/BT-Slider.vue2.mjs +4 -0
  342. package/dist/components/BT-Span.vue.d.ts +19 -0
  343. package/dist/components/BT-Span.vue.mjs +23 -0
  344. package/dist/components/BT-Span.vue2.mjs +4 -0
  345. package/dist/components/BT-Square-Check.vue.d.ts +104 -0
  346. package/dist/components/BT-Square-Check.vue.mjs +98 -0
  347. package/dist/components/BT-Square-Check.vue2.mjs +4 -0
  348. package/dist/components/BT-Status-Item.vue.d.ts +45 -0
  349. package/dist/components/BT-Status-Item.vue.mjs +51 -0
  350. package/dist/components/BT-Status-Item.vue2.mjs +4 -0
  351. package/dist/components/BT-Tags.vue.d.ts +19 -0
  352. package/dist/components/BT-Tags.vue.mjs +32 -0
  353. package/dist/components/BT-Tags.vue2.mjs +4 -0
  354. package/dist/components/BT-Tour.vue.d.ts +43 -0
  355. package/dist/components/BT-Tour.vue.mjs +78 -0
  356. package/dist/components/BT-Tour.vue2.mjs +4 -0
  357. package/dist/components.mjs +36 -0
  358. package/dist/composables/actions-local.d.ts +14 -0
  359. package/dist/composables/actions-local.mjs +26 -0
  360. package/dist/composables/actions-tracker.d.ts +36 -0
  361. package/dist/composables/actions-tracker.mjs +88 -0
  362. package/dist/composables/actions.d.ts +116 -0
  363. package/dist/composables/actions.mjs +272 -0
  364. package/dist/composables/api.d.ts +100 -0
  365. package/dist/composables/api.mjs +329 -0
  366. package/dist/composables/assistant.d.ts +38 -0
  367. package/dist/composables/assistant.mjs +70 -0
  368. package/dist/composables/auth.d.ts +94 -0
  369. package/dist/composables/auth.mjs +257 -0
  370. package/dist/composables/background-tasks.d.ts +31 -0
  371. package/dist/composables/background-tasks.mjs +79 -0
  372. package/dist/composables/blade-old.d.ts +1 -0
  373. package/dist/composables/blade.d.ts +91 -0
  374. package/dist/composables/blade.mjs +156 -0
  375. package/dist/composables/charts.d.ts +10 -0
  376. package/dist/composables/colorizer.d.ts +5 -0
  377. package/dist/composables/colorizer.mjs +27 -0
  378. package/dist/composables/component-config.d.ts +8 -0
  379. package/dist/composables/component-config.mjs +11 -0
  380. package/dist/composables/confirm.d.ts +1 -0
  381. package/dist/composables/confirm.mjs +11 -0
  382. package/dist/composables/cosmetics.d.ts +44 -0
  383. package/dist/composables/cosmetics.mjs +125 -0
  384. package/dist/composables/cron-adjustments.d.ts +63 -0
  385. package/dist/composables/cron-adjustments.mjs +106 -0
  386. package/dist/composables/cron.d.ts +72 -0
  387. package/dist/composables/cron.mjs +326 -0
  388. package/dist/composables/csv.d.ts +44 -0
  389. package/dist/composables/csv.mjs +163 -0
  390. package/dist/composables/dates.d.ts +22 -0
  391. package/dist/composables/dates.mjs +61 -0
  392. package/dist/composables/demo.d.ts +68 -0
  393. package/dist/composables/demo.mjs +173 -0
  394. package/dist/composables/dialog-items.d.ts +117 -0
  395. package/dist/composables/dialog-items.mjs +72 -0
  396. package/dist/composables/document-meta.d.ts +11 -0
  397. package/dist/composables/document-meta.mjs +20 -0
  398. package/dist/composables/draggable.d.ts +56 -0
  399. package/dist/composables/draggable.mjs +76 -0
  400. package/dist/composables/feedback.d.ts +24 -0
  401. package/dist/composables/feedback.mjs +32 -0
  402. package/dist/composables/filters.d.ts +27 -0
  403. package/dist/composables/filters.mjs +218 -0
  404. package/dist/composables/forage.d.ts +89 -0
  405. package/dist/composables/forage.mjs +37 -0
  406. package/dist/composables/forms.d.ts +104 -0
  407. package/dist/composables/forms.mjs +256 -0
  408. package/dist/composables/geo.d.ts +24 -0
  409. package/dist/composables/geo.mjs +95 -0
  410. package/dist/composables/graph-pro.d.ts +98 -0
  411. package/dist/composables/graph-pro.mjs +205 -0
  412. package/dist/composables/graphing.d.ts +1 -0
  413. package/dist/composables/heights.d.ts +24 -0
  414. package/dist/composables/heights.mjs +41 -0
  415. package/dist/composables/helpers.d.ts +114 -0
  416. package/dist/composables/helpers.mjs +512 -0
  417. package/dist/composables/icons.d.ts +3 -0
  418. package/dist/composables/icons.mjs +84 -0
  419. package/dist/composables/id.d.ts +8 -0
  420. package/dist/composables/id.mjs +32 -0
  421. package/dist/composables/item.d.ts +132 -0
  422. package/dist/composables/item.mjs +263 -0
  423. package/dist/composables/iterating.d.ts +1 -0
  424. package/dist/composables/list.d.ts +345 -0
  425. package/dist/composables/list.mjs +460 -0
  426. package/dist/composables/lists.d.ts +10 -0
  427. package/dist/composables/lists.mjs +31 -0
  428. package/dist/composables/menu.d.ts +35 -0
  429. package/dist/composables/menu.mjs +63 -0
  430. package/dist/composables/navigation.d.ts +123 -0
  431. package/dist/composables/navigation.mjs +157 -0
  432. package/dist/composables/nested.d.ts +3 -0
  433. package/dist/composables/nested.mjs +20 -0
  434. package/dist/composables/old-dialogs.d.ts +1 -0
  435. package/dist/composables/presets.d.ts +8 -0
  436. package/dist/composables/presets.mjs +16 -0
  437. package/dist/composables/pwa-old.d.ts +15 -0
  438. package/dist/composables/pwa.d.ts +26 -0
  439. package/dist/composables/pwa.mjs +80 -0
  440. package/dist/composables/resizable.d.ts +34 -0
  441. package/dist/composables/resizable.mjs +135 -0
  442. package/dist/composables/routing-old.d.ts +1 -0
  443. package/dist/composables/routing.d.ts +16 -0
  444. package/dist/composables/routing.mjs +112 -0
  445. package/dist/composables/rules.d.ts +13 -0
  446. package/dist/composables/rules.mjs +22 -0
  447. package/dist/composables/select.d.ts +78 -0
  448. package/dist/composables/select.mjs +129 -0
  449. package/dist/composables/settings.d.ts +6 -0
  450. package/dist/composables/settings.mjs +21 -0
  451. package/dist/composables/setup.d.ts +1 -0
  452. package/dist/composables/steps-old.d.ts +1 -0
  453. package/dist/composables/steps.d.ts +53 -0
  454. package/dist/composables/steps.mjs +39 -0
  455. package/dist/composables/stores.d.ts +258 -0
  456. package/dist/composables/stores.mjs +1257 -0
  457. package/dist/composables/sync.d.ts +33 -0
  458. package/dist/composables/track.d.ts +13 -0
  459. package/dist/composables/track.mjs +30 -0
  460. package/dist/composables/urls.d.ts +35 -0
  461. package/dist/composables/urls.mjs +66 -0
  462. package/dist/composables/vuetify.d.ts +85 -0
  463. package/dist/composables.mjs +237 -0
  464. package/dist/core.d.ts +48 -0
  465. package/dist/core.mjs +6 -0
  466. package/dist/core2.mjs +118 -0
  467. package/dist/index-components.d.ts +19 -0
  468. package/dist/index-composables.d.ts +75 -0
  469. package/dist/index-core.d.ts +3 -0
  470. package/dist/index.d.ts +96 -3036
  471. package/dist/index.mjs +275 -0
  472. package/dist/main.d.ts +1 -0
  473. package/dist/node_modules/bt-core-app/dist/bt-core-app.mjs +30372 -0
  474. package/dist/style.css +1 -5
  475. package/dist/types.d.ts +18 -0
  476. package/dist/types.mjs +7 -0
  477. package/package.json +13 -1
  478. package/dist/bt-core-app.js +0 -81355
@@ -0,0 +1,1855 @@
1
+ import E from "./duration.mjs";
2
+ import Ie from "./interval.mjs";
3
+ import T from "./settings.mjs";
4
+ import p from "./info.mjs";
5
+ import O from "./impl/formatter.mjs";
6
+ import ee from "./zones/fixedOffsetZone.mjs";
7
+ import y from "./impl/locale.mjs";
8
+ import { isUndefined as f, isNumber as U, isDate as De, normalizeObject as te, objToLocalTS as J, isLeapYear as Me, daysInMonth as P, daysInYear as be, weeksInWeekYear as ne, maybeArray as ve, bestBy as re, padStart as m, roundTo as _e } from "./impl/util.mjs";
9
+ import { normalizeZone as S } from "./impl/zoneUtil.mjs";
10
+ import Ve from "./impl/diff.mjs";
11
+ import { parseISODate as We, parseRFC2822Date as Fe, parseHTTPDate as pe, parseSQL as Le } from "./impl/regexParser.mjs";
12
+ import { parseFromTokens as ze, formatOptsToTokens as He, expandMacroTokens as Ue, explainFromTokens as Ce, TokenParser as Ae } from "./impl/tokenParser.mjs";
13
+ import { usesLocalWeekValues as ie, gregorianToWeek as Y, gregorianToOrdinal as j, hasInvalidWeekData as xe, hasInvalidOrdinalData as Ye, hasInvalidGregorianData as ye, weekToGregorian as se, ordinalToGregorian as ae, hasInvalidTimeData as Te } from "./impl/conversions.mjs";
14
+ import { DATE_SHORT as oe, DATE_MED as Ze, DATE_MED_WITH_WEEKDAY as je, DATE_FULL as qe, DATE_HUGE as Ge, TIME_SIMPLE as Re, TIME_WITH_SECONDS as $e, TIME_WITH_SHORT_OFFSET as Pe, TIME_WITH_LONG_OFFSET as Qe, TIME_24_SIMPLE as Je, TIME_24_WITH_SECONDS as Ke, TIME_24_WITH_SHORT_OFFSET as Be, TIME_24_WITH_LONG_OFFSET as Xe, DATETIME_SHORT as et, DATETIME_SHORT_WITH_SECONDS as tt, DATETIME_MED as nt, DATETIME_MED_WITH_SECONDS as rt, DATETIME_MED_WITH_WEEKDAY as it, DATETIME_FULL as st, DATETIME_FULL_WITH_SECONDS as at, DATETIME_HUGE as ot, DATETIME_HUGE_WITH_SECONDS as lt } from "./impl/formats.mjs";
15
+ import { InvalidArgumentError as w, ConflictingSpecificationError as L, InvalidDateTimeError as ut, InvalidUnitError as ct } from "./errors.mjs";
16
+ import N from "./impl/invalid.mjs";
17
+ const q = "Invalid DateTime", le = 864e13;
18
+ function v(n) {
19
+ return new N("unsupported zone", `the zone "${n.name}" is not supported`);
20
+ }
21
+ function G(n) {
22
+ return n.weekData === null && (n.weekData = Y(n.c)), n.weekData;
23
+ }
24
+ function R(n) {
25
+ return n.localWeekData === null && (n.localWeekData = Y(
26
+ n.c,
27
+ n.loc.getMinDaysInFirstWeek(),
28
+ n.loc.getStartOfWeek()
29
+ )), n.localWeekData;
30
+ }
31
+ function k(n, e) {
32
+ const t = {
33
+ ts: n.ts,
34
+ zone: n.zone,
35
+ c: n.c,
36
+ o: n.o,
37
+ loc: n.loc,
38
+ invalid: n.invalid
39
+ };
40
+ return new u({ ...t, ...e, old: t });
41
+ }
42
+ function we(n, e, t) {
43
+ let r = n - e * 60 * 1e3;
44
+ const i = t.offset(r);
45
+ if (e === i)
46
+ return [r, e];
47
+ r -= (i - e) * 60 * 1e3;
48
+ const s = t.offset(r);
49
+ return i === s ? [r, i] : [n - Math.min(i, s) * 60 * 1e3, Math.max(i, s)];
50
+ }
51
+ function z(n, e) {
52
+ n += e * 60 * 1e3;
53
+ const t = new Date(n);
54
+ return {
55
+ year: t.getUTCFullYear(),
56
+ month: t.getUTCMonth() + 1,
57
+ day: t.getUTCDate(),
58
+ hour: t.getUTCHours(),
59
+ minute: t.getUTCMinutes(),
60
+ second: t.getUTCSeconds(),
61
+ millisecond: t.getUTCMilliseconds()
62
+ };
63
+ }
64
+ function C(n, e, t) {
65
+ return we(J(n), e, t);
66
+ }
67
+ function ue(n, e) {
68
+ const t = n.o, r = n.c.year + Math.trunc(e.years), i = n.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, s = {
69
+ ...n.c,
70
+ year: r,
71
+ month: i,
72
+ day: Math.min(n.c.day, P(r, i)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7
73
+ }, l = E.fromObject({
74
+ years: e.years - Math.trunc(e.years),
75
+ quarters: e.quarters - Math.trunc(e.quarters),
76
+ months: e.months - Math.trunc(e.months),
77
+ weeks: e.weeks - Math.trunc(e.weeks),
78
+ days: e.days - Math.trunc(e.days),
79
+ hours: e.hours,
80
+ minutes: e.minutes,
81
+ seconds: e.seconds,
82
+ milliseconds: e.milliseconds
83
+ }).as("milliseconds"), o = J(s);
84
+ let [a, c] = we(o, t, n.zone);
85
+ return l !== 0 && (a += l, c = n.zone.offset(a)), { ts: a, o: c };
86
+ }
87
+ function g(n, e, t, r, i, s) {
88
+ const { setZone: l, zone: o } = t;
89
+ if (n && Object.keys(n).length !== 0 || e) {
90
+ const a = e || o, c = u.fromObject(n, {
91
+ ...t,
92
+ zone: a,
93
+ specificOffset: s
94
+ });
95
+ return l ? c : c.setZone(o);
96
+ } else
97
+ return u.invalid(
98
+ new N("unparsable", `the input "${i}" can't be parsed as ${r}`)
99
+ );
100
+ }
101
+ function H(n, e, t = !0) {
102
+ return n.isValid ? O.create(y.create("en-US"), {
103
+ allowZ: t,
104
+ forceSimple: !0
105
+ }).formatDateTimeFromString(n, e) : null;
106
+ }
107
+ function $(n, e, t) {
108
+ const r = n.c.year > 9999 || n.c.year < 0;
109
+ let i = "";
110
+ if (r && n.c.year >= 0 && (i += "+"), i += m(n.c.year, r ? 6 : 4), t === "year")
111
+ return i;
112
+ if (e) {
113
+ if (i += "-", i += m(n.c.month), t === "month")
114
+ return i;
115
+ i += "-";
116
+ } else if (i += m(n.c.month), t === "month")
117
+ return i;
118
+ return i += m(n.c.day), i;
119
+ }
120
+ function ce(n, e, t, r, i, s, l) {
121
+ let o = !t || n.c.millisecond !== 0 || n.c.second !== 0, a = "";
122
+ switch (l) {
123
+ case "day":
124
+ case "month":
125
+ case "year":
126
+ break;
127
+ default:
128
+ if (a += m(n.c.hour), l === "hour")
129
+ break;
130
+ if (e) {
131
+ if (a += ":", a += m(n.c.minute), l === "minute")
132
+ break;
133
+ o && (a += ":", a += m(n.c.second));
134
+ } else {
135
+ if (a += m(n.c.minute), l === "minute")
136
+ break;
137
+ o && (a += m(n.c.second));
138
+ }
139
+ if (l === "second")
140
+ break;
141
+ o && (!r || n.c.millisecond !== 0) && (a += ".", a += m(n.c.millisecond, 3));
142
+ }
143
+ return i && (n.isOffsetFixed && n.offset === 0 && !s ? a += "Z" : n.o < 0 ? (a += "-", a += m(Math.trunc(-n.o / 60)), a += ":", a += m(Math.trunc(-n.o % 60))) : (a += "+", a += m(Math.trunc(n.o / 60)), a += ":", a += m(Math.trunc(n.o % 60)))), s && (a += "[" + n.zone.ianaName + "]"), a;
144
+ }
145
+ const ke = {
146
+ month: 1,
147
+ day: 1,
148
+ hour: 0,
149
+ minute: 0,
150
+ second: 0,
151
+ millisecond: 0
152
+ }, ft = {
153
+ weekNumber: 1,
154
+ weekday: 1,
155
+ hour: 0,
156
+ minute: 0,
157
+ second: 0,
158
+ millisecond: 0
159
+ }, dt = {
160
+ ordinal: 1,
161
+ hour: 0,
162
+ minute: 0,
163
+ second: 0,
164
+ millisecond: 0
165
+ }, A = ["year", "month", "day", "hour", "minute", "second", "millisecond"], ht = [
166
+ "weekYear",
167
+ "weekNumber",
168
+ "weekday",
169
+ "hour",
170
+ "minute",
171
+ "second",
172
+ "millisecond"
173
+ ], mt = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
174
+ function x(n) {
175
+ const e = {
176
+ year: "year",
177
+ years: "year",
178
+ month: "month",
179
+ months: "month",
180
+ day: "day",
181
+ days: "day",
182
+ hour: "hour",
183
+ hours: "hour",
184
+ minute: "minute",
185
+ minutes: "minute",
186
+ quarter: "quarter",
187
+ quarters: "quarter",
188
+ second: "second",
189
+ seconds: "second",
190
+ millisecond: "millisecond",
191
+ milliseconds: "millisecond",
192
+ weekday: "weekday",
193
+ weekdays: "weekday",
194
+ weeknumber: "weekNumber",
195
+ weeksnumber: "weekNumber",
196
+ weeknumbers: "weekNumber",
197
+ weekyear: "weekYear",
198
+ weekyears: "weekYear",
199
+ ordinal: "ordinal"
200
+ }[n.toLowerCase()];
201
+ if (!e)
202
+ throw new ct(n);
203
+ return e;
204
+ }
205
+ function fe(n) {
206
+ switch (n.toLowerCase()) {
207
+ case "localweekday":
208
+ case "localweekdays":
209
+ return "localWeekday";
210
+ case "localweeknumber":
211
+ case "localweeknumbers":
212
+ return "localWeekNumber";
213
+ case "localweekyear":
214
+ case "localweekyears":
215
+ return "localWeekYear";
216
+ default:
217
+ return x(n);
218
+ }
219
+ }
220
+ function yt(n) {
221
+ if (_ === void 0 && (_ = T.now()), n.type !== "iana")
222
+ return n.offset(_);
223
+ const e = n.name;
224
+ let t = Q.get(e);
225
+ return t === void 0 && (t = n.offset(_), Q.set(e, t)), t;
226
+ }
227
+ function de(n, e) {
228
+ const t = S(e.zone, T.defaultZone);
229
+ if (!t.isValid)
230
+ return u.invalid(v(t));
231
+ const r = y.fromObject(e);
232
+ let i, s;
233
+ if (f(n.year))
234
+ i = T.now();
235
+ else {
236
+ for (const a of A)
237
+ f(n[a]) && (n[a] = ke[a]);
238
+ const l = ye(n) || Te(n);
239
+ if (l)
240
+ return u.invalid(l);
241
+ const o = yt(t);
242
+ [i, s] = C(n, o, t);
243
+ }
244
+ return new u({ ts: i, zone: t, loc: r, o: s });
245
+ }
246
+ function he(n, e, t) {
247
+ const r = f(t.round) ? !0 : t.round, i = f(t.rounding) ? "trunc" : t.rounding, s = (o, a) => (o = _e(o, r || t.calendary ? 0 : 2, t.calendary ? "round" : i), e.loc.clone(t).relFormatter(t).format(o, a)), l = (o) => t.calendary ? e.hasSame(n, o) ? 0 : e.startOf(o).diff(n.startOf(o), o).get(o) : e.diff(n, o).get(o);
248
+ if (t.unit)
249
+ return s(l(t.unit), t.unit);
250
+ for (const o of t.units) {
251
+ const a = l(o);
252
+ if (Math.abs(a) >= 1)
253
+ return s(a, o);
254
+ }
255
+ return s(n > e ? -0 : 0, t.units[t.units.length - 1]);
256
+ }
257
+ function me(n) {
258
+ let e = {}, t;
259
+ return n.length > 0 && typeof n[n.length - 1] == "object" ? (e = n[n.length - 1], t = Array.from(n).slice(0, n.length - 1)) : t = Array.from(n), [e, t];
260
+ }
261
+ let _;
262
+ const Q = /* @__PURE__ */ new Map();
263
+ class u {
264
+ /**
265
+ * @access private
266
+ */
267
+ constructor(e) {
268
+ const t = e.zone || T.defaultZone;
269
+ let r = e.invalid || (Number.isNaN(e.ts) ? new N("invalid input") : null) || (t.isValid ? null : v(t));
270
+ this.ts = f(e.ts) ? T.now() : e.ts;
271
+ let i = null, s = null;
272
+ if (!r)
273
+ if (e.old && e.old.ts === this.ts && e.old.zone.equals(t))
274
+ [i, s] = [e.old.c, e.old.o];
275
+ else {
276
+ const o = U(e.o) && !e.old ? e.o : t.offset(this.ts);
277
+ i = z(this.ts, o), r = Number.isNaN(i.year) ? new N("invalid input") : null, i = r ? null : i, s = r ? null : o;
278
+ }
279
+ this._zone = t, this.loc = e.loc || y.create(), this.invalid = r, this.weekData = null, this.localWeekData = null, this.c = i, this.o = s, this.isLuxonDateTime = !0;
280
+ }
281
+ // CONSTRUCT
282
+ /**
283
+ * Create a DateTime for the current instant, in the system's time zone.
284
+ *
285
+ * Use Settings to override these default values if needed.
286
+ * @example DateTime.now().toISO() //~> now in the ISO format
287
+ * @return {DateTime}
288
+ */
289
+ static now() {
290
+ return new u({});
291
+ }
292
+ /**
293
+ * Create a local DateTime
294
+ * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used
295
+ * @param {number} [month=1] - The month, 1-indexed
296
+ * @param {number} [day=1] - The day of the month, 1-indexed
297
+ * @param {number} [hour=0] - The hour of the day, in 24-hour time
298
+ * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
299
+ * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
300
+ * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
301
+ * @example DateTime.local() //~> now
302
+ * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time
303
+ * @example DateTime.local(2017) //~> 2017-01-01T00:00:00
304
+ * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00
305
+ * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale
306
+ * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00
307
+ * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC
308
+ * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00
309
+ * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10
310
+ * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765
311
+ * @return {DateTime}
312
+ */
313
+ static local() {
314
+ const [e, t] = me(arguments), [r, i, s, l, o, a, c] = t;
315
+ return de({ year: r, month: i, day: s, hour: l, minute: o, second: a, millisecond: c }, e);
316
+ }
317
+ /**
318
+ * Create a DateTime in UTC
319
+ * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used
320
+ * @param {number} [month=1] - The month, 1-indexed
321
+ * @param {number} [day=1] - The day of the month
322
+ * @param {number} [hour=0] - The hour of the day, in 24-hour time
323
+ * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
324
+ * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
325
+ * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
326
+ * @param {Object} options - configuration options for the DateTime
327
+ * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
328
+ * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
329
+ * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
330
+ * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
331
+ * @example DateTime.utc() //~> now
332
+ * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z
333
+ * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z
334
+ * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z
335
+ * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z
336
+ * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z
337
+ * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale
338
+ * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z
339
+ * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale
340
+ * @return {DateTime}
341
+ */
342
+ static utc() {
343
+ const [e, t] = me(arguments), [r, i, s, l, o, a, c] = t;
344
+ return e.zone = ee.utcInstance, de({ year: r, month: i, day: s, hour: l, minute: o, second: a, millisecond: c }, e);
345
+ }
346
+ /**
347
+ * Create a DateTime from a JavaScript Date object. Uses the default zone.
348
+ * @param {Date} date - a JavaScript Date object
349
+ * @param {Object} options - configuration options for the DateTime
350
+ * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
351
+ * @return {DateTime}
352
+ */
353
+ static fromJSDate(e, t = {}) {
354
+ const r = De(e) ? e.valueOf() : NaN;
355
+ if (Number.isNaN(r))
356
+ return u.invalid("invalid input");
357
+ const i = S(t.zone, T.defaultZone);
358
+ return i.isValid ? new u({
359
+ ts: r,
360
+ zone: i,
361
+ loc: y.fromObject(t)
362
+ }) : u.invalid(v(i));
363
+ }
364
+ /**
365
+ * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
366
+ * @param {number} milliseconds - a number of milliseconds since 1970 UTC
367
+ * @param {Object} options - configuration options for the DateTime
368
+ * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
369
+ * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
370
+ * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
371
+ * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
372
+ * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
373
+ * @return {DateTime}
374
+ */
375
+ static fromMillis(e, t = {}) {
376
+ if (U(e))
377
+ return e < -le || e > le ? u.invalid("Timestamp out of range") : new u({
378
+ ts: e,
379
+ zone: S(t.zone, T.defaultZone),
380
+ loc: y.fromObject(t)
381
+ });
382
+ throw new w(
383
+ `fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
384
+ );
385
+ }
386
+ /**
387
+ * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
388
+ * @param {number} seconds - a number of seconds since 1970 UTC
389
+ * @param {Object} options - configuration options for the DateTime
390
+ * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
391
+ * @param {string} [options.locale] - a locale to set on the resulting DateTime instance
392
+ * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
393
+ * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
394
+ * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
395
+ * @return {DateTime}
396
+ */
397
+ static fromSeconds(e, t = {}) {
398
+ if (U(e))
399
+ return new u({
400
+ ts: e * 1e3,
401
+ zone: S(t.zone, T.defaultZone),
402
+ loc: y.fromObject(t)
403
+ });
404
+ throw new w("fromSeconds requires a numerical input");
405
+ }
406
+ /**
407
+ * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
408
+ * @param {Object} obj - the object to create the DateTime from
409
+ * @param {number} obj.year - a year, such as 1987
410
+ * @param {number} obj.month - a month, 1-12
411
+ * @param {number} obj.day - a day of the month, 1-31, depending on the month
412
+ * @param {number} obj.ordinal - day of the year, 1-365 or 366
413
+ * @param {number} obj.weekYear - an ISO week year
414
+ * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year
415
+ * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday
416
+ * @param {number} obj.localWeekYear - a week year, according to the locale
417
+ * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale
418
+ * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale
419
+ * @param {number} obj.hour - hour of the day, 0-23
420
+ * @param {number} obj.minute - minute of the hour, 0-59
421
+ * @param {number} obj.second - second of the minute, 0-59
422
+ * @param {number} obj.millisecond - millisecond of the second, 0-999
423
+ * @param {Object} opts - options for creating this DateTime
424
+ * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()
425
+ * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
426
+ * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
427
+ * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
428
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
429
+ * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
430
+ * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
431
+ * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
432
+ * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
433
+ * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
434
+ * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })
435
+ * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'
436
+ * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26'
437
+ * @return {DateTime}
438
+ */
439
+ static fromObject(e, t = {}) {
440
+ e = e || {};
441
+ const r = S(t.zone, T.defaultZone);
442
+ if (!r.isValid)
443
+ return u.invalid(v(r));
444
+ const i = y.fromObject(t), s = te(e, fe), { minDaysInFirstWeek: l, startOfWeek: o } = ie(s, i), a = T.now(), c = f(t.specificOffset) ? r.offset(a) : t.specificOffset, d = !f(s.ordinal), h = !f(s.year), V = !f(s.month) || !f(s.day), I = h || V, K = s.weekYear || s.weekNumber;
445
+ if ((I || d) && K)
446
+ throw new L(
447
+ "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
448
+ );
449
+ if (V && d)
450
+ throw new L("Can't mix ordinal dates with month/day");
451
+ const Z = K || s.weekday && !I;
452
+ let W, F, D = z(a, c);
453
+ Z ? (W = ht, F = ft, D = Y(D, l, o)) : d ? (W = mt, F = dt, D = j(D)) : (W = A, F = ke);
454
+ let B = !1;
455
+ for (const b of W) {
456
+ const Ne = s[b];
457
+ f(Ne) ? B ? s[b] = F[b] : s[b] = D[b] : B = !0;
458
+ }
459
+ const ge = Z ? xe(s, l, o) : d ? Ye(s) : ye(s), X = ge || Te(s);
460
+ if (X)
461
+ return u.invalid(X);
462
+ const Ee = Z ? se(s, l, o) : d ? ae(s) : s, [Oe, Se] = C(Ee, c, r), M = new u({
463
+ ts: Oe,
464
+ zone: r,
465
+ o: Se,
466
+ loc: i
467
+ });
468
+ return s.weekday && I && e.weekday !== M.weekday ? u.invalid(
469
+ "mismatched weekday",
470
+ `you can't specify both a weekday of ${s.weekday} and a date of ${M.toISO()}`
471
+ ) : M.isValid ? M : u.invalid(M.invalid);
472
+ }
473
+ /**
474
+ * Create a DateTime from an ISO 8601 string
475
+ * @param {string} text - the ISO string
476
+ * @param {Object} opts - options to affect the creation
477
+ * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone
478
+ * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
479
+ * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
480
+ * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
481
+ * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
482
+ * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
483
+ * @example DateTime.fromISO('2016-05-25T09:08:34.123')
484
+ * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
485
+ * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
486
+ * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})
487
+ * @example DateTime.fromISO('2016-W05-4')
488
+ * @return {DateTime}
489
+ */
490
+ static fromISO(e, t = {}) {
491
+ const [r, i] = We(e);
492
+ return g(r, i, t, "ISO 8601", e);
493
+ }
494
+ /**
495
+ * Create a DateTime from an RFC 2822 string
496
+ * @param {string} text - the RFC 2822 string
497
+ * @param {Object} opts - options to affect the creation
498
+ * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
499
+ * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
500
+ * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
501
+ * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
502
+ * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
503
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
504
+ * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
505
+ * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
506
+ * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
507
+ * @return {DateTime}
508
+ */
509
+ static fromRFC2822(e, t = {}) {
510
+ const [r, i] = Fe(e);
511
+ return g(r, i, t, "RFC 2822", e);
512
+ }
513
+ /**
514
+ * Create a DateTime from an HTTP header date
515
+ * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
516
+ * @param {string} text - the HTTP header date
517
+ * @param {Object} opts - options to affect the creation
518
+ * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
519
+ * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.
520
+ * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
521
+ * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
522
+ * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
523
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
524
+ * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
525
+ * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
526
+ * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')
527
+ * @return {DateTime}
528
+ */
529
+ static fromHTTP(e, t = {}) {
530
+ const [r, i] = pe(e);
531
+ return g(r, i, t, "HTTP", t);
532
+ }
533
+ /**
534
+ * Create a DateTime from an input string and format string.
535
+ * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).
536
+ * @param {string} text - the string to parse
537
+ * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)
538
+ * @param {Object} opts - options to affect the creation
539
+ * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
540
+ * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
541
+ * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
542
+ * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
543
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
544
+ * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
545
+ * @return {DateTime}
546
+ */
547
+ static fromFormat(e, t, r = {}) {
548
+ if (f(e) || f(t))
549
+ throw new w("fromFormat requires an input string and a format");
550
+ const { locale: i = null, numberingSystem: s = null } = r, l = y.fromOpts({
551
+ locale: i,
552
+ numberingSystem: s,
553
+ defaultToEN: !0
554
+ }), [o, a, c, d] = ze(l, e, t);
555
+ return d ? u.invalid(d) : g(o, a, r, `format ${t}`, e, c);
556
+ }
557
+ /**
558
+ * @deprecated use fromFormat instead
559
+ */
560
+ static fromString(e, t, r = {}) {
561
+ return u.fromFormat(e, t, r);
562
+ }
563
+ /**
564
+ * Create a DateTime from a SQL date, time, or datetime
565
+ * Defaults to en-US if no locale has been specified, regardless of the system's locale
566
+ * @param {string} text - the string to parse
567
+ * @param {Object} opts - options to affect the creation
568
+ * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
569
+ * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
570
+ * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
571
+ * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
572
+ * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
573
+ * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
574
+ * @example DateTime.fromSQL('2017-05-15')
575
+ * @example DateTime.fromSQL('2017-05-15 09:12:34')
576
+ * @example DateTime.fromSQL('2017-05-15 09:12:34.342')
577
+ * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')
578
+ * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')
579
+ * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })
580
+ * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })
581
+ * @example DateTime.fromSQL('09:12:34.342')
582
+ * @return {DateTime}
583
+ */
584
+ static fromSQL(e, t = {}) {
585
+ const [r, i] = Le(e);
586
+ return g(r, i, t, "SQL", e);
587
+ }
588
+ /**
589
+ * Create an invalid DateTime.
590
+ * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
591
+ * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
592
+ * @return {DateTime}
593
+ */
594
+ static invalid(e, t = null) {
595
+ if (!e)
596
+ throw new w("need to specify a reason the DateTime is invalid");
597
+ const r = e instanceof N ? e : new N(e, t);
598
+ if (T.throwOnInvalid)
599
+ throw new ut(r);
600
+ return new u({ invalid: r });
601
+ }
602
+ /**
603
+ * Check if an object is an instance of DateTime. Works across context boundaries
604
+ * @param {object} o
605
+ * @return {boolean}
606
+ */
607
+ static isDateTime(e) {
608
+ return e && e.isLuxonDateTime || !1;
609
+ }
610
+ /**
611
+ * Produce the format string for a set of options
612
+ * @param formatOpts
613
+ * @param localeOpts
614
+ * @returns {string}
615
+ */
616
+ static parseFormatForOpts(e, t = {}) {
617
+ const r = He(e, y.fromObject(t));
618
+ return r ? r.map((i) => i ? i.val : null).join("") : null;
619
+ }
620
+ /**
621
+ * Produce the the fully expanded format token for the locale
622
+ * Does NOT quote characters, so quoted tokens will not round trip correctly
623
+ * @param fmt
624
+ * @param localeOpts
625
+ * @returns {string}
626
+ */
627
+ static expandFormat(e, t = {}) {
628
+ return Ue(O.parseFormat(e), y.fromObject(t)).map((i) => i.val).join("");
629
+ }
630
+ static resetCache() {
631
+ _ = void 0, Q.clear();
632
+ }
633
+ // INFO
634
+ /**
635
+ * Get the value of unit.
636
+ * @param {string} unit - a unit such as 'minute' or 'day'
637
+ * @example DateTime.local(2017, 7, 4).get('month'); //=> 7
638
+ * @example DateTime.local(2017, 7, 4).get('day'); //=> 4
639
+ * @return {number}
640
+ */
641
+ get(e) {
642
+ return this[e];
643
+ }
644
+ /**
645
+ * Returns whether the DateTime is valid. Invalid DateTimes occur when:
646
+ * * The DateTime was created from invalid calendar information, such as the 13th month or February 30
647
+ * * The DateTime was created by an operation on another invalid date
648
+ * @type {boolean}
649
+ */
650
+ get isValid() {
651
+ return this.invalid === null;
652
+ }
653
+ /**
654
+ * Returns an error code if this DateTime is invalid, or null if the DateTime is valid
655
+ * @type {string}
656
+ */
657
+ get invalidReason() {
658
+ return this.invalid ? this.invalid.reason : null;
659
+ }
660
+ /**
661
+ * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
662
+ * @type {string}
663
+ */
664
+ get invalidExplanation() {
665
+ return this.invalid ? this.invalid.explanation : null;
666
+ }
667
+ /**
668
+ * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
669
+ *
670
+ * @type {string}
671
+ */
672
+ get locale() {
673
+ return this.isValid ? this.loc.locale : null;
674
+ }
675
+ /**
676
+ * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
677
+ *
678
+ * @type {string}
679
+ */
680
+ get numberingSystem() {
681
+ return this.isValid ? this.loc.numberingSystem : null;
682
+ }
683
+ /**
684
+ * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
685
+ *
686
+ * @type {string}
687
+ */
688
+ get outputCalendar() {
689
+ return this.isValid ? this.loc.outputCalendar : null;
690
+ }
691
+ /**
692
+ * Get the time zone associated with this DateTime.
693
+ * @type {Zone}
694
+ */
695
+ get zone() {
696
+ return this._zone;
697
+ }
698
+ /**
699
+ * Get the name of the time zone.
700
+ * @type {string}
701
+ */
702
+ get zoneName() {
703
+ return this.isValid ? this.zone.name : null;
704
+ }
705
+ /**
706
+ * Get the year
707
+ * @example DateTime.local(2017, 5, 25).year //=> 2017
708
+ * @type {number}
709
+ */
710
+ get year() {
711
+ return this.isValid ? this.c.year : NaN;
712
+ }
713
+ /**
714
+ * Get the quarter
715
+ * @example DateTime.local(2017, 5, 25).quarter //=> 2
716
+ * @type {number}
717
+ */
718
+ get quarter() {
719
+ return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
720
+ }
721
+ /**
722
+ * Get the month (1-12).
723
+ * @example DateTime.local(2017, 5, 25).month //=> 5
724
+ * @type {number}
725
+ */
726
+ get month() {
727
+ return this.isValid ? this.c.month : NaN;
728
+ }
729
+ /**
730
+ * Get the day of the month (1-30ish).
731
+ * @example DateTime.local(2017, 5, 25).day //=> 25
732
+ * @type {number}
733
+ */
734
+ get day() {
735
+ return this.isValid ? this.c.day : NaN;
736
+ }
737
+ /**
738
+ * Get the hour of the day (0-23).
739
+ * @example DateTime.local(2017, 5, 25, 9).hour //=> 9
740
+ * @type {number}
741
+ */
742
+ get hour() {
743
+ return this.isValid ? this.c.hour : NaN;
744
+ }
745
+ /**
746
+ * Get the minute of the hour (0-59).
747
+ * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
748
+ * @type {number}
749
+ */
750
+ get minute() {
751
+ return this.isValid ? this.c.minute : NaN;
752
+ }
753
+ /**
754
+ * Get the second of the minute (0-59).
755
+ * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
756
+ * @type {number}
757
+ */
758
+ get second() {
759
+ return this.isValid ? this.c.second : NaN;
760
+ }
761
+ /**
762
+ * Get the millisecond of the second (0-999).
763
+ * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
764
+ * @type {number}
765
+ */
766
+ get millisecond() {
767
+ return this.isValid ? this.c.millisecond : NaN;
768
+ }
769
+ /**
770
+ * Get the week year
771
+ * @see https://en.wikipedia.org/wiki/ISO_week_date
772
+ * @example DateTime.local(2014, 12, 31).weekYear //=> 2015
773
+ * @type {number}
774
+ */
775
+ get weekYear() {
776
+ return this.isValid ? G(this).weekYear : NaN;
777
+ }
778
+ /**
779
+ * Get the week number of the week year (1-52ish).
780
+ * @see https://en.wikipedia.org/wiki/ISO_week_date
781
+ * @example DateTime.local(2017, 5, 25).weekNumber //=> 21
782
+ * @type {number}
783
+ */
784
+ get weekNumber() {
785
+ return this.isValid ? G(this).weekNumber : NaN;
786
+ }
787
+ /**
788
+ * Get the day of the week.
789
+ * 1 is Monday and 7 is Sunday
790
+ * @see https://en.wikipedia.org/wiki/ISO_week_date
791
+ * @example DateTime.local(2014, 11, 31).weekday //=> 4
792
+ * @type {number}
793
+ */
794
+ get weekday() {
795
+ return this.isValid ? G(this).weekday : NaN;
796
+ }
797
+ /**
798
+ * Returns true if this date is on a weekend according to the locale, false otherwise
799
+ * @returns {boolean}
800
+ */
801
+ get isWeekend() {
802
+ return this.isValid && this.loc.getWeekendDays().includes(this.weekday);
803
+ }
804
+ /**
805
+ * Get the day of the week according to the locale.
806
+ * 1 is the first day of the week and 7 is the last day of the week.
807
+ * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,
808
+ * @returns {number}
809
+ */
810
+ get localWeekday() {
811
+ return this.isValid ? R(this).weekday : NaN;
812
+ }
813
+ /**
814
+ * Get the week number of the week year according to the locale. Different locales assign week numbers differently,
815
+ * because the week can start on different days of the week (see localWeekday) and because a different number of days
816
+ * is required for a week to count as the first week of a year.
817
+ * @returns {number}
818
+ */
819
+ get localWeekNumber() {
820
+ return this.isValid ? R(this).weekNumber : NaN;
821
+ }
822
+ /**
823
+ * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)
824
+ * differently, see localWeekNumber.
825
+ * @returns {number}
826
+ */
827
+ get localWeekYear() {
828
+ return this.isValid ? R(this).weekYear : NaN;
829
+ }
830
+ /**
831
+ * Get the ordinal (meaning the day of the year)
832
+ * @example DateTime.local(2017, 5, 25).ordinal //=> 145
833
+ * @type {number|DateTime}
834
+ */
835
+ get ordinal() {
836
+ return this.isValid ? j(this.c).ordinal : NaN;
837
+ }
838
+ /**
839
+ * Get the human readable short month name, such as 'Oct'.
840
+ * Defaults to the system's locale if no locale has been specified
841
+ * @example DateTime.local(2017, 10, 30).monthShort //=> Oct
842
+ * @type {string}
843
+ */
844
+ get monthShort() {
845
+ return this.isValid ? p.months("short", { locObj: this.loc })[this.month - 1] : null;
846
+ }
847
+ /**
848
+ * Get the human readable long month name, such as 'October'.
849
+ * Defaults to the system's locale if no locale has been specified
850
+ * @example DateTime.local(2017, 10, 30).monthLong //=> October
851
+ * @type {string}
852
+ */
853
+ get monthLong() {
854
+ return this.isValid ? p.months("long", { locObj: this.loc })[this.month - 1] : null;
855
+ }
856
+ /**
857
+ * Get the human readable short weekday, such as 'Mon'.
858
+ * Defaults to the system's locale if no locale has been specified
859
+ * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
860
+ * @type {string}
861
+ */
862
+ get weekdayShort() {
863
+ return this.isValid ? p.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
864
+ }
865
+ /**
866
+ * Get the human readable long weekday, such as 'Monday'.
867
+ * Defaults to the system's locale if no locale has been specified
868
+ * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
869
+ * @type {string}
870
+ */
871
+ get weekdayLong() {
872
+ return this.isValid ? p.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
873
+ }
874
+ /**
875
+ * Get the UTC offset of this DateTime in minutes
876
+ * @example DateTime.now().offset //=> -240
877
+ * @example DateTime.utc().offset //=> 0
878
+ * @type {number}
879
+ */
880
+ get offset() {
881
+ return this.isValid ? +this.o : NaN;
882
+ }
883
+ /**
884
+ * Get the short human name for the zone's current offset, for example "EST" or "EDT".
885
+ * Defaults to the system's locale if no locale has been specified
886
+ * @type {string}
887
+ */
888
+ get offsetNameShort() {
889
+ return this.isValid ? this.zone.offsetName(this.ts, {
890
+ format: "short",
891
+ locale: this.locale
892
+ }) : null;
893
+ }
894
+ /**
895
+ * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
896
+ * Defaults to the system's locale if no locale has been specified
897
+ * @type {string}
898
+ */
899
+ get offsetNameLong() {
900
+ return this.isValid ? this.zone.offsetName(this.ts, {
901
+ format: "long",
902
+ locale: this.locale
903
+ }) : null;
904
+ }
905
+ /**
906
+ * Get whether this zone's offset ever changes, as in a DST.
907
+ * @type {boolean}
908
+ */
909
+ get isOffsetFixed() {
910
+ return this.isValid ? this.zone.isUniversal : null;
911
+ }
912
+ /**
913
+ * Get whether the DateTime is in a DST.
914
+ * @type {boolean}
915
+ */
916
+ get isInDST() {
917
+ return this.isOffsetFixed ? !1 : this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset;
918
+ }
919
+ /**
920
+ * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
921
+ * in this DateTime's zone. During DST changes local time can be ambiguous, for example
922
+ * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
923
+ * This method will return both possible DateTimes if this DateTime's local time is ambiguous.
924
+ * @returns {DateTime[]}
925
+ */
926
+ getPossibleOffsets() {
927
+ if (!this.isValid || this.isOffsetFixed)
928
+ return [this];
929
+ const e = 864e5, t = 6e4, r = J(this.c), i = this.zone.offset(r - e), s = this.zone.offset(r + e), l = this.zone.offset(r - i * t), o = this.zone.offset(r - s * t);
930
+ if (l === o)
931
+ return [this];
932
+ const a = r - l * t, c = r - o * t, d = z(a, l), h = z(c, o);
933
+ return d.hour === h.hour && d.minute === h.minute && d.second === h.second && d.millisecond === h.millisecond ? [k(this, { ts: a }), k(this, { ts: c })] : [this];
934
+ }
935
+ /**
936
+ * Returns true if this DateTime is in a leap year, false otherwise
937
+ * @example DateTime.local(2016).isInLeapYear //=> true
938
+ * @example DateTime.local(2013).isInLeapYear //=> false
939
+ * @type {boolean}
940
+ */
941
+ get isInLeapYear() {
942
+ return Me(this.year);
943
+ }
944
+ /**
945
+ * Returns the number of days in this DateTime's month
946
+ * @example DateTime.local(2016, 2).daysInMonth //=> 29
947
+ * @example DateTime.local(2016, 3).daysInMonth //=> 31
948
+ * @type {number}
949
+ */
950
+ get daysInMonth() {
951
+ return P(this.year, this.month);
952
+ }
953
+ /**
954
+ * Returns the number of days in this DateTime's year
955
+ * @example DateTime.local(2016).daysInYear //=> 366
956
+ * @example DateTime.local(2013).daysInYear //=> 365
957
+ * @type {number}
958
+ */
959
+ get daysInYear() {
960
+ return this.isValid ? be(this.year) : NaN;
961
+ }
962
+ /**
963
+ * Returns the number of weeks in this DateTime's year
964
+ * @see https://en.wikipedia.org/wiki/ISO_week_date
965
+ * @example DateTime.local(2004).weeksInWeekYear //=> 53
966
+ * @example DateTime.local(2013).weeksInWeekYear //=> 52
967
+ * @type {number}
968
+ */
969
+ get weeksInWeekYear() {
970
+ return this.isValid ? ne(this.weekYear) : NaN;
971
+ }
972
+ /**
973
+ * Returns the number of weeks in this DateTime's local week year
974
+ * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52
975
+ * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53
976
+ * @type {number}
977
+ */
978
+ get weeksInLocalWeekYear() {
979
+ return this.isValid ? ne(
980
+ this.localWeekYear,
981
+ this.loc.getMinDaysInFirstWeek(),
982
+ this.loc.getStartOfWeek()
983
+ ) : NaN;
984
+ }
985
+ /**
986
+ * Returns the resolved Intl options for this DateTime.
987
+ * This is useful in understanding the behavior of formatting methods
988
+ * @param {Object} opts - the same options as toLocaleString
989
+ * @return {Object}
990
+ */
991
+ resolvedLocaleOptions(e = {}) {
992
+ const { locale: t, numberingSystem: r, calendar: i } = O.create(
993
+ this.loc.clone(e),
994
+ e
995
+ ).resolvedOptions(this);
996
+ return { locale: t, numberingSystem: r, outputCalendar: i };
997
+ }
998
+ // TRANSFORM
999
+ /**
1000
+ * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
1001
+ *
1002
+ * Equivalent to {@link DateTime#setZone}('utc')
1003
+ * @param {number} [offset=0] - optionally, an offset from UTC in minutes
1004
+ * @param {Object} [opts={}] - options to pass to `setZone()`
1005
+ * @return {DateTime}
1006
+ */
1007
+ toUTC(e = 0, t = {}) {
1008
+ return this.setZone(ee.instance(e), t);
1009
+ }
1010
+ /**
1011
+ * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
1012
+ *
1013
+ * Equivalent to `setZone('local')`
1014
+ * @return {DateTime}
1015
+ */
1016
+ toLocal() {
1017
+ return this.setZone(T.defaultZone);
1018
+ }
1019
+ /**
1020
+ * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
1021
+ *
1022
+ * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
1023
+ * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
1024
+ * @param {Object} opts - options
1025
+ * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
1026
+ * @return {DateTime}
1027
+ */
1028
+ setZone(e, { keepLocalTime: t = !1, keepCalendarTime: r = !1 } = {}) {
1029
+ if (e = S(e, T.defaultZone), e.equals(this.zone))
1030
+ return this;
1031
+ if (e.isValid) {
1032
+ let i = this.ts;
1033
+ if (t || r) {
1034
+ const s = e.offset(this.ts), l = this.toObject();
1035
+ [i] = C(l, s, e);
1036
+ }
1037
+ return k(this, { ts: i, zone: e });
1038
+ } else
1039
+ return u.invalid(v(e));
1040
+ }
1041
+ /**
1042
+ * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
1043
+ * @param {Object} properties - the properties to set
1044
+ * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })
1045
+ * @return {DateTime}
1046
+ */
1047
+ reconfigure({ locale: e, numberingSystem: t, outputCalendar: r } = {}) {
1048
+ const i = this.loc.clone({ locale: e, numberingSystem: t, outputCalendar: r });
1049
+ return k(this, { loc: i });
1050
+ }
1051
+ /**
1052
+ * "Set" the locale. Returns a newly-constructed DateTime.
1053
+ * Just a convenient alias for reconfigure({ locale })
1054
+ * @example DateTime.local(2017, 5, 25).setLocale('en-GB')
1055
+ * @return {DateTime}
1056
+ */
1057
+ setLocale(e) {
1058
+ return this.reconfigure({ locale: e });
1059
+ }
1060
+ /**
1061
+ * "Set" the values of specified units. Returns a newly-constructed DateTime.
1062
+ * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
1063
+ *
1064
+ * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.
1065
+ * They cannot be mixed with ISO-week units like `weekday`.
1066
+ * @param {Object} values - a mapping of units to numbers
1067
+ * @example dt.set({ year: 2017 })
1068
+ * @example dt.set({ hour: 8, minute: 30 })
1069
+ * @example dt.set({ weekday: 5 })
1070
+ * @example dt.set({ year: 2005, ordinal: 234 })
1071
+ * @return {DateTime}
1072
+ */
1073
+ set(e) {
1074
+ if (!this.isValid)
1075
+ return this;
1076
+ const t = te(e, fe), { minDaysInFirstWeek: r, startOfWeek: i } = ie(t, this.loc), s = !f(t.weekYear) || !f(t.weekNumber) || !f(t.weekday), l = !f(t.ordinal), o = !f(t.year), a = !f(t.month) || !f(t.day), c = o || a, d = t.weekYear || t.weekNumber;
1077
+ if ((c || l) && d)
1078
+ throw new L(
1079
+ "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
1080
+ );
1081
+ if (a && l)
1082
+ throw new L("Can't mix ordinal dates with month/day");
1083
+ let h;
1084
+ s ? h = se(
1085
+ { ...Y(this.c, r, i), ...t },
1086
+ r,
1087
+ i
1088
+ ) : f(t.ordinal) ? (h = { ...this.toObject(), ...t }, f(t.day) && (h.day = Math.min(P(h.year, h.month), h.day))) : h = ae({ ...j(this.c), ...t });
1089
+ const [V, I] = C(h, this.o, this.zone);
1090
+ return k(this, { ts: V, o: I });
1091
+ }
1092
+ /**
1093
+ * Add a period of time to this DateTime and return the resulting DateTime
1094
+ *
1095
+ * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.
1096
+ * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
1097
+ * @example DateTime.now().plus(123) //~> in 123 milliseconds
1098
+ * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes
1099
+ * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow
1100
+ * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday
1101
+ * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min
1102
+ * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min
1103
+ * @return {DateTime}
1104
+ */
1105
+ plus(e) {
1106
+ if (!this.isValid)
1107
+ return this;
1108
+ const t = E.fromDurationLike(e);
1109
+ return k(this, ue(this, t));
1110
+ }
1111
+ /**
1112
+ * Subtract a period of time to this DateTime and return the resulting DateTime
1113
+ * See {@link DateTime#plus}
1114
+ * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
1115
+ @return {DateTime}
1116
+ */
1117
+ minus(e) {
1118
+ if (!this.isValid)
1119
+ return this;
1120
+ const t = E.fromDurationLike(e).negate();
1121
+ return k(this, ue(this, t));
1122
+ }
1123
+ /**
1124
+ * "Set" this DateTime to the beginning of a unit of time.
1125
+ * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
1126
+ * @param {Object} opts - options
1127
+ * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
1128
+ * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'
1129
+ * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'
1130
+ * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays
1131
+ * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'
1132
+ * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'
1133
+ * @return {DateTime}
1134
+ */
1135
+ startOf(e, { useLocaleWeeks: t = !1 } = {}) {
1136
+ if (!this.isValid)
1137
+ return this;
1138
+ const r = {}, i = E.normalizeUnit(e);
1139
+ switch (i) {
1140
+ case "years":
1141
+ r.month = 1;
1142
+ case "quarters":
1143
+ case "months":
1144
+ r.day = 1;
1145
+ case "weeks":
1146
+ case "days":
1147
+ r.hour = 0;
1148
+ case "hours":
1149
+ r.minute = 0;
1150
+ case "minutes":
1151
+ r.second = 0;
1152
+ case "seconds":
1153
+ r.millisecond = 0;
1154
+ break;
1155
+ }
1156
+ if (i === "weeks")
1157
+ if (t) {
1158
+ const s = this.loc.getStartOfWeek(), { weekday: l } = this;
1159
+ l < s && (r.weekNumber = this.weekNumber - 1), r.weekday = s;
1160
+ } else
1161
+ r.weekday = 1;
1162
+ if (i === "quarters") {
1163
+ const s = Math.ceil(this.month / 3);
1164
+ r.month = (s - 1) * 3 + 1;
1165
+ }
1166
+ return this.set(r);
1167
+ }
1168
+ /**
1169
+ * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time
1170
+ * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
1171
+ * @param {Object} opts - options
1172
+ * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
1173
+ * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'
1174
+ * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'
1175
+ * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays
1176
+ * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'
1177
+ * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'
1178
+ * @return {DateTime}
1179
+ */
1180
+ endOf(e, t) {
1181
+ return this.isValid ? this.plus({ [e]: 1 }).startOf(e, t).minus(1) : this;
1182
+ }
1183
+ // OUTPUT
1184
+ /**
1185
+ * Returns a string representation of this DateTime formatted according to the specified format string.
1186
+ * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
1187
+ * Defaults to en-US if no locale has been specified, regardless of the system's locale.
1188
+ * @param {string} fmt - the format string
1189
+ * @param {Object} opts - opts to override the configuration options on this DateTime
1190
+ * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'
1191
+ * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'
1192
+ * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22'
1193
+ * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes'
1194
+ * @return {string}
1195
+ */
1196
+ toFormat(e, t = {}) {
1197
+ return this.isValid ? O.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this, e) : q;
1198
+ }
1199
+ /**
1200
+ * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
1201
+ * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation
1202
+ * of the DateTime in the assigned locale.
1203
+ * Defaults to the system's locale if no locale has been specified
1204
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
1205
+ * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options
1206
+ * @param {Object} opts - opts to override the configuration options on this DateTime
1207
+ * @example DateTime.now().toLocaleString(); //=> 4/20/2017
1208
+ * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'
1209
+ * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'
1210
+ * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'
1211
+ * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'
1212
+ * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'
1213
+ * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'
1214
+ * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'
1215
+ * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
1216
+ * @return {string}
1217
+ */
1218
+ toLocaleString(e = oe, t = {}) {
1219
+ return this.isValid ? O.create(this.loc.clone(t), e).formatDateTime(this) : q;
1220
+ }
1221
+ /**
1222
+ * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
1223
+ * Defaults to the system's locale if no locale has been specified
1224
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts
1225
+ * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.
1226
+ * @example DateTime.now().toLocaleParts(); //=> [
1227
+ * //=> { type: 'day', value: '25' },
1228
+ * //=> { type: 'literal', value: '/' },
1229
+ * //=> { type: 'month', value: '05' },
1230
+ * //=> { type: 'literal', value: '/' },
1231
+ * //=> { type: 'year', value: '1982' }
1232
+ * //=> ]
1233
+ */
1234
+ toLocaleParts(e = {}) {
1235
+ return this.isValid ? O.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
1236
+ }
1237
+ /**
1238
+ * Returns an ISO 8601-compliant string representation of this DateTime
1239
+ * @param {Object} opts - options
1240
+ * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
1241
+ * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
1242
+ * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
1243
+ * @param {boolean} [opts.extendedZone=false] - add the time zone format extension
1244
+ * @param {string} [opts.format='extended'] - choose between the basic and extended format
1245
+ * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.
1246
+ * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
1247
+ * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
1248
+ * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
1249
+ * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
1250
+ * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'
1251
+ * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'
1252
+ * @return {string|null}
1253
+ */
1254
+ toISO({
1255
+ format: e = "extended",
1256
+ suppressSeconds: t = !1,
1257
+ suppressMilliseconds: r = !1,
1258
+ includeOffset: i = !0,
1259
+ extendedZone: s = !1,
1260
+ precision: l = "milliseconds"
1261
+ } = {}) {
1262
+ if (!this.isValid)
1263
+ return null;
1264
+ l = x(l);
1265
+ const o = e === "extended";
1266
+ let a = $(this, o, l);
1267
+ return A.indexOf(l) >= 3 && (a += "T"), a += ce(
1268
+ this,
1269
+ o,
1270
+ t,
1271
+ r,
1272
+ i,
1273
+ s,
1274
+ l
1275
+ ), a;
1276
+ }
1277
+ /**
1278
+ * Returns an ISO 8601-compliant string representation of this DateTime's date component
1279
+ * @param {Object} opts - options
1280
+ * @param {string} [opts.format='extended'] - choose between the basic and extended format
1281
+ * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.
1282
+ * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
1283
+ * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
1284
+ * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'
1285
+ * @return {string|null}
1286
+ */
1287
+ toISODate({ format: e = "extended", precision: t = "day" } = {}) {
1288
+ return this.isValid ? $(this, e === "extended", x(t)) : null;
1289
+ }
1290
+ /**
1291
+ * Returns an ISO 8601-compliant string representation of this DateTime's week date
1292
+ * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'
1293
+ * @return {string}
1294
+ */
1295
+ toISOWeekDate() {
1296
+ return H(this, "kkkk-'W'WW-c");
1297
+ }
1298
+ /**
1299
+ * Returns an ISO 8601-compliant string representation of this DateTime's time component
1300
+ * @param {Object} opts - options
1301
+ * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
1302
+ * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
1303
+ * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
1304
+ * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
1305
+ * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
1306
+ * @param {string} [opts.format='extended'] - choose between the basic and extended format
1307
+ * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.
1308
+ * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
1309
+ * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
1310
+ * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
1311
+ * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
1312
+ * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'
1313
+ * @return {string}
1314
+ */
1315
+ toISOTime({
1316
+ suppressMilliseconds: e = !1,
1317
+ suppressSeconds: t = !1,
1318
+ includeOffset: r = !0,
1319
+ includePrefix: i = !1,
1320
+ extendedZone: s = !1,
1321
+ format: l = "extended",
1322
+ precision: o = "milliseconds"
1323
+ } = {}) {
1324
+ return this.isValid ? (o = x(o), (i && A.indexOf(o) >= 3 ? "T" : "") + ce(
1325
+ this,
1326
+ l === "extended",
1327
+ t,
1328
+ e,
1329
+ r,
1330
+ s,
1331
+ o
1332
+ )) : null;
1333
+ }
1334
+ /**
1335
+ * Returns an RFC 2822-compatible string representation of this DateTime
1336
+ * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
1337
+ * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
1338
+ * @return {string}
1339
+ */
1340
+ toRFC2822() {
1341
+ return H(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
1342
+ }
1343
+ /**
1344
+ * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
1345
+ * Specifically, the string conforms to RFC 1123.
1346
+ * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
1347
+ * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
1348
+ * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
1349
+ * @return {string}
1350
+ */
1351
+ toHTTP() {
1352
+ return H(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
1353
+ }
1354
+ /**
1355
+ * Returns a string representation of this DateTime appropriate for use in SQL Date
1356
+ * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
1357
+ * @return {string|null}
1358
+ */
1359
+ toSQLDate() {
1360
+ return this.isValid ? $(this, !0) : null;
1361
+ }
1362
+ /**
1363
+ * Returns a string representation of this DateTime appropriate for use in SQL Time
1364
+ * @param {Object} opts - options
1365
+ * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
1366
+ * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
1367
+ * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
1368
+ * @example DateTime.utc().toSQL() //=> '05:15:16.345'
1369
+ * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
1370
+ * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
1371
+ * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
1372
+ * @return {string}
1373
+ */
1374
+ toSQLTime({ includeOffset: e = !0, includeZone: t = !1, includeOffsetSpace: r = !0 } = {}) {
1375
+ let i = "HH:mm:ss.SSS";
1376
+ return (t || e) && (r && (i += " "), t ? i += "z" : e && (i += "ZZ")), H(this, i, !0);
1377
+ }
1378
+ /**
1379
+ * Returns a string representation of this DateTime appropriate for use in SQL DateTime
1380
+ * @param {Object} opts - options
1381
+ * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
1382
+ * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
1383
+ * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
1384
+ * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'
1385
+ * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'
1386
+ * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'
1387
+ * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'
1388
+ * @return {string}
1389
+ */
1390
+ toSQL(e = {}) {
1391
+ return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null;
1392
+ }
1393
+ /**
1394
+ * Returns a string representation of this DateTime appropriate for debugging
1395
+ * @return {string}
1396
+ */
1397
+ toString() {
1398
+ return this.isValid ? this.toISO() : q;
1399
+ }
1400
+ /**
1401
+ * Returns a string representation of this DateTime appropriate for the REPL.
1402
+ * @return {string}
1403
+ */
1404
+ [Symbol.for("nodejs.util.inspect.custom")]() {
1405
+ return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`;
1406
+ }
1407
+ /**
1408
+ * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
1409
+ * @return {number}
1410
+ */
1411
+ valueOf() {
1412
+ return this.toMillis();
1413
+ }
1414
+ /**
1415
+ * Returns the epoch milliseconds of this DateTime.
1416
+ * @return {number}
1417
+ */
1418
+ toMillis() {
1419
+ return this.isValid ? this.ts : NaN;
1420
+ }
1421
+ /**
1422
+ * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.
1423
+ * @return {number}
1424
+ */
1425
+ toSeconds() {
1426
+ return this.isValid ? this.ts / 1e3 : NaN;
1427
+ }
1428
+ /**
1429
+ * Returns the epoch seconds (as a whole number) of this DateTime.
1430
+ * @return {number}
1431
+ */
1432
+ toUnixInteger() {
1433
+ return this.isValid ? Math.floor(this.ts / 1e3) : NaN;
1434
+ }
1435
+ /**
1436
+ * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.
1437
+ * @return {string}
1438
+ */
1439
+ toJSON() {
1440
+ return this.toISO();
1441
+ }
1442
+ /**
1443
+ * Returns a BSON serializable equivalent to this DateTime.
1444
+ * @return {Date}
1445
+ */
1446
+ toBSON() {
1447
+ return this.toJSDate();
1448
+ }
1449
+ /**
1450
+ * Returns a JavaScript object with this DateTime's year, month, day, and so on.
1451
+ * @param opts - options for generating the object
1452
+ * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output
1453
+ * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }
1454
+ * @return {Object}
1455
+ */
1456
+ toObject(e = {}) {
1457
+ if (!this.isValid)
1458
+ return {};
1459
+ const t = { ...this.c };
1460
+ return e.includeConfig && (t.outputCalendar = this.outputCalendar, t.numberingSystem = this.loc.numberingSystem, t.locale = this.loc.locale), t;
1461
+ }
1462
+ /**
1463
+ * Returns a JavaScript Date equivalent to this DateTime.
1464
+ * @return {Date}
1465
+ */
1466
+ toJSDate() {
1467
+ return new Date(this.isValid ? this.ts : NaN);
1468
+ }
1469
+ // COMPARE
1470
+ /**
1471
+ * Return the difference between two DateTimes as a Duration.
1472
+ * @param {DateTime} otherDateTime - the DateTime to compare this one to
1473
+ * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.
1474
+ * @param {Object} opts - options that affect the creation of the Duration
1475
+ * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
1476
+ * @example
1477
+ * var i1 = DateTime.fromISO('1982-05-25T09:45'),
1478
+ * i2 = DateTime.fromISO('1983-10-14T10:30');
1479
+ * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }
1480
+ * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }
1481
+ * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }
1482
+ * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }
1483
+ * @return {Duration}
1484
+ */
1485
+ diff(e, t = "milliseconds", r = {}) {
1486
+ if (!this.isValid || !e.isValid)
1487
+ return E.invalid("created by diffing an invalid DateTime");
1488
+ const i = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, s = ve(t).map(E.normalizeUnit), l = e.valueOf() > this.valueOf(), o = l ? this : e, a = l ? e : this, c = Ve(o, a, s, i);
1489
+ return l ? c.negate() : c;
1490
+ }
1491
+ /**
1492
+ * Return the difference between this DateTime and right now.
1493
+ * See {@link DateTime#diff}
1494
+ * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
1495
+ * @param {Object} opts - options that affect the creation of the Duration
1496
+ * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
1497
+ * @return {Duration}
1498
+ */
1499
+ diffNow(e = "milliseconds", t = {}) {
1500
+ return this.diff(u.now(), e, t);
1501
+ }
1502
+ /**
1503
+ * Return an Interval spanning between this DateTime and another DateTime
1504
+ * @param {DateTime} otherDateTime - the other end point of the Interval
1505
+ * @return {Interval|DateTime}
1506
+ */
1507
+ until(e) {
1508
+ return this.isValid ? Ie.fromDateTimes(this, e) : this;
1509
+ }
1510
+ /**
1511
+ * Return whether this DateTime is in the same unit of time as another DateTime.
1512
+ * Higher-order units must also be identical for this function to return `true`.
1513
+ * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
1514
+ * @param {DateTime} otherDateTime - the other DateTime
1515
+ * @param {string} unit - the unit of time to check sameness on
1516
+ * @param {Object} opts - options
1517
+ * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used
1518
+ * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
1519
+ * @return {boolean}
1520
+ */
1521
+ hasSame(e, t, r) {
1522
+ if (!this.isValid)
1523
+ return !1;
1524
+ const i = e.valueOf(), s = this.setZone(e.zone, { keepLocalTime: !0 });
1525
+ return s.startOf(t, r) <= i && i <= s.endOf(t, r);
1526
+ }
1527
+ /**
1528
+ * Equality check
1529
+ * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.
1530
+ * To compare just the millisecond values, use `+dt1 === +dt2`.
1531
+ * @param {DateTime} other - the other DateTime
1532
+ * @return {boolean}
1533
+ */
1534
+ equals(e) {
1535
+ return this.isValid && e.isValid && this.valueOf() === e.valueOf() && this.zone.equals(e.zone) && this.loc.equals(e.loc);
1536
+ }
1537
+ /**
1538
+ * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
1539
+ * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.
1540
+ * @param {Object} options - options that affect the output
1541
+ * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
1542
+ * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
1543
+ * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
1544
+ * @param {boolean} [options.round=true] - whether to round the numbers in the output.
1545
+ * @param {string} [options.rounding="trunc"] - rounding method to use when rounding the numbers in the output. Can be "trunc" (toward zero), "expand" (away from zero), "round", "floor", or "ceil".
1546
+ * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
1547
+ * @param {string} options.locale - override the locale of this DateTime
1548
+ * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
1549
+ * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day"
1550
+ * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día"
1551
+ * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures"
1552
+ * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago"
1553
+ * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago"
1554
+ * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago"
1555
+ */
1556
+ toRelative(e = {}) {
1557
+ if (!this.isValid)
1558
+ return null;
1559
+ const t = e.base || u.fromObject({}, { zone: this.zone }), r = e.padding ? this < t ? -e.padding : e.padding : 0;
1560
+ let i = ["years", "months", "days", "hours", "minutes", "seconds"], s = e.unit;
1561
+ return Array.isArray(e.unit) && (i = e.unit, s = void 0), he(t, this.plus(r), {
1562
+ ...e,
1563
+ numeric: "always",
1564
+ units: i,
1565
+ unit: s
1566
+ });
1567
+ }
1568
+ /**
1569
+ * Returns a string representation of this date relative to today, such as "yesterday" or "next month".
1570
+ * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.
1571
+ * @param {Object} options - options that affect the output
1572
+ * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
1573
+ * @param {string} options.locale - override the locale of this DateTime
1574
+ * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days"
1575
+ * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
1576
+ * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow"
1577
+ * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana"
1578
+ * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain"
1579
+ * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
1580
+ */
1581
+ toRelativeCalendar(e = {}) {
1582
+ return this.isValid ? he(e.base || u.fromObject({}, { zone: this.zone }), this, {
1583
+ ...e,
1584
+ numeric: "auto",
1585
+ units: ["years", "months", "days"],
1586
+ calendary: !0
1587
+ }) : null;
1588
+ }
1589
+ /**
1590
+ * Return the min of several date times
1591
+ * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum
1592
+ * @return {DateTime} the min DateTime, or undefined if called with no argument
1593
+ */
1594
+ static min(...e) {
1595
+ if (!e.every(u.isDateTime))
1596
+ throw new w("min requires all arguments be DateTimes");
1597
+ return re(e, (t) => t.valueOf(), Math.min);
1598
+ }
1599
+ /**
1600
+ * Return the max of several date times
1601
+ * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum
1602
+ * @return {DateTime} the max DateTime, or undefined if called with no argument
1603
+ */
1604
+ static max(...e) {
1605
+ if (!e.every(u.isDateTime))
1606
+ throw new w("max requires all arguments be DateTimes");
1607
+ return re(e, (t) => t.valueOf(), Math.max);
1608
+ }
1609
+ // MISC
1610
+ /**
1611
+ * Explain how a string would be parsed by fromFormat()
1612
+ * @param {string} text - the string to parse
1613
+ * @param {string} fmt - the format the string is expected to be in (see description)
1614
+ * @param {Object} options - options taken by fromFormat()
1615
+ * @return {Object}
1616
+ */
1617
+ static fromFormatExplain(e, t, r = {}) {
1618
+ const { locale: i = null, numberingSystem: s = null } = r, l = y.fromOpts({
1619
+ locale: i,
1620
+ numberingSystem: s,
1621
+ defaultToEN: !0
1622
+ });
1623
+ return Ce(l, e, t);
1624
+ }
1625
+ /**
1626
+ * @deprecated use fromFormatExplain instead
1627
+ */
1628
+ static fromStringExplain(e, t, r = {}) {
1629
+ return u.fromFormatExplain(e, t, r);
1630
+ }
1631
+ /**
1632
+ * Build a parser for `fmt` using the given locale. This parser can be passed
1633
+ * to {@link DateTime.fromFormatParser} to a parse a date in this format. This
1634
+ * can be used to optimize cases where many dates need to be parsed in a
1635
+ * specific format.
1636
+ *
1637
+ * @param {String} fmt - the format the string is expected to be in (see
1638
+ * description)
1639
+ * @param {Object} options - options used to set locale and numberingSystem
1640
+ * for parser
1641
+ * @returns {TokenParser} - opaque object to be used
1642
+ */
1643
+ static buildFormatParser(e, t = {}) {
1644
+ const { locale: r = null, numberingSystem: i = null } = t, s = y.fromOpts({
1645
+ locale: r,
1646
+ numberingSystem: i,
1647
+ defaultToEN: !0
1648
+ });
1649
+ return new Ae(s, e);
1650
+ }
1651
+ /**
1652
+ * Create a DateTime from an input string and format parser.
1653
+ *
1654
+ * The format parser must have been created with the same locale as this call.
1655
+ *
1656
+ * @param {String} text - the string to parse
1657
+ * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
1658
+ * @param {Object} opts - options taken by fromFormat()
1659
+ * @returns {DateTime}
1660
+ */
1661
+ static fromFormatParser(e, t, r = {}) {
1662
+ if (f(e) || f(t))
1663
+ throw new w(
1664
+ "fromFormatParser requires an input string and a format parser"
1665
+ );
1666
+ const { locale: i = null, numberingSystem: s = null } = r, l = y.fromOpts({
1667
+ locale: i,
1668
+ numberingSystem: s,
1669
+ defaultToEN: !0
1670
+ });
1671
+ if (!l.equals(t.locale))
1672
+ throw new w(
1673
+ `fromFormatParser called with a locale of ${l}, but the format parser was created for ${t.locale}`
1674
+ );
1675
+ const { result: o, zone: a, specificOffset: c, invalidReason: d } = t.explainFromTokens(e);
1676
+ return d ? u.invalid(d) : g(
1677
+ o,
1678
+ a,
1679
+ r,
1680
+ `format ${t.format}`,
1681
+ e,
1682
+ c
1683
+ );
1684
+ }
1685
+ // FORMAT PRESETS
1686
+ /**
1687
+ * {@link DateTime#toLocaleString} format like 10/14/1983
1688
+ * @type {Object}
1689
+ */
1690
+ static get DATE_SHORT() {
1691
+ return oe;
1692
+ }
1693
+ /**
1694
+ * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
1695
+ * @type {Object}
1696
+ */
1697
+ static get DATE_MED() {
1698
+ return Ze;
1699
+ }
1700
+ /**
1701
+ * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
1702
+ * @type {Object}
1703
+ */
1704
+ static get DATE_MED_WITH_WEEKDAY() {
1705
+ return je;
1706
+ }
1707
+ /**
1708
+ * {@link DateTime#toLocaleString} format like 'October 14, 1983'
1709
+ * @type {Object}
1710
+ */
1711
+ static get DATE_FULL() {
1712
+ return qe;
1713
+ }
1714
+ /**
1715
+ * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
1716
+ * @type {Object}
1717
+ */
1718
+ static get DATE_HUGE() {
1719
+ return Ge;
1720
+ }
1721
+ /**
1722
+ * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
1723
+ * @type {Object}
1724
+ */
1725
+ static get TIME_SIMPLE() {
1726
+ return Re;
1727
+ }
1728
+ /**
1729
+ * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
1730
+ * @type {Object}
1731
+ */
1732
+ static get TIME_WITH_SECONDS() {
1733
+ return $e;
1734
+ }
1735
+ /**
1736
+ * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
1737
+ * @type {Object}
1738
+ */
1739
+ static get TIME_WITH_SHORT_OFFSET() {
1740
+ return Pe;
1741
+ }
1742
+ /**
1743
+ * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
1744
+ * @type {Object}
1745
+ */
1746
+ static get TIME_WITH_LONG_OFFSET() {
1747
+ return Qe;
1748
+ }
1749
+ /**
1750
+ * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
1751
+ * @type {Object}
1752
+ */
1753
+ static get TIME_24_SIMPLE() {
1754
+ return Je;
1755
+ }
1756
+ /**
1757
+ * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
1758
+ * @type {Object}
1759
+ */
1760
+ static get TIME_24_WITH_SECONDS() {
1761
+ return Ke;
1762
+ }
1763
+ /**
1764
+ * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
1765
+ * @type {Object}
1766
+ */
1767
+ static get TIME_24_WITH_SHORT_OFFSET() {
1768
+ return Be;
1769
+ }
1770
+ /**
1771
+ * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
1772
+ * @type {Object}
1773
+ */
1774
+ static get TIME_24_WITH_LONG_OFFSET() {
1775
+ return Xe;
1776
+ }
1777
+ /**
1778
+ * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
1779
+ * @type {Object}
1780
+ */
1781
+ static get DATETIME_SHORT() {
1782
+ return et;
1783
+ }
1784
+ /**
1785
+ * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
1786
+ * @type {Object}
1787
+ */
1788
+ static get DATETIME_SHORT_WITH_SECONDS() {
1789
+ return tt;
1790
+ }
1791
+ /**
1792
+ * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
1793
+ * @type {Object}
1794
+ */
1795
+ static get DATETIME_MED() {
1796
+ return nt;
1797
+ }
1798
+ /**
1799
+ * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
1800
+ * @type {Object}
1801
+ */
1802
+ static get DATETIME_MED_WITH_SECONDS() {
1803
+ return rt;
1804
+ }
1805
+ /**
1806
+ * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
1807
+ * @type {Object}
1808
+ */
1809
+ static get DATETIME_MED_WITH_WEEKDAY() {
1810
+ return it;
1811
+ }
1812
+ /**
1813
+ * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
1814
+ * @type {Object}
1815
+ */
1816
+ static get DATETIME_FULL() {
1817
+ return st;
1818
+ }
1819
+ /**
1820
+ * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
1821
+ * @type {Object}
1822
+ */
1823
+ static get DATETIME_FULL_WITH_SECONDS() {
1824
+ return at;
1825
+ }
1826
+ /**
1827
+ * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
1828
+ * @type {Object}
1829
+ */
1830
+ static get DATETIME_HUGE() {
1831
+ return ot;
1832
+ }
1833
+ /**
1834
+ * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
1835
+ * @type {Object}
1836
+ */
1837
+ static get DATETIME_HUGE_WITH_SECONDS() {
1838
+ return lt;
1839
+ }
1840
+ }
1841
+ function Ft(n) {
1842
+ if (u.isDateTime(n))
1843
+ return n;
1844
+ if (n && n.valueOf && U(n.valueOf()))
1845
+ return u.fromJSDate(n);
1846
+ if (n && typeof n == "object")
1847
+ return u.fromObject(n);
1848
+ throw new w(
1849
+ `Unknown datetime argument: ${n}, of type ${typeof n}`
1850
+ );
1851
+ }
1852
+ export {
1853
+ u as default,
1854
+ Ft as friendlyDateTime
1855
+ };