diff --git a/pkg/api/ui/dist/core-scm.js b/pkg/api/ui/dist/core-scm.js index df348a3..4c1d073 100644 --- a/pkg/api/ui/dist/core-scm.js +++ b/pkg/api/ui/dist/core-scm.js @@ -3,18 +3,18 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const J = globalThis, ie = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, re = Symbol(), ne = /* @__PURE__ */ new WeakMap(); -let ye = class { - constructor(e, s, r) { - if (this._$cssResult$ = !0, r !== re) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); +const K = globalThis, re = K.ShadowRoot && (K.ShadyCSS === void 0 || K.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ie = Symbol(), ne = /* @__PURE__ */ new WeakMap(); +let ve = class { + constructor(e, s, i) { + if (this._$cssResult$ = !0, i !== ie) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = e, this.t = s; } get styleSheet() { let e = this.o; const s = this.t; - if (ie && e === void 0) { - const r = s !== void 0 && s.length === 1; - r && (e = ne.get(s)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && ne.set(s, e)); + if (re && e === void 0) { + const i = s !== void 0 && s.length === 1; + i && (e = ne.get(s)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && ne.set(s, e)); } return e; } @@ -22,30 +22,30 @@ let ye = class { return this.cssText; } }; -const xe = (t) => new ye(typeof t == "string" ? t : t + "", void 0, re), W = (t, ...e) => { - const s = t.length === 1 ? t[0] : e.reduce((r, i, o) => r + ((a) => { +const Ae = (t) => new ve(typeof t == "string" ? t : t + "", void 0, ie), B = (t, ...e) => { + const s = t.length === 1 ? t[0] : e.reduce((i, r, 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."); - })(i) + t[o + 1], t[0]); - return new ye(s, t, re); + })(r) + t[o + 1], t[0]); + return new ve(s, t, ie); }, Se = (t, e) => { - if (ie) t.adoptedStyleSheets = e.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); + if (re) t.adoptedStyleSheets = e.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); else for (const s of e) { - const r = document.createElement("style"), i = J.litNonce; - i !== void 0 && r.setAttribute("nonce", i), r.textContent = s.cssText, t.appendChild(r); + const i = document.createElement("style"), r = K.litNonce; + r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, t.appendChild(i); } -}, le = ie ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => { +}, le = re ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => { let s = ""; - for (const r of e.cssRules) s += r.cssText; - return xe(s); + for (const i of e.cssRules) s += i.cssText; + return Ae(s); })(t) : t; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const { is: Ee, defineProperty: Ce, getOwnPropertyDescriptor: ke, getOwnPropertyNames: Pe, getOwnPropertySymbols: Ue, getPrototypeOf: Oe } = Object, A = globalThis, de = A.trustedTypes, Re = de ? de.emptyScript : "", Y = A.reactiveElementPolyfillSupport, D = (t, e) => t, Q = { toAttribute(t, e) { +const { is: Ce, defineProperty: Ee, getOwnPropertyDescriptor: Ue, getOwnPropertyNames: Pe, getOwnPropertySymbols: Oe, getPrototypeOf: ze } = Object, k = globalThis, de = k.trustedTypes, Re = de ? de.emptyScript : "", X = k.reactiveElementPolyfillSupport, H = (t, e) => t, J = { toAttribute(t, e) { switch (e) { case Boolean: t = t ? Re : null; @@ -73,8 +73,8 @@ const { is: Ee, defineProperty: Ce, getOwnPropertyDescriptor: ke, getOwnProperty } } return s; -} }, ae = (t, e) => !Ee(t, e), ce = { attribute: !0, type: String, converter: Q, reflect: !1, useDefault: !1, hasChanged: ae }; -Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), A.litPropertyMetadata ?? (A.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); +} }, ae = (t, e) => !Ce(t, e), ce = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: ae }; +Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), k.litPropertyMetadata ?? (k.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); let R = class extends HTMLElement { static addInitializer(e) { this._$Ei(), (this.l ?? (this.l = [])).push(e); @@ -84,58 +84,58 @@ let R = class extends HTMLElement { } static createProperty(e, s = ce) { if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(e, s), !s.noAccessor) { - const r = Symbol(), i = this.getPropertyDescriptor(e, r, s); - i !== void 0 && Ce(this.prototype, e, i); + const i = Symbol(), r = this.getPropertyDescriptor(e, i, s); + r !== void 0 && Ee(this.prototype, e, r); } } - static getPropertyDescriptor(e, s, r) { - const { get: i, set: o } = ke(this.prototype, e) ?? { get() { + static getPropertyDescriptor(e, s, i) { + const { get: r, set: o } = Ue(this.prototype, e) ?? { get() { return this[s]; }, set(a) { this[s] = a; } }; - return { get: i, set(a) { - const d = i == null ? void 0 : i.call(this); - o == null || o.call(this, a), this.requestUpdate(e, d, r); + return { get: r, set(a) { + const d = r == null ? void 0 : r.call(this); + o == null || o.call(this, a), this.requestUpdate(e, d, i); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(e) { return this.elementProperties.get(e) ?? ce; } static _$Ei() { - if (this.hasOwnProperty(D("elementProperties"))) return; - const e = Oe(this); + if (this.hasOwnProperty(H("elementProperties"))) return; + const e = ze(this); e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties); } static finalize() { - if (this.hasOwnProperty(D("finalized"))) return; - if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(D("properties"))) { - const s = this.properties, r = [...Pe(s), ...Ue(s)]; - for (const i of r) this.createProperty(i, s[i]); + if (this.hasOwnProperty(H("finalized"))) return; + if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(H("properties"))) { + const s = this.properties, i = [...Pe(s), ...Oe(s)]; + for (const r of i) this.createProperty(r, s[r]); } const e = this[Symbol.metadata]; if (e !== null) { const s = litPropertyMetadata.get(e); - if (s !== void 0) for (const [r, i] of s) this.elementProperties.set(r, i); + if (s !== void 0) for (const [i, r] of s) this.elementProperties.set(i, r); } this._$Eh = /* @__PURE__ */ new Map(); - for (const [s, r] of this.elementProperties) { - const i = this._$Eu(s, r); - i !== void 0 && this._$Eh.set(i, s); + for (const [s, i] of this.elementProperties) { + const r = this._$Eu(s, i); + r !== void 0 && this._$Eh.set(r, s); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(e) { const s = []; if (Array.isArray(e)) { - const r = new Set(e.flat(1 / 0).reverse()); - for (const i of r) s.unshift(le(i)); + const i = new Set(e.flat(1 / 0).reverse()); + for (const r of i) s.unshift(le(r)); } else e !== void 0 && s.push(le(e)); return s; } static _$Eu(e, s) { - const r = s.attribute; - return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0; + const i = s.attribute; + return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); @@ -154,7 +154,7 @@ let R = class extends HTMLElement { } _$E_() { const e = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties; - for (const r of s.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]); + for (const i of s.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]); e.size > 0 && (this._$Ep = e); } createRenderRoot() { @@ -164,8 +164,8 @@ let R = class extends HTMLElement { connectedCallback() { var e; this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((s) => { - var r; - return (r = s.hostConnected) == null ? void 0 : r.call(s); + var i; + return (i = s.hostConnected) == null ? void 0 : i.call(s); }); } enableUpdating(e) { @@ -173,42 +173,42 @@ let R = class extends HTMLElement { disconnectedCallback() { var e; (e = this._$EO) == null || e.forEach((s) => { - var r; - return (r = s.hostDisconnected) == null ? void 0 : r.call(s); + var i; + return (i = s.hostDisconnected) == null ? void 0 : i.call(s); }); } - attributeChangedCallback(e, s, r) { - this._$AK(e, r); + attributeChangedCallback(e, s, i) { + this._$AK(e, i); } _$ET(e, s) { var o; - const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r); - if (i !== void 0 && r.reflect === !0) { - const a = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : Q).toAttribute(s, r.type); - this._$Em = e, a == null ? this.removeAttribute(i) : this.setAttribute(i, a), this._$Em = null; + const i = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, i); + if (r !== void 0 && i.reflect === !0) { + const a = (((o = i.converter) == null ? void 0 : o.toAttribute) !== void 0 ? i.converter : J).toAttribute(s, i.type); + this._$Em = e, a == null ? this.removeAttribute(r) : this.setAttribute(r, a), this._$Em = null; } } _$AK(e, s) { var o, a; - const r = this.constructor, i = r._$Eh.get(e); - if (i !== void 0 && this._$Em !== i) { - const d = r.getPropertyOptions(i), n = typeof d.converter == "function" ? { fromAttribute: d.converter } : ((o = d.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? d.converter : Q; - this._$Em = i; - const u = n.fromAttribute(s, d.type); - this[i] = u ?? ((a = this._$Ej) == null ? void 0 : a.get(i)) ?? u, this._$Em = null; + const i = this.constructor, r = i._$Eh.get(e); + if (r !== void 0 && this._$Em !== r) { + const d = i.getPropertyOptions(r), n = typeof d.converter == "function" ? { fromAttribute: d.converter } : ((o = d.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? d.converter : J; + this._$Em = r; + const h = n.fromAttribute(s, d.type); + this[r] = h ?? ((a = this._$Ej) == null ? void 0 : a.get(r)) ?? h, this._$Em = null; } } - requestUpdate(e, s, r, i = !1, o) { + requestUpdate(e, s, i, r = !1, o) { var a; if (e !== void 0) { const d = this.constructor; - if (i === !1 && (o = this[e]), r ?? (r = d.getPropertyOptions(e)), !((r.hasChanged ?? ae)(o, s) || r.useDefault && r.reflect && o === ((a = this._$Ej) == null ? void 0 : a.get(e)) && !this.hasAttribute(d._$Eu(e, r)))) return; - this.C(e, s, r); + if (r === !1 && (o = this[e]), i ?? (i = d.getPropertyOptions(e)), !((i.hasChanged ?? ae)(o, s) || i.useDefault && i.reflect && o === ((a = this._$Ej) == null ? void 0 : a.get(e)) && !this.hasAttribute(d._$Eu(e, i)))) return; + this.C(e, s, i); } this.isUpdatePending === !1 && (this._$ES = this._$EP()); } - C(e, s, { useDefault: r, reflect: i, wrapped: o }, a) { - r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, a ?? s ?? this[e]), o !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (s = void 0), this._$AL.set(e, s)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); + C(e, s, { useDefault: i, reflect: r, wrapped: o }, a) { + i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, a ?? s ?? this[e]), o !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (s = void 0), this._$AL.set(e, s)), r === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); } async _$EP() { this.isUpdatePending = !0; @@ -224,15 +224,15 @@ let R = class extends HTMLElement { return this.performUpdate(); } performUpdate() { - var r; + var i; if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) { for (const [o, a] of this._$Ep) this[o] = a; this._$Ep = void 0; } - const i = this.constructor.elementProperties; - if (i.size > 0) for (const [o, a] of i) { + const r = this.constructor.elementProperties; + if (r.size > 0) for (const [o, a] of r) { const { wrapped: d } = a, n = this[o]; d !== !0 || this._$AL.has(o) || n === void 0 || this.C(o, void 0, a, n); } @@ -240,12 +240,12 @@ let R = class extends HTMLElement { let e = !1; const s = this._$AL; try { - e = this.shouldUpdate(s), e ? (this.willUpdate(s), (r = this._$EO) == null || r.forEach((i) => { + e = this.shouldUpdate(s), e ? (this.willUpdate(s), (i = this._$EO) == null || i.forEach((r) => { var o; - return (o = i.hostUpdate) == null ? void 0 : o.call(i); + return (o = r.hostUpdate) == null ? void 0 : o.call(r); }), this.update(s)) : this._$EM(); - } catch (i) { - throw e = !1, this._$EM(), i; + } catch (r) { + throw e = !1, this._$EM(), r; } e && this._$AE(s); } @@ -253,9 +253,9 @@ let R = class extends HTMLElement { } _$AE(e) { var s; - (s = this._$EO) == null || s.forEach((r) => { - var i; - return (i = r.hostUpdated) == null ? void 0 : i.call(r); + (s = this._$EO) == null || s.forEach((i) => { + var r; + return (r = i.hostUpdated) == null ? void 0 : r.call(i); }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e); } _$EM() { @@ -278,76 +278,76 @@ let R = class extends HTMLElement { firstUpdated(e) { } }; -R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[D("elementProperties")] = /* @__PURE__ */ new Map(), R[D("finalized")] = /* @__PURE__ */ new Map(), Y == null || Y({ ReactiveElement: R }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.1.2"); +R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[H("elementProperties")] = /* @__PURE__ */ new Map(), R[H("finalized")] = /* @__PURE__ */ new Map(), X == null || X({ ReactiveElement: R }), (k.reactiveElementVersions ?? (k.reactiveElementVersions = [])).push("2.1.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const I = globalThis, he = (t) => t, Z = I.trustedTypes, pe = Z ? Z.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, $e = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, _e = "?" + w, ze = `<${_e}>`, U = document, j = () => U.createComment(""), L = (t) => t === null || typeof t != "object" && typeof t != "function", oe = Array.isArray, Te = (t) => oe(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", ee = `[ -\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ue = /-->/g, fe = />/g, C = RegExp(`>|${ee}(?:([^\\s"'>=/]+)(${ee}*=${ee}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`, "g"), me = /'/g, ge = /"/g, we = /^(?:script|style|textarea|title)$/i, Me = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), l = Me(1), z = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), be = /* @__PURE__ */ new WeakMap(), k = U.createTreeWalker(U, 129); -function Ae(t, e) { +const D = globalThis, pe = (t) => t, Q = D.trustedTypes, he = Q ? Q.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, $e = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, xe = "?" + _, Me = `<${xe}>`, O = document, L = () => O.createComment(""), q = (t) => t === null || typeof t != "object" && typeof t != "function", oe = Array.isArray, Te = (t) => oe(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", ee = `[ +\f\r]`, j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, me = /-->/g, ue = />/g, E = RegExp(`>|${ee}(?:([^\\s"'>=/]+)(${ee}*=${ee}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`, "g"), fe = /'/g, ge = /"/g, we = /^(?:script|style|textarea|title)$/i, Ie = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), l = Ie(1), M = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), be = /* @__PURE__ */ new WeakMap(), U = O.createTreeWalker(O, 129); +function _e(t, e) { if (!oe(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return pe !== void 0 ? pe.createHTML(e) : e; + return he !== void 0 ? he.createHTML(e) : e; } const Ne = (t, e) => { - const s = t.length - 1, r = []; - let i, o = e === 2 ? "" : e === 3 ? "" : "")), i]; }; -class q { - constructor({ strings: e, _$litType$: s }, r) { - let i; +class W { + constructor({ strings: e, _$litType$: s }, i) { + let r; this.parts = []; let o = 0, a = 0; - const d = e.length - 1, n = this.parts, [u, f] = Ne(e, s); - if (this.el = q.createElement(u, r), k.currentNode = this.el.content, s === 2 || s === 3) { - const h = this.el.content.firstChild; - h.replaceWith(...h.childNodes); + const d = e.length - 1, n = this.parts, [h, u] = Ne(e, s); + if (this.el = W.createElement(h, i), U.currentNode = this.el.content, s === 2 || s === 3) { + const p = this.el.content.firstChild; + p.replaceWith(...p.childNodes); } - for (; (i = k.nextNode()) !== null && n.length < d; ) { - if (i.nodeType === 1) { - if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith($e)) { - const v = f[a++], _ = i.getAttribute(h).split(w), K = /([.?@])?(.*)/.exec(v); - n.push({ type: 1, index: o, name: K[2], strings: _, ctor: K[1] === "." ? De : K[1] === "?" ? Ie : K[1] === "@" ? je : G }), i.removeAttribute(h); - } else h.startsWith(w) && (n.push({ type: 6, index: o }), i.removeAttribute(h)); - if (we.test(i.tagName)) { - const h = i.textContent.split(w), v = h.length - 1; - if (v > 0) { - i.textContent = Z ? Z.emptyScript : ""; - for (let _ = 0; _ < v; _++) i.append(h[_], j()), k.nextNode(), n.push({ type: 2, index: ++o }); - i.append(h[v], j()); + for (; (r = U.nextNode()) !== null && n.length < d; ) { + if (r.nodeType === 1) { + if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith($e)) { + const f = u[a++], b = r.getAttribute(p).split(_), y = /([.?@])?(.*)/.exec(f); + n.push({ type: 1, index: o, name: y[2], strings: b, ctor: y[1] === "." ? He : y[1] === "?" ? De : y[1] === "@" ? Le : Z }), r.removeAttribute(p); + } else p.startsWith(_) && (n.push({ type: 6, index: o }), r.removeAttribute(p)); + if (we.test(r.tagName)) { + const p = r.textContent.split(_), f = p.length - 1; + if (f > 0) { + r.textContent = Q ? Q.emptyScript : ""; + for (let b = 0; b < f; b++) r.append(p[b], L()), U.nextNode(), n.push({ type: 2, index: ++o }); + r.append(p[f], L()); } } - } else if (i.nodeType === 8) if (i.data === _e) n.push({ type: 2, index: o }); + } else if (r.nodeType === 8) if (r.data === xe) n.push({ type: 2, index: o }); else { - let h = -1; - for (; (h = i.data.indexOf(w, h + 1)) !== -1; ) n.push({ type: 7, index: o }), h += w.length - 1; + let p = -1; + for (; (p = r.data.indexOf(_, p + 1)) !== -1; ) n.push({ type: 7, index: o }), p += _.length - 1; } o++; } } static createElement(e, s) { - const r = U.createElement("template"); - return r.innerHTML = e, r; + const i = O.createElement("template"); + return i.innerHTML = e, i; } } -function T(t, e, s = t, r) { +function T(t, e, s = t, i) { var a, d; - if (e === z) return e; - let i = r !== void 0 ? (a = s._$Co) == null ? void 0 : a[r] : s._$Cl; - const o = L(e) ? void 0 : e._$litDirective$; - return (i == null ? void 0 : i.constructor) !== o && ((d = i == null ? void 0 : i._$AO) == null || d.call(i, !1), o === void 0 ? i = void 0 : (i = new o(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ?? (s._$Co = []))[r] = i : s._$Cl = i), i !== void 0 && (e = T(t, i._$AS(t, e.values), i, r)), e; + if (e === M) return e; + let r = i !== void 0 ? (a = s._$Co) == null ? void 0 : a[i] : s._$Cl; + const o = q(e) ? void 0 : e._$litDirective$; + return (r == null ? void 0 : r.constructor) !== o && ((d = r == null ? void 0 : r._$AO) == null || d.call(r, !1), o === void 0 ? r = void 0 : (r = new o(t), r._$AT(t, s, i)), i !== void 0 ? (s._$Co ?? (s._$Co = []))[i] = r : s._$Cl = r), r !== void 0 && (e = T(t, r._$AS(t, e.values), r, i)), e; } -class He { +class je { constructor(e, s) { this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = s; } @@ -358,30 +358,30 @@ class He { return this._$AM._$AU; } u(e) { - const { el: { content: s }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? U).importNode(s, !0); - k.currentNode = i; - let o = k.nextNode(), a = 0, d = 0, n = r[0]; + const { el: { content: s }, parts: i } = this._$AD, r = ((e == null ? void 0 : e.creationScope) ?? O).importNode(s, !0); + U.currentNode = r; + let o = U.nextNode(), a = 0, d = 0, n = i[0]; for (; n !== void 0; ) { if (a === n.index) { - let u; - n.type === 2 ? u = new V(o, o.nextSibling, this, e) : n.type === 1 ? u = new n.ctor(o, n.name, n.strings, this, e) : n.type === 6 && (u = new Le(o, this, e)), this._$AV.push(u), n = r[++d]; + let h; + n.type === 2 ? h = new F(o, o.nextSibling, this, e) : n.type === 1 ? h = new n.ctor(o, n.name, n.strings, this, e) : n.type === 6 && (h = new qe(o, this, e)), this._$AV.push(h), n = i[++d]; } - a !== (n == null ? void 0 : n.index) && (o = k.nextNode(), a++); + a !== (n == null ? void 0 : n.index) && (o = U.nextNode(), a++); } - return k.currentNode = U, i; + return U.currentNode = O, r; } p(e) { let s = 0; - for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, s), s += r.strings.length - 2) : r._$AI(e[s])), s++; + for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, s), s += i.strings.length - 2) : i._$AI(e[s])), s++; } } -class V { +class F { get _$AU() { var e; return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv; } - constructor(e, s, r, i) { - this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0; + constructor(e, s, i, r) { + this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0; } get parentNode() { let e = this._$AA.parentNode; @@ -395,7 +395,7 @@ class V { return this._$AB; } _$AI(e, s = this) { - e = T(this, e, s), L(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== z && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Te(e) ? this.k(e) : this._(e); + e = T(this, e, s), q(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== M && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Te(e) ? this.k(e) : this._(e); } O(e) { return this._$AA.parentNode.insertBefore(e, this._$AB); @@ -404,33 +404,33 @@ class V { this._$AH !== e && (this._$AR(), this._$AH = this.O(e)); } _(e) { - this._$AH !== c && L(this._$AH) ? this._$AA.nextSibling.data = e : this.T(U.createTextNode(e)), this._$AH = e; + this._$AH !== c && q(this._$AH) ? this._$AA.nextSibling.data = e : this.T(O.createTextNode(e)), this._$AH = e; } $(e) { var o; - const { values: s, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = q.createElement(Ae(r.h, r.h[0]), this.options)), r); - if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(s); + const { values: s, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = W.createElement(_e(i.h, i.h[0]), this.options)), i); + if (((o = this._$AH) == null ? void 0 : o._$AD) === r) this._$AH.p(s); else { - const a = new He(i, this), d = a.u(this.options); + const a = new je(r, this), d = a.u(this.options); a.p(s), this.T(d), this._$AH = a; } } _$AC(e) { let s = be.get(e.strings); - return s === void 0 && be.set(e.strings, s = new q(e)), s; + return s === void 0 && be.set(e.strings, s = new W(e)), s; } k(e) { oe(this._$AH) || (this._$AH = [], this._$AR()); const s = this._$AH; - let r, i = 0; - for (const o of e) i === s.length ? s.push(r = new V(this.O(j()), this.O(j()), this, this.options)) : r = s[i], r._$AI(o), i++; - i < s.length && (this._$AR(r && r._$AB.nextSibling, i), s.length = i); + let i, r = 0; + for (const o of e) r === s.length ? s.push(i = new F(this.O(L()), this.O(L()), this, this.options)) : i = s[r], i._$AI(o), r++; + r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r); } _$AR(e = this._$AA.nextSibling, s) { - var r; - for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, s); e !== this._$AB; ) { - const i = he(e).nextSibling; - he(e).remove(), e = i; + var i; + for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, s); e !== this._$AB; ) { + const r = pe(e).nextSibling; + pe(e).remove(), e = r; } } setConnected(e) { @@ -438,32 +438,32 @@ class V { this._$AM === void 0 && (this._$Cv = e, (s = this._$AP) == null || s.call(this, e)); } } -class G { +class Z { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } - constructor(e, s, r, i, o) { - this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = s, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = c; + constructor(e, s, i, r, o) { + this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = s, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = c; } - _$AI(e, s = this, r, i) { + _$AI(e, s = this, i, r) { const o = this.strings; let a = !1; - if (o === void 0) e = T(this, e, s, 0), a = !L(e) || e !== this._$AH && e !== z, a && (this._$AH = e); + if (o === void 0) e = T(this, e, s, 0), a = !q(e) || e !== this._$AH && e !== M, a && (this._$AH = e); else { const d = e; - let n, u; - for (e = o[0], n = 0; n < o.length - 1; n++) u = T(this, d[r + n], s, n), u === z && (u = this._$AH[n]), a || (a = !L(u) || u !== this._$AH[n]), u === c ? e = c : e !== c && (e += (u ?? "") + o[n + 1]), this._$AH[n] = u; + let n, h; + for (e = o[0], n = 0; n < o.length - 1; n++) h = T(this, d[i + n], s, n), h === M && (h = this._$AH[n]), a || (a = !q(h) || h !== this._$AH[n]), h === c ? e = c : e !== c && (e += (h ?? "") + o[n + 1]), this._$AH[n] = h; } - a && !i && this.j(e); + a && !r && this.j(e); } j(e) { e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); } } -class De extends G { +class He extends Z { constructor() { super(...arguments), this.type = 3; } @@ -471,7 +471,7 @@ class De extends G { this.element[this.name] = e === c ? void 0 : e; } } -class Ie extends G { +class De extends Z { constructor() { super(...arguments), this.type = 4; } @@ -479,23 +479,23 @@ class Ie extends G { this.element.toggleAttribute(this.name, !!e && e !== c); } } -class je extends G { - constructor(e, s, r, i, o) { - super(e, s, r, i, o), this.type = 5; +class Le extends Z { + constructor(e, s, i, r, o) { + super(e, s, i, r, o), this.type = 5; } _$AI(e, s = this) { - if ((e = T(this, e, s, 0) ?? c) === z) return; - const r = this._$AH, i = e === c && r !== c || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== c && (r === c || i); - i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e; + if ((e = T(this, e, s, 0) ?? c) === M) return; + const i = this._$AH, r = e === c && i !== c || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== c && (i === c || r); + r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e; } handleEvent(e) { var s; typeof this._$AH == "function" ? this._$AH.call(((s = this.options) == null ? void 0 : s.host) ?? this.element, e) : this._$AH.handleEvent(e); } } -class Le { - constructor(e, s, r) { - this.element = e, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = r; +class qe { + constructor(e, s, i) { + this.element = e, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i; } get _$AU() { return this._$AM._$AU; @@ -504,16 +504,16 @@ class Le { T(this, e); } } -const te = I.litHtmlPolyfillSupport; -te == null || te(q, V), (I.litHtmlVersions ?? (I.litHtmlVersions = [])).push("3.3.2"); -const qe = (t, e, s) => { - const r = (s == null ? void 0 : s.renderBefore) ?? e; - let i = r._$litPart$; - if (i === void 0) { +const te = D.litHtmlPolyfillSupport; +te == null || te(W, F), (D.litHtmlVersions ?? (D.litHtmlVersions = [])).push("3.3.2"); +const We = (t, e, s) => { + const i = (s == null ? void 0 : s.renderBefore) ?? e; + let r = i._$litPart$; + if (r === void 0) { const o = (s == null ? void 0 : s.renderBefore) ?? null; - r._$litPart$ = i = new V(e.insertBefore(j(), o), o, void 0, s ?? {}); + i._$litPart$ = r = new F(e.insertBefore(L(), o), o, void 0, s ?? {}); } - return i._$AI(t), i; + return r._$AI(t), r; }; /** * @license @@ -521,7 +521,7 @@ const qe = (t, e, s) => { * SPDX-License-Identifier: BSD-3-Clause */ const P = globalThis; -class y extends R { +class x extends R { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } @@ -532,7 +532,7 @@ class y extends R { } update(e) { const s = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = qe(s, this.renderRoot, this.renderOptions); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = We(s, this.renderRoot, this.renderOptions); } connectedCallback() { var e; @@ -543,20 +543,20 @@ class y extends R { super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1); } render() { - return z; + return M; } } -var ve; -y._$litElement$ = !0, y.finalized = !0, (ve = P.litElementHydrateSupport) == null || ve.call(P, { LitElement: y }); +var ye; +x._$litElement$ = !0, x.finalized = !0, (ye = P.litElementHydrateSupport) == null || ye.call(P, { LitElement: x }); const se = P.litElementPolyfillSupport; -se == null || se({ LitElement: y }); +se == null || se({ LitElement: x }); (P.litElementVersions ?? (P.litElementVersions = [])).push("4.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const B = (t) => (e, s) => { +const V = (t) => (e, s) => { s !== void 0 ? s.addInitializer(() => { customElements.define(t, e); }) : customElements.define(t, e); @@ -566,10 +566,10 @@ const B = (t) => (e, s) => { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const We = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged: ae }, Ve = (t = We, e, s) => { - const { kind: r, metadata: i } = s; - let o = globalThis.litPropertyMetadata.get(i); - if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(s.name, t), r === "accessor") { +const Be = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: ae }, Fe = (t = Be, e, s) => { + const { kind: i, metadata: r } = s; + let o = globalThis.litPropertyMetadata.get(r); + if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(s.name, t), i === "accessor") { const { name: a } = s; return { set(d) { const n = e.get.call(this); @@ -578,19 +578,19 @@ const We = { attribute: !0, type: String, converter: Q, reflect: !1, hasChanged: return d !== void 0 && this.C(a, void 0, t, d), d; } }; } - if (r === "setter") { + if (i === "setter") { const { name: a } = s; return function(d) { const n = this[a]; e.call(this, d), this.requestUpdate(a, n, t, !0, d); }; } - throw Error("Unsupported decorator location: " + r); + throw Error("Unsupported decorator location: " + i); }; -function $(t) { - return (e, s) => typeof s == "object" ? Ve(t, e, s) : ((r, i, o) => { - const a = i.hasOwnProperty(o); - return i.constructor.createProperty(o, r), a ? Object.getOwnPropertyDescriptor(i, o) : void 0; +function w(t) { + return (e, s) => typeof s == "object" ? Fe(t, e, s) : ((i, r, o) => { + const a = r.hasOwnProperty(o); + return r.constructor.createProperty(o, i), a ? Object.getOwnPropertyDescriptor(r, o) : void 0; })(t, e, s); } /** @@ -598,21 +598,21 @@ function $(t) { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function p(t) { - return $({ ...t, state: !0, attribute: !1 }); +function m(t) { + return w({ ...t, state: !0, attribute: !1 }); } -function Be(t, e) { +function Ve(t, e) { const s = new WebSocket(t); - return s.onmessage = (r) => { - var i, o, a, d; + return s.onmessage = (i) => { + var r, o, a, d; try { - const n = JSON.parse(r.data); - ((o = (i = n.type) == null ? void 0 : i.startsWith) != null && o.call(i, "scm.") || (d = (a = n.channel) == null ? void 0 : a.startsWith) != null && d.call(a, "scm.")) && e(n); + const n = JSON.parse(i.data); + ((o = (r = n.type) == null ? void 0 : r.startsWith) != null && o.call(r, "scm.") || (d = (a = n.channel) == null ? void 0 : a.startsWith) != null && d.call(a, "scm.")) && e(n); } catch { } }, s; } -class X { +class G { constructor(e = "") { this.baseUrl = e; } @@ -621,18 +621,18 @@ class X { } async request(e, s) { var o, a; - const r = await fetch(`${this.base}${e}`, s), i = await r.json().catch(() => null); - if (!r.ok) - throw new Error(((o = i == null ? void 0 : i.error) == null ? void 0 : o.message) ?? `Request failed (${r.status})`); - if (!(i != null && i.success)) - throw new Error(((a = i == null ? void 0 : i.error) == null ? void 0 : a.message) ?? "Request failed"); - return i.data; + const i = await fetch(`${this.base}${e}`, s), r = await i.json().catch(() => null); + if (!i.ok) + throw new Error(((o = r == null ? void 0 : r.error) == null ? void 0 : o.message) ?? `Request failed (${i.status})`); + if (!(r != null && r.success)) + throw new Error(((a = r == null ? void 0 : r.error) == null ? void 0 : a.message) ?? "Request failed"); + return r.data; } marketplace(e, s) { - const r = new URLSearchParams(); - e && r.set("q", e), s && r.set("category", s); - const i = r.toString(); - return this.request(`/marketplace${i ? `?${i}` : ""}`); + const i = new URLSearchParams(); + e && i.set("q", e), s && i.set("category", s); + const r = i.toString(); + return this.request(`/marketplace${r ? `?${r}` : ""}`); } marketplaceItem(e) { return this.request(`/marketplace/${encodeURIComponent(e)}`); @@ -673,17 +673,17 @@ class X { return this.request("/registry"); } } -var Fe = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, b = (t, e, s, r) => { - for (var i = r > 1 ? void 0 : r ? Ke(e, s) : e, o = t.length - 1, a; o >= 0; o--) - (a = t[o]) && (i = (r ? a(e, s, i) : a(i)) || i); - return r && i && Fe(e, s, i), i; +var Ye = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, $ = (t, e, s, i) => { + for (var r = i > 1 ? void 0 : i ? Ke(e, s) : e, o = t.length - 1, a; o >= 0; o--) + (a = t[o]) && (r = (i ? a(e, s, r) : a(r)) || r); + return i && r && Ye(e, s, r), r; }; -let m = class extends y { +let g = class extends x { constructor() { super(...arguments), this.apiUrl = "", this.category = "", this.modules = [], this.categories = [], this.searchQuery = "", this.activeCategory = "", this.loading = !0, this.error = "", this.installing = /* @__PURE__ */ new Set(); } connectedCallback() { - super.connectedCallback(), this.api = new X(this.apiUrl), this.activeCategory = this.category, this.loadModules(); + super.connectedCallback(), this.api = new G(this.apiUrl), this.activeCategory = this.category, this.loadModules(); } async loadModules() { this.loading = !0, this.error = ""; @@ -735,67 +735,166 @@ let m = class extends y { } render() { return l` -
- - ${this.categories.length > 0 ? l` -