rk-designsystem 1.1.35 → 1.1.36

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,7 +1,8 @@
1
- import xe, { forwardRef as T, useState as Ce, useEffect as Pe, useMemo as oe, useCallback as Y, useRef as Se } from "react";
2
- import { Alert as $e, Avatar as Me, Badge as De, BadgePosition as Ae, Breadcrumbs as Oe, BreadcrumbsList as We, BreadcrumbsItem as Le, BreadcrumbsLink as Be, Button as me, Card as Ie, CardBlock as Fe, Checkbox as Ve, Fieldset as we, useCheckboxGroup as Ye, Chip as He, Details as ze, Dialog as Ge, Divider as qe, Dropdown as Xe, ErrorSummary as Ke, FieldDescription as Je, FieldCounter as Ue, Field as Qe, Heading as Ze, Input as et, Label as tt, Link as at, List as rt, Pagination as nt, usePagination as ot, Paragraph as st, Popover as it, Radio as lt, useRadioGroup as ct, Search as dt, Select as ut, Skeleton as mt, SkipLink as ft, Spinner as ht, EXPERIMENTAL_Suggestion as pt, Switch as bt, Table as vt, Tabs as gt, Tag as kt, Textarea as yt, Textfield as _t, ToggleGroup as xt, Tooltip as Ct, ValidationMessage as Pt } from "@digdir/designsystemet-react";
3
- import { startOfMonth as F, isValid as de, isSameMonth as he, startOfWeek as Ee, format as J, addDays as je, subMonths as wt, addMonths as Et, isSameDay as jt, isToday as Nt, eachDayOfInterval as Rt } from "date-fns";
4
- var se = { exports: {} }, U = {};
1
+ import bt, { forwardRef as ce, useState as ge, useEffect as ie, useMemo as ke, useCallback as te, useRef as We } from "react";
2
+ import { Alert as Rt, Avatar as Ot, Badge as $t, BadgePosition as Ft, Breadcrumbs as Bt, BreadcrumbsList as Vt, BreadcrumbsItem as Wt, BreadcrumbsLink as zt, Button as we, Card as Ht, CardBlock as Yt, Checkbox as Gt, Fieldset as vt, useCheckboxGroup as qt, Chip as Kt, Details as Ut, Dialog as Xt, Divider as Jt, Dropdown as Qt, ErrorSummary as Zt, FieldDescription as en, FieldCounter as tn, Field as nn, Heading as rn, Input as on, Label as sn, Link as an, List as cn, Pagination as ln, usePagination as un, Paragraph as dn, Popover as fn, Radio as mn, useRadioGroup as pn, Search as hn, Select as gn, Skeleton as bn, SkipLink as vn, Spinner as yn, EXPERIMENTAL_Suggestion as xn, Switch as Sn, Table as _n, Tabs as kn, Tag as En, Textarea as Cn, Textfield as wn, ToggleGroup as Pn, Tooltip as Tn, ValidationMessage as Nn } from "@digdir/designsystemet-react";
3
+ import { startOfMonth as pe, isValid as Be, isSameMonth as st, startOfWeek as yt, format as ve, addDays as xt, subMonths as jn, addMonths as Ln, isSameDay as In, isToday as Mn, eachDayOfInterval as Dn } from "date-fns";
4
+ import { ChevronLeftIcon as An, ChevronRightIcon as Rn } from "@navikt/aksel-icons";
5
+ var Ie = { exports: {} }, ye = {};
5
6
  /**
6
7
  * @license React
7
8
  * react-jsx-runtime.production.js
@@ -11,29 +12,29 @@ var se = { exports: {} }, U = {};
11
12
  * This source code is licensed under the MIT license found in the
12
13
  * LICENSE file in the root directory of this source tree.
13
14
  */
14
- var pe;
15
- function Tt() {
16
- if (pe) return U;
17
- pe = 1;
18
- var t = Symbol.for("react.transitional.element"), a = Symbol.for("react.fragment");
19
- function r(o, i, c) {
20
- var d = null;
21
- if (c !== void 0 && (d = "" + c), i.key !== void 0 && (d = "" + i.key), "key" in i) {
22
- c = {};
23
- for (var h in i)
24
- h !== "key" && (c[h] = i[h]);
25
- } else c = i;
26
- return i = c.ref, {
27
- $$typeof: t,
28
- type: o,
29
- key: d,
15
+ var at;
16
+ function On() {
17
+ if (at) return ye;
18
+ at = 1;
19
+ var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
20
+ function n(s, i, a) {
21
+ var r = null;
22
+ if (a !== void 0 && (r = "" + a), i.key !== void 0 && (r = "" + i.key), "key" in i) {
23
+ a = {};
24
+ for (var c in i)
25
+ c !== "key" && (a[c] = i[c]);
26
+ } else a = i;
27
+ return i = a.ref, {
28
+ $$typeof: e,
29
+ type: s,
30
+ key: r,
30
31
  ref: i !== void 0 ? i : null,
31
- props: c
32
+ props: a
32
33
  };
33
34
  }
34
- return U.Fragment = a, U.jsx = r, U.jsxs = r, U;
35
+ return ye.Fragment = t, ye.jsx = n, ye.jsxs = n, ye;
35
36
  }
36
- var Q = {};
37
+ var xe = {};
37
38
  /**
38
39
  * @license React
39
40
  * react-jsx-runtime.development.js
@@ -43,318 +44,318 @@ var Q = {};
43
44
  * This source code is licensed under the MIT license found in the
44
45
  * LICENSE file in the root directory of this source tree.
45
46
  */
46
- var be;
47
- function St() {
48
- return be || (be = 1, process.env.NODE_ENV !== "production" && (function() {
49
- function t(e) {
50
- if (e == null) return null;
51
- if (typeof e == "function")
52
- return e.$$typeof === le ? null : e.displayName || e.name || null;
53
- if (typeof e == "string") return e;
54
- switch (e) {
55
- case C:
47
+ var it;
48
+ function $n() {
49
+ return it || (it = 1, process.env.NODE_ENV !== "production" && (function() {
50
+ function e(l) {
51
+ if (l == null) return null;
52
+ if (typeof l == "function")
53
+ return l.$$typeof === D ? null : l.displayName || l.name || null;
54
+ if (typeof l == "string") return l;
55
+ switch (l) {
56
+ case b:
56
57
  return "Fragment";
57
- case l:
58
+ case d:
58
59
  return "Profiler";
59
- case z:
60
+ case m:
60
61
  return "StrictMode";
61
- case W:
62
+ case T:
62
63
  return "Suspense";
63
- case S:
64
+ case C:
64
65
  return "SuspenseList";
65
- case ie:
66
+ case $:
66
67
  return "Activity";
67
68
  }
68
- if (typeof e == "object")
69
- switch (typeof e.tag == "number" && console.error(
69
+ if (typeof l == "object")
70
+ switch (typeof l.tag == "number" && console.error(
70
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
71
- ), e.$$typeof) {
72
- case H:
72
+ ), l.$$typeof) {
73
+ case g:
73
74
  return "Portal";
75
+ case E:
76
+ return l.displayName || "Context";
77
+ case x:
78
+ return (l._context.displayName || "Context") + ".Consumer";
79
+ case N:
80
+ var _ = l.render;
81
+ return l = l.displayName, l || (l = _.displayName || _.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
74
82
  case w:
75
- return e.displayName || "Context";
83
+ return _ = l.displayName || null, _ !== null ? _ : e(l.type) || "Memo";
76
84
  case j:
77
- return (e._context.displayName || "Context") + ".Consumer";
78
- case N:
79
- var n = e.render;
80
- return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
81
- case $:
82
- return n = e.displayName || null, n !== null ? n : t(e.type) || "Memo";
83
- case G:
84
- n = e._payload, e = e._init;
85
+ _ = l._payload, l = l._init;
85
86
  try {
86
- return t(e(n));
87
+ return e(l(_));
87
88
  } catch {
88
89
  }
89
90
  }
90
91
  return null;
91
92
  }
92
- function a(e) {
93
- return "" + e;
93
+ function t(l) {
94
+ return "" + l;
94
95
  }
95
- function r(e) {
96
+ function n(l) {
96
97
  try {
97
- a(e);
98
- var n = !1;
98
+ t(l);
99
+ var _ = !1;
99
100
  } catch {
100
- n = !0;
101
+ _ = !0;
101
102
  }
102
- if (n) {
103
- n = console;
104
- var u = n.error, f = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
105
- return u.call(
106
- n,
103
+ if (_) {
104
+ _ = console;
105
+ var I = _.error, M = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
+ return I.call(
107
+ _,
107
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
- f
109
- ), a(e);
109
+ M
110
+ ), t(l);
110
111
  }
111
112
  }
112
- function o(e) {
113
- if (e === C) return "<>";
114
- if (typeof e == "object" && e !== null && e.$$typeof === G)
113
+ function s(l) {
114
+ if (l === b) return "<>";
115
+ if (typeof l == "object" && l !== null && l.$$typeof === j)
115
116
  return "<...>";
116
117
  try {
117
- var n = t(e);
118
- return n ? "<" + n + ">" : "<...>";
118
+ var _ = e(l);
119
+ return _ ? "<" + _ + ">" : "<...>";
119
120
  } catch {
120
121
  return "<...>";
121
122
  }
122
123
  }
123
124
  function i() {
124
- var e = R.A;
125
- return e === null ? null : e.getOwner();
125
+ var l = F.A;
126
+ return l === null ? null : l.getOwner();
126
127
  }
127
- function c() {
128
+ function a() {
128
129
  return Error("react-stack-top-frame");
129
130
  }
130
- function d(e) {
131
- if (y.call(e, "key")) {
132
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
133
- if (n && n.isReactWarning) return !1;
131
+ function r(l) {
132
+ if (V.call(l, "key")) {
133
+ var _ = Object.getOwnPropertyDescriptor(l, "key").get;
134
+ if (_ && _.isReactWarning) return !1;
134
135
  }
135
- return e.key !== void 0;
136
+ return l.key !== void 0;
136
137
  }
137
- function h(e, n) {
138
- function u() {
139
- q || (q = !0, console.error(
138
+ function c(l, _) {
139
+ function I() {
140
+ X || (X = !0, console.error(
140
141
  "%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://react.dev/link/special-props)",
141
- n
142
+ _
142
143
  ));
143
144
  }
144
- u.isReactWarning = !0, Object.defineProperty(e, "key", {
145
- get: u,
145
+ I.isReactWarning = !0, Object.defineProperty(l, "key", {
146
+ get: I,
146
147
  configurable: !0
147
148
  });
148
149
  }
149
- function b() {
150
- var e = t(this.type);
151
- return te[e] || (te[e] = !0, console.error(
150
+ function o() {
151
+ var l = e(this.type);
152
+ return J[l] || (J[l] = !0, console.error(
152
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
153
- )), e = this.props.ref, e !== void 0 ? e : null;
154
+ )), l = this.props.ref, l !== void 0 ? l : null;
154
155
  }
155
- function k(e, n, u, f, B, v) {
156
- var m = u.ref;
157
- return e = {
158
- $$typeof: O,
159
- type: e,
160
- key: n,
161
- props: u,
162
- _owner: f
163
- }, (m !== void 0 ? m : null) !== null ? Object.defineProperty(e, "ref", {
156
+ function u(l, _, I, M, Q, z) {
157
+ var P = I.ref;
158
+ return l = {
159
+ $$typeof: f,
160
+ type: l,
161
+ key: _,
162
+ props: I,
163
+ _owner: M
164
+ }, (P !== void 0 ? P : null) !== null ? Object.defineProperty(l, "ref", {
164
165
  enumerable: !1,
165
- get: b
166
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
166
+ get: o
167
+ }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
167
168
  configurable: !1,
168
169
  enumerable: !1,
169
170
  writable: !0,
170
171
  value: 0
171
- }), Object.defineProperty(e, "_debugInfo", {
172
+ }), Object.defineProperty(l, "_debugInfo", {
172
173
  configurable: !1,
173
174
  enumerable: !1,
174
175
  writable: !0,
175
176
  value: null
176
- }), Object.defineProperty(e, "_debugStack", {
177
+ }), Object.defineProperty(l, "_debugStack", {
177
178
  configurable: !1,
178
179
  enumerable: !1,
179
180
  writable: !0,
180
- value: B
181
- }), Object.defineProperty(e, "_debugTask", {
181
+ value: Q
182
+ }), Object.defineProperty(l, "_debugTask", {
182
183
  configurable: !1,
183
184
  enumerable: !1,
184
185
  writable: !0,
185
- value: v
186
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
186
+ value: z
187
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
187
188
  }
188
- function _(e, n, u, f, B, v) {
189
- var m = n.children;
190
- if (m !== void 0)
191
- if (f)
192
- if (L(m)) {
193
- for (f = 0; f < m.length; f++)
194
- x(m[f]);
195
- Object.freeze && Object.freeze(m);
189
+ function v(l, _, I, M, Q, z) {
190
+ var P = _.children;
191
+ if (P !== void 0)
192
+ if (M)
193
+ if (H(P)) {
194
+ for (M = 0; M < P.length; M++)
195
+ p(P[M]);
196
+ Object.freeze && Object.freeze(P);
196
197
  } else
197
198
  console.error(
198
199
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
200
  );
200
- else x(m);
201
- if (y.call(n, "key")) {
202
- m = t(e);
203
- var P = Object.keys(n).filter(function(ce) {
204
- return ce !== "key";
201
+ else p(P);
202
+ if (V.call(_, "key")) {
203
+ P = e(l);
204
+ var A = Object.keys(_).filter(function(G) {
205
+ return G !== "key";
205
206
  });
206
- f = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", ne[m + f] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ M = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", re[P + M] || (A = 0 < A.length ? "{" + A.join(": ..., ") + ": ...}" : "{}", console.error(
207
208
  `A props object containing a "key" prop is being spread into JSX:
208
209
  let props = %s;
209
210
  <%s {...props} />
210
211
  React keys must be passed directly to JSX without using spread:
211
212
  let props = %s;
212
213
  <%s key={someKey} {...props} />`,
213
- f,
214
- m,
214
+ M,
215
215
  P,
216
- m
217
- ), ne[m + f] = !0);
216
+ A,
217
+ P
218
+ ), re[P + M] = !0);
218
219
  }
219
- if (m = null, u !== void 0 && (r(u), m = "" + u), d(n) && (r(n.key), m = "" + n.key), "key" in n) {
220
- u = {};
221
- for (var X in n)
222
- X !== "key" && (u[X] = n[X]);
223
- } else u = n;
224
- return m && h(
225
- u,
226
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
227
- ), k(
228
- e,
229
- m,
230
- u,
220
+ if (P = null, I !== void 0 && (n(I), P = "" + I), r(_) && (n(_.key), P = "" + _.key), "key" in _) {
221
+ I = {};
222
+ for (var q in _)
223
+ q !== "key" && (I[q] = _[q]);
224
+ } else I = _;
225
+ return P && c(
226
+ I,
227
+ typeof l == "function" ? l.displayName || l.name || "Unknown" : l
228
+ ), u(
229
+ l,
230
+ P,
231
+ I,
231
232
  i(),
232
- B,
233
- v
233
+ Q,
234
+ z
234
235
  );
235
236
  }
236
- function x(e) {
237
- A(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === G && (e._payload.status === "fulfilled" ? A(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
237
+ function p(l) {
238
+ h(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === j && (l._payload.status === "fulfilled" ? h(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
238
239
  }
239
- function A(e) {
240
- return typeof e == "object" && e !== null && e.$$typeof === O;
240
+ function h(l) {
241
+ return typeof l == "object" && l !== null && l.$$typeof === f;
241
242
  }
242
- var p = xe, O = Symbol.for("react.transitional.element"), H = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), z = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), w = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), $ = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), ie = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), R = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, L = Array.isArray, E = console.createTask ? console.createTask : function() {
243
+ var y = bt, f = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), E = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), F = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, H = Array.isArray, W = console.createTask ? console.createTask : function() {
243
244
  return null;
244
245
  };
245
- p = {
246
- react_stack_bottom_frame: function(e) {
247
- return e();
246
+ y = {
247
+ react_stack_bottom_frame: function(l) {
248
+ return l();
248
249
  }
249
250
  };
250
- var q, te = {}, ae = p.react_stack_bottom_frame.bind(
251
- p,
252
- c
253
- )(), re = E(o(c)), ne = {};
254
- Q.Fragment = C, Q.jsx = function(e, n, u) {
255
- var f = 1e4 > R.recentlyCreatedOwnerStacks++;
256
- return _(
257
- e,
258
- n,
259
- u,
251
+ var X, J = {}, K = y.react_stack_bottom_frame.bind(
252
+ y,
253
+ a
254
+ )(), U = W(s(a)), re = {};
255
+ xe.Fragment = b, xe.jsx = function(l, _, I) {
256
+ var M = 1e4 > F.recentlyCreatedOwnerStacks++;
257
+ return v(
258
+ l,
259
+ _,
260
+ I,
260
261
  !1,
261
- f ? Error("react-stack-top-frame") : ae,
262
- f ? E(o(e)) : re
262
+ M ? Error("react-stack-top-frame") : K,
263
+ M ? W(s(l)) : U
263
264
  );
264
- }, Q.jsxs = function(e, n, u) {
265
- var f = 1e4 > R.recentlyCreatedOwnerStacks++;
266
- return _(
267
- e,
268
- n,
269
- u,
265
+ }, xe.jsxs = function(l, _, I) {
266
+ var M = 1e4 > F.recentlyCreatedOwnerStacks++;
267
+ return v(
268
+ l,
269
+ _,
270
+ I,
270
271
  !0,
271
- f ? Error("react-stack-top-frame") : ae,
272
- f ? E(o(e)) : re
272
+ M ? Error("react-stack-top-frame") : K,
273
+ M ? W(s(l)) : U
273
274
  );
274
275
  };
275
- })()), Q;
276
- }
277
- var ve;
278
- function $t() {
279
- return ve || (ve = 1, process.env.NODE_ENV === "production" ? se.exports = Tt() : se.exports = St()), se.exports;
280
- }
281
- var s = $t();
282
- const Mt = T((t, a) => /* @__PURE__ */ s.jsx($e, { ref: a, ...t }));
283
- Mt.displayName = "Alert";
284
- const Dt = T((t, a) => /* @__PURE__ */ s.jsx(Me, { ref: a, ...t }));
285
- Dt.displayName = "Avatar";
286
- const At = T((t, a) => /* @__PURE__ */ s.jsx(De, { ref: a, ...t }));
287
- At.displayName = "Badge";
288
- const qa = Ae, Xa = Oe, Ka = We, Ja = Le, Ua = Be, Ot = me;
289
- Ot.displayName = "Button";
290
- const Wt = Ie, Qa = Fe;
291
- Wt.displayName = "Card";
292
- const Lt = Ve, Bt = we, Za = Ye;
293
- Lt.displayName = "Checkbox";
294
- Bt.displayName = "Fieldset";
295
- const er = He;
296
- function ue(t) {
297
- return (a = {}) => {
298
- const r = a.width ? String(a.width) : t.defaultWidth;
299
- return t.formats[r] || t.formats[t.defaultWidth];
276
+ })()), xe;
277
+ }
278
+ var ct;
279
+ function Fn() {
280
+ return ct || (ct = 1, process.env.NODE_ENV === "production" ? Ie.exports = On() : Ie.exports = $n()), Ie.exports;
281
+ }
282
+ var k = Fn();
283
+ const Bn = ce((e, t) => /* @__PURE__ */ k.jsx(Rt, { ref: t, ...e }));
284
+ Bn.displayName = "Alert";
285
+ const Vn = ce((e, t) => /* @__PURE__ */ k.jsx(Ot, { ref: t, ...e }));
286
+ Vn.displayName = "Avatar";
287
+ const Wn = ce((e, t) => /* @__PURE__ */ k.jsx($t, { ref: t, ...e }));
288
+ Wn.displayName = "Badge";
289
+ const Ko = Ft, Uo = Bt, Xo = Vt, Jo = Wt, Qo = zt, zn = we;
290
+ zn.displayName = "Button";
291
+ const Hn = Ht, Zo = Yt;
292
+ Hn.displayName = "Card";
293
+ const Yn = Gt, Gn = vt, es = qt;
294
+ Yn.displayName = "Checkbox";
295
+ Gn.displayName = "Fieldset";
296
+ const ts = Kt;
297
+ function Ve(e) {
298
+ return (t = {}) => {
299
+ const n = t.width ? String(t.width) : e.defaultWidth;
300
+ return e.formats[n] || e.formats[e.defaultWidth];
300
301
  };
301
302
  }
302
- function Z(t) {
303
- return (a, r) => {
304
- const o = r != null && r.context ? String(r.context) : "standalone";
303
+ function Se(e) {
304
+ return (t, n) => {
305
+ const s = n != null && n.context ? String(n.context) : "standalone";
305
306
  let i;
306
- if (o === "formatting" && t.formattingValues) {
307
- const d = t.defaultFormattingWidth || t.defaultWidth, h = r != null && r.width ? String(r.width) : d;
308
- i = t.formattingValues[h] || t.formattingValues[d];
307
+ if (s === "formatting" && e.formattingValues) {
308
+ const r = e.defaultFormattingWidth || e.defaultWidth, c = n != null && n.width ? String(n.width) : r;
309
+ i = e.formattingValues[c] || e.formattingValues[r];
309
310
  } else {
310
- const d = t.defaultWidth, h = r != null && r.width ? String(r.width) : t.defaultWidth;
311
- i = t.values[h] || t.values[d];
311
+ const r = e.defaultWidth, c = n != null && n.width ? String(n.width) : e.defaultWidth;
312
+ i = e.values[c] || e.values[r];
312
313
  }
313
- const c = t.argumentCallback ? t.argumentCallback(a) : a;
314
- return i[c];
314
+ const a = e.argumentCallback ? e.argumentCallback(t) : t;
315
+ return i[a];
315
316
  };
316
317
  }
317
- function ee(t) {
318
- return (a, r = {}) => {
319
- const o = r.width, i = o && t.matchPatterns[o] || t.matchPatterns[t.defaultMatchWidth], c = a.match(i);
320
- if (!c)
318
+ function _e(e) {
319
+ return (t, n = {}) => {
320
+ const s = n.width, i = s && e.matchPatterns[s] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
321
+ if (!a)
321
322
  return null;
322
- const d = c[0], h = o && t.parsePatterns[o] || t.parsePatterns[t.defaultParseWidth], b = Array.isArray(h) ? Ft(h, (x) => x.test(d)) : (
323
+ const r = a[0], c = s && e.parsePatterns[s] || e.parsePatterns[e.defaultParseWidth], o = Array.isArray(c) ? Kn(c, (p) => p.test(r)) : (
323
324
  // [TODO] -- I challenge you to fix the type
324
- It(h, (x) => x.test(d))
325
+ qn(c, (p) => p.test(r))
325
326
  );
326
- let k;
327
- k = t.valueCallback ? t.valueCallback(b) : b, k = r.valueCallback ? (
327
+ let u;
328
+ u = e.valueCallback ? e.valueCallback(o) : o, u = n.valueCallback ? (
328
329
  // [TODO] -- I challenge you to fix the type
329
- r.valueCallback(k)
330
- ) : k;
331
- const _ = a.slice(d.length);
332
- return { value: k, rest: _ };
330
+ n.valueCallback(u)
331
+ ) : u;
332
+ const v = t.slice(r.length);
333
+ return { value: u, rest: v };
333
334
  };
334
335
  }
335
- function It(t, a) {
336
- for (const r in t)
337
- if (Object.prototype.hasOwnProperty.call(t, r) && a(t[r]))
338
- return r;
339
- }
340
- function Ft(t, a) {
341
- for (let r = 0; r < t.length; r++)
342
- if (a(t[r]))
343
- return r;
344
- }
345
- function Vt(t) {
346
- return (a, r = {}) => {
347
- const o = a.match(t.matchPattern);
348
- if (!o) return null;
349
- const i = o[0], c = a.match(t.parsePattern);
350
- if (!c) return null;
351
- let d = t.valueCallback ? t.valueCallback(c[0]) : c[0];
352
- d = r.valueCallback ? r.valueCallback(d) : d;
353
- const h = a.slice(i.length);
354
- return { value: d, rest: h };
336
+ function qn(e, t) {
337
+ for (const n in e)
338
+ if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
339
+ return n;
340
+ }
341
+ function Kn(e, t) {
342
+ for (let n = 0; n < e.length; n++)
343
+ if (t(e[n]))
344
+ return n;
345
+ }
346
+ function Un(e) {
347
+ return (t, n = {}) => {
348
+ const s = t.match(e.matchPattern);
349
+ if (!s) return null;
350
+ const i = s[0], a = t.match(e.parsePattern);
351
+ if (!a) return null;
352
+ let r = e.valueCallback ? e.valueCallback(a[0]) : a[0];
353
+ r = n.valueCallback ? n.valueCallback(r) : r;
354
+ const c = t.slice(i.length);
355
+ return { value: r, rest: c };
355
356
  };
356
357
  }
357
- const Yt = {
358
+ const Xn = {
358
359
  lessThanXSeconds: {
359
360
  one: "mindre enn ett sekund",
360
361
  other: "mindre enn {{count}} sekunder"
@@ -416,54 +417,54 @@ const Yt = {
416
417
  one: "nesten ett år",
417
418
  other: "nesten {{count}} år"
418
419
  }
419
- }, Ht = (t, a, r) => {
420
- let o;
421
- const i = Yt[t];
422
- return typeof i == "string" ? o = i : a === 1 ? o = i.one : o = i.other.replace("{{count}}", String(a)), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "om " + o : o + " siden" : o;
423
- }, zt = {
420
+ }, Jn = (e, t, n) => {
421
+ let s;
422
+ const i = Xn[e];
423
+ return typeof i == "string" ? s = i : t === 1 ? s = i.one : s = i.other.replace("{{count}}", String(t)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "om " + s : s + " siden" : s;
424
+ }, Qn = {
424
425
  full: "EEEE d. MMMM y",
425
426
  long: "d. MMMM y",
426
427
  medium: "d. MMM y",
427
428
  short: "dd.MM.y"
428
- }, Gt = {
429
+ }, Zn = {
429
430
  full: "'kl'. HH:mm:ss zzzz",
430
431
  long: "HH:mm:ss z",
431
432
  medium: "HH:mm:ss",
432
433
  short: "HH:mm"
433
- }, qt = {
434
+ }, er = {
434
435
  full: "{{date}} 'kl.' {{time}}",
435
436
  long: "{{date}} 'kl.' {{time}}",
436
437
  medium: "{{date}} {{time}}",
437
438
  short: "{{date}} {{time}}"
438
- }, Xt = {
439
- date: ue({
440
- formats: zt,
439
+ }, tr = {
440
+ date: Ve({
441
+ formats: Qn,
441
442
  defaultWidth: "full"
442
443
  }),
443
- time: ue({
444
- formats: Gt,
444
+ time: Ve({
445
+ formats: Zn,
445
446
  defaultWidth: "full"
446
447
  }),
447
- dateTime: ue({
448
- formats: qt,
448
+ dateTime: Ve({
449
+ formats: er,
449
450
  defaultWidth: "full"
450
451
  })
451
- }, Kt = {
452
+ }, nr = {
452
453
  lastWeek: "'forrige' eeee 'kl.' p",
453
454
  yesterday: "'i går kl.' p",
454
455
  today: "'i dag kl.' p",
455
456
  tomorrow: "'i morgen kl.' p",
456
457
  nextWeek: "EEEE 'kl.' p",
457
458
  other: "P"
458
- }, Jt = (t, a, r, o) => Kt[t], Ut = {
459
+ }, rr = (e, t, n, s) => nr[e], or = {
459
460
  narrow: ["f.Kr.", "e.Kr."],
460
461
  abbreviated: ["f.Kr.", "e.Kr."],
461
462
  wide: ["før Kristus", "etter Kristus"]
462
- }, Qt = {
463
+ }, sr = {
463
464
  narrow: ["1", "2", "3", "4"],
464
465
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
465
466
  wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
466
- }, Zt = {
467
+ }, ar = {
467
468
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
468
469
  abbreviated: [
469
470
  "jan.",
@@ -493,7 +494,7 @@ const Yt = {
493
494
  "november",
494
495
  "desember"
495
496
  ]
496
- }, ea = {
497
+ }, ir = {
497
498
  narrow: ["S", "M", "T", "O", "T", "F", "L"],
498
499
  short: ["sø", "ma", "ti", "on", "to", "fr", "lø"],
499
500
  abbreviated: ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
@@ -506,7 +507,7 @@ const Yt = {
506
507
  "fredag",
507
508
  "lørdag"
508
509
  ]
509
- }, ta = {
510
+ }, cr = {
510
511
  narrow: {
511
512
  am: "a",
512
513
  pm: "p",
@@ -537,46 +538,46 @@ const Yt = {
537
538
  evening: "på kvelden",
538
539
  night: "på natten"
539
540
  }
540
- }, aa = (t, a) => Number(t) + ".", ra = {
541
- ordinalNumber: aa,
542
- era: Z({
543
- values: Ut,
541
+ }, lr = (e, t) => Number(e) + ".", ur = {
542
+ ordinalNumber: lr,
543
+ era: Se({
544
+ values: or,
544
545
  defaultWidth: "wide"
545
546
  }),
546
- quarter: Z({
547
- values: Qt,
547
+ quarter: Se({
548
+ values: sr,
548
549
  defaultWidth: "wide",
549
- argumentCallback: (t) => t - 1
550
+ argumentCallback: (e) => e - 1
550
551
  }),
551
- month: Z({
552
- values: Zt,
552
+ month: Se({
553
+ values: ar,
553
554
  defaultWidth: "wide"
554
555
  }),
555
- day: Z({
556
- values: ea,
556
+ day: Se({
557
+ values: ir,
557
558
  defaultWidth: "wide"
558
559
  }),
559
- dayPeriod: Z({
560
- values: ta,
560
+ dayPeriod: Se({
561
+ values: cr,
561
562
  defaultWidth: "wide"
562
563
  })
563
- }, na = /^(\d+)\.?/i, oa = /\d+/i, sa = {
564
+ }, dr = /^(\d+)\.?/i, fr = /\d+/i, mr = {
564
565
  narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
565
566
  abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
566
567
  wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
567
- }, ia = {
568
+ }, pr = {
568
569
  any: [/^f/i, /^e/i]
569
- }, la = {
570
+ }, hr = {
570
571
  narrow: /^[1234]/i,
571
572
  abbreviated: /^q[1234]/i,
572
573
  wide: /^[1234](\.)? kvartal/i
573
- }, ca = {
574
+ }, gr = {
574
575
  any: [/1/i, /2/i, /3/i, /4/i]
575
- }, da = {
576
+ }, br = {
576
577
  narrow: /^[jfmasond]/i,
577
578
  abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
578
579
  wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
579
- }, ua = {
580
+ }, vr = {
580
581
  narrow: [
581
582
  /^j/i,
582
583
  /^f/i,
@@ -605,17 +606,17 @@ const Yt = {
605
606
  /^n/i,
606
607
  /^d/i
607
608
  ]
608
- }, ma = {
609
+ }, yr = {
609
610
  narrow: /^[smtofl]/i,
610
611
  short: /^(sø|ma|ti|on|to|fr|lø)/i,
611
612
  abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
612
613
  wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
613
- }, fa = {
614
+ }, xr = {
614
615
  any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
615
- }, ha = {
616
+ }, Sr = {
616
617
  narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
617
618
  any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
618
- }, pa = {
619
+ }, _r = {
619
620
  any: {
620
621
  am: /^a(\.?\s?m\.?)?$/i,
621
622
  pm: /^p(\.?\s?m\.?)?$/i,
@@ -626,55 +627,55 @@ const Yt = {
626
627
  evening: /kveld/i,
627
628
  night: /natt/i
628
629
  }
629
- }, ba = {
630
- ordinalNumber: Vt({
631
- matchPattern: na,
632
- parsePattern: oa,
633
- valueCallback: (t) => parseInt(t, 10)
630
+ }, kr = {
631
+ ordinalNumber: Un({
632
+ matchPattern: dr,
633
+ parsePattern: fr,
634
+ valueCallback: (e) => parseInt(e, 10)
634
635
  }),
635
- era: ee({
636
- matchPatterns: sa,
636
+ era: _e({
637
+ matchPatterns: mr,
637
638
  defaultMatchWidth: "wide",
638
- parsePatterns: ia,
639
+ parsePatterns: pr,
639
640
  defaultParseWidth: "any"
640
641
  }),
641
- quarter: ee({
642
- matchPatterns: la,
642
+ quarter: _e({
643
+ matchPatterns: hr,
643
644
  defaultMatchWidth: "wide",
644
- parsePatterns: ca,
645
+ parsePatterns: gr,
645
646
  defaultParseWidth: "any",
646
- valueCallback: (t) => t + 1
647
+ valueCallback: (e) => e + 1
647
648
  }),
648
- month: ee({
649
- matchPatterns: da,
649
+ month: _e({
650
+ matchPatterns: br,
650
651
  defaultMatchWidth: "wide",
651
- parsePatterns: ua,
652
+ parsePatterns: vr,
652
653
  defaultParseWidth: "any"
653
654
  }),
654
- day: ee({
655
- matchPatterns: ma,
655
+ day: _e({
656
+ matchPatterns: yr,
656
657
  defaultMatchWidth: "wide",
657
- parsePatterns: fa,
658
+ parsePatterns: xr,
658
659
  defaultParseWidth: "any"
659
660
  }),
660
- dayPeriod: ee({
661
- matchPatterns: ha,
661
+ dayPeriod: _e({
662
+ matchPatterns: Sr,
662
663
  defaultMatchWidth: "any",
663
- parsePatterns: pa,
664
+ parsePatterns: _r,
664
665
  defaultParseWidth: "any"
665
666
  })
666
- }, V = {
667
+ }, he = {
667
668
  code: "nb",
668
- formatDistance: Ht,
669
- formatLong: Xt,
670
- formatRelative: Jt,
671
- localize: ra,
672
- match: ba,
669
+ formatDistance: Jn,
670
+ formatLong: tr,
671
+ formatRelative: rr,
672
+ localize: ur,
673
+ match: kr,
673
674
  options: {
674
675
  weekStartsOn: 1,
675
676
  firstWeekContainsDate: 4
676
677
  }
677
- }, Ne = ({ title: t, ...a }) => /* @__PURE__ */ s.jsxs(
678
+ }, St = ({ title: e, ...t }) => /* @__PURE__ */ k.jsxs(
678
679
  "svg",
679
680
  {
680
681
  xmlns: "http://www.w3.org/2000/svg",
@@ -682,12 +683,12 @@ const Yt = {
682
683
  height: "1em",
683
684
  viewBox: "0 0 28 28",
684
685
  fill: "none",
685
- "aria-hidden": t ? void 0 : !0,
686
+ "aria-hidden": e ? void 0 : !0,
686
687
  focusable: "false",
687
- ...a,
688
+ ...t,
688
689
  children: [
689
- t && /* @__PURE__ */ s.jsx("title", { children: t }),
690
- /* @__PURE__ */ s.jsx(
690
+ e && /* @__PURE__ */ k.jsx("title", { children: e }),
691
+ /* @__PURE__ */ k.jsx(
691
692
  "path",
692
693
  {
693
694
  fillRule: "evenodd",
@@ -699,8 +700,8 @@ const Yt = {
699
700
  ]
700
701
  }
701
702
  );
702
- Ne.displayName = "ChevronLeftIcon";
703
- const Re = ({ title: t, ...a }) => /* @__PURE__ */ s.jsxs(
703
+ St.displayName = "ChevronLeftIcon";
704
+ const _t = ({ title: e, ...t }) => /* @__PURE__ */ k.jsxs(
704
705
  "svg",
705
706
  {
706
707
  xmlns: "http://www.w3.org/2000/svg",
@@ -708,12 +709,12 @@ const Re = ({ title: t, ...a }) => /* @__PURE__ */ s.jsxs(
708
709
  height: "1em",
709
710
  viewBox: "0 0 28 28",
710
711
  fill: "none",
711
- "aria-hidden": t ? void 0 : !0,
712
+ "aria-hidden": e ? void 0 : !0,
712
713
  focusable: "false",
713
- ...a,
714
+ ...t,
714
715
  children: [
715
- t && /* @__PURE__ */ s.jsx("title", { children: t }),
716
- /* @__PURE__ */ s.jsx(
716
+ e && /* @__PURE__ */ k.jsx("title", { children: e }),
717
+ /* @__PURE__ */ k.jsx(
717
718
  "path",
718
719
  {
719
720
  fillRule: "evenodd",
@@ -725,360 +726,1706 @@ const Re = ({ title: t, ...a }) => /* @__PURE__ */ s.jsxs(
725
726
  ]
726
727
  }
727
728
  );
728
- Re.displayName = "ChevronRightIcon";
729
- const va = "_calendarContainer_10l5p_1", ga = "_calendarHeader_10l5p_14", ka = "_monthYear_10l5p_21", ya = "_navigationButtons_10l5p_32", _a = "_grid_10l5p_41", xa = "_dayNameCell_10l5p_48", Ca = "_dateCell_10l5p_65", Pa = "_dateNumberContainer_10l5p_90", wa = "_otherMonth_10l5p_103", Ea = "_selectedDate_10l5p_129", g = {
730
- calendarContainer: va,
731
- calendarHeader: ga,
732
- monthYear: ka,
733
- navigationButtons: ya,
734
- grid: _a,
735
- dayNameCell: xa,
736
- dateCell: Ca,
737
- dateNumberContainer: Pa,
738
- otherMonth: wa,
739
- selectedDate: Ea
740
- }, ja = (t) => {
741
- const a = F(t), r = Ee(a, { locale: V }), o = je(r, 41);
742
- return Rt({ start: r, end: o });
743
- }, ge = (t) => t && t.charAt(0).toUpperCase() + t.slice(1), Na = ({
744
- initialDate: t = /* @__PURE__ */ new Date(),
745
- selectedDate: a = null,
729
+ _t.displayName = "ChevronRightIcon";
730
+ const Er = "_calendarContainer_10l5p_1", Cr = "_calendarHeader_10l5p_14", wr = "_monthYear_10l5p_21", Pr = "_navigationButtons_10l5p_32", Tr = "_grid_10l5p_41", Nr = "_dayNameCell_10l5p_48", jr = "_dateCell_10l5p_65", Lr = "_dateNumberContainer_10l5p_90", Ir = "_otherMonth_10l5p_103", Mr = "_selectedDate_10l5p_129", Z = {
731
+ calendarContainer: Er,
732
+ calendarHeader: Cr,
733
+ monthYear: wr,
734
+ navigationButtons: Pr,
735
+ grid: Tr,
736
+ dayNameCell: Nr,
737
+ dateCell: jr,
738
+ dateNumberContainer: Lr,
739
+ otherMonth: Ir,
740
+ selectedDate: Mr
741
+ }, Dr = (e) => {
742
+ const t = pe(e), n = yt(t, { locale: he }), s = xt(n, 41);
743
+ return Dn({ start: n, end: s });
744
+ }, lt = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Ar = ({
745
+ initialDate: e = /* @__PURE__ */ new Date(),
746
+ selectedDate: t = null,
746
747
  // Prop for selected date
747
- onDateSelect: r,
748
- "data-color": o,
748
+ onDateSelect: n,
749
+ "data-color": s,
749
750
  // <-- Destructured
750
751
  "data-size": i
751
752
  // <-- Destructured
752
753
  }) => {
753
- const [c, d] = Ce(
754
- F(a && de(a) ? a : t)
754
+ const [a, r] = ge(
755
+ pe(t && Be(t) ? t : e)
755
756
  );
756
- Pe(() => {
757
- if (a && de(a)) {
758
- const l = F(a);
759
- he(l, c) || d(l);
757
+ ie(() => {
758
+ if (t && Be(t)) {
759
+ const d = pe(t);
760
+ st(d, a) || r(d);
760
761
  }
761
- }, [a]);
762
- const h = oe(() => F(/* @__PURE__ */ new Date()), []), b = oe(() => !1, [c, h]), k = oe(
763
- () => ja(c),
764
- [c]
765
- ), _ = oe(() => {
766
- const l = Ee(/* @__PURE__ */ new Date(), { locale: V });
767
- return Array.from({ length: 7 }).map((j, w) => {
768
- const N = J(je(l, w), "EEEEEE", { locale: V });
769
- return ge(N);
762
+ }, [t]);
763
+ const c = ke(() => pe(/* @__PURE__ */ new Date()), []), o = ke(() => !1, [a, c]), u = ke(
764
+ () => Dr(a),
765
+ [a]
766
+ ), v = ke(() => {
767
+ const d = yt(/* @__PURE__ */ new Date(), { locale: he });
768
+ return Array.from({ length: 7 }).map((x, E) => {
769
+ const N = ve(xt(d, E), "EEEEEE", { locale: he });
770
+ return lt(N);
770
771
  });
771
- }, []), x = Y(() => {
772
- b || d((l) => F(wt(l, 1)));
773
- }, [b]), A = Y(() => {
774
- d((l) => F(Et(l, 1)));
775
- }, []), p = Y(
776
- (l) => {
777
- r && r(l);
772
+ }, []), p = te(() => {
773
+ o || r((d) => pe(jn(d, 1)));
774
+ }, [o]), h = te(() => {
775
+ r((d) => pe(Ln(d, 1)));
776
+ }, []), y = te(
777
+ (d) => {
778
+ n && n(d);
778
779
  },
779
- [r]
780
- ), O = Y(
781
- (l, j) => {
782
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), p(j));
780
+ [n]
781
+ ), f = te(
782
+ (d, x) => {
783
+ (d.key === "Enter" || d.key === " ") && (d.preventDefault(), y(x));
783
784
  },
784
- [p]
785
- ), H = J(c, "MMMM", { locale: V }), C = J(c, "yyyy", { locale: V }), z = `${ge(H)} ${C}`;
786
- return /* @__PURE__ */ s.jsxs(
785
+ [y]
786
+ ), g = ve(a, "MMMM", { locale: he }), b = ve(a, "yyyy", { locale: he }), m = `${lt(g)} ${b}`;
787
+ return /* @__PURE__ */ k.jsxs(
787
788
  "div",
788
789
  {
789
- className: g.calendarContainer,
790
- "data-color": o,
790
+ className: Z.calendarContainer,
791
+ "data-color": s,
791
792
  "data-size": i,
792
793
  children: [
793
- /* @__PURE__ */ s.jsxs("div", { className: g.calendarHeader, children: [
794
- /* @__PURE__ */ s.jsx("span", { className: g.monthYear, children: z }),
795
- /* @__PURE__ */ s.jsxs("div", { className: g.navigationButtons, children: [
796
- /* @__PURE__ */ s.jsx(
797
- me,
794
+ /* @__PURE__ */ k.jsxs("div", { className: Z.calendarHeader, children: [
795
+ /* @__PURE__ */ k.jsx("span", { className: Z.monthYear, children: m }),
796
+ /* @__PURE__ */ k.jsxs("div", { className: Z.navigationButtons, children: [
797
+ /* @__PURE__ */ k.jsx(
798
+ we,
798
799
  {
799
800
  variant: "tertiary",
800
801
  icon: !0,
801
- onClick: x,
802
+ onClick: p,
802
803
  "aria-label": "Forrige måned",
803
- disabled: b,
804
- children: /* @__PURE__ */ s.jsx(Ne, {})
804
+ disabled: o,
805
+ children: /* @__PURE__ */ k.jsx(St, {})
805
806
  }
806
807
  ),
807
- /* @__PURE__ */ s.jsx(
808
- me,
808
+ /* @__PURE__ */ k.jsx(
809
+ we,
809
810
  {
810
811
  variant: "tertiary",
811
812
  icon: !0,
812
- onClick: A,
813
+ onClick: h,
813
814
  "aria-label": "Neste måned",
814
- children: /* @__PURE__ */ s.jsx(Re, {})
815
+ children: /* @__PURE__ */ k.jsx(_t, {})
815
816
  }
816
817
  )
817
818
  ] })
818
819
  ] }),
819
- /* @__PURE__ */ s.jsx("div", { className: g.grid, children: _.map((l) => /* @__PURE__ */ s.jsx("div", { className: g.dayNameCell, children: l }, l)) }),
820
- /* @__PURE__ */ s.jsx("div", { className: g.grid, children: k.map((l) => {
821
- const j = he(l, c), w = a && de(a) && jt(l, a), N = Nt(l), W = [
822
- g.dateCell,
823
- j ? "" : g.otherMonth,
824
- w ? g.selectedDate : "",
820
+ /* @__PURE__ */ k.jsx("div", { className: Z.grid, children: v.map((d) => /* @__PURE__ */ k.jsx("div", { className: Z.dayNameCell, children: d }, d)) }),
821
+ /* @__PURE__ */ k.jsx("div", { className: Z.grid, children: u.map((d) => {
822
+ const x = st(d, a), E = t && Be(t) && In(d, t), N = Mn(d), T = [
823
+ Z.dateCell,
824
+ x ? "" : Z.otherMonth,
825
+ E ? Z.selectedDate : "",
825
826
  // Highlighting based on prop
826
- N && !w ? g.todayDate : ""
827
+ N && !E ? Z.todayDate : ""
827
828
  ].filter(Boolean).join(" ");
828
- return /* @__PURE__ */ s.jsx(
829
+ return /* @__PURE__ */ k.jsx(
829
830
  "div",
830
831
  {
831
- className: W,
832
- onClick: () => p(l),
833
- onKeyDown: (S) => O(S, l),
832
+ className: T,
833
+ onClick: () => y(d),
834
+ onKeyDown: (C) => f(C, d),
834
835
  role: "button",
835
836
  tabIndex: 0,
836
- "aria-pressed": w ?? !1,
837
- "aria-label": J(l, "PPP", { locale: V }),
838
- children: /* @__PURE__ */ s.jsx("span", { className: g.dateNumberContainer, children: J(l, "d") })
837
+ "aria-pressed": E ?? !1,
838
+ "aria-label": ve(d, "PPP", { locale: he }),
839
+ children: /* @__PURE__ */ k.jsx("span", { className: Z.dateNumberContainer, children: ve(d, "d") })
839
840
  },
840
- l.toISOString()
841
+ d.toISOString()
841
842
  );
842
843
  }) })
843
844
  ]
844
845
  }
845
846
  );
846
847
  };
847
- Na.displayName = "DatePicker";
848
- const Ra = "_fieldset_16fx7_2", Ta = "_description_16fx7_14", Sa = "_error_16fx7_21", $a = "_inputWrapper_16fx7_30", Ma = "_inputWrapperError_16fx7_42", Da = "_suffixButton_16fx7_80", Aa = "_suffixButtonInteractive_16fx7_100", D = {
849
- fieldset: Ra,
850
- description: Ta,
851
- error: Sa,
852
- inputWrapper: $a,
853
- inputWrapperError: Ma,
854
- suffixButton: Da,
855
- suffixButtonInteractive: Aa
856
- }, ke = (t) => {
857
- const a = t.slice(0, 2), r = t.slice(2, 4), o = t.slice(4, 8);
858
- return t.length > 4 ? `${a}.${r}.${o}` : t.length > 2 ? `${a}.${r}` : t.length > 0 ? a : "";
859
- }, ye = (t) => (t || "").replace(/\D/g, ""), _e = (t) => {
860
- let a = t;
861
- if (a.length >= 2) {
862
- const r = parseInt(a.substring(0, 2), 10);
863
- !isNaN(r) && r > 31 && (a = "31" + a.substring(2));
864
- }
865
- if (a.length >= 4) {
866
- const r = parseInt(a.substring(2, 4), 10);
867
- !isNaN(r) && r > 12 && (a = a.substring(0, 2) + "12" + a.substring(4));
868
- }
869
- return a.slice(0, 8);
870
- }, Oa = T(
871
- (t, a) => {
848
+ Ar.displayName = "DatePicker";
849
+ const Rr = "_fieldset_16fx7_2", Or = "_description_16fx7_14", $r = "_error_16fx7_21", Fr = "_inputWrapper_16fx7_30", Br = "_inputWrapperError_16fx7_42", Vr = "_suffixButton_16fx7_80", Wr = "_suffixButtonInteractive_16fx7_100", de = {
850
+ fieldset: Rr,
851
+ description: Or,
852
+ error: $r,
853
+ inputWrapper: Fr,
854
+ inputWrapperError: Br,
855
+ suffixButton: Vr,
856
+ suffixButtonInteractive: Wr
857
+ }, ut = (e) => {
858
+ const t = e.slice(0, 2), n = e.slice(2, 4), s = e.slice(4, 8);
859
+ return e.length > 4 ? `${t}.${n}.${s}` : e.length > 2 ? `${t}.${n}` : e.length > 0 ? t : "";
860
+ }, dt = (e) => (e || "").replace(/\D/g, ""), ft = (e) => {
861
+ let t = e;
862
+ if (t.length >= 2) {
863
+ const n = parseInt(t.substring(0, 2), 10);
864
+ !isNaN(n) && n > 31 && (t = "31" + t.substring(2));
865
+ }
866
+ if (t.length >= 4) {
867
+ const n = parseInt(t.substring(2, 4), 10);
868
+ !isNaN(n) && n > 12 && (t = t.substring(0, 2) + "12" + t.substring(4));
869
+ }
870
+ return t.slice(0, 8);
871
+ }, zr = ce(
872
+ (e, t) => {
872
873
  const {
873
- label: r,
874
- suffixIcon: o,
874
+ label: n,
875
+ suffixIcon: s,
875
876
  onSuffixClick: i,
876
- className: c,
877
+ className: a,
877
878
  // For outer fieldset
878
- inputWrapperClassName: d,
879
+ inputWrapperClassName: r,
879
880
  // For input wrapper div
880
- inputClassName: h,
881
+ inputClassName: c,
881
882
  // For the actual input element
882
- value: b,
883
- defaultValue: k,
884
- onChange: _,
885
- readOnly: x,
886
- placeholder: A = "dd.mm.åååå",
887
- id: p,
888
- name: O,
889
- required: H,
890
- disabled: C,
891
- onClick: z,
892
- onFocus: l,
883
+ value: o,
884
+ defaultValue: u,
885
+ onChange: v,
886
+ readOnly: p,
887
+ placeholder: h = "dd.mm.åååå",
888
+ id: y,
889
+ name: f,
890
+ required: g,
891
+ disabled: b,
892
+ onClick: m,
893
+ onFocus: d,
893
894
  // Pass external onFocus
894
- onBlur: j,
895
+ onBlur: x,
895
896
  // Pass external onBlur
896
- autoComplete: w = "off",
897
+ autoComplete: E = "off",
897
898
  "aria-label": N,
898
- "aria-labelledby": W,
899
- description: S,
900
- error: $,
899
+ "aria-labelledby": T,
900
+ description: C,
901
+ error: w,
901
902
  // Use error prop for styling
902
- "data-color": G,
903
+ "data-color": j,
903
904
  // <-- Destructure
904
- "data-size": ie,
905
+ "data-size": $,
905
906
  // <-- Destructure
906
- ...le
907
- } = t, R = b !== void 0, y = Se(null);
908
- xe.useImperativeHandle(
909
- a,
910
- () => y.current
907
+ ...D
908
+ } = e, F = o !== void 0, V = We(null);
909
+ bt.useImperativeHandle(
910
+ t,
911
+ () => V.current
911
912
  );
912
- const L = Y(
913
- (v) => {
914
- const m = ye(v), P = _e(m);
915
- return ke(P);
913
+ const H = te(
914
+ (z) => {
915
+ const P = dt(z), A = ft(P);
916
+ return ut(A);
916
917
  },
917
918
  []
918
- ), [E, q] = Ce(
919
- () => L(b ?? k)
919
+ ), [W, X] = ge(
920
+ () => H(o ?? u)
920
921
  );
921
- Pe(() => {
922
- if (R) {
923
- const v = L(b);
924
- v !== E && (q(v), y.current && y.current.value !== v && (y.current.value = v));
922
+ ie(() => {
923
+ if (F) {
924
+ const z = H(o);
925
+ z !== W && (X(z), V.current && V.current.value !== z && (V.current.value = z));
925
926
  }
926
- }, [b, R, E, L]);
927
- const te = Y(
928
- (v) => {
929
- const m = v.target, P = m.value, X = E, ce = ye(P).slice(0, 8), fe = _e(ce), I = ke(fe);
930
- let M = 0;
931
- const K = fe.length;
932
- K <= 2 ? M = K : K <= 4 ? M = K + 1 : M = K + 2, M = Math.min(M, I.length), requestAnimationFrame(() => {
933
- if (y.current && (q(I), y.current.value = I, y.current.setSelectionRange(M, M), (I !== X || R) && _)) {
934
- const Te = {
935
- ...v,
936
- target: { ...m, value: I }
927
+ }, [o, F, W, H]);
928
+ const J = te(
929
+ (z) => {
930
+ const P = z.target, A = P.value, q = W, G = dt(A).slice(0, 8), R = ft(G), S = ut(R);
931
+ let L = 0;
932
+ const O = R.length;
933
+ O <= 2 ? L = O : O <= 4 ? L = O + 1 : L = O + 2, L = Math.min(L, S.length), requestAnimationFrame(() => {
934
+ if (V.current && (X(S), V.current.value = S, V.current.setSelectionRange(L, L), (S !== q || F) && v)) {
935
+ const Y = {
936
+ ...z,
937
+ target: { ...P, value: S }
937
938
  };
938
- _(Te, I);
939
+ v(Y, S);
939
940
  }
940
941
  });
941
942
  },
942
- [E, R, _, L]
943
- ), ae = [D.fieldset, c].filter(Boolean).join(" "), re = [
944
- D.inputWrapper,
945
- d,
946
- $ ? D.inputWrapperError : ""
947
- ].filter(Boolean).join(" "), ne = [
948
- h
949
- ].filter(Boolean).join(" "), e = [
950
- D.suffixButton,
951
- i ? D.suffixButtonInteractive : ""
943
+ [W, F, v, H]
944
+ ), K = [de.fieldset, a].filter(Boolean).join(" "), U = [
945
+ de.inputWrapper,
946
+ r,
947
+ w ? de.inputWrapperError : ""
948
+ ].filter(Boolean).join(" "), re = [
949
+ c
950
+ ].filter(Boolean).join(" "), l = [
951
+ de.suffixButton,
952
+ i ? de.suffixButtonInteractive : ""
952
953
  ].filter(Boolean).join(" ");
953
- !r && !N && !W && console.warn("Warning: DateInput component should have a label, aria-label, or aria-labelledby for accessibility.");
954
- const n = r && typeof r == "string" ? W || `${p}-label` : void 0, u = S ? `${p}-desc` : void 0, f = $ ? `${p}-err` : void 0, B = [u, f].filter(Boolean).join(" ") || void 0;
954
+ !n && !N && !T && console.warn("Warning: DateInput component should have a label, aria-label, or aria-labelledby for accessibility.");
955
+ const _ = n && typeof n == "string" ? T || `${y}-label` : void 0, I = C ? `${y}-desc` : void 0, M = w ? `${y}-err` : void 0, Q = [I, M].filter(Boolean).join(" ") || void 0;
955
956
  return (
956
957
  // --- Apply data-color and data-size to the outer wrapper ---
957
- /* @__PURE__ */ s.jsxs(
958
+ /* @__PURE__ */ k.jsxs(
958
959
  "div",
959
960
  {
960
- className: ae,
961
- "data-color": G,
962
- "data-size": ie,
961
+ className: K,
962
+ "data-color": j,
963
+ "data-size": $,
963
964
  children: [
964
- r && typeof r == "string" ? /* @__PURE__ */ s.jsx("label", { id: n, htmlFor: p, children: r }) : r,
965
- S && /* @__PURE__ */ s.jsx("p", { id: u, className: D.description, children: S }),
966
- /* @__PURE__ */ s.jsxs("div", { className: re, children: [
967
- /* @__PURE__ */ s.jsx(
965
+ n && typeof n == "string" ? /* @__PURE__ */ k.jsx("label", { id: _, htmlFor: y, children: n }) : n,
966
+ C && /* @__PURE__ */ k.jsx("p", { id: I, className: de.description, children: C }),
967
+ /* @__PURE__ */ k.jsxs("div", { className: U, children: [
968
+ /* @__PURE__ */ k.jsx(
968
969
  "input",
969
970
  {
970
- ref: y,
971
+ ref: V,
971
972
  type: "text",
972
973
  inputMode: "numeric",
973
974
  pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
974
975
  maxLength: 10,
975
- value: E,
976
- readOnly: x,
977
- placeholder: A,
978
- id: p,
979
- name: O,
980
- required: H,
981
- disabled: C,
982
- onClick: z,
983
- onChange: te,
984
- onFocus: l,
985
- onBlur: j,
986
- autoComplete: w,
976
+ value: W,
977
+ readOnly: p,
978
+ placeholder: h,
979
+ id: y,
980
+ name: f,
981
+ required: g,
982
+ disabled: b,
983
+ onClick: m,
984
+ onChange: J,
985
+ onFocus: d,
986
+ onBlur: x,
987
+ autoComplete: E,
987
988
  "aria-label": N,
988
- "aria-labelledby": n,
989
- "aria-describedby": B,
990
- "aria-invalid": !!$,
991
- className: ne,
992
- ...le
989
+ "aria-labelledby": _,
990
+ "aria-describedby": Q,
991
+ "aria-invalid": !!w,
992
+ className: re,
993
+ ...D
993
994
  }
994
995
  ),
995
- o && /* @__PURE__ */ s.jsx(
996
+ s && /* @__PURE__ */ k.jsx(
996
997
  "button",
997
998
  {
998
999
  type: "button",
999
- className: e,
1000
- onClick: C ? void 0 : i,
1001
- tabIndex: i && !C ? 0 : -1,
1000
+ className: l,
1001
+ onClick: b ? void 0 : i,
1002
+ tabIndex: i && !b ? 0 : -1,
1002
1003
  "aria-hidden": !i,
1003
- disabled: C,
1004
+ disabled: b,
1004
1005
  "aria-label": i ? "Åpne datovelger" : void 0,
1005
- children: o
1006
+ children: s
1006
1007
  }
1007
1008
  )
1008
1009
  ] }),
1009
- $ && /* @__PURE__ */ s.jsx("p", { id: f, className: D.error, role: "alert", children: $ })
1010
+ w && /* @__PURE__ */ k.jsx("p", { id: M, className: de.error, role: "alert", children: w })
1010
1011
  ]
1011
1012
  }
1012
1013
  )
1013
1014
  );
1014
1015
  }
1015
1016
  );
1016
- Oa.displayName = "DateInput";
1017
- const tr = ze, ar = Ge, rr = qe, nr = Xe, or = Ke, sr = Qe, Wa = Je, La = Ue;
1018
- Wa.displayName = "Field.Description";
1019
- La.displayName = "Field.Counter";
1020
- const ir = we, Ba = T((t, a) => /* @__PURE__ */ s.jsx(Ze, { ref: a, ...t }));
1021
- Ba.displayName = "Heading";
1022
- const lr = et, Ia = T((t, a) => /* @__PURE__ */ s.jsx(tt, { ref: a, ...t }));
1023
- Ia.displayName = "Label";
1024
- const cr = at, dr = rt, ur = nt, mr = ot, Fa = T(
1025
- (t, a) => /* @__PURE__ */ s.jsx(st, { ref: a, ...t })
1017
+ zr.displayName = "DateInput";
1018
+ function Hr(e) {
1019
+ return Object.prototype.toString.call(e) === "[object Object]";
1020
+ }
1021
+ function mt(e) {
1022
+ return Hr(e) || Array.isArray(e);
1023
+ }
1024
+ function Yr() {
1025
+ return !!(typeof window < "u" && window.document && window.document.createElement);
1026
+ }
1027
+ function Ye(e, t) {
1028
+ const n = Object.keys(e), s = Object.keys(t);
1029
+ if (n.length !== s.length) return !1;
1030
+ const i = JSON.stringify(Object.keys(e.breakpoints || {})), a = JSON.stringify(Object.keys(t.breakpoints || {}));
1031
+ return i !== a ? !1 : n.every((r) => {
1032
+ const c = e[r], o = t[r];
1033
+ return typeof c == "function" ? `${c}` == `${o}` : !mt(c) || !mt(o) ? c === o : Ye(c, o);
1034
+ });
1035
+ }
1036
+ function pt(e) {
1037
+ return e.concat().sort((t, n) => t.name > n.name ? 1 : -1).map((t) => t.options);
1038
+ }
1039
+ function Gr(e, t) {
1040
+ if (e.length !== t.length) return !1;
1041
+ const n = pt(e), s = pt(t);
1042
+ return n.every((i, a) => {
1043
+ const r = s[a];
1044
+ return Ye(i, r);
1045
+ });
1046
+ }
1047
+ function Ge(e) {
1048
+ return typeof e == "number";
1049
+ }
1050
+ function ze(e) {
1051
+ return typeof e == "string";
1052
+ }
1053
+ function De(e) {
1054
+ return typeof e == "boolean";
1055
+ }
1056
+ function ht(e) {
1057
+ return Object.prototype.toString.call(e) === "[object Object]";
1058
+ }
1059
+ function B(e) {
1060
+ return Math.abs(e);
1061
+ }
1062
+ function qe(e) {
1063
+ return Math.sign(e);
1064
+ }
1065
+ function Ce(e, t) {
1066
+ return B(e - t);
1067
+ }
1068
+ function qr(e, t) {
1069
+ if (e === 0 || t === 0 || B(e) <= B(t)) return 0;
1070
+ const n = Ce(B(e), B(t));
1071
+ return B(n / e);
1072
+ }
1073
+ function Kr(e) {
1074
+ return Math.round(e * 100) / 100;
1075
+ }
1076
+ function Pe(e) {
1077
+ return Te(e).map(Number);
1078
+ }
1079
+ function ne(e) {
1080
+ return e[je(e)];
1081
+ }
1082
+ function je(e) {
1083
+ return Math.max(0, e.length - 1);
1084
+ }
1085
+ function Ke(e, t) {
1086
+ return t === je(e);
1087
+ }
1088
+ function gt(e, t = 0) {
1089
+ return Array.from(Array(e), (n, s) => t + s);
1090
+ }
1091
+ function Te(e) {
1092
+ return Object.keys(e);
1093
+ }
1094
+ function kt(e, t) {
1095
+ return [e, t].reduce((n, s) => (Te(s).forEach((i) => {
1096
+ const a = n[i], r = s[i], c = ht(a) && ht(r);
1097
+ n[i] = c ? kt(a, r) : r;
1098
+ }), n), {});
1099
+ }
1100
+ function He(e, t) {
1101
+ return typeof t.MouseEvent < "u" && e instanceof t.MouseEvent;
1102
+ }
1103
+ function Ur(e, t) {
1104
+ const n = {
1105
+ start: s,
1106
+ center: i,
1107
+ end: a
1108
+ };
1109
+ function s() {
1110
+ return 0;
1111
+ }
1112
+ function i(o) {
1113
+ return a(o) / 2;
1114
+ }
1115
+ function a(o) {
1116
+ return t - o;
1117
+ }
1118
+ function r(o, u) {
1119
+ return ze(e) ? n[e](o) : e(t, o, u);
1120
+ }
1121
+ return {
1122
+ measure: r
1123
+ };
1124
+ }
1125
+ function Ne() {
1126
+ let e = [];
1127
+ function t(i, a, r, c = {
1128
+ passive: !0
1129
+ }) {
1130
+ let o;
1131
+ if ("addEventListener" in i)
1132
+ i.addEventListener(a, r, c), o = () => i.removeEventListener(a, r, c);
1133
+ else {
1134
+ const u = i;
1135
+ u.addListener(r), o = () => u.removeListener(r);
1136
+ }
1137
+ return e.push(o), s;
1138
+ }
1139
+ function n() {
1140
+ e = e.filter((i) => i());
1141
+ }
1142
+ const s = {
1143
+ add: t,
1144
+ clear: n
1145
+ };
1146
+ return s;
1147
+ }
1148
+ function Xr(e, t, n, s) {
1149
+ const i = Ne(), a = 1e3 / 60;
1150
+ let r = null, c = 0, o = 0;
1151
+ function u() {
1152
+ i.add(e, "visibilitychange", () => {
1153
+ e.hidden && f();
1154
+ });
1155
+ }
1156
+ function v() {
1157
+ y(), i.clear();
1158
+ }
1159
+ function p(b) {
1160
+ if (!o) return;
1161
+ r || (r = b, n(), n());
1162
+ const m = b - r;
1163
+ for (r = b, c += m; c >= a; )
1164
+ n(), c -= a;
1165
+ const d = c / a;
1166
+ s(d), o && (o = t.requestAnimationFrame(p));
1167
+ }
1168
+ function h() {
1169
+ o || (o = t.requestAnimationFrame(p));
1170
+ }
1171
+ function y() {
1172
+ t.cancelAnimationFrame(o), r = null, c = 0, o = 0;
1173
+ }
1174
+ function f() {
1175
+ r = null, c = 0;
1176
+ }
1177
+ return {
1178
+ init: u,
1179
+ destroy: v,
1180
+ start: h,
1181
+ stop: y,
1182
+ update: n,
1183
+ render: s
1184
+ };
1185
+ }
1186
+ function Jr(e, t) {
1187
+ const n = t === "rtl", s = e === "y", i = s ? "y" : "x", a = s ? "x" : "y", r = !s && n ? -1 : 1, c = v(), o = p();
1188
+ function u(f) {
1189
+ const {
1190
+ height: g,
1191
+ width: b
1192
+ } = f;
1193
+ return s ? g : b;
1194
+ }
1195
+ function v() {
1196
+ return s ? "top" : n ? "right" : "left";
1197
+ }
1198
+ function p() {
1199
+ return s ? "bottom" : n ? "left" : "right";
1200
+ }
1201
+ function h(f) {
1202
+ return f * r;
1203
+ }
1204
+ return {
1205
+ scroll: i,
1206
+ cross: a,
1207
+ startEdge: c,
1208
+ endEdge: o,
1209
+ measureSize: u,
1210
+ direction: h
1211
+ };
1212
+ }
1213
+ function fe(e = 0, t = 0) {
1214
+ const n = B(e - t);
1215
+ function s(u) {
1216
+ return u < e;
1217
+ }
1218
+ function i(u) {
1219
+ return u > t;
1220
+ }
1221
+ function a(u) {
1222
+ return s(u) || i(u);
1223
+ }
1224
+ function r(u) {
1225
+ return a(u) ? s(u) ? e : t : u;
1226
+ }
1227
+ function c(u) {
1228
+ return n ? u - n * Math.ceil((u - t) / n) : u;
1229
+ }
1230
+ return {
1231
+ length: n,
1232
+ max: t,
1233
+ min: e,
1234
+ constrain: r,
1235
+ reachedAny: a,
1236
+ reachedMax: i,
1237
+ reachedMin: s,
1238
+ removeOffset: c
1239
+ };
1240
+ }
1241
+ function Et(e, t, n) {
1242
+ const {
1243
+ constrain: s
1244
+ } = fe(0, e), i = e + 1;
1245
+ let a = r(t);
1246
+ function r(h) {
1247
+ return n ? B((i + h) % i) : s(h);
1248
+ }
1249
+ function c() {
1250
+ return a;
1251
+ }
1252
+ function o(h) {
1253
+ return a = r(h), p;
1254
+ }
1255
+ function u(h) {
1256
+ return v().set(c() + h);
1257
+ }
1258
+ function v() {
1259
+ return Et(e, c(), n);
1260
+ }
1261
+ const p = {
1262
+ get: c,
1263
+ set: o,
1264
+ add: u,
1265
+ clone: v
1266
+ };
1267
+ return p;
1268
+ }
1269
+ function Qr(e, t, n, s, i, a, r, c, o, u, v, p, h, y, f, g, b, m, d) {
1270
+ const {
1271
+ cross: x,
1272
+ direction: E
1273
+ } = e, N = ["INPUT", "SELECT", "TEXTAREA"], T = {
1274
+ passive: !1
1275
+ }, C = Ne(), w = Ne(), j = fe(50, 225).constrain(y.measure(20)), $ = {
1276
+ mouse: 300,
1277
+ touch: 400
1278
+ }, D = {
1279
+ mouse: 500,
1280
+ touch: 600
1281
+ }, F = f ? 43 : 25;
1282
+ let V = !1, H = 0, W = 0, X = !1, J = !1, K = !1, U = !1;
1283
+ function re(S) {
1284
+ if (!d) return;
1285
+ function L(Y) {
1286
+ (De(d) || d(S, Y)) && z(Y);
1287
+ }
1288
+ const O = t;
1289
+ C.add(O, "dragstart", (Y) => Y.preventDefault(), T).add(O, "touchmove", () => {
1290
+ }, T).add(O, "touchend", () => {
1291
+ }).add(O, "touchstart", L).add(O, "mousedown", L).add(O, "touchcancel", A).add(O, "contextmenu", A).add(O, "click", q, !0);
1292
+ }
1293
+ function l() {
1294
+ C.clear(), w.clear();
1295
+ }
1296
+ function _() {
1297
+ const S = U ? n : t;
1298
+ w.add(S, "touchmove", P, T).add(S, "touchend", A).add(S, "mousemove", P, T).add(S, "mouseup", A);
1299
+ }
1300
+ function I(S) {
1301
+ const L = S.nodeName || "";
1302
+ return N.includes(L);
1303
+ }
1304
+ function M() {
1305
+ return (f ? D : $)[U ? "mouse" : "touch"];
1306
+ }
1307
+ function Q(S, L) {
1308
+ const O = p.add(qe(S) * -1), Y = v.byDistance(S, !f).distance;
1309
+ return f || B(S) < j ? Y : b && L ? Y * 0.5 : v.byIndex(O.get(), 0).distance;
1310
+ }
1311
+ function z(S) {
1312
+ const L = He(S, s);
1313
+ U = L, K = f && L && !S.buttons && V, V = Ce(i.get(), r.get()) >= 2, !(L && S.button !== 0) && (I(S.target) || (X = !0, a.pointerDown(S), u.useFriction(0).useDuration(0), i.set(r), _(), H = a.readPoint(S), W = a.readPoint(S, x), h.emit("pointerDown")));
1314
+ }
1315
+ function P(S) {
1316
+ if (!He(S, s) && S.touches.length >= 2) return A(S);
1317
+ const O = a.readPoint(S), Y = a.readPoint(S, x), oe = Ce(O, H), se = Ce(Y, W);
1318
+ if (!J && !U && (!S.cancelable || (J = oe > se, !J)))
1319
+ return A(S);
1320
+ const le = a.pointerMove(S);
1321
+ oe > g && (K = !0), u.useFriction(0.3).useDuration(0.75), c.start(), i.add(E(le)), S.preventDefault();
1322
+ }
1323
+ function A(S) {
1324
+ const O = v.byDistance(0, !1).index !== p.get(), Y = a.pointerUp(S) * M(), oe = Q(E(Y), O), se = qr(Y, oe), le = F - 10 * se, ae = m + se / 50;
1325
+ J = !1, X = !1, w.clear(), u.useDuration(le).useFriction(ae), o.distance(oe, !f), U = !1, h.emit("pointerUp");
1326
+ }
1327
+ function q(S) {
1328
+ K && (S.stopPropagation(), S.preventDefault(), K = !1);
1329
+ }
1330
+ function G() {
1331
+ return X;
1332
+ }
1333
+ return {
1334
+ init: re,
1335
+ destroy: l,
1336
+ pointerDown: G
1337
+ };
1338
+ }
1339
+ function Zr(e, t) {
1340
+ let s, i;
1341
+ function a(p) {
1342
+ return p.timeStamp;
1343
+ }
1344
+ function r(p, h) {
1345
+ const f = `client${(h || e.scroll) === "x" ? "X" : "Y"}`;
1346
+ return (He(p, t) ? p : p.touches[0])[f];
1347
+ }
1348
+ function c(p) {
1349
+ return s = p, i = p, r(p);
1350
+ }
1351
+ function o(p) {
1352
+ const h = r(p) - r(i), y = a(p) - a(s) > 170;
1353
+ return i = p, y && (s = p), h;
1354
+ }
1355
+ function u(p) {
1356
+ if (!s || !i) return 0;
1357
+ const h = r(i) - r(s), y = a(p) - a(s), f = a(p) - a(i) > 170, g = h / y;
1358
+ return y && !f && B(g) > 0.1 ? g : 0;
1359
+ }
1360
+ return {
1361
+ pointerDown: c,
1362
+ pointerMove: o,
1363
+ pointerUp: u,
1364
+ readPoint: r
1365
+ };
1366
+ }
1367
+ function eo() {
1368
+ function e(n) {
1369
+ const {
1370
+ offsetTop: s,
1371
+ offsetLeft: i,
1372
+ offsetWidth: a,
1373
+ offsetHeight: r
1374
+ } = n;
1375
+ return {
1376
+ top: s,
1377
+ right: i + a,
1378
+ bottom: s + r,
1379
+ left: i,
1380
+ width: a,
1381
+ height: r
1382
+ };
1383
+ }
1384
+ return {
1385
+ measure: e
1386
+ };
1387
+ }
1388
+ function to(e) {
1389
+ function t(s) {
1390
+ return e * (s / 100);
1391
+ }
1392
+ return {
1393
+ measure: t
1394
+ };
1395
+ }
1396
+ function no(e, t, n, s, i, a, r) {
1397
+ const c = [e].concat(s);
1398
+ let o, u, v = [], p = !1;
1399
+ function h(b) {
1400
+ return i.measureSize(r.measure(b));
1401
+ }
1402
+ function y(b) {
1403
+ if (!a) return;
1404
+ u = h(e), v = s.map(h);
1405
+ function m(d) {
1406
+ for (const x of d) {
1407
+ if (p) return;
1408
+ const E = x.target === e, N = s.indexOf(x.target), T = E ? u : v[N], C = h(E ? e : s[N]);
1409
+ if (B(C - T) >= 0.5) {
1410
+ b.reInit(), t.emit("resize");
1411
+ break;
1412
+ }
1413
+ }
1414
+ }
1415
+ o = new ResizeObserver((d) => {
1416
+ (De(a) || a(b, d)) && m(d);
1417
+ }), n.requestAnimationFrame(() => {
1418
+ c.forEach((d) => o.observe(d));
1419
+ });
1420
+ }
1421
+ function f() {
1422
+ p = !0, o && o.disconnect();
1423
+ }
1424
+ return {
1425
+ init: y,
1426
+ destroy: f
1427
+ };
1428
+ }
1429
+ function ro(e, t, n, s, i, a) {
1430
+ let r = 0, c = 0, o = i, u = a, v = e.get(), p = 0;
1431
+ function h() {
1432
+ const T = s.get() - e.get(), C = !o;
1433
+ let w = 0;
1434
+ return C ? (r = 0, n.set(s), e.set(s), w = T) : (n.set(e), r += T / o, r *= u, v += r, e.add(r), w = v - p), c = qe(w), p = v, N;
1435
+ }
1436
+ function y() {
1437
+ const T = s.get() - t.get();
1438
+ return B(T) < 1e-3;
1439
+ }
1440
+ function f() {
1441
+ return o;
1442
+ }
1443
+ function g() {
1444
+ return c;
1445
+ }
1446
+ function b() {
1447
+ return r;
1448
+ }
1449
+ function m() {
1450
+ return x(i);
1451
+ }
1452
+ function d() {
1453
+ return E(a);
1454
+ }
1455
+ function x(T) {
1456
+ return o = T, N;
1457
+ }
1458
+ function E(T) {
1459
+ return u = T, N;
1460
+ }
1461
+ const N = {
1462
+ direction: g,
1463
+ duration: f,
1464
+ velocity: b,
1465
+ seek: h,
1466
+ settled: y,
1467
+ useBaseFriction: d,
1468
+ useBaseDuration: m,
1469
+ useFriction: E,
1470
+ useDuration: x
1471
+ };
1472
+ return N;
1473
+ }
1474
+ function oo(e, t, n, s, i) {
1475
+ const a = i.measure(10), r = i.measure(50), c = fe(0.1, 0.99);
1476
+ let o = !1;
1477
+ function u() {
1478
+ return !(o || !e.reachedAny(n.get()) || !e.reachedAny(t.get()));
1479
+ }
1480
+ function v(y) {
1481
+ if (!u()) return;
1482
+ const f = e.reachedMin(t.get()) ? "min" : "max", g = B(e[f] - t.get()), b = n.get() - t.get(), m = c.constrain(g / r);
1483
+ n.subtract(b * m), !y && B(b) < a && (n.set(e.constrain(n.get())), s.useDuration(25).useBaseFriction());
1484
+ }
1485
+ function p(y) {
1486
+ o = !y;
1487
+ }
1488
+ return {
1489
+ shouldConstrain: u,
1490
+ constrain: v,
1491
+ toggleActive: p
1492
+ };
1493
+ }
1494
+ function so(e, t, n, s, i) {
1495
+ const a = fe(-t + e, 0), r = p(), c = v(), o = h();
1496
+ function u(f, g) {
1497
+ return Ce(f, g) <= 1;
1498
+ }
1499
+ function v() {
1500
+ const f = r[0], g = ne(r), b = r.lastIndexOf(f), m = r.indexOf(g) + 1;
1501
+ return fe(b, m);
1502
+ }
1503
+ function p() {
1504
+ return n.map((f, g) => {
1505
+ const {
1506
+ min: b,
1507
+ max: m
1508
+ } = a, d = a.constrain(f), x = !g, E = Ke(n, g);
1509
+ return x ? m : E || u(b, d) ? b : u(m, d) ? m : d;
1510
+ }).map((f) => parseFloat(f.toFixed(3)));
1511
+ }
1512
+ function h() {
1513
+ if (t <= e + i) return [a.max];
1514
+ if (s === "keepSnaps") return r;
1515
+ const {
1516
+ min: f,
1517
+ max: g
1518
+ } = c;
1519
+ return r.slice(f, g);
1520
+ }
1521
+ return {
1522
+ snapsContained: o,
1523
+ scrollContainLimit: c
1524
+ };
1525
+ }
1526
+ function ao(e, t, n) {
1527
+ const s = t[0], i = n ? s - e : ne(t);
1528
+ return {
1529
+ limit: fe(i, s)
1530
+ };
1531
+ }
1532
+ function io(e, t, n, s) {
1533
+ const a = t.min + 0.1, r = t.max + 0.1, {
1534
+ reachedMin: c,
1535
+ reachedMax: o
1536
+ } = fe(a, r);
1537
+ function u(h) {
1538
+ return h === 1 ? o(n.get()) : h === -1 ? c(n.get()) : !1;
1539
+ }
1540
+ function v(h) {
1541
+ if (!u(h)) return;
1542
+ const y = e * (h * -1);
1543
+ s.forEach((f) => f.add(y));
1544
+ }
1545
+ return {
1546
+ loop: v
1547
+ };
1548
+ }
1549
+ function co(e) {
1550
+ const {
1551
+ max: t,
1552
+ length: n
1553
+ } = e;
1554
+ function s(a) {
1555
+ const r = a - t;
1556
+ return n ? r / -n : 0;
1557
+ }
1558
+ return {
1559
+ get: s
1560
+ };
1561
+ }
1562
+ function lo(e, t, n, s, i) {
1563
+ const {
1564
+ startEdge: a,
1565
+ endEdge: r
1566
+ } = e, {
1567
+ groupSlides: c
1568
+ } = i, o = p().map(t.measure), u = h(), v = y();
1569
+ function p() {
1570
+ return c(s).map((g) => ne(g)[r] - g[0][a]).map(B);
1571
+ }
1572
+ function h() {
1573
+ return s.map((g) => n[a] - g[a]).map((g) => -B(g));
1574
+ }
1575
+ function y() {
1576
+ return c(u).map((g) => g[0]).map((g, b) => g + o[b]);
1577
+ }
1578
+ return {
1579
+ snaps: u,
1580
+ snapsAligned: v
1581
+ };
1582
+ }
1583
+ function uo(e, t, n, s, i, a) {
1584
+ const {
1585
+ groupSlides: r
1586
+ } = i, {
1587
+ min: c,
1588
+ max: o
1589
+ } = s, u = v();
1590
+ function v() {
1591
+ const h = r(a), y = !e || t === "keepSnaps";
1592
+ return n.length === 1 ? [a] : y ? h : h.slice(c, o).map((f, g, b) => {
1593
+ const m = !g, d = Ke(b, g);
1594
+ if (m) {
1595
+ const x = ne(b[0]) + 1;
1596
+ return gt(x);
1597
+ }
1598
+ if (d) {
1599
+ const x = je(a) - ne(b)[0] + 1;
1600
+ return gt(x, ne(b)[0]);
1601
+ }
1602
+ return f;
1603
+ });
1604
+ }
1605
+ return {
1606
+ slideRegistry: u
1607
+ };
1608
+ }
1609
+ function fo(e, t, n, s, i) {
1610
+ const {
1611
+ reachedAny: a,
1612
+ removeOffset: r,
1613
+ constrain: c
1614
+ } = s;
1615
+ function o(f) {
1616
+ return f.concat().sort((g, b) => B(g) - B(b))[0];
1617
+ }
1618
+ function u(f) {
1619
+ const g = e ? r(f) : c(f), b = t.map((d, x) => ({
1620
+ diff: v(d - g, 0),
1621
+ index: x
1622
+ })).sort((d, x) => B(d.diff) - B(x.diff)), {
1623
+ index: m
1624
+ } = b[0];
1625
+ return {
1626
+ index: m,
1627
+ distance: g
1628
+ };
1629
+ }
1630
+ function v(f, g) {
1631
+ const b = [f, f + n, f - n];
1632
+ if (!e) return f;
1633
+ if (!g) return o(b);
1634
+ const m = b.filter((d) => qe(d) === g);
1635
+ return m.length ? o(m) : ne(b) - n;
1636
+ }
1637
+ function p(f, g) {
1638
+ const b = t[f] - i.get(), m = v(b, g);
1639
+ return {
1640
+ index: f,
1641
+ distance: m
1642
+ };
1643
+ }
1644
+ function h(f, g) {
1645
+ const b = i.get() + f, {
1646
+ index: m,
1647
+ distance: d
1648
+ } = u(b), x = !e && a(b);
1649
+ if (!g || x) return {
1650
+ index: m,
1651
+ distance: f
1652
+ };
1653
+ const E = t[m] - d, N = f + v(E, 0);
1654
+ return {
1655
+ index: m,
1656
+ distance: N
1657
+ };
1658
+ }
1659
+ return {
1660
+ byDistance: h,
1661
+ byIndex: p,
1662
+ shortcut: v
1663
+ };
1664
+ }
1665
+ function mo(e, t, n, s, i, a, r) {
1666
+ function c(p) {
1667
+ const h = p.distance, y = p.index !== t.get();
1668
+ a.add(h), h && (s.duration() ? e.start() : (e.update(), e.render(1), e.update())), y && (n.set(t.get()), t.set(p.index), r.emit("select"));
1669
+ }
1670
+ function o(p, h) {
1671
+ const y = i.byDistance(p, h);
1672
+ c(y);
1673
+ }
1674
+ function u(p, h) {
1675
+ const y = t.clone().set(p), f = i.byIndex(y.get(), h);
1676
+ c(f);
1677
+ }
1678
+ return {
1679
+ distance: o,
1680
+ index: u
1681
+ };
1682
+ }
1683
+ function po(e, t, n, s, i, a, r, c) {
1684
+ const o = {
1685
+ passive: !0,
1686
+ capture: !0
1687
+ };
1688
+ let u = 0;
1689
+ function v(y) {
1690
+ if (!c) return;
1691
+ function f(g) {
1692
+ if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
1693
+ r.emit("slideFocusStart"), e.scrollLeft = 0;
1694
+ const d = n.findIndex((x) => x.includes(g));
1695
+ Ge(d) && (i.useDuration(0), s.index(d, 0), r.emit("slideFocus"));
1696
+ }
1697
+ a.add(document, "keydown", p, !1), t.forEach((g, b) => {
1698
+ a.add(g, "focus", (m) => {
1699
+ (De(c) || c(y, m)) && f(b);
1700
+ }, o);
1701
+ });
1702
+ }
1703
+ function p(y) {
1704
+ y.code === "Tab" && (u = (/* @__PURE__ */ new Date()).getTime());
1705
+ }
1706
+ return {
1707
+ init: v
1708
+ };
1709
+ }
1710
+ function Ee(e) {
1711
+ let t = e;
1712
+ function n() {
1713
+ return t;
1714
+ }
1715
+ function s(o) {
1716
+ t = r(o);
1717
+ }
1718
+ function i(o) {
1719
+ t += r(o);
1720
+ }
1721
+ function a(o) {
1722
+ t -= r(o);
1723
+ }
1724
+ function r(o) {
1725
+ return Ge(o) ? o : o.get();
1726
+ }
1727
+ return {
1728
+ get: n,
1729
+ set: s,
1730
+ add: i,
1731
+ subtract: a
1732
+ };
1733
+ }
1734
+ function Ct(e, t) {
1735
+ const n = e.scroll === "x" ? r : c, s = t.style;
1736
+ let i = null, a = !1;
1737
+ function r(h) {
1738
+ return `translate3d(${h}px,0px,0px)`;
1739
+ }
1740
+ function c(h) {
1741
+ return `translate3d(0px,${h}px,0px)`;
1742
+ }
1743
+ function o(h) {
1744
+ if (a) return;
1745
+ const y = Kr(e.direction(h));
1746
+ y !== i && (s.transform = n(y), i = y);
1747
+ }
1748
+ function u(h) {
1749
+ a = !h;
1750
+ }
1751
+ function v() {
1752
+ a || (s.transform = "", t.getAttribute("style") || t.removeAttribute("style"));
1753
+ }
1754
+ return {
1755
+ clear: v,
1756
+ to: o,
1757
+ toggleActive: u
1758
+ };
1759
+ }
1760
+ function ho(e, t, n, s, i, a, r, c, o) {
1761
+ const v = Pe(i), p = Pe(i).reverse(), h = m().concat(d());
1762
+ function y(C, w) {
1763
+ return C.reduce((j, $) => j - i[$], w);
1764
+ }
1765
+ function f(C, w) {
1766
+ return C.reduce((j, $) => y(j, w) > 0 ? j.concat([$]) : j, []);
1767
+ }
1768
+ function g(C) {
1769
+ return a.map((w, j) => ({
1770
+ start: w - s[j] + 0.5 + C,
1771
+ end: w + t - 0.5 + C
1772
+ }));
1773
+ }
1774
+ function b(C, w, j) {
1775
+ const $ = g(w);
1776
+ return C.map((D) => {
1777
+ const F = j ? 0 : -n, V = j ? n : 0, H = j ? "end" : "start", W = $[D][H];
1778
+ return {
1779
+ index: D,
1780
+ loopPoint: W,
1781
+ slideLocation: Ee(-1),
1782
+ translate: Ct(e, o[D]),
1783
+ target: () => c.get() > W ? F : V
1784
+ };
1785
+ });
1786
+ }
1787
+ function m() {
1788
+ const C = r[0], w = f(p, C);
1789
+ return b(w, n, !1);
1790
+ }
1791
+ function d() {
1792
+ const C = t - r[0] - 1, w = f(v, C);
1793
+ return b(w, -n, !0);
1794
+ }
1795
+ function x() {
1796
+ return h.every(({
1797
+ index: C
1798
+ }) => {
1799
+ const w = v.filter((j) => j !== C);
1800
+ return y(w, t) <= 0.1;
1801
+ });
1802
+ }
1803
+ function E() {
1804
+ h.forEach((C) => {
1805
+ const {
1806
+ target: w,
1807
+ translate: j,
1808
+ slideLocation: $
1809
+ } = C, D = w();
1810
+ D !== $.get() && (j.to(D), $.set(D));
1811
+ });
1812
+ }
1813
+ function N() {
1814
+ h.forEach((C) => C.translate.clear());
1815
+ }
1816
+ return {
1817
+ canLoop: x,
1818
+ clear: N,
1819
+ loop: E,
1820
+ loopPoints: h
1821
+ };
1822
+ }
1823
+ function go(e, t, n) {
1824
+ let s, i = !1;
1825
+ function a(o) {
1826
+ if (!n) return;
1827
+ function u(v) {
1828
+ for (const p of v)
1829
+ if (p.type === "childList") {
1830
+ o.reInit(), t.emit("slidesChanged");
1831
+ break;
1832
+ }
1833
+ }
1834
+ s = new MutationObserver((v) => {
1835
+ i || (De(n) || n(o, v)) && u(v);
1836
+ }), s.observe(e, {
1837
+ childList: !0
1838
+ });
1839
+ }
1840
+ function r() {
1841
+ s && s.disconnect(), i = !0;
1842
+ }
1843
+ return {
1844
+ init: a,
1845
+ destroy: r
1846
+ };
1847
+ }
1848
+ function bo(e, t, n, s) {
1849
+ const i = {};
1850
+ let a = null, r = null, c, o = !1;
1851
+ function u() {
1852
+ c = new IntersectionObserver((f) => {
1853
+ o || (f.forEach((g) => {
1854
+ const b = t.indexOf(g.target);
1855
+ i[b] = g;
1856
+ }), a = null, r = null, n.emit("slidesInView"));
1857
+ }, {
1858
+ root: e.parentElement,
1859
+ threshold: s
1860
+ }), t.forEach((f) => c.observe(f));
1861
+ }
1862
+ function v() {
1863
+ c && c.disconnect(), o = !0;
1864
+ }
1865
+ function p(f) {
1866
+ return Te(i).reduce((g, b) => {
1867
+ const m = parseInt(b), {
1868
+ isIntersecting: d
1869
+ } = i[m];
1870
+ return (f && d || !f && !d) && g.push(m), g;
1871
+ }, []);
1872
+ }
1873
+ function h(f = !0) {
1874
+ if (f && a) return a;
1875
+ if (!f && r) return r;
1876
+ const g = p(f);
1877
+ return f && (a = g), f || (r = g), g;
1878
+ }
1879
+ return {
1880
+ init: u,
1881
+ destroy: v,
1882
+ get: h
1883
+ };
1884
+ }
1885
+ function vo(e, t, n, s, i, a) {
1886
+ const {
1887
+ measureSize: r,
1888
+ startEdge: c,
1889
+ endEdge: o
1890
+ } = e, u = n[0] && i, v = f(), p = g(), h = n.map(r), y = b();
1891
+ function f() {
1892
+ if (!u) return 0;
1893
+ const d = n[0];
1894
+ return B(t[c] - d[c]);
1895
+ }
1896
+ function g() {
1897
+ if (!u) return 0;
1898
+ const d = a.getComputedStyle(ne(s));
1899
+ return parseFloat(d.getPropertyValue(`margin-${o}`));
1900
+ }
1901
+ function b() {
1902
+ return n.map((d, x, E) => {
1903
+ const N = !x, T = Ke(E, x);
1904
+ return N ? h[x] + v : T ? h[x] + p : E[x + 1][c] - d[c];
1905
+ }).map(B);
1906
+ }
1907
+ return {
1908
+ slideSizes: h,
1909
+ slideSizesWithGaps: y,
1910
+ startGap: v,
1911
+ endGap: p
1912
+ };
1913
+ }
1914
+ function yo(e, t, n, s, i, a, r, c, o) {
1915
+ const {
1916
+ startEdge: u,
1917
+ endEdge: v,
1918
+ direction: p
1919
+ } = e, h = Ge(n);
1920
+ function y(m, d) {
1921
+ return Pe(m).filter((x) => x % d === 0).map((x) => m.slice(x, x + d));
1922
+ }
1923
+ function f(m) {
1924
+ return m.length ? Pe(m).reduce((d, x, E) => {
1925
+ const N = ne(d) || 0, T = N === 0, C = x === je(m), w = i[u] - a[N][u], j = i[u] - a[x][v], $ = !s && T ? p(r) : 0, D = !s && C ? p(c) : 0, F = B(j - D - (w + $));
1926
+ return E && F > t + o && d.push(x), C && d.push(m.length), d;
1927
+ }, []).map((d, x, E) => {
1928
+ const N = Math.max(E[x - 1] || 0);
1929
+ return m.slice(N, d);
1930
+ }) : [];
1931
+ }
1932
+ function g(m) {
1933
+ return h ? y(m, n) : f(m);
1934
+ }
1935
+ return {
1936
+ groupSlides: g
1937
+ };
1938
+ }
1939
+ function xo(e, t, n, s, i, a, r) {
1940
+ const {
1941
+ align: c,
1942
+ axis: o,
1943
+ direction: u,
1944
+ startIndex: v,
1945
+ loop: p,
1946
+ duration: h,
1947
+ dragFree: y,
1948
+ dragThreshold: f,
1949
+ inViewThreshold: g,
1950
+ slidesToScroll: b,
1951
+ skipSnaps: m,
1952
+ containScroll: d,
1953
+ watchResize: x,
1954
+ watchSlides: E,
1955
+ watchDrag: N,
1956
+ watchFocus: T
1957
+ } = a, C = 2, w = eo(), j = w.measure(t), $ = n.map(w.measure), D = Jr(o, u), F = D.measureSize(j), V = to(F), H = Ur(c, F), W = !p && !!d, X = p || !!d, {
1958
+ slideSizes: J,
1959
+ slideSizesWithGaps: K,
1960
+ startGap: U,
1961
+ endGap: re
1962
+ } = vo(D, j, $, n, X, i), l = yo(D, F, b, p, j, $, U, re, C), {
1963
+ snaps: _,
1964
+ snapsAligned: I
1965
+ } = lo(D, H, j, $, l), M = -ne(_) + ne(K), {
1966
+ snapsContained: Q,
1967
+ scrollContainLimit: z
1968
+ } = so(F, M, I, d, C), P = W ? Q : I, {
1969
+ limit: A
1970
+ } = ao(M, P, p), q = Et(je(P), v, p), G = q.clone(), R = Pe(n), S = ({
1971
+ dragHandler: me,
1972
+ scrollBody: $e,
1973
+ scrollBounds: Fe,
1974
+ options: {
1975
+ loop: Le
1976
+ }
1977
+ }) => {
1978
+ Le || Fe.constrain(me.pointerDown()), $e.seek();
1979
+ }, L = ({
1980
+ scrollBody: me,
1981
+ translate: $e,
1982
+ location: Fe,
1983
+ offsetLocation: Le,
1984
+ previousLocation: Tt,
1985
+ scrollLooper: Nt,
1986
+ slideLooper: jt,
1987
+ dragHandler: Lt,
1988
+ animation: It,
1989
+ eventHandler: Ze,
1990
+ scrollBounds: Mt,
1991
+ options: {
1992
+ loop: et
1993
+ }
1994
+ }, tt) => {
1995
+ const nt = me.settled(), Dt = !Mt.shouldConstrain(), rt = et ? nt : nt && Dt, ot = rt && !Lt.pointerDown();
1996
+ ot && It.stop();
1997
+ const At = Fe.get() * tt + Tt.get() * (1 - tt);
1998
+ Le.set(At), et && (Nt.loop(me.direction()), jt.loop()), $e.to(Le.get()), ot && Ze.emit("settle"), rt || Ze.emit("scroll");
1999
+ }, O = Xr(s, i, () => S(Oe), (me) => L(Oe, me)), Y = 0.68, oe = P[q.get()], se = Ee(oe), le = Ee(oe), ae = Ee(oe), ue = Ee(oe), be = ro(se, ae, le, ue, h, Y), Ae = fo(p, P, M, A, ue), Re = mo(O, q, G, be, Ae, ue, r), Xe = co(A), Je = Ne(), wt = bo(t, n, r, g), {
2000
+ slideRegistry: Qe
2001
+ } = uo(W, d, P, z, l, R), Pt = po(e, n, Qe, Re, be, Je, r, T), Oe = {
2002
+ ownerDocument: s,
2003
+ ownerWindow: i,
2004
+ eventHandler: r,
2005
+ containerRect: j,
2006
+ slideRects: $,
2007
+ animation: O,
2008
+ axis: D,
2009
+ dragHandler: Qr(D, e, s, i, ue, Zr(D, i), se, O, Re, be, Ae, q, r, V, y, f, m, Y, N),
2010
+ eventStore: Je,
2011
+ percentOfView: V,
2012
+ index: q,
2013
+ indexPrevious: G,
2014
+ limit: A,
2015
+ location: se,
2016
+ offsetLocation: ae,
2017
+ previousLocation: le,
2018
+ options: a,
2019
+ resizeHandler: no(t, r, i, n, D, x, w),
2020
+ scrollBody: be,
2021
+ scrollBounds: oo(A, ae, ue, be, V),
2022
+ scrollLooper: io(M, A, ae, [se, ae, le, ue]),
2023
+ scrollProgress: Xe,
2024
+ scrollSnapList: P.map(Xe.get),
2025
+ scrollSnaps: P,
2026
+ scrollTarget: Ae,
2027
+ scrollTo: Re,
2028
+ slideLooper: ho(D, F, M, J, K, _, P, ae, n),
2029
+ slideFocus: Pt,
2030
+ slidesHandler: go(t, r, E),
2031
+ slidesInView: wt,
2032
+ slideIndexes: R,
2033
+ slideRegistry: Qe,
2034
+ slidesToScroll: l,
2035
+ target: ue,
2036
+ translate: Ct(D, t)
2037
+ };
2038
+ return Oe;
2039
+ }
2040
+ function So() {
2041
+ let e = {}, t;
2042
+ function n(u) {
2043
+ t = u;
2044
+ }
2045
+ function s(u) {
2046
+ return e[u] || [];
2047
+ }
2048
+ function i(u) {
2049
+ return s(u).forEach((v) => v(t, u)), o;
2050
+ }
2051
+ function a(u, v) {
2052
+ return e[u] = s(u).concat([v]), o;
2053
+ }
2054
+ function r(u, v) {
2055
+ return e[u] = s(u).filter((p) => p !== v), o;
2056
+ }
2057
+ function c() {
2058
+ e = {};
2059
+ }
2060
+ const o = {
2061
+ init: n,
2062
+ emit: i,
2063
+ off: r,
2064
+ on: a,
2065
+ clear: c
2066
+ };
2067
+ return o;
2068
+ }
2069
+ const _o = {
2070
+ align: "center",
2071
+ axis: "x",
2072
+ container: null,
2073
+ slides: null,
2074
+ containScroll: "trimSnaps",
2075
+ direction: "ltr",
2076
+ slidesToScroll: 1,
2077
+ inViewThreshold: 0,
2078
+ breakpoints: {},
2079
+ dragFree: !1,
2080
+ dragThreshold: 10,
2081
+ loop: !1,
2082
+ skipSnaps: !1,
2083
+ duration: 25,
2084
+ startIndex: 0,
2085
+ active: !0,
2086
+ watchDrag: !0,
2087
+ watchResize: !0,
2088
+ watchSlides: !0,
2089
+ watchFocus: !0
2090
+ };
2091
+ function ko(e) {
2092
+ function t(a, r) {
2093
+ return kt(a, r || {});
2094
+ }
2095
+ function n(a) {
2096
+ const r = a.breakpoints || {}, c = Te(r).filter((o) => e.matchMedia(o).matches).map((o) => r[o]).reduce((o, u) => t(o, u), {});
2097
+ return t(a, c);
2098
+ }
2099
+ function s(a) {
2100
+ return a.map((r) => Te(r.breakpoints || {})).reduce((r, c) => r.concat(c), []).map(e.matchMedia);
2101
+ }
2102
+ return {
2103
+ mergeOptions: t,
2104
+ optionsAtMedia: n,
2105
+ optionsMediaQueries: s
2106
+ };
2107
+ }
2108
+ function Eo(e) {
2109
+ let t = [];
2110
+ function n(a, r) {
2111
+ return t = r.filter(({
2112
+ options: c
2113
+ }) => e.optionsAtMedia(c).active !== !1), t.forEach((c) => c.init(a, e)), r.reduce((c, o) => Object.assign(c, {
2114
+ [o.name]: o
2115
+ }), {});
2116
+ }
2117
+ function s() {
2118
+ t = t.filter((a) => a.destroy());
2119
+ }
2120
+ return {
2121
+ init: n,
2122
+ destroy: s
2123
+ };
2124
+ }
2125
+ function Me(e, t, n) {
2126
+ const s = e.ownerDocument, i = s.defaultView, a = ko(i), r = Eo(a), c = Ne(), o = So(), {
2127
+ mergeOptions: u,
2128
+ optionsAtMedia: v,
2129
+ optionsMediaQueries: p
2130
+ } = a, {
2131
+ on: h,
2132
+ off: y,
2133
+ emit: f
2134
+ } = o, g = D;
2135
+ let b = !1, m, d = u(_o, Me.globalOptions), x = u(d), E = [], N, T, C;
2136
+ function w() {
2137
+ const {
2138
+ container: R,
2139
+ slides: S
2140
+ } = x;
2141
+ T = (ze(R) ? e.querySelector(R) : R) || e.children[0];
2142
+ const O = ze(S) ? T.querySelectorAll(S) : S;
2143
+ C = [].slice.call(O || T.children);
2144
+ }
2145
+ function j(R) {
2146
+ const S = xo(e, T, C, s, i, R, o);
2147
+ if (R.loop && !S.slideLooper.canLoop()) {
2148
+ const L = Object.assign({}, R, {
2149
+ loop: !1
2150
+ });
2151
+ return j(L);
2152
+ }
2153
+ return S;
2154
+ }
2155
+ function $(R, S) {
2156
+ b || (d = u(d, R), x = v(d), E = S || E, w(), m = j(x), p([d, ...E.map(({
2157
+ options: L
2158
+ }) => L)]).forEach((L) => c.add(L, "change", D)), x.active && (m.translate.to(m.location.get()), m.animation.init(), m.slidesInView.init(), m.slideFocus.init(G), m.eventHandler.init(G), m.resizeHandler.init(G), m.slidesHandler.init(G), m.options.loop && m.slideLooper.loop(), T.offsetParent && C.length && m.dragHandler.init(G), N = r.init(G, E)));
2159
+ }
2160
+ function D(R, S) {
2161
+ const L = l();
2162
+ F(), $(u({
2163
+ startIndex: L
2164
+ }, R), S), o.emit("reInit");
2165
+ }
2166
+ function F() {
2167
+ m.dragHandler.destroy(), m.eventStore.clear(), m.translate.clear(), m.slideLooper.clear(), m.resizeHandler.destroy(), m.slidesHandler.destroy(), m.slidesInView.destroy(), m.animation.destroy(), r.destroy(), c.clear();
2168
+ }
2169
+ function V() {
2170
+ b || (b = !0, c.clear(), F(), o.emit("destroy"), o.clear());
2171
+ }
2172
+ function H(R, S, L) {
2173
+ !x.active || b || (m.scrollBody.useBaseFriction().useDuration(S === !0 ? 0 : x.duration), m.scrollTo.index(R, L || 0));
2174
+ }
2175
+ function W(R) {
2176
+ const S = m.index.add(1).get();
2177
+ H(S, R, -1);
2178
+ }
2179
+ function X(R) {
2180
+ const S = m.index.add(-1).get();
2181
+ H(S, R, 1);
2182
+ }
2183
+ function J() {
2184
+ return m.index.add(1).get() !== l();
2185
+ }
2186
+ function K() {
2187
+ return m.index.add(-1).get() !== l();
2188
+ }
2189
+ function U() {
2190
+ return m.scrollSnapList;
2191
+ }
2192
+ function re() {
2193
+ return m.scrollProgress.get(m.offsetLocation.get());
2194
+ }
2195
+ function l() {
2196
+ return m.index.get();
2197
+ }
2198
+ function _() {
2199
+ return m.indexPrevious.get();
2200
+ }
2201
+ function I() {
2202
+ return m.slidesInView.get();
2203
+ }
2204
+ function M() {
2205
+ return m.slidesInView.get(!1);
2206
+ }
2207
+ function Q() {
2208
+ return N;
2209
+ }
2210
+ function z() {
2211
+ return m;
2212
+ }
2213
+ function P() {
2214
+ return e;
2215
+ }
2216
+ function A() {
2217
+ return T;
2218
+ }
2219
+ function q() {
2220
+ return C;
2221
+ }
2222
+ const G = {
2223
+ canScrollNext: J,
2224
+ canScrollPrev: K,
2225
+ containerNode: A,
2226
+ internalEngine: z,
2227
+ destroy: V,
2228
+ off: y,
2229
+ on: h,
2230
+ emit: f,
2231
+ plugins: Q,
2232
+ previousScrollSnap: _,
2233
+ reInit: g,
2234
+ rootNode: P,
2235
+ scrollNext: W,
2236
+ scrollPrev: X,
2237
+ scrollProgress: re,
2238
+ scrollSnapList: U,
2239
+ scrollTo: H,
2240
+ selectedScrollSnap: l,
2241
+ slideNodes: q,
2242
+ slidesInView: I,
2243
+ slidesNotInView: M
2244
+ };
2245
+ return $(t, n), setTimeout(() => o.emit("init"), 0), G;
2246
+ }
2247
+ Me.globalOptions = void 0;
2248
+ function Ue(e = {}, t = []) {
2249
+ const n = We(e), s = We(t), [i, a] = ge(), [r, c] = ge(), o = te(() => {
2250
+ i && i.reInit(n.current, s.current);
2251
+ }, [i]);
2252
+ return ie(() => {
2253
+ Ye(n.current, e) || (n.current = e, o());
2254
+ }, [e, o]), ie(() => {
2255
+ Gr(s.current, t) || (s.current = t, o());
2256
+ }, [t, o]), ie(() => {
2257
+ if (Yr() && r) {
2258
+ Me.globalOptions = Ue.globalOptions;
2259
+ const u = Me(r, n.current, s.current);
2260
+ return a(u), () => u.destroy();
2261
+ } else
2262
+ a(void 0);
2263
+ }, [r, a]), [c, i];
2264
+ }
2265
+ Ue.globalOptions = void 0;
2266
+ const Co = "_carouselContainer_15ag3_1", wo = "_viewport_15ag3_11", Po = "_slides_15ag3_17", To = "_slide_15ag3_17", No = "_image_15ag3_33", jo = "_empty_15ag3_49", Lo = "_controls_15ag3_55", Io = "_arrows_15ag3_64", Mo = "_dots_15ag3_74", Do = "_dot_15ag3_74", Ao = "_dotActive_15ag3_95", ee = {
2267
+ carouselContainer: Co,
2268
+ viewport: wo,
2269
+ slides: Po,
2270
+ slide: To,
2271
+ image: No,
2272
+ empty: jo,
2273
+ controls: Lo,
2274
+ arrows: Io,
2275
+ dots: Mo,
2276
+ dot: Do,
2277
+ dotActive: Ao
2278
+ }, Ro = ({
2279
+ images: e,
2280
+ autoPlay: t = !1,
2281
+ autoDelay: n = 5,
2282
+ showArrows: s = !0,
2283
+ showDots: i = !0,
2284
+ "data-color": a,
2285
+ "data-size": r
2286
+ }) => {
2287
+ const [c, o] = Ue({ loop: !0 }), [u, v] = ge(0), [p, h] = ge([]), y = ke(() => n * 1e3, [n]), f = te(() => {
2288
+ o && v(o.selectedScrollSnap());
2289
+ }, [o]), g = te((d) => o && o.scrollTo(d), [o]), b = te(() => o && o.scrollPrev(), [o]), m = te(() => o && o.scrollNext(), [o]);
2290
+ return ie(() => {
2291
+ if (o)
2292
+ return o.on("select", f), o.on("reInit", f), h(o.scrollSnapList()), () => {
2293
+ o.off("select", f), o.off("reInit", f);
2294
+ };
2295
+ }, [o, f]), ie(() => {
2296
+ o && e.length > 0 && (o.reInit(), h(o.scrollSnapList()));
2297
+ }, [o, e]), ie(() => {
2298
+ if (!t || !o || e.length === 0) return;
2299
+ const d = window.setInterval(() => {
2300
+ o.scrollNext();
2301
+ }, y);
2302
+ return () => {
2303
+ window.clearInterval(d);
2304
+ };
2305
+ }, [t, y, o, e]), /* @__PURE__ */ k.jsxs("div", { className: ee.carouselContainer, "data-color": a, "data-size": r, children: [
2306
+ /* @__PURE__ */ k.jsx("div", { className: ee.viewport, ref: c, children: /* @__PURE__ */ k.jsx("div", { className: ee.slides, children: e && e.length > 0 ? e.map((d, x) => /* @__PURE__ */ k.jsx("div", { className: ee.slide, children: /* @__PURE__ */ k.jsx(
2307
+ "img",
2308
+ {
2309
+ className: ee.image,
2310
+ src: d.src,
2311
+ alt: d.alt,
2312
+ loading: x === 0 ? "eager" : "lazy",
2313
+ crossOrigin: "anonymous",
2314
+ onError: (E) => {
2315
+ E.target.style.display = "none";
2316
+ }
2317
+ }
2318
+ ) }, `image-${x}`)) : /* @__PURE__ */ k.jsx("div", { className: ee.slide, children: /* @__PURE__ */ k.jsx("div", { className: ee.empty, children: "Ingen bilder" }) }) }) }),
2319
+ (s || i && e.length > 1) && /* @__PURE__ */ k.jsxs("div", { className: ee.controls, "aria-hidden": "false", children: [
2320
+ s && /* @__PURE__ */ k.jsxs("div", { className: ee.arrows, children: [
2321
+ /* @__PURE__ */ k.jsx(
2322
+ we,
2323
+ {
2324
+ variant: "primary",
2325
+ icon: !0,
2326
+ "aria-label": "Forrige bilde",
2327
+ onClick: b,
2328
+ disabled: e.length <= 1,
2329
+ children: /* @__PURE__ */ k.jsx(An, { "aria-hidden": !0 })
2330
+ }
2331
+ ),
2332
+ /* @__PURE__ */ k.jsx(
2333
+ we,
2334
+ {
2335
+ variant: "primary",
2336
+ icon: !0,
2337
+ "aria-label": "Neste bilde",
2338
+ onClick: m,
2339
+ disabled: e.length <= 1,
2340
+ children: /* @__PURE__ */ k.jsx(Rn, { "aria-hidden": !0 })
2341
+ }
2342
+ )
2343
+ ] }),
2344
+ i && e.length > 1 && /* @__PURE__ */ k.jsx("div", { className: ee.dots, role: "tablist", "aria-label": "Bildeposisjon", children: p.map((d, x) => {
2345
+ const E = x === u;
2346
+ return /* @__PURE__ */ k.jsx(
2347
+ "button",
2348
+ {
2349
+ type: "button",
2350
+ className: `${ee.dot} ${E ? ee.dotActive : ""}`,
2351
+ onClick: () => g(x),
2352
+ "aria-label": `Gå til bilde ${x + 1}`,
2353
+ "aria-selected": E,
2354
+ role: "tab"
2355
+ },
2356
+ `dot-${x}`
2357
+ );
2358
+ }) })
2359
+ ] })
2360
+ ] });
2361
+ };
2362
+ Ro.displayName = "Carousel";
2363
+ const ns = Ut, rs = Xt, os = Jt, ss = Qt, as = Zt, is = nn, Oo = en, $o = tn;
2364
+ Oo.displayName = "Field.Description";
2365
+ $o.displayName = "Field.Counter";
2366
+ const cs = vt, Fo = ce((e, t) => /* @__PURE__ */ k.jsx(rn, { ref: t, ...e }));
2367
+ Fo.displayName = "Heading";
2368
+ const ls = on, Bo = ce((e, t) => /* @__PURE__ */ k.jsx(sn, { ref: t, ...e }));
2369
+ Bo.displayName = "Label";
2370
+ const us = an, ds = cn, fs = ln, ms = un, Vo = ce(
2371
+ (e, t) => /* @__PURE__ */ k.jsx(dn, { ref: t, ...e })
1026
2372
  );
1027
- Fa.displayName = "Paragraph";
1028
- const fr = it, hr = lt, pr = ct, br = dt, vr = ut, gr = mt, kr = ft, yr = ht, Va = pt;
1029
- Va.displayName = "Suggestion";
1030
- const _r = bt, xr = vt, Cr = gt, Pr = kt, wr = yt, Er = _t, jr = xt, Nr = Ct, Ya = T((t, a) => /* @__PURE__ */ s.jsx(Pt, { ref: a, ...t }));
1031
- Ya.displayName = "ValidationMessage";
2373
+ Vo.displayName = "Paragraph";
2374
+ const ps = fn, hs = mn, gs = pn, bs = hn, vs = gn, ys = bn, xs = vn, Ss = yn, Wo = xn;
2375
+ Wo.displayName = "Suggestion";
2376
+ const _s = Sn, ks = _n, Es = kn, Cs = En, ws = Cn, Ps = wn, Ts = Pn, Ns = Tn, zo = ce((e, t) => /* @__PURE__ */ k.jsx(Nn, { ref: t, ...e }));
2377
+ zo.displayName = "ValidationMessage";
1032
2378
  export {
1033
- Mt as Alert,
1034
- Dt as Avatar,
1035
- At as Badge,
1036
- qa as BadgePosition,
1037
- Xa as Breadcrumbs,
1038
- Ja as BreadcrumbsItem,
1039
- Ua as BreadcrumbsLink,
1040
- Ka as BreadcrumbsList,
1041
- Ot as Button,
1042
- Wt as Card,
1043
- Qa as CardBlock,
1044
- Lt as Checkbox,
1045
- er as Chip,
1046
- Oa as DateInput,
1047
- Na as DatePicker,
1048
- tr as Details,
1049
- ar as Dialog,
1050
- rr as Divider,
1051
- nr as Dropdown,
1052
- or as ErrorSummary,
1053
- sr as Field,
1054
- La as FieldCounter,
1055
- Wa as FieldDescription,
1056
- ir as Fieldset,
1057
- Ba as Heading,
1058
- lr as Input,
1059
- Ia as Label,
1060
- cr as Link,
1061
- dr as List,
1062
- ur as Pagination,
1063
- Fa as Paragraph,
1064
- fr as Popover,
1065
- hr as Radio,
1066
- br as Search,
1067
- vr as Select,
1068
- gr as SkeletonLoader,
1069
- kr as SkipLink,
1070
- yr as Spinner,
1071
- Va as Suggestion,
1072
- _r as Switch,
1073
- xr as Table,
1074
- Cr as Tabs,
1075
- Pr as Tag,
1076
- wr as Textarea,
1077
- Er as Textfield,
1078
- jr as ToggleGroup,
1079
- Nr as Tooltip,
1080
- Ya as ValidationMessage,
1081
- Za as useCheckboxGroup,
1082
- mr as usePagination,
1083
- pr as useRadioGroup
2379
+ Bn as Alert,
2380
+ Vn as Avatar,
2381
+ Wn as Badge,
2382
+ Ko as BadgePosition,
2383
+ Uo as Breadcrumbs,
2384
+ Jo as BreadcrumbsItem,
2385
+ Qo as BreadcrumbsLink,
2386
+ Xo as BreadcrumbsList,
2387
+ zn as Button,
2388
+ Hn as Card,
2389
+ Zo as CardBlock,
2390
+ Ro as Carousel,
2391
+ Yn as Checkbox,
2392
+ ts as Chip,
2393
+ zr as DateInput,
2394
+ Ar as DatePicker,
2395
+ ns as Details,
2396
+ rs as Dialog,
2397
+ os as Divider,
2398
+ ss as Dropdown,
2399
+ as as ErrorSummary,
2400
+ is as Field,
2401
+ $o as FieldCounter,
2402
+ Oo as FieldDescription,
2403
+ cs as Fieldset,
2404
+ Fo as Heading,
2405
+ ls as Input,
2406
+ Bo as Label,
2407
+ us as Link,
2408
+ ds as List,
2409
+ fs as Pagination,
2410
+ Vo as Paragraph,
2411
+ ps as Popover,
2412
+ hs as Radio,
2413
+ bs as Search,
2414
+ vs as Select,
2415
+ ys as SkeletonLoader,
2416
+ xs as SkipLink,
2417
+ Ss as Spinner,
2418
+ Wo as Suggestion,
2419
+ _s as Switch,
2420
+ ks as Table,
2421
+ Es as Tabs,
2422
+ Cs as Tag,
2423
+ ws as Textarea,
2424
+ Ps as Textfield,
2425
+ Ts as ToggleGroup,
2426
+ Ns as Tooltip,
2427
+ zo as ValidationMessage,
2428
+ es as useCheckboxGroup,
2429
+ ms as usePagination,
2430
+ gs as useRadioGroup
1084
2431
  };