@calcom/atoms 2.6.11 → 2.6.13

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 (127) hide show
  1. package/dist/{AddressInput-BSVRgyNs.js → AddressInput-CNcRD2w1.js} +1 -1
  2. package/dist/{AlbyPriceComponent-CMgsr1Ao.js → AlbyPriceComponent-DWBtarul.js} +1 -1
  3. package/dist/{AppCard-D2gzMALd.js → AppCard-klklIO43.js} +1 -1
  4. package/dist/{AppListCardPlatformWrapper-Cnl-TE7_.js → AppListCardPlatformWrapper-CLttW-YD.js} +1 -1
  5. package/dist/{AppListCardWebWrapper-gfXh1pIl.js → AppListCardWebWrapper-ungsqbht.js} +1 -1
  6. package/dist/{AppSettingsInterface-_taRGk-r.js → AppSettingsInterface-C6N-7B7h.js} +1 -1
  7. package/dist/{AppSettingsInterface-CDhBtLh0.js → AppSettingsInterface-CF2n2-o4.js} +1 -1
  8. package/dist/{AppSettingsInterface-Cw2myK7L.js → AppSettingsInterface-qLDDMFbi.js} +1 -1
  9. package/dist/DateRangePicker-Bs0PlpWE.js +1225 -0
  10. package/dist/{EventTypeAppCardInterface-CUZIwFXc.js → EventTypeAppCardInterface-1kHvNeUW.js} +3 -3
  11. package/dist/{EventTypeAppCardInterface-2XQbEKfc.js → EventTypeAppCardInterface-B0tOu4S7.js} +4 -4
  12. package/dist/{EventTypeAppCardInterface-6SWidENZ.js → EventTypeAppCardInterface-BIwNnOmB.js} +4 -4
  13. package/dist/{EventTypeAppCardInterface-ByaCvmqW.js → EventTypeAppCardInterface-BW028j3w.js} +4 -4
  14. package/dist/{EventTypeAppCardInterface-BkICcEcZ.js → EventTypeAppCardInterface-B_J0Wcun.js} +3 -3
  15. package/dist/{EventTypeAppCardInterface-DjAtHgSf.js → EventTypeAppCardInterface-B_VAsp8u.js} +3 -3
  16. package/dist/{EventTypeAppCardInterface-DxAB8P4O.js → EventTypeAppCardInterface-BiijcX6G.js} +3 -3
  17. package/dist/{EventTypeAppCardInterface-FeLvh3um.js → EventTypeAppCardInterface-BmnDMKAu.js} +3 -3
  18. package/dist/{EventTypeAppCardInterface-C924WFk1.js → EventTypeAppCardInterface-BuGiQlYt.js} +4 -4
  19. package/dist/{EventTypeAppCardInterface-xT2KpywN.js → EventTypeAppCardInterface-Bz8Ake3J.js} +3 -3
  20. package/dist/{EventTypeAppCardInterface-CXBV4y5V.js → EventTypeAppCardInterface-CCkO6p1N.js} +2 -2
  21. package/dist/{EventTypeAppCardInterface-9ytHVqLt.js → EventTypeAppCardInterface-CNqyRASI.js} +3 -3
  22. package/dist/{EventTypeAppCardInterface-DC18MvPi.js → EventTypeAppCardInterface-CRtPFMFv.js} +4 -4
  23. package/dist/{EventTypeAppCardInterface-wn-o2YtJ.js → EventTypeAppCardInterface-CjhLZ-5G.js} +3 -3
  24. package/dist/{EventTypeAppCardInterface-xVjvec4B.js → EventTypeAppCardInterface-CrfdfvIv.js} +4 -4
  25. package/dist/{EventTypeAppCardInterface-BDDbZ8vf.js → EventTypeAppCardInterface-CsOPIoAR.js} +3 -3
  26. package/dist/{EventTypeAppCardInterface-D01blgcT.js → EventTypeAppCardInterface-D9NSabT_.js} +3 -3
  27. package/dist/{EventTypeAppCardInterface-Bsf1F5WS.js → EventTypeAppCardInterface-DEYTybBc.js} +4 -4
  28. package/dist/{EventTypeAppCardInterface-CdFMoEXV.js → EventTypeAppCardInterface-DRT9d_a_.js} +4 -4
  29. package/dist/{EventTypeAppCardInterface-Ck3zm7rk.js → EventTypeAppCardInterface-DkYyEz2h.js} +2 -2
  30. package/dist/{EventTypeAppCardInterface-uvLDTwHG.js → EventTypeAppCardInterface-DkYzykVQ.js} +3 -3
  31. package/dist/{EventTypeAppCardInterface-DrIcvZDq.js → EventTypeAppCardInterface-DkcPQSBP.js} +3 -3
  32. package/dist/{EventTypeAppCardInterface-CV_NZrY1.js → EventTypeAppCardInterface-LP-llDuy.js} +4 -4
  33. package/dist/{EventTypeAppCardInterface-BWym_qcz.js → EventTypeAppCardInterface-RigCIe9i.js} +3 -3
  34. package/dist/{EventTypeAppCardInterface-kjwZ2EOi.js → EventTypeAppCardInterface-SneZz4FA.js} +3 -3
  35. package/dist/{EventTypeAppCardInterface-XJyNFK3k.js → EventTypeAppCardInterface-jvv3YzcU.js} +3 -3
  36. package/dist/{EventTypeAppCardInterface-Cj0GGguL.js → EventTypeAppCardInterface-kAG2NSzr.js} +4 -4
  37. package/dist/{EventTypeAppCardInterface-GGuuK5YE.js → EventTypeAppCardInterface-nIzPHTMo.js} +4 -4
  38. package/dist/{EventTypeAppSettingsInterface-BH_m6hHK.js → EventTypeAppSettingsInterface-8kKdQ25V.js} +1 -1
  39. package/dist/{EventTypeAppSettingsInterface-Bp35QbeS.js → EventTypeAppSettingsInterface-BDZKnOX4.js} +1 -1
  40. package/dist/{EventTypeAppSettingsInterface-DB8kaVKc.js → EventTypeAppSettingsInterface-BQiGXQxc.js} +1 -1
  41. package/dist/{EventTypeAppSettingsInterface-B3uBuK6j.js → EventTypeAppSettingsInterface-Bid15rY3.js} +1 -1
  42. package/dist/{EventTypeAppSettingsInterface-B5tBVrh9.js → EventTypeAppSettingsInterface-CAaN6RqQ.js} +1 -1
  43. package/dist/{EventTypeAppSettingsInterface-CRHPa1m3.js → EventTypeAppSettingsInterface-Cqz1DB7T.js} +1 -1
  44. package/dist/{EventTypeAppSettingsInterface-u5cKJxEv.js → EventTypeAppSettingsInterface-D6SzjGMw.js} +1 -1
  45. package/dist/{EventTypeAppSettingsInterface-MHenOHqQ.js → EventTypeAppSettingsInterface-D9IuTAG2.js} +1 -1
  46. package/dist/{EventTypeAppSettingsInterface-48p67zXr.js → EventTypeAppSettingsInterface-DDmS2lPa.js} +1 -1
  47. package/dist/{EventTypeAppSettingsInterface-CtA38FAl.js → EventTypeAppSettingsInterface-Du_ysgfn.js} +1 -1
  48. package/dist/{EventTypeAppSettingsInterface-ebC2puEb.js → EventTypeAppSettingsInterface-IuQT4cwN.js} +1 -1
  49. package/dist/{EventTypeAppSettingsInterface-CdrjAjH-.js → EventTypeAppSettingsInterface-ePosdr9u.js} +1 -1
  50. package/dist/{EventTypeAppSettingsInterface-Dx-rnINz.js → EventTypeAppSettingsInterface-qdb0rp-_.js} +1 -1
  51. package/dist/{EventTypeAppSettingsInterface-DjYDtgLI.js → EventTypeAppSettingsInterface-vfJHAs-3.js} +1 -1
  52. package/dist/{InstallAppButton-Bsmn8-1j.js → InstallAppButton-CtsgGsV3.js} +1 -1
  53. package/dist/{InstallAppButton-DiXHp_JV.js → InstallAppButton-DYNurUD3.js} +1 -1
  54. package/dist/{InstallAppButton-DrFjP6MA.js → InstallAppButton-Dc61HSDI.js} +1 -1
  55. package/dist/{PhoneInput-BBZ7zN80.js → PhoneInput-BbJPh71z.js} +1 -1
  56. package/dist/{StripePaymentForm-BYGanUXe.js → StripePaymentForm-z2YiIq_m.js} +1 -1
  57. package/dist/cal-atoms.css +1 -1
  58. package/dist/cal-atoms.js +21 -21
  59. package/dist/{index-BYQelnwS.js → index-BrDyKqlb.js} +2 -2
  60. package/dist/{index-BmBjWkT3.js → index-DwvntS5c.js} +75214 -73967
  61. package/dist/packages/platform/atoms/calendar-view/CalendarViewComponent.d.ts.map +1 -1
  62. package/dist/packages/platform/atoms/calendar-view/EventTypeCalendarViewComponent.d.ts.map +1 -1
  63. package/dist/packages/platform/atoms/calendar-view/EventTypeCalendarViewComponent.test.d.ts +2 -0
  64. package/dist/packages/platform/atoms/calendar-view/EventTypeCalendarViewComponent.test.d.ts.map +1 -0
  65. package/dist/packages/platform/atoms/calendar-view/components/available-times.d.ts +12 -0
  66. package/dist/packages/platform/atoms/calendar-view/components/available-times.d.ts.map +1 -0
  67. package/dist/packages/platform/atoms/calendar-view/components/available-times.test.d.ts +2 -0
  68. package/dist/packages/platform/atoms/calendar-view/components/available-times.test.d.ts.map +1 -0
  69. package/dist/packages/platform/atoms/calendar-view/components/calendar-shell.d.ts +13 -1
  70. package/dist/packages/platform/atoms/calendar-view/components/calendar-shell.d.ts.map +1 -1
  71. package/dist/packages/platform/atoms/calendar-view/components/calendar-shell.test.d.ts +2 -0
  72. package/dist/packages/platform/atoms/calendar-view/components/calendar-shell.test.d.ts.map +1 -0
  73. package/dist/packages/platform/atoms/calendar-view/components/calendar-timezone-bar.d.ts +2 -1
  74. package/dist/packages/platform/atoms/calendar-view/components/calendar-timezone-bar.d.ts.map +1 -1
  75. package/dist/packages/platform/atoms/calendar-view/components/calendar-view-layout.d.ts +23 -0
  76. package/dist/packages/platform/atoms/calendar-view/components/calendar-view-layout.d.ts.map +1 -0
  77. package/dist/packages/platform/atoms/calendar-view/components/compact-calendar-header.d.ts +8 -0
  78. package/dist/packages/platform/atoms/calendar-view/components/compact-calendar-header.d.ts.map +1 -0
  79. package/dist/packages/platform/atoms/calendar-view/components/compact-calendar-header.test.d.ts +2 -0
  80. package/dist/packages/platform/atoms/calendar-view/components/compact-calendar-header.test.d.ts.map +1 -0
  81. package/dist/packages/platform/atoms/calendar-view/components/scoped-calendar-popover.test.d.ts +2 -0
  82. package/dist/packages/platform/atoms/calendar-view/components/scoped-calendar-popover.test.d.ts.map +1 -0
  83. package/dist/packages/platform/atoms/calendar-view/components/users-busy-times-calendar.d.ts +1 -1
  84. package/dist/packages/platform/atoms/calendar-view/components/users-busy-times-calendar.d.ts.map +1 -1
  85. package/dist/packages/platform/atoms/calendar-view/components/viewer-overlay-calendar.d.ts +1 -1
  86. package/dist/packages/platform/atoms/calendar-view/components/viewer-overlay-calendar.d.ts.map +1 -1
  87. package/dist/packages/platform/atoms/calendar-view/components/viewer-overlay-calendar.test.d.ts +2 -0
  88. package/dist/packages/platform/atoms/calendar-view/components/viewer-overlay-calendar.test.d.ts.map +1 -0
  89. package/dist/packages/platform/atoms/calendar-view/hooks/use-calendar-initial-date.d.ts +6 -2
  90. package/dist/packages/platform/atoms/calendar-view/hooks/use-calendar-initial-date.d.ts.map +1 -1
  91. package/dist/packages/platform/atoms/calendar-view/hooks/use-overlay-bookings.d.ts +170 -0
  92. package/dist/packages/platform/atoms/calendar-view/hooks/use-overlay-bookings.d.ts.map +1 -0
  93. package/dist/packages/platform/atoms/calendar-view/lib/available-calendar-slots.d.ts +10 -0
  94. package/dist/packages/platform/atoms/calendar-view/lib/available-calendar-slots.d.ts.map +1 -0
  95. package/dist/packages/platform/atoms/calendar-view/lib/available-calendar-slots.test.d.ts +2 -0
  96. package/dist/packages/platform/atoms/calendar-view/lib/available-calendar-slots.test.d.ts.map +1 -0
  97. package/dist/packages/platform/atoms/calendar-view/lib/compact-calendar.d.ts +5 -0
  98. package/dist/packages/platform/atoms/calendar-view/lib/compact-calendar.d.ts.map +1 -0
  99. package/dist/packages/platform/atoms/calendar-view/lib/compact-calendar.test.d.ts +2 -0
  100. package/dist/packages/platform/atoms/calendar-view/lib/compact-calendar.test.d.ts.map +1 -0
  101. package/dist/packages/platform/atoms/calendar-view/lib/filter-event-type-slots.d.ts +3 -0
  102. package/dist/packages/platform/atoms/calendar-view/lib/filter-event-type-slots.d.ts.map +1 -0
  103. package/dist/packages/platform/atoms/calendar-view/lib/filter-event-type-slots.test.d.ts +2 -0
  104. package/dist/packages/platform/atoms/calendar-view/lib/filter-event-type-slots.test.d.ts.map +1 -0
  105. package/dist/packages/platform/atoms/calendar-view/lib/overlay-events.d.ts +17 -0
  106. package/dist/packages/platform/atoms/calendar-view/lib/overlay-events.d.ts.map +1 -0
  107. package/dist/packages/platform/atoms/calendar-view/lib/overlay-events.test.d.ts +2 -0
  108. package/dist/packages/platform/atoms/calendar-view/lib/overlay-events.test.d.ts.map +1 -0
  109. package/dist/packages/platform/atoms/calendar-view/wrappers/CalendarViewPlatformWrapper.d.ts +3 -2
  110. package/dist/packages/platform/atoms/calendar-view/wrappers/CalendarViewPlatformWrapper.d.ts.map +1 -1
  111. package/dist/packages/platform/atoms/hooks/use-search-city-timezones.d.ts +9 -0
  112. package/dist/packages/platform/atoms/hooks/use-search-city-timezones.d.ts.map +1 -0
  113. package/dist/packages/platform/atoms/hooks/useAvailableSlots.d.ts.map +1 -1
  114. package/dist/packages/platform/atoms/package.json.d.ts +1 -1
  115. package/dist/packages/platform/atoms/timezone/index.d.ts +1 -1
  116. package/dist/packages/platform/atoms/timezone/index.d.ts.map +1 -1
  117. package/dist/packages/platform/atoms/timezone/index.test.d.ts +2 -0
  118. package/dist/packages/platform/atoms/timezone/index.test.d.ts.map +1 -0
  119. package/dist/packages/platform/atoms/timezone/lib/timezone-search.d.ts +27 -0
  120. package/dist/packages/platform/atoms/timezone/lib/timezone-search.d.ts.map +1 -0
  121. package/dist/packages/platform/atoms/timezone/lib/timezone-search.test.d.ts +2 -0
  122. package/dist/packages/platform/atoms/timezone/lib/timezone-search.test.d.ts.map +1 -0
  123. package/dist/packages/platform/atoms/vite.config.d.ts.map +1 -1
  124. package/dist/{server.browser-8dIAbrZv.js → server.browser-Ccl4uwOy.js} +1 -1
  125. package/dist/{useIsAppEnabled-CVIVp35Y.js → useIsAppEnabled-DHnaBwm2.js} +1 -1
  126. package/package.json +1 -1
  127. package/dist/DateRangePicker-D-ZlM9MR.js +0 -1434
@@ -1,1434 +0,0 @@
1
- import { jsx as c, jsxs as P, Fragment as S } from "react/jsx-runtime";
2
- import { aG as Ke, aH as W, aI as Nn, aJ as Cn, aK as kn, aL as xn, aM as Ve, aN as re, aO as Pn, aP as Ue, aQ as ze, aR as On, aS as $n, aT as Sn, aU as Fn, aV as In, aW as Ln, aX as Wn, aY as N, aZ as V, a_ as ae, a$ as X, b0 as Ee, b1 as En, b2 as Rn, b3 as R, b4 as Tn, b5 as An, b6 as we, b7 as Yn, b8 as Bn, b9 as L, ba as Ze, bb as jn, bc as Hn, bd as Re, y as Z, be as Te, B as Kn } from "./index-BmBjWkT3.js";
3
- import { forwardRef as T, createElement as C, Children as G, isValidElement as ie, cloneElement as Ge, Fragment as Vn, useRef as U, useState as B, useCallback as ve, useEffect as Q, useContext as j, createContext as H, useLayoutEffect as Un, useMemo as zn } from "react";
4
- import Zn from "react-dom";
5
- const Gn = /* @__PURE__ */ T((e, n) => {
6
- var t;
7
- const { container: r = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...o } = e;
8
- return r ? /* @__PURE__ */ Zn.createPortal(/* @__PURE__ */ C(Ke.div, W({}, o, {
9
- ref: n
10
- })), r) : null;
11
- }), Xe = /* @__PURE__ */ T((e, n) => {
12
- const { children: t, ...r } = e, o = G.toArray(t), a = o.find(qn);
13
- if (a) {
14
- const i = a.props.children, l = o.map((s) => s === a ? G.count(i) > 1 ? G.only(null) : /* @__PURE__ */ ie(i) ? i.props.children : null : s);
15
- return /* @__PURE__ */ C(_e, W({}, r, {
16
- ref: n
17
- }), /* @__PURE__ */ ie(i) ? /* @__PURE__ */ Ge(i, void 0, l) : null);
18
- }
19
- return /* @__PURE__ */ C(_e, W({}, r, {
20
- ref: n
21
- }), t);
22
- });
23
- Xe.displayName = "Slot";
24
- const _e = /* @__PURE__ */ T((e, n) => {
25
- const { children: t, ...r } = e;
26
- return /* @__PURE__ */ ie(t) ? /* @__PURE__ */ Ge(t, {
27
- ...Jn(r, t.props),
28
- ref: n ? Nn(n, t.ref) : t.ref
29
- }) : G.count(t) > 1 ? G.only(null) : null;
30
- });
31
- _e.displayName = "SlotClone";
32
- const Xn = ({ children: e }) => /* @__PURE__ */ C(Vn, null, e);
33
- function qn(e) {
34
- return /* @__PURE__ */ ie(e) && e.type === Xn;
35
- }
36
- function Jn(e, n) {
37
- const t = {
38
- ...n
39
- };
40
- for (const r in n) {
41
- const o = e[r], a = n[r];
42
- /^on[A-Z]/.test(r) ? o && a ? t[r] = (...l) => {
43
- a(...l), o(...l);
44
- } : o && (t[r] = o) : r === "style" ? t[r] = {
45
- ...o,
46
- ...a
47
- } : r === "className" && (t[r] = [
48
- o,
49
- a
50
- ].filter(Boolean).join(" "));
51
- }
52
- return {
53
- ...e,
54
- ...t
55
- };
56
- }
57
- const qe = "Popover", [Je] = Sn(qe, [
58
- ze
59
- ]), Ne = ze(), [Qn, z] = Je(qe), et = (e) => {
60
- const { __scopePopover: n, children: t, open: r, defaultOpen: o, onOpenChange: a, modal: i = !1 } = e, l = Ne(n), s = U(null), [u, d] = B(!1), [f = !1, v] = Cn({
61
- prop: r,
62
- defaultProp: o,
63
- onChange: a
64
- });
65
- return /* @__PURE__ */ C(kn, l, /* @__PURE__ */ C(Qn, {
66
- scope: n,
67
- contentId: xn(),
68
- triggerRef: s,
69
- open: f,
70
- onOpenChange: v,
71
- onOpenToggle: ve(
72
- () => v(
73
- (h) => !h
74
- ),
75
- [
76
- v
77
- ]
78
- ),
79
- hasCustomAnchor: u,
80
- onCustomAnchorAdd: ve(
81
- () => d(!0),
82
- []
83
- ),
84
- onCustomAnchorRemove: ve(
85
- () => d(!1),
86
- []
87
- ),
88
- modal: i
89
- }, t));
90
- }, nt = "PopoverTrigger", tt = /* @__PURE__ */ T((e, n) => {
91
- const { __scopePopover: t, ...r } = e, o = z(nt, t), a = Ne(t), i = Ve(n, o.triggerRef), l = /* @__PURE__ */ C(Ke.button, W({
92
- type: "button",
93
- "aria-haspopup": "dialog",
94
- "aria-expanded": o.open,
95
- "aria-controls": o.contentId,
96
- "data-state": nn(o.open)
97
- }, r, {
98
- ref: i,
99
- onClick: re(e.onClick, o.onOpenToggle)
100
- }));
101
- return o.hasCustomAnchor ? l : /* @__PURE__ */ C(Pn, W({
102
- asChild: !0
103
- }, a), l);
104
- }), Qe = "PopoverPortal", [rt, ot] = Je(Qe, {
105
- forceMount: void 0
106
- }), at = (e) => {
107
- const { __scopePopover: n, forceMount: t, children: r, container: o } = e, a = z(Qe, n);
108
- return /* @__PURE__ */ C(rt, {
109
- scope: n,
110
- forceMount: t
111
- }, /* @__PURE__ */ C(Ue, {
112
- present: t || a.open
113
- }, /* @__PURE__ */ C(Gn, {
114
- asChild: !0,
115
- container: o
116
- }, r)));
117
- }, q = "PopoverContent", it = /* @__PURE__ */ T((e, n) => {
118
- const t = ot(q, e.__scopePopover), { forceMount: r = t.forceMount, ...o } = e, a = z(q, e.__scopePopover);
119
- return /* @__PURE__ */ C(Ue, {
120
- present: r || a.open
121
- }, a.modal ? /* @__PURE__ */ C(lt, W({}, o, {
122
- ref: n
123
- })) : /* @__PURE__ */ C(st, W({}, o, {
124
- ref: n
125
- })));
126
- }), lt = /* @__PURE__ */ T((e, n) => {
127
- const t = z(q, e.__scopePopover), r = U(null), o = Ve(n, r), a = U(!1);
128
- return Q(() => {
129
- const i = r.current;
130
- if (i) return On(i);
131
- }, []), /* @__PURE__ */ C($n, {
132
- as: Xe,
133
- allowPinchZoom: !0
134
- }, /* @__PURE__ */ C(en, W({}, e, {
135
- ref: o,
136
- trapFocus: t.open,
137
- disableOutsidePointerEvents: !0,
138
- onCloseAutoFocus: re(e.onCloseAutoFocus, (i) => {
139
- var l;
140
- i.preventDefault(), a.current || (l = t.triggerRef.current) === null || l === void 0 || l.focus();
141
- }),
142
- onPointerDownOutside: re(e.onPointerDownOutside, (i) => {
143
- const l = i.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0, u = l.button === 2 || s;
144
- a.current = u;
145
- }, {
146
- checkForDefaultPrevented: !1
147
- }),
148
- onFocusOutside: re(
149
- e.onFocusOutside,
150
- (i) => i.preventDefault(),
151
- {
152
- checkForDefaultPrevented: !1
153
- }
154
- )
155
- })));
156
- }), st = /* @__PURE__ */ T((e, n) => {
157
- const t = z(q, e.__scopePopover), r = U(!1), o = U(!1);
158
- return /* @__PURE__ */ C(en, W({}, e, {
159
- ref: n,
160
- trapFocus: !1,
161
- disableOutsidePointerEvents: !1,
162
- onCloseAutoFocus: (a) => {
163
- var i;
164
- if ((i = e.onCloseAutoFocus) === null || i === void 0 || i.call(e, a), !a.defaultPrevented) {
165
- var l;
166
- r.current || (l = t.triggerRef.current) === null || l === void 0 || l.focus(), a.preventDefault();
167
- }
168
- r.current = !1, o.current = !1;
169
- },
170
- onInteractOutside: (a) => {
171
- var i, l;
172
- (i = e.onInteractOutside) === null || i === void 0 || i.call(e, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
173
- const s = a.target;
174
- ((l = t.triggerRef.current) === null || l === void 0 ? void 0 : l.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
175
- }
176
- }));
177
- }), en = /* @__PURE__ */ T((e, n) => {
178
- const { __scopePopover: t, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, disableOutsidePointerEvents: i, onEscapeKeyDown: l, onPointerDownOutside: s, onFocusOutside: u, onInteractOutside: d, ...f } = e, v = z(q, t), h = Ne(t);
179
- return Fn(), /* @__PURE__ */ C(In, {
180
- asChild: !0,
181
- loop: !0,
182
- trapped: r,
183
- onMountAutoFocus: o,
184
- onUnmountAutoFocus: a
185
- }, /* @__PURE__ */ C(Ln, {
186
- asChild: !0,
187
- disableOutsidePointerEvents: i,
188
- onInteractOutside: d,
189
- onEscapeKeyDown: l,
190
- onPointerDownOutside: s,
191
- onFocusOutside: u,
192
- onDismiss: () => v.onOpenChange(!1)
193
- }, /* @__PURE__ */ C(Wn, W({
194
- "data-state": nn(v.open),
195
- role: "dialog",
196
- id: v.contentId
197
- }, h, f, {
198
- ref: n,
199
- style: {
200
- ...f.style,
201
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
202
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
203
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
204
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
205
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
206
- }
207
- }))));
208
- });
209
- function nn(e) {
210
- return e ? "open" : "closed";
211
- }
212
- const ct = et, dt = tt, ut = at, ft = it;
213
- function k(e, n) {
214
- const t = N(e);
215
- return isNaN(n) ? V(e, NaN) : (n && t.setDate(t.getDate() + n), t);
216
- }
217
- function F(e, n) {
218
- const t = N(e);
219
- if (isNaN(n)) return V(e, NaN);
220
- if (!n)
221
- return t;
222
- const r = t.getDate(), o = V(e, t.getTime());
223
- o.setMonth(t.getMonth() + n + 1, 0);
224
- const a = o.getDate();
225
- return r >= a ? o : (t.setFullYear(
226
- o.getFullYear(),
227
- o.getMonth(),
228
- r
229
- ), t);
230
- }
231
- function De(e, n) {
232
- const t = n * 7;
233
- return k(e, t);
234
- }
235
- function vt(e, n) {
236
- return F(e, n * 12);
237
- }
238
- function ht(e) {
239
- let n;
240
- return e.forEach(function(t) {
241
- const r = N(t);
242
- (n === void 0 || n < r || isNaN(Number(r))) && (n = r);
243
- }), n || /* @__PURE__ */ new Date(NaN);
244
- }
245
- function mt(e) {
246
- let n;
247
- return e.forEach((t) => {
248
- const r = N(t);
249
- (!n || n > r || isNaN(+r)) && (n = r);
250
- }), n || /* @__PURE__ */ new Date(NaN);
251
- }
252
- function x(e, n) {
253
- const t = ae(e), r = ae(n);
254
- return +t == +r;
255
- }
256
- function J(e, n) {
257
- const t = N(e), r = N(n), o = t.getFullYear() - r.getFullYear(), a = t.getMonth() - r.getMonth();
258
- return o * 12 + a;
259
- }
260
- function pt(e, n, t) {
261
- const r = X(e, t), o = X(n, t), a = +r - Ee(r), i = +o - Ee(o);
262
- return Math.round((a - i) / En);
263
- }
264
- function Ce(e) {
265
- const n = N(e), t = n.getMonth();
266
- return n.setFullYear(n.getFullYear(), t + 1, 0), n.setHours(23, 59, 59, 999), n;
267
- }
268
- function O(e) {
269
- const n = N(e);
270
- return n.setDate(1), n.setHours(0, 0, 0, 0), n;
271
- }
272
- function ke(e, n) {
273
- var l, s, u, d;
274
- const t = Rn(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((s = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : s.weekStartsOn) ?? t.weekStartsOn ?? ((d = (u = t.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = N(e), a = o.getDay(), i = (a < r ? -7 : 0) + 6 - (a - r);
275
- return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
276
- }
277
- function tn(e) {
278
- return ke(e, { weekStartsOn: 1 });
279
- }
280
- function bt(e) {
281
- const n = N(e), t = n.getFullYear(), r = n.getMonth(), o = V(e, 0);
282
- return o.setFullYear(t, r + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
283
- }
284
- function yt(e) {
285
- return Math.trunc(+N(e) / 1e3);
286
- }
287
- function gt(e) {
288
- const n = N(e), t = n.getMonth();
289
- return n.setFullYear(n.getFullYear(), t + 1, 0), n.setHours(0, 0, 0, 0), n;
290
- }
291
- function _t(e, n) {
292
- return pt(
293
- gt(e),
294
- O(e),
295
- n
296
- ) + 1;
297
- }
298
- function Me(e, n) {
299
- const t = N(e), r = N(n);
300
- return t.getTime() > r.getTime();
301
- }
302
- function xe(e, n) {
303
- const t = N(e), r = N(n);
304
- return +t < +r;
305
- }
306
- function Pe(e, n) {
307
- const t = N(e), r = N(n);
308
- return t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth();
309
- }
310
- function Dt(e, n) {
311
- const t = N(e), r = N(n);
312
- return t.getFullYear() === r.getFullYear();
313
- }
314
- function he(e, n) {
315
- return k(e, -n);
316
- }
317
- function me(e, n) {
318
- const t = N(e), r = t.getFullYear(), o = t.getDate(), a = V(e, 0);
319
- a.setFullYear(r, n, 15), a.setHours(0, 0, 0, 0);
320
- const i = bt(a);
321
- return t.setMonth(n, Math.min(o, i)), t;
322
- }
323
- function Ae(e, n) {
324
- const t = N(e);
325
- return isNaN(+t) ? V(e, NaN) : (t.setFullYear(n), t);
326
- }
327
- var b = function() {
328
- return b = Object.assign || function(n) {
329
- for (var t, r = 1, o = arguments.length; r < o; r++) {
330
- t = arguments[r];
331
- for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (n[a] = t[a]);
332
- }
333
- return n;
334
- }, b.apply(this, arguments);
335
- };
336
- function Mt(e, n) {
337
- var t = {};
338
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
339
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
340
- for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
341
- n.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (t[r[o]] = e[r[o]]);
342
- return t;
343
- }
344
- function rn(e, n, t) {
345
- for (var r = 0, o = n.length, a; r < o; r++)
346
- (a || !(r in n)) && (a || (a = Array.prototype.slice.call(n, 0, r)), a[r] = n[r]);
347
- return e.concat(a || Array.prototype.slice.call(n));
348
- }
349
- function ee(e) {
350
- return e.mode === "multiple";
351
- }
352
- function ne(e) {
353
- return e.mode === "range";
354
- }
355
- function se(e) {
356
- return e.mode === "single";
357
- }
358
- var wt = {
359
- root: "rdp",
360
- multiple_months: "rdp-multiple_months",
361
- with_weeknumber: "rdp-with_weeknumber",
362
- vhidden: "rdp-vhidden",
363
- button_reset: "rdp-button_reset",
364
- button: "rdp-button",
365
- caption: "rdp-caption",
366
- caption_start: "rdp-caption_start",
367
- caption_end: "rdp-caption_end",
368
- caption_between: "rdp-caption_between",
369
- caption_label: "rdp-caption_label",
370
- caption_dropdowns: "rdp-caption_dropdowns",
371
- dropdown: "rdp-dropdown",
372
- dropdown_month: "rdp-dropdown_month",
373
- dropdown_year: "rdp-dropdown_year",
374
- dropdown_icon: "rdp-dropdown_icon",
375
- months: "rdp-months",
376
- month: "rdp-month",
377
- table: "rdp-table",
378
- tbody: "rdp-tbody",
379
- tfoot: "rdp-tfoot",
380
- head: "rdp-head",
381
- head_row: "rdp-head_row",
382
- head_cell: "rdp-head_cell",
383
- nav: "rdp-nav",
384
- nav_button: "rdp-nav_button",
385
- nav_button_previous: "rdp-nav_button_previous",
386
- nav_button_next: "rdp-nav_button_next",
387
- nav_icon: "rdp-nav_icon",
388
- row: "rdp-row",
389
- weeknumber: "rdp-weeknumber",
390
- cell: "rdp-cell",
391
- day: "rdp-day",
392
- day_today: "rdp-day_today",
393
- day_outside: "rdp-day_outside",
394
- day_selected: "rdp-day_selected",
395
- day_disabled: "rdp-day_disabled",
396
- day_hidden: "rdp-day_hidden",
397
- day_range_start: "rdp-day_range_start",
398
- day_range_end: "rdp-day_range_end",
399
- day_range_middle: "rdp-day_range_middle"
400
- };
401
- function Nt(e, n) {
402
- return L(e, "LLLL y", n);
403
- }
404
- function Ct(e, n) {
405
- return L(e, "d", n);
406
- }
407
- function kt(e, n) {
408
- return L(e, "LLLL", n);
409
- }
410
- function xt(e) {
411
- return "".concat(e);
412
- }
413
- function Pt(e, n) {
414
- return L(e, "cccccc", n);
415
- }
416
- function Ot(e, n) {
417
- return L(e, "yyyy", n);
418
- }
419
- var $t = /* @__PURE__ */ Object.freeze({
420
- __proto__: null,
421
- formatCaption: Nt,
422
- formatDay: Ct,
423
- formatMonthCaption: kt,
424
- formatWeekNumber: xt,
425
- formatWeekdayName: Pt,
426
- formatYearCaption: Ot
427
- }), St = function(e, n, t) {
428
- return L(e, "do MMMM (EEEE)", t);
429
- }, Ft = function() {
430
- return "Month: ";
431
- }, It = function() {
432
- return "Go to next month";
433
- }, Lt = function() {
434
- return "Go to previous month";
435
- }, Wt = function(e, n) {
436
- return L(e, "cccc", n);
437
- }, Et = function(e) {
438
- return "Week n. ".concat(e);
439
- }, Rt = function() {
440
- return "Year: ";
441
- }, Tt = /* @__PURE__ */ Object.freeze({
442
- __proto__: null,
443
- labelDay: St,
444
- labelMonthDropdown: Ft,
445
- labelNext: It,
446
- labelPrevious: Lt,
447
- labelWeekNumber: Et,
448
- labelWeekday: Wt,
449
- labelYearDropdown: Rt
450
- });
451
- function At() {
452
- var e = "buttons", n = wt, t = Tn, r = {}, o = {}, a = 1, i = {}, l = /* @__PURE__ */ new Date();
453
- return {
454
- captionLayout: e,
455
- classNames: n,
456
- formatters: $t,
457
- labels: Tt,
458
- locale: t,
459
- modifiersClassNames: r,
460
- modifiers: o,
461
- numberOfMonths: a,
462
- styles: i,
463
- today: l,
464
- mode: "default"
465
- };
466
- }
467
- function Yt(e) {
468
- var n = e.fromYear, t = e.toYear, r = e.fromMonth, o = e.toMonth, a = e.fromDate, i = e.toDate;
469
- return r ? a = O(r) : n && (a = new Date(n, 0, 1)), o ? i = Ce(o) : t && (i = new Date(t, 11, 31)), {
470
- fromDate: a ? ae(a) : void 0,
471
- toDate: i ? ae(i) : void 0
472
- };
473
- }
474
- var on = H(void 0);
475
- function Bt(e) {
476
- var n, t = e.initialProps, r = At(), o = Yt(t), a = o.fromDate, i = o.toDate, l = (n = t.captionLayout) !== null && n !== void 0 ? n : r.captionLayout;
477
- l !== "buttons" && (!a || !i) && (l = "buttons");
478
- var s;
479
- (se(t) || ee(t) || ne(t)) && (s = t.onSelect);
480
- var u = b(b(b({}, r), t), { captionLayout: l, classNames: b(b({}, r.classNames), t.classNames), components: b({}, t.components), formatters: b(b({}, r.formatters), t.formatters), fromDate: a, labels: b(b({}, r.labels), t.labels), mode: t.mode || r.mode, modifiers: b(b({}, r.modifiers), t.modifiers), modifiersClassNames: b(b({}, r.modifiersClassNames), t.modifiersClassNames), onSelect: s, styles: b(b({}, r.styles), t.styles), toDate: i });
481
- return c(on.Provider, { value: u, children: e.children });
482
- }
483
- function D() {
484
- var e = j(on);
485
- if (!e)
486
- throw new Error("useDayPicker must be used within a DayPickerProvider.");
487
- return e;
488
- }
489
- function an(e) {
490
- var n = D(), t = n.locale, r = n.classNames, o = n.styles, a = n.formatters.formatCaption;
491
- return c("div", { className: r.caption_label, style: o.caption_label, "aria-live": "polite", role: "presentation", id: e.id, children: a(e.displayMonth, { locale: t }) });
492
- }
493
- function jt(e) {
494
- return c("svg", b({ width: "8px", height: "8px", viewBox: "0 0 120 120", "data-testid": "iconDropdown" }, e, { children: c("path", { d: "M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z", fill: "currentColor", fillRule: "nonzero" }) }));
495
- }
496
- function ln(e) {
497
- var n, t, r = e.onChange, o = e.value, a = e.children, i = e.caption, l = e.className, s = e.style, u = D(), d = (t = (n = u.components) === null || n === void 0 ? void 0 : n.IconDropdown) !== null && t !== void 0 ? t : jt;
498
- return P("div", { className: l, style: s, children: [c("span", { className: u.classNames.vhidden, children: e["aria-label"] }), c("select", { name: e.name, "aria-label": e["aria-label"], className: u.classNames.dropdown, style: u.styles.dropdown, value: o, onChange: r, children: a }), P("div", { className: u.classNames.caption_label, style: u.styles.caption_label, "aria-hidden": "true", children: [i, c(d, { className: u.classNames.dropdown_icon, style: u.styles.dropdown_icon })] })] });
499
- }
500
- function Ht(e) {
501
- var n, t = D(), r = t.fromDate, o = t.toDate, a = t.styles, i = t.locale, l = t.formatters.formatMonthCaption, s = t.classNames, u = t.components, d = t.labels.labelMonthDropdown;
502
- if (!r)
503
- return c(S, {});
504
- if (!o)
505
- return c(S, {});
506
- var f = [];
507
- if (Dt(r, o))
508
- for (var v = O(r), h = r.getMonth(); h <= o.getMonth(); h++)
509
- f.push(me(v, h));
510
- else
511
- for (var v = O(/* @__PURE__ */ new Date()), h = 0; h <= 11; h++)
512
- f.push(me(v, h));
513
- var p = function(g) {
514
- var w = Number(g.target.value), M = me(O(e.displayMonth), w);
515
- e.onChange(M);
516
- }, _ = (n = u == null ? void 0 : u.Dropdown) !== null && n !== void 0 ? n : ln;
517
- return c(_, { name: "months", "aria-label": d(), className: s.dropdown_month, style: a.dropdown_month, onChange: p, value: e.displayMonth.getMonth(), caption: l(e.displayMonth, { locale: i }), children: f.map(function(g) {
518
- return c("option", { value: g.getMonth(), children: l(g, { locale: i }) }, g.getMonth());
519
- }) });
520
- }
521
- function Kt(e) {
522
- var n, t = e.displayMonth, r = D(), o = r.fromDate, a = r.toDate, i = r.locale, l = r.styles, s = r.classNames, u = r.components, d = r.formatters.formatYearCaption, f = r.labels.labelYearDropdown, v = [];
523
- if (!o)
524
- return c(S, {});
525
- if (!a)
526
- return c(S, {});
527
- for (var h = o.getFullYear(), p = a.getFullYear(), _ = h; _ <= p; _++)
528
- v.push(Ae(An(/* @__PURE__ */ new Date()), _));
529
- var g = function(M) {
530
- var A = Ae(O(t), Number(M.target.value));
531
- e.onChange(A);
532
- }, w = (n = u == null ? void 0 : u.Dropdown) !== null && n !== void 0 ? n : ln;
533
- return c(w, { name: "years", "aria-label": f(), className: s.dropdown_year, style: l.dropdown_year, onChange: g, value: t.getFullYear(), caption: d(t, { locale: i }), children: v.map(function(M) {
534
- return c("option", { value: M.getFullYear(), children: d(M, { locale: i }) }, M.getFullYear());
535
- }) });
536
- }
537
- function Vt(e, n) {
538
- var t = B(e), r = t[0], o = t[1], a = n === void 0 ? r : n;
539
- return [a, o];
540
- }
541
- function Ut(e) {
542
- var n = e.month, t = e.defaultMonth, r = e.today, o = n || t || r || /* @__PURE__ */ new Date(), a = e.toDate, i = e.fromDate, l = e.numberOfMonths, s = l === void 0 ? 1 : l;
543
- if (a && J(a, o) < 0) {
544
- var u = -1 * (s - 1);
545
- o = F(a, u);
546
- }
547
- return i && J(o, i) < 0 && (o = i), O(o);
548
- }
549
- function zt() {
550
- var e = D(), n = Ut(e), t = Vt(n, e.month), r = t[0], o = t[1], a = function(i) {
551
- var l;
552
- if (!e.disableNavigation) {
553
- var s = O(i);
554
- o(s), (l = e.onMonthChange) === null || l === void 0 || l.call(e, s);
555
- }
556
- };
557
- return [r, a];
558
- }
559
- function Zt(e, n) {
560
- for (var t = n.reverseMonths, r = n.numberOfMonths, o = O(e), a = O(F(o, r)), i = J(a, o), l = [], s = 0; s < i; s++) {
561
- var u = F(o, s);
562
- l.push(u);
563
- }
564
- return t && (l = l.reverse()), l;
565
- }
566
- function Gt(e, n) {
567
- if (!n.disableNavigation) {
568
- var t = n.toDate, r = n.pagedNavigation, o = n.numberOfMonths, a = o === void 0 ? 1 : o, i = r ? a : 1, l = O(e);
569
- if (!t)
570
- return F(l, i);
571
- var s = J(t, e);
572
- if (!(s < a))
573
- return F(l, i);
574
- }
575
- }
576
- function Xt(e, n) {
577
- if (!n.disableNavigation) {
578
- var t = n.fromDate, r = n.pagedNavigation, o = n.numberOfMonths, a = o === void 0 ? 1 : o, i = r ? a : 1, l = O(e);
579
- if (!t)
580
- return F(l, -i);
581
- var s = J(l, t);
582
- if (!(s <= 0))
583
- return F(l, -i);
584
- }
585
- }
586
- var sn = H(void 0);
587
- function qt(e) {
588
- var n = D(), t = zt(), r = t[0], o = t[1], a = Zt(r, n), i = Gt(r, n), l = Xt(r, n), s = function(f) {
589
- return a.some(function(v) {
590
- return Pe(f, v);
591
- });
592
- }, u = function(f, v) {
593
- s(f) || (v && xe(f, v) ? o(F(f, 1 + n.numberOfMonths * -1)) : o(f));
594
- }, d = {
595
- currentMonth: r,
596
- displayMonths: a,
597
- goToMonth: o,
598
- goToDate: u,
599
- previousMonth: l,
600
- nextMonth: i,
601
- isDateDisplayed: s
602
- };
603
- return c(sn.Provider, { value: d, children: e.children });
604
- }
605
- function te() {
606
- var e = j(sn);
607
- if (!e)
608
- throw new Error("useNavigation must be used within a NavigationProvider");
609
- return e;
610
- }
611
- function Ye(e) {
612
- var n, t = D(), r = t.classNames, o = t.styles, a = t.components, i = te().goToMonth, l = function(d) {
613
- i(F(d, e.displayIndex ? -e.displayIndex : 0));
614
- }, s = (n = a == null ? void 0 : a.CaptionLabel) !== null && n !== void 0 ? n : an, u = c(s, { id: e.id, displayMonth: e.displayMonth });
615
- return P("div", { className: r.caption_dropdowns, style: o.caption_dropdowns, children: [c("div", { className: r.vhidden, children: u }), c(Ht, { onChange: l, displayMonth: e.displayMonth }), c(Kt, { onChange: l, displayMonth: e.displayMonth })] });
616
- }
617
- function Jt(e) {
618
- return c("svg", b({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: c("path", { d: "M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z", fill: "currentColor", fillRule: "nonzero" }) }));
619
- }
620
- function Qt(e) {
621
- return c("svg", b({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: c("path", { d: "M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z", fill: "currentColor" }) }));
622
- }
623
- var le = T(function(e, n) {
624
- var t = D(), r = t.classNames, o = t.styles, a = [r.button_reset, r.button];
625
- e.className && a.push(e.className);
626
- var i = a.join(" "), l = b(b({}, o.button_reset), o.button);
627
- return e.style && Object.assign(l, e.style), c("button", b({}, e, { ref: n, type: "button", className: i, style: l }));
628
- });
629
- function er(e) {
630
- var n, t, r = D(), o = r.dir, a = r.locale, i = r.classNames, l = r.styles, s = r.labels, u = s.labelPrevious, d = s.labelNext, f = r.components;
631
- if (!e.nextMonth && !e.previousMonth)
632
- return c(S, {});
633
- var v = u(e.previousMonth, { locale: a }), h = [
634
- i.nav_button,
635
- i.nav_button_previous
636
- ].join(" "), p = d(e.nextMonth, { locale: a }), _ = [
637
- i.nav_button,
638
- i.nav_button_next
639
- ].join(" "), g = (n = f == null ? void 0 : f.IconRight) !== null && n !== void 0 ? n : Qt, w = (t = f == null ? void 0 : f.IconLeft) !== null && t !== void 0 ? t : Jt;
640
- return P("div", { className: i.nav, style: l.nav, children: [!e.hidePrevious && c(le, { name: "previous-month", "aria-label": v, className: h, style: l.nav_button_previous, disabled: !e.previousMonth, onClick: e.onPreviousClick, children: o === "rtl" ? c(g, { className: i.nav_icon, style: l.nav_icon }) : c(w, { className: i.nav_icon, style: l.nav_icon }) }), !e.hideNext && c(le, { name: "next-month", "aria-label": p, className: _, style: l.nav_button_next, disabled: !e.nextMonth, onClick: e.onNextClick, children: o === "rtl" ? c(w, { className: i.nav_icon, style: l.nav_icon }) : c(g, { className: i.nav_icon, style: l.nav_icon }) })] });
641
- }
642
- function Be(e) {
643
- var n = D().numberOfMonths, t = te(), r = t.previousMonth, o = t.nextMonth, a = t.goToMonth, i = t.displayMonths, l = i.findIndex(function(p) {
644
- return Pe(e.displayMonth, p);
645
- }), s = l === 0, u = l === i.length - 1, d = n > 1 && (s || !u), f = n > 1 && (u || !s), v = function() {
646
- r && a(r);
647
- }, h = function() {
648
- o && a(o);
649
- };
650
- return c(er, { displayMonth: e.displayMonth, hideNext: d, hidePrevious: f, nextMonth: o, previousMonth: r, onPreviousClick: v, onNextClick: h });
651
- }
652
- function nr(e) {
653
- var n, t = D(), r = t.classNames, o = t.disableNavigation, a = t.styles, i = t.captionLayout, l = t.components, s = (n = l == null ? void 0 : l.CaptionLabel) !== null && n !== void 0 ? n : an, u;
654
- return o ? u = c(s, { id: e.id, displayMonth: e.displayMonth }) : i === "dropdown" ? u = c(Ye, { displayMonth: e.displayMonth, id: e.id }) : i === "dropdown-buttons" ? u = P(S, { children: [c(Ye, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), c(Be, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : u = P(S, { children: [c(s, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), c(Be, { displayMonth: e.displayMonth, id: e.id })] }), c("div", { className: r.caption, style: a.caption, children: u });
655
- }
656
- function tr(e) {
657
- var n = D(), t = n.footer, r = n.styles, o = n.classNames.tfoot;
658
- return t ? c("tfoot", { className: o, style: r.tfoot, children: c("tr", { children: c("td", { colSpan: 8, children: t }) }) }) : c(S, {});
659
- }
660
- function rr(e, n, t) {
661
- for (var r = t ? we(/* @__PURE__ */ new Date()) : X(/* @__PURE__ */ new Date(), { locale: e, weekStartsOn: n }), o = [], a = 0; a < 7; a++) {
662
- var i = k(r, a);
663
- o.push(i);
664
- }
665
- return o;
666
- }
667
- function or() {
668
- var e = D(), n = e.classNames, t = e.styles, r = e.showWeekNumber, o = e.locale, a = e.weekStartsOn, i = e.ISOWeek, l = e.formatters.formatWeekdayName, s = e.labels.labelWeekday, u = rr(o, a, i);
669
- return P("tr", { style: t.head_row, className: n.head_row, children: [r && c("td", { style: t.head_cell, className: n.head_cell }), u.map(function(d, f) {
670
- return c("th", { scope: "col", className: n.head_cell, style: t.head_cell, "aria-label": s(d, { locale: o }), children: l(d, { locale: o }) }, f);
671
- })] });
672
- }
673
- function ar() {
674
- var e, n = D(), t = n.classNames, r = n.styles, o = n.components, a = (e = o == null ? void 0 : o.HeadRow) !== null && e !== void 0 ? e : or;
675
- return c("thead", { style: r.head, className: t.head, children: c(a, {}) });
676
- }
677
- function ir(e) {
678
- var n = D(), t = n.locale, r = n.formatters.formatDay;
679
- return c(S, { children: r(e.date, { locale: t }) });
680
- }
681
- var Oe = H(void 0);
682
- function lr(e) {
683
- if (!ee(e.initialProps)) {
684
- var n = {
685
- selected: void 0,
686
- modifiers: {
687
- disabled: []
688
- }
689
- };
690
- return c(Oe.Provider, { value: n, children: e.children });
691
- }
692
- return c(sr, { initialProps: e.initialProps, children: e.children });
693
- }
694
- function sr(e) {
695
- var n = e.initialProps, t = e.children, r = n.selected, o = n.min, a = n.max, i = function(u, d, f) {
696
- var v, h;
697
- (v = n.onDayClick) === null || v === void 0 || v.call(n, u, d, f);
698
- var p = !!(d.selected && o && (r == null ? void 0 : r.length) === o);
699
- if (!p) {
700
- var _ = !!(!d.selected && a && (r == null ? void 0 : r.length) === a);
701
- if (!_) {
702
- var g = r ? rn([], r) : [];
703
- if (d.selected) {
704
- var w = g.findIndex(function(M) {
705
- return x(u, M);
706
- });
707
- g.splice(w, 1);
708
- } else
709
- g.push(u);
710
- (h = n.onSelect) === null || h === void 0 || h.call(n, g, u, d, f);
711
- }
712
- }
713
- }, l = {
714
- disabled: []
715
- };
716
- r && l.disabled.push(function(u) {
717
- var d = a && r.length > a - 1, f = r.some(function(v) {
718
- return x(v, u);
719
- });
720
- return !!(d && !f);
721
- });
722
- var s = {
723
- selected: r,
724
- onDayClick: i,
725
- modifiers: l
726
- };
727
- return c(Oe.Provider, { value: s, children: t });
728
- }
729
- function $e() {
730
- var e = j(Oe);
731
- if (!e)
732
- throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");
733
- return e;
734
- }
735
- function cr(e, n) {
736
- var t = n || {}, r = t.from, o = t.to;
737
- return r && o ? x(o, e) && x(r, e) ? void 0 : x(o, e) ? { from: o, to: void 0 } : x(r, e) ? void 0 : Me(r, e) ? { from: e, to: o } : { from: r, to: e } : o ? Me(e, o) ? { from: o, to: e } : { from: e, to: o } : r ? xe(e, r) ? { from: e, to: r } : { from: r, to: e } : { from: e, to: void 0 };
738
- }
739
- var Se = H(void 0);
740
- function dr(e) {
741
- if (!ne(e.initialProps)) {
742
- var n = {
743
- selected: void 0,
744
- modifiers: {
745
- range_start: [],
746
- range_end: [],
747
- range_middle: [],
748
- disabled: []
749
- }
750
- };
751
- return c(Se.Provider, { value: n, children: e.children });
752
- }
753
- return c(ur, { initialProps: e.initialProps, children: e.children });
754
- }
755
- function ur(e) {
756
- var n = e.initialProps, t = e.children, r = n.selected, o = r || {}, a = o.from, i = o.to, l = n.min, s = n.max, u = function(h, p, _) {
757
- var g, w;
758
- (g = n.onDayClick) === null || g === void 0 || g.call(n, h, p, _);
759
- var M = cr(h, r);
760
- (w = n.onSelect) === null || w === void 0 || w.call(n, M, h, p, _);
761
- }, d = {
762
- range_start: [],
763
- range_end: [],
764
- range_middle: [],
765
- disabled: []
766
- };
767
- if (a ? (d.range_start = [a], i ? (d.range_end = [i], x(a, i) || (d.range_middle = [
768
- {
769
- after: a,
770
- before: i
771
- }
772
- ])) : d.range_end = [a]) : i && (d.range_start = [i], d.range_end = [i]), l && (a && !i && d.disabled.push({
773
- after: he(a, l - 1),
774
- before: k(a, l - 1)
775
- }), a && i && d.disabled.push({
776
- after: a,
777
- before: k(a, l - 1)
778
- }), !a && i && d.disabled.push({
779
- after: he(i, l - 1),
780
- before: k(i, l - 1)
781
- })), s) {
782
- if (a && !i && (d.disabled.push({
783
- before: k(a, -s + 1)
784
- }), d.disabled.push({
785
- after: k(a, s - 1)
786
- })), a && i) {
787
- var f = R(i, a) + 1, v = s - f;
788
- d.disabled.push({
789
- before: he(a, v)
790
- }), d.disabled.push({
791
- after: k(i, v)
792
- });
793
- }
794
- !a && i && (d.disabled.push({
795
- before: k(i, -s + 1)
796
- }), d.disabled.push({
797
- after: k(i, s - 1)
798
- }));
799
- }
800
- return c(Se.Provider, { value: { selected: r, onDayClick: u, modifiers: d }, children: t });
801
- }
802
- function Fe() {
803
- var e = j(Se);
804
- if (!e)
805
- throw new Error("useSelectRange must be used within a SelectRangeProvider");
806
- return e;
807
- }
808
- function oe(e) {
809
- return Array.isArray(e) ? rn([], e) : e !== void 0 ? [e] : [];
810
- }
811
- function fr(e) {
812
- var n = {};
813
- return Object.entries(e).forEach(function(t) {
814
- var r = t[0], o = t[1];
815
- n[r] = oe(o);
816
- }), n;
817
- }
818
- var I;
819
- (function(e) {
820
- e.Outside = "outside", e.Disabled = "disabled", e.Selected = "selected", e.Hidden = "hidden", e.Today = "today", e.RangeStart = "range_start", e.RangeEnd = "range_end", e.RangeMiddle = "range_middle";
821
- })(I || (I = {}));
822
- var vr = I.Selected, E = I.Disabled, hr = I.Hidden, mr = I.Today, pe = I.RangeEnd, be = I.RangeMiddle, ye = I.RangeStart, pr = I.Outside;
823
- function br(e, n, t) {
824
- var r, o = (r = {}, r[vr] = oe(e.selected), r[E] = oe(e.disabled), r[hr] = oe(e.hidden), r[mr] = [e.today], r[pe] = [], r[be] = [], r[ye] = [], r[pr] = [], r);
825
- return e.fromDate && o[E].push({ before: e.fromDate }), e.toDate && o[E].push({ after: e.toDate }), ee(e) ? o[E] = o[E].concat(n.modifiers[E]) : ne(e) && (o[E] = o[E].concat(t.modifiers[E]), o[ye] = t.modifiers[ye], o[be] = t.modifiers[be], o[pe] = t.modifiers[pe]), o;
826
- }
827
- var cn = H(void 0);
828
- function yr(e) {
829
- var n = D(), t = $e(), r = Fe(), o = br(n, t, r), a = fr(n.modifiers), i = b(b({}, o), a);
830
- return c(cn.Provider, { value: i, children: e.children });
831
- }
832
- function dn() {
833
- var e = j(cn);
834
- if (!e)
835
- throw new Error("useModifiers must be used within a ModifiersProvider");
836
- return e;
837
- }
838
- function gr(e) {
839
- return !!(e && typeof e == "object" && "before" in e && "after" in e);
840
- }
841
- function _r(e) {
842
- return !!(e && typeof e == "object" && "from" in e);
843
- }
844
- function Dr(e) {
845
- return !!(e && typeof e == "object" && "after" in e);
846
- }
847
- function Mr(e) {
848
- return !!(e && typeof e == "object" && "before" in e);
849
- }
850
- function wr(e) {
851
- return !!(e && typeof e == "object" && "dayOfWeek" in e);
852
- }
853
- function Nr(e, n) {
854
- var t, r = n.from, o = n.to;
855
- if (r && o) {
856
- var a = R(o, r) < 0;
857
- a && (t = [o, r], r = t[0], o = t[1]);
858
- var i = R(e, r) >= 0 && R(o, e) >= 0;
859
- return i;
860
- }
861
- return o ? x(o, e) : r ? x(r, e) : !1;
862
- }
863
- function Cr(e) {
864
- return Ze(e);
865
- }
866
- function kr(e) {
867
- return Array.isArray(e) && e.every(Ze);
868
- }
869
- function xr(e, n) {
870
- return n.some(function(t) {
871
- if (typeof t == "boolean")
872
- return t;
873
- if (Cr(t))
874
- return x(e, t);
875
- if (kr(t))
876
- return t.includes(e);
877
- if (_r(t))
878
- return Nr(e, t);
879
- if (wr(t))
880
- return t.dayOfWeek.includes(e.getDay());
881
- if (gr(t)) {
882
- var r = R(t.before, e), o = R(t.after, e), a = r > 0, i = o < 0, l = Me(t.before, t.after);
883
- return l ? i && a : a || i;
884
- }
885
- return Dr(t) ? R(e, t.after) > 0 : Mr(t) ? R(t.before, e) > 0 : typeof t == "function" ? t(e) : !1;
886
- });
887
- }
888
- function Ie(e, n, t) {
889
- var r = Object.keys(n).reduce(function(a, i) {
890
- var l = n[i];
891
- return xr(e, l) && a.push(i), a;
892
- }, []), o = {};
893
- return r.forEach(function(a) {
894
- return o[a] = !0;
895
- }), t && !Pe(e, t) && (o.outside = !0), o;
896
- }
897
- function Pr(e, n) {
898
- for (var t = O(e[0]), r = Ce(e[e.length - 1]), o, a, i = t; i <= r; ) {
899
- var l = Ie(i, n), s = !l.disabled && !l.hidden;
900
- if (!s) {
901
- i = k(i, 1);
902
- continue;
903
- }
904
- if (l.selected)
905
- return i;
906
- l.today && !a && (a = i), o || (o = i), i = k(i, 1);
907
- }
908
- return a || o;
909
- }
910
- var Or = 365;
911
- function un(e, n) {
912
- var t = n.moveBy, r = n.direction, o = n.context, a = n.modifiers, i = n.retry, l = i === void 0 ? { count: 0, lastFocused: e } : i, s = o.weekStartsOn, u = o.fromDate, d = o.toDate, f = o.locale, v = {
913
- day: k,
914
- week: De,
915
- month: F,
916
- year: vt,
917
- startOfWeek: function(g) {
918
- return o.ISOWeek ? we(g) : X(g, { locale: f, weekStartsOn: s });
919
- },
920
- endOfWeek: function(g) {
921
- return o.ISOWeek ? tn(g) : ke(g, { locale: f, weekStartsOn: s });
922
- }
923
- }, h = v[t](e, r === "after" ? 1 : -1);
924
- r === "before" && u ? h = ht([u, h]) : r === "after" && d && (h = mt([d, h]));
925
- var p = !0;
926
- if (a) {
927
- var _ = Ie(h, a);
928
- p = !_.disabled && !_.hidden;
929
- }
930
- return p ? h : l.count > Or ? l.lastFocused : un(h, {
931
- moveBy: t,
932
- direction: r,
933
- context: o,
934
- modifiers: a,
935
- retry: b(b({}, l), { count: l.count + 1 })
936
- });
937
- }
938
- var fn = H(void 0);
939
- function $r(e) {
940
- var n = te(), t = dn(), r = B(), o = r[0], a = r[1], i = B(), l = i[0], s = i[1], u = Pr(n.displayMonths, t), d = o ?? (l && n.isDateDisplayed(l)) ? l : u, f = function() {
941
- s(o), a(void 0);
942
- }, v = function(g) {
943
- a(g);
944
- }, h = D(), p = function(g, w) {
945
- if (o) {
946
- var M = un(o, {
947
- moveBy: g,
948
- direction: w,
949
- context: h,
950
- modifiers: t
951
- });
952
- x(o, M) || (n.goToDate(M, o), v(M));
953
- }
954
- }, _ = {
955
- focusedDay: o,
956
- focusTarget: d,
957
- blur: f,
958
- focus: v,
959
- focusDayAfter: function() {
960
- return p("day", "after");
961
- },
962
- focusDayBefore: function() {
963
- return p("day", "before");
964
- },
965
- focusWeekAfter: function() {
966
- return p("week", "after");
967
- },
968
- focusWeekBefore: function() {
969
- return p("week", "before");
970
- },
971
- focusMonthBefore: function() {
972
- return p("month", "before");
973
- },
974
- focusMonthAfter: function() {
975
- return p("month", "after");
976
- },
977
- focusYearBefore: function() {
978
- return p("year", "before");
979
- },
980
- focusYearAfter: function() {
981
- return p("year", "after");
982
- },
983
- focusStartOfWeek: function() {
984
- return p("startOfWeek", "before");
985
- },
986
- focusEndOfWeek: function() {
987
- return p("endOfWeek", "after");
988
- }
989
- };
990
- return c(fn.Provider, { value: _, children: e.children });
991
- }
992
- function Le() {
993
- var e = j(fn);
994
- if (!e)
995
- throw new Error("useFocusContext must be used within a FocusProvider");
996
- return e;
997
- }
998
- function Sr(e, n) {
999
- var t = dn(), r = Ie(e, t, n);
1000
- return r;
1001
- }
1002
- var We = H(void 0);
1003
- function Fr(e) {
1004
- if (!se(e.initialProps)) {
1005
- var n = {
1006
- selected: void 0
1007
- };
1008
- return c(We.Provider, { value: n, children: e.children });
1009
- }
1010
- return c(Ir, { initialProps: e.initialProps, children: e.children });
1011
- }
1012
- function Ir(e) {
1013
- var n = e.initialProps, t = e.children, r = function(a, i, l) {
1014
- var s, u, d;
1015
- if ((s = n.onDayClick) === null || s === void 0 || s.call(n, a, i, l), i.selected && !n.required) {
1016
- (u = n.onSelect) === null || u === void 0 || u.call(n, void 0, a, i, l);
1017
- return;
1018
- }
1019
- (d = n.onSelect) === null || d === void 0 || d.call(n, a, a, i, l);
1020
- }, o = {
1021
- selected: n.selected,
1022
- onDayClick: r
1023
- };
1024
- return c(We.Provider, { value: o, children: t });
1025
- }
1026
- function vn() {
1027
- var e = j(We);
1028
- if (!e)
1029
- throw new Error("useSelectSingle must be used within a SelectSingleProvider");
1030
- return e;
1031
- }
1032
- function Lr(e, n) {
1033
- var t = D(), r = vn(), o = $e(), a = Fe(), i = Le(), l = i.focusDayAfter, s = i.focusDayBefore, u = i.focusWeekAfter, d = i.focusWeekBefore, f = i.blur, v = i.focus, h = i.focusMonthBefore, p = i.focusMonthAfter, _ = i.focusYearBefore, g = i.focusYearAfter, w = i.focusStartOfWeek, M = i.focusEndOfWeek, A = function(y) {
1034
- var m, de, ue, fe;
1035
- se(t) ? (m = r.onDayClick) === null || m === void 0 || m.call(r, e, n, y) : ee(t) ? (de = o.onDayClick) === null || de === void 0 || de.call(o, e, n, y) : ne(t) ? (ue = a.onDayClick) === null || ue === void 0 || ue.call(a, e, n, y) : (fe = t.onDayClick) === null || fe === void 0 || fe.call(t, e, n, y);
1036
- }, Y = function(y) {
1037
- var m;
1038
- v(e), (m = t.onDayFocus) === null || m === void 0 || m.call(t, e, n, y);
1039
- }, K = function(y) {
1040
- var m;
1041
- f(), (m = t.onDayBlur) === null || m === void 0 || m.call(t, e, n, y);
1042
- }, $ = function(y) {
1043
- var m;
1044
- (m = t.onDayMouseEnter) === null || m === void 0 || m.call(t, e, n, y);
1045
- }, ce = function(y) {
1046
- var m;
1047
- (m = t.onDayMouseLeave) === null || m === void 0 || m.call(t, e, n, y);
1048
- }, mn = function(y) {
1049
- var m;
1050
- (m = t.onDayPointerEnter) === null || m === void 0 || m.call(t, e, n, y);
1051
- }, pn = function(y) {
1052
- var m;
1053
- (m = t.onDayPointerLeave) === null || m === void 0 || m.call(t, e, n, y);
1054
- }, bn = function(y) {
1055
- var m;
1056
- (m = t.onDayTouchCancel) === null || m === void 0 || m.call(t, e, n, y);
1057
- }, yn = function(y) {
1058
- var m;
1059
- (m = t.onDayTouchEnd) === null || m === void 0 || m.call(t, e, n, y);
1060
- }, gn = function(y) {
1061
- var m;
1062
- (m = t.onDayTouchMove) === null || m === void 0 || m.call(t, e, n, y);
1063
- }, _n = function(y) {
1064
- var m;
1065
- (m = t.onDayTouchStart) === null || m === void 0 || m.call(t, e, n, y);
1066
- }, Dn = function(y) {
1067
- var m;
1068
- (m = t.onDayKeyUp) === null || m === void 0 || m.call(t, e, n, y);
1069
- }, Mn = function(y) {
1070
- var m;
1071
- switch (y.key) {
1072
- case "ArrowLeft":
1073
- y.preventDefault(), y.stopPropagation(), t.dir === "rtl" ? l() : s();
1074
- break;
1075
- case "ArrowRight":
1076
- y.preventDefault(), y.stopPropagation(), t.dir === "rtl" ? s() : l();
1077
- break;
1078
- case "ArrowDown":
1079
- y.preventDefault(), y.stopPropagation(), u();
1080
- break;
1081
- case "ArrowUp":
1082
- y.preventDefault(), y.stopPropagation(), d();
1083
- break;
1084
- case "PageUp":
1085
- y.preventDefault(), y.stopPropagation(), y.shiftKey ? _() : h();
1086
- break;
1087
- case "PageDown":
1088
- y.preventDefault(), y.stopPropagation(), y.shiftKey ? g() : p();
1089
- break;
1090
- case "Home":
1091
- y.preventDefault(), y.stopPropagation(), w();
1092
- break;
1093
- case "End":
1094
- y.preventDefault(), y.stopPropagation(), M();
1095
- break;
1096
- }
1097
- (m = t.onDayKeyDown) === null || m === void 0 || m.call(t, e, n, y);
1098
- }, wn = {
1099
- onClick: A,
1100
- onFocus: Y,
1101
- onBlur: K,
1102
- onKeyDown: Mn,
1103
- onKeyUp: Dn,
1104
- onMouseEnter: $,
1105
- onMouseLeave: ce,
1106
- onPointerEnter: mn,
1107
- onPointerLeave: pn,
1108
- onTouchCancel: bn,
1109
- onTouchEnd: yn,
1110
- onTouchMove: gn,
1111
- onTouchStart: _n
1112
- };
1113
- return wn;
1114
- }
1115
- function Wr() {
1116
- var e = D(), n = vn(), t = $e(), r = Fe(), o = se(e) ? n.selected : ee(e) ? t.selected : ne(e) ? r.selected : void 0;
1117
- return o;
1118
- }
1119
- function Er(e) {
1120
- return Object.values(I).includes(e);
1121
- }
1122
- function Rr(e, n) {
1123
- var t = [e.classNames.day];
1124
- return Object.keys(n).forEach(function(r) {
1125
- var o = e.modifiersClassNames[r];
1126
- if (o)
1127
- t.push(o);
1128
- else if (Er(r)) {
1129
- var a = e.classNames["day_".concat(r)];
1130
- a && t.push(a);
1131
- }
1132
- }), t;
1133
- }
1134
- function Tr(e, n) {
1135
- var t = b({}, e.styles.day);
1136
- return Object.keys(n).forEach(function(r) {
1137
- var o;
1138
- t = b(b({}, t), (o = e.modifiersStyles) === null || o === void 0 ? void 0 : o[r]);
1139
- }), t;
1140
- }
1141
- function Ar(e, n, t) {
1142
- var r, o, a, i = D(), l = Le(), s = Sr(e, n), u = Lr(e, s), d = Wr(), f = !!(i.onDayClick || i.mode !== "default");
1143
- Q(function() {
1144
- var $;
1145
- s.outside || l.focusedDay && f && x(l.focusedDay, e) && (($ = t.current) === null || $ === void 0 || $.focus());
1146
- }, [
1147
- l.focusedDay,
1148
- e,
1149
- t,
1150
- f,
1151
- s.outside
1152
- ]);
1153
- var v = Rr(i, s).join(" "), h = Tr(i, s), p = !!(s.outside && !i.showOutsideDays || s.hidden), _ = (a = (o = i.components) === null || o === void 0 ? void 0 : o.DayContent) !== null && a !== void 0 ? a : ir, g = c(_, { date: e, displayMonth: n, activeModifiers: s }), w = {
1154
- style: h,
1155
- className: v,
1156
- children: g,
1157
- role: "gridcell"
1158
- }, M = l.focusTarget && x(l.focusTarget, e) && !s.outside, A = l.focusedDay && x(l.focusedDay, e), Y = b(b(b({}, w), (r = { disabled: s.disabled, role: "gridcell" }, r["aria-selected"] = s.selected, r.tabIndex = A || M ? 0 : -1, r)), u), K = {
1159
- isButton: f,
1160
- isHidden: p,
1161
- activeModifiers: s,
1162
- selectedDays: d,
1163
- buttonProps: Y,
1164
- divProps: w
1165
- };
1166
- return K;
1167
- }
1168
- function Yr(e) {
1169
- var n = U(null), t = Ar(e.date, e.displayMonth, n);
1170
- return t.isHidden ? c("div", { role: "gridcell" }) : t.isButton ? c(le, b({ name: "day", ref: n }, t.buttonProps)) : c("div", b({}, t.divProps));
1171
- }
1172
- function Br(e) {
1173
- var n = e.number, t = e.dates, r = D(), o = r.onWeekNumberClick, a = r.styles, i = r.classNames, l = r.locale, s = r.labels.labelWeekNumber, u = r.formatters.formatWeekNumber, d = u(Number(n), { locale: l });
1174
- if (!o)
1175
- return c("span", { className: i.weeknumber, style: a.weeknumber, children: d });
1176
- var f = s(Number(n), { locale: l }), v = function(h) {
1177
- o(n, t, h);
1178
- };
1179
- return c(le, { name: "week-number", "aria-label": f, className: i.weeknumber, style: a.weeknumber, onClick: v, children: d });
1180
- }
1181
- function jr(e) {
1182
- var n, t, r = D(), o = r.styles, a = r.classNames, i = r.showWeekNumber, l = r.components, s = (n = l == null ? void 0 : l.Day) !== null && n !== void 0 ? n : Yr, u = (t = l == null ? void 0 : l.WeekNumber) !== null && t !== void 0 ? t : Br, d;
1183
- return i && (d = c("td", { className: a.cell, style: o.cell, children: c(u, { number: e.weekNumber, dates: e.dates }) })), P("tr", { className: a.row, style: o.row, children: [d, e.dates.map(function(f) {
1184
- return c("td", { className: a.cell, style: o.cell, role: "presentation", children: c(s, { displayMonth: e.displayMonth, date: f }) }, yt(f));
1185
- })] });
1186
- }
1187
- function je(e, n, t) {
1188
- for (var r = t != null && t.ISOWeek ? tn(n) : ke(n, t), o = t != null && t.ISOWeek ? we(e) : X(e, t), a = R(r, o), i = [], l = 0; l <= a; l++)
1189
- i.push(k(o, l));
1190
- var s = i.reduce(function(u, d) {
1191
- var f = t != null && t.ISOWeek ? Yn(d) : Bn(d, t), v = u.find(function(h) {
1192
- return h.weekNumber === f;
1193
- });
1194
- return v ? (v.dates.push(d), u) : (u.push({
1195
- weekNumber: f,
1196
- dates: [d]
1197
- }), u);
1198
- }, []);
1199
- return s;
1200
- }
1201
- function Hr(e, n) {
1202
- var t = je(O(e), Ce(e), n);
1203
- if (n != null && n.useFixedWeeks) {
1204
- var r = _t(e, n);
1205
- if (r < 6) {
1206
- var o = t[t.length - 1], a = o.dates[o.dates.length - 1], i = De(a, 6 - r), l = je(De(a, 1), i, n);
1207
- t.push.apply(t, l);
1208
- }
1209
- }
1210
- return t;
1211
- }
1212
- function Kr(e) {
1213
- var n, t, r, o = D(), a = o.locale, i = o.classNames, l = o.styles, s = o.hideHead, u = o.fixedWeeks, d = o.components, f = o.weekStartsOn, v = o.firstWeekContainsDate, h = o.ISOWeek, p = Hr(e.displayMonth, {
1214
- useFixedWeeks: !!u,
1215
- ISOWeek: h,
1216
- locale: a,
1217
- weekStartsOn: f,
1218
- firstWeekContainsDate: v
1219
- }), _ = (n = d == null ? void 0 : d.Head) !== null && n !== void 0 ? n : ar, g = (t = d == null ? void 0 : d.Row) !== null && t !== void 0 ? t : jr, w = (r = d == null ? void 0 : d.Footer) !== null && r !== void 0 ? r : tr;
1220
- return P("table", { id: e.id, className: i.table, style: l.table, role: "grid", "aria-labelledby": e["aria-labelledby"], children: [!s && c(_, {}), c("tbody", { className: i.tbody, style: l.tbody, children: p.map(function(M) {
1221
- return c(g, { displayMonth: e.displayMonth, dates: M.dates, weekNumber: M.weekNumber }, M.weekNumber);
1222
- }) }), c(w, { displayMonth: e.displayMonth })] });
1223
- }
1224
- function Vr() {
1225
- return !!(typeof window < "u" && window.document && window.document.createElement);
1226
- }
1227
- var Ur = Vr() ? Un : Q, ge = !1, zr = 0;
1228
- function He() {
1229
- return "react-day-picker-".concat(++zr);
1230
- }
1231
- function Zr(e) {
1232
- var n, t = e ?? (ge ? He() : null), r = B(t), o = r[0], a = r[1];
1233
- return Ur(function() {
1234
- o === null && a(He());
1235
- }, []), Q(function() {
1236
- ge === !1 && (ge = !0);
1237
- }, []), (n = e ?? o) !== null && n !== void 0 ? n : void 0;
1238
- }
1239
- function Gr(e) {
1240
- var n, t, r = D(), o = r.dir, a = r.classNames, i = r.styles, l = r.components, s = te().displayMonths, u = Zr(r.id ? "".concat(r.id, "-").concat(e.displayIndex) : void 0), d = r.id ? "".concat(r.id, "-grid-").concat(e.displayIndex) : void 0, f = [a.month], v = i.month, h = e.displayIndex === 0, p = e.displayIndex === s.length - 1, _ = !h && !p;
1241
- o === "rtl" && (n = [h, p], p = n[0], h = n[1]), h && (f.push(a.caption_start), v = b(b({}, v), i.caption_start)), p && (f.push(a.caption_end), v = b(b({}, v), i.caption_end)), _ && (f.push(a.caption_between), v = b(b({}, v), i.caption_between));
1242
- var g = (t = l == null ? void 0 : l.Caption) !== null && t !== void 0 ? t : nr;
1243
- return P("div", { className: f.join(" "), style: v, children: [c(g, { id: u, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), c(Kr, { id: d, "aria-labelledby": u, displayMonth: e.displayMonth })] }, e.displayIndex);
1244
- }
1245
- function Xr(e) {
1246
- var n = D(), t = n.classNames, r = n.styles;
1247
- return c("div", { className: t.months, style: r.months, children: e.children });
1248
- }
1249
- function qr(e) {
1250
- var n, t, r = e.initialProps, o = D(), a = Le(), i = te(), l = B(!1), s = l[0], u = l[1];
1251
- Q(function() {
1252
- o.initialFocus && a.focusTarget && (s || (a.focus(a.focusTarget), u(!0)));
1253
- }, [
1254
- o.initialFocus,
1255
- s,
1256
- a.focus,
1257
- a.focusTarget,
1258
- a
1259
- ]);
1260
- var d = [o.classNames.root, o.className];
1261
- o.numberOfMonths > 1 && d.push(o.classNames.multiple_months), o.showWeekNumber && d.push(o.classNames.with_weeknumber);
1262
- var f = b(b({}, o.styles.root), o.style), v = Object.keys(r).filter(function(p) {
1263
- return p.startsWith("data-");
1264
- }).reduce(function(p, _) {
1265
- var g;
1266
- return b(b({}, p), (g = {}, g[_] = r[_], g));
1267
- }, {}), h = (t = (n = r.components) === null || n === void 0 ? void 0 : n.Months) !== null && t !== void 0 ? t : Xr;
1268
- return c("div", b({ className: d.join(" "), style: f, dir: o.dir, id: o.id, nonce: r.nonce, title: r.title, lang: r.lang }, v, { children: c(h, { children: i.displayMonths.map(function(p, _) {
1269
- return c(Gr, { displayIndex: _, displayMonth: p }, _);
1270
- }) }) }));
1271
- }
1272
- function Jr(e) {
1273
- var n = e.children, t = Mt(e, ["children"]);
1274
- return c(Bt, { initialProps: t, children: c(qt, { children: c(Fr, { initialProps: t, children: c(lr, { initialProps: t, children: c(dr, { initialProps: t, children: c(yr, { children: c($r, { children: n }) }) }) }) }) }) });
1275
- }
1276
- function Qr(e) {
1277
- return c(Jr, b({}, e, { children: c(qr, { initialProps: e }) }));
1278
- }
1279
- function hn({
1280
- className: e,
1281
- classNames: n,
1282
- fromDate: t,
1283
- toDate: r,
1284
- showOutsideDays: o = !0,
1285
- ...a
1286
- }) {
1287
- return /* @__PURE__ */ c(
1288
- Qr,
1289
- {
1290
- fromDate: t,
1291
- toDate: r || void 0,
1292
- showOutsideDays: o,
1293
- className: Z("p-3", e),
1294
- classNames: {
1295
- months: "flex flex-col sm:flex-row stack-y-4 sm:space-x-4 sm:stack-y-0",
1296
- month: "stack-y-4",
1297
- caption: "flex pt-1 relative items-center justify-between",
1298
- caption_label: "text-sm font-medium",
1299
- nav: "flex items-center",
1300
- head: "",
1301
- head_row: "flex w-full items-center justify-between",
1302
- head_cell: "w-8 md:w-11 h-8 text-sm font-medium text-default text-center",
1303
- nav_button: Z(Te({ color: "minimal", variant: "icon" })),
1304
- table: "w-full border-collapse stack-y-1",
1305
- row: "flex w-full mt-0.5 gap-0.5",
1306
- cell: "w-8 h-8 md:h-11 md:w-11 text-center text-sm p-0 relative focus-within:relative focus-within:z-20",
1307
- day: Z(
1308
- Te({ color: "minimal" }),
1309
- "w-8 h-8 md:h-11 md:w-11 p-0 text-sm font-medium aria-selected:opacity-100 inline-flex items-center justify-center"
1310
- ),
1311
- day_range_end: "hover:bg-inverted! text-inverted!",
1312
- day_range_start: "hover:bg-inverted! text-inverted!",
1313
- day_selected: "bg-inverted text-inverted",
1314
- day_today: "relative after:absolute after:bottom-1.5 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-inverted aria-selected:after:bg-default",
1315
- day_outside: "",
1316
- day_disabled: "text-muted opacity-50",
1317
- day_range_middle: "aria-selected:bg-emphasis aria-selected:text-emphasis",
1318
- day_hidden: "invisible",
1319
- ...n
1320
- },
1321
- components: {
1322
- CaptionLabel: (i) => /* @__PURE__ */ P("div", { className: "px-2", children: [
1323
- /* @__PURE__ */ P("span", { className: "text-emphasis font-semibold leading-none", children: [
1324
- Re(i.displayMonth).format("MMMM"),
1325
- " "
1326
- ] }),
1327
- /* @__PURE__ */ c("span", { className: "text-subtle font-medium leading-none", children: Re(i.displayMonth).format("YYYY") })
1328
- ] }),
1329
- IconLeft: () => /* @__PURE__ */ c(Hn, { className: "h-4 w-4 stroke-2" }),
1330
- IconRight: () => /* @__PURE__ */ c(jn, { className: "h-4 w-4 stroke-2" })
1331
- },
1332
- ...a
1333
- }
1334
- );
1335
- }
1336
- hn.displayName = "Calendar";
1337
- function eo({
1338
- startDate: e,
1339
- endDate: n,
1340
- clickedDate: t
1341
- }) {
1342
- return !e || n ? { startDate: t, endDate: void 0 } : t < e ? { startDate: t, endDate: e } : { startDate: e, endDate: t };
1343
- }
1344
- function ao({
1345
- className: e,
1346
- dates: n,
1347
- minDate: t,
1348
- maxDate: r,
1349
- onDatesChange: o,
1350
- disabled: a,
1351
- withoutPopover: i,
1352
- popoverModal: l = !0,
1353
- popoverOpen: s,
1354
- onPopoverOpenChange: u,
1355
- "data-testid": d,
1356
- strictlyBottom: f,
1357
- allowPastDates: v = !1,
1358
- onMonthChange: h
1359
- }) {
1360
- const [p, _] = B(void 0);
1361
- function g($) {
1362
- const ce = eo({
1363
- startDate: n.startDate,
1364
- endDate: n.endDate,
1365
- clickedDate: $
1366
- });
1367
- o(ce), _(void 0);
1368
- }
1369
- function w($) {
1370
- n.startDate && !n.endDate && _($);
1371
- }
1372
- function M() {
1373
- _(void 0);
1374
- }
1375
- const A = v && t === null ? void 0 : t ?? /* @__PURE__ */ new Date(), Y = zn(() => {
1376
- if (!(!n.startDate || n.endDate || !p) && !x(n.startDate, p))
1377
- return xe(p, n.startDate) ? { from: p, to: n.startDate } : { from: n.startDate, to: p };
1378
- }, [n.startDate, n.endDate, p]), K = /* @__PURE__ */ c(
1379
- hn,
1380
- {
1381
- initialFocus: !0,
1382
- fromDate: A,
1383
- toDate: r,
1384
- mode: "range",
1385
- defaultMonth: n == null ? void 0 : n.startDate,
1386
- selected: { from: n == null ? void 0 : n.startDate, to: n == null ? void 0 : n.endDate },
1387
- onDayClick: ($) => g($),
1388
- onDayMouseEnter: w,
1389
- onDayMouseLeave: M,
1390
- numberOfMonths: 1,
1391
- disabled: a,
1392
- "data-testid": d,
1393
- modifiers: Y ? { hoverRange: Y } : void 0,
1394
- modifiersClassNames: Y ? { hoverRange: "bg-emphasis" } : void 0,
1395
- onMonthChange: h
1396
- }
1397
- );
1398
- return i ? K : /* @__PURE__ */ c("div", { className: Z("grid gap-2", e), children: /* @__PURE__ */ P(ct, { modal: l, open: s, onOpenChange: u, children: [
1399
- /* @__PURE__ */ c(dt, { asChild: !0, children: /* @__PURE__ */ c(
1400
- Kn,
1401
- {
1402
- "data-testid": "date-range",
1403
- color: "secondary",
1404
- EndIcon: "calendar",
1405
- className: Z("justify-between text-left font-normal", !n && "text-subtle"),
1406
- children: n != null && n.startDate ? n != null && n.endDate ? /* @__PURE__ */ P(S, { children: [
1407
- L(n.startDate, "LLL dd, y"),
1408
- " - ",
1409
- L(n.endDate, "LLL dd, y")
1410
- ] }) : /* @__PURE__ */ P(S, { children: [
1411
- L(n.startDate, "LLL dd, y"),
1412
- " - End"
1413
- ] }) : /* @__PURE__ */ c("span", { children: "Pick a date" })
1414
- }
1415
- ) }),
1416
- /* @__PURE__ */ c(ut, { children: /* @__PURE__ */ c(
1417
- ft,
1418
- {
1419
- className: "bg-default text-emphasis z-50 w-auto rounded-md border p-0 outline-none",
1420
- align: "start",
1421
- sideOffset: 4,
1422
- side: f ? "bottom" : void 0,
1423
- avoidCollisions: !f,
1424
- onInteractOutside: ($) => {
1425
- n != null && n.startDate && !(n != null && n.endDate) && $.preventDefault();
1426
- },
1427
- children: K
1428
- }
1429
- ) })
1430
- ] }) });
1431
- }
1432
- export {
1433
- ao as DatePickerWithRange
1434
- };