@adyen/bento-vue2 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/index.d.ts +1 -0
  3. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle-button.vue.d.ts +65 -0
  4. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle.types.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/button/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +3 -8
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +3 -6
  8. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +1 -1
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +7 -5
  11. package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.types.d.ts +2 -2
  12. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +5 -5
  13. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +5 -5
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +18 -19
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +1 -1
  17. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +2 -2
  18. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +7 -7
  19. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.types.d.ts +20 -0
  20. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +90 -0
  21. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/index.d.ts +3 -0
  22. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.keys.d.ts +2 -0
  23. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.types.d.ts +16 -0
  24. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.vue.d.ts +54 -0
  25. package/dist/@types/packages/vue2/src/components/internal/dialog-page/index.d.ts +3 -0
  26. package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
  27. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +14 -0
  28. package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
  29. package/dist/@types/packages/vue2/src/components/internal/radio-input/index.d.ts +3 -0
  30. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.types.d.ts +6 -0
  31. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +80 -0
  32. package/dist/@types/packages/vue2/src/components/modal-fullscreen/components/modal-fullscreen-page.vue.d.ts +60 -0
  33. package/dist/@types/packages/vue2/src/components/modal-fullscreen/index.d.ts +1 -0
  34. package/dist/@types/packages/vue2/src/components/modal-fullscreen/modal-fullscreen.vue.d.ts +12 -1
  35. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +3 -6
  36. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +1 -1
  37. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/sidepanel/components/sidepanel-page.vue.d.ts +3 -3
  39. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +0 -2
  40. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +0 -19
  41. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.vue.d.ts +1 -1
  42. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +1 -1
  43. package/dist/accordion.js +2 -2
  44. package/dist/action-bar.js +6 -6
  45. package/dist/alert.js +3 -3
  46. package/dist/assets/base-modal.css +1 -1
  47. package/dist/assets/button-actions.css +1 -0
  48. package/dist/assets/button.css +1 -1
  49. package/dist/assets/calendar.css +1 -1
  50. package/dist/assets/checkbox.css +1 -1
  51. package/dist/assets/dialog-page.css +1 -0
  52. package/dist/assets/dropdown-default-textbox.css +1 -1
  53. package/dist/assets/dropdown.css +1 -1
  54. package/dist/assets/index10.css +1 -1
  55. package/dist/assets/index11.css +1 -1
  56. package/dist/assets/index12.css +1 -1
  57. package/dist/assets/index13.css +1 -1
  58. package/dist/assets/index14.css +1 -1
  59. package/dist/assets/index15.css +1 -1
  60. package/dist/assets/index16.css +1 -1
  61. package/dist/assets/index17.css +1 -1
  62. package/dist/assets/index18.css +1 -1
  63. package/dist/assets/index19.css +1 -1
  64. package/dist/assets/index20.css +1 -1
  65. package/dist/assets/index21.css +1 -1
  66. package/dist/assets/index22.css +1 -1
  67. package/dist/assets/index23.css +1 -1
  68. package/dist/assets/index24.css +1 -1
  69. package/dist/assets/index25.css +1 -1
  70. package/dist/assets/index26.css +1 -1
  71. package/dist/assets/index27.css +1 -1
  72. package/dist/assets/index28.css +1 -1
  73. package/dist/assets/index29.css +1 -1
  74. package/dist/assets/index3.css +1 -1
  75. package/dist/assets/index30.css +1 -1
  76. package/dist/assets/index31.css +1 -1
  77. package/dist/assets/index32.css +1 -1
  78. package/dist/assets/index33.css +1 -1
  79. package/dist/assets/index34.css +1 -1
  80. package/dist/assets/index35.css +1 -1
  81. package/dist/assets/index36.css +1 -1
  82. package/dist/assets/index37.css +1 -1
  83. package/dist/assets/index38.css +1 -1
  84. package/dist/assets/index39.css +1 -1
  85. package/dist/assets/index4.css +1 -1
  86. package/dist/assets/index40.css +1 -1
  87. package/dist/assets/index41.css +1 -1
  88. package/dist/assets/index42.css +1 -1
  89. package/dist/assets/index43.css +1 -1
  90. package/dist/assets/index44.css +1 -1
  91. package/dist/assets/index45.css +1 -1
  92. package/dist/assets/index46.css +1 -1
  93. package/dist/assets/index47.css +1 -1
  94. package/dist/assets/index48.css +1 -1
  95. package/dist/assets/index5.css +1 -1
  96. package/dist/assets/index6.css +1 -1
  97. package/dist/assets/index7.css +1 -1
  98. package/dist/assets/index8.css +1 -1
  99. package/dist/assets/index9.css +1 -1
  100. package/dist/assets/teleport.css +1 -1
  101. package/dist/avatar-image.js +1 -1
  102. package/dist/button.js +71 -93
  103. package/dist/button.js.map +1 -1
  104. package/dist/card.js +3 -3
  105. package/dist/checkbox.js +6 -6
  106. package/dist/chunks/{base-button.bf0c938c.js → base-button.3c3d473d.js} +2 -2
  107. package/dist/chunks/{base-button.bf0c938c.js.map → base-button.3c3d473d.js.map} +1 -1
  108. package/dist/chunks/{base-modal.1dc6cf96.js → base-modal.27c6f2db.js} +5 -5
  109. package/dist/chunks/{base-modal.1dc6cf96.js.map → base-modal.27c6f2db.js.map} +1 -1
  110. package/dist/chunks/{button-actions-with-menu.4ecf3d93.js → button-actions-with-menu.a38327c2.js} +4 -4
  111. package/dist/chunks/{button-actions-with-menu.4ecf3d93.js.map → button-actions-with-menu.a38327c2.js.map} +1 -1
  112. package/dist/chunks/button-actions.1dc90a19.js +111 -0
  113. package/dist/chunks/button-actions.1dc90a19.js.map +1 -0
  114. package/dist/chunks/{button.f5739261.js → button.0b6cda85.js} +3 -3
  115. package/dist/chunks/{button.f5739261.js.map → button.0b6cda85.js.map} +1 -1
  116. package/dist/chunks/calendar.263cfc88.js +913 -0
  117. package/dist/chunks/calendar.263cfc88.js.map +1 -0
  118. package/dist/chunks/checkbox.c7a74005.js +275 -0
  119. package/dist/chunks/checkbox.c7a74005.js.map +1 -0
  120. package/dist/chunks/{controls-group.2b645d54.js → controls-group.8abe0bd1.js} +3 -3
  121. package/dist/chunks/{controls-group.2b645d54.js.map → controls-group.8abe0bd1.js.map} +1 -1
  122. package/dist/chunks/{copy.e01532cf.js → copy.647aae54.js} +4 -4
  123. package/dist/chunks/{copy.e01532cf.js.map → copy.647aae54.js.map} +1 -1
  124. package/dist/chunks/dialog-page.f787969c.js +113 -0
  125. package/dist/chunks/dialog-page.f787969c.js.map +1 -0
  126. package/dist/chunks/{dropdown-default-textbox.d45138fa.js → dropdown-default-textbox.59803edd.js} +97 -111
  127. package/dist/chunks/dropdown-default-textbox.59803edd.js.map +1 -0
  128. package/dist/chunks/{dropdown.0a9acf8b.js → dropdown.0574f613.js} +62 -61
  129. package/dist/chunks/dropdown.0574f613.js.map +1 -0
  130. package/dist/chunks/{error-message.317dd85f.js → error-message.75666843.js} +2 -2
  131. package/dist/chunks/{error-message.317dd85f.js.map → error-message.75666843.js.map} +1 -1
  132. package/dist/chunks/{fixed-scroller.afe02620.js → fixed-scroller.06574a66.js} +2 -2
  133. package/dist/chunks/{fixed-scroller.afe02620.js.map → fixed-scroller.06574a66.js.map} +1 -1
  134. package/dist/chunks/{footer-actions.e0b866b1.js → footer-actions.0268a57b.js} +4 -4
  135. package/dist/chunks/{footer-actions.e0b866b1.js.map → footer-actions.0268a57b.js.map} +1 -1
  136. package/dist/chunks/{index.7aa428c2.js → index.026ae47b.js} +2 -2
  137. package/dist/chunks/{index.7aa428c2.js.map → index.026ae47b.js.map} +1 -1
  138. package/dist/chunks/{index.898a95bc.js → index.0bb773a7.js} +6 -6
  139. package/dist/chunks/{index.898a95bc.js.map → index.0bb773a7.js.map} +1 -1
  140. package/dist/chunks/{index.651dac2d.js → index.10b9618d.js} +3 -3
  141. package/dist/chunks/{index.651dac2d.js.map → index.10b9618d.js.map} +1 -1
  142. package/dist/chunks/{index.6c299479.js → index.302e9cf2.js} +2 -2
  143. package/dist/chunks/{index.6c299479.js.map → index.302e9cf2.js.map} +1 -1
  144. package/dist/chunks/index.408e1419.js +712 -0
  145. package/dist/chunks/index.408e1419.js.map +1 -0
  146. package/dist/chunks/{index.88ac1dab.js → index.45cd2344.js} +31 -31
  147. package/dist/chunks/index.45cd2344.js.map +1 -0
  148. package/dist/chunks/{index.6c017121.js → index.5b47c56b.js} +7 -7
  149. package/dist/chunks/{index.6c017121.js.map → index.5b47c56b.js.map} +1 -1
  150. package/dist/chunks/{index.2e70720a.js → index.5bfc67d1.js} +2 -2
  151. package/dist/chunks/{index.2e70720a.js.map → index.5bfc67d1.js.map} +1 -1
  152. package/dist/chunks/{index.e6aa2c36.js → index.932c230b.js} +6 -6
  153. package/dist/chunks/{index.e6aa2c36.js.map → index.932c230b.js.map} +1 -1
  154. package/dist/chunks/{index.81443e01.js → index.a52b98d1.js} +8 -8
  155. package/dist/chunks/{index.81443e01.js.map → index.a52b98d1.js.map} +1 -1
  156. package/dist/chunks/{index.290bbc9e.js → index.dc985e76.js} +3 -3
  157. package/dist/chunks/{index.290bbc9e.js.map → index.dc985e76.js.map} +1 -1
  158. package/dist/chunks/{index.546b27ae.js → index.de687404.js} +3 -2
  159. package/dist/chunks/{index.546b27ae.js.map → index.de687404.js.map} +1 -1
  160. package/dist/chunks/{listbox-option-tag.720eabb5.js → listbox-option-tag.89846151.js} +3 -3
  161. package/dist/chunks/{listbox-option-tag.720eabb5.js.map → listbox-option-tag.89846151.js.map} +1 -1
  162. package/dist/chunks/{listbox.dc3d986e.js → listbox.a8180c4a.js} +5 -5
  163. package/dist/chunks/{listbox.dc3d986e.js.map → listbox.a8180c4a.js.map} +1 -1
  164. package/dist/chunks/{loading-button.390228ff.js → loading-button.50dddf2f.js} +2 -2
  165. package/dist/chunks/{loading-button.390228ff.js.map → loading-button.50dddf2f.js.map} +1 -1
  166. package/dist/chunks/modal-fullscreen.keys.b9f31632.js +5 -0
  167. package/dist/chunks/modal-fullscreen.keys.b9f31632.js.map +1 -0
  168. package/dist/chunks/sidepanel.keys.1ed8a57c.js +5 -0
  169. package/dist/chunks/sidepanel.keys.1ed8a57c.js.map +1 -0
  170. package/dist/chunks/{teleport.d52e5254.js → teleport.84b0f20b.js} +14 -13
  171. package/dist/chunks/teleport.84b0f20b.js.map +1 -0
  172. package/dist/chunks/{tooltip.d452f6c4.js → tooltip.6748027a.js} +3 -3
  173. package/dist/chunks/{tooltip.d452f6c4.js.map → tooltip.6748027a.js.map} +1 -1
  174. package/dist/code-snippet.js +7 -7
  175. package/dist/code-snippet.js.map +1 -1
  176. package/dist/country.js +2 -2
  177. package/dist/currency.js +1 -1
  178. package/dist/data-grid.js +1 -1
  179. package/dist/date-picker.js +18 -18
  180. package/dist/date-range-picker.js +2 -2
  181. package/dist/date.js +1 -1
  182. package/dist/divider.js +1 -1
  183. package/dist/dropdown.js +6 -6
  184. package/dist/empty-state.js +3 -3
  185. package/dist/filter-bar.js +19 -19
  186. package/dist/filter-bar.js.map +1 -1
  187. package/dist/focus-trap.js +1 -1
  188. package/dist/form-layout.js +2 -2
  189. package/dist/header.js +4 -4
  190. package/dist/index.js +299 -2935
  191. package/dist/index.js.map +1 -1
  192. package/dist/info-icon.js +3 -3
  193. package/dist/input-field.js +4 -4
  194. package/dist/internal.js +78 -25
  195. package/dist/internal.js.map +1 -1
  196. package/dist/link.js +1 -1
  197. package/dist/loading-indicator.js +1 -1
  198. package/dist/menu.js +1 -1
  199. package/dist/modal-fullscreen.js +144 -44
  200. package/dist/modal-fullscreen.js.map +1 -1
  201. package/dist/modal.js +6 -6
  202. package/dist/pagination.js +4 -4
  203. package/dist/payment-method.js +2 -2
  204. package/dist/popover.js +1 -1
  205. package/dist/popper-container.js +1 -1
  206. package/dist/radio-group.js +147 -78
  207. package/dist/radio-group.js.map +1 -1
  208. package/dist/search-bar.js +2 -2
  209. package/dist/secondary-nav.js +2 -2
  210. package/dist/segmented-control.js +3 -3
  211. package/dist/sidepanel.js +78 -111
  212. package/dist/sidepanel.js.map +1 -1
  213. package/dist/status.js +2 -2
  214. package/dist/stepper.js +3 -3
  215. package/dist/structured-list.js +1 -1
  216. package/dist/summary-grid.js +3 -3
  217. package/dist/tabs.js +3 -3
  218. package/dist/tag.js +3 -3
  219. package/dist/textarea.js +4 -4
  220. package/dist/timeline.js +12 -12
  221. package/dist/toast.js +3 -3
  222. package/dist/toggle.js +2 -2
  223. package/dist/tutorial.js +6 -6
  224. package/dist/typography.js +1 -1
  225. package/dist/web-types.json +431 -5
  226. package/package.json +3 -3
  227. package/dist/chunks/calendar.7a2d1894.js +0 -960
  228. package/dist/chunks/calendar.7a2d1894.js.map +0 -1
  229. package/dist/chunks/checkbox.1345941b.js +0 -195
  230. package/dist/chunks/checkbox.1345941b.js.map +0 -1
  231. package/dist/chunks/dropdown-default-textbox.d45138fa.js.map +0 -1
  232. package/dist/chunks/dropdown.0a9acf8b.js.map +0 -1
  233. package/dist/chunks/index.84c2cef6.js +0 -637
  234. package/dist/chunks/index.84c2cef6.js.map +0 -1
  235. package/dist/chunks/index.88ac1dab.js.map +0 -1
  236. package/dist/chunks/sidepanel.keys.3f8d69c1.js +0 -7
  237. package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +0 -1
  238. package/dist/chunks/teleport.d52e5254.js.map +0 -1
  239. /package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.d.ts +0 -0
@@ -0,0 +1,913 @@
1
+ import { defineComponent as le, computed as k, ref as F, watch as V, nextTick as Ee, toRef as U, reactive as ye } from "vue";
2
+ import { r as S, t as O, g as fe, e as oe, d as Oe, f as Ne } from "./index.f55fdc32.js";
3
+ import { t as w, B as Se, a as Te, f as ve } from "./index.5bfc67d1.js";
4
+ import { e as ue } from "./index.d80206ed.js";
5
+ import { a as ke } from "./button.0b6cda85.js";
6
+ import { B as Me } from "./index.de687404.js";
7
+ import { u as be } from "./i18n.eb5b985b.js";
8
+ import { g as we } from "./unique-id.a2a2b458.js";
9
+ import { C as Ie, a as pe } from "./chevron-left.5edf02ac.js";
10
+ import { n as ie } from "./_plugin-vue2_normalizer.71e2aa87.js";
11
+ import { a as xe } from "./keyboard-navigation.ca47dfa8.js";
12
+ import "../assets/calendar.css";
13
+ function q(e, t) {
14
+ S(2, arguments);
15
+ var n = O(e), a = w(t);
16
+ return isNaN(a) ? /* @__PURE__ */ new Date(NaN) : (a && n.setDate(n.getDate() + a), n);
17
+ }
18
+ function $(e, t) {
19
+ S(2, arguments);
20
+ var n = O(e), a = w(t);
21
+ if (isNaN(a))
22
+ return /* @__PURE__ */ new Date(NaN);
23
+ if (!a)
24
+ return n;
25
+ var o = n.getDate(), r = new Date(n.getTime());
26
+ r.setMonth(n.getMonth() + a + 1, 0);
27
+ var u = r.getDate();
28
+ return o >= u ? r : (n.setFullYear(r.getFullYear(), r.getMonth(), o), n);
29
+ }
30
+ function J(e, t) {
31
+ S(1, arguments);
32
+ var n = t || {}, a = n.locale, o = a && a.options && a.options.weekStartsOn, r = o == null ? 0 : w(o), u = n.weekStartsOn == null ? r : w(n.weekStartsOn);
33
+ if (!(u >= 0 && u <= 6))
34
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
35
+ var s = O(e), v = s.getDay(), c = (v < u ? 7 : 0) + v - u;
36
+ return s.setDate(s.getDate() - c), s.setHours(0, 0, 0, 0), s;
37
+ }
38
+ function C(e) {
39
+ S(1, arguments);
40
+ var t = O(e);
41
+ return t.setHours(0, 0, 0, 0), t;
42
+ }
43
+ var Re = 864e5;
44
+ function Ae(e, t) {
45
+ S(2, arguments);
46
+ var n = C(e), a = C(t), o = n.getTime() - fe(n), r = a.getTime() - fe(a);
47
+ return Math.round((o - r) / Re);
48
+ }
49
+ function z(e, t) {
50
+ S(2, arguments);
51
+ var n = C(e), a = C(t);
52
+ return n.getTime() === a.getTime();
53
+ }
54
+ function De(e, t) {
55
+ var n = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
56
+ return n < 0 ? -1 : n > 0 ? 1 : n;
57
+ }
58
+ function Pe(e, t) {
59
+ S(2, arguments);
60
+ var n = O(e), a = O(t), o = De(n, a), r = Math.abs(Ae(n, a));
61
+ n.setDate(n.getDate() - o * r);
62
+ var u = +(De(n, a) === -o), s = o * (r - u);
63
+ return s === 0 ? 0 : s;
64
+ }
65
+ function Z(e) {
66
+ S(1, arguments);
67
+ var t = O(e);
68
+ return t.setDate(1), t.setHours(0, 0, 0, 0), t;
69
+ }
70
+ function ee(e, t) {
71
+ S(1, arguments);
72
+ var n = t || {}, a = n.locale, o = a && a.options && a.options.weekStartsOn, r = o == null ? 0 : w(o), u = n.weekStartsOn == null ? r : w(n.weekStartsOn);
73
+ if (!(u >= 0 && u <= 6))
74
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
75
+ var s = O(e), v = s.getDay(), c = (v < u ? -7 : 0) + 6 - (v - u);
76
+ return s.setDate(s.getDate() + c), s.setHours(23, 59, 59, 999), s;
77
+ }
78
+ function Le(e, t) {
79
+ S(2, arguments);
80
+ var n = w(t);
81
+ return q(e, -n);
82
+ }
83
+ function te(e, t) {
84
+ S(2, arguments);
85
+ var n = w(t);
86
+ return $(e, -n);
87
+ }
88
+ function Ue(e, t) {
89
+ S(2, arguments);
90
+ var n = O(e), a = O(t);
91
+ return n.getTime() > a.getTime();
92
+ }
93
+ function Ce(e, t) {
94
+ S(2, arguments);
95
+ var n = O(e), a = O(t);
96
+ return n.getTime() < a.getTime();
97
+ }
98
+ function me(e, t) {
99
+ S(2, arguments);
100
+ var n = O(e).getTime(), a = O(t.start).getTime(), o = O(t.end).getTime();
101
+ if (!(a <= o))
102
+ throw new RangeError("Invalid interval");
103
+ return n >= a && n <= o;
104
+ }
105
+ function We(e, t, n) {
106
+ S(2, arguments);
107
+ var a = n || {}, o = a.locale, r = o && o.options && o.options.weekStartsOn, u = r == null ? 0 : w(r), s = a.weekStartsOn == null ? u : w(a.weekStartsOn);
108
+ if (!(s >= 0 && s <= 6))
109
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
110
+ var v = O(e), c = w(t), D = v.getDay(), f = c % 7, i = (f + 7) % 7, d = 7 - s, _ = c < 0 || c > 6 ? c - (D + d) % 7 : (i + d) % 7 - (D + d) % 7;
111
+ return q(v, _);
112
+ }
113
+ var M = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(M || {}), L = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_DAY = "current-day", e.DISABLED = "disabled", e))(L || {}), G = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(G || {});
114
+ const Ye = le({
115
+ name: "calendar-month-day",
116
+ components: { BentoDate: Se },
117
+ inheritAttrs: !0,
118
+ props: {
119
+ /**
120
+ * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
121
+ */
122
+ day: { type: Date, required: !0 },
123
+ /**
124
+ * Indicate if a date should be disabled or not
125
+ */
126
+ disabled: { type: Boolean, default: !1 },
127
+ /**
128
+ * Changes the state of the calendar day to selected.
129
+ */
130
+ selected: { type: Boolean, default: !1 },
131
+ /**
132
+ * When the day is selected, this indicates if the selection is a single date or part of a range.
133
+ * If it's a range it can be at the beginning, middle or end of the selection.
134
+ */
135
+ variant: {
136
+ type: String,
137
+ default: M.SINGLE,
138
+ validator: (e) => Object.values(M).includes(e)
139
+ }
140
+ },
141
+ emits: [G.CLICK, G.MOUSE_OVER],
142
+ setup(e, { emit: t }) {
143
+ const n = k(() => {
144
+ const r = /* @__PURE__ */ new Date();
145
+ return e.day.getDate() === r.getDate() && e.day.getMonth() === r.getMonth() && e.day.getFullYear() === r.getFullYear();
146
+ });
147
+ return {
148
+ // Values
149
+ conditionalClasses: k(() => ({
150
+ // Variants
151
+ [`b-calendar-month-day--${L.BEGINNING}`]: e.variant === M.BEGINNING,
152
+ [`b-calendar-month-day--${L.MIDDLE}`]: e.variant === M.MIDDLE,
153
+ [`b-calendar-month-day--${L.END}`]: e.variant === M.END,
154
+ [`b-calendar-month-day--${L.SINGLE}`]: e.variant === M.SINGLE,
155
+ // Selected
156
+ [`b-calendar-month-day--${L.UNSELECTED}`]: !e.selected,
157
+ [`b-calendar-month-day--${L.SELECTED}`]: e.selected,
158
+ // Current Day
159
+ [`b-calendar-month-day--${L.CURRENT_DAY}`]: n.value,
160
+ // Disabled
161
+ [`b-calendar-month-day--${L.DISABLED}`]: e.disabled
162
+ })),
163
+ // Enums
164
+ BentoDateFormat: Te,
165
+ CalendarMonthDayEvent: G,
166
+ // Events
167
+ onClick: (r, u) => {
168
+ e.disabled ? (r.preventDefault(), r.stopPropagation()) : t(G.CLICK, u, e.day);
169
+ }
170
+ };
171
+ }
172
+ });
173
+ var Fe = function() {
174
+ var t = this, n = t._self._c;
175
+ return t._self._setupProxy, n("td", { staticClass: "b-calendar-month-day", class: t.conditionalClasses, attrs: { tabindex: t.selected ? "0" : "-1", "aria-selected": t.selected ? t.selected : void 0 }, on: { click: (a) => t.onClick(a, t.day), mouseover: function(a) {
176
+ return t.$emit(t.CalendarMonthDayEvent.MOUSE_OVER);
177
+ }, keydown: function(a) {
178
+ return !a.type.indexOf("key") && t._k(a.keyCode, "space", 32, a.key, [" ", "Spacebar"]) && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : ((o) => t.onClick(o, t.day)).apply(null, arguments);
179
+ } } }, [n("div", { staticClass: "b-calendar-month-day__wrapper" }, [n("bento-date", { staticClass: "b-calendar-month-day__label", attrs: { date: t.day, format: t.BentoDateFormat.DAY_OF_MONTH } })], 1)]);
180
+ }, $e = [], je = /* @__PURE__ */ ie(
181
+ Ye,
182
+ Fe,
183
+ $e,
184
+ !1,
185
+ null,
186
+ "404de012",
187
+ null,
188
+ null
189
+ );
190
+ const Be = je.exports;
191
+ var R = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(R || {}), b = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(b || {}), H = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(H || {});
192
+ function Ge(e) {
193
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
194
+ }
195
+ var ae = {}, He = {
196
+ get exports() {
197
+ return ae;
198
+ },
199
+ set exports(e) {
200
+ ae = e;
201
+ }
202
+ }, Q = {}, Ve = {
203
+ get exports() {
204
+ return Q;
205
+ },
206
+ set exports(e) {
207
+ Q = e;
208
+ }
209
+ };
210
+ (function(e, t) {
211
+ Object.defineProperty(t, "__esModule", {
212
+ value: !0
213
+ }), t.default = n;
214
+ function n(a) {
215
+ if (a === null || a === !0 || a === !1)
216
+ return NaN;
217
+ var o = Number(a);
218
+ return isNaN(o) ? o : o < 0 ? Math.ceil(o) : Math.floor(o);
219
+ }
220
+ e.exports = t.default;
221
+ })(Ve, Q);
222
+ var ne = {}, qe = {
223
+ get exports() {
224
+ return ne;
225
+ },
226
+ set exports(e) {
227
+ ne = e;
228
+ }
229
+ }, re = {}, Qe = {
230
+ get exports() {
231
+ return re;
232
+ },
233
+ set exports(e) {
234
+ re = e;
235
+ }
236
+ }, j = {}, Ke = {
237
+ get exports() {
238
+ return j;
239
+ },
240
+ set exports(e) {
241
+ j = e;
242
+ }
243
+ };
244
+ (function(e, t) {
245
+ Object.defineProperty(t, "__esModule", {
246
+ value: !0
247
+ }), t.default = n;
248
+ function n(a, o) {
249
+ if (o.length < a)
250
+ throw new TypeError(a + " argument" + (a > 1 ? "s" : "") + " required, but only " + o.length + " present");
251
+ }
252
+ e.exports = t.default;
253
+ })(Ke, j);
254
+ (function(e, t) {
255
+ Object.defineProperty(t, "__esModule", {
256
+ value: !0
257
+ }), t.default = o;
258
+ var n = a(j);
259
+ function a(r) {
260
+ return r && r.__esModule ? r : { default: r };
261
+ }
262
+ function o(r) {
263
+ (0, n.default)(1, arguments);
264
+ var u = Object.prototype.toString.call(r);
265
+ return r instanceof Date || typeof r == "object" && u === "[object Date]" ? new Date(r.getTime()) : typeof r == "number" || u === "[object Number]" ? new Date(r) : ((typeof r == "string" || u === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
266
+ }
267
+ e.exports = t.default;
268
+ })(Qe, re);
269
+ (function(e, t) {
270
+ Object.defineProperty(t, "__esModule", {
271
+ value: !0
272
+ }), t.default = u;
273
+ var n = r(Q), a = r(re), o = r(j);
274
+ function r(s) {
275
+ return s && s.__esModule ? s : { default: s };
276
+ }
277
+ function u(s, v) {
278
+ (0, o.default)(2, arguments);
279
+ var c = (0, a.default)(s), D = (0, n.default)(v);
280
+ return isNaN(D) ? /* @__PURE__ */ new Date(NaN) : (D && c.setDate(c.getDate() + D), c);
281
+ }
282
+ e.exports = t.default;
283
+ })(qe, ne);
284
+ (function(e, t) {
285
+ Object.defineProperty(t, "__esModule", {
286
+ value: !0
287
+ }), t.default = u;
288
+ var n = r(Q), a = r(ne), o = r(j);
289
+ function r(s) {
290
+ return s && s.__esModule ? s : { default: s };
291
+ }
292
+ function u(s, v) {
293
+ (0, o.default)(2, arguments);
294
+ var c = (0, n.default)(v);
295
+ return (0, a.default)(s, -c);
296
+ }
297
+ e.exports = t.default;
298
+ })(He, ae);
299
+ const _e = /* @__PURE__ */ Ge(ae), Xe = ({ currentSelectedDate: e, month: t, isDateDisabled: n, firstDayOfWeek: a }, o) => {
300
+ const r = F(new Date(t.value));
301
+ V(
302
+ t,
303
+ () => {
304
+ r.value = t.value;
305
+ },
306
+ { immediate: !0 }
307
+ );
308
+ const u = F(new Date(e.value));
309
+ V(e, () => {
310
+ u.value = e.value;
311
+ });
312
+ const s = F({}), v = (l) => (y) => {
313
+ s.value[l.toDateString()] = y;
314
+ }, c = () => {
315
+ s.value = {};
316
+ }, D = (l = 1) => {
317
+ r.value = $(r.value, l), o(R.NEXT_MONTH, l), c();
318
+ }, f = (l = 1) => {
319
+ r.value = te(r.value, l), o(R.PREVIOUS_MONTH, l), c();
320
+ }, i = (l) => {
321
+ const y = !!s.value[l == null ? void 0 : l.toDateString()];
322
+ l && y && s.value[l.toDateString()].$el.focus();
323
+ }, d = (l) => {
324
+ l.preventDefault(), l.stopImmediatePropagation(), l.stopPropagation();
325
+ }, _ = ({ nextDate: l, isIncreasingDays: y, amountOfMonths: p, isCalendarButtonsNav: X }) => {
326
+ if (!X && n && n(l))
327
+ return;
328
+ l.getMonth() === u.value.getMonth() && l.getFullYear() === u.value.getFullYear() ? (u.value = l, i(l)) : (y ? D(p) : f(p), Ee(() => {
329
+ const se = l.getMonth() === r.value.getMonth() && l.getFullYear() === r.value.getFullYear();
330
+ n && n(l) || !se || X || (u.value = l, i(l));
331
+ }));
332
+ };
333
+ return {
334
+ // Calendar days ref
335
+ calendarRef: s,
336
+ addDayRef: v,
337
+ /**
338
+ * Month navigation
339
+ */
340
+ showNextMonth: D,
341
+ showPreviousMonth: f,
342
+ /**
343
+ * Focus method
344
+ */
345
+ focusOnDate: i,
346
+ /**
347
+ * Day navigation
348
+ */
349
+ // ArrowRight
350
+ moveToNextDay: (l) => {
351
+ d(l);
352
+ const y = 1;
353
+ _({ nextDate: q(u.value, y), isIncreasingDays: !0 });
354
+ },
355
+ // ArrowLeft
356
+ moveToPreviousDay: (l) => {
357
+ d(l);
358
+ const y = 1;
359
+ _({ nextDate: _e(u.value, y), isIncreasingDays: !1 });
360
+ },
361
+ // ArrowUp
362
+ moveToPreviousWeek: (l) => {
363
+ d(l);
364
+ const y = 7;
365
+ _({ nextDate: _e(u.value, y), isIncreasingDays: !1 });
366
+ },
367
+ // ArrowDown
368
+ moveToNextWeek: (l) => {
369
+ d(l);
370
+ const y = 7;
371
+ _({ nextDate: q(u.value, y), isIncreasingDays: !0 });
372
+ },
373
+ // Home
374
+ moveToFirstDayOfWeek: (l) => {
375
+ d(l), _({
376
+ nextDate: J(u.value, { weekStartsOn: a }),
377
+ isIncreasingDays: !1
378
+ });
379
+ },
380
+ // End
381
+ moveToLastDayOfWeek: (l) => {
382
+ d(l), _({
383
+ nextDate: ee(u.value, { weekStartsOn: a }),
384
+ isIncreasingDays: !0
385
+ });
386
+ },
387
+ // PageUp
388
+ moveToPreviousMonth: (l, y = !1) => {
389
+ d(l);
390
+ const p = 1;
391
+ _({
392
+ nextDate: te(u.value, p),
393
+ isIncreasingDays: !1,
394
+ amountOfMonths: p,
395
+ isCalendarButtonsNav: y
396
+ });
397
+ },
398
+ // Shift+PageUp
399
+ moveToPreviousYear: (l) => {
400
+ d(l);
401
+ const y = 12;
402
+ _({
403
+ nextDate: te(u.value, y),
404
+ isIncreasingDays: !1,
405
+ amountOfMonths: y
406
+ });
407
+ },
408
+ // PageDown
409
+ moveToNextMonth: (l, y = !1) => {
410
+ d(l);
411
+ const p = 1;
412
+ _({
413
+ nextDate: $(u.value, p),
414
+ isIncreasingDays: !0,
415
+ amountOfMonths: p,
416
+ isCalendarButtonsNav: y
417
+ });
418
+ },
419
+ // Shift-PageDown
420
+ moveToNextYear: (l) => {
421
+ d(l);
422
+ const y = 12;
423
+ _({
424
+ nextDate: $(u.value, y),
425
+ isIncreasingDays: !0,
426
+ amountOfMonths: y
427
+ });
428
+ },
429
+ // Values
430
+ internalDate: u,
431
+ baseDate: r
432
+ };
433
+ }, ze = {
434
+ "en-US": {
435
+ nextMonth: "Next month",
436
+ previousMonth: "Previous month"
437
+ }
438
+ }, Je = le({
439
+ i18n: { messages: ze },
440
+ name: "calendar-month",
441
+ components: {
442
+ BentoButton: ke,
443
+ BentoTypography: Me,
444
+ CalendarMonthDay: Be,
445
+ ChevronLeftIcon: Ie,
446
+ ChevronRightIcon: pe
447
+ },
448
+ directives: { BentoKeyboardNavigationDirective: xe },
449
+ props: {
450
+ /**
451
+ * end of the selected range
452
+ */
453
+ endDate: { type: Date, default: null },
454
+ /**
455
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
456
+ */
457
+ firstDayOfWeek: {
458
+ type: Number,
459
+ default: H.MONDAY,
460
+ validator: (e) => Object.values(H).includes(e)
461
+ },
462
+ /**
463
+ * Indicate if a date should be disabled or not
464
+ */
465
+ isDateDisabled: { type: Function, default: void 0 },
466
+ /**
467
+ * Indicates if the calendar is part of a range date picker or a sigle date picker
468
+ */
469
+ isRange: { type: Boolean, default: !1 },
470
+ /**
471
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
472
+ */
473
+ min: { type: Date, default: null },
474
+ /**
475
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
476
+ */
477
+ max: { type: Date, default: null },
478
+ /**
479
+ * Month of the year to be displayed in the calendar
480
+ */
481
+ month: { type: Date, required: !0 },
482
+ /**
483
+ * When rendering multiple calendars, this property allows to render the
484
+ * Next and Previous calendar buttons to the right, left or not at all
485
+ * depending on the position: Unique (only 1), First, Middle or Last
486
+ */
487
+ position: {
488
+ type: String,
489
+ default: b.UNIQUE,
490
+ validator: (e) => Object.values(b).includes(e)
491
+ },
492
+ /**
493
+ * start of the selected range
494
+ */
495
+ startDate: { type: Date, default: null }
496
+ // can be undefined, eslint complains without default
497
+ },
498
+ emits: [
499
+ R.INPUT,
500
+ R.NEXT_MONTH,
501
+ R.PREVIOUS_MONTH,
502
+ R.MOUSE_OVER
503
+ ],
504
+ setup(e, { emit: t }) {
505
+ const { locale: n } = be(), a = { de: Oe, enUS: oe, fr: Ne }, o = we("bento-date-picker-month-label"), r = k(
506
+ () => (g) => {
507
+ var x;
508
+ return e.min && g < e.min || e.max && g > e.max || ((x = e.isDateDisabled) == null ? void 0 : x.call(e, g));
509
+ }
510
+ ), {
511
+ internalDate: u,
512
+ baseDate: s,
513
+ // Calendar refs
514
+ addDayRef: v,
515
+ // Month navigation
516
+ showNextMonth: c,
517
+ showPreviousMonth: D,
518
+ // Day navigation
519
+ moveToNextDay: f,
520
+ moveToPreviousDay: i,
521
+ moveToPreviousWeek: d,
522
+ moveToNextWeek: _,
523
+ moveToFirstDayOfWeek: W,
524
+ moveToLastDayOfWeek: K,
525
+ moveToPreviousMonth: m,
526
+ moveToPreviousYear: h,
527
+ moveToNextMonth: T,
528
+ moveToNextYear: E,
529
+ focusOnDate: P
530
+ } = Xe(
531
+ {
532
+ currentSelectedDate: U(e, "startDate"),
533
+ month: U(e, "month"),
534
+ isDateDisabled: r.value,
535
+ firstDayOfWeek: e.firstDayOfWeek
536
+ },
537
+ t
538
+ ), N = k(
539
+ () => Object.values(H).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : H.MONDAY
540
+ ), I = k(
541
+ () => [b.FIRST, b.UNIQUE].includes(e.position)
542
+ ), ce = k(
543
+ () => [b.LAST, b.UNIQUE].includes(e.position)
544
+ ), l = k(
545
+ () => ve(s.value, "MMMM yyyy", {
546
+ locale: a[n.value.substring(0, 2)] || oe
547
+ })
548
+ ), y = k(
549
+ () => new Array(7).fill(/* @__PURE__ */ new Date()).map((g, x) => {
550
+ const B = We(g, N.value + x);
551
+ return ve(B, "EEE", {
552
+ locale: a[n.value.substring(0, 2)] || oe
553
+ });
554
+ })
555
+ ), p = k(() => {
556
+ const g = [], x = Z(e.month);
557
+ let B = g[g.push([]) - 1];
558
+ for (; x.getMonth() === e.month.getMonth(); )
559
+ x.getDay() - N.value === 0 && B.length > 0 && (B = g[g.push([]) - 1]), B.push(C(x)), x.setDate(x.getDate() + 1);
560
+ return g;
561
+ }), X = (g) => {
562
+ t(R.INPUT, g);
563
+ }, de = (g) => {
564
+ if (!e.isRange || z(e.startDate, e.endDate))
565
+ return M.SINGLE;
566
+ if (e.startDate && z(e.startDate, g))
567
+ return M.BEGINNING;
568
+ if (e.endDate && z(e.endDate, g))
569
+ return M.END;
570
+ if (e.startDate && e.endDate && me(g, { start: e.startDate, end: e.endDate }))
571
+ return M.MIDDLE;
572
+ }, se = (g) => u.value && z(u.value, g) ? !0 : e.startDate && e.endDate && me(g, { start: e.startDate, end: e.endDate }), he = () => {
573
+ t(R.INPUT, u);
574
+ }, ge = e.isRange ? {} : {
575
+ "keydown:arrow-right": f,
576
+ "keydown:arrow-left": i,
577
+ "keydown:arrow-up": d,
578
+ "keydown:arrow-down": _,
579
+ "keydown:home": W,
580
+ "keydown:end": K,
581
+ "keydown:page-up": m,
582
+ "keydown:shift-page-up": h,
583
+ "keydown:page-down": T,
584
+ "keydown:shift-page-down": E
585
+ };
586
+ return {
587
+ // Refs
588
+ addDayRef: v,
589
+ // Values
590
+ computedIsDateDisabled: r,
591
+ daysOfWeek: y,
592
+ weeksOfMonth: p,
593
+ formattedMonthDate: l,
594
+ shouldShowNextMonthButton: ce,
595
+ shouldShowPreviousMonthButton: I,
596
+ monthLabelId: o,
597
+ // Enums
598
+ CalendarMonthEvent: R,
599
+ // Functions
600
+ isSelectedDate: se,
601
+ showNextMonth: c,
602
+ showPreviousMonth: D,
603
+ dayVariant: de,
604
+ confirmNavigationDate: he,
605
+ // Events
606
+ onDayClicked: X,
607
+ listeners: ge,
608
+ // Exposed methods
609
+ focusOnDate: P,
610
+ moveToNextDay: f,
611
+ moveToPreviousDay: i,
612
+ moveToPreviousWeek: d,
613
+ moveToNextWeek: _,
614
+ moveToFirstDayOfWeek: W,
615
+ moveToLastDayOfWeek: K,
616
+ moveToPreviousMonth: m,
617
+ moveToPreviousYear: h,
618
+ moveToNextMonth: T,
619
+ moveToNextYear: E
620
+ };
621
+ }
622
+ });
623
+ var Ze = function() {
624
+ var t = this, n = t._self._c;
625
+ return t._self._setupProxy, n("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-calendar-month" }, t.listeners), [n("div", { staticClass: "b-calendar-month__month-selector" }, [n("div", { staticClass: "b-calendar-month__previous" }, [t.shouldShowPreviousMonthButton ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(a) {
626
+ return t.moveToPreviousMonth(a, !0);
627
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
628
+ return [n("chevron-left-icon", { attrs: { "svg-title": t.$t("previousMonth") } })];
629
+ }, proxy: !0 }], null, !1, 351640624) }) : t._e()], 1), n("bento-typography", { attrs: { id: t.monthLabelId, el: "h2", variant: "title", "aria-live": "polite" } }, [t._v(" " + t._s(t.formattedMonthDate) + " ")]), n("div", { staticClass: "b-calendar-month__next" }, [t.shouldShowNextMonthButton ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(a) {
630
+ return t.moveToNextMonth(a, !0);
631
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
632
+ return [n("chevron-right-icon", { attrs: { "svg-title": t.$t("nextMonth") } })];
633
+ }, proxy: !0 }], null, !1, 1260976669) }) : t._e()], 1)], 1), n("table", { staticClass: "b-calendar-month__month-container", attrs: { role: "grid", "aria-labelledby": t.monthLabelId } }, [n("thead", [n("tr", { staticClass: "b-calendar-month__week-header" }, t._l(t.daysOfWeek, function(a, o) {
634
+ return n("th", { key: o, staticClass: "b-calendar-month__day-of-week" }, [n("bento-typography", { staticClass: "b-calendar-month__day-of-week-font", attrs: { el: "span", variant: "caption" } }, [t._v(" " + t._s(a) + " ")])], 1);
635
+ }), 0)]), n("tbody", t._l(t.weeksOfMonth, function(a, o) {
636
+ return n("tr", { key: o }, [o === 0 && a.length < 7 ? n("td", { attrs: { colspan: 7 - a.length } }) : t._e(), t._l(a, function(r, u) {
637
+ return n("calendar-month-day", { key: `calendar-day-${u}`, ref: t.addDayRef(r), refInFor: !0, attrs: { day: r, disabled: t.computedIsDateDisabled(r), selected: t.isSelectedDate(r), variant: t.dayVariant(r) }, on: { click: t.onDayClicked, mouseover: function(s) {
638
+ return t.$emit(t.CalendarMonthEvent.MOUSE_OVER, r);
639
+ } } });
640
+ })], 2);
641
+ }), 0)])]);
642
+ }, et = [], tt = /* @__PURE__ */ ie(
643
+ Je,
644
+ Ze,
645
+ et,
646
+ !1,
647
+ null,
648
+ "be42e964",
649
+ null,
650
+ null
651
+ );
652
+ const Y = tt.exports;
653
+ var A = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))(A || {});
654
+ const at = ({ selectedDate: e }, t) => {
655
+ const n = ye({
656
+ startDate: null,
657
+ endDate: null
658
+ });
659
+ return V(
660
+ () => e.value,
661
+ () => {
662
+ n.startDate = e.value, n.endDate = void 0;
663
+ },
664
+ { immediate: !0 }
665
+ ), {
666
+ internalValue: n,
667
+ onDateInput: (o) => {
668
+ t(A.INPUT, o);
669
+ },
670
+ // Empty function to prevent the listeners from throwing a warning
671
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
672
+ onMouseOver: () => {
673
+ }
674
+ };
675
+ }, nt = (e) => {
676
+ const t = (s, v, c, D) => {
677
+ let f = J(s, { weekStartsOn: e }), i = ee(v || s, { weekStartsOn: e });
678
+ const d = c && f < c, _ = D && i > D;
679
+ return d && (f = J(c, { weekStartsOn: e })), _ && (i = ee(D, { weekStartsOn: e })), f > i && (d ? i = ee(f, { weekStartsOn: e }) : f = J(i, { weekStartsOn: e })), { startDate: f, endDate: i };
680
+ }, n = (s, v, c, D) => {
681
+ let f = Z(s), i = ue(v || s);
682
+ const d = f < c, _ = i > D;
683
+ return d && (f = Z(c)), _ && (i = ue(D)), f > i && (d ? i = ue(f) : f = Z(i)), { startDate: f, endDate: i };
684
+ };
685
+ return {
686
+ adjustDateForWeekly: t,
687
+ adjustDateForMonthly: n,
688
+ adjustStartDateInputForWeekly: (s, v, c, D) => {
689
+ const { startDate: f } = t(new Date(s), null, c, D);
690
+ return v(f);
691
+ },
692
+ adjustEndDateInputForWeekly: (s, v, c, D) => {
693
+ const { endDate: f } = t(new Date(s), null, c, D);
694
+ return v(f);
695
+ },
696
+ adjustStartDateInputForMonthly: (s, v, c, D) => {
697
+ const { startDate: f } = n(new Date(s), null, c, D);
698
+ return v(f);
699
+ },
700
+ adjustEndDateInputForMonthly: (s, v, c, D) => {
701
+ const { endDate: f } = n(new Date(s), null, c, D);
702
+ return v(f);
703
+ }
704
+ };
705
+ }, rt = ({ selectedDate: e, isDateDisabled: t, maxRange: n, granularity: a, firstDayOfWeek: o, min: r, max: u }, s) => {
706
+ const { adjustDateForWeekly: D, adjustDateForMonthly: f } = nt(o), i = ye({
707
+ startDate: null,
708
+ endDate: null
709
+ }), d = F(null);
710
+ V(
711
+ () => e.value,
712
+ () => {
713
+ let { startDate: m = null, endDate: h = null } = e.value || {};
714
+ m && (m = C(m)), h && (h = C(h)), !(m && t && t(m) || h && t && t(h) || m && h && Ue(m, h)) && (i.startDate = m, i.endDate = h);
715
+ },
716
+ { immediate: !0, deep: !0 }
717
+ );
718
+ const _ = (m, h, T) => {
719
+ if (i.startDate = m, i.endDate = h, n.value) {
720
+ const E = Pe(h, m) - n.value;
721
+ E > 0 && (T < 1 ? (i.startDate = m, i.endDate = Le(h, E)) : (i.startDate = q(m, E), i.endDate = h));
722
+ }
723
+ s(A.START_DATE_SELECTED, i.startDate), s(A.END_DATE_SELECTED, i.endDate);
724
+ }, W = (m) => {
725
+ var h, T, E, P;
726
+ if (!(!d.value || t && t(m)))
727
+ if (Ce(m, d.value)) {
728
+ if (((h = a == null ? void 0 : a.value) == null ? void 0 : h.type) === "weekly") {
729
+ const { startDate: N, endDate: I } = D(m, d.value, r.value, u.value);
730
+ _(N, I, -1);
731
+ return;
732
+ }
733
+ if (((T = a == null ? void 0 : a.value) == null ? void 0 : T.type) === "monthly") {
734
+ const { startDate: N, endDate: I } = f(m, d.value, r.value, u.value);
735
+ _(N, I, -1);
736
+ return;
737
+ }
738
+ _(m, d.value, -1);
739
+ } else {
740
+ if (((E = a == null ? void 0 : a.value) == null ? void 0 : E.type) === "weekly") {
741
+ const { startDate: N, endDate: I } = D(d.value, m, r.value, u.value);
742
+ _(N, I, 1);
743
+ return;
744
+ }
745
+ if (((P = a == null ? void 0 : a.value) == null ? void 0 : P.type) === "monthly") {
746
+ const { startDate: N, endDate: I } = f(d.value, m, r.value, u.value);
747
+ _(N, I, 1);
748
+ return;
749
+ }
750
+ _(d.value, m, 1);
751
+ }
752
+ };
753
+ return {
754
+ internalValue: i,
755
+ onDateInput: (m) => {
756
+ var h, T;
757
+ if (d.value)
758
+ d.value = null, s(A.INPUT, i);
759
+ else {
760
+ let E = m;
761
+ if (((h = a == null ? void 0 : a.value) == null ? void 0 : h.type) === "weekly") {
762
+ const { startDate: P, endDate: N } = D(m);
763
+ E = P, _(E, N);
764
+ }
765
+ if (((T = a == null ? void 0 : a.value) == null ? void 0 : T.type) === "monthly") {
766
+ const { startDate: P, endDate: N } = f(m);
767
+ E = P, _(E, N);
768
+ }
769
+ d.value = E, W(E), s(A.START_DATE_SELECTED, E), s(A.END_DATE_SELECTED, E);
770
+ }
771
+ },
772
+ onMouseOver: W
773
+ };
774
+ }, st = le({
775
+ name: "calendar",
776
+ components: { CalendarMonth: Y },
777
+ props: {
778
+ /**
779
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
780
+ */
781
+ firstDayOfWeek: Y.props.firstDayOfWeek,
782
+ /**
783
+ * The selected granularity configuration
784
+ */
785
+ granularity: {
786
+ type: Object,
787
+ default: null
788
+ },
789
+ /**
790
+ * Indicate if a date should be disabled or not
791
+ */
792
+ isDateDisabled: Y.props.isDateDisabled,
793
+ /**
794
+ * Enables the Date Range calendar
795
+ */
796
+ isRange: Y.props.isRange,
797
+ /**
798
+ * Set a maximum number of dates to be selectable by the range.
799
+ */
800
+ maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
801
+ /**
802
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
803
+ */
804
+ min: Y.props.min,
805
+ /**
806
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
807
+ */
808
+ max: Y.props.max,
809
+ /**
810
+ * Number of months rendered on pane
811
+ */
812
+ numberOfMonths: {
813
+ type: Number,
814
+ default: 3,
815
+ validator: (e) => e >= 1
816
+ },
817
+ /**
818
+ * Selected date. Can be a single Date or a CalendarRangeDate
819
+ * instance that contains startDate and endDate attributes.
820
+ */
821
+ value: { type: [Date, Object], default: void 0 }
822
+ },
823
+ emit: [A.INPUT, A.START_DATE_SELECTED, A.END_DATE_SELECTED],
824
+ setup(e, { emit: t }) {
825
+ const n = F(null), a = F();
826
+ V(
827
+ () => e.value,
828
+ () => {
829
+ var i;
830
+ e.isRange ? a.value = ((i = e.value) == null ? void 0 : i.startDate) || /* @__PURE__ */ new Date() : a.value = e.value || /* @__PURE__ */ new Date();
831
+ },
832
+ { immediate: !0 }
833
+ );
834
+ const o = k(() => ({
835
+ "b-calendar__range": e.isRange
836
+ })), {
837
+ internalValue: r,
838
+ onDateInput: u,
839
+ onMouseOver: s
840
+ } = e.isRange ? rt(
841
+ {
842
+ selectedDate: U(e, "value"),
843
+ isDateDisabled: e.isDateDisabled,
844
+ maxRange: U(e, "maxRange"),
845
+ granularity: U(e, "granularity"),
846
+ firstDayOfWeek: e.firstDayOfWeek,
847
+ min: U(e, "min"),
848
+ max: U(e, "max")
849
+ },
850
+ t
851
+ ) : at(
852
+ {
853
+ selectedDate: U(e, "value"),
854
+ firstDayOfWeek: e.firstDayOfWeek
855
+ },
856
+ t
857
+ ), v = (i) => e.numberOfMonths === 1 ? b.UNIQUE : i === 0 ? b.FIRST : i === e.numberOfMonths - 1 ? b.LAST : b.MIDDLE, c = k(
858
+ () => (i) => $(a.value, i)
859
+ );
860
+ return {
861
+ // Refs
862
+ calendarRef: n,
863
+ // Values
864
+ baseDate: a,
865
+ conditionalClasses: o,
866
+ internalValue: r,
867
+ // Methods
868
+ calculateOffsetMonth: c,
869
+ calendarPosition: v,
870
+ // Events
871
+ onDateInput: u,
872
+ onMouseOver: s,
873
+ calculateNextMonths: (i = 1) => {
874
+ a.value = $(a.value, i);
875
+ },
876
+ calculatePreviousMonths: (i = 1) => {
877
+ a.value = te(a.value, i);
878
+ }
879
+ };
880
+ }
881
+ });
882
+ var ot = function() {
883
+ var t = this, n = t._self._c;
884
+ return t._self._setupProxy, n("div", { staticClass: "b-calendar", class: t.conditionalClasses }, t._l(t.numberOfMonths, function(a, o) {
885
+ return n("calendar-month", { key: `calendar-${o}`, ref: t.numberOfMonths === 1 ? "calendarRef" : null, refInFor: !0, attrs: { "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, month: t.calculateOffsetMonth(o), position: t.calendarPosition(o), min: t.min, max: t.max, "is-range": t.isRange, "start-date": t.internalValue.startDate, "end-date": t.internalValue.endDate, granularity: t.granularity }, on: { input: t.onDateInput, mouseover: t.onMouseOver, nextMonth: t.calculateNextMonths, previousMonth: t.calculatePreviousMonths } });
886
+ }), 1);
887
+ }, ut = [], lt = /* @__PURE__ */ ie(
888
+ st,
889
+ ot,
890
+ ut,
891
+ !1,
892
+ null,
893
+ "52692a99",
894
+ null,
895
+ null
896
+ );
897
+ const Et = lt.exports;
898
+ export {
899
+ Et as C,
900
+ A as a,
901
+ H as b,
902
+ J as c,
903
+ q as d,
904
+ ee as e,
905
+ Le as f,
906
+ Z as g,
907
+ $ as h,
908
+ z as i,
909
+ te as j,
910
+ C as s,
911
+ nt as u
912
+ };
913
+ //# sourceMappingURL=calendar.263cfc88.js.map