@helsenorge/datepicker 6.5.0 → 7.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,650 @@
1
- import w,{createContext as $,forwardRef as It,useContext as q,useState as I,useEffect as me,useLayoutEffect as St,useRef as ce}from"react";import{isSameDay as C,subDays as be,addDays as W,differenceInCalendarDays as A,startOfMonth as E,endOfMonth as We,startOfDay as Ue,addMonths as L,differenceInCalendarMonths as re,isSameMonth as Ee,isBefore as Ie,isAfter as fe,getUnixTime as Rt,getWeeksInMonth as Lt,addWeeks as Ce,isSameYear as Bt,setMonth as ge,setYear as Xe,startOfYear as Ft,max as Tt,min as At,endOfISOWeek as at,endOfWeek as ot,startOfISOWeek as Se,startOfWeek as Re,getISOWeek as Yt,getWeek as Ht,format as S,isDate as it,addYears as Vt,isValid as ae,parse as ne,isWithinInterval as Kt}from"date-fns";import{enUS as Ut,nb as Xt}from"date-fns/locale";import $t from"@helsenorge/designsystem-react/components/Button";import qt from"@helsenorge/designsystem-react/components/Icon";import Gt from"@helsenorge/designsystem-react/components/Icons/Calendar";import Pe from"@helsenorge/designsystem-react/components/Input";import{KeyboardEventKey as $e}from"@helsenorge/designsystem-react/constants";import{useKeyboardEvent as qe}from"@helsenorge/designsystem-react/hooks/useKeyboardEvent";import{useOutsideEvent as Zt}from"@helsenorge/designsystem-react/hooks/useOutsideEvent";import{usePseudoClasses as st}from"@helsenorge/designsystem-react/hooks/usePseudoClasses";import{isMobileUA as Jt}from"@helsenorge/designsystem-react/utils/mobile";import{isMutableRefObject as lt,mergeRefs as dt}from"@helsenorge/designsystem-react/utils/refs";import je from"classnames";import{PopOverVariant as Y}from"@helsenorge/designsystem-react/components/PopOver";import{useFocusTrap as Qt}from"@helsenorge/designsystem-react/hooks/useFocusTrap";import{useInterval as zt}from"@helsenorge/designsystem-react/hooks/useInterval";import{useIsVisible as en}from"@helsenorge/designsystem-react/hooks/useIsVisible";import{useLayoutEvent as tn}from"@helsenorge/designsystem-react/hooks/useLayoutEvent";import{useSize as nn}from"@helsenorge/designsystem-react/hooks/useSize";import M from"./styles.module.scss";import rn from"@helsenorge/designsystem-react/components/ErrorWrapper";import{isComponent as Ge}from"@helsenorge/designsystem-react/utils/component";var b=function(){return b=Object.assign||function(n){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},b.apply(this,arguments)};function an(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]]);return t}function ut(e,n,t){if(t||arguments.length===2)for(var r=0,a=n.length,o;r<a;r++)(o||!(r in n))&&(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}var ct={exports:{}},te={};/**
1
+ import P, { createContext as ve, forwardRef as Bn, useContext as me, useState as G, useEffect as Ve, useLayoutEffect as Yn, useRef as Ae } from "react";
2
+ import { isSameDay as L, subDays as ze, addDays as U, differenceInCalendarDays as ie, startOfMonth as $, endOfMonth as ft, startOfDay as Ft, addMonths as te, differenceInCalendarMonths as je, isSameMonth as vt, isBefore as mt, isAfter as Be, getUnixTime as Vn, getWeeksInMonth as Hn, addWeeks as st, isSameYear as Un, setMonth as et, setYear as Lt, startOfYear as $n, max as Kn, min as Gn, endOfISOWeek as Zt, endOfWeek as Qt, startOfISOWeek as ht, startOfWeek as pt, getISOWeek as Xn, getWeek as qn, format as X, isDate as zt, addYears as Jn, isValid as Re, parse as Ee, isWithinInterval as Zn } from "date-fns";
3
+ import { enUS as Qn, nb as zn } from "date-fns/locale";
4
+ import er from "@helsenorge/designsystem-react/components/Button";
5
+ import tr from "@helsenorge/designsystem-react/components/Icon";
6
+ import nr from "@helsenorge/designsystem-react/components/Icons/Calendar";
7
+ import lt from "@helsenorge/designsystem-react/components/Input";
8
+ import { KeyboardEventKey as At } from "@helsenorge/designsystem-react/constants";
9
+ import { useKeyboardEvent as Bt } from "@helsenorge/designsystem-react/hooks/useKeyboardEvent";
10
+ import { useOutsideEvent as rr } from "@helsenorge/designsystem-react/hooks/useOutsideEvent";
11
+ import { usePseudoClasses as en } from "@helsenorge/designsystem-react/hooks/usePseudoClasses";
12
+ import { isMobileUA as ar } from "@helsenorge/designsystem-react/utils/mobile";
13
+ import { isMutableRefObject as tn, mergeRefs as nn } from "@helsenorge/designsystem-react/utils/refs";
14
+ import ut from "classnames";
15
+ import { PopOverVariant as se } from "@helsenorge/designsystem-react/components/PopOver";
16
+ import { useFocusTrap as or } from "@helsenorge/designsystem-react/hooks/useFocusTrap";
17
+ import { useInterval as ir } from "@helsenorge/designsystem-react/hooks/useInterval";
18
+ import { useIsVisible as sr } from "@helsenorge/designsystem-react/hooks/useIsVisible";
19
+ import { useLayoutEvent as lr } from "@helsenorge/designsystem-react/hooks/useLayoutEvent";
20
+ import { useSize as ur } from "@helsenorge/designsystem-react/hooks/useSize";
21
+ import A from "./styles.module.scss";
22
+ import cr from "@helsenorge/designsystem-react/components/ErrorWrapper";
23
+ import { isComponent as Yt } from "@helsenorge/designsystem-react/utils/component";
24
+ var D = function() {
25
+ return D = Object.assign || function(n) {
26
+ for (var t, r = 1, a = arguments.length; r < a; r++) {
27
+ t = arguments[r];
28
+ for (var i in t)
29
+ Object.prototype.hasOwnProperty.call(t, i) && (n[i] = t[i]);
30
+ }
31
+ return n;
32
+ }, D.apply(this, arguments);
33
+ };
34
+ function dr(e, n) {
35
+ var t = {};
36
+ for (var r in e)
37
+ Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
38
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
39
+ for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
40
+ n.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
41
+ return t;
42
+ }
43
+ function rn(e, n, t) {
44
+ if (t || arguments.length === 2)
45
+ for (var r = 0, a = n.length, i; r < a; r++)
46
+ (i || !(r in n)) && (i || (i = Array.prototype.slice.call(n, 0, r)), i[r] = n[r]);
47
+ return e.concat(i || Array.prototype.slice.call(n));
48
+ }
49
+ var ct = { exports: {} }, Ne = {};
50
+ /**
51
+ * @license React
52
+ * react-jsx-runtime.development.js
53
+ *
54
+ * Copyright (c) Facebook, Inc. and its affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */
59
+ var Vt;
60
+ function fr() {
61
+ return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
62
+ var e = P, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), b = Symbol.iterator, C = "@@iterator";
63
+ function w(o) {
64
+ if (o === null || typeof o != "object")
65
+ return null;
66
+ var f = b && o[b] || o[C];
67
+ return typeof f == "function" ? f : null;
68
+ }
69
+ var M = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
70
+ function x(o) {
71
+ {
72
+ for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0), k = 1; k < f; k++)
73
+ h[k - 1] = arguments[k];
74
+ I("error", o, h);
75
+ }
76
+ }
77
+ function I(o, f, h) {
78
+ {
79
+ var k = M.ReactDebugCurrentFrame, j = k.getStackAddendum();
80
+ j !== "" && (f += "%s", h = h.concat([j]));
81
+ var O = h.map(function(E) {
82
+ return String(E);
83
+ });
84
+ O.unshift("Warning: " + f), Function.prototype.apply.call(console[o], console, O);
85
+ }
86
+ }
87
+ var B = !1, Q = !1, q = !1, le = !1, he = !1, ue;
88
+ ue = Symbol.for("react.module.reference");
89
+ function ge(o) {
90
+ return !!(typeof o == "string" || typeof o == "function" || o === r || o === i || he || o === a || o === v || o === d || le || o === y || B || Q || q || typeof o == "object" && o !== null && (o.$$typeof === p || o.$$typeof === m || o.$$typeof === s || o.$$typeof === l || o.$$typeof === u || // This needs to include all possible module reference object
91
+ // types supported by any Flight configuration anywhere since
92
+ // we don't know which Flight build this will end up being used
93
+ // with.
94
+ o.$$typeof === ue || o.getModuleId !== void 0));
95
+ }
96
+ function fe(o, f, h) {
97
+ var k = o.displayName;
98
+ if (k)
99
+ return k;
100
+ var j = f.displayName || f.name || "";
101
+ return j !== "" ? h + "(" + j + ")" : h;
102
+ }
103
+ function ce(o) {
104
+ return o.displayName || "Context";
105
+ }
106
+ function F(o) {
107
+ if (o == null)
108
+ return null;
109
+ if (typeof o.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
110
+ return o.displayName || o.name || null;
111
+ if (typeof o == "string")
112
+ return o;
113
+ switch (o) {
114
+ case r:
115
+ return "Fragment";
116
+ case t:
117
+ return "Portal";
118
+ case i:
119
+ return "Profiler";
120
+ case a:
121
+ return "StrictMode";
122
+ case v:
123
+ return "Suspense";
124
+ case d:
125
+ return "SuspenseList";
126
+ }
127
+ if (typeof o == "object")
128
+ switch (o.$$typeof) {
129
+ case l:
130
+ var f = o;
131
+ return ce(f) + ".Consumer";
132
+ case s:
133
+ var h = o;
134
+ return ce(h._context) + ".Provider";
135
+ case u:
136
+ return fe(o, o.render, "ForwardRef");
137
+ case m:
138
+ var k = o.displayName || null;
139
+ return k !== null ? k : F(o.type) || "Memo";
140
+ case p: {
141
+ var j = o, O = j._payload, E = j._init;
142
+ try {
143
+ return F(E(O));
144
+ } catch {
145
+ return null;
146
+ }
147
+ }
148
+ }
149
+ return null;
150
+ }
151
+ var H = Object.assign, z = 0, pe, g, _, J, Y, ne, we;
152
+ function xe() {
153
+ }
154
+ xe.__reactDisabledLog = !0;
155
+ function $e() {
156
+ {
157
+ if (z === 0) {
158
+ pe = console.log, g = console.info, _ = console.warn, J = console.error, Y = console.group, ne = console.groupCollapsed, we = console.groupEnd;
159
+ var o = {
160
+ configurable: !0,
161
+ enumerable: !0,
162
+ value: xe,
163
+ writable: !0
164
+ };
165
+ Object.defineProperties(console, {
166
+ info: o,
167
+ log: o,
168
+ warn: o,
169
+ error: o,
170
+ group: o,
171
+ groupCollapsed: o,
172
+ groupEnd: o
173
+ });
174
+ }
175
+ z++;
176
+ }
177
+ }
178
+ function Ke() {
179
+ {
180
+ if (z--, z === 0) {
181
+ var o = {
182
+ configurable: !0,
183
+ enumerable: !0,
184
+ writable: !0
185
+ };
186
+ Object.defineProperties(console, {
187
+ log: H({}, o, {
188
+ value: pe
189
+ }),
190
+ info: H({}, o, {
191
+ value: g
192
+ }),
193
+ warn: H({}, o, {
194
+ value: _
195
+ }),
196
+ error: H({}, o, {
197
+ value: J
198
+ }),
199
+ group: H({}, o, {
200
+ value: Y
201
+ }),
202
+ groupCollapsed: H({}, o, {
203
+ value: ne
204
+ }),
205
+ groupEnd: H({}, o, {
206
+ value: we
207
+ })
208
+ });
209
+ }
210
+ z < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
211
+ }
212
+ }
213
+ var De = M.ReactCurrentDispatcher, ke;
214
+ function ye(o, f, h) {
215
+ {
216
+ if (ke === void 0)
217
+ try {
218
+ throw Error();
219
+ } catch (j) {
220
+ var k = j.stack.trim().match(/\n( *(at )?)/);
221
+ ke = k && k[1] || "";
222
+ }
223
+ return `
224
+ ` + ke + o;
225
+ }
226
+ }
227
+ var Ce = !1, R;
228
+ {
229
+ var re = typeof WeakMap == "function" ? WeakMap : Map;
230
+ R = new re();
231
+ }
232
+ function ee(o, f) {
233
+ if (!o || Ce)
234
+ return "";
235
+ {
236
+ var h = R.get(o);
237
+ if (h !== void 0)
238
+ return h;
239
+ }
240
+ var k;
241
+ Ce = !0;
242
+ var j = Error.prepareStackTrace;
243
+ Error.prepareStackTrace = void 0;
244
+ var O;
245
+ O = De.current, De.current = null, $e();
246
+ try {
247
+ if (f) {
248
+ var E = function() {
249
+ throw Error();
250
+ };
251
+ if (Object.defineProperty(E.prototype, "props", {
252
+ set: function() {
253
+ throw Error();
254
+ }
255
+ }), typeof Reflect == "object" && Reflect.construct) {
256
+ try {
257
+ Reflect.construct(E, []);
258
+ } catch (ae) {
259
+ k = ae;
260
+ }
261
+ Reflect.construct(o, [], E);
262
+ } else {
263
+ try {
264
+ E.call();
265
+ } catch (ae) {
266
+ k = ae;
267
+ }
268
+ o.call(E.prototype);
269
+ }
270
+ } else {
271
+ try {
272
+ throw Error();
273
+ } catch (ae) {
274
+ k = ae;
275
+ }
276
+ o();
277
+ }
278
+ } catch (ae) {
279
+ if (ae && k && typeof ae.stack == "string") {
280
+ for (var N = ae.stack.split(`
281
+ `), V = k.stack.split(`
282
+ `), T = N.length - 1, W = V.length - 1; T >= 1 && W >= 0 && N[T] !== V[W]; )
283
+ W--;
284
+ for (; T >= 1 && W >= 0; T--, W--)
285
+ if (N[T] !== V[W]) {
286
+ if (T !== 1 || W !== 1)
287
+ do
288
+ if (T--, W--, W < 0 || N[T] !== V[W]) {
289
+ var K = `
290
+ ` + N[T].replace(" at new ", " at ");
291
+ return o.displayName && K.includes("<anonymous>") && (K = K.replace("<anonymous>", o.displayName)), typeof o == "function" && R.set(o, K), K;
292
+ }
293
+ while (T >= 1 && W >= 0);
294
+ break;
295
+ }
296
+ }
297
+ } finally {
298
+ Ce = !1, De.current = O, Ke(), Error.prepareStackTrace = j;
299
+ }
300
+ var be = o ? o.displayName || o.name : "", It = be ? ye(be) : "";
301
+ return typeof o == "function" && R.set(o, It), It;
302
+ }
303
+ function Ge(o, f, h) {
304
+ return ee(o, !1);
305
+ }
306
+ function bn(o) {
307
+ var f = o.prototype;
308
+ return !!(f && f.isReactComponent);
309
+ }
310
+ function We(o, f, h) {
311
+ if (o == null)
312
+ return "";
313
+ if (typeof o == "function")
314
+ return ee(o, bn(o));
315
+ if (typeof o == "string")
316
+ return ye(o);
317
+ switch (o) {
318
+ case v:
319
+ return ye("Suspense");
320
+ case d:
321
+ return ye("SuspenseList");
322
+ }
323
+ if (typeof o == "object")
324
+ switch (o.$$typeof) {
325
+ case u:
326
+ return Ge(o.render);
327
+ case m:
328
+ return We(o.type, f, h);
329
+ case p: {
330
+ var k = o, j = k._payload, O = k._init;
331
+ try {
332
+ return We(O(j), f, h);
333
+ } catch {
334
+ }
335
+ }
336
+ }
337
+ return "";
338
+ }
339
+ var Ie = Object.prototype.hasOwnProperty, kt = {}, Ct = M.ReactDebugCurrentFrame;
340
+ function Fe(o) {
341
+ if (o) {
342
+ var f = o._owner, h = We(o.type, o._source, f ? f.type : null);
343
+ Ct.setExtraStackFrame(h);
344
+ } else
345
+ Ct.setExtraStackFrame(null);
346
+ }
347
+ function gn(o, f, h, k, j) {
348
+ {
349
+ var O = Function.call.bind(Ie);
350
+ for (var E in o)
351
+ if (O(o, E)) {
352
+ var N = void 0;
353
+ try {
354
+ if (typeof o[E] != "function") {
355
+ var V = Error((k || "React class") + ": " + h + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
356
+ throw V.name = "Invariant Violation", V;
357
+ }
358
+ N = o[E](f, E, k, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
359
+ } catch (T) {
360
+ N = T;
361
+ }
362
+ N && !(N instanceof Error) && (Fe(j), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", k || "React class", h, E, typeof N), Fe(null)), N instanceof Error && !(N.message in kt) && (kt[N.message] = !0, Fe(j), x("Failed %s type: %s", h, N.message), Fe(null));
363
+ }
364
+ }
365
+ }
366
+ var wn = Array.isArray;
367
+ function Xe(o) {
368
+ return wn(o);
369
+ }
370
+ function xn(o) {
371
+ {
372
+ var f = typeof Symbol == "function" && Symbol.toStringTag, h = f && o[Symbol.toStringTag] || o.constructor.name || "Object";
373
+ return h;
374
+ }
375
+ }
376
+ function Dn(o) {
377
+ try {
378
+ return Mt(o), !1;
379
+ } catch {
380
+ return !0;
381
+ }
382
+ }
383
+ function Mt(o) {
384
+ return "" + o;
385
+ }
386
+ function Nt(o) {
387
+ if (Dn(o))
388
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xn(o)), Mt(o);
389
+ }
390
+ var Me = M.ReactCurrentOwner, kn = {
391
+ key: !0,
392
+ ref: !0,
393
+ __self: !0,
394
+ __source: !0
395
+ }, Pt, Et, qe;
396
+ qe = {};
397
+ function Cn(o) {
398
+ if (Ie.call(o, "ref")) {
399
+ var f = Object.getOwnPropertyDescriptor(o, "ref").get;
400
+ if (f && f.isReactWarning)
401
+ return !1;
402
+ }
403
+ return o.ref !== void 0;
404
+ }
405
+ function Mn(o) {
406
+ if (Ie.call(o, "key")) {
407
+ var f = Object.getOwnPropertyDescriptor(o, "key").get;
408
+ if (f && f.isReactWarning)
409
+ return !1;
410
+ }
411
+ return o.key !== void 0;
412
+ }
413
+ function Nn(o, f) {
414
+ if (typeof o.ref == "string" && Me.current && f && Me.current.stateNode !== f) {
415
+ var h = F(Me.current.type);
416
+ qe[h] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(Me.current.type), o.ref), qe[h] = !0);
417
+ }
418
+ }
419
+ function Pn(o, f) {
420
+ {
421
+ var h = function() {
422
+ Pt || (Pt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
423
+ };
424
+ h.isReactWarning = !0, Object.defineProperty(o, "key", {
425
+ get: h,
426
+ configurable: !0
427
+ });
428
+ }
429
+ }
430
+ function En(o, f) {
431
+ {
432
+ var h = function() {
433
+ Et || (Et = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
434
+ };
435
+ h.isReactWarning = !0, Object.defineProperty(o, "ref", {
436
+ get: h,
437
+ configurable: !0
438
+ });
439
+ }
440
+ }
441
+ var jn = function(o, f, h, k, j, O, E) {
442
+ var N = {
443
+ // This tag allows us to uniquely identify this as a React Element
444
+ $$typeof: n,
445
+ // Built-in properties that belong on the element
446
+ type: o,
447
+ key: f,
448
+ ref: h,
449
+ props: E,
450
+ // Record the component responsible for creating this element.
451
+ _owner: O
452
+ };
453
+ return N._store = {}, Object.defineProperty(N._store, "validated", {
454
+ configurable: !1,
455
+ enumerable: !1,
456
+ writable: !0,
457
+ value: !1
458
+ }), Object.defineProperty(N, "_self", {
459
+ configurable: !1,
460
+ enumerable: !1,
461
+ writable: !1,
462
+ value: k
463
+ }), Object.defineProperty(N, "_source", {
464
+ configurable: !1,
465
+ enumerable: !1,
466
+ writable: !1,
467
+ value: j
468
+ }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
469
+ };
470
+ function Rn(o, f, h, k, j) {
471
+ {
472
+ var O, E = {}, N = null, V = null;
473
+ h !== void 0 && (Nt(h), N = "" + h), Mn(f) && (Nt(f.key), N = "" + f.key), Cn(f) && (V = f.ref, Nn(f, j));
474
+ for (O in f)
475
+ Ie.call(f, O) && !kn.hasOwnProperty(O) && (E[O] = f[O]);
476
+ if (o && o.defaultProps) {
477
+ var T = o.defaultProps;
478
+ for (O in T)
479
+ E[O] === void 0 && (E[O] = T[O]);
480
+ }
481
+ if (N || V) {
482
+ var W = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
483
+ N && Pn(E, W), V && En(E, W);
484
+ }
485
+ return jn(o, N, V, j, k, Me.current, E);
486
+ }
487
+ }
488
+ var Je = M.ReactCurrentOwner, jt = M.ReactDebugCurrentFrame;
489
+ function _e(o) {
490
+ if (o) {
491
+ var f = o._owner, h = We(o.type, o._source, f ? f.type : null);
492
+ jt.setExtraStackFrame(h);
493
+ } else
494
+ jt.setExtraStackFrame(null);
495
+ }
496
+ var Ze;
497
+ Ze = !1;
498
+ function Qe(o) {
499
+ return typeof o == "object" && o !== null && o.$$typeof === n;
500
+ }
501
+ function Rt() {
502
+ {
503
+ if (Je.current) {
504
+ var o = F(Je.current.type);
505
+ if (o)
506
+ return `
507
+
508
+ Check the render method of \`` + o + "`.";
509
+ }
510
+ return "";
511
+ }
512
+ }
513
+ function On(o) {
514
+ {
515
+ if (o !== void 0) {
516
+ var f = o.fileName.replace(/^.*[\\\/]/, ""), h = o.lineNumber;
517
+ return `
518
+
519
+ Check your code at ` + f + ":" + h + ".";
520
+ }
521
+ return "";
522
+ }
523
+ }
524
+ var Ot = {};
525
+ function Sn(o) {
526
+ {
527
+ var f = Rt();
528
+ if (!f) {
529
+ var h = typeof o == "string" ? o : o.displayName || o.name;
530
+ h && (f = `
531
+
532
+ Check the top-level render call using <` + h + ">.");
533
+ }
534
+ return f;
535
+ }
536
+ }
537
+ function St(o, f) {
538
+ {
539
+ if (!o._store || o._store.validated || o.key != null)
540
+ return;
541
+ o._store.validated = !0;
542
+ var h = Sn(f);
543
+ if (Ot[h])
544
+ return;
545
+ Ot[h] = !0;
546
+ var k = "";
547
+ o && o._owner && o._owner !== Je.current && (k = " It was passed a child from " + F(o._owner.type) + "."), _e(o), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, k), _e(null);
548
+ }
549
+ }
550
+ function Tt(o, f) {
551
+ {
552
+ if (typeof o != "object")
553
+ return;
554
+ if (Xe(o))
555
+ for (var h = 0; h < o.length; h++) {
556
+ var k = o[h];
557
+ Qe(k) && St(k, f);
558
+ }
559
+ else if (Qe(o))
560
+ o._store && (o._store.validated = !0);
561
+ else if (o) {
562
+ var j = w(o);
563
+ if (typeof j == "function" && j !== o.entries)
564
+ for (var O = j.call(o), E; !(E = O.next()).done; )
565
+ Qe(E.value) && St(E.value, f);
566
+ }
567
+ }
568
+ }
569
+ function Tn(o) {
570
+ {
571
+ var f = o.type;
572
+ if (f == null || typeof f == "string")
573
+ return;
574
+ var h;
575
+ if (typeof f == "function")
576
+ h = f.propTypes;
577
+ else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
578
+ // Inner props are checked in the reconciler.
579
+ f.$$typeof === m))
580
+ h = f.propTypes;
581
+ else
582
+ return;
583
+ if (h) {
584
+ var k = F(f);
585
+ gn(h, o.props, "prop", k, o);
586
+ } else if (f.PropTypes !== void 0 && !Ze) {
587
+ Ze = !0;
588
+ var j = F(f);
589
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
590
+ }
591
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
592
+ }
593
+ }
594
+ function Wn(o) {
595
+ {
596
+ for (var f = Object.keys(o.props), h = 0; h < f.length; h++) {
597
+ var k = f[h];
598
+ if (k !== "children" && k !== "key") {
599
+ _e(o), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", k), _e(null);
600
+ break;
601
+ }
602
+ }
603
+ o.ref !== null && (_e(o), x("Invalid attribute `ref` supplied to `React.Fragment`."), _e(null));
604
+ }
605
+ }
606
+ function Wt(o, f, h, k, j, O) {
607
+ {
608
+ var E = ge(o);
609
+ if (!E) {
610
+ var N = "";
611
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
612
+ var V = On(j);
613
+ V ? N += V : N += Rt();
614
+ var T;
615
+ o === null ? T = "null" : Xe(o) ? T = "array" : o !== void 0 && o.$$typeof === n ? (T = "<" + (F(o.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : T = typeof o, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, N);
616
+ }
617
+ var W = Rn(o, f, h, j, O);
618
+ if (W == null)
619
+ return W;
620
+ if (E) {
621
+ var K = f.children;
622
+ if (K !== void 0)
623
+ if (k)
624
+ if (Xe(K)) {
625
+ for (var be = 0; be < K.length; be++)
626
+ Tt(K[be], o);
627
+ Object.freeze && Object.freeze(K);
628
+ } else
629
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
630
+ else
631
+ Tt(K, o);
632
+ }
633
+ return o === r ? Wn(W) : Tn(W), W;
634
+ }
635
+ }
636
+ function In(o, f, h) {
637
+ return Wt(o, f, h, !0);
638
+ }
639
+ function Fn(o, f, h) {
640
+ return Wt(o, f, h, !1);
641
+ }
642
+ var Ln = Fn, An = In;
643
+ Ne.Fragment = r, Ne.jsx = Ln, Ne.jsxs = An;
644
+ }()), Ne;
645
+ }
646
+ var Pe = {};
647
+ /**
2
648
  * @license React
3
649
  * react-jsx-runtime.production.min.js
4
650
  *
@@ -6,5 +652,1251 @@ import w,{createContext as $,forwardRef as It,useContext as q,useState as I,useE
6
652
  *
7
653
  * This source code is licensed under the MIT license found in the
8
654
  * LICENSE file in the root directory of this source tree.
9
- */var Ze;function on(){if(Ze)return te;Ze=1;var e=w,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(s,d,c){var u,f={},v=null,m=null;c!==void 0&&(v=""+c),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(m=d.ref);for(u in d)r.call(d,u)&&!o.hasOwnProperty(u)&&(f[u]=d[u]);if(s&&s.defaultProps)for(u in d=s.defaultProps,d)f[u]===void 0&&(f[u]=d[u]);return{$$typeof:n,type:s,key:v,ref:m,props:f,_owner:a.current}}return te.Fragment=t,te.jsx=i,te.jsxs=i,te}ct.exports=on();var l=ct.exports;function oe(e){return e.mode==="multiple"}function ie(e){return e.mode==="range"}function he(e){return e.mode==="single"}var sn={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function ln(e,n){return S(e,"LLLL y",n)}function dn(e,n){return S(e,"d",n)}function un(e,n){return S(e,"LLLL",n)}function cn(e){return"".concat(e)}function fn(e,n){return S(e,"cccccc",n)}function vn(e,n){return S(e,"yyyy",n)}var mn=Object.freeze({__proto__:null,formatCaption:ln,formatDay:dn,formatMonthCaption:un,formatWeekNumber:cn,formatWeekdayName:fn,formatYearCaption:vn}),hn=function(e,n,t){return S(e,"do MMMM (EEEE)",t)},pn=function(){return"Month: "},yn=function(){return"Go to next month"},_n=function(){return"Go to previous month"},bn=function(e,n){return S(e,"cccc",n)},gn=function(e){return"Week n. ".concat(e)},wn=function(){return"Year: "},xn=Object.freeze({__proto__:null,labelDay:hn,labelMonthDropdown:pn,labelNext:yn,labelPrevious:_n,labelWeekNumber:gn,labelWeekday:bn,labelYearDropdown:wn});function Dn(){var e="buttons",n=sn,t=Ut,r={},a={},o=1,i={},s=new Date;return{captionLayout:e,classNames:n,formatters:mn,labels:xn,locale:t,modifiersClassNames:r,modifiers:a,numberOfMonths:o,styles:i,today:s,mode:"default"}}function kn(e){var n=e.fromYear,t=e.toYear,r=e.fromMonth,a=e.toMonth,o=e.fromDate,i=e.toDate;return r?o=E(r):n&&(o=new Date(n,0,1)),a?i=We(a):t&&(i=new Date(t,11,31)),{fromDate:o?Ue(o):void 0,toDate:i?Ue(i):void 0}}var ft=$(void 0);function Nn(e){var n,t=e.initialProps,r=Dn(),a=kn(t),o=a.fromDate,i=a.toDate,s=(n=t.captionLayout)!==null&&n!==void 0?n:r.captionLayout;s!=="buttons"&&(!o||!i)&&(s="buttons");var d;(he(t)||oe(t)||ie(t))&&(d=t.onSelect);var c=b(b(b({},r),t),{captionLayout:s,classNames:b(b({},r.classNames),t.classNames),components:b({},t.components),formatters:b(b({},r.formatters),t.formatters),fromDate:o,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:d,styles:b(b({},r.styles),t.styles),toDate:i});return l.jsx(ft.Provider,{value:c,children:e.children})}function k(){var e=q(ft);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function vt(e){var n=k(),t=n.locale,r=n.classNames,a=n.styles,o=n.formatters.formatCaption;return l.jsx("div",{className:r.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:o(e.displayMonth,{locale:t})})}function Mn(e){return l.jsx("svg",b({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:l.jsx("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"})}))}function mt(e){var n,t,r=e.onChange,a=e.value,o=e.children,i=e.caption,s=e.className,d=e.style,c=k(),u=(t=(n=c.components)===null||n===void 0?void 0:n.IconDropdown)!==null&&t!==void 0?t:Mn;return l.jsxs("div",{className:s,style:d,children:[l.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),l.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:a,onChange:r,children:o}),l.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[i,l.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function Cn(e){var n,t=k(),r=t.fromDate,a=t.toDate,o=t.styles,i=t.locale,s=t.formatters.formatMonthCaption,d=t.classNames,c=t.components,u=t.labels.labelMonthDropdown;if(!r)return l.jsx(l.Fragment,{});if(!a)return l.jsx(l.Fragment,{});var f=[];if(Bt(r,a))for(var v=E(r),m=r.getMonth();m<=a.getMonth();m++)f.push(ge(v,m));else for(var v=E(new Date),m=0;m<=11;m++)f.push(ge(v,m));var p=function(y){var D=Number(y.target.value),x=ge(E(e.displayMonth),D);e.onChange(x)},g=(n=c==null?void 0:c.Dropdown)!==null&&n!==void 0?n:mt;return l.jsx(g,{name:"months","aria-label":u(),className:d.dropdown_month,style:o.dropdown_month,onChange:p,value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:i}),children:f.map(function(y){return l.jsx("option",{value:y.getMonth(),children:s(y,{locale:i})},y.getMonth())})})}function Pn(e){var n,t=e.displayMonth,r=k(),a=r.fromDate,o=r.toDate,i=r.locale,s=r.styles,d=r.classNames,c=r.components,u=r.formatters.formatYearCaption,f=r.labels.labelYearDropdown,v=[];if(!a)return l.jsx(l.Fragment,{});if(!o)return l.jsx(l.Fragment,{});for(var m=a.getFullYear(),p=o.getFullYear(),g=m;g<=p;g++)v.push(Xe(Ft(new Date),g));var y=function(x){var P=Xe(E(t),Number(x.target.value));e.onChange(P)},D=(n=c==null?void 0:c.Dropdown)!==null&&n!==void 0?n:mt;return l.jsx(D,{name:"years","aria-label":f(),className:d.dropdown_year,style:s.dropdown_year,onChange:y,value:t.getFullYear(),caption:u(t,{locale:i}),children:v.map(function(x){return l.jsx("option",{value:x.getFullYear(),children:u(x,{locale:i})},x.getFullYear())})})}function jn(e,n){var t=I(e),r=t[0],a=t[1],o=n===void 0?r:n;return[o,a]}function On(e){var n=e.month,t=e.defaultMonth,r=e.today,a=n||t||r||new Date,o=e.toDate,i=e.fromDate,s=e.numberOfMonths,d=s===void 0?1:s;if(o&&re(o,a)<0){var c=-1*(d-1);a=L(o,c)}return i&&re(a,i)<0&&(a=i),E(a)}function Wn(){var e=k(),n=On(e),t=jn(n,e.month),r=t[0],a=t[1],o=function(i){var s;if(!e.disableNavigation){var d=E(i);a(d),(s=e.onMonthChange)===null||s===void 0||s.call(e,d)}};return[r,o]}function En(e,n){for(var t=n.reverseMonths,r=n.numberOfMonths,a=E(e),o=E(L(a,r)),i=re(o,a),s=[],d=0;d<i;d++){var c=L(a,d);s.push(c)}return t&&(s=s.reverse()),s}function In(e,n){if(!n.disableNavigation){var t=n.toDate,r=n.pagedNavigation,a=n.numberOfMonths,o=a===void 0?1:a,i=r?o:1,s=E(e);if(!t)return L(s,i);var d=re(t,e);if(!(d<o))return L(s,i)}}function Sn(e,n){if(!n.disableNavigation){var t=n.fromDate,r=n.pagedNavigation,a=n.numberOfMonths,o=a===void 0?1:a,i=r?o:1,s=E(e);if(!t)return L(s,-i);var d=re(s,t);if(!(d<=0))return L(s,-i)}}var ht=$(void 0);function Rn(e){var n=k(),t=Wn(),r=t[0],a=t[1],o=En(r,n),i=In(r,n),s=Sn(r,n),d=function(f){return o.some(function(v){return Ee(f,v)})},c=function(f,v){d(f)||(v&&Ie(f,v)?a(L(f,1+n.numberOfMonths*-1)):a(f))},u={currentMonth:r,displayMonths:o,goToMonth:a,goToDate:c,previousMonth:s,nextMonth:i,isDateDisplayed:d};return l.jsx(ht.Provider,{value:u,children:e.children})}function se(){var e=q(ht);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Je(e){var n,t=k(),r=t.classNames,a=t.styles,o=t.components,i=se().goToMonth,s=function(u){i(L(u,e.displayIndex?-e.displayIndex:0))},d=(n=o==null?void 0:o.CaptionLabel)!==null&&n!==void 0?n:vt,c=l.jsx(d,{id:e.id,displayMonth:e.displayMonth});return l.jsxs("div",{className:r.caption_dropdowns,style:a.caption_dropdowns,children:[l.jsx("div",{className:r.vhidden,children:c}),l.jsx(Cn,{onChange:s,displayMonth:e.displayMonth}),l.jsx(Pn,{onChange:s,displayMonth:e.displayMonth})]})}function Ln(e){return l.jsx("svg",b({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:l.jsx("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"})}))}function Bn(e){return l.jsx("svg",b({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:l.jsx("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"})}))}var ve=It(function(e,n){var t=k(),r=t.classNames,a=t.styles,o=[r.button_reset,r.button];e.className&&o.push(e.className);var i=o.join(" "),s=b(b({},a.button_reset),a.button);return e.style&&Object.assign(s,e.style),l.jsx("button",b({},e,{ref:n,type:"button",className:i,style:s}))});function Fn(e){var n,t,r=k(),a=r.dir,o=r.locale,i=r.classNames,s=r.styles,d=r.labels,c=d.labelPrevious,u=d.labelNext,f=r.components;if(!e.nextMonth&&!e.previousMonth)return l.jsx(l.Fragment,{});var v=c(e.previousMonth,{locale:o}),m=[i.nav_button,i.nav_button_previous].join(" "),p=u(e.nextMonth,{locale:o}),g=[i.nav_button,i.nav_button_next].join(" "),y=(n=f==null?void 0:f.IconRight)!==null&&n!==void 0?n:Bn,D=(t=f==null?void 0:f.IconLeft)!==null&&t!==void 0?t:Ln;return l.jsxs("div",{className:i.nav,style:s.nav,children:[!e.hidePrevious&&l.jsx(ve,{name:"previous-month","aria-label":v,className:m,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?l.jsx(y,{className:i.nav_icon,style:s.nav_icon}):l.jsx(D,{className:i.nav_icon,style:s.nav_icon})}),!e.hideNext&&l.jsx(ve,{name:"next-month","aria-label":p,className:g,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?l.jsx(D,{className:i.nav_icon,style:s.nav_icon}):l.jsx(y,{className:i.nav_icon,style:s.nav_icon})})]})}function Qe(e){var n=k().numberOfMonths,t=se(),r=t.previousMonth,a=t.nextMonth,o=t.goToMonth,i=t.displayMonths,s=i.findIndex(function(p){return Ee(e.displayMonth,p)}),d=s===0,c=s===i.length-1,u=n>1&&(d||!c),f=n>1&&(c||!d),v=function(){r&&o(r)},m=function(){a&&o(a)};return l.jsx(Fn,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:a,previousMonth:r,onPreviousClick:v,onNextClick:m})}function Tn(e){var n,t=k(),r=t.classNames,a=t.disableNavigation,o=t.styles,i=t.captionLayout,s=t.components,d=(n=s==null?void 0:s.CaptionLabel)!==null&&n!==void 0?n:vt,c;return a?c=l.jsx(d,{id:e.id,displayMonth:e.displayMonth}):i==="dropdown"?c=l.jsx(Je,{displayMonth:e.displayMonth,id:e.id}):i==="dropdown-buttons"?c=l.jsxs(l.Fragment,{children:[l.jsx(Je,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),l.jsx(Qe,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):c=l.jsxs(l.Fragment,{children:[l.jsx(d,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),l.jsx(Qe,{displayMonth:e.displayMonth,id:e.id})]}),l.jsx("div",{className:r.caption,style:o.caption,children:c})}function An(e){var n=k(),t=n.footer,r=n.styles,a=n.classNames.tfoot;return t?l.jsx("tfoot",{className:a,style:r.tfoot,children:l.jsx("tr",{children:l.jsx("td",{colSpan:8,children:t})})}):l.jsx(l.Fragment,{})}function Yn(e,n,t){for(var r=t?Se(new Date):Re(new Date,{locale:e,weekStartsOn:n}),a=[],o=0;o<7;o++){var i=W(r,o);a.push(i)}return a}function Hn(){var e=k(),n=e.classNames,t=e.styles,r=e.showWeekNumber,a=e.locale,o=e.weekStartsOn,i=e.ISOWeek,s=e.formatters.formatWeekdayName,d=e.labels.labelWeekday,c=Yn(a,o,i);return l.jsxs("tr",{style:t.head_row,className:n.head_row,children:[r&&l.jsx("td",{style:t.head_cell,className:n.head_cell}),c.map(function(u,f){return l.jsx("th",{scope:"col",className:n.head_cell,style:t.head_cell,"aria-label":d(u,{locale:a}),children:s(u,{locale:a})},f)})]})}function Vn(){var e,n=k(),t=n.classNames,r=n.styles,a=n.components,o=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:Hn;return l.jsx("thead",{style:r.head,className:t.head,children:l.jsx(o,{})})}function Kn(e){var n=k(),t=n.locale,r=n.formatters.formatDay;return l.jsx(l.Fragment,{children:r(e.date,{locale:t})})}var Le=$(void 0);function Un(e){if(!oe(e.initialProps)){var n={selected:void 0,modifiers:{disabled:[]}};return l.jsx(Le.Provider,{value:n,children:e.children})}return l.jsx(Xn,{initialProps:e.initialProps,children:e.children})}function Xn(e){var n=e.initialProps,t=e.children,r=n.selected,a=n.min,o=n.max,i=function(c,u,f){var v,m;(v=n.onDayClick)===null||v===void 0||v.call(n,c,u,f);var p=!!(u.selected&&a&&(r==null?void 0:r.length)===a);if(!p){var g=!!(!u.selected&&o&&(r==null?void 0:r.length)===o);if(!g){var y=r?ut([],r,!0):[];if(u.selected){var D=y.findIndex(function(x){return C(c,x)});y.splice(D,1)}else y.push(c);(m=n.onSelect)===null||m===void 0||m.call(n,y,c,u,f)}}},s={disabled:[]};r&&s.disabled.push(function(c){var u=o&&r.length>o-1,f=r.some(function(v){return C(v,c)});return!!(u&&!f)});var d={selected:r,onDayClick:i,modifiers:s};return l.jsx(Le.Provider,{value:d,children:t})}function Be(){var e=q(Le);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function $n(e,n){var t=n||{},r=t.from,a=t.to;return r&&a?C(a,e)&&C(r,e)?void 0:C(a,e)?{from:a,to:void 0}:C(r,e)?void 0:fe(r,e)?{from:e,to:a}:{from:r,to:e}:a?fe(e,a)?{from:a,to:e}:{from:e,to:a}:r?Ie(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var Fe=$(void 0);function qn(e){if(!ie(e.initialProps)){var n={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return l.jsx(Fe.Provider,{value:n,children:e.children})}return l.jsx(Gn,{initialProps:e.initialProps,children:e.children})}function Gn(e){var n=e.initialProps,t=e.children,r=n.selected,a=r||{},o=a.from,i=a.to,s=n.min,d=n.max,c=function(m,p,g){var y,D;(y=n.onDayClick)===null||y===void 0||y.call(n,m,p,g);var x=$n(m,r);(D=n.onSelect)===null||D===void 0||D.call(n,x,m,p,g)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(u.range_start=[o],i?(u.range_end=[i],C(o,i)||(u.range_middle=[{after:o,before:i}])):u.range_end=[o]):i&&(u.range_start=[i],u.range_end=[i]),s&&(o&&!i&&u.disabled.push({after:be(o,s-1),before:W(o,s-1)}),o&&i&&u.disabled.push({after:o,before:W(o,s-1)}),!o&&i&&u.disabled.push({after:be(i,s-1),before:W(i,s-1)})),d){if(o&&!i&&(u.disabled.push({before:W(o,-d+1)}),u.disabled.push({after:W(o,d-1)})),o&&i){var f=A(i,o)+1,v=d-f;u.disabled.push({before:be(o,v)}),u.disabled.push({after:W(i,v)})}!o&&i&&(u.disabled.push({before:W(i,-d+1)}),u.disabled.push({after:W(i,d-1)}))}return l.jsx(Fe.Provider,{value:{selected:r,onDayClick:c,modifiers:u},children:t})}function Te(){var e=q(Fe);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function ue(e){return Array.isArray(e)?ut([],e,!0):e!==void 0?[e]:[]}function Zn(e){var n={};return Object.entries(e).forEach(function(t){var r=t[0],a=t[1];n[r]=ue(a)}),n}var R;(function(e){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"})(R||(R={}));var Jn=R.Selected,T=R.Disabled,Qn=R.Hidden,zn=R.Today,we=R.RangeEnd,xe=R.RangeMiddle,De=R.RangeStart,er=R.Outside;function tr(e,n,t){var r,a=(r={},r[Jn]=ue(e.selected),r[T]=ue(e.disabled),r[Qn]=ue(e.hidden),r[zn]=[e.today],r[we]=[],r[xe]=[],r[De]=[],r[er]=[],r);return e.fromDate&&a[T].push({before:e.fromDate}),e.toDate&&a[T].push({after:e.toDate}),oe(e)?a[T]=a[T].concat(n.modifiers[T]):ie(e)&&(a[T]=a[T].concat(t.modifiers[T]),a[De]=t.modifiers[De],a[xe]=t.modifiers[xe],a[we]=t.modifiers[we]),a}var pt=$(void 0);function nr(e){var n=k(),t=Be(),r=Te(),a=tr(n,t,r),o=Zn(n.modifiers),i=b(b({},a),o);return l.jsx(pt.Provider,{value:i,children:e.children})}function yt(){var e=q(pt);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function rr(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function ar(e){return!!(e&&typeof e=="object"&&"from"in e)}function or(e){return!!(e&&typeof e=="object"&&"after"in e)}function ir(e){return!!(e&&typeof e=="object"&&"before"in e)}function sr(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function lr(e,n){var t,r=n.from,a=n.to;if(r&&a){var o=A(a,r)<0;o&&(t=[a,r],r=t[0],a=t[1]);var i=A(e,r)>=0&&A(a,e)>=0;return i}return a?C(a,e):r?C(r,e):!1}function dr(e){return it(e)}function ur(e){return Array.isArray(e)&&e.every(it)}function cr(e,n){return n.some(function(t){if(typeof t=="boolean")return t;if(dr(t))return C(e,t);if(ur(t))return t.includes(e);if(ar(t))return lr(e,t);if(sr(t))return t.dayOfWeek.includes(e.getDay());if(rr(t)){var r=A(t.before,e),a=A(t.after,e),o=r>0,i=a<0,s=fe(t.before,t.after);return s?i&&o:o||i}return or(t)?A(e,t.after)>0:ir(t)?A(t.before,e)>0:typeof t=="function"?t(e):!1})}function Ae(e,n,t){var r=Object.keys(n).reduce(function(o,i){var s=n[i];return cr(e,s)&&o.push(i),o},[]),a={};return r.forEach(function(o){return a[o]=!0}),t&&!Ee(e,t)&&(a.outside=!0),a}function fr(e,n){for(var t=E(e[0]),r=We(e[e.length-1]),a,o,i=t;i<=r;){var s=Ae(i,n),d=!s.disabled&&!s.hidden;if(!d){i=W(i,1);continue}if(s.selected)return i;s.today&&!o&&(o=i),a||(a=i),i=W(i,1)}return o||a}var vr=365;function _t(e,n){var t=n.moveBy,r=n.direction,a=n.context,o=n.modifiers,i=n.retry,s=i===void 0?{count:0,lastFocused:e}:i,d=a.weekStartsOn,c=a.fromDate,u=a.toDate,f=a.locale,v={day:W,week:Ce,month:L,year:Vt,startOfWeek:function(y){return a.ISOWeek?Se(y):Re(y,{locale:f,weekStartsOn:d})},endOfWeek:function(y){return a.ISOWeek?at(y):ot(y,{locale:f,weekStartsOn:d})}},m=v[t](e,r==="after"?1:-1);r==="before"&&c?m=Tt([c,m]):r==="after"&&u&&(m=At([u,m]));var p=!0;if(o){var g=Ae(m,o);p=!g.disabled&&!g.hidden}return p?m:s.count>vr?s.lastFocused:_t(m,{moveBy:t,direction:r,context:a,modifiers:o,retry:b(b({},s),{count:s.count+1})})}var bt=$(void 0);function mr(e){var n=se(),t=yt(),r=I(),a=r[0],o=r[1],i=I(),s=i[0],d=i[1],c=fr(n.displayMonths,t),u=a??(s&&n.isDateDisplayed(s))?s:c,f=function(){d(a),o(void 0)},v=function(y){o(y)},m=k(),p=function(y,D){if(a){var x=_t(a,{moveBy:y,direction:D,context:m,modifiers:t});C(a,x)||(n.goToDate(x,a),v(x))}},g={focusedDay:a,focusTarget:u,blur:f,focus:v,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return l.jsx(bt.Provider,{value:g,children:e.children})}function Ye(){var e=q(bt);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function hr(e,n){var t=yt(),r=Ae(e,t,n);return r}var He=$(void 0);function pr(e){if(!he(e.initialProps)){var n={selected:void 0};return l.jsx(He.Provider,{value:n,children:e.children})}return l.jsx(yr,{initialProps:e.initialProps,children:e.children})}function yr(e){var n=e.initialProps,t=e.children,r=function(o,i,s){var d,c,u;if((d=n.onDayClick)===null||d===void 0||d.call(n,o,i,s),i.selected&&!n.required){(c=n.onSelect)===null||c===void 0||c.call(n,void 0,o,i,s);return}(u=n.onSelect)===null||u===void 0||u.call(n,o,o,i,s)},a={selected:n.selected,onDayClick:r};return l.jsx(He.Provider,{value:a,children:t})}function gt(){var e=q(He);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function _r(e,n){var t=k(),r=gt(),a=Be(),o=Te(),i=Ye(),s=i.focusDayAfter,d=i.focusDayBefore,c=i.focusWeekAfter,u=i.focusWeekBefore,f=i.blur,v=i.focus,m=i.focusMonthBefore,p=i.focusMonthAfter,g=i.focusYearBefore,y=i.focusYearAfter,D=i.focusStartOfWeek,x=i.focusEndOfWeek,P=function(_){var h,V,O,Z;he(t)?(h=r.onDayClick)===null||h===void 0||h.call(r,e,n,_):oe(t)?(V=a.onDayClick)===null||V===void 0||V.call(a,e,n,_):ie(t)?(O=o.onDayClick)===null||O===void 0||O.call(o,e,n,_):(Z=t.onDayClick)===null||Z===void 0||Z.call(t,e,n,_)},j=function(_){var h;v(e),(h=t.onDayFocus)===null||h===void 0||h.call(t,e,n,_)},H=function(_){var h;f(),(h=t.onDayBlur)===null||h===void 0||h.call(t,e,n,_)},B=function(_){var h;(h=t.onDayMouseEnter)===null||h===void 0||h.call(t,e,n,_)},G=function(_){var h;(h=t.onDayMouseLeave)===null||h===void 0||h.call(t,e,n,_)},le=function(_){var h;(h=t.onDayPointerEnter)===null||h===void 0||h.call(t,e,n,_)},J=function(_){var h;(h=t.onDayPointerLeave)===null||h===void 0||h.call(t,e,n,_)},ye=function(_){var h;(h=t.onDayTouchCancel)===null||h===void 0||h.call(t,e,n,_)},Q=function(_){var h;(h=t.onDayTouchEnd)===null||h===void 0||h.call(t,e,n,_)},z=function(_){var h;(h=t.onDayTouchMove)===null||h===void 0||h.call(t,e,n,_)},F=function(_){var h;(h=t.onDayTouchStart)===null||h===void 0||h.call(t,e,n,_)},ee=function(_){var h;(h=t.onDayKeyUp)===null||h===void 0||h.call(t,e,n,_)},de=function(_){var h;switch(_.key){case"ArrowLeft":_.preventDefault(),_.stopPropagation(),t.dir==="rtl"?s():d();break;case"ArrowRight":_.preventDefault(),_.stopPropagation(),t.dir==="rtl"?d():s();break;case"ArrowDown":_.preventDefault(),_.stopPropagation(),c();break;case"ArrowUp":_.preventDefault(),_.stopPropagation(),u();break;case"PageUp":_.preventDefault(),_.stopPropagation(),_.shiftKey?g():m();break;case"PageDown":_.preventDefault(),_.stopPropagation(),_.shiftKey?y():p();break;case"Home":_.preventDefault(),_.stopPropagation(),D();break;case"End":_.preventDefault(),_.stopPropagation(),x();break}(h=t.onDayKeyDown)===null||h===void 0||h.call(t,e,n,_)},_e={onClick:P,onFocus:j,onBlur:H,onKeyDown:de,onKeyUp:ee,onMouseEnter:B,onMouseLeave:G,onPointerEnter:le,onPointerLeave:J,onTouchCancel:ye,onTouchEnd:Q,onTouchMove:z,onTouchStart:F};return _e}function br(){var e=k(),n=gt(),t=Be(),r=Te(),a=he(e)?n.selected:oe(e)?t.selected:ie(e)?r.selected:void 0;return a}function gr(e){return Object.values(R).includes(e)}function wr(e,n){var t=[e.classNames.day];return Object.keys(n).forEach(function(r){var a=e.modifiersClassNames[r];if(a)t.push(a);else if(gr(r)){var o=e.classNames["day_".concat(r)];o&&t.push(o)}}),t}function xr(e,n){var t=b({},e.styles.day);return Object.keys(n).forEach(function(r){var a;t=b(b({},t),(a=e.modifiersStyles)===null||a===void 0?void 0:a[r])}),t}function Dr(e,n,t){var r,a,o,i=k(),s=Ye(),d=hr(e,n),c=_r(e,d),u=br(),f=!!(i.onDayClick||i.mode!=="default");me(function(){var B;d.outside||s.focusedDay&&f&&C(s.focusedDay,e)&&((B=t.current)===null||B===void 0||B.focus())},[s.focusedDay,e,t,f,d.outside]);var v=wr(i,d).join(" "),m=xr(i,d),p=!!(d.outside&&!i.showOutsideDays||d.hidden),g=(o=(a=i.components)===null||a===void 0?void 0:a.DayContent)!==null&&o!==void 0?o:Kn,y=l.jsx(g,{date:e,displayMonth:n,activeModifiers:d}),D={style:m,className:v,children:y,role:"gridcell"},x=s.focusTarget&&C(s.focusTarget,e)&&!d.outside,P=s.focusedDay&&C(s.focusedDay,e),j=b(b(b({},D),(r={disabled:d.disabled,role:"gridcell"},r["aria-selected"]=d.selected,r.tabIndex=P||x?0:-1,r)),c),H={isButton:f,isHidden:p,activeModifiers:d,selectedDays:u,buttonProps:j,divProps:D};return H}function kr(e){var n=ce(null),t=Dr(e.date,e.displayMonth,n);return t.isHidden?l.jsx("div",{role:"gridcell"}):t.isButton?l.jsx(ve,b({name:"day",ref:n},t.buttonProps)):l.jsx("div",b({},t.divProps))}function Nr(e){var n=e.number,t=e.dates,r=k(),a=r.onWeekNumberClick,o=r.styles,i=r.classNames,s=r.locale,d=r.labels.labelWeekNumber,c=r.formatters.formatWeekNumber,u=c(Number(n),{locale:s});if(!a)return l.jsx("span",{className:i.weeknumber,style:o.weeknumber,children:u});var f=d(Number(n),{locale:s}),v=function(m){a(n,t,m)};return l.jsx(ve,{name:"week-number","aria-label":f,className:i.weeknumber,style:o.weeknumber,onClick:v,children:u})}function Mr(e){var n,t,r=k(),a=r.styles,o=r.classNames,i=r.showWeekNumber,s=r.components,d=(n=s==null?void 0:s.Day)!==null&&n!==void 0?n:kr,c=(t=s==null?void 0:s.WeekNumber)!==null&&t!==void 0?t:Nr,u;return i&&(u=l.jsx("td",{className:o.cell,style:a.cell,children:l.jsx(c,{number:e.weekNumber,dates:e.dates})})),l.jsxs("tr",{className:o.row,style:a.row,children:[u,e.dates.map(function(f){return l.jsx("td",{className:o.cell,style:a.cell,role:"presentation",children:l.jsx(d,{displayMonth:e.displayMonth,date:f})},Rt(f))})]})}function ze(e,n,t){for(var r=t!=null&&t.ISOWeek?at(n):ot(n,t),a=t!=null&&t.ISOWeek?Se(e):Re(e,t),o=A(r,a),i=[],s=0;s<=o;s++)i.push(W(a,s));var d=i.reduce(function(c,u){var f=t!=null&&t.ISOWeek?Yt(u):Ht(u,t),v=c.find(function(m){return m.weekNumber===f});return v?(v.dates.push(u),c):(c.push({weekNumber:f,dates:[u]}),c)},[]);return d}function Cr(e,n){var t=ze(E(e),We(e),n);if(n!=null&&n.useFixedWeeks){var r=Lt(e,n);if(r<6){var a=t[t.length-1],o=a.dates[a.dates.length-1],i=Ce(o,6-r),s=ze(Ce(o,1),i,n);t.push.apply(t,s)}}return t}function Pr(e){var n,t,r,a=k(),o=a.locale,i=a.classNames,s=a.styles,d=a.hideHead,c=a.fixedWeeks,u=a.components,f=a.weekStartsOn,v=a.firstWeekContainsDate,m=a.ISOWeek,p=Cr(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:m,locale:o,weekStartsOn:f,firstWeekContainsDate:v}),g=(n=u==null?void 0:u.Head)!==null&&n!==void 0?n:Vn,y=(t=u==null?void 0:u.Row)!==null&&t!==void 0?t:Mr,D=(r=u==null?void 0:u.Footer)!==null&&r!==void 0?r:An;return l.jsxs("table",{id:e.id,className:i.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!d&&l.jsx(g,{}),l.jsx("tbody",{className:i.tbody,style:s.tbody,children:p.map(function(x){return l.jsx(y,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),l.jsx(D,{displayMonth:e.displayMonth})]})}function jr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Or=jr()?St:me,ke=!1,Wr=0;function et(){return"react-day-picker-".concat(++Wr)}function Er(e){var n,t=e??(ke?et():null),r=I(t),a=r[0],o=r[1];return Or(function(){a===null&&o(et())},[]),me(function(){ke===!1&&(ke=!0)},[]),(n=e??a)!==null&&n!==void 0?n:void 0}function Ir(e){var n,t,r=k(),a=r.dir,o=r.classNames,i=r.styles,s=r.components,d=se().displayMonths,c=Er(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),u=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],v=i.month,m=e.displayIndex===0,p=e.displayIndex===d.length-1,g=!m&&!p;a==="rtl"&&(n=[m,p],p=n[0],m=n[1]),m&&(f.push(o.caption_start),v=b(b({},v),i.caption_start)),p&&(f.push(o.caption_end),v=b(b({},v),i.caption_end)),g&&(f.push(o.caption_between),v=b(b({},v),i.caption_between));var y=(t=s==null?void 0:s.Caption)!==null&&t!==void 0?t:Tn;return l.jsxs("div",{className:f.join(" "),style:v,children:[l.jsx(y,{id:c,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),l.jsx(Pr,{id:u,"aria-labelledby":c,displayMonth:e.displayMonth})]},e.displayIndex)}function Sr(e){var n=k(),t=n.classNames,r=n.styles;return l.jsx("div",{className:t.months,style:r.months,children:e.children})}function Rr(e){var n,t,r=e.initialProps,a=k(),o=Ye(),i=se(),s=I(!1),d=s[0],c=s[1];me(function(){a.initialFocus&&o.focusTarget&&(d||(o.focus(o.focusTarget),c(!0)))},[a.initialFocus,d,o.focus,o.focusTarget,o]);var u=[a.classNames.root,a.className];a.numberOfMonths>1&&u.push(a.classNames.multiple_months),a.showWeekNumber&&u.push(a.classNames.with_weeknumber);var f=b(b({},a.styles.root),a.style),v=Object.keys(r).filter(function(p){return p.startsWith("data-")}).reduce(function(p,g){var y;return b(b({},p),(y={},y[g]=r[g],y))},{}),m=(t=(n=r.components)===null||n===void 0?void 0:n.Months)!==null&&t!==void 0?t:Sr;return l.jsx("div",b({className:u.join(" "),style:f,dir:a.dir,id:a.id,nonce:r.nonce,title:r.title,lang:r.lang},v,{children:l.jsx(m,{children:i.displayMonths.map(function(p,g){return l.jsx(Ir,{displayIndex:g,displayMonth:p},g)})})}))}function Lr(e){var n=e.children,t=an(e,["children"]);return l.jsx(Nn,{initialProps:t,children:l.jsx(Rn,{children:l.jsx(pr,{initialProps:t,children:l.jsx(Un,{initialProps:t,children:l.jsx(qn,{initialProps:t,children:l.jsx(nr,{children:l.jsx(mr,{children:n})})})})})})})}function Br(e){return l.jsx(Lr,b({},e,{children:l.jsx(Rr,{initialProps:e})}))}const Fr="_root_2a8vt_1",Tr="_vhidden_2a8vt_16",Ar="_button_reset_2a8vt_36",Yr="_button_2a8vt_36",Hr="_day_selected_2a8vt_59",Vr="_months_2a8vt_77",Kr="_month_2a8vt_77",Ur="_table_2a8vt_93",Xr="_with_weeknumber_2a8vt_99",$r="_caption_2a8vt_104",qr="_multiple_months_2a8vt_112",Gr="_caption_dropdowns_2a8vt_118",Zr="_caption_label_2a8vt_123",Jr="_nav_2a8vt_139",Qr="_caption_start_2a8vt_143",zr="_caption_end_2a8vt_150",ea="_nav_button_2a8vt_157",ta="_dropdown_year_2a8vt_171",na="_dropdown_month_2a8vt_172",ra="_dropdown_2a8vt_171",aa="_dropdown_icon_2a8vt_208",oa="_head_2a8vt_212",ia="_head_row_2a8vt_216",sa="_row_2a8vt_217",la="_head_cell_2a8vt_221",da="_tbody_2a8vt_232",ua="_tfoot_2a8vt_236",ca="_cell_2a8vt_240",fa="_weeknumber_2a8vt_248",va="_day_2a8vt_59",ma="_day_today_2a8vt_267",ha="_day_outside_2a8vt_267",pa="_day_range_start_2a8vt_290",ya="_day_range_end_2a8vt_290",_a="_day_range_middle_2a8vt_314",ba={root:Fr,vhidden:Tr,button_reset:Ar,button:Yr,day_selected:Hr,months:Vr,month:Kr,table:Ur,with_weeknumber:Xr,caption:$r,multiple_months:qr,caption_dropdowns:Gr,caption_label:Zr,nav:Jr,caption_start:Qr,caption_end:zr,nav_button:ea,dropdown_year:ta,dropdown_month:na,dropdown:ra,dropdown_icon:aa,head:oa,head_row:ia,row:sa,head_cell:la,tbody:da,tfoot:ua,cell:ca,weeknumber:fa,day:va,day_today:ma,day_outside:ha,day_range_start:pa,day_range_end:ya,day_range_middle:_a},ga=329,K=12,pe=26,wt=20,Oe=9,tt=12,xt=(e,n)=>e.top>n.height+pe?Y.positionabove:Y.positionbelow,wa=e=>e.left+e.width/4,xa=e=>document.documentElement.clientWidth-e.right+e.width/4,Da=(e,n)=>e.left+n.width,ka=e=>e.left>K,Na=(e,n)=>Da(e,n)<document.documentElement.clientWidth-K,Ma=(e,n)=>Na(e,n)?ka(e)?"floating":"left":"right",Ne=(e,n)=>e.top-pe-n.height,Me=e=>e.bottom+pe,Ca=()=>document.documentElement.clientWidth-K*2,Pa=()=>document.documentElement.clientWidth>ga+K*2,nt=e=>e.top-pe-Oe+5,ja=e=>wa(e)-wt/2,Oa=e=>xa(e)-wt/2,Wa=(e,n)=>{const t=Ma(e,n),r=xt(e,n);return t==="left"?r===Y.positionabove?"leftabove":"leftbelow":t==="right"?r===Y.positionabove?"rightabove":"rightbelow":r===Y.positionabove?"floatingabove":"floatingbelow"},Ea=(e,n)=>{const t=Wa(e,n),r=Pa()?void 0:Ca();return t==="leftabove"?{left:K,top:Ne(e,n),width:r}:t==="leftbelow"?{left:K,top:Me(e),width:r}:t==="rightabove"?{right:K,top:Ne(e,n),width:r}:t==="rightbelow"?{right:K,top:Me(e),width:r}:t==="floatingbelow"?{left:e.left,top:Me(e),width:r}:{left:e.left,top:Ne(e,n),width:r}},Ia=(e,n,t)=>{const r=ja(n),a=Oa(n),o=e.left+tt,i=e.right+tt;return e.right?t===Y.positionabove?{right:a>i?a:i,top:nt(n)}:{right:a>i?a:i,top:n.bottom+Oe}:t===Y.positionabove?{left:r>o?r:o,top:nt(n)}:{left:r>o?r:o,top:n.bottom+Oe}},Sa=e=>{const{datepickerWrapperRef:n,footer:t,inputRef:r,testId:a,...o}=e,i=ce(null),[s,d]=I(),c=nn(n),u=en(r,0);Qt(n,!0);const f=()=>{var x;d((x=r.current)==null?void 0:x.getBoundingClientRect())};w.useEffect(()=>{f()},[]),zt(f,500),tn(f,["scroll","resize"],10);const v=je(M["datepicker-popup-container"],{[M["datepicker-popup-container--visible"]]:u}),m=s&&c&&xt(s,c),p=je(M["datepicker-popup-arrow"],{[M["datepicker-popup-arrow--visible"]]:u,[M["datepicker-popup-arrow--over"]]:m===Y.positionbelow,[M["datepicker-popup-arrow--under"]]:m===Y.positionabove}),g=s&&c&&Ea(s,c),y=g&&s&&m&&Ia(g,s,m),D={...ba,...M};return w.createElement(w.Fragment,null,w.createElement("div",{className:v,"data-testid":a,ref:n,style:g},w.createElement(Br,{captionLayout:"dropdown-buttons",classNames:D,mode:"single",modifiersClassNames:{today:M["day--today"],selected:M.day_selected,disabled:M["day--disabled"]},footer:w.createElement("span",{className:M["footer-wrapper"]},t),fixedWeeks:!0,...o})),w.createElement("div",{ref:i,className:p,style:y}))},Ra=Sa,Dt=w.forwardRef((e,n)=>{const{className:t,dateButtonAriaLabel:r,dateFormat:a="dd.MM.yyyy",dateValue:o,defaultMonth:i,dir:s,disableDays:d=[],disableWeekends:c,error:u,errorText:f,footerContent:v,label:m,locale:p=Xt,maxDate:g,minDate:y,onBlur:D,onChange:x,testId:P,autoComplete:j="off",...H}=e,[B,G]=I(o),[le,J]=I(B?S(B,a):""),[ye,Q]=I(i),[z,F]=I(!1),[ee,de]=I(!1),_e={dayOfWeek:[0,6]},_=c?[...d,_e]:d,h=ce(null),V=ce(null),{refObject:O}=st(lt(n)?n:null),Z=dt([n,O]);Zt(V,N=>{var X;const U=N.target;(X=h==null?void 0:h.current)!=null&&X.contains(U)||F(!1)}),w.useEffect(()=>{J(o?S(o,a):""),ae(o)&&(G(o),Q(o))},[o]),w.useEffect(()=>{ee&&O.current&&O.current.focus()},[ee]);const Ve=()=>{O!=null&&O.current&&O.current.focus(),F(!1)};qe(V,Ve,[$e.Escape]),qe(h,Ve,[$e.Escape]);const Ke=(N,U)=>{J(N.currentTarget.value);const X=ne(N.currentTarget.value,U,new Date);ae(X)?(G(X),Q(X)):G(void 0),x&&x(N,N.currentTarget.value)},Mt=()=>{ee?de(!1):F(!0)},Ct=(N,U,X,Et)=>{if(de(!0),!N){F(!1);return}G(N),O.current&&(J(S(N,a)),F(!1)),x&&x(Et,N)},Pt=N=>{var U;(U=V.current)!=null&&U.contains(N.relatedTarget)||F(!1),D&&D(N)},jt=N=>{N==null||N.stopPropagation(),F(!z)},Ot=w.createElement(Pe,{error:u,errorText:f,label:m,max:g?S(g,"yyyy-MM-dd"):"",min:y?S(y,"yyyy-MM-dd"):"",type:"date",ref:Z,value:le,width:14,...H,onBlur:N=>{D&&D(N)},onChange:N=>Ke(N,"yyyy-MM-dd"),autoComplete:j||void 0}),Wt=w.createElement(w.Fragment,null,w.createElement("div",{className:M["date-input-wrapper"]},w.createElement(Pe,{error:u,errorText:f,inputWrapperRef:h,label:m,onFocus:Mt,type:"text",ref:Z,value:le,width:12,...H,onBlur:Pt,onChange:N=>Ke(N,a),rightOfInput:w.createElement($t,{ariaLabel:r??"Velg dato",onClick:jt,tabIndex:z?-1:0,variant:"borderless",wrapperClassName:M["date-button"],className:M["date-button__inner"]},w.createElement(qt,{color:"black",svgIcon:Gt})),autoComplete:j||void 0})),z&&w.createElement(Ra,{dir:s,disabled:_,datepickerWrapperRef:V,footer:v,fromDate:y,toDate:g,inputRef:O,locale:p,month:ye,selected:B,onSelect:Ct,onMonthChange:Q}));return w.createElement("div",{className:t,"data-testid":P},Jt()?Ot:Wt)});Dt.displayName="DatePicker";const rt=e=>{const n=String(e);return n.length===1?"0"+n:n},La=e=>!e||/^\d+$/.test(e)&&e.length<=2,kt=w.forwardRef((e,n)=>{const{defaultValue:t,error:r,errorText:a,label:o,onChange:i,timeUnit:s,testId:d,autoComplete:c="off",...u}=e,[f,v]=I(typeof t<"u"?rt(t):""),{refObject:m}=st(lt(n)?n:null),p=dt([n,m]),g=P=>{const j=P.target.value;La(j)&&(v(j),i&&i(P))},y=P=>{const j=rt(P.target.value);v(j),i&&i(P)},D=P=>{const j=/[0-9]/,H=["Backspace"," ","Enter","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];!j.test(P.key)&&!H.includes(P.key)&&P.preventDefault()},x=()=>s==="hours"&&w.createElement("span",{className:M["time-separator"]},":");return w.createElement("div",{"data-testid":d},w.createElement(Pe,{error:r,errorText:a,label:o,max:s==="hours"?23:59,min:0,type:"number",ref:p,value:f,width:5,...u,onChange:g,onBlur:y,rightOfInput:x(),onKeyDown:D,autoComplete:c||void 0}))});kt.displayName="DateTime";const Ba=w.forwardRef((e,n)=>{const{children:t,errorText:r,legend:a,testId:o}=e,i=s=>Ge(s,Dt)?w.cloneElement(s,{className:je(M["date-time-picker-wrapper__date-picker"]),error:!!r}):Ge(s,kt)?w.cloneElement(s,{error:!!r}):s;return w.createElement("div",{ref:n,tabIndex:-1},w.createElement(rn,{errorText:r},e.legend?w.createElement("fieldset",{className:M["date-time-picker-wrapper"],"data-testid":o},e.legend&&w.createElement("legend",{className:M["date-time-picker-wrapper__legend"]},a),w.Children.map(t,i)):w.createElement("div",{className:M["date-time-picker-wrapper"]},w.Children.map(t,i))))});Ba.displayName="DateTimePickerWrapper";const Nt=e=>{const n=["yyyy-MM-dd","dd.MM.yyyy"];for(const t of n){const r=ne(e,t,new Date);if(ae(r))return r}return null},so=e=>{const n=new Date(e);return n instanceof Date&&!isNaN(n.getTime())},lo=(e,n,t,r)=>{const a=Nt(e),o=typeof t<"u",i=typeof r<"u";return!a||o&&!ae(t)||i&&!ae(r)?"Invalid date format":o&&!i&&(C(a,t)||fe(a,t))||i&&!o&&(C(a,r)||Ie(a,r))||o&&i&&(C(a,t)||C(a,r)||Kt(a,{start:t,end:r}))?!0:n},uo=(e,n,t)=>{const r=Nt(e);return r?n.some(a=>C(a,r))?t:!0:"Invalid date format"},co=(e,n,t,r)=>{const a=ne((e.hour+":"+e.minute).toString(),"HH:mm",new Date),o=ne(((t==null?void 0:t.hour)+":"+(t==null?void 0:t.minute)).toString(),"HH:mm",new Date),i=ne(((r==null?void 0:r.hour)+":"+(r==null?void 0:r.minute)).toString(),"HH:mm",new Date);return(typeof t>"u"||a>=o)&&(typeof r>"u"||a<=i)?!0:n};export{Dt as DatePicker,kt as DateTime,Ba as DateTimePickerWrapper,Dt as default,so as isValidDate,Nt as parseInputDate,uo as validateDisabledDates,lo as validateMinMaxDate,co as validateMinTimeMaxTime};
655
+ */
656
+ var Ht;
657
+ function vr() {
658
+ if (Ht)
659
+ return Pe;
660
+ Ht = 1;
661
+ var e = P, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
662
+ function s(l, u, v) {
663
+ var d, m = {}, p = null, y = null;
664
+ v !== void 0 && (p = "" + v), u.key !== void 0 && (p = "" + u.key), u.ref !== void 0 && (y = u.ref);
665
+ for (d in u)
666
+ r.call(u, d) && !i.hasOwnProperty(d) && (m[d] = u[d]);
667
+ if (l && l.defaultProps)
668
+ for (d in u = l.defaultProps, u)
669
+ m[d] === void 0 && (m[d] = u[d]);
670
+ return { $$typeof: n, type: l, key: p, ref: y, props: m, _owner: a.current };
671
+ }
672
+ return Pe.Fragment = t, Pe.jsx = s, Pe.jsxs = s, Pe;
673
+ }
674
+ process.env.NODE_ENV === "production" ? ct.exports = vr() : ct.exports = fr();
675
+ var c = ct.exports;
676
+ function Oe(e) {
677
+ return e.mode === "multiple";
678
+ }
679
+ function Se(e) {
680
+ return e.mode === "range";
681
+ }
682
+ function He(e) {
683
+ return e.mode === "single";
684
+ }
685
+ var mr = {
686
+ root: "rdp",
687
+ multiple_months: "rdp-multiple_months",
688
+ with_weeknumber: "rdp-with_weeknumber",
689
+ vhidden: "rdp-vhidden",
690
+ button_reset: "rdp-button_reset",
691
+ button: "rdp-button",
692
+ caption: "rdp-caption",
693
+ caption_start: "rdp-caption_start",
694
+ caption_end: "rdp-caption_end",
695
+ caption_between: "rdp-caption_between",
696
+ caption_label: "rdp-caption_label",
697
+ caption_dropdowns: "rdp-caption_dropdowns",
698
+ dropdown: "rdp-dropdown",
699
+ dropdown_month: "rdp-dropdown_month",
700
+ dropdown_year: "rdp-dropdown_year",
701
+ dropdown_icon: "rdp-dropdown_icon",
702
+ months: "rdp-months",
703
+ month: "rdp-month",
704
+ table: "rdp-table",
705
+ tbody: "rdp-tbody",
706
+ tfoot: "rdp-tfoot",
707
+ head: "rdp-head",
708
+ head_row: "rdp-head_row",
709
+ head_cell: "rdp-head_cell",
710
+ nav: "rdp-nav",
711
+ nav_button: "rdp-nav_button",
712
+ nav_button_previous: "rdp-nav_button_previous",
713
+ nav_button_next: "rdp-nav_button_next",
714
+ nav_icon: "rdp-nav_icon",
715
+ row: "rdp-row",
716
+ weeknumber: "rdp-weeknumber",
717
+ cell: "rdp-cell",
718
+ day: "rdp-day",
719
+ day_today: "rdp-day_today",
720
+ day_outside: "rdp-day_outside",
721
+ day_selected: "rdp-day_selected",
722
+ day_disabled: "rdp-day_disabled",
723
+ day_hidden: "rdp-day_hidden",
724
+ day_range_start: "rdp-day_range_start",
725
+ day_range_end: "rdp-day_range_end",
726
+ day_range_middle: "rdp-day_range_middle"
727
+ };
728
+ function hr(e, n) {
729
+ return X(e, "LLLL y", n);
730
+ }
731
+ function pr(e, n) {
732
+ return X(e, "d", n);
733
+ }
734
+ function yr(e, n) {
735
+ return X(e, "LLLL", n);
736
+ }
737
+ function _r(e) {
738
+ return "".concat(e);
739
+ }
740
+ function br(e, n) {
741
+ return X(e, "cccccc", n);
742
+ }
743
+ function gr(e, n) {
744
+ return X(e, "yyyy", n);
745
+ }
746
+ var wr = /* @__PURE__ */ Object.freeze({
747
+ __proto__: null,
748
+ formatCaption: hr,
749
+ formatDay: pr,
750
+ formatMonthCaption: yr,
751
+ formatWeekNumber: _r,
752
+ formatWeekdayName: br,
753
+ formatYearCaption: gr
754
+ }), xr = function(e, n, t) {
755
+ return X(e, "do MMMM (EEEE)", t);
756
+ }, Dr = function() {
757
+ return "Month: ";
758
+ }, kr = function() {
759
+ return "Go to next month";
760
+ }, Cr = function() {
761
+ return "Go to previous month";
762
+ }, Mr = function(e, n) {
763
+ return X(e, "cccc", n);
764
+ }, Nr = function(e) {
765
+ return "Week n. ".concat(e);
766
+ }, Pr = function() {
767
+ return "Year: ";
768
+ }, Er = /* @__PURE__ */ Object.freeze({
769
+ __proto__: null,
770
+ labelDay: xr,
771
+ labelMonthDropdown: Dr,
772
+ labelNext: kr,
773
+ labelPrevious: Cr,
774
+ labelWeekNumber: Nr,
775
+ labelWeekday: Mr,
776
+ labelYearDropdown: Pr
777
+ });
778
+ function jr() {
779
+ var e = "buttons", n = mr, t = Qn, r = {}, a = {}, i = 1, s = {}, l = /* @__PURE__ */ new Date();
780
+ return {
781
+ captionLayout: e,
782
+ classNames: n,
783
+ formatters: wr,
784
+ labels: Er,
785
+ locale: t,
786
+ modifiersClassNames: r,
787
+ modifiers: a,
788
+ numberOfMonths: i,
789
+ styles: s,
790
+ today: l,
791
+ mode: "default"
792
+ };
793
+ }
794
+ function Rr(e) {
795
+ var n = e.fromYear, t = e.toYear, r = e.fromMonth, a = e.toMonth, i = e.fromDate, s = e.toDate;
796
+ return r ? i = $(r) : n && (i = new Date(n, 0, 1)), a ? s = ft(a) : t && (s = new Date(t, 11, 31)), {
797
+ fromDate: i ? Ft(i) : void 0,
798
+ toDate: s ? Ft(s) : void 0
799
+ };
800
+ }
801
+ var an = ve(void 0);
802
+ function Or(e) {
803
+ var n, t = e.initialProps, r = jr(), a = Rr(t), i = a.fromDate, s = a.toDate, l = (n = t.captionLayout) !== null && n !== void 0 ? n : r.captionLayout;
804
+ l !== "buttons" && (!i || !s) && (l = "buttons");
805
+ var u;
806
+ (He(t) || Oe(t) || Se(t)) && (u = t.onSelect);
807
+ var v = D(D(D({}, r), t), { captionLayout: l, classNames: D(D({}, r.classNames), t.classNames), components: D({}, t.components), formatters: D(D({}, r.formatters), t.formatters), fromDate: i, labels: D(D({}, r.labels), t.labels), mode: t.mode || r.mode, modifiers: D(D({}, r.modifiers), t.modifiers), modifiersClassNames: D(D({}, r.modifiersClassNames), t.modifiersClassNames), onSelect: u, styles: D(D({}, r.styles), t.styles), toDate: s });
808
+ return c.jsx(an.Provider, { value: v, children: e.children });
809
+ }
810
+ function S() {
811
+ var e = me(an);
812
+ if (!e)
813
+ throw new Error("useDayPicker must be used within a DayPickerProvider.");
814
+ return e;
815
+ }
816
+ function on(e) {
817
+ var n = S(), t = n.locale, r = n.classNames, a = n.styles, i = n.formatters.formatCaption;
818
+ return c.jsx("div", { className: r.caption_label, style: a.caption_label, "aria-live": "polite", role: "presentation", id: e.id, children: i(e.displayMonth, { locale: t }) });
819
+ }
820
+ function Sr(e) {
821
+ return c.jsx("svg", D({ width: "8px", height: "8px", viewBox: "0 0 120 120", "data-testid": "iconDropdown" }, e, { children: c.jsx("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" }) }));
822
+ }
823
+ function sn(e) {
824
+ var n, t, r = e.onChange, a = e.value, i = e.children, s = e.caption, l = e.className, u = e.style, v = S(), d = (t = (n = v.components) === null || n === void 0 ? void 0 : n.IconDropdown) !== null && t !== void 0 ? t : Sr;
825
+ return c.jsxs("div", { className: l, style: u, children: [c.jsx("span", { className: v.classNames.vhidden, children: e["aria-label"] }), c.jsx("select", { name: e.name, "aria-label": e["aria-label"], className: v.classNames.dropdown, style: v.styles.dropdown, value: a, onChange: r, children: i }), c.jsxs("div", { className: v.classNames.caption_label, style: v.styles.caption_label, "aria-hidden": "true", children: [s, c.jsx(d, { className: v.classNames.dropdown_icon, style: v.styles.dropdown_icon })] })] });
826
+ }
827
+ function Tr(e) {
828
+ var n, t = S(), r = t.fromDate, a = t.toDate, i = t.styles, s = t.locale, l = t.formatters.formatMonthCaption, u = t.classNames, v = t.components, d = t.labels.labelMonthDropdown;
829
+ if (!r)
830
+ return c.jsx(c.Fragment, {});
831
+ if (!a)
832
+ return c.jsx(c.Fragment, {});
833
+ var m = [];
834
+ if (Un(r, a))
835
+ for (var p = $(r), y = r.getMonth(); y <= a.getMonth(); y++)
836
+ m.push(et(p, y));
837
+ else
838
+ for (var p = $(/* @__PURE__ */ new Date()), y = 0; y <= 11; y++)
839
+ m.push(et(p, y));
840
+ var b = function(w) {
841
+ var M = Number(w.target.value), x = et($(e.displayMonth), M);
842
+ e.onChange(x);
843
+ }, C = (n = v == null ? void 0 : v.Dropdown) !== null && n !== void 0 ? n : sn;
844
+ return c.jsx(C, { name: "months", "aria-label": d(), className: u.dropdown_month, style: i.dropdown_month, onChange: b, value: e.displayMonth.getMonth(), caption: l(e.displayMonth, { locale: s }), children: m.map(function(w) {
845
+ return c.jsx("option", { value: w.getMonth(), children: l(w, { locale: s }) }, w.getMonth());
846
+ }) });
847
+ }
848
+ function Wr(e) {
849
+ var n, t = e.displayMonth, r = S(), a = r.fromDate, i = r.toDate, s = r.locale, l = r.styles, u = r.classNames, v = r.components, d = r.formatters.formatYearCaption, m = r.labels.labelYearDropdown, p = [];
850
+ if (!a)
851
+ return c.jsx(c.Fragment, {});
852
+ if (!i)
853
+ return c.jsx(c.Fragment, {});
854
+ for (var y = a.getFullYear(), b = i.getFullYear(), C = y; C <= b; C++)
855
+ p.push(Lt($n(/* @__PURE__ */ new Date()), C));
856
+ var w = function(x) {
857
+ var I = Lt($(t), Number(x.target.value));
858
+ e.onChange(I);
859
+ }, M = (n = v == null ? void 0 : v.Dropdown) !== null && n !== void 0 ? n : sn;
860
+ return c.jsx(M, { name: "years", "aria-label": m(), className: u.dropdown_year, style: l.dropdown_year, onChange: w, value: t.getFullYear(), caption: d(t, { locale: s }), children: p.map(function(x) {
861
+ return c.jsx("option", { value: x.getFullYear(), children: d(x, { locale: s }) }, x.getFullYear());
862
+ }) });
863
+ }
864
+ function Ir(e, n) {
865
+ var t = G(e), r = t[0], a = t[1], i = n === void 0 ? r : n;
866
+ return [i, a];
867
+ }
868
+ function Fr(e) {
869
+ var n = e.month, t = e.defaultMonth, r = e.today, a = n || t || r || /* @__PURE__ */ new Date(), i = e.toDate, s = e.fromDate, l = e.numberOfMonths, u = l === void 0 ? 1 : l;
870
+ if (i && je(i, a) < 0) {
871
+ var v = -1 * (u - 1);
872
+ a = te(i, v);
873
+ }
874
+ return s && je(a, s) < 0 && (a = s), $(a);
875
+ }
876
+ function Lr() {
877
+ var e = S(), n = Fr(e), t = Ir(n, e.month), r = t[0], a = t[1], i = function(s) {
878
+ var l;
879
+ if (!e.disableNavigation) {
880
+ var u = $(s);
881
+ a(u), (l = e.onMonthChange) === null || l === void 0 || l.call(e, u);
882
+ }
883
+ };
884
+ return [r, i];
885
+ }
886
+ function Ar(e, n) {
887
+ for (var t = n.reverseMonths, r = n.numberOfMonths, a = $(e), i = $(te(a, r)), s = je(i, a), l = [], u = 0; u < s; u++) {
888
+ var v = te(a, u);
889
+ l.push(v);
890
+ }
891
+ return t && (l = l.reverse()), l;
892
+ }
893
+ function Br(e, n) {
894
+ if (!n.disableNavigation) {
895
+ var t = n.toDate, r = n.pagedNavigation, a = n.numberOfMonths, i = a === void 0 ? 1 : a, s = r ? i : 1, l = $(e);
896
+ if (!t)
897
+ return te(l, s);
898
+ var u = je(t, e);
899
+ if (!(u < i))
900
+ return te(l, s);
901
+ }
902
+ }
903
+ function Yr(e, n) {
904
+ if (!n.disableNavigation) {
905
+ var t = n.fromDate, r = n.pagedNavigation, a = n.numberOfMonths, i = a === void 0 ? 1 : a, s = r ? i : 1, l = $(e);
906
+ if (!t)
907
+ return te(l, -s);
908
+ var u = je(l, t);
909
+ if (!(u <= 0))
910
+ return te(l, -s);
911
+ }
912
+ }
913
+ var ln = ve(void 0);
914
+ function Vr(e) {
915
+ var n = S(), t = Lr(), r = t[0], a = t[1], i = Ar(r, n), s = Br(r, n), l = Yr(r, n), u = function(m) {
916
+ return i.some(function(p) {
917
+ return vt(m, p);
918
+ });
919
+ }, v = function(m, p) {
920
+ u(m) || (p && mt(m, p) ? a(te(m, 1 + n.numberOfMonths * -1)) : a(m));
921
+ }, d = {
922
+ currentMonth: r,
923
+ displayMonths: i,
924
+ goToMonth: a,
925
+ goToDate: v,
926
+ previousMonth: l,
927
+ nextMonth: s,
928
+ isDateDisplayed: u
929
+ };
930
+ return c.jsx(ln.Provider, { value: d, children: e.children });
931
+ }
932
+ function Te() {
933
+ var e = me(ln);
934
+ if (!e)
935
+ throw new Error("useNavigation must be used within a NavigationProvider");
936
+ return e;
937
+ }
938
+ function Ut(e) {
939
+ var n, t = S(), r = t.classNames, a = t.styles, i = t.components, s = Te().goToMonth, l = function(d) {
940
+ s(te(d, e.displayIndex ? -e.displayIndex : 0));
941
+ }, u = (n = i == null ? void 0 : i.CaptionLabel) !== null && n !== void 0 ? n : on, v = c.jsx(u, { id: e.id, displayMonth: e.displayMonth });
942
+ return c.jsxs("div", { className: r.caption_dropdowns, style: a.caption_dropdowns, children: [c.jsx("div", { className: r.vhidden, children: v }), c.jsx(Tr, { onChange: l, displayMonth: e.displayMonth }), c.jsx(Wr, { onChange: l, displayMonth: e.displayMonth })] });
943
+ }
944
+ function Hr(e) {
945
+ return c.jsx("svg", D({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: c.jsx("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" }) }));
946
+ }
947
+ function Ur(e) {
948
+ return c.jsx("svg", D({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: c.jsx("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" }) }));
949
+ }
950
+ var Ye = Bn(function(e, n) {
951
+ var t = S(), r = t.classNames, a = t.styles, i = [r.button_reset, r.button];
952
+ e.className && i.push(e.className);
953
+ var s = i.join(" "), l = D(D({}, a.button_reset), a.button);
954
+ return e.style && Object.assign(l, e.style), c.jsx("button", D({}, e, { ref: n, type: "button", className: s, style: l }));
955
+ });
956
+ function $r(e) {
957
+ var n, t, r = S(), a = r.dir, i = r.locale, s = r.classNames, l = r.styles, u = r.labels, v = u.labelPrevious, d = u.labelNext, m = r.components;
958
+ if (!e.nextMonth && !e.previousMonth)
959
+ return c.jsx(c.Fragment, {});
960
+ var p = v(e.previousMonth, { locale: i }), y = [
961
+ s.nav_button,
962
+ s.nav_button_previous
963
+ ].join(" "), b = d(e.nextMonth, { locale: i }), C = [
964
+ s.nav_button,
965
+ s.nav_button_next
966
+ ].join(" "), w = (n = m == null ? void 0 : m.IconRight) !== null && n !== void 0 ? n : Ur, M = (t = m == null ? void 0 : m.IconLeft) !== null && t !== void 0 ? t : Hr;
967
+ return c.jsxs("div", { className: s.nav, style: l.nav, children: [!e.hidePrevious && c.jsx(Ye, { name: "previous-month", "aria-label": p, className: y, style: l.nav_button_previous, disabled: !e.previousMonth, onClick: e.onPreviousClick, children: a === "rtl" ? c.jsx(w, { className: s.nav_icon, style: l.nav_icon }) : c.jsx(M, { className: s.nav_icon, style: l.nav_icon }) }), !e.hideNext && c.jsx(Ye, { name: "next-month", "aria-label": b, className: C, style: l.nav_button_next, disabled: !e.nextMonth, onClick: e.onNextClick, children: a === "rtl" ? c.jsx(M, { className: s.nav_icon, style: l.nav_icon }) : c.jsx(w, { className: s.nav_icon, style: l.nav_icon }) })] });
968
+ }
969
+ function $t(e) {
970
+ var n = S().numberOfMonths, t = Te(), r = t.previousMonth, a = t.nextMonth, i = t.goToMonth, s = t.displayMonths, l = s.findIndex(function(b) {
971
+ return vt(e.displayMonth, b);
972
+ }), u = l === 0, v = l === s.length - 1, d = n > 1 && (u || !v), m = n > 1 && (v || !u), p = function() {
973
+ r && i(r);
974
+ }, y = function() {
975
+ a && i(a);
976
+ };
977
+ return c.jsx($r, { displayMonth: e.displayMonth, hideNext: d, hidePrevious: m, nextMonth: a, previousMonth: r, onPreviousClick: p, onNextClick: y });
978
+ }
979
+ function Kr(e) {
980
+ var n, t = S(), r = t.classNames, a = t.disableNavigation, i = t.styles, s = t.captionLayout, l = t.components, u = (n = l == null ? void 0 : l.CaptionLabel) !== null && n !== void 0 ? n : on, v;
981
+ return a ? v = c.jsx(u, { id: e.id, displayMonth: e.displayMonth }) : s === "dropdown" ? v = c.jsx(Ut, { displayMonth: e.displayMonth, id: e.id }) : s === "dropdown-buttons" ? v = c.jsxs(c.Fragment, { children: [c.jsx(Ut, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), c.jsx($t, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : v = c.jsxs(c.Fragment, { children: [c.jsx(u, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), c.jsx($t, { displayMonth: e.displayMonth, id: e.id })] }), c.jsx("div", { className: r.caption, style: i.caption, children: v });
982
+ }
983
+ function Gr(e) {
984
+ var n = S(), t = n.footer, r = n.styles, a = n.classNames.tfoot;
985
+ return t ? c.jsx("tfoot", { className: a, style: r.tfoot, children: c.jsx("tr", { children: c.jsx("td", { colSpan: 8, children: t }) }) }) : c.jsx(c.Fragment, {});
986
+ }
987
+ function Xr(e, n, t) {
988
+ for (var r = t ? ht(/* @__PURE__ */ new Date()) : pt(/* @__PURE__ */ new Date(), { locale: e, weekStartsOn: n }), a = [], i = 0; i < 7; i++) {
989
+ var s = U(r, i);
990
+ a.push(s);
991
+ }
992
+ return a;
993
+ }
994
+ function qr() {
995
+ var e = S(), n = e.classNames, t = e.styles, r = e.showWeekNumber, a = e.locale, i = e.weekStartsOn, s = e.ISOWeek, l = e.formatters.formatWeekdayName, u = e.labels.labelWeekday, v = Xr(a, i, s);
996
+ return c.jsxs("tr", { style: t.head_row, className: n.head_row, children: [r && c.jsx("td", { style: t.head_cell, className: n.head_cell }), v.map(function(d, m) {
997
+ return c.jsx("th", { scope: "col", className: n.head_cell, style: t.head_cell, "aria-label": u(d, { locale: a }), children: l(d, { locale: a }) }, m);
998
+ })] });
999
+ }
1000
+ function Jr() {
1001
+ var e, n = S(), t = n.classNames, r = n.styles, a = n.components, i = (e = a == null ? void 0 : a.HeadRow) !== null && e !== void 0 ? e : qr;
1002
+ return c.jsx("thead", { style: r.head, className: t.head, children: c.jsx(i, {}) });
1003
+ }
1004
+ function Zr(e) {
1005
+ var n = S(), t = n.locale, r = n.formatters.formatDay;
1006
+ return c.jsx(c.Fragment, { children: r(e.date, { locale: t }) });
1007
+ }
1008
+ var yt = ve(void 0);
1009
+ function Qr(e) {
1010
+ if (!Oe(e.initialProps)) {
1011
+ var n = {
1012
+ selected: void 0,
1013
+ modifiers: {
1014
+ disabled: []
1015
+ }
1016
+ };
1017
+ return c.jsx(yt.Provider, { value: n, children: e.children });
1018
+ }
1019
+ return c.jsx(zr, { initialProps: e.initialProps, children: e.children });
1020
+ }
1021
+ function zr(e) {
1022
+ var n = e.initialProps, t = e.children, r = n.selected, a = n.min, i = n.max, s = function(v, d, m) {
1023
+ var p, y;
1024
+ (p = n.onDayClick) === null || p === void 0 || p.call(n, v, d, m);
1025
+ var b = !!(d.selected && a && (r == null ? void 0 : r.length) === a);
1026
+ if (!b) {
1027
+ var C = !!(!d.selected && i && (r == null ? void 0 : r.length) === i);
1028
+ if (!C) {
1029
+ var w = r ? rn([], r, !0) : [];
1030
+ if (d.selected) {
1031
+ var M = w.findIndex(function(x) {
1032
+ return L(v, x);
1033
+ });
1034
+ w.splice(M, 1);
1035
+ } else
1036
+ w.push(v);
1037
+ (y = n.onSelect) === null || y === void 0 || y.call(n, w, v, d, m);
1038
+ }
1039
+ }
1040
+ }, l = {
1041
+ disabled: []
1042
+ };
1043
+ r && l.disabled.push(function(v) {
1044
+ var d = i && r.length > i - 1, m = r.some(function(p) {
1045
+ return L(p, v);
1046
+ });
1047
+ return !!(d && !m);
1048
+ });
1049
+ var u = {
1050
+ selected: r,
1051
+ onDayClick: s,
1052
+ modifiers: l
1053
+ };
1054
+ return c.jsx(yt.Provider, { value: u, children: t });
1055
+ }
1056
+ function _t() {
1057
+ var e = me(yt);
1058
+ if (!e)
1059
+ throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");
1060
+ return e;
1061
+ }
1062
+ function ea(e, n) {
1063
+ var t = n || {}, r = t.from, a = t.to;
1064
+ return r && a ? L(a, e) && L(r, e) ? void 0 : L(a, e) ? { from: a, to: void 0 } : L(r, e) ? void 0 : Be(r, e) ? { from: e, to: a } : { from: r, to: e } : a ? Be(e, a) ? { from: a, to: e } : { from: e, to: a } : r ? mt(e, r) ? { from: e, to: r } : { from: r, to: e } : { from: e, to: void 0 };
1065
+ }
1066
+ var bt = ve(void 0);
1067
+ function ta(e) {
1068
+ if (!Se(e.initialProps)) {
1069
+ var n = {
1070
+ selected: void 0,
1071
+ modifiers: {
1072
+ range_start: [],
1073
+ range_end: [],
1074
+ range_middle: [],
1075
+ disabled: []
1076
+ }
1077
+ };
1078
+ return c.jsx(bt.Provider, { value: n, children: e.children });
1079
+ }
1080
+ return c.jsx(na, { initialProps: e.initialProps, children: e.children });
1081
+ }
1082
+ function na(e) {
1083
+ var n = e.initialProps, t = e.children, r = n.selected, a = r || {}, i = a.from, s = a.to, l = n.min, u = n.max, v = function(y, b, C) {
1084
+ var w, M;
1085
+ (w = n.onDayClick) === null || w === void 0 || w.call(n, y, b, C);
1086
+ var x = ea(y, r);
1087
+ (M = n.onSelect) === null || M === void 0 || M.call(n, x, y, b, C);
1088
+ }, d = {
1089
+ range_start: [],
1090
+ range_end: [],
1091
+ range_middle: [],
1092
+ disabled: []
1093
+ };
1094
+ if (i ? (d.range_start = [i], s ? (d.range_end = [s], L(i, s) || (d.range_middle = [
1095
+ {
1096
+ after: i,
1097
+ before: s
1098
+ }
1099
+ ])) : d.range_end = [i]) : s && (d.range_start = [s], d.range_end = [s]), l && (i && !s && d.disabled.push({
1100
+ after: ze(i, l - 1),
1101
+ before: U(i, l - 1)
1102
+ }), i && s && d.disabled.push({
1103
+ after: i,
1104
+ before: U(i, l - 1)
1105
+ }), !i && s && d.disabled.push({
1106
+ after: ze(s, l - 1),
1107
+ before: U(s, l - 1)
1108
+ })), u) {
1109
+ if (i && !s && (d.disabled.push({
1110
+ before: U(i, -u + 1)
1111
+ }), d.disabled.push({
1112
+ after: U(i, u - 1)
1113
+ })), i && s) {
1114
+ var m = ie(s, i) + 1, p = u - m;
1115
+ d.disabled.push({
1116
+ before: ze(i, p)
1117
+ }), d.disabled.push({
1118
+ after: U(s, p)
1119
+ });
1120
+ }
1121
+ !i && s && (d.disabled.push({
1122
+ before: U(s, -u + 1)
1123
+ }), d.disabled.push({
1124
+ after: U(s, u - 1)
1125
+ }));
1126
+ }
1127
+ return c.jsx(bt.Provider, { value: { selected: r, onDayClick: v, modifiers: d }, children: t });
1128
+ }
1129
+ function gt() {
1130
+ var e = me(bt);
1131
+ if (!e)
1132
+ throw new Error("useSelectRange must be used within a SelectRangeProvider");
1133
+ return e;
1134
+ }
1135
+ function Le(e) {
1136
+ return Array.isArray(e) ? rn([], e, !0) : e !== void 0 ? [e] : [];
1137
+ }
1138
+ function ra(e) {
1139
+ var n = {};
1140
+ return Object.entries(e).forEach(function(t) {
1141
+ var r = t[0], a = t[1];
1142
+ n[r] = Le(a);
1143
+ }), n;
1144
+ }
1145
+ var Z;
1146
+ (function(e) {
1147
+ 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";
1148
+ })(Z || (Z = {}));
1149
+ var aa = Z.Selected, oe = Z.Disabled, oa = Z.Hidden, ia = Z.Today, tt = Z.RangeEnd, nt = Z.RangeMiddle, rt = Z.RangeStart, sa = Z.Outside;
1150
+ function la(e, n, t) {
1151
+ var r, a = (r = {}, r[aa] = Le(e.selected), r[oe] = Le(e.disabled), r[oa] = Le(e.hidden), r[ia] = [e.today], r[tt] = [], r[nt] = [], r[rt] = [], r[sa] = [], r);
1152
+ return e.fromDate && a[oe].push({ before: e.fromDate }), e.toDate && a[oe].push({ after: e.toDate }), Oe(e) ? a[oe] = a[oe].concat(n.modifiers[oe]) : Se(e) && (a[oe] = a[oe].concat(t.modifiers[oe]), a[rt] = t.modifiers[rt], a[nt] = t.modifiers[nt], a[tt] = t.modifiers[tt]), a;
1153
+ }
1154
+ var un = ve(void 0);
1155
+ function ua(e) {
1156
+ var n = S(), t = _t(), r = gt(), a = la(n, t, r), i = ra(n.modifiers), s = D(D({}, a), i);
1157
+ return c.jsx(un.Provider, { value: s, children: e.children });
1158
+ }
1159
+ function cn() {
1160
+ var e = me(un);
1161
+ if (!e)
1162
+ throw new Error("useModifiers must be used within a ModifiersProvider");
1163
+ return e;
1164
+ }
1165
+ function ca(e) {
1166
+ return !!(e && typeof e == "object" && "before" in e && "after" in e);
1167
+ }
1168
+ function da(e) {
1169
+ return !!(e && typeof e == "object" && "from" in e);
1170
+ }
1171
+ function fa(e) {
1172
+ return !!(e && typeof e == "object" && "after" in e);
1173
+ }
1174
+ function va(e) {
1175
+ return !!(e && typeof e == "object" && "before" in e);
1176
+ }
1177
+ function ma(e) {
1178
+ return !!(e && typeof e == "object" && "dayOfWeek" in e);
1179
+ }
1180
+ function ha(e, n) {
1181
+ var t, r = n.from, a = n.to;
1182
+ if (r && a) {
1183
+ var i = ie(a, r) < 0;
1184
+ i && (t = [a, r], r = t[0], a = t[1]);
1185
+ var s = ie(e, r) >= 0 && ie(a, e) >= 0;
1186
+ return s;
1187
+ }
1188
+ return a ? L(a, e) : r ? L(r, e) : !1;
1189
+ }
1190
+ function pa(e) {
1191
+ return zt(e);
1192
+ }
1193
+ function ya(e) {
1194
+ return Array.isArray(e) && e.every(zt);
1195
+ }
1196
+ function _a(e, n) {
1197
+ return n.some(function(t) {
1198
+ if (typeof t == "boolean")
1199
+ return t;
1200
+ if (pa(t))
1201
+ return L(e, t);
1202
+ if (ya(t))
1203
+ return t.includes(e);
1204
+ if (da(t))
1205
+ return ha(e, t);
1206
+ if (ma(t))
1207
+ return t.dayOfWeek.includes(e.getDay());
1208
+ if (ca(t)) {
1209
+ var r = ie(t.before, e), a = ie(t.after, e), i = r > 0, s = a < 0, l = Be(t.before, t.after);
1210
+ return l ? s && i : i || s;
1211
+ }
1212
+ return fa(t) ? ie(e, t.after) > 0 : va(t) ? ie(t.before, e) > 0 : typeof t == "function" ? t(e) : !1;
1213
+ });
1214
+ }
1215
+ function wt(e, n, t) {
1216
+ var r = Object.keys(n).reduce(function(i, s) {
1217
+ var l = n[s];
1218
+ return _a(e, l) && i.push(s), i;
1219
+ }, []), a = {};
1220
+ return r.forEach(function(i) {
1221
+ return a[i] = !0;
1222
+ }), t && !vt(e, t) && (a.outside = !0), a;
1223
+ }
1224
+ function ba(e, n) {
1225
+ for (var t = $(e[0]), r = ft(e[e.length - 1]), a, i, s = t; s <= r; ) {
1226
+ var l = wt(s, n), u = !l.disabled && !l.hidden;
1227
+ if (!u) {
1228
+ s = U(s, 1);
1229
+ continue;
1230
+ }
1231
+ if (l.selected)
1232
+ return s;
1233
+ l.today && !i && (i = s), a || (a = s), s = U(s, 1);
1234
+ }
1235
+ return i || a;
1236
+ }
1237
+ var ga = 365;
1238
+ function dn(e, n) {
1239
+ var t = n.moveBy, r = n.direction, a = n.context, i = n.modifiers, s = n.retry, l = s === void 0 ? { count: 0, lastFocused: e } : s, u = a.weekStartsOn, v = a.fromDate, d = a.toDate, m = a.locale, p = {
1240
+ day: U,
1241
+ week: st,
1242
+ month: te,
1243
+ year: Jn,
1244
+ startOfWeek: function(w) {
1245
+ return a.ISOWeek ? ht(w) : pt(w, { locale: m, weekStartsOn: u });
1246
+ },
1247
+ endOfWeek: function(w) {
1248
+ return a.ISOWeek ? Zt(w) : Qt(w, { locale: m, weekStartsOn: u });
1249
+ }
1250
+ }, y = p[t](e, r === "after" ? 1 : -1);
1251
+ r === "before" && v ? y = Kn([v, y]) : r === "after" && d && (y = Gn([d, y]));
1252
+ var b = !0;
1253
+ if (i) {
1254
+ var C = wt(y, i);
1255
+ b = !C.disabled && !C.hidden;
1256
+ }
1257
+ return b ? y : l.count > ga ? l.lastFocused : dn(y, {
1258
+ moveBy: t,
1259
+ direction: r,
1260
+ context: a,
1261
+ modifiers: i,
1262
+ retry: D(D({}, l), { count: l.count + 1 })
1263
+ });
1264
+ }
1265
+ var fn = ve(void 0);
1266
+ function wa(e) {
1267
+ var n = Te(), t = cn(), r = G(), a = r[0], i = r[1], s = G(), l = s[0], u = s[1], v = ba(n.displayMonths, t), d = a ?? (l && n.isDateDisplayed(l)) ? l : v, m = function() {
1268
+ u(a), i(void 0);
1269
+ }, p = function(w) {
1270
+ i(w);
1271
+ }, y = S(), b = function(w, M) {
1272
+ if (a) {
1273
+ var x = dn(a, {
1274
+ moveBy: w,
1275
+ direction: M,
1276
+ context: y,
1277
+ modifiers: t
1278
+ });
1279
+ L(a, x) || (n.goToDate(x, a), p(x));
1280
+ }
1281
+ }, C = {
1282
+ focusedDay: a,
1283
+ focusTarget: d,
1284
+ blur: m,
1285
+ focus: p,
1286
+ focusDayAfter: function() {
1287
+ return b("day", "after");
1288
+ },
1289
+ focusDayBefore: function() {
1290
+ return b("day", "before");
1291
+ },
1292
+ focusWeekAfter: function() {
1293
+ return b("week", "after");
1294
+ },
1295
+ focusWeekBefore: function() {
1296
+ return b("week", "before");
1297
+ },
1298
+ focusMonthBefore: function() {
1299
+ return b("month", "before");
1300
+ },
1301
+ focusMonthAfter: function() {
1302
+ return b("month", "after");
1303
+ },
1304
+ focusYearBefore: function() {
1305
+ return b("year", "before");
1306
+ },
1307
+ focusYearAfter: function() {
1308
+ return b("year", "after");
1309
+ },
1310
+ focusStartOfWeek: function() {
1311
+ return b("startOfWeek", "before");
1312
+ },
1313
+ focusEndOfWeek: function() {
1314
+ return b("endOfWeek", "after");
1315
+ }
1316
+ };
1317
+ return c.jsx(fn.Provider, { value: C, children: e.children });
1318
+ }
1319
+ function xt() {
1320
+ var e = me(fn);
1321
+ if (!e)
1322
+ throw new Error("useFocusContext must be used within a FocusProvider");
1323
+ return e;
1324
+ }
1325
+ function xa(e, n) {
1326
+ var t = cn(), r = wt(e, t, n);
1327
+ return r;
1328
+ }
1329
+ var Dt = ve(void 0);
1330
+ function Da(e) {
1331
+ if (!He(e.initialProps)) {
1332
+ var n = {
1333
+ selected: void 0
1334
+ };
1335
+ return c.jsx(Dt.Provider, { value: n, children: e.children });
1336
+ }
1337
+ return c.jsx(ka, { initialProps: e.initialProps, children: e.children });
1338
+ }
1339
+ function ka(e) {
1340
+ var n = e.initialProps, t = e.children, r = function(i, s, l) {
1341
+ var u, v, d;
1342
+ if ((u = n.onDayClick) === null || u === void 0 || u.call(n, i, s, l), s.selected && !n.required) {
1343
+ (v = n.onSelect) === null || v === void 0 || v.call(n, void 0, i, s, l);
1344
+ return;
1345
+ }
1346
+ (d = n.onSelect) === null || d === void 0 || d.call(n, i, i, s, l);
1347
+ }, a = {
1348
+ selected: n.selected,
1349
+ onDayClick: r
1350
+ };
1351
+ return c.jsx(Dt.Provider, { value: a, children: t });
1352
+ }
1353
+ function vn() {
1354
+ var e = me(Dt);
1355
+ if (!e)
1356
+ throw new Error("useSelectSingle must be used within a SelectSingleProvider");
1357
+ return e;
1358
+ }
1359
+ function Ca(e, n) {
1360
+ var t = S(), r = vn(), a = _t(), i = gt(), s = xt(), l = s.focusDayAfter, u = s.focusDayBefore, v = s.focusWeekAfter, d = s.focusWeekBefore, m = s.blur, p = s.focus, y = s.focusMonthBefore, b = s.focusMonthAfter, C = s.focusYearBefore, w = s.focusYearAfter, M = s.focusStartOfWeek, x = s.focusEndOfWeek, I = function(g) {
1361
+ var _, J, Y, ne;
1362
+ He(t) ? (_ = r.onDayClick) === null || _ === void 0 || _.call(r, e, n, g) : Oe(t) ? (J = a.onDayClick) === null || J === void 0 || J.call(a, e, n, g) : Se(t) ? (Y = i.onDayClick) === null || Y === void 0 || Y.call(i, e, n, g) : (ne = t.onDayClick) === null || ne === void 0 || ne.call(t, e, n, g);
1363
+ }, B = function(g) {
1364
+ var _;
1365
+ p(e), (_ = t.onDayFocus) === null || _ === void 0 || _.call(t, e, n, g);
1366
+ }, Q = function(g) {
1367
+ var _;
1368
+ m(), (_ = t.onDayBlur) === null || _ === void 0 || _.call(t, e, n, g);
1369
+ }, q = function(g) {
1370
+ var _;
1371
+ (_ = t.onDayMouseEnter) === null || _ === void 0 || _.call(t, e, n, g);
1372
+ }, le = function(g) {
1373
+ var _;
1374
+ (_ = t.onDayMouseLeave) === null || _ === void 0 || _.call(t, e, n, g);
1375
+ }, he = function(g) {
1376
+ var _;
1377
+ (_ = t.onDayPointerEnter) === null || _ === void 0 || _.call(t, e, n, g);
1378
+ }, ue = function(g) {
1379
+ var _;
1380
+ (_ = t.onDayPointerLeave) === null || _ === void 0 || _.call(t, e, n, g);
1381
+ }, ge = function(g) {
1382
+ var _;
1383
+ (_ = t.onDayTouchCancel) === null || _ === void 0 || _.call(t, e, n, g);
1384
+ }, fe = function(g) {
1385
+ var _;
1386
+ (_ = t.onDayTouchEnd) === null || _ === void 0 || _.call(t, e, n, g);
1387
+ }, ce = function(g) {
1388
+ var _;
1389
+ (_ = t.onDayTouchMove) === null || _ === void 0 || _.call(t, e, n, g);
1390
+ }, F = function(g) {
1391
+ var _;
1392
+ (_ = t.onDayTouchStart) === null || _ === void 0 || _.call(t, e, n, g);
1393
+ }, H = function(g) {
1394
+ var _;
1395
+ (_ = t.onDayKeyUp) === null || _ === void 0 || _.call(t, e, n, g);
1396
+ }, z = function(g) {
1397
+ var _;
1398
+ switch (g.key) {
1399
+ case "ArrowLeft":
1400
+ g.preventDefault(), g.stopPropagation(), t.dir === "rtl" ? l() : u();
1401
+ break;
1402
+ case "ArrowRight":
1403
+ g.preventDefault(), g.stopPropagation(), t.dir === "rtl" ? u() : l();
1404
+ break;
1405
+ case "ArrowDown":
1406
+ g.preventDefault(), g.stopPropagation(), v();
1407
+ break;
1408
+ case "ArrowUp":
1409
+ g.preventDefault(), g.stopPropagation(), d();
1410
+ break;
1411
+ case "PageUp":
1412
+ g.preventDefault(), g.stopPropagation(), g.shiftKey ? C() : y();
1413
+ break;
1414
+ case "PageDown":
1415
+ g.preventDefault(), g.stopPropagation(), g.shiftKey ? w() : b();
1416
+ break;
1417
+ case "Home":
1418
+ g.preventDefault(), g.stopPropagation(), M();
1419
+ break;
1420
+ case "End":
1421
+ g.preventDefault(), g.stopPropagation(), x();
1422
+ break;
1423
+ }
1424
+ (_ = t.onDayKeyDown) === null || _ === void 0 || _.call(t, e, n, g);
1425
+ }, pe = {
1426
+ onClick: I,
1427
+ onFocus: B,
1428
+ onBlur: Q,
1429
+ onKeyDown: z,
1430
+ onKeyUp: H,
1431
+ onMouseEnter: q,
1432
+ onMouseLeave: le,
1433
+ onPointerEnter: he,
1434
+ onPointerLeave: ue,
1435
+ onTouchCancel: ge,
1436
+ onTouchEnd: fe,
1437
+ onTouchMove: ce,
1438
+ onTouchStart: F
1439
+ };
1440
+ return pe;
1441
+ }
1442
+ function Ma() {
1443
+ var e = S(), n = vn(), t = _t(), r = gt(), a = He(e) ? n.selected : Oe(e) ? t.selected : Se(e) ? r.selected : void 0;
1444
+ return a;
1445
+ }
1446
+ function Na(e) {
1447
+ return Object.values(Z).includes(e);
1448
+ }
1449
+ function Pa(e, n) {
1450
+ var t = [e.classNames.day];
1451
+ return Object.keys(n).forEach(function(r) {
1452
+ var a = e.modifiersClassNames[r];
1453
+ if (a)
1454
+ t.push(a);
1455
+ else if (Na(r)) {
1456
+ var i = e.classNames["day_".concat(r)];
1457
+ i && t.push(i);
1458
+ }
1459
+ }), t;
1460
+ }
1461
+ function Ea(e, n) {
1462
+ var t = D({}, e.styles.day);
1463
+ return Object.keys(n).forEach(function(r) {
1464
+ var a;
1465
+ t = D(D({}, t), (a = e.modifiersStyles) === null || a === void 0 ? void 0 : a[r]);
1466
+ }), t;
1467
+ }
1468
+ function ja(e, n, t) {
1469
+ var r, a, i, s = S(), l = xt(), u = xa(e, n), v = Ca(e, u), d = Ma(), m = !!(s.onDayClick || s.mode !== "default");
1470
+ Ve(function() {
1471
+ var q;
1472
+ u.outside || l.focusedDay && m && L(l.focusedDay, e) && ((q = t.current) === null || q === void 0 || q.focus());
1473
+ }, [
1474
+ l.focusedDay,
1475
+ e,
1476
+ t,
1477
+ m,
1478
+ u.outside
1479
+ ]);
1480
+ var p = Pa(s, u).join(" "), y = Ea(s, u), b = !!(u.outside && !s.showOutsideDays || u.hidden), C = (i = (a = s.components) === null || a === void 0 ? void 0 : a.DayContent) !== null && i !== void 0 ? i : Zr, w = c.jsx(C, { date: e, displayMonth: n, activeModifiers: u }), M = {
1481
+ style: y,
1482
+ className: p,
1483
+ children: w,
1484
+ role: "gridcell"
1485
+ }, x = l.focusTarget && L(l.focusTarget, e) && !u.outside, I = l.focusedDay && L(l.focusedDay, e), B = D(D(D({}, M), (r = { disabled: u.disabled, role: "gridcell" }, r["aria-selected"] = u.selected, r.tabIndex = I || x ? 0 : -1, r)), v), Q = {
1486
+ isButton: m,
1487
+ isHidden: b,
1488
+ activeModifiers: u,
1489
+ selectedDays: d,
1490
+ buttonProps: B,
1491
+ divProps: M
1492
+ };
1493
+ return Q;
1494
+ }
1495
+ function Ra(e) {
1496
+ var n = Ae(null), t = ja(e.date, e.displayMonth, n);
1497
+ return t.isHidden ? c.jsx("div", { role: "gridcell" }) : t.isButton ? c.jsx(Ye, D({ name: "day", ref: n }, t.buttonProps)) : c.jsx("div", D({}, t.divProps));
1498
+ }
1499
+ function Oa(e) {
1500
+ var n = e.number, t = e.dates, r = S(), a = r.onWeekNumberClick, i = r.styles, s = r.classNames, l = r.locale, u = r.labels.labelWeekNumber, v = r.formatters.formatWeekNumber, d = v(Number(n), { locale: l });
1501
+ if (!a)
1502
+ return c.jsx("span", { className: s.weeknumber, style: i.weeknumber, children: d });
1503
+ var m = u(Number(n), { locale: l }), p = function(y) {
1504
+ a(n, t, y);
1505
+ };
1506
+ return c.jsx(Ye, { name: "week-number", "aria-label": m, className: s.weeknumber, style: i.weeknumber, onClick: p, children: d });
1507
+ }
1508
+ function Sa(e) {
1509
+ var n, t, r = S(), a = r.styles, i = r.classNames, s = r.showWeekNumber, l = r.components, u = (n = l == null ? void 0 : l.Day) !== null && n !== void 0 ? n : Ra, v = (t = l == null ? void 0 : l.WeekNumber) !== null && t !== void 0 ? t : Oa, d;
1510
+ return s && (d = c.jsx("td", { className: i.cell, style: a.cell, children: c.jsx(v, { number: e.weekNumber, dates: e.dates }) })), c.jsxs("tr", { className: i.row, style: a.row, children: [d, e.dates.map(function(m) {
1511
+ return c.jsx("td", { className: i.cell, style: a.cell, role: "presentation", children: c.jsx(u, { displayMonth: e.displayMonth, date: m }) }, Vn(m));
1512
+ })] });
1513
+ }
1514
+ function Kt(e, n, t) {
1515
+ for (var r = t != null && t.ISOWeek ? Zt(n) : Qt(n, t), a = t != null && t.ISOWeek ? ht(e) : pt(e, t), i = ie(r, a), s = [], l = 0; l <= i; l++)
1516
+ s.push(U(a, l));
1517
+ var u = s.reduce(function(v, d) {
1518
+ var m = t != null && t.ISOWeek ? Xn(d) : qn(d, t), p = v.find(function(y) {
1519
+ return y.weekNumber === m;
1520
+ });
1521
+ return p ? (p.dates.push(d), v) : (v.push({
1522
+ weekNumber: m,
1523
+ dates: [d]
1524
+ }), v);
1525
+ }, []);
1526
+ return u;
1527
+ }
1528
+ function Ta(e, n) {
1529
+ var t = Kt($(e), ft(e), n);
1530
+ if (n != null && n.useFixedWeeks) {
1531
+ var r = Hn(e, n);
1532
+ if (r < 6) {
1533
+ var a = t[t.length - 1], i = a.dates[a.dates.length - 1], s = st(i, 6 - r), l = Kt(st(i, 1), s, n);
1534
+ t.push.apply(t, l);
1535
+ }
1536
+ }
1537
+ return t;
1538
+ }
1539
+ function Wa(e) {
1540
+ var n, t, r, a = S(), i = a.locale, s = a.classNames, l = a.styles, u = a.hideHead, v = a.fixedWeeks, d = a.components, m = a.weekStartsOn, p = a.firstWeekContainsDate, y = a.ISOWeek, b = Ta(e.displayMonth, {
1541
+ useFixedWeeks: !!v,
1542
+ ISOWeek: y,
1543
+ locale: i,
1544
+ weekStartsOn: m,
1545
+ firstWeekContainsDate: p
1546
+ }), C = (n = d == null ? void 0 : d.Head) !== null && n !== void 0 ? n : Jr, w = (t = d == null ? void 0 : d.Row) !== null && t !== void 0 ? t : Sa, M = (r = d == null ? void 0 : d.Footer) !== null && r !== void 0 ? r : Gr;
1547
+ return c.jsxs("table", { id: e.id, className: s.table, style: l.table, role: "grid", "aria-labelledby": e["aria-labelledby"], children: [!u && c.jsx(C, {}), c.jsx("tbody", { className: s.tbody, style: l.tbody, children: b.map(function(x) {
1548
+ return c.jsx(w, { displayMonth: e.displayMonth, dates: x.dates, weekNumber: x.weekNumber }, x.weekNumber);
1549
+ }) }), c.jsx(M, { displayMonth: e.displayMonth })] });
1550
+ }
1551
+ function Ia() {
1552
+ return !!(typeof window < "u" && window.document && window.document.createElement);
1553
+ }
1554
+ var Fa = Ia() ? Yn : Ve, at = !1, La = 0;
1555
+ function Gt() {
1556
+ return "react-day-picker-".concat(++La);
1557
+ }
1558
+ function Aa(e) {
1559
+ var n, t = e ?? (at ? Gt() : null), r = G(t), a = r[0], i = r[1];
1560
+ return Fa(function() {
1561
+ a === null && i(Gt());
1562
+ }, []), Ve(function() {
1563
+ at === !1 && (at = !0);
1564
+ }, []), (n = e ?? a) !== null && n !== void 0 ? n : void 0;
1565
+ }
1566
+ function Ba(e) {
1567
+ var n, t, r = S(), a = r.dir, i = r.classNames, s = r.styles, l = r.components, u = Te().displayMonths, v = Aa(r.id ? "".concat(r.id, "-").concat(e.displayIndex) : void 0), d = r.id ? "".concat(r.id, "-grid-").concat(e.displayIndex) : void 0, m = [i.month], p = s.month, y = e.displayIndex === 0, b = e.displayIndex === u.length - 1, C = !y && !b;
1568
+ a === "rtl" && (n = [y, b], b = n[0], y = n[1]), y && (m.push(i.caption_start), p = D(D({}, p), s.caption_start)), b && (m.push(i.caption_end), p = D(D({}, p), s.caption_end)), C && (m.push(i.caption_between), p = D(D({}, p), s.caption_between));
1569
+ var w = (t = l == null ? void 0 : l.Caption) !== null && t !== void 0 ? t : Kr;
1570
+ return c.jsxs("div", { className: m.join(" "), style: p, children: [c.jsx(w, { id: v, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), c.jsx(Wa, { id: d, "aria-labelledby": v, displayMonth: e.displayMonth })] }, e.displayIndex);
1571
+ }
1572
+ function Ya(e) {
1573
+ var n = S(), t = n.classNames, r = n.styles;
1574
+ return c.jsx("div", { className: t.months, style: r.months, children: e.children });
1575
+ }
1576
+ function Va(e) {
1577
+ var n, t, r = e.initialProps, a = S(), i = xt(), s = Te(), l = G(!1), u = l[0], v = l[1];
1578
+ Ve(function() {
1579
+ a.initialFocus && i.focusTarget && (u || (i.focus(i.focusTarget), v(!0)));
1580
+ }, [
1581
+ a.initialFocus,
1582
+ u,
1583
+ i.focus,
1584
+ i.focusTarget,
1585
+ i
1586
+ ]);
1587
+ var d = [a.classNames.root, a.className];
1588
+ a.numberOfMonths > 1 && d.push(a.classNames.multiple_months), a.showWeekNumber && d.push(a.classNames.with_weeknumber);
1589
+ var m = D(D({}, a.styles.root), a.style), p = Object.keys(r).filter(function(b) {
1590
+ return b.startsWith("data-");
1591
+ }).reduce(function(b, C) {
1592
+ var w;
1593
+ return D(D({}, b), (w = {}, w[C] = r[C], w));
1594
+ }, {}), y = (t = (n = r.components) === null || n === void 0 ? void 0 : n.Months) !== null && t !== void 0 ? t : Ya;
1595
+ return c.jsx("div", D({ className: d.join(" "), style: m, dir: a.dir, id: a.id, nonce: r.nonce, title: r.title, lang: r.lang }, p, { children: c.jsx(y, { children: s.displayMonths.map(function(b, C) {
1596
+ return c.jsx(Ba, { displayIndex: C, displayMonth: b }, C);
1597
+ }) }) }));
1598
+ }
1599
+ function Ha(e) {
1600
+ var n = e.children, t = dr(e, ["children"]);
1601
+ return c.jsx(Or, { initialProps: t, children: c.jsx(Vr, { children: c.jsx(Da, { initialProps: t, children: c.jsx(Qr, { initialProps: t, children: c.jsx(ta, { initialProps: t, children: c.jsx(ua, { children: c.jsx(wa, { children: n }) }) }) }) }) }) });
1602
+ }
1603
+ function Ua(e) {
1604
+ return c.jsx(Ha, D({}, e, { children: c.jsx(Va, { initialProps: e }) }));
1605
+ }
1606
+ const $a = "_root_2a8vt_1", Ka = "_vhidden_2a8vt_16", Ga = "_button_reset_2a8vt_36", Xa = "_button_2a8vt_36", qa = "_day_selected_2a8vt_59", Ja = "_months_2a8vt_77", Za = "_month_2a8vt_77", Qa = "_table_2a8vt_93", za = "_with_weeknumber_2a8vt_99", eo = "_caption_2a8vt_104", to = "_multiple_months_2a8vt_112", no = "_caption_dropdowns_2a8vt_118", ro = "_caption_label_2a8vt_123", ao = "_nav_2a8vt_139", oo = "_caption_start_2a8vt_143", io = "_caption_end_2a8vt_150", so = "_nav_button_2a8vt_157", lo = "_dropdown_year_2a8vt_171", uo = "_dropdown_month_2a8vt_172", co = "_dropdown_2a8vt_171", fo = "_dropdown_icon_2a8vt_208", vo = "_head_2a8vt_212", mo = "_head_row_2a8vt_216", ho = "_row_2a8vt_217", po = "_head_cell_2a8vt_221", yo = "_tbody_2a8vt_232", _o = "_tfoot_2a8vt_236", bo = "_cell_2a8vt_240", go = "_weeknumber_2a8vt_248", wo = "_day_2a8vt_59", xo = "_day_today_2a8vt_267", Do = "_day_outside_2a8vt_267", ko = "_day_range_start_2a8vt_290", Co = "_day_range_end_2a8vt_290", Mo = "_day_range_middle_2a8vt_314", No = {
1607
+ root: $a,
1608
+ vhidden: Ka,
1609
+ button_reset: Ga,
1610
+ button: Xa,
1611
+ day_selected: qa,
1612
+ months: Ja,
1613
+ month: Za,
1614
+ table: Qa,
1615
+ with_weeknumber: za,
1616
+ caption: eo,
1617
+ multiple_months: to,
1618
+ caption_dropdowns: no,
1619
+ caption_label: ro,
1620
+ nav: ao,
1621
+ caption_start: oo,
1622
+ caption_end: io,
1623
+ nav_button: so,
1624
+ dropdown_year: lo,
1625
+ dropdown_month: uo,
1626
+ dropdown: co,
1627
+ dropdown_icon: fo,
1628
+ head: vo,
1629
+ head_row: mo,
1630
+ row: ho,
1631
+ head_cell: po,
1632
+ tbody: yo,
1633
+ tfoot: _o,
1634
+ cell: bo,
1635
+ weeknumber: go,
1636
+ day: wo,
1637
+ day_today: xo,
1638
+ day_outside: Do,
1639
+ day_range_start: ko,
1640
+ day_range_end: Co,
1641
+ day_range_middle: Mo
1642
+ }, Po = 329, de = 12, Ue = 26, mn = 20, dt = 9, Xt = 12, hn = (e, n) => e.top > n.height + Ue ? se.positionabove : se.positionbelow, Eo = (e) => e.left + e.width / 4, jo = (e) => document.documentElement.clientWidth - e.right + e.width / 4, Ro = (e, n) => e.left + n.width, Oo = (e) => e.left > de, So = (e, n) => Ro(e, n) < document.documentElement.clientWidth - de, To = (e, n) => So(e, n) ? Oo(e) ? "floating" : "left" : "right", ot = (e, n) => e.top - Ue - n.height, it = (e) => e.bottom + Ue, Wo = () => document.documentElement.clientWidth - de * 2, Io = () => document.documentElement.clientWidth > Po + de * 2, qt = (e) => e.top - Ue - dt + 5, Fo = (e) => Eo(e) - mn / 2, Lo = (e) => jo(e) - mn / 2, Ao = (e, n) => {
1643
+ const t = To(e, n), r = hn(e, n);
1644
+ return t === "left" ? r === se.positionabove ? "leftabove" : "leftbelow" : t === "right" ? r === se.positionabove ? "rightabove" : "rightbelow" : r === se.positionabove ? "floatingabove" : "floatingbelow";
1645
+ }, Bo = (e, n) => {
1646
+ const t = Ao(e, n), r = Io() ? void 0 : Wo();
1647
+ return t === "leftabove" ? {
1648
+ left: de,
1649
+ top: ot(e, n),
1650
+ width: r
1651
+ } : t === "leftbelow" ? { left: de, top: it(e), width: r } : t === "rightabove" ? { right: de, top: ot(e, n), width: r } : t === "rightbelow" ? { right: de, top: it(e), width: r } : t === "floatingbelow" ? { left: e.left, top: it(e), width: r } : { left: e.left, top: ot(e, n), width: r };
1652
+ }, Yo = (e, n, t) => {
1653
+ const r = Fo(n), a = Lo(n), i = e.left + Xt, s = e.right + Xt;
1654
+ return e.right ? t === se.positionabove ? {
1655
+ right: a > s ? a : s,
1656
+ top: qt(n)
1657
+ } : {
1658
+ right: a > s ? a : s,
1659
+ top: n.bottom + dt
1660
+ } : t === se.positionabove ? {
1661
+ left: r > i ? r : i,
1662
+ top: qt(n)
1663
+ } : {
1664
+ left: r > i ? r : i,
1665
+ top: n.bottom + dt
1666
+ };
1667
+ }, Vo = (e) => {
1668
+ const { datepickerWrapperRef: n, footer: t, inputRef: r, testId: a, ...i } = e, s = Ae(null), [l, u] = G(), v = ur(n), d = sr(r, 0);
1669
+ or(n, !0);
1670
+ const m = () => {
1671
+ var x;
1672
+ u((x = r.current) == null ? void 0 : x.getBoundingClientRect());
1673
+ };
1674
+ P.useEffect(() => {
1675
+ m();
1676
+ }, []), ir(m, 500), lr(m, ["scroll", "resize"], 10);
1677
+ const p = ut(A["datepicker-popup-container"], {
1678
+ [A["datepicker-popup-container--visible"]]: d
1679
+ }), y = l && v && hn(l, v), b = ut(A["datepicker-popup-arrow"], {
1680
+ [A["datepicker-popup-arrow--visible"]]: d,
1681
+ [A["datepicker-popup-arrow--over"]]: y === se.positionbelow,
1682
+ [A["datepicker-popup-arrow--under"]]: y === se.positionabove
1683
+ }), C = l && v && Bo(l, v), w = C && l && y && Yo(C, l, y), M = {
1684
+ ...No,
1685
+ ...A
1686
+ };
1687
+ return /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("div", { className: p, "data-testid": a, ref: n, style: C }, /* @__PURE__ */ P.createElement(
1688
+ Ua,
1689
+ {
1690
+ captionLayout: "dropdown-buttons",
1691
+ classNames: M,
1692
+ mode: "single",
1693
+ modifiersClassNames: { today: A["day--today"], selected: A.day_selected, disabled: A["day--disabled"] },
1694
+ footer: /* @__PURE__ */ P.createElement("span", { className: A["footer-wrapper"] }, t),
1695
+ fixedWeeks: !0,
1696
+ ...i
1697
+ }
1698
+ )), /* @__PURE__ */ P.createElement("div", { ref: s, className: b, style: w }));
1699
+ }, Ho = Vo, pn = P.forwardRef((e, n) => {
1700
+ const {
1701
+ className: t,
1702
+ dateButtonAriaLabel: r,
1703
+ dateFormat: a = "dd.MM.yyyy",
1704
+ dateValue: i,
1705
+ defaultMonth: s,
1706
+ dir: l,
1707
+ disableDays: u = [],
1708
+ disableWeekends: v,
1709
+ error: d,
1710
+ errorText: m,
1711
+ footerContent: p,
1712
+ label: y,
1713
+ locale: b = zn,
1714
+ maxDate: C,
1715
+ minDate: w,
1716
+ onBlur: M,
1717
+ onChange: x,
1718
+ testId: I,
1719
+ autoComplete: B = "off",
1720
+ ...Q
1721
+ } = e, [q, le] = G(i), [he, ue] = G(q ? X(q, a) : ""), [ge, fe] = G(s), [ce, F] = G(!1), [H, z] = G(!1), pe = {
1722
+ dayOfWeek: [0, 6]
1723
+ }, g = v ? [...u, pe] : u, _ = Ae(null), J = Ae(null), { refObject: Y } = en(tn(n) ? n : null), ne = nn([n, Y]);
1724
+ rr(J, (R) => {
1725
+ var ee;
1726
+ const re = R.target;
1727
+ (ee = _ == null ? void 0 : _.current) != null && ee.contains(re) || F(!1);
1728
+ }), P.useEffect(() => {
1729
+ ue(i ? X(i, a) : ""), Re(i) && (le(i), fe(i));
1730
+ }, [i]), P.useEffect(() => {
1731
+ H && Y.current && Y.current.focus();
1732
+ }, [H]);
1733
+ const we = () => {
1734
+ Y != null && Y.current && Y.current.focus(), F(!1);
1735
+ };
1736
+ Bt(J, we, [At.Escape]), Bt(_, we, [At.Escape]);
1737
+ const xe = (R, re) => {
1738
+ ue(R.currentTarget.value);
1739
+ const ee = Ee(R.currentTarget.value, re, /* @__PURE__ */ new Date());
1740
+ Re(ee) ? (le(ee), fe(ee)) : le(void 0), x && x(R, R.currentTarget.value);
1741
+ }, $e = () => {
1742
+ H ? z(!1) : F(!0);
1743
+ }, Ke = (R, re, ee, Ge) => {
1744
+ if (z(!0), !R) {
1745
+ F(!1);
1746
+ return;
1747
+ }
1748
+ le(R), Y.current && (ue(X(R, a)), F(!1)), x && x(Ge, R);
1749
+ }, De = (R) => {
1750
+ var re;
1751
+ (re = J.current) != null && re.contains(R.relatedTarget) || F(!1), M && M(R);
1752
+ }, ke = (R) => {
1753
+ R == null || R.stopPropagation(), F(!ce);
1754
+ }, ye = /* @__PURE__ */ P.createElement(
1755
+ lt,
1756
+ {
1757
+ error: d,
1758
+ errorText: m,
1759
+ label: y,
1760
+ max: C ? X(C, "yyyy-MM-dd") : "",
1761
+ min: w ? X(w, "yyyy-MM-dd") : "",
1762
+ type: "date",
1763
+ ref: ne,
1764
+ value: he,
1765
+ width: 14,
1766
+ ...Q,
1767
+ onBlur: (R) => {
1768
+ M && M(R);
1769
+ },
1770
+ onChange: (R) => xe(R, "yyyy-MM-dd"),
1771
+ autoComplete: B || void 0
1772
+ }
1773
+ ), Ce = /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("div", null, /* @__PURE__ */ P.createElement(
1774
+ lt,
1775
+ {
1776
+ error: d,
1777
+ errorText: m,
1778
+ inputWrapperRef: _,
1779
+ label: y,
1780
+ onFocus: $e,
1781
+ type: "text",
1782
+ ref: ne,
1783
+ value: he,
1784
+ width: 12,
1785
+ ...Q,
1786
+ onBlur: De,
1787
+ onChange: (R) => xe(R, a),
1788
+ rightOfInput: /* @__PURE__ */ P.createElement(
1789
+ er,
1790
+ {
1791
+ ariaLabel: r ?? "Velg dato",
1792
+ onClick: ke,
1793
+ tabIndex: ce ? -1 : 0,
1794
+ variant: "borderless",
1795
+ wrapperClassName: A["date-button"],
1796
+ className: A["date-button__inner"]
1797
+ },
1798
+ /* @__PURE__ */ P.createElement(tr, { color: "black", svgIcon: nr })
1799
+ ),
1800
+ autoComplete: B || void 0
1801
+ }
1802
+ )), ce && /* @__PURE__ */ P.createElement(
1803
+ Ho,
1804
+ {
1805
+ dir: l,
1806
+ disabled: g,
1807
+ datepickerWrapperRef: J,
1808
+ footer: p,
1809
+ fromDate: w,
1810
+ toDate: C,
1811
+ inputRef: Y,
1812
+ locale: b,
1813
+ month: ge,
1814
+ selected: q,
1815
+ onSelect: Ke,
1816
+ onMonthChange: fe
1817
+ }
1818
+ ));
1819
+ return /* @__PURE__ */ P.createElement("div", { className: t, "data-testid": I }, ar() ? ye : Ce);
1820
+ });
1821
+ pn.displayName = "DatePicker";
1822
+ const Jt = (e) => {
1823
+ const n = String(e);
1824
+ return n.length === 1 ? "0" + n : n;
1825
+ }, Uo = (e) => !e || /^\d+$/.test(e) && e.length <= 2, yn = P.forwardRef((e, n) => {
1826
+ const { defaultValue: t, error: r, errorText: a, label: i, onChange: s, timeUnit: l, testId: u, autoComplete: v = "off", ...d } = e, [m, p] = G(
1827
+ typeof t < "u" ? Jt(t) : ""
1828
+ ), { refObject: y } = en(tn(n) ? n : null), b = nn([n, y]), C = (I) => {
1829
+ const B = I.target.value;
1830
+ Uo(B) && (p(B), s && s(I));
1831
+ }, w = (I) => {
1832
+ const B = Jt(I.target.value);
1833
+ p(B), s && s(I);
1834
+ }, M = (I) => {
1835
+ const B = /[0-9]/, Q = ["Backspace", " ", "Enter", "Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
1836
+ !B.test(I.key) && !Q.includes(I.key) && I.preventDefault();
1837
+ }, x = () => l === "hours" && /* @__PURE__ */ P.createElement("span", { className: A["time-separator"] }, ":");
1838
+ return /* @__PURE__ */ P.createElement("div", { "data-testid": u }, /* @__PURE__ */ P.createElement(
1839
+ lt,
1840
+ {
1841
+ error: r,
1842
+ errorText: a,
1843
+ label: i,
1844
+ max: l === "hours" ? 23 : 59,
1845
+ min: 0,
1846
+ type: "number",
1847
+ ref: b,
1848
+ value: m,
1849
+ width: 5,
1850
+ ...d,
1851
+ onChange: C,
1852
+ onBlur: w,
1853
+ rightOfInput: x(),
1854
+ onKeyDown: M,
1855
+ autoComplete: v || void 0
1856
+ }
1857
+ ));
1858
+ });
1859
+ yn.displayName = "DateTime";
1860
+ const $o = P.forwardRef((e, n) => {
1861
+ const { children: t, errorText: r, legend: a, testId: i } = e, s = (l) => Yt(l, pn) ? P.cloneElement(l, {
1862
+ className: ut(A["date-time-picker-wrapper__date-picker"]),
1863
+ error: !!r
1864
+ }) : Yt(l, yn) ? P.cloneElement(l, {
1865
+ error: !!r
1866
+ }) : l;
1867
+ return /* @__PURE__ */ P.createElement("div", { ref: n, tabIndex: -1 }, /* @__PURE__ */ P.createElement(cr, { errorText: r }, e.legend ? /* @__PURE__ */ P.createElement("fieldset", { className: A["date-time-picker-wrapper"], "data-testid": i }, e.legend && /* @__PURE__ */ P.createElement("legend", { className: A["date-time-picker-wrapper__legend"] }, a), P.Children.map(t, s)) : /* @__PURE__ */ P.createElement("div", { className: A["date-time-picker-wrapper"] }, P.Children.map(t, s))));
1868
+ });
1869
+ $o.displayName = "DateTimePickerWrapper";
1870
+ const _n = (e) => {
1871
+ const n = ["yyyy-MM-dd", "dd.MM.yyyy"];
1872
+ for (const t of n) {
1873
+ const r = Ee(e, t, /* @__PURE__ */ new Date());
1874
+ if (Re(r))
1875
+ return r;
1876
+ }
1877
+ return null;
1878
+ }, hi = (e) => {
1879
+ const n = new Date(e);
1880
+ return n instanceof Date && !isNaN(n.getTime());
1881
+ }, pi = (e, n, t, r) => {
1882
+ const a = _n(e), i = typeof t < "u", s = typeof r < "u";
1883
+ return !a || i && !Re(t) || s && !Re(r) ? "Invalid date format" : i && !s && (L(a, t) || Be(a, t)) || s && !i && (L(a, r) || mt(a, r)) || i && s && (L(a, t) || L(a, r) || Zn(a, { start: t, end: r })) ? !0 : n;
1884
+ }, yi = (e, n, t) => {
1885
+ const r = _n(e);
1886
+ return r ? n.some((a) => L(a, r)) ? t : !0 : "Invalid date format";
1887
+ }, _i = (e, n, t, r) => {
1888
+ const a = Ee((e.hour + ":" + e.minute).toString(), "HH:mm", /* @__PURE__ */ new Date()), i = Ee(((t == null ? void 0 : t.hour) + ":" + (t == null ? void 0 : t.minute)).toString(), "HH:mm", /* @__PURE__ */ new Date()), s = Ee(((r == null ? void 0 : r.hour) + ":" + (r == null ? void 0 : r.minute)).toString(), "HH:mm", /* @__PURE__ */ new Date());
1889
+ return (typeof t > "u" || a >= i) && (typeof r > "u" || a <= s) ? !0 : n;
1890
+ };
1891
+ export {
1892
+ pn as DatePicker,
1893
+ yn as DateTime,
1894
+ $o as DateTimePickerWrapper,
1895
+ pn as default,
1896
+ hi as isValidDate,
1897
+ _n as parseInputDate,
1898
+ yi as validateDisabledDates,
1899
+ pi as validateMinMaxDate,
1900
+ _i as validateMinTimeMaxTime
1901
+ };
10
1902
  //# sourceMappingURL=index.js.map