@headless-primitives/separator
Advanced tools
+358
-348
@@ -1,11 +0,11 @@ | ||
| var R = globalThis, B = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, pt = Symbol(), G = /* @__PURE__ */ new WeakMap(), Et = class { | ||
| constructor(t, e, i) { | ||
| var R = globalThis, B = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, pt = Symbol(), G = /* @__PURE__ */ new WeakMap(), bt = class { | ||
| constructor(t, s, i) { | ||
| if (this._$cssResult$ = !0, i !== pt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
| this.cssText = t, this.t = e; | ||
| this.cssText = t, this.t = s; | ||
| } | ||
| get styleSheet() { | ||
| let t = this.o, e = this.t; | ||
| let t = this.o, s = this.t; | ||
| if (B && t === void 0) { | ||
| let i = e !== void 0 && e.length === 1; | ||
| i && (t = G.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && G.set(e, t)); | ||
| let i = s !== void 0 && s.length === 1; | ||
| i && (t = G.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && G.set(s, t)); | ||
| } | ||
@@ -17,32 +17,32 @@ return t; | ||
| } | ||
| }, bt = (s) => new Et(typeof s == "string" ? s : s + "", void 0, pt), St = (s, t) => { | ||
| if (B) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
| else for (let e of t) { | ||
| }, Et = (e) => new bt(typeof e == "string" ? e : e + "", void 0, pt), St = (e, t) => { | ||
| if (B) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); | ||
| else for (let s of t) { | ||
| let i = document.createElement("style"), r = R.litNonce; | ||
| r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i); | ||
| r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i); | ||
| } | ||
| }, Q = B ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => { | ||
| let e = ""; | ||
| for (let i of t.cssRules) e += i.cssText; | ||
| return bt(e); | ||
| })(s) : s, { is: wt, defineProperty: Pt, getOwnPropertyDescriptor: Ct, getOwnPropertyNames: Ut, getOwnPropertySymbols: Ot, getPrototypeOf: Mt } = Object, H = globalThis, X = H.trustedTypes, Rt = X ? X.emptyScript : "", xt = H.reactiveElementPolyfillSupport, S = (s, t) => s, L = { | ||
| toAttribute(s, t) { | ||
| }, Q = B ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => { | ||
| let s = ""; | ||
| for (let i of t.cssRules) s += i.cssText; | ||
| return Et(s); | ||
| })(e) : e, { is: wt, defineProperty: Ct, getOwnPropertyDescriptor: Pt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Ot, getPrototypeOf: Mt } = Object, H = globalThis, X = H.trustedTypes, Rt = X ? X.emptyScript : "", xt = H.reactiveElementPolyfillSupport, S = (e, t) => e, L = { | ||
| toAttribute(e, t) { | ||
| switch (t) { | ||
| case Boolean: | ||
| s = s ? Rt : null; | ||
| e = e ? Rt : null; | ||
| break; | ||
| case Object: | ||
| case Array: | ||
| s = s == null ? s : JSON.stringify(s); | ||
| e = e == null ? e : JSON.stringify(e); | ||
| } | ||
| return s; | ||
| return e; | ||
| }, | ||
| fromAttribute(s, t) { | ||
| let e = s; | ||
| fromAttribute(e, t) { | ||
| let s = e; | ||
| switch (t) { | ||
| case Boolean: | ||
| e = s !== null; | ||
| s = e !== null; | ||
| break; | ||
| case Number: | ||
| e = s === null ? null : Number(s); | ||
| s = e === null ? null : Number(e); | ||
| break; | ||
@@ -52,10 +52,10 @@ case Object: | ||
| try { | ||
| e = JSON.parse(s); | ||
| s = JSON.parse(e); | ||
| } catch { | ||
| e = null; | ||
| s = null; | ||
| } | ||
| } | ||
| return e; | ||
| return s; | ||
| } | ||
| }, ut = (s, t) => !wt(s, t), Y = { | ||
| }, ut = (e, t) => !wt(e, t), Y = { | ||
| attribute: !0, | ||
@@ -70,4 +70,4 @@ type: String, | ||
| var g = class extends HTMLElement { | ||
| static addInitializer(t) { | ||
| this._$Ei(), (this.l ??= []).push(t); | ||
| static addInitializer(e) { | ||
| this._$Ei(), (this.l ??= []).push(e); | ||
| } | ||
@@ -77,22 +77,22 @@ static get observedAttributes() { | ||
| } | ||
| static createProperty(t, e = Y) { | ||
| 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) { | ||
| let i = Symbol(), r = this.getPropertyDescriptor(t, i, e); | ||
| r !== void 0 && Pt(this.prototype, t, r); | ||
| static createProperty(e, t = Y) { | ||
| if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) { | ||
| let s = Symbol(), i = this.getPropertyDescriptor(e, s, t); | ||
| i !== void 0 && Ct(this.prototype, e, i); | ||
| } | ||
| } | ||
| static getPropertyDescriptor(t, e, i) { | ||
| let { get: r, set: o } = Ct(this.prototype, t) ?? { | ||
| static getPropertyDescriptor(e, t, s) { | ||
| let { get: i, set: r } = Pt(this.prototype, e) ?? { | ||
| get() { | ||
| return this[e]; | ||
| return this[t]; | ||
| }, | ||
| set(n) { | ||
| this[e] = n; | ||
| set(o) { | ||
| this[t] = o; | ||
| } | ||
| }; | ||
| return { | ||
| get: r, | ||
| set(n) { | ||
| let h = r?.call(this); | ||
| o?.call(this, n), this.requestUpdate(t, h, i); | ||
| get: i, | ||
| set(o) { | ||
| let n = i?.call(this); | ||
| r?.call(this, o), this.requestUpdate(e, n, s); | ||
| }, | ||
@@ -103,9 +103,9 @@ configurable: !0, | ||
| } | ||
| static getPropertyOptions(t) { | ||
| return this.elementProperties.get(t) ?? Y; | ||
| static getPropertyOptions(e) { | ||
| return this.elementProperties.get(e) ?? Y; | ||
| } | ||
| static _$Ei() { | ||
| if (this.hasOwnProperty(S("elementProperties"))) return; | ||
| let t = Mt(this); | ||
| t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); | ||
| let e = Mt(this); | ||
| e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties); | ||
| } | ||
@@ -115,28 +115,28 @@ static finalize() { | ||
| if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(S("properties"))) { | ||
| let e = this.properties, i = [...Ut(e), ...Ot(e)]; | ||
| for (let r of i) this.createProperty(r, e[r]); | ||
| let t = this.properties, s = [...Ut(t), ...Ot(t)]; | ||
| for (let i of s) this.createProperty(i, t[i]); | ||
| } | ||
| let t = this[Symbol.metadata]; | ||
| if (t !== null) { | ||
| let e = litPropertyMetadata.get(t); | ||
| if (e !== void 0) for (let [i, r] of e) this.elementProperties.set(i, r); | ||
| let e = this[Symbol.metadata]; | ||
| if (e !== null) { | ||
| let t = litPropertyMetadata.get(e); | ||
| if (t !== void 0) for (let [s, i] of t) this.elementProperties.set(s, i); | ||
| } | ||
| this._$Eh = /* @__PURE__ */ new Map(); | ||
| for (let [e, i] of this.elementProperties) { | ||
| let r = this._$Eu(e, i); | ||
| r !== void 0 && this._$Eh.set(r, e); | ||
| for (let [t, s] of this.elementProperties) { | ||
| let i = this._$Eu(t, s); | ||
| i !== void 0 && this._$Eh.set(i, t); | ||
| } | ||
| this.elementStyles = this.finalizeStyles(this.styles); | ||
| } | ||
| static finalizeStyles(t) { | ||
| let e = []; | ||
| if (Array.isArray(t)) { | ||
| let i = new Set(t.flat(1 / 0).reverse()); | ||
| for (let r of i) e.unshift(Q(r)); | ||
| } else t !== void 0 && e.push(Q(t)); | ||
| return e; | ||
| static finalizeStyles(e) { | ||
| let t = []; | ||
| if (Array.isArray(e)) { | ||
| let s = new Set(e.flat(1 / 0).reverse()); | ||
| for (let i of s) t.unshift(Q(i)); | ||
| } else e !== void 0 && t.push(Q(e)); | ||
| return t; | ||
| } | ||
| static _$Eu(t, e) { | ||
| let i = e.attribute; | ||
| return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0; | ||
| static _$Eu(e, t) { | ||
| let s = t.attribute; | ||
| return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0; | ||
| } | ||
@@ -147,56 +147,56 @@ constructor() { | ||
| _$Ev() { | ||
| this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this)); | ||
| this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this)); | ||
| } | ||
| addController(t) { | ||
| (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.(); | ||
| addController(e) { | ||
| (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.(); | ||
| } | ||
| removeController(t) { | ||
| this._$EO?.delete(t); | ||
| removeController(e) { | ||
| this._$EO?.delete(e); | ||
| } | ||
| _$E_() { | ||
| let t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties; | ||
| for (let i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]); | ||
| t.size > 0 && (this._$Ep = t); | ||
| let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties; | ||
| for (let s of t.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]); | ||
| e.size > 0 && (this._$Ep = e); | ||
| } | ||
| createRenderRoot() { | ||
| let t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
| return St(t, this.constructor.elementStyles), t; | ||
| let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
| return St(e, this.constructor.elementStyles), e; | ||
| } | ||
| connectedCallback() { | ||
| this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.()); | ||
| this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.()); | ||
| } | ||
| enableUpdating(t) { | ||
| enableUpdating(e) { | ||
| } | ||
| disconnectedCallback() { | ||
| this._$EO?.forEach((t) => t.hostDisconnected?.()); | ||
| this._$EO?.forEach((e) => e.hostDisconnected?.()); | ||
| } | ||
| attributeChangedCallback(t, e, i) { | ||
| this._$AK(t, i); | ||
| attributeChangedCallback(e, t, s) { | ||
| this._$AK(e, s); | ||
| } | ||
| _$ET(t, e) { | ||
| let i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i); | ||
| if (r !== void 0 && i.reflect === !0) { | ||
| let o = (i.converter?.toAttribute === void 0 ? L : i.converter).toAttribute(e, i.type); | ||
| this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null; | ||
| _$ET(e, t) { | ||
| let s = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, s); | ||
| if (i !== void 0 && s.reflect === !0) { | ||
| let r = (s.converter?.toAttribute === void 0 ? L : s.converter).toAttribute(t, s.type); | ||
| this._$Em = e, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null; | ||
| } | ||
| } | ||
| _$AK(t, e) { | ||
| let i = this.constructor, r = i._$Eh.get(t); | ||
| if (r !== void 0 && this._$Em !== r) { | ||
| let o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute === void 0 ? L : o.converter; | ||
| this._$Em = r; | ||
| let h = n.fromAttribute(e, o.type); | ||
| this[r] = h ?? this._$Ej?.get(r) ?? h, this._$Em = null; | ||
| _$AK(e, t) { | ||
| let s = this.constructor, i = s._$Eh.get(e); | ||
| if (i !== void 0 && this._$Em !== i) { | ||
| let r = s.getPropertyOptions(i), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute === void 0 ? L : r.converter; | ||
| this._$Em = i; | ||
| let n = o.fromAttribute(t, r.type); | ||
| this[i] = n ?? this._$Ej?.get(i) ?? n, this._$Em = null; | ||
| } | ||
| } | ||
| requestUpdate(t, e, i, r = !1, o) { | ||
| if (t !== void 0) { | ||
| let n = this.constructor; | ||
| if (r === !1 && (o = this[t]), i ??= n.getPropertyOptions(t), !((i.hasChanged ?? ut)(o, e) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, i)))) return; | ||
| this.C(t, e, i); | ||
| requestUpdate(e, t, s, i = !1, r) { | ||
| if (e !== void 0) { | ||
| let o = this.constructor; | ||
| if (i === !1 && (r = this[e]), s ??= o.getPropertyOptions(e), !((s.hasChanged ?? ut)(r, t) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, s)))) return; | ||
| this.C(e, t, s); | ||
| } | ||
| this.isUpdatePending === !1 && (this._$ES = this._$EP()); | ||
| } | ||
| C(t, e, { useDefault: i, reflect: r, wrapped: o }, n) { | ||
| i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t)); | ||
| C(e, t, { useDefault: s, reflect: i, wrapped: r }, o) { | ||
| s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, o ?? t ?? this[e]), r !== !0 || o !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e)); | ||
| } | ||
@@ -207,7 +207,7 @@ async _$EP() { | ||
| await this._$ES; | ||
| } catch (e) { | ||
| Promise.reject(e); | ||
| } catch (t) { | ||
| Promise.reject(t); | ||
| } | ||
| let t = this.scheduleUpdate(); | ||
| return t != null && await t, !this.isUpdatePending; | ||
| let e = this.scheduleUpdate(); | ||
| return e != null && await e, !this.isUpdatePending; | ||
| } | ||
@@ -221,23 +221,23 @@ scheduleUpdate() { | ||
| if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { | ||
| for (let [r, o] of this._$Ep) this[r] = o; | ||
| for (let [i, r] of this._$Ep) this[i] = r; | ||
| this._$Ep = void 0; | ||
| } | ||
| let i = this.constructor.elementProperties; | ||
| if (i.size > 0) for (let [r, o] of i) { | ||
| let { wrapped: n } = o, h = this[r]; | ||
| n !== !0 || this._$AL.has(r) || h === void 0 || this.C(r, void 0, o, h); | ||
| let s = this.constructor.elementProperties; | ||
| if (s.size > 0) for (let [i, r] of s) { | ||
| let { wrapped: o } = r, n = this[i]; | ||
| o !== !0 || this._$AL.has(i) || n === void 0 || this.C(i, void 0, r, n); | ||
| } | ||
| } | ||
| let t = !1, e = this._$AL; | ||
| let e = !1, t = this._$AL; | ||
| try { | ||
| t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM(); | ||
| } catch (i) { | ||
| throw t = !1, this._$EM(), i; | ||
| e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(t)) : this._$EM(); | ||
| } catch (s) { | ||
| throw e = !1, this._$EM(), s; | ||
| } | ||
| t && this._$AE(e); | ||
| e && this._$AE(t); | ||
| } | ||
| willUpdate(t) { | ||
| willUpdate(e) { | ||
| } | ||
| _$AE(t) { | ||
| this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); | ||
| _$AE(e) { | ||
| this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e); | ||
| } | ||
@@ -253,44 +253,44 @@ _$EM() { | ||
| } | ||
| shouldUpdate(t) { | ||
| shouldUpdate(e) { | ||
| return !0; | ||
| } | ||
| update(t) { | ||
| this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM(); | ||
| update(e) { | ||
| this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM(); | ||
| } | ||
| updated(t) { | ||
| updated(e) { | ||
| } | ||
| firstUpdated(t) { | ||
| firstUpdated(e) { | ||
| } | ||
| }; | ||
| g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[S("elementProperties")] = /* @__PURE__ */ new Map(), g[S("finalized")] = /* @__PURE__ */ new Map(), xt?.({ ReactiveElement: g }), (H.reactiveElementVersions ??= []).push("2.1.2"); | ||
| var V = globalThis, tt = (s) => s, T = V.trustedTypes, et = T ? T.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, $t = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, ft = "?" + f, Tt = `<${ft}>`, m = document, C = () => m.createComment(""), U = (s) => s === null || typeof s != "object" && typeof s != "function", W = Array.isArray, Nt = (s) => W(s) || typeof s?.[Symbol.iterator] == "function", z = `[ | ||
| \f\r]`, E = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, it = />/g, _ = RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ | ||
| \f\r"'\`<>=]|("|')|))|$)`, "g"), rt = /'/g, ot = /"/g, _t = /^(?:script|style|textarea|title)$/i, v = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), nt = /* @__PURE__ */ new WeakMap(), y = m.createTreeWalker(m, 129); | ||
| function yt(s, t) { | ||
| if (!W(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array"); | ||
| var V = globalThis, tt = (e) => e, T = V.trustedTypes, et = T ? T.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, $t = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, ft = "?" + f, Tt = `<${ft}>`, m = document, P = () => m.createComment(""), U = (e) => e === null || typeof e != "object" && typeof e != "function", W = Array.isArray, Nt = (e) => W(e) || typeof e?.[Symbol.iterator] == "function", j = `[ | ||
| \f\r]`, b = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, it = />/g, _ = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ | ||
| \f\r"'\`<>=]|("|')|))|$)`, "g"), rt = /'/g, ot = /"/g, _t = /^(?:script|style|textarea|title)$/i, A = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), nt = /* @__PURE__ */ new WeakMap(), y = m.createTreeWalker(m, 129); | ||
| function yt(e, t) { | ||
| if (!W(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array"); | ||
| return et === void 0 ? t : et.createHTML(t); | ||
| } | ||
| var Ht = (s, t) => { | ||
| let e = s.length - 1, i = [], r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = E; | ||
| for (let h = 0; h < e; h++) { | ||
| let a = s[h], O, p, l = -1, u = 0; | ||
| for (; u < a.length && (n.lastIndex = u, p = n.exec(a), p !== null); ) u = n.lastIndex, n === E ? p[1] === "!--" ? n = st : p[1] === void 0 ? p[2] === void 0 ? p[3] !== void 0 && (n = _) : (_t.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = _) : n = it : n === _ ? p[0] === ">" ? (n = r ?? E, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, O = p[1], n = p[3] === void 0 ? _ : p[3] === '"' ? ot : rt) : n === ot || n === rt ? n = _ : n === st || n === it ? n = E : (n = _, r = void 0); | ||
| let $ = n === _ && s[h + 1].startsWith("/>") ? " " : ""; | ||
| o += n === E ? a + Tt : l >= 0 ? (i.push(O), a.slice(0, l) + $t + a.slice(l) + f + $) : a + f + (l === -2 ? h : $); | ||
| var Ht = (e, t) => { | ||
| let s = e.length - 1, i = [], r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = b; | ||
| for (let a = 0; a < s; a++) { | ||
| let h = e[a], O, p, l = -1, u = 0; | ||
| for (; u < h.length && (n.lastIndex = u, p = n.exec(h), p !== null); ) u = n.lastIndex, n === b ? p[1] === "!--" ? n = st : p[1] === void 0 ? p[2] === void 0 ? p[3] !== void 0 && (n = _) : (_t.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = _) : n = it : n === _ ? p[0] === ">" ? (n = r ?? b, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, O = p[1], n = p[3] === void 0 ? _ : p[3] === '"' ? ot : rt) : n === ot || n === rt ? n = _ : n === st || n === it ? n = b : (n = _, r = void 0); | ||
| let $ = n === _ && e[a + 1].startsWith("/>") ? " " : ""; | ||
| o += n === b ? h + Tt : l >= 0 ? (i.push(O), h.slice(0, l) + $t + h.slice(l) + f + $) : h + f + (l === -2 ? a : $); | ||
| } | ||
| return [yt(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i]; | ||
| return [yt(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i]; | ||
| }, I = class mt { | ||
| constructor({ strings: t, _$litType$: e }, i) { | ||
| constructor({ strings: t, _$litType$: s }, i) { | ||
| let r; | ||
| this.parts = []; | ||
| let o = 0, n = 0, h = t.length - 1, a = this.parts, [O, p] = Ht(t, e); | ||
| if (this.el = mt.createElement(O, i), y.currentNode = this.el.content, e === 2 || e === 3) { | ||
| let o = 0, n = 0, a = t.length - 1, h = this.parts, [O, p] = Ht(t, s); | ||
| if (this.el = mt.createElement(O, i), y.currentNode = this.el.content, s === 2 || s === 3) { | ||
| let l = this.el.content.firstChild; | ||
| l.replaceWith(...l.childNodes); | ||
| } | ||
| for (; (r = y.nextNode()) !== null && a.length < h; ) { | ||
| for (; (r = y.nextNode()) !== null && h.length < a; ) { | ||
| if (r.nodeType === 1) { | ||
| if (r.hasAttributes()) for (let l of r.getAttributeNames()) if (l.endsWith($t)) { | ||
| let u = p[n++], $ = r.getAttribute(l).split(f), M = /([.?@])?(.*)/.exec(u); | ||
| a.push({ | ||
| h.push({ | ||
| type: 1, | ||
@@ -300,5 +300,5 @@ index: o, | ||
| strings: $, | ||
| ctor: M[1] === "." ? jt : M[1] === "?" ? zt : M[1] === "@" ? kt : D | ||
| ctor: M[1] === "." ? Dt : M[1] === "?" ? jt : M[1] === "@" ? zt : k | ||
| }), r.removeAttribute(l); | ||
| } else l.startsWith(f) && (a.push({ | ||
| } else l.startsWith(f) && (h.push({ | ||
| type: 6, | ||
@@ -311,10 +311,10 @@ index: o | ||
| r.textContent = T ? T.emptyScript : ""; | ||
| for (let $ = 0; $ < u; $++) r.append(l[$], C()), y.nextNode(), a.push({ | ||
| for (let $ = 0; $ < u; $++) r.append(l[$], P()), y.nextNode(), h.push({ | ||
| type: 2, | ||
| index: ++o | ||
| }); | ||
| r.append(l[u], C()); | ||
| r.append(l[u], P()); | ||
| } | ||
| } | ||
| } else if (r.nodeType === 8) if (r.data === ft) a.push({ | ||
| } else if (r.nodeType === 8) if (r.data === ft) h.push({ | ||
| type: 2, | ||
@@ -325,3 +325,3 @@ index: o | ||
| let l = -1; | ||
| for (; (l = r.data.indexOf(f, l + 1)) !== -1; ) a.push({ | ||
| for (; (l = r.data.indexOf(f, l + 1)) !== -1; ) h.push({ | ||
| type: 7, | ||
@@ -334,3 +334,3 @@ index: o | ||
| } | ||
| static createElement(t, e) { | ||
| static createElement(t, s) { | ||
| let i = m.createElement("template"); | ||
@@ -340,10 +340,10 @@ return i.innerHTML = t, i; | ||
| }; | ||
| function A(s, t, e = s, i) { | ||
| if (t === v) return t; | ||
| let r = i === void 0 ? e._$Cl : e._$Co?.[i], o = U(t) ? void 0 : t._$litDirective$; | ||
| return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(s), r._$AT(s, e, i)), i === void 0 ? e._$Cl = r : (e._$Co ??= [])[i] = r), r !== void 0 && (t = A(s, r._$AS(s, t.values), r, i)), t; | ||
| function v(e, t, s = e, i) { | ||
| if (t === A) return t; | ||
| let r = i === void 0 ? s._$Cl : s._$Co?.[i], o = U(t) ? void 0 : t._$litDirective$; | ||
| return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(e), r._$AT(e, s, i)), i === void 0 ? s._$Cl = r : (s._$Co ??= [])[i] = r), r !== void 0 && (t = v(e, r._$AS(e, t.values), r, i)), t; | ||
| } | ||
| var Dt = class { | ||
| constructor(s, t) { | ||
| this._$AV = [], this._$AN = void 0, this._$AD = s, this._$AM = t; | ||
| var kt = class { | ||
| constructor(e, t) { | ||
| this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t; | ||
| } | ||
@@ -356,18 +356,18 @@ get parentNode() { | ||
| } | ||
| u(s) { | ||
| let { el: { content: t }, parts: e } = this._$AD, i = (s?.creationScope ?? m).importNode(t, !0); | ||
| u(e) { | ||
| let { el: { content: t }, parts: s } = this._$AD, i = (e?.creationScope ?? m).importNode(t, !0); | ||
| y.currentNode = i; | ||
| let r = y.nextNode(), o = 0, n = 0, h = e[0]; | ||
| for (; h !== void 0; ) { | ||
| if (o === h.index) { | ||
| let a; | ||
| h.type === 2 ? a = new J(r, r.nextSibling, this, s) : h.type === 1 ? a = new h.ctor(r, h.name, h.strings, this, s) : h.type === 6 && (a = new Lt(r, this, s)), this._$AV.push(a), h = e[++n]; | ||
| let r = y.nextNode(), o = 0, n = 0, a = s[0]; | ||
| for (; a !== void 0; ) { | ||
| if (o === a.index) { | ||
| let h; | ||
| a.type === 2 ? h = new J(r, r.nextSibling, this, e) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, e) : a.type === 6 && (h = new Lt(r, this, e)), this._$AV.push(h), a = s[++n]; | ||
| } | ||
| o !== h?.index && (r = y.nextNode(), o++); | ||
| o !== a?.index && (r = y.nextNode(), o++); | ||
| } | ||
| return y.currentNode = m, i; | ||
| } | ||
| p(s) { | ||
| p(e) { | ||
| let t = 0; | ||
| for (let e of this._$AV) e !== void 0 && (e.strings === void 0 ? e._$AI(s[t]) : (e._$AI(s, e, t), t += e.strings.length - 2)), t++; | ||
| for (let s of this._$AV) s !== void 0 && (s.strings === void 0 ? s._$AI(e[t]) : (s._$AI(e, s, t), t += s.strings.length - 2)), t++; | ||
| } | ||
@@ -378,8 +378,8 @@ }, J = class gt { | ||
| } | ||
| constructor(t, e, i, r) { | ||
| this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0; | ||
| constructor(t, s, i, r) { | ||
| this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0; | ||
| } | ||
| get parentNode() { | ||
| let t = this._$AA.parentNode, e = this._$AM; | ||
| return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t; | ||
| let t = this._$AA.parentNode, s = this._$AM; | ||
| return s !== void 0 && t?.nodeType === 11 && (t = s.parentNode), t; | ||
| } | ||
@@ -392,4 +392,4 @@ get startNode() { | ||
| } | ||
| _$AI(t, e = this) { | ||
| t = A(this, t, e), U(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== v && this._(t) : t._$litType$ === void 0 ? t.nodeType === void 0 ? Nt(t) ? this.k(t) : this._(t) : this.T(t) : this.$(t); | ||
| _$AI(t, s = this) { | ||
| t = v(this, t, s), U(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== A && this._(t) : t._$litType$ === void 0 ? t.nodeType === void 0 ? Nt(t) ? this.k(t) : this._(t) : this.T(t) : this.$(t); | ||
| } | ||
@@ -406,21 +406,21 @@ O(t) { | ||
| $(t) { | ||
| let { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = I.createElement(yt(i.h, i.h[0]), this.options)), i); | ||
| if (this._$AH?._$AD === r) this._$AH.p(e); | ||
| let { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = I.createElement(yt(i.h, i.h[0]), this.options)), i); | ||
| if (this._$AH?._$AD === r) this._$AH.p(s); | ||
| else { | ||
| let o = new Dt(r, this), n = o.u(this.options); | ||
| o.p(e), this.T(n), this._$AH = o; | ||
| let o = new kt(r, this), n = o.u(this.options); | ||
| o.p(s), this.T(n), this._$AH = o; | ||
| } | ||
| } | ||
| _$AC(t) { | ||
| let e = nt.get(t.strings); | ||
| return e === void 0 && nt.set(t.strings, e = new I(t)), e; | ||
| let s = nt.get(t.strings); | ||
| return s === void 0 && nt.set(t.strings, s = new I(t)), s; | ||
| } | ||
| k(t) { | ||
| W(this._$AH) || (this._$AH = [], this._$AR()); | ||
| let e = this._$AH, i, r = 0; | ||
| for (let o of t) r === e.length ? e.push(i = new gt(this.O(C()), this.O(C()), this, this.options)) : i = e[r], i._$AI(o), r++; | ||
| r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r); | ||
| let s = this._$AH, i, r = 0; | ||
| for (let o of t) r === s.length ? s.push(i = new gt(this.O(P()), this.O(P()), this, this.options)) : i = s[r], i._$AI(o), r++; | ||
| r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r); | ||
| } | ||
| _$AR(t = this._$AA.nextSibling, e) { | ||
| for (this._$AP?.(!1, !0, e); t !== this._$AB; ) { | ||
| _$AR(t = this._$AA.nextSibling, s) { | ||
| for (this._$AP?.(!1, !0, s); t !== this._$AB; ) { | ||
| let i = tt(t).nextSibling; | ||
@@ -433,3 +433,3 @@ tt(t).remove(), t = i; | ||
| } | ||
| }, D = class { | ||
| }, k = class { | ||
| get tagName() { | ||
@@ -441,46 +441,46 @@ return this.element.tagName; | ||
| } | ||
| constructor(s, t, e, i, r) { | ||
| this.type = 1, this._$AH = c, this._$AN = void 0, this.element = s, this.name = t, this._$AM = i, this.options = r, e.length > 2 || e[0] !== "" || e[1] !== "" ? (this._$AH = Array(e.length - 1).fill(/* @__PURE__ */ new String()), this.strings = e) : this._$AH = c; | ||
| constructor(e, t, s, i, r) { | ||
| this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = c; | ||
| } | ||
| _$AI(s, t = this, e, i) { | ||
| _$AI(e, t = this, s, i) { | ||
| let r = this.strings, o = !1; | ||
| if (r === void 0) s = A(this, s, t, 0), o = !U(s) || s !== this._$AH && s !== v, o && (this._$AH = s); | ||
| if (r === void 0) e = v(this, e, t, 0), o = !U(e) || e !== this._$AH && e !== A, o && (this._$AH = e); | ||
| else { | ||
| let n = s, h, a; | ||
| for (s = r[0], h = 0; h < r.length - 1; h++) a = A(this, n[e + h], t, h), a === v && (a = this._$AH[h]), o ||= !U(a) || a !== this._$AH[h], a === c ? s = c : s !== c && (s += (a ?? "") + r[h + 1]), this._$AH[h] = a; | ||
| let n = e, a, h; | ||
| for (e = r[0], a = 0; a < r.length - 1; a++) h = v(this, n[s + a], t, a), h === A && (h = this._$AH[a]), o ||= !U(h) || h !== this._$AH[a], h === c ? e = c : e !== c && (e += (h ?? "") + r[a + 1]), this._$AH[a] = h; | ||
| } | ||
| o && !i && this.j(s); | ||
| o && !i && this.j(e); | ||
| } | ||
| j(s) { | ||
| s === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, s ?? ""); | ||
| j(e) { | ||
| e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); | ||
| } | ||
| }, jt = class extends D { | ||
| }, Dt = class extends k { | ||
| constructor() { | ||
| super(...arguments), this.type = 3; | ||
| } | ||
| j(s) { | ||
| this.element[this.name] = s === c ? void 0 : s; | ||
| j(e) { | ||
| this.element[this.name] = e === c ? void 0 : e; | ||
| } | ||
| }, zt = class extends D { | ||
| }, jt = class extends k { | ||
| constructor() { | ||
| super(...arguments), this.type = 4; | ||
| } | ||
| j(s) { | ||
| this.element.toggleAttribute(this.name, !!s && s !== c); | ||
| j(e) { | ||
| this.element.toggleAttribute(this.name, !!e && e !== c); | ||
| } | ||
| }, kt = class extends D { | ||
| constructor(s, t, e, i, r) { | ||
| super(s, t, e, i, r), this.type = 5; | ||
| }, zt = class extends k { | ||
| constructor(e, t, s, i, r) { | ||
| super(e, t, s, i, r), this.type = 5; | ||
| } | ||
| _$AI(s, t = this) { | ||
| if ((s = A(this, s, t, 0) ?? c) === v) return; | ||
| let e = this._$AH, i = s === c && e !== c || s.capture !== e.capture || s.once !== e.once || s.passive !== e.passive, r = s !== c && (e === c || i); | ||
| i && this.element.removeEventListener(this.name, this, e), r && this.element.addEventListener(this.name, this, s), this._$AH = s; | ||
| _$AI(e, t = this) { | ||
| if ((e = v(this, e, t, 0) ?? c) === A) return; | ||
| let s = this._$AH, i = e === c && s !== c || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, r = e !== c && (s === c || i); | ||
| i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, e), this._$AH = e; | ||
| } | ||
| handleEvent(s) { | ||
| typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, s) : this._$AH.handleEvent(s); | ||
| handleEvent(e) { | ||
| typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e); | ||
| } | ||
| }, Lt = class { | ||
| constructor(s, t, e) { | ||
| this.element = s, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = e; | ||
| constructor(e, t, s) { | ||
| this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s; | ||
| } | ||
@@ -490,14 +490,14 @@ get _$AU() { | ||
| } | ||
| _$AI(s) { | ||
| A(this, s); | ||
| _$AI(e) { | ||
| v(this, e); | ||
| } | ||
| }, It = V.litHtmlPolyfillSupport; | ||
| It?.(I, J), (V.litHtmlVersions ??= []).push("3.3.2"); | ||
| var qt = (s, t, e) => { | ||
| let i = e?.renderBefore ?? t, r = i._$litPart$; | ||
| var qt = (e, t, s) => { | ||
| let i = s?.renderBefore ?? t, r = i._$litPart$; | ||
| if (r === void 0) { | ||
| let o = e?.renderBefore ?? null; | ||
| i._$litPart$ = r = new J(t.insertBefore(C(), o), o, void 0, e ?? {}); | ||
| let o = s?.renderBefore ?? null; | ||
| i._$litPart$ = r = new J(t.insertBefore(P(), o), o, void 0, s ?? {}); | ||
| } | ||
| return r._$AI(s), r; | ||
| return r._$AI(e), r; | ||
| }, K = globalThis, w = class extends g { | ||
@@ -508,8 +508,8 @@ constructor() { | ||
| createRenderRoot() { | ||
| let s = super.createRenderRoot(); | ||
| return this.renderOptions.renderBefore ??= s.firstChild, s; | ||
| let e = super.createRenderRoot(); | ||
| return this.renderOptions.renderBefore ??= e.firstChild, e; | ||
| } | ||
| update(s) { | ||
| update(e) { | ||
| let t = this.render(); | ||
| this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do = qt(t, this.renderRoot, this.renderOptions); | ||
| this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = qt(t, this.renderRoot, this.renderOptions); | ||
| } | ||
@@ -523,3 +523,3 @@ connectedCallback() { | ||
| render() { | ||
| return v; | ||
| return A; | ||
| } | ||
@@ -531,26 +531,26 @@ }; | ||
| var d = []; | ||
| for (let s = 0; s < 256; ++s) d.push((s + 256).toString(16).slice(1)); | ||
| function Vt(s, t = 0) { | ||
| return (d[s[t + 0]] + d[s[t + 1]] + d[s[t + 2]] + d[s[t + 3]] + "-" + d[s[t + 4]] + d[s[t + 5]] + "-" + d[s[t + 6]] + d[s[t + 7]] + "-" + d[s[t + 8]] + d[s[t + 9]] + "-" + d[s[t + 10]] + d[s[t + 11]] + d[s[t + 12]] + d[s[t + 13]] + d[s[t + 14]] + d[s[t + 15]]).toLowerCase(); | ||
| for (let e = 0; e < 256; ++e) d.push((e + 256).toString(16).slice(1)); | ||
| function Vt(e, t = 0) { | ||
| return (d[e[t + 0]] + d[e[t + 1]] + d[e[t + 2]] + d[e[t + 3]] + "-" + d[e[t + 4]] + d[e[t + 5]] + "-" + d[e[t + 6]] + d[e[t + 7]] + "-" + d[e[t + 8]] + d[e[t + 9]] + "-" + d[e[t + 10]] + d[e[t + 11]] + d[e[t + 12]] + d[e[t + 13]] + d[e[t + 14]] + d[e[t + 15]]).toLowerCase(); | ||
| } | ||
| var k, Wt = new Uint8Array(16); | ||
| var z, Wt = new Uint8Array(16); | ||
| function Jt() { | ||
| if (!k) { | ||
| if (!z) { | ||
| if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); | ||
| k = crypto.getRandomValues.bind(crypto); | ||
| z = crypto.getRandomValues.bind(crypto); | ||
| } | ||
| return k(Wt); | ||
| return z(Wt); | ||
| } | ||
| var ht = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) }; | ||
| function Kt(s, t, e) { | ||
| s ||= {}; | ||
| let i = s.random ?? s.rng?.() ?? Jt(); | ||
| var at = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) }; | ||
| function Kt(e, t, s) { | ||
| e ||= {}; | ||
| let i = e.random ?? e.rng?.() ?? Jt(); | ||
| if (i.length < 16) throw Error("Random bytes length must be >= 16"); | ||
| return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Vt(i); | ||
| } | ||
| function Zt(s, t, e) { | ||
| return ht.randomUUID && !t && !s ? ht.randomUUID() : Kt(s, t); | ||
| function Ft(e, t, s) { | ||
| return at.randomUUID && !t && !e ? at.randomUUID() : Kt(e, t); | ||
| } | ||
| function Ft(s = "hp") { | ||
| return `${s}-${Zt()}`; | ||
| function Zt(e = "hp") { | ||
| return `${e}-${Ft()}`; | ||
| } | ||
@@ -561,4 +561,4 @@ var Gt = class extends w { | ||
| } | ||
| emit(s, t) { | ||
| let e = new CustomEvent(`hp-${s}`, { | ||
| emit(e, t) { | ||
| let s = new CustomEvent(`hp-${e}`, { | ||
| detail: t, | ||
@@ -569,12 +569,22 @@ bubbles: !0, | ||
| }); | ||
| return this.dispatchEvent(e), e; | ||
| return this.dispatchEvent(s), s; | ||
| } | ||
| _hpId = Ft(); | ||
| _hpId = Zt(); | ||
| get hpId() { | ||
| return this._hpId; | ||
| } | ||
| _abortController = null; | ||
| get signal() { | ||
| return (!this._abortController || this._abortController.signal.aborted) && (this._abortController = new AbortController()), this._abortController.signal; | ||
| } | ||
| connectedCallback() { | ||
| super.connectedCallback(), (!this._abortController || this._abortController.signal.aborted) && (this._abortController = new AbortController()); | ||
| } | ||
| disconnectedCallback() { | ||
| super.disconnectedCallback(), this._abortController?.abort(), this._abortController = null; | ||
| } | ||
| }; | ||
| function Qt(s) { | ||
| function Qt(e) { | ||
| return function(t) { | ||
| typeof window < "u" && (customElements.get(s) || customElements.define(s, t)); | ||
| typeof window < "u" && (customElements.get(e) || customElements.define(e, t)); | ||
| }; | ||
@@ -587,14 +597,14 @@ } | ||
| */ | ||
| const x = globalThis, Z = x.ShadowRoot && (x.ShadyCSS === void 0 || x.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, vt = Symbol(), at = /* @__PURE__ */ new WeakMap(); | ||
| const x = globalThis, F = x.ShadowRoot && (x.ShadyCSS === void 0 || x.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, At = Symbol(), ht = /* @__PURE__ */ new WeakMap(); | ||
| let Xt = class { | ||
| constructor(t, e, i) { | ||
| if (this._$cssResult$ = !0, i !== vt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
| this.cssText = t, this.t = e; | ||
| constructor(t, s, i) { | ||
| if (this._$cssResult$ = !0, i !== At) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
| this.cssText = t, this.t = s; | ||
| } | ||
| get styleSheet() { | ||
| let t = this.o; | ||
| const e = this.t; | ||
| if (Z && t === void 0) { | ||
| const i = e !== void 0 && e.length === 1; | ||
| i && (t = at.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && at.set(e, t)); | ||
| const s = this.t; | ||
| if (F && t === void 0) { | ||
| const i = s !== void 0 && s.length === 1; | ||
| i && (t = ht.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ht.set(s, t)); | ||
| } | ||
@@ -607,13 +617,13 @@ return t; | ||
| }; | ||
| const Yt = (s) => new Xt(typeof s == "string" ? s : s + "", void 0, vt), te = (s, t) => { | ||
| if (Z) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
| else for (const e of t) { | ||
| const Yt = (e) => new Xt(typeof e == "string" ? e : e + "", void 0, At), te = (e, t) => { | ||
| if (F) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); | ||
| else for (const s of t) { | ||
| const i = document.createElement("style"), r = x.litNonce; | ||
| r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i); | ||
| r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i); | ||
| } | ||
| }, lt = Z ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => { | ||
| let e = ""; | ||
| for (const i of t.cssRules) e += i.cssText; | ||
| return Yt(e); | ||
| })(s) : s; | ||
| }, lt = F ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => { | ||
| let s = ""; | ||
| for (const i of t.cssRules) s += i.cssText; | ||
| return Yt(s); | ||
| })(e) : e; | ||
| /** | ||
@@ -624,20 +634,20 @@ * @license | ||
| */ | ||
| const { is: ee, defineProperty: se, getOwnPropertyDescriptor: ie, getOwnPropertyNames: re, getOwnPropertySymbols: oe, getPrototypeOf: ne } = Object, j = globalThis, ct = j.trustedTypes, he = ct ? ct.emptyScript : "", ae = j.reactiveElementPolyfillSupport, P = (s, t) => s, N = { toAttribute(s, t) { | ||
| const { is: ee, defineProperty: se, getOwnPropertyDescriptor: ie, getOwnPropertyNames: re, getOwnPropertySymbols: oe, getPrototypeOf: ne } = Object, D = globalThis, ct = D.trustedTypes, ae = ct ? ct.emptyScript : "", he = D.reactiveElementPolyfillSupport, C = (e, t) => e, N = { toAttribute(e, t) { | ||
| switch (t) { | ||
| case Boolean: | ||
| s = s ? he : null; | ||
| e = e ? ae : null; | ||
| break; | ||
| case Object: | ||
| case Array: | ||
| s = s == null ? s : JSON.stringify(s); | ||
| e = e == null ? e : JSON.stringify(e); | ||
| } | ||
| return s; | ||
| }, fromAttribute(s, t) { | ||
| let e = s; | ||
| return e; | ||
| }, fromAttribute(e, t) { | ||
| let s = e; | ||
| switch (t) { | ||
| case Boolean: | ||
| e = s !== null; | ||
| s = e !== null; | ||
| break; | ||
| case Number: | ||
| e = s === null ? null : Number(s); | ||
| s = e === null ? null : Number(e); | ||
| break; | ||
@@ -647,11 +657,11 @@ case Object: | ||
| try { | ||
| e = JSON.parse(s); | ||
| s = JSON.parse(e); | ||
| } catch { | ||
| e = null; | ||
| s = null; | ||
| } | ||
| } | ||
| return e; | ||
| } }, F = (s, t) => !ee(s, t), dt = { attribute: !0, type: String, converter: N, reflect: !1, useDefault: !1, hasChanged: F }; | ||
| Symbol.metadata ??= Symbol("metadata"), j.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); | ||
| class b extends HTMLElement { | ||
| return s; | ||
| } }, Z = (e, t) => !ee(e, t), dt = { attribute: !0, type: String, converter: N, reflect: !1, useDefault: !1, hasChanged: Z }; | ||
| Symbol.metadata ??= Symbol("metadata"), D.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); | ||
| class E extends HTMLElement { | ||
| static addInitializer(t) { | ||
@@ -663,17 +673,17 @@ this._$Ei(), (this.l ??= []).push(t); | ||
| } | ||
| static createProperty(t, e = dt) { | ||
| 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) { | ||
| const i = Symbol(), r = this.getPropertyDescriptor(t, i, e); | ||
| static createProperty(t, s = dt) { | ||
| if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) { | ||
| const i = Symbol(), r = this.getPropertyDescriptor(t, i, s); | ||
| r !== void 0 && se(this.prototype, t, r); | ||
| } | ||
| } | ||
| static getPropertyDescriptor(t, e, i) { | ||
| static getPropertyDescriptor(t, s, i) { | ||
| const { get: r, set: o } = ie(this.prototype, t) ?? { get() { | ||
| return this[e]; | ||
| return this[s]; | ||
| }, set(n) { | ||
| this[e] = n; | ||
| this[s] = n; | ||
| } }; | ||
| return { get: r, set(n) { | ||
| const h = r?.call(this); | ||
| o?.call(this, n), this.requestUpdate(t, h, i); | ||
| const a = r?.call(this); | ||
| o?.call(this, n), this.requestUpdate(t, a, i); | ||
| }, configurable: !0, enumerable: !0 }; | ||
@@ -685,3 +695,3 @@ } | ||
| static _$Ei() { | ||
| if (this.hasOwnProperty(P("elementProperties"))) return; | ||
| if (this.hasOwnProperty(C("elementProperties"))) return; | ||
| const t = ne(this); | ||
@@ -691,16 +701,16 @@ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); | ||
| static finalize() { | ||
| if (this.hasOwnProperty(P("finalized"))) return; | ||
| if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) { | ||
| const e = this.properties, i = [...re(e), ...oe(e)]; | ||
| for (const r of i) this.createProperty(r, e[r]); | ||
| if (this.hasOwnProperty(C("finalized"))) return; | ||
| if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(C("properties"))) { | ||
| const s = this.properties, i = [...re(s), ...oe(s)]; | ||
| for (const r of i) this.createProperty(r, s[r]); | ||
| } | ||
| const t = this[Symbol.metadata]; | ||
| if (t !== null) { | ||
| const e = litPropertyMetadata.get(t); | ||
| if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r); | ||
| const s = litPropertyMetadata.get(t); | ||
| if (s !== void 0) for (const [i, r] of s) this.elementProperties.set(i, r); | ||
| } | ||
| this._$Eh = /* @__PURE__ */ new Map(); | ||
| for (const [e, i] of this.elementProperties) { | ||
| const r = this._$Eu(e, i); | ||
| r !== void 0 && this._$Eh.set(r, e); | ||
| for (const [s, i] of this.elementProperties) { | ||
| const r = this._$Eu(s, i); | ||
| r !== void 0 && this._$Eh.set(r, s); | ||
| } | ||
@@ -710,11 +720,11 @@ this.elementStyles = this.finalizeStyles(this.styles); | ||
| static finalizeStyles(t) { | ||
| const e = []; | ||
| const s = []; | ||
| if (Array.isArray(t)) { | ||
| const i = new Set(t.flat(1 / 0).reverse()); | ||
| for (const r of i) e.unshift(lt(r)); | ||
| } else t !== void 0 && e.push(lt(t)); | ||
| return e; | ||
| for (const r of i) s.unshift(lt(r)); | ||
| } else t !== void 0 && s.push(lt(t)); | ||
| return s; | ||
| } | ||
| static _$Eu(t, e) { | ||
| const i = e.attribute; | ||
| static _$Eu(t, s) { | ||
| const i = s.attribute; | ||
| return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0; | ||
@@ -735,4 +745,4 @@ } | ||
| _$E_() { | ||
| const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties; | ||
| for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]); | ||
| const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties; | ||
| for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]); | ||
| t.size > 0 && (this._$Ep = t); | ||
@@ -752,13 +762,13 @@ } | ||
| } | ||
| attributeChangedCallback(t, e, i) { | ||
| attributeChangedCallback(t, s, i) { | ||
| this._$AK(t, i); | ||
| } | ||
| _$ET(t, e) { | ||
| _$ET(t, s) { | ||
| const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i); | ||
| if (r !== void 0 && i.reflect === !0) { | ||
| const o = (i.converter?.toAttribute !== void 0 ? i.converter : N).toAttribute(e, i.type); | ||
| const o = (i.converter?.toAttribute !== void 0 ? i.converter : N).toAttribute(s, i.type); | ||
| this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null; | ||
| } | ||
| } | ||
| _$AK(t, e) { | ||
| _$AK(t, s) { | ||
| const i = this.constructor, r = i._$Eh.get(t); | ||
@@ -768,16 +778,16 @@ if (r !== void 0 && this._$Em !== r) { | ||
| this._$Em = r; | ||
| const h = n.fromAttribute(e, o.type); | ||
| this[r] = h ?? this._$Ej?.get(r) ?? h, this._$Em = null; | ||
| const a = n.fromAttribute(s, o.type); | ||
| this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null; | ||
| } | ||
| } | ||
| requestUpdate(t, e, i, r = !1, o) { | ||
| requestUpdate(t, s, i, r = !1, o) { | ||
| if (t !== void 0) { | ||
| const n = this.constructor; | ||
| if (r === !1 && (o = this[t]), i ??= n.getPropertyOptions(t), !((i.hasChanged ?? F)(o, e) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, i)))) return; | ||
| this.C(t, e, i); | ||
| if (r === !1 && (o = this[t]), i ??= n.getPropertyOptions(t), !((i.hasChanged ?? Z)(o, s) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, i)))) return; | ||
| this.C(t, s, i); | ||
| } | ||
| this.isUpdatePending === !1 && (this._$ES = this._$EP()); | ||
| } | ||
| C(t, e, { useDefault: i, reflect: r, wrapped: o }, n) { | ||
| i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t)); | ||
| C(t, s, { useDefault: i, reflect: r, wrapped: o }, n) { | ||
| i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? s ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t)); | ||
| } | ||
@@ -788,4 +798,4 @@ async _$EP() { | ||
| await this._$ES; | ||
| } catch (e) { | ||
| Promise.reject(e); | ||
| } catch (s) { | ||
| Promise.reject(s); | ||
| } | ||
@@ -807,14 +817,14 @@ const t = this.scheduleUpdate(); | ||
| if (i.size > 0) for (const [r, o] of i) { | ||
| const { wrapped: n } = o, h = this[r]; | ||
| n !== !0 || this._$AL.has(r) || h === void 0 || this.C(r, void 0, o, h); | ||
| const { wrapped: n } = o, a = this[r]; | ||
| n !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, o, a); | ||
| } | ||
| } | ||
| let t = !1; | ||
| const e = this._$AL; | ||
| const s = this._$AL; | ||
| try { | ||
| t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM(); | ||
| t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(s)) : this._$EM(); | ||
| } catch (i) { | ||
| throw t = !1, this._$EM(), i; | ||
| } | ||
| t && this._$AE(e); | ||
| t && this._$AE(s); | ||
| } | ||
@@ -824,3 +834,3 @@ willUpdate(t) { | ||
| _$AE(t) { | ||
| this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); | ||
| this._$EO?.forEach((s) => s.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); | ||
| } | ||
@@ -840,3 +850,3 @@ _$EM() { | ||
| update(t) { | ||
| this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM(); | ||
| this._$Eq &&= this._$Eq.forEach((s) => this._$ET(s, this[s])), this._$EM(); | ||
| } | ||
@@ -848,3 +858,3 @@ updated(t) { | ||
| } | ||
| b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[P("elementProperties")] = /* @__PURE__ */ new Map(), b[P("finalized")] = /* @__PURE__ */ new Map(), ae?.({ ReactiveElement: b }), (j.reactiveElementVersions ??= []).push("2.1.2"); | ||
| E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[C("elementProperties")] = /* @__PURE__ */ new Map(), E[C("finalized")] = /* @__PURE__ */ new Map(), he?.({ ReactiveElement: E }), (D.reactiveElementVersions ??= []).push("2.1.2"); | ||
| /** | ||
@@ -855,19 +865,19 @@ * @license | ||
| */ | ||
| const le = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: F }, ce = (s = le, t, e) => { | ||
| const { kind: i, metadata: r } = e; | ||
| const le = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: Z }, ce = (e = le, t, 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" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), i === "accessor") { | ||
| const { name: n } = e; | ||
| return { set(h) { | ||
| const a = t.get.call(this); | ||
| t.set.call(this, h), this.requestUpdate(n, a, s, !0, h); | ||
| }, init(h) { | ||
| return h !== void 0 && this.C(n, void 0, s, h), h; | ||
| if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(s.name, e), i === "accessor") { | ||
| const { name: n } = s; | ||
| return { set(a) { | ||
| const h = t.get.call(this); | ||
| t.set.call(this, a), this.requestUpdate(n, h, e, !0, a); | ||
| }, init(a) { | ||
| return a !== void 0 && this.C(n, void 0, e, a), a; | ||
| } }; | ||
| } | ||
| if (i === "setter") { | ||
| const { name: n } = e; | ||
| return function(h) { | ||
| const a = this[n]; | ||
| t.call(this, h), this.requestUpdate(n, a, s, !0, h); | ||
| const { name: n } = s; | ||
| return function(a) { | ||
| const h = this[n]; | ||
| t.call(this, a), this.requestUpdate(n, h, e, !0, a); | ||
| }; | ||
@@ -877,12 +887,12 @@ } | ||
| }; | ||
| function de(s) { | ||
| return (t, e) => typeof e == "object" ? ce(s, t, e) : ((i, r, o) => { | ||
| function de(e) { | ||
| return (t, s) => typeof s == "object" ? ce(e, t, s) : ((i, r, o) => { | ||
| const n = r.hasOwnProperty(o); | ||
| return r.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(r, o) : void 0; | ||
| })(s, t, e); | ||
| })(e, t, s); | ||
| } | ||
| var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, At = (s, t, e, i) => { | ||
| for (var r = i > 1 ? void 0 : i ? ue(t, e) : t, o = s.length - 1, n; o >= 0; o--) | ||
| (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r); | ||
| return i && r && pe(t, e, r), r; | ||
| var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, vt = (e, t, s, i) => { | ||
| for (var r = i > 1 ? void 0 : i ? ue(t, s) : t, o = e.length - 1, n; o >= 0; o--) | ||
| (n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r); | ||
| return i && r && pe(t, s, r), r; | ||
| }; | ||
@@ -893,4 +903,4 @@ let q = class extends Gt { | ||
| } | ||
| set orientation(s) { | ||
| this._orientation = s === "vertical" ? "vertical" : "horizontal", this.setAttribute("orientation", this._orientation), this.isConnected && this._sync(); | ||
| set orientation(e) { | ||
| this._orientation = e === "vertical" ? "vertical" : "horizontal", this.setAttribute("orientation", this._orientation), this.isConnected && this._sync(); | ||
| } | ||
@@ -900,11 +910,11 @@ _orientation = "horizontal"; | ||
| super.connectedCallback(), this.setAttribute("data-hp-component", "separator"), this.hasAttribute("role") || this.setAttribute("role", "separator"); | ||
| const s = this.getAttribute("orientation"); | ||
| this._orientation = s === "vertical" ? "vertical" : "horizontal", this._sync(); | ||
| const e = this.getAttribute("orientation"); | ||
| this._orientation = e === "vertical" ? "vertical" : "horizontal", this._sync(), requestAnimationFrame(() => this._sync()); | ||
| } | ||
| // Call when orientation changes from JS | ||
| setOrientation(s) { | ||
| this.orientation = s; | ||
| setOrientation(e) { | ||
| this.orientation = e; | ||
| } | ||
| attributeChangedCallback(s, t, e) { | ||
| super.attributeChangedCallback(s, t, e), s === "orientation" && t !== e && this.isConnected && (this._orientation = e === "vertical" ? "vertical" : "horizontal", this._sync()); | ||
| attributeChangedCallback(e, t, s) { | ||
| super.attributeChangedCallback(e, t, s), e === "orientation" && t !== s && this.isConnected && (this._orientation = s === "vertical" ? "vertical" : "horizontal", this._sync()); | ||
| } | ||
@@ -915,6 +925,6 @@ _sync() { | ||
| }; | ||
| At([ | ||
| vt([ | ||
| de({ type: String, reflect: !0 }) | ||
| ], q.prototype, "orientation", 1); | ||
| q = At([ | ||
| q = vt([ | ||
| Qt("hp-separator") | ||
@@ -921,0 +931,0 @@ ], q); |
@@ -1,15 +0,15 @@ | ||
| (function(u,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(u=typeof globalThis<"u"?globalThis:u||self,$(u.HeadlessPrimitivesSwitch={}))})(this,function(u){"use strict";var $=globalThis,k=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),Q=new WeakMap,Et=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(k&&t===void 0){let i=e!==void 0&&e.length===1;i&&(t=Q.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Q.set(e,t))}return t}toString(){return this.cssText}},St=s=>new Et(typeof s=="string"?s:s+"",void 0,G),bt=(s,t)=>{if(k)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let i=document.createElement("style"),r=$.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},X=k?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return St(e)})(s):s,{is:wt,defineProperty:Pt,getOwnPropertyDescriptor:Ct,getOwnPropertyNames:Ut,getOwnPropertySymbols:Ot,getPrototypeOf:Mt}=Object,R=globalThis,Y=R.trustedTypes,Rt=Y?Y.emptyScript:"",Tt=R.reactiveElementPolyfillSupport,b=(s,t)=>s,L={toAttribute(s,t){switch(t){case Boolean:s=s?Rt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},tt=(s,t)=>!wt(s,t),et={attribute:!0,type:String,converter:L,reflect:!1,useDefault:!1,hasChanged:tt};Symbol.metadata??=Symbol("metadata"),R.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=et){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){let i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&Pt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){let{get:r,set:o}=Ct(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);o?.call(this,n),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??et}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;let t=Mt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){let e=this.properties,i=[...Ut(e),...Ot(e)];for(let r of i)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(let[e,i]of this.elementProperties){let r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let r of i)e.unshift(X(r))}else t!==void 0&&e.push(X(t));return e}static _$Eu(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return bt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){let i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){let o=(i.converter?.toAttribute===void 0?L:i.converter).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){let i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let o=i.getPropertyOptions(r),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute===void 0?L:o.converter;this._$Em=r;let a=n.fromAttribute(e,o.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,i,r=!1,o){if(t!==void 0){let n=this.constructor;if(r===!1&&(o=this[t]),i??=n.getPropertyOptions(t),!((i.hasChanged??tt)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:r,wrapped:o},n){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[r,o]of i){let{wrapped:n}=o,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,o,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[b("elementProperties")]=new Map,A[b("finalized")]=new Map,Tt?.({ReactiveElement:A}),(R.reactiveElementVersions??=[]).push("2.1.2");var I=globalThis,st=s=>s,T=I.trustedTypes,it=T?T.createPolicy("lit-html",{createHTML:s=>s}):void 0,rt="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,ot="?"+_,xt=`<${ot}>`,m=document,w=()=>m.createComment(""),P=s=>s===null||typeof s!="object"&&typeof s!="function",q=Array.isArray,Ht=s=>q(s)||typeof s?.[Symbol.iterator]=="function",B=`[ | ||
| \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,at=/>/g,g=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ | ||
| \f\r"'\`<>=]|("|')|))|$)`,"g"),ht=/'/g,lt=/"/g,ct=/^(?:script|style|textarea|title)$/i,E=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),dt=new WeakMap,v=m.createTreeWalker(m,129);function pt(s,t){if(!q(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return it===void 0?t:it.createHTML(t)}var Nt=(s,t)=>{let e=s.length-1,i=[],r,o=t===2?"<svg>":t===3?"<math>":"",n=C;for(let a=0;a<e;a++){let h=s[a],j,p,l=-1,f=0;for(;f<h.length&&(n.lastIndex=f,p=n.exec(h),p!==null);)f=n.lastIndex,n===C?p[1]==="!--"?n=nt:p[1]===void 0?p[2]===void 0?p[3]!==void 0&&(n=g):(ct.test(p[2])&&(r=RegExp("</"+p[2],"g")),n=g):n=at:n===g?p[0]===">"?(n=r??C,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,j=p[1],n=p[3]===void 0?g:p[3]==='"'?lt:ht):n===lt||n===ht?n=g:n===nt||n===at?n=C:(n=g,r=void 0);let y=n===g&&s[a+1].startsWith("/>")?" ":"";o+=n===C?h+xt:l>=0?(i.push(j),h.slice(0,l)+rt+h.slice(l)+_+y):h+_+(l===-2?a:y)}return[pt(s,o+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},V=class vt{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,n=0,a=t.length-1,h=this.parts,[j,p]=Nt(t,e);if(this.el=vt.createElement(j,i),v.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=v.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(rt)){let f=p[n++],y=r.getAttribute(l).split(_),z=/([.?@])?(.*)/.exec(f);h.push({type:1,index:o,name:z[2],strings:y,ctor:z[1]==="."?jt:z[1]==="?"?zt:z[1]==="@"?kt:x}),r.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:o}),r.removeAttribute(l));if(ct.test(r.tagName)){let l=r.textContent.split(_),f=l.length-1;if(f>0){r.textContent=T?T.emptyScript:"";for(let y=0;y<f;y++)r.append(l[y],w()),v.nextNode(),h.push({type:2,index:++o});r.append(l[f],w())}}}else if(r.nodeType===8)if(r.data===ot)h.push({type:2,index:o});else{let l=-1;for(;(l=r.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,e){let i=m.createElement("template");return i.innerHTML=t,i}};function S(s,t,e=s,i){if(t===E)return t;let r=i===void 0?e._$Cl:e._$Co?.[i],o=P(t)?void 0:t._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(s),r._$AT(s,e,i)),i===void 0?e._$Cl=r:(e._$Co??=[])[i]=r),r!==void 0&&(t=S(s,r._$AS(s,t.values),r,i)),t}var Dt=class{constructor(s,t){this._$AV=[],this._$AN=void 0,this._$AD=s,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(s){let{el:{content:t},parts:e}=this._$AD,i=(s?.creationScope??m).importNode(t,!0);v.currentNode=i;let r=v.nextNode(),o=0,n=0,a=e[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new W(r,r.nextSibling,this,s):a.type===1?h=new a.ctor(r,a.name,a.strings,this,s):a.type===6&&(h=new Lt(r,this,s)),this._$AV.push(h),a=e[++n]}o!==a?.index&&(r=v.nextNode(),o++)}return v.currentNode=m,i}p(s){let t=0;for(let e of this._$AV)e!==void 0&&(e.strings===void 0?e._$AI(s[t]):(e._$AI(s,e,t),t+=e.strings.length-2)),t++}},W=class At{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,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=S(this,t,e),P(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==E&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Ht(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=V.createElement(pt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{let o=new Dt(r,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=dt.get(t.strings);return e===void 0&&dt.set(t.strings,e=new V(t)),e}k(t){q(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,r=0;for(let o of t)r===e.length?e.push(i=new At(this.O(w()),this.O(w()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let i=st(t).nextSibling;st(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},x=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(s,t,e,i,r){this.type=1,this._$AH=c,this._$AN=void 0,this.element=s,this.name=t,this._$AM=i,this.options=r,e.length>2||e[0]!==""||e[1]!==""?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=c}_$AI(s,t=this,e,i){let r=this.strings,o=!1;if(r===void 0)s=S(this,s,t,0),o=!P(s)||s!==this._$AH&&s!==E,o&&(this._$AH=s);else{let n=s,a,h;for(s=r[0],a=0;a<r.length-1;a++)h=S(this,n[e+a],t,a),h===E&&(h=this._$AH[a]),o||=!P(h)||h!==this._$AH[a],h===c?s=c:s!==c&&(s+=(h??"")+r[a+1]),this._$AH[a]=h}o&&!i&&this.j(s)}j(s){s===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}},jt=class extends x{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===c?void 0:s}},zt=class extends x{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==c)}},kt=class extends x{constructor(s,t,e,i,r){super(s,t,e,i,r),this.type=5}_$AI(s,t=this){if((s=S(this,s,t,0)??c)===E)return;let e=this._$AH,i=s===c&&e!==c||s.capture!==e.capture||s.once!==e.once||s.passive!==e.passive,r=s!==c&&(e===c||i);i&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,s):this._$AH.handleEvent(s)}},Lt=class{constructor(s,t,e){this.element=s,this.type=6,this._$AN=void 0,this._$AM=t,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(s){S(this,s)}},It=I.litHtmlPolyfillSupport;It?.(V,W),(I.litHtmlVersions??=[]).push("3.3.2");var qt=(s,t,e)=>{let i=e?.renderBefore??t,r=i._$litPart$;if(r===void 0){let o=e?.renderBefore??null;i._$litPart$=r=new W(t.insertBefore(w(),o),o,void 0,e??{})}return r._$AI(s),r},J=globalThis,U=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let s=super.createRenderRoot();return this.renderOptions.renderBefore??=s.firstChild,s}update(s){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=qt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}};U._$litElement$=!0,U.finalized=!0,J.litElementHydrateSupport?.({LitElement:U});var Bt=J.litElementPolyfillSupport;Bt?.({LitElement:U}),(J.litElementVersions??=[]).push("4.2.2");var d=[];for(let s=0;s<256;++s)d.push((s+256).toString(16).slice(1));function Vt(s,t=0){return(d[s[t+0]]+d[s[t+1]]+d[s[t+2]]+d[s[t+3]]+"-"+d[s[t+4]]+d[s[t+5]]+"-"+d[s[t+6]]+d[s[t+7]]+"-"+d[s[t+8]]+d[s[t+9]]+"-"+d[s[t+10]]+d[s[t+11]]+d[s[t+12]]+d[s[t+13]]+d[s[t+14]]+d[s[t+15]]).toLowerCase()}var K,Wt=new Uint8Array(16);function Jt(){if(!K){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");K=crypto.getRandomValues.bind(crypto)}return K(Wt)}var ut={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Kt(s,t,e){s||={};let i=s.random??s.rng?.()??Jt();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Vt(i)}function Zt(s,t,e){return ut.randomUUID&&!t&&!s?ut.randomUUID():Kt(s,t)}function Ft(s="hp"){return`${s}-${Zt()}`}var Gt=class extends U{createRenderRoot(){return this}emit(s,t){let e=new CustomEvent(`hp-${s}`,{detail:t,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(e),e}_hpId=Ft();get hpId(){return this._hpId}};function Qt(s){return function(t){typeof window<"u"&&(customElements.get(s)||customElements.define(s,t))}}/** | ||
| (function(u,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(u=typeof globalThis<"u"?globalThis:u||self,$(u.HeadlessPrimitivesSwitch={}))})(this,function(u){"use strict";var $=globalThis,z=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),Q=new WeakMap,bt=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o,s=this.t;if(z&&t===void 0){let i=s!==void 0&&s.length===1;i&&(t=Q.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Q.set(s,t))}return t}toString(){return this.cssText}},Et=e=>new bt(typeof e=="string"?e:e+"",void 0,G),St=(e,t)=>{if(z)e.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(let s of t){let i=document.createElement("style"),r=$.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,e.appendChild(i)}},X=z?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(let i of t.cssRules)s+=i.cssText;return Et(s)})(e):e,{is:wt,defineProperty:Ct,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Ut,getOwnPropertySymbols:Ot,getPrototypeOf:Mt}=Object,R=globalThis,Y=R.trustedTypes,Rt=Y?Y.emptyScript:"",Tt=R.reactiveElementPolyfillSupport,S=(e,t)=>e,L={toAttribute(e,t){switch(t){case Boolean:e=e?Rt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},tt=(e,t)=>!wt(e,t),et={attribute:!0,type:String,converter:L,reflect:!1,useDefault:!1,hasChanged:tt};Symbol.metadata??=Symbol("metadata"),R.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=et){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Ct(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){let{get:i,set:r}=Pt(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){let n=i?.call(this);r?.call(this,o),this.requestUpdate(e,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??et}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;let e=Mt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){let t=this.properties,s=[...Ut(t),...Ot(t)];for(let i of s)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[t,s]of this.elementProperties){let i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let s=new Set(e.flat(1/0).reverse());for(let i of s)t.unshift(X(i))}else e!==void 0&&t.push(X(e));return t}static _$Eu(e,t){let s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return St(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){let s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute===void 0?L:s.converter).toAttribute(t,s.type);this._$Em=e,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){let s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let r=s.getPropertyOptions(i),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute===void 0?L:r.converter;this._$Em=i;let n=o.fromAttribute(t,r.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(e,t,s,i=!1,r){if(e!==void 0){let o=this.constructor;if(i===!1&&(r=this[e]),s??=o.getPropertyOptions(e),!((s.hasChanged??tt)(r,t)||s.useDefault&&s.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,r]of this._$Ep)this[i]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:o}=r,n=this[i];o!==!0||this._$AL.has(i)||n===void 0||this.C(i,void 0,r,n)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[S("elementProperties")]=new Map,v[S("finalized")]=new Map,Tt?.({ReactiveElement:v}),(R.reactiveElementVersions??=[]).push("2.1.2");var I=globalThis,st=e=>e,T=I.trustedTypes,it=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,rt="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,ot="?"+_,xt=`<${ot}>`,m=document,w=()=>m.createComment(""),C=e=>e===null||typeof e!="object"&&typeof e!="function",q=Array.isArray,Ht=e=>q(e)||typeof e?.[Symbol.iterator]=="function",B=`[ | ||
| \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,at=/>/g,g=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ | ||
| \f\r"'\`<>=]|("|')|))|$)`,"g"),ht=/'/g,lt=/"/g,ct=/^(?:script|style|textarea|title)$/i,b=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),dt=new WeakMap,A=m.createTreeWalker(m,129);function pt(e,t){if(!q(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return it===void 0?t:it.createHTML(t)}var Nt=(e,t)=>{let s=e.length-1,i=[],r,o=t===2?"<svg>":t===3?"<math>":"",n=P;for(let a=0;a<s;a++){let h=e[a],D,p,l=-1,f=0;for(;f<h.length&&(n.lastIndex=f,p=n.exec(h),p!==null);)f=n.lastIndex,n===P?p[1]==="!--"?n=nt:p[1]===void 0?p[2]===void 0?p[3]!==void 0&&(n=g):(ct.test(p[2])&&(r=RegExp("</"+p[2],"g")),n=g):n=at:n===g?p[0]===">"?(n=r??P,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,D=p[1],n=p[3]===void 0?g:p[3]==='"'?lt:ht):n===lt||n===ht?n=g:n===nt||n===at?n=P:(n=g,r=void 0);let y=n===g&&e[a+1].startsWith("/>")?" ":"";o+=n===P?h+xt:l>=0?(i.push(D),h.slice(0,l)+rt+h.slice(l)+_+y):h+_+(l===-2?a:y)}return[pt(e,o+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},V=class At{constructor({strings:t,_$litType$:s},i){let r;this.parts=[];let o=0,n=0,a=t.length-1,h=this.parts,[D,p]=Nt(t,s);if(this.el=At.createElement(D,i),A.currentNode=this.el.content,s===2||s===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=A.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(rt)){let f=p[n++],y=r.getAttribute(l).split(_),j=/([.?@])?(.*)/.exec(f);h.push({type:1,index:o,name:j[2],strings:y,ctor:j[1]==="."?Dt:j[1]==="?"?jt:j[1]==="@"?zt:x}),r.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:o}),r.removeAttribute(l));if(ct.test(r.tagName)){let l=r.textContent.split(_),f=l.length-1;if(f>0){r.textContent=T?T.emptyScript:"";for(let y=0;y<f;y++)r.append(l[y],w()),A.nextNode(),h.push({type:2,index:++o});r.append(l[f],w())}}}else if(r.nodeType===8)if(r.data===ot)h.push({type:2,index:o});else{let l=-1;for(;(l=r.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:o}),l+=_.length-1}o++}}static createElement(t,s){let i=m.createElement("template");return i.innerHTML=t,i}};function E(e,t,s=e,i){if(t===b)return t;let r=i===void 0?s._$Cl:s._$Co?.[i],o=C(t)?void 0:t._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(e),r._$AT(e,s,i)),i===void 0?s._$Cl=r:(s._$Co??=[])[i]=r),r!==void 0&&(t=E(e,r._$AS(e,t.values),r,i)),t}var kt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??m).importNode(t,!0);A.currentNode=i;let r=A.nextNode(),o=0,n=0,a=s[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new W(r,r.nextSibling,this,e):a.type===1?h=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(h=new Lt(r,this,e)),this._$AV.push(h),a=s[++n]}o!==a?.index&&(r=A.nextNode(),o++)}return A.currentNode=m,i}p(e){let t=0;for(let s of this._$AV)s!==void 0&&(s.strings===void 0?s._$AI(e[t]):(s._$AI(e,s,t),t+=s.strings.length-2)),t++}},W=class vt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,i,r){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,s=this._$AM;return s!==void 0&&t?.nodeType===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=E(this,t,s),C(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==b&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Ht(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&C(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){let{values:s,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=V.createElement(pt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{let o=new kt(r,this),n=o.u(this.options);o.p(s),this.T(n),this._$AH=o}}_$AC(t){let s=dt.get(t.strings);return s===void 0&&dt.set(t.strings,s=new V(t)),s}k(t){q(this._$AH)||(this._$AH=[],this._$AR());let s=this._$AH,i,r=0;for(let o of t)r===s.length?s.push(i=new vt(this.O(w()),this.O(w()),this,this.options)):i=s[r],i._$AI(o),r++;r<s.length&&(this._$AR(i&&i._$AB.nextSibling,r),s.length=r)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){let i=st(t).nextSibling;st(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},x=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=c,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(e,t=this,s,i){let r=this.strings,o=!1;if(r===void 0)e=E(this,e,t,0),o=!C(e)||e!==this._$AH&&e!==b,o&&(this._$AH=e);else{let n=e,a,h;for(e=r[0],a=0;a<r.length-1;a++)h=E(this,n[s+a],t,a),h===b&&(h=this._$AH[a]),o||=!C(h)||h!==this._$AH[a],h===c?e=c:e!==c&&(e+=(h??"")+r[a+1]),this._$AH[a]=h}o&&!i&&this.j(e)}j(e){e===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Dt=class extends x{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===c?void 0:e}},jt=class extends x{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==c)}},zt=class extends x{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){if((e=E(this,e,t,0)??c)===b)return;let s=this._$AH,i=e===c&&s!==c||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==c&&(s===c||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Lt=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){E(this,e)}},It=I.litHtmlPolyfillSupport;It?.(V,W),(I.litHtmlVersions??=[]).push("3.3.2");var qt=(e,t,s)=>{let i=s?.renderBefore??t,r=i._$litPart$;if(r===void 0){let o=s?.renderBefore??null;i._$litPart$=r=new W(t.insertBefore(w(),o),o,void 0,s??{})}return r._$AI(e),r},J=globalThis,U=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=qt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return b}};U._$litElement$=!0,U.finalized=!0,J.litElementHydrateSupport?.({LitElement:U});var Bt=J.litElementPolyfillSupport;Bt?.({LitElement:U}),(J.litElementVersions??=[]).push("4.2.2");var d=[];for(let e=0;e<256;++e)d.push((e+256).toString(16).slice(1));function Vt(e,t=0){return(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase()}var K,Wt=new Uint8Array(16);function Jt(){if(!K){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");K=crypto.getRandomValues.bind(crypto)}return K(Wt)}var ut={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Kt(e,t,s){e||={};let i=e.random??e.rng?.()??Jt();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Vt(i)}function Ft(e,t,s){return ut.randomUUID&&!t&&!e?ut.randomUUID():Kt(e,t)}function Zt(e="hp"){return`${e}-${Ft()}`}var Gt=class extends U{createRenderRoot(){return this}emit(e,t){let s=new CustomEvent(`hp-${e}`,{detail:t,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(s),s}_hpId=Zt();get hpId(){return this._hpId}_abortController=null;get signal(){return(!this._abortController||this._abortController.signal.aborted)&&(this._abortController=new AbortController),this._abortController.signal}connectedCallback(){super.connectedCallback(),(!this._abortController||this._abortController.signal.aborted)&&(this._abortController=new AbortController)}disconnectedCallback(){super.disconnectedCallback(),this._abortController?.abort(),this._abortController=null}};function Qt(e){return function(t){typeof window<"u"&&(customElements.get(e)||customElements.define(e,t))}}/** | ||
| * @license | ||
| * Copyright 2019 Google LLC | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| */const H=globalThis,Z=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ft=Symbol(),$t=new WeakMap;let Xt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ft)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Z&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=$t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&$t.set(e,t))}return t}toString(){return this.cssText}};const Yt=s=>new Xt(typeof s=="string"?s:s+"",void 0,ft),te=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=H.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},_t=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Yt(e)})(s):s;/** | ||
| */const H=globalThis,F=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ft=Symbol(),$t=new WeakMap;let Xt=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==ft)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(F&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=$t.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&$t.set(s,t))}return t}toString(){return this.cssText}};const Yt=e=>new Xt(typeof e=="string"?e:e+"",void 0,ft),te=(e,t)=>{if(F)e.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of t){const i=document.createElement("style"),r=H.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,e.appendChild(i)}},_t=F?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return Yt(s)})(e):e;/** | ||
| * @license | ||
| * Copyright 2017 Google LLC | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| */const{is:ee,defineProperty:se,getOwnPropertyDescriptor:ie,getOwnPropertyNames:re,getOwnPropertySymbols:oe,getPrototypeOf:ne}=Object,N=globalThis,yt=N.trustedTypes,ae=yt?yt.emptyScript:"",he=N.reactiveElementPolyfillSupport,O=(s,t)=>s,D={toAttribute(s,t){switch(t){case Boolean:s=s?ae:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},F=(s,t)=>!ee(s,t),mt={attribute:!0,type:String,converter:D,reflect:!1,useDefault:!1,hasChanged:F};Symbol.metadata??=Symbol("metadata"),N.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=mt){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){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&se(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=ie(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){const a=r?.call(this);o?.call(this,n),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const t=ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const e=this.properties,i=[...re(e),...oe(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(_t(r))}else t!==void 0&&e.push(_t(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return te(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(i.converter?.toAttribute!==void 0?i.converter:D).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:D;this._$Em=r;const a=n.fromAttribute(e,o.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,i,r=!1,o){if(t!==void 0){const n=this.constructor;if(r===!1&&(o=this[t]),i??=n.getPropertyOptions(t),!((i.hasChanged??F)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:r,wrapped:o},n){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i){const{wrapped:n}=o,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,o,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[O("elementProperties")]=new Map,M[O("finalized")]=new Map,he?.({ReactiveElement:M}),(N.reactiveElementVersions??=[]).push("2.1.2");/** | ||
| */const{is:ee,defineProperty:se,getOwnPropertyDescriptor:ie,getOwnPropertyNames:re,getOwnPropertySymbols:oe,getPrototypeOf:ne}=Object,N=globalThis,yt=N.trustedTypes,ae=yt?yt.emptyScript:"",he=N.reactiveElementPolyfillSupport,O=(e,t)=>e,k={toAttribute(e,t){switch(t){case Boolean:e=e?ae:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},Z=(e,t)=>!ee(e,t),mt={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),N.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=mt){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);r!==void 0&&se(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:r,set:o}=ie(this.prototype,t)??{get(){return this[s]},set(n){this[s]=n}};return{get:r,set(n){const a=r?.call(this);o?.call(this,n),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const t=ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const s=this.properties,i=[...re(s),...oe(s)];for(const r of i)this.createProperty(r,s[r])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,r]of s)this.elementProperties.set(i,r)}this._$Eh=new Map;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(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)s.unshift(_t(r))}else t!==void 0&&s.push(_t(t));return s}static _$Eu(t,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return te(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const o=(i.converter?.toAttribute!==void 0?i.converter:k).toAttribute(s,i.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,s){const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:k;this._$Em=r;const a=n.fromAttribute(s,o.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,s,i,r=!1,o){if(t!==void 0){const n=this.constructor;if(r===!1&&(o=this[t]),i??=n.getPropertyOptions(t),!((i.hasChanged??Z)(o,s)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:r,wrapped:o},n){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??s??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i){const{wrapped:n}=o,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,o,a)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(s)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(s=>s.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(s=>this._$ET(s,this[s])),this._$EM()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[O("elementProperties")]=new Map,M[O("finalized")]=new Map,he?.({ReactiveElement:M}),(N.reactiveElementVersions??=[]).push("2.1.2");/** | ||
| * @license | ||
| * Copyright 2017 Google LLC | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| */const le={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:F},ce=(s=le,t,e)=>{const{kind:i,metadata:r}=e;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),i==="setter"&&((s=Object.create(s)).wrapped=!0),o.set(e.name,s),i==="accessor"){const{name:n}=e;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,h,s,!0,a)},init(a){return a!==void 0&&this.C(n,void 0,s,a),a}}}if(i==="setter"){const{name:n}=e;return function(a){const h=this[n];t.call(this,a),this.requestUpdate(n,h,s,!0,a)}}throw Error("Unsupported decorator location: "+i)};function de(s){return(t,e)=>typeof e=="object"?ce(s,t,e):((i,r,o)=>{const n=r.hasOwnProperty(o);return r.constructor.createProperty(o,i),n?Object.getOwnPropertyDescriptor(r,o):void 0})(s,t,e)}var pe=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,gt=(s,t,e,i)=>{for(var r=i>1?void 0:i?ue(t,e):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(i?n(t,e,r):n(r))||r);return i&&r&&pe(t,e,r),r};u.HeadlessSeparator=class extends Gt{get orientation(){return this._orientation}set orientation(t){this._orientation=t==="vertical"?"vertical":"horizontal",this.setAttribute("orientation",this._orientation),this.isConnected&&this._sync()}_orientation="horizontal";connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","separator"),this.hasAttribute("role")||this.setAttribute("role","separator");const t=this.getAttribute("orientation");this._orientation=t==="vertical"?"vertical":"horizontal",this._sync()}setOrientation(t){this.orientation=t}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="orientation"&&e!==i&&this.isConnected&&(this._orientation=i==="vertical"?"vertical":"horizontal",this._sync())}_sync(){this.setAttribute("aria-orientation",this.orientation)}},gt([de({type:String,reflect:!0})],u.HeadlessSeparator.prototype,"orientation",1),u.HeadlessSeparator=gt([Qt("hp-separator")],u.HeadlessSeparator),Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); | ||
| */const le={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:Z},ce=(e=le,t,s)=>{const{kind:i,metadata:r}=s;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),i==="setter"&&((e=Object.create(e)).wrapped=!0),o.set(s.name,e),i==="accessor"){const{name:n}=s;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,h,e,!0,a)},init(a){return a!==void 0&&this.C(n,void 0,e,a),a}}}if(i==="setter"){const{name:n}=s;return function(a){const h=this[n];t.call(this,a),this.requestUpdate(n,h,e,!0,a)}}throw Error("Unsupported decorator location: "+i)};function de(e){return(t,s)=>typeof s=="object"?ce(e,t,s):((i,r,o)=>{const n=r.hasOwnProperty(o);return r.constructor.createProperty(o,i),n?Object.getOwnPropertyDescriptor(r,o):void 0})(e,t,s)}var pe=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,gt=(e,t,s,i)=>{for(var r=i>1?void 0:i?ue(t,s):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(r=(i?n(t,s,r):n(r))||r);return i&&r&&pe(t,s,r),r};u.HeadlessSeparator=class extends Gt{get orientation(){return this._orientation}set orientation(t){this._orientation=t==="vertical"?"vertical":"horizontal",this.setAttribute("orientation",this._orientation),this.isConnected&&this._sync()}_orientation="horizontal";connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","separator"),this.hasAttribute("role")||this.setAttribute("role","separator");const t=this.getAttribute("orientation");this._orientation=t==="vertical"?"vertical":"horizontal",this._sync(),requestAnimationFrame(()=>this._sync())}setOrientation(t){this.orientation=t}attributeChangedCallback(t,s,i){super.attributeChangedCallback(t,s,i),t==="orientation"&&s!==i&&this.isConnected&&(this._orientation=i==="vertical"?"vertical":"horizontal",this._sync())}_sync(){this.setAttribute("aria-orientation",this.orientation)}},gt([de({type:String,reflect:!0})],u.HeadlessSeparator.prototype,"orientation",1),u.HeadlessSeparator=gt([Qt("hp-separator")],u.HeadlessSeparator),Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); |
+2
-2
| { | ||
| "name": "@headless-primitives/separator", | ||
| "version": "1.0.0", | ||
| "version": "1.1.0", | ||
| "description": "Headless separator primitive", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
| "lit": "^3.3.2", | ||
| "@headless-primitives/utils": "1.0.0" | ||
| "@headless-primitives/utils": "1.1.0" | ||
| }, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
61542
1.71%998
1.32%+ Added
- Removed