@oslokommune/punkt-react 13.15.4 → 13.15.6
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/punkt-react.es.js
CHANGED
|
@@ -67,24 +67,24 @@ const $n = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
|
|
|
67
67
|
n === void 0 ? (i[t] = e, e == null && t in HTMLElement.prototype && i.removeAttribute(t)) : e !== s && ((r, l, d) => {
|
|
68
68
|
let p = Gs.get(r);
|
|
69
69
|
p === void 0 && Gs.set(r, p = /* @__PURE__ */ new Map());
|
|
70
|
-
let
|
|
71
|
-
d !== void 0 ?
|
|
70
|
+
let m = p.get(l);
|
|
71
|
+
d !== void 0 ? m === void 0 ? (p.set(l, m = { handleEvent: d }), r.addEventListener(l, m)) : m.handleEvent = d : m !== void 0 && (p.delete(l), r.removeEventListener(l, m));
|
|
72
72
|
})(i, n, e);
|
|
73
73
|
}, Jt = ({ react: i, tagName: t, elementClass: e, events: s, displayName: a }) => {
|
|
74
74
|
const n = new Set(Object.keys(s ?? {})), r = i.forwardRef(((l, d) => {
|
|
75
|
-
const p = i.useRef(/* @__PURE__ */ new Map()),
|
|
76
|
-
for (const [b, k] of Object.entries(l)) $n.has(b) ?
|
|
75
|
+
const p = i.useRef(/* @__PURE__ */ new Map()), m = i.useRef(null), f = {}, y = {};
|
|
76
|
+
for (const [b, k] of Object.entries(l)) $n.has(b) ? f[b === "className" ? "class" : b] = k : n.has(b) || b in e.prototype ? y[b] = k : f[b] = k;
|
|
77
77
|
return i.useLayoutEffect((() => {
|
|
78
|
-
if (
|
|
78
|
+
if (m.current === null) return;
|
|
79
79
|
const b = /* @__PURE__ */ new Map();
|
|
80
|
-
for (const k in y) Ys(
|
|
81
|
-
for (const [k, w] of p.current) Ys(
|
|
80
|
+
for (const k in y) Ys(m.current, k, l[k], p.current.get(k), s), p.current.delete(k), b.set(k, l[k]);
|
|
81
|
+
for (const [k, w] of p.current) Ys(m.current, k, void 0, w, s);
|
|
82
82
|
p.current = b;
|
|
83
83
|
})), i.useLayoutEffect((() => {
|
|
84
84
|
var b;
|
|
85
|
-
(b =
|
|
86
|
-
}), []),
|
|
87
|
-
|
|
85
|
+
(b = m.current) == null || b.removeAttribute("defer-hydration");
|
|
86
|
+
}), []), f.suppressHydrationWarning = !0, i.createElement(t, { ...f, ref: i.useCallback(((b) => {
|
|
87
|
+
m.current = b, typeof d == "function" ? d(b) : d !== null && (d.current = b);
|
|
88
88
|
}), [d]) });
|
|
89
89
|
}));
|
|
90
90
|
return r.displayName = a ?? e.name, r;
|
|
@@ -106,10 +106,10 @@ const Sn = (i, t) => {
|
|
|
106
106
|
let a, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = mi;
|
|
107
107
|
for (let l = 0; l < e; l++) {
|
|
108
108
|
const d = i[l];
|
|
109
|
-
let p,
|
|
110
|
-
for (; y < d.length && (r.lastIndex = y,
|
|
109
|
+
let p, m, f = -1, y = 0;
|
|
110
|
+
for (; y < d.length && (r.lastIndex = y, m = r.exec(d), m !== null); ) y = r.lastIndex, r === mi ? m[1] === "!--" ? r = Js : m[1] !== void 0 ? r = Xs : m[2] !== void 0 ? (Ra.test(m[2]) && (a = RegExp("</" + m[2], "g")), r = Ce) : m[3] !== void 0 && (r = Ce) : r === Ce ? m[0] === ">" ? (r = a ?? mi, f = -1) : m[1] === void 0 ? f = -2 : (f = r.lastIndex - m[2].length, p = m[1], r = m[3] === void 0 ? Ce : m[3] === '"' ? ta : Qs) : r === ta || r === Qs ? r = Ce : r === Js || r === Xs ? r = mi : (r = Ce, a = void 0);
|
|
111
111
|
const b = r === Ce && i[l + 1].startsWith("/>") ? " " : "";
|
|
112
|
-
n += r === mi ? d + _n :
|
|
112
|
+
n += r === mi ? d + _n : f >= 0 ? (s.push(p), d.slice(0, f) + Da + d.slice(f) + ve + b) : d + ve + (f === -2 ? l : b);
|
|
113
113
|
}
|
|
114
114
|
return [La(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
115
115
|
};
|
|
@@ -118,29 +118,29 @@ let Ps = class Ba {
|
|
|
118
118
|
let a;
|
|
119
119
|
this.parts = [];
|
|
120
120
|
let n = 0, r = 0;
|
|
121
|
-
const l = t.length - 1, d = this.parts, [p,
|
|
121
|
+
const l = t.length - 1, d = this.parts, [p, m] = Sn(t, e);
|
|
122
122
|
if (this.el = Ba.createElement(p, s), Ee.currentNode = this.el.content, e === 2 || e === 3) {
|
|
123
|
-
const
|
|
124
|
-
|
|
123
|
+
const f = this.el.content.firstChild;
|
|
124
|
+
f.replaceWith(...f.childNodes);
|
|
125
125
|
}
|
|
126
126
|
for (; (a = Ee.nextNode()) !== null && d.length < l; ) {
|
|
127
127
|
if (a.nodeType === 1) {
|
|
128
|
-
if (a.hasAttributes()) for (const
|
|
129
|
-
const y =
|
|
130
|
-
d.push({ type: 1, index: n, name: k[2], strings: b, ctor: k[1] === "." ? Tn : k[1] === "?" ? Nn : k[1] === "@" ? An : os }), a.removeAttribute(
|
|
131
|
-
} else
|
|
128
|
+
if (a.hasAttributes()) for (const f of a.getAttributeNames()) if (f.endsWith(Da)) {
|
|
129
|
+
const y = m[r++], b = a.getAttribute(f).split(ve), k = /([.?@])?(.*)/.exec(y);
|
|
130
|
+
d.push({ type: 1, index: n, name: k[2], strings: b, ctor: k[1] === "." ? Tn : k[1] === "?" ? Nn : k[1] === "@" ? An : os }), a.removeAttribute(f);
|
|
131
|
+
} else f.startsWith(ve) && (d.push({ type: 6, index: n }), a.removeAttribute(f));
|
|
132
132
|
if (Ra.test(a.tagName)) {
|
|
133
|
-
const
|
|
133
|
+
const f = a.textContent.split(ve), y = f.length - 1;
|
|
134
134
|
if (y > 0) {
|
|
135
135
|
a.textContent = Qi ? Qi.emptyScript : "";
|
|
136
|
-
for (let b = 0; b < y; b++) a.append(
|
|
137
|
-
a.append(
|
|
136
|
+
for (let b = 0; b < y; b++) a.append(f[b], Ni()), Ee.nextNode(), d.push({ type: 2, index: ++n });
|
|
137
|
+
a.append(f[y], Ni());
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
} else if (a.nodeType === 8) if (a.data === Ia) d.push({ type: 2, index: n });
|
|
141
141
|
else {
|
|
142
|
-
let
|
|
143
|
-
for (; (
|
|
142
|
+
let f = -1;
|
|
143
|
+
for (; (f = a.data.indexOf(ve, f + 1)) !== -1; ) d.push({ type: 7, index: n }), f += ve.length - 1;
|
|
144
144
|
}
|
|
145
145
|
n++;
|
|
146
146
|
}
|
|
@@ -876,8 +876,8 @@ const { I: Xn } = On, Ha = (i) => i.strings === void 0, da = () => document.crea
|
|
|
876
876
|
if (r !== n || d) {
|
|
877
877
|
let p = e._$AA;
|
|
878
878
|
for (; p !== r; ) {
|
|
879
|
-
const
|
|
880
|
-
a.insertBefore(p, n), p =
|
|
879
|
+
const m = p.nextSibling;
|
|
880
|
+
a.insertBefore(p, n), p = m;
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
@@ -1478,8 +1478,8 @@ function ds() {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
function Oi(i, t) {
|
|
1480
1480
|
var e, s, a, n;
|
|
1481
|
-
const r = ds(), l = (t == null ? void 0 : t.weekStartsOn) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.weekStartsOn) ?? r.weekStartsOn ?? ((n = (a = r.locale) == null ? void 0 : a.options) == null ? void 0 : n.weekStartsOn) ?? 0, d = Lt(i, t == null ? void 0 : t.in), p = d.getDay(),
|
|
1482
|
-
return d.setDate(d.getDate() -
|
|
1481
|
+
const r = ds(), l = (t == null ? void 0 : t.weekStartsOn) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.weekStartsOn) ?? r.weekStartsOn ?? ((n = (a = r.locale) == null ? void 0 : a.options) == null ? void 0 : n.weekStartsOn) ?? 0, d = Lt(i, t == null ? void 0 : t.in), p = d.getDay(), m = (p < l ? 7 : 0) + p - l;
|
|
1482
|
+
return d.setDate(d.getDate() - m), d.setHours(0, 0, 0, 0), d;
|
|
1483
1483
|
}
|
|
1484
1484
|
function ss(i, t) {
|
|
1485
1485
|
return Oi(i, { ...t, weekStartsOn: 1 });
|
|
@@ -1834,17 +1834,17 @@ function bi(i) {
|
|
|
1834
1834
|
const s = e.width, a = s && i.matchPatterns[s] || i.matchPatterns[i.defaultMatchWidth], n = t.match(a);
|
|
1835
1835
|
if (!n)
|
|
1836
1836
|
return null;
|
|
1837
|
-
const r = n[0], l = s && i.parsePatterns[s] || i.parsePatterns[i.defaultParseWidth], d = Array.isArray(l) ? Wr(l, (
|
|
1837
|
+
const r = n[0], l = s && i.parsePatterns[s] || i.parsePatterns[i.defaultParseWidth], d = Array.isArray(l) ? Wr(l, (f) => f.test(r)) : (
|
|
1838
1838
|
// [TODO] -- I challenge you to fix the type
|
|
1839
|
-
zr(l, (
|
|
1839
|
+
zr(l, (f) => f.test(r))
|
|
1840
1840
|
);
|
|
1841
1841
|
let p;
|
|
1842
1842
|
p = i.valueCallback ? i.valueCallback(d) : d, p = e.valueCallback ? (
|
|
1843
1843
|
// [TODO] -- I challenge you to fix the type
|
|
1844
1844
|
e.valueCallback(p)
|
|
1845
1845
|
) : p;
|
|
1846
|
-
const
|
|
1847
|
-
return { value: p, rest:
|
|
1846
|
+
const m = t.slice(r.length);
|
|
1847
|
+
return { value: p, rest: m };
|
|
1848
1848
|
};
|
|
1849
1849
|
}
|
|
1850
1850
|
function zr(i, t) {
|
|
@@ -1995,12 +1995,12 @@ function ho(i, t) {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
function Za(i, t) {
|
|
1997
1997
|
var e, s, a, n;
|
|
1998
|
-
const r = Lt(i, t == null ? void 0 : t.in), l = r.getFullYear(), d = ds(), p = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.firstWeekContainsDate) ?? d.firstWeekContainsDate ?? ((n = (a = d.locale) == null ? void 0 : a.options) == null ? void 0 : n.firstWeekContainsDate) ?? 1,
|
|
1999
|
-
|
|
2000
|
-
const
|
|
1998
|
+
const r = Lt(i, t == null ? void 0 : t.in), l = r.getFullYear(), d = ds(), p = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((s = (e = t == null ? void 0 : t.locale) == null ? void 0 : e.options) == null ? void 0 : s.firstWeekContainsDate) ?? d.firstWeekContainsDate ?? ((n = (a = d.locale) == null ? void 0 : a.options) == null ? void 0 : n.firstWeekContainsDate) ?? 1, m = ee((t == null ? void 0 : t.in) || i, 0);
|
|
1999
|
+
m.setFullYear(l + 1, 0, p), m.setHours(0, 0, 0, 0);
|
|
2000
|
+
const f = Oi(m, t), y = ee((t == null ? void 0 : t.in) || i, 0);
|
|
2001
2001
|
y.setFullYear(l, 0, p), y.setHours(0, 0, 0, 0);
|
|
2002
2002
|
const b = Oi(y, t);
|
|
2003
|
-
return +r >= +
|
|
2003
|
+
return +r >= +f ? l + 1 : +r >= +b ? l : l - 1;
|
|
2004
2004
|
}
|
|
2005
2005
|
function co(i, t) {
|
|
2006
2006
|
var e, s, a, n;
|
|
@@ -2708,8 +2708,8 @@ function yo(i, t, e) {
|
|
|
2708
2708
|
const $o = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, _o = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, wo = /^'([^]*?)'?$/, xo = /''/g, So = /[a-zA-Z]/;
|
|
2709
2709
|
function Co(i, t, e) {
|
|
2710
2710
|
var s, a, n, r;
|
|
2711
|
-
const l = ds(), d = l.locale ?? oo, p = l.firstWeekContainsDate ?? ((a = (s = l.locale) == null ? void 0 : s.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1,
|
|
2712
|
-
if (!Cr(
|
|
2711
|
+
const l = ds(), d = l.locale ?? oo, p = l.firstWeekContainsDate ?? ((a = (s = l.locale) == null ? void 0 : s.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1, m = l.weekStartsOn ?? ((r = (n = l.locale) == null ? void 0 : n.options) == null ? void 0 : r.weekStartsOn) ?? 0, f = Lt(i, void 0);
|
|
2712
|
+
if (!Cr(f))
|
|
2713
2713
|
throw new RangeError("Invalid time value");
|
|
2714
2714
|
let y = t.match(_o).map((k) => {
|
|
2715
2715
|
const w = k[0];
|
|
@@ -2732,10 +2732,10 @@ function Co(i, t, e) {
|
|
|
2732
2732
|
);
|
|
2733
2733
|
return { isToken: !1, value: k };
|
|
2734
2734
|
});
|
|
2735
|
-
d.localize.preprocessor && (y = d.localize.preprocessor(
|
|
2735
|
+
d.localize.preprocessor && (y = d.localize.preprocessor(f, y));
|
|
2736
2736
|
const b = {
|
|
2737
2737
|
firstWeekContainsDate: p,
|
|
2738
|
-
weekStartsOn:
|
|
2738
|
+
weekStartsOn: m,
|
|
2739
2739
|
locale: d
|
|
2740
2740
|
};
|
|
2741
2741
|
return y.map((k) => {
|
|
@@ -2743,7 +2743,7 @@ function Co(i, t, e) {
|
|
|
2743
2743
|
const w = k.value;
|
|
2744
2744
|
(bo(w) || vo(w)) && ko(w, t, String(i));
|
|
2745
2745
|
const S = fa[w[0]];
|
|
2746
|
-
return S(
|
|
2746
|
+
return S(f, w, d.localize, b);
|
|
2747
2747
|
}).join("");
|
|
2748
2748
|
}
|
|
2749
2749
|
function To(i) {
|
|
@@ -2837,8 +2837,8 @@ function Qa(i) {
|
|
|
2837
2837
|
d && Date.prototype.setUTCMinutes.call(i, Date.prototype.getUTCMinutes.call(i) + d);
|
|
2838
2838
|
const p = /* @__PURE__ */ new Date(+i);
|
|
2839
2839
|
p.setUTCSeconds(0);
|
|
2840
|
-
const
|
|
2841
|
-
(
|
|
2840
|
+
const m = a > 0 ? p.getSeconds() : (p.getSeconds() - 60) % 60, f = Math.round(-(Oe(i.timeZone, i) * 60)) % 60;
|
|
2841
|
+
(f || m) && (i.internal.setUTCSeconds(i.internal.getUTCSeconds() + f), Date.prototype.setUTCSeconds.call(i, Date.prototype.getUTCSeconds.call(i) + f + m));
|
|
2842
2842
|
const y = Oe(i.timeZone, i), b = y > 0 ? Math.floor(y) : Math.ceil(y), k = -(/* @__PURE__ */ new Date(+i)).getTimezoneOffset() - b, w = b !== e, S = k - d;
|
|
2843
2843
|
if (w && S) {
|
|
2844
2844
|
Date.prototype.setUTCMinutes.call(i, Date.prototype.getUTCMinutes.call(i) + S);
|
|
@@ -3050,16 +3050,16 @@ let z = class extends G {
|
|
|
3050
3050
|
const d = this.focusedDate ? de(this.focusedDate) : ge(this.year, this.month, 1);
|
|
3051
3051
|
let p = ws(d, e);
|
|
3052
3052
|
if (p) {
|
|
3053
|
-
let
|
|
3054
|
-
if (
|
|
3055
|
-
if (
|
|
3053
|
+
let m = this.querySelector(`button[data-date="${nt(p)}"]`);
|
|
3054
|
+
if (m instanceof HTMLButtonElement) {
|
|
3055
|
+
if (m.dataset.disabled) {
|
|
3056
3056
|
p = ws(p, e);
|
|
3057
|
-
let
|
|
3058
|
-
for (;
|
|
3059
|
-
p = ws(p, e),
|
|
3060
|
-
|
|
3057
|
+
let f = this.querySelector(`button[data-date="${nt(p)}"]`);
|
|
3058
|
+
for (; f && f instanceof HTMLButtonElement && f.dataset.disabled; )
|
|
3059
|
+
p = ws(p, e), f = this.querySelector(`button[data-date="${nt(p)}"]`);
|
|
3060
|
+
m = f;
|
|
3061
3061
|
}
|
|
3062
|
-
|
|
3062
|
+
m instanceof HTMLButtonElement && !m.dataset.disabled && (this.focusedDate = nt(p), m.focus());
|
|
3063
3063
|
}
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
@@ -3181,9 +3181,9 @@ let z = class extends G {
|
|
|
3181
3181
|
}
|
|
3182
3182
|
renderDayView(t, e) {
|
|
3183
3183
|
var s;
|
|
3184
|
-
const a = ge(this.year, this.month, t), n = nt(a), r = n === nt(e), l = this.selected.includes(n), d = Mo(a), p = this.isExcluded(a) || !l && this.multiple && this.maxMultiple > 0 && this.selected.length >= this.maxMultiple,
|
|
3185
|
-
|
|
3186
|
-
const
|
|
3184
|
+
const a = ge(this.year, this.month, t), n = nt(a), r = n === nt(e), l = this.selected.includes(n), d = Mo(a), p = this.isExcluded(a) || !l && this.multiple && this.maxMultiple > 0 && this.selected.length >= this.maxMultiple, m = this.focusedDate ? this.focusedDate === n && !p ? "0" : "-1" : !p && this.tabIndexSet === 0 || this.tabIndexSet === t ? "0" : "-1";
|
|
3185
|
+
m === "0" && (this.tabIndexSet = t), this.selectableDates.push({ currentDateISO: n, isDisabled: p, tabindex: m });
|
|
3186
|
+
const f = {
|
|
3187
3187
|
"pkt-cal-today": r,
|
|
3188
3188
|
"pkt-cal-selected": l,
|
|
3189
3189
|
"pkt-cal-in-range": this.inRange[n],
|
|
@@ -3201,7 +3201,7 @@ let z = class extends G {
|
|
|
3201
3201
|
"pkt-calendar__date--range-start": this.range && (this.selected.length === 2 || this.rangeHovered !== null) && n === this.selected[0],
|
|
3202
3202
|
"pkt-calendar__date--range-end": this.range && this.selected.length === 2 && n === this.selected[1]
|
|
3203
3203
|
};
|
|
3204
|
-
return u`<td class=${O(
|
|
3204
|
+
return u`<td class=${O(f)}>
|
|
3205
3205
|
<button
|
|
3206
3206
|
type="button"
|
|
3207
3207
|
aria-pressed=${l ? "true" : "false"}
|
|
@@ -3233,13 +3233,13 @@ let z = class extends G {
|
|
|
3233
3233
|
let d = 1;
|
|
3234
3234
|
this.week = Ja(ge(this.year, this.month, 1));
|
|
3235
3235
|
const p = [];
|
|
3236
|
-
for (let
|
|
3237
|
-
const
|
|
3238
|
-
this.weeknumbers &&
|
|
3236
|
+
for (let m = 0; m < r; m++) {
|
|
3237
|
+
const f = [];
|
|
3238
|
+
this.weeknumbers && f.push(u`<td class="pkt-cal-week">${this.week}</td>`), this.week++;
|
|
3239
3239
|
for (let y = 1; y < 8; y++)
|
|
3240
|
-
if (
|
|
3240
|
+
if (m === 0 && y < a + 1) {
|
|
3241
3241
|
const b = l - (a - y);
|
|
3242
|
-
|
|
3242
|
+
f.push(
|
|
3243
3243
|
u`<td class="pkt-cal-other">
|
|
3244
3244
|
<div
|
|
3245
3245
|
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--label-only"
|
|
@@ -3249,7 +3249,7 @@ let z = class extends G {
|
|
|
3249
3249
|
</div>
|
|
3250
3250
|
</td>`
|
|
3251
3251
|
);
|
|
3252
|
-
} else d > n ? (
|
|
3252
|
+
} else d > n ? (f.push(
|
|
3253
3253
|
u`<td class="pkt-cal-other">
|
|
3254
3254
|
<div
|
|
3255
3255
|
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--label-only"
|
|
@@ -3258,10 +3258,10 @@ let z = class extends G {
|
|
|
3258
3258
|
<span class="pkt-btn__text pkt-txt-14-light">${d - n}</span>
|
|
3259
3259
|
</div>
|
|
3260
3260
|
</td>`
|
|
3261
|
-
), d++) : (
|
|
3261
|
+
), d++) : (f.push(this.renderDayView(d, t)), d++);
|
|
3262
3262
|
p.push(
|
|
3263
3263
|
u`<tr class="pkt-cal-week-row" role="row">
|
|
3264
|
-
${
|
|
3264
|
+
${f}
|
|
3265
3265
|
</tr>`
|
|
3266
3266
|
);
|
|
3267
3267
|
}
|
|
@@ -3891,28 +3891,28 @@ const wa = (i, t, e) => {
|
|
|
3891
3891
|
const a = tr(i), { values: n, keys: r } = this.dt(t, e, s);
|
|
3892
3892
|
if (!Array.isArray(a)) return this.ut = r, n;
|
|
3893
3893
|
const l = this.ut ?? (this.ut = []), d = [];
|
|
3894
|
-
let p,
|
|
3895
|
-
for (;
|
|
3894
|
+
let p, m, f = 0, y = a.length - 1, b = 0, k = n.length - 1;
|
|
3895
|
+
for (; f <= y && b <= k; ) if (a[f] === null) f++;
|
|
3896
3896
|
else if (a[y] === null) y--;
|
|
3897
|
-
else if (l[
|
|
3897
|
+
else if (l[f] === r[b]) d[b] = Te(a[f], n[b]), f++, b++;
|
|
3898
3898
|
else if (l[y] === r[k]) d[k] = Te(a[y], n[k]), y--, k--;
|
|
3899
|
-
else if (l[
|
|
3900
|
-
else if (l[y] === r[b]) d[b] = Te(a[y], n[b]), gi(i, a[
|
|
3901
|
-
else if (p === void 0 && (p = wa(r, b, k),
|
|
3902
|
-
const w =
|
|
3899
|
+
else if (l[f] === r[k]) d[k] = Te(a[f], n[k]), gi(i, d[k + 1], a[f]), f++, k--;
|
|
3900
|
+
else if (l[y] === r[b]) d[b] = Te(a[y], n[b]), gi(i, a[f], a[y]), y--, b++;
|
|
3901
|
+
else if (p === void 0 && (p = wa(r, b, k), m = wa(l, f, y)), p.has(l[f])) if (p.has(l[y])) {
|
|
3902
|
+
const w = m.get(r[b]), S = w !== void 0 ? a[w] : null;
|
|
3903
3903
|
if (S === null) {
|
|
3904
|
-
const P = gi(i, a[
|
|
3904
|
+
const P = gi(i, a[f]);
|
|
3905
3905
|
Te(P, n[b]), d[b] = P;
|
|
3906
|
-
} else d[b] = Te(S, n[b]), gi(i, a[
|
|
3906
|
+
} else d[b] = Te(S, n[b]), gi(i, a[f], S), a[w] = null;
|
|
3907
3907
|
b++;
|
|
3908
3908
|
} else ys(a[y]), y--;
|
|
3909
|
-
else ys(a[
|
|
3909
|
+
else ys(a[f]), f++;
|
|
3910
3910
|
for (; b <= k; ) {
|
|
3911
3911
|
const w = gi(i, d[k + 1]);
|
|
3912
3912
|
Te(w, n[b]), d[b++] = w;
|
|
3913
3913
|
}
|
|
3914
|
-
for (;
|
|
3915
|
-
const w = a[
|
|
3914
|
+
for (; f <= y; ) {
|
|
3915
|
+
const w = a[f++];
|
|
3916
3916
|
w !== null && ys(w);
|
|
3917
3917
|
}
|
|
3918
3918
|
return this.ut = r, qa(i, d), wt;
|
|
@@ -3927,7 +3927,7 @@ var el = {}, Sa;
|
|
|
3927
3927
|
function il() {
|
|
3928
3928
|
return Sa || (Sa = 1, (function() {
|
|
3929
3929
|
(function(i) {
|
|
3930
|
-
const t = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(),
|
|
3930
|
+
const t = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), S = {
|
|
3931
3931
|
ariaAtomic: "aria-atomic",
|
|
3932
3932
|
ariaAutoComplete: "aria-autocomplete",
|
|
3933
3933
|
ariaBusy: "aria-busy",
|
|
@@ -3970,7 +3970,7 @@ function il() {
|
|
|
3970
3970
|
ariaValueNow: "aria-valuenow",
|
|
3971
3971
|
ariaValueText: "aria-valuetext",
|
|
3972
3972
|
role: "role"
|
|
3973
|
-
}, P = (
|
|
3973
|
+
}, P = (g, c) => {
|
|
3974
3974
|
for (let v in S) {
|
|
3975
3975
|
c[v] = null;
|
|
3976
3976
|
let _ = null;
|
|
@@ -3980,27 +3980,27 @@ function il() {
|
|
|
3980
3980
|
return _;
|
|
3981
3981
|
},
|
|
3982
3982
|
set(V) {
|
|
3983
|
-
_ = V,
|
|
3983
|
+
_ = V, g.isConnected ? st(g, D, V) : m.set(g, c);
|
|
3984
3984
|
}
|
|
3985
3985
|
});
|
|
3986
3986
|
}
|
|
3987
3987
|
};
|
|
3988
|
-
function T(
|
|
3989
|
-
const c = a.get(
|
|
3990
|
-
le(
|
|
3988
|
+
function T(g) {
|
|
3989
|
+
const c = a.get(g), { form: v } = c;
|
|
3990
|
+
le(g, v, c), _t(g, c.labels);
|
|
3991
3991
|
}
|
|
3992
|
-
const L = (
|
|
3993
|
-
const v = document.createTreeWalker(
|
|
3992
|
+
const L = (g, c = !1) => {
|
|
3993
|
+
const v = document.createTreeWalker(g, NodeFilter.SHOW_ELEMENT, {
|
|
3994
3994
|
acceptNode(V) {
|
|
3995
3995
|
return a.has(V) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
3996
3996
|
}
|
|
3997
3997
|
});
|
|
3998
3998
|
let _ = v.nextNode();
|
|
3999
|
-
const D = !c ||
|
|
3999
|
+
const D = !c || g.disabled;
|
|
4000
4000
|
for (; _; )
|
|
4001
|
-
_.formDisabledCallback && D && Et(_,
|
|
4002
|
-
}, N = { attributes: !0, attributeFilter: ["disabled", "name"] }, H = he() ? new MutationObserver((
|
|
4003
|
-
for (const c of
|
|
4001
|
+
_.formDisabledCallback && D && Et(_, g.disabled), _ = v.nextNode();
|
|
4002
|
+
}, N = { attributes: !0, attributeFilter: ["disabled", "name"] }, H = he() ? new MutationObserver((g) => {
|
|
4003
|
+
for (const c of g) {
|
|
4004
4004
|
const v = c.target;
|
|
4005
4005
|
if (c.attributeName === "disabled" && (v.constructor.formAssociated ? Et(v, v.hasAttribute("disabled")) : v.localName === "fieldset" && L(v)), c.attributeName === "name" && v.constructor.formAssociated) {
|
|
4006
4006
|
const _ = a.get(v), D = p.get(v);
|
|
@@ -4008,16 +4008,16 @@ function il() {
|
|
|
4008
4008
|
}
|
|
4009
4009
|
}
|
|
4010
4010
|
}) : {};
|
|
4011
|
-
function K(
|
|
4012
|
-
|
|
4011
|
+
function K(g) {
|
|
4012
|
+
g.forEach((c) => {
|
|
4013
4013
|
const { addedNodes: v, removedNodes: _ } = c, D = Array.from(v), V = Array.from(_);
|
|
4014
4014
|
D.forEach((U) => {
|
|
4015
4015
|
var Pt;
|
|
4016
|
-
if (a.has(U) && U.constructor.formAssociated && T(U),
|
|
4017
|
-
const pt =
|
|
4016
|
+
if (a.has(U) && U.constructor.formAssociated && T(U), m.has(U)) {
|
|
4017
|
+
const pt = m.get(U);
|
|
4018
4018
|
Object.keys(S).filter((Mt) => pt[Mt] !== null).forEach((Mt) => {
|
|
4019
4019
|
st(U, S[Mt], pt[Mt]);
|
|
4020
|
-
}),
|
|
4020
|
+
}), m.delete(U);
|
|
4021
4021
|
}
|
|
4022
4022
|
if (w.has(U)) {
|
|
4023
4023
|
const pt = w.get(U);
|
|
@@ -4040,8 +4040,8 @@ function il() {
|
|
|
4040
4040
|
});
|
|
4041
4041
|
});
|
|
4042
4042
|
}
|
|
4043
|
-
function Nt(
|
|
4044
|
-
|
|
4043
|
+
function Nt(g) {
|
|
4044
|
+
g.forEach((c) => {
|
|
4045
4045
|
const { removedNodes: v } = c;
|
|
4046
4046
|
v.forEach((_) => {
|
|
4047
4047
|
const D = b.get(c.target);
|
|
@@ -4049,85 +4049,85 @@ function il() {
|
|
|
4049
4049
|
});
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
|
-
const At = (
|
|
4052
|
+
const At = (g) => {
|
|
4053
4053
|
var c, v;
|
|
4054
4054
|
const _ = new MutationObserver(Nt);
|
|
4055
|
-
!((c = window == null ? void 0 : window.ShadyDOM) === null || c === void 0) && c.inUse &&
|
|
4055
|
+
!((c = window == null ? void 0 : window.ShadyDOM) === null || c === void 0) && c.inUse && g.mode && g.host && (g = g.host), (v = _.observe) === null || v === void 0 || v.call(_, g, { childList: !0 }), b.set(g, _);
|
|
4056
4056
|
};
|
|
4057
4057
|
he() && new MutationObserver(K);
|
|
4058
4058
|
const Q = {
|
|
4059
4059
|
childList: !0,
|
|
4060
4060
|
subtree: !0
|
|
4061
|
-
}, st = (
|
|
4062
|
-
|
|
4063
|
-
}, Et = (
|
|
4064
|
-
|
|
4065
|
-
}, Ot = (
|
|
4066
|
-
s.get(
|
|
4061
|
+
}, st = (g, c, v) => {
|
|
4062
|
+
g.getAttribute(c) !== v && g.setAttribute(c, v);
|
|
4063
|
+
}, Et = (g, c) => {
|
|
4064
|
+
g.toggleAttribute("internals-disabled", c), c ? st(g, "aria-disabled", "true") : g.removeAttribute("aria-disabled"), g.formDisabledCallback && g.formDisabledCallback.apply(g, [c]);
|
|
4065
|
+
}, Ot = (g) => {
|
|
4066
|
+
s.get(g).forEach((c) => {
|
|
4067
4067
|
c.remove();
|
|
4068
|
-
}), s.set(
|
|
4069
|
-
}, at = (
|
|
4068
|
+
}), s.set(g, []);
|
|
4069
|
+
}, at = (g, c) => {
|
|
4070
4070
|
const v = document.createElement("input");
|
|
4071
|
-
return v.type = "hidden", v.name =
|
|
4072
|
-
}, I = (
|
|
4071
|
+
return v.type = "hidden", v.name = g.getAttribute("name"), g.after(v), s.get(c).push(v), v;
|
|
4072
|
+
}, I = (g, c) => {
|
|
4073
4073
|
var v;
|
|
4074
|
-
s.set(c, []), (v = H.observe) === null || v === void 0 || v.call(H,
|
|
4075
|
-
}, _t = (
|
|
4074
|
+
s.set(c, []), (v = H.observe) === null || v === void 0 || v.call(H, g, N);
|
|
4075
|
+
}, _t = (g, c) => {
|
|
4076
4076
|
if (c.length) {
|
|
4077
|
-
Array.from(c).forEach((_) => _.addEventListener("click",
|
|
4077
|
+
Array.from(c).forEach((_) => _.addEventListener("click", g.click.bind(g)));
|
|
4078
4078
|
let v = c[0].id;
|
|
4079
|
-
c[0].id || (v = `${c[0].htmlFor}_Label`, c[0].id = v), st(
|
|
4079
|
+
c[0].id || (v = `${c[0].htmlFor}_Label`, c[0].id = v), st(g, "aria-labelledby", v);
|
|
4080
4080
|
}
|
|
4081
|
-
}, Qt = (
|
|
4082
|
-
const c = Array.from(
|
|
4083
|
-
|
|
4084
|
-
}, oe = (
|
|
4085
|
-
Qt(Ut(
|
|
4086
|
-
}, te = (
|
|
4087
|
-
Qt(Ut(
|
|
4088
|
-
}, we = (
|
|
4089
|
-
const c = ["button[type=submit]", "input[type=submit]", "button:not([type])"].map((v) => `${v}:not([disabled])`).map((v) => `${v}:not([form])${
|
|
4090
|
-
|
|
4081
|
+
}, Qt = (g) => {
|
|
4082
|
+
const c = Array.from(g.elements).filter((V) => !V.tagName.includes("-") && V.validity).map((V) => V.validity.valid), v = d.get(g) || [], _ = Array.from(v).filter((V) => V.isConnected).map((V) => a.get(V).validity.valid), D = [...c, ..._].includes(!1);
|
|
4083
|
+
g.toggleAttribute("internals-invalid", D), g.toggleAttribute("internals-valid", !D);
|
|
4084
|
+
}, oe = (g) => {
|
|
4085
|
+
Qt(Ut(g.target));
|
|
4086
|
+
}, te = (g) => {
|
|
4087
|
+
Qt(Ut(g.target));
|
|
4088
|
+
}, we = (g) => {
|
|
4089
|
+
const c = ["button[type=submit]", "input[type=submit]", "button:not([type])"].map((v) => `${v}:not([disabled])`).map((v) => `${v}:not([form])${g.id ? `,${v}[form='${g.id}']` : ""}`).join(",");
|
|
4090
|
+
g.addEventListener("click", (v) => {
|
|
4091
4091
|
if (v.target.closest(c)) {
|
|
4092
|
-
const _ = d.get(
|
|
4093
|
-
if (
|
|
4092
|
+
const _ = d.get(g);
|
|
4093
|
+
if (g.noValidate)
|
|
4094
4094
|
return;
|
|
4095
4095
|
_.size && Array.from(_).reverse().map((D) => a.get(D).reportValidity()).includes(!1) && v.preventDefault();
|
|
4096
4096
|
}
|
|
4097
4097
|
});
|
|
4098
|
-
}, ze = (
|
|
4099
|
-
const c = d.get(
|
|
4098
|
+
}, ze = (g) => {
|
|
4099
|
+
const c = d.get(g.target);
|
|
4100
4100
|
c && c.size && c.forEach((v) => {
|
|
4101
4101
|
v.constructor.formAssociated && v.formResetCallback && v.formResetCallback.apply(v);
|
|
4102
4102
|
});
|
|
4103
|
-
}, le = (
|
|
4103
|
+
}, le = (g, c, v) => {
|
|
4104
4104
|
if (c) {
|
|
4105
4105
|
const _ = d.get(c);
|
|
4106
4106
|
if (_)
|
|
4107
|
-
_.add(
|
|
4107
|
+
_.add(g);
|
|
4108
4108
|
else {
|
|
4109
4109
|
const D = /* @__PURE__ */ new Set();
|
|
4110
|
-
D.add(
|
|
4110
|
+
D.add(g), d.set(c, D), we(c), c.addEventListener("reset", ze), c.addEventListener("input", oe), c.addEventListener("change", te);
|
|
4111
4111
|
}
|
|
4112
|
-
r.set(c, { ref:
|
|
4113
|
-
|
|
4112
|
+
r.set(c, { ref: g, internals: v }), g.constructor.formAssociated && g.formAssociatedCallback && setTimeout(() => {
|
|
4113
|
+
g.formAssociatedCallback.apply(g, [c]);
|
|
4114
4114
|
}, 0), Qt(c);
|
|
4115
4115
|
}
|
|
4116
|
-
}, Ut = (
|
|
4117
|
-
let c =
|
|
4116
|
+
}, Ut = (g) => {
|
|
4117
|
+
let c = g.parentNode;
|
|
4118
4118
|
return c && c.tagName !== "FORM" && (c = Ut(c)), c;
|
|
4119
|
-
}, ot = (
|
|
4120
|
-
if (!
|
|
4119
|
+
}, ot = (g, c, v = DOMException) => {
|
|
4120
|
+
if (!g.constructor.formAssociated)
|
|
4121
4121
|
throw new v(c);
|
|
4122
|
-
}, xe = (
|
|
4123
|
-
const _ = d.get(
|
|
4122
|
+
}, xe = (g, c, v) => {
|
|
4123
|
+
const _ = d.get(g);
|
|
4124
4124
|
return _ && _.size && _.forEach((D) => {
|
|
4125
4125
|
a.get(D)[v]() || (c = !1);
|
|
4126
4126
|
}), c;
|
|
4127
|
-
}, Se = (
|
|
4128
|
-
if (
|
|
4129
|
-
const c = a.get(
|
|
4130
|
-
_t(
|
|
4127
|
+
}, Se = (g) => {
|
|
4128
|
+
if (g.constructor.formAssociated) {
|
|
4129
|
+
const c = a.get(g), { labels: v, form: _ } = c;
|
|
4130
|
+
_t(g, v), le(g, _, c);
|
|
4131
4131
|
}
|
|
4132
4132
|
};
|
|
4133
4133
|
function he() {
|
|
@@ -4138,14 +4138,14 @@ function il() {
|
|
|
4138
4138
|
this.badInput = !1, this.customError = !1, this.patternMismatch = !1, this.rangeOverflow = !1, this.rangeUnderflow = !1, this.stepMismatch = !1, this.tooLong = !1, this.tooShort = !1, this.typeMismatch = !1, this.valid = !0, this.valueMissing = !1, Object.seal(this);
|
|
4139
4139
|
}
|
|
4140
4140
|
}
|
|
4141
|
-
const Fi = (
|
|
4141
|
+
const Fi = (g) => (g.badInput = !1, g.customError = !1, g.patternMismatch = !1, g.rangeOverflow = !1, g.rangeUnderflow = !1, g.stepMismatch = !1, g.tooLong = !1, g.tooShort = !1, g.typeMismatch = !1, g.valid = !0, g.valueMissing = !1, g), ms = (g, c, v) => (g.valid = Ui(c), Object.keys(c).forEach((_) => g[_] = c[_]), v && Qt(v), g), Ui = (g) => {
|
|
4142
4142
|
let c = !0;
|
|
4143
|
-
for (let v in
|
|
4144
|
-
v !== "valid" &&
|
|
4143
|
+
for (let v in g)
|
|
4144
|
+
v !== "valid" && g[v] !== !1 && (c = !1);
|
|
4145
4145
|
return c;
|
|
4146
4146
|
}, We = /* @__PURE__ */ new WeakMap();
|
|
4147
|
-
function Ke(
|
|
4148
|
-
|
|
4147
|
+
function Ke(g, c) {
|
|
4148
|
+
g.toggleAttribute(c, !0), g.part && g.part.add(c);
|
|
4149
4149
|
}
|
|
4150
4150
|
class pi extends Set {
|
|
4151
4151
|
static get isPolyfilled() {
|
|
@@ -4176,13 +4176,13 @@ function il() {
|
|
|
4176
4176
|
}), v;
|
|
4177
4177
|
}
|
|
4178
4178
|
}
|
|
4179
|
-
function Hi(
|
|
4180
|
-
if (typeof c == "function" ?
|
|
4181
|
-
return v === "m" ? _ : v === "a" ? _.call(
|
|
4179
|
+
function Hi(g, c, v, _) {
|
|
4180
|
+
if (typeof c == "function" ? g !== c || !_ : !c.has(g)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4181
|
+
return v === "m" ? _ : v === "a" ? _.call(g) : _ ? _.value : c.get(g);
|
|
4182
4182
|
}
|
|
4183
|
-
function fs(
|
|
4184
|
-
if (typeof c == "function" ?
|
|
4185
|
-
return c.set(
|
|
4183
|
+
function fs(g, c, v, _, D) {
|
|
4184
|
+
if (typeof c == "function" ? g !== c || !0 : !c.has(g)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4185
|
+
return c.set(g, v), v;
|
|
4186
4186
|
}
|
|
4187
4187
|
var me;
|
|
4188
4188
|
class qi {
|
|
@@ -4208,12 +4208,12 @@ function il() {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
}
|
|
4210
4210
|
function zi() {
|
|
4211
|
-
const
|
|
4211
|
+
const g = HTMLFormElement.prototype.checkValidity;
|
|
4212
4212
|
HTMLFormElement.prototype.checkValidity = v;
|
|
4213
4213
|
const c = HTMLFormElement.prototype.reportValidity;
|
|
4214
4214
|
HTMLFormElement.prototype.reportValidity = _;
|
|
4215
4215
|
function v(...V) {
|
|
4216
|
-
let U =
|
|
4216
|
+
let U = g.apply(this, V);
|
|
4217
4217
|
return xe(this, U, "checkValidity");
|
|
4218
4218
|
}
|
|
4219
4219
|
function _(...V) {
|
|
@@ -4310,7 +4310,7 @@ function il() {
|
|
|
4310
4310
|
}
|
|
4311
4311
|
get shadowRoot() {
|
|
4312
4312
|
const c = t.get(this);
|
|
4313
|
-
return
|
|
4313
|
+
return f.get(c) || null;
|
|
4314
4314
|
}
|
|
4315
4315
|
get validationMessage() {
|
|
4316
4316
|
const c = t.get(this);
|
|
@@ -4328,14 +4328,14 @@ function il() {
|
|
|
4328
4328
|
function pn() {
|
|
4329
4329
|
if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals)
|
|
4330
4330
|
return !1;
|
|
4331
|
-
class
|
|
4331
|
+
class g extends HTMLElement {
|
|
4332
4332
|
constructor() {
|
|
4333
4333
|
super(), this.internals = this.attachInternals();
|
|
4334
4334
|
}
|
|
4335
4335
|
}
|
|
4336
4336
|
const c = `element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g, "")}`;
|
|
4337
|
-
customElements.define(c,
|
|
4338
|
-
const v = new
|
|
4337
|
+
customElements.define(c, g);
|
|
4338
|
+
const v = new g();
|
|
4339
4339
|
return [
|
|
4340
4340
|
"shadowRoot",
|
|
4341
4341
|
"form",
|
|
@@ -4350,13 +4350,13 @@ function il() {
|
|
|
4350
4350
|
].every((_) => _ in v.internals);
|
|
4351
4351
|
}
|
|
4352
4352
|
let qs = !1, zs = !1;
|
|
4353
|
-
function gs(
|
|
4354
|
-
zs || (zs = !0, window.CustomStateSet = pi,
|
|
4355
|
-
const v =
|
|
4353
|
+
function gs(g) {
|
|
4354
|
+
zs || (zs = !0, window.CustomStateSet = pi, g && (HTMLElement.prototype.attachInternals = function(...c) {
|
|
4355
|
+
const v = g.call(this, c);
|
|
4356
4356
|
return v.states = new pi(this), v;
|
|
4357
4357
|
}));
|
|
4358
4358
|
}
|
|
4359
|
-
function Ws(
|
|
4359
|
+
function Ws(g = !0) {
|
|
4360
4360
|
if (!qs) {
|
|
4361
4361
|
if (qs = !0, typeof window < "u" && (window.ElementInternals = Hs), typeof CustomElementRegistry < "u") {
|
|
4362
4362
|
const c = CustomElementRegistry.prototype.define;
|
|
@@ -4381,7 +4381,7 @@ function il() {
|
|
|
4381
4381
|
}), typeof Element < "u") {
|
|
4382
4382
|
let c = function(..._) {
|
|
4383
4383
|
const D = v.apply(this, _);
|
|
4384
|
-
if (
|
|
4384
|
+
if (f.set(this, D), he()) {
|
|
4385
4385
|
const V = new MutationObserver(K);
|
|
4386
4386
|
window.ShadyDOM ? V.observe(this, Q) : V.observe(D, Q), l.set(this, V);
|
|
4387
4387
|
}
|
|
@@ -4390,7 +4390,7 @@ function il() {
|
|
|
4390
4390
|
const v = Element.prototype.attachShadow;
|
|
4391
4391
|
Element.prototype.attachShadow = c;
|
|
4392
4392
|
}
|
|
4393
|
-
he() && typeof document < "u" && new MutationObserver(K).observe(document.documentElement, Q), typeof HTMLFormElement < "u" && zi(), (
|
|
4393
|
+
he() && typeof document < "u" && new MutationObserver(K).observe(document.documentElement, Q), typeof HTMLFormElement < "u" && zi(), (g || typeof window < "u" && !window.CustomStateSet) && gs();
|
|
4394
4394
|
}
|
|
4395
4395
|
}
|
|
4396
4396
|
return customElements.polyfillWrapFlushCallback || (pn() ? typeof window < "u" && !window.CustomStateSet && gs(HTMLElement.prototype.attachInternals) : Ws(!1)), i.forceCustomStateSetPolyfill = gs, i.forceElementInternalsPolyfill = Ws, Object.defineProperty(i, "__esModule", { value: !0 }), i;
|
|
@@ -4411,7 +4411,7 @@ let M = class extends G {
|
|
|
4411
4411
|
return !0;
|
|
4412
4412
|
}
|
|
4413
4413
|
manageValidity(t) {
|
|
4414
|
-
var e, s, a, n, r, l, d, p,
|
|
4414
|
+
var e, s, a, n, r, l, d, p, m, f, y;
|
|
4415
4415
|
t && (this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, yt.forms.messages.required, t) : (e = t.validity) != null && e.typeMismatch || (s = t.validity) != null && s.badInput ? this.internals.setValidity({ typeMismatch: !0 }, yt.forms.messages.invalid, t) : (a = t.validity) != null && a.patternMismatch ? this.internals.setValidity(
|
|
4416
4416
|
{ patternMismatch: !0 },
|
|
4417
4417
|
yt.forms.messages.invalidPattern,
|
|
@@ -4420,9 +4420,9 @@ let M = class extends G {
|
|
|
4420
4420
|
{ rangeUnderflow: !0 },
|
|
4421
4421
|
this.min ? yt.forms.messages.rangeUnderflowMin.replace("{min}", (d = this.min) == null ? void 0 : d.toString()) : yt.forms.messages.rangeUnderflow,
|
|
4422
4422
|
t
|
|
4423
|
-
) : (p = t.validity) != null && p.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, yt.forms.messages.invalid, t) : (
|
|
4423
|
+
) : (p = t.validity) != null && p.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, yt.forms.messages.invalid, t) : (m = t.validity) != null && m.rangeOverflow ? this.internals.setValidity(
|
|
4424
4424
|
{ rangeOverflow: !0 },
|
|
4425
|
-
this.max ? yt.forms.messages.rangeOverflowMax.replace("{max}", (
|
|
4425
|
+
this.max ? yt.forms.messages.rangeOverflowMax.replace("{max}", (f = this.max) == null ? void 0 : f.toString()) : yt.forms.messages.rangeOverflow,
|
|
4426
4426
|
t
|
|
4427
4427
|
) : (y = t.validity) != null && y.customError ? this.internals.setValidity({ customError: !0 }, t.validationMessage, t) : this.internals.setValidity({}));
|
|
4428
4428
|
}
|
|
@@ -4791,8 +4791,8 @@ let Y = class extends G {
|
|
|
4791
4791
|
.helptext=${this.helptext}
|
|
4792
4792
|
.helptextDropdown=${this.helptextDropdown}
|
|
4793
4793
|
.helptextDropdownButton=${this.helptextDropdownButton || Dt.props.helptextDropdownButton.default}
|
|
4794
|
-
@toggleHelpText=${(
|
|
4795
|
-
this.toggleDropdown(
|
|
4794
|
+
@toggleHelpText=${(f) => {
|
|
4795
|
+
this.toggleDropdown(f);
|
|
4796
4796
|
}}
|
|
4797
4797
|
${E(this.helptextSlot)}
|
|
4798
4798
|
name="helptext"
|
|
@@ -4815,10 +4815,10 @@ let Y = class extends G {
|
|
|
4815
4815
|
<div class="pkt-contents" ${E(this.defaultSlot)}></div>
|
|
4816
4816
|
${this.counterPosition === "bottom" ? l() : $}
|
|
4817
4817
|
${d()}
|
|
4818
|
-
`,
|
|
4818
|
+
`, m = () => this.hasFieldset ? u`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${s}">
|
|
4819
4819
|
${p()}
|
|
4820
4820
|
</fieldset>` : u`<div class="pkt-inputwrapper__fieldset">${p()}</div>`;
|
|
4821
|
-
return u`<div class=${O(t)}>${
|
|
4821
|
+
return u`<div class=${O(t)}>${m()}</div> `;
|
|
4822
4822
|
}
|
|
4823
4823
|
toggleDropdown(t) {
|
|
4824
4824
|
this.dispatchEvent(
|
|
@@ -5640,12 +5640,12 @@ let X = class extends M {
|
|
|
5640
5640
|
var e, s;
|
|
5641
5641
|
if (this.disabled) return;
|
|
5642
5642
|
this.touched = !0, this._userInfoMessage = "", this._addValueText = null;
|
|
5643
|
-
const a = ((e = this.findValueInOptions(t)) == null ? void 0 : e.value) || null, n = this._value.includes(t || a || ""), r = !!a, l = ((s = this._options.find((S) => S.value === t)) == null ? void 0 : s.disabled) || !1, d = !(t != null && t.trim()), p = !this.multiple,
|
|
5643
|
+
const a = ((e = this.findValueInOptions(t)) == null ? void 0 : e.value) || null, n = this._value.includes(t || a || ""), r = !!a, l = ((s = this._options.find((S) => S.value === t)) == null ? void 0 : s.disabled) || !1, d = !(t != null && t.trim()), p = !this.multiple, m = this.multiple, f = this.isMaxItemsReached();
|
|
5644
5644
|
let y = !1, b = !0, k = "", w = "";
|
|
5645
|
-
l || (!r && this.allowUserInput && !d ? (this.addNewUserValue(t), k = "Ny verdi lagt til", y = !
|
|
5645
|
+
l || (!r && this.allowUserInput && !d ? (this.addNewUserValue(t), k = "Ny verdi lagt til", y = !m) : !r && !this.allowUserInput ? (p && this._value[0] && this.removeValue(this._value[0]), b = !1, y = !0, k = "Ingen treff i søket") : n ? (this.removeValue(a), y = !0) : d && p ? (this.removeAllSelected(), y = !0) : p ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(a), y = !1, this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = "", this.inputRef.value.blur())) : m && !f ? (this.setSelected(a), y = !0) : m && f ? (this._userInfoMessage = "Maks antall valg nådd", b = !1, w = t) : (p && this.removeAllSelected(), this._userInfoMessage = "Ingen gyldig verdi valgt", b = !1, y = !0, w = t), this._isOptionsOpen = y, y || window.setTimeout(() => {
|
|
5646
5646
|
var S;
|
|
5647
5647
|
(S = this.focusRef.value) == null || S.focus();
|
|
5648
|
-
}, 0), this._userInfoMessage = k, this._search = w || "", this.resetComboboxInput(b),
|
|
5648
|
+
}, 0), this._userInfoMessage = k, this._search = w || "", this.resetComboboxInput(b), m && this.isMaxItemsReached());
|
|
5649
5649
|
}
|
|
5650
5650
|
setSelected(t) {
|
|
5651
5651
|
if (!this._value.includes(t)) {
|
|
@@ -8894,15 +8894,15 @@ const R = Jt({
|
|
|
8894
8894
|
name: l,
|
|
8895
8895
|
className: d,
|
|
8896
8896
|
onClick: p,
|
|
8897
|
-
onToggle:
|
|
8898
|
-
},
|
|
8897
|
+
onToggle: m
|
|
8898
|
+
}, f) => {
|
|
8899
8899
|
const [y, b] = je(i), { name: k } = kn(), w = l || k, S = n !== void 0 ? n : y;
|
|
8900
8900
|
ns(() => {
|
|
8901
8901
|
n === void 0 && b(i);
|
|
8902
8902
|
}, [i, n]);
|
|
8903
8903
|
const P = (N) => {
|
|
8904
8904
|
const K = N.currentTarget.open;
|
|
8905
|
-
n === void 0 && b(K),
|
|
8905
|
+
n === void 0 && b(K), m == null || m(N);
|
|
8906
8906
|
}, T = (N) => {
|
|
8907
8907
|
setTimeout(() => {
|
|
8908
8908
|
p == null || p(N);
|
|
@@ -8916,7 +8916,7 @@ const R = Jt({
|
|
|
8916
8916
|
return /* @__PURE__ */ x(
|
|
8917
8917
|
"details",
|
|
8918
8918
|
{
|
|
8919
|
-
ref:
|
|
8919
|
+
ref: f,
|
|
8920
8920
|
className: L,
|
|
8921
8921
|
id: t,
|
|
8922
8922
|
open: S,
|
|
@@ -8988,21 +8988,22 @@ const ht = /* @__PURE__ */ bh(yh), ln = ({
|
|
|
8988
8988
|
"aria-live": r = "polite",
|
|
8989
8989
|
role: l = "status",
|
|
8990
8990
|
skin: d = "info",
|
|
8991
|
-
|
|
8991
|
+
className: p,
|
|
8992
|
+
...m
|
|
8992
8993
|
}) => {
|
|
8993
|
-
const [
|
|
8994
|
+
const [f, y] = je(!1), b = {
|
|
8994
8995
|
"pkt-alert": !0,
|
|
8995
8996
|
"pkt-alert--compact": e,
|
|
8996
8997
|
[`pkt-alert--${d}`]: d,
|
|
8997
|
-
"pkt-hide":
|
|
8998
|
-
},
|
|
8998
|
+
"pkt-hide": f
|
|
8999
|
+
}, k = {
|
|
8999
9000
|
"pkt-alert__grid": !0,
|
|
9000
9001
|
"pkt-alert__noTitle": !s,
|
|
9001
9002
|
"pkt-alert__noDate": !a
|
|
9002
|
-
},
|
|
9003
|
-
|
|
9004
|
-
}, [
|
|
9005
|
-
return /* @__PURE__ */ h("div", { ...
|
|
9003
|
+
}, w = Ls(() => {
|
|
9004
|
+
y(!0), m.onClose && m.onClose(new CustomEvent("close", { detail: { origin: event }, bubbles: !0, composed: !0 }));
|
|
9005
|
+
}, [m.onClose, y]);
|
|
9006
|
+
return /* @__PURE__ */ h("div", { ...m, "aria-live": n || r, role: l, className: ht(b, p), children: /* @__PURE__ */ x("div", { className: ht(k), children: [
|
|
9006
9007
|
/* @__PURE__ */ h(
|
|
9007
9008
|
R,
|
|
9008
9009
|
{
|
|
@@ -9021,7 +9022,7 @@ const ht = /* @__PURE__ */ bh(yh), ln = ({
|
|
|
9021
9022
|
skin: "tertiary",
|
|
9022
9023
|
iconName: "close",
|
|
9023
9024
|
variant: "icon-only",
|
|
9024
|
-
onClick:
|
|
9025
|
+
onClick: w,
|
|
9025
9026
|
children: /* @__PURE__ */ h("span", { className: "sr-only", children: "Lukk" })
|
|
9026
9027
|
}
|
|
9027
9028
|
) }),
|
|
@@ -9091,8 +9092,8 @@ const ri = Z(
|
|
|
9091
9092
|
skin: l = "primary",
|
|
9092
9093
|
type: d = "button",
|
|
9093
9094
|
variant: p = "label-only",
|
|
9094
|
-
state:
|
|
9095
|
-
color:
|
|
9095
|
+
state: m,
|
|
9096
|
+
color: f,
|
|
9096
9097
|
isLoading: y = void 0,
|
|
9097
9098
|
disabled: b = void 0,
|
|
9098
9099
|
loadingAnimationPath: k = window.pktAnimationPath,
|
|
@@ -9106,8 +9107,8 @@ const ri = Z(
|
|
|
9106
9107
|
r && "pkt-btn--full-small",
|
|
9107
9108
|
l && `pkt-btn--${l}`,
|
|
9108
9109
|
p && `pkt-btn--${p}`,
|
|
9110
|
+
f && `pkt-btn--${f}`,
|
|
9109
9111
|
m && `pkt-btn--${m}`,
|
|
9110
|
-
g && `pkt-btn--${g}`,
|
|
9111
9112
|
y && "pkt-btn--isLoading"
|
|
9112
9113
|
].filter(Boolean).join(" ");
|
|
9113
9114
|
return /* @__PURE__ */ x(
|
|
@@ -9153,8 +9154,8 @@ const xh = Z(
|
|
|
9153
9154
|
isSwitch: l = !1,
|
|
9154
9155
|
hideLabel: d = !1,
|
|
9155
9156
|
labelPosition: p = "right",
|
|
9156
|
-
defaultChecked:
|
|
9157
|
-
checked:
|
|
9157
|
+
defaultChecked: m,
|
|
9158
|
+
checked: f,
|
|
9158
9159
|
optionalTag: y,
|
|
9159
9160
|
optionalText: b = "Valgfritt",
|
|
9160
9161
|
requiredTag: k,
|
|
@@ -9192,7 +9193,7 @@ const xh = Z(
|
|
|
9192
9193
|
type: "checkbox",
|
|
9193
9194
|
id: i,
|
|
9194
9195
|
disabled: e,
|
|
9195
|
-
...
|
|
9196
|
+
...f !== void 0 ? { checked: f } : { defaultChecked: m },
|
|
9196
9197
|
...P
|
|
9197
9198
|
}
|
|
9198
9199
|
),
|
|
@@ -9262,8 +9263,8 @@ const Gd = ({
|
|
|
9262
9263
|
includeConsent: l = !1,
|
|
9263
9264
|
hotjarId: d = null,
|
|
9264
9265
|
googleAnalyticsId: p = null,
|
|
9265
|
-
devMode:
|
|
9266
|
-
cookieDomain:
|
|
9266
|
+
devMode: m = !1,
|
|
9267
|
+
cookieDomain: f = null,
|
|
9267
9268
|
cookieSecure: y = null,
|
|
9268
9269
|
cookieExpiryDays: b = null,
|
|
9269
9270
|
onToggleConsent: k = (w) => {
|
|
@@ -9347,8 +9348,8 @@ const Gd = ({
|
|
|
9347
9348
|
triggerType: "footerlink",
|
|
9348
9349
|
hotjarId: d,
|
|
9349
9350
|
googleAnalyticsId: p,
|
|
9350
|
-
devMode:
|
|
9351
|
-
cookieDomain:
|
|
9351
|
+
devMode: m,
|
|
9352
|
+
cookieDomain: f,
|
|
9352
9353
|
cookieSecure: y,
|
|
9353
9354
|
cookieExpiryDays: b,
|
|
9354
9355
|
onToggleConsent: k
|
|
@@ -9392,8 +9393,8 @@ const Gd = ({
|
|
|
9392
9393
|
devMode: l = !1,
|
|
9393
9394
|
cookieDomain: d = null,
|
|
9394
9395
|
cookieSecure: p = null,
|
|
9395
|
-
cookieExpiryDays:
|
|
9396
|
-
onToggleConsent:
|
|
9396
|
+
cookieExpiryDays: m = null,
|
|
9397
|
+
onToggleConsent: f = (b) => {
|
|
9397
9398
|
console.log(b.detail);
|
|
9398
9399
|
},
|
|
9399
9400
|
className: y
|
|
@@ -9448,8 +9449,8 @@ const Gd = ({
|
|
|
9448
9449
|
devMode: l,
|
|
9449
9450
|
cookieDomain: d,
|
|
9450
9451
|
cookieSecure: p,
|
|
9451
|
-
cookieExpiryDays:
|
|
9452
|
-
onToggleConsent:
|
|
9452
|
+
cookieExpiryDays: m,
|
|
9453
|
+
onToggleConsent: f
|
|
9453
9454
|
}
|
|
9454
9455
|
) })
|
|
9455
9456
|
] }) }) });
|
|
@@ -9465,8 +9466,8 @@ const Gd = ({
|
|
|
9465
9466
|
representing: l,
|
|
9466
9467
|
userOptions: d,
|
|
9467
9468
|
userMenuFooter: p,
|
|
9468
|
-
canChangeRepresentation:
|
|
9469
|
-
showMenuButton:
|
|
9469
|
+
canChangeRepresentation: m = !0,
|
|
9470
|
+
showMenuButton: f = !1,
|
|
9470
9471
|
showLogOutButton: y = !1,
|
|
9471
9472
|
openMenu: b,
|
|
9472
9473
|
logOut: k,
|
|
@@ -9537,7 +9538,7 @@ const Gd = ({
|
|
|
9537
9538
|
/* @__PURE__ */ h("span", { className: "pkt-header__logo-service", translate: "no", children: e })
|
|
9538
9539
|
] }),
|
|
9539
9540
|
/* @__PURE__ */ h("nav", { className: "pkt-header__actions", children: /* @__PURE__ */ x("ul", { className: "pkt-header__actions-row", children: [
|
|
9540
|
-
|
|
9541
|
+
f && /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
|
|
9541
9542
|
ri,
|
|
9542
9543
|
{
|
|
9543
9544
|
className: "pkt-header__menu-btn",
|
|
@@ -9589,7 +9590,7 @@ const Gd = ({
|
|
|
9589
9590
|
I.iconName && /* @__PURE__ */ h(R, { name: I.iconName, className: "pkt-link__icon" }),
|
|
9590
9591
|
I.title
|
|
9591
9592
|
] }) }, `userMenu-${_t}`)) }) }),
|
|
9592
|
-
(l ||
|
|
9593
|
+
(l || m) && /* @__PURE__ */ x("li", { children: [
|
|
9593
9594
|
l && /* @__PURE__ */ x(Wt, { children: [
|
|
9594
9595
|
/* @__PURE__ */ h("div", { className: "pkt-user-menu__label", children: "Representerer" }),
|
|
9595
9596
|
/* @__PURE__ */ h("div", { className: "pkt-user-menu__name", translate: "no", children: l.name }),
|
|
@@ -9598,7 +9599,7 @@ const Gd = ({
|
|
|
9598
9599
|
l.orgNumber
|
|
9599
9600
|
] })
|
|
9600
9601
|
] }),
|
|
9601
|
-
/* @__PURE__ */ h("ul", { className: "pkt-list mt-size-16", children:
|
|
9602
|
+
/* @__PURE__ */ h("ul", { className: "pkt-list mt-size-16", children: m && /* @__PURE__ */ h("li", { children: /* @__PURE__ */ x("button", { className: "pkt-link-button pkt-link", onClick: w, children: [
|
|
9602
9603
|
/* @__PURE__ */ h(R, { name: "cogwheel", className: "pkt-link__icon" }),
|
|
9603
9604
|
"Endre organisasjon"
|
|
9604
9605
|
] }) }) })
|
|
@@ -9678,8 +9679,8 @@ const ps = Z(
|
|
|
9678
9679
|
counterMaxLength: l,
|
|
9679
9680
|
optionalTag: d = !1,
|
|
9680
9681
|
optionalText: p = "Valgfritt",
|
|
9681
|
-
requiredTag:
|
|
9682
|
-
requiredText:
|
|
9682
|
+
requiredTag: m = !1,
|
|
9683
|
+
requiredText: f = "Må fylles ut",
|
|
9683
9684
|
tagText: y = null,
|
|
9684
9685
|
hasError: b = !1,
|
|
9685
9686
|
errorMessage: k,
|
|
@@ -9705,7 +9706,7 @@ const ps = Z(
|
|
|
9705
9706
|
] }) : null, we = () => /* @__PURE__ */ x(Wt, { children: [
|
|
9706
9707
|
y && /* @__PURE__ */ h("span", { className: oe + " pkt-tag--gray", children: y }),
|
|
9707
9708
|
d && /* @__PURE__ */ h("span", { className: oe + " pkt-tag--blue-light", children: p }),
|
|
9708
|
-
|
|
9709
|
+
m && /* @__PURE__ */ h("span", { className: oe + " pkt-tag--beige", children: f })
|
|
9709
9710
|
] }), ze = () => {
|
|
9710
9711
|
const ot = /* @__PURE__ */ x(Wt, { children: [
|
|
9711
9712
|
t,
|
|
@@ -9795,7 +9796,7 @@ const Ih = ({
|
|
|
9795
9796
|
className: l,
|
|
9796
9797
|
...d
|
|
9797
9798
|
}) => {
|
|
9798
|
-
const p = ["pkt-linkcard", t && `pkt-linkcard--${t}`].filter(Boolean).join(" "),
|
|
9799
|
+
const p = ["pkt-linkcard", t && `pkt-linkcard--${t}`].filter(Boolean).join(" "), m = ["pkt-linkcard__title", r && "pkt-link pkt-link--external"].filter(Boolean).join(" ");
|
|
9799
9800
|
return /* @__PURE__ */ x(
|
|
9800
9801
|
"a",
|
|
9801
9802
|
{
|
|
@@ -9806,7 +9807,7 @@ const Ih = ({
|
|
|
9806
9807
|
rel: n ? "noopener noreferrer" : void 0,
|
|
9807
9808
|
children: [
|
|
9808
9809
|
a && /* @__PURE__ */ h(R, { className: "pkt-link__icon", name: a }),
|
|
9809
|
-
e && /* @__PURE__ */ h("div", { className: ht(
|
|
9810
|
+
e && /* @__PURE__ */ h("div", { className: ht(m), children: e }),
|
|
9810
9811
|
/* @__PURE__ */ h("div", { className: "pkt-linkcard__text", children: i })
|
|
9811
9812
|
]
|
|
9812
9813
|
}
|
|
@@ -9833,17 +9834,17 @@ const Bh = ({
|
|
|
9833
9834
|
onClose: r,
|
|
9834
9835
|
...l
|
|
9835
9836
|
}) => {
|
|
9836
|
-
const [d, p] = je(!1),
|
|
9837
|
+
const [d, p] = je(!1), m = {
|
|
9837
9838
|
"pkt-messagebox": !0,
|
|
9838
9839
|
"pkt-messagebox--compact": a,
|
|
9839
9840
|
[`pkt-messagebox--${e}`]: e,
|
|
9840
9841
|
"pkt-messagebox--closable": n,
|
|
9841
9842
|
"pkt-hide": d
|
|
9842
|
-
},
|
|
9843
|
+
}, f = mn(), y = Ls(() => {
|
|
9843
9844
|
p(!0), r && r();
|
|
9844
9845
|
}, [p, r]);
|
|
9845
|
-
return /* @__PURE__ */ x("div", { ...l, className: ht(
|
|
9846
|
-
n && /* @__PURE__ */ h("div", { className:
|
|
9846
|
+
return /* @__PURE__ */ x("div", { ...l, className: ht(m, t), ref: f, children: [
|
|
9847
|
+
n && /* @__PURE__ */ h("div", { className: "pkt-messagebox__close", children: /* @__PURE__ */ h(
|
|
9847
9848
|
"button",
|
|
9848
9849
|
{
|
|
9849
9850
|
onClick: y,
|
|
@@ -9852,7 +9853,7 @@ const Bh = ({
|
|
|
9852
9853
|
children: /* @__PURE__ */ h(R, { name: "close", className: "pkt-link__icon" })
|
|
9853
9854
|
}
|
|
9854
9855
|
) }),
|
|
9855
|
-
/* @__PURE__ */ h("div", { className: "pkt-messagebox__title", children: s }),
|
|
9856
|
+
s && /* @__PURE__ */ h("div", { className: "pkt-messagebox__title", children: s }),
|
|
9856
9857
|
/* @__PURE__ */ h("div", { className: "pkt-messagebox__text", children: i })
|
|
9857
9858
|
] });
|
|
9858
9859
|
};
|
|
@@ -9889,8 +9890,8 @@ const Hh = Z(
|
|
|
9889
9890
|
hasError: l = !1,
|
|
9890
9891
|
defaultChecked: d,
|
|
9891
9892
|
checked: p,
|
|
9892
|
-
optionalTag:
|
|
9893
|
-
optionalText:
|
|
9893
|
+
optionalTag: m,
|
|
9894
|
+
optionalText: f,
|
|
9894
9895
|
requiredTag: y,
|
|
9895
9896
|
requiredText: b,
|
|
9896
9897
|
tagText: k,
|
|
@@ -9905,7 +9906,7 @@ const Hh = Z(
|
|
|
9905
9906
|
l ? "pkt-input-check__input-checkbox--error" : ""
|
|
9906
9907
|
].filter(Boolean).join(" "), N = ["pkt-input-check__input-label", n ? "pkt-input-check__input-label--disabled" : ""].filter(Boolean).join(" "), H = ["pkt-tag", "pkt-tag--small", "pkt-tag--thin-text"].join(" "), K = () => /* @__PURE__ */ x(Wt, { children: [
|
|
9907
9908
|
k && /* @__PURE__ */ h("span", { className: H + " pkt-tag--gray", children: k }),
|
|
9908
|
-
|
|
9909
|
+
m && /* @__PURE__ */ h("span", { className: H + " pkt-tag--blue-light", children: f }),
|
|
9909
9910
|
y && /* @__PURE__ */ h("span", { className: H + " pkt-tag--beige", children: b })
|
|
9910
9911
|
] });
|
|
9911
9912
|
return /* @__PURE__ */ h("div", { className: P, children: /* @__PURE__ */ x("div", { className: T, children: [
|
|
@@ -9944,8 +9945,8 @@ const Jd = Z(
|
|
|
9944
9945
|
suggestions: l,
|
|
9945
9946
|
value: d = "",
|
|
9946
9947
|
action: p,
|
|
9947
|
-
method:
|
|
9948
|
-
onChange:
|
|
9948
|
+
method: m,
|
|
9949
|
+
onChange: f,
|
|
9949
9950
|
onSearch: y,
|
|
9950
9951
|
onSuggestionClick: b,
|
|
9951
9952
|
...k
|
|
@@ -9956,7 +9957,7 @@ const Jd = Z(
|
|
|
9956
9957
|
d = N.target.value;
|
|
9957
9958
|
}, T = `pkt-searchinput pkt-searchinput--${i} ${e ? "pkt-searchinput--fullwidth" : ""}`;
|
|
9958
9959
|
let L;
|
|
9959
|
-
return p ? L = (N) => /* @__PURE__ */ h("form", { role: "search", className: T, action: p, method:
|
|
9960
|
+
return p ? L = (N) => /* @__PURE__ */ h("form", { role: "search", className: T, action: p, method: m, children: N }) : L = (N) => /* @__PURE__ */ h("div", { role: "search", className: T, children: N }), L(
|
|
9960
9961
|
/* @__PURE__ */ x(Wt, { children: [
|
|
9961
9962
|
a && /* @__PURE__ */ h("label", { htmlFor: a ? s : void 0, className: a ? "pkt-inputwrapper__label" : "", children: a }),
|
|
9962
9963
|
/* @__PURE__ */ x("div", { className: i === "local" ? "pkt-input__container" : "pkt-searchinput__field", children: [
|
|
@@ -9974,7 +9975,7 @@ const Jd = Z(
|
|
|
9974
9975
|
"aria-autocomplete": "list",
|
|
9975
9976
|
ref: w,
|
|
9976
9977
|
"aria-controls": `${s}-suggestions`,
|
|
9977
|
-
onChange:
|
|
9978
|
+
onChange: f || P,
|
|
9978
9979
|
onKeyUp: y && ((N) => {
|
|
9979
9980
|
N.key === "Enter" && (N.preventDefault(), y(d));
|
|
9980
9981
|
}),
|
|
@@ -10027,8 +10028,8 @@ const Jd = Z(
|
|
|
10027
10028
|
helptext: l,
|
|
10028
10029
|
helptextDropdown: d,
|
|
10029
10030
|
helptextDropdownButton: p,
|
|
10030
|
-
id:
|
|
10031
|
-
inline:
|
|
10031
|
+
id: m,
|
|
10032
|
+
inline: f = !1,
|
|
10032
10033
|
fullwidth: y = !1,
|
|
10033
10034
|
label: b,
|
|
10034
10035
|
name: k,
|
|
@@ -10044,7 +10045,7 @@ const Jd = Z(
|
|
|
10044
10045
|
ps,
|
|
10045
10046
|
{
|
|
10046
10047
|
className: K,
|
|
10047
|
-
forId: `${
|
|
10048
|
+
forId: `${m}-input`,
|
|
10048
10049
|
label: b,
|
|
10049
10050
|
helptext: l,
|
|
10050
10051
|
helptextDropdown: d,
|
|
@@ -10057,7 +10058,7 @@ const Jd = Z(
|
|
|
10057
10058
|
hasError: r,
|
|
10058
10059
|
errorMessage: n,
|
|
10059
10060
|
disabled: a,
|
|
10060
|
-
inline:
|
|
10061
|
+
inline: f,
|
|
10061
10062
|
ariaDescribedby: i,
|
|
10062
10063
|
children: /* @__PURE__ */ h(
|
|
10063
10064
|
"select",
|
|
@@ -10065,11 +10066,11 @@ const Jd = Z(
|
|
|
10065
10066
|
ref: H,
|
|
10066
10067
|
className: `pkt-input ${y ? "pkt-input--fullwidth" : ""}`,
|
|
10067
10068
|
"aria-invalid": r,
|
|
10068
|
-
"aria-errormessage": `${
|
|
10069
|
+
"aria-errormessage": `${m}-error`,
|
|
10069
10070
|
"aria-labelledby": t || void 0,
|
|
10070
10071
|
disabled: a,
|
|
10071
|
-
id: `${
|
|
10072
|
-
name: k ||
|
|
10072
|
+
id: `${m}-input`,
|
|
10073
|
+
name: k || m,
|
|
10073
10074
|
...N,
|
|
10074
10075
|
children: e
|
|
10075
10076
|
}
|
|
@@ -10106,12 +10107,12 @@ const Jd = Z(
|
|
|
10106
10107
|
t,
|
|
10107
10108
|
"pkt-stepper",
|
|
10108
10109
|
n === "horizontal" ? "pkt-stepper--horizontal" : "pkt-stepper--vertical"
|
|
10109
|
-
), p = Os.map(e, (
|
|
10110
|
-
className: ht(
|
|
10111
|
-
"pkt-step--hideStep": s &&
|
|
10112
|
-
"pkt-step--hideContent": a &&
|
|
10110
|
+
), p = Os.map(e, (m, f) => gn(m) ? vn(m, {
|
|
10111
|
+
className: ht(m.props.className, {
|
|
10112
|
+
"pkt-step--hideStep": s && f !== i,
|
|
10113
|
+
"pkt-step--hideContent": a && f !== i
|
|
10113
10114
|
})
|
|
10114
|
-
}) :
|
|
10115
|
+
}) : m);
|
|
10115
10116
|
return /* @__PURE__ */ h("ol", { "data-testid": "pkt-stepper", className: d, ref: l, ...r, children: p });
|
|
10116
10117
|
}
|
|
10117
10118
|
), ec = ({
|
|
@@ -10157,8 +10158,8 @@ const Jd = Z(
|
|
|
10157
10158
|
ariaLabel: l,
|
|
10158
10159
|
onClose: d,
|
|
10159
10160
|
type: p,
|
|
10160
|
-
"aria-description":
|
|
10161
|
-
...
|
|
10161
|
+
"aria-description": m,
|
|
10162
|
+
...f
|
|
10162
10163
|
}, y) => {
|
|
10163
10164
|
const [b, k] = je(!1), w = Ls(() => {
|
|
10164
10165
|
k(!0), d && d();
|
|
@@ -10166,7 +10167,7 @@ const Jd = Z(
|
|
|
10166
10167
|
var N, H;
|
|
10167
10168
|
if (a && !l) {
|
|
10168
10169
|
const K = (H = (N = S.current) == null ? void 0 : N.textContent) == null ? void 0 : H.trim();
|
|
10169
|
-
return K && `Klikk for å fjerne ${K}` ||
|
|
10170
|
+
return K && `Klikk for å fjerne ${K}` || m;
|
|
10170
10171
|
}
|
|
10171
10172
|
}, [a, l]), T = {
|
|
10172
10173
|
"pkt-tag": !0,
|
|
@@ -10186,7 +10187,7 @@ const Jd = Z(
|
|
|
10186
10187
|
return a ? /* @__PURE__ */ x(
|
|
10187
10188
|
"button",
|
|
10188
10189
|
{
|
|
10189
|
-
...
|
|
10190
|
+
...f,
|
|
10190
10191
|
className: ht(L, n),
|
|
10191
10192
|
type: p,
|
|
10192
10193
|
onClick: w,
|
|
@@ -10199,7 +10200,7 @@ const Jd = Z(
|
|
|
10199
10200
|
/* @__PURE__ */ h(R, { className: "pkt-tag__close-btn", name: "close" })
|
|
10200
10201
|
]
|
|
10201
10202
|
}
|
|
10202
|
-
) : /* @__PURE__ */ x("span", { ...
|
|
10203
|
+
) : /* @__PURE__ */ x("span", { ...f, className: ht(T, n), ref: y, children: [
|
|
10203
10204
|
r && /* @__PURE__ */ h(R, { className: "pkt-tag__icon", name: r }),
|
|
10204
10205
|
/* @__PURE__ */ h("span", { ref: S, children: i })
|
|
10205
10206
|
] });
|
|
@@ -10208,17 +10209,17 @@ const Jd = Z(
|
|
|
10208
10209
|
hn.displayName = "PktTag";
|
|
10209
10210
|
const dn = Z(
|
|
10210
10211
|
({ children: i, active: t, href: e, onClick: s, icon: a, controls: n, tag: r, tagSkin: l, index: d = 0 }, p) => {
|
|
10211
|
-
const { arrowNav:
|
|
10212
|
-
"aria-selected":
|
|
10212
|
+
const { arrowNav: m, registerTabRef: f, handleKeyPress: y, selectTab: b } = Kh(), w = {
|
|
10213
|
+
"aria-selected": m ? !!t : void 0,
|
|
10213
10214
|
"aria-controls": n,
|
|
10214
|
-
role:
|
|
10215
|
+
role: m ? "tab" : void 0,
|
|
10215
10216
|
onKeyUp: (P) => y(d, P),
|
|
10216
10217
|
onClick: (P) => {
|
|
10217
10218
|
b(d), s == null || s(P);
|
|
10218
10219
|
},
|
|
10219
|
-
tabIndex: t || !
|
|
10220
|
+
tabIndex: t || !m ? void 0 : -1,
|
|
10220
10221
|
ref: (P) => {
|
|
10221
|
-
|
|
10222
|
+
f(d, P), typeof p == "function" ? p(P) : p && (p.current = P);
|
|
10222
10223
|
}
|
|
10223
10224
|
}, S = /* @__PURE__ */ x(Wt, { children: [
|
|
10224
10225
|
a && /* @__PURE__ */ h(R, { name: a, className: "pkt-icon--small" }),
|
|
@@ -10240,12 +10241,12 @@ const cn = Ea(null), Kh = () => {
|
|
|
10240
10241
|
ns(() => {
|
|
10241
10242
|
r.current = r.current.slice(0, p);
|
|
10242
10243
|
}, [p]);
|
|
10243
|
-
const
|
|
10244
|
+
const m = (k) => {
|
|
10244
10245
|
const w = e == null ? void 0 : e[k];
|
|
10245
10246
|
w != null && w.action && w.action(k), s && s(k);
|
|
10246
|
-
},
|
|
10247
|
+
}, f = (k, w) => {
|
|
10247
10248
|
var S, P;
|
|
10248
|
-
l && (w.code === "ArrowLeft" && k !== 0 && ((S = r.current[k - 1]) == null || S.focus()), w.code === "ArrowRight" && k < p - 1 && ((P = r.current[k + 1]) == null || P.focus()), (w.code === "ArrowDown" || w.code === "Space") &&
|
|
10249
|
+
l && (w.code === "ArrowLeft" && k !== 0 && ((S = r.current[k - 1]) == null || S.focus()), w.code === "ArrowRight" && k < p - 1 && ((P = r.current[k + 1]) == null || P.focus()), (w.code === "ArrowDown" || w.code === "Space") && m(k));
|
|
10249
10250
|
}, y = (k, w) => {
|
|
10250
10251
|
r.current[k] = w;
|
|
10251
10252
|
}, b = e == null ? void 0 : e.map((k, w) => {
|
|
@@ -10255,7 +10256,7 @@ const cn = Ea(null), Kh = () => {
|
|
|
10255
10256
|
{
|
|
10256
10257
|
active: k.active,
|
|
10257
10258
|
href: k.href,
|
|
10258
|
-
onClick: () =>
|
|
10259
|
+
onClick: () => m(w),
|
|
10259
10260
|
icon: k.icon,
|
|
10260
10261
|
controls: k.controls,
|
|
10261
10262
|
tag: (S = k.tag) == null ? void 0 : S.text,
|
|
@@ -10266,7 +10267,7 @@ const cn = Ea(null), Kh = () => {
|
|
|
10266
10267
|
w
|
|
10267
10268
|
);
|
|
10268
10269
|
});
|
|
10269
|
-
return /* @__PURE__ */ h(cn.Provider, { value: { arrowNav: l, registerTabRef: y, handleKeyPress:
|
|
10270
|
+
return /* @__PURE__ */ h(cn.Provider, { value: { arrowNav: l, registerTabRef: y, handleKeyPress: f, selectTab: m }, children: /* @__PURE__ */ h("div", { className: "pkt-tabs", ref: n, children: /* @__PURE__ */ h("div", { className: "pkt-tabs__list", role: l ? "tablist" : "navigation", children: a || b }) }) });
|
|
10270
10271
|
}
|
|
10271
10272
|
), lc = Z(
|
|
10272
10273
|
({
|
|
@@ -10280,8 +10281,8 @@ const cn = Ea(null), Kh = () => {
|
|
|
10280
10281
|
errorMessage: l,
|
|
10281
10282
|
hasError: d,
|
|
10282
10283
|
helptext: p,
|
|
10283
|
-
helptextDropdown:
|
|
10284
|
-
helptextDropdownButton:
|
|
10284
|
+
helptextDropdown: m,
|
|
10285
|
+
helptextDropdownButton: f,
|
|
10285
10286
|
inline: y,
|
|
10286
10287
|
fullwidth: b = !1,
|
|
10287
10288
|
label: k,
|
|
@@ -10320,8 +10321,8 @@ const cn = Ea(null), Kh = () => {
|
|
|
10320
10321
|
forId: te,
|
|
10321
10322
|
hasError: d,
|
|
10322
10323
|
helptext: p,
|
|
10323
|
-
helptextDropdown:
|
|
10324
|
-
helptextDropdownButton:
|
|
10324
|
+
helptextDropdown: m,
|
|
10325
|
+
helptextDropdownButton: f,
|
|
10325
10326
|
inline: y,
|
|
10326
10327
|
label: k,
|
|
10327
10328
|
optionalTag: S,
|
|
@@ -10370,8 +10371,8 @@ const cn = Ea(null), Kh = () => {
|
|
|
10370
10371
|
disabled: l = !1,
|
|
10371
10372
|
errorMessage: d,
|
|
10372
10373
|
hasError: p = !1,
|
|
10373
|
-
helptext:
|
|
10374
|
-
helptextDropdown:
|
|
10374
|
+
helptext: m,
|
|
10375
|
+
helptextDropdown: f,
|
|
10375
10376
|
helptextDropdownButton: y,
|
|
10376
10377
|
iconNameRight: b,
|
|
10377
10378
|
inline: k = !1,
|
|
@@ -10418,8 +10419,8 @@ const cn = Ea(null), Kh = () => {
|
|
|
10418
10419
|
errorMessage: d,
|
|
10419
10420
|
forId: Ke,
|
|
10420
10421
|
hasError: p,
|
|
10421
|
-
helptext:
|
|
10422
|
-
helptextDropdown:
|
|
10422
|
+
helptext: m,
|
|
10423
|
+
helptextDropdown: f,
|
|
10423
10424
|
helptextDropdownButton: y,
|
|
10424
10425
|
inline: k,
|
|
10425
10426
|
label: S,
|