@oslokommune/punkt-elements 12.42.10 → 12.42.12
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/CHANGELOG.md +17 -0
- package/dist/{accordionitem-aQHOrGzf.js → accordionitem-Be6vyX31.js} +8 -7
- package/dist/{accordionitem-C4NQFQHo.cjs → accordionitem-ogt0KNGP.cjs} +5 -5
- package/dist/{alert-sBHt7DSh.js → alert-CZyqekhG.js} +22 -21
- package/dist/alert-DifeONO7.cjs +32 -0
- package/dist/{backlink-BnlrDl9O.js → backlink-C3dfam09.js} +12 -11
- package/dist/backlink-C9qmM67k.cjs +13 -0
- package/dist/{button-B4Oe8Ar0.js → button-OoC1RGJL.js} +8 -7
- package/dist/button-zO41ySZl.cjs +19 -0
- package/dist/calendar-BYYJH15O.cjs +108 -0
- package/dist/{calendar-Df6-FDRW.js → calendar-qEV4u3xs.js} +11 -10
- package/dist/{card-CXhVAeOG.cjs → card-CJue0Esh.cjs} +1 -1
- package/dist/{card-0Kf9L0A_.js → card-p-fcc7Wh.js} +9 -8
- package/dist/{checkbox-B67_cfqW.js → checkbox-BLI7dfpW.js} +4 -4
- package/dist/{checkbox-CiXWukkL.cjs → checkbox-iLywLQwL.cjs} +1 -1
- package/dist/{class-map-m7ZCZ49w.js → class-map-DO0E7GkW.js} +1 -1
- package/dist/{class-map-DWDPOqjO.cjs → class-map-dph2jLEp.cjs} +1 -1
- package/dist/{combobox-Dq7F5v-u.cjs → combobox-BJOVpwAW.cjs} +1 -1
- package/dist/{combobox-CsFDvh8U.js → combobox-C_Zj-ZxE.js} +11 -11
- package/dist/consent-BkgHuZ37.cjs +11 -0
- package/dist/{consent-B17ZIuwm.js → consent-C0pd0E2Q.js} +6 -5
- package/dist/{datepicker-DOf9XK9v.cjs → datepicker--I3DF-Ci.cjs} +1 -1
- package/dist/{datepicker-Cz6seIz1.js → datepicker-Y6-ORa5u.js} +11 -11
- package/dist/{directive-helpers--4ibN__v.js → directive-helpers-D2BEk_ct.js} +1 -1
- package/dist/{directive-helpers-v9b0v7lu.cjs → directive-helpers-lOXMtxMR.cjs} +2 -2
- package/dist/{element-gAd63VwC.js → element-Cfyyg4nF.js} +8658 -9250
- package/dist/element-DUJa1sRq.cjs +212 -0
- package/dist/heading-BWV1JThP.js +58 -0
- package/dist/heading-C6U6xiqH.cjs +1 -0
- package/dist/helptext-BxHMB-XH.cjs +24 -0
- package/dist/{helptext-BG_b6ytC.js → helptext-C7oP6VRp.js} +19 -18
- package/dist/{icon-CO1TLSs5.js → icon-DPnB79MP.js} +12 -11
- package/dist/{icon-B1_BRNqf.cjs → icon-RJ9Op-BB.cjs} +3 -3
- package/dist/if-defined-BQOEcjlp.cjs +5 -0
- package/dist/{if-defined-Cj-3Kdsr.js → if-defined-I-IZkUY2.js} +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/input-element-B2JauW-Y.cjs +1 -0
- package/dist/{input-element-BEvaQK4g.js → input-element-CaCDNzdI.js} +7 -6
- package/dist/{input-wrapper-CC_R5w7V.js → input-wrapper-BDm0DwAW.js} +14 -13
- package/dist/{input-wrapper-Dk0rKRlz.cjs → input-wrapper-DrJgi10C.cjs} +4 -4
- package/dist/{link-C9X0huxP.js → link-BzKHhT3c.js} +12 -11
- package/dist/link-Dhs4dS0S.cjs +7 -0
- package/dist/{linkcard-Bhk2ttou.js → linkcard-CyepaY-g.js} +14 -13
- package/dist/{linkcard-CaBz6i7A.cjs → linkcard-Czsb01sQ.cjs} +1 -1
- package/dist/{listbox-AjDNhDsQ.cjs → listbox-BIcmMiAK.cjs} +7 -7
- package/dist/{listbox-DCWdrjFp.js → listbox-Br7v_BsA.js} +11 -10
- package/dist/lit-element-DHqqtYbj.cjs +27 -0
- package/dist/lit-element-DcUrSbRH.js +595 -0
- package/dist/loader-5lt2W9RX.cjs +11 -0
- package/dist/{loader-DMp859px.js → loader-Co35Rkbv.js} +16 -15
- package/dist/messagebox-BSUbetVQ.cjs +12 -0
- package/dist/{messagebox-_1f12rDq.js → messagebox-CQXmoqzD.js} +18 -17
- package/dist/modal-5PZ-TDkV.cjs +36 -0
- package/dist/{modal-C3kEgTMj.js → modal-DuubDFPT.js} +27 -26
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +3 -3
- package/dist/pkt-index.js +63 -62
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-BSO0KWzv.js → progressbar-B75UwwRZ.js} +14 -13
- package/dist/{progressbar-BrXtjUvh.cjs → progressbar-DF8IG5IY.cjs} +7 -7
- package/dist/{radiobutton-BaIDDCwK.js → radiobutton-CDO-HMP_.js} +5 -5
- package/dist/{radiobutton-x10h-JEh.cjs → radiobutton-DUpADoLc.cjs} +1 -1
- package/dist/{ref-B-w1vCo8.cjs → ref-BMQZJJEo.cjs} +1 -1
- package/dist/{ref-DnSbnXsj.js → ref-DX488m2G.js} +2 -2
- package/dist/{repeat-CxQA3AeF.cjs → repeat-B93vZu9q.cjs} +1 -1
- package/dist/{repeat-lUFq9w5d.js → repeat-Dl4RVQIF.js} +2 -2
- package/dist/select-CE5L--Xw.cjs +48 -0
- package/dist/{select-BlL8T2BX.js → select-q7qkLeW4.js} +20 -20
- package/dist/{state-BxrO4zNJ.js → state-P2J1I2ny.js} +1 -1
- package/dist/{state-D-Recv7U.cjs → state-y-GU-VH8.cjs} +1 -1
- package/dist/{tag-m7OTZaCG.js → tag-OSIRLJc0.js} +21 -20
- package/dist/tag-sEPrma2U.cjs +18 -0
- package/dist/{textarea-Dk8hQMD2.js → textarea-BIvwbRBK.js} +22 -22
- package/dist/{textarea-Dc1sUaxx.cjs → textarea-BuhpS5Jj.cjs} +1 -1
- package/dist/{textinput-6Ip-0aVY.js → textinput-BFbenR3I.js} +8 -8
- package/dist/{textinput-DuLZ26DB.cjs → textinput-BUMlqXQC.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/heading/heading.ts +63 -37
- package/dist/alert-DUWuhtFC.cjs +0 -32
- package/dist/backlink-CcAZfB1d.cjs +0 -13
- package/dist/button-BT-FRGMk.cjs +0 -19
- package/dist/calendar-D4qfcRtv.cjs +0 -108
- package/dist/consent-CILYIgC-.cjs +0 -11
- package/dist/element-90YeMNbV.cjs +0 -238
- package/dist/heading-CGGKEZve.js +0 -59
- package/dist/heading-Cmh5bbTl.cjs +0 -1
- package/dist/helptext-CC3qLmEz.cjs +0 -24
- package/dist/if-defined-C8eotHpL.cjs +0 -5
- package/dist/input-element-CInrWeac.cjs +0 -1
- package/dist/link-qTz-qNVI.cjs +0 -7
- package/dist/loader-BqYcg8Di.cjs +0 -11
- package/dist/messagebox-Do_nAUo3.cjs +0 -12
- package/dist/modal-C1inKvts.cjs +0 -36
- package/dist/select-BkVSXR5K.cjs +0 -48
- package/dist/tag-DrbI0ng3.cjs +0 -18
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const C = globalThis, N = C.trustedTypes, W = N ? N.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, et = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, st = "?" + _, ot = `<${st}>`, g = document, U = () => g.createComment(""), x = (r) => r === null || typeof r != "object" && typeof r != "function", I = Array.isArray, ht = (r) => I(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", D = `[
|
|
7
|
+
\f\r]`, w = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, V = /-->/g, Z = />/g, A = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
8
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), J = /'/g, K = /"/g, it = /^(?:script|style|textarea|title)$/i, at = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Ut = at(1), E = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), F = /* @__PURE__ */ new WeakMap(), m = g.createTreeWalker(g, 129);
|
|
9
|
+
function rt(r, t) {
|
|
10
|
+
if (!I(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
11
|
+
return W !== void 0 ? W.createHTML(t) : t;
|
|
12
|
+
}
|
|
13
|
+
const lt = (r, t) => {
|
|
14
|
+
const e = r.length - 1, s = [];
|
|
15
|
+
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = w;
|
|
16
|
+
for (let a = 0; a < e; a++) {
|
|
17
|
+
const h = r[a];
|
|
18
|
+
let c, p, l = -1, u = 0;
|
|
19
|
+
for (; u < h.length && (o.lastIndex = u, p = o.exec(h), p !== null); ) u = o.lastIndex, o === w ? p[1] === "!--" ? o = V : p[1] !== void 0 ? o = Z : p[2] !== void 0 ? (it.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = A) : p[3] !== void 0 && (o = A) : o === A ? p[0] === ">" ? (o = i ?? w, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? A : p[3] === '"' ? K : J) : o === K || o === J ? o = A : o === V || o === Z ? o = w : (o = A, i = void 0);
|
|
20
|
+
const $ = o === A && r[a + 1].startsWith("/>") ? " " : "";
|
|
21
|
+
n += o === w ? h + ot : l >= 0 ? (s.push(c), h.slice(0, l) + et + h.slice(l) + _ + $) : h + _ + (l === -2 ? a : $);
|
|
22
|
+
}
|
|
23
|
+
return [rt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
24
|
+
};
|
|
25
|
+
class O {
|
|
26
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
27
|
+
let i;
|
|
28
|
+
this.parts = [];
|
|
29
|
+
let n = 0, o = 0;
|
|
30
|
+
const a = t.length - 1, h = this.parts, [c, p] = lt(t, e);
|
|
31
|
+
if (this.el = O.createElement(c, s), m.currentNode = this.el.content, e === 2 || e === 3) {
|
|
32
|
+
const l = this.el.content.firstChild;
|
|
33
|
+
l.replaceWith(...l.childNodes);
|
|
34
|
+
}
|
|
35
|
+
for (; (i = m.nextNode()) !== null && h.length < a; ) {
|
|
36
|
+
if (i.nodeType === 1) {
|
|
37
|
+
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(et)) {
|
|
38
|
+
const u = p[o++], $ = i.getAttribute(l).split(_), M = /([.?@])?(.*)/.exec(u);
|
|
39
|
+
h.push({ type: 1, index: n, name: M[2], strings: $, ctor: M[1] === "." ? dt : M[1] === "?" ? pt : M[1] === "@" ? ut : k }), i.removeAttribute(l);
|
|
40
|
+
} else l.startsWith(_) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
|
|
41
|
+
if (it.test(i.tagName)) {
|
|
42
|
+
const l = i.textContent.split(_), u = l.length - 1;
|
|
43
|
+
if (u > 0) {
|
|
44
|
+
i.textContent = N ? N.emptyScript : "";
|
|
45
|
+
for (let $ = 0; $ < u; $++) i.append(l[$], U()), m.nextNode(), h.push({ type: 2, index: ++n });
|
|
46
|
+
i.append(l[u], U());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} else if (i.nodeType === 8) if (i.data === st) h.push({ type: 2, index: n });
|
|
50
|
+
else {
|
|
51
|
+
let l = -1;
|
|
52
|
+
for (; (l = i.data.indexOf(_, l + 1)) !== -1; ) h.push({ type: 7, index: n }), l += _.length - 1;
|
|
53
|
+
}
|
|
54
|
+
n++;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static createElement(t, e) {
|
|
58
|
+
const s = g.createElement("template");
|
|
59
|
+
return s.innerHTML = t, s;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function S(r, t, e = r, s) {
|
|
63
|
+
var o, a;
|
|
64
|
+
if (t === E) return t;
|
|
65
|
+
let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
66
|
+
const n = x(t) ? void 0 : t._$litDirective$;
|
|
67
|
+
return (i == null ? void 0 : i.constructor) !== n && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t;
|
|
68
|
+
}
|
|
69
|
+
class ct {
|
|
70
|
+
constructor(t, e) {
|
|
71
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
72
|
+
}
|
|
73
|
+
get parentNode() {
|
|
74
|
+
return this._$AM.parentNode;
|
|
75
|
+
}
|
|
76
|
+
get _$AU() {
|
|
77
|
+
return this._$AM._$AU;
|
|
78
|
+
}
|
|
79
|
+
u(t) {
|
|
80
|
+
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? g).importNode(e, !0);
|
|
81
|
+
m.currentNode = i;
|
|
82
|
+
let n = m.nextNode(), o = 0, a = 0, h = s[0];
|
|
83
|
+
for (; h !== void 0; ) {
|
|
84
|
+
if (o === h.index) {
|
|
85
|
+
let c;
|
|
86
|
+
h.type === 2 ? c = new b(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new $t(n, this, t)), this._$AV.push(c), h = s[++a];
|
|
87
|
+
}
|
|
88
|
+
o !== (h == null ? void 0 : h.index) && (n = m.nextNode(), o++);
|
|
89
|
+
}
|
|
90
|
+
return m.currentNode = g, i;
|
|
91
|
+
}
|
|
92
|
+
p(t) {
|
|
93
|
+
let e = 0;
|
|
94
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class b {
|
|
98
|
+
get _$AU() {
|
|
99
|
+
var t;
|
|
100
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
101
|
+
}
|
|
102
|
+
constructor(t, e, s, i) {
|
|
103
|
+
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
104
|
+
}
|
|
105
|
+
get parentNode() {
|
|
106
|
+
let t = this._$AA.parentNode;
|
|
107
|
+
const e = this._$AM;
|
|
108
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
109
|
+
}
|
|
110
|
+
get startNode() {
|
|
111
|
+
return this._$AA;
|
|
112
|
+
}
|
|
113
|
+
get endNode() {
|
|
114
|
+
return this._$AB;
|
|
115
|
+
}
|
|
116
|
+
_$AI(t, e = this) {
|
|
117
|
+
t = S(this, t, e), x(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ht(t) ? this.k(t) : this._(t);
|
|
118
|
+
}
|
|
119
|
+
O(t) {
|
|
120
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
121
|
+
}
|
|
122
|
+
T(t) {
|
|
123
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
124
|
+
}
|
|
125
|
+
_(t) {
|
|
126
|
+
this._$AH !== d && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(g.createTextNode(t)), this._$AH = t;
|
|
127
|
+
}
|
|
128
|
+
$(t) {
|
|
129
|
+
var n;
|
|
130
|
+
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(rt(s.h, s.h[0]), this.options)), s);
|
|
131
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e);
|
|
132
|
+
else {
|
|
133
|
+
const o = new ct(i, this), a = o.u(this.options);
|
|
134
|
+
o.p(e), this.T(a), this._$AH = o;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
_$AC(t) {
|
|
138
|
+
let e = F.get(t.strings);
|
|
139
|
+
return e === void 0 && F.set(t.strings, e = new O(t)), e;
|
|
140
|
+
}
|
|
141
|
+
k(t) {
|
|
142
|
+
I(this._$AH) || (this._$AH = [], this._$AR());
|
|
143
|
+
const e = this._$AH;
|
|
144
|
+
let s, i = 0;
|
|
145
|
+
for (const n of t) i === e.length ? e.push(s = new b(this.O(U()), this.O(U()), this, this.options)) : s = e[i], s._$AI(n), i++;
|
|
146
|
+
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
|
147
|
+
}
|
|
148
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
149
|
+
var s;
|
|
150
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
151
|
+
const i = t.nextSibling;
|
|
152
|
+
t.remove(), t = i;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
setConnected(t) {
|
|
156
|
+
var e;
|
|
157
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
class k {
|
|
161
|
+
get tagName() {
|
|
162
|
+
return this.element.tagName;
|
|
163
|
+
}
|
|
164
|
+
get _$AU() {
|
|
165
|
+
return this._$AM._$AU;
|
|
166
|
+
}
|
|
167
|
+
constructor(t, e, s, i, n) {
|
|
168
|
+
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
|
|
169
|
+
}
|
|
170
|
+
_$AI(t, e = this, s, i) {
|
|
171
|
+
const n = this.strings;
|
|
172
|
+
let o = !1;
|
|
173
|
+
if (n === void 0) t = S(this, t, e, 0), o = !x(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
174
|
+
else {
|
|
175
|
+
const a = t;
|
|
176
|
+
let h, c;
|
|
177
|
+
for (t = n[0], h = 0; h < n.length - 1; h++) c = S(this, a[s + h], e, h), c === E && (c = this._$AH[h]), o || (o = !x(c) || c !== this._$AH[h]), c === d ? t = d : t !== d && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
|
|
178
|
+
}
|
|
179
|
+
o && !i && this.j(t);
|
|
180
|
+
}
|
|
181
|
+
j(t) {
|
|
182
|
+
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
class dt extends k {
|
|
186
|
+
constructor() {
|
|
187
|
+
super(...arguments), this.type = 3;
|
|
188
|
+
}
|
|
189
|
+
j(t) {
|
|
190
|
+
this.element[this.name] = t === d ? void 0 : t;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
class pt extends k {
|
|
194
|
+
constructor() {
|
|
195
|
+
super(...arguments), this.type = 4;
|
|
196
|
+
}
|
|
197
|
+
j(t) {
|
|
198
|
+
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
class ut extends k {
|
|
202
|
+
constructor(t, e, s, i, n) {
|
|
203
|
+
super(t, e, s, i, n), this.type = 5;
|
|
204
|
+
}
|
|
205
|
+
_$AI(t, e = this) {
|
|
206
|
+
if ((t = S(this, t, e, 0) ?? d) === E) return;
|
|
207
|
+
const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || i);
|
|
208
|
+
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
209
|
+
}
|
|
210
|
+
handleEvent(t) {
|
|
211
|
+
var e;
|
|
212
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
class $t {
|
|
216
|
+
constructor(t, e, s) {
|
|
217
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
218
|
+
}
|
|
219
|
+
get _$AU() {
|
|
220
|
+
return this._$AM._$AU;
|
|
221
|
+
}
|
|
222
|
+
_$AI(t) {
|
|
223
|
+
S(this, t);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const xt = { I: b }, j = C.litHtmlPolyfillSupport;
|
|
227
|
+
j == null || j(O, b), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.3.0");
|
|
228
|
+
const _t = (r, t, e) => {
|
|
229
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
230
|
+
let i = s._$litPart$;
|
|
231
|
+
if (i === void 0) {
|
|
232
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
233
|
+
s._$litPart$ = i = new b(t.insertBefore(U(), n), n, void 0, e ?? {});
|
|
234
|
+
}
|
|
235
|
+
return i._$AI(r), i;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* @license
|
|
239
|
+
* Copyright 2017 Google LLC
|
|
240
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
241
|
+
*/
|
|
242
|
+
const Ot = (r) => (t, e) => {
|
|
243
|
+
e !== void 0 ? e.addInitializer(() => {
|
|
244
|
+
customElements.define(r, t);
|
|
245
|
+
}) : customElements.define(r, t);
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* @license
|
|
249
|
+
* Copyright 2019 Google LLC
|
|
250
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
251
|
+
*/
|
|
252
|
+
const H = globalThis, B = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, nt = Symbol(), G = /* @__PURE__ */ new WeakMap();
|
|
253
|
+
let ft = class {
|
|
254
|
+
constructor(t, e, s) {
|
|
255
|
+
if (this._$cssResult$ = !0, s !== nt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
256
|
+
this.cssText = t, this.t = e;
|
|
257
|
+
}
|
|
258
|
+
get styleSheet() {
|
|
259
|
+
let t = this.o;
|
|
260
|
+
const e = this.t;
|
|
261
|
+
if (B && t === void 0) {
|
|
262
|
+
const s = e !== void 0 && e.length === 1;
|
|
263
|
+
s && (t = G.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && G.set(e, t));
|
|
264
|
+
}
|
|
265
|
+
return t;
|
|
266
|
+
}
|
|
267
|
+
toString() {
|
|
268
|
+
return this.cssText;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
const At = (r) => new ft(typeof r == "string" ? r : r + "", void 0, nt), mt = (r, t) => {
|
|
272
|
+
if (B) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
273
|
+
else for (const e of t) {
|
|
274
|
+
const s = document.createElement("style"), i = H.litNonce;
|
|
275
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
|
276
|
+
}
|
|
277
|
+
}, Q = B ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
|
278
|
+
let e = "";
|
|
279
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
280
|
+
return At(e);
|
|
281
|
+
})(r) : r;
|
|
282
|
+
/**
|
|
283
|
+
* @license
|
|
284
|
+
* Copyright 2017 Google LLC
|
|
285
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
|
+
*/
|
|
287
|
+
const { is: yt, defineProperty: gt, getOwnPropertyDescriptor: vt, getOwnPropertyNames: Et, getOwnPropertySymbols: St, getPrototypeOf: bt } = Object, f = globalThis, X = f.trustedTypes, wt = X ? X.emptyScript : "", z = f.reactiveElementPolyfillSupport, P = (r, t) => r, R = { toAttribute(r, t) {
|
|
288
|
+
switch (t) {
|
|
289
|
+
case Boolean:
|
|
290
|
+
r = r ? wt : null;
|
|
291
|
+
break;
|
|
292
|
+
case Object:
|
|
293
|
+
case Array:
|
|
294
|
+
r = r == null ? r : JSON.stringify(r);
|
|
295
|
+
}
|
|
296
|
+
return r;
|
|
297
|
+
}, fromAttribute(r, t) {
|
|
298
|
+
let e = r;
|
|
299
|
+
switch (t) {
|
|
300
|
+
case Boolean:
|
|
301
|
+
e = r !== null;
|
|
302
|
+
break;
|
|
303
|
+
case Number:
|
|
304
|
+
e = r === null ? null : Number(r);
|
|
305
|
+
break;
|
|
306
|
+
case Object:
|
|
307
|
+
case Array:
|
|
308
|
+
try {
|
|
309
|
+
e = JSON.parse(r);
|
|
310
|
+
} catch {
|
|
311
|
+
e = null;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return e;
|
|
315
|
+
} }, q = (r, t) => !yt(r, t), Y = { attribute: !0, type: String, converter: R, reflect: !1, useDefault: !1, hasChanged: q };
|
|
316
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
317
|
+
class v extends HTMLElement {
|
|
318
|
+
static addInitializer(t) {
|
|
319
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
320
|
+
}
|
|
321
|
+
static get observedAttributes() {
|
|
322
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
323
|
+
}
|
|
324
|
+
static createProperty(t, e = Y) {
|
|
325
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
326
|
+
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
|
327
|
+
i !== void 0 && gt(this.prototype, t, i);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
static getPropertyDescriptor(t, e, s) {
|
|
331
|
+
const { get: i, set: n } = vt(this.prototype, t) ?? { get() {
|
|
332
|
+
return this[e];
|
|
333
|
+
}, set(o) {
|
|
334
|
+
this[e] = o;
|
|
335
|
+
} };
|
|
336
|
+
return { get: i, set(o) {
|
|
337
|
+
const a = i == null ? void 0 : i.call(this);
|
|
338
|
+
n == null || n.call(this, o), this.requestUpdate(t, a, s);
|
|
339
|
+
}, configurable: !0, enumerable: !0 };
|
|
340
|
+
}
|
|
341
|
+
static getPropertyOptions(t) {
|
|
342
|
+
return this.elementProperties.get(t) ?? Y;
|
|
343
|
+
}
|
|
344
|
+
static _$Ei() {
|
|
345
|
+
if (this.hasOwnProperty(P("elementProperties"))) return;
|
|
346
|
+
const t = bt(this);
|
|
347
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
348
|
+
}
|
|
349
|
+
static finalize() {
|
|
350
|
+
if (this.hasOwnProperty(P("finalized"))) return;
|
|
351
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
|
|
352
|
+
const e = this.properties, s = [...Et(e), ...St(e)];
|
|
353
|
+
for (const i of s) this.createProperty(i, e[i]);
|
|
354
|
+
}
|
|
355
|
+
const t = this[Symbol.metadata];
|
|
356
|
+
if (t !== null) {
|
|
357
|
+
const e = litPropertyMetadata.get(t);
|
|
358
|
+
if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
|
|
359
|
+
}
|
|
360
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
361
|
+
for (const [e, s] of this.elementProperties) {
|
|
362
|
+
const i = this._$Eu(e, s);
|
|
363
|
+
i !== void 0 && this._$Eh.set(i, e);
|
|
364
|
+
}
|
|
365
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
366
|
+
}
|
|
367
|
+
static finalizeStyles(t) {
|
|
368
|
+
const e = [];
|
|
369
|
+
if (Array.isArray(t)) {
|
|
370
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
371
|
+
for (const i of s) e.unshift(Q(i));
|
|
372
|
+
} else t !== void 0 && e.push(Q(t));
|
|
373
|
+
return e;
|
|
374
|
+
}
|
|
375
|
+
static _$Eu(t, e) {
|
|
376
|
+
const s = e.attribute;
|
|
377
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
378
|
+
}
|
|
379
|
+
constructor() {
|
|
380
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
381
|
+
}
|
|
382
|
+
_$Ev() {
|
|
383
|
+
var t;
|
|
384
|
+
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
385
|
+
}
|
|
386
|
+
addController(t) {
|
|
387
|
+
var e;
|
|
388
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
389
|
+
}
|
|
390
|
+
removeController(t) {
|
|
391
|
+
var e;
|
|
392
|
+
(e = this._$EO) == null || e.delete(t);
|
|
393
|
+
}
|
|
394
|
+
_$E_() {
|
|
395
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
396
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
397
|
+
t.size > 0 && (this._$Ep = t);
|
|
398
|
+
}
|
|
399
|
+
createRenderRoot() {
|
|
400
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
401
|
+
return mt(t, this.constructor.elementStyles), t;
|
|
402
|
+
}
|
|
403
|
+
connectedCallback() {
|
|
404
|
+
var t;
|
|
405
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
406
|
+
var s;
|
|
407
|
+
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
enableUpdating(t) {
|
|
411
|
+
}
|
|
412
|
+
disconnectedCallback() {
|
|
413
|
+
var t;
|
|
414
|
+
(t = this._$EO) == null || t.forEach((e) => {
|
|
415
|
+
var s;
|
|
416
|
+
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
attributeChangedCallback(t, e, s) {
|
|
420
|
+
this._$AK(t, s);
|
|
421
|
+
}
|
|
422
|
+
_$ET(t, e) {
|
|
423
|
+
var n;
|
|
424
|
+
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
|
425
|
+
if (i !== void 0 && s.reflect === !0) {
|
|
426
|
+
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : R).toAttribute(e, s.type);
|
|
427
|
+
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
_$AK(t, e) {
|
|
431
|
+
var n, o;
|
|
432
|
+
const s = this.constructor, i = s._$Eh.get(t);
|
|
433
|
+
if (i !== void 0 && this._$Em !== i) {
|
|
434
|
+
const a = s.getPropertyOptions(i), h = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? a.converter : R;
|
|
435
|
+
this._$Em = i, this[i] = h.fromAttribute(e, a.type) ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? null, this._$Em = null;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
requestUpdate(t, e, s) {
|
|
439
|
+
var i;
|
|
440
|
+
if (t !== void 0) {
|
|
441
|
+
const n = this.constructor, o = this[t];
|
|
442
|
+
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? q)(o, e) || s.useDefault && s.reflect && o === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
|
|
443
|
+
this.C(t, e, s);
|
|
444
|
+
}
|
|
445
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
446
|
+
}
|
|
447
|
+
C(t, e, { useDefault: s, reflect: i, wrapped: n }, o) {
|
|
448
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
449
|
+
}
|
|
450
|
+
async _$EP() {
|
|
451
|
+
this.isUpdatePending = !0;
|
|
452
|
+
try {
|
|
453
|
+
await this._$ES;
|
|
454
|
+
} catch (e) {
|
|
455
|
+
Promise.reject(e);
|
|
456
|
+
}
|
|
457
|
+
const t = this.scheduleUpdate();
|
|
458
|
+
return t != null && await t, !this.isUpdatePending;
|
|
459
|
+
}
|
|
460
|
+
scheduleUpdate() {
|
|
461
|
+
return this.performUpdate();
|
|
462
|
+
}
|
|
463
|
+
performUpdate() {
|
|
464
|
+
var s;
|
|
465
|
+
if (!this.isUpdatePending) return;
|
|
466
|
+
if (!this.hasUpdated) {
|
|
467
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
468
|
+
for (const [n, o] of this._$Ep) this[n] = o;
|
|
469
|
+
this._$Ep = void 0;
|
|
470
|
+
}
|
|
471
|
+
const i = this.constructor.elementProperties;
|
|
472
|
+
if (i.size > 0) for (const [n, o] of i) {
|
|
473
|
+
const { wrapped: a } = o, h = this[n];
|
|
474
|
+
a !== !0 || this._$AL.has(n) || h === void 0 || this.C(n, void 0, o, h);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
let t = !1;
|
|
478
|
+
const e = this._$AL;
|
|
479
|
+
try {
|
|
480
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
|
|
481
|
+
var n;
|
|
482
|
+
return (n = i.hostUpdate) == null ? void 0 : n.call(i);
|
|
483
|
+
}), this.update(e)) : this._$EM();
|
|
484
|
+
} catch (i) {
|
|
485
|
+
throw t = !1, this._$EM(), i;
|
|
486
|
+
}
|
|
487
|
+
t && this._$AE(e);
|
|
488
|
+
}
|
|
489
|
+
willUpdate(t) {
|
|
490
|
+
}
|
|
491
|
+
_$AE(t) {
|
|
492
|
+
var e;
|
|
493
|
+
(e = this._$EO) == null || e.forEach((s) => {
|
|
494
|
+
var i;
|
|
495
|
+
return (i = s.hostUpdated) == null ? void 0 : i.call(s);
|
|
496
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
497
|
+
}
|
|
498
|
+
_$EM() {
|
|
499
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
500
|
+
}
|
|
501
|
+
get updateComplete() {
|
|
502
|
+
return this.getUpdateComplete();
|
|
503
|
+
}
|
|
504
|
+
getUpdateComplete() {
|
|
505
|
+
return this._$ES;
|
|
506
|
+
}
|
|
507
|
+
shouldUpdate(t) {
|
|
508
|
+
return !0;
|
|
509
|
+
}
|
|
510
|
+
update(t) {
|
|
511
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach((e) => this._$ET(e, this[e]))), this._$EM();
|
|
512
|
+
}
|
|
513
|
+
updated(t) {
|
|
514
|
+
}
|
|
515
|
+
firstUpdated(t) {
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
v.elementStyles = [], v.shadowRootOptions = { mode: "open" }, v[P("elementProperties")] = /* @__PURE__ */ new Map(), v[P("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: v }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.1.0");
|
|
519
|
+
/**
|
|
520
|
+
* @license
|
|
521
|
+
* Copyright 2017 Google LLC
|
|
522
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
523
|
+
*/
|
|
524
|
+
const Ct = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: q }, Pt = (r = Ct, t, e) => {
|
|
525
|
+
const { kind: s, metadata: i } = e;
|
|
526
|
+
let n = globalThis.litPropertyMetadata.get(i);
|
|
527
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), s === "accessor") {
|
|
528
|
+
const { name: o } = e;
|
|
529
|
+
return { set(a) {
|
|
530
|
+
const h = t.get.call(this);
|
|
531
|
+
t.set.call(this, a), this.requestUpdate(o, h, r);
|
|
532
|
+
}, init(a) {
|
|
533
|
+
return a !== void 0 && this.C(o, void 0, r, a), a;
|
|
534
|
+
} };
|
|
535
|
+
}
|
|
536
|
+
if (s === "setter") {
|
|
537
|
+
const { name: o } = e;
|
|
538
|
+
return function(a) {
|
|
539
|
+
const h = this[o];
|
|
540
|
+
t.call(this, a), this.requestUpdate(o, h, r);
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
throw Error("Unsupported decorator location: " + s);
|
|
544
|
+
};
|
|
545
|
+
function Ht(r) {
|
|
546
|
+
return (t, e) => typeof e == "object" ? Pt(r, t, e) : ((s, i, n) => {
|
|
547
|
+
const o = i.hasOwnProperty(n);
|
|
548
|
+
return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
549
|
+
})(r, t, e);
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* @license
|
|
553
|
+
* Copyright 2017 Google LLC
|
|
554
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
555
|
+
*/
|
|
556
|
+
const y = globalThis;
|
|
557
|
+
class T extends v {
|
|
558
|
+
constructor() {
|
|
559
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
560
|
+
}
|
|
561
|
+
createRenderRoot() {
|
|
562
|
+
var e;
|
|
563
|
+
const t = super.createRenderRoot();
|
|
564
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
|
565
|
+
}
|
|
566
|
+
update(t) {
|
|
567
|
+
const e = this.render();
|
|
568
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = _t(e, this.renderRoot, this.renderOptions);
|
|
569
|
+
}
|
|
570
|
+
connectedCallback() {
|
|
571
|
+
var t;
|
|
572
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
573
|
+
}
|
|
574
|
+
disconnectedCallback() {
|
|
575
|
+
var t;
|
|
576
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
577
|
+
}
|
|
578
|
+
render() {
|
|
579
|
+
return E;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
var tt;
|
|
583
|
+
T._$litElement$ = !0, T.finalized = !0, (tt = y.litElementHydrateSupport) == null || tt.call(y, { LitElement: T });
|
|
584
|
+
const L = y.litElementPolyfillSupport;
|
|
585
|
+
L == null || L({ LitElement: T });
|
|
586
|
+
(y.litElementVersions ?? (y.litElementVersions = [])).push("4.2.0");
|
|
587
|
+
export {
|
|
588
|
+
d as E,
|
|
589
|
+
E as T,
|
|
590
|
+
xt as Z,
|
|
591
|
+
T as i,
|
|
592
|
+
Ht as n,
|
|
593
|
+
Ot as t,
|
|
594
|
+
Ut as x
|
|
595
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const h=require("./element-DUJa1sRq.cjs"),d=require("./class-map-dph2jLEp.cjs"),t=require("./lit-element-DHqqtYbj.cjs"),u=require("./state-y-GU-VH8.cjs"),p=require("./ref-BMQZJJEo.cjs"),c=require("./pkt-slot-controller-BzddBp7z.cjs");require("./icon-RJ9Op-BB.cjs");var y=Object.defineProperty,k=Object.getOwnPropertyDescriptor,s=(r,e,a,o)=>{for(var i=o>1?void 0:o?k(e,a):e,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=(o?l(e,a,i):l(i))||i);return o&&i&&y(e,a,i),i};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktLoader=class extends h.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new c.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(e){e.has("delay")&&this.setupLoader()}render(){const e=d.e({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),a=d.e({"pkt-contents":!0,"pkt-hide":this.isLoading});return t.x`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${e}>
|
|
2
|
+
${this.isLoading&&this._shouldDisplayLoader?t.x`<div class="pkt-loader__spinner">
|
|
3
|
+
<pkt-icon
|
|
4
|
+
name=${this.getVariant(this.variant)}
|
|
5
|
+
path=${this.loadingAnimationPath}
|
|
6
|
+
class="pkt-loader__svg pkt-loader__${this.variant}"
|
|
7
|
+
></pkt-icon>
|
|
8
|
+
${this.message&&t.x`<p>${this.message}</p>`}
|
|
9
|
+
</div>`:t.E}
|
|
10
|
+
<div class=${a} ${p.n(this.defaultSlot)}></div>
|
|
11
|
+
</div>`}getVariant(e){switch(e){case"blue":return"spinner-blue";case"rainbow":return"spinner";default:return"loader"}}setupLoader(){this.delay>0&&(this._shouldDisplayLoader=!1,setTimeout(()=>{this._shouldDisplayLoader=!0,this.requestUpdate()},this.delay))}};s([t.n({type:Number})],exports.PktLoader.prototype,"delay",2);s([t.n({type:Boolean})],exports.PktLoader.prototype,"inline",2);s([t.n({type:Boolean})],exports.PktLoader.prototype,"isLoading",2);s([t.n({type:String})],exports.PktLoader.prototype,"message",2);s([t.n({type:String})],exports.PktLoader.prototype,"size",2);s([t.n({type:String})],exports.PktLoader.prototype,"variant",2);s([t.n({type:String})],exports.PktLoader.prototype,"loadingAnimationPath",2);s([u.r()],exports.PktLoader.prototype,"_shouldDisplayLoader",2);exports.PktLoader=s([t.t("pkt-loader")],exports.PktLoader);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { P as u
|
|
2
|
-
import { e as h } from "./class-map-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { P as u } from "./element-Cfyyg4nF.js";
|
|
2
|
+
import { e as h } from "./class-map-DO0E7GkW.js";
|
|
3
|
+
import { E as m, x as d, n as a, t as y } from "./lit-element-DcUrSbRH.js";
|
|
4
|
+
import { r as c } from "./state-P2J1I2ny.js";
|
|
5
|
+
import { e as f, n as g } from "./ref-DX488m2G.js";
|
|
5
6
|
import { P as v } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
6
|
-
import "./icon-
|
|
7
|
-
var _ = Object.defineProperty, k = Object.getOwnPropertyDescriptor, e = (
|
|
8
|
-
for (var
|
|
9
|
-
(p =
|
|
10
|
-
return r &&
|
|
7
|
+
import "./icon-DPnB79MP.js";
|
|
8
|
+
var _ = Object.defineProperty, k = Object.getOwnPropertyDescriptor, e = (i, o, n, r) => {
|
|
9
|
+
for (var s = r > 1 ? void 0 : r ? k(o, n) : o, l = i.length - 1, p; l >= 0; l--)
|
|
10
|
+
(p = i[l]) && (s = (r ? p(o, n, s) : p(s)) || s);
|
|
11
|
+
return r && s && _(o, n, s), s;
|
|
11
12
|
};
|
|
12
13
|
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/latest/animations/";
|
|
13
14
|
let t = class extends u {
|
|
@@ -17,11 +18,11 @@ let t = class extends u {
|
|
|
17
18
|
connectedCallback() {
|
|
18
19
|
super.connectedCallback(), this._shouldDisplayLoader = this.delay === 0, this.delay > 0 && this.setupLoader();
|
|
19
20
|
}
|
|
20
|
-
updated(
|
|
21
|
-
|
|
21
|
+
updated(i) {
|
|
22
|
+
i.has("delay") && this.setupLoader();
|
|
22
23
|
}
|
|
23
24
|
render() {
|
|
24
|
-
const
|
|
25
|
+
const i = h({
|
|
25
26
|
"pkt-loader": !0,
|
|
26
27
|
[`pkt-loader--${this.inline ? "inline" : "box"}`]: !0,
|
|
27
28
|
[`pkt-loader--${this.size}`]: !0
|
|
@@ -29,7 +30,7 @@ let t = class extends u {
|
|
|
29
30
|
"pkt-contents": !0,
|
|
30
31
|
"pkt-hide": this.isLoading
|
|
31
32
|
});
|
|
32
|
-
return d`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${
|
|
33
|
+
return d`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${i}>
|
|
33
34
|
${this.isLoading && this._shouldDisplayLoader ? d`<div class="pkt-loader__spinner">
|
|
34
35
|
<pkt-icon
|
|
35
36
|
name=${this.getVariant(this.variant)}
|
|
@@ -41,8 +42,8 @@ let t = class extends u {
|
|
|
41
42
|
<div class=${o} ${g(this.defaultSlot)}></div>
|
|
42
43
|
</div>`;
|
|
43
44
|
}
|
|
44
|
-
getVariant(
|
|
45
|
-
switch (
|
|
45
|
+
getVariant(i) {
|
|
46
|
+
switch (i) {
|
|
46
47
|
case "blue":
|
|
47
48
|
return "spinner-blue";
|
|
48
49
|
case "rainbow":
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";const u=require("./element-DUJa1sRq.cjs"),b=require("./pkt-slot-controller-BzddBp7z.cjs"),n=require("./ref-BMQZJJEo.cjs"),e=require("./lit-element-DHqqtYbj.cjs"),d=require("./class-map-dph2jLEp.cjs"),k=require("./state-y-GU-VH8.cjs");require("./icon-RJ9Op-BB.cjs");const h=require("./classutils-BwNK82ZQ.cjs"),f={skin:{default:"beige"},compact:{default:!1},closable:{default:!1}},p={props:f};var x=Object.defineProperty,g=Object.getOwnPropertyDescriptor,o=(i,t,a,l)=>{for(var s=l>1?void 0:l?g(t,a):t,r=i.length-1,c;r>=0;r--)(c=i[r])&&(s=(l?c(t,a,s):c(s))||s);return l&&s&&x(t,a,s),s};exports.PktMessagebox=class extends u.PktElement{constructor(){super(),this.defaultSlot=n.e(),this.closable=p.props.closable.default,this.compact=p.props.compact.default,this.title="",this.skin=p.props.skin.default,this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0}))},this.slotController=new b.PktSlotController(this,this.defaultSlot),this._isClosed=!1}updated(t){super.updated(t),t.has("_isClosed")&&h.updateClassAttribute(this,"pkt-hide",this._isClosed)}render(){const t={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return e.x`<div class=${d.e(t)}>
|
|
2
|
+
${this.closable?e.x`<div class="pkt-messagebox__close">
|
|
3
|
+
<button
|
|
4
|
+
@click=${this.close}
|
|
5
|
+
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
6
|
+
>
|
|
7
|
+
<pkt-icon name="close" class="pkt-link__icon"></pkt-icon>
|
|
8
|
+
</button>
|
|
9
|
+
</div>`:e.E}
|
|
10
|
+
${this.title?e.x`<div class="pkt-messagebox__title">${this.title}</div>`:e.E}
|
|
11
|
+
<div class="pkt-messagebox__text" ${n.n(this.defaultSlot)}></div>
|
|
12
|
+
</div>`}};o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"closable",2);o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"compact",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"title",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"skin",2);o([k.r()],exports.PktMessagebox.prototype,"_isClosed",2);exports.PktMessagebox=o([e.t("pkt-messagebox")],exports.PktMessagebox);
|