@headless-primitives/progress
Advanced tools
+86
-76
@@ -6,3 +6,3 @@ /** | ||
| */ | ||
| const bt = (e) => (t, s) => { | ||
| const Et = (e) => (t, s) => { | ||
| s !== void 0 ? s.addInitializer(() => { | ||
@@ -36,3 +36,3 @@ customElements.define(e, t); | ||
| }; | ||
| const wt = (e) => new St(typeof e == "string" ? e : e + "", void 0, $t), Pt = (e, t) => { | ||
| const wt = (e) => new St(typeof e == "string" ? e : e + "", void 0, $t), Ct = (e, t) => { | ||
| if (V) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); | ||
@@ -53,3 +53,3 @@ else for (const s of t) { | ||
| */ | ||
| const { is: Ct, defineProperty: Ut, getOwnPropertyDescriptor: Ot, getOwnPropertyNames: xt, getOwnPropertySymbols: Mt, getPrototypeOf: Rt } = Object, D = globalThis, tt = D.trustedTypes, Tt = tt ? tt.emptyScript : "", Nt = D.reactiveElementPolyfillSupport, S = (e, t) => e, N = { toAttribute(e, t) { | ||
| const { is: Pt, defineProperty: Ut, getOwnPropertyDescriptor: Ot, getOwnPropertyNames: xt, getOwnPropertySymbols: Mt, getPrototypeOf: Rt } = Object, D = globalThis, tt = D.trustedTypes, Tt = tt ? tt.emptyScript : "", Nt = D.reactiveElementPolyfillSupport, S = (e, t) => e, N = { toAttribute(e, t) { | ||
| switch (t) { | ||
@@ -82,5 +82,5 @@ case Boolean: | ||
| return s; | ||
| } }, W = (e, t) => !Ct(e, t), et = { attribute: !0, type: String, converter: N, reflect: !1, useDefault: !1, hasChanged: W }; | ||
| } }, W = (e, t) => !Pt(e, t), et = { attribute: !0, type: String, converter: N, reflect: !1, useDefault: !1, hasChanged: W }; | ||
| Symbol.metadata ??= Symbol("metadata"), D.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); | ||
| let E = class extends HTMLElement { | ||
| let b = class extends HTMLElement { | ||
| static addInitializer(t) { | ||
@@ -105,4 +105,4 @@ this._$Ei(), (this.l ??= []).push(t); | ||
| 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 }; | ||
@@ -167,3 +167,3 @@ } | ||
| const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
| return Pt(t, this.constructor.elementStyles), t; | ||
| return Ct(t, this.constructor.elementStyles), t; | ||
| } | ||
@@ -193,4 +193,4 @@ connectedCallback() { | ||
| this._$Em = r; | ||
| const h = n.fromAttribute(s, 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; | ||
| } | ||
@@ -231,4 +231,4 @@ } | ||
| 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); | ||
| } | ||
@@ -270,3 +270,3 @@ } | ||
| }; | ||
| E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[S("elementProperties")] = /* @__PURE__ */ new Map(), E[S("finalized")] = /* @__PURE__ */ new Map(), Nt?.({ ReactiveElement: E }), (D.reactiveElementVersions ??= []).push("2.1.2"); | ||
| b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[S("elementProperties")] = /* @__PURE__ */ new Map(), b[S("finalized")] = /* @__PURE__ */ new Map(), Nt?.({ ReactiveElement: b }), (D.reactiveElementVersions ??= []).push("2.1.2"); | ||
| /** | ||
@@ -282,7 +282,7 @@ * @license | ||
| const { name: n } = s; | ||
| return { set(h) { | ||
| const a = t.get.call(this); | ||
| t.set.call(this, h), this.requestUpdate(n, a, e, !0, h); | ||
| }, init(h) { | ||
| return h !== void 0 && this.C(n, void 0, e, h), h; | ||
| 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; | ||
| } }; | ||
@@ -292,5 +292,5 @@ } | ||
| const { name: n } = s; | ||
| return function(h) { | ||
| const a = this[n]; | ||
| t.call(this, h), this.requestUpdate(n, a, e, !0, h); | ||
| return function(a) { | ||
| const h = this[n]; | ||
| t.call(this, a), this.requestUpdate(n, h, e, !0, a); | ||
| }; | ||
@@ -306,5 +306,5 @@ } | ||
| } | ||
| var T = globalThis, K = T.ShadowRoot && (T.ShadyCSS === void 0 || T.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ft = Symbol(), st = /* @__PURE__ */ new WeakMap(), jt = class { | ||
| var T = globalThis, K = T.ShadowRoot && (T.ShadyCSS === void 0 || T.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), st = /* @__PURE__ */ new WeakMap(), kt = class { | ||
| constructor(e, t, s) { | ||
| if (this._$cssResult$ = !0, s !== ft) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
| if (this._$cssResult$ = !0, s !== _t) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
| this.cssText = e, this.t = t; | ||
@@ -323,3 +323,3 @@ } | ||
| } | ||
| }, kt = (e) => new jt(typeof e == "string" ? e : e + "", void 0, ft), zt = (e, t) => { | ||
| }, jt = (e) => new kt(typeof e == "string" ? e : e + "", void 0, _t), zt = (e, t) => { | ||
| if (K) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet); | ||
@@ -333,4 +333,4 @@ else for (let s of t) { | ||
| for (let i of t.cssRules) s += i.cssText; | ||
| return kt(s); | ||
| })(e) : e, { is: Lt, defineProperty: It, getOwnPropertyDescriptor: qt, getOwnPropertyNames: Bt, getOwnPropertySymbols: Vt, getPrototypeOf: Wt } = Object, j = globalThis, rt = j.trustedTypes, Jt = rt ? rt.emptyScript : "", Kt = j.reactiveElementPolyfillSupport, w = (e, t) => e, q = { | ||
| return jt(s); | ||
| })(e) : e, { is: Lt, defineProperty: It, getOwnPropertyDescriptor: qt, getOwnPropertyNames: Bt, getOwnPropertySymbols: Vt, getPrototypeOf: Wt } = Object, k = globalThis, rt = k.trustedTypes, Jt = rt ? rt.emptyScript : "", Kt = k.reactiveElementPolyfillSupport, w = (e, t) => e, q = { | ||
| toAttribute(e, t) { | ||
@@ -366,3 +366,3 @@ switch (t) { | ||
| } | ||
| }, _t = (e, t) => !Lt(e, t), ot = { | ||
| }, ft = (e, t) => !Lt(e, t), ot = { | ||
| attribute: !0, | ||
@@ -373,5 +373,5 @@ type: String, | ||
| useDefault: !1, | ||
| hasChanged: _t | ||
| hasChanged: ft | ||
| }; | ||
| Symbol.metadata ??= Symbol("metadata"), j.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); | ||
| Symbol.metadata ??= Symbol("metadata"), k.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); | ||
| var g = class extends HTMLElement { | ||
@@ -498,3 +498,3 @@ static addInitializer(e) { | ||
| let o = this.constructor; | ||
| if (i === !1 && (r = this[e]), s ??= o.getPropertyOptions(e), !((s.hasChanged ?? _t)(r, t) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, s)))) return; | ||
| if (i === !1 && (r = this[e]), s ??= o.getPropertyOptions(e), !((s.hasChanged ?? ft)(r, t) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, s)))) return; | ||
| this.C(e, t, s); | ||
@@ -566,17 +566,17 @@ } | ||
| }; | ||
| g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[w("elementProperties")] = /* @__PURE__ */ new Map(), g[w("finalized")] = /* @__PURE__ */ new Map(), Kt?.({ ReactiveElement: g }), (j.reactiveElementVersions ??= []).push("2.1.2"); | ||
| var Z = globalThis, nt = (e) => e, H = Z.trustedTypes, ht = H ? H.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, mt = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, yt = "?" + f, Zt = `<${yt}>`, y = document, C = () => y.createComment(""), U = (e) => e === null || typeof e != "object" && typeof e != "function", F = Array.isArray, Ft = (e) => F(e) || typeof e?.[Symbol.iterator] == "function", L = `[ | ||
| \f\r]`, b = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, at = /-->/g, lt = />/g, _ = RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ | ||
| g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[w("elementProperties")] = /* @__PURE__ */ new Map(), g[w("finalized")] = /* @__PURE__ */ new Map(), Kt?.({ ReactiveElement: g }), (k.reactiveElementVersions ??= []).push("2.1.2"); | ||
| var Z = globalThis, nt = (e) => e, H = Z.trustedTypes, at = H ? H.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, mt = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, yt = "?" + _, Zt = `<${yt}>`, y = document, P = () => y.createComment(""), U = (e) => e === null || typeof e != "object" && typeof e != "function", F = Array.isArray, Ft = (e) => F(e) || typeof e?.[Symbol.iterator] == "function", L = `[ | ||
| \f\r]`, E = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, lt = />/g, f = RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ | ||
| \f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, gt = /^(?:script|style|textarea|title)$/i, v = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), pt = /* @__PURE__ */ new WeakMap(), m = y.createTreeWalker(y, 129); | ||
| function vt(e, t) { | ||
| if (!F(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array"); | ||
| return ht === void 0 ? t : ht.createHTML(t); | ||
| return at === void 0 ? t : at.createHTML(t); | ||
| } | ||
| var Gt = (e, t) => { | ||
| let s = e.length - 1, i = [], r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = b; | ||
| for (let h = 0; h < s; h++) { | ||
| let a = e[h], x, p, l = -1, u = 0; | ||
| for (; u < a.length && (n.lastIndex = u, p = n.exec(a), p !== null); ) u = n.lastIndex, n === b ? p[1] === "!--" ? n = at : p[1] === void 0 ? p[2] === void 0 ? p[3] !== void 0 && (n = _) : (gt.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = _) : n = lt : n === _ ? p[0] === ">" ? (n = r ?? b, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, x = p[1], n = p[3] === void 0 ? _ : p[3] === '"' ? dt : ct) : n === dt || n === ct ? n = _ : n === at || n === lt ? n = b : (n = _, r = void 0); | ||
| let $ = n === _ && e[h + 1].startsWith("/>") ? " " : ""; | ||
| o += n === b ? a + Zt : l >= 0 ? (i.push(x), a.slice(0, l) + mt + a.slice(l) + f + $) : a + f + (l === -2 ? h : $); | ||
| let s = e.length - 1, i = [], r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = E; | ||
| for (let a = 0; a < s; a++) { | ||
| let h = e[a], x, p, l = -1, u = 0; | ||
| for (; u < h.length && (n.lastIndex = u, p = n.exec(h), p !== null); ) u = n.lastIndex, n === E ? p[1] === "!--" ? n = ht : p[1] === void 0 ? p[2] === void 0 ? p[3] !== void 0 && (n = f) : (gt.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = f) : n = lt : n === f ? p[0] === ">" ? (n = r ?? E, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, x = p[1], n = p[3] === void 0 ? f : p[3] === '"' ? dt : ct) : n === dt || n === ct ? n = f : n === ht || n === lt ? n = E : (n = f, r = void 0); | ||
| let $ = n === f && e[a + 1].startsWith("/>") ? " " : ""; | ||
| o += n === E ? h + Zt : l >= 0 ? (i.push(x), h.slice(0, l) + mt + h.slice(l) + _ + $) : h + _ + (l === -2 ? a : $); | ||
| } | ||
@@ -588,3 +588,3 @@ return [vt(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i]; | ||
| this.parts = []; | ||
| let o = 0, n = 0, h = t.length - 1, a = this.parts, [x, p] = Gt(t, s); | ||
| let o = 0, n = 0, a = t.length - 1, h = this.parts, [x, p] = Gt(t, s); | ||
| if (this.el = At.createElement(x, i), m.currentNode = this.el.content, s === 2 || s === 3) { | ||
@@ -594,7 +594,7 @@ let l = this.el.content.firstChild; | ||
| } | ||
| for (; (r = m.nextNode()) !== null && a.length < h; ) { | ||
| for (; (r = m.nextNode()) !== null && h.length < a; ) { | ||
| if (r.nodeType === 1) { | ||
| if (r.hasAttributes()) for (let l of r.getAttributeNames()) if (l.endsWith(mt)) { | ||
| let u = p[n++], $ = r.getAttribute(l).split(f), M = /([.?@])?(.*)/.exec(u); | ||
| a.push({ | ||
| let u = p[n++], $ = r.getAttribute(l).split(_), M = /([.?@])?(.*)/.exec(u); | ||
| h.push({ | ||
| type: 1, | ||
@@ -604,5 +604,5 @@ index: o, | ||
| strings: $, | ||
| ctor: M[1] === "." ? Xt : M[1] === "?" ? Yt : M[1] === "@" ? te : k | ||
| ctor: M[1] === "." ? Xt : M[1] === "?" ? Yt : M[1] === "@" ? te : j | ||
| }), r.removeAttribute(l); | ||
| } else l.startsWith(f) && (a.push({ | ||
| } else l.startsWith(_) && (h.push({ | ||
| type: 6, | ||
@@ -612,13 +612,13 @@ index: o | ||
| if (gt.test(r.tagName)) { | ||
| let l = r.textContent.split(f), u = l.length - 1; | ||
| let l = r.textContent.split(_), u = l.length - 1; | ||
| if (u > 0) { | ||
| r.textContent = H ? H.emptyScript : ""; | ||
| for (let $ = 0; $ < u; $++) r.append(l[$], C()), m.nextNode(), a.push({ | ||
| for (let $ = 0; $ < u; $++) r.append(l[$], P()), m.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 === yt) a.push({ | ||
| } else if (r.nodeType === 8) if (r.data === yt) h.push({ | ||
| type: 2, | ||
@@ -629,6 +629,6 @@ index: o | ||
| let l = -1; | ||
| for (; (l = r.data.indexOf(f, l + 1)) !== -1; ) a.push({ | ||
| for (; (l = r.data.indexOf(_, l + 1)) !== -1; ) h.push({ | ||
| type: 7, | ||
| index: o | ||
| }), l += f.length - 1; | ||
| }), l += _.length - 1; | ||
| } | ||
@@ -661,9 +661,9 @@ o++; | ||
| m.currentNode = i; | ||
| let r = m.nextNode(), o = 0, n = 0, h = s[0]; | ||
| for (; h !== void 0; ) { | ||
| if (o === h.index) { | ||
| let a; | ||
| h.type === 2 ? a = new G(r, r.nextSibling, this, e) : h.type === 1 ? a = new h.ctor(r, h.name, h.strings, this, e) : h.type === 6 && (a = new ee(r, this, e)), this._$AV.push(a), h = s[++n]; | ||
| let r = m.nextNode(), o = 0, n = 0, a = s[0]; | ||
| for (; a !== void 0; ) { | ||
| if (o === a.index) { | ||
| let h; | ||
| a.type === 2 ? h = new G(r, r.nextSibling, this, e) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, e) : a.type === 6 && (h = new ee(r, this, e)), this._$AV.push(h), a = s[++n]; | ||
| } | ||
| o !== h?.index && (r = m.nextNode(), o++); | ||
| o !== a?.index && (r = m.nextNode(), o++); | ||
| } | ||
@@ -676,3 +676,3 @@ return m.currentNode = y, i; | ||
| } | ||
| }, G = class Et { | ||
| }, G = class bt { | ||
| get _$AU() { | ||
@@ -721,3 +721,3 @@ return this._$AM?._$AU ?? this._$Cv; | ||
| let s = this._$AH, i, r = 0; | ||
| for (let o of t) r === s.length ? s.push(i = new Et(this.O(C()), this.O(C()), this, this.options)) : i = s[r], i._$AI(o), r++; | ||
| for (let o of t) r === s.length ? s.push(i = new bt(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); | ||
@@ -734,3 +734,3 @@ } | ||
| } | ||
| }, k = class { | ||
| }, j = class { | ||
| get tagName() { | ||
@@ -749,4 +749,4 @@ return this.element.tagName; | ||
| else { | ||
| let n = e, h, a; | ||
| for (e = r[0], h = 0; h < r.length - 1; h++) a = A(this, n[s + h], t, h), a === v && (a = this._$AH[h]), o ||= !U(a) || a !== this._$AH[h], a === c ? e = c : e !== c && (e += (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 = A(this, n[s + a], t, a), h === v && (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; | ||
| } | ||
@@ -758,3 +758,3 @@ o && !i && this.j(e); | ||
| } | ||
| }, Xt = class extends k { | ||
| }, Xt = class extends j { | ||
| constructor() { | ||
@@ -766,3 +766,3 @@ super(...arguments), this.type = 3; | ||
| } | ||
| }, Yt = class extends k { | ||
| }, Yt = class extends j { | ||
| constructor() { | ||
@@ -774,3 +774,3 @@ super(...arguments), this.type = 4; | ||
| } | ||
| }, te = class extends k { | ||
| }, te = class extends j { | ||
| constructor(e, t, s, i, r) { | ||
@@ -803,6 +803,6 @@ super(e, t, s, i, r), this.type = 5; | ||
| let o = s?.renderBefore ?? null; | ||
| i._$litPart$ = r = new G(t.insertBefore(C(), o), o, void 0, s ?? {}); | ||
| i._$litPart$ = r = new G(t.insertBefore(P(), o), o, void 0, s ?? {}); | ||
| } | ||
| return r._$AI(e), r; | ||
| }, Q = globalThis, P = class extends g { | ||
| }, Q = globalThis, C = class extends g { | ||
| constructor() { | ||
@@ -829,5 +829,5 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; | ||
| }; | ||
| P._$litElement$ = !0, P.finalized = !0, Q.litElementHydrateSupport?.({ LitElement: P }); | ||
| C._$litElement$ = !0, C.finalized = !0, Q.litElementHydrateSupport?.({ LitElement: C }); | ||
| var re = Q.litElementPolyfillSupport; | ||
| re?.({ LitElement: P }), (Q.litElementVersions ??= []).push("4.2.2"); | ||
| re?.({ LitElement: C }), (Q.litElementVersions ??= []).push("4.2.2"); | ||
| var d = []; | ||
@@ -839,3 +839,3 @@ for (let e = 0; e < 256; ++e) d.push((e + 256).toString(16).slice(1)); | ||
| var I, ne = new Uint8Array(16); | ||
| function he() { | ||
| function ae() { | ||
| if (!I) { | ||
@@ -848,5 +848,5 @@ if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); | ||
| var ut = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) }; | ||
| function ae(e, t, s) { | ||
| function he(e, t, s) { | ||
| e ||= {}; | ||
| let i = e.random ?? e.rng?.() ?? he(); | ||
| let i = e.random ?? e.rng?.() ?? ae(); | ||
| if (i.length < 16) throw Error("Random bytes length must be >= 16"); | ||
@@ -856,3 +856,3 @@ return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, oe(i); | ||
| function le(e, t, s) { | ||
| return ut.randomUUID && !t && !e ? ut.randomUUID() : ae(e, t); | ||
| return ut.randomUUID && !t && !e ? ut.randomUUID() : he(e, t); | ||
| } | ||
@@ -862,3 +862,3 @@ function ce(e = "hp") { | ||
| } | ||
| var de = class extends P { | ||
| var de = class extends C { | ||
| createRenderRoot() { | ||
@@ -880,2 +880,12 @@ return this; | ||
| } | ||
| _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; | ||
| } | ||
| }, pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, z = (e, t, s, i) => { | ||
@@ -933,3 +943,3 @@ for (var r = i > 1 ? void 0 : i ? ue(t, s) : t, o = e.length - 1, n; o >= 0; o--) | ||
| O = z([ | ||
| bt("hp-progress") | ||
| Et("hp-progress") | ||
| ], O); | ||
@@ -936,0 +946,0 @@ export { |
@@ -1,6 +0,6 @@ | ||
| (function(u,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(u=typeof globalThis<"u"?globalThis:u||self,b(u.HeadlessPrimitivesSwitch={}))})(this,function(u){"use strict";/** | ||
| (function(u,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(u=typeof globalThis<"u"?globalThis:u||self,E(u.HeadlessPrimitivesSwitch={}))})(this,function(u){"use strict";/** | ||
| * @license | ||
| * Copyright 2017 Google LLC | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| */const b=e=>(t,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};/** | ||
| */const E=e=>(t,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};/** | ||
| * @license | ||
@@ -13,8 +13,8 @@ * Copyright 2019 Google LLC | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| */const{is:Ct,defineProperty:Ut,getOwnPropertyDescriptor:Ot,getOwnPropertyNames:xt,getOwnPropertySymbols:Mt,getPrototypeOf:Rt}=Object,R=globalThis,st=R.trustedTypes,Tt=st?st.emptyScript:"",Ht=R.reactiveElementPolyfillSupport,S=(e,t)=>e,T={toAttribute(e,t){switch(t){case Boolean:e=e?Tt: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}},q=(e,t)=>!Ct(e,t),it={attribute:!0,type:String,converter:T,reflect:!1,useDefault:!1,hasChanged:q};Symbol.metadata??=Symbol("metadata"),R.litPropertyMetadata??=new WeakMap;let w=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,s=it){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&&Ut(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:r,set:o}=Ot(this.prototype,t)??{get(){return this[s]},set(n){this[s]=n}};return{get:r,set(n){const h=r?.call(this);o?.call(this,n),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??it}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const t=Rt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const s=this.properties,i=[...xt(s),...Mt(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(et(r))}else t!==void 0&&s.push(et(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 Pt(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:T).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:T;this._$Em=r;const h=n.fromAttribute(s,o.type);this[r]=h??this._$Ej?.get(r)??h,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??q)(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,h=this[r];n!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,o,h)}}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){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[S("elementProperties")]=new Map,w[S("finalized")]=new Map,Ht?.({ReactiveElement:w}),(R.reactiveElementVersions??=[]).push("2.1.2");/** | ||
| */const{is:Ct,defineProperty:Ut,getOwnPropertyDescriptor:Ot,getOwnPropertyNames:xt,getOwnPropertySymbols:Mt,getPrototypeOf:Rt}=Object,R=globalThis,st=R.trustedTypes,Tt=st?st.emptyScript:"",Ht=R.reactiveElementPolyfillSupport,S=(e,t)=>e,T={toAttribute(e,t){switch(t){case Boolean:e=e?Tt: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}},q=(e,t)=>!Ct(e,t),it={attribute:!0,type:String,converter:T,reflect:!1,useDefault:!1,hasChanged:q};Symbol.metadata??=Symbol("metadata"),R.litPropertyMetadata??=new WeakMap;let w=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,s=it){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&&Ut(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:r,set:o}=Ot(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)??it}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const t=Rt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const s=this.properties,i=[...xt(s),...Mt(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(et(r))}else t!==void 0&&s.push(et(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 Pt(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:T).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:T;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??q)(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){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[S("elementProperties")]=new Map,w[S("finalized")]=new Map,Ht?.({ReactiveElement:w}),(R.reactiveElementVersions??=[]).push("2.1.2");/** | ||
| * @license | ||
| * Copyright 2017 Google LLC | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| */const Nt={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:q},Dt=(e=Nt,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(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,e,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,e,h),h}}}if(i==="setter"){const{name:n}=s;return function(h){const a=this[n];t.call(this,h),this.requestUpdate(n,a,e,!0,h)}}throw Error("Unsupported decorator location: "+i)};function B(e){return(t,s)=>typeof s=="object"?Dt(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 H=globalThis,V=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),ot=new WeakMap,jt=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(V&&e===void 0){let s=t!==void 0&&t.length===1;s&&(e=ot.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&ot.set(t,e))}return e}toString(){return this.cssText}},kt=e=>new jt(typeof e=="string"?e:e+"",void 0,rt),zt=(e,t)=>{if(V)e.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(let s of t){let i=document.createElement("style"),r=H.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,e.appendChild(i)}},nt=V?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(let i of t.cssRules)s+=i.cssText;return kt(s)})(e):e,{is:Lt,defineProperty:It,getOwnPropertyDescriptor:qt,getOwnPropertyNames:Bt,getOwnPropertySymbols:Vt,getPrototypeOf:Wt}=Object,N=globalThis,ht=N.trustedTypes,Jt=ht?ht.emptyScript:"",Kt=N.reactiveElementPolyfillSupport,P=(e,t)=>e,W={toAttribute(e,t){switch(t){case Boolean:e=e?Jt: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}},at=(e,t)=>!Lt(e,t),lt={attribute:!0,type:String,converter:W,reflect:!1,useDefault:!1,hasChanged:at};Symbol.metadata??=Symbol("metadata"),N.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=lt){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&&It(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){let{get:i,set:r}=qt(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)??lt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=Wt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,s=[...Bt(t),...Vt(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(nt(i))}else e!==void 0&&t.push(nt(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 zt(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?W: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?W: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??at)(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[P("elementProperties")]=new Map,v[P("finalized")]=new Map,Kt?.({ReactiveElement:v}),(N.reactiveElementVersions??=[]).push("2.1.2");var J=globalThis,dt=e=>e,D=J.trustedTypes,ct=D?D.createPolicy("lit-html",{createHTML:e=>e}):void 0,pt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,ut="?"+f,Zt=`<${ut}>`,m=document,C=()=>m.createComment(""),U=e=>e===null||typeof e!="object"&&typeof e!="function",K=Array.isArray,Ft=e=>K(e)||typeof e?.[Symbol.iterator]=="function",Z=`[ | ||
| */const Nt={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:q},Dt=(e=Nt,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 B(e){return(t,s)=>typeof s=="object"?Dt(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 H=globalThis,V=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),ot=new WeakMap,jt=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(V&&e===void 0){let s=t!==void 0&&t.length===1;s&&(e=ot.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&ot.set(t,e))}return e}toString(){return this.cssText}},kt=e=>new jt(typeof e=="string"?e:e+"",void 0,rt),zt=(e,t)=>{if(V)e.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(let s of t){let i=document.createElement("style"),r=H.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,e.appendChild(i)}},nt=V?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(let i of t.cssRules)s+=i.cssText;return kt(s)})(e):e,{is:Lt,defineProperty:It,getOwnPropertyDescriptor:qt,getOwnPropertyNames:Bt,getOwnPropertySymbols:Vt,getPrototypeOf:Wt}=Object,N=globalThis,at=N.trustedTypes,Jt=at?at.emptyScript:"",Kt=N.reactiveElementPolyfillSupport,P=(e,t)=>e,W={toAttribute(e,t){switch(t){case Boolean:e=e?Jt: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}},ht=(e,t)=>!Lt(e,t),lt={attribute:!0,type:String,converter:W,reflect:!1,useDefault:!1,hasChanged:ht};Symbol.metadata??=Symbol("metadata"),N.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=lt){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&&It(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){let{get:i,set:r}=qt(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)??lt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=Wt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,s=[...Bt(t),...Vt(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(nt(i))}else e!==void 0&&t.push(nt(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 zt(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?W: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?W: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??ht)(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[P("elementProperties")]=new Map,v[P("finalized")]=new Map,Kt?.({ReactiveElement:v}),(N.reactiveElementVersions??=[]).push("2.1.2");var J=globalThis,dt=e=>e,D=J.trustedTypes,ct=D?D.createPolicy("lit-html",{createHTML:e=>e}):void 0,pt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,ut="?"+f,Zt=`<${ut}>`,m=document,C=()=>m.createComment(""),U=e=>e===null||typeof e!="object"&&typeof e!="function",K=Array.isArray,Ft=e=>K(e)||typeof e?.[Symbol.iterator]=="function",Z=`[ | ||
| \f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$t=/-->/g,ft=/>/g,y=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ | ||
| \f\r"'\`<>=]|("|')|))|$)`,"g"),_t=/'/g,mt=/"/g,yt=/^(?:script|style|textarea|title)$/i,A=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),gt=new WeakMap,g=m.createTreeWalker(m,129);function vt(e,t){if(!K(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ct===void 0?t:ct.createHTML(t)}var Gt=(e,t)=>{let s=e.length-1,i=[],r,o=t===2?"<svg>":t===3?"<math>":"",n=O;for(let h=0;h<s;h++){let a=e[h],z,p,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,p=n.exec(a),p!==null);)$=n.lastIndex,n===O?p[1]==="!--"?n=$t:p[1]===void 0?p[2]===void 0?p[3]!==void 0&&(n=y):(yt.test(p[2])&&(r=RegExp("</"+p[2],"g")),n=y):n=ft:n===y?p[0]===">"?(n=r??O,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,z=p[1],n=p[3]===void 0?y:p[3]==='"'?mt:_t):n===mt||n===_t?n=y:n===$t||n===ft?n=O:(n=y,r=void 0);let _=n===y&&e[h+1].startsWith("/>")?" ":"";o+=n===O?a+Zt:l>=0?(i.push(z),a.slice(0,l)+pt+a.slice(l)+f+_):a+f+(l===-2?h:_)}return[vt(e,o+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},F=class Et{constructor({strings:t,_$litType$:s},i){let r;this.parts=[];let o=0,n=0,h=t.length-1,a=this.parts,[z,p]=Gt(t,s);if(this.el=Et.createElement(z,i),g.currentNode=this.el.content,s===2||s===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=g.nextNode())!==null&&a.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(pt)){let $=p[n++],_=r.getAttribute(l).split(f),L=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:L[2],strings:_,ctor:L[1]==="."?Xt:L[1]==="?"?Yt:L[1]==="@"?te:j}),r.removeAttribute(l)}else l.startsWith(f)&&(a.push({type:6,index:o}),r.removeAttribute(l));if(yt.test(r.tagName)){let l=r.textContent.split(f),$=l.length-1;if($>0){r.textContent=D?D.emptyScript:"";for(let _=0;_<$;_++)r.append(l[_],C()),g.nextNode(),a.push({type:2,index:++o});r.append(l[$],C())}}}else if(r.nodeType===8)if(r.data===ut)a.push({type:2,index:o});else{let l=-1;for(;(l=r.data.indexOf(f,l+1))!==-1;)a.push({type:7,index:o}),l+=f.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===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=E(e,r._$AS(e,t.values),r,i)),t}var Qt=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);g.currentNode=i;let r=g.nextNode(),o=0,n=0,h=s[0];for(;h!==void 0;){if(o===h.index){let a;h.type===2?a=new G(r,r.nextSibling,this,e):h.type===1?a=new h.ctor(r,h.name,h.strings,this,e):h.type===6&&(a=new ee(r,this,e)),this._$AV.push(a),h=s[++n]}o!==h?.index&&(r=g.nextNode(),o++)}return g.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++}},G=class bt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,i,r){this.type=2,this._$AH=d,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),U(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==A&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Ft(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!==d&&U(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=F.createElement(vt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{let o=new Qt(r,this),n=o.u(this.options);o.p(s),this.T(n),this._$AH=o}}_$AC(t){let s=gt.get(t.strings);return s===void 0&>.set(t.strings,s=new F(t)),s}k(t){K(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 bt(this.O(C()),this.O(C()),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=dt(t).nextSibling;dt(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},j=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=d,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=d}_$AI(e,t=this,s,i){let r=this.strings,o=!1;if(r===void 0)e=E(this,e,t,0),o=!U(e)||e!==this._$AH&&e!==A,o&&(this._$AH=e);else{let n=e,h,a;for(e=r[0],h=0;h<r.length-1;h++)a=E(this,n[s+h],t,h),a===A&&(a=this._$AH[h]),o||=!U(a)||a!==this._$AH[h],a===d?e=d:e!==d&&(e+=(a??"")+r[h+1]),this._$AH[h]=a}o&&!i&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Xt=class extends j{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},Yt=class extends j{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},te=class extends j{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)??d)===A)return;let s=this._$AH,i=e===d&&s!==d||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==d&&(s===d||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)}},ee=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)}},se=J.litHtmlPolyfillSupport;se?.(F,G),(J.litHtmlVersions??=[]).push("3.3.2");var ie=(e,t,s)=>{let i=s?.renderBefore??t,r=i._$litPart$;if(r===void 0){let o=s?.renderBefore??null;i._$litPart$=r=new G(t.insertBefore(C(),o),o,void 0,s??{})}return r._$AI(e),r},Q=globalThis,x=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=ie(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};x._$litElement$=!0,x.finalized=!0,Q.litElementHydrateSupport?.({LitElement:x});var re=Q.litElementPolyfillSupport;re?.({LitElement:x}),(Q.litElementVersions??=[]).push("4.2.2");var c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));function oe(e,t=0){return(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase()}var X,ne=new Uint8Array(16);function he(){if(!X){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X=crypto.getRandomValues.bind(crypto)}return X(ne)}var At={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ae(e,t,s){e||={};let i=e.random??e.rng?.()??he();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,oe(i)}function le(e,t,s){return At.randomUUID&&!t&&!e?At.randomUUID():ae(e,t)}function de(e="hp"){return`${e}-${le()}`}var ce=class extends x{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=de();get hpId(){return this._hpId}},pe=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,k=(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.HeadlessProgress=class extends ce{_value=null;_min=0;_max=100;get value(){return this._value}set value(t){this._value=t,this._sync()}get min(){return this._min}set min(t){this._min=t,this._sync()}get max(){return this._max}set max(t){this._max=t,this._sync()}connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","progress"),this.hasAttribute("role")||this.setAttribute("role","progressbar"),this._sync()}_sync(){this.setAttribute("aria-valuemin",String(this._min)),this.setAttribute("aria-valuemax",String(this._max)),this._value!==null?(this.setAttribute("aria-valuenow",String(this._value)),this.setAttribute("data-state","determinate"),this.style.setProperty("--hp-progress-percentage",`${this.percentage}%`)):(this.removeAttribute("aria-valuenow"),this.setAttribute("data-state","indeterminate"),this.style.setProperty("--hp-progress-percentage",""))}get percentage(){if(this._value===null)return 0;const t=this._max-this._min;return t<=0?0:(Math.min(Math.max(this._value,this._min),this._max)-this._min)/t*100}setValue(t){this.value=t}},k([B({type:Number})],u.HeadlessProgress.prototype,"value",1),k([B({type:Number})],u.HeadlessProgress.prototype,"min",1),k([B({type:Number})],u.HeadlessProgress.prototype,"max",1),u.HeadlessProgress=k([b("hp-progress")],u.HeadlessProgress),Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); | ||
| \f\r"'\`<>=]|("|')|))|$)`,"g"),_t=/'/g,mt=/"/g,yt=/^(?:script|style|textarea|title)$/i,A=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),gt=new WeakMap,g=m.createTreeWalker(m,129);function vt(e,t){if(!K(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ct===void 0?t:ct.createHTML(t)}var Gt=(e,t)=>{let s=e.length-1,i=[],r,o=t===2?"<svg>":t===3?"<math>":"",n=O;for(let a=0;a<s;a++){let h=e[a],z,p,l=-1,$=0;for(;$<h.length&&(n.lastIndex=$,p=n.exec(h),p!==null);)$=n.lastIndex,n===O?p[1]==="!--"?n=$t:p[1]===void 0?p[2]===void 0?p[3]!==void 0&&(n=y):(yt.test(p[2])&&(r=RegExp("</"+p[2],"g")),n=y):n=ft:n===y?p[0]===">"?(n=r??O,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,z=p[1],n=p[3]===void 0?y:p[3]==='"'?mt:_t):n===mt||n===_t?n=y:n===$t||n===ft?n=O:(n=y,r=void 0);let _=n===y&&e[a+1].startsWith("/>")?" ":"";o+=n===O?h+Zt:l>=0?(i.push(z),h.slice(0,l)+pt+h.slice(l)+f+_):h+f+(l===-2?a:_)}return[vt(e,o+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},F=class bt{constructor({strings:t,_$litType$:s},i){let r;this.parts=[];let o=0,n=0,a=t.length-1,h=this.parts,[z,p]=Gt(t,s);if(this.el=bt.createElement(z,i),g.currentNode=this.el.content,s===2||s===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=g.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(pt)){let $=p[n++],_=r.getAttribute(l).split(f),L=/([.?@])?(.*)/.exec($);h.push({type:1,index:o,name:L[2],strings:_,ctor:L[1]==="."?Xt:L[1]==="?"?Yt:L[1]==="@"?te:j}),r.removeAttribute(l)}else l.startsWith(f)&&(h.push({type:6,index:o}),r.removeAttribute(l));if(yt.test(r.tagName)){let l=r.textContent.split(f),$=l.length-1;if($>0){r.textContent=D?D.emptyScript:"";for(let _=0;_<$;_++)r.append(l[_],C()),g.nextNode(),h.push({type:2,index:++o});r.append(l[$],C())}}}else if(r.nodeType===8)if(r.data===ut)h.push({type:2,index:o});else{let l=-1;for(;(l=r.data.indexOf(f,l+1))!==-1;)h.push({type:7,index:o}),l+=f.length-1}o++}}static createElement(t,s){let i=m.createElement("template");return i.innerHTML=t,i}};function b(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=b(e,r._$AS(e,t.values),r,i)),t}var Qt=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);g.currentNode=i;let r=g.nextNode(),o=0,n=0,a=s[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new G(r,r.nextSibling,this,e):a.type===1?h=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(h=new ee(r,this,e)),this._$AV.push(h),a=s[++n]}o!==a?.index&&(r=g.nextNode(),o++)}return g.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++}},G=class Et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,i,r){this.type=2,this._$AH=d,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=b(this,t,s),U(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==A&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Ft(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!==d&&U(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=F.createElement(vt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{let o=new Qt(r,this),n=o.u(this.options);o.p(s),this.T(n),this._$AH=o}}_$AC(t){let s=gt.get(t.strings);return s===void 0&>.set(t.strings,s=new F(t)),s}k(t){K(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 Et(this.O(C()),this.O(C()),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=dt(t).nextSibling;dt(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},j=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=d,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=d}_$AI(e,t=this,s,i){let r=this.strings,o=!1;if(r===void 0)e=b(this,e,t,0),o=!U(e)||e!==this._$AH&&e!==A,o&&(this._$AH=e);else{let n=e,a,h;for(e=r[0],a=0;a<r.length-1;a++)h=b(this,n[s+a],t,a),h===A&&(h=this._$AH[a]),o||=!U(h)||h!==this._$AH[a],h===d?e=d:e!==d&&(e+=(h??"")+r[a+1]),this._$AH[a]=h}o&&!i&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Xt=class extends j{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},Yt=class extends j{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},te=class extends j{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){if((e=b(this,e,t,0)??d)===A)return;let s=this._$AH,i=e===d&&s!==d||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==d&&(s===d||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)}},ee=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){b(this,e)}},se=J.litHtmlPolyfillSupport;se?.(F,G),(J.litHtmlVersions??=[]).push("3.3.2");var ie=(e,t,s)=>{let i=s?.renderBefore??t,r=i._$litPart$;if(r===void 0){let o=s?.renderBefore??null;i._$litPart$=r=new G(t.insertBefore(C(),o),o,void 0,s??{})}return r._$AI(e),r},Q=globalThis,x=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=ie(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};x._$litElement$=!0,x.finalized=!0,Q.litElementHydrateSupport?.({LitElement:x});var re=Q.litElementPolyfillSupport;re?.({LitElement:x}),(Q.litElementVersions??=[]).push("4.2.2");var c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));function oe(e,t=0){return(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase()}var X,ne=new Uint8Array(16);function ae(){if(!X){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");X=crypto.getRandomValues.bind(crypto)}return X(ne)}var At={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function he(e,t,s){e||={};let i=e.random??e.rng?.()??ae();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,oe(i)}function le(e,t,s){return At.randomUUID&&!t&&!e?At.randomUUID():he(e,t)}function de(e="hp"){return`${e}-${le()}`}var ce=class extends x{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=de();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}},pe=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,k=(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.HeadlessProgress=class extends ce{_value=null;_min=0;_max=100;get value(){return this._value}set value(t){this._value=t,this._sync()}get min(){return this._min}set min(t){this._min=t,this._sync()}get max(){return this._max}set max(t){this._max=t,this._sync()}connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","progress"),this.hasAttribute("role")||this.setAttribute("role","progressbar"),this._sync()}_sync(){this.setAttribute("aria-valuemin",String(this._min)),this.setAttribute("aria-valuemax",String(this._max)),this._value!==null?(this.setAttribute("aria-valuenow",String(this._value)),this.setAttribute("data-state","determinate"),this.style.setProperty("--hp-progress-percentage",`${this.percentage}%`)):(this.removeAttribute("aria-valuenow"),this.setAttribute("data-state","indeterminate"),this.style.setProperty("--hp-progress-percentage",""))}get percentage(){if(this._value===null)return 0;const t=this._max-this._min;return t<=0?0:(Math.min(Math.max(this._value,this._min),this._max)-this._min)/t*100}setValue(t){this.value=t}},k([B({type:Number})],u.HeadlessProgress.prototype,"value",1),k([B({type:Number})],u.HeadlessProgress.prototype,"min",1),k([B({type:Number})],u.HeadlessProgress.prototype,"max",1),u.HeadlessProgress=k([E("hp-progress")],u.HeadlessProgress),Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); |
+2
-2
| { | ||
| "name": "@headless-primitives/progress", | ||
| "version": "1.0.0", | ||
| "version": "1.1.0", | ||
| "description": "Headless progress 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": { |
62368
1.55%1025
1.18%+ Added
- Removed