@gdwc/components
Version:
A library of generic web components that are accessible, framework agnostic, possible to style, and easy to use with data provided by Drupal
1,297 lines (1,287 loc) • 234 kB
JavaScript
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const Jr = window.ShadowRoot && (window.ShadyCSS === void 0 || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Wr = Symbol(), gi = /* @__PURE__ */ new WeakMap();
class Sn {
constructor(e, r, i) {
if (this._$cssResult$ = !0, i !== Wr)
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = e, this.t = r;
}
get styleSheet() {
let e = this.o;
const r = this.t;
if (Jr && e === void 0) {
const i = r !== void 0 && r.length === 1;
i && (e = gi.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && gi.set(r, e));
}
return e;
}
toString() {
return this.cssText;
}
}
const Ao = (t) => new Sn(typeof t == "string" ? t : t + "", void 0, Wr), oe = (t, ...e) => {
const r = t.length === 1 ? t[0] : e.reduce((i, n, o) => i + ((a) => {
if (a._$cssResult$ === !0)
return a.cssText;
if (typeof a == "number")
return a;
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(n) + t[o + 1], t[0]);
return new Sn(r, t, Wr);
}, So = (t, e) => {
Jr ? t.adoptedStyleSheets = e.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet) : e.forEach((r) => {
const i = document.createElement("style"), n = window.litNonce;
n !== void 0 && i.setAttribute("nonce", n), i.textContent = r.cssText, t.appendChild(i);
});
}, mi = Jr ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
let r = "";
for (const i of e.cssRules)
r += i.cssText;
return Ao(r);
})(t) : t;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var rr;
const bi = window.trustedTypes, Eo = bi ? bi.emptyScript : "", wi = window.reactiveElementPolyfillSupport, kr = { toAttribute(t, e) {
switch (e) {
case Boolean:
t = t ? Eo : null;
break;
case Object:
case Array:
t = t == null ? t : JSON.stringify(t);
}
return t;
}, fromAttribute(t, e) {
let r = t;
switch (e) {
case Boolean:
r = t !== null;
break;
case Number:
r = t === null ? null : Number(t);
break;
case Object:
case Array:
try {
r = JSON.parse(t);
} catch {
r = null;
}
}
return r;
} }, En = (t, e) => e !== t && (e == e || t == t), ir = { attribute: !0, type: String, converter: kr, reflect: !1, hasChanged: En };
class Ne extends HTMLElement {
constructor() {
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
}
static addInitializer(e) {
var r;
(r = this.h) !== null && r !== void 0 || (this.h = []), this.h.push(e);
}
static get observedAttributes() {
this.finalize();
const e = [];
return this.elementProperties.forEach((r, i) => {
const n = this._$Ep(i, r);
n !== void 0 && (this._$Ev.set(n, i), e.push(n));
}), e;
}
static createProperty(e, r = ir) {
if (r.state && (r.attribute = !1), this.finalize(), this.elementProperties.set(e, r), !r.noAccessor && !this.prototype.hasOwnProperty(e)) {
const i = typeof e == "symbol" ? Symbol() : "__" + e, n = this.getPropertyDescriptor(e, i, r);
n !== void 0 && Object.defineProperty(this.prototype, e, n);
}
}
static getPropertyDescriptor(e, r, i) {
return { get() {
return this[r];
}, set(n) {
const o = this[e];
this[r] = n, this.requestUpdate(e, o, i);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(e) {
return this.elementProperties.get(e) || ir;
}
static finalize() {
if (this.hasOwnProperty("finalized"))
return !1;
this.finalized = !0;
const e = Object.getPrototypeOf(this);
if (e.finalize(), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
const r = this.properties, i = [...Object.getOwnPropertyNames(r), ...Object.getOwnPropertySymbols(r)];
for (const n of i)
this.createProperty(n, r[n]);
}
return this.elementStyles = this.finalizeStyles(this.styles), !0;
}
static finalizeStyles(e) {
const r = [];
if (Array.isArray(e)) {
const i = new Set(e.flat(1 / 0).reverse());
for (const n of i)
r.unshift(mi(n));
} else
e !== void 0 && r.push(mi(e));
return r;
}
static _$Ep(e, r) {
const i = r.attribute;
return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
}
u() {
var e;
this._$E_ = new Promise((r) => this.enableUpdating = r), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((r) => r(this));
}
addController(e) {
var r, i;
((r = this._$ES) !== null && r !== void 0 ? r : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((i = e.hostConnected) === null || i === void 0 || i.call(e));
}
removeController(e) {
var r;
(r = this._$ES) === null || r === void 0 || r.splice(this._$ES.indexOf(e) >>> 0, 1);
}
_$Eg() {
this.constructor.elementProperties.forEach((e, r) => {
this.hasOwnProperty(r) && (this._$Ei.set(r, this[r]), delete this[r]);
});
}
createRenderRoot() {
var e;
const r = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
return So(r, this.constructor.elementStyles), r;
}
connectedCallback() {
var e;
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((r) => {
var i;
return (i = r.hostConnected) === null || i === void 0 ? void 0 : i.call(r);
});
}
enableUpdating(e) {
}
disconnectedCallback() {
var e;
(e = this._$ES) === null || e === void 0 || e.forEach((r) => {
var i;
return (i = r.hostDisconnected) === null || i === void 0 ? void 0 : i.call(r);
});
}
attributeChangedCallback(e, r, i) {
this._$AK(e, i);
}
_$EO(e, r, i = ir) {
var n, o;
const a = this.constructor._$Ep(e, i);
if (a !== void 0 && i.reflect === !0) {
const s = ((o = (n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== null && o !== void 0 ? o : kr.toAttribute)(r, i.type);
this._$El = e, s == null ? this.removeAttribute(a) : this.setAttribute(a, s), this._$El = null;
}
}
_$AK(e, r) {
var i, n;
const o = this.constructor, a = o._$Ev.get(e);
if (a !== void 0 && this._$El !== a) {
const s = o.getPropertyOptions(a), l = s.converter, c = (n = (i = l == null ? void 0 : l.fromAttribute) !== null && i !== void 0 ? i : typeof l == "function" ? l : null) !== null && n !== void 0 ? n : kr.fromAttribute;
this._$El = a, this[a] = c(r, s.type), this._$El = null;
}
}
requestUpdate(e, r, i) {
let n = !0;
e !== void 0 && (((i = i || this.constructor.getPropertyOptions(e)).hasChanged || En)(this[e], r) ? (this._$AL.has(e) || this._$AL.set(e, r), i.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, i))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
}
async _$Ej() {
this.isUpdatePending = !0;
try {
await this._$E_;
} catch (r) {
Promise.reject(r);
}
const e = this.scheduleUpdate();
return e != null && await e, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
var e;
if (!this.isUpdatePending)
return;
this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, o) => this[o] = n), this._$Ei = void 0);
let r = !1;
const i = this._$AL;
try {
r = this.shouldUpdate(i), r ? (this.willUpdate(i), (e = this._$ES) === null || e === void 0 || e.forEach((n) => {
var o;
return (o = n.hostUpdate) === null || o === void 0 ? void 0 : o.call(n);
}), this.update(i)) : this._$Ek();
} catch (n) {
throw r = !1, this._$Ek(), n;
}
r && this._$AE(i);
}
willUpdate(e) {
}
_$AE(e) {
var r;
(r = this._$ES) === null || r === void 0 || r.forEach((i) => {
var n;
return (n = i.hostUpdated) === null || n === void 0 ? void 0 : n.call(i);
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
}
_$Ek() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$E_;
}
shouldUpdate(e) {
return !0;
}
update(e) {
this._$EC !== void 0 && (this._$EC.forEach((r, i) => this._$EO(i, this[i], r)), this._$EC = void 0), this._$Ek();
}
updated(e) {
}
firstUpdated(e) {
}
}
Ne.finalized = !0, Ne.elementProperties = /* @__PURE__ */ new Map(), Ne.elementStyles = [], Ne.shadowRootOptions = { mode: "open" }, wi == null || wi({ ReactiveElement: Ne }), ((rr = globalThis.reactiveElementVersions) !== null && rr !== void 0 ? rr : globalThis.reactiveElementVersions = []).push("1.3.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var nr;
const Fe = globalThis.trustedTypes, $i = Fe ? Fe.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, be = `lit$${(Math.random() + "").slice(9)}$`, On = "?" + be, Oo = `<${On}>`, Je = document, pt = (t = "") => Je.createComment(t), yt = (t) => t === null || typeof t != "object" && typeof t != "function", Pn = Array.isArray, Po = (t) => Pn(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", at = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _i = /-->/g, Ai = />/g, Oe = RegExp(`>|[
\f\r](?:([^\\s"'>=/]+)([
\f\r]*=[
\f\r]*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), Si = /'/g, Ei = /"/g, kn = /^(?:script|style|textarea|title)$/i, ko = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), B = ko(1), ce = Symbol.for("lit-noChange"), J = Symbol.for("lit-nothing"), Oi = /* @__PURE__ */ new WeakMap(), xo = (t, e, r) => {
var i, n;
const o = (i = r == null ? void 0 : r.renderBefore) !== null && i !== void 0 ? i : e;
let a = o._$litPart$;
if (a === void 0) {
const s = (n = r == null ? void 0 : r.renderBefore) !== null && n !== void 0 ? n : null;
o._$litPart$ = a = new $t(e.insertBefore(pt(), s), s, void 0, r != null ? r : {});
}
return a._$AI(t), a;
}, Be = Je.createTreeWalker(Je, 129, null, !1), Mo = (t, e) => {
const r = t.length - 1, i = [];
let n, o = e === 2 ? "<svg>" : "", a = at;
for (let l = 0; l < r; l++) {
const c = t[l];
let d, u, h = -1, m = 0;
for (; m < c.length && (a.lastIndex = m, u = a.exec(c), u !== null); )
m = a.lastIndex, a === at ? u[1] === "!--" ? a = _i : u[1] !== void 0 ? a = Ai : u[2] !== void 0 ? (kn.test(u[2]) && (n = RegExp("</" + u[2], "g")), a = Oe) : u[3] !== void 0 && (a = Oe) : a === Oe ? u[0] === ">" ? (a = n != null ? n : at, h = -1) : u[1] === void 0 ? h = -2 : (h = a.lastIndex - u[2].length, d = u[1], a = u[3] === void 0 ? Oe : u[3] === '"' ? Ei : Si) : a === Ei || a === Si ? a = Oe : a === _i || a === Ai ? a = at : (a = Oe, n = void 0);
const $ = a === Oe && t[l + 1].startsWith("/>") ? " " : "";
o += a === at ? c + Oo : h >= 0 ? (i.push(d), c.slice(0, h) + "$lit$" + c.slice(h) + be + $) : c + be + (h === -2 ? (i.push(void 0), l) : $);
}
const s = o + (t[r] || "<?>") + (e === 2 ? "</svg>" : "");
if (!Array.isArray(t) || !t.hasOwnProperty("raw"))
throw Error("invalid template strings array");
return [$i !== void 0 ? $i.createHTML(s) : s, i];
};
class vt {
constructor({ strings: e, _$litType$: r }, i) {
let n;
this.parts = [];
let o = 0, a = 0;
const s = e.length - 1, l = this.parts, [c, d] = Mo(e, r);
if (this.el = vt.createElement(c, i), Be.currentNode = this.el.content, r === 2) {
const u = this.el.content, h = u.firstChild;
h.remove(), u.append(...h.childNodes);
}
for (; (n = Be.nextNode()) !== null && l.length < s; ) {
if (n.nodeType === 1) {
if (n.hasAttributes()) {
const u = [];
for (const h of n.getAttributeNames())
if (h.endsWith("$lit$") || h.startsWith(be)) {
const m = d[a++];
if (u.push(h), m !== void 0) {
const $ = n.getAttribute(m.toLowerCase() + "$lit$").split(be), O = /([.?@])?(.*)/.exec(m);
l.push({ type: 1, index: o, name: O[2], strings: $, ctor: O[1] === "." ? To : O[1] === "?" ? Io : O[1] === "@" ? Ro : Ht });
} else
l.push({ type: 6, index: o });
}
for (const h of u)
n.removeAttribute(h);
}
if (kn.test(n.tagName)) {
const u = n.textContent.split(be), h = u.length - 1;
if (h > 0) {
n.textContent = Fe ? Fe.emptyScript : "";
for (let m = 0; m < h; m++)
n.append(u[m], pt()), Be.nextNode(), l.push({ type: 2, index: ++o });
n.append(u[h], pt());
}
}
} else if (n.nodeType === 8)
if (n.data === On)
l.push({ type: 2, index: o });
else {
let u = -1;
for (; (u = n.data.indexOf(be, u + 1)) !== -1; )
l.push({ type: 7, index: o }), u += be.length - 1;
}
o++;
}
}
static createElement(e, r) {
const i = Je.createElement("template");
return i.innerHTML = e, i;
}
}
function We(t, e, r = t, i) {
var n, o, a, s;
if (e === ce)
return e;
let l = i !== void 0 ? (n = r._$Cl) === null || n === void 0 ? void 0 : n[i] : r._$Cu;
const c = yt(e) ? void 0 : e._$litDirective$;
return (l == null ? void 0 : l.constructor) !== c && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), c === void 0 ? l = void 0 : (l = new c(t), l._$AT(t, r, i)), i !== void 0 ? ((a = (s = r)._$Cl) !== null && a !== void 0 ? a : s._$Cl = [])[i] = l : r._$Cu = l), l !== void 0 && (e = We(t, l._$AS(t, e.values), l, i)), e;
}
class Co {
constructor(e, r) {
this.v = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
p(e) {
var r;
const { el: { content: i }, parts: n } = this._$AD, o = ((r = e == null ? void 0 : e.creationScope) !== null && r !== void 0 ? r : Je).importNode(i, !0);
Be.currentNode = o;
let a = Be.nextNode(), s = 0, l = 0, c = n[0];
for (; c !== void 0; ) {
if (s === c.index) {
let d;
c.type === 2 ? d = new $t(a, a.nextSibling, this, e) : c.type === 1 ? d = new c.ctor(a, c.name, c.strings, this, e) : c.type === 6 && (d = new No(a, this, e)), this.v.push(d), c = n[++l];
}
s !== (c == null ? void 0 : c.index) && (a = Be.nextNode(), s++);
}
return o;
}
m(e) {
let r = 0;
for (const i of this.v)
i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, r), r += i.strings.length - 2) : i._$AI(e[r])), r++;
}
}
class $t {
constructor(e, r, i, n) {
var o;
this.type = 2, this._$AH = J, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = i, this.options = n, this._$C_ = (o = n == null ? void 0 : n.isConnected) === null || o === void 0 || o;
}
get _$AU() {
var e, r;
return (r = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && r !== void 0 ? r : this._$C_;
}
get parentNode() {
let e = this._$AA.parentNode;
const r = this._$AM;
return r !== void 0 && e.nodeType === 11 && (e = r.parentNode), e;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(e, r = this) {
e = We(this, e, r), yt(e) ? e === J || e == null || e === "" ? (this._$AH !== J && this._$AR(), this._$AH = J) : e !== this._$AH && e !== ce && this.T(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.k(e) : Po(e) ? this.S(e) : this.T(e);
}
j(e, r = this._$AB) {
return this._$AA.parentNode.insertBefore(e, r);
}
k(e) {
this._$AH !== e && (this._$AR(), this._$AH = this.j(e));
}
T(e) {
this._$AH !== J && yt(this._$AH) ? this._$AA.nextSibling.data = e : this.k(Je.createTextNode(e)), this._$AH = e;
}
$(e) {
var r;
const { values: i, _$litType$: n } = e, o = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = vt.createElement(n.h, this.options)), n);
if (((r = this._$AH) === null || r === void 0 ? void 0 : r._$AD) === o)
this._$AH.m(i);
else {
const a = new Co(o, this), s = a.p(this.options);
a.m(i), this.k(s), this._$AH = a;
}
}
_$AC(e) {
let r = Oi.get(e.strings);
return r === void 0 && Oi.set(e.strings, r = new vt(e)), r;
}
S(e) {
Pn(this._$AH) || (this._$AH = [], this._$AR());
const r = this._$AH;
let i, n = 0;
for (const o of e)
n === r.length ? r.push(i = new $t(this.j(pt()), this.j(pt()), this, this.options)) : i = r[n], i._$AI(o), n++;
n < r.length && (this._$AR(i && i._$AB.nextSibling, n), r.length = n);
}
_$AR(e = this._$AA.nextSibling, r) {
var i;
for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, r); e && e !== this._$AB; ) {
const n = e.nextSibling;
e.remove(), e = n;
}
}
setConnected(e) {
var r;
this._$AM === void 0 && (this._$C_ = e, (r = this._$AP) === null || r === void 0 || r.call(this, e));
}
}
class Ht {
constructor(e, r, i, n, o) {
this.type = 1, this._$AH = J, this._$AN = void 0, this.element = e, this.name = r, this._$AM = n, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = J;
}
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(e, r = this, i, n) {
const o = this.strings;
let a = !1;
if (o === void 0)
e = We(this, e, r, 0), a = !yt(e) || e !== this._$AH && e !== ce, a && (this._$AH = e);
else {
const s = e;
let l, c;
for (e = o[0], l = 0; l < o.length - 1; l++)
c = We(this, s[i + l], r, l), c === ce && (c = this._$AH[l]), a || (a = !yt(c) || c !== this._$AH[l]), c === J ? e = J : e !== J && (e += (c != null ? c : "") + o[l + 1]), this._$AH[l] = c;
}
a && !n && this.P(e);
}
P(e) {
e === J ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e != null ? e : "");
}
}
class To extends Ht {
constructor() {
super(...arguments), this.type = 3;
}
P(e) {
this.element[this.name] = e === J ? void 0 : e;
}
}
const zo = Fe ? Fe.emptyScript : "";
class Io extends Ht {
constructor() {
super(...arguments), this.type = 4;
}
P(e) {
e && e !== J ? this.element.setAttribute(this.name, zo) : this.element.removeAttribute(this.name);
}
}
class Ro extends Ht {
constructor(e, r, i, n, o) {
super(e, r, i, n, o), this.type = 5;
}
_$AI(e, r = this) {
var i;
if ((e = (i = We(this, e, r, 0)) !== null && i !== void 0 ? i : J) === ce)
return;
const n = this._$AH, o = e === J && n !== J || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, a = e !== J && (n === J || o);
o && this.element.removeEventListener(this.name, this, n), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
}
handleEvent(e) {
var r, i;
typeof this._$AH == "function" ? this._$AH.call((i = (r = this.options) === null || r === void 0 ? void 0 : r.host) !== null && i !== void 0 ? i : this.element, e) : this._$AH.handleEvent(e);
}
}
class No {
constructor(e, r, i) {
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = i;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(e) {
We(this, e);
}
}
const Pi = window.litHtmlPolyfillSupport;
Pi == null || Pi(vt, $t), ((nr = globalThis.litHtmlVersions) !== null && nr !== void 0 ? nr : globalThis.litHtmlVersions = []).push("2.2.7");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var or, ar;
class Z extends Ne {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
var e, r;
const i = super.createRenderRoot();
return (e = (r = this.renderOptions).renderBefore) !== null && e !== void 0 || (r.renderBefore = i.firstChild), i;
}
update(e) {
const r = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = xo(r, this.renderRoot, this.renderOptions);
}
connectedCallback() {
var e;
super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
}
disconnectedCallback() {
var e;
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
}
render() {
return ce;
}
}
Z.finalized = !0, Z._$litElement$ = !0, (or = globalThis.litElementHydrateSupport) === null || or === void 0 || or.call(globalThis, { LitElement: Z });
const ki = globalThis.litElementPolyfillSupport;
ki == null || ki({ LitElement: Z });
((ar = globalThis.litElementVersions) !== null && ar !== void 0 ? ar : globalThis.litElementVersions = []).push("3.2.2");
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const fe = (t) => t != null ? t : J;
var qr = window.ShadowRoot && (window.ShadyCSS === void 0 || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Gr = Symbol(), xi = /* @__PURE__ */ new Map(), xn = class {
constructor(t, e) {
if (this._$cssResult$ = !0, e !== Gr)
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t;
}
get styleSheet() {
let t = xi.get(this.cssText);
return qr && t === void 0 && (xi.set(this.cssText, t = new CSSStyleSheet()), t.replaceSync(this.cssText)), t;
}
toString() {
return this.cssText;
}
}, jo = (t) => new xn(typeof t == "string" ? t : t + "", Gr), Vr = (t, ...e) => {
const r = t.length === 1 ? t[0] : e.reduce((i, n, o) => i + ((a) => {
if (a._$cssResult$ === !0)
return a.cssText;
if (typeof a == "number")
return a;
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(n) + t[o + 1], t[0]);
return new xn(r, Gr);
}, Lo = (t, e) => {
qr ? t.adoptedStyleSheets = e.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet) : e.forEach((r) => {
const i = document.createElement("style"), n = window.litNonce;
n !== void 0 && i.setAttribute("nonce", n), i.textContent = r.cssText, t.appendChild(i);
});
}, Mi = qr ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
let r = "";
for (const i of e.cssRules)
r += i.cssText;
return jo(r);
})(t) : t, sr, Ci = window.trustedTypes, Do = Ci ? Ci.emptyScript : "", Ti = window.reactiveElementPolyfillSupport, xr = { toAttribute(t, e) {
switch (e) {
case Boolean:
t = t ? Do : null;
break;
case Object:
case Array:
t = t == null ? t : JSON.stringify(t);
}
return t;
}, fromAttribute(t, e) {
let r = t;
switch (e) {
case Boolean:
r = t !== null;
break;
case Number:
r = t === null ? null : Number(t);
break;
case Object:
case Array:
try {
r = JSON.parse(t);
} catch {
r = null;
}
}
return r;
} }, Mn = (t, e) => e !== t && (e == e || t == t), lr = { attribute: !0, type: String, converter: xr, reflect: !1, hasChanged: Mn }, je = class extends HTMLElement {
constructor() {
super(), this._$Et = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
}
static addInitializer(t) {
var e;
(e = this.l) !== null && e !== void 0 || (this.l = []), this.l.push(t);
}
static get observedAttributes() {
this.finalize();
const t = [];
return this.elementProperties.forEach((e, r) => {
const i = this._$Eh(r, e);
i !== void 0 && (this._$Eu.set(i, r), t.push(i));
}), t;
}
static createProperty(t, e = lr) {
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
const r = typeof t == "symbol" ? Symbol() : "__" + t, i = this.getPropertyDescriptor(t, r, e);
i !== void 0 && Object.defineProperty(this.prototype, t, i);
}
}
static getPropertyDescriptor(t, e, r) {
return { get() {
return this[e];
}, set(i) {
const n = this[t];
this[e] = i, this.requestUpdate(t, n, r);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(t) {
return this.elementProperties.get(t) || lr;
}
static finalize() {
if (this.hasOwnProperty("finalized"))
return !1;
this.finalized = !0;
const t = Object.getPrototypeOf(this);
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
const e = this.properties, r = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
for (const i of r)
this.createProperty(i, e[i]);
}
return this.elementStyles = this.finalizeStyles(this.styles), !0;
}
static finalizeStyles(t) {
const e = [];
if (Array.isArray(t)) {
const r = new Set(t.flat(1 / 0).reverse());
for (const i of r)
e.unshift(Mi(i));
} else
t !== void 0 && e.push(Mi(t));
return e;
}
static _$Eh(t, e) {
const r = e.attribute;
return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
}
o() {
var t;
this._$Ep = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Em(), this.requestUpdate(), (t = this.constructor.l) === null || t === void 0 || t.forEach((e) => e(this));
}
addController(t) {
var e, r;
((e = this._$Eg) !== null && e !== void 0 ? e : this._$Eg = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((r = t.hostConnected) === null || r === void 0 || r.call(t));
}
removeController(t) {
var e;
(e = this._$Eg) === null || e === void 0 || e.splice(this._$Eg.indexOf(t) >>> 0, 1);
}
_$Em() {
this.constructor.elementProperties.forEach((t, e) => {
this.hasOwnProperty(e) && (this._$Et.set(e, this[e]), delete this[e]);
});
}
createRenderRoot() {
var t;
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
return Lo(e, this.constructor.elementStyles), e;
}
connectedCallback() {
var t;
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$Eg) === null || t === void 0 || t.forEach((e) => {
var r;
return (r = e.hostConnected) === null || r === void 0 ? void 0 : r.call(e);
});
}
enableUpdating(t) {
}
disconnectedCallback() {
var t;
(t = this._$Eg) === null || t === void 0 || t.forEach((e) => {
var r;
return (r = e.hostDisconnected) === null || r === void 0 ? void 0 : r.call(e);
});
}
attributeChangedCallback(t, e, r) {
this._$AK(t, r);
}
_$ES(t, e, r = lr) {
var i, n;
const o = this.constructor._$Eh(t, r);
if (o !== void 0 && r.reflect === !0) {
const a = ((n = (i = r.converter) === null || i === void 0 ? void 0 : i.toAttribute) !== null && n !== void 0 ? n : xr.toAttribute)(e, r.type);
this._$Ei = t, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$Ei = null;
}
}
_$AK(t, e) {
var r, i, n;
const o = this.constructor, a = o._$Eu.get(t);
if (a !== void 0 && this._$Ei !== a) {
const s = o.getPropertyOptions(a), l = s.converter, c = (n = (i = (r = l) === null || r === void 0 ? void 0 : r.fromAttribute) !== null && i !== void 0 ? i : typeof l == "function" ? l : null) !== null && n !== void 0 ? n : xr.fromAttribute;
this._$Ei = a, this[a] = c(e, s.type), this._$Ei = null;
}
}
requestUpdate(t, e, r) {
let i = !0;
t !== void 0 && (((r = r || this.constructor.getPropertyOptions(t)).hasChanged || Mn)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), r.reflect === !0 && this._$Ei !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, r))) : i = !1), !this.isUpdatePending && i && (this._$Ep = this._$E_());
}
async _$E_() {
this.isUpdatePending = !0;
try {
await this._$Ep;
} catch (e) {
Promise.reject(e);
}
const t = this.scheduleUpdate();
return t != null && await t, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
var t;
if (!this.isUpdatePending)
return;
this.hasUpdated, this._$Et && (this._$Et.forEach((i, n) => this[n] = i), this._$Et = void 0);
let e = !1;
const r = this._$AL;
try {
e = this.shouldUpdate(r), e ? (this.willUpdate(r), (t = this._$Eg) === null || t === void 0 || t.forEach((i) => {
var n;
return (n = i.hostUpdate) === null || n === void 0 ? void 0 : n.call(i);
}), this.update(r)) : this._$EU();
} catch (i) {
throw e = !1, this._$EU(), i;
}
e && this._$AE(r);
}
willUpdate(t) {
}
_$AE(t) {
var e;
(e = this._$Eg) === null || e === void 0 || e.forEach((r) => {
var i;
return (i = r.hostUpdated) === null || i === void 0 ? void 0 : i.call(r);
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
}
_$EU() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$Ep;
}
shouldUpdate(t) {
return !0;
}
update(t) {
this._$EC !== void 0 && (this._$EC.forEach((e, r) => this._$ES(r, this[r], e)), this._$EC = void 0), this._$EU();
}
updated(t) {
}
firstUpdated(t) {
}
};
je.finalized = !0, je.elementProperties = /* @__PURE__ */ new Map(), je.elementStyles = [], je.shadowRootOptions = { mode: "open" }, Ti == null || Ti({ ReactiveElement: je }), ((sr = globalThis.reactiveElementVersions) !== null && sr !== void 0 ? sr : globalThis.reactiveElementVersions = []).push("1.3.2");
var cr, qe = globalThis.trustedTypes, zi = qe ? qe.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, we = `lit$${(Math.random() + "").slice(9)}$`, Cn = "?" + we, Bo = `<${Cn}>`, Ge = document, gt = (t = "") => Ge.createComment(t), mt = (t) => t === null || typeof t != "object" && typeof t != "function", Tn = Array.isArray, Uo = (t) => {
var e;
return Tn(t) || typeof ((e = t) === null || e === void 0 ? void 0 : e[Symbol.iterator]) == "function";
}, st = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ii = /-->/g, Ri = />/g, Pe = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g, Ni = /'/g, ji = /"/g, zn = /^(?:script|style|textarea|title)$/i, Ho = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), In = Ho(1), Ae = Symbol.for("lit-noChange"), R = Symbol.for("lit-nothing"), Li = /* @__PURE__ */ new WeakMap(), Fo = (t, e, r) => {
var i, n;
const o = (i = r == null ? void 0 : r.renderBefore) !== null && i !== void 0 ? i : e;
let a = o._$litPart$;
if (a === void 0) {
const s = (n = r == null ? void 0 : r.renderBefore) !== null && n !== void 0 ? n : null;
o._$litPart$ = a = new Ft(e.insertBefore(gt(), s), s, void 0, r != null ? r : {});
}
return a._$AI(t), a;
}, Ue = Ge.createTreeWalker(Ge, 129, null, !1), Jo = (t, e) => {
const r = t.length - 1, i = [];
let n, o = e === 2 ? "<svg>" : "", a = st;
for (let l = 0; l < r; l++) {
const c = t[l];
let d, u, h = -1, m = 0;
for (; m < c.length && (a.lastIndex = m, u = a.exec(c), u !== null); )
m = a.lastIndex, a === st ? u[1] === "!--" ? a = Ii : u[1] !== void 0 ? a = Ri : u[2] !== void 0 ? (zn.test(u[2]) && (n = RegExp("</" + u[2], "g")), a = Pe) : u[3] !== void 0 && (a = Pe) : a === Pe ? u[0] === ">" ? (a = n != null ? n : st, h = -1) : u[1] === void 0 ? h = -2 : (h = a.lastIndex - u[2].length, d = u[1], a = u[3] === void 0 ? Pe : u[3] === '"' ? ji : Ni) : a === ji || a === Ni ? a = Pe : a === Ii || a === Ri ? a = st : (a = Pe, n = void 0);
const $ = a === Pe && t[l + 1].startsWith("/>") ? " " : "";
o += a === st ? c + Bo : h >= 0 ? (i.push(d), c.slice(0, h) + "$lit$" + c.slice(h) + we + $) : c + we + (h === -2 ? (i.push(void 0), l) : $);
}
const s = o + (t[r] || "<?>") + (e === 2 ? "</svg>" : "");
if (!Array.isArray(t) || !t.hasOwnProperty("raw"))
throw Error("invalid template strings array");
return [zi !== void 0 ? zi.createHTML(s) : s, i];
}, It = class {
constructor({ strings: t, _$litType$: e }, r) {
let i;
this.parts = [];
let n = 0, o = 0;
const a = t.length - 1, s = this.parts, [l, c] = Jo(t, e);
if (this.el = It.createElement(l, r), Ue.currentNode = this.el.content, e === 2) {
const d = this.el.content, u = d.firstChild;
u.remove(), d.append(...u.childNodes);
}
for (; (i = Ue.nextNode()) !== null && s.length < a; ) {
if (i.nodeType === 1) {
if (i.hasAttributes()) {
const d = [];
for (const u of i.getAttributeNames())
if (u.endsWith("$lit$") || u.startsWith(we)) {
const h = c[o++];
if (d.push(u), h !== void 0) {
const m = i.getAttribute(h.toLowerCase() + "$lit$").split(we), $ = /([.?@])?(.*)/.exec(h);
s.push({ type: 1, index: n, name: $[2], strings: m, ctor: $[1] === "." ? qo : $[1] === "?" ? Vo : $[1] === "@" ? Qo : Jt });
} else
s.push({ type: 6, index: n });
}
for (const u of d)
i.removeAttribute(u);
}
if (zn.test(i.tagName)) {
const d = i.textContent.split(we), u = d.length - 1;
if (u > 0) {
i.textContent = qe ? qe.emptyScript : "";
for (let h = 0; h < u; h++)
i.append(d[h], gt()), Ue.nextNode(), s.push({ type: 2, index: ++n });
i.append(d[u], gt());
}
}
} else if (i.nodeType === 8)
if (i.data === Cn)
s.push({ type: 2, index: n });
else {
let d = -1;
for (; (d = i.data.indexOf(we, d + 1)) !== -1; )
s.push({ type: 7, index: n }), d += we.length - 1;
}
n++;
}
}
static createElement(t, e) {
const r = Ge.createElement("template");
return r.innerHTML = t, r;
}
};
function Ve(t, e, r = t, i) {
var n, o, a, s;
if (e === Ae)
return e;
let l = i !== void 0 ? (n = r._$Cl) === null || n === void 0 ? void 0 : n[i] : r._$Cu;
const c = mt(e) ? void 0 : e._$litDirective$;
return (l == null ? void 0 : l.constructor) !== c && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), c === void 0 ? l = void 0 : (l = new c(t), l._$AT(t, r, i)), i !== void 0 ? ((a = (s = r)._$Cl) !== null && a !== void 0 ? a : s._$Cl = [])[i] = l : r._$Cu = l), l !== void 0 && (e = Ve(t, l._$AS(t, e.values), l, i)), e;
}
var Wo = class {
constructor(t, e) {
this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
p(t) {
var e;
const { el: { content: r }, parts: i } = this._$AD, n = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Ge).importNode(r, !0);
Ue.currentNode = n;
let o = Ue.nextNode(), a = 0, s = 0, l = i[0];
for (; l !== void 0; ) {
if (a === l.index) {
let c;
l.type === 2 ? c = new Ft(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new Ko(o, this, t)), this.v.push(c), l = i[++s];
}
a !== (l == null ? void 0 : l.index) && (o = Ue.nextNode(), a++);
}
return n;
}
m(t) {
let e = 0;
for (const r of this.v)
r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
}
}, Ft = class {
constructor(t, e, r, i) {
var n;
this.type = 2, this._$AH = R, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = i, this._$Cg = (n = i == null ? void 0 : i.isConnected) === null || n === void 0 || n;
}
get _$AU() {
var t, e;
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cg;
}
get parentNode() {
let t = this._$AA.parentNode;
const e = this._$AM;
return e !== void 0 && t.nodeType === 11 && (t = e.parentNode), t;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(t, e = this) {
t = Ve(this, t, e), mt(t) ? t === R || t == null || t === "" ? (this._$AH !== R && this._$AR(), this._$AH = R) : t !== this._$AH && t !== Ae && this.$(t) : t._$litType$ !== void 0 ? this.T(t) : t.nodeType !== void 0 ? this.k(t) : Uo(t) ? this.S(t) : this.$(t);
}
M(t, e = this._$AB) {
return this._$AA.parentNode.insertBefore(t, e);
}
k(t) {
this._$AH !== t && (this._$AR(), this._$AH = this.M(t));
}
$(t) {
this._$AH !== R && mt(this._$AH) ? this._$AA.nextSibling.data = t : this.k(Ge.createTextNode(t)), this._$AH = t;
}
T(t) {
var e;
const { values: r, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = It.createElement(i.h, this.options)), i);
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === n)
this._$AH.m(r);
else {
const o = new Wo(n, this), a = o.p(this.options);
o.m(r), this.k(a), this._$AH = o;
}
}
_$AC(t) {
let e = Li.get(t.strings);
return e === void 0 && Li.set(t.strings, e = new It(t)), e;
}
S(t) {
Tn(this._$AH) || (this._$AH = [], this._$AR());
const e = this._$AH;
let r, i = 0;
for (const n of t)
i === e.length ? e.push(r = new Ft(this.M(gt()), this.M(gt()), this, this.options)) : r = e[i], r._$AI(n), i++;
i < e.length && (this._$AR(r && r._$AB.nextSibling, i), e.length = i);
}
_$AR(t = this._$AA.nextSibling, e) {
var r;
for ((r = this._$AP) === null || r === void 0 || r.call(this, !1, !0, e); t && t !== this._$AB; ) {
const i = t.nextSibling;
t.remove(), t = i;
}
}
setConnected(t) {
var e;
this._$AM === void 0 && (this._$Cg = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
}
}, Jt = class {
constructor(t, e, r, i, n) {
this.type = 1, this._$AH = R, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = R;
}
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t, e = this, r, i) {
const n = this.strings;
let o = !1;
if (n === void 0)
t = Ve(this, t, e, 0), o = !mt(t) || t !== this._$AH && t !== Ae, o && (this._$AH = t);
else {
const a = t;
let s, l;
for (t = n[0], s = 0; s < n.length - 1; s++)
l = Ve(this, a[r + s], e, s), l === Ae && (l = this._$AH[s]), o || (o = !mt(l) || l !== this._$AH[s]), l === R ? t = R : t !== R && (t += (l != null ? l : "") + n[s + 1]), this._$AH[s] = l;
}
o && !i && this.C(t);
}
C(t) {
t === R ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
}
}, qo = class extends Jt {
constructor() {
super(...arguments), this.type = 3;
}
C(t) {
this.element[this.name] = t === R ? void 0 : t;
}
}, Go = qe ? qe.emptyScript : "", Vo = class extends Jt {
constructor() {
super(...arguments), this.type = 4;
}
C(t) {
t && t !== R ? this.element.setAttribute(this.name, Go) : this.element.removeAttribute(this.name);
}
}, Qo = class extends Jt {
constructor(t, e, r, i, n) {
super(t, e, r, i, n), this.type = 5;
}
_$AI(t, e = this) {
var r;
if ((t = (r = Ve(this, t, e, 0)) !== null && r !== void 0 ? r : R) === Ae)
return;
const i = this._$AH, n = t === R && i !== R || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== R && (i === R || n);
n && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
}
handleEvent(t) {
var e, r;
typeof this._$AH == "function" ? this._$AH.call((r = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && r !== void 0 ? r : this.element, t) : this._$AH.handleEvent(t);
}
}, Ko = class {
constructor(t, e, r) {
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t) {
Ve(this, t);
}
}, Di = window.litHtmlPolyfillSupport;
Di == null || Di(It, Ft), ((cr = globalThis.litHtmlVersions) !== null && cr !== void 0 ? cr : globalThis.litHtmlVersions = []).push("2.2.4");
var ur, hr, ct = class extends je {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Dt = void 0;
}
createRenderRoot() {
var t, e;
const r = super.createRenderRoot();
return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = r.firstChild), r;
}
update(t) {
const e = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Dt = Fo(e, this.renderRoot, this.renderOptions);
}
connectedCallback() {
var t;
super.connectedCallback(), (t = this._$Dt) === null || t === void 0 || t.setConnected(!0);
}
disconnectedCallback() {
var t;
super.disconnectedCallback(), (t = this._$Dt) === null || t === void 0 || t.setConnected(!1);
}
render() {
return Ae;
}
};
ct.finalized = !0, ct._$litElement$ = !0, (ur = globalThis.litElementHydrateSupport) === null || ur === void 0 || ur.call(globalThis, { LitElement: ct });
var Bi = globalThis.litElementPolyfillSupport;
Bi == null || Bi({ LitElement: ct });
((hr = globalThis.litElementVersions) !== null && hr !== void 0 ? hr : globalThis.litElementVersions = []).push("3.2.0");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var Rn = Vr`
:host {
box-sizing: border-box;
}
:host *,
:host *::before,
:host *::after {
box-sizing: inherit;
}
[hidden] {
display: none !important;
}
`, Zo = Vr`
${Rn}
:host {
display: inline-block;
}
.icon-button {
flex: 0 0 auto;
display: flex;
align-items: center;
background: none;
border: none;
border-radius: var(--sl-border-radius-medium);
font-size: inherit;
color: var(--sl-color-neutral-600);
padding: var(--sl-spacing-x-small);
cursor: pointer;
transition: var(--sl-transition-medium) color;
-webkit-appearance: none;
}
.icon-button:hover:not(.icon-button--disabled),
.icon-button:focus:not(.icon-button--disabled) {
color: var(--sl-color-primary-600);
}
.icon-button:active:not(.icon-button--disabled) {
color: var(--sl-color-primary-700);
}
.icon-button:focus {
outline: none;
}
.icon-button--disabled {
opacity: 0.5;
cursor: not-allowed;
}
.icon-button:focus-visible {
outline: var(--sl-focus-ring);
outline-offset: var(--sl-focus-ring-offset);
}
.icon-button__icon {
pointer-events: none;
}
`, Nn = Symbol.for(""), Yo = (t) => {
var e, r;
if (((e = t) === null || e === void 0 ? void 0 : e.r) === Nn)
return (r = t) === null || r === void 0 ? void 0 : r._$litStatic$;
}, Ui = (t, ...e) => ({ _$litStatic$: e.reduce((r, i, n) => r + ((o) => {
if (o._$litStatic$ !== void 0)
return o._$litStatic$;
throw Error(`Value passed to 'literal' function must be a 'literal' result: ${o}. Use 'unsafeStatic' to pass non-literal values, but
take care to ensure page security.`);
})(i) + t[n + 1], t[0]), r: Nn }), Hi = /* @__PURE__ */ new Map(), Xo = (t) => (e, ...r) => {
const i = r.length;
let n, o;
const a = [], s = [];
let l, c = 0, d = !1;
for (; c < i; ) {
for (l = e[c]; c < i && (o = r[c], (n = Yo(o)) !== void 0); )
l += n + e[++c], d = !0;
s.push(o), a.push(l), c++;
}
if (c === i && a.push(e[i]), d) {
const u = a.join("$$lit$$");
(e = Hi.get(u)) === void 0 && (a.raw = a, Hi.set(u, e = a)), r = s;
}
return t(e, ...r);
}, ea = Xo(In);
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var jn = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ln = (t) => (...e) => ({ _$litDirective$: t, values: e }), Dn = class {
constructor(t) {
}
get _$AU() {
return this._$AM._$AU;
}
_$AT(t, e, r) {
this._$Ct = t, this._$AM = e, this._$Ci = r;
}
_$AS(t, e) {
return this.update(t, e);
}
update(t, e) {
return this.render(...e);
}
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var ta = Ln(class extends Dn {
constructor(t) {
var e;
if (super(t), t.type !== jn.ATTRIBUTE || t.name !== "class" || ((e = t.strings) === null || e === void 0 ? void 0 : e.length) > 2)
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
}
render(t) {
return " " + Object.keys(t).filter((e) => t[e]).join(" ") + " ";
}
update(t, [e]) {
var r, i;
if (this.et === void 0) {
this.et = /* @__PURE__ */ new Set(), t.strings !== void 0 && (this.st = new Set(t.strings.join(" ").split(/\s/).filter((o) => o !== "")));
for (const o in e)
e[o] && !(!((r = this.st) === null || r === void 0) && r.has(o)) && this.et.add(o);
return this.render(e);
}
const n = t.element.classList;
this.et.forEach((o) => {
o in e || (n.remove(o), this.et.delete(o));
});
for (const o in e) {
const a = !!e[o];
a === this.et.has(o) || ((i = this.st) === null || i === void 0 ? void 0 : i.has(o)) || (a ? (n.add(o), this.et.add(o)) : (n.remove(o), this.et.delete(o)));
}
return Ae;
}
});
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var ie = (t) => t != null ? t : R;
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var Bn = Object.defineProperty, ra = Object.defineProperties, ia = Object.getOwnPropertyDescriptor, na = Object.getOwnPropertyDescriptors, Fi = Object.getOwnPropertySymbols, oa = Object.prototype.hasOwnProperty, aa = Object.prototype.propertyIsEnumerable, Ji = (t, e, r) => e in t ? Bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, _t = (t, e) => {
for (var r in e || (e = {}))
oa.call(e, r) && Ji(t, r, e[r]);
if (Fi)
for (var r of Fi(e))
aa.call(e, r) && Ji(t, r, e[r]);
return t;
}, Qr = (t, e) => ra(t, na(e)), U = (t, e, r, i) => {
for (var n = i > 1 ? void 0 : i ? ia(e, r) : e, o = t.length - 1, a; o >= 0; o--)
(a = t[o]) && (n = (i ? a(e, r, n) : a(n)) || n);
return i && n && Bn(e, r, n), n;
}, Un = (t) => (e) => typeof e == "function" ? ((r, i) => (window.customElements.define(r, i), i))(t, e) : ((r, i) => {
const { kind: n, elements: o } = i;
return { kind: n, elements: o, finisher(a) {
window.customElements.define(r, a);
} };
})(t, e), sa = (t, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? Qr(_t({}, e), { finisher(r) {
r.createProperty(e.key, t);
} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
}, finisher(r) {
r.createProperty(e.key, t);
} };
function ee(t) {
return (e, r) => r !== void 0 ? ((i, n, o) => {
n.constructor.createProperty(o, i);
})(t, e, r) : sa(t, e);
}
function Hn(t) {
return ee(Qr(_t({}, t), { state: !0 }));
}
var la = ({ finisher: t, descriptor: e }) => (r, i) => {
var n;
if (i === void 0) {
const o = (n = r.originalKey) !== null && n !== void 0 ? n : r.key, a = e != null ? { kind: "method", placement: "prototype", key: o, descriptor: e(r.key) } : Qr(_t({}, r), { key: o });
return t != null && (a.finisher = function(s) {
t(s, o);
}), a;
}
{
const o = r.constructor;
e !== void 0 && Object.defineProperty(r, i, e(i)), t == null || t(o, i);
}
};
function ca(t, e) {
return la({ descriptor: (r) => {
const i = { get() {
var n, o;
return (o = (n = this.renderRoot) === null || n === void 0 ? void 0 : n.querySelector(t)) !== null && o !== void 0 ? o : null;
}, enumerable: !0, configurable: !0 };
if (e) {
const n = typeof r == "symbol" ? Symbol() : "__" + r;
i.get = function() {
var o, a;
return this[n] === void 0 && (this[n] = (a = (o = this.renderRoot) === null || o === void 0 ? void 0 : o.