@adyen/bento-vue3 1.74.0 → 1.76.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 (138) hide show
  1. package/dist/@types/index.d.ts +1660 -614
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/calendar.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid-template.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-picker.css +1 -1
  11. package/dist/assets/date-range-picker.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown-tag.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header-meta.css +1 -1
  17. package/dist/assets/input-field-password.css +1 -1
  18. package/dist/assets/input-field.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/selection-card-group.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/timeline-item.css +1 -1
  24. package/dist/assets/use-cached-selected-values.css +1 -1
  25. package/dist/checkbox.js +2 -2
  26. package/dist/chunks/calendar.Tm7Cvpwu.js +2001 -0
  27. package/dist/chunks/calendar.Tm7Cvpwu.js.map +1 -0
  28. package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.8J29fVna.js} +2 -2
  29. package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.8J29fVna.js.map} +1 -1
  30. package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.CfNYUty6.js} +18 -18
  31. package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.CfNYUty6.js.map} +1 -1
  32. package/dist/chunks/{code-snippet.CO78Nfj0.js → code-snippet.EeIcRV20.js} +2 -2
  33. package/dist/chunks/{code-snippet.CO78Nfj0.js.map → code-snippet.EeIcRV20.js.map} +1 -1
  34. package/dist/chunks/constructNow.CHWWeLPc.js +8 -0
  35. package/dist/chunks/constructNow.CHWWeLPc.js.map +1 -0
  36. package/dist/chunks/{dashboard-section.CVttsom5.js → dashboard-section.Cqi0PWeJ.js} +2 -2
  37. package/dist/chunks/{dashboard-section.CVttsom5.js.map → dashboard-section.Cqi0PWeJ.js.map} +1 -1
  38. package/dist/chunks/{data-grid-template.CFt1NV_4.js → data-grid-template.D7kB3S1u.js} +2 -2
  39. package/dist/chunks/{data-grid-template.CFt1NV_4.js.map → data-grid-template.D7kB3S1u.js.map} +1 -1
  40. package/dist/chunks/data-grid.DJIxBwCa.js +4143 -0
  41. package/dist/chunks/data-grid.DJIxBwCa.js.map +1 -0
  42. package/dist/chunks/{date-picker.DSkvT_CA.js → date-picker.CobmiKaJ.js} +16 -16
  43. package/dist/chunks/date-picker.CobmiKaJ.js.map +1 -0
  44. package/dist/chunks/date-range-picker.B6UKl1_N.js +1114 -0
  45. package/dist/chunks/date-range-picker.B6UKl1_N.js.map +1 -0
  46. package/dist/chunks/{get-date-locale.CAyOIbcp.js → differenceInMonths.C8FyCrav.js} +580 -364
  47. package/dist/chunks/differenceInMonths.C8FyCrav.js.map +1 -0
  48. package/dist/chunks/dropdown-tag.CMjilUQb.js +242 -0
  49. package/dist/chunks/dropdown-tag.CMjilUQb.js.map +1 -0
  50. package/dist/chunks/{dropdown.bLsoTZbw.js → dropdown.DG_EnV8g.js} +18 -18
  51. package/dist/chunks/{dropdown.bLsoTZbw.js.map → dropdown.DG_EnV8g.js.map} +1 -1
  52. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  53. package/dist/chunks/{filter-bar.nX73NKNC.js → filter-bar.dmC284Po.js} +737 -710
  54. package/dist/chunks/filter-bar.dmC284Po.js.map +1 -0
  55. package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
  56. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
  57. package/dist/chunks/{index.BrH1t1iu.js → getTimezoneOffsetInMilliseconds.BW7U6PxE.js} +254 -177
  58. package/dist/chunks/getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map +1 -0
  59. package/dist/chunks/header-meta.BE6QfUNi.js +221 -0
  60. package/dist/chunks/header-meta.BE6QfUNi.js.map +1 -0
  61. package/dist/chunks/{header-with-views.BLW817ZC.js → header-with-views.BZ16v5-m.js} +4 -4
  62. package/dist/chunks/{header-with-views.BLW817ZC.js.map → header-with-views.BZ16v5-m.js.map} +1 -1
  63. package/dist/chunks/{header.DARVAeE9.js → header.3It50Clh.js} +2 -2
  64. package/dist/chunks/{header.DARVAeE9.js.map → header.3It50Clh.js.map} +1 -1
  65. package/dist/chunks/{input-field-password.BtM3-txc.js → input-field-password.BVnZWBAV.js} +185 -167
  66. package/dist/chunks/input-field-password.BVnZWBAV.js.map +1 -0
  67. package/dist/chunks/{input-field-phone-number.oaNB69nM.js → input-field-phone-number.CWhPGQ1U.js} +3 -3
  68. package/dist/chunks/{input-field-phone-number.oaNB69nM.js.map → input-field-phone-number.CWhPGQ1U.js.map} +1 -1
  69. package/dist/chunks/{input-field.D_tADgPG.js → input-field.A-dEZZfC.js} +124 -119
  70. package/dist/chunks/input-field.A-dEZZfC.js.map +1 -0
  71. package/dist/chunks/{pagination.D1Gdo5to.js → pagination.B4qBK4pM.js} +2 -2
  72. package/dist/chunks/{pagination.D1Gdo5to.js.map → pagination.B4qBK4pM.js.map} +1 -1
  73. package/dist/chunks/radio-group.DWNqrkZ3.js.map +1 -1
  74. package/dist/chunks/{rich-text-editor.BK9AivIm.js → rich-text-editor.BA6_k4Vv.js} +354 -352
  75. package/dist/chunks/{rich-text-editor.BK9AivIm.js.map → rich-text-editor.BA6_k4Vv.js.map} +1 -1
  76. package/dist/chunks/{search-bar.BD_R-vgA.js → search-bar.dZ7UCMxb.js} +3 -3
  77. package/dist/chunks/{search-bar.BD_R-vgA.js.map → search-bar.dZ7UCMxb.js.map} +1 -1
  78. package/dist/chunks/{secondary-nav.Du2PL7Ok.js → secondary-nav.CE082cQ_.js} +2 -2
  79. package/dist/chunks/{secondary-nav.Du2PL7Ok.js.map → secondary-nav.CE082cQ_.js.map} +1 -1
  80. package/dist/chunks/selection-card-group.NnTbPQjj.js +412 -0
  81. package/dist/chunks/{selection-card-group._RgLiMyQ.js.map → selection-card-group.NnTbPQjj.js.map} +1 -1
  82. package/dist/chunks/textarea.C1jkfowf.js.map +1 -1
  83. package/dist/chunks/timeline-item.DNjubXL2.js +556 -0
  84. package/dist/chunks/timeline-item.DNjubXL2.js.map +1 -0
  85. package/dist/chunks/{use-cached-selected-values.C32tjNKy.js → use-cached-selected-values.8MdrR9wt.js} +501 -467
  86. package/dist/chunks/use-cached-selected-values.8MdrR9wt.js.map +1 -0
  87. package/dist/code-snippet.js +1 -1
  88. package/dist/dashboard-template.js +1 -1
  89. package/dist/data-grid-template.js +1 -1
  90. package/dist/data-grid.js +1 -1
  91. package/dist/date-picker.js +2 -2
  92. package/dist/date-range-picker.js +2 -2
  93. package/dist/dropdown.js +3 -3
  94. package/dist/filter-bar.js +1 -1
  95. package/dist/header-with-views.js +1 -1
  96. package/dist/header.js +1 -1
  97. package/dist/index.js +24 -24
  98. package/dist/input-field-password.js +1 -1
  99. package/dist/input-field-phone-number.js +1 -1
  100. package/dist/input-field.js +1 -1
  101. package/dist/internal.js +3 -3
  102. package/dist/pagination.js +1 -1
  103. package/dist/rich-text-editor.js +1 -1
  104. package/dist/search-bar.js +2 -2
  105. package/dist/secondary-nav.js +1 -1
  106. package/dist/selection-card.js +1 -1
  107. package/dist/styles/bento-dark.css +7 -5
  108. package/dist/styles/bento-light.css +7 -5
  109. package/dist/styles/bento.css +7 -5
  110. package/dist/styles/legacy.css +7 -5
  111. package/dist/styles/styleguide.css +7 -5
  112. package/dist/timeline.js +1 -1
  113. package/dist/web-types.json +1 -1
  114. package/package.json +8 -23
  115. package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
  116. package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
  117. package/dist/chunks/calendar.Cqjyxc69.js +0 -2223
  118. package/dist/chunks/calendar.Cqjyxc69.js.map +0 -1
  119. package/dist/chunks/data-grid.BjPdbx50.js +0 -4071
  120. package/dist/chunks/data-grid.BjPdbx50.js.map +0 -1
  121. package/dist/chunks/date-picker.DSkvT_CA.js.map +0 -1
  122. package/dist/chunks/date-range-picker.cmg75lC-.js +0 -1117
  123. package/dist/chunks/date-range-picker.cmg75lC-.js.map +0 -1
  124. package/dist/chunks/dropdown-tag.DvQQIJsw.js +0 -308
  125. package/dist/chunks/dropdown-tag.DvQQIJsw.js.map +0 -1
  126. package/dist/chunks/filter-bar.nX73NKNC.js.map +0 -1
  127. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +0 -1
  128. package/dist/chunks/header-meta.C4iaUsfq.js +0 -236
  129. package/dist/chunks/header-meta.C4iaUsfq.js.map +0 -1
  130. package/dist/chunks/index.BrH1t1iu.js.map +0 -1
  131. package/dist/chunks/index.BxBB1rsx.js +0 -15
  132. package/dist/chunks/index.BxBB1rsx.js.map +0 -1
  133. package/dist/chunks/input-field-password.BtM3-txc.js.map +0 -1
  134. package/dist/chunks/input-field.D_tADgPG.js.map +0 -1
  135. package/dist/chunks/selection-card-group._RgLiMyQ.js +0 -474
  136. package/dist/chunks/timeline-item.C8PA_w7m.js +0 -568
  137. package/dist/chunks/timeline-item.C8PA_w7m.js.map +0 -1
  138. package/dist/chunks/use-cached-selected-values.C32tjNKy.js.map +0 -1
@@ -0,0 +1,2001 @@
1
+ import { defineComponent as we, computed as _, resolveComponent as ce, createElementBlock as L, openBlock as T, withKeys as le, normalizeClass as Ce, createElementVNode as A, createVNode as X, ref as ee, watch as he, nextTick as gt, toRef as U, resolveDirective as wt, withDirectives as Ze, mergeProps as ze, toHandlers as pe, createBlock as se, createCommentVNode as de, withCtx as te, createTextVNode as Pe, toDisplayString as Le, Fragment as ne, renderList as ae, unref as R, reactive as et, resolveDynamicComponent as bt } from "vue";
2
+ import { B as $e } from "./button.DhcxX2GJ.js";
3
+ import { B as tt } from "./typography.yBEME_Gu.js";
4
+ import { u as nt } from "./index.pdBj0KQU.js";
5
+ import { d as Be, g as Ot, a as Ie } from "./differenceInMonths.C8FyCrav.js";
6
+ import { g as at } from "./generate-uid.NJ8tVoha.js";
7
+ import { a as rt } from "./keyboard-navigation.pB8weElW.js";
8
+ import { a as Mt } from "./index.E60QniEu.js";
9
+ import { b as me, t as E, c as G, n as Se, g as xe, o as Et, p as st, e as Nt } from "./getTimezoneOffsetInMilliseconds.BW7U6PxE.js";
10
+ import { a as ot, C as ut } from "./chevron-left.Cfn1uGLH.js";
11
+ import { B as it, a as ct } from "./date.DZvVL-uz.js";
12
+ import { _ as be } from "./_plugin-vue_export-helper.CHgC5LLL.js";
13
+ import "../assets/calendar.css";
14
+ var x = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(x || {}), Q = /* @__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))(Q || {}), ve = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(ve || {});
15
+ const kt = {
16
+ /**
17
+ * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
18
+ */
19
+ day: { type: Date, required: !0 },
20
+ /**
21
+ * Indicate if a date should be disabled or not
22
+ */
23
+ disabled: { type: Boolean, default: !1 },
24
+ /**
25
+ * Changes the state of the calendar day to selected.
26
+ */
27
+ selected: { type: Boolean, default: !1 },
28
+ /**
29
+ * When the day is selected, this indicates if the selection is a single date or part of a range.
30
+ * If it's a range it can be at the beginning, middle or end of the selection.
31
+ */
32
+ variant: {
33
+ type: String,
34
+ default: x.SINGLE,
35
+ validator: (e) => Object.values(x).includes(e)
36
+ }
37
+ }, Tt = we({
38
+ name: "calendar-month-day",
39
+ components: { BentoDate: it },
40
+ inheritAttrs: !0,
41
+ props: kt,
42
+ emits: [ve.CLICK, ve.MOUSE_OVER],
43
+ setup(e, { emit: t }) {
44
+ const n = _(() => {
45
+ const s = /* @__PURE__ */ new Date();
46
+ return e.day.getDate() === s.getDate() && e.day.getMonth() === s.getMonth() && e.day.getFullYear() === s.getFullYear();
47
+ });
48
+ return {
49
+ // Values
50
+ conditionalClasses: _(() => ({
51
+ // Variants
52
+ [`b-calendar-month-day--${Q.BEGINNING}`]: e.variant === x.BEGINNING,
53
+ [`b-calendar-month-day--${Q.MIDDLE}`]: e.variant === x.MIDDLE,
54
+ [`b-calendar-month-day--${Q.END}`]: e.variant === x.END,
55
+ [`b-calendar-month-day--${Q.SINGLE}`]: e.variant === x.SINGLE,
56
+ // Selected
57
+ [`b-calendar-month-day--${Q.UNSELECTED}`]: !e.selected,
58
+ [`b-calendar-month-day--${Q.SELECTED}`]: e.selected,
59
+ // Current Day
60
+ [`b-calendar-month-day--${Q.CURRENT_DAY}`]: n.value,
61
+ // Disabled
62
+ [`b-calendar-month-day--${Q.DISABLED}`]: e.disabled
63
+ })),
64
+ isCurrentDay: n,
65
+ // Enums
66
+ BentoDateFormat: ct,
67
+ CalendarMonthDayEvent: ve,
68
+ // Events
69
+ onClick: (s, u) => {
70
+ e.disabled ? (s.preventDefault(), s.stopPropagation()) : t(ve.CLICK, u, e.day);
71
+ }
72
+ };
73
+ }
74
+ }), St = ["tabindex", "aria-selected", "aria-disabled", "aria-current", "data-date"], It = { class: "b-calendar-month-day__wrapper" };
75
+ function _t(e, t, n, a, r, s) {
76
+ const u = ce("bento-date");
77
+ return T(), L("td", {
78
+ class: Ce(["b-calendar-month-day", e.conditionalClasses]),
79
+ tabindex: e.selected ? "0" : "-1",
80
+ "aria-selected": e.selected ? e.selected : void 0,
81
+ "aria-disabled": e.disabled,
82
+ "aria-current": e.isCurrentDay ? "date" : void 0,
83
+ "data-date": e.day.toDateString(),
84
+ onClick: t[0] || (t[0] = (i) => e.onClick(i, e.day)),
85
+ onMouseover: t[1] || (t[1] = (i) => e.$emit(e.CalendarMonthDayEvent.MOUSE_OVER)),
86
+ onKeydown: t[2] || (t[2] = le((i) => e.onClick(i, e.day), ["space", "enter"]))
87
+ }, [
88
+ A("div", It, [
89
+ X(u, {
90
+ class: "b-calendar-month-day__label",
91
+ date: e.day,
92
+ format: e.BentoDateFormat.DAY_OF_MONTH
93
+ }, null, 8, ["date", "format"])
94
+ ])
95
+ ], 42, St);
96
+ }
97
+ const Yt = /* @__PURE__ */ be(Tt, [["render", _t], ["__scopeId", "data-v-05fbfae7"]]);
98
+ function K(e, t) {
99
+ var i, d, w, m;
100
+ const n = me(), a = (t == null ? void 0 : t.weekStartsOn) ?? ((d = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : d.weekStartsOn) ?? n.weekStartsOn ?? ((m = (w = n.locale) == null ? void 0 : w.options) == null ? void 0 : m.weekStartsOn) ?? 0, r = E(e, t == null ? void 0 : t.in), s = r.getDay(), u = (s < a ? 7 : 0) + s - a;
101
+ return r.setDate(r.getDate() - u), r.setHours(0, 0, 0, 0), r;
102
+ }
103
+ var B = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.CHANGE_DAY = "changeDay", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(B || {}), re = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(re || {}), fe = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(fe || {}), Z = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))(Z || {}), Fe = /* @__PURE__ */ ((e) => (e.DAY = "day", e.MONTH = "month", e))(Fe || {});
104
+ function ge(e, t, n) {
105
+ const a = E(e, n == null ? void 0 : n.in);
106
+ return isNaN(t) ? G(e, NaN) : (t && a.setDate(a.getDate() + t), a);
107
+ }
108
+ function oe(e, t, n) {
109
+ const a = E(e, n == null ? void 0 : n.in);
110
+ if (isNaN(t)) return G(e, NaN);
111
+ if (!t)
112
+ return a;
113
+ const r = a.getDate(), s = G(e, a.getTime());
114
+ s.setMonth(a.getMonth() + t + 1, 0);
115
+ const u = s.getDate();
116
+ return r >= u ? s : (a.setFullYear(
117
+ s.getFullYear(),
118
+ s.getMonth(),
119
+ r
120
+ ), a);
121
+ }
122
+ function Ee(e, t) {
123
+ var i, d, w, m;
124
+ const n = me(), a = (t == null ? void 0 : t.weekStartsOn) ?? ((d = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : d.weekStartsOn) ?? n.weekStartsOn ?? ((m = (w = n.locale) == null ? void 0 : w.options) == null ? void 0 : m.weekStartsOn) ?? 0, r = E(e, t == null ? void 0 : t.in), s = r.getDay(), u = (s < a ? -7 : 0) + 6 - (s - a);
125
+ return r.setDate(r.getDate() + u), r.setHours(23, 59, 59, 999), r;
126
+ }
127
+ function Pt(e, t) {
128
+ const n = E(e, t == null ? void 0 : t.in), a = n.getFullYear(), r = n.getMonth(), s = G(n, 0);
129
+ return s.setFullYear(a, r + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
130
+ }
131
+ function Lt(e, t, n) {
132
+ const a = E(e, n == null ? void 0 : n.in), r = a.getFullYear(), s = a.getDate(), u = G(e, 0);
133
+ u.setFullYear(r, t, 15), u.setHours(0, 0, 0, 0);
134
+ const i = Pt(u);
135
+ return a.setMonth(t, Math.min(s, i)), a;
136
+ }
137
+ function $t(e, t, n) {
138
+ let a = E(e, n == null ? void 0 : n.in);
139
+ return isNaN(+a) ? G(e, NaN) : (t.year != null && a.setFullYear(t.year), t.month != null && (a = Lt(a, t.month)), t.date != null && a.setDate(t.date), t.hours != null && a.setHours(t.hours), t.minutes != null && a.setMinutes(t.minutes), t.seconds != null && a.setSeconds(t.seconds), t.milliseconds != null && a.setMilliseconds(t.milliseconds), a);
140
+ }
141
+ function Re(e, t) {
142
+ const n = E(e, t == null ? void 0 : t.in);
143
+ return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
144
+ }
145
+ function Ae(e, t, n) {
146
+ return ge(e, -t, n);
147
+ }
148
+ function ye(e, t, n) {
149
+ return oe(e, -t, n);
150
+ }
151
+ const lt = ({ currentSelectedDate: e, month: t, isDateDisabled: n, firstDayOfWeek: a }, r) => {
152
+ const s = ee(new Date(t.value));
153
+ he(
154
+ t,
155
+ () => {
156
+ s.value = t.value;
157
+ },
158
+ { immediate: !0 }
159
+ );
160
+ const u = ee(new Date(e.value));
161
+ he(e, () => {
162
+ u.value = new Date(e.value);
163
+ });
164
+ const i = Mt(), d = ee(u.value);
165
+ he(i, (l) => {
166
+ const M = l.getAttribute("data-date");
167
+ d.value = M ? new Date(M) : u.value;
168
+ });
169
+ const w = ee({}), m = (l) => (M) => {
170
+ w.value[l.toDateString()] = M;
171
+ }, y = () => {
172
+ w.value = {};
173
+ }, D = (l = 1) => {
174
+ s.value = oe(s.value, l), r(B.NEXT_MONTH, l), y();
175
+ }, f = (l = 1) => {
176
+ s.value = ye(s.value, l), r(B.PREVIOUS_MONTH, l), y();
177
+ }, o = (l, M) => {
178
+ const P = !!w.value[l == null ? void 0 : l.toDateString()];
179
+ return !l || !P ? null : M ? w.value[l.toDateString()].$el : (w.value[l.toDateString()].$el.focus(), null);
180
+ }, c = (l) => {
181
+ l.preventDefault(), l.stopImmediatePropagation(), l.stopPropagation();
182
+ }, v = ({ nextDate: l, isIncreasingDays: M, amountOfMonths: P, isCalendarButtonsNav: j }) => {
183
+ if (!j && n && n(l))
184
+ return;
185
+ l.getMonth() === u.value.getMonth() && l.getFullYear() === u.value.getFullYear() ? (u.value = l, o(l)) : (M ? D(P) : f(P), gt(() => {
186
+ const N = l.getMonth() === s.value.getMonth() && l.getFullYear() === s.value.getFullYear();
187
+ n && n(l) || !N || j || (u.value = l, o(l));
188
+ }));
189
+ };
190
+ return {
191
+ // Calendar days ref
192
+ calendarRef: w,
193
+ addDayRef: m,
194
+ /**
195
+ * Month navigation
196
+ */
197
+ showNextMonth: D,
198
+ showPreviousMonth: f,
199
+ /**
200
+ * Focus method
201
+ */
202
+ focusOnDate: o,
203
+ /**
204
+ * Day navigation
205
+ */
206
+ // ArrowRight
207
+ moveToNextDay: (l) => {
208
+ c(l), v({ nextDate: ge(d.value, 1), isIncreasingDays: !0 });
209
+ },
210
+ // ArrowLeft
211
+ moveToPreviousDay: (l) => {
212
+ c(l), v({ nextDate: Ae(d.value, 1), isIncreasingDays: !1 });
213
+ },
214
+ // ArrowUp
215
+ moveToPreviousWeek: (l) => {
216
+ c(l), v({ nextDate: Ae(d.value, 7), isIncreasingDays: !1 });
217
+ },
218
+ // ArrowDown
219
+ moveToNextWeek: (l) => {
220
+ c(l), v({ nextDate: ge(d.value, 7), isIncreasingDays: !0 });
221
+ },
222
+ // Home
223
+ moveToFirstDayOfWeek: (l) => {
224
+ c(l), v({
225
+ nextDate: K(d.value, { weekStartsOn: a }),
226
+ isIncreasingDays: !1
227
+ });
228
+ },
229
+ moveToFirstMonthOfYear: (l) => {
230
+ c(l);
231
+ const M = Be(u.value, Re(u.value));
232
+ v({
233
+ nextDate: Re(u.value),
234
+ isIncreasingDays: !1,
235
+ amountOfMonths: M
236
+ });
237
+ },
238
+ // End
239
+ moveToLastDayOfWeek: (l) => {
240
+ c(l), v({
241
+ nextDate: Ee(d.value, { weekStartsOn: a }),
242
+ isIncreasingDays: !0
243
+ });
244
+ },
245
+ moveToLastMonthOfYear: (l) => {
246
+ c(l);
247
+ const M = $t(u.value, { month: 11, date: 1 }), P = Be(M, u.value);
248
+ v({
249
+ nextDate: M,
250
+ isIncreasingDays: !0,
251
+ amountOfMonths: P
252
+ });
253
+ },
254
+ // PageUp
255
+ moveToPreviousMonth: (l, M = !1, P = 1) => {
256
+ c(l);
257
+ const j = P;
258
+ v({
259
+ nextDate: ye(d.value, j),
260
+ isIncreasingDays: !1,
261
+ amountOfMonths: j,
262
+ isCalendarButtonsNav: M
263
+ });
264
+ },
265
+ // Shift+PageUp
266
+ moveToPreviousYear: (l, M = !1) => {
267
+ c(l);
268
+ const P = 12;
269
+ v({
270
+ nextDate: ye(d.value, P),
271
+ isIncreasingDays: !1,
272
+ amountOfMonths: P,
273
+ isCalendarButtonsNav: M
274
+ });
275
+ },
276
+ // PageDown
277
+ moveToNextMonth: (l, M = !1, P = 1) => {
278
+ c(l);
279
+ const j = P;
280
+ v({
281
+ nextDate: oe(d.value, j),
282
+ isIncreasingDays: !0,
283
+ amountOfMonths: j,
284
+ isCalendarButtonsNav: M
285
+ });
286
+ },
287
+ // Shift-PageDown
288
+ moveToNextYear: (l, M = !1) => {
289
+ c(l);
290
+ const P = 12;
291
+ v({
292
+ nextDate: oe(d.value, P),
293
+ isIncreasingDays: !0,
294
+ amountOfMonths: P,
295
+ isCalendarButtonsNav: M
296
+ });
297
+ },
298
+ // Values
299
+ internalDate: u,
300
+ baseDate: s
301
+ };
302
+ };
303
+ function Ft(e, t, n) {
304
+ var y, D;
305
+ const a = me(), r = a.weekStartsOn ?? ((D = (y = a.locale) == null ? void 0 : y.options) == null ? void 0 : D.weekStartsOn) ?? 0, s = E(e, n == null ? void 0 : n.in), u = s.getDay(), d = (t % 7 + 7) % 7, w = 7 - r, m = t < 0 || t > 6 ? t - (u + w) % 7 : (d + w) % 7 - (u + w) % 7;
306
+ return ge(s, m, n);
307
+ }
308
+ function Ne(e, t) {
309
+ const n = E(e, t == null ? void 0 : t.in);
310
+ return n.setDate(1), n.setHours(0, 0, 0, 0), n;
311
+ }
312
+ function ue(e, t) {
313
+ const n = E(e, t == null ? void 0 : t.in);
314
+ return n.setHours(0, 0, 0, 0), n;
315
+ }
316
+ function dt(e, t, n) {
317
+ const [a, r] = Se(
318
+ n == null ? void 0 : n.in,
319
+ e,
320
+ t
321
+ ), s = ue(a), u = ue(r), i = +s - xe(s), d = +u - xe(u);
322
+ return Math.round((i - d) / Et);
323
+ }
324
+ function Rt(e, t) {
325
+ const n = E(e, t == null ? void 0 : t.in);
326
+ return dt(n, Re(n)) + 1;
327
+ }
328
+ function ke(e, t) {
329
+ return K(e, { ...t, weekStartsOn: 1 });
330
+ }
331
+ function ft(e, t) {
332
+ const n = E(e, t == null ? void 0 : t.in), a = n.getFullYear(), r = G(n, 0);
333
+ r.setFullYear(a + 1, 0, 4), r.setHours(0, 0, 0, 0);
334
+ const s = ke(r), u = G(n, 0);
335
+ u.setFullYear(a, 0, 4), u.setHours(0, 0, 0, 0);
336
+ const i = ke(u);
337
+ return n.getTime() >= s.getTime() ? a + 1 : n.getTime() >= i.getTime() ? a : a - 1;
338
+ }
339
+ function At(e, t) {
340
+ const n = ft(e, t), a = G(e, 0);
341
+ return a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0), ke(a);
342
+ }
343
+ function Wt(e, t) {
344
+ const n = E(e, t == null ? void 0 : t.in), a = +ke(n) - +At(n);
345
+ return Math.round(a / st) + 1;
346
+ }
347
+ function ht(e, t) {
348
+ var m, y, D, f;
349
+ const n = E(e, t == null ? void 0 : t.in), a = n.getFullYear(), r = me(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (m = t == null ? void 0 : t.locale) == null ? void 0 : m.options) == null ? void 0 : y.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((f = (D = r.locale) == null ? void 0 : D.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, u = G((t == null ? void 0 : t.in) || e, 0);
350
+ u.setFullYear(a + 1, 0, s), u.setHours(0, 0, 0, 0);
351
+ const i = K(u, t), d = G((t == null ? void 0 : t.in) || e, 0);
352
+ d.setFullYear(a, 0, s), d.setHours(0, 0, 0, 0);
353
+ const w = K(d, t);
354
+ return +n >= +i ? a + 1 : +n >= +w ? a : a - 1;
355
+ }
356
+ function Ct(e, t) {
357
+ var i, d, w, m;
358
+ const n = me(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : d.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((m = (w = n.locale) == null ? void 0 : w.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, r = ht(e, t), s = G((t == null ? void 0 : t.in) || e, 0);
359
+ return s.setFullYear(r, 0, a), s.setHours(0, 0, 0, 0), K(s, t);
360
+ }
361
+ function Gt(e, t) {
362
+ const n = E(e, t == null ? void 0 : t.in), a = +K(n, t) - +Ct(n, t);
363
+ return Math.round(a / st) + 1;
364
+ }
365
+ function O(e, t) {
366
+ const n = e < 0 ? "-" : "", a = Math.abs(e).toString().padStart(t, "0");
367
+ return n + a;
368
+ }
369
+ const J = {
370
+ // Year
371
+ y(e, t) {
372
+ const n = e.getFullYear(), a = n > 0 ? n : 1 - n;
373
+ return O(t === "yy" ? a % 100 : a, t.length);
374
+ },
375
+ // Month
376
+ M(e, t) {
377
+ const n = e.getMonth();
378
+ return t === "M" ? String(n + 1) : O(n + 1, 2);
379
+ },
380
+ // Day of the month
381
+ d(e, t) {
382
+ return O(e.getDate(), t.length);
383
+ },
384
+ // AM or PM
385
+ a(e, t) {
386
+ const n = e.getHours() / 12 >= 1 ? "pm" : "am";
387
+ switch (t) {
388
+ case "a":
389
+ case "aa":
390
+ return n.toUpperCase();
391
+ case "aaa":
392
+ return n;
393
+ case "aaaaa":
394
+ return n[0];
395
+ case "aaaa":
396
+ default:
397
+ return n === "am" ? "a.m." : "p.m.";
398
+ }
399
+ },
400
+ // Hour [1-12]
401
+ h(e, t) {
402
+ return O(e.getHours() % 12 || 12, t.length);
403
+ },
404
+ // Hour [0-23]
405
+ H(e, t) {
406
+ return O(e.getHours(), t.length);
407
+ },
408
+ // Minute
409
+ m(e, t) {
410
+ return O(e.getMinutes(), t.length);
411
+ },
412
+ // Second
413
+ s(e, t) {
414
+ return O(e.getSeconds(), t.length);
415
+ },
416
+ // Fraction of second
417
+ S(e, t) {
418
+ const n = t.length, a = e.getMilliseconds(), r = Math.trunc(
419
+ a * Math.pow(10, n - 3)
420
+ );
421
+ return O(r, t.length);
422
+ }
423
+ }, ie = {
424
+ midnight: "midnight",
425
+ noon: "noon",
426
+ morning: "morning",
427
+ afternoon: "afternoon",
428
+ evening: "evening",
429
+ night: "night"
430
+ }, He = {
431
+ // Era
432
+ G: function(e, t, n) {
433
+ const a = e.getFullYear() > 0 ? 1 : 0;
434
+ switch (t) {
435
+ // AD, BC
436
+ case "G":
437
+ case "GG":
438
+ case "GGG":
439
+ return n.era(a, { width: "abbreviated" });
440
+ // A, B
441
+ case "GGGGG":
442
+ return n.era(a, { width: "narrow" });
443
+ // Anno Domini, Before Christ
444
+ case "GGGG":
445
+ default:
446
+ return n.era(a, { width: "wide" });
447
+ }
448
+ },
449
+ // Year
450
+ y: function(e, t, n) {
451
+ if (t === "yo") {
452
+ const a = e.getFullYear(), r = a > 0 ? a : 1 - a;
453
+ return n.ordinalNumber(r, { unit: "year" });
454
+ }
455
+ return J.y(e, t);
456
+ },
457
+ // Local week-numbering year
458
+ Y: function(e, t, n, a) {
459
+ const r = ht(e, a), s = r > 0 ? r : 1 - r;
460
+ if (t === "YY") {
461
+ const u = s % 100;
462
+ return O(u, 2);
463
+ }
464
+ return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : O(s, t.length);
465
+ },
466
+ // ISO week-numbering year
467
+ R: function(e, t) {
468
+ const n = ft(e);
469
+ return O(n, t.length);
470
+ },
471
+ // Extended year. This is a single number designating the year of this calendar system.
472
+ // The main difference between `y` and `u` localizers are B.C. years:
473
+ // | Year | `y` | `u` |
474
+ // |------|-----|-----|
475
+ // | AC 1 | 1 | 1 |
476
+ // | BC 1 | 1 | 0 |
477
+ // | BC 2 | 2 | -1 |
478
+ // Also `yy` always returns the last two digits of a year,
479
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
480
+ u: function(e, t) {
481
+ const n = e.getFullYear();
482
+ return O(n, t.length);
483
+ },
484
+ // Quarter
485
+ Q: function(e, t, n) {
486
+ const a = Math.ceil((e.getMonth() + 1) / 3);
487
+ switch (t) {
488
+ // 1, 2, 3, 4
489
+ case "Q":
490
+ return String(a);
491
+ // 01, 02, 03, 04
492
+ case "QQ":
493
+ return O(a, 2);
494
+ // 1st, 2nd, 3rd, 4th
495
+ case "Qo":
496
+ return n.ordinalNumber(a, { unit: "quarter" });
497
+ // Q1, Q2, Q3, Q4
498
+ case "QQQ":
499
+ return n.quarter(a, {
500
+ width: "abbreviated",
501
+ context: "formatting"
502
+ });
503
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
504
+ case "QQQQQ":
505
+ return n.quarter(a, {
506
+ width: "narrow",
507
+ context: "formatting"
508
+ });
509
+ // 1st quarter, 2nd quarter, ...
510
+ case "QQQQ":
511
+ default:
512
+ return n.quarter(a, {
513
+ width: "wide",
514
+ context: "formatting"
515
+ });
516
+ }
517
+ },
518
+ // Stand-alone quarter
519
+ q: function(e, t, n) {
520
+ const a = Math.ceil((e.getMonth() + 1) / 3);
521
+ switch (t) {
522
+ // 1, 2, 3, 4
523
+ case "q":
524
+ return String(a);
525
+ // 01, 02, 03, 04
526
+ case "qq":
527
+ return O(a, 2);
528
+ // 1st, 2nd, 3rd, 4th
529
+ case "qo":
530
+ return n.ordinalNumber(a, { unit: "quarter" });
531
+ // Q1, Q2, Q3, Q4
532
+ case "qqq":
533
+ return n.quarter(a, {
534
+ width: "abbreviated",
535
+ context: "standalone"
536
+ });
537
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
538
+ case "qqqqq":
539
+ return n.quarter(a, {
540
+ width: "narrow",
541
+ context: "standalone"
542
+ });
543
+ // 1st quarter, 2nd quarter, ...
544
+ case "qqqq":
545
+ default:
546
+ return n.quarter(a, {
547
+ width: "wide",
548
+ context: "standalone"
549
+ });
550
+ }
551
+ },
552
+ // Month
553
+ M: function(e, t, n) {
554
+ const a = e.getMonth();
555
+ switch (t) {
556
+ case "M":
557
+ case "MM":
558
+ return J.M(e, t);
559
+ // 1st, 2nd, ..., 12th
560
+ case "Mo":
561
+ return n.ordinalNumber(a + 1, { unit: "month" });
562
+ // Jan, Feb, ..., Dec
563
+ case "MMM":
564
+ return n.month(a, {
565
+ width: "abbreviated",
566
+ context: "formatting"
567
+ });
568
+ // J, F, ..., D
569
+ case "MMMMM":
570
+ return n.month(a, {
571
+ width: "narrow",
572
+ context: "formatting"
573
+ });
574
+ // January, February, ..., December
575
+ case "MMMM":
576
+ default:
577
+ return n.month(a, { width: "wide", context: "formatting" });
578
+ }
579
+ },
580
+ // Stand-alone month
581
+ L: function(e, t, n) {
582
+ const a = e.getMonth();
583
+ switch (t) {
584
+ // 1, 2, ..., 12
585
+ case "L":
586
+ return String(a + 1);
587
+ // 01, 02, ..., 12
588
+ case "LL":
589
+ return O(a + 1, 2);
590
+ // 1st, 2nd, ..., 12th
591
+ case "Lo":
592
+ return n.ordinalNumber(a + 1, { unit: "month" });
593
+ // Jan, Feb, ..., Dec
594
+ case "LLL":
595
+ return n.month(a, {
596
+ width: "abbreviated",
597
+ context: "standalone"
598
+ });
599
+ // J, F, ..., D
600
+ case "LLLLL":
601
+ return n.month(a, {
602
+ width: "narrow",
603
+ context: "standalone"
604
+ });
605
+ // January, February, ..., December
606
+ case "LLLL":
607
+ default:
608
+ return n.month(a, { width: "wide", context: "standalone" });
609
+ }
610
+ },
611
+ // Local week of year
612
+ w: function(e, t, n, a) {
613
+ const r = Gt(e, a);
614
+ return t === "wo" ? n.ordinalNumber(r, { unit: "week" }) : O(r, t.length);
615
+ },
616
+ // ISO week of year
617
+ I: function(e, t, n) {
618
+ const a = Wt(e);
619
+ return t === "Io" ? n.ordinalNumber(a, { unit: "week" }) : O(a, t.length);
620
+ },
621
+ // Day of the month
622
+ d: function(e, t, n) {
623
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : J.d(e, t);
624
+ },
625
+ // Day of year
626
+ D: function(e, t, n) {
627
+ const a = Rt(e);
628
+ return t === "Do" ? n.ordinalNumber(a, { unit: "dayOfYear" }) : O(a, t.length);
629
+ },
630
+ // Day of week
631
+ E: function(e, t, n) {
632
+ const a = e.getDay();
633
+ switch (t) {
634
+ // Tue
635
+ case "E":
636
+ case "EE":
637
+ case "EEE":
638
+ return n.day(a, {
639
+ width: "abbreviated",
640
+ context: "formatting"
641
+ });
642
+ // T
643
+ case "EEEEE":
644
+ return n.day(a, {
645
+ width: "narrow",
646
+ context: "formatting"
647
+ });
648
+ // Tu
649
+ case "EEEEEE":
650
+ return n.day(a, {
651
+ width: "short",
652
+ context: "formatting"
653
+ });
654
+ // Tuesday
655
+ case "EEEE":
656
+ default:
657
+ return n.day(a, {
658
+ width: "wide",
659
+ context: "formatting"
660
+ });
661
+ }
662
+ },
663
+ // Local day of week
664
+ e: function(e, t, n, a) {
665
+ const r = e.getDay(), s = (r - a.weekStartsOn + 8) % 7 || 7;
666
+ switch (t) {
667
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
668
+ case "e":
669
+ return String(s);
670
+ // Padded numerical value
671
+ case "ee":
672
+ return O(s, 2);
673
+ // 1st, 2nd, ..., 7th
674
+ case "eo":
675
+ return n.ordinalNumber(s, { unit: "day" });
676
+ case "eee":
677
+ return n.day(r, {
678
+ width: "abbreviated",
679
+ context: "formatting"
680
+ });
681
+ // T
682
+ case "eeeee":
683
+ return n.day(r, {
684
+ width: "narrow",
685
+ context: "formatting"
686
+ });
687
+ // Tu
688
+ case "eeeeee":
689
+ return n.day(r, {
690
+ width: "short",
691
+ context: "formatting"
692
+ });
693
+ // Tuesday
694
+ case "eeee":
695
+ default:
696
+ return n.day(r, {
697
+ width: "wide",
698
+ context: "formatting"
699
+ });
700
+ }
701
+ },
702
+ // Stand-alone local day of week
703
+ c: function(e, t, n, a) {
704
+ const r = e.getDay(), s = (r - a.weekStartsOn + 8) % 7 || 7;
705
+ switch (t) {
706
+ // Numerical value (same as in `e`)
707
+ case "c":
708
+ return String(s);
709
+ // Padded numerical value
710
+ case "cc":
711
+ return O(s, t.length);
712
+ // 1st, 2nd, ..., 7th
713
+ case "co":
714
+ return n.ordinalNumber(s, { unit: "day" });
715
+ case "ccc":
716
+ return n.day(r, {
717
+ width: "abbreviated",
718
+ context: "standalone"
719
+ });
720
+ // T
721
+ case "ccccc":
722
+ return n.day(r, {
723
+ width: "narrow",
724
+ context: "standalone"
725
+ });
726
+ // Tu
727
+ case "cccccc":
728
+ return n.day(r, {
729
+ width: "short",
730
+ context: "standalone"
731
+ });
732
+ // Tuesday
733
+ case "cccc":
734
+ default:
735
+ return n.day(r, {
736
+ width: "wide",
737
+ context: "standalone"
738
+ });
739
+ }
740
+ },
741
+ // ISO day of week
742
+ i: function(e, t, n) {
743
+ const a = e.getDay(), r = a === 0 ? 7 : a;
744
+ switch (t) {
745
+ // 2
746
+ case "i":
747
+ return String(r);
748
+ // 02
749
+ case "ii":
750
+ return O(r, t.length);
751
+ // 2nd
752
+ case "io":
753
+ return n.ordinalNumber(r, { unit: "day" });
754
+ // Tue
755
+ case "iii":
756
+ return n.day(a, {
757
+ width: "abbreviated",
758
+ context: "formatting"
759
+ });
760
+ // T
761
+ case "iiiii":
762
+ return n.day(a, {
763
+ width: "narrow",
764
+ context: "formatting"
765
+ });
766
+ // Tu
767
+ case "iiiiii":
768
+ return n.day(a, {
769
+ width: "short",
770
+ context: "formatting"
771
+ });
772
+ // Tuesday
773
+ case "iiii":
774
+ default:
775
+ return n.day(a, {
776
+ width: "wide",
777
+ context: "formatting"
778
+ });
779
+ }
780
+ },
781
+ // AM or PM
782
+ a: function(e, t, n) {
783
+ const r = e.getHours() / 12 >= 1 ? "pm" : "am";
784
+ switch (t) {
785
+ case "a":
786
+ case "aa":
787
+ return n.dayPeriod(r, {
788
+ width: "abbreviated",
789
+ context: "formatting"
790
+ });
791
+ case "aaa":
792
+ return n.dayPeriod(r, {
793
+ width: "abbreviated",
794
+ context: "formatting"
795
+ }).toLowerCase();
796
+ case "aaaaa":
797
+ return n.dayPeriod(r, {
798
+ width: "narrow",
799
+ context: "formatting"
800
+ });
801
+ case "aaaa":
802
+ default:
803
+ return n.dayPeriod(r, {
804
+ width: "wide",
805
+ context: "formatting"
806
+ });
807
+ }
808
+ },
809
+ // AM, PM, midnight, noon
810
+ b: function(e, t, n) {
811
+ const a = e.getHours();
812
+ let r;
813
+ switch (a === 12 ? r = ie.noon : a === 0 ? r = ie.midnight : r = a / 12 >= 1 ? "pm" : "am", t) {
814
+ case "b":
815
+ case "bb":
816
+ return n.dayPeriod(r, {
817
+ width: "abbreviated",
818
+ context: "formatting"
819
+ });
820
+ case "bbb":
821
+ return n.dayPeriod(r, {
822
+ width: "abbreviated",
823
+ context: "formatting"
824
+ }).toLowerCase();
825
+ case "bbbbb":
826
+ return n.dayPeriod(r, {
827
+ width: "narrow",
828
+ context: "formatting"
829
+ });
830
+ case "bbbb":
831
+ default:
832
+ return n.dayPeriod(r, {
833
+ width: "wide",
834
+ context: "formatting"
835
+ });
836
+ }
837
+ },
838
+ // in the morning, in the afternoon, in the evening, at night
839
+ B: function(e, t, n) {
840
+ const a = e.getHours();
841
+ let r;
842
+ switch (a >= 17 ? r = ie.evening : a >= 12 ? r = ie.afternoon : a >= 4 ? r = ie.morning : r = ie.night, t) {
843
+ case "B":
844
+ case "BB":
845
+ case "BBB":
846
+ return n.dayPeriod(r, {
847
+ width: "abbreviated",
848
+ context: "formatting"
849
+ });
850
+ case "BBBBB":
851
+ return n.dayPeriod(r, {
852
+ width: "narrow",
853
+ context: "formatting"
854
+ });
855
+ case "BBBB":
856
+ default:
857
+ return n.dayPeriod(r, {
858
+ width: "wide",
859
+ context: "formatting"
860
+ });
861
+ }
862
+ },
863
+ // Hour [1-12]
864
+ h: function(e, t, n) {
865
+ if (t === "ho") {
866
+ let a = e.getHours() % 12;
867
+ return a === 0 && (a = 12), n.ordinalNumber(a, { unit: "hour" });
868
+ }
869
+ return J.h(e, t);
870
+ },
871
+ // Hour [0-23]
872
+ H: function(e, t, n) {
873
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : J.H(e, t);
874
+ },
875
+ // Hour [0-11]
876
+ K: function(e, t, n) {
877
+ const a = e.getHours() % 12;
878
+ return t === "Ko" ? n.ordinalNumber(a, { unit: "hour" }) : O(a, t.length);
879
+ },
880
+ // Hour [1-24]
881
+ k: function(e, t, n) {
882
+ let a = e.getHours();
883
+ return a === 0 && (a = 24), t === "ko" ? n.ordinalNumber(a, { unit: "hour" }) : O(a, t.length);
884
+ },
885
+ // Minute
886
+ m: function(e, t, n) {
887
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : J.m(e, t);
888
+ },
889
+ // Second
890
+ s: function(e, t, n) {
891
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : J.s(e, t);
892
+ },
893
+ // Fraction of second
894
+ S: function(e, t) {
895
+ return J.S(e, t);
896
+ },
897
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
898
+ X: function(e, t, n) {
899
+ const a = e.getTimezoneOffset();
900
+ if (a === 0)
901
+ return "Z";
902
+ switch (t) {
903
+ // Hours and optional minutes
904
+ case "X":
905
+ return qe(a);
906
+ // Hours, minutes and optional seconds without `:` delimiter
907
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
908
+ // so this token always has the same output as `XX`
909
+ case "XXXX":
910
+ case "XX":
911
+ return p(a);
912
+ // Hours, minutes and optional seconds with `:` delimiter
913
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
914
+ // so this token always has the same output as `XXX`
915
+ case "XXXXX":
916
+ case "XXX":
917
+ // Hours and minutes with `:` delimiter
918
+ default:
919
+ return p(a, ":");
920
+ }
921
+ },
922
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
923
+ x: function(e, t, n) {
924
+ const a = e.getTimezoneOffset();
925
+ switch (t) {
926
+ // Hours and optional minutes
927
+ case "x":
928
+ return qe(a);
929
+ // Hours, minutes and optional seconds without `:` delimiter
930
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
931
+ // so this token always has the same output as `xx`
932
+ case "xxxx":
933
+ case "xx":
934
+ return p(a);
935
+ // Hours, minutes and optional seconds with `:` delimiter
936
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
937
+ // so this token always has the same output as `xxx`
938
+ case "xxxxx":
939
+ case "xxx":
940
+ // Hours and minutes with `:` delimiter
941
+ default:
942
+ return p(a, ":");
943
+ }
944
+ },
945
+ // Timezone (GMT)
946
+ O: function(e, t, n) {
947
+ const a = e.getTimezoneOffset();
948
+ switch (t) {
949
+ // Short
950
+ case "O":
951
+ case "OO":
952
+ case "OOO":
953
+ return "GMT" + Ue(a, ":");
954
+ // Long
955
+ case "OOOO":
956
+ default:
957
+ return "GMT" + p(a, ":");
958
+ }
959
+ },
960
+ // Timezone (specific non-location)
961
+ z: function(e, t, n) {
962
+ const a = e.getTimezoneOffset();
963
+ switch (t) {
964
+ // Short
965
+ case "z":
966
+ case "zz":
967
+ case "zzz":
968
+ return "GMT" + Ue(a, ":");
969
+ // Long
970
+ case "zzzz":
971
+ default:
972
+ return "GMT" + p(a, ":");
973
+ }
974
+ },
975
+ // Seconds timestamp
976
+ t: function(e, t, n) {
977
+ const a = Math.trunc(+e / 1e3);
978
+ return O(a, t.length);
979
+ },
980
+ // Milliseconds timestamp
981
+ T: function(e, t, n) {
982
+ return O(+e, t.length);
983
+ }
984
+ };
985
+ function Ue(e, t = "") {
986
+ const n = e > 0 ? "-" : "+", a = Math.abs(e), r = Math.trunc(a / 60), s = a % 60;
987
+ return s === 0 ? n + String(r) : n + String(r) + t + O(s, 2);
988
+ }
989
+ function qe(e, t) {
990
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + O(Math.abs(e) / 60, 2) : p(e, t);
991
+ }
992
+ function p(e, t = "") {
993
+ const n = e > 0 ? "-" : "+", a = Math.abs(e), r = O(Math.trunc(a / 60), 2), s = O(a % 60, 2);
994
+ return n + r + t + s;
995
+ }
996
+ const je = (e, t) => {
997
+ switch (e) {
998
+ case "P":
999
+ return t.date({ width: "short" });
1000
+ case "PP":
1001
+ return t.date({ width: "medium" });
1002
+ case "PPP":
1003
+ return t.date({ width: "long" });
1004
+ case "PPPP":
1005
+ default:
1006
+ return t.date({ width: "full" });
1007
+ }
1008
+ }, mt = (e, t) => {
1009
+ switch (e) {
1010
+ case "p":
1011
+ return t.time({ width: "short" });
1012
+ case "pp":
1013
+ return t.time({ width: "medium" });
1014
+ case "ppp":
1015
+ return t.time({ width: "long" });
1016
+ case "pppp":
1017
+ default:
1018
+ return t.time({ width: "full" });
1019
+ }
1020
+ }, Bt = (e, t) => {
1021
+ const n = e.match(/(P+)(p+)?/) || [], a = n[1], r = n[2];
1022
+ if (!r)
1023
+ return je(e, t);
1024
+ let s;
1025
+ switch (a) {
1026
+ case "P":
1027
+ s = t.dateTime({ width: "short" });
1028
+ break;
1029
+ case "PP":
1030
+ s = t.dateTime({ width: "medium" });
1031
+ break;
1032
+ case "PPP":
1033
+ s = t.dateTime({ width: "long" });
1034
+ break;
1035
+ case "PPPP":
1036
+ default:
1037
+ s = t.dateTime({ width: "full" });
1038
+ break;
1039
+ }
1040
+ return s.replace("{{date}}", je(a, t)).replace("{{time}}", mt(r, t));
1041
+ }, xt = {
1042
+ p: mt,
1043
+ P: Bt
1044
+ }, Ht = /^D+$/, Ut = /^Y+$/, qt = ["D", "DD", "YY", "YYYY"];
1045
+ function jt(e) {
1046
+ return Ht.test(e);
1047
+ }
1048
+ function Qt(e) {
1049
+ return Ut.test(e);
1050
+ }
1051
+ function Vt(e, t, n) {
1052
+ const a = Xt(e, t, n);
1053
+ if (console.warn(a), qt.includes(e)) throw new RangeError(a);
1054
+ }
1055
+ function Xt(e, t, n) {
1056
+ const a = e[0] === "Y" ? "years" : "days of the month";
1057
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1058
+ }
1059
+ function Kt(e) {
1060
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
1061
+ }
1062
+ function Jt(e) {
1063
+ return !(!Kt(e) && typeof e != "number" || isNaN(+E(e)));
1064
+ }
1065
+ const Zt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, pt = /^'([^]*?)'?$/, en = /''/g, tn = /[a-zA-Z]/;
1066
+ function Qe(e, t, n) {
1067
+ var m, y, D, f, o, c, v, I;
1068
+ const a = me(), r = (n == null ? void 0 : n.locale) ?? a.locale ?? Nt, s = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((y = (m = n == null ? void 0 : n.locale) == null ? void 0 : m.options) == null ? void 0 : y.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((f = (D = a.locale) == null ? void 0 : D.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, u = (n == null ? void 0 : n.weekStartsOn) ?? ((c = (o = n == null ? void 0 : n.locale) == null ? void 0 : o.options) == null ? void 0 : c.weekStartsOn) ?? a.weekStartsOn ?? ((I = (v = a.locale) == null ? void 0 : v.options) == null ? void 0 : I.weekStartsOn) ?? 0, i = E(e, n == null ? void 0 : n.in);
1069
+ if (!Jt(i))
1070
+ throw new RangeError("Invalid time value");
1071
+ let d = t.match(zt).map((h) => {
1072
+ const g = h[0];
1073
+ if (g === "p" || g === "P") {
1074
+ const Y = xt[g];
1075
+ return Y(h, r.formatLong);
1076
+ }
1077
+ return h;
1078
+ }).join("").match(Zt).map((h) => {
1079
+ if (h === "''")
1080
+ return { isToken: !1, value: "'" };
1081
+ const g = h[0];
1082
+ if (g === "'")
1083
+ return { isToken: !1, value: nn(h) };
1084
+ if (He[g])
1085
+ return { isToken: !0, value: h };
1086
+ if (g.match(tn))
1087
+ throw new RangeError(
1088
+ "Format string contains an unescaped latin alphabet character `" + g + "`"
1089
+ );
1090
+ return { isToken: !1, value: h };
1091
+ });
1092
+ r.localize.preprocessor && (d = r.localize.preprocessor(i, d));
1093
+ const w = {
1094
+ firstWeekContainsDate: s,
1095
+ weekStartsOn: u,
1096
+ locale: r
1097
+ };
1098
+ return d.map((h) => {
1099
+ if (!h.isToken) return h.value;
1100
+ const g = h.value;
1101
+ (!(n != null && n.useAdditionalWeekYearTokens) && Qt(g) || !(n != null && n.useAdditionalDayOfYearTokens) && jt(g)) && Vt(g, t, String(e));
1102
+ const Y = He[g[0]];
1103
+ return Y(i, g, r.localize, w);
1104
+ }).join("");
1105
+ }
1106
+ function nn(e) {
1107
+ const t = e.match(pt);
1108
+ return t ? t[1].replace(en, "'") : e;
1109
+ }
1110
+ function Oe(e, t, n) {
1111
+ const [a, r] = Se(
1112
+ n == null ? void 0 : n.in,
1113
+ e,
1114
+ t
1115
+ );
1116
+ return +ue(a) == +ue(r);
1117
+ }
1118
+ function Te(e, t, n) {
1119
+ const a = +E(e, n == null ? void 0 : n.in), [r, s] = [
1120
+ +E(t.start, n == null ? void 0 : n.in),
1121
+ +E(t.end, n == null ? void 0 : n.in)
1122
+ ].sort((u, i) => u - i);
1123
+ return a >= r && a <= s;
1124
+ }
1125
+ const Ve = {
1126
+ "en-US": {
1127
+ nextMonth: "Next month",
1128
+ previousMonth: "Previous month"
1129
+ }
1130
+ }, an = we({
1131
+ i18n: { messages: Ve },
1132
+ name: "calendar-month",
1133
+ components: {
1134
+ BentoButton: $e,
1135
+ BentoTypography: tt,
1136
+ CalendarMonthDay: Yt,
1137
+ ChevronLeftIcon: ut,
1138
+ ChevronRightIcon: ot
1139
+ },
1140
+ directives: { BentoKeyboardNavigationDirective: rt },
1141
+ props: {
1142
+ /**
1143
+ * end of the selected range
1144
+ */
1145
+ endDate: { type: Date, default: null },
1146
+ /**
1147
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
1148
+ */
1149
+ firstDayOfWeek: {
1150
+ type: Number,
1151
+ default: re.MONDAY,
1152
+ validator: (e) => Object.values(re).includes(e)
1153
+ },
1154
+ /**
1155
+ * Indicate if a date should be disabled or not
1156
+ */
1157
+ isDateDisabled: { type: Function, default: void 0 },
1158
+ /**
1159
+ * Indicates if the calendar is part of a range date picker or a sigle date picker
1160
+ */
1161
+ isRange: { type: Boolean, default: !1 },
1162
+ /**
1163
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
1164
+ */
1165
+ min: { type: Date, default: null },
1166
+ /**
1167
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
1168
+ */
1169
+ max: { type: Date, default: null },
1170
+ /**
1171
+ * Month of the year to be displayed in the calendar
1172
+ */
1173
+ month: { type: Date, required: !0 },
1174
+ /**
1175
+ * When rendering multiple calendars, this property allows to render the
1176
+ * Next and Previous calendar buttons to the right, left or not at all
1177
+ * depending on the position: Unique (only 1), First, Middle or Last
1178
+ */
1179
+ position: {
1180
+ type: String,
1181
+ default: "unique",
1182
+ validator: (e) => Object.values(fe).includes(e)
1183
+ },
1184
+ /**
1185
+ * start of the selected range
1186
+ */
1187
+ startDate: { type: Date, default: null }
1188
+ // can be undefined, eslint complains without default
1189
+ },
1190
+ emits: [
1191
+ B.CHANGE_DAY,
1192
+ B.INPUT,
1193
+ B.NEXT_MONTH,
1194
+ B.PREVIOUS_MONTH,
1195
+ B.MOUSE_OVER
1196
+ ],
1197
+ setup(e, { emit: t }) {
1198
+ const { locale: n, t: a } = nt({ messages: Ve }), r = Ot(), s = at("bento-date-picker-month-label"), u = _(
1199
+ () => (N) => {
1200
+ var H;
1201
+ return e.min && N < e.min || e.max && N > e.max || ((H = e.isDateDisabled) == null ? void 0 : H.call(e, N));
1202
+ }
1203
+ ), {
1204
+ internalDate: i,
1205
+ baseDate: d,
1206
+ // Calendar refs
1207
+ addDayRef: w,
1208
+ // Month navigation
1209
+ showNextMonth: m,
1210
+ showPreviousMonth: y,
1211
+ // Day navigation
1212
+ moveToNextDay: D,
1213
+ moveToPreviousDay: f,
1214
+ moveToPreviousWeek: o,
1215
+ moveToNextWeek: c,
1216
+ moveToFirstDayOfWeek: v,
1217
+ moveToLastDayOfWeek: I,
1218
+ moveToPreviousMonth: h,
1219
+ moveToPreviousYear: g,
1220
+ moveToNextMonth: Y,
1221
+ moveToNextYear: F,
1222
+ focusOnDate: $
1223
+ } = lt(
1224
+ {
1225
+ currentSelectedDate: U(e, "startDate"),
1226
+ month: U(e, "month"),
1227
+ isDateDisabled: u.value,
1228
+ firstDayOfWeek: e.firstDayOfWeek
1229
+ },
1230
+ t
1231
+ ), W = _(
1232
+ () => Object.values(re).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : re.MONDAY
1233
+ ), b = _(() => ["first", "unique"].includes(e.position)), k = _(() => ["last", "unique"].includes(e.position)), S = _(
1234
+ () => {
1235
+ var N;
1236
+ return Qe(d.value, "MMMM yyyy", {
1237
+ locale: r[(N = n.value) == null ? void 0 : N.substring(0, 2)] || r.enUS
1238
+ });
1239
+ }
1240
+ ), z = _(
1241
+ () => new Array(7).fill(/* @__PURE__ */ new Date()).map((N, H) => {
1242
+ var Ge;
1243
+ const De = Ft(N, W.value + H);
1244
+ return Qe(De, "EEE", {
1245
+ locale: r[(Ge = n.value) == null ? void 0 : Ge.substring(0, 2)] || r.enUS
1246
+ });
1247
+ })
1248
+ ), C = _(() => {
1249
+ const N = [], H = Ne(e.month);
1250
+ let De = N[N.push([]) - 1];
1251
+ for (; H.getMonth() === e.month.getMonth(); )
1252
+ H.getDay() - W.value === 0 && De.length > 0 && (De = N[N.push([]) - 1]), De.push(ue(H)), H.setDate(H.getDate() + 1);
1253
+ return N;
1254
+ });
1255
+ return {
1256
+ // Refs
1257
+ addDayRef: w,
1258
+ // Values
1259
+ computedIsDateDisabled: u,
1260
+ daysOfWeek: z,
1261
+ weeksOfMonth: C,
1262
+ formattedMonthDate: S,
1263
+ shouldShowNextMonthButton: k,
1264
+ shouldShowPreviousMonthButton: b,
1265
+ monthLabelId: s,
1266
+ // Enums
1267
+ CalendarMonthEvent: B,
1268
+ // Functions
1269
+ isSelectedDate: (N) => i.value && Oe(i.value, N) && !e.endDate ? !0 : e.startDate && e.endDate && Te(N, { start: e.startDate, end: e.endDate }),
1270
+ showNextMonth: m,
1271
+ showPreviousMonth: y,
1272
+ dayVariant: (N) => {
1273
+ if (!e.isRange || Oe(e.startDate, e.endDate))
1274
+ return x.SINGLE;
1275
+ if (e.startDate && Oe(e.startDate, N))
1276
+ return x.BEGINNING;
1277
+ if (e.endDate && Oe(e.endDate, N))
1278
+ return x.END;
1279
+ if (e.startDate && e.endDate && Te(N, { start: e.startDate, end: e.endDate }))
1280
+ return x.MIDDLE;
1281
+ },
1282
+ confirmNavigationDate: () => {
1283
+ t(B.INPUT, i);
1284
+ },
1285
+ // Events
1286
+ onDayClicked: (N) => {
1287
+ t(B.INPUT, N);
1288
+ },
1289
+ listeners: {
1290
+ "keydown:arrow-right": D,
1291
+ "keydown:arrow-left": f,
1292
+ "keydown:arrow-up": o,
1293
+ "keydown:arrow-down": c,
1294
+ "keydown:home": v,
1295
+ "keydown:end": I,
1296
+ "keydown:page-up": h,
1297
+ "keydown:shift-page-up": g,
1298
+ "keydown:page-down": Y,
1299
+ "keydown:shift-page-down": F
1300
+ },
1301
+ // Exposed methods
1302
+ focusOnDate: $,
1303
+ moveToNextDay: D,
1304
+ moveToPreviousDay: f,
1305
+ moveToPreviousWeek: o,
1306
+ moveToNextWeek: c,
1307
+ moveToFirstDayOfWeek: v,
1308
+ moveToLastDayOfWeek: I,
1309
+ moveToPreviousMonth: h,
1310
+ moveToPreviousYear: g,
1311
+ moveToNextMonth: Y,
1312
+ moveToNextYear: F,
1313
+ // Translations
1314
+ t: a
1315
+ };
1316
+ }
1317
+ }), rn = { class: "b-calendar-month__month-selector" }, sn = { class: "b-calendar-month__previous" }, on = { class: "b-calendar-month__next" }, un = ["aria-labelledby"], cn = { class: "b-calendar-month__week-header" }, ln = ["colspan"];
1318
+ function dn(e, t, n, a, r, s) {
1319
+ var D, f;
1320
+ const u = ce("chevron-left-icon"), i = ce("bento-button"), d = ce("bento-typography"), w = ce("chevron-right-icon"), m = ce("calendar-month-day"), y = wt("bento-keyboard-navigation-directive");
1321
+ return Ze((T(), L("div", ze({ class: "b-calendar-month" }, pe(e.listeners, !0)), [
1322
+ A("div", rn, [
1323
+ A("div", sn, [
1324
+ e.shouldShowPreviousMonthButton ? (T(), se(i, {
1325
+ key: 0,
1326
+ variant: "tertiary",
1327
+ onClick: t[0] || (t[0] = (o) => e.moveToPreviousMonth(o, !0))
1328
+ }, {
1329
+ iconLeft: te(() => [
1330
+ X(u, {
1331
+ "svg-title": e.t("previousMonth")
1332
+ }, null, 8, ["svg-title"])
1333
+ ]),
1334
+ _: 1
1335
+ })) : de("", !0)
1336
+ ]),
1337
+ X(d, {
1338
+ id: e.monthLabelId,
1339
+ el: "h2",
1340
+ variant: "title",
1341
+ "aria-live": "polite"
1342
+ }, {
1343
+ default: te(() => [
1344
+ Pe(Le(e.formattedMonthDate), 1)
1345
+ ]),
1346
+ _: 1
1347
+ }, 8, ["id"]),
1348
+ A("div", on, [
1349
+ e.shouldShowNextMonthButton ? (T(), se(i, {
1350
+ key: 0,
1351
+ variant: "tertiary",
1352
+ onClick: t[1] || (t[1] = (o) => e.moveToNextMonth(o, !0))
1353
+ }, {
1354
+ iconLeft: te(() => [
1355
+ X(w, {
1356
+ "svg-title": e.t("nextMonth")
1357
+ }, null, 8, ["svg-title"])
1358
+ ]),
1359
+ _: 1
1360
+ })) : de("", !0)
1361
+ ])
1362
+ ]),
1363
+ A("table", {
1364
+ class: "b-calendar-month__month-container",
1365
+ role: "grid",
1366
+ "aria-labelledby": e.monthLabelId
1367
+ }, [
1368
+ A("thead", null, [
1369
+ A("tr", cn, [
1370
+ (T(!0), L(ne, null, ae(e.daysOfWeek, (o, c) => (T(), L("th", {
1371
+ key: c,
1372
+ class: "b-calendar-month__day-of-week",
1373
+ scope: "col"
1374
+ }, [
1375
+ X(d, {
1376
+ class: "b-calendar-month__day-of-week-font",
1377
+ el: "span",
1378
+ variant: "caption"
1379
+ }, {
1380
+ default: te(() => [
1381
+ Pe(Le(o), 1)
1382
+ ]),
1383
+ _: 2
1384
+ }, 1024)
1385
+ ]))), 128))
1386
+ ])
1387
+ ]),
1388
+ A("tbody", null, [
1389
+ (T(!0), L(ne, null, ae(e.weeksOfMonth, (o, c) => (T(), L("tr", { key: c }, [
1390
+ c === 0 && o.length < 7 ? (T(), L("td", {
1391
+ key: 0,
1392
+ colspan: 7 - o.length
1393
+ }, null, 8, ln)) : de("", !0),
1394
+ (T(!0), L(ne, null, ae(o, (v, I) => (T(), se(m, {
1395
+ ref_for: !0,
1396
+ ref: e.addDayRef(v),
1397
+ key: `calendar-day-${I}`,
1398
+ day: v,
1399
+ disabled: e.computedIsDateDisabled(v),
1400
+ selected: e.isSelectedDate(v),
1401
+ variant: e.dayVariant(v),
1402
+ onClick: e.onDayClicked,
1403
+ onMouseover: (h) => e.$emit(e.CalendarMonthEvent.MOUSE_OVER, v),
1404
+ onKeyup: [
1405
+ le((h) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, v), ["up", "native"]),
1406
+ le((h) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, v), ["down", "native"]),
1407
+ le((h) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, v), ["left", "native"]),
1408
+ le((h) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, v), ["right", "native"])
1409
+ ]
1410
+ }, null, 8, ["day", "disabled", "selected", "variant", "onClick", "onMouseover", "onKeyup"]))), 128))
1411
+ ]))), 128)),
1412
+ ((D = e.weeksOfMonth) == null ? void 0 : D.length) < 6 ? (T(!0), L(ne, { key: 0 }, ae(6 - ((f = e.weeksOfMonth) == null ? void 0 : f.length), (o) => (T(), L("tr", {
1413
+ key: `calendar month filler row ${o}`
1414
+ }, t[2] || (t[2] = [
1415
+ A("td", {
1416
+ "aria-hidden": "true",
1417
+ class: "b-calendar-month__empty-cell-filler",
1418
+ colspan: 7
1419
+ }, null, -1)
1420
+ ])))), 128)) : de("", !0)
1421
+ ])
1422
+ ], 8, un)
1423
+ ], 16)), [
1424
+ [y]
1425
+ ]);
1426
+ }
1427
+ const Xe = /* @__PURE__ */ be(an, [["render", dn], ["__scopeId", "data-v-3dbf5f97"]]);
1428
+ function Me(e, t, n) {
1429
+ const [a, r] = Se(
1430
+ n == null ? void 0 : n.in,
1431
+ e,
1432
+ t
1433
+ );
1434
+ return a.getFullYear() === r.getFullYear() && a.getMonth() === r.getMonth();
1435
+ }
1436
+ var q = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(q || {}), V = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_MONTH = "current-month", e.DISABLED = "disabled", e))(V || {}), We = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(We || {});
1437
+ const fn = ["tabindex", "aria-selected"], hn = { class: "b-calendar-year-month__wrapper" }, mn = {}, Dn = /* @__PURE__ */ we({
1438
+ ...mn,
1439
+ __name: "calendar-year-month",
1440
+ props: {
1441
+ month: {},
1442
+ disabled: { type: Boolean, default: !1 },
1443
+ selected: { type: Boolean, default: !1 },
1444
+ variant: { default: q.SINGLE }
1445
+ },
1446
+ emits: ["click", "mouseover"],
1447
+ setup(e, { emit: t }) {
1448
+ const n = e, a = t, r = _(() => {
1449
+ const i = /* @__PURE__ */ new Date();
1450
+ return n.month.getMonth() === i.getMonth() && n.month.getFullYear() === i.getFullYear();
1451
+ }), s = _(() => ({
1452
+ // Variants
1453
+ [`b-calendar-year-month--${V.BEGINNING}`]: n.variant === q.BEGINNING,
1454
+ [`b-calendar-year-month--${V.MIDDLE}`]: n.variant === q.MIDDLE,
1455
+ [`b-calendar-year-month--${V.END}`]: n.variant === q.END,
1456
+ [`b-calendar-year-month--${V.SINGLE}`]: n.variant === q.SINGLE,
1457
+ // Selected
1458
+ [`b-calendar-year-month--${V.UNSELECTED}`]: !n.selected,
1459
+ [`b-calendar-year-month--${V.SELECTED}`]: n.selected,
1460
+ // Current month
1461
+ [`b-calendar-year-month--${V.CURRENT_MONTH}`]: r.value,
1462
+ // Disabled
1463
+ [`b-calendar-year-month--${V.DISABLED}`]: n.disabled
1464
+ })), u = (i, d) => {
1465
+ n.disabled ? (i.preventDefault(), i.stopPropagation()) : a(We.CLICK, d, n.month);
1466
+ };
1467
+ return (i, d) => (T(), L("td", {
1468
+ class: Ce(["b-calendar-year-month", s.value]),
1469
+ tabindex: i.selected ? "0" : "-1",
1470
+ "aria-selected": i.selected ? i.selected : void 0,
1471
+ onClick: d[0] || (d[0] = (w) => u(w, i.month)),
1472
+ onMouseover: d[1] || (d[1] = (w) => a(R(We).MOUSE_OVER)),
1473
+ onKeydown: d[2] || (d[2] = le((w) => u(w, i.month), ["space", "enter"]))
1474
+ }, [
1475
+ A("div", hn, [
1476
+ X(R(it), {
1477
+ class: "b-calendar-year-month__label",
1478
+ date: i.month,
1479
+ format: R(ct).SHORT_MONTH
1480
+ }, null, 8, ["date", "format"])
1481
+ ])
1482
+ ], 42, fn));
1483
+ }
1484
+ }), vn = /* @__PURE__ */ be(Dn, [["__scopeId", "data-v-ad9a13f2"]]), Dt = {
1485
+ "en-US": {
1486
+ nextYear: "Next year",
1487
+ previousYear: "Previous year"
1488
+ },
1489
+ "ja-JP": {
1490
+ nextYear: "来年",
1491
+ previousYear: "前年"
1492
+ },
1493
+ "pt-BR": {
1494
+ nextYear: "Ano seguinte",
1495
+ previousYear: "Ano anterior"
1496
+ }
1497
+ }, yn = { class: "b-calendar-year__year-selector" }, gn = { class: "b-calendar-year__previous" }, wn = { class: "b-calendar-year__next" }, bn = ["aria-labelledby"], On = {
1498
+ i18n: { messages: Dt }
1499
+ }, Mn = /* @__PURE__ */ we({
1500
+ ...On,
1501
+ __name: "calendar-year",
1502
+ props: {
1503
+ endDate: { default: null },
1504
+ isDateDisabled: { type: Function, default: void 0 },
1505
+ isRange: { type: Boolean, default: !1 },
1506
+ min: { default: null },
1507
+ max: { default: null },
1508
+ position: { default: "unique" },
1509
+ startDate: { default: null },
1510
+ year: {}
1511
+ },
1512
+ emits: ["input", "mouseover", "nextMonth", "previousMonth"],
1513
+ setup(e, { expose: t, emit: n }) {
1514
+ const a = at("bento-date-picker-year-label"), r = e, s = n, { t: u } = nt({ messages: Dt }), i = (b) => {
1515
+ var k;
1516
+ return r.min && b < r.min || r.max && b > r.max || ((k = r.isDateDisabled) == null ? void 0 : k.call(r, b));
1517
+ }, d = _(() => ["first", "unique"].includes(r.position)), w = _(() => ["last", "unique"].includes(r.position)), {
1518
+ internalDate: m,
1519
+ // Calendar refs
1520
+ addDayRef: y,
1521
+ // Day navigation
1522
+ moveToPreviousMonth: D,
1523
+ moveToPreviousYear: f,
1524
+ moveToNextMonth: o,
1525
+ moveToNextYear: c,
1526
+ moveToFirstMonthOfYear: v,
1527
+ moveToLastMonthOfYear: I,
1528
+ focusOnDate: h
1529
+ } = lt(
1530
+ {
1531
+ currentSelectedDate: U(r, "startDate"),
1532
+ month: U(r, "year"),
1533
+ isDateDisabled: i
1534
+ },
1535
+ s
1536
+ );
1537
+ t({ focusOnDate: h });
1538
+ const g = _(() => {
1539
+ const b = [];
1540
+ let k = 0;
1541
+ for (let S = 0; S < 3; S++) {
1542
+ const z = [];
1543
+ for (let C = 0; C < 4; C++)
1544
+ z.push(new Date(r.year.getFullYear(), k++, 1));
1545
+ b.push(z);
1546
+ }
1547
+ return b;
1548
+ }), Y = (b) => !r.isRange || Me(r.startDate, r.endDate) ? q.SINGLE : r.startDate && Me(r.startDate, b) ? q.BEGINNING : r.endDate && Me(r.endDate, b) ? q.END : r.startDate && r.endDate && Te(b, { start: r.startDate, end: r.endDate }) ? q.MIDDLE : null, F = (b) => m.value && Me(m.value, b) ? !0 : r.startDate && r.endDate && Te(b, { start: r.startDate, end: r.endDate }), $ = (b) => {
1549
+ s("input", b);
1550
+ }, W = r.isRange ? {} : {
1551
+ "keydown:arrow-right": o,
1552
+ "keydown:arrow-left": D,
1553
+ "keydown:arrow-up": (b) => D(b, !1, 4),
1554
+ "keydown:arrow-down": (b) => o(b, !1, 4),
1555
+ "keydown:home": v,
1556
+ "keydown:end": I,
1557
+ "keydown:page-up": f,
1558
+ "keydown:page-down": c
1559
+ };
1560
+ return (b, k) => Ze((T(), L("div", ze({ class: "b-calendar-year" }, pe(R(W), !0)), [
1561
+ A("div", yn, [
1562
+ A("div", gn, [
1563
+ d.value ? (T(), se($e, {
1564
+ key: 0,
1565
+ variant: "tertiary",
1566
+ onClick: k[0] || (k[0] = (S) => R(f)(S, !0))
1567
+ }, {
1568
+ iconLeft: te(() => [
1569
+ X(R(ut), {
1570
+ "svg-title": R(u)("previousYear")
1571
+ }, null, 8, ["svg-title"])
1572
+ ]),
1573
+ _: 1
1574
+ })) : de("", !0)
1575
+ ]),
1576
+ X(R(tt), {
1577
+ id: R(a),
1578
+ el: "h2",
1579
+ variant: "title",
1580
+ "aria-live": "polite"
1581
+ }, {
1582
+ default: te(() => [
1583
+ Pe(Le(b.year.getFullYear()), 1)
1584
+ ]),
1585
+ _: 1
1586
+ }, 8, ["id"]),
1587
+ A("div", wn, [
1588
+ w.value ? (T(), se($e, {
1589
+ key: 0,
1590
+ variant: "tertiary",
1591
+ onClick: k[1] || (k[1] = (S) => R(c)(S, !0))
1592
+ }, {
1593
+ iconLeft: te(() => [
1594
+ X(R(ot), {
1595
+ "svg-title": R(u)("nextYear")
1596
+ }, null, 8, ["svg-title"])
1597
+ ]),
1598
+ _: 1
1599
+ })) : de("", !0)
1600
+ ])
1601
+ ]),
1602
+ A("table", {
1603
+ class: "b-calendar-year__year-container",
1604
+ role: "grid",
1605
+ "aria-labelledby": R(a)
1606
+ }, [
1607
+ A("tbody", null, [
1608
+ (T(!0), L(ne, null, ae(g.value, (S, z) => (T(), L("tr", { key: z }, [
1609
+ (T(!0), L(ne, null, ae(S, (C, l) => (T(), se(vn, {
1610
+ ref_for: !0,
1611
+ ref: R(y)(C),
1612
+ key: `calendar-month-${l}`,
1613
+ month: C,
1614
+ disabled: i(C),
1615
+ selected: F(C),
1616
+ variant: Y(C),
1617
+ onClick: $,
1618
+ onMouseover: (M) => s("mouseover", C)
1619
+ }, null, 8, ["month", "disabled", "selected", "variant", "onMouseover"]))), 128))
1620
+ ]))), 128))
1621
+ ])
1622
+ ], 8, bn)
1623
+ ], 16)), [
1624
+ [R(rt)]
1625
+ ]);
1626
+ }
1627
+ }), Ke = /* @__PURE__ */ be(Mn, [["__scopeId", "data-v-5ec13be4"]]), En = ({ selectedDate: e }, t) => {
1628
+ const n = et({
1629
+ startDate: null,
1630
+ endDate: null
1631
+ });
1632
+ return he(
1633
+ () => e.value,
1634
+ () => {
1635
+ n.startDate = e.value, n.endDate = void 0;
1636
+ },
1637
+ { immediate: !0 }
1638
+ ), {
1639
+ internalValue: n,
1640
+ onDateInput: (r) => {
1641
+ t(Z.INPUT, r);
1642
+ },
1643
+ // Empty function to prevent the listeners from throwing a warning
1644
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1645
+ onMouseOver: () => {
1646
+ }
1647
+ };
1648
+ };
1649
+ function Nn(e, t) {
1650
+ return +E(e) < +E(t);
1651
+ }
1652
+ function kn(e, t) {
1653
+ return +E(e) > +E(t);
1654
+ }
1655
+ function Tn(e, t, n) {
1656
+ const [a, r] = Se(
1657
+ n == null ? void 0 : n.in,
1658
+ e,
1659
+ t
1660
+ ), s = Je(a, r), u = Math.abs(
1661
+ dt(a, r)
1662
+ );
1663
+ a.setDate(a.getDate() - s * u);
1664
+ const i = +(Je(a, r) === -s), d = s * (u - i);
1665
+ return d === 0 ? 0 : d;
1666
+ }
1667
+ function Je(e, t) {
1668
+ const 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();
1669
+ return n < 0 ? -1 : n > 0 ? 1 : n;
1670
+ }
1671
+ function _e(e, t) {
1672
+ const n = E(e, t == null ? void 0 : t.in), a = n.getMonth(), r = a - a % 3 + 3;
1673
+ return n.setMonth(r, 0), n.setHours(23, 59, 59, 999), n;
1674
+ }
1675
+ function Ye(e, t) {
1676
+ const n = E(e, t == null ? void 0 : t.in), a = n.getMonth(), r = a - a % 3;
1677
+ return n.setMonth(r, 1), n.setHours(0, 0, 0, 0), n;
1678
+ }
1679
+ const Sn = (e) => {
1680
+ const t = (m, y, D, f) => {
1681
+ let o = K(m, { weekStartsOn: e }), c = Ee(y || m, { weekStartsOn: e });
1682
+ const v = D && o < D, I = f && c > f;
1683
+ return v && (o = K(D, { weekStartsOn: e })), I && (c = Ee(f, { weekStartsOn: e })), o > c && (v ? c = Ee(o, { weekStartsOn: e }) : o = K(c, { weekStartsOn: e })), { startDate: o, endDate: c };
1684
+ }, n = (m, y, D, f) => {
1685
+ let o = Ne(m), c = Ie(y || m);
1686
+ const v = D && o < D, I = f && c > f;
1687
+ return v && (o = Ne(D)), I && (c = Ie(f)), o > c && (v ? c = Ie(o) : o = Ne(c)), { startDate: o, endDate: c };
1688
+ }, a = (m, y, D, f) => {
1689
+ let o = Ye(m), c = _e(y || m);
1690
+ const v = D instanceof Date && o < D, I = f instanceof Date && c > f;
1691
+ return v && (o = Ye(D)), I && (c = _e(f)), o > c && (v ? c = _e(o) : o = Ye(c)), { startDate: o, endDate: c };
1692
+ };
1693
+ return {
1694
+ adjustDateForWeekly: t,
1695
+ adjustDateForMonthly: n,
1696
+ adjustDateForQuarterly: a,
1697
+ adjustStartDateInputForWeekly: (m, y, D, f) => {
1698
+ const { startDate: o } = t(new Date(m), null, D, f);
1699
+ return y(o);
1700
+ },
1701
+ adjustEndDateInputForWeekly: (m, y, D, f) => {
1702
+ const { endDate: o } = t(new Date(m), null, D, f);
1703
+ return y(o);
1704
+ },
1705
+ adjustStartDateInputForMonthly: (m, y, D, f) => {
1706
+ const { startDate: o } = n(new Date(m), null, D, f);
1707
+ return y(o);
1708
+ },
1709
+ adjustEndDateInputForMonthly: (m, y, D, f) => {
1710
+ const { endDate: o } = n(new Date(m), null, D, f);
1711
+ return y(o);
1712
+ },
1713
+ adjustStartDateInputForQuarterly: (m, y, D, f) => {
1714
+ const { startDate: o } = a(new Date(m), null, D, f);
1715
+ return y(o);
1716
+ },
1717
+ adjustEndDateInputForQuarterly: (m, y, D, f) => {
1718
+ const { endDate: o } = a(new Date(m), null, D, f);
1719
+ return y(o);
1720
+ }
1721
+ };
1722
+ }, In = ({ selectedDate: e, isDateDisabled: t, maxRange: n, granularity: a, firstDayOfWeek: r, min: s, max: u }, i) => {
1723
+ const { adjustDateForWeekly: m, adjustDateForMonthly: y, adjustDateForQuarterly: D } = Sn(r), f = et({
1724
+ startDate: null,
1725
+ endDate: null
1726
+ }), o = ee(null);
1727
+ he(
1728
+ () => e.value,
1729
+ () => {
1730
+ let { startDate: h = null, endDate: g = null } = e.value || {};
1731
+ h && (h = ue(h)), g && (g = ue(g)), !(h && t && t(h) || g && t && t(g) || h && g && kn(h, g)) && (f.startDate = h, f.endDate = g);
1732
+ },
1733
+ { immediate: !0, deep: !0 }
1734
+ );
1735
+ const c = (h, g, Y) => {
1736
+ if (f.startDate = h, f.endDate = g, n.value) {
1737
+ const F = Tn(g, h) - n.value;
1738
+ F > 0 && (Y < 1 ? (f.startDate = h, f.endDate = Ae(g, F)) : (f.startDate = ge(h, F), f.endDate = g));
1739
+ }
1740
+ i(Z.START_DATE_SELECTED, f.startDate), i(Z.END_DATE_SELECTED, f.endDate);
1741
+ }, v = (h) => {
1742
+ var g, Y, F, $, W, b;
1743
+ if (!(!o.value || t && t(h)))
1744
+ if (Nn(h, o.value)) {
1745
+ if (((g = a == null ? void 0 : a.value) == null ? void 0 : g.type) === "weekly") {
1746
+ const { startDate: k, endDate: S } = m(h, o.value, s.value, u.value);
1747
+ c(k, S, -1);
1748
+ return;
1749
+ }
1750
+ if (((Y = a == null ? void 0 : a.value) == null ? void 0 : Y.type) === "monthly") {
1751
+ const { startDate: k, endDate: S } = y(h, o.value, s.value, u.value);
1752
+ c(k, S, -1);
1753
+ return;
1754
+ }
1755
+ if (((F = a == null ? void 0 : a.value) == null ? void 0 : F.type) === "quarterly") {
1756
+ const { startDate: k, endDate: S } = D(h, o.value, s.value, u.value);
1757
+ c(k, S, -1);
1758
+ return;
1759
+ }
1760
+ c(h, o.value, -1);
1761
+ } else {
1762
+ if ((($ = a == null ? void 0 : a.value) == null ? void 0 : $.type) === "weekly") {
1763
+ const { startDate: k, endDate: S } = m(o.value, h, s.value, u.value);
1764
+ c(k, S, 1);
1765
+ return;
1766
+ }
1767
+ if (((W = a == null ? void 0 : a.value) == null ? void 0 : W.type) === "monthly") {
1768
+ const { startDate: k, endDate: S } = y(o.value, h, s.value, u.value);
1769
+ c(k, S, 1);
1770
+ return;
1771
+ }
1772
+ if (((b = a == null ? void 0 : a.value) == null ? void 0 : b.type) === "quarterly") {
1773
+ const { startDate: k, endDate: S } = D(o.value, h, s.value, u.value);
1774
+ c(k, S, 1);
1775
+ return;
1776
+ }
1777
+ c(o.value, h, 1);
1778
+ }
1779
+ };
1780
+ return {
1781
+ internalValue: f,
1782
+ onDateInput: (h) => {
1783
+ var g, Y, F;
1784
+ if (o.value)
1785
+ o.value = null, i(Z.INPUT, f);
1786
+ else {
1787
+ let $ = h;
1788
+ if (((g = a == null ? void 0 : a.value) == null ? void 0 : g.type) === "weekly") {
1789
+ const { startDate: W, endDate: b } = m(h);
1790
+ $ = W, c($, b);
1791
+ }
1792
+ if (((Y = a == null ? void 0 : a.value) == null ? void 0 : Y.type) === "monthly") {
1793
+ const { startDate: W, endDate: b } = y(h);
1794
+ $ = W, c($, b);
1795
+ }
1796
+ if (((F = a == null ? void 0 : a.value) == null ? void 0 : F.type) === "quarterly") {
1797
+ const { startDate: W, endDate: b } = D(h);
1798
+ $ = W, c($, b);
1799
+ }
1800
+ o.value = $, v($);
1801
+ }
1802
+ },
1803
+ onMouseOver: v
1804
+ };
1805
+ };
1806
+ function vt(e, t, n) {
1807
+ return oe(e, t * 12, n);
1808
+ }
1809
+ function _n(e, t, n) {
1810
+ return vt(e, -t, n);
1811
+ }
1812
+ const Yn = we({
1813
+ name: "calendar",
1814
+ components: { CalendarMonth: Xe, CalendarYear: Ke },
1815
+ props: {
1816
+ /**
1817
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
1818
+ */
1819
+ firstDayOfWeek: {
1820
+ type: Number,
1821
+ default: re.MONDAY,
1822
+ validator: (e) => Object.values(re).includes(e)
1823
+ },
1824
+ /**
1825
+ * The selected granularity configuration
1826
+ */
1827
+ granularity: {
1828
+ type: Object,
1829
+ default: null
1830
+ },
1831
+ /**
1832
+ * Indicate if a date should be disabled or not
1833
+ */
1834
+ isDateDisabled: { type: Function, default: void 0 },
1835
+ /**
1836
+ * Enables the Date Range calendar
1837
+ */
1838
+ isRange: { type: Boolean, default: !1 },
1839
+ /**
1840
+ * Set a maximum number of dates to be selectable by the range.
1841
+ */
1842
+ maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
1843
+ /**
1844
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
1845
+ */
1846
+ min: { type: Date, default: null },
1847
+ /**
1848
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
1849
+ */
1850
+ max: { type: Date, default: null },
1851
+ /**
1852
+ * Number of months rendered on pane
1853
+ */
1854
+ numberOfMonths: {
1855
+ type: Number,
1856
+ default: 3,
1857
+ validator: (e) => e >= 1
1858
+ },
1859
+ /**
1860
+ * Upon opening date range picker, end date's month will be pre-selected.
1861
+ */
1862
+ showEndDateOnOpen: { type: Boolean, default: !1 },
1863
+ /**
1864
+ * Selected date. Can be a single Date or a CalendarRangeDate
1865
+ * instance that contains startDate and endDate attributes.
1866
+ */
1867
+ value: { type: [Date, Object], default: void 0 },
1868
+ /**
1869
+ * Default start date for the calendar pane
1870
+ */
1871
+ defaultDisplayMonth: {
1872
+ type: String,
1873
+ default: null,
1874
+ validator: (e) => /^\d{4}-(0?[1-9]|1[012])(-(0?[1-9]|[12][0-9]|3[01]))?$/.test(e)
1875
+ },
1876
+ /**
1877
+ * The type of calendar to display. Defaults to showing days.
1878
+ */
1879
+ variant: {
1880
+ type: String,
1881
+ default: "day",
1882
+ validator: (e) => Object.values(Fe).includes(e)
1883
+ }
1884
+ },
1885
+ emit: [Z.INPUT, Z.START_DATE_SELECTED, Z.END_DATE_SELECTED],
1886
+ setup(e, { emit: t }) {
1887
+ const n = ee(null), a = ee();
1888
+ he(
1889
+ () => e.value,
1890
+ () => {
1891
+ var o, c, v;
1892
+ if (e.isRange)
1893
+ a.value = e != null && e.showEndDateOnOpen && ((o = e.value) != null && o.endDate) ? (c = e.value) == null ? void 0 : c.endDate : ((v = e.value) == null ? void 0 : v.startDate) || /* @__PURE__ */ new Date();
1894
+ else {
1895
+ const I = e.defaultDisplayMonth && new Date(e.defaultDisplayMonth).getTime() ? new Date(e.defaultDisplayMonth) : /* @__PURE__ */ new Date();
1896
+ a.value = e.value || I;
1897
+ }
1898
+ },
1899
+ { immediate: !0, deep: !0 }
1900
+ );
1901
+ const r = _(
1902
+ () => e.variant === Fe.MONTH ? Ke : Xe
1903
+ ), s = _(() => ({
1904
+ "b-calendar__range": e.isRange
1905
+ })), { internalValue: u, onDateInput: i, onMouseOver: d } = e.isRange ? In(
1906
+ {
1907
+ selectedDate: U(e, "value"),
1908
+ isDateDisabled: e.isDateDisabled,
1909
+ maxRange: U(e, "maxRange"),
1910
+ granularity: U(e, "granularity"),
1911
+ firstDayOfWeek: e.firstDayOfWeek,
1912
+ min: U(e, "min"),
1913
+ max: U(e, "max")
1914
+ },
1915
+ t
1916
+ ) : En(
1917
+ {
1918
+ selectedDate: U(e, "value"),
1919
+ firstDayOfWeek: e.firstDayOfWeek
1920
+ },
1921
+ t
1922
+ ), w = (o) => e.numberOfMonths === 1 ? fe.UNIQUE : o === 0 ? fe.FIRST : o === e.numberOfMonths - 1 ? fe.LAST : fe.MIDDLE, m = _(() => (o) => {
1923
+ const c = e != null && e.showEndDateOnOpen && e.isRange ? ye(a.value, e.numberOfMonths - 1) : a.value;
1924
+ return oe(c, o);
1925
+ }), y = _(() => (o) => {
1926
+ const c = e != null && e.showEndDateOnOpen ? _n(a.value, e.numberOfMonths - 1) : a.value;
1927
+ return vt(c, o);
1928
+ });
1929
+ return {
1930
+ // Refs
1931
+ calendarRef: n,
1932
+ // Values
1933
+ baseDate: a,
1934
+ calendarComponent: r,
1935
+ conditionalClasses: s,
1936
+ internalValue: u,
1937
+ // Methods
1938
+ calculateOffsetMonth: m,
1939
+ calculateOffsetYear: y,
1940
+ calendarPosition: w,
1941
+ // Events
1942
+ onDateInput: i,
1943
+ onMouseOver: d,
1944
+ calculateNextMonths: (o = 1) => {
1945
+ a.value = oe(a.value, o);
1946
+ },
1947
+ calculatePreviousMonths: (o = 1) => {
1948
+ a.value = ye(a.value, o);
1949
+ }
1950
+ };
1951
+ }
1952
+ });
1953
+ function Pn(e, t, n, a, r, s) {
1954
+ return T(), L("div", {
1955
+ class: Ce(["b-calendar", e.conditionalClasses])
1956
+ }, [
1957
+ (T(!0), L(ne, null, ae(e.numberOfMonths, (u, i) => (T(), se(bt(e.calendarComponent), {
1958
+ ref_for: !0,
1959
+ ref: e.numberOfMonths === 1 ? "calendarRef" : null,
1960
+ key: `calendar-${i}`,
1961
+ "first-day-of-week": e.firstDayOfWeek,
1962
+ "is-date-disabled": e.isDateDisabled,
1963
+ month: e.calculateOffsetMonth(i),
1964
+ year: e.calculateOffsetYear(i),
1965
+ position: e.calendarPosition(i),
1966
+ min: e.min,
1967
+ max: e.max,
1968
+ "is-range": e.isRange,
1969
+ "start-date": e.internalValue.startDate,
1970
+ "end-date": e.internalValue.endDate,
1971
+ granularity: e.granularity,
1972
+ onInput: e.onDateInput,
1973
+ onMouseover: e.onMouseOver,
1974
+ onChangeDay: e.onMouseOver,
1975
+ onNextMonth: e.calculateNextMonths,
1976
+ onPreviousMonth: e.calculatePreviousMonths
1977
+ }, null, 40, ["first-day-of-week", "is-date-disabled", "month", "year", "position", "min", "max", "is-range", "start-date", "end-date", "granularity", "onInput", "onMouseover", "onChangeDay", "onNextMonth", "onPreviousMonth"]))), 128))
1978
+ ], 2);
1979
+ }
1980
+ const qn = /* @__PURE__ */ be(Yn, [["render", Pn], ["__scopeId", "data-v-0efc3efc"]]);
1981
+ export {
1982
+ re as C,
1983
+ Fe as a,
1984
+ qn as b,
1985
+ Z as c,
1986
+ fe as d,
1987
+ ue as e,
1988
+ Qe as f,
1989
+ oe as g,
1990
+ K as h,
1991
+ Oe as i,
1992
+ ge as j,
1993
+ Ee as k,
1994
+ Ae as l,
1995
+ ye as m,
1996
+ Ye as n,
1997
+ _e as o,
1998
+ Ne as s,
1999
+ Sn as u
2000
+ };
2001
+ //# sourceMappingURL=calendar.Tm7Cvpwu.js.map