rk-designsystem 1.1.72 → 1.1.74
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.
- package/dist/componentlibrary.es.js +904 -608
- package/dist/componentlibrary.umd.js +241 -3
- package/dist/index.d.ts +8 -2
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as s, jsxs as w, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { Alert as Yt, Avatar as qt, BadgePosition as Xt, Badge as Jt, Breadcrumbs as Zt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as Ye, Card as nn, CardBlock as on, Checkbox as rn, useCheckboxGroup as sn, Fieldset as
|
|
4
|
-
import { startOfMonth as be, isValid as
|
|
5
|
-
import { ChevronLeftIcon as Xn, ChevronRightIcon as Jn, ChevronDownIcon as
|
|
1
|
+
import { jsx as s, jsxs as w, Fragment as Vt } from "react/jsx-runtime";
|
|
2
|
+
import Be, { forwardRef as ge, useState as ne, useEffect as Z, useMemo as Se, useCallback as re, useRef as Ke, createContext as Kt, useContext as wt } from "react";
|
|
3
|
+
import { Alert as Yt, Avatar as qt, BadgePosition as Xt, Badge as Jt, Breadcrumbs as Zt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as Ye, Card as nn, CardBlock as on, Checkbox as rn, useCheckboxGroup as sn, Fieldset as It, Chip as an, Spinner as ln, Details as dn, Dialog as cn, Divider as un, Dropdown as mn, ErrorSummary as pn, Field as gn, FieldDescription as hn, FieldCounter as fn, Heading as kn, Input as yn, Label as vn, Link as bn, List as Tn, Pagination as Sn, usePagination as xn, Paragraph as Cn, Popover as wn, Radio as In, useRadioGroup as Dn, Search as _n, SearchInput as An, SearchClear as Mn, SearchButton as Ln, Select as jn, Skeleton as Fn, SkipLink as En, EXPERIMENTAL_Suggestion as Nn, Switch as Bn, Table as Pn, Tabs as zn, Tag as Rn, Textarea as Gn, Textfield as $n, ToggleGroup as Wn, Tooltip as Un, ValidationMessage as Hn } from "@digdir/designsystemet-react";
|
|
4
|
+
import { startOfMonth as be, isValid as He, isSameMonth as pt, startOfWeek as Dt, format as we, addDays as _t, subMonths as On, addMonths as Vn, isSameDay as Kn, isToday as Yn, eachDayOfInterval as qn } from "date-fns";
|
|
5
|
+
import { ChevronLeftIcon as Xn, ChevronRightIcon as Jn, ChevronDownIcon as gt, XMarkIcon as ht, MagnifyingGlassIcon as ft, MenuHamburgerIcon as Zn, HeartIcon as Qn } from "@navikt/aksel-icons";
|
|
6
6
|
const eo = ge((t, e) => /* @__PURE__ */ s(Yt, { ref: e, ...t }));
|
|
7
7
|
eo.displayName = "Alert";
|
|
8
|
-
const
|
|
9
|
-
|
|
8
|
+
const At = ge((t, e) => /* @__PURE__ */ s(qt, { ref: e, ...t }));
|
|
9
|
+
At.displayName = "Avatar";
|
|
10
10
|
const to = ge((t, e) => /* @__PURE__ */ s(Jt, { ref: e, ...t }));
|
|
11
11
|
to.displayName = "Badge";
|
|
12
|
-
const
|
|
12
|
+
const zi = Xt, Ri = Zt, Gi = Qt, $i = en, Wi = tn, xe = Ye;
|
|
13
13
|
xe.displayName = "Button";
|
|
14
14
|
const no = nn, Ui = on;
|
|
15
15
|
no.displayName = "Card";
|
|
16
|
-
const oo = rn, ro =
|
|
16
|
+
const oo = rn, ro = It, Hi = sn;
|
|
17
17
|
oo.displayName = "Checkbox";
|
|
18
18
|
ro.displayName = "Fieldset";
|
|
19
|
-
const
|
|
20
|
-
function
|
|
19
|
+
const Oi = an;
|
|
20
|
+
function Oe(t) {
|
|
21
21
|
return (e = {}) => {
|
|
22
22
|
const n = e.width ? String(e.width) : t.defaultWidth;
|
|
23
23
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
@@ -43,9 +43,9 @@ function De(t) {
|
|
|
43
43
|
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
|
|
44
44
|
if (!i)
|
|
45
45
|
return null;
|
|
46
|
-
const o = i[0], d = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], l = Array.isArray(d) ? io(d, (
|
|
46
|
+
const o = i[0], d = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], l = Array.isArray(d) ? io(d, (m) => m.test(o)) : (
|
|
47
47
|
// [TODO] -- I challenge you to fix the type
|
|
48
|
-
so(d, (
|
|
48
|
+
so(d, (m) => m.test(o))
|
|
49
49
|
);
|
|
50
50
|
let c;
|
|
51
51
|
c = t.valueCallback ? t.valueCallback(l) : l, c = n.valueCallback ? (
|
|
@@ -160,15 +160,15 @@ const lo = {
|
|
|
160
160
|
medium: "{{date}} {{time}}",
|
|
161
161
|
short: "{{date}} {{time}}"
|
|
162
162
|
}, go = {
|
|
163
|
-
date:
|
|
163
|
+
date: Oe({
|
|
164
164
|
formats: uo,
|
|
165
165
|
defaultWidth: "full"
|
|
166
166
|
}),
|
|
167
|
-
time:
|
|
167
|
+
time: Oe({
|
|
168
168
|
formats: mo,
|
|
169
169
|
defaultWidth: "full"
|
|
170
170
|
}),
|
|
171
|
-
dateTime:
|
|
171
|
+
dateTime: Oe({
|
|
172
172
|
formats: po,
|
|
173
173
|
defaultWidth: "full"
|
|
174
174
|
})
|
|
@@ -300,7 +300,7 @@ const lo = {
|
|
|
300
300
|
narrow: /^[jfmasond]/i,
|
|
301
301
|
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
|
|
302
302
|
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
|
|
303
|
-
},
|
|
303
|
+
}, Lo = {
|
|
304
304
|
narrow: [
|
|
305
305
|
/^j/i,
|
|
306
306
|
/^f/i,
|
|
@@ -329,12 +329,12 @@ const lo = {
|
|
|
329
329
|
/^n/i,
|
|
330
330
|
/^d/i
|
|
331
331
|
]
|
|
332
|
-
},
|
|
332
|
+
}, jo = {
|
|
333
333
|
narrow: /^[smtofl]/i,
|
|
334
334
|
short: /^(sø|ma|ti|on|to|fr|lø)/i,
|
|
335
335
|
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
|
|
336
336
|
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
|
|
337
|
-
},
|
|
337
|
+
}, Fo = {
|
|
338
338
|
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
339
339
|
}, Eo = {
|
|
340
340
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
@@ -372,13 +372,13 @@ const lo = {
|
|
|
372
372
|
month: De({
|
|
373
373
|
matchPatterns: Mo,
|
|
374
374
|
defaultMatchWidth: "wide",
|
|
375
|
-
parsePatterns:
|
|
375
|
+
parsePatterns: Lo,
|
|
376
376
|
defaultParseWidth: "any"
|
|
377
377
|
}),
|
|
378
378
|
day: De({
|
|
379
|
-
matchPatterns:
|
|
379
|
+
matchPatterns: jo,
|
|
380
380
|
defaultMatchWidth: "wide",
|
|
381
|
-
parsePatterns:
|
|
381
|
+
parsePatterns: Fo,
|
|
382
382
|
defaultParseWidth: "any"
|
|
383
383
|
}),
|
|
384
384
|
dayPeriod: De({
|
|
@@ -398,7 +398,7 @@ const lo = {
|
|
|
398
398
|
weekStartsOn: 1,
|
|
399
399
|
firstWeekContainsDate: 4
|
|
400
400
|
}
|
|
401
|
-
},
|
|
401
|
+
}, Mt = ({ title: t, ...e }) => /* @__PURE__ */ w(
|
|
402
402
|
"svg",
|
|
403
403
|
{
|
|
404
404
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -423,8 +423,8 @@ const lo = {
|
|
|
423
423
|
]
|
|
424
424
|
}
|
|
425
425
|
);
|
|
426
|
-
|
|
427
|
-
const
|
|
426
|
+
Mt.displayName = "ChevronLeftIcon";
|
|
427
|
+
const Lt = ({ title: t, ...e }) => /* @__PURE__ */ w(
|
|
428
428
|
"svg",
|
|
429
429
|
{
|
|
430
430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -449,22 +449,22 @@ const At = ({ title: t, ...e }) => /* @__PURE__ */ w(
|
|
|
449
449
|
]
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
|
-
|
|
453
|
-
const Po = "_calendarContainer_10l5p_1", zo = "_calendarHeader_10l5p_14",
|
|
452
|
+
Lt.displayName = "ChevronRightIcon";
|
|
453
|
+
const Po = "_calendarContainer_10l5p_1", zo = "_calendarHeader_10l5p_14", Ro = "_monthYear_10l5p_21", Go = "_navigationButtons_10l5p_32", $o = "_grid_10l5p_41", Wo = "_dayNameCell_10l5p_48", Uo = "_dateCell_10l5p_65", Ho = "_dateNumberContainer_10l5p_90", Oo = "_otherMonth_10l5p_103", Vo = "_selectedDate_10l5p_129", oe = {
|
|
454
454
|
calendarContainer: Po,
|
|
455
455
|
calendarHeader: zo,
|
|
456
|
-
monthYear:
|
|
457
|
-
navigationButtons:
|
|
458
|
-
grid:
|
|
459
|
-
dayNameCell:
|
|
460
|
-
dateCell:
|
|
456
|
+
monthYear: Ro,
|
|
457
|
+
navigationButtons: Go,
|
|
458
|
+
grid: $o,
|
|
459
|
+
dayNameCell: Wo,
|
|
460
|
+
dateCell: Uo,
|
|
461
461
|
dateNumberContainer: Ho,
|
|
462
462
|
otherMonth: Oo,
|
|
463
463
|
selectedDate: Vo
|
|
464
464
|
}, Ko = (t) => {
|
|
465
|
-
const e = be(t), n =
|
|
465
|
+
const e = be(t), n = Dt(e, { locale: Te }), r = _t(n, 41);
|
|
466
466
|
return qn({ start: n, end: r });
|
|
467
|
-
},
|
|
467
|
+
}, kt = (t) => t && t.charAt(0).toUpperCase() + t.slice(1), Yo = ({
|
|
468
468
|
initialDate: t = /* @__PURE__ */ new Date(),
|
|
469
469
|
selectedDate: e = null,
|
|
470
470
|
// Prop for valgt dato
|
|
@@ -475,38 +475,38 @@ const Po = "_calendarContainer_10l5p_1", zo = "_calendarHeader_10l5p_14", Go = "
|
|
|
475
475
|
// <-- Destrukturert
|
|
476
476
|
}) => {
|
|
477
477
|
const [i, o] = ne(
|
|
478
|
-
be(e &&
|
|
478
|
+
be(e && He(e) ? e : t)
|
|
479
479
|
);
|
|
480
480
|
Z(() => {
|
|
481
|
-
if (e &&
|
|
482
|
-
const
|
|
483
|
-
|
|
481
|
+
if (e && He(e)) {
|
|
482
|
+
const u = be(e);
|
|
483
|
+
pt(u, i) || o(u);
|
|
484
484
|
}
|
|
485
485
|
}, [e]);
|
|
486
486
|
const d = Se(() => be(/* @__PURE__ */ new Date()), []), l = Se(() => !1, [i, d]), c = Se(
|
|
487
487
|
() => Ko(i),
|
|
488
488
|
[i]
|
|
489
489
|
), v = Se(() => {
|
|
490
|
-
const
|
|
491
|
-
return Array.from({ length: 7 }).map((
|
|
492
|
-
const M = we(
|
|
493
|
-
return
|
|
490
|
+
const u = Dt(/* @__PURE__ */ new Date(), { locale: Te });
|
|
491
|
+
return Array.from({ length: 7 }).map((b, D) => {
|
|
492
|
+
const M = we(_t(u, D), "EEEEEE", { locale: Te });
|
|
493
|
+
return kt(M);
|
|
494
494
|
});
|
|
495
|
-
}, []),
|
|
496
|
-
l || o((
|
|
495
|
+
}, []), m = re(() => {
|
|
496
|
+
l || o((u) => be(On(u, 1)));
|
|
497
497
|
}, [l]), f = re(() => {
|
|
498
|
-
o((
|
|
498
|
+
o((u) => be(Vn(u, 1)));
|
|
499
499
|
}, []), g = re(
|
|
500
|
-
(
|
|
501
|
-
n && n(
|
|
500
|
+
(u) => {
|
|
501
|
+
n && n(u);
|
|
502
502
|
},
|
|
503
503
|
[n]
|
|
504
504
|
), h = re(
|
|
505
|
-
(
|
|
506
|
-
(
|
|
505
|
+
(u, b) => {
|
|
506
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), g(b));
|
|
507
507
|
},
|
|
508
508
|
[g]
|
|
509
|
-
), k = we(i, "MMMM", { locale: Te }), y = we(i, "yyyy", { locale: Te }), p = `${
|
|
509
|
+
), k = we(i, "MMMM", { locale: Te }), y = we(i, "yyyy", { locale: Te }), p = `${kt(k)} ${y}`;
|
|
510
510
|
return /* @__PURE__ */ w(
|
|
511
511
|
"div",
|
|
512
512
|
{
|
|
@@ -522,10 +522,10 @@ const Po = "_calendarContainer_10l5p_1", zo = "_calendarHeader_10l5p_14", Go = "
|
|
|
522
522
|
{
|
|
523
523
|
variant: "tertiary",
|
|
524
524
|
icon: !0,
|
|
525
|
-
onClick:
|
|
525
|
+
onClick: m,
|
|
526
526
|
"aria-label": "Forrige måned",
|
|
527
527
|
disabled: l,
|
|
528
|
-
children: /* @__PURE__ */ s(
|
|
528
|
+
children: /* @__PURE__ */ s(Mt, {})
|
|
529
529
|
}
|
|
530
530
|
),
|
|
531
531
|
/* @__PURE__ */ s(
|
|
@@ -535,33 +535,33 @@ const Po = "_calendarContainer_10l5p_1", zo = "_calendarHeader_10l5p_14", Go = "
|
|
|
535
535
|
icon: !0,
|
|
536
536
|
onClick: f,
|
|
537
537
|
"aria-label": "Neste måned",
|
|
538
|
-
children: /* @__PURE__ */ s(
|
|
538
|
+
children: /* @__PURE__ */ s(Lt, {})
|
|
539
539
|
}
|
|
540
540
|
)
|
|
541
541
|
] })
|
|
542
542
|
] }),
|
|
543
|
-
/* @__PURE__ */ s("div", { className: oe.grid, children: v.map((
|
|
544
|
-
/* @__PURE__ */ s("div", { className: oe.grid, children: c.map((
|
|
545
|
-
const
|
|
543
|
+
/* @__PURE__ */ s("div", { className: oe.grid, children: v.map((u) => /* @__PURE__ */ s("div", { className: oe.dayNameCell, children: u }, u)) }),
|
|
544
|
+
/* @__PURE__ */ s("div", { className: oe.grid, children: c.map((u) => {
|
|
545
|
+
const b = pt(u, i), D = e && He(e) && Kn(u, e), M = Yn(u), C = [
|
|
546
546
|
oe.dateCell,
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
b ? "" : oe.otherMonth,
|
|
548
|
+
D ? oe.selectedDate : "",
|
|
549
549
|
// Utheving basert på prop
|
|
550
|
-
M && !
|
|
550
|
+
M && !D ? oe.todayDate : ""
|
|
551
551
|
].filter(Boolean).join(" ");
|
|
552
552
|
return /* @__PURE__ */ s(
|
|
553
553
|
"div",
|
|
554
554
|
{
|
|
555
555
|
className: C,
|
|
556
|
-
onClick: () => g(
|
|
557
|
-
onKeyDown: (
|
|
556
|
+
onClick: () => g(u),
|
|
557
|
+
onKeyDown: (_) => h(_, u),
|
|
558
558
|
role: "button",
|
|
559
559
|
tabIndex: 0,
|
|
560
|
-
"aria-pressed":
|
|
561
|
-
"aria-label": we(
|
|
562
|
-
children: /* @__PURE__ */ s("span", { className: oe.dateNumberContainer, children: we(
|
|
560
|
+
"aria-pressed": D ?? !1,
|
|
561
|
+
"aria-label": we(u, "PPP", { locale: Te }),
|
|
562
|
+
children: /* @__PURE__ */ s("span", { className: oe.dateNumberContainer, children: we(u, "d") })
|
|
563
563
|
},
|
|
564
|
-
|
|
564
|
+
u.toISOString()
|
|
565
565
|
);
|
|
566
566
|
}) })
|
|
567
567
|
]
|
|
@@ -577,10 +577,10 @@ const qo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
577
577
|
inputWrapperError: Qo,
|
|
578
578
|
suffixButton: er,
|
|
579
579
|
suffixButtonInteractive: tr
|
|
580
|
-
},
|
|
580
|
+
}, yt = (t) => {
|
|
581
581
|
const e = t.slice(0, 2), n = t.slice(2, 4), r = t.slice(4, 8);
|
|
582
582
|
return t.length > 4 ? `${e}.${n}.${r}` : t.length > 2 ? `${e}.${n}` : t.length > 0 ? e : "";
|
|
583
|
-
},
|
|
583
|
+
}, vt = (t) => (t || "").replace(/\D/g, ""), bt = (t) => {
|
|
584
584
|
let e = t;
|
|
585
585
|
if (e.length >= 2) {
|
|
586
586
|
const n = parseInt(e.substring(0, 2), 10);
|
|
@@ -606,68 +606,68 @@ const qo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
606
606
|
value: l,
|
|
607
607
|
defaultValue: c,
|
|
608
608
|
onChange: v,
|
|
609
|
-
readOnly:
|
|
609
|
+
readOnly: m,
|
|
610
610
|
placeholder: f = "dd.mm.åååå",
|
|
611
611
|
id: g,
|
|
612
612
|
name: h,
|
|
613
613
|
required: k,
|
|
614
614
|
disabled: y,
|
|
615
615
|
onClick: p,
|
|
616
|
-
onFocus:
|
|
616
|
+
onFocus: u,
|
|
617
617
|
// Send ekstern onFocus videre
|
|
618
|
-
onBlur:
|
|
618
|
+
onBlur: b,
|
|
619
619
|
// Send ekstern onBlur videre
|
|
620
|
-
autoComplete:
|
|
620
|
+
autoComplete: D = "off",
|
|
621
621
|
"aria-label": M,
|
|
622
622
|
"aria-labelledby": C,
|
|
623
|
-
description:
|
|
624
|
-
error:
|
|
623
|
+
description: _,
|
|
624
|
+
error: A,
|
|
625
625
|
// Bruk error-prop for styling
|
|
626
626
|
"data-color": F,
|
|
627
627
|
// <-- Destrukturering
|
|
628
628
|
"data-size": E,
|
|
629
629
|
// <-- Destrukturering
|
|
630
630
|
...N
|
|
631
|
-
} = t, z = l !== void 0,
|
|
632
|
-
|
|
631
|
+
} = t, z = l !== void 0, R = Ke(null);
|
|
632
|
+
Be.useImperativeHandle(
|
|
633
633
|
e,
|
|
634
|
-
() =>
|
|
634
|
+
() => R.current
|
|
635
635
|
);
|
|
636
|
-
const
|
|
637
|
-
(
|
|
638
|
-
const I =
|
|
639
|
-
return
|
|
636
|
+
const G = re(
|
|
637
|
+
(T) => {
|
|
638
|
+
const I = vt(T), L = bt(I);
|
|
639
|
+
return yt(L);
|
|
640
640
|
},
|
|
641
641
|
[]
|
|
642
|
-
), [
|
|
643
|
-
() =>
|
|
642
|
+
), [$, B] = ne(
|
|
643
|
+
() => G(l ?? c)
|
|
644
644
|
);
|
|
645
645
|
Z(() => {
|
|
646
646
|
if (z) {
|
|
647
|
-
const
|
|
648
|
-
|
|
647
|
+
const T = G(l);
|
|
648
|
+
T !== $ && (B(T), R.current && R.current.value !== T && (R.current.value = T));
|
|
649
649
|
}
|
|
650
|
-
}, [l, z,
|
|
650
|
+
}, [l, z, $, G]);
|
|
651
651
|
const O = re(
|
|
652
|
-
(
|
|
653
|
-
const I =
|
|
652
|
+
(T) => {
|
|
653
|
+
const I = T.target, L = I.value, K = $, q = vt(L).slice(0, 8), W = bt(q), x = yt(W);
|
|
654
654
|
let P = 0;
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
if (
|
|
655
|
+
const U = W.length;
|
|
656
|
+
U <= 2 ? P = U : U <= 4 ? P = U + 1 : P = U + 2, P = Math.min(P, x.length), requestAnimationFrame(() => {
|
|
657
|
+
if (R.current && (B(x), R.current.value = x, R.current.setSelectionRange(P, P), (x !== K || z) && v)) {
|
|
658
658
|
const Y = {
|
|
659
|
-
...
|
|
659
|
+
...T,
|
|
660
660
|
target: { ...I, value: x }
|
|
661
661
|
};
|
|
662
662
|
v(Y, x);
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
},
|
|
666
|
-
[
|
|
666
|
+
[$, z, v, G]
|
|
667
667
|
), te = [ke.fieldset, i].filter(Boolean).join(" "), Q = [
|
|
668
668
|
ke.inputWrapper,
|
|
669
669
|
o,
|
|
670
|
-
|
|
670
|
+
A ? ke.inputWrapperError : ""
|
|
671
671
|
].filter(Boolean).join(" "), se = [
|
|
672
672
|
d
|
|
673
673
|
].filter(Boolean).join(" "), ee = [
|
|
@@ -675,7 +675,7 @@ const qo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
675
675
|
a ? ke.suffixButtonInteractive : ""
|
|
676
676
|
].filter(Boolean).join(" ");
|
|
677
677
|
!n && !M && !C && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
678
|
-
const ie = n && typeof n == "string" ? C || `${g}-label` : void 0, ae =
|
|
678
|
+
const ie = n && typeof n == "string" ? C || `${g}-label` : void 0, ae = _ ? `${g}-desc` : void 0, V = A ? `${g}-err` : void 0, ue = [ae, V].filter(Boolean).join(" ") || void 0;
|
|
679
679
|
return (
|
|
680
680
|
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
681
681
|
/* @__PURE__ */ w(
|
|
@@ -686,18 +686,18 @@ const qo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
686
686
|
"data-size": E,
|
|
687
687
|
children: [
|
|
688
688
|
n && typeof n == "string" ? /* @__PURE__ */ s("label", { id: ie, htmlFor: g, children: n }) : n,
|
|
689
|
-
|
|
689
|
+
_ && /* @__PURE__ */ s("p", { id: ae, className: ke.description, children: _ }),
|
|
690
690
|
/* @__PURE__ */ w("div", { className: Q, children: [
|
|
691
691
|
/* @__PURE__ */ s(
|
|
692
692
|
"input",
|
|
693
693
|
{
|
|
694
|
-
ref:
|
|
694
|
+
ref: R,
|
|
695
695
|
type: "text",
|
|
696
696
|
inputMode: "numeric",
|
|
697
697
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
698
698
|
maxLength: 10,
|
|
699
|
-
value:
|
|
700
|
-
readOnly:
|
|
699
|
+
value: $,
|
|
700
|
+
readOnly: m,
|
|
701
701
|
placeholder: f,
|
|
702
702
|
id: g,
|
|
703
703
|
name: h,
|
|
@@ -705,13 +705,13 @@ const qo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
705
705
|
disabled: y,
|
|
706
706
|
onClick: p,
|
|
707
707
|
onChange: O,
|
|
708
|
-
onFocus:
|
|
709
|
-
onBlur:
|
|
710
|
-
autoComplete:
|
|
708
|
+
onFocus: u,
|
|
709
|
+
onBlur: b,
|
|
710
|
+
autoComplete: D,
|
|
711
711
|
"aria-label": M,
|
|
712
712
|
"aria-labelledby": ie,
|
|
713
713
|
"aria-describedby": ue,
|
|
714
|
-
"aria-invalid": !!
|
|
714
|
+
"aria-invalid": !!A,
|
|
715
715
|
className: se,
|
|
716
716
|
...N
|
|
717
717
|
}
|
|
@@ -730,7 +730,7 @@ const qo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
730
730
|
}
|
|
731
731
|
)
|
|
732
732
|
] }),
|
|
733
|
-
|
|
733
|
+
A && /* @__PURE__ */ s("p", { id: V, className: ke.error, role: "alert", children: A })
|
|
734
734
|
]
|
|
735
735
|
}
|
|
736
736
|
)
|
|
@@ -741,7 +741,7 @@ nr.displayName = "DateInput";
|
|
|
741
741
|
function or(t) {
|
|
742
742
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function Tt(t) {
|
|
745
745
|
return or(t) || Array.isArray(t);
|
|
746
746
|
}
|
|
747
747
|
function rr() {
|
|
@@ -753,15 +753,15 @@ function Ze(t, e) {
|
|
|
753
753
|
const a = JSON.stringify(Object.keys(t.breakpoints || {})), i = JSON.stringify(Object.keys(e.breakpoints || {}));
|
|
754
754
|
return a !== i ? !1 : n.every((o) => {
|
|
755
755
|
const d = t[o], l = e[o];
|
|
756
|
-
return typeof d == "function" ? `${d}` == `${l}` : !
|
|
756
|
+
return typeof d == "function" ? `${d}` == `${l}` : !Tt(d) || !Tt(l) ? d === l : Ze(d, l);
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function St(t) {
|
|
760
760
|
return t.concat().sort((e, n) => e.name > n.name ? 1 : -1).map((e) => e.options);
|
|
761
761
|
}
|
|
762
762
|
function sr(t, e) {
|
|
763
763
|
if (t.length !== e.length) return !1;
|
|
764
|
-
const n =
|
|
764
|
+
const n = St(t), r = St(e);
|
|
765
765
|
return n.every((a, i) => {
|
|
766
766
|
const o = r[i];
|
|
767
767
|
return Ze(a, o);
|
|
@@ -773,10 +773,10 @@ function Qe(t) {
|
|
|
773
773
|
function qe(t) {
|
|
774
774
|
return typeof t == "string";
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function ze(t) {
|
|
777
777
|
return typeof t == "boolean";
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function xt(t) {
|
|
780
780
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
781
781
|
}
|
|
782
782
|
function H(t) {
|
|
@@ -797,27 +797,27 @@ function ar(t) {
|
|
|
797
797
|
return Math.round(t * 100) / 100;
|
|
798
798
|
}
|
|
799
799
|
function Me(t) {
|
|
800
|
-
return
|
|
800
|
+
return Le(t).map(Number);
|
|
801
801
|
}
|
|
802
802
|
function le(t) {
|
|
803
|
-
return t[
|
|
803
|
+
return t[Fe(t)];
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function Fe(t) {
|
|
806
806
|
return Math.max(0, t.length - 1);
|
|
807
807
|
}
|
|
808
808
|
function tt(t, e) {
|
|
809
|
-
return e ===
|
|
809
|
+
return e === Fe(t);
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Ct(t, e = 0) {
|
|
812
812
|
return Array.from(Array(t), (n, r) => e + r);
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Le(t) {
|
|
815
815
|
return Object.keys(t);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
return [t, e].reduce((n, r) => (
|
|
819
|
-
const i = n[a], o = r[a], d =
|
|
820
|
-
n[a] = d ?
|
|
817
|
+
function jt(t, e) {
|
|
818
|
+
return [t, e].reduce((n, r) => (Le(r).forEach((a) => {
|
|
819
|
+
const i = n[a], o = r[a], d = xt(i) && xt(o);
|
|
820
|
+
n[a] = d ? jt(i, o) : o;
|
|
821
821
|
}), n), {});
|
|
822
822
|
}
|
|
823
823
|
function Xe(t, e) {
|
|
@@ -845,7 +845,7 @@ function lr(t, e) {
|
|
|
845
845
|
measure: o
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function je() {
|
|
849
849
|
let t = [];
|
|
850
850
|
function e(a, i, o, d = {
|
|
851
851
|
passive: !0
|
|
@@ -869,7 +869,7 @@ function Fe() {
|
|
|
869
869
|
return r;
|
|
870
870
|
}
|
|
871
871
|
function dr(t, e, n, r) {
|
|
872
|
-
const a =
|
|
872
|
+
const a = je(), i = 1e3 / 60;
|
|
873
873
|
let o = null, d = 0, l = 0;
|
|
874
874
|
function c() {
|
|
875
875
|
a.add(t, "visibilitychange", () => {
|
|
@@ -879,17 +879,17 @@ function dr(t, e, n, r) {
|
|
|
879
879
|
function v() {
|
|
880
880
|
g(), a.clear();
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function m(y) {
|
|
883
883
|
if (!l) return;
|
|
884
884
|
o || (o = y, n(), n());
|
|
885
885
|
const p = y - o;
|
|
886
886
|
for (o = y, d += p; d >= i; )
|
|
887
887
|
n(), d -= i;
|
|
888
|
-
const
|
|
889
|
-
r(
|
|
888
|
+
const u = d / i;
|
|
889
|
+
r(u), l && (l = e.requestAnimationFrame(m));
|
|
890
890
|
}
|
|
891
891
|
function f() {
|
|
892
|
-
l || (l = e.requestAnimationFrame(
|
|
892
|
+
l || (l = e.requestAnimationFrame(m));
|
|
893
893
|
}
|
|
894
894
|
function g() {
|
|
895
895
|
e.cancelAnimationFrame(l), o = null, d = 0, l = 0;
|
|
@@ -907,7 +907,7 @@ function dr(t, e, n, r) {
|
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
909
|
function cr(t, e) {
|
|
910
|
-
const n = e === "rtl", r = t === "y", a = r ? "y" : "x", i = r ? "x" : "y", o = !r && n ? -1 : 1, d = v(), l =
|
|
910
|
+
const n = e === "rtl", r = t === "y", a = r ? "y" : "x", i = r ? "x" : "y", o = !r && n ? -1 : 1, d = v(), l = m();
|
|
911
911
|
function c(h) {
|
|
912
912
|
const {
|
|
913
913
|
height: k,
|
|
@@ -918,7 +918,7 @@ function cr(t, e) {
|
|
|
918
918
|
function v() {
|
|
919
919
|
return r ? "top" : n ? "right" : "left";
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function m() {
|
|
922
922
|
return r ? "bottom" : n ? "left" : "right";
|
|
923
923
|
}
|
|
924
924
|
function f(h) {
|
|
@@ -961,7 +961,7 @@ function ye(t = 0, e = 0) {
|
|
|
961
961
|
removeOffset: d
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function Ft(t, e, n) {
|
|
965
965
|
const {
|
|
966
966
|
constrain: r
|
|
967
967
|
} = ye(0, t), a = t + 1;
|
|
@@ -973,52 +973,52 @@ function jt(t, e, n) {
|
|
|
973
973
|
return i;
|
|
974
974
|
}
|
|
975
975
|
function l(f) {
|
|
976
|
-
return i = o(f),
|
|
976
|
+
return i = o(f), m;
|
|
977
977
|
}
|
|
978
978
|
function c(f) {
|
|
979
979
|
return v().set(d() + f);
|
|
980
980
|
}
|
|
981
981
|
function v() {
|
|
982
|
-
return
|
|
982
|
+
return Ft(t, d(), n);
|
|
983
983
|
}
|
|
984
|
-
const
|
|
984
|
+
const m = {
|
|
985
985
|
get: d,
|
|
986
986
|
set: l,
|
|
987
987
|
add: c,
|
|
988
988
|
clone: v
|
|
989
989
|
};
|
|
990
|
-
return
|
|
990
|
+
return m;
|
|
991
991
|
}
|
|
992
|
-
function ur(t, e, n, r, a, i, o, d, l, c, v,
|
|
992
|
+
function ur(t, e, n, r, a, i, o, d, l, c, v, m, f, g, h, k, y, p, u) {
|
|
993
993
|
const {
|
|
994
|
-
cross:
|
|
995
|
-
direction:
|
|
994
|
+
cross: b,
|
|
995
|
+
direction: D
|
|
996
996
|
} = t, M = ["INPUT", "SELECT", "TEXTAREA"], C = {
|
|
997
997
|
passive: !1
|
|
998
|
-
},
|
|
998
|
+
}, _ = je(), A = je(), F = ye(50, 225).constrain(g.measure(20)), E = {
|
|
999
999
|
mouse: 300,
|
|
1000
1000
|
touch: 400
|
|
1001
1001
|
}, N = {
|
|
1002
1002
|
mouse: 500,
|
|
1003
1003
|
touch: 600
|
|
1004
1004
|
}, z = h ? 43 : 25;
|
|
1005
|
-
let
|
|
1005
|
+
let R = !1, G = 0, $ = 0, B = !1, O = !1, te = !1, Q = !1;
|
|
1006
1006
|
function se(x) {
|
|
1007
|
-
if (!
|
|
1007
|
+
if (!u) return;
|
|
1008
1008
|
function P(Y) {
|
|
1009
|
-
(
|
|
1009
|
+
(ze(u) || u(x, Y)) && T(Y);
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
-
}, C).add(
|
|
1014
|
-
}).add(
|
|
1011
|
+
const U = e;
|
|
1012
|
+
_.add(U, "dragstart", (Y) => Y.preventDefault(), C).add(U, "touchmove", () => {
|
|
1013
|
+
}, C).add(U, "touchend", () => {
|
|
1014
|
+
}).add(U, "touchstart", P).add(U, "mousedown", P).add(U, "touchcancel", L).add(U, "contextmenu", L).add(U, "click", K, !0);
|
|
1015
1015
|
}
|
|
1016
1016
|
function ee() {
|
|
1017
|
-
|
|
1017
|
+
_.clear(), A.clear();
|
|
1018
1018
|
}
|
|
1019
1019
|
function ie() {
|
|
1020
1020
|
const x = Q ? n : e;
|
|
1021
|
-
|
|
1021
|
+
A.add(x, "touchmove", I, C).add(x, "touchend", L).add(x, "mousemove", I, C).add(x, "mouseup", L);
|
|
1022
1022
|
}
|
|
1023
1023
|
function ae(x) {
|
|
1024
1024
|
const P = x.nodeName || "";
|
|
@@ -1028,24 +1028,24 @@ function ur(t, e, n, r, a, i, o, d, l, c, v, u, f, g, h, k, y, p, m) {
|
|
|
1028
1028
|
return (h ? N : E)[Q ? "mouse" : "touch"];
|
|
1029
1029
|
}
|
|
1030
1030
|
function ue(x, P) {
|
|
1031
|
-
const
|
|
1032
|
-
return h || H(x) < F ? Y : y && P ? Y * 0.5 : v.byIndex(
|
|
1031
|
+
const U = m.add(et(x) * -1), Y = v.byDistance(x, !h).distance;
|
|
1032
|
+
return h || H(x) < F ? Y : y && P ? Y * 0.5 : v.byIndex(U.get(), 0).distance;
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function T(x) {
|
|
1035
1035
|
const P = Xe(x, r);
|
|
1036
|
-
Q = P, te = h && P && !x.buttons &&
|
|
1036
|
+
Q = P, te = h && P && !x.buttons && R, R = Ae(a.get(), o.get()) >= 2, !(P && x.button !== 0) && (ae(x.target) || (B = !0, i.pointerDown(x), c.useFriction(0).useDuration(0), a.set(o), ie(), G = i.readPoint(x), $ = i.readPoint(x, b), f.emit("pointerDown")));
|
|
1037
1037
|
}
|
|
1038
1038
|
function I(x) {
|
|
1039
|
-
if (!Xe(x, r) && x.touches.length >= 2) return
|
|
1040
|
-
const
|
|
1039
|
+
if (!Xe(x, r) && x.touches.length >= 2) return L(x);
|
|
1040
|
+
const U = i.readPoint(x), Y = i.readPoint(x, b), de = Ae(U, G), me = Ae(Y, $);
|
|
1041
1041
|
if (!O && !Q && (!x.cancelable || (O = de > me, !O)))
|
|
1042
|
-
return
|
|
1042
|
+
return L(x);
|
|
1043
1043
|
const he = i.pointerMove(x);
|
|
1044
|
-
de > k && (te = !0), c.useFriction(0.3).useDuration(0.75), d.start(), a.add(
|
|
1044
|
+
de > k && (te = !0), c.useFriction(0.3).useDuration(0.75), d.start(), a.add(D(he)), x.preventDefault();
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const
|
|
1048
|
-
O = !1, B = !1,
|
|
1046
|
+
function L(x) {
|
|
1047
|
+
const U = v.byDistance(0, !1).index !== m.get(), Y = i.pointerUp(x) * V(), de = ue(D(Y), U), me = ir(Y, de), he = z - 10 * me, pe = p + me / 50;
|
|
1048
|
+
O = !1, B = !1, A.clear(), c.useDuration(he).useFriction(pe), l.distance(de, !h), Q = !1, f.emit("pointerUp");
|
|
1049
1049
|
}
|
|
1050
1050
|
function K(x) {
|
|
1051
1051
|
te && (x.stopPropagation(), x.preventDefault(), te = !1);
|
|
@@ -1061,23 +1061,23 @@ function ur(t, e, n, r, a, i, o, d, l, c, v, u, f, g, h, k, y, p, m) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
function mr(t, e) {
|
|
1063
1063
|
let r, a;
|
|
1064
|
-
function i(
|
|
1065
|
-
return
|
|
1064
|
+
function i(m) {
|
|
1065
|
+
return m.timeStamp;
|
|
1066
1066
|
}
|
|
1067
|
-
function o(
|
|
1067
|
+
function o(m, f) {
|
|
1068
1068
|
const h = `client${(f || t.scroll) === "x" ? "X" : "Y"}`;
|
|
1069
|
-
return (Xe(
|
|
1069
|
+
return (Xe(m, e) ? m : m.touches[0])[h];
|
|
1070
1070
|
}
|
|
1071
|
-
function d(
|
|
1072
|
-
return r =
|
|
1071
|
+
function d(m) {
|
|
1072
|
+
return r = m, a = m, o(m);
|
|
1073
1073
|
}
|
|
1074
|
-
function l(
|
|
1075
|
-
const f = o(
|
|
1076
|
-
return a =
|
|
1074
|
+
function l(m) {
|
|
1075
|
+
const f = o(m) - o(a), g = i(m) - i(r) > 170;
|
|
1076
|
+
return a = m, g && (r = m), f;
|
|
1077
1077
|
}
|
|
1078
|
-
function c(
|
|
1078
|
+
function c(m) {
|
|
1079
1079
|
if (!r || !a) return 0;
|
|
1080
|
-
const f = o(a) - o(r), g = i(
|
|
1080
|
+
const f = o(a) - o(r), g = i(m) - i(r), h = i(m) - i(a) > 170, k = f / g;
|
|
1081
1081
|
return g && !h && H(k) > 0.1 ? k : 0;
|
|
1082
1082
|
}
|
|
1083
1083
|
return {
|
|
@@ -1118,31 +1118,31 @@ function gr(t) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
function hr(t, e, n, r, a, i, o) {
|
|
1120
1120
|
const d = [t].concat(r);
|
|
1121
|
-
let l, c, v = [],
|
|
1121
|
+
let l, c, v = [], m = !1;
|
|
1122
1122
|
function f(y) {
|
|
1123
1123
|
return a.measureSize(o.measure(y));
|
|
1124
1124
|
}
|
|
1125
1125
|
function g(y) {
|
|
1126
1126
|
if (!i) return;
|
|
1127
1127
|
c = f(t), v = r.map(f);
|
|
1128
|
-
function p(
|
|
1129
|
-
for (const
|
|
1130
|
-
if (
|
|
1131
|
-
const
|
|
1132
|
-
if (H(
|
|
1128
|
+
function p(u) {
|
|
1129
|
+
for (const b of u) {
|
|
1130
|
+
if (m) return;
|
|
1131
|
+
const D = b.target === t, M = r.indexOf(b.target), C = D ? c : v[M], _ = f(D ? t : r[M]);
|
|
1132
|
+
if (H(_ - C) >= 0.5) {
|
|
1133
1133
|
y.reInit(), e.emit("resize");
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
|
-
l = new ResizeObserver((
|
|
1139
|
-
(
|
|
1138
|
+
l = new ResizeObserver((u) => {
|
|
1139
|
+
(ze(i) || i(y, u)) && p(u);
|
|
1140
1140
|
}), n.requestAnimationFrame(() => {
|
|
1141
|
-
d.forEach((
|
|
1141
|
+
d.forEach((u) => l.observe(u));
|
|
1142
1142
|
});
|
|
1143
1143
|
}
|
|
1144
1144
|
function h() {
|
|
1145
|
-
|
|
1145
|
+
m = !0, l && l.disconnect();
|
|
1146
1146
|
}
|
|
1147
1147
|
return {
|
|
1148
1148
|
init: g,
|
|
@@ -1150,11 +1150,11 @@ function hr(t, e, n, r, a, i, o) {
|
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
1152
|
function fr(t, e, n, r, a, i) {
|
|
1153
|
-
let o = 0, d = 0, l = a, c = i, v = t.get(),
|
|
1153
|
+
let o = 0, d = 0, l = a, c = i, v = t.get(), m = 0;
|
|
1154
1154
|
function f() {
|
|
1155
|
-
const C = r.get() - t.get(),
|
|
1156
|
-
let
|
|
1157
|
-
return
|
|
1155
|
+
const C = r.get() - t.get(), _ = !l;
|
|
1156
|
+
let A = 0;
|
|
1157
|
+
return _ ? (o = 0, n.set(r), t.set(r), A = C) : (n.set(t), o += C / l, o *= c, v += o, t.add(o), A = v - m), d = et(A), m = v, M;
|
|
1158
1158
|
}
|
|
1159
1159
|
function g() {
|
|
1160
1160
|
const C = r.get() - e.get();
|
|
@@ -1170,15 +1170,15 @@ function fr(t, e, n, r, a, i) {
|
|
|
1170
1170
|
return o;
|
|
1171
1171
|
}
|
|
1172
1172
|
function p() {
|
|
1173
|
-
return
|
|
1173
|
+
return b(a);
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1175
|
+
function u() {
|
|
1176
|
+
return D(i);
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function b(C) {
|
|
1179
1179
|
return l = C, M;
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function D(C) {
|
|
1182
1182
|
return c = C, M;
|
|
1183
1183
|
}
|
|
1184
1184
|
const M = {
|
|
@@ -1187,10 +1187,10 @@ function fr(t, e, n, r, a, i) {
|
|
|
1187
1187
|
velocity: y,
|
|
1188
1188
|
seek: f,
|
|
1189
1189
|
settled: g,
|
|
1190
|
-
useBaseFriction:
|
|
1190
|
+
useBaseFriction: u,
|
|
1191
1191
|
useBaseDuration: p,
|
|
1192
|
-
useFriction:
|
|
1193
|
-
useDuration:
|
|
1192
|
+
useFriction: D,
|
|
1193
|
+
useDuration: b
|
|
1194
1194
|
};
|
|
1195
1195
|
return M;
|
|
1196
1196
|
}
|
|
@@ -1205,17 +1205,17 @@ function kr(t, e, n, r, a) {
|
|
|
1205
1205
|
const h = t.reachedMin(e.get()) ? "min" : "max", k = H(t[h] - e.get()), y = n.get() - e.get(), p = d.constrain(k / o);
|
|
1206
1206
|
n.subtract(y * p), !g && H(y) < i && (n.set(t.constrain(n.get())), r.useDuration(25).useBaseFriction());
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function m(g) {
|
|
1209
1209
|
l = !g;
|
|
1210
1210
|
}
|
|
1211
1211
|
return {
|
|
1212
1212
|
shouldConstrain: c,
|
|
1213
1213
|
constrain: v,
|
|
1214
|
-
toggleActive:
|
|
1214
|
+
toggleActive: m
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
1217
|
function yr(t, e, n, r, a) {
|
|
1218
|
-
const i = ye(-e + t, 0), o =
|
|
1218
|
+
const i = ye(-e + t, 0), o = m(), d = v(), l = f();
|
|
1219
1219
|
function c(h, k) {
|
|
1220
1220
|
return Ae(h, k) <= 1;
|
|
1221
1221
|
}
|
|
@@ -1223,13 +1223,13 @@ function yr(t, e, n, r, a) {
|
|
|
1223
1223
|
const h = o[0], k = le(o), y = o.lastIndexOf(h), p = o.indexOf(k) + 1;
|
|
1224
1224
|
return ye(y, p);
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function m() {
|
|
1227
1227
|
return n.map((h, k) => {
|
|
1228
1228
|
const {
|
|
1229
1229
|
min: y,
|
|
1230
1230
|
max: p
|
|
1231
|
-
} = i,
|
|
1232
|
-
return
|
|
1231
|
+
} = i, u = i.constrain(h), b = !k, D = tt(n, k);
|
|
1232
|
+
return b ? p : D || c(y, u) ? y : c(p, u) ? p : u;
|
|
1233
1233
|
}).map((h) => parseFloat(h.toFixed(3)));
|
|
1234
1234
|
}
|
|
1235
1235
|
function f() {
|
|
@@ -1288,8 +1288,8 @@ function Sr(t, e, n, r, a) {
|
|
|
1288
1288
|
endEdge: o
|
|
1289
1289
|
} = t, {
|
|
1290
1290
|
groupSlides: d
|
|
1291
|
-
} = a, l =
|
|
1292
|
-
function
|
|
1291
|
+
} = a, l = m().map(e.measure), c = f(), v = g();
|
|
1292
|
+
function m() {
|
|
1293
1293
|
return d(r).map((k) => le(k)[o] - k[0][i]).map(H);
|
|
1294
1294
|
}
|
|
1295
1295
|
function f() {
|
|
@@ -1313,14 +1313,14 @@ function xr(t, e, n, r, a, i) {
|
|
|
1313
1313
|
function v() {
|
|
1314
1314
|
const f = o(i), g = !t || e === "keepSnaps";
|
|
1315
1315
|
return n.length === 1 ? [i] : g ? f : f.slice(d, l).map((h, k, y) => {
|
|
1316
|
-
const p = !k,
|
|
1316
|
+
const p = !k, u = tt(y, k);
|
|
1317
1317
|
if (p) {
|
|
1318
|
-
const
|
|
1319
|
-
return
|
|
1318
|
+
const b = le(y[0]) + 1;
|
|
1319
|
+
return Ct(b);
|
|
1320
1320
|
}
|
|
1321
|
-
if (
|
|
1322
|
-
const
|
|
1323
|
-
return
|
|
1321
|
+
if (u) {
|
|
1322
|
+
const b = Fe(i) - le(y)[0] + 1;
|
|
1323
|
+
return Ct(b, le(y)[0]);
|
|
1324
1324
|
}
|
|
1325
1325
|
return h;
|
|
1326
1326
|
});
|
|
@@ -1339,10 +1339,10 @@ function Cr(t, e, n, r, a) {
|
|
|
1339
1339
|
return h.concat().sort((k, y) => H(k) - H(y))[0];
|
|
1340
1340
|
}
|
|
1341
1341
|
function c(h) {
|
|
1342
|
-
const k = t ? o(h) : d(h), y = e.map((
|
|
1343
|
-
diff: v(
|
|
1344
|
-
index:
|
|
1345
|
-
})).sort((
|
|
1342
|
+
const k = t ? o(h) : d(h), y = e.map((u, b) => ({
|
|
1343
|
+
diff: v(u - k, 0),
|
|
1344
|
+
index: b
|
|
1345
|
+
})).sort((u, b) => H(u.diff) - H(b.diff)), {
|
|
1346
1346
|
index: p
|
|
1347
1347
|
} = y[0];
|
|
1348
1348
|
return {
|
|
@@ -1354,10 +1354,10 @@ function Cr(t, e, n, r, a) {
|
|
|
1354
1354
|
const y = [h, h + n, h - n];
|
|
1355
1355
|
if (!t) return h;
|
|
1356
1356
|
if (!k) return l(y);
|
|
1357
|
-
const p = y.filter((
|
|
1357
|
+
const p = y.filter((u) => et(u) === k);
|
|
1358
1358
|
return p.length ? l(p) : le(y) - n;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function m(h, k) {
|
|
1361
1361
|
const y = e[h] - a.get(), p = v(y, k);
|
|
1362
1362
|
return {
|
|
1363
1363
|
index: h,
|
|
@@ -1367,13 +1367,13 @@ function Cr(t, e, n, r, a) {
|
|
|
1367
1367
|
function f(h, k) {
|
|
1368
1368
|
const y = a.get() + h, {
|
|
1369
1369
|
index: p,
|
|
1370
|
-
distance:
|
|
1371
|
-
} = c(y),
|
|
1372
|
-
if (!k ||
|
|
1370
|
+
distance: u
|
|
1371
|
+
} = c(y), b = !t && i(y);
|
|
1372
|
+
if (!k || b) return {
|
|
1373
1373
|
index: p,
|
|
1374
1374
|
distance: h
|
|
1375
1375
|
};
|
|
1376
|
-
const
|
|
1376
|
+
const D = e[p] - u, M = h + v(D, 0);
|
|
1377
1377
|
return {
|
|
1378
1378
|
index: p,
|
|
1379
1379
|
distance: M
|
|
@@ -1381,21 +1381,21 @@ function Cr(t, e, n, r, a) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
return {
|
|
1383
1383
|
byDistance: f,
|
|
1384
|
-
byIndex:
|
|
1384
|
+
byIndex: m,
|
|
1385
1385
|
shortcut: v
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
1388
|
function wr(t, e, n, r, a, i, o) {
|
|
1389
|
-
function d(
|
|
1390
|
-
const f =
|
|
1391
|
-
i.add(f), f && (r.duration() ? t.start() : (t.update(), t.render(1), t.update())), g && (n.set(e.get()), e.set(
|
|
1389
|
+
function d(m) {
|
|
1390
|
+
const f = m.distance, g = m.index !== e.get();
|
|
1391
|
+
i.add(f), f && (r.duration() ? t.start() : (t.update(), t.render(1), t.update())), g && (n.set(e.get()), e.set(m.index), o.emit("select"));
|
|
1392
1392
|
}
|
|
1393
|
-
function l(
|
|
1394
|
-
const g = a.byDistance(
|
|
1393
|
+
function l(m, f) {
|
|
1394
|
+
const g = a.byDistance(m, f);
|
|
1395
1395
|
d(g);
|
|
1396
1396
|
}
|
|
1397
|
-
function c(
|
|
1398
|
-
const g = e.clone().set(
|
|
1397
|
+
function c(m, f) {
|
|
1398
|
+
const g = e.clone().set(m), h = a.byIndex(g.get(), f);
|
|
1399
1399
|
d(h);
|
|
1400
1400
|
}
|
|
1401
1401
|
return {
|
|
@@ -1414,16 +1414,16 @@ function Ir(t, e, n, r, a, i, o, d) {
|
|
|
1414
1414
|
function h(k) {
|
|
1415
1415
|
if ((/* @__PURE__ */ new Date()).getTime() - c > 10) return;
|
|
1416
1416
|
o.emit("slideFocusStart"), t.scrollLeft = 0;
|
|
1417
|
-
const
|
|
1418
|
-
Qe(
|
|
1417
|
+
const u = n.findIndex((b) => b.includes(k));
|
|
1418
|
+
Qe(u) && (a.useDuration(0), r.index(u, 0), o.emit("slideFocus"));
|
|
1419
1419
|
}
|
|
1420
|
-
i.add(document, "keydown",
|
|
1420
|
+
i.add(document, "keydown", m, !1), e.forEach((k, y) => {
|
|
1421
1421
|
i.add(k, "focus", (p) => {
|
|
1422
|
-
(
|
|
1422
|
+
(ze(d) || d(g, p)) && h(y);
|
|
1423
1423
|
}, l);
|
|
1424
1424
|
});
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function m(g) {
|
|
1427
1427
|
g.code === "Tab" && (c = (/* @__PURE__ */ new Date()).getTime());
|
|
1428
1428
|
}
|
|
1429
1429
|
return {
|
|
@@ -1454,7 +1454,7 @@ function _e(t) {
|
|
|
1454
1454
|
subtract: i
|
|
1455
1455
|
};
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Et(t, e) {
|
|
1458
1458
|
const n = t.scroll === "x" ? o : d, r = e.style;
|
|
1459
1459
|
let a = null, i = !1;
|
|
1460
1460
|
function o(f) {
|
|
@@ -1481,65 +1481,65 @@ function Ft(t, e) {
|
|
|
1481
1481
|
};
|
|
1482
1482
|
}
|
|
1483
1483
|
function Dr(t, e, n, r, a, i, o, d, l) {
|
|
1484
|
-
const v = Me(a),
|
|
1485
|
-
function g(
|
|
1486
|
-
return
|
|
1484
|
+
const v = Me(a), m = Me(a).reverse(), f = p().concat(u());
|
|
1485
|
+
function g(_, A) {
|
|
1486
|
+
return _.reduce((F, E) => F - a[E], A);
|
|
1487
1487
|
}
|
|
1488
|
-
function h(
|
|
1489
|
-
return
|
|
1488
|
+
function h(_, A) {
|
|
1489
|
+
return _.reduce((F, E) => g(F, A) > 0 ? F.concat([E]) : F, []);
|
|
1490
1490
|
}
|
|
1491
|
-
function k(
|
|
1492
|
-
return i.map((
|
|
1493
|
-
start:
|
|
1494
|
-
end:
|
|
1491
|
+
function k(_) {
|
|
1492
|
+
return i.map((A, F) => ({
|
|
1493
|
+
start: A - r[F] + 0.5 + _,
|
|
1494
|
+
end: A + e - 0.5 + _
|
|
1495
1495
|
}));
|
|
1496
1496
|
}
|
|
1497
|
-
function y(
|
|
1498
|
-
const E = k(
|
|
1499
|
-
return
|
|
1500
|
-
const z = F ? 0 : -n,
|
|
1497
|
+
function y(_, A, F) {
|
|
1498
|
+
const E = k(A);
|
|
1499
|
+
return _.map((N) => {
|
|
1500
|
+
const z = F ? 0 : -n, R = F ? n : 0, G = F ? "end" : "start", $ = E[N][G];
|
|
1501
1501
|
return {
|
|
1502
1502
|
index: N,
|
|
1503
|
-
loopPoint:
|
|
1503
|
+
loopPoint: $,
|
|
1504
1504
|
slideLocation: _e(-1),
|
|
1505
|
-
translate:
|
|
1506
|
-
target: () => d.get() >
|
|
1505
|
+
translate: Et(t, l[N]),
|
|
1506
|
+
target: () => d.get() > $ ? z : R
|
|
1507
1507
|
};
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
function p() {
|
|
1511
|
-
const
|
|
1512
|
-
return y(
|
|
1511
|
+
const _ = o[0], A = h(m, _);
|
|
1512
|
+
return y(A, n, !1);
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1515
|
-
const
|
|
1516
|
-
return y(
|
|
1514
|
+
function u() {
|
|
1515
|
+
const _ = e - o[0] - 1, A = h(v, _);
|
|
1516
|
+
return y(A, -n, !0);
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function b() {
|
|
1519
1519
|
return f.every(({
|
|
1520
|
-
index:
|
|
1520
|
+
index: _
|
|
1521
1521
|
}) => {
|
|
1522
|
-
const
|
|
1523
|
-
return g(
|
|
1522
|
+
const A = v.filter((F) => F !== _);
|
|
1523
|
+
return g(A, e) <= 0.1;
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1527
|
-
f.forEach((
|
|
1526
|
+
function D() {
|
|
1527
|
+
f.forEach((_) => {
|
|
1528
1528
|
const {
|
|
1529
|
-
target:
|
|
1529
|
+
target: A,
|
|
1530
1530
|
translate: F,
|
|
1531
1531
|
slideLocation: E
|
|
1532
|
-
} =
|
|
1532
|
+
} = _, N = A();
|
|
1533
1533
|
N !== E.get() && (F.to(N), E.set(N));
|
|
1534
1534
|
});
|
|
1535
1535
|
}
|
|
1536
1536
|
function M() {
|
|
1537
|
-
f.forEach((
|
|
1537
|
+
f.forEach((_) => _.translate.clear());
|
|
1538
1538
|
}
|
|
1539
1539
|
return {
|
|
1540
|
-
canLoop:
|
|
1540
|
+
canLoop: b,
|
|
1541
1541
|
clear: M,
|
|
1542
|
-
loop:
|
|
1542
|
+
loop: D,
|
|
1543
1543
|
loopPoints: f
|
|
1544
1544
|
};
|
|
1545
1545
|
}
|
|
@@ -1548,14 +1548,14 @@ function _r(t, e, n) {
|
|
|
1548
1548
|
function i(l) {
|
|
1549
1549
|
if (!n) return;
|
|
1550
1550
|
function c(v) {
|
|
1551
|
-
for (const
|
|
1552
|
-
if (
|
|
1551
|
+
for (const m of v)
|
|
1552
|
+
if (m.type === "childList") {
|
|
1553
1553
|
l.reInit(), e.emit("slidesChanged");
|
|
1554
1554
|
break;
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
r = new MutationObserver((v) => {
|
|
1558
|
-
a || (
|
|
1558
|
+
a || (ze(n) || n(l, v)) && c(v);
|
|
1559
1559
|
}), r.observe(t, {
|
|
1560
1560
|
childList: !0
|
|
1561
1561
|
});
|
|
@@ -1585,18 +1585,18 @@ function Ar(t, e, n, r) {
|
|
|
1585
1585
|
function v() {
|
|
1586
1586
|
d && d.disconnect(), l = !0;
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1589
|
-
return
|
|
1588
|
+
function m(h) {
|
|
1589
|
+
return Le(a).reduce((k, y) => {
|
|
1590
1590
|
const p = parseInt(y), {
|
|
1591
|
-
isIntersecting:
|
|
1591
|
+
isIntersecting: u
|
|
1592
1592
|
} = a[p];
|
|
1593
|
-
return (h &&
|
|
1593
|
+
return (h && u || !h && !u) && k.push(p), k;
|
|
1594
1594
|
}, []);
|
|
1595
1595
|
}
|
|
1596
1596
|
function f(h = !0) {
|
|
1597
1597
|
if (h && i) return i;
|
|
1598
1598
|
if (!h && o) return o;
|
|
1599
|
-
const k =
|
|
1599
|
+
const k = m(h);
|
|
1600
1600
|
return h && (i = k), h || (o = k), k;
|
|
1601
1601
|
}
|
|
1602
1602
|
return {
|
|
@@ -1610,46 +1610,46 @@ function Mr(t, e, n, r, a, i) {
|
|
|
1610
1610
|
measureSize: o,
|
|
1611
1611
|
startEdge: d,
|
|
1612
1612
|
endEdge: l
|
|
1613
|
-
} = t, c = n[0] && a, v = h(),
|
|
1613
|
+
} = t, c = n[0] && a, v = h(), m = k(), f = n.map(o), g = y();
|
|
1614
1614
|
function h() {
|
|
1615
1615
|
if (!c) return 0;
|
|
1616
|
-
const
|
|
1617
|
-
return H(e[d] -
|
|
1616
|
+
const u = n[0];
|
|
1617
|
+
return H(e[d] - u[d]);
|
|
1618
1618
|
}
|
|
1619
1619
|
function k() {
|
|
1620
1620
|
if (!c) return 0;
|
|
1621
|
-
const
|
|
1622
|
-
return parseFloat(
|
|
1621
|
+
const u = i.getComputedStyle(le(r));
|
|
1622
|
+
return parseFloat(u.getPropertyValue(`margin-${l}`));
|
|
1623
1623
|
}
|
|
1624
1624
|
function y() {
|
|
1625
|
-
return n.map((
|
|
1626
|
-
const M = !
|
|
1627
|
-
return M ? f[
|
|
1625
|
+
return n.map((u, b, D) => {
|
|
1626
|
+
const M = !b, C = tt(D, b);
|
|
1627
|
+
return M ? f[b] + v : C ? f[b] + m : D[b + 1][d] - u[d];
|
|
1628
1628
|
}).map(H);
|
|
1629
1629
|
}
|
|
1630
1630
|
return {
|
|
1631
1631
|
slideSizes: f,
|
|
1632
1632
|
slideSizesWithGaps: g,
|
|
1633
1633
|
startGap: v,
|
|
1634
|
-
endGap:
|
|
1634
|
+
endGap: m
|
|
1635
1635
|
};
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function Lr(t, e, n, r, a, i, o, d, l) {
|
|
1638
1638
|
const {
|
|
1639
1639
|
startEdge: c,
|
|
1640
1640
|
endEdge: v,
|
|
1641
|
-
direction:
|
|
1641
|
+
direction: m
|
|
1642
1642
|
} = t, f = Qe(n);
|
|
1643
|
-
function g(p,
|
|
1644
|
-
return Me(p).filter((
|
|
1643
|
+
function g(p, u) {
|
|
1644
|
+
return Me(p).filter((b) => b % u === 0).map((b) => p.slice(b, b + u));
|
|
1645
1645
|
}
|
|
1646
1646
|
function h(p) {
|
|
1647
|
-
return p.length ? Me(p).reduce((
|
|
1648
|
-
const M = le(
|
|
1649
|
-
return
|
|
1650
|
-
}, []).map((
|
|
1651
|
-
const M = Math.max(
|
|
1652
|
-
return p.slice(M,
|
|
1647
|
+
return p.length ? Me(p).reduce((u, b, D) => {
|
|
1648
|
+
const M = le(u) || 0, C = M === 0, _ = b === Fe(p), A = a[c] - i[M][c], F = a[c] - i[b][v], E = !r && C ? m(o) : 0, N = !r && _ ? m(d) : 0, z = H(F - N - (A + E));
|
|
1649
|
+
return D && z > e + l && u.push(b), _ && u.push(p.length), u;
|
|
1650
|
+
}, []).map((u, b, D) => {
|
|
1651
|
+
const M = Math.max(D[b - 1] || 0);
|
|
1652
|
+
return p.slice(M, u);
|
|
1653
1653
|
}) : [];
|
|
1654
1654
|
}
|
|
1655
1655
|
function k(p) {
|
|
@@ -1659,38 +1659,38 @@ function jr(t, e, n, r, a, i, o, d, l) {
|
|
|
1659
1659
|
groupSlides: k
|
|
1660
1660
|
};
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function jr(t, e, n, r, a, i, o) {
|
|
1663
1663
|
const {
|
|
1664
1664
|
align: d,
|
|
1665
1665
|
axis: l,
|
|
1666
1666
|
direction: c,
|
|
1667
1667
|
startIndex: v,
|
|
1668
|
-
loop:
|
|
1668
|
+
loop: m,
|
|
1669
1669
|
duration: f,
|
|
1670
1670
|
dragFree: g,
|
|
1671
1671
|
dragThreshold: h,
|
|
1672
1672
|
inViewThreshold: k,
|
|
1673
1673
|
slidesToScroll: y,
|
|
1674
1674
|
skipSnaps: p,
|
|
1675
|
-
containScroll:
|
|
1676
|
-
watchResize:
|
|
1677
|
-
watchSlides:
|
|
1675
|
+
containScroll: u,
|
|
1676
|
+
watchResize: b,
|
|
1677
|
+
watchSlides: D,
|
|
1678
1678
|
watchDrag: M,
|
|
1679
1679
|
watchFocus: C
|
|
1680
|
-
} = i,
|
|
1680
|
+
} = i, _ = 2, A = pr(), F = A.measure(e), E = n.map(A.measure), N = cr(l, c), z = N.measureSize(F), R = gr(z), G = lr(d, z), $ = !m && !!u, B = m || !!u, {
|
|
1681
1681
|
slideSizes: O,
|
|
1682
1682
|
slideSizesWithGaps: te,
|
|
1683
1683
|
startGap: Q,
|
|
1684
1684
|
endGap: se
|
|
1685
|
-
} = Mr(N, F, E, n, B, a), ee =
|
|
1685
|
+
} = Mr(N, F, E, n, B, a), ee = Lr(N, z, y, m, F, E, Q, se, _), {
|
|
1686
1686
|
snaps: ie,
|
|
1687
1687
|
snapsAligned: ae
|
|
1688
|
-
} = Sr(N,
|
|
1688
|
+
} = Sr(N, G, F, E, ee), V = -le(ie) + le(te), {
|
|
1689
1689
|
snapsContained: ue,
|
|
1690
|
-
scrollContainLimit:
|
|
1691
|
-
} = yr(z, V, ae,
|
|
1692
|
-
limit:
|
|
1693
|
-
} = vr(V, I,
|
|
1690
|
+
scrollContainLimit: T
|
|
1691
|
+
} = yr(z, V, ae, u, _), I = $ ? ue : ae, {
|
|
1692
|
+
limit: L
|
|
1693
|
+
} = vr(V, I, m), K = Ft(Fe(I), v, m), q = K.clone(), W = Me(n), x = ({
|
|
1694
1694
|
dragHandler: ve,
|
|
1695
1695
|
scrollBody: We,
|
|
1696
1696
|
scrollBounds: Ue,
|
|
@@ -1704,63 +1704,63 @@ function Fr(t, e, n, r, a, i, o) {
|
|
|
1704
1704
|
translate: We,
|
|
1705
1705
|
location: Ue,
|
|
1706
1706
|
offsetLocation: Ee,
|
|
1707
|
-
previousLocation:
|
|
1708
|
-
scrollLooper:
|
|
1707
|
+
previousLocation: zt,
|
|
1708
|
+
scrollLooper: Rt,
|
|
1709
1709
|
slideLooper: Gt,
|
|
1710
|
-
dragHandler:
|
|
1710
|
+
dragHandler: $t,
|
|
1711
1711
|
animation: Wt,
|
|
1712
|
-
eventHandler:
|
|
1712
|
+
eventHandler: at,
|
|
1713
1713
|
scrollBounds: Ut,
|
|
1714
1714
|
options: {
|
|
1715
|
-
loop:
|
|
1715
|
+
loop: lt
|
|
1716
1716
|
}
|
|
1717
|
-
},
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1720
|
-
const
|
|
1721
|
-
Ee.set(
|
|
1722
|
-
},
|
|
1723
|
-
slideRegistry:
|
|
1724
|
-
} = xr(
|
|
1717
|
+
}, dt) => {
|
|
1718
|
+
const ct = ve.settled(), Ht = !Ut.shouldConstrain(), ut = lt ? ct : ct && Ht, mt = ut && !$t.pointerDown();
|
|
1719
|
+
mt && Wt.stop();
|
|
1720
|
+
const Ot = Ue.get() * dt + zt.get() * (1 - dt);
|
|
1721
|
+
Ee.set(Ot), lt && (Rt.loop(ve.direction()), Gt.loop()), We.to(Ee.get()), mt && at.emit("settle"), ut || at.emit("scroll");
|
|
1722
|
+
}, U = dr(r, a, () => x($e), (ve) => P($e, ve)), Y = 0.68, de = I[K.get()], me = _e(de), he = _e(de), pe = _e(de), fe = _e(de), Ce = fr(me, pe, he, fe, f, Y), Re = Cr(m, I, V, L, fe), Ge = wr(U, K, q, Ce, Re, fe, o), rt = Tr(L), st = je(), Bt = Ar(e, n, o, k), {
|
|
1723
|
+
slideRegistry: it
|
|
1724
|
+
} = xr($, u, I, T, ee, W), Pt = Ir(t, n, it, Ge, Ce, st, o, C), $e = {
|
|
1725
1725
|
ownerDocument: r,
|
|
1726
1726
|
ownerWindow: a,
|
|
1727
1727
|
eventHandler: o,
|
|
1728
1728
|
containerRect: F,
|
|
1729
1729
|
slideRects: E,
|
|
1730
|
-
animation:
|
|
1730
|
+
animation: U,
|
|
1731
1731
|
axis: N,
|
|
1732
|
-
dragHandler: ur(N, t, r, a, fe, mr(N, a), me,
|
|
1733
|
-
eventStore:
|
|
1734
|
-
percentOfView:
|
|
1732
|
+
dragHandler: ur(N, t, r, a, fe, mr(N, a), me, U, Ge, Ce, Re, K, o, R, g, h, p, Y, M),
|
|
1733
|
+
eventStore: st,
|
|
1734
|
+
percentOfView: R,
|
|
1735
1735
|
index: K,
|
|
1736
1736
|
indexPrevious: q,
|
|
1737
|
-
limit:
|
|
1737
|
+
limit: L,
|
|
1738
1738
|
location: me,
|
|
1739
1739
|
offsetLocation: pe,
|
|
1740
1740
|
previousLocation: he,
|
|
1741
1741
|
options: i,
|
|
1742
|
-
resizeHandler: hr(e, o, a, n, N,
|
|
1742
|
+
resizeHandler: hr(e, o, a, n, N, b, A),
|
|
1743
1743
|
scrollBody: Ce,
|
|
1744
|
-
scrollBounds: kr(
|
|
1745
|
-
scrollLooper: br(V,
|
|
1746
|
-
scrollProgress:
|
|
1747
|
-
scrollSnapList: I.map(
|
|
1744
|
+
scrollBounds: kr(L, pe, fe, Ce, R),
|
|
1745
|
+
scrollLooper: br(V, L, pe, [me, pe, he, fe]),
|
|
1746
|
+
scrollProgress: rt,
|
|
1747
|
+
scrollSnapList: I.map(rt.get),
|
|
1748
1748
|
scrollSnaps: I,
|
|
1749
|
-
scrollTarget:
|
|
1749
|
+
scrollTarget: Re,
|
|
1750
1750
|
scrollTo: Ge,
|
|
1751
1751
|
slideLooper: Dr(N, z, V, O, te, ie, I, pe, n),
|
|
1752
|
-
slideFocus:
|
|
1753
|
-
slidesHandler: _r(e, o,
|
|
1754
|
-
slidesInView:
|
|
1755
|
-
slideIndexes:
|
|
1756
|
-
slideRegistry:
|
|
1752
|
+
slideFocus: Pt,
|
|
1753
|
+
slidesHandler: _r(e, o, D),
|
|
1754
|
+
slidesInView: Bt,
|
|
1755
|
+
slideIndexes: W,
|
|
1756
|
+
slideRegistry: it,
|
|
1757
1757
|
slidesToScroll: ee,
|
|
1758
1758
|
target: fe,
|
|
1759
|
-
translate:
|
|
1759
|
+
translate: Et(N, e)
|
|
1760
1760
|
};
|
|
1761
|
-
return
|
|
1761
|
+
return $e;
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function Fr() {
|
|
1764
1764
|
let t = {}, e;
|
|
1765
1765
|
function n(c) {
|
|
1766
1766
|
e = c;
|
|
@@ -1775,7 +1775,7 @@ function Lr() {
|
|
|
1775
1775
|
return t[c] = r(c).concat([v]), l;
|
|
1776
1776
|
}
|
|
1777
1777
|
function o(c, v) {
|
|
1778
|
-
return t[c] = r(c).filter((
|
|
1778
|
+
return t[c] = r(c).filter((m) => m !== v), l;
|
|
1779
1779
|
}
|
|
1780
1780
|
function d() {
|
|
1781
1781
|
t = {};
|
|
@@ -1813,14 +1813,14 @@ const Er = {
|
|
|
1813
1813
|
};
|
|
1814
1814
|
function Nr(t) {
|
|
1815
1815
|
function e(i, o) {
|
|
1816
|
-
return
|
|
1816
|
+
return jt(i, o || {});
|
|
1817
1817
|
}
|
|
1818
1818
|
function n(i) {
|
|
1819
|
-
const o = i.breakpoints || {}, d =
|
|
1819
|
+
const o = i.breakpoints || {}, d = Le(o).filter((l) => t.matchMedia(l).matches).map((l) => o[l]).reduce((l, c) => e(l, c), {});
|
|
1820
1820
|
return e(i, d);
|
|
1821
1821
|
}
|
|
1822
1822
|
function r(i) {
|
|
1823
|
-
return i.map((o) =>
|
|
1823
|
+
return i.map((o) => Le(o.breakpoints || {})).reduce((o, d) => o.concat(d), []).map(t.matchMedia);
|
|
1824
1824
|
}
|
|
1825
1825
|
return {
|
|
1826
1826
|
mergeOptions: e,
|
|
@@ -1845,63 +1845,63 @@ function Br(t) {
|
|
|
1845
1845
|
destroy: r
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1849
|
-
const r = t.ownerDocument, a = r.defaultView, i = Nr(a), o = Br(i), d =
|
|
1848
|
+
function Pe(t, e, n) {
|
|
1849
|
+
const r = t.ownerDocument, a = r.defaultView, i = Nr(a), o = Br(i), d = je(), l = Fr(), {
|
|
1850
1850
|
mergeOptions: c,
|
|
1851
1851
|
optionsAtMedia: v,
|
|
1852
|
-
optionsMediaQueries:
|
|
1852
|
+
optionsMediaQueries: m
|
|
1853
1853
|
} = i, {
|
|
1854
1854
|
on: f,
|
|
1855
1855
|
off: g,
|
|
1856
1856
|
emit: h
|
|
1857
1857
|
} = l, k = N;
|
|
1858
|
-
let y = !1, p,
|
|
1859
|
-
function
|
|
1858
|
+
let y = !1, p, u = c(Er, Pe.globalOptions), b = c(u), D = [], M, C, _;
|
|
1859
|
+
function A() {
|
|
1860
1860
|
const {
|
|
1861
|
-
container:
|
|
1861
|
+
container: W,
|
|
1862
1862
|
slides: x
|
|
1863
|
-
} =
|
|
1864
|
-
C = (qe(
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1867
|
-
}
|
|
1868
|
-
function F(
|
|
1869
|
-
const x =
|
|
1870
|
-
if (
|
|
1871
|
-
const P = Object.assign({},
|
|
1863
|
+
} = b;
|
|
1864
|
+
C = (qe(W) ? t.querySelector(W) : W) || t.children[0];
|
|
1865
|
+
const U = qe(x) ? C.querySelectorAll(x) : x;
|
|
1866
|
+
_ = [].slice.call(U || C.children);
|
|
1867
|
+
}
|
|
1868
|
+
function F(W) {
|
|
1869
|
+
const x = jr(t, C, _, r, a, W, l);
|
|
1870
|
+
if (W.loop && !x.slideLooper.canLoop()) {
|
|
1871
|
+
const P = Object.assign({}, W, {
|
|
1872
1872
|
loop: !1
|
|
1873
1873
|
});
|
|
1874
1874
|
return F(P);
|
|
1875
1875
|
}
|
|
1876
1876
|
return x;
|
|
1877
1877
|
}
|
|
1878
|
-
function E(
|
|
1879
|
-
y || (
|
|
1878
|
+
function E(W, x) {
|
|
1879
|
+
y || (u = c(u, W), b = v(u), D = x || D, A(), p = F(b), m([u, ...D.map(({
|
|
1880
1880
|
options: P
|
|
1881
|
-
}) => P)]).forEach((P) => d.add(P, "change", N)),
|
|
1881
|
+
}) => P)]).forEach((P) => d.add(P, "change", N)), b.active && (p.translate.to(p.location.get()), p.animation.init(), p.slidesInView.init(), p.slideFocus.init(q), p.eventHandler.init(q), p.resizeHandler.init(q), p.slidesHandler.init(q), p.options.loop && p.slideLooper.loop(), C.offsetParent && _.length && p.dragHandler.init(q), M = o.init(q, D)));
|
|
1882
1882
|
}
|
|
1883
|
-
function N(
|
|
1883
|
+
function N(W, x) {
|
|
1884
1884
|
const P = ee();
|
|
1885
1885
|
z(), E(c({
|
|
1886
1886
|
startIndex: P
|
|
1887
|
-
},
|
|
1887
|
+
}, W), x), l.emit("reInit");
|
|
1888
1888
|
}
|
|
1889
1889
|
function z() {
|
|
1890
1890
|
p.dragHandler.destroy(), p.eventStore.clear(), p.translate.clear(), p.slideLooper.clear(), p.resizeHandler.destroy(), p.slidesHandler.destroy(), p.slidesInView.destroy(), p.animation.destroy(), o.destroy(), d.clear();
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function R() {
|
|
1893
1893
|
y || (y = !0, d.clear(), z(), l.emit("destroy"), l.clear());
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1896
|
-
!
|
|
1895
|
+
function G(W, x, P) {
|
|
1896
|
+
!b.active || y || (p.scrollBody.useBaseFriction().useDuration(x === !0 ? 0 : b.duration), p.scrollTo.index(W, P || 0));
|
|
1897
1897
|
}
|
|
1898
|
-
function W
|
|
1898
|
+
function $(W) {
|
|
1899
1899
|
const x = p.index.add(1).get();
|
|
1900
|
-
|
|
1900
|
+
G(x, W, -1);
|
|
1901
1901
|
}
|
|
1902
|
-
function B(
|
|
1902
|
+
function B(W) {
|
|
1903
1903
|
const x = p.index.add(-1).get();
|
|
1904
|
-
|
|
1904
|
+
G(x, W, 1);
|
|
1905
1905
|
}
|
|
1906
1906
|
function O() {
|
|
1907
1907
|
return p.index.add(1).get() !== ee();
|
|
@@ -1930,24 +1930,24 @@ function Be(t, e, n) {
|
|
|
1930
1930
|
function ue() {
|
|
1931
1931
|
return M;
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function T() {
|
|
1934
1934
|
return p;
|
|
1935
1935
|
}
|
|
1936
1936
|
function I() {
|
|
1937
1937
|
return t;
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function L() {
|
|
1940
1940
|
return C;
|
|
1941
1941
|
}
|
|
1942
1942
|
function K() {
|
|
1943
|
-
return
|
|
1943
|
+
return _;
|
|
1944
1944
|
}
|
|
1945
1945
|
const q = {
|
|
1946
1946
|
canScrollNext: O,
|
|
1947
1947
|
canScrollPrev: te,
|
|
1948
|
-
containerNode:
|
|
1949
|
-
internalEngine:
|
|
1950
|
-
destroy:
|
|
1948
|
+
containerNode: L,
|
|
1949
|
+
internalEngine: T,
|
|
1950
|
+
destroy: R,
|
|
1951
1951
|
off: g,
|
|
1952
1952
|
on: f,
|
|
1953
1953
|
emit: h,
|
|
@@ -1955,11 +1955,11 @@ function Be(t, e, n) {
|
|
|
1955
1955
|
previousScrollSnap: ie,
|
|
1956
1956
|
reInit: k,
|
|
1957
1957
|
rootNode: I,
|
|
1958
|
-
scrollNext:
|
|
1958
|
+
scrollNext: $,
|
|
1959
1959
|
scrollPrev: B,
|
|
1960
1960
|
scrollProgress: se,
|
|
1961
1961
|
scrollSnapList: Q,
|
|
1962
|
-
scrollTo:
|
|
1962
|
+
scrollTo: G,
|
|
1963
1963
|
selectedScrollSnap: ee,
|
|
1964
1964
|
slideNodes: K,
|
|
1965
1965
|
slidesInView: ae,
|
|
@@ -1967,7 +1967,7 @@ function Be(t, e, n) {
|
|
|
1967
1967
|
};
|
|
1968
1968
|
return E(e, n), setTimeout(() => l.emit("init"), 0), q;
|
|
1969
1969
|
}
|
|
1970
|
-
|
|
1970
|
+
Pe.globalOptions = void 0;
|
|
1971
1971
|
function nt(t = {}, e = []) {
|
|
1972
1972
|
const n = Ke(t), r = Ke(e), [a, i] = ne(), [o, d] = ne(), l = re(() => {
|
|
1973
1973
|
a && a.reInit(n.current, r.current);
|
|
@@ -1978,22 +1978,22 @@ function nt(t = {}, e = []) {
|
|
|
1978
1978
|
sr(r.current, e) || (r.current = e, l());
|
|
1979
1979
|
}, [e, l]), Z(() => {
|
|
1980
1980
|
if (rr() && o) {
|
|
1981
|
-
|
|
1982
|
-
const c =
|
|
1981
|
+
Pe.globalOptions = nt.globalOptions;
|
|
1982
|
+
const c = Pe(o, n.current, r.current);
|
|
1983
1983
|
return i(c), () => c.destroy();
|
|
1984
1984
|
} else
|
|
1985
1985
|
i(void 0);
|
|
1986
1986
|
}, [o, i]), [d, a];
|
|
1987
1987
|
}
|
|
1988
1988
|
nt.globalOptions = void 0;
|
|
1989
|
-
const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11",
|
|
1989
|
+
const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Rr = "_slides_1bu1s_17", Gr = "_slide_1bu1s_17", $r = "_slideInner_1bu1s_37", Wr = "_loaderOverlay_1bu1s_45", Ur = "_image_1bu1s_55", Hr = "_loaded_1bu1s_66", Or = "_empty_1bu1s_78", Vr = "_controls_1bu1s_84", Kr = "_arrows_1bu1s_94", Yr = "_dots_1bu1s_104", qr = "_dot_1bu1s_104", Xr = "_dotActive_1bu1s_130", X = {
|
|
1990
1990
|
carouselContainer: Pr,
|
|
1991
1991
|
viewport: zr,
|
|
1992
|
-
slides:
|
|
1993
|
-
slide:
|
|
1994
|
-
slideInner:
|
|
1995
|
-
loaderOverlay:
|
|
1996
|
-
image:
|
|
1992
|
+
slides: Rr,
|
|
1993
|
+
slide: Gr,
|
|
1994
|
+
slideInner: $r,
|
|
1995
|
+
loaderOverlay: Wr,
|
|
1996
|
+
image: Ur,
|
|
1997
1997
|
loaded: Hr,
|
|
1998
1998
|
empty: Or,
|
|
1999
1999
|
controls: Vr,
|
|
@@ -2014,23 +2014,23 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2014
2014
|
"data-color": c,
|
|
2015
2015
|
"data-size": v
|
|
2016
2016
|
}) => {
|
|
2017
|
-
const
|
|
2017
|
+
const m = {
|
|
2018
2018
|
loop: !0,
|
|
2019
2019
|
align: "start",
|
|
2020
2020
|
containScroll: "trimSnaps",
|
|
2021
2021
|
slidesToScroll: 1
|
|
2022
|
-
}, [f, g] = nt(
|
|
2022
|
+
}, [f, g] = nt(m), [h, k] = ne(0), [y, p] = ne([]), [u, b] = ne([]);
|
|
2023
2023
|
Z(() => {
|
|
2024
|
-
|
|
2024
|
+
b(new Array((t == null ? void 0 : t.length) || 0).fill(!1));
|
|
2025
2025
|
}, [t]);
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2028
|
-
const
|
|
2029
|
-
return
|
|
2026
|
+
const D = re((R) => {
|
|
2027
|
+
b((G) => {
|
|
2028
|
+
const $ = [...G];
|
|
2029
|
+
return $[R] = !0, $;
|
|
2030
2030
|
});
|
|
2031
2031
|
}, []), M = Se(() => n * 1e3, [n]), C = re(() => {
|
|
2032
2032
|
g && k(g.selectedScrollSnap());
|
|
2033
|
-
}, [g]),
|
|
2033
|
+
}, [g]), _ = re((R) => g && g.scrollTo(R), [g]), A = re(() => g && g.scrollPrev(), [g]), F = re(() => g && g.scrollNext(), [g]);
|
|
2034
2034
|
Z(() => {
|
|
2035
2035
|
if (g)
|
|
2036
2036
|
return g.on("select", C), g.on("reInit", C), p(g.scrollSnapList()), () => {
|
|
@@ -2040,11 +2040,11 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2040
2040
|
g && (g.reInit(), p(g.scrollSnapList()));
|
|
2041
2041
|
}, [g, t, o, d]), Z(() => {
|
|
2042
2042
|
if (!e || !g || !t || t.length <= 1) return;
|
|
2043
|
-
const
|
|
2043
|
+
const R = window.setInterval(() => {
|
|
2044
2044
|
g.canScrollNext() && g.scrollNext();
|
|
2045
2045
|
}, M);
|
|
2046
2046
|
return () => {
|
|
2047
|
-
window.clearInterval(
|
|
2047
|
+
window.clearInterval(R);
|
|
2048
2048
|
};
|
|
2049
2049
|
}, [e, M, g, t]);
|
|
2050
2050
|
const E = Math.max(1, o), N = `${100 / E}%`, z = d / 2;
|
|
@@ -2064,7 +2064,7 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2064
2064
|
marginLeft: `-${z}px`,
|
|
2065
2065
|
marginRight: `-${z}px`
|
|
2066
2066
|
},
|
|
2067
|
-
children: t && t.length > 0 ? t.map((
|
|
2067
|
+
children: t && t.length > 0 ? t.map((R, G) => /* @__PURE__ */ s(
|
|
2068
2068
|
"div",
|
|
2069
2069
|
{
|
|
2070
2070
|
className: X.slide,
|
|
@@ -2077,24 +2077,24 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2077
2077
|
// Ensure radius clips content
|
|
2078
2078
|
},
|
|
2079
2079
|
children: /* @__PURE__ */ w("div", { className: X.slideInner, style: { borderRadius: `${l}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
2080
|
-
!
|
|
2080
|
+
!u[G] && /* @__PURE__ */ s("div", { className: X.loaderOverlay, children: /* @__PURE__ */ s(Jr, { "aria-label": "Laster bilde" }) }),
|
|
2081
2081
|
/* @__PURE__ */ s(
|
|
2082
2082
|
"img",
|
|
2083
2083
|
{
|
|
2084
|
-
className: `${X.image} ${
|
|
2085
|
-
src:
|
|
2086
|
-
alt:
|
|
2087
|
-
loading:
|
|
2084
|
+
className: `${X.image} ${u[G] ? X.loaded : X.loadingImage}`,
|
|
2085
|
+
src: R.src,
|
|
2086
|
+
alt: R.alt,
|
|
2087
|
+
loading: G < E ? "eager" : "lazy",
|
|
2088
2088
|
crossOrigin: "anonymous",
|
|
2089
|
-
onLoad: () =>
|
|
2090
|
-
onError: (
|
|
2091
|
-
|
|
2089
|
+
onLoad: () => D(G),
|
|
2090
|
+
onError: ($) => {
|
|
2091
|
+
$.target.style.display = "none", D(G);
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
)
|
|
2095
2095
|
] })
|
|
2096
2096
|
},
|
|
2097
|
-
`image-${
|
|
2097
|
+
`image-${G}-${R.src}`
|
|
2098
2098
|
)) : /* @__PURE__ */ s("div", { className: X.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ s("div", { className: X.empty, children: "Ingen bilder" }) })
|
|
2099
2099
|
}
|
|
2100
2100
|
) }),
|
|
@@ -2106,7 +2106,7 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2106
2106
|
variant: "primary",
|
|
2107
2107
|
icon: !0,
|
|
2108
2108
|
"aria-label": "Forrige bilde",
|
|
2109
|
-
onClick:
|
|
2109
|
+
onClick: A,
|
|
2110
2110
|
disabled: !t || t.length <= 1,
|
|
2111
2111
|
children: /* @__PURE__ */ s(Xn, { "aria-hidden": !0 })
|
|
2112
2112
|
}
|
|
@@ -2123,19 +2123,19 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2123
2123
|
}
|
|
2124
2124
|
)
|
|
2125
2125
|
] }),
|
|
2126
|
-
a && t && t.length > 1 && /* @__PURE__ */ s("div", { className: X.dots, role: "tablist", "aria-label": "Bildeposisjon", children: y.map((
|
|
2127
|
-
const
|
|
2126
|
+
a && t && t.length > 1 && /* @__PURE__ */ s("div", { className: X.dots, role: "tablist", "aria-label": "Bildeposisjon", children: y.map((R, G) => {
|
|
2127
|
+
const $ = G === h;
|
|
2128
2128
|
return /* @__PURE__ */ s(
|
|
2129
2129
|
"button",
|
|
2130
2130
|
{
|
|
2131
2131
|
type: "button",
|
|
2132
|
-
className: `${X.dot} ${
|
|
2133
|
-
onClick: () =>
|
|
2134
|
-
"aria-label": `Gå til bilde ${
|
|
2135
|
-
"aria-selected":
|
|
2132
|
+
className: `${X.dot} ${$ ? X.dotActive : ""}`,
|
|
2133
|
+
onClick: () => _(G),
|
|
2134
|
+
"aria-label": `Gå til bilde ${G + 1}`,
|
|
2135
|
+
"aria-selected": $,
|
|
2136
2136
|
role: "tab"
|
|
2137
2137
|
},
|
|
2138
|
-
`dot-${
|
|
2138
|
+
`dot-${G}`
|
|
2139
2139
|
);
|
|
2140
2140
|
}) })
|
|
2141
2141
|
] })
|
|
@@ -2144,24 +2144,24 @@ const Pr = "_carouselContainer_1bu1s_1", zr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2144
2144
|
);
|
|
2145
2145
|
};
|
|
2146
2146
|
Zr.displayName = "Carousel";
|
|
2147
|
-
const
|
|
2147
|
+
const Vi = dn, Ki = cn, Yi = un, J = mn, qi = pn, Xi = gn, Qr = hn, es = fn;
|
|
2148
2148
|
Qr.displayName = "Field.Description";
|
|
2149
2149
|
es.displayName = "Field.Counter";
|
|
2150
|
-
const
|
|
2150
|
+
const Ji = It, ts = ge((t, e) => /* @__PURE__ */ s(kn, { ref: e, ...t }));
|
|
2151
2151
|
ts.displayName = "Heading";
|
|
2152
|
-
const
|
|
2152
|
+
const Zi = yn, ns = ge((t, e) => /* @__PURE__ */ s(vn, { ref: e, ...t }));
|
|
2153
2153
|
ns.displayName = "Label";
|
|
2154
|
-
const ce = bn,
|
|
2154
|
+
const ce = bn, Qi = Tn, ea = Sn, ta = xn, Je = ge(
|
|
2155
2155
|
(t, e) => /* @__PURE__ */ s(Cn, { ref: e, ...t })
|
|
2156
2156
|
);
|
|
2157
2157
|
Je.displayName = "Paragraph";
|
|
2158
|
-
const
|
|
2159
|
-
Button:
|
|
2158
|
+
const na = wn, oa = In, ra = Dn, Ne = Object.assign(_n, {
|
|
2159
|
+
Button: Ln,
|
|
2160
2160
|
ClearButton: Mn,
|
|
2161
2161
|
Input: An
|
|
2162
|
-
}),
|
|
2162
|
+
}), sa = jn, ia = Fn, aa = En, os = Nn;
|
|
2163
2163
|
os.displayName = "Suggestion";
|
|
2164
|
-
const
|
|
2164
|
+
const Ve = Bn, la = Pn, da = zn, ca = Rn, ua = Gn, ma = $n, pa = Wn, ga = Un, rs = ge((t, e) => /* @__PURE__ */ s(Hn, { ref: e, ...t }));
|
|
2165
2165
|
rs.displayName = "ValidationMessage";
|
|
2166
2166
|
const ss = {
|
|
2167
2167
|
NO: {
|
|
@@ -4120,7 +4120,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4120
4120
|
}
|
|
4121
4121
|
}
|
|
4122
4122
|
}
|
|
4123
|
-
},
|
|
4123
|
+
}, ot = Kt(void 0), ha = ({ children: t }) => {
|
|
4124
4124
|
const [e, n] = ne("NO"), r = (a) => {
|
|
4125
4125
|
const i = a.split(".");
|
|
4126
4126
|
let o = ss[e];
|
|
@@ -4131,13 +4131,59 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4131
4131
|
}
|
|
4132
4132
|
return o;
|
|
4133
4133
|
};
|
|
4134
|
-
return /* @__PURE__ */ s(
|
|
4135
|
-
},
|
|
4136
|
-
const t =
|
|
4134
|
+
return /* @__PURE__ */ s(ot.Provider, { value: { language: e, setLanguage: n, t: r }, children: t });
|
|
4135
|
+
}, fa = () => {
|
|
4136
|
+
const t = wt(ot);
|
|
4137
4137
|
if (t === void 0)
|
|
4138
4138
|
throw new Error("useLanguage must be used within a LanguageProvider");
|
|
4139
4139
|
return t;
|
|
4140
|
-
},
|
|
4140
|
+
}, Nt = () => {
|
|
4141
|
+
const t = wt(ot);
|
|
4142
|
+
return t === void 0 ? {
|
|
4143
|
+
language: "NO",
|
|
4144
|
+
setLanguage: () => {
|
|
4145
|
+
console.warn("LanguageProvider is not available. Language changes will not work.");
|
|
4146
|
+
},
|
|
4147
|
+
t: (e) => ({
|
|
4148
|
+
// Header translations
|
|
4149
|
+
"header.darkMode": "Mørk modus",
|
|
4150
|
+
"header.language": "Språk",
|
|
4151
|
+
"header.selectLanguage": "Velg språk",
|
|
4152
|
+
"header.homeAriaLabel": "Norges Røde Kors Hjem",
|
|
4153
|
+
"header.login": "Logg inn",
|
|
4154
|
+
"header.search": "Søk",
|
|
4155
|
+
"header.close": "Lukk",
|
|
4156
|
+
"header.closeSearch": "Lukk søk",
|
|
4157
|
+
"header.openSearch": "Åpne søk",
|
|
4158
|
+
"header.menu": "Meny",
|
|
4159
|
+
"header.closeMenu": "Lukk meny",
|
|
4160
|
+
"header.openMenu": "Åpne meny",
|
|
4161
|
+
"header.supportUs": "Støtt oss",
|
|
4162
|
+
"header.toggleTheme": "Bytt tema",
|
|
4163
|
+
"header.searchPlaceholder": "Søk...",
|
|
4164
|
+
"header.clearSearch": "Tøm søk",
|
|
4165
|
+
"header.suggestions": "Forslag",
|
|
4166
|
+
"header.viewAll": "Se alle",
|
|
4167
|
+
"header.noResults": "Ingen resultater for",
|
|
4168
|
+
// Footer translations
|
|
4169
|
+
"footer.shortcuts": "Snarveier",
|
|
4170
|
+
"footer.shortcutsLinks.services": "Tilbudene",
|
|
4171
|
+
"footer.shortcutsLinks.volunteer": "Bli frivillig",
|
|
4172
|
+
"footer.shortcutsLinks.ourWork": "Vårt arbeid",
|
|
4173
|
+
"footer.shortcutsLinks.about": "Om Røde Kors",
|
|
4174
|
+
"footer.shortcutsLinks.support": "Støtt arbeidet",
|
|
4175
|
+
"footer.shortcutsLinks.contact": "Kontakt oss",
|
|
4176
|
+
"footer.contact.visitingAddress": "Besøks adresse",
|
|
4177
|
+
"footer.contact.organizationNumber": "Organisasjonsnummer",
|
|
4178
|
+
"footer.contact.email": "E-post",
|
|
4179
|
+
"footer.copyright": "Rødekors",
|
|
4180
|
+
"footer.legal.privacy": "Personvern",
|
|
4181
|
+
"footer.legal.press": "For presse",
|
|
4182
|
+
"footer.legal.procurement": "Regler for innkjøp",
|
|
4183
|
+
"footer.legal.whistleblowing": "Varsling/Misconduct"
|
|
4184
|
+
})[e] || e
|
|
4185
|
+
} : t;
|
|
4186
|
+
}, is = "_header_ymzss_1", as = "_languageSwitch_ymzss_36", ls = "_searchOverlay_ymzss_40", ds = "_headerExtension_ymzss_45", cs = "_extensionContentWrapper_ymzss_73", us = "_extensionContent_ymzss_73", ms = "_extensionDivider_ymzss_100", ps = "_languageLabel_ymzss_124", gs = "_languageLink_ymzss_140", hs = "_headerInner_ymzss_175", fs = "_logoWrapper_ymzss_192", ks = "_logo_ymzss_192", ys = "_secondaryLogoWrapper_ymzss_215", vs = "_slotComponent_ymzss_224", bs = "_slotContainer_ymzss_234", Ts = "_slotText_ymzss_242", Ss = "_secondaryLogo_ymzss_215", xs = "_redCrossLogo_ymzss_269", Cs = "_primaryLogo_ymzss_275", ws = "_navItems_ymzss_279", Is = "_navLink_ymzss_288", Ds = "_actions_ymzss_301", _s = "_ctaButton_ymzss_309", As = "_themeToggle_ymzss_314", Ms = "_userInfo_ymzss_319", Ls = "_userName_ymzss_325", js = "_loginLink_ymzss_332", Fs = "_loginText_ymzss_341", Es = "_underline_ymzss_348", Ns = "_searchButtonWrapper_ymzss_354", Bs = "_buttonText_ymzss_358", Ps = "_menuButton_ymzss_363", zs = "_menuOverlay_ymzss_368", Rs = "_searchContent_ymzss_402", Gs = "_menuContent_ymzss_412", $s = "_menuLeftColumn_ymzss_421", Ws = "_menuRightColumn_ymzss_427", Us = "_slotContent_ymzss_441", Hs = "_navList_ymzss_454", Os = "_menuUtilities_ymzss_461", Vs = "_menuBrand_ymzss_468", Ks = "_suggestionsSection_ymzss_472", Ys = "_suggestionsTitle_ymzss_478", qs = "_searchResults_ymzss_487", Xs = "_resultList_ymzss_493", Js = "_resultItem_ymzss_499", Zs = "_resultLink_ymzss_507", Qs = "_suggestionIcon_ymzss_521", ei = "_suggestionText_ymzss_534", ti = "_highlightedText_ymzss_541", ni = "_remainingText_ymzss_546", oi = "_viewAllLink_ymzss_559", ri = "_noResults_ymzss_594", S = {
|
|
4141
4187
|
header: is,
|
|
4142
4188
|
languageSwitch: as,
|
|
4143
4189
|
searchOverlay: ls,
|
|
@@ -4163,19 +4209,19 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4163
4209
|
ctaButton: _s,
|
|
4164
4210
|
themeToggle: As,
|
|
4165
4211
|
userInfo: Ms,
|
|
4166
|
-
userName:
|
|
4167
|
-
loginLink:
|
|
4168
|
-
loginText:
|
|
4212
|
+
userName: Ls,
|
|
4213
|
+
loginLink: js,
|
|
4214
|
+
loginText: Fs,
|
|
4169
4215
|
underline: Es,
|
|
4170
4216
|
searchButtonWrapper: Ns,
|
|
4171
4217
|
buttonText: Bs,
|
|
4172
4218
|
menuButton: Ps,
|
|
4173
4219
|
menuOverlay: zs,
|
|
4174
|
-
searchContent:
|
|
4175
|
-
menuContent:
|
|
4176
|
-
menuLeftColumn:
|
|
4177
|
-
menuRightColumn:
|
|
4178
|
-
slotContent:
|
|
4220
|
+
searchContent: Rs,
|
|
4221
|
+
menuContent: Gs,
|
|
4222
|
+
menuLeftColumn: $s,
|
|
4223
|
+
menuRightColumn: Ws,
|
|
4224
|
+
slotContent: Us,
|
|
4179
4225
|
navList: Hs,
|
|
4180
4226
|
menuUtilities: Os,
|
|
4181
4227
|
menuBrand: Vs,
|
|
@@ -4254,7 +4300,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4254
4300
|
{ id: "komponent-kreasjon", title: "Komponent Kreasjon", category: "Code", path: "code/komponent-kreasjon", description: "Opprette nye komponenter" },
|
|
4255
4301
|
{ id: "progression", title: "Progresjon", category: "Code", path: "code/progression", description: "Fra design til ferdig komponent" },
|
|
4256
4302
|
{ id: "metadata-files", title: "Metadata filer", category: "Code", path: "code/metadata-files", description: "Struktur og bruk av metadata.json" }
|
|
4257
|
-
],
|
|
4303
|
+
], ka = ({
|
|
4258
4304
|
"data-color": t = "primary",
|
|
4259
4305
|
activePage: e,
|
|
4260
4306
|
setPage: n,
|
|
@@ -4266,24 +4312,24 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4266
4312
|
ctaLabel: l,
|
|
4267
4313
|
ctaIcon: c = /* @__PURE__ */ s(Qn, { "aria-hidden": !0 }),
|
|
4268
4314
|
onCtaClick: v,
|
|
4269
|
-
showThemeToggle:
|
|
4315
|
+
showThemeToggle: m = !1,
|
|
4270
4316
|
secondaryLogo: f = !1,
|
|
4271
4317
|
secondaryLogoSrc: g,
|
|
4272
4318
|
secondaryLogoSrcDark: h,
|
|
4273
4319
|
secondaryLogoAlt: k = "Secondary Logo",
|
|
4274
4320
|
navItems: y,
|
|
4275
4321
|
showNavItems: p = !0,
|
|
4276
|
-
showMenuButton:
|
|
4277
|
-
showHeaderExtension:
|
|
4278
|
-
showModeToggle:
|
|
4322
|
+
showMenuButton: u = !0,
|
|
4323
|
+
showHeaderExtension: b = !1,
|
|
4324
|
+
showModeToggle: D = !1,
|
|
4279
4325
|
showLanguageSwitch: M = !1
|
|
4280
4326
|
}) => {
|
|
4281
|
-
const [C,
|
|
4327
|
+
const [C, _] = ne(!1), [A, F] = ne(!1), [E, N] = ne(""), [z, R] = ne("light"), { language: G, setLanguage: $, t: B } = Nt(), [O, te] = ne(!1);
|
|
4282
4328
|
Z(() => {
|
|
4283
|
-
const
|
|
4284
|
-
if (typeof document > "u" || document.getElementById(
|
|
4285
|
-
const I = ii(S),
|
|
4286
|
-
|
|
4329
|
+
const T = "rk-header-inline-styles";
|
|
4330
|
+
if (typeof document > "u" || document.getElementById(T)) return;
|
|
4331
|
+
const I = ii(S), L = document.createElement("style");
|
|
4332
|
+
L.id = T, L.textContent = I, document.head.appendChild(L);
|
|
4287
4333
|
}, []);
|
|
4288
4334
|
const Q = () => /* @__PURE__ */ w(
|
|
4289
4335
|
"svg",
|
|
@@ -4311,89 +4357,89 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4311
4357
|
}
|
|
4312
4358
|
);
|
|
4313
4359
|
Z(() => {
|
|
4314
|
-
|
|
4360
|
+
_(!1), F(!1), N("");
|
|
4315
4361
|
}, [e]), Z(() => {
|
|
4316
4362
|
if (!(typeof document > "u") && C && O) {
|
|
4317
|
-
const
|
|
4363
|
+
const T = document.body.style.overflow;
|
|
4318
4364
|
return document.body.style.overflow = "hidden", () => {
|
|
4319
|
-
document.body.style.overflow =
|
|
4365
|
+
document.body.style.overflow = T;
|
|
4320
4366
|
};
|
|
4321
4367
|
}
|
|
4322
4368
|
}, [C, O]), Z(() => {
|
|
4323
4369
|
if (typeof window > "u" || typeof window.matchMedia > "u") return;
|
|
4324
|
-
const
|
|
4325
|
-
return I(
|
|
4326
|
-
|
|
4370
|
+
const T = window.matchMedia("(max-width: 850px)"), I = (L) => te("matches" in L ? L.matches : T.matches);
|
|
4371
|
+
return I(T), T.addEventListener ? T.addEventListener("change", I) : T.addListener(I), () => {
|
|
4372
|
+
T.removeEventListener ? T.removeEventListener("change", I) : T.removeListener(I);
|
|
4327
4373
|
};
|
|
4328
4374
|
}, []), Z(() => {
|
|
4329
4375
|
if (typeof document > "u") return;
|
|
4330
|
-
const
|
|
4331
|
-
if (!
|
|
4376
|
+
const T = document.querySelector(`.${S.header}`);
|
|
4377
|
+
if (!T) return;
|
|
4332
4378
|
const I = () => {
|
|
4333
|
-
const K =
|
|
4379
|
+
const K = T.offsetHeight;
|
|
4334
4380
|
document.documentElement.style.setProperty("--header-height-mobile", `${K}px`);
|
|
4335
4381
|
};
|
|
4336
4382
|
I(), window.addEventListener("resize", I);
|
|
4337
|
-
const
|
|
4383
|
+
const L = new ResizeObserver(() => {
|
|
4338
4384
|
I();
|
|
4339
4385
|
});
|
|
4340
|
-
return
|
|
4341
|
-
window.removeEventListener("resize", I),
|
|
4386
|
+
return L.observe(T), () => {
|
|
4387
|
+
window.removeEventListener("resize", I), L.disconnect();
|
|
4342
4388
|
};
|
|
4343
4389
|
}, [O]), Z(() => {
|
|
4344
4390
|
if (typeof document > "u") return;
|
|
4345
|
-
const
|
|
4346
|
-
if (!
|
|
4391
|
+
const T = document.querySelector(`.${S.logoWrapper}`);
|
|
4392
|
+
if (!T) return;
|
|
4347
4393
|
const I = () => {
|
|
4348
|
-
const
|
|
4349
|
-
document.documentElement.style.setProperty("--rk-logo-width", `${
|
|
4394
|
+
const L = T.offsetWidth;
|
|
4395
|
+
document.documentElement.style.setProperty("--rk-logo-width", `${L}px`);
|
|
4350
4396
|
};
|
|
4351
4397
|
return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
4352
4398
|
}, [O]), Z(() => {
|
|
4353
|
-
if (typeof document > "u" || !
|
|
4399
|
+
if (typeof document > "u" || !A) {
|
|
4354
4400
|
document.documentElement.style.setProperty("--rk-search-overlay-height", "0px");
|
|
4355
4401
|
return;
|
|
4356
4402
|
}
|
|
4357
|
-
const
|
|
4358
|
-
if (!
|
|
4403
|
+
const T = document.querySelector(`.${S.searchOverlay}`);
|
|
4404
|
+
if (!T) return;
|
|
4359
4405
|
const I = () => {
|
|
4360
|
-
const K =
|
|
4406
|
+
const K = T.offsetHeight;
|
|
4361
4407
|
document.documentElement.style.setProperty("--rk-search-overlay-height", `${K}px`);
|
|
4362
4408
|
};
|
|
4363
4409
|
requestAnimationFrame(I), window.addEventListener("resize", I);
|
|
4364
|
-
const
|
|
4365
|
-
return
|
|
4366
|
-
window.removeEventListener("resize", I),
|
|
4410
|
+
const L = new ResizeObserver(I);
|
|
4411
|
+
return L.observe(T), () => {
|
|
4412
|
+
window.removeEventListener("resize", I), L.disconnect();
|
|
4367
4413
|
};
|
|
4368
|
-
}, [
|
|
4414
|
+
}, [A]);
|
|
4369
4415
|
const se = () => {
|
|
4370
|
-
const
|
|
4371
|
-
|
|
4372
|
-
}, ee = (
|
|
4373
|
-
n && (
|
|
4416
|
+
const T = z === "light" ? "dark" : "light";
|
|
4417
|
+
R(T), document.documentElement.setAttribute("data-color-scheme", T);
|
|
4418
|
+
}, ee = (T) => {
|
|
4419
|
+
n && (T.preventDefault(), n("home")), _(!1), F(!1);
|
|
4374
4420
|
}, ie = () => {
|
|
4375
|
-
|
|
4376
|
-
const
|
|
4377
|
-
if (
|
|
4378
|
-
const I =
|
|
4421
|
+
_(!C), A && F(!1), !C && typeof document < "u" && requestAnimationFrame(() => {
|
|
4422
|
+
const T = document.querySelector(`.${S.header}`);
|
|
4423
|
+
if (T) {
|
|
4424
|
+
const I = T.offsetHeight;
|
|
4379
4425
|
document.documentElement.style.setProperty("--header-height-mobile", `${I}px`);
|
|
4380
4426
|
}
|
|
4381
4427
|
});
|
|
4382
4428
|
}, ae = () => {
|
|
4383
|
-
F(!
|
|
4429
|
+
F(!A), C && _(!1);
|
|
4384
4430
|
}, V = Se(() => {
|
|
4385
4431
|
if (!E.trim()) return [];
|
|
4386
|
-
const
|
|
4432
|
+
const T = E.toLowerCase();
|
|
4387
4433
|
return si.filter(
|
|
4388
|
-
(I) => I.title.toLowerCase().startsWith(
|
|
4434
|
+
(I) => I.title.toLowerCase().startsWith(T)
|
|
4389
4435
|
);
|
|
4390
|
-
}, [E]), ue = (
|
|
4391
|
-
n && n(
|
|
4436
|
+
}, [E]), ue = (T) => {
|
|
4437
|
+
n && n(T), F(!1), N("");
|
|
4392
4438
|
};
|
|
4393
4439
|
return /* @__PURE__ */ w("header", { className: S.header, "data-open": C ? "true" : "false", "data-color": t, children: [
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4440
|
+
b && /* @__PURE__ */ s("div", { className: S.headerExtension, "data-color-scheme": "light", children: /* @__PURE__ */ w("div", { className: S.extensionContentWrapper, children: [
|
|
4441
|
+
D && /* @__PURE__ */ s("div", { className: S.extensionContent, children: /* @__PURE__ */ s(
|
|
4442
|
+
Ve,
|
|
4397
4443
|
{
|
|
4398
4444
|
"data-size": "sm",
|
|
4399
4445
|
checked: z === "dark",
|
|
@@ -4403,7 +4449,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4403
4449
|
"data-color-scheme": "light"
|
|
4404
4450
|
}
|
|
4405
4451
|
) }),
|
|
4406
|
-
|
|
4452
|
+
D && M && /* @__PURE__ */ s("div", { className: S.extensionDivider }),
|
|
4407
4453
|
M && /* @__PURE__ */ w("div", { className: S.languageSwitch, children: [
|
|
4408
4454
|
/* @__PURE__ */ s("span", { className: S.languageLabel, children: B("header.language") }),
|
|
4409
4455
|
/* @__PURE__ */ w(J.TriggerContext, { children: [
|
|
@@ -4414,9 +4460,9 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4414
4460
|
"aria-label": B("header.selectLanguage"),
|
|
4415
4461
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4416
4462
|
children: [
|
|
4417
|
-
|
|
4463
|
+
G,
|
|
4418
4464
|
" ",
|
|
4419
|
-
/* @__PURE__ */ s(
|
|
4465
|
+
/* @__PURE__ */ s(gt, { "aria-hidden": !0 })
|
|
4420
4466
|
]
|
|
4421
4467
|
}
|
|
4422
4468
|
),
|
|
@@ -4426,8 +4472,8 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4426
4472
|
"data-color-scheme": z,
|
|
4427
4473
|
placement: "bottom-end",
|
|
4428
4474
|
children: /* @__PURE__ */ w(J.List, { children: [
|
|
4429
|
-
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () =>
|
|
4430
|
-
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () =>
|
|
4475
|
+
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () => $("NO"), children: "Norsk (NO)" }) }),
|
|
4476
|
+
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () => $("EN"), children: "English (EN)" }) })
|
|
4431
4477
|
] })
|
|
4432
4478
|
}
|
|
4433
4479
|
)
|
|
@@ -4455,15 +4501,15 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4455
4501
|
}
|
|
4456
4502
|
) : f ? /* @__PURE__ */ s("div", { className: S.slotComponent, children: /* @__PURE__ */ s("div", { className: S.slotContainer, children: /* @__PURE__ */ s("p", { className: S.slotText, children: "SLOT" }) }) }) : null })
|
|
4457
4503
|
] }),
|
|
4458
|
-
p && y && y.length > 0 && !O && /* @__PURE__ */ s("nav", { className: S.navItems, children: y.map((
|
|
4504
|
+
p && y && y.length > 0 && !O && /* @__PURE__ */ s("nav", { className: S.navItems, children: y.map((T, I) => /* @__PURE__ */ s(
|
|
4459
4505
|
ce,
|
|
4460
4506
|
{
|
|
4461
|
-
href:
|
|
4507
|
+
href: T.href,
|
|
4462
4508
|
className: S.navLink,
|
|
4463
|
-
onClick: (
|
|
4464
|
-
n && (
|
|
4509
|
+
onClick: (L) => {
|
|
4510
|
+
n && (L.preventDefault(), n(T.href));
|
|
4465
4511
|
},
|
|
4466
|
-
children:
|
|
4512
|
+
children: T.label
|
|
4467
4513
|
},
|
|
4468
4514
|
I
|
|
4469
4515
|
)) }),
|
|
@@ -4482,8 +4528,8 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4482
4528
|
]
|
|
4483
4529
|
}
|
|
4484
4530
|
),
|
|
4485
|
-
!
|
|
4486
|
-
|
|
4531
|
+
!b && m && /* @__PURE__ */ s("div", { className: S.themeToggle, children: /* @__PURE__ */ s(
|
|
4532
|
+
Ve,
|
|
4487
4533
|
{
|
|
4488
4534
|
checked: z === "dark",
|
|
4489
4535
|
onChange: se,
|
|
@@ -4492,7 +4538,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4492
4538
|
) }),
|
|
4493
4539
|
a && /* @__PURE__ */ w("div", { className: S.userInfo, children: [
|
|
4494
4540
|
/* @__PURE__ */ s(Je, { "data-size": "md", className: S.userName, children: "Frodo Baggins" }),
|
|
4495
|
-
/* @__PURE__ */ s(
|
|
4541
|
+
/* @__PURE__ */ s(At, { "aria-label": "Frodo Baggins", "data-color": "main", variant: "circle", initials: "FB" })
|
|
4496
4542
|
] }),
|
|
4497
4543
|
o && /* @__PURE__ */ w("a", { href: "#", className: S.loginLink, children: [
|
|
4498
4544
|
/* @__PURE__ */ s("span", { className: S.loginText, children: B("header.login") }),
|
|
@@ -4505,15 +4551,15 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4505
4551
|
"data-color": "main",
|
|
4506
4552
|
"data-size": "md",
|
|
4507
4553
|
onClick: ae,
|
|
4508
|
-
"aria-expanded":
|
|
4509
|
-
"aria-label": B(
|
|
4554
|
+
"aria-expanded": A,
|
|
4555
|
+
"aria-label": B(A ? "header.closeSearch" : "header.openSearch"),
|
|
4510
4556
|
children: [
|
|
4511
|
-
|
|
4512
|
-
/* @__PURE__ */ s("span", { className: S.buttonText, children: B(
|
|
4557
|
+
A ? /* @__PURE__ */ s(ht, { "aria-hidden": !0 }) : /* @__PURE__ */ s(ft, { "aria-hidden": !0 }),
|
|
4558
|
+
/* @__PURE__ */ s("span", { className: S.buttonText, children: B(A ? "header.close" : "header.search") })
|
|
4513
4559
|
]
|
|
4514
4560
|
}
|
|
4515
4561
|
) }),
|
|
4516
|
-
(
|
|
4562
|
+
(u || O) && /* @__PURE__ */ w(
|
|
4517
4563
|
xe,
|
|
4518
4564
|
{
|
|
4519
4565
|
variant: "primary",
|
|
@@ -4524,7 +4570,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4524
4570
|
"aria-label": B(C ? "header.closeMenu" : "header.openMenu"),
|
|
4525
4571
|
className: S.menuButton,
|
|
4526
4572
|
children: [
|
|
4527
|
-
C ? /* @__PURE__ */ s(
|
|
4573
|
+
C ? /* @__PURE__ */ s(ht, { "aria-hidden": !0 }) : /* @__PURE__ */ s(Zn, { "aria-hidden": !0 }),
|
|
4528
4574
|
/* @__PURE__ */ s("span", { className: S.buttonText, children: B(C ? "header.close" : "header.menu") })
|
|
4529
4575
|
]
|
|
4530
4576
|
}
|
|
@@ -4534,7 +4580,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4534
4580
|
C && /* @__PURE__ */ s("div", { className: S.menuOverlay, children: /* @__PURE__ */ w("div", { className: S.menuContent, children: [
|
|
4535
4581
|
/* @__PURE__ */ s("div", { className: S.menuLeftColumn }),
|
|
4536
4582
|
/* @__PURE__ */ w("div", { className: S.menuRightColumn, children: [
|
|
4537
|
-
O && (M ||
|
|
4583
|
+
O && (M || D) && /* @__PURE__ */ w("div", { className: S.menuUtilities, children: [
|
|
4538
4584
|
M && /* @__PURE__ */ w("div", { className: S.languageSwitch, children: [
|
|
4539
4585
|
/* @__PURE__ */ s("span", { className: S.languageLabel, children: B("header.language") }),
|
|
4540
4586
|
/* @__PURE__ */ w(J.TriggerContext, { children: [
|
|
@@ -4545,9 +4591,9 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4545
4591
|
"aria-label": B("header.selectLanguage"),
|
|
4546
4592
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4547
4593
|
children: [
|
|
4548
|
-
|
|
4594
|
+
G,
|
|
4549
4595
|
" ",
|
|
4550
|
-
/* @__PURE__ */ s(
|
|
4596
|
+
/* @__PURE__ */ s(gt, { "aria-hidden": !0 })
|
|
4551
4597
|
]
|
|
4552
4598
|
}
|
|
4553
4599
|
),
|
|
@@ -4557,15 +4603,15 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4557
4603
|
"data-color-scheme": z,
|
|
4558
4604
|
placement: "bottom-start",
|
|
4559
4605
|
children: /* @__PURE__ */ w(J.List, { children: [
|
|
4560
|
-
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () =>
|
|
4561
|
-
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () =>
|
|
4606
|
+
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () => $("NO"), children: "Norsk (NO)" }) }),
|
|
4607
|
+
/* @__PURE__ */ s(J.Item, { children: /* @__PURE__ */ s(J.Button, { onClick: () => $("EN"), children: "English (EN)" }) })
|
|
4562
4608
|
] })
|
|
4563
4609
|
}
|
|
4564
4610
|
)
|
|
4565
4611
|
] })
|
|
4566
4612
|
] }),
|
|
4567
|
-
|
|
4568
|
-
|
|
4613
|
+
D && /* @__PURE__ */ s("div", { className: S.extensionContent, children: /* @__PURE__ */ s(
|
|
4614
|
+
Ve,
|
|
4569
4615
|
{
|
|
4570
4616
|
"data-size": "sm",
|
|
4571
4617
|
checked: z === "dark",
|
|
@@ -4578,15 +4624,15 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4578
4624
|
] }),
|
|
4579
4625
|
/* @__PURE__ */ w("div", { className: S.slotContent, children: [
|
|
4580
4626
|
r,
|
|
4581
|
-
O && p && y && y.length > 0 && /* @__PURE__ */ s("nav", { className: S.navList, children: y.map((
|
|
4627
|
+
O && p && y && y.length > 0 && /* @__PURE__ */ s("nav", { className: S.navList, children: y.map((T, I) => /* @__PURE__ */ s(
|
|
4582
4628
|
ce,
|
|
4583
4629
|
{
|
|
4584
|
-
href:
|
|
4630
|
+
href: T.href,
|
|
4585
4631
|
className: S.navLink,
|
|
4586
|
-
onClick: (
|
|
4587
|
-
n && (
|
|
4632
|
+
onClick: (L) => {
|
|
4633
|
+
n && (L.preventDefault(), n(T.href));
|
|
4588
4634
|
},
|
|
4589
|
-
children:
|
|
4635
|
+
children: T.label
|
|
4590
4636
|
},
|
|
4591
4637
|
I
|
|
4592
4638
|
)) })
|
|
@@ -4594,7 +4640,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4594
4640
|
O && /* @__PURE__ */ s("div", { className: S.menuBrand, children: /* @__PURE__ */ s(Q, {}) })
|
|
4595
4641
|
] })
|
|
4596
4642
|
] }) }),
|
|
4597
|
-
|
|
4643
|
+
A && /* @__PURE__ */ s("div", { className: S.searchOverlay, children: /* @__PURE__ */ w("div", { className: S.searchContent, children: [
|
|
4598
4644
|
/* @__PURE__ */ w(Ne, { children: [
|
|
4599
4645
|
/* @__PURE__ */ s(
|
|
4600
4646
|
Ne.Input,
|
|
@@ -4602,7 +4648,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4602
4648
|
"aria-label": B("header.search"),
|
|
4603
4649
|
placeholder: B("header.searchPlaceholder"),
|
|
4604
4650
|
value: E,
|
|
4605
|
-
onChange: (
|
|
4651
|
+
onChange: (T) => N(T.target.value)
|
|
4606
4652
|
}
|
|
4607
4653
|
),
|
|
4608
4654
|
/* @__PURE__ */ s(Ne.Button, { "aria-label": B("header.search") }),
|
|
@@ -4610,34 +4656,34 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4610
4656
|
] }),
|
|
4611
4657
|
E && /* @__PURE__ */ s("div", { className: S.searchResults, children: V.length > 0 ? /* @__PURE__ */ w("div", { className: S.suggestionsSection, children: [
|
|
4612
4658
|
/* @__PURE__ */ s("h3", { className: S.suggestionsTitle, children: B("header.suggestions") }),
|
|
4613
|
-
/* @__PURE__ */ s("ul", { className: S.resultList, children: V.slice(0, 5).map((
|
|
4659
|
+
/* @__PURE__ */ s("ul", { className: S.resultList, children: V.slice(0, 5).map((T) => /* @__PURE__ */ s("li", { className: S.resultItem, children: /* @__PURE__ */ w(
|
|
4614
4660
|
"button",
|
|
4615
4661
|
{
|
|
4616
4662
|
className: S.resultLink,
|
|
4617
|
-
onClick: () => ue(
|
|
4663
|
+
onClick: () => ue(T.path),
|
|
4618
4664
|
children: [
|
|
4619
|
-
/* @__PURE__ */ s("span", { className: S.suggestionIcon, children: /* @__PURE__ */ s(
|
|
4665
|
+
/* @__PURE__ */ s("span", { className: S.suggestionIcon, children: /* @__PURE__ */ s(ft, { "aria-hidden": !0 }) }),
|
|
4620
4666
|
/* @__PURE__ */ s("span", { className: S.suggestionText, children: (() => {
|
|
4621
|
-
const I =
|
|
4622
|
-
if (I === -1) return /* @__PURE__ */ s("span", { className: S.remainingText, children:
|
|
4623
|
-
const
|
|
4624
|
-
return /* @__PURE__ */ w(
|
|
4625
|
-
/* @__PURE__ */ s("span", { className: S.remainingText, children:
|
|
4667
|
+
const I = T.title.toLowerCase().indexOf(E.toLowerCase());
|
|
4668
|
+
if (I === -1) return /* @__PURE__ */ s("span", { className: S.remainingText, children: T.title });
|
|
4669
|
+
const L = T.title.slice(0, I), K = T.title.slice(I, I + E.length), q = T.title.slice(I + E.length);
|
|
4670
|
+
return /* @__PURE__ */ w(Vt, { children: [
|
|
4671
|
+
/* @__PURE__ */ s("span", { className: S.remainingText, children: L }),
|
|
4626
4672
|
/* @__PURE__ */ s("span", { className: S.highlightedText, children: K }),
|
|
4627
4673
|
/* @__PURE__ */ s("span", { className: S.remainingText, children: q })
|
|
4628
4674
|
] });
|
|
4629
4675
|
})() })
|
|
4630
4676
|
]
|
|
4631
4677
|
}
|
|
4632
|
-
) },
|
|
4678
|
+
) }, T.id)) }),
|
|
4633
4679
|
V.length > 5 && /* @__PURE__ */ w(
|
|
4634
4680
|
ce,
|
|
4635
4681
|
{
|
|
4636
4682
|
href: "#",
|
|
4637
4683
|
"data-color": "neutral",
|
|
4638
4684
|
className: S.viewAllLink,
|
|
4639
|
-
onClick: (
|
|
4640
|
-
|
|
4685
|
+
onClick: (T) => {
|
|
4686
|
+
T.preventDefault(), n && n(`search/${E}`), F(!1), N("");
|
|
4641
4687
|
},
|
|
4642
4688
|
children: [
|
|
4643
4689
|
B("header.viewAll"),
|
|
@@ -4798,7 +4844,7 @@ function ii(t) {
|
|
|
4798
4844
|
}
|
|
4799
4845
|
`;
|
|
4800
4846
|
}
|
|
4801
|
-
const ai = "_footer_cf5vh_1", li = "_redSection_cf5vh_7", di = "_redContainer_cf5vh_26", ci = "_shortcutsSection_cf5vh_35", ui = "_shortcutsColumn_cf5vh_43", mi = "_shortcutsTitle_cf5vh_51", pi = "_shortcutsList_cf5vh_60", gi = "_shortcutLink_cf5vh_69", hi = "_slotComponent_cf5vh_92", fi = "_divider_cf5vh_131", ki = "_contactSection_cf5vh_139", yi = "_contactColumn_cf5vh_146", vi = "_contactTitle_cf5vh_154", bi = "_contactContent_cf5vh_163", Ti = "_legalSection_cf5vh_177", Si = "_copyrightText_cf5vh_184", xi = "_legalLinks_cf5vh_193", Ci = "_legalLink_cf5vh_193", wi = "_whiteSection_cf5vh_223", Ii = "_whiteContainer_cf5vh_228", Di = "_whiteContent_cf5vh_241", _i = "_logo_cf5vh_253", Ai = "_designSystemLogo_cf5vh_260", Mi = "_slotSmall_cf5vh_267",
|
|
4847
|
+
const ai = "_footer_cf5vh_1", li = "_redSection_cf5vh_7", di = "_redContainer_cf5vh_26", ci = "_shortcutsSection_cf5vh_35", ui = "_shortcutsColumn_cf5vh_43", mi = "_shortcutsTitle_cf5vh_51", pi = "_shortcutsList_cf5vh_60", gi = "_shortcutLink_cf5vh_69", hi = "_slotComponent_cf5vh_92", fi = "_divider_cf5vh_131", ki = "_contactSection_cf5vh_139", yi = "_contactColumn_cf5vh_146", vi = "_contactTitle_cf5vh_154", bi = "_contactContent_cf5vh_163", Ti = "_legalSection_cf5vh_177", Si = "_copyrightText_cf5vh_184", xi = "_legalLinks_cf5vh_193", Ci = "_legalLink_cf5vh_193", wi = "_whiteSection_cf5vh_223", Ii = "_whiteContainer_cf5vh_228", Di = "_whiteContent_cf5vh_241", _i = "_logo_cf5vh_253", Ai = "_designSystemLogo_cf5vh_260", Mi = "_slotSmall_cf5vh_267", Li = "_slotLarge_cf5vh_278", j = {
|
|
4802
4848
|
footer: ai,
|
|
4803
4849
|
redSection: li,
|
|
4804
4850
|
redContainer: di,
|
|
@@ -4823,8 +4869,8 @@ const ai = "_footer_cf5vh_1", li = "_redSection_cf5vh_7", di = "_redContainer_cf
|
|
|
4823
4869
|
logo: _i,
|
|
4824
4870
|
designSystemLogo: Ai,
|
|
4825
4871
|
slotSmall: Mi,
|
|
4826
|
-
slotLarge:
|
|
4827
|
-
},
|
|
4872
|
+
slotLarge: Li
|
|
4873
|
+
}, ya = ({
|
|
4828
4874
|
"data-color": t = "additional",
|
|
4829
4875
|
redSectionSlot: e,
|
|
4830
4876
|
whiteSectionSlotSmall: n,
|
|
@@ -4836,81 +4882,88 @@ const ai = "_footer_cf5vh_1", li = "_redSection_cf5vh_7", di = "_redContainer_cf
|
|
|
4836
4882
|
shortcutsLinksLeft: l,
|
|
4837
4883
|
shortcutsLinksRight: c
|
|
4838
4884
|
} = {}) => {
|
|
4839
|
-
const v = (/* @__PURE__ */ new Date()).getFullYear(), { t:
|
|
4840
|
-
|
|
4885
|
+
const v = (/* @__PURE__ */ new Date()).getFullYear(), { t: m } = Nt();
|
|
4886
|
+
Be.useEffect(() => {
|
|
4887
|
+
const u = "rk-footer-inline-styles";
|
|
4888
|
+
if (typeof document > "u" || document.getElementById(u)) return;
|
|
4889
|
+
const b = ji(j), D = document.createElement("style");
|
|
4890
|
+
D.id = u, D.textContent = b, document.head.appendChild(D);
|
|
4891
|
+
}, []);
|
|
4892
|
+
const [f, g] = Be.useState("light");
|
|
4893
|
+
Be.useEffect(() => {
|
|
4841
4894
|
if (typeof document > "u") return;
|
|
4842
|
-
const
|
|
4843
|
-
g(
|
|
4844
|
-
const
|
|
4845
|
-
const
|
|
4846
|
-
g(
|
|
4895
|
+
const u = document.documentElement, b = u.getAttribute("data-color-scheme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
4896
|
+
g(b);
|
|
4897
|
+
const D = window.matchMedia("(prefers-color-scheme: dark)"), M = () => {
|
|
4898
|
+
const _ = u.getAttribute("data-color-scheme") || (D.matches ? "dark" : "light");
|
|
4899
|
+
g(_);
|
|
4847
4900
|
}, C = new MutationObserver(M);
|
|
4848
|
-
return C.observe(
|
|
4849
|
-
C.disconnect(),
|
|
4901
|
+
return C.observe(u, { attributes: !0, attributeFilter: ["data-color-scheme"] }), D.addEventListener("change", M), () => {
|
|
4902
|
+
C.disconnect(), D.removeEventListener("change", M);
|
|
4850
4903
|
};
|
|
4851
4904
|
}, []);
|
|
4852
4905
|
const h = f === "dark" && o ? o : i, k = [
|
|
4853
|
-
{ label:
|
|
4854
|
-
{ label:
|
|
4855
|
-
{ label:
|
|
4856
|
-
{ label:
|
|
4857
|
-
{ label:
|
|
4858
|
-
{ label:
|
|
4906
|
+
{ label: m("footer.shortcutsLinks.services"), href: "#" },
|
|
4907
|
+
{ label: m("footer.shortcutsLinks.volunteer"), href: "#" },
|
|
4908
|
+
{ label: m("footer.shortcutsLinks.ourWork"), href: "#" },
|
|
4909
|
+
{ label: m("footer.shortcutsLinks.about"), href: "#" },
|
|
4910
|
+
{ label: m("footer.shortcutsLinks.support"), href: "#" },
|
|
4911
|
+
{ label: m("footer.shortcutsLinks.contact"), href: "#" }
|
|
4859
4912
|
], y = l || k, p = c || k;
|
|
4860
|
-
return /* @__PURE__ */ w("footer", { className:
|
|
4861
|
-
/* @__PURE__ */ s("div", { className:
|
|
4862
|
-
/* @__PURE__ */ w("div", { className:
|
|
4863
|
-
/* @__PURE__ */ w("nav", { className:
|
|
4864
|
-
/* @__PURE__ */ s("h3", { className:
|
|
4865
|
-
/* @__PURE__ */ s("ul", { className:
|
|
4913
|
+
return /* @__PURE__ */ w("footer", { className: j.footer, "data-color": t, children: [
|
|
4914
|
+
/* @__PURE__ */ s("div", { className: j.redSection, children: /* @__PURE__ */ w("div", { className: j.redContainer, children: [
|
|
4915
|
+
/* @__PURE__ */ w("div", { className: j.shortcutsSection, children: [
|
|
4916
|
+
/* @__PURE__ */ w("nav", { className: j.shortcutsColumn, "aria-label": m("footer.shortcuts"), children: [
|
|
4917
|
+
/* @__PURE__ */ s("h3", { className: j.shortcutsTitle, children: m("footer.shortcuts") }),
|
|
4918
|
+
/* @__PURE__ */ s("ul", { className: j.shortcutsList, children: y.map((u, b) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(ce, { href: u.href, className: j.shortcutLink, children: u.label }) }, b)) })
|
|
4866
4919
|
] }),
|
|
4867
|
-
/* @__PURE__ */ w("nav", { className:
|
|
4868
|
-
/* @__PURE__ */ s("h3", { className:
|
|
4869
|
-
/* @__PURE__ */ s("ul", { className:
|
|
4920
|
+
/* @__PURE__ */ w("nav", { className: j.shortcutsColumn, "aria-label": m("footer.shortcuts"), children: [
|
|
4921
|
+
/* @__PURE__ */ s("h3", { className: j.shortcutsTitle, children: m("footer.shortcuts") }),
|
|
4922
|
+
/* @__PURE__ */ s("ul", { className: j.shortcutsList, children: p.map((u, b) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(ce, { href: u.href, className: j.shortcutLink, children: u.label }) }, b)) })
|
|
4870
4923
|
] }),
|
|
4871
|
-
e && /* @__PURE__ */ s("div", { className:
|
|
4924
|
+
e && /* @__PURE__ */ s("div", { className: j.slotComponent, children: e })
|
|
4872
4925
|
] }),
|
|
4873
|
-
/* @__PURE__ */ s("div", { className:
|
|
4874
|
-
/* @__PURE__ */ w("div", { className:
|
|
4875
|
-
/* @__PURE__ */ w("div", { className:
|
|
4876
|
-
/* @__PURE__ */ s("h4", { className:
|
|
4877
|
-
/* @__PURE__ */ w("div", { className:
|
|
4926
|
+
/* @__PURE__ */ s("div", { className: j.divider }),
|
|
4927
|
+
/* @__PURE__ */ w("div", { className: j.contactSection, children: [
|
|
4928
|
+
/* @__PURE__ */ w("div", { className: j.contactColumn, children: [
|
|
4929
|
+
/* @__PURE__ */ s("h4", { className: j.contactTitle, children: m("footer.contact.visitingAddress") }),
|
|
4930
|
+
/* @__PURE__ */ w("div", { className: j.contactContent, children: [
|
|
4878
4931
|
/* @__PURE__ */ s("p", { children: "Hausmannsgate 7 (Korsegården)" }),
|
|
4879
4932
|
/* @__PURE__ */ s("p", { children: "0186 Oslo" })
|
|
4880
4933
|
] })
|
|
4881
4934
|
] }),
|
|
4882
|
-
/* @__PURE__ */ w("div", { className:
|
|
4883
|
-
/* @__PURE__ */ s("h4", { className:
|
|
4884
|
-
/* @__PURE__ */ s("p", { className:
|
|
4935
|
+
/* @__PURE__ */ w("div", { className: j.contactColumn, children: [
|
|
4936
|
+
/* @__PURE__ */ s("h4", { className: j.contactTitle, children: m("footer.contact.organizationNumber") }),
|
|
4937
|
+
/* @__PURE__ */ s("p", { className: j.contactContent, children: "XXX XXX XXX" })
|
|
4885
4938
|
] }),
|
|
4886
|
-
/* @__PURE__ */ w("div", { className:
|
|
4887
|
-
/* @__PURE__ */ s("h4", { className:
|
|
4888
|
-
/* @__PURE__ */ s("p", { className:
|
|
4939
|
+
/* @__PURE__ */ w("div", { className: j.contactColumn, children: [
|
|
4940
|
+
/* @__PURE__ */ s("h4", { className: j.contactTitle, children: m("footer.contact.email") }),
|
|
4941
|
+
/* @__PURE__ */ s("p", { className: j.contactContent, children: "post@redcross.no" })
|
|
4889
4942
|
] })
|
|
4890
4943
|
] }),
|
|
4891
|
-
/* @__PURE__ */ s("div", { className:
|
|
4892
|
-
/* @__PURE__ */ w("div", { className:
|
|
4893
|
-
/* @__PURE__ */ w("p", { className:
|
|
4944
|
+
/* @__PURE__ */ s("div", { className: j.divider }),
|
|
4945
|
+
/* @__PURE__ */ w("div", { className: j.legalSection, children: [
|
|
4946
|
+
/* @__PURE__ */ w("p", { className: j.copyrightText, children: [
|
|
4894
4947
|
"© ",
|
|
4895
4948
|
v,
|
|
4896
4949
|
" ",
|
|
4897
|
-
|
|
4950
|
+
m("footer.copyright")
|
|
4898
4951
|
] }),
|
|
4899
|
-
/* @__PURE__ */ w("div", { className:
|
|
4900
|
-
/* @__PURE__ */ s(ce, { href: "#", className:
|
|
4901
|
-
/* @__PURE__ */ s(ce, { href: "#", className:
|
|
4902
|
-
/* @__PURE__ */ s(ce, { href: "#", className:
|
|
4903
|
-
/* @__PURE__ */ s(ce, { href: "#", className:
|
|
4952
|
+
/* @__PURE__ */ w("div", { className: j.legalLinks, children: [
|
|
4953
|
+
/* @__PURE__ */ s(ce, { href: "#", className: j.legalLink, children: m("footer.legal.privacy") }),
|
|
4954
|
+
/* @__PURE__ */ s(ce, { href: "#", className: j.legalLink, children: m("footer.legal.press") }),
|
|
4955
|
+
/* @__PURE__ */ s(ce, { href: "#", className: j.legalLink, children: m("footer.legal.procurement") }),
|
|
4956
|
+
/* @__PURE__ */ s(ce, { href: "#", className: j.legalLink, children: m("footer.legal.whistleblowing") })
|
|
4904
4957
|
] })
|
|
4905
4958
|
] })
|
|
4906
4959
|
] }) }),
|
|
4907
|
-
/* @__PURE__ */ s("div", { className:
|
|
4960
|
+
/* @__PURE__ */ s("div", { className: j.whiteSection, children: /* @__PURE__ */ s("div", { className: j.whiteContainer, children: /* @__PURE__ */ w("div", { className: j.whiteContent, children: [
|
|
4908
4961
|
/* @__PURE__ */ s(
|
|
4909
4962
|
"img",
|
|
4910
4963
|
{
|
|
4911
4964
|
src: "/logo-red-cross.svg",
|
|
4912
4965
|
alt: "Røde Kors Logo",
|
|
4913
|
-
className:
|
|
4966
|
+
className: j.logo,
|
|
4914
4967
|
loading: "lazy"
|
|
4915
4968
|
}
|
|
4916
4969
|
),
|
|
@@ -4919,22 +4972,264 @@ const ai = "_footer_cf5vh_1", li = "_redSection_cf5vh_7", di = "_redContainer_cf
|
|
|
4919
4972
|
{
|
|
4920
4973
|
src: h,
|
|
4921
4974
|
alt: d,
|
|
4922
|
-
className:
|
|
4975
|
+
className: j.designSystemLogo,
|
|
4923
4976
|
loading: "lazy"
|
|
4924
4977
|
}
|
|
4925
4978
|
),
|
|
4926
|
-
n && /* @__PURE__ */ s("div", { className:
|
|
4927
|
-
r && /* @__PURE__ */ s("div", { className:
|
|
4979
|
+
n && /* @__PURE__ */ s("div", { className: j.slotSmall, children: n }),
|
|
4980
|
+
r && /* @__PURE__ */ s("div", { className: j.slotLarge, children: r })
|
|
4928
4981
|
] }) }) })
|
|
4929
4982
|
] });
|
|
4930
4983
|
};
|
|
4984
|
+
function ji(t) {
|
|
4985
|
+
const e = t;
|
|
4986
|
+
return `
|
|
4987
|
+
.${e.footer} {
|
|
4988
|
+
margin-top: auto;
|
|
4989
|
+
width: 100%;
|
|
4990
|
+
}
|
|
4991
|
+
.${e.redSection} {
|
|
4992
|
+
background-color: var(--ds-color-additional-color-ocean-background-tinted, #f2f4f5);
|
|
4993
|
+
width: 100%;
|
|
4994
|
+
}
|
|
4995
|
+
.${e.footer}[data-color="primary"] .${e.redSection} {
|
|
4996
|
+
background-color: var(--ds-color-primary-color-red-background-tinted);
|
|
4997
|
+
}
|
|
4998
|
+
.${e.footer}[data-color="additional"] .${e.redSection} {
|
|
4999
|
+
background-color: var(--ds-color-additional-color-ocean-background-tinted);
|
|
5000
|
+
}
|
|
5001
|
+
.${e.footer}[data-color="neutral"] .${e.redSection} {
|
|
5002
|
+
background-color: var(--ds-color-neutral-background-tinted);
|
|
5003
|
+
}
|
|
5004
|
+
.${e.redContainer} {
|
|
5005
|
+
width: 100%;
|
|
5006
|
+
max-width: 1440px;
|
|
5007
|
+
margin: 0 auto;
|
|
5008
|
+
padding: var(--ds-size-30, 120px) var(--ds-size-44, 175px);
|
|
5009
|
+
box-sizing: border-box;
|
|
5010
|
+
}
|
|
5011
|
+
.${e.shortcutsSection} {
|
|
5012
|
+
display: flex;
|
|
5013
|
+
gap: var(--ds-size-12, 48px);
|
|
5014
|
+
align-items: flex-start;
|
|
5015
|
+
padding: var(--ds-size-8, 32px) 0;
|
|
5016
|
+
flex-wrap: wrap;
|
|
5017
|
+
}
|
|
5018
|
+
.${e.shortcutsColumn} {
|
|
5019
|
+
display: flex;
|
|
5020
|
+
flex-direction: column;
|
|
5021
|
+
gap: var(--ds-size-6, 24px);
|
|
5022
|
+
width: 257px;
|
|
5023
|
+
flex-shrink: 0;
|
|
5024
|
+
}
|
|
5025
|
+
.${e.shortcutsTitle} {
|
|
5026
|
+
font-size: var(--ds-font-size-7, 30px);
|
|
5027
|
+
font-weight: var(--ds-font-weight-regular);
|
|
5028
|
+
line-height: 1.3;
|
|
5029
|
+
letter-spacing: -0.075px;
|
|
5030
|
+
color: var(--ds-color-primary-color-red-text-default, #57110c);
|
|
5031
|
+
margin: 0;
|
|
5032
|
+
}
|
|
5033
|
+
.${e.shortcutsList} {
|
|
5034
|
+
list-style: none;
|
|
5035
|
+
padding: 0;
|
|
5036
|
+
margin: 0;
|
|
5037
|
+
display: flex;
|
|
5038
|
+
flex-direction: column;
|
|
5039
|
+
gap: var(--ds-size-2, 8px);
|
|
5040
|
+
}
|
|
5041
|
+
.${e.shortcutLink} {
|
|
5042
|
+
font-size: var(--ds-font-size-4, 18px);
|
|
5043
|
+
font-weight: var(--ds-font-weight-regular);
|
|
5044
|
+
line-height: 1.5;
|
|
5045
|
+
letter-spacing: 0.09px;
|
|
5046
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
5047
|
+
text-decoration: underline;
|
|
5048
|
+
text-underline-offset: 2px;
|
|
5049
|
+
transition: color 0.2s ease;
|
|
5050
|
+
}
|
|
5051
|
+
.${e.shortcutLink}:hover {
|
|
5052
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
5053
|
+
opacity: 0.8;
|
|
5054
|
+
}
|
|
5055
|
+
.${e.shortcutLink}:focus {
|
|
5056
|
+
outline: 2px solid var(--ds-color-neutral-border-default, #797979);
|
|
5057
|
+
outline-offset: 2px;
|
|
5058
|
+
border-radius: var(--ds-border-radius-sm);
|
|
5059
|
+
}
|
|
5060
|
+
.${e.slotComponent} {
|
|
5061
|
+
background-color: var(--ds-color-neutral-surface-default, #ffffff);
|
|
5062
|
+
border: 2px dashed var(--ds-color-neutral-border-default, #797979);
|
|
5063
|
+
border-radius: var(--ds-border-radius-lg, 8px);
|
|
5064
|
+
padding: var(--ds-size-6, 24px) var(--ds-size-3, 12px);
|
|
5065
|
+
display: flex;
|
|
5066
|
+
align-items: center;
|
|
5067
|
+
justify-content: center;
|
|
5068
|
+
flex: 1 0 0;
|
|
5069
|
+
min-width: 200px;
|
|
5070
|
+
}
|
|
5071
|
+
.${e.divider} {
|
|
5072
|
+
width: 100%;
|
|
5073
|
+
height: 1px;
|
|
5074
|
+
background-color: var(--ds-color-neutral-border-subtle, #bcbcbc);
|
|
5075
|
+
margin: var(--ds-size-6, 24px) 0;
|
|
5076
|
+
}
|
|
5077
|
+
.${e.contactSection} {
|
|
5078
|
+
display: flex;
|
|
5079
|
+
gap: var(--ds-size-6, 24px);
|
|
5080
|
+
align-items: flex-start;
|
|
5081
|
+
flex-wrap: wrap;
|
|
5082
|
+
}
|
|
5083
|
+
.${e.contactColumn} {
|
|
5084
|
+
display: flex;
|
|
5085
|
+
flex-direction: column;
|
|
5086
|
+
gap: var(--ds-size-1, 4px);
|
|
5087
|
+
flex: 1;
|
|
5088
|
+
min-width: 200px;
|
|
5089
|
+
}
|
|
5090
|
+
.${e.contactTitle} {
|
|
5091
|
+
font-size: var(--ds-font-size-3, 16px);
|
|
5092
|
+
font-weight: var(--ds-font-weight-bold);
|
|
5093
|
+
line-height: 1.5;
|
|
5094
|
+
letter-spacing: 0.04px;
|
|
5095
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
5096
|
+
margin: 0;
|
|
5097
|
+
}
|
|
5098
|
+
.${e.contactContent} {
|
|
5099
|
+
font-size: var(--ds-font-size-3, 16px);
|
|
5100
|
+
font-weight: var(--ds-font-weight-regular);
|
|
5101
|
+
line-height: 1.5;
|
|
5102
|
+
letter-spacing: 0.04px;
|
|
5103
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
5104
|
+
margin: 0;
|
|
5105
|
+
}
|
|
5106
|
+
.${e.contactContent} p {
|
|
5107
|
+
margin: 0;
|
|
5108
|
+
}
|
|
5109
|
+
.${e.legalSection} {
|
|
5110
|
+
display: flex;
|
|
5111
|
+
gap: var(--ds-size-10, 40px);
|
|
5112
|
+
align-items: center;
|
|
5113
|
+
flex-wrap: wrap;
|
|
5114
|
+
}
|
|
5115
|
+
.${e.copyrightText} {
|
|
5116
|
+
font-size: var(--ds-font-size-2, 14px);
|
|
5117
|
+
font-weight: var(--ds-font-weight-regular);
|
|
5118
|
+
line-height: 1.3;
|
|
5119
|
+
letter-spacing: 0.021px;
|
|
5120
|
+
color: var(--ds-color-primary-color-red-text-default, #57110c);
|
|
5121
|
+
margin: 0;
|
|
5122
|
+
}
|
|
5123
|
+
.${e.legalLinks} {
|
|
5124
|
+
display: flex;
|
|
5125
|
+
gap: var(--ds-size-10, 40px);
|
|
5126
|
+
align-items: center;
|
|
5127
|
+
flex-wrap: wrap;
|
|
5128
|
+
}
|
|
5129
|
+
.${e.legalLink} {
|
|
5130
|
+
font-size: var(--ds-font-size-4, 18px);
|
|
5131
|
+
font-weight: var(--ds-font-weight-regular);
|
|
5132
|
+
line-height: 1.5;
|
|
5133
|
+
letter-spacing: 0.09px;
|
|
5134
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
5135
|
+
text-decoration: underline;
|
|
5136
|
+
text-underline-offset: 2px;
|
|
5137
|
+
transition: color 0.2s ease;
|
|
5138
|
+
}
|
|
5139
|
+
.${e.legalLink}:hover {
|
|
5140
|
+
color: var(--ds-color-neutral-text-default, #2b2b2b);
|
|
5141
|
+
opacity: 0.8;
|
|
5142
|
+
}
|
|
5143
|
+
.${e.legalLink}:focus {
|
|
5144
|
+
outline: 2px solid var(--ds-color-neutral-border-default, #797979);
|
|
5145
|
+
outline-offset: 2px;
|
|
5146
|
+
border-radius: var(--ds-border-radius-sm);
|
|
5147
|
+
}
|
|
5148
|
+
.${e.whiteSection} {
|
|
5149
|
+
background-color: white;
|
|
5150
|
+
width: 100%;
|
|
5151
|
+
}
|
|
5152
|
+
.${e.whiteContainer} {
|
|
5153
|
+
width: 100%;
|
|
5154
|
+
max-width: 1440px;
|
|
5155
|
+
margin: 0 auto;
|
|
5156
|
+
padding: var(--ds-size-6, 24px) var(--ds-size-44, 175px);
|
|
5157
|
+
box-sizing: border-box;
|
|
5158
|
+
}
|
|
5159
|
+
.${e.whiteContainer} > * {
|
|
5160
|
+
max-width: 1090px;
|
|
5161
|
+
margin: 0 auto;
|
|
5162
|
+
}
|
|
5163
|
+
.${e.whiteContent} {
|
|
5164
|
+
display: flex;
|
|
5165
|
+
gap: var(--ds-size-20, 80px);
|
|
5166
|
+
align-items: center;
|
|
5167
|
+
flex-wrap: wrap;
|
|
5168
|
+
}
|
|
5169
|
+
.${e.whiteContent} > img:first-of-type + img {
|
|
5170
|
+
margin-left: var(--ds-size-10, 40px);
|
|
5171
|
+
}
|
|
5172
|
+
.${e.logo} {
|
|
5173
|
+
height: 43px;
|
|
5174
|
+
width: auto;
|
|
5175
|
+
display: block;
|
|
5176
|
+
flex-shrink: 0;
|
|
5177
|
+
}
|
|
5178
|
+
.${e.designSystemLogo} {
|
|
5179
|
+
height: 24px;
|
|
5180
|
+
width: auto;
|
|
5181
|
+
display: block;
|
|
5182
|
+
flex-shrink: 0;
|
|
5183
|
+
}
|
|
5184
|
+
.${e.slotSmall} {
|
|
5185
|
+
background-color: var(--ds-color-neutral-surface-default, #ffffff);
|
|
5186
|
+
border: 2px dashed var(--ds-color-neutral-border-default, #797979);
|
|
5187
|
+
border-radius: var(--ds-border-radius-lg, 8px);
|
|
5188
|
+
padding: var(--ds-size-6, 24px) var(--ds-size-3, 12px);
|
|
5189
|
+
display: flex;
|
|
5190
|
+
align-items: center;
|
|
5191
|
+
justify-content: center;
|
|
5192
|
+
flex-shrink: 0;
|
|
5193
|
+
}
|
|
5194
|
+
.${e.slotLarge} {
|
|
5195
|
+
background-color: var(--ds-color-neutral-surface-default, #ffffff);
|
|
5196
|
+
border: 2px dashed var(--ds-color-neutral-border-default, #797979);
|
|
5197
|
+
border-radius: var(--ds-border-radius-lg, 8px);
|
|
5198
|
+
padding: var(--ds-size-6, 24px) var(--ds-size-3, 12px);
|
|
5199
|
+
display: flex;
|
|
5200
|
+
align-items: center;
|
|
5201
|
+
justify-content: center;
|
|
5202
|
+
flex: 1 0 0;
|
|
5203
|
+
min-width: 200px;
|
|
5204
|
+
}
|
|
5205
|
+
@media (max-width: 768px) {
|
|
5206
|
+
.${e.shortcutsSection} {
|
|
5207
|
+
flex-direction: column;
|
|
5208
|
+
}
|
|
5209
|
+
.${e.shortcutsColumn} {
|
|
5210
|
+
width: 100%;
|
|
5211
|
+
}
|
|
5212
|
+
.${e.contactSection} {
|
|
5213
|
+
flex-direction: column;
|
|
5214
|
+
}
|
|
5215
|
+
.${e.legalSection} {
|
|
5216
|
+
flex-direction: column;
|
|
5217
|
+
align-items: flex-start;
|
|
5218
|
+
}
|
|
5219
|
+
.${e.whiteContent} {
|
|
5220
|
+
flex-direction: column;
|
|
5221
|
+
align-items: flex-start;
|
|
5222
|
+
}
|
|
5223
|
+
}
|
|
5224
|
+
`;
|
|
5225
|
+
}
|
|
4931
5226
|
export {
|
|
4932
5227
|
eo as Alert,
|
|
4933
|
-
|
|
5228
|
+
At as Avatar,
|
|
4934
5229
|
to as Badge,
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
5230
|
+
zi as BadgePosition,
|
|
5231
|
+
Ri as Breadcrumbs,
|
|
5232
|
+
$i as BreadcrumbsItem,
|
|
4938
5233
|
Wi as BreadcrumbsLink,
|
|
4939
5234
|
Gi as BreadcrumbsList,
|
|
4940
5235
|
xe as Button,
|
|
@@ -4942,47 +5237,48 @@ export {
|
|
|
4942
5237
|
Ui as CardBlock,
|
|
4943
5238
|
Zr as Carousel,
|
|
4944
5239
|
oo as Checkbox,
|
|
4945
|
-
|
|
5240
|
+
Oi as Chip,
|
|
4946
5241
|
nr as DateInput,
|
|
4947
5242
|
Yo as DatePicker,
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
5243
|
+
Vi as Details,
|
|
5244
|
+
Ki as Dialog,
|
|
5245
|
+
Yi as Divider,
|
|
4951
5246
|
J as Dropdown,
|
|
4952
|
-
|
|
4953
|
-
|
|
5247
|
+
qi as ErrorSummary,
|
|
5248
|
+
Xi as Field,
|
|
4954
5249
|
es as FieldCounter,
|
|
4955
5250
|
Qr as FieldDescription,
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
5251
|
+
Ji as Fieldset,
|
|
5252
|
+
ya as Footer,
|
|
5253
|
+
ka as Header,
|
|
4959
5254
|
ts as Heading,
|
|
4960
|
-
|
|
5255
|
+
Zi as Input,
|
|
4961
5256
|
ns as Label,
|
|
4962
|
-
|
|
5257
|
+
ha as LanguageProvider,
|
|
4963
5258
|
ce as Link,
|
|
4964
|
-
|
|
4965
|
-
|
|
5259
|
+
Qi as List,
|
|
5260
|
+
ea as Pagination,
|
|
4966
5261
|
Je as Paragraph,
|
|
4967
|
-
|
|
4968
|
-
|
|
5262
|
+
na as Popover,
|
|
5263
|
+
oa as Radio,
|
|
4969
5264
|
Ne as Search,
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
5265
|
+
sa as Select,
|
|
5266
|
+
ia as SkeletonLoader,
|
|
5267
|
+
aa as SkipLink,
|
|
4973
5268
|
Jr as Spinner,
|
|
4974
5269
|
os as Suggestion,
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
5270
|
+
Ve as Switch,
|
|
5271
|
+
la as Table,
|
|
5272
|
+
da as Tabs,
|
|
5273
|
+
ca as Tag,
|
|
5274
|
+
ua as Textarea,
|
|
5275
|
+
ma as Textfield,
|
|
5276
|
+
pa as ToggleGroup,
|
|
5277
|
+
ga as Tooltip,
|
|
4983
5278
|
rs as ValidationMessage,
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
5279
|
+
Hi as useCheckboxGroup,
|
|
5280
|
+
fa as useLanguage,
|
|
5281
|
+
Nt as useLanguageOptional,
|
|
5282
|
+
ta as usePagination,
|
|
5283
|
+
ra as useRadioGroup
|
|
4988
5284
|
};
|