rk-designsystem 1.1.80 → 1.1.82
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 +1341 -1114
- package/dist/componentlibrary.umd.js +207 -4
- package/dist/index.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import Pe, { forwardRef as
|
|
3
|
-
import { Alert as Yt, Avatar as qt, BadgePosition as Zt, Badge as Xt, Breadcrumbs as Jt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as qe, Card as nn, CardBlock as on, Checkbox as rn, useCheckboxGroup as sn, Fieldset as Dt, Chip as an, Spinner as ln, Details as dn, Dialog as cn, Divider as un, Dropdown as
|
|
4
|
-
import { startOfMonth as be, isValid as Oe, isSameMonth as gt, startOfWeek as _t, format as we, addDays as At, subMonths as
|
|
5
|
-
import { ChevronLeftIcon as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const Mt =
|
|
1
|
+
import { jsx as r, jsxs as _, Fragment as Vt } from "react/jsx-runtime";
|
|
2
|
+
import Pe, { forwardRef as fe, useState as oe, createContext as Kt, useContext as It, useEffect as Y, useMemo as Te, useCallback as se, useRef as Ye } from "react";
|
|
3
|
+
import { Alert as Yt, Avatar as qt, BadgePosition as Zt, Badge as Xt, Breadcrumbs as Jt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as qe, Card as nn, CardBlock as on, Checkbox as rn, useCheckboxGroup as sn, Fieldset as Dt, Chip as an, Spinner as ln, Details as dn, Dialog as cn, Divider as un, Dropdown as pn, ErrorSummary as mn, Field as gn, FieldDescription as fn, FieldCounter as hn, Heading as kn, Input as vn, Label as yn, Link as bn, List as xn, Pagination as Tn, PaginationList as Sn, PaginationItem as Cn, PaginationButton as wn, usePagination as In, Paragraph as Dn, Popover as _n, Radio as An, useRadioGroup as Mn, Search as Ln, SearchInput as jn, SearchClear as En, SearchButton as Fn, Select as Nn, Skeleton as Bn, SkipLink as Pn, EXPERIMENTAL_Suggestion as zn, Switch as Rn, Table as Gn, Tabs as $n, Tag as Wn, Textarea as Hn, Textfield as Un, ToggleGroup as On, Tooltip as Vn, ValidationMessage as Kn } from "@digdir/designsystemet-react";
|
|
4
|
+
import { startOfMonth as be, isValid as Oe, isSameMonth as gt, startOfWeek as _t, format as we, addDays as At, subMonths as Yn, addMonths as qn, isSameDay as Zn, isToday as Xn, eachDayOfInterval as Jn } from "date-fns";
|
|
5
|
+
import { ChevronLeftIcon as Qn, ChevronRightIcon as eo, ChevronDownIcon as ft, XMarkIcon as ht, MagnifyingGlassIcon as kt, MenuHamburgerIcon as to, HeartIcon as no } from "@navikt/aksel-icons";
|
|
6
|
+
const oo = fe((t, e) => /* @__PURE__ */ r(Yt, { ref: e, ...t }));
|
|
7
|
+
oo.displayName = "Alert";
|
|
8
|
+
const Mt = fe((t, e) => /* @__PURE__ */ r(qt, { ref: e, ...t }));
|
|
9
9
|
Mt.displayName = "Avatar";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
10
|
+
const ro = fe((t, e) => /* @__PURE__ */ r(Xt, { ref: e, ...t }));
|
|
11
|
+
ro.displayName = "Badge";
|
|
12
|
+
const Yi = Zt, qi = Jt, Zi = Qt, Xi = en, Ji = tn, Se = qe;
|
|
13
|
+
Se.displayName = "Button";
|
|
14
|
+
const so = nn, Qi = on;
|
|
15
|
+
so.displayName = "Card";
|
|
16
|
+
const io = rn, ao = Dt, ea = sn;
|
|
17
|
+
io.displayName = "Checkbox";
|
|
18
|
+
ao.displayName = "Fieldset";
|
|
19
|
+
const ta = an;
|
|
20
20
|
function Ve(t) {
|
|
21
21
|
return (e = {}) => {
|
|
22
22
|
const n = e.width ? String(e.width) : t.defaultWidth;
|
|
@@ -43,30 +43,30 @@ function De(t) {
|
|
|
43
43
|
const s = n.width, l = s && t.matchPatterns[s] || t.matchPatterns[t.defaultMatchWidth], i = e.match(l);
|
|
44
44
|
if (!i)
|
|
45
45
|
return null;
|
|
46
|
-
const o = i[0], c = s && t.parsePatterns[s] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ?
|
|
46
|
+
const o = i[0], c = s && t.parsePatterns[s] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? co(c, (m) => m.test(o)) : (
|
|
47
47
|
// [TODO] -- I challenge you to fix the type
|
|
48
|
-
|
|
48
|
+
lo(c, (m) => m.test(o))
|
|
49
49
|
);
|
|
50
50
|
let u;
|
|
51
51
|
u = t.valueCallback ? t.valueCallback(d) : d, u = n.valueCallback ? (
|
|
52
52
|
// [TODO] -- I challenge you to fix the type
|
|
53
53
|
n.valueCallback(u)
|
|
54
54
|
) : u;
|
|
55
|
-
const
|
|
56
|
-
return { value: u, rest:
|
|
55
|
+
const v = e.slice(o.length);
|
|
56
|
+
return { value: u, rest: v };
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function lo(t, e) {
|
|
60
60
|
for (const n in t)
|
|
61
61
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
62
62
|
return n;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function co(t, e) {
|
|
65
65
|
for (let n = 0; n < t.length; n++)
|
|
66
66
|
if (e(t[n]))
|
|
67
67
|
return n;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function uo(t) {
|
|
70
70
|
return (e, n = {}) => {
|
|
71
71
|
const s = e.match(t.matchPattern);
|
|
72
72
|
if (!s) return null;
|
|
@@ -78,7 +78,7 @@ function ao(t) {
|
|
|
78
78
|
return { value: o, rest: c };
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const po = {
|
|
82
82
|
lessThanXSeconds: {
|
|
83
83
|
one: "mindre enn ett sekund",
|
|
84
84
|
other: "mindre enn {{count}} sekunder"
|
|
@@ -140,54 +140,54 @@ const lo = {
|
|
|
140
140
|
one: "nesten ett år",
|
|
141
141
|
other: "nesten {{count}} år"
|
|
142
142
|
}
|
|
143
|
-
},
|
|
143
|
+
}, mo = (t, e, n) => {
|
|
144
144
|
let s;
|
|
145
|
-
const l =
|
|
145
|
+
const l = po[t];
|
|
146
146
|
return typeof l == "string" ? s = l : e === 1 ? s = l.one : s = l.other.replace("{{count}}", String(e)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "om " + s : s + " siden" : s;
|
|
147
|
-
},
|
|
147
|
+
}, go = {
|
|
148
148
|
full: "EEEE d. MMMM y",
|
|
149
149
|
long: "d. MMMM y",
|
|
150
150
|
medium: "d. MMM y",
|
|
151
151
|
short: "dd.MM.y"
|
|
152
|
-
},
|
|
152
|
+
}, fo = {
|
|
153
153
|
full: "'kl'. HH:mm:ss zzzz",
|
|
154
154
|
long: "HH:mm:ss z",
|
|
155
155
|
medium: "HH:mm:ss",
|
|
156
156
|
short: "HH:mm"
|
|
157
|
-
},
|
|
157
|
+
}, ho = {
|
|
158
158
|
full: "{{date}} 'kl.' {{time}}",
|
|
159
159
|
long: "{{date}} 'kl.' {{time}}",
|
|
160
160
|
medium: "{{date}} {{time}}",
|
|
161
161
|
short: "{{date}} {{time}}"
|
|
162
|
-
},
|
|
162
|
+
}, ko = {
|
|
163
163
|
date: Ve({
|
|
164
|
-
formats:
|
|
164
|
+
formats: go,
|
|
165
165
|
defaultWidth: "full"
|
|
166
166
|
}),
|
|
167
167
|
time: Ve({
|
|
168
|
-
formats:
|
|
168
|
+
formats: fo,
|
|
169
169
|
defaultWidth: "full"
|
|
170
170
|
}),
|
|
171
171
|
dateTime: Ve({
|
|
172
|
-
formats:
|
|
172
|
+
formats: ho,
|
|
173
173
|
defaultWidth: "full"
|
|
174
174
|
})
|
|
175
|
-
},
|
|
175
|
+
}, vo = {
|
|
176
176
|
lastWeek: "'forrige' eeee 'kl.' p",
|
|
177
177
|
yesterday: "'i går kl.' p",
|
|
178
178
|
today: "'i dag kl.' p",
|
|
179
179
|
tomorrow: "'i morgen kl.' p",
|
|
180
180
|
nextWeek: "EEEE 'kl.' p",
|
|
181
181
|
other: "P"
|
|
182
|
-
},
|
|
182
|
+
}, yo = (t, e, n, s) => vo[t], bo = {
|
|
183
183
|
narrow: ["f.Kr.", "e.Kr."],
|
|
184
184
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
185
185
|
wide: ["før Kristus", "etter Kristus"]
|
|
186
|
-
},
|
|
186
|
+
}, xo = {
|
|
187
187
|
narrow: ["1", "2", "3", "4"],
|
|
188
188
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
189
189
|
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
|
|
190
|
-
},
|
|
190
|
+
}, To = {
|
|
191
191
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
192
192
|
abbreviated: [
|
|
193
193
|
"jan.",
|
|
@@ -217,7 +217,7 @@ const lo = {
|
|
|
217
217
|
"november",
|
|
218
218
|
"desember"
|
|
219
219
|
]
|
|
220
|
-
},
|
|
220
|
+
}, So = {
|
|
221
221
|
narrow: ["S", "M", "T", "O", "T", "F", "L"],
|
|
222
222
|
short: ["sø", "ma", "ti", "on", "to", "fr", "lø"],
|
|
223
223
|
abbreviated: ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
|
|
@@ -230,7 +230,7 @@ const lo = {
|
|
|
230
230
|
"fredag",
|
|
231
231
|
"lørdag"
|
|
232
232
|
]
|
|
233
|
-
},
|
|
233
|
+
}, Co = {
|
|
234
234
|
narrow: {
|
|
235
235
|
am: "a",
|
|
236
236
|
pm: "p",
|
|
@@ -261,46 +261,46 @@ const lo = {
|
|
|
261
261
|
evening: "på kvelden",
|
|
262
262
|
night: "på natten"
|
|
263
263
|
}
|
|
264
|
-
},
|
|
265
|
-
ordinalNumber:
|
|
264
|
+
}, wo = (t, e) => Number(t) + ".", Io = {
|
|
265
|
+
ordinalNumber: wo,
|
|
266
266
|
era: Ie({
|
|
267
|
-
values:
|
|
267
|
+
values: bo,
|
|
268
268
|
defaultWidth: "wide"
|
|
269
269
|
}),
|
|
270
270
|
quarter: Ie({
|
|
271
|
-
values:
|
|
271
|
+
values: xo,
|
|
272
272
|
defaultWidth: "wide",
|
|
273
273
|
argumentCallback: (t) => t - 1
|
|
274
274
|
}),
|
|
275
275
|
month: Ie({
|
|
276
|
-
values:
|
|
276
|
+
values: To,
|
|
277
277
|
defaultWidth: "wide"
|
|
278
278
|
}),
|
|
279
279
|
day: Ie({
|
|
280
|
-
values:
|
|
280
|
+
values: So,
|
|
281
281
|
defaultWidth: "wide"
|
|
282
282
|
}),
|
|
283
283
|
dayPeriod: Ie({
|
|
284
|
-
values:
|
|
284
|
+
values: Co,
|
|
285
285
|
defaultWidth: "wide"
|
|
286
286
|
})
|
|
287
|
-
},
|
|
287
|
+
}, Do = /^(\d+)\.?/i, _o = /\d+/i, Ao = {
|
|
288
288
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
289
289
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
290
290
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
291
|
-
},
|
|
291
|
+
}, Mo = {
|
|
292
292
|
any: [/^f/i, /^e/i]
|
|
293
|
-
},
|
|
293
|
+
}, Lo = {
|
|
294
294
|
narrow: /^[1234]/i,
|
|
295
295
|
abbreviated: /^q[1234]/i,
|
|
296
296
|
wide: /^[1234](\.)? kvartal/i
|
|
297
|
-
},
|
|
297
|
+
}, jo = {
|
|
298
298
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
299
|
-
},
|
|
299
|
+
}, Eo = {
|
|
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
|
+
}, Fo = {
|
|
304
304
|
narrow: [
|
|
305
305
|
/^j/i,
|
|
306
306
|
/^f/i,
|
|
@@ -329,17 +329,17 @@ const lo = {
|
|
|
329
329
|
/^n/i,
|
|
330
330
|
/^d/i
|
|
331
331
|
]
|
|
332
|
-
},
|
|
332
|
+
}, No = {
|
|
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
|
+
}, Bo = {
|
|
338
338
|
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
339
|
-
},
|
|
339
|
+
}, Po = {
|
|
340
340
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
341
341
|
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
|
|
342
|
-
},
|
|
342
|
+
}, zo = {
|
|
343
343
|
any: {
|
|
344
344
|
am: /^a(\.?\s?m\.?)?$/i,
|
|
345
345
|
pm: /^p(\.?\s?m\.?)?$/i,
|
|
@@ -350,55 +350,55 @@ const lo = {
|
|
|
350
350
|
evening: /kveld/i,
|
|
351
351
|
night: /natt/i
|
|
352
352
|
}
|
|
353
|
-
},
|
|
354
|
-
ordinalNumber:
|
|
355
|
-
matchPattern:
|
|
356
|
-
parsePattern:
|
|
353
|
+
}, Ro = {
|
|
354
|
+
ordinalNumber: uo({
|
|
355
|
+
matchPattern: Do,
|
|
356
|
+
parsePattern: _o,
|
|
357
357
|
valueCallback: (t) => parseInt(t, 10)
|
|
358
358
|
}),
|
|
359
359
|
era: De({
|
|
360
|
-
matchPatterns:
|
|
360
|
+
matchPatterns: Ao,
|
|
361
361
|
defaultMatchWidth: "wide",
|
|
362
|
-
parsePatterns:
|
|
362
|
+
parsePatterns: Mo,
|
|
363
363
|
defaultParseWidth: "any"
|
|
364
364
|
}),
|
|
365
365
|
quarter: De({
|
|
366
|
-
matchPatterns:
|
|
366
|
+
matchPatterns: Lo,
|
|
367
367
|
defaultMatchWidth: "wide",
|
|
368
|
-
parsePatterns:
|
|
368
|
+
parsePatterns: jo,
|
|
369
369
|
defaultParseWidth: "any",
|
|
370
370
|
valueCallback: (t) => t + 1
|
|
371
371
|
}),
|
|
372
372
|
month: De({
|
|
373
|
-
matchPatterns:
|
|
373
|
+
matchPatterns: Eo,
|
|
374
374
|
defaultMatchWidth: "wide",
|
|
375
|
-
parsePatterns:
|
|
375
|
+
parsePatterns: Fo,
|
|
376
376
|
defaultParseWidth: "any"
|
|
377
377
|
}),
|
|
378
378
|
day: De({
|
|
379
|
-
matchPatterns:
|
|
379
|
+
matchPatterns: No,
|
|
380
380
|
defaultMatchWidth: "wide",
|
|
381
|
-
parsePatterns:
|
|
381
|
+
parsePatterns: Bo,
|
|
382
382
|
defaultParseWidth: "any"
|
|
383
383
|
}),
|
|
384
384
|
dayPeriod: De({
|
|
385
|
-
matchPatterns:
|
|
385
|
+
matchPatterns: Po,
|
|
386
386
|
defaultMatchWidth: "any",
|
|
387
|
-
parsePatterns:
|
|
387
|
+
parsePatterns: zo,
|
|
388
388
|
defaultParseWidth: "any"
|
|
389
389
|
})
|
|
390
|
-
},
|
|
390
|
+
}, xe = {
|
|
391
391
|
code: "nb",
|
|
392
|
-
formatDistance:
|
|
393
|
-
formatLong:
|
|
394
|
-
formatRelative:
|
|
395
|
-
localize:
|
|
396
|
-
match:
|
|
392
|
+
formatDistance: mo,
|
|
393
|
+
formatLong: ko,
|
|
394
|
+
formatRelative: yo,
|
|
395
|
+
localize: Io,
|
|
396
|
+
match: Ro,
|
|
397
397
|
options: {
|
|
398
398
|
weekStartsOn: 1,
|
|
399
399
|
firstWeekContainsDate: 4
|
|
400
400
|
}
|
|
401
|
-
}, Lt = ({ title: t, ...e }) => /* @__PURE__ */
|
|
401
|
+
}, Lt = ({ title: t, ...e }) => /* @__PURE__ */ _(
|
|
402
402
|
"svg",
|
|
403
403
|
{
|
|
404
404
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -424,7 +424,7 @@ const lo = {
|
|
|
424
424
|
}
|
|
425
425
|
);
|
|
426
426
|
Lt.displayName = "ChevronLeftIcon";
|
|
427
|
-
const jt = ({ title: t, ...e }) => /* @__PURE__ */
|
|
427
|
+
const jt = ({ title: t, ...e }) => /* @__PURE__ */ _(
|
|
428
428
|
"svg",
|
|
429
429
|
{
|
|
430
430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -450,18 +450,19 @@ const jt = ({ title: t, ...e }) => /* @__PURE__ */ D(
|
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
452
|
jt.displayName = "ChevronRightIcon";
|
|
453
|
-
const
|
|
454
|
-
calendarContainer:
|
|
455
|
-
calendarHeader:
|
|
456
|
-
monthYear:
|
|
457
|
-
navigationButtons:
|
|
458
|
-
grid:
|
|
459
|
-
dayNameCell:
|
|
460
|
-
dateCell:
|
|
461
|
-
dateNumberContainer:
|
|
462
|
-
otherMonth:
|
|
463
|
-
|
|
464
|
-
|
|
453
|
+
const Go = "_calendarContainer_10l5p_1", $o = "_calendarHeader_10l5p_14", Wo = "_monthYear_10l5p_21", Ho = "_navigationButtons_10l5p_32", Uo = "_grid_10l5p_41", Oo = "_dayNameCell_10l5p_48", Vo = "_dateCell_10l5p_65", Ko = "_dateNumberContainer_10l5p_90", Yo = "_otherMonth_10l5p_103", qo = "_disabled_10l5p_103", Zo = "_selectedDate_10l5p_129", ne = {
|
|
454
|
+
calendarContainer: Go,
|
|
455
|
+
calendarHeader: $o,
|
|
456
|
+
monthYear: Wo,
|
|
457
|
+
navigationButtons: Ho,
|
|
458
|
+
grid: Uo,
|
|
459
|
+
dayNameCell: Oo,
|
|
460
|
+
dateCell: Vo,
|
|
461
|
+
dateNumberContainer: Ko,
|
|
462
|
+
otherMonth: Yo,
|
|
463
|
+
disabled: qo,
|
|
464
|
+
selectedDate: Zo
|
|
465
|
+
}, Xo = {
|
|
465
466
|
NO: {
|
|
466
467
|
// Header
|
|
467
468
|
header: {
|
|
@@ -2452,10 +2453,10 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2452
2453
|
openDatePicker: "Open date picker"
|
|
2453
2454
|
}
|
|
2454
2455
|
}
|
|
2455
|
-
}, Qe = Kt(void 0),
|
|
2456
|
-
const [e, n] =
|
|
2456
|
+
}, Qe = Kt(void 0), na = ({ children: t }) => {
|
|
2457
|
+
const [e, n] = oe("NO"), s = (l) => {
|
|
2457
2458
|
const i = l.split(".");
|
|
2458
|
-
let o =
|
|
2459
|
+
let o = Xo[e];
|
|
2459
2460
|
for (const c of i) {
|
|
2460
2461
|
if (o[c] === void 0)
|
|
2461
2462
|
return console.warn(`Translation missing for key: ${l} in language: ${e}`), l;
|
|
@@ -2464,7 +2465,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2464
2465
|
return o;
|
|
2465
2466
|
};
|
|
2466
2467
|
return /* @__PURE__ */ r(Qe.Provider, { value: { language: e, setLanguage: n, t: s }, children: t });
|
|
2467
|
-
},
|
|
2468
|
+
}, oa = () => {
|
|
2468
2469
|
const t = It(Qe);
|
|
2469
2470
|
if (t === void 0)
|
|
2470
2471
|
throw new Error("useLanguage must be used within a LanguageProvider");
|
|
@@ -2526,10 +2527,10 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2526
2527
|
"dateInput.openDatePicker": "Åpne datovelger"
|
|
2527
2528
|
})[e] || e
|
|
2528
2529
|
} : t;
|
|
2529
|
-
},
|
|
2530
|
-
const e = be(t), n = _t(e, { locale:
|
|
2531
|
-
return
|
|
2532
|
-
},
|
|
2530
|
+
}, Jo = (t) => {
|
|
2531
|
+
const e = be(t), n = _t(e, { locale: xe }), s = At(n, 41);
|
|
2532
|
+
return Jn({ start: n, end: s });
|
|
2533
|
+
}, vt = (t) => t && t.charAt(0).toUpperCase() + t.slice(1), Qo = ({
|
|
2533
2534
|
initialDate: t = /* @__PURE__ */ new Date(),
|
|
2534
2535
|
selectedDate: e = null,
|
|
2535
2536
|
// Prop for valgt dato
|
|
@@ -2539,55 +2540,62 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2539
2540
|
"data-size": l
|
|
2540
2541
|
// <-- Destrukturert
|
|
2541
2542
|
}) => {
|
|
2542
|
-
const { t: i } = Ee()
|
|
2543
|
+
const { t: i } = Ee();
|
|
2544
|
+
Y(() => {
|
|
2545
|
+
const g = "rk-datepicker-inline-styles";
|
|
2546
|
+
if (typeof document > "u" || document.getElementById(g)) return;
|
|
2547
|
+
const M = er(ne), D = document.createElement("style");
|
|
2548
|
+
D.id = g, D.textContent = M, document.head.appendChild(D);
|
|
2549
|
+
}, []);
|
|
2550
|
+
const [o, c] = oe(
|
|
2543
2551
|
be(e && Oe(e) ? e : t)
|
|
2544
2552
|
);
|
|
2545
|
-
|
|
2553
|
+
Y(() => {
|
|
2546
2554
|
if (e && Oe(e)) {
|
|
2547
2555
|
const g = be(e);
|
|
2548
2556
|
gt(g, o) || c(g);
|
|
2549
2557
|
}
|
|
2550
2558
|
}, [e]);
|
|
2551
|
-
const d =
|
|
2552
|
-
() =>
|
|
2559
|
+
const d = Te(() => be(/* @__PURE__ */ new Date()), []), u = Te(() => !1, [o, d]), v = Te(
|
|
2560
|
+
() => Jo(o),
|
|
2553
2561
|
[o]
|
|
2554
|
-
),
|
|
2555
|
-
const g = _t(/* @__PURE__ */ new Date(), { locale:
|
|
2556
|
-
return Array.from({ length: 7 }).map((
|
|
2557
|
-
const
|
|
2558
|
-
return
|
|
2562
|
+
), m = Te(() => {
|
|
2563
|
+
const g = _t(/* @__PURE__ */ new Date(), { locale: xe });
|
|
2564
|
+
return Array.from({ length: 7 }).map((M, D) => {
|
|
2565
|
+
const w = we(At(g, D), "EEEEEE", { locale: xe });
|
|
2566
|
+
return vt(w);
|
|
2559
2567
|
});
|
|
2560
|
-
}, []),
|
|
2561
|
-
u || c((g) => be(
|
|
2562
|
-
}, [u]),
|
|
2563
|
-
c((g) => be(
|
|
2568
|
+
}, []), f = se(() => {
|
|
2569
|
+
u || c((g) => be(Yn(g, 1)));
|
|
2570
|
+
}, [u]), x = se(() => {
|
|
2571
|
+
c((g) => be(qn(g, 1)));
|
|
2564
2572
|
}, []), a = se(
|
|
2565
2573
|
(g) => {
|
|
2566
2574
|
n && n(g);
|
|
2567
2575
|
},
|
|
2568
2576
|
[n]
|
|
2569
|
-
),
|
|
2570
|
-
(g,
|
|
2571
|
-
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), a(
|
|
2577
|
+
), h = se(
|
|
2578
|
+
(g, M) => {
|
|
2579
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), a(M));
|
|
2572
2580
|
},
|
|
2573
2581
|
[a]
|
|
2574
|
-
), k = we(o, "MMMM", { locale:
|
|
2575
|
-
return /* @__PURE__ */
|
|
2582
|
+
), k = we(o, "MMMM", { locale: xe }), p = we(o, "yyyy", { locale: xe }), y = `${vt(k)} ${p}`;
|
|
2583
|
+
return /* @__PURE__ */ _(
|
|
2576
2584
|
"div",
|
|
2577
2585
|
{
|
|
2578
|
-
className:
|
|
2586
|
+
className: ne.calendarContainer,
|
|
2579
2587
|
"data-color": s,
|
|
2580
2588
|
"data-size": l,
|
|
2581
2589
|
children: [
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
/* @__PURE__ */ r("span", { className:
|
|
2584
|
-
/* @__PURE__ */
|
|
2590
|
+
/* @__PURE__ */ _("div", { className: ne.calendarHeader, children: [
|
|
2591
|
+
/* @__PURE__ */ r("span", { className: ne.monthYear, children: y }),
|
|
2592
|
+
/* @__PURE__ */ _("div", { className: ne.navigationButtons, children: [
|
|
2585
2593
|
/* @__PURE__ */ r(
|
|
2586
2594
|
qe,
|
|
2587
2595
|
{
|
|
2588
2596
|
variant: "tertiary",
|
|
2589
2597
|
icon: !0,
|
|
2590
|
-
onClick:
|
|
2598
|
+
onClick: f,
|
|
2591
2599
|
"aria-label": i("datePicker.previousMonth"),
|
|
2592
2600
|
disabled: u,
|
|
2593
2601
|
children: /* @__PURE__ */ r(Lt, {})
|
|
@@ -2598,33 +2606,33 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2598
2606
|
{
|
|
2599
2607
|
variant: "tertiary",
|
|
2600
2608
|
icon: !0,
|
|
2601
|
-
onClick:
|
|
2609
|
+
onClick: x,
|
|
2602
2610
|
"aria-label": i("datePicker.nextMonth"),
|
|
2603
2611
|
children: /* @__PURE__ */ r(jt, {})
|
|
2604
2612
|
}
|
|
2605
2613
|
)
|
|
2606
2614
|
] })
|
|
2607
2615
|
] }),
|
|
2608
|
-
/* @__PURE__ */ r("div", { className:
|
|
2609
|
-
/* @__PURE__ */ r("div", { className:
|
|
2610
|
-
const
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2616
|
+
/* @__PURE__ */ r("div", { className: ne.grid, children: m.map((g) => /* @__PURE__ */ r("div", { className: ne.dayNameCell, children: g }, g)) }),
|
|
2617
|
+
/* @__PURE__ */ r("div", { className: ne.grid, children: v.map((g) => {
|
|
2618
|
+
const M = gt(g, o), D = e && Oe(e) && Zn(g, e), w = Xn(g), C = [
|
|
2619
|
+
ne.dateCell,
|
|
2620
|
+
M ? "" : ne.otherMonth,
|
|
2621
|
+
D ? ne.selectedDate : "",
|
|
2614
2622
|
// Utheving basert på prop
|
|
2615
|
-
|
|
2623
|
+
w && !D ? ne.todayDate : ""
|
|
2616
2624
|
].filter(Boolean).join(" ");
|
|
2617
2625
|
return /* @__PURE__ */ r(
|
|
2618
2626
|
"div",
|
|
2619
2627
|
{
|
|
2620
|
-
className:
|
|
2628
|
+
className: C,
|
|
2621
2629
|
onClick: () => a(g),
|
|
2622
|
-
onKeyDown: (
|
|
2630
|
+
onKeyDown: (A) => h(A, g),
|
|
2623
2631
|
role: "button",
|
|
2624
2632
|
tabIndex: 0,
|
|
2625
|
-
"aria-pressed":
|
|
2626
|
-
"aria-label": we(g, "PPP", { locale:
|
|
2627
|
-
children: /* @__PURE__ */ r("span", { className:
|
|
2633
|
+
"aria-pressed": D ?? !1,
|
|
2634
|
+
"aria-label": we(g, "PPP", { locale: xe }),
|
|
2635
|
+
children: /* @__PURE__ */ r("span", { className: ne.dateNumberContainer, children: we(g, "d") })
|
|
2628
2636
|
},
|
|
2629
2637
|
g.toISOString()
|
|
2630
2638
|
);
|
|
@@ -2633,19 +2641,135 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
2633
2641
|
}
|
|
2634
2642
|
);
|
|
2635
2643
|
};
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2644
|
+
Qo.displayName = "DatePicker";
|
|
2645
|
+
function er(t) {
|
|
2646
|
+
return `
|
|
2647
|
+
.${t.calendarContainer} {
|
|
2648
|
+
display: inline-flex;
|
|
2649
|
+
padding: var(--ds-size-8, 32px);
|
|
2650
|
+
flex-direction: column;
|
|
2651
|
+
align-items: flex-start;
|
|
2652
|
+
gap: var(--ds-size-3, 12px);
|
|
2653
|
+
border: 1px solid var(--ds-color-border-subtle, #ccc);
|
|
2654
|
+
border-radius: var(--ds-border-radius-md, 4px);
|
|
2655
|
+
background-color: var(--ds-color-background-default, #fff);
|
|
2656
|
+
font-family: var(--ds-font-family, sans-serif);
|
|
2657
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
2658
|
+
}
|
|
2659
|
+
.${t.calendarHeader} {
|
|
2660
|
+
display: flex;
|
|
2661
|
+
justify-content: space-between;
|
|
2662
|
+
align-items: center;
|
|
2663
|
+
align-self: stretch;
|
|
2664
|
+
}
|
|
2665
|
+
.${t.monthYear} {
|
|
2666
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
2667
|
+
font-family: var(--ds-font-family, sans-serif);
|
|
2668
|
+
font-size: var(--ds-heading-sm-font-size, 1.5rem);
|
|
2669
|
+
font-weight: var(--ds-heading-sm-font-weight, 500);
|
|
2670
|
+
line-height: var(--ds-heading-sm-line-height, 1.3);
|
|
2671
|
+
margin: 0;
|
|
2672
|
+
}
|
|
2673
|
+
.${t.navigationButtons} {
|
|
2674
|
+
display: flex;
|
|
2675
|
+
gap: var(--ds-size-1, 4px);
|
|
2676
|
+
}
|
|
2677
|
+
.${t.navigationButtons} > button:disabled svg {
|
|
2678
|
+
opacity: var(--ds-opacity-disabled, 0.3);
|
|
2679
|
+
}
|
|
2680
|
+
.${t.grid} {
|
|
2681
|
+
display: grid;
|
|
2682
|
+
grid-template-columns: repeat(7, 1fr);
|
|
2683
|
+
width: 100%;
|
|
2684
|
+
text-align: center;
|
|
2685
|
+
}
|
|
2686
|
+
.${t.dayNameCell} {
|
|
2687
|
+
display: flex;
|
|
2688
|
+
padding: var(--ds-size-2, 8px);
|
|
2689
|
+
flex-direction: column;
|
|
2690
|
+
justify-content: center;
|
|
2691
|
+
align-items: center;
|
|
2692
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
2693
|
+
text-align: center;
|
|
2694
|
+
font-family: var(--ds-font-family, sans-serif);
|
|
2695
|
+
font-size: var(--ds-body-xs-font-size, 14px);
|
|
2696
|
+
font-weight: var(--ds-font-weight-semibold, 600);
|
|
2697
|
+
line-height: var(--ds-body-short-xs-line-height, 1.3);
|
|
2698
|
+
box-sizing: border-box;
|
|
2699
|
+
}
|
|
2700
|
+
.${t.dateCell} {
|
|
2701
|
+
display: flex;
|
|
2702
|
+
padding: var(--ds-size-5, 22px);
|
|
2703
|
+
flex-direction: column;
|
|
2704
|
+
justify-content: center;
|
|
2705
|
+
align-items: center;
|
|
2706
|
+
border: var(--ds-border-width-default, 1px) solid var(--ds-color-border-subtle, #bcbcbc);
|
|
2707
|
+
box-sizing: border-box;
|
|
2708
|
+
margin: -0.5px;
|
|
2709
|
+
font-family: var(--ds-font-family, sans-serif);
|
|
2710
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
2711
|
+
text-align: center;
|
|
2712
|
+
font-size: var(--ds-body-xs-font-size, 14px);
|
|
2713
|
+
font-weight: var(--ds-body-xs-font-weight, 400);
|
|
2714
|
+
line-height: var(--ds-body-short-xs-line-height, 1.3);
|
|
2715
|
+
cursor: pointer;
|
|
2716
|
+
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
|
2717
|
+
user-select: none;
|
|
2718
|
+
}
|
|
2719
|
+
.${t.dateNumberContainer} {
|
|
2720
|
+
display: flex;
|
|
2721
|
+
justify-content: center;
|
|
2722
|
+
align-items: center;
|
|
2723
|
+
width: 24px;
|
|
2724
|
+
height: 24px;
|
|
2725
|
+
border-radius: 50%;
|
|
2726
|
+
transition: color 0.15s ease-in-out, font-weight 0.15s ease-in-out;
|
|
2727
|
+
line-height: 1;
|
|
2728
|
+
box-sizing: border-box;
|
|
2729
|
+
background-color: transparent;
|
|
2730
|
+
}
|
|
2731
|
+
.${t.dateCell}:hover:not(.${t.otherMonth}):not(.${t.disabled}) {
|
|
2732
|
+
background-color: var(--ds-color-surface-hover, #eee);
|
|
2733
|
+
position: relative;
|
|
2734
|
+
z-index: 1;
|
|
2735
|
+
}
|
|
2736
|
+
.${t.otherMonth} {
|
|
2737
|
+
color: var(--ds-color-text-subtle, #aaa);
|
|
2738
|
+
cursor: default;
|
|
2739
|
+
pointer-events: none;
|
|
2740
|
+
background-color: var(--ds-color-surface-tinted, #e8e8e8);
|
|
2741
|
+
border: var(--ds-border-width-default, 1px) solid var(--ds-color-border-subtle, #bcbcbc);
|
|
2742
|
+
margin: -0.5px;
|
|
2743
|
+
}
|
|
2744
|
+
.${t.selectedDate} {
|
|
2745
|
+
background-color: var(--ds-color-base-default, #C30000);
|
|
2746
|
+
border-color: var(--ds-color-base-default, #C30000);
|
|
2747
|
+
color: var(--ds-color-base-contrast-default, #fff);
|
|
2748
|
+
position: relative;
|
|
2749
|
+
z-index: 1;
|
|
2750
|
+
}
|
|
2751
|
+
.${t.selectedDate} .${t.dateNumberContainer} {
|
|
2752
|
+
color: var(--ds-color-base-contrast-default, #fff);
|
|
2753
|
+
font-weight: var(--ds-font-weight-semibold, 600);
|
|
2754
|
+
background-color: transparent;
|
|
2755
|
+
}
|
|
2756
|
+
.${t.todayDate} .${t.dateNumberContainer} {
|
|
2757
|
+
font-weight: var(--ds-font-weight-semibold, 600);
|
|
2758
|
+
}
|
|
2759
|
+
`;
|
|
2760
|
+
}
|
|
2761
|
+
const tr = "_fieldset_16fx7_2", nr = "_description_16fx7_14", or = "_error_16fx7_21", rr = "_inputWrapper_16fx7_30", sr = "_inputWrapperError_16fx7_42", ir = "_suffixButton_16fx7_80", ar = "_suffixButtonInteractive_16fx7_100", ge = {
|
|
2762
|
+
fieldset: tr,
|
|
2763
|
+
description: nr,
|
|
2764
|
+
error: or,
|
|
2765
|
+
inputWrapper: rr,
|
|
2766
|
+
inputWrapperError: sr,
|
|
2767
|
+
suffixButton: ir,
|
|
2768
|
+
suffixButtonInteractive: ar
|
|
2769
|
+
}, yt = (t) => {
|
|
2646
2770
|
const e = t.slice(0, 2), n = t.slice(2, 4), s = t.slice(4, 8);
|
|
2647
2771
|
return t.length > 4 ? `${e}.${n}.${s}` : t.length > 2 ? `${e}.${n}` : t.length > 0 ? e : "";
|
|
2648
|
-
}, bt = (t) => (t || "").replace(/\D/g, ""),
|
|
2772
|
+
}, bt = (t) => (t || "").replace(/\D/g, ""), xt = (t) => {
|
|
2649
2773
|
let e = t;
|
|
2650
2774
|
if (e.length >= 2) {
|
|
2651
2775
|
const n = parseInt(e.substring(0, 2), 10);
|
|
@@ -2656,9 +2780,16 @@ const Zo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
2656
2780
|
!isNaN(n) && n > 12 && (e = e.substring(0, 2) + "12" + e.substring(4));
|
|
2657
2781
|
}
|
|
2658
2782
|
return e.slice(0, 8);
|
|
2659
|
-
},
|
|
2783
|
+
}, lr = fe(
|
|
2660
2784
|
(t, e) => {
|
|
2661
|
-
const { t: n } = Ee()
|
|
2785
|
+
const { t: n } = Ee();
|
|
2786
|
+
Y(() => {
|
|
2787
|
+
const S = "rk-dateinput-inline-styles";
|
|
2788
|
+
if (typeof document > "u" || document.getElementById(S)) return;
|
|
2789
|
+
const E = dr(ge), H = document.createElement("style");
|
|
2790
|
+
H.id = S, H.textContent = E, document.head.appendChild(H);
|
|
2791
|
+
}, []);
|
|
2792
|
+
const {
|
|
2662
2793
|
label: s,
|
|
2663
2794
|
suffixIcon: l,
|
|
2664
2795
|
onSuffixClick: i,
|
|
@@ -2669,23 +2800,23 @@ const Zo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
2669
2800
|
inputClassName: d,
|
|
2670
2801
|
// For selve input-elementet
|
|
2671
2802
|
value: u,
|
|
2672
|
-
defaultValue:
|
|
2673
|
-
onChange:
|
|
2674
|
-
readOnly:
|
|
2675
|
-
placeholder:
|
|
2803
|
+
defaultValue: v,
|
|
2804
|
+
onChange: m,
|
|
2805
|
+
readOnly: f,
|
|
2806
|
+
placeholder: x = "dd.mm.åååå",
|
|
2676
2807
|
id: a,
|
|
2677
|
-
name:
|
|
2808
|
+
name: h,
|
|
2678
2809
|
required: k,
|
|
2679
|
-
disabled:
|
|
2680
|
-
onClick:
|
|
2810
|
+
disabled: p,
|
|
2811
|
+
onClick: y,
|
|
2681
2812
|
onFocus: g,
|
|
2682
2813
|
// Send ekstern onFocus videre
|
|
2683
|
-
onBlur:
|
|
2814
|
+
onBlur: M,
|
|
2684
2815
|
// Send ekstern onBlur videre
|
|
2685
|
-
autoComplete:
|
|
2686
|
-
"aria-label":
|
|
2687
|
-
"aria-labelledby":
|
|
2688
|
-
description:
|
|
2816
|
+
autoComplete: D = "off",
|
|
2817
|
+
"aria-label": w,
|
|
2818
|
+
"aria-labelledby": C,
|
|
2819
|
+
description: A,
|
|
2689
2820
|
error: j,
|
|
2690
2821
|
// Bruk error-prop for styling
|
|
2691
2822
|
"data-color": N,
|
|
@@ -2693,57 +2824,57 @@ const Zo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
2693
2824
|
"data-size": B,
|
|
2694
2825
|
// <-- Destrukturering
|
|
2695
2826
|
...$
|
|
2696
|
-
} = t,
|
|
2827
|
+
} = t, O = u !== void 0, z = Ye(null);
|
|
2697
2828
|
Pe.useImperativeHandle(
|
|
2698
2829
|
e,
|
|
2699
2830
|
() => z.current
|
|
2700
2831
|
);
|
|
2701
2832
|
const P = se(
|
|
2702
|
-
(
|
|
2703
|
-
const
|
|
2704
|
-
return
|
|
2833
|
+
(S) => {
|
|
2834
|
+
const E = bt(S), H = xt(E);
|
|
2835
|
+
return yt(H);
|
|
2705
2836
|
},
|
|
2706
2837
|
[]
|
|
2707
|
-
), [
|
|
2708
|
-
() => P(u ??
|
|
2838
|
+
), [L, V] = oe(
|
|
2839
|
+
() => P(u ?? v)
|
|
2709
2840
|
);
|
|
2710
|
-
|
|
2711
|
-
if (
|
|
2712
|
-
const
|
|
2713
|
-
|
|
2841
|
+
Y(() => {
|
|
2842
|
+
if (O) {
|
|
2843
|
+
const S = P(u);
|
|
2844
|
+
S !== L && (V(S), z.current && z.current.value !== S && (z.current.value = S));
|
|
2714
2845
|
}
|
|
2715
|
-
}, [u,
|
|
2846
|
+
}, [u, O, L, P]);
|
|
2716
2847
|
const te = se(
|
|
2717
|
-
(
|
|
2718
|
-
const
|
|
2848
|
+
(S) => {
|
|
2849
|
+
const E = S.target, H = E.value, Z = L, W = bt(H).slice(0, 8), I = xt(W), R = yt(I);
|
|
2719
2850
|
let G = 0;
|
|
2720
|
-
const
|
|
2721
|
-
|
|
2722
|
-
if (z.current && (
|
|
2723
|
-
const
|
|
2724
|
-
...
|
|
2725
|
-
target: { ...
|
|
2851
|
+
const K = I.length;
|
|
2852
|
+
K <= 2 ? G = K : K <= 4 ? G = K + 1 : G = K + 2, G = Math.min(G, R.length), requestAnimationFrame(() => {
|
|
2853
|
+
if (z.current && (V(R), z.current.value = R, z.current.setSelectionRange(G, G), (R !== Z || O) && m)) {
|
|
2854
|
+
const re = {
|
|
2855
|
+
...S,
|
|
2856
|
+
target: { ...E, value: R }
|
|
2726
2857
|
};
|
|
2727
|
-
|
|
2858
|
+
m(re, R);
|
|
2728
2859
|
}
|
|
2729
2860
|
});
|
|
2730
2861
|
},
|
|
2731
|
-
[
|
|
2732
|
-
), Q = [
|
|
2733
|
-
|
|
2862
|
+
[L, O, m, P]
|
|
2863
|
+
), Q = [ge.fieldset, o].filter(Boolean).join(" "), ie = [
|
|
2864
|
+
ge.inputWrapper,
|
|
2734
2865
|
c,
|
|
2735
|
-
j ?
|
|
2866
|
+
j ? ge.inputWrapperError : ""
|
|
2736
2867
|
].filter(Boolean).join(" "), ee = [
|
|
2737
2868
|
d
|
|
2738
2869
|
].filter(Boolean).join(" "), de = [
|
|
2739
|
-
|
|
2740
|
-
i ?
|
|
2870
|
+
ge.suffixButton,
|
|
2871
|
+
i ? ge.suffixButtonInteractive : ""
|
|
2741
2872
|
].filter(Boolean).join(" ");
|
|
2742
|
-
!s && !
|
|
2743
|
-
const ae = s && typeof s == "string" ?
|
|
2873
|
+
!s && !w && !C && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
2874
|
+
const ae = s && typeof s == "string" ? C || `${a}-label` : void 0, q = A ? `${a}-desc` : void 0, ce = j ? `${a}-err` : void 0, T = [q, ce].filter(Boolean).join(" ") || void 0;
|
|
2744
2875
|
return (
|
|
2745
2876
|
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
2746
|
-
/* @__PURE__ */
|
|
2877
|
+
/* @__PURE__ */ _(
|
|
2747
2878
|
"div",
|
|
2748
2879
|
{
|
|
2749
2880
|
className: Q,
|
|
@@ -2751,8 +2882,8 @@ const Zo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
2751
2882
|
"data-size": B,
|
|
2752
2883
|
children: [
|
|
2753
2884
|
s && typeof s == "string" ? /* @__PURE__ */ r("label", { id: ae, htmlFor: a, children: s }) : s,
|
|
2754
|
-
|
|
2755
|
-
/* @__PURE__ */
|
|
2885
|
+
A && /* @__PURE__ */ r("p", { id: q, className: ge.description, children: A }),
|
|
2886
|
+
/* @__PURE__ */ _("div", { className: ie, children: [
|
|
2756
2887
|
/* @__PURE__ */ r(
|
|
2757
2888
|
"input",
|
|
2758
2889
|
{
|
|
@@ -2761,21 +2892,21 @@ const Zo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
2761
2892
|
inputMode: "numeric",
|
|
2762
2893
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
2763
2894
|
maxLength: 10,
|
|
2764
|
-
value:
|
|
2765
|
-
readOnly:
|
|
2766
|
-
placeholder:
|
|
2895
|
+
value: L,
|
|
2896
|
+
readOnly: f,
|
|
2897
|
+
placeholder: x,
|
|
2767
2898
|
id: a,
|
|
2768
|
-
name:
|
|
2899
|
+
name: h,
|
|
2769
2900
|
required: k,
|
|
2770
|
-
disabled:
|
|
2771
|
-
onClick:
|
|
2901
|
+
disabled: p,
|
|
2902
|
+
onClick: y,
|
|
2772
2903
|
onChange: te,
|
|
2773
2904
|
onFocus: g,
|
|
2774
|
-
onBlur:
|
|
2775
|
-
autoComplete:
|
|
2776
|
-
"aria-label":
|
|
2905
|
+
onBlur: M,
|
|
2906
|
+
autoComplete: D,
|
|
2907
|
+
"aria-label": w,
|
|
2777
2908
|
"aria-labelledby": ae,
|
|
2778
|
-
"aria-describedby":
|
|
2909
|
+
"aria-describedby": T,
|
|
2779
2910
|
"aria-invalid": !!j,
|
|
2780
2911
|
className: ee,
|
|
2781
2912
|
...$
|
|
@@ -2786,30 +2917,123 @@ const Zo = "_fieldset_16fx7_2", Xo = "_description_16fx7_14", Jo = "_error_16fx7
|
|
|
2786
2917
|
{
|
|
2787
2918
|
type: "button",
|
|
2788
2919
|
className: de,
|
|
2789
|
-
onClick:
|
|
2790
|
-
tabIndex: i && !
|
|
2920
|
+
onClick: p ? void 0 : i,
|
|
2921
|
+
tabIndex: i && !p ? 0 : -1,
|
|
2791
2922
|
"aria-hidden": !i,
|
|
2792
|
-
disabled:
|
|
2923
|
+
disabled: p,
|
|
2793
2924
|
"aria-label": i ? n("dateInput.openDatePicker") : void 0,
|
|
2794
2925
|
children: l
|
|
2795
2926
|
}
|
|
2796
2927
|
)
|
|
2797
2928
|
] }),
|
|
2798
|
-
j && /* @__PURE__ */ r("p", { id: ce, className:
|
|
2929
|
+
j && /* @__PURE__ */ r("p", { id: ce, className: ge.error, role: "alert", children: j })
|
|
2799
2930
|
]
|
|
2800
2931
|
}
|
|
2801
2932
|
)
|
|
2802
2933
|
);
|
|
2803
2934
|
}
|
|
2804
2935
|
);
|
|
2805
|
-
|
|
2806
|
-
function
|
|
2936
|
+
lr.displayName = "DateInput";
|
|
2937
|
+
function dr(t) {
|
|
2938
|
+
return `
|
|
2939
|
+
.${t.fieldset} {
|
|
2940
|
+
margin-bottom: var(--ds-spacing-4, 16px);
|
|
2941
|
+
}
|
|
2942
|
+
.${t.fieldset} label {
|
|
2943
|
+
display: block;
|
|
2944
|
+
margin-bottom: var(--ds-spacing-1, 4px);
|
|
2945
|
+
font-weight: var(--ds-font-weight-medium, 500);
|
|
2946
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
2947
|
+
}
|
|
2948
|
+
.${t.description} {
|
|
2949
|
+
font-size: var(--ds-font-size-sm, 14px);
|
|
2950
|
+
color: var(--ds-color-text-subtle, #5d5d5d);
|
|
2951
|
+
margin-top: var(--ds-spacing-1, 4px);
|
|
2952
|
+
margin-bottom: var(--ds-spacing-2, 8px);
|
|
2953
|
+
}
|
|
2954
|
+
.${t.error} {
|
|
2955
|
+
font-size: var(--ds-font-size-sm, 14px);
|
|
2956
|
+
color: var(--ds-color-danger-text-default, #c30000);
|
|
2957
|
+
margin-top: var(--ds-spacing-1, 4px);
|
|
2958
|
+
}
|
|
2959
|
+
.${t.inputWrapper} {
|
|
2960
|
+
display: flex;
|
|
2961
|
+
align-items: stretch;
|
|
2962
|
+
width: 100%;
|
|
2963
|
+
position: relative;
|
|
2964
|
+
border: var(--ds-border-width-default, 1px) solid var(--ds-color-border-default, #797979);
|
|
2965
|
+
border-radius: var(--ds-border-radius-md, 4px);
|
|
2966
|
+
overflow: hidden;
|
|
2967
|
+
transition: border-color 0.1s ease-out, outline 0.1s ease-out;
|
|
2968
|
+
}
|
|
2969
|
+
.${t.inputWrapperError} {
|
|
2970
|
+
border-color: var(--ds-color-danger-border-default, #c30000);
|
|
2971
|
+
}
|
|
2972
|
+
.${t.inputWrapper}:focus-within {
|
|
2973
|
+
outline: var(--ds-border-width-focus, 3px) solid var(--ds-color-focus-outer, #2B2B2B);
|
|
2974
|
+
outline-offset: var(--ds-focus-outline-offset, 2px);
|
|
2975
|
+
}
|
|
2976
|
+
.${t.inputWrapper} input {
|
|
2977
|
+
box-sizing: border-box;
|
|
2978
|
+
flex-grow: 1;
|
|
2979
|
+
width: auto;
|
|
2980
|
+
min-width: 0;
|
|
2981
|
+
background-color: var(--ds-color-background-default, #fff);
|
|
2982
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
2983
|
+
border: none;
|
|
2984
|
+
border-radius: 0;
|
|
2985
|
+
outline: none;
|
|
2986
|
+
padding: var(--ds-size-2, 8px) var(--ds-size-3, 12px);
|
|
2987
|
+
font-family: inherit;
|
|
2988
|
+
font-size: inherit;
|
|
2989
|
+
appearance: none;
|
|
2990
|
+
-webkit-appearance: none;
|
|
2991
|
+
}
|
|
2992
|
+
.${t.inputWrapper} input:disabled {
|
|
2993
|
+
opacity: var(--ds-opacity-disabled, 0.5);
|
|
2994
|
+
cursor: not-allowed;
|
|
2995
|
+
background-color: var(--ds-color-neutral-surface-subtle, #f0f0f0);
|
|
2996
|
+
color: var(--ds-color-neutral-text-subtle, #5d5d5d);
|
|
2997
|
+
}
|
|
2998
|
+
.${t.suffixButton} {
|
|
2999
|
+
display: inline-flex;
|
|
3000
|
+
align-items: center;
|
|
3001
|
+
justify-content: center;
|
|
3002
|
+
flex-shrink: 0;
|
|
3003
|
+
padding: 0 var(--ds-size-3, 12px);
|
|
3004
|
+
margin: 0;
|
|
3005
|
+
border: none;
|
|
3006
|
+
border-radius: 0;
|
|
3007
|
+
border-left: var(--ds-border-width-default, 1px) solid var(--ds-color-border-default, #797979);
|
|
3008
|
+
background-color: var(--ds-color-surface-tinted, #e8e8e8);
|
|
3009
|
+
color: var(--ds-color-text-subtle, #5d5d5d);
|
|
3010
|
+
font-size: 1.25rem;
|
|
3011
|
+
box-sizing: border-box;
|
|
3012
|
+
cursor: default;
|
|
3013
|
+
transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
|
|
3014
|
+
}
|
|
3015
|
+
.${t.suffixButtonInteractive} {
|
|
3016
|
+
cursor: pointer;
|
|
3017
|
+
}
|
|
3018
|
+
.${t.suffixButtonInteractive}:hover:not(:disabled) {
|
|
3019
|
+
color: var(--ds-color-text-default, #2b2b2b);
|
|
3020
|
+
background-color: var(--ds-color-surface-hover, #dadada);
|
|
3021
|
+
}
|
|
3022
|
+
.${t.suffixButton}:disabled {
|
|
3023
|
+
opacity: var(--ds-opacity-disabled, 0.3);
|
|
3024
|
+
cursor: not-allowed;
|
|
3025
|
+
background-color: var(--ds-color-neutral-surface-tinted, #e8e8e8);
|
|
3026
|
+
border-left-color: var(--ds-color-neutral-border-default, #797979);
|
|
3027
|
+
}
|
|
3028
|
+
`;
|
|
3029
|
+
}
|
|
3030
|
+
function cr(t) {
|
|
2807
3031
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2808
3032
|
}
|
|
2809
|
-
function
|
|
2810
|
-
return
|
|
3033
|
+
function Tt(t) {
|
|
3034
|
+
return cr(t) || Array.isArray(t);
|
|
2811
3035
|
}
|
|
2812
|
-
function
|
|
3036
|
+
function ur() {
|
|
2813
3037
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
2814
3038
|
}
|
|
2815
3039
|
function et(t, e) {
|
|
@@ -2818,15 +3042,15 @@ function et(t, e) {
|
|
|
2818
3042
|
const l = JSON.stringify(Object.keys(t.breakpoints || {})), i = JSON.stringify(Object.keys(e.breakpoints || {}));
|
|
2819
3043
|
return l !== i ? !1 : n.every((o) => {
|
|
2820
3044
|
const c = t[o], d = e[o];
|
|
2821
|
-
return typeof c == "function" ? `${c}` == `${d}` : !
|
|
3045
|
+
return typeof c == "function" ? `${c}` == `${d}` : !Tt(c) || !Tt(d) ? c === d : et(c, d);
|
|
2822
3046
|
});
|
|
2823
3047
|
}
|
|
2824
|
-
function
|
|
3048
|
+
function St(t) {
|
|
2825
3049
|
return t.concat().sort((e, n) => e.name > n.name ? 1 : -1).map((e) => e.options);
|
|
2826
3050
|
}
|
|
2827
|
-
function
|
|
3051
|
+
function pr(t, e) {
|
|
2828
3052
|
if (t.length !== e.length) return !1;
|
|
2829
|
-
const n =
|
|
3053
|
+
const n = St(t), s = St(e);
|
|
2830
3054
|
return n.every((l, i) => {
|
|
2831
3055
|
const o = s[i];
|
|
2832
3056
|
return et(l, o);
|
|
@@ -2844,21 +3068,21 @@ function Re(t) {
|
|
|
2844
3068
|
function Ct(t) {
|
|
2845
3069
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2846
3070
|
}
|
|
2847
|
-
function
|
|
3071
|
+
function U(t) {
|
|
2848
3072
|
return Math.abs(t);
|
|
2849
3073
|
}
|
|
2850
3074
|
function nt(t) {
|
|
2851
3075
|
return Math.sign(t);
|
|
2852
3076
|
}
|
|
2853
3077
|
function Ae(t, e) {
|
|
2854
|
-
return
|
|
3078
|
+
return U(t - e);
|
|
2855
3079
|
}
|
|
2856
|
-
function
|
|
2857
|
-
if (t === 0 || e === 0 ||
|
|
2858
|
-
const n = Ae(
|
|
2859
|
-
return
|
|
3080
|
+
function mr(t, e) {
|
|
3081
|
+
if (t === 0 || e === 0 || U(t) <= U(e)) return 0;
|
|
3082
|
+
const n = Ae(U(t), U(e));
|
|
3083
|
+
return U(n / t);
|
|
2860
3084
|
}
|
|
2861
|
-
function
|
|
3085
|
+
function gr(t) {
|
|
2862
3086
|
return Math.round(t * 100) / 100;
|
|
2863
3087
|
}
|
|
2864
3088
|
function Me(t) {
|
|
@@ -2888,7 +3112,7 @@ function Et(t, e) {
|
|
|
2888
3112
|
function Xe(t, e) {
|
|
2889
3113
|
return typeof e.MouseEvent < "u" && t instanceof e.MouseEvent;
|
|
2890
3114
|
}
|
|
2891
|
-
function
|
|
3115
|
+
function fr(t, e) {
|
|
2892
3116
|
const n = {
|
|
2893
3117
|
start: s,
|
|
2894
3118
|
center: l,
|
|
@@ -2933,7 +3157,7 @@ function je() {
|
|
|
2933
3157
|
};
|
|
2934
3158
|
return s;
|
|
2935
3159
|
}
|
|
2936
|
-
function
|
|
3160
|
+
function hr(t, e, n, s) {
|
|
2937
3161
|
const l = je(), i = 1e3 / 60;
|
|
2938
3162
|
let o = null, c = 0, d = 0;
|
|
2939
3163
|
function u() {
|
|
@@ -2941,22 +3165,22 @@ function cr(t, e, n, s) {
|
|
|
2941
3165
|
t.hidden && a();
|
|
2942
3166
|
});
|
|
2943
3167
|
}
|
|
2944
|
-
function
|
|
2945
|
-
|
|
3168
|
+
function v() {
|
|
3169
|
+
x(), l.clear();
|
|
2946
3170
|
}
|
|
2947
|
-
function
|
|
3171
|
+
function m(k) {
|
|
2948
3172
|
if (!d) return;
|
|
2949
3173
|
o || (o = k, n(), n());
|
|
2950
|
-
const
|
|
2951
|
-
for (o = k, c +=
|
|
3174
|
+
const p = k - o;
|
|
3175
|
+
for (o = k, c += p; c >= i; )
|
|
2952
3176
|
n(), c -= i;
|
|
2953
|
-
const
|
|
2954
|
-
s(
|
|
3177
|
+
const y = c / i;
|
|
3178
|
+
s(y), d && (d = e.requestAnimationFrame(m));
|
|
2955
3179
|
}
|
|
2956
|
-
function
|
|
2957
|
-
d || (d = e.requestAnimationFrame(
|
|
3180
|
+
function f() {
|
|
3181
|
+
d || (d = e.requestAnimationFrame(m));
|
|
2958
3182
|
}
|
|
2959
|
-
function
|
|
3183
|
+
function x() {
|
|
2960
3184
|
e.cancelAnimationFrame(d), o = null, c = 0, d = 0;
|
|
2961
3185
|
}
|
|
2962
3186
|
function a() {
|
|
@@ -2964,29 +3188,29 @@ function cr(t, e, n, s) {
|
|
|
2964
3188
|
}
|
|
2965
3189
|
return {
|
|
2966
3190
|
init: u,
|
|
2967
|
-
destroy:
|
|
2968
|
-
start:
|
|
2969
|
-
stop:
|
|
3191
|
+
destroy: v,
|
|
3192
|
+
start: f,
|
|
3193
|
+
stop: x,
|
|
2970
3194
|
update: n,
|
|
2971
3195
|
render: s
|
|
2972
3196
|
};
|
|
2973
3197
|
}
|
|
2974
|
-
function
|
|
2975
|
-
const n = e === "rtl", s = t === "y", l = s ? "y" : "x", i = s ? "x" : "y", o = !s && n ? -1 : 1, c =
|
|
3198
|
+
function kr(t, e) {
|
|
3199
|
+
const n = e === "rtl", s = t === "y", l = s ? "y" : "x", i = s ? "x" : "y", o = !s && n ? -1 : 1, c = v(), d = m();
|
|
2976
3200
|
function u(a) {
|
|
2977
3201
|
const {
|
|
2978
|
-
height:
|
|
3202
|
+
height: h,
|
|
2979
3203
|
width: k
|
|
2980
3204
|
} = a;
|
|
2981
|
-
return s ?
|
|
3205
|
+
return s ? h : k;
|
|
2982
3206
|
}
|
|
2983
|
-
function
|
|
3207
|
+
function v() {
|
|
2984
3208
|
return s ? "top" : n ? "right" : "left";
|
|
2985
3209
|
}
|
|
2986
|
-
function
|
|
3210
|
+
function m() {
|
|
2987
3211
|
return s ? "bottom" : n ? "left" : "right";
|
|
2988
3212
|
}
|
|
2989
|
-
function
|
|
3213
|
+
function f(a) {
|
|
2990
3214
|
return a * o;
|
|
2991
3215
|
}
|
|
2992
3216
|
return {
|
|
@@ -2995,11 +3219,11 @@ function ur(t, e) {
|
|
|
2995
3219
|
startEdge: c,
|
|
2996
3220
|
endEdge: d,
|
|
2997
3221
|
measureSize: u,
|
|
2998
|
-
direction:
|
|
3222
|
+
direction: f
|
|
2999
3223
|
};
|
|
3000
3224
|
}
|
|
3001
|
-
function
|
|
3002
|
-
const n =
|
|
3225
|
+
function ve(t = 0, e = 0) {
|
|
3226
|
+
const n = U(t - e);
|
|
3003
3227
|
function s(u) {
|
|
3004
3228
|
return u < t;
|
|
3005
3229
|
}
|
|
@@ -3029,121 +3253,121 @@ function ye(t = 0, e = 0) {
|
|
|
3029
3253
|
function Ft(t, e, n) {
|
|
3030
3254
|
const {
|
|
3031
3255
|
constrain: s
|
|
3032
|
-
} =
|
|
3256
|
+
} = ve(0, t), l = t + 1;
|
|
3033
3257
|
let i = o(e);
|
|
3034
|
-
function o(
|
|
3035
|
-
return n ?
|
|
3258
|
+
function o(f) {
|
|
3259
|
+
return n ? U((l + f) % l) : s(f);
|
|
3036
3260
|
}
|
|
3037
3261
|
function c() {
|
|
3038
3262
|
return i;
|
|
3039
3263
|
}
|
|
3040
|
-
function d(
|
|
3041
|
-
return i = o(
|
|
3264
|
+
function d(f) {
|
|
3265
|
+
return i = o(f), m;
|
|
3042
3266
|
}
|
|
3043
|
-
function u(
|
|
3044
|
-
return
|
|
3267
|
+
function u(f) {
|
|
3268
|
+
return v().set(c() + f);
|
|
3045
3269
|
}
|
|
3046
|
-
function
|
|
3270
|
+
function v() {
|
|
3047
3271
|
return Ft(t, c(), n);
|
|
3048
3272
|
}
|
|
3049
|
-
const
|
|
3273
|
+
const m = {
|
|
3050
3274
|
get: c,
|
|
3051
3275
|
set: d,
|
|
3052
3276
|
add: u,
|
|
3053
|
-
clone:
|
|
3277
|
+
clone: v
|
|
3054
3278
|
};
|
|
3055
|
-
return
|
|
3279
|
+
return m;
|
|
3056
3280
|
}
|
|
3057
|
-
function
|
|
3281
|
+
function vr(t, e, n, s, l, i, o, c, d, u, v, m, f, x, a, h, k, p, y) {
|
|
3058
3282
|
const {
|
|
3059
3283
|
cross: g,
|
|
3060
|
-
direction:
|
|
3061
|
-
} = t,
|
|
3284
|
+
direction: M
|
|
3285
|
+
} = t, D = ["INPUT", "SELECT", "TEXTAREA"], w = {
|
|
3062
3286
|
passive: !1
|
|
3063
|
-
},
|
|
3287
|
+
}, C = je(), A = je(), j = ve(50, 225).constrain(x.measure(20)), N = {
|
|
3064
3288
|
mouse: 300,
|
|
3065
3289
|
touch: 400
|
|
3066
3290
|
}, B = {
|
|
3067
3291
|
mouse: 500,
|
|
3068
3292
|
touch: 600
|
|
3069
3293
|
}, $ = a ? 43 : 25;
|
|
3070
|
-
let
|
|
3294
|
+
let O = !1, z = 0, P = 0, L = !1, V = !1, te = !1, Q = !1;
|
|
3071
3295
|
function ie(I) {
|
|
3072
|
-
if (!
|
|
3073
|
-
function R(
|
|
3074
|
-
(Re(
|
|
3296
|
+
if (!y) return;
|
|
3297
|
+
function R(K) {
|
|
3298
|
+
(Re(y) || y(I, K)) && T(K);
|
|
3075
3299
|
}
|
|
3076
3300
|
const G = e;
|
|
3077
|
-
|
|
3078
|
-
},
|
|
3079
|
-
}).add(G, "touchstart", R).add(G, "mousedown", R).add(G, "touchcancel",
|
|
3301
|
+
C.add(G, "dragstart", (K) => K.preventDefault(), w).add(G, "touchmove", () => {
|
|
3302
|
+
}, w).add(G, "touchend", () => {
|
|
3303
|
+
}).add(G, "touchstart", R).add(G, "mousedown", R).add(G, "touchcancel", E).add(G, "contextmenu", E).add(G, "click", H, !0);
|
|
3080
3304
|
}
|
|
3081
3305
|
function ee() {
|
|
3082
|
-
|
|
3306
|
+
C.clear(), A.clear();
|
|
3083
3307
|
}
|
|
3084
3308
|
function de() {
|
|
3085
3309
|
const I = Q ? n : e;
|
|
3086
|
-
|
|
3310
|
+
A.add(I, "touchmove", S, w).add(I, "touchend", E).add(I, "mousemove", S, w).add(I, "mouseup", E);
|
|
3087
3311
|
}
|
|
3088
3312
|
function ae(I) {
|
|
3089
3313
|
const R = I.nodeName || "";
|
|
3090
|
-
return
|
|
3314
|
+
return D.includes(R);
|
|
3091
3315
|
}
|
|
3092
|
-
function
|
|
3316
|
+
function q() {
|
|
3093
3317
|
return (a ? B : N)[Q ? "mouse" : "touch"];
|
|
3094
3318
|
}
|
|
3095
3319
|
function ce(I, R) {
|
|
3096
|
-
const G =
|
|
3097
|
-
return a ||
|
|
3320
|
+
const G = m.add(nt(I) * -1), K = v.byDistance(I, !a).distance;
|
|
3321
|
+
return a || U(I) < j ? K : k && R ? K * 0.5 : v.byIndex(G.get(), 0).distance;
|
|
3098
3322
|
}
|
|
3099
|
-
function
|
|
3323
|
+
function T(I) {
|
|
3100
3324
|
const R = Xe(I, s);
|
|
3101
|
-
Q = R, te = a && R && !I.buttons &&
|
|
3325
|
+
Q = R, te = a && R && !I.buttons && O, O = Ae(l.get(), o.get()) >= 2, !(R && I.button !== 0) && (ae(I.target) || (L = !0, i.pointerDown(I), u.useFriction(0).useDuration(0), l.set(o), de(), z = i.readPoint(I), P = i.readPoint(I, g), f.emit("pointerDown")));
|
|
3102
3326
|
}
|
|
3103
|
-
function
|
|
3104
|
-
if (!Xe(I, s) && I.touches.length >= 2) return
|
|
3105
|
-
const G = i.readPoint(I),
|
|
3106
|
-
if (!
|
|
3107
|
-
return
|
|
3327
|
+
function S(I) {
|
|
3328
|
+
if (!Xe(I, s) && I.touches.length >= 2) return E(I);
|
|
3329
|
+
const G = i.readPoint(I), K = i.readPoint(I, g), re = Ae(G, z), pe = Ae(K, P);
|
|
3330
|
+
if (!V && !Q && (!I.cancelable || (V = re > pe, !V)))
|
|
3331
|
+
return E(I);
|
|
3108
3332
|
const he = i.pointerMove(I);
|
|
3109
|
-
|
|
3333
|
+
re > h && (te = !0), u.useFriction(0.3).useDuration(0.75), c.start(), l.add(M(he)), I.preventDefault();
|
|
3110
3334
|
}
|
|
3111
|
-
function
|
|
3112
|
-
const G =
|
|
3113
|
-
|
|
3335
|
+
function E(I) {
|
|
3336
|
+
const G = v.byDistance(0, !1).index !== m.get(), K = i.pointerUp(I) * q(), re = ce(M(K), G), pe = mr(K, re), he = $ - 10 * pe, me = p + pe / 50;
|
|
3337
|
+
V = !1, L = !1, A.clear(), u.useDuration(he).useFriction(me), d.distance(re, !a), Q = !1, f.emit("pointerUp");
|
|
3114
3338
|
}
|
|
3115
|
-
function
|
|
3339
|
+
function H(I) {
|
|
3116
3340
|
te && (I.stopPropagation(), I.preventDefault(), te = !1);
|
|
3117
3341
|
}
|
|
3118
|
-
function
|
|
3119
|
-
return
|
|
3342
|
+
function Z() {
|
|
3343
|
+
return L;
|
|
3120
3344
|
}
|
|
3121
3345
|
return {
|
|
3122
3346
|
init: ie,
|
|
3123
3347
|
destroy: ee,
|
|
3124
|
-
pointerDown:
|
|
3348
|
+
pointerDown: Z
|
|
3125
3349
|
};
|
|
3126
3350
|
}
|
|
3127
|
-
function
|
|
3351
|
+
function yr(t, e) {
|
|
3128
3352
|
let s, l;
|
|
3129
|
-
function i(
|
|
3130
|
-
return
|
|
3353
|
+
function i(m) {
|
|
3354
|
+
return m.timeStamp;
|
|
3131
3355
|
}
|
|
3132
|
-
function o(
|
|
3133
|
-
const a = `client${(
|
|
3134
|
-
return (Xe(
|
|
3356
|
+
function o(m, f) {
|
|
3357
|
+
const a = `client${(f || t.scroll) === "x" ? "X" : "Y"}`;
|
|
3358
|
+
return (Xe(m, e) ? m : m.touches[0])[a];
|
|
3135
3359
|
}
|
|
3136
|
-
function c(
|
|
3137
|
-
return s =
|
|
3360
|
+
function c(m) {
|
|
3361
|
+
return s = m, l = m, o(m);
|
|
3138
3362
|
}
|
|
3139
|
-
function d(
|
|
3140
|
-
const
|
|
3141
|
-
return l =
|
|
3363
|
+
function d(m) {
|
|
3364
|
+
const f = o(m) - o(l), x = i(m) - i(s) > 170;
|
|
3365
|
+
return l = m, x && (s = m), f;
|
|
3142
3366
|
}
|
|
3143
|
-
function u(
|
|
3367
|
+
function u(m) {
|
|
3144
3368
|
if (!s || !l) return 0;
|
|
3145
|
-
const
|
|
3146
|
-
return
|
|
3369
|
+
const f = o(l) - o(s), x = i(m) - i(s), a = i(m) - i(l) > 170, h = f / x;
|
|
3370
|
+
return x && !a && U(h) > 0.1 ? h : 0;
|
|
3147
3371
|
}
|
|
3148
3372
|
return {
|
|
3149
3373
|
pointerDown: c,
|
|
@@ -3152,7 +3376,7 @@ function pr(t, e) {
|
|
|
3152
3376
|
readPoint: o
|
|
3153
3377
|
};
|
|
3154
3378
|
}
|
|
3155
|
-
function
|
|
3379
|
+
function br() {
|
|
3156
3380
|
function t(n) {
|
|
3157
3381
|
const {
|
|
3158
3382
|
offsetTop: s,
|
|
@@ -3173,7 +3397,7 @@ function gr() {
|
|
|
3173
3397
|
measure: t
|
|
3174
3398
|
};
|
|
3175
3399
|
}
|
|
3176
|
-
function
|
|
3400
|
+
function xr(t) {
|
|
3177
3401
|
function e(s) {
|
|
3178
3402
|
return t * (s / 100);
|
|
3179
3403
|
}
|
|
@@ -3181,160 +3405,160 @@ function hr(t) {
|
|
|
3181
3405
|
measure: e
|
|
3182
3406
|
};
|
|
3183
3407
|
}
|
|
3184
|
-
function
|
|
3408
|
+
function Tr(t, e, n, s, l, i, o) {
|
|
3185
3409
|
const c = [t].concat(s);
|
|
3186
|
-
let d, u,
|
|
3187
|
-
function
|
|
3410
|
+
let d, u, v = [], m = !1;
|
|
3411
|
+
function f(k) {
|
|
3188
3412
|
return l.measureSize(o.measure(k));
|
|
3189
3413
|
}
|
|
3190
|
-
function
|
|
3414
|
+
function x(k) {
|
|
3191
3415
|
if (!i) return;
|
|
3192
|
-
u =
|
|
3193
|
-
function
|
|
3194
|
-
for (const g of
|
|
3195
|
-
if (
|
|
3196
|
-
const
|
|
3197
|
-
if (
|
|
3416
|
+
u = f(t), v = s.map(f);
|
|
3417
|
+
function p(y) {
|
|
3418
|
+
for (const g of y) {
|
|
3419
|
+
if (m) return;
|
|
3420
|
+
const M = g.target === t, D = s.indexOf(g.target), w = M ? u : v[D], C = f(M ? t : s[D]);
|
|
3421
|
+
if (U(C - w) >= 0.5) {
|
|
3198
3422
|
k.reInit(), e.emit("resize");
|
|
3199
3423
|
break;
|
|
3200
3424
|
}
|
|
3201
3425
|
}
|
|
3202
3426
|
}
|
|
3203
|
-
d = new ResizeObserver((
|
|
3204
|
-
(Re(i) || i(k,
|
|
3427
|
+
d = new ResizeObserver((y) => {
|
|
3428
|
+
(Re(i) || i(k, y)) && p(y);
|
|
3205
3429
|
}), n.requestAnimationFrame(() => {
|
|
3206
|
-
c.forEach((
|
|
3430
|
+
c.forEach((y) => d.observe(y));
|
|
3207
3431
|
});
|
|
3208
3432
|
}
|
|
3209
3433
|
function a() {
|
|
3210
|
-
|
|
3434
|
+
m = !0, d && d.disconnect();
|
|
3211
3435
|
}
|
|
3212
3436
|
return {
|
|
3213
|
-
init:
|
|
3437
|
+
init: x,
|
|
3214
3438
|
destroy: a
|
|
3215
3439
|
};
|
|
3216
3440
|
}
|
|
3217
|
-
function
|
|
3218
|
-
let o = 0, c = 0, d = l, u = i,
|
|
3219
|
-
function
|
|
3220
|
-
const
|
|
3221
|
-
let
|
|
3222
|
-
return
|
|
3441
|
+
function Sr(t, e, n, s, l, i) {
|
|
3442
|
+
let o = 0, c = 0, d = l, u = i, v = t.get(), m = 0;
|
|
3443
|
+
function f() {
|
|
3444
|
+
const w = s.get() - t.get(), C = !d;
|
|
3445
|
+
let A = 0;
|
|
3446
|
+
return C ? (o = 0, n.set(s), t.set(s), A = w) : (n.set(t), o += w / d, o *= u, v += o, t.add(o), A = v - m), c = nt(A), m = v, D;
|
|
3223
3447
|
}
|
|
3224
|
-
function
|
|
3225
|
-
const
|
|
3226
|
-
return
|
|
3448
|
+
function x() {
|
|
3449
|
+
const w = s.get() - e.get();
|
|
3450
|
+
return U(w) < 1e-3;
|
|
3227
3451
|
}
|
|
3228
3452
|
function a() {
|
|
3229
3453
|
return d;
|
|
3230
3454
|
}
|
|
3231
|
-
function
|
|
3455
|
+
function h() {
|
|
3232
3456
|
return c;
|
|
3233
3457
|
}
|
|
3234
3458
|
function k() {
|
|
3235
3459
|
return o;
|
|
3236
3460
|
}
|
|
3237
|
-
function
|
|
3461
|
+
function p() {
|
|
3238
3462
|
return g(l);
|
|
3239
3463
|
}
|
|
3240
|
-
function
|
|
3241
|
-
return
|
|
3464
|
+
function y() {
|
|
3465
|
+
return M(i);
|
|
3242
3466
|
}
|
|
3243
|
-
function g(
|
|
3244
|
-
return d =
|
|
3467
|
+
function g(w) {
|
|
3468
|
+
return d = w, D;
|
|
3245
3469
|
}
|
|
3246
|
-
function
|
|
3247
|
-
return u =
|
|
3470
|
+
function M(w) {
|
|
3471
|
+
return u = w, D;
|
|
3248
3472
|
}
|
|
3249
|
-
const
|
|
3250
|
-
direction:
|
|
3473
|
+
const D = {
|
|
3474
|
+
direction: h,
|
|
3251
3475
|
duration: a,
|
|
3252
3476
|
velocity: k,
|
|
3253
|
-
seek:
|
|
3254
|
-
settled:
|
|
3255
|
-
useBaseFriction:
|
|
3256
|
-
useBaseDuration:
|
|
3257
|
-
useFriction:
|
|
3477
|
+
seek: f,
|
|
3478
|
+
settled: x,
|
|
3479
|
+
useBaseFriction: y,
|
|
3480
|
+
useBaseDuration: p,
|
|
3481
|
+
useFriction: M,
|
|
3258
3482
|
useDuration: g
|
|
3259
3483
|
};
|
|
3260
|
-
return
|
|
3484
|
+
return D;
|
|
3261
3485
|
}
|
|
3262
|
-
function
|
|
3263
|
-
const i = l.measure(10), o = l.measure(50), c =
|
|
3486
|
+
function Cr(t, e, n, s, l) {
|
|
3487
|
+
const i = l.measure(10), o = l.measure(50), c = ve(0.1, 0.99);
|
|
3264
3488
|
let d = !1;
|
|
3265
3489
|
function u() {
|
|
3266
3490
|
return !(d || !t.reachedAny(n.get()) || !t.reachedAny(e.get()));
|
|
3267
3491
|
}
|
|
3268
|
-
function
|
|
3492
|
+
function v(x) {
|
|
3269
3493
|
if (!u()) return;
|
|
3270
|
-
const a = t.reachedMin(e.get()) ? "min" : "max",
|
|
3271
|
-
n.subtract(k *
|
|
3494
|
+
const a = t.reachedMin(e.get()) ? "min" : "max", h = U(t[a] - e.get()), k = n.get() - e.get(), p = c.constrain(h / o);
|
|
3495
|
+
n.subtract(k * p), !x && U(k) < i && (n.set(t.constrain(n.get())), s.useDuration(25).useBaseFriction());
|
|
3272
3496
|
}
|
|
3273
|
-
function
|
|
3274
|
-
d = !
|
|
3497
|
+
function m(x) {
|
|
3498
|
+
d = !x;
|
|
3275
3499
|
}
|
|
3276
3500
|
return {
|
|
3277
3501
|
shouldConstrain: u,
|
|
3278
|
-
constrain:
|
|
3279
|
-
toggleActive:
|
|
3502
|
+
constrain: v,
|
|
3503
|
+
toggleActive: m
|
|
3280
3504
|
};
|
|
3281
3505
|
}
|
|
3282
|
-
function
|
|
3283
|
-
const i =
|
|
3284
|
-
function u(a,
|
|
3285
|
-
return Ae(a,
|
|
3506
|
+
function wr(t, e, n, s, l) {
|
|
3507
|
+
const i = ve(-e + t, 0), o = m(), c = v(), d = f();
|
|
3508
|
+
function u(a, h) {
|
|
3509
|
+
return Ae(a, h) <= 1;
|
|
3286
3510
|
}
|
|
3287
|
-
function
|
|
3288
|
-
const a = o[0],
|
|
3289
|
-
return
|
|
3511
|
+
function v() {
|
|
3512
|
+
const a = o[0], h = le(o), k = o.lastIndexOf(a), p = o.indexOf(h) + 1;
|
|
3513
|
+
return ve(k, p);
|
|
3290
3514
|
}
|
|
3291
|
-
function
|
|
3292
|
-
return n.map((a,
|
|
3515
|
+
function m() {
|
|
3516
|
+
return n.map((a, h) => {
|
|
3293
3517
|
const {
|
|
3294
3518
|
min: k,
|
|
3295
|
-
max:
|
|
3296
|
-
} = i,
|
|
3297
|
-
return g ?
|
|
3519
|
+
max: p
|
|
3520
|
+
} = i, y = i.constrain(a), g = !h, M = ot(n, h);
|
|
3521
|
+
return g ? p : M || u(k, y) ? k : u(p, y) ? p : y;
|
|
3298
3522
|
}).map((a) => parseFloat(a.toFixed(3)));
|
|
3299
3523
|
}
|
|
3300
|
-
function
|
|
3524
|
+
function f() {
|
|
3301
3525
|
if (e <= t + l) return [i.max];
|
|
3302
3526
|
if (s === "keepSnaps") return o;
|
|
3303
3527
|
const {
|
|
3304
3528
|
min: a,
|
|
3305
|
-
max:
|
|
3529
|
+
max: h
|
|
3306
3530
|
} = c;
|
|
3307
|
-
return o.slice(a,
|
|
3531
|
+
return o.slice(a, h);
|
|
3308
3532
|
}
|
|
3309
3533
|
return {
|
|
3310
3534
|
snapsContained: d,
|
|
3311
3535
|
scrollContainLimit: c
|
|
3312
3536
|
};
|
|
3313
3537
|
}
|
|
3314
|
-
function
|
|
3538
|
+
function Ir(t, e, n) {
|
|
3315
3539
|
const s = e[0], l = n ? s - t : le(e);
|
|
3316
3540
|
return {
|
|
3317
|
-
limit:
|
|
3541
|
+
limit: ve(l, s)
|
|
3318
3542
|
};
|
|
3319
3543
|
}
|
|
3320
|
-
function
|
|
3544
|
+
function Dr(t, e, n, s) {
|
|
3321
3545
|
const i = e.min + 0.1, o = e.max + 0.1, {
|
|
3322
3546
|
reachedMin: c,
|
|
3323
3547
|
reachedMax: d
|
|
3324
|
-
} =
|
|
3325
|
-
function u(
|
|
3326
|
-
return
|
|
3548
|
+
} = ve(i, o);
|
|
3549
|
+
function u(f) {
|
|
3550
|
+
return f === 1 ? d(n.get()) : f === -1 ? c(n.get()) : !1;
|
|
3327
3551
|
}
|
|
3328
|
-
function
|
|
3329
|
-
if (!u(
|
|
3330
|
-
const
|
|
3331
|
-
s.forEach((a) => a.add(
|
|
3552
|
+
function v(f) {
|
|
3553
|
+
if (!u(f)) return;
|
|
3554
|
+
const x = t * (f * -1);
|
|
3555
|
+
s.forEach((a) => a.add(x));
|
|
3332
3556
|
}
|
|
3333
3557
|
return {
|
|
3334
|
-
loop:
|
|
3558
|
+
loop: v
|
|
3335
3559
|
};
|
|
3336
3560
|
}
|
|
3337
|
-
function
|
|
3561
|
+
function _r(t) {
|
|
3338
3562
|
const {
|
|
3339
3563
|
max: e,
|
|
3340
3564
|
length: n
|
|
@@ -3347,43 +3571,43 @@ function Sr(t) {
|
|
|
3347
3571
|
get: s
|
|
3348
3572
|
};
|
|
3349
3573
|
}
|
|
3350
|
-
function
|
|
3574
|
+
function Ar(t, e, n, s, l) {
|
|
3351
3575
|
const {
|
|
3352
3576
|
startEdge: i,
|
|
3353
3577
|
endEdge: o
|
|
3354
3578
|
} = t, {
|
|
3355
3579
|
groupSlides: c
|
|
3356
|
-
} = l, d =
|
|
3357
|
-
function
|
|
3358
|
-
return c(s).map((
|
|
3580
|
+
} = l, d = m().map(e.measure), u = f(), v = x();
|
|
3581
|
+
function m() {
|
|
3582
|
+
return c(s).map((h) => le(h)[o] - h[0][i]).map(U);
|
|
3359
3583
|
}
|
|
3360
|
-
function
|
|
3361
|
-
return s.map((
|
|
3584
|
+
function f() {
|
|
3585
|
+
return s.map((h) => n[i] - h[i]).map((h) => -U(h));
|
|
3362
3586
|
}
|
|
3363
|
-
function
|
|
3364
|
-
return c(u).map((
|
|
3587
|
+
function x() {
|
|
3588
|
+
return c(u).map((h) => h[0]).map((h, k) => h + d[k]);
|
|
3365
3589
|
}
|
|
3366
3590
|
return {
|
|
3367
3591
|
snaps: u,
|
|
3368
|
-
snapsAligned:
|
|
3592
|
+
snapsAligned: v
|
|
3369
3593
|
};
|
|
3370
3594
|
}
|
|
3371
|
-
function
|
|
3595
|
+
function Mr(t, e, n, s, l, i) {
|
|
3372
3596
|
const {
|
|
3373
3597
|
groupSlides: o
|
|
3374
3598
|
} = l, {
|
|
3375
3599
|
min: c,
|
|
3376
3600
|
max: d
|
|
3377
|
-
} = s, u =
|
|
3378
|
-
function
|
|
3379
|
-
const
|
|
3380
|
-
return n.length === 1 ? [i] :
|
|
3381
|
-
const
|
|
3382
|
-
if (
|
|
3601
|
+
} = s, u = v();
|
|
3602
|
+
function v() {
|
|
3603
|
+
const f = o(i), x = !t || e === "keepSnaps";
|
|
3604
|
+
return n.length === 1 ? [i] : x ? f : f.slice(c, d).map((a, h, k) => {
|
|
3605
|
+
const p = !h, y = ot(k, h);
|
|
3606
|
+
if (p) {
|
|
3383
3607
|
const g = le(k[0]) + 1;
|
|
3384
3608
|
return wt(g);
|
|
3385
3609
|
}
|
|
3386
|
-
if (
|
|
3610
|
+
if (y) {
|
|
3387
3611
|
const g = Fe(i) - le(k)[0] + 1;
|
|
3388
3612
|
return wt(g, le(k)[0]);
|
|
3389
3613
|
}
|
|
@@ -3394,73 +3618,73 @@ function Cr(t, e, n, s, l, i) {
|
|
|
3394
3618
|
slideRegistry: u
|
|
3395
3619
|
};
|
|
3396
3620
|
}
|
|
3397
|
-
function
|
|
3621
|
+
function Lr(t, e, n, s, l) {
|
|
3398
3622
|
const {
|
|
3399
3623
|
reachedAny: i,
|
|
3400
3624
|
removeOffset: o,
|
|
3401
3625
|
constrain: c
|
|
3402
3626
|
} = s;
|
|
3403
3627
|
function d(a) {
|
|
3404
|
-
return a.concat().sort((
|
|
3628
|
+
return a.concat().sort((h, k) => U(h) - U(k))[0];
|
|
3405
3629
|
}
|
|
3406
3630
|
function u(a) {
|
|
3407
|
-
const
|
|
3408
|
-
diff: y
|
|
3631
|
+
const h = t ? o(a) : c(a), k = e.map((y, g) => ({
|
|
3632
|
+
diff: v(y - h, 0),
|
|
3409
3633
|
index: g
|
|
3410
|
-
})).sort((
|
|
3411
|
-
index:
|
|
3634
|
+
})).sort((y, g) => U(y.diff) - U(g.diff)), {
|
|
3635
|
+
index: p
|
|
3412
3636
|
} = k[0];
|
|
3413
3637
|
return {
|
|
3414
|
-
index:
|
|
3415
|
-
distance:
|
|
3638
|
+
index: p,
|
|
3639
|
+
distance: h
|
|
3416
3640
|
};
|
|
3417
3641
|
}
|
|
3418
|
-
function
|
|
3642
|
+
function v(a, h) {
|
|
3419
3643
|
const k = [a, a + n, a - n];
|
|
3420
3644
|
if (!t) return a;
|
|
3421
|
-
if (!
|
|
3422
|
-
const
|
|
3423
|
-
return
|
|
3645
|
+
if (!h) return d(k);
|
|
3646
|
+
const p = k.filter((y) => nt(y) === h);
|
|
3647
|
+
return p.length ? d(p) : le(k) - n;
|
|
3424
3648
|
}
|
|
3425
|
-
function
|
|
3426
|
-
const k = e[a] - l.get(),
|
|
3649
|
+
function m(a, h) {
|
|
3650
|
+
const k = e[a] - l.get(), p = v(k, h);
|
|
3427
3651
|
return {
|
|
3428
3652
|
index: a,
|
|
3429
|
-
distance:
|
|
3653
|
+
distance: p
|
|
3430
3654
|
};
|
|
3431
3655
|
}
|
|
3432
|
-
function
|
|
3656
|
+
function f(a, h) {
|
|
3433
3657
|
const k = l.get() + a, {
|
|
3434
|
-
index:
|
|
3435
|
-
distance:
|
|
3658
|
+
index: p,
|
|
3659
|
+
distance: y
|
|
3436
3660
|
} = u(k), g = !t && i(k);
|
|
3437
|
-
if (!
|
|
3438
|
-
index:
|
|
3661
|
+
if (!h || g) return {
|
|
3662
|
+
index: p,
|
|
3439
3663
|
distance: a
|
|
3440
3664
|
};
|
|
3441
|
-
const
|
|
3665
|
+
const M = e[p] - y, D = a + v(M, 0);
|
|
3442
3666
|
return {
|
|
3443
|
-
index:
|
|
3444
|
-
distance:
|
|
3667
|
+
index: p,
|
|
3668
|
+
distance: D
|
|
3445
3669
|
};
|
|
3446
3670
|
}
|
|
3447
3671
|
return {
|
|
3448
|
-
byDistance:
|
|
3449
|
-
byIndex:
|
|
3450
|
-
shortcut:
|
|
3672
|
+
byDistance: f,
|
|
3673
|
+
byIndex: m,
|
|
3674
|
+
shortcut: v
|
|
3451
3675
|
};
|
|
3452
3676
|
}
|
|
3453
|
-
function
|
|
3454
|
-
function c(
|
|
3455
|
-
const
|
|
3456
|
-
i.add(
|
|
3677
|
+
function jr(t, e, n, s, l, i, o) {
|
|
3678
|
+
function c(m) {
|
|
3679
|
+
const f = m.distance, x = m.index !== e.get();
|
|
3680
|
+
i.add(f), f && (s.duration() ? t.start() : (t.update(), t.render(1), t.update())), x && (n.set(e.get()), e.set(m.index), o.emit("select"));
|
|
3457
3681
|
}
|
|
3458
|
-
function d(
|
|
3459
|
-
const
|
|
3460
|
-
c(
|
|
3682
|
+
function d(m, f) {
|
|
3683
|
+
const x = l.byDistance(m, f);
|
|
3684
|
+
c(x);
|
|
3461
3685
|
}
|
|
3462
|
-
function u(
|
|
3463
|
-
const
|
|
3686
|
+
function u(m, f) {
|
|
3687
|
+
const x = e.clone().set(m), a = l.byIndex(x.get(), f);
|
|
3464
3688
|
c(a);
|
|
3465
3689
|
}
|
|
3466
3690
|
return {
|
|
@@ -3468,31 +3692,31 @@ function Ir(t, e, n, s, l, i, o) {
|
|
|
3468
3692
|
index: u
|
|
3469
3693
|
};
|
|
3470
3694
|
}
|
|
3471
|
-
function
|
|
3695
|
+
function Er(t, e, n, s, l, i, o, c) {
|
|
3472
3696
|
const d = {
|
|
3473
3697
|
passive: !0,
|
|
3474
3698
|
capture: !0
|
|
3475
3699
|
};
|
|
3476
3700
|
let u = 0;
|
|
3477
|
-
function
|
|
3701
|
+
function v(x) {
|
|
3478
3702
|
if (!c) return;
|
|
3479
|
-
function a(
|
|
3703
|
+
function a(h) {
|
|
3480
3704
|
if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
|
|
3481
3705
|
o.emit("slideFocusStart"), t.scrollLeft = 0;
|
|
3482
|
-
const
|
|
3483
|
-
tt(
|
|
3706
|
+
const y = n.findIndex((g) => g.includes(h));
|
|
3707
|
+
tt(y) && (l.useDuration(0), s.index(y, 0), o.emit("slideFocus"));
|
|
3484
3708
|
}
|
|
3485
|
-
i.add(document, "keydown",
|
|
3486
|
-
i.add(
|
|
3487
|
-
(Re(c) || c(
|
|
3709
|
+
i.add(document, "keydown", m, !1), e.forEach((h, k) => {
|
|
3710
|
+
i.add(h, "focus", (p) => {
|
|
3711
|
+
(Re(c) || c(x, p)) && a(k);
|
|
3488
3712
|
}, d);
|
|
3489
3713
|
});
|
|
3490
3714
|
}
|
|
3491
|
-
function
|
|
3492
|
-
|
|
3715
|
+
function m(x) {
|
|
3716
|
+
x.code === "Tab" && (u = (/* @__PURE__ */ new Date()).getTime());
|
|
3493
3717
|
}
|
|
3494
3718
|
return {
|
|
3495
|
-
init:
|
|
3719
|
+
init: v
|
|
3496
3720
|
};
|
|
3497
3721
|
}
|
|
3498
3722
|
function _e(t) {
|
|
@@ -3522,105 +3746,105 @@ function _e(t) {
|
|
|
3522
3746
|
function Nt(t, e) {
|
|
3523
3747
|
const n = t.scroll === "x" ? o : c, s = e.style;
|
|
3524
3748
|
let l = null, i = !1;
|
|
3525
|
-
function o(
|
|
3526
|
-
return `translate3d(${
|
|
3749
|
+
function o(f) {
|
|
3750
|
+
return `translate3d(${f}px,0px,0px)`;
|
|
3527
3751
|
}
|
|
3528
|
-
function c(
|
|
3529
|
-
return `translate3d(0px,${
|
|
3752
|
+
function c(f) {
|
|
3753
|
+
return `translate3d(0px,${f}px,0px)`;
|
|
3530
3754
|
}
|
|
3531
|
-
function d(
|
|
3755
|
+
function d(f) {
|
|
3532
3756
|
if (i) return;
|
|
3533
|
-
const
|
|
3534
|
-
|
|
3757
|
+
const x = gr(t.direction(f));
|
|
3758
|
+
x !== l && (s.transform = n(x), l = x);
|
|
3535
3759
|
}
|
|
3536
|
-
function u(
|
|
3537
|
-
i = !
|
|
3760
|
+
function u(f) {
|
|
3761
|
+
i = !f;
|
|
3538
3762
|
}
|
|
3539
|
-
function
|
|
3763
|
+
function v() {
|
|
3540
3764
|
i || (s.transform = "", e.getAttribute("style") || e.removeAttribute("style"));
|
|
3541
3765
|
}
|
|
3542
3766
|
return {
|
|
3543
|
-
clear:
|
|
3767
|
+
clear: v,
|
|
3544
3768
|
to: d,
|
|
3545
3769
|
toggleActive: u
|
|
3546
3770
|
};
|
|
3547
3771
|
}
|
|
3548
|
-
function
|
|
3549
|
-
const
|
|
3550
|
-
function
|
|
3551
|
-
return
|
|
3552
|
-
}
|
|
3553
|
-
function a(
|
|
3554
|
-
return
|
|
3555
|
-
}
|
|
3556
|
-
function
|
|
3557
|
-
return i.map((
|
|
3558
|
-
start:
|
|
3559
|
-
end:
|
|
3772
|
+
function Fr(t, e, n, s, l, i, o, c, d) {
|
|
3773
|
+
const v = Me(l), m = Me(l).reverse(), f = p().concat(y());
|
|
3774
|
+
function x(C, A) {
|
|
3775
|
+
return C.reduce((j, N) => j - l[N], A);
|
|
3776
|
+
}
|
|
3777
|
+
function a(C, A) {
|
|
3778
|
+
return C.reduce((j, N) => x(j, A) > 0 ? j.concat([N]) : j, []);
|
|
3779
|
+
}
|
|
3780
|
+
function h(C) {
|
|
3781
|
+
return i.map((A, j) => ({
|
|
3782
|
+
start: A - s[j] + 0.5 + C,
|
|
3783
|
+
end: A + e - 0.5 + C
|
|
3560
3784
|
}));
|
|
3561
3785
|
}
|
|
3562
|
-
function k(
|
|
3563
|
-
const N =
|
|
3564
|
-
return
|
|
3565
|
-
const $ = j ? 0 : -n,
|
|
3786
|
+
function k(C, A, j) {
|
|
3787
|
+
const N = h(A);
|
|
3788
|
+
return C.map((B) => {
|
|
3789
|
+
const $ = j ? 0 : -n, O = j ? n : 0, z = j ? "end" : "start", P = N[B][z];
|
|
3566
3790
|
return {
|
|
3567
3791
|
index: B,
|
|
3568
3792
|
loopPoint: P,
|
|
3569
3793
|
slideLocation: _e(-1),
|
|
3570
3794
|
translate: Nt(t, d[B]),
|
|
3571
|
-
target: () => c.get() > P ? $ :
|
|
3795
|
+
target: () => c.get() > P ? $ : O
|
|
3572
3796
|
};
|
|
3573
3797
|
});
|
|
3574
3798
|
}
|
|
3575
|
-
function
|
|
3576
|
-
const
|
|
3577
|
-
return k(
|
|
3799
|
+
function p() {
|
|
3800
|
+
const C = o[0], A = a(m, C);
|
|
3801
|
+
return k(A, n, !1);
|
|
3578
3802
|
}
|
|
3579
|
-
function
|
|
3580
|
-
const
|
|
3581
|
-
return k(
|
|
3803
|
+
function y() {
|
|
3804
|
+
const C = e - o[0] - 1, A = a(v, C);
|
|
3805
|
+
return k(A, -n, !0);
|
|
3582
3806
|
}
|
|
3583
3807
|
function g() {
|
|
3584
|
-
return
|
|
3585
|
-
index:
|
|
3808
|
+
return f.every(({
|
|
3809
|
+
index: C
|
|
3586
3810
|
}) => {
|
|
3587
|
-
const
|
|
3588
|
-
return
|
|
3811
|
+
const A = v.filter((j) => j !== C);
|
|
3812
|
+
return x(A, e) <= 0.1;
|
|
3589
3813
|
});
|
|
3590
3814
|
}
|
|
3591
|
-
function
|
|
3592
|
-
|
|
3815
|
+
function M() {
|
|
3816
|
+
f.forEach((C) => {
|
|
3593
3817
|
const {
|
|
3594
|
-
target:
|
|
3818
|
+
target: A,
|
|
3595
3819
|
translate: j,
|
|
3596
3820
|
slideLocation: N
|
|
3597
|
-
} =
|
|
3821
|
+
} = C, B = A();
|
|
3598
3822
|
B !== N.get() && (j.to(B), N.set(B));
|
|
3599
3823
|
});
|
|
3600
3824
|
}
|
|
3601
|
-
function
|
|
3602
|
-
|
|
3825
|
+
function D() {
|
|
3826
|
+
f.forEach((C) => C.translate.clear());
|
|
3603
3827
|
}
|
|
3604
3828
|
return {
|
|
3605
3829
|
canLoop: g,
|
|
3606
|
-
clear:
|
|
3607
|
-
loop:
|
|
3608
|
-
loopPoints:
|
|
3830
|
+
clear: D,
|
|
3831
|
+
loop: M,
|
|
3832
|
+
loopPoints: f
|
|
3609
3833
|
};
|
|
3610
3834
|
}
|
|
3611
|
-
function
|
|
3835
|
+
function Nr(t, e, n) {
|
|
3612
3836
|
let s, l = !1;
|
|
3613
3837
|
function i(d) {
|
|
3614
3838
|
if (!n) return;
|
|
3615
|
-
function u(
|
|
3616
|
-
for (const
|
|
3617
|
-
if (
|
|
3839
|
+
function u(v) {
|
|
3840
|
+
for (const m of v)
|
|
3841
|
+
if (m.type === "childList") {
|
|
3618
3842
|
d.reInit(), e.emit("slidesChanged");
|
|
3619
3843
|
break;
|
|
3620
3844
|
}
|
|
3621
3845
|
}
|
|
3622
|
-
s = new MutationObserver((
|
|
3623
|
-
l || (Re(n) || n(d,
|
|
3846
|
+
s = new MutationObserver((v) => {
|
|
3847
|
+
l || (Re(n) || n(d, v)) && u(v);
|
|
3624
3848
|
}), s.observe(t, {
|
|
3625
3849
|
childList: !0
|
|
3626
3850
|
});
|
|
@@ -3633,139 +3857,139 @@ function Ar(t, e, n) {
|
|
|
3633
3857
|
destroy: o
|
|
3634
3858
|
};
|
|
3635
3859
|
}
|
|
3636
|
-
function
|
|
3860
|
+
function Br(t, e, n, s) {
|
|
3637
3861
|
const l = {};
|
|
3638
3862
|
let i = null, o = null, c, d = !1;
|
|
3639
3863
|
function u() {
|
|
3640
3864
|
c = new IntersectionObserver((a) => {
|
|
3641
|
-
d || (a.forEach((
|
|
3642
|
-
const k = e.indexOf(
|
|
3643
|
-
l[k] =
|
|
3865
|
+
d || (a.forEach((h) => {
|
|
3866
|
+
const k = e.indexOf(h.target);
|
|
3867
|
+
l[k] = h;
|
|
3644
3868
|
}), i = null, o = null, n.emit("slidesInView"));
|
|
3645
3869
|
}, {
|
|
3646
3870
|
root: t.parentElement,
|
|
3647
3871
|
threshold: s
|
|
3648
3872
|
}), e.forEach((a) => c.observe(a));
|
|
3649
3873
|
}
|
|
3650
|
-
function
|
|
3874
|
+
function v() {
|
|
3651
3875
|
c && c.disconnect(), d = !0;
|
|
3652
3876
|
}
|
|
3653
|
-
function
|
|
3654
|
-
return Le(l).reduce((
|
|
3655
|
-
const
|
|
3656
|
-
isIntersecting:
|
|
3657
|
-
} = l[
|
|
3658
|
-
return (a &&
|
|
3877
|
+
function m(a) {
|
|
3878
|
+
return Le(l).reduce((h, k) => {
|
|
3879
|
+
const p = parseInt(k), {
|
|
3880
|
+
isIntersecting: y
|
|
3881
|
+
} = l[p];
|
|
3882
|
+
return (a && y || !a && !y) && h.push(p), h;
|
|
3659
3883
|
}, []);
|
|
3660
3884
|
}
|
|
3661
|
-
function
|
|
3885
|
+
function f(a = !0) {
|
|
3662
3886
|
if (a && i) return i;
|
|
3663
3887
|
if (!a && o) return o;
|
|
3664
|
-
const
|
|
3665
|
-
return a && (i =
|
|
3888
|
+
const h = m(a);
|
|
3889
|
+
return a && (i = h), a || (o = h), h;
|
|
3666
3890
|
}
|
|
3667
3891
|
return {
|
|
3668
3892
|
init: u,
|
|
3669
|
-
destroy:
|
|
3670
|
-
get:
|
|
3893
|
+
destroy: v,
|
|
3894
|
+
get: f
|
|
3671
3895
|
};
|
|
3672
3896
|
}
|
|
3673
|
-
function
|
|
3897
|
+
function Pr(t, e, n, s, l, i) {
|
|
3674
3898
|
const {
|
|
3675
3899
|
measureSize: o,
|
|
3676
3900
|
startEdge: c,
|
|
3677
3901
|
endEdge: d
|
|
3678
|
-
} = t, u = n[0] && l,
|
|
3902
|
+
} = t, u = n[0] && l, v = a(), m = h(), f = n.map(o), x = k();
|
|
3679
3903
|
function a() {
|
|
3680
3904
|
if (!u) return 0;
|
|
3681
|
-
const
|
|
3682
|
-
return
|
|
3905
|
+
const y = n[0];
|
|
3906
|
+
return U(e[c] - y[c]);
|
|
3683
3907
|
}
|
|
3684
|
-
function
|
|
3908
|
+
function h() {
|
|
3685
3909
|
if (!u) return 0;
|
|
3686
|
-
const
|
|
3687
|
-
return parseFloat(
|
|
3910
|
+
const y = i.getComputedStyle(le(s));
|
|
3911
|
+
return parseFloat(y.getPropertyValue(`margin-${d}`));
|
|
3688
3912
|
}
|
|
3689
3913
|
function k() {
|
|
3690
|
-
return n.map((
|
|
3691
|
-
const
|
|
3692
|
-
return
|
|
3693
|
-
}).map(
|
|
3914
|
+
return n.map((y, g, M) => {
|
|
3915
|
+
const D = !g, w = ot(M, g);
|
|
3916
|
+
return D ? f[g] + v : w ? f[g] + m : M[g + 1][c] - y[c];
|
|
3917
|
+
}).map(U);
|
|
3694
3918
|
}
|
|
3695
3919
|
return {
|
|
3696
|
-
slideSizes:
|
|
3697
|
-
slideSizesWithGaps:
|
|
3698
|
-
startGap:
|
|
3699
|
-
endGap:
|
|
3920
|
+
slideSizes: f,
|
|
3921
|
+
slideSizesWithGaps: x,
|
|
3922
|
+
startGap: v,
|
|
3923
|
+
endGap: m
|
|
3700
3924
|
};
|
|
3701
3925
|
}
|
|
3702
|
-
function
|
|
3926
|
+
function zr(t, e, n, s, l, i, o, c, d) {
|
|
3703
3927
|
const {
|
|
3704
3928
|
startEdge: u,
|
|
3705
|
-
endEdge:
|
|
3706
|
-
direction:
|
|
3707
|
-
} = t,
|
|
3708
|
-
function
|
|
3709
|
-
return Me(
|
|
3710
|
-
}
|
|
3711
|
-
function a(
|
|
3712
|
-
return
|
|
3713
|
-
const
|
|
3714
|
-
return
|
|
3715
|
-
}, []).map((
|
|
3716
|
-
const
|
|
3717
|
-
return
|
|
3929
|
+
endEdge: v,
|
|
3930
|
+
direction: m
|
|
3931
|
+
} = t, f = tt(n);
|
|
3932
|
+
function x(p, y) {
|
|
3933
|
+
return Me(p).filter((g) => g % y === 0).map((g) => p.slice(g, g + y));
|
|
3934
|
+
}
|
|
3935
|
+
function a(p) {
|
|
3936
|
+
return p.length ? Me(p).reduce((y, g, M) => {
|
|
3937
|
+
const D = le(y) || 0, w = D === 0, C = g === Fe(p), A = l[u] - i[D][u], j = l[u] - i[g][v], N = !s && w ? m(o) : 0, B = !s && C ? m(c) : 0, $ = U(j - B - (A + N));
|
|
3938
|
+
return M && $ > e + d && y.push(g), C && y.push(p.length), y;
|
|
3939
|
+
}, []).map((y, g, M) => {
|
|
3940
|
+
const D = Math.max(M[g - 1] || 0);
|
|
3941
|
+
return p.slice(D, y);
|
|
3718
3942
|
}) : [];
|
|
3719
3943
|
}
|
|
3720
|
-
function
|
|
3721
|
-
return
|
|
3944
|
+
function h(p) {
|
|
3945
|
+
return f ? x(p, n) : a(p);
|
|
3722
3946
|
}
|
|
3723
3947
|
return {
|
|
3724
|
-
groupSlides:
|
|
3948
|
+
groupSlides: h
|
|
3725
3949
|
};
|
|
3726
3950
|
}
|
|
3727
|
-
function
|
|
3951
|
+
function Rr(t, e, n, s, l, i, o) {
|
|
3728
3952
|
const {
|
|
3729
3953
|
align: c,
|
|
3730
3954
|
axis: d,
|
|
3731
3955
|
direction: u,
|
|
3732
|
-
startIndex:
|
|
3733
|
-
loop:
|
|
3734
|
-
duration:
|
|
3735
|
-
dragFree:
|
|
3956
|
+
startIndex: v,
|
|
3957
|
+
loop: m,
|
|
3958
|
+
duration: f,
|
|
3959
|
+
dragFree: x,
|
|
3736
3960
|
dragThreshold: a,
|
|
3737
|
-
inViewThreshold:
|
|
3961
|
+
inViewThreshold: h,
|
|
3738
3962
|
slidesToScroll: k,
|
|
3739
|
-
skipSnaps:
|
|
3740
|
-
containScroll:
|
|
3963
|
+
skipSnaps: p,
|
|
3964
|
+
containScroll: y,
|
|
3741
3965
|
watchResize: g,
|
|
3742
|
-
watchSlides:
|
|
3743
|
-
watchDrag:
|
|
3744
|
-
watchFocus:
|
|
3745
|
-
} = i,
|
|
3746
|
-
slideSizes:
|
|
3966
|
+
watchSlides: M,
|
|
3967
|
+
watchDrag: D,
|
|
3968
|
+
watchFocus: w
|
|
3969
|
+
} = i, C = 2, A = br(), j = A.measure(e), N = n.map(A.measure), B = kr(d, u), $ = B.measureSize(j), O = xr($), z = fr(c, $), P = !m && !!y, L = m || !!y, {
|
|
3970
|
+
slideSizes: V,
|
|
3747
3971
|
slideSizesWithGaps: te,
|
|
3748
3972
|
startGap: Q,
|
|
3749
3973
|
endGap: ie
|
|
3750
|
-
} =
|
|
3974
|
+
} = Pr(B, j, N, n, L, l), ee = zr(B, $, k, m, j, N, Q, ie, C), {
|
|
3751
3975
|
snaps: de,
|
|
3752
3976
|
snapsAligned: ae
|
|
3753
|
-
} =
|
|
3977
|
+
} = Ar(B, z, j, N, ee), q = -le(de) + le(te), {
|
|
3754
3978
|
snapsContained: ce,
|
|
3755
|
-
scrollContainLimit:
|
|
3756
|
-
} =
|
|
3757
|
-
limit:
|
|
3758
|
-
} =
|
|
3759
|
-
dragHandler:
|
|
3979
|
+
scrollContainLimit: T
|
|
3980
|
+
} = wr($, q, ae, y, C), S = P ? ce : ae, {
|
|
3981
|
+
limit: E
|
|
3982
|
+
} = Ir(q, S, m), H = Ft(Fe(S), v, m), Z = H.clone(), W = Me(n), I = ({
|
|
3983
|
+
dragHandler: ye,
|
|
3760
3984
|
scrollBody: He,
|
|
3761
3985
|
scrollBounds: Ue,
|
|
3762
3986
|
options: {
|
|
3763
3987
|
loop: Ne
|
|
3764
3988
|
}
|
|
3765
3989
|
}) => {
|
|
3766
|
-
Ne || Ue.constrain(
|
|
3990
|
+
Ne || Ue.constrain(ye.pointerDown()), He.seek();
|
|
3767
3991
|
}, R = ({
|
|
3768
|
-
scrollBody:
|
|
3992
|
+
scrollBody: ye,
|
|
3769
3993
|
translate: He,
|
|
3770
3994
|
location: Ue,
|
|
3771
3995
|
offsetLocation: Ne,
|
|
@@ -3780,13 +4004,13 @@ function Er(t, e, n, s, l, i, o) {
|
|
|
3780
4004
|
loop: dt
|
|
3781
4005
|
}
|
|
3782
4006
|
}, ct) => {
|
|
3783
|
-
const ut =
|
|
3784
|
-
|
|
4007
|
+
const ut = ye.settled(), Ut = !Ht.shouldConstrain(), pt = dt ? ut : ut && Ut, mt = pt && !$t.pointerDown();
|
|
4008
|
+
mt && Wt.stop();
|
|
3785
4009
|
const Ot = Ue.get() * ct + zt.get() * (1 - ct);
|
|
3786
|
-
Ne.set(Ot), dt && (Rt.loop(
|
|
3787
|
-
}, G =
|
|
4010
|
+
Ne.set(Ot), dt && (Rt.loop(ye.direction()), Gt.loop()), He.to(Ne.get()), mt && lt.emit("settle"), pt || lt.emit("scroll");
|
|
4011
|
+
}, G = hr(s, l, () => I(We), (ye) => R(We, ye)), K = 0.68, re = S[H.get()], pe = _e(re), he = _e(re), me = _e(re), ke = _e(re), Ce = Sr(pe, me, he, ke, f, K), Ge = Lr(m, S, q, E, ke), $e = jr(G, H, Z, Ce, Ge, ke, o), st = _r(E), it = je(), Bt = Br(e, n, o, h), {
|
|
3788
4012
|
slideRegistry: at
|
|
3789
|
-
} =
|
|
4013
|
+
} = Mr(P, y, S, T, ee, W), Pt = Er(t, n, at, $e, Ce, it, o, w), We = {
|
|
3790
4014
|
ownerDocument: s,
|
|
3791
4015
|
ownerWindow: l,
|
|
3792
4016
|
eventHandler: o,
|
|
@@ -3794,38 +4018,38 @@ function Er(t, e, n, s, l, i, o) {
|
|
|
3794
4018
|
slideRects: N,
|
|
3795
4019
|
animation: G,
|
|
3796
4020
|
axis: B,
|
|
3797
|
-
dragHandler:
|
|
4021
|
+
dragHandler: vr(B, t, s, l, ke, yr(B, l), pe, G, $e, Ce, Ge, H, o, O, x, a, p, K, D),
|
|
3798
4022
|
eventStore: it,
|
|
3799
|
-
percentOfView:
|
|
3800
|
-
index:
|
|
3801
|
-
indexPrevious:
|
|
3802
|
-
limit:
|
|
3803
|
-
location:
|
|
3804
|
-
offsetLocation:
|
|
4023
|
+
percentOfView: O,
|
|
4024
|
+
index: H,
|
|
4025
|
+
indexPrevious: Z,
|
|
4026
|
+
limit: E,
|
|
4027
|
+
location: pe,
|
|
4028
|
+
offsetLocation: me,
|
|
3805
4029
|
previousLocation: he,
|
|
3806
4030
|
options: i,
|
|
3807
|
-
resizeHandler:
|
|
4031
|
+
resizeHandler: Tr(e, o, l, n, B, g, A),
|
|
3808
4032
|
scrollBody: Ce,
|
|
3809
|
-
scrollBounds:
|
|
3810
|
-
scrollLooper:
|
|
4033
|
+
scrollBounds: Cr(E, me, ke, Ce, O),
|
|
4034
|
+
scrollLooper: Dr(q, E, me, [pe, me, he, ke]),
|
|
3811
4035
|
scrollProgress: st,
|
|
3812
|
-
scrollSnapList:
|
|
3813
|
-
scrollSnaps:
|
|
4036
|
+
scrollSnapList: S.map(st.get),
|
|
4037
|
+
scrollSnaps: S,
|
|
3814
4038
|
scrollTarget: Ge,
|
|
3815
4039
|
scrollTo: $e,
|
|
3816
|
-
slideLooper:
|
|
4040
|
+
slideLooper: Fr(B, $, q, V, te, de, S, me, n),
|
|
3817
4041
|
slideFocus: Pt,
|
|
3818
|
-
slidesHandler:
|
|
4042
|
+
slidesHandler: Nr(e, o, M),
|
|
3819
4043
|
slidesInView: Bt,
|
|
3820
4044
|
slideIndexes: W,
|
|
3821
4045
|
slideRegistry: at,
|
|
3822
4046
|
slidesToScroll: ee,
|
|
3823
|
-
target:
|
|
4047
|
+
target: ke,
|
|
3824
4048
|
translate: Nt(B, e)
|
|
3825
4049
|
};
|
|
3826
4050
|
return We;
|
|
3827
4051
|
}
|
|
3828
|
-
function
|
|
4052
|
+
function Gr() {
|
|
3829
4053
|
let t = {}, e;
|
|
3830
4054
|
function n(u) {
|
|
3831
4055
|
e = u;
|
|
@@ -3834,13 +4058,13 @@ function Fr() {
|
|
|
3834
4058
|
return t[u] || [];
|
|
3835
4059
|
}
|
|
3836
4060
|
function l(u) {
|
|
3837
|
-
return s(u).forEach((
|
|
4061
|
+
return s(u).forEach((v) => v(e, u)), d;
|
|
3838
4062
|
}
|
|
3839
|
-
function i(u,
|
|
3840
|
-
return t[u] = s(u).concat([
|
|
4063
|
+
function i(u, v) {
|
|
4064
|
+
return t[u] = s(u).concat([v]), d;
|
|
3841
4065
|
}
|
|
3842
|
-
function o(u,
|
|
3843
|
-
return t[u] = s(u).filter((
|
|
4066
|
+
function o(u, v) {
|
|
4067
|
+
return t[u] = s(u).filter((m) => m !== v), d;
|
|
3844
4068
|
}
|
|
3845
4069
|
function c() {
|
|
3846
4070
|
t = {};
|
|
@@ -3854,7 +4078,7 @@ function Fr() {
|
|
|
3854
4078
|
};
|
|
3855
4079
|
return d;
|
|
3856
4080
|
}
|
|
3857
|
-
const
|
|
4081
|
+
const $r = {
|
|
3858
4082
|
align: "center",
|
|
3859
4083
|
axis: "x",
|
|
3860
4084
|
container: null,
|
|
@@ -3876,7 +4100,7 @@ const Nr = {
|
|
|
3876
4100
|
watchSlides: !0,
|
|
3877
4101
|
watchFocus: !0
|
|
3878
4102
|
};
|
|
3879
|
-
function
|
|
4103
|
+
function Wr(t) {
|
|
3880
4104
|
function e(i, o) {
|
|
3881
4105
|
return Et(i, o || {});
|
|
3882
4106
|
}
|
|
@@ -3893,7 +4117,7 @@ function Br(t) {
|
|
|
3893
4117
|
optionsMediaQueries: s
|
|
3894
4118
|
};
|
|
3895
4119
|
}
|
|
3896
|
-
function
|
|
4120
|
+
function Hr(t) {
|
|
3897
4121
|
let e = [];
|
|
3898
4122
|
function n(i, o) {
|
|
3899
4123
|
return e = o.filter(({
|
|
@@ -3911,27 +4135,27 @@ function Pr(t) {
|
|
|
3911
4135
|
};
|
|
3912
4136
|
}
|
|
3913
4137
|
function ze(t, e, n) {
|
|
3914
|
-
const s = t.ownerDocument, l = s.defaultView, i =
|
|
4138
|
+
const s = t.ownerDocument, l = s.defaultView, i = Wr(l), o = Hr(i), c = je(), d = Gr(), {
|
|
3915
4139
|
mergeOptions: u,
|
|
3916
|
-
optionsAtMedia:
|
|
3917
|
-
optionsMediaQueries:
|
|
4140
|
+
optionsAtMedia: v,
|
|
4141
|
+
optionsMediaQueries: m
|
|
3918
4142
|
} = i, {
|
|
3919
|
-
on:
|
|
3920
|
-
off:
|
|
4143
|
+
on: f,
|
|
4144
|
+
off: x,
|
|
3921
4145
|
emit: a
|
|
3922
|
-
} = d,
|
|
3923
|
-
let k = !1,
|
|
3924
|
-
function
|
|
4146
|
+
} = d, h = B;
|
|
4147
|
+
let k = !1, p, y = u($r, ze.globalOptions), g = u(y), M = [], D, w, C;
|
|
4148
|
+
function A() {
|
|
3925
4149
|
const {
|
|
3926
4150
|
container: W,
|
|
3927
4151
|
slides: I
|
|
3928
4152
|
} = g;
|
|
3929
|
-
|
|
3930
|
-
const G = Ze(I) ?
|
|
3931
|
-
|
|
4153
|
+
w = (Ze(W) ? t.querySelector(W) : W) || t.children[0];
|
|
4154
|
+
const G = Ze(I) ? w.querySelectorAll(I) : I;
|
|
4155
|
+
C = [].slice.call(G || w.children);
|
|
3932
4156
|
}
|
|
3933
4157
|
function j(W) {
|
|
3934
|
-
const I =
|
|
4158
|
+
const I = Rr(t, w, C, s, l, W, d);
|
|
3935
4159
|
if (W.loop && !I.slideLooper.canLoop()) {
|
|
3936
4160
|
const R = Object.assign({}, W, {
|
|
3937
4161
|
loop: !1
|
|
@@ -3941,9 +4165,9 @@ function ze(t, e, n) {
|
|
|
3941
4165
|
return I;
|
|
3942
4166
|
}
|
|
3943
4167
|
function N(W, I) {
|
|
3944
|
-
k || (
|
|
4168
|
+
k || (y = u(y, W), g = v(y), M = I || M, A(), p = j(g), m([y, ...M.map(({
|
|
3945
4169
|
options: R
|
|
3946
|
-
}) => R)]).forEach((R) => c.add(R, "change", B)), g.active && (
|
|
4170
|
+
}) => R)]).forEach((R) => c.add(R, "change", B)), g.active && (p.translate.to(p.location.get()), p.animation.init(), p.slidesInView.init(), p.slideFocus.init(Z), p.eventHandler.init(Z), p.resizeHandler.init(Z), p.slidesHandler.init(Z), p.options.loop && p.slideLooper.loop(), w.offsetParent && C.length && p.dragHandler.init(Z), D = o.init(Z, M)));
|
|
3947
4171
|
}
|
|
3948
4172
|
function B(W, I) {
|
|
3949
4173
|
const R = ee();
|
|
@@ -3952,97 +4176,97 @@ function ze(t, e, n) {
|
|
|
3952
4176
|
}, W), I), d.emit("reInit");
|
|
3953
4177
|
}
|
|
3954
4178
|
function $() {
|
|
3955
|
-
|
|
4179
|
+
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(), c.clear();
|
|
3956
4180
|
}
|
|
3957
|
-
function
|
|
4181
|
+
function O() {
|
|
3958
4182
|
k || (k = !0, c.clear(), $(), d.emit("destroy"), d.clear());
|
|
3959
4183
|
}
|
|
3960
4184
|
function z(W, I, R) {
|
|
3961
|
-
!g.active || k || (
|
|
4185
|
+
!g.active || k || (p.scrollBody.useBaseFriction().useDuration(I === !0 ? 0 : g.duration), p.scrollTo.index(W, R || 0));
|
|
3962
4186
|
}
|
|
3963
4187
|
function P(W) {
|
|
3964
|
-
const I =
|
|
4188
|
+
const I = p.index.add(1).get();
|
|
3965
4189
|
z(I, W, -1);
|
|
3966
4190
|
}
|
|
3967
|
-
function
|
|
3968
|
-
const I =
|
|
4191
|
+
function L(W) {
|
|
4192
|
+
const I = p.index.add(-1).get();
|
|
3969
4193
|
z(I, W, 1);
|
|
3970
4194
|
}
|
|
3971
|
-
function
|
|
3972
|
-
return
|
|
4195
|
+
function V() {
|
|
4196
|
+
return p.index.add(1).get() !== ee();
|
|
3973
4197
|
}
|
|
3974
4198
|
function te() {
|
|
3975
|
-
return
|
|
4199
|
+
return p.index.add(-1).get() !== ee();
|
|
3976
4200
|
}
|
|
3977
4201
|
function Q() {
|
|
3978
|
-
return
|
|
4202
|
+
return p.scrollSnapList;
|
|
3979
4203
|
}
|
|
3980
4204
|
function ie() {
|
|
3981
|
-
return
|
|
4205
|
+
return p.scrollProgress.get(p.offsetLocation.get());
|
|
3982
4206
|
}
|
|
3983
4207
|
function ee() {
|
|
3984
|
-
return
|
|
4208
|
+
return p.index.get();
|
|
3985
4209
|
}
|
|
3986
4210
|
function de() {
|
|
3987
|
-
return
|
|
4211
|
+
return p.indexPrevious.get();
|
|
3988
4212
|
}
|
|
3989
4213
|
function ae() {
|
|
3990
|
-
return
|
|
4214
|
+
return p.slidesInView.get();
|
|
3991
4215
|
}
|
|
3992
|
-
function
|
|
3993
|
-
return
|
|
4216
|
+
function q() {
|
|
4217
|
+
return p.slidesInView.get(!1);
|
|
3994
4218
|
}
|
|
3995
4219
|
function ce() {
|
|
3996
|
-
return
|
|
4220
|
+
return D;
|
|
3997
4221
|
}
|
|
3998
|
-
function
|
|
3999
|
-
return
|
|
4222
|
+
function T() {
|
|
4223
|
+
return p;
|
|
4000
4224
|
}
|
|
4001
|
-
function
|
|
4225
|
+
function S() {
|
|
4002
4226
|
return t;
|
|
4003
4227
|
}
|
|
4004
|
-
function
|
|
4005
|
-
return
|
|
4228
|
+
function E() {
|
|
4229
|
+
return w;
|
|
4006
4230
|
}
|
|
4007
|
-
function
|
|
4008
|
-
return
|
|
4231
|
+
function H() {
|
|
4232
|
+
return C;
|
|
4009
4233
|
}
|
|
4010
|
-
const
|
|
4011
|
-
canScrollNext:
|
|
4234
|
+
const Z = {
|
|
4235
|
+
canScrollNext: V,
|
|
4012
4236
|
canScrollPrev: te,
|
|
4013
|
-
containerNode:
|
|
4014
|
-
internalEngine:
|
|
4015
|
-
destroy:
|
|
4016
|
-
off:
|
|
4017
|
-
on:
|
|
4237
|
+
containerNode: E,
|
|
4238
|
+
internalEngine: T,
|
|
4239
|
+
destroy: O,
|
|
4240
|
+
off: x,
|
|
4241
|
+
on: f,
|
|
4018
4242
|
emit: a,
|
|
4019
4243
|
plugins: ce,
|
|
4020
4244
|
previousScrollSnap: de,
|
|
4021
|
-
reInit:
|
|
4022
|
-
rootNode:
|
|
4245
|
+
reInit: h,
|
|
4246
|
+
rootNode: S,
|
|
4023
4247
|
scrollNext: P,
|
|
4024
|
-
scrollPrev:
|
|
4248
|
+
scrollPrev: L,
|
|
4025
4249
|
scrollProgress: ie,
|
|
4026
4250
|
scrollSnapList: Q,
|
|
4027
4251
|
scrollTo: z,
|
|
4028
4252
|
selectedScrollSnap: ee,
|
|
4029
|
-
slideNodes:
|
|
4253
|
+
slideNodes: H,
|
|
4030
4254
|
slidesInView: ae,
|
|
4031
|
-
slidesNotInView:
|
|
4255
|
+
slidesNotInView: q
|
|
4032
4256
|
};
|
|
4033
|
-
return N(e, n), setTimeout(() => d.emit("init"), 0),
|
|
4257
|
+
return N(e, n), setTimeout(() => d.emit("init"), 0), Z;
|
|
4034
4258
|
}
|
|
4035
4259
|
ze.globalOptions = void 0;
|
|
4036
4260
|
function rt(t = {}, e = []) {
|
|
4037
|
-
const n = Ye(t), s = Ye(e), [l, i] =
|
|
4261
|
+
const n = Ye(t), s = Ye(e), [l, i] = oe(), [o, c] = oe(), d = se(() => {
|
|
4038
4262
|
l && l.reInit(n.current, s.current);
|
|
4039
4263
|
}, [l]);
|
|
4040
|
-
return
|
|
4264
|
+
return Y(() => {
|
|
4041
4265
|
et(n.current, t) || (n.current = t, d());
|
|
4042
|
-
}, [t, d]),
|
|
4043
|
-
|
|
4044
|
-
}, [e, d]),
|
|
4045
|
-
if (
|
|
4266
|
+
}, [t, d]), Y(() => {
|
|
4267
|
+
pr(s.current, e) || (s.current = e, d());
|
|
4268
|
+
}, [e, d]), Y(() => {
|
|
4269
|
+
if (ur() && o) {
|
|
4046
4270
|
ze.globalOptions = rt.globalOptions;
|
|
4047
4271
|
const u = ze(o, n.current, s.current);
|
|
4048
4272
|
return i(u), () => u.destroy();
|
|
@@ -4051,22 +4275,22 @@ function rt(t = {}, e = []) {
|
|
|
4051
4275
|
}, [o, i]), [c, l];
|
|
4052
4276
|
}
|
|
4053
4277
|
rt.globalOptions = void 0;
|
|
4054
|
-
const
|
|
4055
|
-
carouselContainer:
|
|
4056
|
-
viewport:
|
|
4057
|
-
slides:
|
|
4058
|
-
slide:
|
|
4059
|
-
slideInner:
|
|
4060
|
-
loaderOverlay:
|
|
4061
|
-
image:
|
|
4062
|
-
loaded:
|
|
4063
|
-
empty:
|
|
4064
|
-
controls:
|
|
4065
|
-
arrows:
|
|
4066
|
-
dots:
|
|
4067
|
-
dot:
|
|
4068
|
-
dotActive:
|
|
4069
|
-
},
|
|
4278
|
+
const Ur = "_carouselContainer_1bu1s_1", Or = "_viewport_1bu1s_11", Vr = "_slides_1bu1s_17", Kr = "_slide_1bu1s_17", Yr = "_slideInner_1bu1s_37", qr = "_loaderOverlay_1bu1s_45", Zr = "_image_1bu1s_55", Xr = "_loaded_1bu1s_66", Jr = "_empty_1bu1s_78", Qr = "_controls_1bu1s_84", es = "_arrows_1bu1s_94", ts = "_dots_1bu1s_104", ns = "_dot_1bu1s_104", os = "_dotActive_1bu1s_130", X = {
|
|
4279
|
+
carouselContainer: Ur,
|
|
4280
|
+
viewport: Or,
|
|
4281
|
+
slides: Vr,
|
|
4282
|
+
slide: Kr,
|
|
4283
|
+
slideInner: Yr,
|
|
4284
|
+
loaderOverlay: qr,
|
|
4285
|
+
image: Zr,
|
|
4286
|
+
loaded: Xr,
|
|
4287
|
+
empty: Jr,
|
|
4288
|
+
controls: Qr,
|
|
4289
|
+
arrows: es,
|
|
4290
|
+
dots: ts,
|
|
4291
|
+
dot: ns,
|
|
4292
|
+
dotActive: os
|
|
4293
|
+
}, rs = ln, ss = ({
|
|
4070
4294
|
images: t,
|
|
4071
4295
|
autoPlay: e = !1,
|
|
4072
4296
|
autoDelay: n = 5,
|
|
@@ -4077,127 +4301,127 @@ const zr = "_carouselContainer_1bu1s_1", Rr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
4077
4301
|
slideSpacing: c = 16,
|
|
4078
4302
|
cornerRadius: d = 0,
|
|
4079
4303
|
"data-color": u,
|
|
4080
|
-
"data-size":
|
|
4304
|
+
"data-size": v
|
|
4081
4305
|
}) => {
|
|
4082
|
-
const { t:
|
|
4306
|
+
const { t: m } = Ee(), f = {
|
|
4083
4307
|
loop: !0,
|
|
4084
4308
|
align: "start",
|
|
4085
4309
|
containScroll: "trimSnaps",
|
|
4086
4310
|
slidesToScroll: 1
|
|
4087
|
-
}, [
|
|
4088
|
-
|
|
4089
|
-
|
|
4311
|
+
}, [x, a] = rt(f), [h, k] = oe(0), [p, y] = oe([]), [g, M] = oe([]);
|
|
4312
|
+
Y(() => {
|
|
4313
|
+
M(new Array((t == null ? void 0 : t.length) || 0).fill(!1));
|
|
4090
4314
|
}, [t]);
|
|
4091
|
-
const
|
|
4092
|
-
|
|
4093
|
-
const
|
|
4094
|
-
return
|
|
4315
|
+
const D = se((z) => {
|
|
4316
|
+
M((P) => {
|
|
4317
|
+
const L = [...P];
|
|
4318
|
+
return L[z] = !0, L;
|
|
4095
4319
|
});
|
|
4096
|
-
}, []),
|
|
4320
|
+
}, []), w = Te(() => n * 1e3, [n]), C = se(() => {
|
|
4097
4321
|
a && k(a.selectedScrollSnap());
|
|
4098
|
-
}, [a]),
|
|
4099
|
-
|
|
4322
|
+
}, [a]), A = se((z) => a && a.scrollTo(z), [a]), j = se(() => a && a.scrollPrev(), [a]), N = se(() => a && a.scrollNext(), [a]);
|
|
4323
|
+
Y(() => {
|
|
4100
4324
|
if (a)
|
|
4101
|
-
return a.on("select",
|
|
4102
|
-
a.off("select",
|
|
4325
|
+
return a.on("select", C), a.on("reInit", C), y(a.scrollSnapList()), () => {
|
|
4326
|
+
a.off("select", C), a.off("reInit", C);
|
|
4103
4327
|
};
|
|
4104
|
-
}, [a,
|
|
4105
|
-
a && (a.reInit(),
|
|
4106
|
-
}, [a, t, o, c]),
|
|
4328
|
+
}, [a, C]), Y(() => {
|
|
4329
|
+
a && (a.reInit(), y(a.scrollSnapList()));
|
|
4330
|
+
}, [a, t, o, c]), Y(() => {
|
|
4107
4331
|
if (!e || !a || !t || t.length <= 1) return;
|
|
4108
4332
|
const z = window.setInterval(() => {
|
|
4109
4333
|
a.canScrollNext() && a.scrollNext();
|
|
4110
|
-
},
|
|
4334
|
+
}, w);
|
|
4111
4335
|
return () => {
|
|
4112
4336
|
window.clearInterval(z);
|
|
4113
4337
|
};
|
|
4114
|
-
}, [e,
|
|
4115
|
-
const B = Math.max(1, o), $ = `${100 / B}%`,
|
|
4116
|
-
return /* @__PURE__ */
|
|
4338
|
+
}, [e, w, a, t]);
|
|
4339
|
+
const B = Math.max(1, o), $ = `${100 / B}%`, O = c / 2;
|
|
4340
|
+
return /* @__PURE__ */ _(
|
|
4117
4341
|
"div",
|
|
4118
4342
|
{
|
|
4119
|
-
className:
|
|
4343
|
+
className: X.carouselContainer,
|
|
4120
4344
|
"data-color": u,
|
|
4121
|
-
"data-size":
|
|
4345
|
+
"data-size": v,
|
|
4122
4346
|
"data-variant": i,
|
|
4123
4347
|
children: [
|
|
4124
|
-
/* @__PURE__ */ r("div", { className:
|
|
4348
|
+
/* @__PURE__ */ r("div", { className: X.viewport, ref: x, children: /* @__PURE__ */ r(
|
|
4125
4349
|
"div",
|
|
4126
4350
|
{
|
|
4127
|
-
className:
|
|
4351
|
+
className: X.slides,
|
|
4128
4352
|
style: {
|
|
4129
|
-
marginLeft: `-${
|
|
4130
|
-
marginRight: `-${
|
|
4353
|
+
marginLeft: `-${O}px`,
|
|
4354
|
+
marginRight: `-${O}px`
|
|
4131
4355
|
},
|
|
4132
4356
|
children: t && t.length > 0 ? t.map((z, P) => /* @__PURE__ */ r(
|
|
4133
4357
|
"div",
|
|
4134
4358
|
{
|
|
4135
|
-
className:
|
|
4359
|
+
className: X.slide,
|
|
4136
4360
|
style: {
|
|
4137
4361
|
flex: `0 0 ${$}`,
|
|
4138
|
-
paddingLeft: `${
|
|
4139
|
-
paddingRight: `${
|
|
4362
|
+
paddingLeft: `${O}px`,
|
|
4363
|
+
paddingRight: `${O}px`,
|
|
4140
4364
|
borderRadius: d > 0 ? `${d}px` : void 0,
|
|
4141
4365
|
overflow: "hidden"
|
|
4142
4366
|
// Ensure radius clips content
|
|
4143
4367
|
},
|
|
4144
|
-
children: /* @__PURE__ */
|
|
4145
|
-
!g[P] && /* @__PURE__ */ r("div", { className:
|
|
4368
|
+
children: /* @__PURE__ */ _("div", { className: X.slideInner, style: { borderRadius: `${d}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
4369
|
+
!g[P] && /* @__PURE__ */ r("div", { className: X.loaderOverlay, children: /* @__PURE__ */ r(rs, { "aria-label": m("carousel.loading") }) }),
|
|
4146
4370
|
/* @__PURE__ */ r(
|
|
4147
4371
|
"img",
|
|
4148
4372
|
{
|
|
4149
|
-
className: `${
|
|
4373
|
+
className: `${X.image} ${g[P] ? X.loaded : X.loadingImage}`,
|
|
4150
4374
|
src: z.src,
|
|
4151
4375
|
alt: z.alt,
|
|
4152
4376
|
loading: P < B ? "eager" : "lazy",
|
|
4153
4377
|
crossOrigin: "anonymous",
|
|
4154
|
-
onLoad: () =>
|
|
4155
|
-
onError: (
|
|
4156
|
-
|
|
4378
|
+
onLoad: () => D(P),
|
|
4379
|
+
onError: (L) => {
|
|
4380
|
+
L.target.style.display = "none", D(P);
|
|
4157
4381
|
}
|
|
4158
4382
|
}
|
|
4159
4383
|
)
|
|
4160
4384
|
] })
|
|
4161
4385
|
},
|
|
4162
4386
|
`image-${P}-${z.src}`
|
|
4163
|
-
)) : /* @__PURE__ */ r("div", { className:
|
|
4387
|
+
)) : /* @__PURE__ */ r("div", { className: X.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ r("div", { className: X.empty, children: "Ingen bilder" }) })
|
|
4164
4388
|
}
|
|
4165
4389
|
) }),
|
|
4166
|
-
(s || l && t && t.length > 1) && /* @__PURE__ */
|
|
4167
|
-
s && /* @__PURE__ */
|
|
4390
|
+
(s || l && t && t.length > 1) && /* @__PURE__ */ _("div", { className: X.controls, "aria-hidden": "false", children: [
|
|
4391
|
+
s && /* @__PURE__ */ _("div", { className: X.arrows, children: [
|
|
4168
4392
|
/* @__PURE__ */ r(
|
|
4169
|
-
|
|
4393
|
+
Se,
|
|
4170
4394
|
{
|
|
4171
4395
|
variant: "primary",
|
|
4172
4396
|
icon: !0,
|
|
4173
|
-
"aria-label":
|
|
4397
|
+
"aria-label": m("carousel.previousImage"),
|
|
4174
4398
|
onClick: j,
|
|
4175
4399
|
disabled: !t || t.length <= 1,
|
|
4176
|
-
children: /* @__PURE__ */ r(
|
|
4400
|
+
children: /* @__PURE__ */ r(Qn, { "aria-hidden": !0 })
|
|
4177
4401
|
}
|
|
4178
4402
|
),
|
|
4179
4403
|
/* @__PURE__ */ r(
|
|
4180
|
-
|
|
4404
|
+
Se,
|
|
4181
4405
|
{
|
|
4182
4406
|
variant: "primary",
|
|
4183
4407
|
icon: !0,
|
|
4184
|
-
"aria-label":
|
|
4408
|
+
"aria-label": m("carousel.nextImage"),
|
|
4185
4409
|
onClick: N,
|
|
4186
4410
|
disabled: !t || t.length <= 1,
|
|
4187
|
-
children: /* @__PURE__ */ r(
|
|
4411
|
+
children: /* @__PURE__ */ r(eo, { "aria-hidden": !0 })
|
|
4188
4412
|
}
|
|
4189
4413
|
)
|
|
4190
4414
|
] }),
|
|
4191
|
-
l && t && t.length > 1 && /* @__PURE__ */ r("div", { className:
|
|
4192
|
-
const
|
|
4415
|
+
l && t && t.length > 1 && /* @__PURE__ */ r("div", { className: X.dots, role: "tablist", "aria-label": m("carousel.imagePosition"), children: p.map((z, P) => {
|
|
4416
|
+
const L = P === h;
|
|
4193
4417
|
return /* @__PURE__ */ r(
|
|
4194
4418
|
"button",
|
|
4195
4419
|
{
|
|
4196
4420
|
type: "button",
|
|
4197
|
-
className: `${
|
|
4198
|
-
onClick: () =>
|
|
4199
|
-
"aria-label": `${
|
|
4200
|
-
"aria-selected":
|
|
4421
|
+
className: `${X.dot} ${L ? X.dotActive : ""}`,
|
|
4422
|
+
onClick: () => A(P),
|
|
4423
|
+
"aria-label": `${m("carousel.goToImage")} ${P + 1}`,
|
|
4424
|
+
"aria-selected": L,
|
|
4201
4425
|
role: "tab"
|
|
4202
4426
|
},
|
|
4203
4427
|
`dot-${P}`
|
|
@@ -4208,85 +4432,85 @@ const zr = "_carouselContainer_1bu1s_1", Rr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
4208
4432
|
}
|
|
4209
4433
|
);
|
|
4210
4434
|
};
|
|
4211
|
-
|
|
4212
|
-
const
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
const
|
|
4216
|
-
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4219
|
-
const
|
|
4220
|
-
|
|
4221
|
-
const ue = bn,
|
|
4222
|
-
|
|
4223
|
-
const Je =
|
|
4224
|
-
(t, e) => /* @__PURE__ */ r(
|
|
4435
|
+
ss.displayName = "Carousel";
|
|
4436
|
+
const ra = dn, sa = cn, ia = un, J = pn, aa = mn, la = gn, is = fn, as = hn;
|
|
4437
|
+
is.displayName = "Field.Description";
|
|
4438
|
+
as.displayName = "Field.Counter";
|
|
4439
|
+
const da = Dt, ls = fe((t, e) => /* @__PURE__ */ r(kn, { ref: e, ...t }));
|
|
4440
|
+
ls.displayName = "Heading";
|
|
4441
|
+
const ds = vn;
|
|
4442
|
+
ds.displayName = "Input";
|
|
4443
|
+
const cs = fe((t, e) => /* @__PURE__ */ r(yn, { ref: e, ...t }));
|
|
4444
|
+
cs.displayName = "Label";
|
|
4445
|
+
const ue = bn, ca = xn, us = Tn, ua = Sn, pa = Cn, ma = wn, ga = In;
|
|
4446
|
+
us.displayName = "Pagination";
|
|
4447
|
+
const Je = fe(
|
|
4448
|
+
(t, e) => /* @__PURE__ */ r(Dn, { ref: e, ...t })
|
|
4225
4449
|
);
|
|
4226
4450
|
Je.displayName = "Paragraph";
|
|
4227
|
-
const
|
|
4228
|
-
Button:
|
|
4229
|
-
ClearButton:
|
|
4230
|
-
Input:
|
|
4231
|
-
}),
|
|
4232
|
-
|
|
4233
|
-
const Ke =
|
|
4234
|
-
|
|
4235
|
-
const
|
|
4236
|
-
header:
|
|
4237
|
-
languageSwitch:
|
|
4238
|
-
searchOverlay:
|
|
4239
|
-
headerExtension:
|
|
4240
|
-
extensionContentWrapper:
|
|
4241
|
-
extensionContent:
|
|
4242
|
-
extensionDivider:
|
|
4243
|
-
languageLabel:
|
|
4244
|
-
languageLink:
|
|
4245
|
-
headerInner:
|
|
4246
|
-
logoWrapper:
|
|
4247
|
-
logo:
|
|
4248
|
-
secondaryLogoWrapper:
|
|
4249
|
-
slotComponent:
|
|
4250
|
-
slotContainer:
|
|
4251
|
-
slotText:
|
|
4252
|
-
secondaryLogo:
|
|
4253
|
-
redCrossLogo:
|
|
4254
|
-
primaryLogo:
|
|
4255
|
-
navItems:
|
|
4256
|
-
navLink:
|
|
4257
|
-
actions:
|
|
4258
|
-
ctaButton:
|
|
4259
|
-
themeToggle:
|
|
4260
|
-
userInfo:
|
|
4261
|
-
userName:
|
|
4262
|
-
loginLink:
|
|
4263
|
-
loginText:
|
|
4264
|
-
underline:
|
|
4265
|
-
searchButtonWrapper:
|
|
4266
|
-
buttonText:
|
|
4267
|
-
menuButton:
|
|
4268
|
-
menuOverlay:
|
|
4269
|
-
searchContent:
|
|
4270
|
-
menuContent:
|
|
4271
|
-
menuLeftColumn:
|
|
4272
|
-
menuRightColumn:
|
|
4273
|
-
slotContent:
|
|
4274
|
-
navList:
|
|
4275
|
-
menuUtilities:
|
|
4276
|
-
menuBrand:
|
|
4277
|
-
suggestionsSection:
|
|
4278
|
-
suggestionsTitle:
|
|
4279
|
-
searchResults:
|
|
4280
|
-
resultList:
|
|
4281
|
-
resultItem:
|
|
4282
|
-
resultLink:
|
|
4283
|
-
suggestionIcon:
|
|
4284
|
-
suggestionText:
|
|
4285
|
-
highlightedText:
|
|
4286
|
-
remainingText:
|
|
4287
|
-
viewAllLink:
|
|
4288
|
-
noResults:
|
|
4289
|
-
},
|
|
4451
|
+
const fa = _n, ha = An, ka = Mn, Be = Object.assign(Ln, {
|
|
4452
|
+
Button: Fn,
|
|
4453
|
+
ClearButton: En,
|
|
4454
|
+
Input: jn
|
|
4455
|
+
}), va = Nn, ya = Bn, ba = Pn, ps = zn;
|
|
4456
|
+
ps.displayName = "Suggestion";
|
|
4457
|
+
const Ke = Rn, xa = Gn, Ta = $n, Sa = Wn, Ca = Hn, wa = Un, Ia = On, Da = Vn, ms = fe((t, e) => /* @__PURE__ */ r(Kn, { ref: e, ...t }));
|
|
4458
|
+
ms.displayName = "ValidationMessage";
|
|
4459
|
+
const gs = "_header_ymzss_1", fs = "_languageSwitch_ymzss_36", hs = "_searchOverlay_ymzss_40", ks = "_headerExtension_ymzss_45", vs = "_extensionContentWrapper_ymzss_73", ys = "_extensionContent_ymzss_73", bs = "_extensionDivider_ymzss_100", xs = "_languageLabel_ymzss_124", Ts = "_languageLink_ymzss_140", Ss = "_headerInner_ymzss_175", Cs = "_logoWrapper_ymzss_192", ws = "_logo_ymzss_192", Is = "_secondaryLogoWrapper_ymzss_215", Ds = "_slotComponent_ymzss_224", _s = "_slotContainer_ymzss_234", As = "_slotText_ymzss_242", Ms = "_secondaryLogo_ymzss_215", Ls = "_redCrossLogo_ymzss_269", js = "_primaryLogo_ymzss_275", Es = "_navItems_ymzss_279", Fs = "_navLink_ymzss_288", Ns = "_actions_ymzss_301", Bs = "_ctaButton_ymzss_309", Ps = "_themeToggle_ymzss_314", zs = "_userInfo_ymzss_319", Rs = "_userName_ymzss_325", Gs = "_loginLink_ymzss_332", $s = "_loginText_ymzss_341", Ws = "_underline_ymzss_348", Hs = "_searchButtonWrapper_ymzss_354", Us = "_buttonText_ymzss_358", Os = "_menuButton_ymzss_363", Vs = "_menuOverlay_ymzss_368", Ks = "_searchContent_ymzss_402", Ys = "_menuContent_ymzss_412", qs = "_menuLeftColumn_ymzss_421", Zs = "_menuRightColumn_ymzss_427", Xs = "_slotContent_ymzss_441", Js = "_navList_ymzss_454", Qs = "_menuUtilities_ymzss_461", ei = "_menuBrand_ymzss_468", ti = "_suggestionsSection_ymzss_472", ni = "_suggestionsTitle_ymzss_478", oi = "_searchResults_ymzss_487", ri = "_resultList_ymzss_493", si = "_resultItem_ymzss_499", ii = "_resultLink_ymzss_507", ai = "_suggestionIcon_ymzss_521", li = "_suggestionText_ymzss_534", di = "_highlightedText_ymzss_541", ci = "_remainingText_ymzss_546", ui = "_viewAllLink_ymzss_559", pi = "_noResults_ymzss_594", b = {
|
|
4460
|
+
header: gs,
|
|
4461
|
+
languageSwitch: fs,
|
|
4462
|
+
searchOverlay: hs,
|
|
4463
|
+
headerExtension: ks,
|
|
4464
|
+
extensionContentWrapper: vs,
|
|
4465
|
+
extensionContent: ys,
|
|
4466
|
+
extensionDivider: bs,
|
|
4467
|
+
languageLabel: xs,
|
|
4468
|
+
languageLink: Ts,
|
|
4469
|
+
headerInner: Ss,
|
|
4470
|
+
logoWrapper: Cs,
|
|
4471
|
+
logo: ws,
|
|
4472
|
+
secondaryLogoWrapper: Is,
|
|
4473
|
+
slotComponent: Ds,
|
|
4474
|
+
slotContainer: _s,
|
|
4475
|
+
slotText: As,
|
|
4476
|
+
secondaryLogo: Ms,
|
|
4477
|
+
redCrossLogo: Ls,
|
|
4478
|
+
primaryLogo: js,
|
|
4479
|
+
navItems: Es,
|
|
4480
|
+
navLink: Fs,
|
|
4481
|
+
actions: Ns,
|
|
4482
|
+
ctaButton: Bs,
|
|
4483
|
+
themeToggle: Ps,
|
|
4484
|
+
userInfo: zs,
|
|
4485
|
+
userName: Rs,
|
|
4486
|
+
loginLink: Gs,
|
|
4487
|
+
loginText: $s,
|
|
4488
|
+
underline: Ws,
|
|
4489
|
+
searchButtonWrapper: Hs,
|
|
4490
|
+
buttonText: Us,
|
|
4491
|
+
menuButton: Os,
|
|
4492
|
+
menuOverlay: Vs,
|
|
4493
|
+
searchContent: Ks,
|
|
4494
|
+
menuContent: Ys,
|
|
4495
|
+
menuLeftColumn: qs,
|
|
4496
|
+
menuRightColumn: Zs,
|
|
4497
|
+
slotContent: Xs,
|
|
4498
|
+
navList: Js,
|
|
4499
|
+
menuUtilities: Qs,
|
|
4500
|
+
menuBrand: ei,
|
|
4501
|
+
suggestionsSection: ti,
|
|
4502
|
+
suggestionsTitle: ni,
|
|
4503
|
+
searchResults: oi,
|
|
4504
|
+
resultList: ri,
|
|
4505
|
+
resultItem: si,
|
|
4506
|
+
resultLink: ii,
|
|
4507
|
+
suggestionIcon: ai,
|
|
4508
|
+
suggestionText: li,
|
|
4509
|
+
highlightedText: di,
|
|
4510
|
+
remainingText: ci,
|
|
4511
|
+
viewAllLink: ui,
|
|
4512
|
+
noResults: pi
|
|
4513
|
+
}, mi = [
|
|
4290
4514
|
// Pages
|
|
4291
4515
|
{ id: "home", title: "Hjem", category: "Page", path: "home", description: "Forsiden" },
|
|
4292
4516
|
{ id: "components", title: "Komponenter", category: "Page", path: "components", description: "Oversikt over alle komponenter" },
|
|
@@ -4349,7 +4573,7 @@ const ls = "_header_ymzss_1", ds = "_languageSwitch_ymzss_36", cs = "_searchOver
|
|
|
4349
4573
|
{ id: "komponent-kreasjon", title: "Komponent Kreasjon", category: "Code", path: "code/komponent-kreasjon", description: "Opprette nye komponenter" },
|
|
4350
4574
|
{ id: "progression", title: "Progresjon", category: "Code", path: "code/progression", description: "Fra design til ferdig komponent" },
|
|
4351
4575
|
{ id: "metadata-files", title: "Metadata filer", category: "Code", path: "code/metadata-files", description: "Struktur og bruk av metadata.json" }
|
|
4352
|
-
],
|
|
4576
|
+
], _a = ({
|
|
4353
4577
|
"data-color": t = "primary",
|
|
4354
4578
|
activePage: e,
|
|
4355
4579
|
setPage: n,
|
|
@@ -4359,28 +4583,28 @@ const ls = "_header_ymzss_1", ds = "_languageSwitch_ymzss_36", cs = "_searchOver
|
|
|
4359
4583
|
showLogin: o = !0,
|
|
4360
4584
|
showCta: c = !1,
|
|
4361
4585
|
ctaLabel: d,
|
|
4362
|
-
ctaIcon: u = /* @__PURE__ */ r(
|
|
4363
|
-
onCtaClick:
|
|
4364
|
-
showThemeToggle:
|
|
4365
|
-
secondaryLogo:
|
|
4366
|
-
secondaryLogoSrc:
|
|
4586
|
+
ctaIcon: u = /* @__PURE__ */ r(no, { "aria-hidden": !0 }),
|
|
4587
|
+
onCtaClick: v,
|
|
4588
|
+
showThemeToggle: m = !1,
|
|
4589
|
+
secondaryLogo: f = !1,
|
|
4590
|
+
secondaryLogoSrc: x,
|
|
4367
4591
|
secondaryLogoSrcDark: a,
|
|
4368
|
-
secondaryLogoAlt:
|
|
4592
|
+
secondaryLogoAlt: h = "Secondary Logo",
|
|
4369
4593
|
navItems: k,
|
|
4370
|
-
showNavItems:
|
|
4371
|
-
showMenuButton:
|
|
4594
|
+
showNavItems: p = !0,
|
|
4595
|
+
showMenuButton: y = !0,
|
|
4372
4596
|
showHeaderExtension: g = !1,
|
|
4373
|
-
showModeToggle:
|
|
4374
|
-
showLanguageSwitch:
|
|
4597
|
+
showModeToggle: M = !1,
|
|
4598
|
+
showLanguageSwitch: D = !1
|
|
4375
4599
|
}) => {
|
|
4376
|
-
const [
|
|
4377
|
-
|
|
4378
|
-
const
|
|
4379
|
-
if (typeof document > "u" || document.getElementById(
|
|
4380
|
-
const
|
|
4381
|
-
|
|
4600
|
+
const [w, C] = oe(!1), [A, j] = oe(!1), [N, B] = oe(""), [$, O] = oe("light"), { language: z, setLanguage: P, t: L } = Ee(), [V, te] = oe(!1);
|
|
4601
|
+
Y(() => {
|
|
4602
|
+
const T = "rk-header-inline-styles";
|
|
4603
|
+
if (typeof document > "u" || document.getElementById(T)) return;
|
|
4604
|
+
const S = gi(b), E = document.createElement("style");
|
|
4605
|
+
E.id = T, E.textContent = S, document.head.appendChild(E);
|
|
4382
4606
|
}, []);
|
|
4383
|
-
const Q = () => /* @__PURE__ */
|
|
4607
|
+
const Q = () => /* @__PURE__ */ _(
|
|
4384
4608
|
"svg",
|
|
4385
4609
|
{
|
|
4386
4610
|
width: "170",
|
|
@@ -4405,345 +4629,345 @@ const ls = "_header_ymzss_1", ds = "_languageSwitch_ymzss_36", cs = "_searchOver
|
|
|
4405
4629
|
]
|
|
4406
4630
|
}
|
|
4407
4631
|
);
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
}, [e]),
|
|
4411
|
-
if (!(typeof document > "u") &&
|
|
4412
|
-
const
|
|
4632
|
+
Y(() => {
|
|
4633
|
+
C(!1), j(!1), B("");
|
|
4634
|
+
}, [e]), Y(() => {
|
|
4635
|
+
if (!(typeof document > "u") && w && V) {
|
|
4636
|
+
const T = document.body.style.overflow;
|
|
4413
4637
|
return document.body.style.overflow = "hidden", () => {
|
|
4414
|
-
document.body.style.overflow =
|
|
4638
|
+
document.body.style.overflow = T;
|
|
4415
4639
|
};
|
|
4416
4640
|
}
|
|
4417
|
-
}, [
|
|
4641
|
+
}, [w, V]), Y(() => {
|
|
4418
4642
|
if (typeof window > "u" || typeof window.matchMedia > "u") return;
|
|
4419
|
-
const
|
|
4420
|
-
return
|
|
4421
|
-
|
|
4643
|
+
const T = window.matchMedia("(max-width: 850px)"), S = (E) => te("matches" in E ? E.matches : T.matches);
|
|
4644
|
+
return S(T), T.addEventListener ? T.addEventListener("change", S) : T.addListener(S), () => {
|
|
4645
|
+
T.removeEventListener ? T.removeEventListener("change", S) : T.removeListener(S);
|
|
4422
4646
|
};
|
|
4423
|
-
}, []),
|
|
4647
|
+
}, []), Y(() => {
|
|
4424
4648
|
if (typeof document > "u") return;
|
|
4425
|
-
const
|
|
4426
|
-
if (!
|
|
4427
|
-
const
|
|
4428
|
-
const
|
|
4429
|
-
document.documentElement.style.setProperty("--header-height-mobile", `${
|
|
4649
|
+
const T = document.querySelector(`.${b.header}`);
|
|
4650
|
+
if (!T) return;
|
|
4651
|
+
const S = () => {
|
|
4652
|
+
const H = T.offsetHeight;
|
|
4653
|
+
document.documentElement.style.setProperty("--header-height-mobile", `${H}px`);
|
|
4430
4654
|
};
|
|
4431
|
-
|
|
4432
|
-
const
|
|
4433
|
-
|
|
4655
|
+
S(), window.addEventListener("resize", S);
|
|
4656
|
+
const E = new ResizeObserver(() => {
|
|
4657
|
+
S();
|
|
4434
4658
|
});
|
|
4435
|
-
return
|
|
4436
|
-
window.removeEventListener("resize",
|
|
4659
|
+
return E.observe(T), () => {
|
|
4660
|
+
window.removeEventListener("resize", S), E.disconnect();
|
|
4437
4661
|
};
|
|
4438
|
-
}, [
|
|
4662
|
+
}, [V]), Y(() => {
|
|
4439
4663
|
if (typeof document > "u") return;
|
|
4440
|
-
const
|
|
4441
|
-
if (!
|
|
4442
|
-
const
|
|
4443
|
-
const
|
|
4444
|
-
document.documentElement.style.setProperty("--rk-logo-width", `${
|
|
4664
|
+
const T = document.querySelector(`.${b.logoWrapper}`);
|
|
4665
|
+
if (!T) return;
|
|
4666
|
+
const S = () => {
|
|
4667
|
+
const E = T.offsetWidth;
|
|
4668
|
+
document.documentElement.style.setProperty("--rk-logo-width", `${E}px`);
|
|
4445
4669
|
};
|
|
4446
|
-
return
|
|
4447
|
-
}, [
|
|
4448
|
-
if (typeof document > "u" || !
|
|
4670
|
+
return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
4671
|
+
}, [V]), Y(() => {
|
|
4672
|
+
if (typeof document > "u" || !A) {
|
|
4449
4673
|
document.documentElement.style.setProperty("--rk-search-overlay-height", "0px");
|
|
4450
4674
|
return;
|
|
4451
4675
|
}
|
|
4452
|
-
const
|
|
4453
|
-
if (!
|
|
4454
|
-
const
|
|
4455
|
-
const
|
|
4456
|
-
document.documentElement.style.setProperty("--rk-search-overlay-height", `${
|
|
4676
|
+
const T = document.querySelector(`.${b.searchOverlay}`);
|
|
4677
|
+
if (!T) return;
|
|
4678
|
+
const S = () => {
|
|
4679
|
+
const H = T.offsetHeight;
|
|
4680
|
+
document.documentElement.style.setProperty("--rk-search-overlay-height", `${H}px`);
|
|
4457
4681
|
};
|
|
4458
|
-
requestAnimationFrame(
|
|
4459
|
-
const
|
|
4460
|
-
return
|
|
4461
|
-
window.removeEventListener("resize",
|
|
4682
|
+
requestAnimationFrame(S), window.addEventListener("resize", S);
|
|
4683
|
+
const E = new ResizeObserver(S);
|
|
4684
|
+
return E.observe(T), () => {
|
|
4685
|
+
window.removeEventListener("resize", S), E.disconnect();
|
|
4462
4686
|
};
|
|
4463
|
-
}, [
|
|
4687
|
+
}, [A]);
|
|
4464
4688
|
const ie = () => {
|
|
4465
|
-
const
|
|
4466
|
-
|
|
4467
|
-
}, ee = (
|
|
4468
|
-
n && (
|
|
4689
|
+
const T = $ === "light" ? "dark" : "light";
|
|
4690
|
+
O(T), document.documentElement.setAttribute("data-color-scheme", T);
|
|
4691
|
+
}, ee = (T) => {
|
|
4692
|
+
n && (T.preventDefault(), n("home")), C(!1), j(!1);
|
|
4469
4693
|
}, de = () => {
|
|
4470
|
-
|
|
4471
|
-
const
|
|
4472
|
-
if (
|
|
4473
|
-
const
|
|
4474
|
-
document.documentElement.style.setProperty("--header-height-mobile", `${
|
|
4694
|
+
C(!w), A && j(!1), !w && typeof document < "u" && requestAnimationFrame(() => {
|
|
4695
|
+
const T = document.querySelector(`.${b.header}`);
|
|
4696
|
+
if (T) {
|
|
4697
|
+
const S = T.offsetHeight;
|
|
4698
|
+
document.documentElement.style.setProperty("--header-height-mobile", `${S}px`);
|
|
4475
4699
|
}
|
|
4476
4700
|
});
|
|
4477
4701
|
}, ae = () => {
|
|
4478
|
-
j(!
|
|
4479
|
-
},
|
|
4702
|
+
j(!A), w && C(!1);
|
|
4703
|
+
}, q = Te(() => {
|
|
4480
4704
|
if (!N.trim()) return [];
|
|
4481
|
-
const
|
|
4482
|
-
return
|
|
4483
|
-
(
|
|
4705
|
+
const T = N.toLowerCase();
|
|
4706
|
+
return mi.filter(
|
|
4707
|
+
(S) => S.title.toLowerCase().startsWith(T)
|
|
4484
4708
|
);
|
|
4485
|
-
}, [N]), ce = (
|
|
4486
|
-
n && n(
|
|
4709
|
+
}, [N]), ce = (T) => {
|
|
4710
|
+
n && n(T), j(!1), B("");
|
|
4487
4711
|
};
|
|
4488
|
-
return /* @__PURE__ */
|
|
4489
|
-
g && /* @__PURE__ */ r("div", { className: b.headerExtension, "data-color-scheme": "light", children: /* @__PURE__ */
|
|
4490
|
-
|
|
4712
|
+
return /* @__PURE__ */ _("header", { className: b.header, "data-open": w ? "true" : "false", "data-color": t, children: [
|
|
4713
|
+
g && /* @__PURE__ */ r("div", { className: b.headerExtension, "data-color-scheme": "light", children: /* @__PURE__ */ _("div", { className: b.extensionContentWrapper, children: [
|
|
4714
|
+
M && /* @__PURE__ */ r("div", { className: b.extensionContent, children: /* @__PURE__ */ r(
|
|
4491
4715
|
Ke,
|
|
4492
4716
|
{
|
|
4493
4717
|
"data-size": "sm",
|
|
4494
4718
|
checked: $ === "dark",
|
|
4495
4719
|
onChange: ie,
|
|
4496
|
-
label:
|
|
4720
|
+
label: L("header.darkMode"),
|
|
4497
4721
|
color: "neutral",
|
|
4498
4722
|
"data-color-scheme": "light"
|
|
4499
4723
|
}
|
|
4500
4724
|
) }),
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
/* @__PURE__ */ r("span", { className: b.languageLabel, children:
|
|
4504
|
-
/* @__PURE__ */
|
|
4505
|
-
/* @__PURE__ */
|
|
4506
|
-
|
|
4725
|
+
M && D && /* @__PURE__ */ r("div", { className: b.extensionDivider }),
|
|
4726
|
+
D && /* @__PURE__ */ _("div", { className: b.languageSwitch, children: [
|
|
4727
|
+
/* @__PURE__ */ r("span", { className: b.languageLabel, children: L("header.language") }),
|
|
4728
|
+
/* @__PURE__ */ _(J.TriggerContext, { children: [
|
|
4729
|
+
/* @__PURE__ */ _(
|
|
4730
|
+
J.Trigger,
|
|
4507
4731
|
{
|
|
4508
4732
|
className: b.languageLink,
|
|
4509
|
-
"aria-label":
|
|
4733
|
+
"aria-label": L("header.selectLanguage"),
|
|
4510
4734
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4511
4735
|
children: [
|
|
4512
4736
|
z,
|
|
4513
4737
|
" ",
|
|
4514
|
-
/* @__PURE__ */ r(
|
|
4738
|
+
/* @__PURE__ */ r(ft, { "aria-hidden": !0 })
|
|
4515
4739
|
]
|
|
4516
4740
|
}
|
|
4517
4741
|
),
|
|
4518
4742
|
/* @__PURE__ */ r(
|
|
4519
|
-
|
|
4743
|
+
J,
|
|
4520
4744
|
{
|
|
4521
4745
|
"data-color-scheme": $,
|
|
4522
4746
|
placement: "bottom-end",
|
|
4523
|
-
children: /* @__PURE__ */
|
|
4524
|
-
/* @__PURE__ */ r(
|
|
4525
|
-
/* @__PURE__ */ r(
|
|
4747
|
+
children: /* @__PURE__ */ _(J.List, { children: [
|
|
4748
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("NO"), children: "Norsk (NO)" }) }),
|
|
4749
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("EN"), children: "English (EN)" }) })
|
|
4526
4750
|
] })
|
|
4527
4751
|
}
|
|
4528
4752
|
)
|
|
4529
4753
|
] })
|
|
4530
4754
|
] })
|
|
4531
4755
|
] }) }),
|
|
4532
|
-
/* @__PURE__ */
|
|
4533
|
-
/* @__PURE__ */
|
|
4756
|
+
/* @__PURE__ */ _("div", { className: b.headerInner, children: [
|
|
4757
|
+
/* @__PURE__ */ _("div", { className: b.logoWrapper, children: [
|
|
4534
4758
|
/* @__PURE__ */ r(
|
|
4535
4759
|
ue,
|
|
4536
4760
|
{
|
|
4537
4761
|
href: "/",
|
|
4538
4762
|
className: `${b.logo} ${b.primaryLogo}`,
|
|
4539
|
-
"aria-label":
|
|
4763
|
+
"aria-label": L("header.homeAriaLabel"),
|
|
4540
4764
|
onClick: ee,
|
|
4541
4765
|
children: /* @__PURE__ */ r(Q, {})
|
|
4542
4766
|
}
|
|
4543
4767
|
),
|
|
4544
|
-
/* @__PURE__ */ r("div", { className: b.secondaryLogoWrapper, children:
|
|
4768
|
+
/* @__PURE__ */ r("div", { className: b.secondaryLogoWrapper, children: f && x ? /* @__PURE__ */ r(
|
|
4545
4769
|
"img",
|
|
4546
4770
|
{
|
|
4547
|
-
src: $ === "dark" && a ? a :
|
|
4548
|
-
alt:
|
|
4771
|
+
src: $ === "dark" && a ? a : x,
|
|
4772
|
+
alt: h,
|
|
4549
4773
|
className: b.secondaryLogo
|
|
4550
4774
|
}
|
|
4551
|
-
) :
|
|
4775
|
+
) : f ? /* @__PURE__ */ r("div", { className: b.slotComponent, children: /* @__PURE__ */ r("div", { className: b.slotContainer, children: /* @__PURE__ */ r("p", { className: b.slotText, children: "SLOT" }) }) }) : null })
|
|
4552
4776
|
] }),
|
|
4553
|
-
|
|
4777
|
+
p && k && k.length > 0 && !V && /* @__PURE__ */ r("nav", { className: b.navItems, children: k.map((T, S) => /* @__PURE__ */ r(
|
|
4554
4778
|
ue,
|
|
4555
4779
|
{
|
|
4556
|
-
href:
|
|
4780
|
+
href: T.href,
|
|
4557
4781
|
className: b.navLink,
|
|
4558
|
-
onClick: (
|
|
4559
|
-
n && (
|
|
4782
|
+
onClick: (E) => {
|
|
4783
|
+
n && (E.preventDefault(), n(T.href));
|
|
4560
4784
|
},
|
|
4561
|
-
children:
|
|
4785
|
+
children: T.label
|
|
4562
4786
|
},
|
|
4563
|
-
|
|
4787
|
+
S
|
|
4564
4788
|
)) }),
|
|
4565
|
-
/* @__PURE__ */
|
|
4566
|
-
c && /* @__PURE__ */
|
|
4567
|
-
|
|
4789
|
+
/* @__PURE__ */ _("div", { className: b.actions, children: [
|
|
4790
|
+
c && /* @__PURE__ */ _(
|
|
4791
|
+
Se,
|
|
4568
4792
|
{
|
|
4569
4793
|
variant: "primary",
|
|
4570
4794
|
"data-color": "main",
|
|
4571
4795
|
"data-size": "md",
|
|
4572
4796
|
className: b.ctaButton,
|
|
4573
|
-
onClick:
|
|
4797
|
+
onClick: v,
|
|
4574
4798
|
children: [
|
|
4575
4799
|
u,
|
|
4576
|
-
/* @__PURE__ */ r("span", { className: b.buttonText, children: d ||
|
|
4800
|
+
/* @__PURE__ */ r("span", { className: b.buttonText, children: d || L("header.supportUs") })
|
|
4577
4801
|
]
|
|
4578
4802
|
}
|
|
4579
4803
|
),
|
|
4580
|
-
!g &&
|
|
4804
|
+
!g && m && /* @__PURE__ */ r("div", { className: b.themeToggle, children: /* @__PURE__ */ r(
|
|
4581
4805
|
Ke,
|
|
4582
4806
|
{
|
|
4583
4807
|
checked: $ === "dark",
|
|
4584
4808
|
onChange: ie,
|
|
4585
|
-
"aria-label":
|
|
4809
|
+
"aria-label": L("header.toggleTheme")
|
|
4586
4810
|
}
|
|
4587
4811
|
) }),
|
|
4588
|
-
l && /* @__PURE__ */
|
|
4812
|
+
l && /* @__PURE__ */ _("div", { className: b.userInfo, children: [
|
|
4589
4813
|
/* @__PURE__ */ r(Je, { "data-size": "md", className: b.userName, children: "Frodo Baggins" }),
|
|
4590
4814
|
/* @__PURE__ */ r(Mt, { "aria-label": "Frodo Baggins", "data-color": "main", variant: "circle", initials: "FB" })
|
|
4591
4815
|
] }),
|
|
4592
|
-
o && /* @__PURE__ */
|
|
4593
|
-
/* @__PURE__ */ r("span", { className: b.loginText, children:
|
|
4816
|
+
o && /* @__PURE__ */ _("a", { href: "#", className: b.loginLink, children: [
|
|
4817
|
+
/* @__PURE__ */ r("span", { className: b.loginText, children: L("header.login") }),
|
|
4594
4818
|
/* @__PURE__ */ r("div", { className: b.underline })
|
|
4595
4819
|
] }),
|
|
4596
|
-
i && /* @__PURE__ */ r("div", { className: b.searchButtonWrapper, children: /* @__PURE__ */
|
|
4597
|
-
|
|
4820
|
+
i && /* @__PURE__ */ r("div", { className: b.searchButtonWrapper, children: /* @__PURE__ */ _(
|
|
4821
|
+
Se,
|
|
4598
4822
|
{
|
|
4599
4823
|
variant: "secondary",
|
|
4600
4824
|
"data-color": "main",
|
|
4601
4825
|
"data-size": "md",
|
|
4602
4826
|
onClick: ae,
|
|
4603
|
-
"aria-expanded":
|
|
4604
|
-
"aria-label":
|
|
4827
|
+
"aria-expanded": A,
|
|
4828
|
+
"aria-label": L(A ? "header.closeSearch" : "header.openSearch"),
|
|
4605
4829
|
children: [
|
|
4606
|
-
|
|
4607
|
-
/* @__PURE__ */ r("span", { className: b.buttonText, children:
|
|
4830
|
+
A ? /* @__PURE__ */ r(ht, { "aria-hidden": !0 }) : /* @__PURE__ */ r(kt, { "aria-hidden": !0 }),
|
|
4831
|
+
/* @__PURE__ */ r("span", { className: b.buttonText, children: L(A ? "header.close" : "header.search") })
|
|
4608
4832
|
]
|
|
4609
4833
|
}
|
|
4610
4834
|
) }),
|
|
4611
|
-
(
|
|
4612
|
-
|
|
4835
|
+
(y || V) && /* @__PURE__ */ _(
|
|
4836
|
+
Se,
|
|
4613
4837
|
{
|
|
4614
4838
|
variant: "primary",
|
|
4615
4839
|
"data-color": "main",
|
|
4616
4840
|
"data-size": "md",
|
|
4617
4841
|
onClick: de,
|
|
4618
|
-
"aria-expanded":
|
|
4619
|
-
"aria-label":
|
|
4842
|
+
"aria-expanded": w,
|
|
4843
|
+
"aria-label": L(w ? "header.closeMenu" : "header.openMenu"),
|
|
4620
4844
|
className: b.menuButton,
|
|
4621
4845
|
children: [
|
|
4622
|
-
|
|
4623
|
-
/* @__PURE__ */ r("span", { className: b.buttonText, children:
|
|
4846
|
+
w ? /* @__PURE__ */ r(ht, { "aria-hidden": !0 }) : /* @__PURE__ */ r(to, { "aria-hidden": !0 }),
|
|
4847
|
+
/* @__PURE__ */ r("span", { className: b.buttonText, children: L(w ? "header.close" : "header.menu") })
|
|
4624
4848
|
]
|
|
4625
4849
|
}
|
|
4626
4850
|
)
|
|
4627
4851
|
] })
|
|
4628
4852
|
] }),
|
|
4629
|
-
|
|
4853
|
+
w && /* @__PURE__ */ r("div", { className: b.menuOverlay, children: /* @__PURE__ */ _("div", { className: b.menuContent, children: [
|
|
4630
4854
|
/* @__PURE__ */ r("div", { className: b.menuLeftColumn }),
|
|
4631
|
-
/* @__PURE__ */
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
/* @__PURE__ */ r("span", { className: b.languageLabel, children:
|
|
4635
|
-
/* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4637
|
-
|
|
4855
|
+
/* @__PURE__ */ _("div", { className: b.menuRightColumn, children: [
|
|
4856
|
+
V && (D || M) && /* @__PURE__ */ _("div", { className: b.menuUtilities, children: [
|
|
4857
|
+
D && /* @__PURE__ */ _("div", { className: b.languageSwitch, children: [
|
|
4858
|
+
/* @__PURE__ */ r("span", { className: b.languageLabel, children: L("header.language") }),
|
|
4859
|
+
/* @__PURE__ */ _(J.TriggerContext, { children: [
|
|
4860
|
+
/* @__PURE__ */ _(
|
|
4861
|
+
J.Trigger,
|
|
4638
4862
|
{
|
|
4639
4863
|
className: b.languageLink,
|
|
4640
|
-
"aria-label":
|
|
4864
|
+
"aria-label": L("header.selectLanguage"),
|
|
4641
4865
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4642
4866
|
children: [
|
|
4643
4867
|
z,
|
|
4644
4868
|
" ",
|
|
4645
|
-
/* @__PURE__ */ r(
|
|
4869
|
+
/* @__PURE__ */ r(ft, { "aria-hidden": !0 })
|
|
4646
4870
|
]
|
|
4647
4871
|
}
|
|
4648
4872
|
),
|
|
4649
4873
|
/* @__PURE__ */ r(
|
|
4650
|
-
|
|
4874
|
+
J,
|
|
4651
4875
|
{
|
|
4652
4876
|
"data-color-scheme": $,
|
|
4653
4877
|
placement: "bottom-start",
|
|
4654
|
-
children: /* @__PURE__ */
|
|
4655
|
-
/* @__PURE__ */ r(
|
|
4656
|
-
/* @__PURE__ */ r(
|
|
4878
|
+
children: /* @__PURE__ */ _(J.List, { children: [
|
|
4879
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("NO"), children: "Norsk (NO)" }) }),
|
|
4880
|
+
/* @__PURE__ */ r(J.Item, { children: /* @__PURE__ */ r(J.Button, { onClick: () => P("EN"), children: "English (EN)" }) })
|
|
4657
4881
|
] })
|
|
4658
4882
|
}
|
|
4659
4883
|
)
|
|
4660
4884
|
] })
|
|
4661
4885
|
] }),
|
|
4662
|
-
|
|
4886
|
+
M && /* @__PURE__ */ r("div", { className: b.extensionContent, children: /* @__PURE__ */ r(
|
|
4663
4887
|
Ke,
|
|
4664
4888
|
{
|
|
4665
4889
|
"data-size": "sm",
|
|
4666
4890
|
checked: $ === "dark",
|
|
4667
4891
|
onChange: ie,
|
|
4668
|
-
label:
|
|
4892
|
+
label: L("header.darkMode"),
|
|
4669
4893
|
color: "neutral",
|
|
4670
4894
|
"data-color-scheme": "light"
|
|
4671
4895
|
}
|
|
4672
4896
|
) })
|
|
4673
4897
|
] }),
|
|
4674
|
-
/* @__PURE__ */
|
|
4898
|
+
/* @__PURE__ */ _("div", { className: b.slotContent, children: [
|
|
4675
4899
|
s,
|
|
4676
|
-
|
|
4900
|
+
V && p && k && k.length > 0 && /* @__PURE__ */ r("nav", { className: b.navList, children: k.map((T, S) => /* @__PURE__ */ r(
|
|
4677
4901
|
ue,
|
|
4678
4902
|
{
|
|
4679
|
-
href:
|
|
4903
|
+
href: T.href,
|
|
4680
4904
|
className: b.navLink,
|
|
4681
|
-
onClick: (
|
|
4682
|
-
n && (
|
|
4905
|
+
onClick: (E) => {
|
|
4906
|
+
n && (E.preventDefault(), n(T.href));
|
|
4683
4907
|
},
|
|
4684
|
-
children:
|
|
4908
|
+
children: T.label
|
|
4685
4909
|
},
|
|
4686
|
-
|
|
4910
|
+
S
|
|
4687
4911
|
)) })
|
|
4688
4912
|
] }),
|
|
4689
|
-
|
|
4913
|
+
V && /* @__PURE__ */ r("div", { className: b.menuBrand, children: /* @__PURE__ */ r(Q, {}) })
|
|
4690
4914
|
] })
|
|
4691
4915
|
] }) }),
|
|
4692
|
-
|
|
4693
|
-
/* @__PURE__ */
|
|
4916
|
+
A && /* @__PURE__ */ r("div", { className: b.searchOverlay, children: /* @__PURE__ */ _("div", { className: b.searchContent, children: [
|
|
4917
|
+
/* @__PURE__ */ _(Be, { children: [
|
|
4694
4918
|
/* @__PURE__ */ r(
|
|
4695
4919
|
Be.Input,
|
|
4696
4920
|
{
|
|
4697
|
-
"aria-label":
|
|
4698
|
-
placeholder:
|
|
4921
|
+
"aria-label": L("header.search"),
|
|
4922
|
+
placeholder: L("header.searchPlaceholder"),
|
|
4699
4923
|
value: N,
|
|
4700
|
-
onChange: (
|
|
4924
|
+
onChange: (T) => B(T.target.value)
|
|
4701
4925
|
}
|
|
4702
4926
|
),
|
|
4703
|
-
/* @__PURE__ */ r(Be.Button, { "aria-label":
|
|
4704
|
-
/* @__PURE__ */ r(Be.ClearButton, { onClick: () => B(""), "aria-label":
|
|
4927
|
+
/* @__PURE__ */ r(Be.Button, { "aria-label": L("header.search") }),
|
|
4928
|
+
/* @__PURE__ */ r(Be.ClearButton, { onClick: () => B(""), "aria-label": L("header.clearSearch") })
|
|
4705
4929
|
] }),
|
|
4706
|
-
N && /* @__PURE__ */ r("div", { className: b.searchResults, children:
|
|
4707
|
-
/* @__PURE__ */ r("h3", { className: b.suggestionsTitle, children:
|
|
4708
|
-
/* @__PURE__ */ r("ul", { className: b.resultList, children:
|
|
4930
|
+
N && /* @__PURE__ */ r("div", { className: b.searchResults, children: q.length > 0 ? /* @__PURE__ */ _("div", { className: b.suggestionsSection, children: [
|
|
4931
|
+
/* @__PURE__ */ r("h3", { className: b.suggestionsTitle, children: L("header.suggestions") }),
|
|
4932
|
+
/* @__PURE__ */ r("ul", { className: b.resultList, children: q.slice(0, 5).map((T) => /* @__PURE__ */ r("li", { className: b.resultItem, children: /* @__PURE__ */ _(
|
|
4709
4933
|
"button",
|
|
4710
4934
|
{
|
|
4711
4935
|
className: b.resultLink,
|
|
4712
|
-
onClick: () => ce(
|
|
4936
|
+
onClick: () => ce(T.path),
|
|
4713
4937
|
children: [
|
|
4714
4938
|
/* @__PURE__ */ r("span", { className: b.suggestionIcon, children: /* @__PURE__ */ r(kt, { "aria-hidden": !0 }) }),
|
|
4715
4939
|
/* @__PURE__ */ r("span", { className: b.suggestionText, children: (() => {
|
|
4716
|
-
const
|
|
4717
|
-
if (
|
|
4718
|
-
const
|
|
4719
|
-
return /* @__PURE__ */
|
|
4720
|
-
/* @__PURE__ */ r("span", { className: b.remainingText, children:
|
|
4721
|
-
/* @__PURE__ */ r("span", { className: b.highlightedText, children:
|
|
4722
|
-
/* @__PURE__ */ r("span", { className: b.remainingText, children:
|
|
4940
|
+
const S = T.title.toLowerCase().indexOf(N.toLowerCase());
|
|
4941
|
+
if (S === -1) return /* @__PURE__ */ r("span", { className: b.remainingText, children: T.title });
|
|
4942
|
+
const E = T.title.slice(0, S), H = T.title.slice(S, S + N.length), Z = T.title.slice(S + N.length);
|
|
4943
|
+
return /* @__PURE__ */ _(Vt, { children: [
|
|
4944
|
+
/* @__PURE__ */ r("span", { className: b.remainingText, children: E }),
|
|
4945
|
+
/* @__PURE__ */ r("span", { className: b.highlightedText, children: H }),
|
|
4946
|
+
/* @__PURE__ */ r("span", { className: b.remainingText, children: Z })
|
|
4723
4947
|
] });
|
|
4724
4948
|
})() })
|
|
4725
4949
|
]
|
|
4726
4950
|
}
|
|
4727
|
-
) },
|
|
4728
|
-
|
|
4951
|
+
) }, T.id)) }),
|
|
4952
|
+
q.length > 5 && /* @__PURE__ */ _(
|
|
4729
4953
|
ue,
|
|
4730
4954
|
{
|
|
4731
4955
|
href: "#",
|
|
4732
4956
|
"data-color": "neutral",
|
|
4733
4957
|
className: b.viewAllLink,
|
|
4734
|
-
onClick: (
|
|
4735
|
-
|
|
4958
|
+
onClick: (T) => {
|
|
4959
|
+
T.preventDefault(), n && n(`search/${N}`), j(!1), B("");
|
|
4736
4960
|
},
|
|
4737
4961
|
children: [
|
|
4738
|
-
|
|
4962
|
+
L("header.viewAll"),
|
|
4739
4963
|
" (",
|
|
4740
|
-
|
|
4964
|
+
q.length,
|
|
4741
4965
|
")"
|
|
4742
4966
|
]
|
|
4743
4967
|
}
|
|
4744
4968
|
)
|
|
4745
|
-
] }) : /* @__PURE__ */ r("div", { className: b.noResults, children: /* @__PURE__ */
|
|
4746
|
-
|
|
4969
|
+
] }) : /* @__PURE__ */ r("div", { className: b.noResults, children: /* @__PURE__ */ _(Je, { children: [
|
|
4970
|
+
L("header.noResults"),
|
|
4747
4971
|
' "',
|
|
4748
4972
|
N,
|
|
4749
4973
|
'"'
|
|
@@ -4751,7 +4975,7 @@ const ls = "_header_ymzss_1", ds = "_languageSwitch_ymzss_36", cs = "_searchOver
|
|
|
4751
4975
|
] }) })
|
|
4752
4976
|
] });
|
|
4753
4977
|
};
|
|
4754
|
-
function
|
|
4978
|
+
function gi(t) {
|
|
4755
4979
|
const e = t;
|
|
4756
4980
|
return `
|
|
4757
4981
|
.${e.header} {
|
|
@@ -4893,35 +5117,35 @@ function li(t) {
|
|
|
4893
5117
|
}
|
|
4894
5118
|
`;
|
|
4895
5119
|
}
|
|
4896
|
-
const
|
|
4897
|
-
footer:
|
|
4898
|
-
redSection:
|
|
4899
|
-
redContainer:
|
|
4900
|
-
shortcutsSection:
|
|
4901
|
-
shortcutsColumn:
|
|
4902
|
-
shortcutsTitle:
|
|
4903
|
-
shortcutsList:
|
|
4904
|
-
shortcutLink:
|
|
4905
|
-
slotComponent:
|
|
4906
|
-
divider:
|
|
4907
|
-
contactSection:
|
|
4908
|
-
contactColumn:
|
|
4909
|
-
contactTitle:
|
|
4910
|
-
contactContent:
|
|
4911
|
-
legalSection:
|
|
4912
|
-
copyrightText:
|
|
4913
|
-
legalLinks:
|
|
4914
|
-
legalLink:
|
|
4915
|
-
whiteSection:
|
|
4916
|
-
whiteContainer:
|
|
4917
|
-
whiteContent:
|
|
4918
|
-
logo:
|
|
4919
|
-
redCrossLogo:
|
|
4920
|
-
secondaryLogoWrapper:
|
|
4921
|
-
designSystemLogo:
|
|
4922
|
-
slotSmall:
|
|
4923
|
-
slotLarge:
|
|
4924
|
-
},
|
|
5120
|
+
const fi = "_footer_6xhfo_1", hi = "_redSection_6xhfo_7", ki = "_redContainer_6xhfo_26", vi = "_shortcutsSection_6xhfo_35", yi = "_shortcutsColumn_6xhfo_43", bi = "_shortcutsTitle_6xhfo_51", xi = "_shortcutsList_6xhfo_60", Ti = "_shortcutLink_6xhfo_69", Si = "_slotComponent_6xhfo_92", Ci = "_divider_6xhfo_131", wi = "_contactSection_6xhfo_139", Ii = "_contactColumn_6xhfo_146", Di = "_contactTitle_6xhfo_154", _i = "_contactContent_6xhfo_163", Ai = "_legalSection_6xhfo_177", Mi = "_copyrightText_6xhfo_184", Li = "_legalLinks_6xhfo_193", ji = "_legalLink_6xhfo_193", Ei = "_whiteSection_6xhfo_223", Fi = "_whiteContainer_6xhfo_228", Ni = "_whiteContent_6xhfo_241", Bi = "_logo_6xhfo_248", Pi = "_redCrossLogo_6xhfo_265", zi = "_secondaryLogoWrapper_6xhfo_271", Ri = "_designSystemLogo_6xhfo_278", Gi = "_slotSmall_6xhfo_285", $i = "_slotLarge_6xhfo_296", F = {
|
|
5121
|
+
footer: fi,
|
|
5122
|
+
redSection: hi,
|
|
5123
|
+
redContainer: ki,
|
|
5124
|
+
shortcutsSection: vi,
|
|
5125
|
+
shortcutsColumn: yi,
|
|
5126
|
+
shortcutsTitle: bi,
|
|
5127
|
+
shortcutsList: xi,
|
|
5128
|
+
shortcutLink: Ti,
|
|
5129
|
+
slotComponent: Si,
|
|
5130
|
+
divider: Ci,
|
|
5131
|
+
contactSection: wi,
|
|
5132
|
+
contactColumn: Ii,
|
|
5133
|
+
contactTitle: Di,
|
|
5134
|
+
contactContent: _i,
|
|
5135
|
+
legalSection: Ai,
|
|
5136
|
+
copyrightText: Mi,
|
|
5137
|
+
legalLinks: Li,
|
|
5138
|
+
legalLink: ji,
|
|
5139
|
+
whiteSection: Ei,
|
|
5140
|
+
whiteContainer: Fi,
|
|
5141
|
+
whiteContent: Ni,
|
|
5142
|
+
logo: Bi,
|
|
5143
|
+
redCrossLogo: Pi,
|
|
5144
|
+
secondaryLogoWrapper: zi,
|
|
5145
|
+
designSystemLogo: Ri,
|
|
5146
|
+
slotSmall: Gi,
|
|
5147
|
+
slotLarge: $i
|
|
5148
|
+
}, Aa = ({
|
|
4925
5149
|
"data-color": t = "additional",
|
|
4926
5150
|
redSectionSlot: e,
|
|
4927
5151
|
whiteSectionSlotSmall: n,
|
|
@@ -4932,31 +5156,31 @@ const di = "_footer_6xhfo_1", ci = "_redSection_6xhfo_7", ui = "_redContainer_6x
|
|
|
4932
5156
|
secondaryLogo: c = !1,
|
|
4933
5157
|
secondaryLogoSrc: d,
|
|
4934
5158
|
secondaryLogoSrcDark: u,
|
|
4935
|
-
secondaryLogoAlt:
|
|
4936
|
-
shortcutsLinksLeft:
|
|
4937
|
-
shortcutsLinksRight:
|
|
5159
|
+
secondaryLogoAlt: v = "Designsystem Logo",
|
|
5160
|
+
shortcutsLinksLeft: m,
|
|
5161
|
+
shortcutsLinksRight: f
|
|
4938
5162
|
} = {}) => {
|
|
4939
|
-
const
|
|
5163
|
+
const x = (/* @__PURE__ */ new Date()).getFullYear(), { t: a } = Ee();
|
|
4940
5164
|
Pe.useEffect(() => {
|
|
4941
|
-
const
|
|
4942
|
-
if (typeof document > "u" || document.getElementById(
|
|
4943
|
-
const
|
|
4944
|
-
|
|
5165
|
+
const D = "rk-footer-inline-styles";
|
|
5166
|
+
if (typeof document > "u" || document.getElementById(D)) return;
|
|
5167
|
+
const w = Wi(F), C = document.createElement("style");
|
|
5168
|
+
C.id = D, C.textContent = w, document.head.appendChild(C);
|
|
4945
5169
|
}, []);
|
|
4946
|
-
const [
|
|
5170
|
+
const [h, k] = Pe.useState("light");
|
|
4947
5171
|
Pe.useEffect(() => {
|
|
4948
5172
|
if (typeof document > "u") return;
|
|
4949
|
-
const
|
|
4950
|
-
k(
|
|
4951
|
-
const
|
|
4952
|
-
const N =
|
|
5173
|
+
const D = document.documentElement, w = D.getAttribute("data-color-scheme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
5174
|
+
k(w);
|
|
5175
|
+
const C = window.matchMedia("(prefers-color-scheme: dark)"), A = () => {
|
|
5176
|
+
const N = D.getAttribute("data-color-scheme") || (C.matches ? "dark" : "light");
|
|
4953
5177
|
k(N);
|
|
4954
|
-
}, j = new MutationObserver(
|
|
4955
|
-
return j.observe(
|
|
4956
|
-
j.disconnect(),
|
|
5178
|
+
}, j = new MutationObserver(A);
|
|
5179
|
+
return j.observe(D, { attributes: !0, attributeFilter: ["data-color-scheme"] }), C.addEventListener("change", A), () => {
|
|
5180
|
+
j.disconnect(), C.removeEventListener("change", A);
|
|
4957
5181
|
};
|
|
4958
5182
|
}, []);
|
|
4959
|
-
const
|
|
5183
|
+
const p = () => /* @__PURE__ */ _(
|
|
4960
5184
|
"svg",
|
|
4961
5185
|
{
|
|
4962
5186
|
width: "170",
|
|
@@ -4966,7 +5190,7 @@ const di = "_footer_6xhfo_1", ci = "_redSection_6xhfo_7", ui = "_redContainer_6x
|
|
|
4966
5190
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4967
5191
|
"aria-hidden": !0,
|
|
4968
5192
|
focusable: "false",
|
|
4969
|
-
className:
|
|
5193
|
+
className: F.redCrossLogo,
|
|
4970
5194
|
children: [
|
|
4971
5195
|
/* @__PURE__ */ r("path", { d: "M76.1036 48.1397C77.8925 47.8781 79.6984 47.7525 81.5061 47.7639C84.1713 47.7639 86.0396 48.1669 87.3182 49.1857C87.8735 49.639 88.3149 50.2176 88.6067 50.8744C88.8984 51.5312 89.0323 52.2479 88.9974 52.9665C88.9839 53.9451 88.6724 54.896 88.1049 55.691C87.5373 56.4861 86.7411 57.087 85.8235 57.4129V57.4944C87.0796 58.006 87.7684 59.2104 88.2231 60.8722C88.7813 62.9097 89.3441 65.2688 89.6907 65.9661H85.5309C85.2382 65.4544 84.7835 63.9829 84.2793 61.7597C83.7751 59.5365 83.0097 58.8527 81.344 58.8527H80.1284V65.9661H76.1036V48.1397ZM80.1284 55.9141H81.7312C83.7526 55.9141 84.9546 54.8954 84.9546 53.3151C84.9546 51.6534 83.8336 50.8202 81.9698 50.7931C81.3532 50.7814 80.7368 50.8268 80.1284 50.9289V55.9141Z", fill: "#1E1E1E" }),
|
|
4972
5196
|
/* @__PURE__ */ r("path", { d: "M97.8528 52.5633C98.9439 52.5351 100.026 52.7744 101.004 53.2606L102.256 51.4087L103.669 52.4003L102.467 54.2115C103.188 54.8589 103.758 55.6585 104.137 56.5531C104.515 57.4478 104.692 58.4154 104.655 59.3869C104.655 64.0506 101.243 66.2738 97.8573 66.2738C96.7852 66.2984 95.7234 66.059 94.7644 65.5765L93.4543 67.4556L92.1037 66.387L93.2787 64.6438C91.8651 63.4892 91.0277 61.7233 91.0277 59.414C91.0277 55.2891 93.7965 52.5543 97.8213 52.5543L97.8528 52.5633ZM99.2934 55.9411C98.8798 55.6237 98.3731 55.4533 97.8528 55.4566C95.7458 55.4566 94.949 57.5757 94.949 59.4005C94.9265 60.126 95.0909 60.845 95.4262 61.4878L95.4802 61.515L99.2934 55.9411ZM96.4932 62.8552C96.8653 63.1843 97.3486 63.3576 97.8438 63.3397C99.6446 63.3397 100.748 61.7821 100.748 59.4774C100.76 58.7777 100.625 58.0833 100.351 57.4399L100.27 57.4127L96.4932 62.8552Z", fill: "#1E1E1E" }),
|
|
@@ -4980,86 +5204,86 @@ const di = "_footer_6xhfo_1", ci = "_redSection_6xhfo_7", ui = "_redContainer_6x
|
|
|
4980
5204
|
/* @__PURE__ */ r("path", { d: "M63.2545 52.9331H24.0869V66.0625H63.2545V52.9331Z", fill: "#D52B1E" })
|
|
4981
5205
|
]
|
|
4982
5206
|
}
|
|
4983
|
-
),
|
|
5207
|
+
), y = [
|
|
4984
5208
|
{ label: a("footer.shortcutsLinks.services"), href: "#" },
|
|
4985
5209
|
{ label: a("footer.shortcutsLinks.volunteer"), href: "#" },
|
|
4986
5210
|
{ label: a("footer.shortcutsLinks.ourWork"), href: "#" },
|
|
4987
5211
|
{ label: a("footer.shortcutsLinks.about"), href: "#" },
|
|
4988
5212
|
{ label: a("footer.shortcutsLinks.support"), href: "#" },
|
|
4989
5213
|
{ label: a("footer.shortcutsLinks.contact"), href: "#" }
|
|
4990
|
-
], g =
|
|
4991
|
-
return /* @__PURE__ */
|
|
4992
|
-
/* @__PURE__ */ r("div", { className:
|
|
4993
|
-
/* @__PURE__ */
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
/* @__PURE__ */ r("h3", { className:
|
|
4996
|
-
/* @__PURE__ */ r("ul", { className:
|
|
5214
|
+
], g = m || y, M = f || y;
|
|
5215
|
+
return /* @__PURE__ */ _("footer", { className: F.footer, "data-color": t, children: [
|
|
5216
|
+
/* @__PURE__ */ r("div", { className: F.redSection, children: /* @__PURE__ */ _("div", { className: F.redContainer, children: [
|
|
5217
|
+
/* @__PURE__ */ _("div", { className: F.shortcutsSection, children: [
|
|
5218
|
+
/* @__PURE__ */ _("nav", { className: F.shortcutsColumn, "aria-label": a("footer.shortcuts"), children: [
|
|
5219
|
+
/* @__PURE__ */ r("h3", { className: F.shortcutsTitle, children: a("footer.shortcuts") }),
|
|
5220
|
+
/* @__PURE__ */ r("ul", { className: F.shortcutsList, children: g.map((D, w) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(ue, { href: D.href, className: F.shortcutLink, children: D.label }) }, w)) })
|
|
4997
5221
|
] }),
|
|
4998
|
-
/* @__PURE__ */
|
|
4999
|
-
/* @__PURE__ */ r("h3", { className:
|
|
5000
|
-
/* @__PURE__ */ r("ul", { className:
|
|
5222
|
+
/* @__PURE__ */ _("nav", { className: F.shortcutsColumn, "aria-label": a("footer.shortcuts"), children: [
|
|
5223
|
+
/* @__PURE__ */ r("h3", { className: F.shortcutsTitle, children: a("footer.shortcuts") }),
|
|
5224
|
+
/* @__PURE__ */ r("ul", { className: F.shortcutsList, children: M.map((D, w) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(ue, { href: D.href, className: F.shortcutLink, children: D.label }) }, w)) })
|
|
5001
5225
|
] }),
|
|
5002
|
-
e && /* @__PURE__ */ r("div", { className:
|
|
5226
|
+
e && /* @__PURE__ */ r("div", { className: F.slotComponent, children: e })
|
|
5003
5227
|
] }),
|
|
5004
|
-
/* @__PURE__ */ r("div", { className:
|
|
5005
|
-
/* @__PURE__ */
|
|
5006
|
-
/* @__PURE__ */
|
|
5007
|
-
/* @__PURE__ */ r("h4", { className:
|
|
5008
|
-
/* @__PURE__ */
|
|
5228
|
+
/* @__PURE__ */ r("div", { className: F.divider }),
|
|
5229
|
+
/* @__PURE__ */ _("div", { className: F.contactSection, children: [
|
|
5230
|
+
/* @__PURE__ */ _("div", { className: F.contactColumn, children: [
|
|
5231
|
+
/* @__PURE__ */ r("h4", { className: F.contactTitle, children: a("footer.contact.visitingAddress") }),
|
|
5232
|
+
/* @__PURE__ */ _("div", { className: F.contactContent, children: [
|
|
5009
5233
|
/* @__PURE__ */ r("p", { children: "Hausmannsgate 7 (Korsegården)" }),
|
|
5010
5234
|
/* @__PURE__ */ r("p", { children: "0186 Oslo" })
|
|
5011
5235
|
] })
|
|
5012
5236
|
] }),
|
|
5013
|
-
/* @__PURE__ */
|
|
5014
|
-
/* @__PURE__ */ r("h4", { className:
|
|
5015
|
-
/* @__PURE__ */ r("p", { className:
|
|
5237
|
+
/* @__PURE__ */ _("div", { className: F.contactColumn, children: [
|
|
5238
|
+
/* @__PURE__ */ r("h4", { className: F.contactTitle, children: a("footer.contact.organizationNumber") }),
|
|
5239
|
+
/* @__PURE__ */ r("p", { className: F.contactContent, children: "XXX XXX XXX" })
|
|
5016
5240
|
] }),
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
/* @__PURE__ */ r("h4", { className:
|
|
5019
|
-
/* @__PURE__ */ r("p", { className:
|
|
5241
|
+
/* @__PURE__ */ _("div", { className: F.contactColumn, children: [
|
|
5242
|
+
/* @__PURE__ */ r("h4", { className: F.contactTitle, children: a("footer.contact.email") }),
|
|
5243
|
+
/* @__PURE__ */ r("p", { className: F.contactContent, children: "post@redcross.no" })
|
|
5020
5244
|
] })
|
|
5021
5245
|
] }),
|
|
5022
|
-
/* @__PURE__ */ r("div", { className:
|
|
5023
|
-
/* @__PURE__ */
|
|
5024
|
-
/* @__PURE__ */
|
|
5246
|
+
/* @__PURE__ */ r("div", { className: F.divider }),
|
|
5247
|
+
/* @__PURE__ */ _("div", { className: F.legalSection, children: [
|
|
5248
|
+
/* @__PURE__ */ _("p", { className: F.copyrightText, children: [
|
|
5025
5249
|
"© ",
|
|
5026
|
-
|
|
5250
|
+
x,
|
|
5027
5251
|
" ",
|
|
5028
5252
|
a("footer.copyright")
|
|
5029
5253
|
] }),
|
|
5030
|
-
/* @__PURE__ */
|
|
5031
|
-
/* @__PURE__ */ r(ue, { href: "#", className:
|
|
5032
|
-
/* @__PURE__ */ r(ue, { href: "#", className:
|
|
5033
|
-
/* @__PURE__ */ r(ue, { href: "#", className:
|
|
5034
|
-
/* @__PURE__ */ r(ue, { href: "#", className:
|
|
5254
|
+
/* @__PURE__ */ _("div", { className: F.legalLinks, children: [
|
|
5255
|
+
/* @__PURE__ */ r(ue, { href: "#", className: F.legalLink, children: a("footer.legal.privacy") }),
|
|
5256
|
+
/* @__PURE__ */ r(ue, { href: "#", className: F.legalLink, children: a("footer.legal.press") }),
|
|
5257
|
+
/* @__PURE__ */ r(ue, { href: "#", className: F.legalLink, children: a("footer.legal.procurement") }),
|
|
5258
|
+
/* @__PURE__ */ r(ue, { href: "#", className: F.legalLink, children: a("footer.legal.whistleblowing") })
|
|
5035
5259
|
] })
|
|
5036
5260
|
] })
|
|
5037
5261
|
] }) }),
|
|
5038
|
-
/* @__PURE__ */ r("div", { className:
|
|
5262
|
+
/* @__PURE__ */ r("div", { className: F.whiteSection, children: /* @__PURE__ */ r("div", { className: F.whiteContainer, children: /* @__PURE__ */ _("div", { className: F.whiteContent, children: [
|
|
5039
5263
|
l && (i ? /* @__PURE__ */ r(
|
|
5040
5264
|
"img",
|
|
5041
5265
|
{
|
|
5042
5266
|
src: i,
|
|
5043
5267
|
alt: o,
|
|
5044
|
-
className:
|
|
5268
|
+
className: F.logo,
|
|
5045
5269
|
loading: "lazy"
|
|
5046
5270
|
}
|
|
5047
|
-
) : /* @__PURE__ */ r("div", { className:
|
|
5048
|
-
c && d && /* @__PURE__ */ r("div", { className:
|
|
5271
|
+
) : /* @__PURE__ */ r("div", { className: F.logo, children: /* @__PURE__ */ r(p, {}) })),
|
|
5272
|
+
c && d && /* @__PURE__ */ r("div", { className: F.secondaryLogoWrapper, children: /* @__PURE__ */ r(
|
|
5049
5273
|
"img",
|
|
5050
5274
|
{
|
|
5051
|
-
src:
|
|
5052
|
-
alt:
|
|
5053
|
-
className:
|
|
5275
|
+
src: h === "dark" && u ? u : d,
|
|
5276
|
+
alt: v,
|
|
5277
|
+
className: F.designSystemLogo,
|
|
5054
5278
|
loading: "lazy"
|
|
5055
5279
|
}
|
|
5056
5280
|
) }),
|
|
5057
|
-
n && /* @__PURE__ */ r("div", { className:
|
|
5058
|
-
s && /* @__PURE__ */ r("div", { className:
|
|
5281
|
+
n && /* @__PURE__ */ r("div", { className: F.slotSmall, children: n }),
|
|
5282
|
+
s && /* @__PURE__ */ r("div", { className: F.slotLarge, children: s })
|
|
5059
5283
|
] }) }) })
|
|
5060
5284
|
] });
|
|
5061
5285
|
};
|
|
5062
|
-
function
|
|
5286
|
+
function Wi(t) {
|
|
5063
5287
|
const e = t;
|
|
5064
5288
|
return `
|
|
5065
5289
|
.${e.footer} {
|
|
@@ -5322,61 +5546,64 @@ function Bi(t) {
|
|
|
5322
5546
|
`;
|
|
5323
5547
|
}
|
|
5324
5548
|
export {
|
|
5325
|
-
|
|
5549
|
+
oo as Alert,
|
|
5326
5550
|
Mt as Avatar,
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5551
|
+
ro as Badge,
|
|
5552
|
+
Yi as BadgePosition,
|
|
5553
|
+
qi as Breadcrumbs,
|
|
5554
|
+
Xi as BreadcrumbsItem,
|
|
5555
|
+
Ji as BreadcrumbsLink,
|
|
5556
|
+
Zi as BreadcrumbsList,
|
|
5557
|
+
Se as Button,
|
|
5558
|
+
so as Card,
|
|
5559
|
+
Qi as CardBlock,
|
|
5560
|
+
ss as Carousel,
|
|
5561
|
+
io as Checkbox,
|
|
5562
|
+
ta as Chip,
|
|
5563
|
+
lr as DateInput,
|
|
5564
|
+
Qo as DatePicker,
|
|
5565
|
+
ra as Details,
|
|
5566
|
+
sa as Dialog,
|
|
5567
|
+
ia as Divider,
|
|
5568
|
+
J as Dropdown,
|
|
5569
|
+
aa as ErrorSummary,
|
|
5570
|
+
la as Field,
|
|
5571
|
+
as as FieldCounter,
|
|
5572
|
+
is as FieldDescription,
|
|
5573
|
+
da as Fieldset,
|
|
5574
|
+
Aa as Footer,
|
|
5575
|
+
_a as Header,
|
|
5576
|
+
ls as Heading,
|
|
5577
|
+
ds as Input,
|
|
5578
|
+
cs as Label,
|
|
5579
|
+
na as LanguageProvider,
|
|
5356
5580
|
ue as Link,
|
|
5357
|
-
|
|
5358
|
-
|
|
5581
|
+
ca as List,
|
|
5582
|
+
us as Pagination,
|
|
5583
|
+
ma as PaginationButton,
|
|
5584
|
+
pa as PaginationItem,
|
|
5585
|
+
ua as PaginationList,
|
|
5359
5586
|
Je as Paragraph,
|
|
5360
|
-
|
|
5361
|
-
|
|
5587
|
+
fa as Popover,
|
|
5588
|
+
ha as Radio,
|
|
5362
5589
|
Be as Search,
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5590
|
+
va as Select,
|
|
5591
|
+
ya as SkeletonLoader,
|
|
5592
|
+
ba as SkipLink,
|
|
5593
|
+
rs as Spinner,
|
|
5594
|
+
ps as Suggestion,
|
|
5368
5595
|
Ke as Switch,
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5596
|
+
xa as Table,
|
|
5597
|
+
Ta as Tabs,
|
|
5598
|
+
Sa as Tag,
|
|
5599
|
+
Ca as Textarea,
|
|
5600
|
+
wa as Textfield,
|
|
5601
|
+
Ia as ToggleGroup,
|
|
5602
|
+
Da as Tooltip,
|
|
5603
|
+
ms as ValidationMessage,
|
|
5604
|
+
ea as useCheckboxGroup,
|
|
5605
|
+
oa as useLanguage,
|
|
5379
5606
|
Ee as useLanguageOptional,
|
|
5380
|
-
|
|
5381
|
-
|
|
5607
|
+
ga as usePagination,
|
|
5608
|
+
ka as useRadioGroup
|
|
5382
5609
|
};
|