rk-designsystem 1.1.49 → 1.1.50
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 +823 -707
- package/dist/componentlibrary.umd.js +109 -4
- package/package.json +6 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import jt, { forwardRef as ue, useState as re, useEffect as
|
|
2
|
-
import { Alert as Yt, Avatar as Jt,
|
|
3
|
-
import { startOfMonth as
|
|
1
|
+
import jt, { forwardRef as ue, useState as re, useEffect as se, useMemo as ve, useCallback as oe, useRef as qe, createContext as Ut, useContext as Kt } from "react";
|
|
2
|
+
import { Alert as Yt, Avatar as Jt, BadgePosition as Zt, Badge as Xt, Breadcrumbs as Qt, BreadcrumbsList as en, BreadcrumbsItem as tn, BreadcrumbsLink as nn, Button as Ue, Card as on, CardBlock as rn, Checkbox as sn, useCheckboxGroup as an, Fieldset as Dt, Chip as ln, Spinner as dn, Details as cn, Dialog as un, Divider as mn, Dropdown as gn, ErrorSummary as pn, Field as fn, FieldDescription as hn, FieldCounter as kn, Heading as bn, Input as vn, Label as yn, Link as xn, List as Tn, Pagination as Sn, usePagination as wn, Paragraph as Cn, Popover as jn, Radio as Dn, useRadioGroup as In, Search as An, SearchInput as Ln, SearchClear as Fn, SearchButton as _n, Select as En, Skeleton as Nn, SkipLink as Bn, EXPERIMENTAL_Suggestion as Pn, Switch as Rn, Table as Mn, Tabs as zn, Tag as On, Textarea as Hn, Textfield as $n, ToggleGroup as Wn, Tooltip as Vn, ValidationMessage as Gn } from "@digdir/designsystemet-react";
|
|
3
|
+
import { startOfMonth as ke, isValid as We, isSameMonth as ut, startOfWeek as It, format as Te, addDays as At, subMonths as qn, addMonths as Un, isSameDay as Kn, isToday as Yn, eachDayOfInterval as Jn } from "date-fns";
|
|
4
4
|
import { ChevronLeftIcon as Zn, ChevronRightIcon as Xn, ChevronDownIcon as Qn, XMarkIcon as mt, MagnifyingGlassIcon as gt, MenuHamburgerIcon as eo, HeartIcon as to } from "@navikt/aksel-icons";
|
|
5
|
-
var
|
|
5
|
+
var Ne = { exports: {} }, Se = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -50,7 +50,7 @@ function oo() {
|
|
|
50
50
|
function e(c) {
|
|
51
51
|
if (c == null) return null;
|
|
52
52
|
if (typeof c == "function")
|
|
53
|
-
return c.$$typeof ===
|
|
53
|
+
return c.$$typeof === B ? null : c.displayName || c.name || null;
|
|
54
54
|
if (typeof c == "string") return c;
|
|
55
55
|
switch (c) {
|
|
56
56
|
case v:
|
|
@@ -63,7 +63,7 @@ function oo() {
|
|
|
63
63
|
return "Suspense";
|
|
64
64
|
case w:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case z:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
69
|
if (typeof c == "object")
|
|
@@ -72,16 +72,16 @@ function oo() {
|
|
|
72
72
|
), c.$$typeof) {
|
|
73
73
|
case b:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
75
|
+
case F:
|
|
76
76
|
return c.displayName || "Context";
|
|
77
|
-
case
|
|
77
|
+
case x:
|
|
78
78
|
return (c._context.displayName || "Context") + ".Consumer";
|
|
79
79
|
case _:
|
|
80
80
|
var I = c.render;
|
|
81
81
|
return c = c.displayName, c || (c = I.displayName || I.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
82
82
|
case D:
|
|
83
83
|
return I = c.displayName || null, I !== null ? I : e(c.type) || "Memo";
|
|
84
|
-
case
|
|
84
|
+
case L:
|
|
85
85
|
I = c._payload, c = c._init;
|
|
86
86
|
try {
|
|
87
87
|
return e(c(I));
|
|
@@ -102,17 +102,17 @@ function oo() {
|
|
|
102
102
|
}
|
|
103
103
|
if (I) {
|
|
104
104
|
I = console;
|
|
105
|
-
var S = I.error,
|
|
105
|
+
var S = I.error, E = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
|
|
106
106
|
return S.call(
|
|
107
107
|
I,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
|
|
109
|
+
E
|
|
110
110
|
), t(c);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
function r(c) {
|
|
114
114
|
if (c === v) return "<>";
|
|
115
|
-
if (typeof c == "object" && c !== null && c.$$typeof ===
|
|
115
|
+
if (typeof c == "object" && c !== null && c.$$typeof === L)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
118
|
var I = e(c);
|
|
@@ -122,14 +122,14 @@ function oo() {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function a() {
|
|
125
|
-
var c =
|
|
125
|
+
var c = O.A;
|
|
126
126
|
return c === null ? null : c.getOwner();
|
|
127
127
|
}
|
|
128
128
|
function s() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
131
|
function o(c) {
|
|
132
|
-
if (
|
|
132
|
+
if (P.call(c, "key")) {
|
|
133
133
|
var I = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
134
134
|
if (I && I.isReactWarning) return !1;
|
|
135
135
|
}
|
|
@@ -149,19 +149,19 @@ function oo() {
|
|
|
149
149
|
}
|
|
150
150
|
function l() {
|
|
151
151
|
var c = e(this.type);
|
|
152
|
-
return
|
|
152
|
+
return K[c] || (K[c] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), c = this.props.ref, c !== void 0 ? c : null;
|
|
155
155
|
}
|
|
156
|
-
function u(c, I, S,
|
|
157
|
-
var
|
|
156
|
+
function u(c, I, S, E, q, G) {
|
|
157
|
+
var N = S.ref;
|
|
158
158
|
return c = {
|
|
159
|
-
$$typeof:
|
|
159
|
+
$$typeof: h,
|
|
160
160
|
type: c,
|
|
161
161
|
key: I,
|
|
162
162
|
props: S,
|
|
163
|
-
_owner:
|
|
164
|
-
}, (
|
|
163
|
+
_owner: E
|
|
164
|
+
}, (N !== void 0 ? N : null) !== null ? Object.defineProperty(c, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
get: l
|
|
167
167
|
}) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
@@ -178,69 +178,69 @@ function oo() {
|
|
|
178
178
|
configurable: !1,
|
|
179
179
|
enumerable: !1,
|
|
180
180
|
writable: !0,
|
|
181
|
-
value:
|
|
181
|
+
value: q
|
|
182
182
|
}), Object.defineProperty(c, "_debugTask", {
|
|
183
183
|
configurable: !1,
|
|
184
184
|
enumerable: !1,
|
|
185
185
|
writable: !0,
|
|
186
|
-
value:
|
|
186
|
+
value: G
|
|
187
187
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
188
188
|
}
|
|
189
|
-
function y(c, I, S,
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
for (
|
|
195
|
-
f(E
|
|
196
|
-
Object.freeze && Object.freeze(
|
|
189
|
+
function y(c, I, S, E, q, G) {
|
|
190
|
+
var N = I.children;
|
|
191
|
+
if (N !== void 0)
|
|
192
|
+
if (E)
|
|
193
|
+
if (R(N)) {
|
|
194
|
+
for (E = 0; E < N.length; E++)
|
|
195
|
+
f(N[E]);
|
|
196
|
+
Object.freeze && Object.freeze(N);
|
|
197
197
|
} else
|
|
198
198
|
console.error(
|
|
199
199
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
200
|
);
|
|
201
|
-
else f(
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
var
|
|
201
|
+
else f(N);
|
|
202
|
+
if (P.call(I, "key")) {
|
|
203
|
+
N = e(c);
|
|
204
|
+
var H = Object.keys(I).filter(function(Z) {
|
|
205
205
|
return Z !== "key";
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
E = 0 < H.length ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}", te[N + E] || (H = 0 < H.length ? "{" + H.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s {...props} />
|
|
211
211
|
React keys must be passed directly to JSX without using spread:
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s key={someKey} {...props} />`,
|
|
214
|
-
N,
|
|
215
214
|
E,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
N,
|
|
216
|
+
H,
|
|
217
|
+
N
|
|
218
|
+
), te[N + E] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
220
|
+
if (N = null, S !== void 0 && (n(S), N = "" + S), o(I) && (n(I.key), N = "" + I.key), "key" in I) {
|
|
221
221
|
S = {};
|
|
222
222
|
for (var ee in I)
|
|
223
223
|
ee !== "key" && (S[ee] = I[ee]);
|
|
224
224
|
} else S = I;
|
|
225
|
-
return
|
|
225
|
+
return N && d(
|
|
226
226
|
S,
|
|
227
227
|
typeof c == "function" ? c.displayName || c.name || "Unknown" : c
|
|
228
228
|
), u(
|
|
229
229
|
c,
|
|
230
|
-
|
|
230
|
+
N,
|
|
231
231
|
S,
|
|
232
232
|
a(),
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
q,
|
|
234
|
+
G
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
function f(c) {
|
|
238
|
-
|
|
238
|
+
k(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === L && (c._payload.status === "fulfilled" ? k(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return typeof c == "object" && c !== null && c.$$typeof ===
|
|
240
|
+
function k(c) {
|
|
241
|
+
return typeof c == "object" && c !== null && c.$$typeof === h;
|
|
242
242
|
}
|
|
243
|
-
var g = jt,
|
|
243
|
+
var g = jt, h = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), F = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), z = Symbol.for("react.activity"), B = Symbol.for("react.client.reference"), O = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, R = Array.isArray, j = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
g = {
|
|
@@ -248,53 +248,53 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return c();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var Q,
|
|
251
|
+
var Q, K = {}, Y = g.react_stack_bottom_frame.bind(
|
|
252
252
|
g,
|
|
253
253
|
s
|
|
254
|
-
)(),
|
|
254
|
+
)(), J = j(r(s)), te = {};
|
|
255
255
|
we.Fragment = v, we.jsx = function(c, I, S) {
|
|
256
|
-
var
|
|
256
|
+
var E = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return y(
|
|
258
258
|
c,
|
|
259
259
|
I,
|
|
260
260
|
S,
|
|
261
261
|
!1,
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
E ? Error("react-stack-top-frame") : Y,
|
|
263
|
+
E ? j(r(c)) : J
|
|
264
264
|
);
|
|
265
265
|
}, we.jsxs = function(c, I, S) {
|
|
266
|
-
var
|
|
266
|
+
var E = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return y(
|
|
268
268
|
c,
|
|
269
269
|
I,
|
|
270
270
|
S,
|
|
271
271
|
!0,
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
E ? Error("react-stack-top-frame") : Y,
|
|
273
|
+
E ? j(r(c)) : J
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
276
|
})()), we;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
278
|
+
var ht;
|
|
279
279
|
function ro() {
|
|
280
|
-
return
|
|
280
|
+
return ht || (ht = 1, process.env.NODE_ENV === "production" ? Ne.exports = no() : Ne.exports = oo()), Ne.exports;
|
|
281
281
|
}
|
|
282
282
|
var i = ro();
|
|
283
283
|
const so = ue((e, t) => /* @__PURE__ */ i.jsx(Yt, { ref: t, ...e }));
|
|
284
284
|
so.displayName = "Alert";
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
const ao = ue((e, t) => /* @__PURE__ */ i.jsx(
|
|
285
|
+
const Lt = ue((e, t) => /* @__PURE__ */ i.jsx(Jt, { ref: t, ...e }));
|
|
286
|
+
Lt.displayName = "Avatar";
|
|
287
|
+
const ao = ue((e, t) => /* @__PURE__ */ i.jsx(Xt, { ref: t, ...e }));
|
|
288
288
|
ao.displayName = "Badge";
|
|
289
|
-
const
|
|
289
|
+
const ga = Zt, pa = Qt, fa = en, ha = tn, ka = nn, ye = Ue;
|
|
290
290
|
ye.displayName = "Button";
|
|
291
|
-
const io = on,
|
|
291
|
+
const io = on, ba = rn;
|
|
292
292
|
io.displayName = "Card";
|
|
293
|
-
const lo = sn, co = Dt,
|
|
293
|
+
const lo = sn, co = Dt, va = an;
|
|
294
294
|
lo.displayName = "Checkbox";
|
|
295
295
|
co.displayName = "Fieldset";
|
|
296
|
-
const
|
|
297
|
-
function
|
|
296
|
+
const ya = ln;
|
|
297
|
+
function Ve(e) {
|
|
298
298
|
return (t = {}) => {
|
|
299
299
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
300
300
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
@@ -421,12 +421,12 @@ const po = {
|
|
|
421
421
|
let r;
|
|
422
422
|
const a = po[e];
|
|
423
423
|
return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", String(t)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "om " + r : r + " siden" : r;
|
|
424
|
-
},
|
|
424
|
+
}, ho = {
|
|
425
425
|
full: "EEEE d. MMMM y",
|
|
426
426
|
long: "d. MMMM y",
|
|
427
427
|
medium: "d. MMM y",
|
|
428
428
|
short: "dd.MM.y"
|
|
429
|
-
},
|
|
429
|
+
}, ko = {
|
|
430
430
|
full: "'kl'. HH:mm:ss zzzz",
|
|
431
431
|
long: "HH:mm:ss z",
|
|
432
432
|
medium: "HH:mm:ss",
|
|
@@ -437,15 +437,15 @@ const po = {
|
|
|
437
437
|
medium: "{{date}} {{time}}",
|
|
438
438
|
short: "{{date}} {{time}}"
|
|
439
439
|
}, vo = {
|
|
440
|
-
date:
|
|
441
|
-
formats:
|
|
440
|
+
date: Ve({
|
|
441
|
+
formats: ho,
|
|
442
442
|
defaultWidth: "full"
|
|
443
443
|
}),
|
|
444
|
-
time:
|
|
445
|
-
formats:
|
|
444
|
+
time: Ve({
|
|
445
|
+
formats: ko,
|
|
446
446
|
defaultWidth: "full"
|
|
447
447
|
}),
|
|
448
|
-
dateTime:
|
|
448
|
+
dateTime: Ve({
|
|
449
449
|
formats: bo,
|
|
450
450
|
defaultWidth: "full"
|
|
451
451
|
})
|
|
@@ -456,7 +456,7 @@ const po = {
|
|
|
456
456
|
tomorrow: "'i morgen kl.' p",
|
|
457
457
|
nextWeek: "EEEE 'kl.' p",
|
|
458
458
|
other: "P"
|
|
459
|
-
},
|
|
459
|
+
}, xo = (e, t, n, r) => yo[e], To = {
|
|
460
460
|
narrow: ["f.Kr.", "e.Kr."],
|
|
461
461
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
462
462
|
wide: ["før Kristus", "etter Kristus"]
|
|
@@ -541,7 +541,7 @@ const po = {
|
|
|
541
541
|
}, Do = (e, t) => Number(e) + ".", Io = {
|
|
542
542
|
ordinalNumber: Do,
|
|
543
543
|
era: Ce({
|
|
544
|
-
values:
|
|
544
|
+
values: To,
|
|
545
545
|
defaultWidth: "wide"
|
|
546
546
|
}),
|
|
547
547
|
quarter: Ce({
|
|
@@ -561,23 +561,23 @@ const po = {
|
|
|
561
561
|
values: jo,
|
|
562
562
|
defaultWidth: "wide"
|
|
563
563
|
})
|
|
564
|
-
}, Ao = /^(\d+)\.?/i,
|
|
564
|
+
}, Ao = /^(\d+)\.?/i, Lo = /\d+/i, Fo = {
|
|
565
565
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
566
566
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
567
567
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
568
568
|
}, _o = {
|
|
569
569
|
any: [/^f/i, /^e/i]
|
|
570
|
-
},
|
|
570
|
+
}, Eo = {
|
|
571
571
|
narrow: /^[1234]/i,
|
|
572
572
|
abbreviated: /^q[1234]/i,
|
|
573
573
|
wide: /^[1234](\.)? kvartal/i
|
|
574
|
-
},
|
|
574
|
+
}, No = {
|
|
575
575
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
576
|
-
},
|
|
576
|
+
}, Bo = {
|
|
577
577
|
narrow: /^[jfmasond]/i,
|
|
578
578
|
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
|
|
579
579
|
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
|
|
580
|
-
},
|
|
580
|
+
}, Po = {
|
|
581
581
|
narrow: [
|
|
582
582
|
/^j/i,
|
|
583
583
|
/^f/i,
|
|
@@ -606,17 +606,17 @@ const po = {
|
|
|
606
606
|
/^n/i,
|
|
607
607
|
/^d/i
|
|
608
608
|
]
|
|
609
|
-
},
|
|
609
|
+
}, Ro = {
|
|
610
610
|
narrow: /^[smtofl]/i,
|
|
611
611
|
short: /^(sø|ma|ti|on|to|fr|lø)/i,
|
|
612
612
|
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
|
|
613
613
|
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
|
|
614
|
-
},
|
|
614
|
+
}, Mo = {
|
|
615
615
|
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
616
|
-
},
|
|
616
|
+
}, zo = {
|
|
617
617
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
618
618
|
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
|
|
619
|
-
},
|
|
619
|
+
}, Oo = {
|
|
620
620
|
any: {
|
|
621
621
|
am: /^a(\.?\s?m\.?)?$/i,
|
|
622
622
|
pm: /^p(\.?\s?m\.?)?$/i,
|
|
@@ -627,55 +627,55 @@ const po = {
|
|
|
627
627
|
evening: /kveld/i,
|
|
628
628
|
night: /natt/i
|
|
629
629
|
}
|
|
630
|
-
},
|
|
630
|
+
}, Ho = {
|
|
631
631
|
ordinalNumber: go({
|
|
632
632
|
matchPattern: Ao,
|
|
633
|
-
parsePattern:
|
|
633
|
+
parsePattern: Lo,
|
|
634
634
|
valueCallback: (e) => parseInt(e, 10)
|
|
635
635
|
}),
|
|
636
636
|
era: je({
|
|
637
|
-
matchPatterns:
|
|
637
|
+
matchPatterns: Fo,
|
|
638
638
|
defaultMatchWidth: "wide",
|
|
639
639
|
parsePatterns: _o,
|
|
640
640
|
defaultParseWidth: "any"
|
|
641
641
|
}),
|
|
642
642
|
quarter: je({
|
|
643
|
-
matchPatterns:
|
|
643
|
+
matchPatterns: Eo,
|
|
644
644
|
defaultMatchWidth: "wide",
|
|
645
|
-
parsePatterns:
|
|
645
|
+
parsePatterns: No,
|
|
646
646
|
defaultParseWidth: "any",
|
|
647
647
|
valueCallback: (e) => e + 1
|
|
648
648
|
}),
|
|
649
649
|
month: je({
|
|
650
|
-
matchPatterns:
|
|
650
|
+
matchPatterns: Bo,
|
|
651
651
|
defaultMatchWidth: "wide",
|
|
652
|
-
parsePatterns:
|
|
652
|
+
parsePatterns: Po,
|
|
653
653
|
defaultParseWidth: "any"
|
|
654
654
|
}),
|
|
655
655
|
day: je({
|
|
656
|
-
matchPatterns:
|
|
656
|
+
matchPatterns: Ro,
|
|
657
657
|
defaultMatchWidth: "wide",
|
|
658
|
-
parsePatterns:
|
|
658
|
+
parsePatterns: Mo,
|
|
659
659
|
defaultParseWidth: "any"
|
|
660
660
|
}),
|
|
661
661
|
dayPeriod: je({
|
|
662
|
-
matchPatterns:
|
|
662
|
+
matchPatterns: zo,
|
|
663
663
|
defaultMatchWidth: "any",
|
|
664
|
-
parsePatterns:
|
|
664
|
+
parsePatterns: Oo,
|
|
665
665
|
defaultParseWidth: "any"
|
|
666
666
|
})
|
|
667
667
|
}, be = {
|
|
668
668
|
code: "nb",
|
|
669
669
|
formatDistance: fo,
|
|
670
670
|
formatLong: vo,
|
|
671
|
-
formatRelative:
|
|
671
|
+
formatRelative: xo,
|
|
672
672
|
localize: Io,
|
|
673
|
-
match:
|
|
673
|
+
match: Ho,
|
|
674
674
|
options: {
|
|
675
675
|
weekStartsOn: 1,
|
|
676
676
|
firstWeekContainsDate: 4
|
|
677
677
|
}
|
|
678
|
-
},
|
|
678
|
+
}, Ft = ({ title: e, ...t }) => /* @__PURE__ */ i.jsxs(
|
|
679
679
|
"svg",
|
|
680
680
|
{
|
|
681
681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -700,7 +700,7 @@ const po = {
|
|
|
700
700
|
]
|
|
701
701
|
}
|
|
702
702
|
);
|
|
703
|
-
|
|
703
|
+
Ft.displayName = "ChevronLeftIcon";
|
|
704
704
|
const _t = ({ title: e, ...t }) => /* @__PURE__ */ i.jsxs(
|
|
705
705
|
"svg",
|
|
706
706
|
{
|
|
@@ -727,21 +727,21 @@ const _t = ({ title: e, ...t }) => /* @__PURE__ */ i.jsxs(
|
|
|
727
727
|
}
|
|
728
728
|
);
|
|
729
729
|
_t.displayName = "ChevronRightIcon";
|
|
730
|
-
const
|
|
731
|
-
calendarContainer:
|
|
732
|
-
calendarHeader:
|
|
733
|
-
monthYear:
|
|
734
|
-
navigationButtons:
|
|
735
|
-
grid:
|
|
730
|
+
const $o = "_calendarContainer_10l5p_1", Wo = "_calendarHeader_10l5p_14", Vo = "_monthYear_10l5p_21", Go = "_navigationButtons_10l5p_32", qo = "_grid_10l5p_41", Uo = "_dayNameCell_10l5p_48", Ko = "_dateCell_10l5p_65", Yo = "_dateNumberContainer_10l5p_90", Jo = "_otherMonth_10l5p_103", Zo = "_selectedDate_10l5p_129", ne = {
|
|
731
|
+
calendarContainer: $o,
|
|
732
|
+
calendarHeader: Wo,
|
|
733
|
+
monthYear: Vo,
|
|
734
|
+
navigationButtons: Go,
|
|
735
|
+
grid: qo,
|
|
736
736
|
dayNameCell: Uo,
|
|
737
737
|
dateCell: Ko,
|
|
738
738
|
dateNumberContainer: Yo,
|
|
739
739
|
otherMonth: Jo,
|
|
740
740
|
selectedDate: Zo
|
|
741
741
|
}, Xo = (e) => {
|
|
742
|
-
const t =
|
|
742
|
+
const t = ke(e), n = It(t, { locale: be }), r = At(n, 41);
|
|
743
743
|
return Jn({ start: n, end: r });
|
|
744
|
-
},
|
|
744
|
+
}, kt = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Qo = ({
|
|
745
745
|
initialDate: e = /* @__PURE__ */ new Date(),
|
|
746
746
|
selectedDate: t = null,
|
|
747
747
|
// Prop for valgt dato
|
|
@@ -752,38 +752,38 @@ const zo = "_calendarContainer_10l5p_1", Vo = "_calendarHeader_10l5p_14", Go = "
|
|
|
752
752
|
// <-- Destrukturert
|
|
753
753
|
}) => {
|
|
754
754
|
const [s, o] = re(
|
|
755
|
-
|
|
755
|
+
ke(t && We(t) ? t : e)
|
|
756
756
|
);
|
|
757
|
-
|
|
758
|
-
if (t &&
|
|
759
|
-
const m =
|
|
757
|
+
se(() => {
|
|
758
|
+
if (t && We(t)) {
|
|
759
|
+
const m = ke(t);
|
|
760
760
|
ut(m, s) || o(m);
|
|
761
761
|
}
|
|
762
762
|
}, [t]);
|
|
763
|
-
const d = ve(() =>
|
|
763
|
+
const d = ve(() => ke(/* @__PURE__ */ new Date()), []), l = ve(() => !1, [s, d]), u = ve(
|
|
764
764
|
() => Xo(s),
|
|
765
765
|
[s]
|
|
766
766
|
), y = ve(() => {
|
|
767
767
|
const m = It(/* @__PURE__ */ new Date(), { locale: be });
|
|
768
|
-
return Array.from({ length: 7 }).map((
|
|
769
|
-
const _ =
|
|
770
|
-
return
|
|
768
|
+
return Array.from({ length: 7 }).map((x, F) => {
|
|
769
|
+
const _ = Te(At(m, F), "EEEEEE", { locale: be });
|
|
770
|
+
return kt(_);
|
|
771
771
|
});
|
|
772
772
|
}, []), f = oe(() => {
|
|
773
|
-
l || o((m) =>
|
|
774
|
-
}, [l]),
|
|
775
|
-
o((m) =>
|
|
773
|
+
l || o((m) => ke(qn(m, 1)));
|
|
774
|
+
}, [l]), k = oe(() => {
|
|
775
|
+
o((m) => ke(Un(m, 1)));
|
|
776
776
|
}, []), g = oe(
|
|
777
777
|
(m) => {
|
|
778
778
|
n && n(m);
|
|
779
779
|
},
|
|
780
780
|
[n]
|
|
781
|
-
),
|
|
782
|
-
(m,
|
|
783
|
-
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), g(
|
|
781
|
+
), h = oe(
|
|
782
|
+
(m, x) => {
|
|
783
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), g(x));
|
|
784
784
|
},
|
|
785
785
|
[g]
|
|
786
|
-
), b =
|
|
786
|
+
), b = Te(s, "MMMM", { locale: be }), v = Te(s, "yyyy", { locale: be }), p = `${kt(b)} ${v}`;
|
|
787
787
|
return /* @__PURE__ */ i.jsxs(
|
|
788
788
|
"div",
|
|
789
789
|
{
|
|
@@ -802,7 +802,7 @@ const zo = "_calendarContainer_10l5p_1", Vo = "_calendarHeader_10l5p_14", Go = "
|
|
|
802
802
|
onClick: f,
|
|
803
803
|
"aria-label": "Forrige måned",
|
|
804
804
|
disabled: l,
|
|
805
|
-
children: /* @__PURE__ */ i.jsx(
|
|
805
|
+
children: /* @__PURE__ */ i.jsx(Ft, {})
|
|
806
806
|
}
|
|
807
807
|
),
|
|
808
808
|
/* @__PURE__ */ i.jsx(
|
|
@@ -810,7 +810,7 @@ const zo = "_calendarContainer_10l5p_1", Vo = "_calendarHeader_10l5p_14", Go = "
|
|
|
810
810
|
{
|
|
811
811
|
variant: "tertiary",
|
|
812
812
|
icon: !0,
|
|
813
|
-
onClick:
|
|
813
|
+
onClick: k,
|
|
814
814
|
"aria-label": "Neste måned",
|
|
815
815
|
children: /* @__PURE__ */ i.jsx(_t, {})
|
|
816
816
|
}
|
|
@@ -819,24 +819,24 @@ const zo = "_calendarContainer_10l5p_1", Vo = "_calendarHeader_10l5p_14", Go = "
|
|
|
819
819
|
] }),
|
|
820
820
|
/* @__PURE__ */ i.jsx("div", { className: ne.grid, children: y.map((m) => /* @__PURE__ */ i.jsx("div", { className: ne.dayNameCell, children: m }, m)) }),
|
|
821
821
|
/* @__PURE__ */ i.jsx("div", { className: ne.grid, children: u.map((m) => {
|
|
822
|
-
const
|
|
822
|
+
const x = ut(m, s), F = t && We(t) && Kn(m, t), _ = Yn(m), A = [
|
|
823
823
|
ne.dateCell,
|
|
824
|
-
|
|
825
|
-
|
|
824
|
+
x ? "" : ne.otherMonth,
|
|
825
|
+
F ? ne.selectedDate : "",
|
|
826
826
|
// Utheving basert på prop
|
|
827
|
-
_ && !
|
|
827
|
+
_ && !F ? ne.todayDate : ""
|
|
828
828
|
].filter(Boolean).join(" ");
|
|
829
829
|
return /* @__PURE__ */ i.jsx(
|
|
830
830
|
"div",
|
|
831
831
|
{
|
|
832
832
|
className: A,
|
|
833
833
|
onClick: () => g(m),
|
|
834
|
-
onKeyDown: (w) =>
|
|
834
|
+
onKeyDown: (w) => h(w, m),
|
|
835
835
|
role: "button",
|
|
836
836
|
tabIndex: 0,
|
|
837
|
-
"aria-pressed":
|
|
838
|
-
"aria-label":
|
|
839
|
-
children: /* @__PURE__ */ i.jsx("span", { className: ne.dateNumberContainer, children:
|
|
837
|
+
"aria-pressed": F ?? !1,
|
|
838
|
+
"aria-label": Te(m, "PPP", { locale: be }),
|
|
839
|
+
children: /* @__PURE__ */ i.jsx("span", { className: ne.dateNumberContainer, children: Te(m, "d") })
|
|
840
840
|
},
|
|
841
841
|
m.toISOString()
|
|
842
842
|
);
|
|
@@ -884,64 +884,64 @@ const er = "_fieldset_16fx7_2", tr = "_description_16fx7_14", nr = "_error_16fx7
|
|
|
884
884
|
defaultValue: u,
|
|
885
885
|
onChange: y,
|
|
886
886
|
readOnly: f,
|
|
887
|
-
placeholder:
|
|
887
|
+
placeholder: k = "dd.mm.åååå",
|
|
888
888
|
id: g,
|
|
889
|
-
name:
|
|
889
|
+
name: h,
|
|
890
890
|
required: b,
|
|
891
891
|
disabled: v,
|
|
892
892
|
onClick: p,
|
|
893
893
|
onFocus: m,
|
|
894
894
|
// Send ekstern onFocus videre
|
|
895
|
-
onBlur:
|
|
895
|
+
onBlur: x,
|
|
896
896
|
// Send ekstern onBlur videre
|
|
897
|
-
autoComplete:
|
|
897
|
+
autoComplete: F = "off",
|
|
898
898
|
"aria-label": _,
|
|
899
899
|
"aria-labelledby": A,
|
|
900
900
|
description: w,
|
|
901
901
|
error: D,
|
|
902
902
|
// Bruk error-prop for styling
|
|
903
|
-
"data-color":
|
|
903
|
+
"data-color": L,
|
|
904
904
|
// <-- Destrukturering
|
|
905
|
-
"data-size":
|
|
905
|
+
"data-size": z,
|
|
906
906
|
// <-- Destrukturering
|
|
907
|
-
...
|
|
908
|
-
} = e,
|
|
907
|
+
...B
|
|
908
|
+
} = e, O = l !== void 0, P = qe(null);
|
|
909
909
|
jt.useImperativeHandle(
|
|
910
910
|
t,
|
|
911
|
-
() =>
|
|
911
|
+
() => P.current
|
|
912
912
|
);
|
|
913
|
-
const
|
|
914
|
-
(
|
|
915
|
-
const
|
|
916
|
-
return bt(
|
|
913
|
+
const R = oe(
|
|
914
|
+
(G) => {
|
|
915
|
+
const N = vt(G), H = yt(N);
|
|
916
|
+
return bt(H);
|
|
917
917
|
},
|
|
918
918
|
[]
|
|
919
919
|
), [j, Q] = re(
|
|
920
|
-
() =>
|
|
920
|
+
() => R(l ?? u)
|
|
921
921
|
);
|
|
922
|
-
|
|
923
|
-
if (
|
|
924
|
-
const
|
|
925
|
-
|
|
922
|
+
se(() => {
|
|
923
|
+
if (O) {
|
|
924
|
+
const G = R(l);
|
|
925
|
+
G !== j && (Q(G), P.current && P.current.value !== G && (P.current.value = G));
|
|
926
926
|
}
|
|
927
|
-
}, [l,
|
|
928
|
-
const
|
|
929
|
-
(
|
|
930
|
-
const
|
|
931
|
-
let
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
if (
|
|
935
|
-
const
|
|
936
|
-
...
|
|
937
|
-
target: { ...
|
|
927
|
+
}, [l, O, j, R]);
|
|
928
|
+
const K = oe(
|
|
929
|
+
(G) => {
|
|
930
|
+
const N = G.target, H = N.value, ee = j, Z = vt(H).slice(0, 8), $ = yt(Z), T = bt($);
|
|
931
|
+
let M = 0;
|
|
932
|
+
const W = $.length;
|
|
933
|
+
W <= 2 ? M = W : W <= 4 ? M = W + 1 : M = W + 2, M = Math.min(M, T.length), requestAnimationFrame(() => {
|
|
934
|
+
if (P.current && (Q(T), P.current.value = T, P.current.setSelectionRange(M, M), (T !== ee || O) && y)) {
|
|
935
|
+
const U = {
|
|
936
|
+
...G,
|
|
937
|
+
target: { ...N, value: T }
|
|
938
938
|
};
|
|
939
|
-
y(
|
|
939
|
+
y(U, T);
|
|
940
940
|
}
|
|
941
941
|
});
|
|
942
942
|
},
|
|
943
|
-
[j,
|
|
944
|
-
),
|
|
943
|
+
[j, O, y, R]
|
|
944
|
+
), Y = [pe.fieldset, s].filter(Boolean).join(" "), J = [
|
|
945
945
|
pe.inputWrapper,
|
|
946
946
|
o,
|
|
947
947
|
D ? pe.inputWrapperError : ""
|
|
@@ -952,45 +952,45 @@ const er = "_fieldset_16fx7_2", tr = "_description_16fx7_14", nr = "_error_16fx7
|
|
|
952
952
|
a ? pe.suffixButtonInteractive : ""
|
|
953
953
|
].filter(Boolean).join(" ");
|
|
954
954
|
!n && !_ && !A && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
955
|
-
const I = n && typeof n == "string" ? A || `${g}-label` : void 0, S = w ? `${g}-desc` : void 0,
|
|
955
|
+
const I = n && typeof n == "string" ? A || `${g}-label` : void 0, S = w ? `${g}-desc` : void 0, E = D ? `${g}-err` : void 0, q = [S, E].filter(Boolean).join(" ") || void 0;
|
|
956
956
|
return (
|
|
957
957
|
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
958
958
|
/* @__PURE__ */ i.jsxs(
|
|
959
959
|
"div",
|
|
960
960
|
{
|
|
961
|
-
className:
|
|
962
|
-
"data-color":
|
|
963
|
-
"data-size":
|
|
961
|
+
className: Y,
|
|
962
|
+
"data-color": L,
|
|
963
|
+
"data-size": z,
|
|
964
964
|
children: [
|
|
965
965
|
n && typeof n == "string" ? /* @__PURE__ */ i.jsx("label", { id: I, htmlFor: g, children: n }) : n,
|
|
966
966
|
w && /* @__PURE__ */ i.jsx("p", { id: S, className: pe.description, children: w }),
|
|
967
|
-
/* @__PURE__ */ i.jsxs("div", { className:
|
|
967
|
+
/* @__PURE__ */ i.jsxs("div", { className: J, children: [
|
|
968
968
|
/* @__PURE__ */ i.jsx(
|
|
969
969
|
"input",
|
|
970
970
|
{
|
|
971
|
-
ref:
|
|
971
|
+
ref: P,
|
|
972
972
|
type: "text",
|
|
973
973
|
inputMode: "numeric",
|
|
974
974
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
975
975
|
maxLength: 10,
|
|
976
976
|
value: j,
|
|
977
977
|
readOnly: f,
|
|
978
|
-
placeholder:
|
|
978
|
+
placeholder: k,
|
|
979
979
|
id: g,
|
|
980
|
-
name:
|
|
980
|
+
name: h,
|
|
981
981
|
required: b,
|
|
982
982
|
disabled: v,
|
|
983
983
|
onClick: p,
|
|
984
|
-
onChange:
|
|
984
|
+
onChange: K,
|
|
985
985
|
onFocus: m,
|
|
986
|
-
onBlur:
|
|
987
|
-
autoComplete:
|
|
986
|
+
onBlur: x,
|
|
987
|
+
autoComplete: F,
|
|
988
988
|
"aria-label": _,
|
|
989
989
|
"aria-labelledby": I,
|
|
990
|
-
"aria-describedby":
|
|
990
|
+
"aria-describedby": q,
|
|
991
991
|
"aria-invalid": !!D,
|
|
992
992
|
className: te,
|
|
993
|
-
...
|
|
993
|
+
...B
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
996
|
r && /* @__PURE__ */ i.jsx(
|
|
@@ -1007,7 +1007,7 @@ const er = "_fieldset_16fx7_2", tr = "_description_16fx7_14", nr = "_error_16fx7
|
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
] }),
|
|
1010
|
-
D && /* @__PURE__ */ i.jsx("p", { id:
|
|
1010
|
+
D && /* @__PURE__ */ i.jsx("p", { id: E, className: pe.error, role: "alert", children: D })
|
|
1011
1011
|
]
|
|
1012
1012
|
}
|
|
1013
1013
|
)
|
|
@@ -1018,7 +1018,7 @@ ir.displayName = "DateInput";
|
|
|
1018
1018
|
function lr(e) {
|
|
1019
1019
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function xt(e) {
|
|
1022
1022
|
return lr(e) || Array.isArray(e);
|
|
1023
1023
|
}
|
|
1024
1024
|
function dr() {
|
|
@@ -1030,15 +1030,15 @@ function Ze(e, t) {
|
|
|
1030
1030
|
const a = JSON.stringify(Object.keys(e.breakpoints || {})), s = JSON.stringify(Object.keys(t.breakpoints || {}));
|
|
1031
1031
|
return a !== s ? !1 : n.every((o) => {
|
|
1032
1032
|
const d = e[o], l = t[o];
|
|
1033
|
-
return typeof d == "function" ? `${d}` == `${l}` : !
|
|
1033
|
+
return typeof d == "function" ? `${d}` == `${l}` : !xt(d) || !xt(l) ? d === l : Ze(d, l);
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Tt(e) {
|
|
1037
1037
|
return e.concat().sort((t, n) => t.name > n.name ? 1 : -1).map((t) => t.options);
|
|
1038
1038
|
}
|
|
1039
1039
|
function cr(e, t) {
|
|
1040
1040
|
if (e.length !== t.length) return !1;
|
|
1041
|
-
const n =
|
|
1041
|
+
const n = Tt(e), r = Tt(t);
|
|
1042
1042
|
return n.every((a, s) => {
|
|
1043
1043
|
const o = r[s];
|
|
1044
1044
|
return Ze(a, o);
|
|
@@ -1050,33 +1050,33 @@ function Xe(e) {
|
|
|
1050
1050
|
function Ke(e) {
|
|
1051
1051
|
return typeof e == "string";
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Re(e) {
|
|
1054
1054
|
return typeof e == "boolean";
|
|
1055
1055
|
}
|
|
1056
1056
|
function St(e) {
|
|
1057
1057
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function V(e) {
|
|
1060
1060
|
return Math.abs(e);
|
|
1061
1061
|
}
|
|
1062
1062
|
function Qe(e) {
|
|
1063
1063
|
return Math.sign(e);
|
|
1064
1064
|
}
|
|
1065
1065
|
function Ie(e, t) {
|
|
1066
|
-
return
|
|
1066
|
+
return V(e - t);
|
|
1067
1067
|
}
|
|
1068
1068
|
function ur(e, t) {
|
|
1069
|
-
if (e === 0 || t === 0 ||
|
|
1070
|
-
const n = Ie(
|
|
1071
|
-
return
|
|
1069
|
+
if (e === 0 || t === 0 || V(e) <= V(t)) return 0;
|
|
1070
|
+
const n = Ie(V(e), V(t));
|
|
1071
|
+
return V(n / e);
|
|
1072
1072
|
}
|
|
1073
1073
|
function mr(e) {
|
|
1074
1074
|
return Math.round(e * 100) / 100;
|
|
1075
1075
|
}
|
|
1076
1076
|
function Ae(e) {
|
|
1077
|
-
return
|
|
1077
|
+
return Le(e).map(Number);
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function ae(e) {
|
|
1080
1080
|
return e[_e(e)];
|
|
1081
1081
|
}
|
|
1082
1082
|
function _e(e) {
|
|
@@ -1088,13 +1088,13 @@ function et(e, t) {
|
|
|
1088
1088
|
function wt(e, t = 0) {
|
|
1089
1089
|
return Array.from(Array(e), (n, r) => t + r);
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Le(e) {
|
|
1092
1092
|
return Object.keys(e);
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return [e, t].reduce((n, r) => (
|
|
1094
|
+
function Et(e, t) {
|
|
1095
|
+
return [e, t].reduce((n, r) => (Le(r).forEach((a) => {
|
|
1096
1096
|
const s = n[a], o = r[a], d = St(s) && St(o);
|
|
1097
|
-
n[a] = d ?
|
|
1097
|
+
n[a] = d ? Et(s, o) : o;
|
|
1098
1098
|
}), n), {});
|
|
1099
1099
|
}
|
|
1100
1100
|
function Ye(e, t) {
|
|
@@ -1122,7 +1122,7 @@ function gr(e, t) {
|
|
|
1122
1122
|
measure: o
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function Fe() {
|
|
1126
1126
|
let e = [];
|
|
1127
1127
|
function t(a, s, o, d = {
|
|
1128
1128
|
passive: !0
|
|
@@ -1146,11 +1146,11 @@ function Le() {
|
|
|
1146
1146
|
return r;
|
|
1147
1147
|
}
|
|
1148
1148
|
function pr(e, t, n, r) {
|
|
1149
|
-
const a =
|
|
1149
|
+
const a = Fe(), s = 1e3 / 60;
|
|
1150
1150
|
let o = null, d = 0, l = 0;
|
|
1151
1151
|
function u() {
|
|
1152
1152
|
a.add(e, "visibilitychange", () => {
|
|
1153
|
-
e.hidden &&
|
|
1153
|
+
e.hidden && h();
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
function y() {
|
|
@@ -1165,19 +1165,19 @@ function pr(e, t, n, r) {
|
|
|
1165
1165
|
const m = d / s;
|
|
1166
1166
|
r(m), l && (l = t.requestAnimationFrame(f));
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function k() {
|
|
1169
1169
|
l || (l = t.requestAnimationFrame(f));
|
|
1170
1170
|
}
|
|
1171
1171
|
function g() {
|
|
1172
1172
|
t.cancelAnimationFrame(l), o = null, d = 0, l = 0;
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function h() {
|
|
1175
1175
|
o = null, d = 0;
|
|
1176
1176
|
}
|
|
1177
1177
|
return {
|
|
1178
1178
|
init: u,
|
|
1179
1179
|
destroy: y,
|
|
1180
|
-
start:
|
|
1180
|
+
start: k,
|
|
1181
1181
|
stop: g,
|
|
1182
1182
|
update: n,
|
|
1183
1183
|
render: r
|
|
@@ -1185,11 +1185,11 @@ function pr(e, t, n, r) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
function fr(e, t) {
|
|
1187
1187
|
const n = t === "rtl", r = e === "y", a = r ? "y" : "x", s = r ? "x" : "y", o = !r && n ? -1 : 1, d = y(), l = f();
|
|
1188
|
-
function u(
|
|
1188
|
+
function u(h) {
|
|
1189
1189
|
const {
|
|
1190
1190
|
height: b,
|
|
1191
1191
|
width: v
|
|
1192
|
-
} =
|
|
1192
|
+
} = h;
|
|
1193
1193
|
return r ? b : v;
|
|
1194
1194
|
}
|
|
1195
1195
|
function y() {
|
|
@@ -1198,8 +1198,8 @@ function fr(e, t) {
|
|
|
1198
1198
|
function f() {
|
|
1199
1199
|
return r ? "bottom" : n ? "left" : "right";
|
|
1200
1200
|
}
|
|
1201
|
-
function h
|
|
1202
|
-
return
|
|
1201
|
+
function k(h) {
|
|
1202
|
+
return h * o;
|
|
1203
1203
|
}
|
|
1204
1204
|
return {
|
|
1205
1205
|
scroll: a,
|
|
@@ -1207,11 +1207,11 @@ function fr(e, t) {
|
|
|
1207
1207
|
startEdge: d,
|
|
1208
1208
|
endEdge: l,
|
|
1209
1209
|
measureSize: u,
|
|
1210
|
-
direction:
|
|
1210
|
+
direction: k
|
|
1211
1211
|
};
|
|
1212
1212
|
}
|
|
1213
1213
|
function fe(e = 0, t = 0) {
|
|
1214
|
-
const n =
|
|
1214
|
+
const n = V(e - t);
|
|
1215
1215
|
function r(u) {
|
|
1216
1216
|
return u < e;
|
|
1217
1217
|
}
|
|
@@ -1238,25 +1238,25 @@ function fe(e = 0, t = 0) {
|
|
|
1238
1238
|
removeOffset: d
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1241
|
+
function Nt(e, t, n) {
|
|
1242
1242
|
const {
|
|
1243
1243
|
constrain: r
|
|
1244
1244
|
} = fe(0, e), a = e + 1;
|
|
1245
1245
|
let s = o(t);
|
|
1246
|
-
function o(
|
|
1247
|
-
return n ?
|
|
1246
|
+
function o(k) {
|
|
1247
|
+
return n ? V((a + k) % a) : r(k);
|
|
1248
1248
|
}
|
|
1249
1249
|
function d() {
|
|
1250
1250
|
return s;
|
|
1251
1251
|
}
|
|
1252
|
-
function l(
|
|
1253
|
-
return s = o(
|
|
1252
|
+
function l(k) {
|
|
1253
|
+
return s = o(k), f;
|
|
1254
1254
|
}
|
|
1255
|
-
function u(
|
|
1256
|
-
return y().set(d() +
|
|
1255
|
+
function u(k) {
|
|
1256
|
+
return y().set(d() + k);
|
|
1257
1257
|
}
|
|
1258
1258
|
function y() {
|
|
1259
|
-
return
|
|
1259
|
+
return Nt(e, d(), n);
|
|
1260
1260
|
}
|
|
1261
1261
|
const f = {
|
|
1262
1262
|
get: d,
|
|
@@ -1266,66 +1266,66 @@ function Et(e, t, n) {
|
|
|
1266
1266
|
};
|
|
1267
1267
|
return f;
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function hr(e, t, n, r, a, s, o, d, l, u, y, f, k, g, h, b, v, p, m) {
|
|
1270
1270
|
const {
|
|
1271
|
-
cross:
|
|
1272
|
-
direction:
|
|
1271
|
+
cross: x,
|
|
1272
|
+
direction: F
|
|
1273
1273
|
} = e, _ = ["INPUT", "SELECT", "TEXTAREA"], A = {
|
|
1274
1274
|
passive: !1
|
|
1275
|
-
}, w =
|
|
1275
|
+
}, w = Fe(), D = Fe(), L = fe(50, 225).constrain(g.measure(20)), z = {
|
|
1276
1276
|
mouse: 300,
|
|
1277
1277
|
touch: 400
|
|
1278
|
-
},
|
|
1278
|
+
}, B = {
|
|
1279
1279
|
mouse: 500,
|
|
1280
1280
|
touch: 600
|
|
1281
|
-
},
|
|
1282
|
-
let
|
|
1283
|
-
function te(
|
|
1281
|
+
}, O = h ? 43 : 25;
|
|
1282
|
+
let P = !1, R = 0, j = 0, Q = !1, K = !1, Y = !1, J = !1;
|
|
1283
|
+
function te(T) {
|
|
1284
1284
|
if (!m) return;
|
|
1285
|
-
function
|
|
1286
|
-
(
|
|
1285
|
+
function M(U) {
|
|
1286
|
+
(Re(m) || m(T, U)) && G(U);
|
|
1287
1287
|
}
|
|
1288
|
-
const
|
|
1289
|
-
w.add(
|
|
1290
|
-
}, A).add(
|
|
1291
|
-
}).add(
|
|
1288
|
+
const W = t;
|
|
1289
|
+
w.add(W, "dragstart", (U) => U.preventDefault(), A).add(W, "touchmove", () => {
|
|
1290
|
+
}, A).add(W, "touchend", () => {
|
|
1291
|
+
}).add(W, "touchstart", M).add(W, "mousedown", M).add(W, "touchcancel", H).add(W, "contextmenu", H).add(W, "click", ee, !0);
|
|
1292
1292
|
}
|
|
1293
1293
|
function c() {
|
|
1294
1294
|
w.clear(), D.clear();
|
|
1295
1295
|
}
|
|
1296
1296
|
function I() {
|
|
1297
|
-
const
|
|
1298
|
-
D.add(
|
|
1297
|
+
const T = J ? n : t;
|
|
1298
|
+
D.add(T, "touchmove", N, A).add(T, "touchend", H).add(T, "mousemove", N, A).add(T, "mouseup", H);
|
|
1299
1299
|
}
|
|
1300
|
-
function S(
|
|
1301
|
-
const
|
|
1302
|
-
return _.includes(
|
|
1300
|
+
function S(T) {
|
|
1301
|
+
const M = T.nodeName || "";
|
|
1302
|
+
return _.includes(M);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return (
|
|
1304
|
+
function E() {
|
|
1305
|
+
return (h ? B : z)[J ? "mouse" : "touch"];
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
const
|
|
1309
|
-
return
|
|
1307
|
+
function q(T, M) {
|
|
1308
|
+
const W = f.add(Qe(T) * -1), U = y.byDistance(T, !h).distance;
|
|
1309
|
+
return h || V(T) < L ? U : v && M ? U * 0.5 : y.byIndex(W.get(), 0).distance;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1311
|
+
function G(T) {
|
|
1312
|
+
const M = Ye(T, r);
|
|
1313
|
+
J = M, Y = h && M && !T.buttons && P, P = Ie(a.get(), o.get()) >= 2, !(M && T.button !== 0) && (S(T.target) || (Q = !0, s.pointerDown(T), u.useFriction(0).useDuration(0), a.set(o), I(), R = s.readPoint(T), j = s.readPoint(T, x), k.emit("pointerDown")));
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
if (!Ye(
|
|
1317
|
-
const
|
|
1318
|
-
if (!
|
|
1319
|
-
return
|
|
1320
|
-
const me = s.pointerMove(
|
|
1321
|
-
|
|
1315
|
+
function N(T) {
|
|
1316
|
+
if (!Ye(T, r) && T.touches.length >= 2) return H(T);
|
|
1317
|
+
const W = s.readPoint(T), U = s.readPoint(T, x), ie = Ie(W, R), le = Ie(U, j);
|
|
1318
|
+
if (!K && !J && (!T.cancelable || (K = ie > le, !K)))
|
|
1319
|
+
return H(T);
|
|
1320
|
+
const me = s.pointerMove(T);
|
|
1321
|
+
ie > b && (Y = !0), u.useFriction(0.3).useDuration(0.75), d.start(), a.add(F(me)), T.preventDefault();
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1323
|
+
function H(T) {
|
|
1324
|
+
const W = y.byDistance(0, !1).index !== f.get(), U = s.pointerUp(T) * E(), ie = q(F(U), W), le = ur(U, ie), me = O - 10 * le, de = p + le / 50;
|
|
1325
|
+
K = !1, Q = !1, D.clear(), u.useDuration(me).useFriction(de), l.distance(ie, !h), J = !1, k.emit("pointerUp");
|
|
1326
1326
|
}
|
|
1327
|
-
function ee(
|
|
1328
|
-
|
|
1327
|
+
function ee(T) {
|
|
1328
|
+
Y && (T.stopPropagation(), T.preventDefault(), Y = !1);
|
|
1329
1329
|
}
|
|
1330
1330
|
function Z() {
|
|
1331
1331
|
return Q;
|
|
@@ -1336,26 +1336,26 @@ function kr(e, t, n, r, a, s, o, d, l, u, y, f, h, g, k, b, v, p, m) {
|
|
|
1336
1336
|
pointerDown: Z
|
|
1337
1337
|
};
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function kr(e, t) {
|
|
1340
1340
|
let r, a;
|
|
1341
1341
|
function s(f) {
|
|
1342
1342
|
return f.timeStamp;
|
|
1343
1343
|
}
|
|
1344
|
-
function o(f,
|
|
1345
|
-
const
|
|
1346
|
-
return (Ye(f, t) ? f : f.touches[0])[
|
|
1344
|
+
function o(f, k) {
|
|
1345
|
+
const h = `client${(k || e.scroll) === "x" ? "X" : "Y"}`;
|
|
1346
|
+
return (Ye(f, t) ? f : f.touches[0])[h];
|
|
1347
1347
|
}
|
|
1348
1348
|
function d(f) {
|
|
1349
1349
|
return r = f, a = f, o(f);
|
|
1350
1350
|
}
|
|
1351
1351
|
function l(f) {
|
|
1352
|
-
const
|
|
1353
|
-
return a = f, g && (r = f),
|
|
1352
|
+
const k = o(f) - o(a), g = s(f) - s(r) > 170;
|
|
1353
|
+
return a = f, g && (r = f), k;
|
|
1354
1354
|
}
|
|
1355
1355
|
function u(f) {
|
|
1356
1356
|
if (!r || !a) return 0;
|
|
1357
|
-
const
|
|
1358
|
-
return g && !
|
|
1357
|
+
const k = o(a) - o(r), g = s(f) - s(r), h = s(f) - s(a) > 170, b = k / g;
|
|
1358
|
+
return g && !h && V(b) > 0.1 ? b : 0;
|
|
1359
1359
|
}
|
|
1360
1360
|
return {
|
|
1361
1361
|
pointerDown: d,
|
|
@@ -1396,48 +1396,48 @@ function vr(e) {
|
|
|
1396
1396
|
function yr(e, t, n, r, a, s, o) {
|
|
1397
1397
|
const d = [e].concat(r);
|
|
1398
1398
|
let l, u, y = [], f = !1;
|
|
1399
|
-
function
|
|
1399
|
+
function k(v) {
|
|
1400
1400
|
return a.measureSize(o.measure(v));
|
|
1401
1401
|
}
|
|
1402
1402
|
function g(v) {
|
|
1403
1403
|
if (!s) return;
|
|
1404
|
-
u =
|
|
1404
|
+
u = k(e), y = r.map(k);
|
|
1405
1405
|
function p(m) {
|
|
1406
|
-
for (const
|
|
1406
|
+
for (const x of m) {
|
|
1407
1407
|
if (f) return;
|
|
1408
|
-
const
|
|
1409
|
-
if (
|
|
1408
|
+
const F = x.target === e, _ = r.indexOf(x.target), A = F ? u : y[_], w = k(F ? e : r[_]);
|
|
1409
|
+
if (V(w - A) >= 0.5) {
|
|
1410
1410
|
v.reInit(), t.emit("resize");
|
|
1411
1411
|
break;
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
l = new ResizeObserver((m) => {
|
|
1416
|
-
(
|
|
1416
|
+
(Re(s) || s(v, m)) && p(m);
|
|
1417
1417
|
}), n.requestAnimationFrame(() => {
|
|
1418
1418
|
d.forEach((m) => l.observe(m));
|
|
1419
1419
|
});
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function h() {
|
|
1422
1422
|
f = !0, l && l.disconnect();
|
|
1423
1423
|
}
|
|
1424
1424
|
return {
|
|
1425
1425
|
init: g,
|
|
1426
|
-
destroy:
|
|
1426
|
+
destroy: h
|
|
1427
1427
|
};
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function xr(e, t, n, r, a, s) {
|
|
1430
1430
|
let o = 0, d = 0, l = a, u = s, y = e.get(), f = 0;
|
|
1431
|
-
function
|
|
1431
|
+
function k() {
|
|
1432
1432
|
const A = r.get() - e.get(), w = !l;
|
|
1433
1433
|
let D = 0;
|
|
1434
1434
|
return w ? (o = 0, n.set(r), e.set(r), D = A) : (n.set(e), o += A / l, o *= u, y += o, e.add(o), D = y - f), d = Qe(D), f = y, _;
|
|
1435
1435
|
}
|
|
1436
1436
|
function g() {
|
|
1437
1437
|
const A = r.get() - t.get();
|
|
1438
|
-
return
|
|
1438
|
+
return V(A) < 1e-3;
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function h() {
|
|
1441
1441
|
return l;
|
|
1442
1442
|
}
|
|
1443
1443
|
function b() {
|
|
@@ -1447,31 +1447,31 @@ function Tr(e, t, n, r, a, s) {
|
|
|
1447
1447
|
return o;
|
|
1448
1448
|
}
|
|
1449
1449
|
function p() {
|
|
1450
|
-
return
|
|
1450
|
+
return x(a);
|
|
1451
1451
|
}
|
|
1452
1452
|
function m() {
|
|
1453
|
-
return
|
|
1453
|
+
return F(s);
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function x(A) {
|
|
1456
1456
|
return l = A, _;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function F(A) {
|
|
1459
1459
|
return u = A, _;
|
|
1460
1460
|
}
|
|
1461
1461
|
const _ = {
|
|
1462
1462
|
direction: b,
|
|
1463
|
-
duration:
|
|
1463
|
+
duration: h,
|
|
1464
1464
|
velocity: v,
|
|
1465
|
-
seek:
|
|
1465
|
+
seek: k,
|
|
1466
1466
|
settled: g,
|
|
1467
1467
|
useBaseFriction: m,
|
|
1468
1468
|
useBaseDuration: p,
|
|
1469
|
-
useFriction:
|
|
1470
|
-
useDuration:
|
|
1469
|
+
useFriction: F,
|
|
1470
|
+
useDuration: x
|
|
1471
1471
|
};
|
|
1472
1472
|
return _;
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function Tr(e, t, n, r, a) {
|
|
1475
1475
|
const s = a.measure(10), o = a.measure(50), d = fe(0.1, 0.99);
|
|
1476
1476
|
let l = !1;
|
|
1477
1477
|
function u() {
|
|
@@ -1479,8 +1479,8 @@ function xr(e, t, n, r, a) {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
function y(g) {
|
|
1481
1481
|
if (!u()) return;
|
|
1482
|
-
const
|
|
1483
|
-
n.subtract(v * p), !g &&
|
|
1482
|
+
const h = e.reachedMin(t.get()) ? "min" : "max", b = V(e[h] - t.get()), v = n.get() - t.get(), p = d.constrain(b / o);
|
|
1483
|
+
n.subtract(v * p), !g && V(v) < s && (n.set(e.constrain(n.get())), r.useDuration(25).useBaseFriction());
|
|
1484
1484
|
}
|
|
1485
1485
|
function f(g) {
|
|
1486
1486
|
l = !g;
|
|
@@ -1492,31 +1492,31 @@ function xr(e, t, n, r, a) {
|
|
|
1492
1492
|
};
|
|
1493
1493
|
}
|
|
1494
1494
|
function Sr(e, t, n, r, a) {
|
|
1495
|
-
const s = fe(-t + e, 0), o = f(), d = y(), l =
|
|
1496
|
-
function u(
|
|
1497
|
-
return Ie(
|
|
1495
|
+
const s = fe(-t + e, 0), o = f(), d = y(), l = k();
|
|
1496
|
+
function u(h, b) {
|
|
1497
|
+
return Ie(h, b) <= 1;
|
|
1498
1498
|
}
|
|
1499
1499
|
function y() {
|
|
1500
|
-
const
|
|
1500
|
+
const h = o[0], b = ae(o), v = o.lastIndexOf(h), p = o.indexOf(b) + 1;
|
|
1501
1501
|
return fe(v, p);
|
|
1502
1502
|
}
|
|
1503
1503
|
function f() {
|
|
1504
|
-
return n.map((
|
|
1504
|
+
return n.map((h, b) => {
|
|
1505
1505
|
const {
|
|
1506
1506
|
min: v,
|
|
1507
1507
|
max: p
|
|
1508
|
-
} = s, m = s.constrain(
|
|
1509
|
-
return
|
|
1510
|
-
}).map((
|
|
1508
|
+
} = s, m = s.constrain(h), x = !b, F = et(n, b);
|
|
1509
|
+
return x ? p : F || u(v, m) ? v : u(p, m) ? p : m;
|
|
1510
|
+
}).map((h) => parseFloat(h.toFixed(3)));
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function k() {
|
|
1513
1513
|
if (t <= e + a) return [s.max];
|
|
1514
1514
|
if (r === "keepSnaps") return o;
|
|
1515
1515
|
const {
|
|
1516
|
-
min:
|
|
1516
|
+
min: h,
|
|
1517
1517
|
max: b
|
|
1518
1518
|
} = d;
|
|
1519
|
-
return o.slice(
|
|
1519
|
+
return o.slice(h, b);
|
|
1520
1520
|
}
|
|
1521
1521
|
return {
|
|
1522
1522
|
snapsContained: l,
|
|
@@ -1524,7 +1524,7 @@ function Sr(e, t, n, r, a) {
|
|
|
1524
1524
|
};
|
|
1525
1525
|
}
|
|
1526
1526
|
function wr(e, t, n) {
|
|
1527
|
-
const r = t[0], a = n ? r - e :
|
|
1527
|
+
const r = t[0], a = n ? r - e : ae(t);
|
|
1528
1528
|
return {
|
|
1529
1529
|
limit: fe(a, r)
|
|
1530
1530
|
};
|
|
@@ -1534,13 +1534,13 @@ function Cr(e, t, n, r) {
|
|
|
1534
1534
|
reachedMin: d,
|
|
1535
1535
|
reachedMax: l
|
|
1536
1536
|
} = fe(s, o);
|
|
1537
|
-
function u(
|
|
1538
|
-
return
|
|
1537
|
+
function u(k) {
|
|
1538
|
+
return k === 1 ? l(n.get()) : k === -1 ? d(n.get()) : !1;
|
|
1539
1539
|
}
|
|
1540
|
-
function y(
|
|
1541
|
-
if (!u(
|
|
1542
|
-
const g = e * (
|
|
1543
|
-
r.forEach((
|
|
1540
|
+
function y(k) {
|
|
1541
|
+
if (!u(k)) return;
|
|
1542
|
+
const g = e * (k * -1);
|
|
1543
|
+
r.forEach((h) => h.add(g));
|
|
1544
1544
|
}
|
|
1545
1545
|
return {
|
|
1546
1546
|
loop: y
|
|
@@ -1565,12 +1565,12 @@ function Dr(e, t, n, r, a) {
|
|
|
1565
1565
|
endEdge: o
|
|
1566
1566
|
} = e, {
|
|
1567
1567
|
groupSlides: d
|
|
1568
|
-
} = a, l = f().map(t.measure), u =
|
|
1568
|
+
} = a, l = f().map(t.measure), u = k(), y = g();
|
|
1569
1569
|
function f() {
|
|
1570
|
-
return d(r).map((b) =>
|
|
1570
|
+
return d(r).map((b) => ae(b)[o] - b[0][s]).map(V);
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1573
|
-
return r.map((b) => n[s] - b[s]).map((b) => -
|
|
1572
|
+
function k() {
|
|
1573
|
+
return r.map((b) => n[s] - b[s]).map((b) => -V(b));
|
|
1574
1574
|
}
|
|
1575
1575
|
function g() {
|
|
1576
1576
|
return d(u).map((b) => b[0]).map((b, v) => b + l[v]);
|
|
@@ -1588,18 +1588,18 @@ function Ir(e, t, n, r, a, s) {
|
|
|
1588
1588
|
max: l
|
|
1589
1589
|
} = r, u = y();
|
|
1590
1590
|
function y() {
|
|
1591
|
-
const
|
|
1592
|
-
return n.length === 1 ? [s] : g ?
|
|
1591
|
+
const k = o(s), g = !e || t === "keepSnaps";
|
|
1592
|
+
return n.length === 1 ? [s] : g ? k : k.slice(d, l).map((h, b, v) => {
|
|
1593
1593
|
const p = !b, m = et(v, b);
|
|
1594
1594
|
if (p) {
|
|
1595
|
-
const
|
|
1596
|
-
return wt(
|
|
1595
|
+
const x = ae(v[0]) + 1;
|
|
1596
|
+
return wt(x);
|
|
1597
1597
|
}
|
|
1598
1598
|
if (m) {
|
|
1599
|
-
const
|
|
1600
|
-
return wt(
|
|
1599
|
+
const x = _e(s) - ae(v)[0] + 1;
|
|
1600
|
+
return wt(x, ae(v)[0]);
|
|
1601
1601
|
}
|
|
1602
|
-
return
|
|
1602
|
+
return h;
|
|
1603
1603
|
});
|
|
1604
1604
|
}
|
|
1605
1605
|
return {
|
|
@@ -1612,14 +1612,14 @@ function Ar(e, t, n, r, a) {
|
|
|
1612
1612
|
removeOffset: o,
|
|
1613
1613
|
constrain: d
|
|
1614
1614
|
} = r;
|
|
1615
|
-
function l(
|
|
1616
|
-
return
|
|
1615
|
+
function l(h) {
|
|
1616
|
+
return h.concat().sort((b, v) => V(b) - V(v))[0];
|
|
1617
1617
|
}
|
|
1618
|
-
function u(
|
|
1619
|
-
const b = e ? o(
|
|
1618
|
+
function u(h) {
|
|
1619
|
+
const b = e ? o(h) : d(h), v = t.map((m, x) => ({
|
|
1620
1620
|
diff: y(m - b, 0),
|
|
1621
|
-
index:
|
|
1622
|
-
})).sort((m,
|
|
1621
|
+
index: x
|
|
1622
|
+
})).sort((m, x) => V(m.diff) - V(x.diff)), {
|
|
1623
1623
|
index: p
|
|
1624
1624
|
} = v[0];
|
|
1625
1625
|
return {
|
|
@@ -1627,60 +1627,60 @@ function Ar(e, t, n, r, a) {
|
|
|
1627
1627
|
distance: b
|
|
1628
1628
|
};
|
|
1629
1629
|
}
|
|
1630
|
-
function y(
|
|
1631
|
-
const v = [
|
|
1632
|
-
if (!e) return
|
|
1630
|
+
function y(h, b) {
|
|
1631
|
+
const v = [h, h + n, h - n];
|
|
1632
|
+
if (!e) return h;
|
|
1633
1633
|
if (!b) return l(v);
|
|
1634
1634
|
const p = v.filter((m) => Qe(m) === b);
|
|
1635
|
-
return p.length ? l(p) :
|
|
1635
|
+
return p.length ? l(p) : ae(v) - n;
|
|
1636
1636
|
}
|
|
1637
|
-
function f(
|
|
1638
|
-
const v = t[
|
|
1637
|
+
function f(h, b) {
|
|
1638
|
+
const v = t[h] - a.get(), p = y(v, b);
|
|
1639
1639
|
return {
|
|
1640
|
-
index:
|
|
1640
|
+
index: h,
|
|
1641
1641
|
distance: p
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
|
-
function h
|
|
1645
|
-
const v = a.get() +
|
|
1644
|
+
function k(h, b) {
|
|
1645
|
+
const v = a.get() + h, {
|
|
1646
1646
|
index: p,
|
|
1647
1647
|
distance: m
|
|
1648
|
-
} = u(v),
|
|
1649
|
-
if (!b ||
|
|
1648
|
+
} = u(v), x = !e && s(v);
|
|
1649
|
+
if (!b || x) return {
|
|
1650
1650
|
index: p,
|
|
1651
|
-
distance:
|
|
1651
|
+
distance: h
|
|
1652
1652
|
};
|
|
1653
|
-
const
|
|
1653
|
+
const F = t[p] - m, _ = h + y(F, 0);
|
|
1654
1654
|
return {
|
|
1655
1655
|
index: p,
|
|
1656
1656
|
distance: _
|
|
1657
1657
|
};
|
|
1658
1658
|
}
|
|
1659
1659
|
return {
|
|
1660
|
-
byDistance:
|
|
1660
|
+
byDistance: k,
|
|
1661
1661
|
byIndex: f,
|
|
1662
1662
|
shortcut: y
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function Lr(e, t, n, r, a, s, o) {
|
|
1666
1666
|
function d(f) {
|
|
1667
|
-
const
|
|
1668
|
-
s.add(
|
|
1667
|
+
const k = f.distance, g = f.index !== t.get();
|
|
1668
|
+
s.add(k), k && (r.duration() ? e.start() : (e.update(), e.render(1), e.update())), g && (n.set(t.get()), t.set(f.index), o.emit("select"));
|
|
1669
1669
|
}
|
|
1670
|
-
function l(f,
|
|
1671
|
-
const g = a.byDistance(f,
|
|
1670
|
+
function l(f, k) {
|
|
1671
|
+
const g = a.byDistance(f, k);
|
|
1672
1672
|
d(g);
|
|
1673
1673
|
}
|
|
1674
|
-
function u(f,
|
|
1675
|
-
const g = t.clone().set(f),
|
|
1676
|
-
d(
|
|
1674
|
+
function u(f, k) {
|
|
1675
|
+
const g = t.clone().set(f), h = a.byIndex(g.get(), k);
|
|
1676
|
+
d(h);
|
|
1677
1677
|
}
|
|
1678
1678
|
return {
|
|
1679
1679
|
distance: l,
|
|
1680
1680
|
index: u
|
|
1681
1681
|
};
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function Fr(e, t, n, r, a, s, o, d) {
|
|
1684
1684
|
const l = {
|
|
1685
1685
|
passive: !0,
|
|
1686
1686
|
capture: !0
|
|
@@ -1688,15 +1688,15 @@ function Lr(e, t, n, r, a, s, o, d) {
|
|
|
1688
1688
|
let u = 0;
|
|
1689
1689
|
function y(g) {
|
|
1690
1690
|
if (!d) return;
|
|
1691
|
-
function
|
|
1691
|
+
function h(b) {
|
|
1692
1692
|
if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
|
|
1693
1693
|
o.emit("slideFocusStart"), e.scrollLeft = 0;
|
|
1694
|
-
const m = n.findIndex((
|
|
1694
|
+
const m = n.findIndex((x) => x.includes(b));
|
|
1695
1695
|
Xe(m) && (a.useDuration(0), r.index(m, 0), o.emit("slideFocus"));
|
|
1696
1696
|
}
|
|
1697
1697
|
s.add(document, "keydown", f, !1), t.forEach((b, v) => {
|
|
1698
1698
|
s.add(b, "focus", (p) => {
|
|
1699
|
-
(
|
|
1699
|
+
(Re(d) || d(g, p)) && h(v);
|
|
1700
1700
|
}, l);
|
|
1701
1701
|
});
|
|
1702
1702
|
}
|
|
@@ -1731,22 +1731,22 @@ function De(e) {
|
|
|
1731
1731
|
subtract: s
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function Bt(e, t) {
|
|
1735
1735
|
const n = e.scroll === "x" ? o : d, r = t.style;
|
|
1736
1736
|
let a = null, s = !1;
|
|
1737
|
-
function o(
|
|
1738
|
-
return `translate3d(${
|
|
1737
|
+
function o(k) {
|
|
1738
|
+
return `translate3d(${k}px,0px,0px)`;
|
|
1739
1739
|
}
|
|
1740
|
-
function d(
|
|
1741
|
-
return `translate3d(0px,${
|
|
1740
|
+
function d(k) {
|
|
1741
|
+
return `translate3d(0px,${k}px,0px)`;
|
|
1742
1742
|
}
|
|
1743
|
-
function l(
|
|
1743
|
+
function l(k) {
|
|
1744
1744
|
if (s) return;
|
|
1745
|
-
const g = mr(e.direction(
|
|
1745
|
+
const g = mr(e.direction(k));
|
|
1746
1746
|
g !== a && (r.transform = n(g), a = g);
|
|
1747
1747
|
}
|
|
1748
|
-
function u(
|
|
1749
|
-
s = !
|
|
1748
|
+
function u(k) {
|
|
1749
|
+
s = !k;
|
|
1750
1750
|
}
|
|
1751
1751
|
function y() {
|
|
1752
1752
|
s || (r.transform = "", t.getAttribute("style") || t.removeAttribute("style"));
|
|
@@ -1758,69 +1758,69 @@ function Pt(e, t) {
|
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
1760
|
function _r(e, t, n, r, a, s, o, d, l) {
|
|
1761
|
-
const y = Ae(a), f = Ae(a).reverse(),
|
|
1761
|
+
const y = Ae(a), f = Ae(a).reverse(), k = p().concat(m());
|
|
1762
1762
|
function g(w, D) {
|
|
1763
|
-
return w.reduce((
|
|
1763
|
+
return w.reduce((L, z) => L - a[z], D);
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1766
|
-
return w.reduce((
|
|
1765
|
+
function h(w, D) {
|
|
1766
|
+
return w.reduce((L, z) => g(L, D) > 0 ? L.concat([z]) : L, []);
|
|
1767
1767
|
}
|
|
1768
1768
|
function b(w) {
|
|
1769
|
-
return s.map((D,
|
|
1770
|
-
start: D - r[
|
|
1769
|
+
return s.map((D, L) => ({
|
|
1770
|
+
start: D - r[L] + 0.5 + w,
|
|
1771
1771
|
end: D + t - 0.5 + w
|
|
1772
1772
|
}));
|
|
1773
1773
|
}
|
|
1774
|
-
function v(w, D,
|
|
1775
|
-
const
|
|
1776
|
-
return w.map((
|
|
1777
|
-
const
|
|
1774
|
+
function v(w, D, L) {
|
|
1775
|
+
const z = b(D);
|
|
1776
|
+
return w.map((B) => {
|
|
1777
|
+
const O = L ? 0 : -n, P = L ? n : 0, R = L ? "end" : "start", j = z[B][R];
|
|
1778
1778
|
return {
|
|
1779
|
-
index:
|
|
1779
|
+
index: B,
|
|
1780
1780
|
loopPoint: j,
|
|
1781
1781
|
slideLocation: De(-1),
|
|
1782
|
-
translate:
|
|
1783
|
-
target: () => d.get() > j ?
|
|
1782
|
+
translate: Bt(e, l[B]),
|
|
1783
|
+
target: () => d.get() > j ? O : P
|
|
1784
1784
|
};
|
|
1785
1785
|
});
|
|
1786
1786
|
}
|
|
1787
1787
|
function p() {
|
|
1788
|
-
const w = o[0], D =
|
|
1788
|
+
const w = o[0], D = h(f, w);
|
|
1789
1789
|
return v(D, n, !1);
|
|
1790
1790
|
}
|
|
1791
1791
|
function m() {
|
|
1792
|
-
const w = t - o[0] - 1, D =
|
|
1792
|
+
const w = t - o[0] - 1, D = h(y, w);
|
|
1793
1793
|
return v(D, -n, !0);
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1796
|
-
return
|
|
1795
|
+
function x() {
|
|
1796
|
+
return k.every(({
|
|
1797
1797
|
index: w
|
|
1798
1798
|
}) => {
|
|
1799
|
-
const D = y.filter((
|
|
1799
|
+
const D = y.filter((L) => L !== w);
|
|
1800
1800
|
return g(D, t) <= 0.1;
|
|
1801
1801
|
});
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1804
|
-
|
|
1803
|
+
function F() {
|
|
1804
|
+
k.forEach((w) => {
|
|
1805
1805
|
const {
|
|
1806
1806
|
target: D,
|
|
1807
|
-
translate:
|
|
1808
|
-
slideLocation:
|
|
1809
|
-
} = w,
|
|
1810
|
-
|
|
1807
|
+
translate: L,
|
|
1808
|
+
slideLocation: z
|
|
1809
|
+
} = w, B = D();
|
|
1810
|
+
B !== z.get() && (L.to(B), z.set(B));
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
1813
|
function _() {
|
|
1814
|
-
|
|
1814
|
+
k.forEach((w) => w.translate.clear());
|
|
1815
1815
|
}
|
|
1816
1816
|
return {
|
|
1817
|
-
canLoop:
|
|
1817
|
+
canLoop: x,
|
|
1818
1818
|
clear: _,
|
|
1819
|
-
loop:
|
|
1820
|
-
loopPoints:
|
|
1819
|
+
loop: F,
|
|
1820
|
+
loopPoints: k
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function Er(e, t, n) {
|
|
1824
1824
|
let r, a = !1;
|
|
1825
1825
|
function s(l) {
|
|
1826
1826
|
if (!n) return;
|
|
@@ -1832,7 +1832,7 @@ function Nr(e, t, n) {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
r = new MutationObserver((y) => {
|
|
1835
|
-
a || (
|
|
1835
|
+
a || (Re(n) || n(l, y)) && u(y);
|
|
1836
1836
|
}), r.observe(e, {
|
|
1837
1837
|
childList: !0
|
|
1838
1838
|
});
|
|
@@ -1845,199 +1845,199 @@ function Nr(e, t, n) {
|
|
|
1845
1845
|
destroy: o
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function Nr(e, t, n, r) {
|
|
1849
1849
|
const a = {};
|
|
1850
1850
|
let s = null, o = null, d, l = !1;
|
|
1851
1851
|
function u() {
|
|
1852
|
-
d = new IntersectionObserver((
|
|
1853
|
-
l || (
|
|
1852
|
+
d = new IntersectionObserver((h) => {
|
|
1853
|
+
l || (h.forEach((b) => {
|
|
1854
1854
|
const v = t.indexOf(b.target);
|
|
1855
1855
|
a[v] = b;
|
|
1856
1856
|
}), s = null, o = null, n.emit("slidesInView"));
|
|
1857
1857
|
}, {
|
|
1858
1858
|
root: e.parentElement,
|
|
1859
1859
|
threshold: r
|
|
1860
|
-
}), t.forEach((
|
|
1860
|
+
}), t.forEach((h) => d.observe(h));
|
|
1861
1861
|
}
|
|
1862
1862
|
function y() {
|
|
1863
1863
|
d && d.disconnect(), l = !0;
|
|
1864
1864
|
}
|
|
1865
|
-
function f(
|
|
1866
|
-
return
|
|
1865
|
+
function f(h) {
|
|
1866
|
+
return Le(a).reduce((b, v) => {
|
|
1867
1867
|
const p = parseInt(v), {
|
|
1868
1868
|
isIntersecting: m
|
|
1869
1869
|
} = a[p];
|
|
1870
|
-
return (
|
|
1870
|
+
return (h && m || !h && !m) && b.push(p), b;
|
|
1871
1871
|
}, []);
|
|
1872
1872
|
}
|
|
1873
|
-
function h
|
|
1874
|
-
if (
|
|
1875
|
-
if (!
|
|
1876
|
-
const b = f(
|
|
1877
|
-
return
|
|
1873
|
+
function k(h = !0) {
|
|
1874
|
+
if (h && s) return s;
|
|
1875
|
+
if (!h && o) return o;
|
|
1876
|
+
const b = f(h);
|
|
1877
|
+
return h && (s = b), h || (o = b), b;
|
|
1878
1878
|
}
|
|
1879
1879
|
return {
|
|
1880
1880
|
init: u,
|
|
1881
1881
|
destroy: y,
|
|
1882
|
-
get:
|
|
1882
|
+
get: k
|
|
1883
1883
|
};
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Br(e, t, n, r, a, s) {
|
|
1886
1886
|
const {
|
|
1887
1887
|
measureSize: o,
|
|
1888
1888
|
startEdge: d,
|
|
1889
1889
|
endEdge: l
|
|
1890
|
-
} = e, u = n[0] && a, y =
|
|
1891
|
-
function
|
|
1890
|
+
} = e, u = n[0] && a, y = h(), f = b(), k = n.map(o), g = v();
|
|
1891
|
+
function h() {
|
|
1892
1892
|
if (!u) return 0;
|
|
1893
1893
|
const m = n[0];
|
|
1894
|
-
return
|
|
1894
|
+
return V(t[d] - m[d]);
|
|
1895
1895
|
}
|
|
1896
1896
|
function b() {
|
|
1897
1897
|
if (!u) return 0;
|
|
1898
|
-
const m = s.getComputedStyle(
|
|
1898
|
+
const m = s.getComputedStyle(ae(r));
|
|
1899
1899
|
return parseFloat(m.getPropertyValue(`margin-${l}`));
|
|
1900
1900
|
}
|
|
1901
1901
|
function v() {
|
|
1902
|
-
return n.map((m,
|
|
1903
|
-
const _ = !
|
|
1904
|
-
return _ ?
|
|
1905
|
-
}).map(
|
|
1902
|
+
return n.map((m, x, F) => {
|
|
1903
|
+
const _ = !x, A = et(F, x);
|
|
1904
|
+
return _ ? k[x] + y : A ? k[x] + f : F[x + 1][d] - m[d];
|
|
1905
|
+
}).map(V);
|
|
1906
1906
|
}
|
|
1907
1907
|
return {
|
|
1908
|
-
slideSizes:
|
|
1908
|
+
slideSizes: k,
|
|
1909
1909
|
slideSizesWithGaps: g,
|
|
1910
1910
|
startGap: y,
|
|
1911
1911
|
endGap: f
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Pr(e, t, n, r, a, s, o, d, l) {
|
|
1915
1915
|
const {
|
|
1916
1916
|
startEdge: u,
|
|
1917
1917
|
endEdge: y,
|
|
1918
1918
|
direction: f
|
|
1919
|
-
} = e,
|
|
1919
|
+
} = e, k = Xe(n);
|
|
1920
1920
|
function g(p, m) {
|
|
1921
|
-
return Ae(p).filter((
|
|
1922
|
-
}
|
|
1923
|
-
function
|
|
1924
|
-
return p.length ? Ae(p).reduce((m,
|
|
1925
|
-
const _ =
|
|
1926
|
-
return
|
|
1927
|
-
}, []).map((m,
|
|
1928
|
-
const _ = Math.max(
|
|
1921
|
+
return Ae(p).filter((x) => x % m === 0).map((x) => p.slice(x, x + m));
|
|
1922
|
+
}
|
|
1923
|
+
function h(p) {
|
|
1924
|
+
return p.length ? Ae(p).reduce((m, x, F) => {
|
|
1925
|
+
const _ = ae(m) || 0, A = _ === 0, w = x === _e(p), D = a[u] - s[_][u], L = a[u] - s[x][y], z = !r && A ? f(o) : 0, B = !r && w ? f(d) : 0, O = V(L - B - (D + z));
|
|
1926
|
+
return F && O > t + l && m.push(x), w && m.push(p.length), m;
|
|
1927
|
+
}, []).map((m, x, F) => {
|
|
1928
|
+
const _ = Math.max(F[x - 1] || 0);
|
|
1929
1929
|
return p.slice(_, m);
|
|
1930
1930
|
}) : [];
|
|
1931
1931
|
}
|
|
1932
1932
|
function b(p) {
|
|
1933
|
-
return
|
|
1933
|
+
return k ? g(p, n) : h(p);
|
|
1934
1934
|
}
|
|
1935
1935
|
return {
|
|
1936
1936
|
groupSlides: b
|
|
1937
1937
|
};
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function Rr(e, t, n, r, a, s, o) {
|
|
1940
1940
|
const {
|
|
1941
1941
|
align: d,
|
|
1942
1942
|
axis: l,
|
|
1943
1943
|
direction: u,
|
|
1944
1944
|
startIndex: y,
|
|
1945
1945
|
loop: f,
|
|
1946
|
-
duration:
|
|
1946
|
+
duration: k,
|
|
1947
1947
|
dragFree: g,
|
|
1948
|
-
dragThreshold:
|
|
1948
|
+
dragThreshold: h,
|
|
1949
1949
|
inViewThreshold: b,
|
|
1950
1950
|
slidesToScroll: v,
|
|
1951
1951
|
skipSnaps: p,
|
|
1952
1952
|
containScroll: m,
|
|
1953
|
-
watchResize:
|
|
1954
|
-
watchSlides:
|
|
1953
|
+
watchResize: x,
|
|
1954
|
+
watchSlides: F,
|
|
1955
1955
|
watchDrag: _,
|
|
1956
1956
|
watchFocus: A
|
|
1957
|
-
} = s, w = 2, D = br(),
|
|
1958
|
-
slideSizes:
|
|
1959
|
-
slideSizesWithGaps:
|
|
1960
|
-
startGap:
|
|
1957
|
+
} = s, w = 2, D = br(), L = D.measure(t), z = n.map(D.measure), B = fr(l, u), O = B.measureSize(L), P = vr(O), R = gr(d, O), j = !f && !!m, Q = f || !!m, {
|
|
1958
|
+
slideSizes: K,
|
|
1959
|
+
slideSizesWithGaps: Y,
|
|
1960
|
+
startGap: J,
|
|
1961
1961
|
endGap: te
|
|
1962
|
-
} =
|
|
1962
|
+
} = Br(B, L, z, n, Q, a), c = Pr(B, O, v, f, L, z, J, te, w), {
|
|
1963
1963
|
snaps: I,
|
|
1964
1964
|
snapsAligned: S
|
|
1965
|
-
} = Dr(
|
|
1966
|
-
snapsContained:
|
|
1967
|
-
scrollContainLimit:
|
|
1968
|
-
} = Sr(
|
|
1969
|
-
limit:
|
|
1970
|
-
} = wr(
|
|
1971
|
-
dragHandler:
|
|
1972
|
-
scrollBody:
|
|
1973
|
-
scrollBounds:
|
|
1965
|
+
} = Dr(B, R, L, z, c), E = -ae(I) + ae(Y), {
|
|
1966
|
+
snapsContained: q,
|
|
1967
|
+
scrollContainLimit: G
|
|
1968
|
+
} = Sr(O, E, S, m, w), N = j ? q : S, {
|
|
1969
|
+
limit: H
|
|
1970
|
+
} = wr(E, N, f), ee = Nt(_e(N), y, f), Z = ee.clone(), $ = Ae(n), T = ({
|
|
1971
|
+
dragHandler: he,
|
|
1972
|
+
scrollBody: He,
|
|
1973
|
+
scrollBounds: $e,
|
|
1974
1974
|
options: {
|
|
1975
|
-
loop:
|
|
1975
|
+
loop: Ee
|
|
1976
1976
|
}
|
|
1977
1977
|
}) => {
|
|
1978
|
-
|
|
1979
|
-
},
|
|
1980
|
-
scrollBody:
|
|
1981
|
-
translate:
|
|
1982
|
-
location:
|
|
1983
|
-
offsetLocation:
|
|
1984
|
-
previousLocation:
|
|
1985
|
-
scrollLooper:
|
|
1986
|
-
slideLooper:
|
|
1987
|
-
dragHandler:
|
|
1988
|
-
animation:
|
|
1978
|
+
Ee || $e.constrain(he.pointerDown()), He.seek();
|
|
1979
|
+
}, M = ({
|
|
1980
|
+
scrollBody: he,
|
|
1981
|
+
translate: He,
|
|
1982
|
+
location: $e,
|
|
1983
|
+
offsetLocation: Ee,
|
|
1984
|
+
previousLocation: zt,
|
|
1985
|
+
scrollLooper: Ot,
|
|
1986
|
+
slideLooper: Ht,
|
|
1987
|
+
dragHandler: $t,
|
|
1988
|
+
animation: Wt,
|
|
1989
1989
|
eventHandler: st,
|
|
1990
|
-
scrollBounds:
|
|
1990
|
+
scrollBounds: Vt,
|
|
1991
1991
|
options: {
|
|
1992
1992
|
loop: at
|
|
1993
1993
|
}
|
|
1994
1994
|
}, it) => {
|
|
1995
|
-
const lt =
|
|
1996
|
-
ct &&
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
},
|
|
1995
|
+
const lt = he.settled(), Gt = !Vt.shouldConstrain(), dt = at ? lt : lt && Gt, ct = dt && !$t.pointerDown();
|
|
1996
|
+
ct && Wt.stop();
|
|
1997
|
+
const qt = $e.get() * it + zt.get() * (1 - it);
|
|
1998
|
+
Ee.set(qt), at && (Ot.loop(he.direction()), Ht.loop()), He.to(Ee.get()), ct && st.emit("settle"), dt || st.emit("scroll");
|
|
1999
|
+
}, W = pr(r, a, () => T(Oe), (he) => M(Oe, he)), U = 0.68, ie = N[ee.get()], le = De(ie), me = De(ie), de = De(ie), ge = De(ie), xe = xr(le, de, me, ge, k, U), Me = Ar(f, N, E, H, ge), ze = Lr(W, ee, Z, xe, Me, ge, o), nt = jr(H), ot = Fe(), Rt = Nr(t, n, o, b), {
|
|
2000
2000
|
slideRegistry: rt
|
|
2001
|
-
} = Ir(j, m,
|
|
2001
|
+
} = Ir(j, m, N, G, c, $), Mt = Fr(e, n, rt, ze, xe, ot, o, A), Oe = {
|
|
2002
2002
|
ownerDocument: r,
|
|
2003
2003
|
ownerWindow: a,
|
|
2004
2004
|
eventHandler: o,
|
|
2005
|
-
containerRect:
|
|
2006
|
-
slideRects:
|
|
2007
|
-
animation:
|
|
2008
|
-
axis:
|
|
2009
|
-
dragHandler:
|
|
2005
|
+
containerRect: L,
|
|
2006
|
+
slideRects: z,
|
|
2007
|
+
animation: W,
|
|
2008
|
+
axis: B,
|
|
2009
|
+
dragHandler: hr(B, e, r, a, ge, kr(B, a), le, W, ze, xe, Me, ee, o, P, g, h, p, U, _),
|
|
2010
2010
|
eventStore: ot,
|
|
2011
|
-
percentOfView:
|
|
2011
|
+
percentOfView: P,
|
|
2012
2012
|
index: ee,
|
|
2013
2013
|
indexPrevious: Z,
|
|
2014
|
-
limit:
|
|
2014
|
+
limit: H,
|
|
2015
2015
|
location: le,
|
|
2016
2016
|
offsetLocation: de,
|
|
2017
2017
|
previousLocation: me,
|
|
2018
2018
|
options: s,
|
|
2019
|
-
resizeHandler: yr(t, o, a, n,
|
|
2020
|
-
scrollBody:
|
|
2021
|
-
scrollBounds:
|
|
2022
|
-
scrollLooper: Cr(
|
|
2019
|
+
resizeHandler: yr(t, o, a, n, B, x, D),
|
|
2020
|
+
scrollBody: xe,
|
|
2021
|
+
scrollBounds: Tr(H, de, ge, xe, P),
|
|
2022
|
+
scrollLooper: Cr(E, H, de, [le, de, me, ge]),
|
|
2023
2023
|
scrollProgress: nt,
|
|
2024
|
-
scrollSnapList:
|
|
2025
|
-
scrollSnaps:
|
|
2026
|
-
scrollTarget:
|
|
2027
|
-
scrollTo:
|
|
2028
|
-
slideLooper: _r(
|
|
2029
|
-
slideFocus:
|
|
2030
|
-
slidesHandler:
|
|
2031
|
-
slidesInView:
|
|
2032
|
-
slideIndexes:
|
|
2024
|
+
scrollSnapList: N.map(nt.get),
|
|
2025
|
+
scrollSnaps: N,
|
|
2026
|
+
scrollTarget: Me,
|
|
2027
|
+
scrollTo: ze,
|
|
2028
|
+
slideLooper: _r(B, O, E, K, Y, I, N, de, n),
|
|
2029
|
+
slideFocus: Mt,
|
|
2030
|
+
slidesHandler: Er(t, o, F),
|
|
2031
|
+
slidesInView: Rt,
|
|
2032
|
+
slideIndexes: $,
|
|
2033
2033
|
slideRegistry: rt,
|
|
2034
2034
|
slidesToScroll: c,
|
|
2035
2035
|
target: ge,
|
|
2036
|
-
translate:
|
|
2036
|
+
translate: Bt(B, t)
|
|
2037
2037
|
};
|
|
2038
|
-
return
|
|
2038
|
+
return Oe;
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2040
|
+
function Mr() {
|
|
2041
2041
|
let e = {}, t;
|
|
2042
2042
|
function n(u) {
|
|
2043
2043
|
t = u;
|
|
@@ -2066,7 +2066,7 @@ function Rr() {
|
|
|
2066
2066
|
};
|
|
2067
2067
|
return l;
|
|
2068
2068
|
}
|
|
2069
|
-
const
|
|
2069
|
+
const zr = {
|
|
2070
2070
|
align: "center",
|
|
2071
2071
|
axis: "x",
|
|
2072
2072
|
container: null,
|
|
@@ -2088,16 +2088,16 @@ const Or = {
|
|
|
2088
2088
|
watchSlides: !0,
|
|
2089
2089
|
watchFocus: !0
|
|
2090
2090
|
};
|
|
2091
|
-
function
|
|
2091
|
+
function Or(e) {
|
|
2092
2092
|
function t(s, o) {
|
|
2093
|
-
return
|
|
2093
|
+
return Et(s, o || {});
|
|
2094
2094
|
}
|
|
2095
2095
|
function n(s) {
|
|
2096
|
-
const o = s.breakpoints || {}, d =
|
|
2096
|
+
const o = s.breakpoints || {}, d = Le(o).filter((l) => e.matchMedia(l).matches).map((l) => o[l]).reduce((l, u) => t(l, u), {});
|
|
2097
2097
|
return t(s, d);
|
|
2098
2098
|
}
|
|
2099
2099
|
function r(s) {
|
|
2100
|
-
return s.map((o) =>
|
|
2100
|
+
return s.map((o) => Le(o.breakpoints || {})).reduce((o, d) => o.concat(d), []).map(e.matchMedia);
|
|
2101
2101
|
}
|
|
2102
2102
|
return {
|
|
2103
2103
|
mergeOptions: t,
|
|
@@ -2105,7 +2105,7 @@ function Hr(e) {
|
|
|
2105
2105
|
optionsMediaQueries: r
|
|
2106
2106
|
};
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function Hr(e) {
|
|
2109
2109
|
let t = [];
|
|
2110
2110
|
function n(s, o) {
|
|
2111
2111
|
return t = o.filter(({
|
|
@@ -2122,71 +2122,71 @@ function Wr(e) {
|
|
|
2122
2122
|
destroy: r
|
|
2123
2123
|
};
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
const r = e.ownerDocument, a = r.defaultView, s =
|
|
2125
|
+
function Pe(e, t, n) {
|
|
2126
|
+
const r = e.ownerDocument, a = r.defaultView, s = Or(a), o = Hr(s), d = Fe(), l = Mr(), {
|
|
2127
2127
|
mergeOptions: u,
|
|
2128
2128
|
optionsAtMedia: y,
|
|
2129
2129
|
optionsMediaQueries: f
|
|
2130
2130
|
} = s, {
|
|
2131
|
-
on:
|
|
2131
|
+
on: k,
|
|
2132
2132
|
off: g,
|
|
2133
|
-
emit:
|
|
2134
|
-
} = l, b =
|
|
2135
|
-
let v = !1, p, m = u(
|
|
2133
|
+
emit: h
|
|
2134
|
+
} = l, b = B;
|
|
2135
|
+
let v = !1, p, m = u(zr, Pe.globalOptions), x = u(m), F = [], _, A, w;
|
|
2136
2136
|
function D() {
|
|
2137
2137
|
const {
|
|
2138
|
-
container:
|
|
2139
|
-
slides:
|
|
2140
|
-
} =
|
|
2141
|
-
A = (Ke(
|
|
2142
|
-
const
|
|
2143
|
-
w = [].slice.call(
|
|
2144
|
-
}
|
|
2145
|
-
function
|
|
2146
|
-
const
|
|
2147
|
-
if (
|
|
2148
|
-
const
|
|
2138
|
+
container: $,
|
|
2139
|
+
slides: T
|
|
2140
|
+
} = x;
|
|
2141
|
+
A = (Ke($) ? e.querySelector($) : $) || e.children[0];
|
|
2142
|
+
const W = Ke(T) ? A.querySelectorAll(T) : T;
|
|
2143
|
+
w = [].slice.call(W || A.children);
|
|
2144
|
+
}
|
|
2145
|
+
function L($) {
|
|
2146
|
+
const T = Rr(e, A, w, r, a, $, l);
|
|
2147
|
+
if ($.loop && !T.slideLooper.canLoop()) {
|
|
2148
|
+
const M = Object.assign({}, $, {
|
|
2149
2149
|
loop: !1
|
|
2150
2150
|
});
|
|
2151
|
-
return
|
|
2151
|
+
return L(M);
|
|
2152
2152
|
}
|
|
2153
|
-
return
|
|
2153
|
+
return T;
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2156
|
-
v || (m = u(m,
|
|
2157
|
-
options:
|
|
2158
|
-
}) =>
|
|
2155
|
+
function z($, T) {
|
|
2156
|
+
v || (m = u(m, $), x = y(m), F = T || F, D(), p = L(x), f([m, ...F.map(({
|
|
2157
|
+
options: M
|
|
2158
|
+
}) => M)]).forEach((M) => d.add(M, "change", B)), x.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(), A.offsetParent && w.length && p.dragHandler.init(Z), _ = o.init(Z, F)));
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2163
|
-
startIndex:
|
|
2164
|
-
},
|
|
2160
|
+
function B($, T) {
|
|
2161
|
+
const M = c();
|
|
2162
|
+
O(), z(u({
|
|
2163
|
+
startIndex: M
|
|
2164
|
+
}, $), T), l.emit("reInit");
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2166
|
+
function O() {
|
|
2167
2167
|
p.dragHandler.destroy(), p.eventStore.clear(), p.translate.clear(), p.slideLooper.clear(), p.resizeHandler.destroy(), p.slidesHandler.destroy(), p.slidesInView.destroy(), p.animation.destroy(), o.destroy(), d.clear();
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2170
|
-
v || (v = !0, d.clear(),
|
|
2169
|
+
function P() {
|
|
2170
|
+
v || (v = !0, d.clear(), O(), l.emit("destroy"), l.clear());
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2173
|
-
!
|
|
2172
|
+
function R($, T, M) {
|
|
2173
|
+
!x.active || v || (p.scrollBody.useBaseFriction().useDuration(T === !0 ? 0 : x.duration), p.scrollTo.index($, M || 0));
|
|
2174
2174
|
}
|
|
2175
|
-
function j(
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2175
|
+
function j($) {
|
|
2176
|
+
const T = p.index.add(1).get();
|
|
2177
|
+
R(T, $, -1);
|
|
2178
2178
|
}
|
|
2179
|
-
function Q(
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2179
|
+
function Q($) {
|
|
2180
|
+
const T = p.index.add(-1).get();
|
|
2181
|
+
R(T, $, 1);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function K() {
|
|
2184
2184
|
return p.index.add(1).get() !== c();
|
|
2185
2185
|
}
|
|
2186
|
-
function
|
|
2186
|
+
function Y() {
|
|
2187
2187
|
return p.index.add(-1).get() !== c();
|
|
2188
2188
|
}
|
|
2189
|
-
function
|
|
2189
|
+
function J() {
|
|
2190
2190
|
return p.scrollSnapList;
|
|
2191
2191
|
}
|
|
2192
2192
|
function te() {
|
|
@@ -2201,74 +2201,74 @@ function Be(e, t, n) {
|
|
|
2201
2201
|
function S() {
|
|
2202
2202
|
return p.slidesInView.get();
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2204
|
+
function E() {
|
|
2205
2205
|
return p.slidesInView.get(!1);
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function q() {
|
|
2208
2208
|
return _;
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2210
|
+
function G() {
|
|
2211
2211
|
return p;
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2213
|
+
function N() {
|
|
2214
2214
|
return e;
|
|
2215
2215
|
}
|
|
2216
|
-
function
|
|
2216
|
+
function H() {
|
|
2217
2217
|
return A;
|
|
2218
2218
|
}
|
|
2219
2219
|
function ee() {
|
|
2220
2220
|
return w;
|
|
2221
2221
|
}
|
|
2222
2222
|
const Z = {
|
|
2223
|
-
canScrollNext:
|
|
2224
|
-
canScrollPrev:
|
|
2225
|
-
containerNode:
|
|
2226
|
-
internalEngine:
|
|
2227
|
-
destroy:
|
|
2223
|
+
canScrollNext: K,
|
|
2224
|
+
canScrollPrev: Y,
|
|
2225
|
+
containerNode: H,
|
|
2226
|
+
internalEngine: G,
|
|
2227
|
+
destroy: P,
|
|
2228
2228
|
off: g,
|
|
2229
|
-
on:
|
|
2230
|
-
emit:
|
|
2231
|
-
plugins:
|
|
2229
|
+
on: k,
|
|
2230
|
+
emit: h,
|
|
2231
|
+
plugins: q,
|
|
2232
2232
|
previousScrollSnap: I,
|
|
2233
2233
|
reInit: b,
|
|
2234
|
-
rootNode:
|
|
2234
|
+
rootNode: N,
|
|
2235
2235
|
scrollNext: j,
|
|
2236
2236
|
scrollPrev: Q,
|
|
2237
2237
|
scrollProgress: te,
|
|
2238
|
-
scrollSnapList:
|
|
2239
|
-
scrollTo:
|
|
2238
|
+
scrollSnapList: J,
|
|
2239
|
+
scrollTo: R,
|
|
2240
2240
|
selectedScrollSnap: c,
|
|
2241
2241
|
slideNodes: ee,
|
|
2242
2242
|
slidesInView: S,
|
|
2243
|
-
slidesNotInView:
|
|
2243
|
+
slidesNotInView: E
|
|
2244
2244
|
};
|
|
2245
|
-
return
|
|
2245
|
+
return z(t, n), setTimeout(() => l.emit("init"), 0), Z;
|
|
2246
2246
|
}
|
|
2247
|
-
|
|
2247
|
+
Pe.globalOptions = void 0;
|
|
2248
2248
|
function tt(e = {}, t = []) {
|
|
2249
|
-
const n =
|
|
2249
|
+
const n = qe(e), r = qe(t), [a, s] = re(), [o, d] = re(), l = oe(() => {
|
|
2250
2250
|
a && a.reInit(n.current, r.current);
|
|
2251
2251
|
}, [a]);
|
|
2252
|
-
return
|
|
2252
|
+
return se(() => {
|
|
2253
2253
|
Ze(n.current, e) || (n.current = e, l());
|
|
2254
|
-
}, [e, l]),
|
|
2254
|
+
}, [e, l]), se(() => {
|
|
2255
2255
|
cr(r.current, t) || (r.current = t, l());
|
|
2256
|
-
}, [t, l]),
|
|
2256
|
+
}, [t, l]), se(() => {
|
|
2257
2257
|
if (dr() && o) {
|
|
2258
|
-
|
|
2259
|
-
const u =
|
|
2258
|
+
Pe.globalOptions = tt.globalOptions;
|
|
2259
|
+
const u = Pe(o, n.current, r.current);
|
|
2260
2260
|
return s(u), () => u.destroy();
|
|
2261
2261
|
} else
|
|
2262
2262
|
s(void 0);
|
|
2263
2263
|
}, [o, s]), [d, a];
|
|
2264
2264
|
}
|
|
2265
2265
|
tt.globalOptions = void 0;
|
|
2266
|
-
const
|
|
2267
|
-
carouselContainer:
|
|
2268
|
-
viewport:
|
|
2269
|
-
slides:
|
|
2270
|
-
slide:
|
|
2271
|
-
slideInner:
|
|
2266
|
+
const $r = "_carouselContainer_1bu1s_1", Wr = "_viewport_1bu1s_11", Vr = "_slides_1bu1s_17", Gr = "_slide_1bu1s_17", qr = "_slideInner_1bu1s_37", Ur = "_loaderOverlay_1bu1s_45", Kr = "_image_1bu1s_55", Yr = "_loaded_1bu1s_66", Jr = "_empty_1bu1s_78", Zr = "_controls_1bu1s_84", Xr = "_arrows_1bu1s_94", Qr = "_dots_1bu1s_104", es = "_dot_1bu1s_104", ts = "_dotActive_1bu1s_130", X = {
|
|
2267
|
+
carouselContainer: $r,
|
|
2268
|
+
viewport: Wr,
|
|
2269
|
+
slides: Vr,
|
|
2270
|
+
slide: Gr,
|
|
2271
|
+
slideInner: qr,
|
|
2272
2272
|
loaderOverlay: Ur,
|
|
2273
2273
|
image: Kr,
|
|
2274
2274
|
loaded: Yr,
|
|
@@ -2296,35 +2296,35 @@ const zr = "_carouselContainer_1bu1s_1", Vr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2296
2296
|
align: "start",
|
|
2297
2297
|
containScroll: "trimSnaps",
|
|
2298
2298
|
slidesToScroll: 1
|
|
2299
|
-
}, [
|
|
2300
|
-
|
|
2301
|
-
|
|
2299
|
+
}, [k, g] = tt(f), [h, b] = re(0), [v, p] = re([]), [m, x] = re([]);
|
|
2300
|
+
se(() => {
|
|
2301
|
+
x(new Array((e == null ? void 0 : e.length) || 0).fill(!1));
|
|
2302
2302
|
}, [e]);
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2305
|
-
const j = [...
|
|
2306
|
-
return j[
|
|
2303
|
+
const F = oe((P) => {
|
|
2304
|
+
x((R) => {
|
|
2305
|
+
const j = [...R];
|
|
2306
|
+
return j[P] = !0, j;
|
|
2307
2307
|
});
|
|
2308
2308
|
}, []), _ = ve(() => n * 1e3, [n]), A = oe(() => {
|
|
2309
2309
|
g && b(g.selectedScrollSnap());
|
|
2310
|
-
}, [g]), w = oe((
|
|
2311
|
-
|
|
2310
|
+
}, [g]), w = oe((P) => g && g.scrollTo(P), [g]), D = oe(() => g && g.scrollPrev(), [g]), L = oe(() => g && g.scrollNext(), [g]);
|
|
2311
|
+
se(() => {
|
|
2312
2312
|
if (g)
|
|
2313
2313
|
return g.on("select", A), g.on("reInit", A), p(g.scrollSnapList()), () => {
|
|
2314
2314
|
g.off("select", A), g.off("reInit", A);
|
|
2315
2315
|
};
|
|
2316
|
-
}, [g, A]),
|
|
2316
|
+
}, [g, A]), se(() => {
|
|
2317
2317
|
g && (g.reInit(), p(g.scrollSnapList()));
|
|
2318
|
-
}, [g, e, o, d]),
|
|
2318
|
+
}, [g, e, o, d]), se(() => {
|
|
2319
2319
|
if (!t || !g || !e || e.length <= 1) return;
|
|
2320
|
-
const
|
|
2320
|
+
const P = window.setInterval(() => {
|
|
2321
2321
|
g.canScrollNext() && g.scrollNext();
|
|
2322
2322
|
}, _);
|
|
2323
2323
|
return () => {
|
|
2324
|
-
window.clearInterval(
|
|
2324
|
+
window.clearInterval(P);
|
|
2325
2325
|
};
|
|
2326
2326
|
}, [t, _, g, e]);
|
|
2327
|
-
const
|
|
2327
|
+
const z = Math.max(1, o), B = `${100 / z}%`, O = d / 2;
|
|
2328
2328
|
return /* @__PURE__ */ i.jsxs(
|
|
2329
2329
|
"div",
|
|
2330
2330
|
{
|
|
@@ -2333,45 +2333,45 @@ const zr = "_carouselContainer_1bu1s_1", Vr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2333
2333
|
"data-size": y,
|
|
2334
2334
|
"data-variant": s,
|
|
2335
2335
|
children: [
|
|
2336
|
-
/* @__PURE__ */ i.jsx("div", { className: X.viewport, ref:
|
|
2336
|
+
/* @__PURE__ */ i.jsx("div", { className: X.viewport, ref: k, children: /* @__PURE__ */ i.jsx(
|
|
2337
2337
|
"div",
|
|
2338
2338
|
{
|
|
2339
2339
|
className: X.slides,
|
|
2340
2340
|
style: {
|
|
2341
|
-
marginLeft: `-${
|
|
2342
|
-
marginRight: `-${
|
|
2341
|
+
marginLeft: `-${O}px`,
|
|
2342
|
+
marginRight: `-${O}px`
|
|
2343
2343
|
},
|
|
2344
|
-
children: e && e.length > 0 ? e.map((
|
|
2344
|
+
children: e && e.length > 0 ? e.map((P, R) => /* @__PURE__ */ i.jsx(
|
|
2345
2345
|
"div",
|
|
2346
2346
|
{
|
|
2347
2347
|
className: X.slide,
|
|
2348
2348
|
style: {
|
|
2349
|
-
flex: `0 0 ${
|
|
2350
|
-
paddingLeft: `${
|
|
2351
|
-
paddingRight: `${
|
|
2349
|
+
flex: `0 0 ${B}`,
|
|
2350
|
+
paddingLeft: `${O}px`,
|
|
2351
|
+
paddingRight: `${O}px`,
|
|
2352
2352
|
borderRadius: l > 0 ? `${l}px` : void 0,
|
|
2353
2353
|
overflow: "hidden"
|
|
2354
2354
|
// Ensure radius clips content
|
|
2355
2355
|
},
|
|
2356
2356
|
children: /* @__PURE__ */ i.jsxs("div", { className: X.slideInner, style: { borderRadius: `${l}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
2357
|
-
!m[
|
|
2357
|
+
!m[R] && /* @__PURE__ */ i.jsx("div", { className: X.loaderOverlay, children: /* @__PURE__ */ i.jsx(ns, { "aria-label": "Laster bilde" }) }),
|
|
2358
2358
|
/* @__PURE__ */ i.jsx(
|
|
2359
2359
|
"img",
|
|
2360
2360
|
{
|
|
2361
|
-
className: `${X.image} ${m[
|
|
2362
|
-
src:
|
|
2363
|
-
alt:
|
|
2364
|
-
loading:
|
|
2361
|
+
className: `${X.image} ${m[R] ? X.loaded : X.loadingImage}`,
|
|
2362
|
+
src: P.src,
|
|
2363
|
+
alt: P.alt,
|
|
2364
|
+
loading: R < z ? "eager" : "lazy",
|
|
2365
2365
|
crossOrigin: "anonymous",
|
|
2366
|
-
onLoad: () =>
|
|
2366
|
+
onLoad: () => F(R),
|
|
2367
2367
|
onError: (j) => {
|
|
2368
|
-
j.target.style.display = "none",
|
|
2368
|
+
j.target.style.display = "none", F(R);
|
|
2369
2369
|
}
|
|
2370
2370
|
}
|
|
2371
2371
|
)
|
|
2372
2372
|
] })
|
|
2373
2373
|
},
|
|
2374
|
-
`image-${
|
|
2374
|
+
`image-${R}-${P.src}`
|
|
2375
2375
|
)) : /* @__PURE__ */ i.jsx("div", { className: X.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ i.jsx("div", { className: X.empty, children: "Ingen bilder" }) })
|
|
2376
2376
|
}
|
|
2377
2377
|
) }),
|
|
@@ -2394,25 +2394,25 @@ const zr = "_carouselContainer_1bu1s_1", Vr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2394
2394
|
variant: "primary",
|
|
2395
2395
|
icon: !0,
|
|
2396
2396
|
"aria-label": "Neste bilde",
|
|
2397
|
-
onClick:
|
|
2397
|
+
onClick: L,
|
|
2398
2398
|
disabled: !e || e.length <= 1,
|
|
2399
2399
|
children: /* @__PURE__ */ i.jsx(Xn, { "aria-hidden": !0 })
|
|
2400
2400
|
}
|
|
2401
2401
|
)
|
|
2402
2402
|
] }),
|
|
2403
|
-
a && e && e.length > 1 && /* @__PURE__ */ i.jsx("div", { className: X.dots, role: "tablist", "aria-label": "Bildeposisjon", children: v.map((
|
|
2404
|
-
const j =
|
|
2403
|
+
a && e && e.length > 1 && /* @__PURE__ */ i.jsx("div", { className: X.dots, role: "tablist", "aria-label": "Bildeposisjon", children: v.map((P, R) => {
|
|
2404
|
+
const j = R === h;
|
|
2405
2405
|
return /* @__PURE__ */ i.jsx(
|
|
2406
2406
|
"button",
|
|
2407
2407
|
{
|
|
2408
2408
|
type: "button",
|
|
2409
2409
|
className: `${X.dot} ${j ? X.dotActive : ""}`,
|
|
2410
|
-
onClick: () => w(
|
|
2411
|
-
"aria-label": `Gå til bilde ${
|
|
2410
|
+
onClick: () => w(R),
|
|
2411
|
+
"aria-label": `Gå til bilde ${R + 1}`,
|
|
2412
2412
|
"aria-selected": j,
|
|
2413
2413
|
role: "tab"
|
|
2414
2414
|
},
|
|
2415
|
-
`dot-${
|
|
2415
|
+
`dot-${R}`
|
|
2416
2416
|
);
|
|
2417
2417
|
}) })
|
|
2418
2418
|
] })
|
|
@@ -2421,24 +2421,24 @@ const zr = "_carouselContainer_1bu1s_1", Vr = "_viewport_1bu1s_11", Gr = "_slide
|
|
|
2421
2421
|
);
|
|
2422
2422
|
};
|
|
2423
2423
|
os.displayName = "Carousel";
|
|
2424
|
-
const
|
|
2424
|
+
const xa = cn, Ta = un, Sa = mn, ce = gn, wa = pn, Ca = fn, rs = hn, ss = kn;
|
|
2425
2425
|
rs.displayName = "Field.Description";
|
|
2426
2426
|
ss.displayName = "Field.Counter";
|
|
2427
|
-
const
|
|
2427
|
+
const ja = Dt, as = ue((e, t) => /* @__PURE__ */ i.jsx(bn, { ref: t, ...e }));
|
|
2428
2428
|
as.displayName = "Heading";
|
|
2429
|
-
const
|
|
2429
|
+
const Da = vn, is = ue((e, t) => /* @__PURE__ */ i.jsx(yn, { ref: t, ...e }));
|
|
2430
2430
|
is.displayName = "Label";
|
|
2431
|
-
const
|
|
2431
|
+
const Ge = xn, Ia = Tn, Aa = Sn, La = wn, Je = ue(
|
|
2432
2432
|
(e, t) => /* @__PURE__ */ i.jsx(Cn, { ref: t, ...e })
|
|
2433
2433
|
);
|
|
2434
2434
|
Je.displayName = "Paragraph";
|
|
2435
|
-
const Fa = jn,
|
|
2435
|
+
const Fa = jn, _a = Dn, Ea = In, Be = Object.assign(An, {
|
|
2436
2436
|
Button: _n,
|
|
2437
|
-
ClearButton:
|
|
2438
|
-
Input:
|
|
2439
|
-
}), Na =
|
|
2437
|
+
ClearButton: Fn,
|
|
2438
|
+
Input: Ln
|
|
2439
|
+
}), Na = En, Ba = Nn, Pa = Bn, ls = Pn;
|
|
2440
2440
|
ls.displayName = "Suggestion";
|
|
2441
|
-
const Ct =
|
|
2441
|
+
const Ct = Rn, Ra = Mn, Ma = zn, za = On, Oa = Hn, Ha = $n, $a = Wn, Wa = Vn, ds = ue((e, t) => /* @__PURE__ */ i.jsx(Gn, { ref: t, ...e }));
|
|
2442
2442
|
ds.displayName = "ValidationMessage";
|
|
2443
2443
|
const cs = {
|
|
2444
2444
|
NO: {
|
|
@@ -3968,7 +3968,7 @@ const cs = {
|
|
|
3968
3968
|
// Footer
|
|
3969
3969
|
footer: {}
|
|
3970
3970
|
}
|
|
3971
|
-
},
|
|
3971
|
+
}, Pt = Ut(void 0), Va = ({ children: e }) => {
|
|
3972
3972
|
const [t, n] = re("NO"), r = (a) => {
|
|
3973
3973
|
const s = a.split(".");
|
|
3974
3974
|
let o = cs[t];
|
|
@@ -3979,24 +3979,24 @@ const cs = {
|
|
|
3979
3979
|
}
|
|
3980
3980
|
return o;
|
|
3981
3981
|
};
|
|
3982
|
-
return /* @__PURE__ */ i.jsx(
|
|
3982
|
+
return /* @__PURE__ */ i.jsx(Pt.Provider, { value: { language: t, setLanguage: n, t: r }, children: e });
|
|
3983
3983
|
}, us = () => {
|
|
3984
|
-
const e = Kt(
|
|
3984
|
+
const e = Kt(Pt);
|
|
3985
3985
|
if (e === void 0)
|
|
3986
3986
|
throw new Error("useLanguage must be used within a LanguageProvider");
|
|
3987
3987
|
return e;
|
|
3988
|
-
}, ms = "_header_7c61q_1", gs = "_headerExtension_7c61q_11", ps = "_extensionContentWrapper_7c61q_25", fs = "_extensionContent_7c61q_25",
|
|
3988
|
+
}, ms = "_header_7c61q_1", gs = "_headerExtension_7c61q_11", ps = "_extensionContentWrapper_7c61q_25", fs = "_extensionContent_7c61q_25", hs = "_extensionDivider_7c61q_48", ks = "_languageSwitch_7c61q_54", bs = "_languageLabel_7c61q_62", vs = "_languageLink_7c61q_68", ys = "_headerInner_7c61q_82", xs = "_logoWrapper_7c61q_96", Ts = "_logo_7c61q_96", Ss = "_secondaryLogoWrapper_7c61q_115", ws = "_slotComponent_7c61q_124", Cs = "_slotContainer_7c61q_134", js = "_slotText_7c61q_142", Ds = "_secondaryLogo_7c61q_115", Is = "_redCrossLogo_7c61q_169", As = "_navItems_7c61q_175", Ls = "_navLink_7c61q_184", Fs = "_actions_7c61q_197", _s = "_ctaButton_7c61q_205", Es = "_themeToggle_7c61q_210", Ns = "_userInfo_7c61q_215", Bs = "_userName_7c61q_221", Ps = "_loginLink_7c61q_228", Rs = "_loginText_7c61q_237", Ms = "_underline_7c61q_244", zs = "_searchButtonWrapper_7c61q_250", Os = "_buttonText_7c61q_254", Hs = "_menuButton_7c61q_259", $s = "_menuOverlay_7c61q_264", Ws = "_searchOverlay_7c61q_276", Vs = "_searchContent_7c61q_294", Gs = "_menuContent_7c61q_304", qs = "_menuLeftColumn_7c61q_313", Us = "_menuRightColumn_7c61q_318", Ks = "_slotContent_7c61q_332", Ys = "_suggestionsSection_7c61q_341", Js = "_suggestionsTitle_7c61q_347", Zs = "_searchResults_7c61q_356", Xs = "_resultList_7c61q_362", Qs = "_resultItem_7c61q_368", ea = "_resultLink_7c61q_376", ta = "_suggestionIcon_7c61q_390", na = "_suggestionText_7c61q_403", oa = "_highlightedText_7c61q_410", ra = "_remainingText_7c61q_415", sa = "_viewAllLink_7c61q_428", aa = "_noResults_7c61q_463", C = {
|
|
3989
3989
|
header: ms,
|
|
3990
3990
|
headerExtension: gs,
|
|
3991
3991
|
extensionContentWrapper: ps,
|
|
3992
3992
|
extensionContent: fs,
|
|
3993
|
-
extensionDivider:
|
|
3994
|
-
languageSwitch:
|
|
3993
|
+
extensionDivider: hs,
|
|
3994
|
+
languageSwitch: ks,
|
|
3995
3995
|
languageLabel: bs,
|
|
3996
3996
|
languageLink: vs,
|
|
3997
3997
|
headerInner: ys,
|
|
3998
|
-
logoWrapper:
|
|
3999
|
-
logo:
|
|
3998
|
+
logoWrapper: xs,
|
|
3999
|
+
logo: Ts,
|
|
4000
4000
|
secondaryLogoWrapper: Ss,
|
|
4001
4001
|
slotComponent: ws,
|
|
4002
4002
|
slotContainer: Cs,
|
|
@@ -4004,23 +4004,23 @@ const cs = {
|
|
|
4004
4004
|
secondaryLogo: Ds,
|
|
4005
4005
|
redCrossLogo: Is,
|
|
4006
4006
|
navItems: As,
|
|
4007
|
-
navLink:
|
|
4008
|
-
actions:
|
|
4007
|
+
navLink: Ls,
|
|
4008
|
+
actions: Fs,
|
|
4009
4009
|
ctaButton: _s,
|
|
4010
|
-
themeToggle:
|
|
4011
|
-
userInfo:
|
|
4012
|
-
userName:
|
|
4013
|
-
loginLink:
|
|
4014
|
-
loginText:
|
|
4015
|
-
underline:
|
|
4016
|
-
searchButtonWrapper:
|
|
4017
|
-
buttonText:
|
|
4018
|
-
menuButton:
|
|
4019
|
-
menuOverlay:
|
|
4020
|
-
searchOverlay:
|
|
4021
|
-
searchContent:
|
|
4022
|
-
menuContent:
|
|
4023
|
-
menuLeftColumn:
|
|
4010
|
+
themeToggle: Es,
|
|
4011
|
+
userInfo: Ns,
|
|
4012
|
+
userName: Bs,
|
|
4013
|
+
loginLink: Ps,
|
|
4014
|
+
loginText: Rs,
|
|
4015
|
+
underline: Ms,
|
|
4016
|
+
searchButtonWrapper: zs,
|
|
4017
|
+
buttonText: Os,
|
|
4018
|
+
menuButton: Hs,
|
|
4019
|
+
menuOverlay: $s,
|
|
4020
|
+
searchOverlay: Ws,
|
|
4021
|
+
searchContent: Vs,
|
|
4022
|
+
menuContent: Gs,
|
|
4023
|
+
menuLeftColumn: qs,
|
|
4024
4024
|
menuRightColumn: Us,
|
|
4025
4025
|
slotContent: Ks,
|
|
4026
4026
|
suggestionsSection: Ys,
|
|
@@ -4111,17 +4111,24 @@ const cs = {
|
|
|
4111
4111
|
onCtaClick: u,
|
|
4112
4112
|
showThemeToggle: y = !1,
|
|
4113
4113
|
secondaryLogo: f = !1,
|
|
4114
|
-
secondaryLogoSrc:
|
|
4114
|
+
secondaryLogoSrc: k,
|
|
4115
4115
|
secondaryLogoSrcDark: g,
|
|
4116
|
-
secondaryLogoAlt:
|
|
4116
|
+
secondaryLogoAlt: h = "Secondary Logo",
|
|
4117
4117
|
navItems: b,
|
|
4118
4118
|
showNavItems: v = !0,
|
|
4119
4119
|
showMenuButton: p = !0,
|
|
4120
4120
|
showHeaderExtension: m = !1,
|
|
4121
|
-
showModeToggle:
|
|
4122
|
-
showLanguageSwitch:
|
|
4121
|
+
showModeToggle: x = !1,
|
|
4122
|
+
showLanguageSwitch: F = !1
|
|
4123
4123
|
}) => {
|
|
4124
|
-
const [_, A] = re(!1), [w, D] = re(!1), [
|
|
4124
|
+
const [_, A] = re(!1), [w, D] = re(!1), [L, z] = re(""), [B, O] = re("light"), { language: P, setLanguage: R, t: j } = us();
|
|
4125
|
+
se(() => {
|
|
4126
|
+
const S = "rk-header-inline-styles";
|
|
4127
|
+
if (typeof document > "u" || document.getElementById(S)) return;
|
|
4128
|
+
const E = la(C), q = document.createElement("style");
|
|
4129
|
+
q.id = S, q.textContent = E, document.head.appendChild(q);
|
|
4130
|
+
}, []);
|
|
4131
|
+
const Q = () => /* @__PURE__ */ i.jsxs(
|
|
4125
4132
|
"svg",
|
|
4126
4133
|
{
|
|
4127
4134
|
width: "170",
|
|
@@ -4146,42 +4153,42 @@ const cs = {
|
|
|
4146
4153
|
]
|
|
4147
4154
|
}
|
|
4148
4155
|
);
|
|
4149
|
-
|
|
4150
|
-
A(!1), D(!1),
|
|
4156
|
+
se(() => {
|
|
4157
|
+
A(!1), D(!1), z("");
|
|
4151
4158
|
}, [e]);
|
|
4152
|
-
const
|
|
4153
|
-
const S =
|
|
4154
|
-
|
|
4155
|
-
},
|
|
4159
|
+
const K = () => {
|
|
4160
|
+
const S = B === "light" ? "dark" : "light";
|
|
4161
|
+
O(S), document.documentElement.setAttribute("data-color-scheme", S);
|
|
4162
|
+
}, Y = (S) => {
|
|
4156
4163
|
t && (S.preventDefault(), t("home")), A(!1), D(!1);
|
|
4157
|
-
},
|
|
4164
|
+
}, J = () => {
|
|
4158
4165
|
A(!_), w && D(!1);
|
|
4159
4166
|
}, te = () => {
|
|
4160
4167
|
D(!w), _ && A(!1);
|
|
4161
4168
|
}, c = ve(() => {
|
|
4162
|
-
if (!
|
|
4163
|
-
const S =
|
|
4169
|
+
if (!L.trim()) return [];
|
|
4170
|
+
const S = L.toLowerCase();
|
|
4164
4171
|
return ia.filter(
|
|
4165
|
-
(
|
|
4172
|
+
(E) => E.title.toLowerCase().startsWith(S)
|
|
4166
4173
|
);
|
|
4167
|
-
}, [
|
|
4168
|
-
t && t(S), D(!1),
|
|
4174
|
+
}, [L]), I = (S) => {
|
|
4175
|
+
t && t(S), D(!1), z("");
|
|
4169
4176
|
};
|
|
4170
4177
|
return /* @__PURE__ */ i.jsxs("header", { className: C.header, children: [
|
|
4171
4178
|
m && /* @__PURE__ */ i.jsx("div", { className: C.headerExtension, "data-color-scheme": "light", children: /* @__PURE__ */ i.jsxs("div", { className: C.extensionContentWrapper, children: [
|
|
4172
|
-
|
|
4179
|
+
x && /* @__PURE__ */ i.jsx("div", { className: C.extensionContent, children: /* @__PURE__ */ i.jsx(
|
|
4173
4180
|
Ct,
|
|
4174
4181
|
{
|
|
4175
4182
|
"data-size": "sm",
|
|
4176
|
-
checked:
|
|
4177
|
-
onChange:
|
|
4183
|
+
checked: B === "dark",
|
|
4184
|
+
onChange: K,
|
|
4178
4185
|
label: j("header.darkMode"),
|
|
4179
4186
|
color: "neutral",
|
|
4180
4187
|
"data-color-scheme": "light"
|
|
4181
4188
|
}
|
|
4182
4189
|
) }),
|
|
4183
|
-
|
|
4184
|
-
|
|
4190
|
+
x && F && /* @__PURE__ */ i.jsx("div", { className: C.extensionDivider }),
|
|
4191
|
+
F && /* @__PURE__ */ i.jsxs("div", { className: C.languageSwitch, children: [
|
|
4185
4192
|
/* @__PURE__ */ i.jsx("span", { className: C.languageLabel, children: j("header.language") }),
|
|
4186
4193
|
/* @__PURE__ */ i.jsxs(ce.TriggerContext, { children: [
|
|
4187
4194
|
/* @__PURE__ */ i.jsxs(
|
|
@@ -4191,7 +4198,7 @@ const cs = {
|
|
|
4191
4198
|
"aria-label": j("header.selectLanguage"),
|
|
4192
4199
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4193
4200
|
children: [
|
|
4194
|
-
|
|
4201
|
+
P,
|
|
4195
4202
|
" ",
|
|
4196
4203
|
/* @__PURE__ */ i.jsx(Qn, { "aria-hidden": !0 })
|
|
4197
4204
|
]
|
|
@@ -4200,11 +4207,11 @@ const cs = {
|
|
|
4200
4207
|
/* @__PURE__ */ i.jsx(
|
|
4201
4208
|
ce,
|
|
4202
4209
|
{
|
|
4203
|
-
"data-color-scheme":
|
|
4210
|
+
"data-color-scheme": B,
|
|
4204
4211
|
placement: "bottom-end",
|
|
4205
4212
|
children: /* @__PURE__ */ i.jsxs(ce.List, { children: [
|
|
4206
|
-
/* @__PURE__ */ i.jsx(ce.Item, { children: /* @__PURE__ */ i.jsx(ce.Button, { onClick: () =>
|
|
4207
|
-
/* @__PURE__ */ i.jsx(ce.Item, { children: /* @__PURE__ */ i.jsx(ce.Button, { onClick: () =>
|
|
4213
|
+
/* @__PURE__ */ i.jsx(ce.Item, { children: /* @__PURE__ */ i.jsx(ce.Button, { onClick: () => R("NO"), children: "Norsk (NO)" }) }),
|
|
4214
|
+
/* @__PURE__ */ i.jsx(ce.Item, { children: /* @__PURE__ */ i.jsx(ce.Button, { onClick: () => R("EN"), children: "English (EN)" }) })
|
|
4208
4215
|
] })
|
|
4209
4216
|
}
|
|
4210
4217
|
)
|
|
@@ -4213,27 +4220,27 @@ const cs = {
|
|
|
4213
4220
|
] }) }),
|
|
4214
4221
|
/* @__PURE__ */ i.jsxs("div", { className: C.headerInner, children: [
|
|
4215
4222
|
/* @__PURE__ */ i.jsxs("div", { className: C.logoWrapper, children: [
|
|
4216
|
-
/* @__PURE__ */ i.jsx(
|
|
4217
|
-
/* @__PURE__ */ i.jsx("div", { className: C.secondaryLogoWrapper, children: f &&
|
|
4223
|
+
/* @__PURE__ */ i.jsx(Ge, { href: "/", className: C.logo, "aria-label": j("header.homeAriaLabel"), onClick: Y, children: /* @__PURE__ */ i.jsx(Q, {}) }),
|
|
4224
|
+
/* @__PURE__ */ i.jsx("div", { className: C.secondaryLogoWrapper, children: f && k ? /* @__PURE__ */ i.jsx(
|
|
4218
4225
|
"img",
|
|
4219
4226
|
{
|
|
4220
|
-
src:
|
|
4221
|
-
alt:
|
|
4227
|
+
src: B === "dark" && g ? g : k,
|
|
4228
|
+
alt: h,
|
|
4222
4229
|
className: C.secondaryLogo
|
|
4223
4230
|
}
|
|
4224
4231
|
) : f ? /* @__PURE__ */ i.jsx("div", { className: C.slotComponent, children: /* @__PURE__ */ i.jsx("div", { className: C.slotContainer, children: /* @__PURE__ */ i.jsx("p", { className: C.slotText, children: "SLOT" }) }) }) : null })
|
|
4225
4232
|
] }),
|
|
4226
|
-
v && b && b.length > 0 && /* @__PURE__ */ i.jsx("nav", { className: C.navItems, children: b.map((S,
|
|
4227
|
-
|
|
4233
|
+
v && b && b.length > 0 && /* @__PURE__ */ i.jsx("nav", { className: C.navItems, children: b.map((S, E) => /* @__PURE__ */ i.jsx(
|
|
4234
|
+
Ge,
|
|
4228
4235
|
{
|
|
4229
4236
|
href: S.href,
|
|
4230
4237
|
className: C.navLink,
|
|
4231
|
-
onClick: (
|
|
4232
|
-
t && (
|
|
4238
|
+
onClick: (q) => {
|
|
4239
|
+
t && (q.preventDefault(), t(S.href));
|
|
4233
4240
|
},
|
|
4234
4241
|
children: S.label
|
|
4235
4242
|
},
|
|
4236
|
-
|
|
4243
|
+
E
|
|
4237
4244
|
)) }),
|
|
4238
4245
|
/* @__PURE__ */ i.jsxs("div", { className: C.actions, children: [
|
|
4239
4246
|
o && /* @__PURE__ */ i.jsxs(
|
|
@@ -4253,14 +4260,14 @@ const cs = {
|
|
|
4253
4260
|
!m && y && /* @__PURE__ */ i.jsx("div", { className: C.themeToggle, children: /* @__PURE__ */ i.jsx(
|
|
4254
4261
|
Ct,
|
|
4255
4262
|
{
|
|
4256
|
-
checked:
|
|
4257
|
-
onChange:
|
|
4263
|
+
checked: B === "dark",
|
|
4264
|
+
onChange: K,
|
|
4258
4265
|
"aria-label": j("header.toggleTheme")
|
|
4259
4266
|
}
|
|
4260
4267
|
) }),
|
|
4261
4268
|
r && /* @__PURE__ */ i.jsxs("div", { className: C.userInfo, children: [
|
|
4262
4269
|
/* @__PURE__ */ i.jsx(Je, { "data-size": "md", className: C.userName, children: "Frodo Baggins" }),
|
|
4263
|
-
/* @__PURE__ */ i.jsx(
|
|
4270
|
+
/* @__PURE__ */ i.jsx(Lt, { "aria-label": "Frodo Baggins", "data-color": "main", variant: "circle", initials: "FB" })
|
|
4264
4271
|
] }),
|
|
4265
4272
|
s && /* @__PURE__ */ i.jsxs("a", { href: "#", className: C.loginLink, children: [
|
|
4266
4273
|
/* @__PURE__ */ i.jsx("span", { className: C.loginText, children: j("header.login") }),
|
|
@@ -4287,7 +4294,7 @@ const cs = {
|
|
|
4287
4294
|
variant: "primary",
|
|
4288
4295
|
"data-color": "main",
|
|
4289
4296
|
"data-size": "md",
|
|
4290
|
-
onClick:
|
|
4297
|
+
onClick: J,
|
|
4291
4298
|
"aria-expanded": _,
|
|
4292
4299
|
"aria-label": j(_ ? "header.closeMenu" : "header.openMenu"),
|
|
4293
4300
|
className: C.menuButton,
|
|
@@ -4304,20 +4311,20 @@ const cs = {
|
|
|
4304
4311
|
/* @__PURE__ */ i.jsx("div", { className: C.menuRightColumn, children: /* @__PURE__ */ i.jsx("div", { className: C.slotContent, children: n }) })
|
|
4305
4312
|
] }) }),
|
|
4306
4313
|
w && /* @__PURE__ */ i.jsx("div", { className: C.searchOverlay, children: /* @__PURE__ */ i.jsxs("div", { className: C.searchContent, children: [
|
|
4307
|
-
/* @__PURE__ */ i.jsxs(
|
|
4314
|
+
/* @__PURE__ */ i.jsxs(Be, { children: [
|
|
4308
4315
|
/* @__PURE__ */ i.jsx(
|
|
4309
|
-
|
|
4316
|
+
Be.Input,
|
|
4310
4317
|
{
|
|
4311
4318
|
"aria-label": j("header.search"),
|
|
4312
4319
|
placeholder: j("header.searchPlaceholder"),
|
|
4313
|
-
value:
|
|
4314
|
-
onChange: (S) =>
|
|
4320
|
+
value: L,
|
|
4321
|
+
onChange: (S) => z(S.target.value)
|
|
4315
4322
|
}
|
|
4316
4323
|
),
|
|
4317
|
-
/* @__PURE__ */ i.jsx(
|
|
4318
|
-
/* @__PURE__ */ i.jsx(
|
|
4324
|
+
/* @__PURE__ */ i.jsx(Be.Button, { "aria-label": j("header.search") }),
|
|
4325
|
+
/* @__PURE__ */ i.jsx(Be.ClearButton, { onClick: () => z(""), "aria-label": j("header.clearSearch") })
|
|
4319
4326
|
] }),
|
|
4320
|
-
|
|
4327
|
+
L && /* @__PURE__ */ i.jsx("div", { className: C.searchResults, children: c.length > 0 ? /* @__PURE__ */ i.jsxs("div", { className: C.suggestionsSection, children: [
|
|
4321
4328
|
/* @__PURE__ */ i.jsx("h3", { className: C.suggestionsTitle, children: j("header.suggestions") }),
|
|
4322
4329
|
/* @__PURE__ */ i.jsx("ul", { className: C.resultList, children: c.slice(0, 5).map((S) => /* @__PURE__ */ i.jsx("li", { className: C.resultItem, children: /* @__PURE__ */ i.jsxs(
|
|
4323
4330
|
"button",
|
|
@@ -4327,26 +4334,26 @@ const cs = {
|
|
|
4327
4334
|
children: [
|
|
4328
4335
|
/* @__PURE__ */ i.jsx("span", { className: C.suggestionIcon, children: /* @__PURE__ */ i.jsx(gt, { "aria-hidden": !0 }) }),
|
|
4329
4336
|
/* @__PURE__ */ i.jsx("span", { className: C.suggestionText, children: (() => {
|
|
4330
|
-
const
|
|
4331
|
-
if (
|
|
4332
|
-
const
|
|
4337
|
+
const E = S.title.toLowerCase().indexOf(L.toLowerCase());
|
|
4338
|
+
if (E === -1) return /* @__PURE__ */ i.jsx("span", { className: C.remainingText, children: S.title });
|
|
4339
|
+
const q = S.title.slice(0, E), G = S.title.slice(E, E + L.length), N = S.title.slice(E + L.length);
|
|
4333
4340
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4334
|
-
/* @__PURE__ */ i.jsx("span", { className: C.remainingText, children:
|
|
4335
|
-
/* @__PURE__ */ i.jsx("span", { className: C.highlightedText, children:
|
|
4336
|
-
/* @__PURE__ */ i.jsx("span", { className: C.remainingText, children:
|
|
4341
|
+
/* @__PURE__ */ i.jsx("span", { className: C.remainingText, children: q }),
|
|
4342
|
+
/* @__PURE__ */ i.jsx("span", { className: C.highlightedText, children: G }),
|
|
4343
|
+
/* @__PURE__ */ i.jsx("span", { className: C.remainingText, children: N })
|
|
4337
4344
|
] });
|
|
4338
4345
|
})() })
|
|
4339
4346
|
]
|
|
4340
4347
|
}
|
|
4341
4348
|
) }, S.id)) }),
|
|
4342
4349
|
c.length > 5 && /* @__PURE__ */ i.jsxs(
|
|
4343
|
-
|
|
4350
|
+
Ge,
|
|
4344
4351
|
{
|
|
4345
4352
|
href: "#",
|
|
4346
4353
|
"data-color": "neutral",
|
|
4347
4354
|
className: C.viewAllLink,
|
|
4348
4355
|
onClick: (S) => {
|
|
4349
|
-
S.preventDefault(), t && t(`search/${
|
|
4356
|
+
S.preventDefault(), t && t(`search/${L}`), D(!1), z("");
|
|
4350
4357
|
},
|
|
4351
4358
|
children: [
|
|
4352
4359
|
j("header.viewAll"),
|
|
@@ -4359,66 +4366,175 @@ const cs = {
|
|
|
4359
4366
|
] }) : /* @__PURE__ */ i.jsx("div", { className: C.noResults, children: /* @__PURE__ */ i.jsxs(Je, { children: [
|
|
4360
4367
|
j("header.noResults"),
|
|
4361
4368
|
' "',
|
|
4362
|
-
|
|
4369
|
+
L,
|
|
4363
4370
|
'"'
|
|
4364
4371
|
] }) }) })
|
|
4365
4372
|
] }) })
|
|
4366
4373
|
] });
|
|
4367
4374
|
};
|
|
4375
|
+
function la(e) {
|
|
4376
|
+
const t = e;
|
|
4377
|
+
return `
|
|
4378
|
+
.${t.header} {
|
|
4379
|
+
width: 100%;
|
|
4380
|
+
background-color: var(--ds-color-neutral-background-default);
|
|
4381
|
+
border-bottom: 1px solid var(--ds-color-neutral-border-subtle);
|
|
4382
|
+
position: relative;
|
|
4383
|
+
z-index: 1000;
|
|
4384
|
+
display: flex;
|
|
4385
|
+
flex-direction: column;
|
|
4386
|
+
}
|
|
4387
|
+
.${t.headerExtension} {
|
|
4388
|
+
background-color: var(--ds-color-primary-color-red-base-default, #D52B1E);
|
|
4389
|
+
width: 100%;
|
|
4390
|
+
height: 44px;
|
|
4391
|
+
padding: 0 var(--ds-size-6);
|
|
4392
|
+
display: flex;
|
|
4393
|
+
justify-content: center;
|
|
4394
|
+
align-items: center;
|
|
4395
|
+
box-sizing: border-box;
|
|
4396
|
+
color: white;
|
|
4397
|
+
}
|
|
4398
|
+
.${t.extensionContentWrapper} {
|
|
4399
|
+
width: 100%;
|
|
4400
|
+
max-width: 1364px;
|
|
4401
|
+
display: flex;
|
|
4402
|
+
justify-content: flex-end;
|
|
4403
|
+
align-items: center;
|
|
4404
|
+
gap: var(--ds-size-4);
|
|
4405
|
+
}
|
|
4406
|
+
.${t.extensionDivider} { width: 1px; height: 18px; background-color: rgba(247,233,232,1); }
|
|
4407
|
+
.${t.languageSwitch} { display: flex; align-items: center; gap: var(--ds-size-2); }
|
|
4408
|
+
.${t.languageLabel} { font-family: var(--ds-font-family); font-size: var(--ds-font-size-md); color: #ECECEC; }
|
|
4409
|
+
.${t.languageLink} { color: white; text-decoration: none; display: flex; align-items: center; gap: 4px; }
|
|
4410
|
+
.${t.headerInner} {
|
|
4411
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
4412
|
+
min-height: 119px; width: 100%; max-width: 1364px;
|
|
4413
|
+
margin: 0 auto; padding: 0 var(--ds-size-6); box-sizing: border-box; gap: var(--ds-size-6);
|
|
4414
|
+
}
|
|
4415
|
+
.${t.logoWrapper} { display: flex; align-items: center; height: 119px; flex-shrink: 0; background-color: white; }
|
|
4416
|
+
.${t.logo} { display: flex; align-items: center; justify-content: center; width: 217px; height: 100%; text-decoration: none; color: inherit; flex-shrink: 0; }
|
|
4417
|
+
.${t.redCrossLogo} { width: 169px; height: auto; display: block; }
|
|
4418
|
+
.${t.secondaryLogoWrapper} { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 var(--ds-size-6); background: var(--ds-color-neutral-background-default); }
|
|
4419
|
+
.${t.secondaryLogo} { height: 24px; width: auto; display: block; }
|
|
4420
|
+
.${t.navItems} { display: flex; gap: 40px; align-items: center; margin-left: 24px; flex-grow: 1; justify-content: center; }
|
|
4421
|
+
.${t.navLink} { color: var(--ds-color-primary-color-red-text-default); font-family: var(--ds-font-family); font-size: var(--ds-font-size-md); text-decoration: none; font-weight: var(--ds-font-weight-regular); letter-spacing: 0.09px; }
|
|
4422
|
+
.${t.navLink}:hover { text-decoration: underline; }
|
|
4423
|
+
.${t.actions} { display: flex; align-items: center; gap: var(--ds-size-6); flex-shrink: 0; margin-left: auto; }
|
|
4424
|
+
.${t.ctaButton} { display: flex; align-items: center; }
|
|
4425
|
+
.${t.themeToggle} { display: flex; align-items: center; }
|
|
4426
|
+
.${t.userInfo} { display: flex; align-items: center; gap: var(--ds-size-3); }
|
|
4427
|
+
.${t.userName} { display: block; font-family: var(--ds-font-family); font-size: var(--ds-font-size-md); color: var(--ds-color-neutral-text-default); }
|
|
4428
|
+
.${t.loginLink} { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ds-color-main-text-subtle); gap: 2px; }
|
|
4429
|
+
.${t.loginText} { font-family: var(--ds-font-family); font-size: var(--ds-font-size-md); font-weight: var(--ds-font-weight-regular); line-height: 1.5; }
|
|
4430
|
+
.${t.underline} { width: 100%; height: 1px; background-color: var(--ds-color-main-border-strong); }
|
|
4431
|
+
.${t.searchButtonWrapper} { display: flex; }
|
|
4432
|
+
.${t.buttonText} { display: inline-block; margin-left: var(--ds-size-2); }
|
|
4433
|
+
.${t.menuButton} { display: flex; align-items: center; }
|
|
4434
|
+
.${t.menuOverlay}, .${t.searchOverlay} {
|
|
4435
|
+
position: absolute; top: 100%; left: 0; width: 100%;
|
|
4436
|
+
background-color: var(--ds-color-neutral-background-default);
|
|
4437
|
+
border-bottom: 1px solid var(--ds-color-neutral-border-subtle);
|
|
4438
|
+
box-shadow: var(--ds-shadow-lg); z-index: 999;
|
|
4439
|
+
}
|
|
4440
|
+
.${t.searchOverlay} { padding: var(--ds-size-10) 0; }
|
|
4441
|
+
.${t.searchContent} {
|
|
4442
|
+
max-width: 1364px; margin: 0 auto;
|
|
4443
|
+
padding: 0 var(--ds-size-6) 0 calc(217px + var(--ds-size-6));
|
|
4444
|
+
display: flex; flex-direction: column; align-items: stretch; box-sizing: border-box;
|
|
4445
|
+
}
|
|
4446
|
+
.${t.menuContent} { max-width: 1364px; margin: 0 auto; display: flex; flex-direction: row; align-items: stretch; box-sizing: border-box; }
|
|
4447
|
+
.${t.menuLeftColumn} { width: calc(217px + var(--ds-size-6)); flex-shrink: 0; }
|
|
4448
|
+
.${t.menuRightColumn} { flex: 1; display: flex; flex-direction: column; padding: 48px 24px 80px 24px; gap: 24px; }
|
|
4449
|
+
.${t.slotContent} { width: 100%; padding: var(--ds-size-10) 0; text-align: center; color: var(--ds-color-neutral-text-subtle); font-size: var(--ds-font-size-md); border-radius: var(--ds-border-radius-md); }
|
|
4450
|
+
.${t.suggestionsSection} { display: flex; flex-direction: column; gap: var(--ds-size-4); }
|
|
4451
|
+
.${t.suggestionsTitle} { font-family: var(--ds-font-family); font-size: var(--ds-font-size-md); color: var(--ds-color-neutral-text-subtle); font-weight: var(--ds-font-weight-regular); margin: 0; letter-spacing: 0.09px; }
|
|
4452
|
+
.${t.searchResults} { margin-top: var(--ds-size-4); max-height: 400px; overflow-y: auto; }
|
|
4453
|
+
.${t.resultList} { list-style: none; padding: 0; margin: 0; }
|
|
4454
|
+
.${t.resultItem} { border-bottom: none; }
|
|
4455
|
+
.${t.resultLink} {
|
|
4456
|
+
display: flex; flex-direction: row; align-items: center; width: 100%;
|
|
4457
|
+
padding: var(--ds-size-2) 0; background: none; border: none;
|
|
4458
|
+
text-align: left; cursor: pointer; gap: var(--ds-size-4); text-decoration: none;
|
|
4459
|
+
}
|
|
4460
|
+
.${t.suggestionIcon} { font-size: 20px; color: var(--ds-color-neutral-text-subtle); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
4461
|
+
.${t.suggestionText} { font-family: var(--ds-font-family); font-size: var(--ds-font-size-md); color: var(--ds-color-neutral-text-default); line-height: 1.5; }
|
|
4462
|
+
.${t.highlightedText} { color: var(--ds-color-primary-color-red-text-default); font-weight: var(--ds-font-weight-medium); }
|
|
4463
|
+
.${t.remainingText} { color: var(--ds-color-neutral-border-subtle); }
|
|
4464
|
+
.${t.viewAllLink} { display: block; padding: var(--ds-size-3); text-align: left; font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-medium); color: var(--ds-color-neutral-text-default); text-decoration: none; }
|
|
4465
|
+
.${t.noResults} { padding: var(--ds-size-4); text-align: center; color: var(--ds-color-neutral-text-subtle); }
|
|
4466
|
+
@media (max-width: 767px) {
|
|
4467
|
+
.${t.headerInner} { padding: var(--ds-size-5) var(--ds-size-6); min-height: auto; }
|
|
4468
|
+
.${t.navItems} { display: none; }
|
|
4469
|
+
.${t.logoWrapper} { gap: var(--ds-size-2); }
|
|
4470
|
+
.${t.logo} { height: 40px; }
|
|
4471
|
+
.${t.secondaryLogo} { height: 28px; }
|
|
4472
|
+
.${t.actions} { gap: var(--ds-size-4); }
|
|
4473
|
+
.${t.userName} { display: none; }
|
|
4474
|
+
.${t.menuButton} .${t.buttonText} { display: none; }
|
|
4475
|
+
.${t.searchButtonWrapper} .${t.buttonText} { display: inline; }
|
|
4476
|
+
.${t.menuOverlay}, .${t.searchOverlay} { width: 100%; right: 0; left: 0; border-radius: 0; border: none; border-bottom: 1px solid var(--ds-color-neutral-border-subtle); }
|
|
4477
|
+
.${t.searchContent} { padding: 0 var(--ds-size-6); }
|
|
4478
|
+
.${t.menuContent} { flex-direction: column; padding: 0; }
|
|
4479
|
+
.${t.menuLeftColumn} { display: none; }
|
|
4480
|
+
.${t.menuRightColumn} { padding: var(--ds-size-6); gap: var(--ds-size-4); }
|
|
4481
|
+
}
|
|
4482
|
+
`;
|
|
4483
|
+
}
|
|
4368
4484
|
export {
|
|
4369
4485
|
so as Alert,
|
|
4370
|
-
|
|
4486
|
+
Lt as Avatar,
|
|
4371
4487
|
ao as Badge,
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4488
|
+
ga as BadgePosition,
|
|
4489
|
+
pa as Breadcrumbs,
|
|
4490
|
+
ha as BreadcrumbsItem,
|
|
4375
4491
|
ka as BreadcrumbsLink,
|
|
4376
|
-
|
|
4492
|
+
fa as BreadcrumbsList,
|
|
4377
4493
|
ye as Button,
|
|
4378
4494
|
io as Card,
|
|
4379
|
-
|
|
4495
|
+
ba as CardBlock,
|
|
4380
4496
|
os as Carousel,
|
|
4381
4497
|
lo as Checkbox,
|
|
4382
|
-
|
|
4498
|
+
ya as Chip,
|
|
4383
4499
|
ir as DateInput,
|
|
4384
4500
|
Qo as DatePicker,
|
|
4385
|
-
|
|
4501
|
+
xa as Details,
|
|
4386
4502
|
Ta as Dialog,
|
|
4387
|
-
|
|
4503
|
+
Sa as Divider,
|
|
4388
4504
|
ce as Dropdown,
|
|
4389
|
-
|
|
4390
|
-
|
|
4505
|
+
wa as ErrorSummary,
|
|
4506
|
+
Ca as Field,
|
|
4391
4507
|
ss as FieldCounter,
|
|
4392
4508
|
rs as FieldDescription,
|
|
4393
|
-
|
|
4509
|
+
ja as Fieldset,
|
|
4394
4510
|
Ga as Header,
|
|
4395
4511
|
as as Heading,
|
|
4396
|
-
|
|
4512
|
+
Da as Input,
|
|
4397
4513
|
is as Label,
|
|
4398
4514
|
Va as LanguageProvider,
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4515
|
+
Ge as Link,
|
|
4516
|
+
Ia as List,
|
|
4517
|
+
Aa as Pagination,
|
|
4402
4518
|
Je as Paragraph,
|
|
4403
4519
|
Fa as Popover,
|
|
4404
|
-
|
|
4405
|
-
|
|
4520
|
+
_a as Radio,
|
|
4521
|
+
Be as Search,
|
|
4406
4522
|
Na as Select,
|
|
4407
|
-
|
|
4523
|
+
Ba as SkeletonLoader,
|
|
4408
4524
|
Pa as SkipLink,
|
|
4409
4525
|
ns as Spinner,
|
|
4410
4526
|
ls as Suggestion,
|
|
4411
4527
|
Ct as Switch,
|
|
4412
|
-
|
|
4528
|
+
Ra as Table,
|
|
4413
4529
|
Ma as Tabs,
|
|
4414
|
-
|
|
4530
|
+
za as Tag,
|
|
4415
4531
|
Oa as Textarea,
|
|
4416
4532
|
Ha as Textfield,
|
|
4417
|
-
|
|
4418
|
-
|
|
4533
|
+
$a as ToggleGroup,
|
|
4534
|
+
Wa as Tooltip,
|
|
4419
4535
|
ds as ValidationMessage,
|
|
4420
|
-
|
|
4536
|
+
va as useCheckboxGroup,
|
|
4421
4537
|
us as useLanguage,
|
|
4422
|
-
|
|
4423
|
-
|
|
4538
|
+
La as usePagination,
|
|
4539
|
+
Ea as useRadioGroup
|
|
4424
4540
|
};
|