UNPKG

rhino-editor

Version:

A custom element wrapped rich text editor

600 lines (590 loc) 22.7 kB
// node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js var t = globalThis; var i = t.trustedTypes; var s = i ? i.createPolicy("lit-html", { createHTML: (t3) => t3 }) : void 0; var e = "$lit$"; var h = `lit$${Math.random().toFixed(9).slice(2)}$`; var o = "?" + h; var n = `<${o}>`; var r = document; var l = () => r.createComment(""); var c = (t3) => null === t3 || "object" != typeof t3 && "function" != typeof t3; var a = Array.isArray; var u = (t3) => a(t3) || "function" == typeof t3?.[Symbol.iterator]; var d = "[ \n\f\r]"; var f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var v = /-->/g; var _ = />/g; var m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"); var p = /'/g; var g = /"/g; var $ = /^(?:script|style|textarea|title)$/i; var y = (t3) => (i5, ...s4) => ({ _$litType$: t3, strings: i5, values: s4 }); var x = y(1); var b = y(2); var w = y(3); var T = Symbol.for("lit-noChange"); var E = Symbol.for("lit-nothing"); var A = /* @__PURE__ */ new WeakMap(); var C = r.createTreeWalker(r, 129); function P(t3, i5) { if (!a(t3) || !t3.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== s ? s.createHTML(i5) : i5; } var V = (t3, i5) => { const s4 = t3.length - 1, o5 = []; let r4, l3 = 2 === i5 ? "<svg>" : 3 === i5 ? "<math>" : "", c4 = f; for (let i6 = 0; i6 < s4; i6++) { const s5 = t3[i6]; let a3, u3, d3 = -1, y3 = 0; for (; y3 < s5.length && (c4.lastIndex = y3, u3 = c4.exec(s5), null !== u3); ) y3 = c4.lastIndex, c4 === f ? "!--" === u3[1] ? c4 = v : void 0 !== u3[1] ? c4 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r4 = RegExp("</" + u3[2], "g")), c4 = m) : void 0 !== u3[3] && (c4 = m) : c4 === m ? ">" === u3[0] ? (c4 = r4 ?? f, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p) : c4 === g || c4 === p ? c4 = m : c4 === v || c4 === _ ? c4 = f : (c4 = m, r4 = void 0); const x2 = c4 === m && t3[i6 + 1].startsWith("/>") ? " " : ""; l3 += c4 === f ? s5 + n : d3 >= 0 ? (o5.push(a3), s5.slice(0, d3) + e + s5.slice(d3) + h + x2) : s5 + h + (-2 === d3 ? i6 : x2); } return [P(t3, l3 + (t3[s4] || "<?>") + (2 === i5 ? "</svg>" : 3 === i5 ? "</math>" : "")), o5]; }; var N = class _N { constructor({ strings: t3, _$litType$: s4 }, n4) { let r4; this.parts = []; let c4 = 0, a3 = 0; const u3 = t3.length - 1, d3 = this.parts, [f3, v2] = V(t3, s4); if (this.el = _N.createElement(f3, n4), C.currentNode = this.el.content, 2 === s4 || 3 === s4) { const t4 = this.el.content.firstChild; t4.replaceWith(...t4.childNodes); } for (; null !== (r4 = C.nextNode()) && d3.length < u3; ) { if (1 === r4.nodeType) { if (r4.hasAttributes()) for (const t4 of r4.getAttributeNames()) if (t4.endsWith(e)) { const i5 = v2[a3++], s5 = r4.getAttribute(t4).split(h), e4 = /([.?@])?(.*)/.exec(i5); d3.push({ type: 1, index: c4, name: e4[2], strings: s5, ctor: "." === e4[1] ? H : "?" === e4[1] ? I : "@" === e4[1] ? L : k }), r4.removeAttribute(t4); } else t4.startsWith(h) && (d3.push({ type: 6, index: c4 }), r4.removeAttribute(t4)); if ($.test(r4.tagName)) { const t4 = r4.textContent.split(h), s5 = t4.length - 1; if (s5 > 0) { r4.textContent = i ? i.emptyScript : ""; for (let i5 = 0; i5 < s5; i5++) r4.append(t4[i5], l()), C.nextNode(), d3.push({ type: 2, index: ++c4 }); r4.append(t4[s5], l()); } } } else if (8 === r4.nodeType) if (r4.data === o) d3.push({ type: 2, index: c4 }); else { let t4 = -1; for (; -1 !== (t4 = r4.data.indexOf(h, t4 + 1)); ) d3.push({ type: 7, index: c4 }), t4 += h.length - 1; } c4++; } } static createElement(t3, i5) { const s4 = r.createElement("template"); return s4.innerHTML = t3, s4; } }; function S(t3, i5, s4 = t3, e4) { if (i5 === T) return i5; let h3 = void 0 !== e4 ? s4._$Co?.[e4] : s4._$Cl; const o5 = c(i5) ? void 0 : i5._$litDirective$; return h3?.constructor !== o5 && (h3?._$AO?.(false), void 0 === o5 ? h3 = void 0 : (h3 = new o5(t3), h3._$AT(t3, s4, e4)), void 0 !== e4 ? (s4._$Co ?? (s4._$Co = []))[e4] = h3 : s4._$Cl = h3), void 0 !== h3 && (i5 = S(t3, h3._$AS(t3, i5.values), h3, e4)), i5; } var M = class { constructor(t3, i5) { this._$AV = [], this._$AN = void 0, this._$AD = t3, this._$AM = i5; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t3) { const { el: { content: i5 }, parts: s4 } = this._$AD, e4 = (t3?.creationScope ?? r).importNode(i5, true); C.currentNode = e4; let h3 = C.nextNode(), o5 = 0, n4 = 0, l3 = s4[0]; for (; void 0 !== l3; ) { if (o5 === l3.index) { let i6; 2 === l3.type ? i6 = new R(h3, h3.nextSibling, this, t3) : 1 === l3.type ? i6 = new l3.ctor(h3, l3.name, l3.strings, this, t3) : 6 === l3.type && (i6 = new z(h3, this, t3)), this._$AV.push(i6), l3 = s4[++n4]; } o5 !== l3?.index && (h3 = C.nextNode(), o5++); } return C.currentNode = r, e4; } p(t3) { let i5 = 0; for (const s4 of this._$AV) void 0 !== s4 && (void 0 !== s4.strings ? (s4._$AI(t3, s4, i5), i5 += s4.strings.length - 2) : s4._$AI(t3[i5])), i5++; } }; var R = class _R { get _$AU() { return this._$AM?._$AU ?? this._$Cv; } constructor(t3, i5, s4, e4) { this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t3, this._$AB = i5, this._$AM = s4, this.options = e4, this._$Cv = e4?.isConnected ?? true; } get parentNode() { let t3 = this._$AA.parentNode; const i5 = this._$AM; return void 0 !== i5 && 11 === t3?.nodeType && (t3 = i5.parentNode), t3; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t3, i5 = this) { t3 = S(this, t3, i5), c(t3) ? t3 === E || null == t3 || "" === t3 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t3 !== this._$AH && t3 !== T && this._(t3) : void 0 !== t3._$litType$ ? this.$(t3) : void 0 !== t3.nodeType ? this.T(t3) : u(t3) ? this.k(t3) : this._(t3); } O(t3) { return this._$AA.parentNode.insertBefore(t3, this._$AB); } T(t3) { this._$AH !== t3 && (this._$AR(), this._$AH = this.O(t3)); } _(t3) { this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t3 : this.T(r.createTextNode(t3)), this._$AH = t3; } $(t3) { const { values: i5, _$litType$: s4 } = t3, e4 = "number" == typeof s4 ? this._$AC(t3) : (void 0 === s4.el && (s4.el = N.createElement(P(s4.h, s4.h[0]), this.options)), s4); if (this._$AH?._$AD === e4) this._$AH.p(i5); else { const t4 = new M(e4, this), s5 = t4.u(this.options); t4.p(i5), this.T(s5), this._$AH = t4; } } _$AC(t3) { let i5 = A.get(t3.strings); return void 0 === i5 && A.set(t3.strings, i5 = new N(t3)), i5; } k(t3) { a(this._$AH) || (this._$AH = [], this._$AR()); const i5 = this._$AH; let s4, e4 = 0; for (const h3 of t3) e4 === i5.length ? i5.push(s4 = new _R(this.O(l()), this.O(l()), this, this.options)) : s4 = i5[e4], s4._$AI(h3), e4++; e4 < i5.length && (this._$AR(s4 && s4._$AB.nextSibling, e4), i5.length = e4); } _$AR(t3 = this._$AA.nextSibling, i5) { for (this._$AP?.(false, true, i5); t3 !== this._$AB; ) { const i6 = t3.nextSibling; t3.remove(), t3 = i6; } } setConnected(t3) { void 0 === this._$AM && (this._$Cv = t3, this._$AP?.(t3)); } }; var k = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t3, i5, s4, e4, h3) { this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t3, this.name = i5, this._$AM = e4, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = E; } _$AI(t3, i5 = this, s4, e4) { const h3 = this.strings; let o5 = false; if (void 0 === h3) t3 = S(this, t3, i5, 0), o5 = !c(t3) || t3 !== this._$AH && t3 !== T, o5 && (this._$AH = t3); else { const e5 = t3; let n4, r4; for (t3 = h3[0], n4 = 0; n4 < h3.length - 1; n4++) r4 = S(this, e5[s4 + n4], i5, n4), r4 === T && (r4 = this._$AH[n4]), o5 || (o5 = !c(r4) || r4 !== this._$AH[n4]), r4 === E ? t3 = E : t3 !== E && (t3 += (r4 ?? "") + h3[n4 + 1]), this._$AH[n4] = r4; } o5 && !e4 && this.j(t3); } j(t3) { t3 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t3 ?? ""); } }; var H = class extends k { constructor() { super(...arguments), this.type = 3; } j(t3) { this.element[this.name] = t3 === E ? void 0 : t3; } }; var I = class extends k { constructor() { super(...arguments), this.type = 4; } j(t3) { this.element.toggleAttribute(this.name, !!t3 && t3 !== E); } }; var L = class extends k { constructor(t3, i5, s4, e4, h3) { super(t3, i5, s4, e4, h3), this.type = 5; } _$AI(t3, i5 = this) { if ((t3 = S(this, t3, i5, 0) ?? E) === T) return; const s4 = this._$AH, e4 = t3 === E && s4 !== E || t3.capture !== s4.capture || t3.once !== s4.once || t3.passive !== s4.passive, h3 = t3 !== E && (s4 === E || e4); e4 && this.element.removeEventListener(this.name, this, s4), h3 && this.element.addEventListener(this.name, this, t3), this._$AH = t3; } handleEvent(t3) { "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t3) : this._$AH.handleEvent(t3); } }; var z = class { constructor(t3, i5, s4) { this.element = t3, this.type = 6, this._$AN = void 0, this._$AM = i5, this.options = s4; } get _$AU() { return this._$AM._$AU; } _$AI(t3) { S(this, t3); } }; var Z = { M: e, P: h, A: o, C: 1, L: V, R: M, D: u, V: S, I: R, H: k, N: I, U: L, B: H, F: z }; var j = t.litHtmlPolyfillSupport; j?.(N, R), (t.litHtmlVersions ?? (t.litHtmlVersions = [])).push("3.3.1"); var B = (t3, i5, s4) => { const e4 = s4?.renderBefore ?? i5; let h3 = e4._$litPart$; if (void 0 === h3) { const t4 = s4?.renderBefore ?? null; e4._$litPart$ = h3 = new R(i5.insertBefore(l(), t4), t4, void 0, s4 ?? {}); } return h3._$AI(t3), h3; }; // node_modules/.pnpm/@lit+reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js var t2 = globalThis; var e2 = t2.ShadowRoot && (void 0 === t2.ShadyCSS || t2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; var s2 = Symbol(); var o2 = /* @__PURE__ */ new WeakMap(); var n2 = class { constructor(t3, e4, o5) { if (this._$cssResult$ = true, o5 !== s2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t3, this.t = e4; } get styleSheet() { let t3 = this.o; const s4 = this.t; if (e2 && void 0 === t3) { const e4 = void 0 !== s4 && 1 === s4.length; e4 && (t3 = o2.get(s4)), void 0 === t3 && ((this.o = t3 = new CSSStyleSheet()).replaceSync(this.cssText), e4 && o2.set(s4, t3)); } return t3; } toString() { return this.cssText; } }; var r2 = (t3) => new n2("string" == typeof t3 ? t3 : t3 + "", void 0, s2); var i2 = (t3, ...e4) => { const o5 = 1 === t3.length ? t3[0] : e4.reduce((e5, s4, o6) => e5 + ((t4) => { if (true === t4._$cssResult$) return t4.cssText; if ("number" == typeof t4) return t4; throw Error("Value passed to 'css' function must be a 'css' function result: " + t4 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(s4) + t3[o6 + 1], t3[0]); return new n2(o5, t3, s2); }; var S2 = (s4, o5) => { if (e2) s4.adoptedStyleSheets = o5.map((t3) => t3 instanceof CSSStyleSheet ? t3 : t3.styleSheet); else for (const e4 of o5) { const o6 = document.createElement("style"), n4 = t2.litNonce; void 0 !== n4 && o6.setAttribute("nonce", n4), o6.textContent = e4.cssText, s4.appendChild(o6); } }; var c2 = e2 ? (t3) => t3 : (t3) => t3 instanceof CSSStyleSheet ? ((t4) => { let e4 = ""; for (const s4 of t4.cssRules) e4 += s4.cssText; return r2(e4); })(t3) : t3; // node_modules/.pnpm/@lit+reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js var { is: i3, defineProperty: e3, getOwnPropertyDescriptor: h2, getOwnPropertyNames: r3, getOwnPropertySymbols: o3, getPrototypeOf: n3 } = Object; var a2 = globalThis; var c3 = a2.trustedTypes; var l2 = c3 ? c3.emptyScript : ""; var p2 = a2.reactiveElementPolyfillSupport; var d2 = (t3, s4) => t3; var u2 = { toAttribute(t3, s4) { switch (s4) { case Boolean: t3 = t3 ? l2 : null; break; case Object: case Array: t3 = null == t3 ? t3 : JSON.stringify(t3); } return t3; }, fromAttribute(t3, s4) { let i5 = t3; switch (s4) { case Boolean: i5 = null !== t3; break; case Number: i5 = null === t3 ? null : Number(t3); break; case Object: case Array: try { i5 = JSON.parse(t3); } catch (t4) { i5 = null; } } return i5; } }; var f2 = (t3, s4) => !i3(t3, s4); var b2 = { attribute: true, type: String, converter: u2, reflect: false, useDefault: false, hasChanged: f2 }; Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a2.litPropertyMetadata ?? (a2.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); var y2 = class extends HTMLElement { static addInitializer(t3) { this._$Ei(), (this.l ?? (this.l = [])).push(t3); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t3, s4 = b2) { if (s4.state && (s4.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t3) && ((s4 = Object.create(s4)).wrapped = true), this.elementProperties.set(t3, s4), !s4.noAccessor) { const i5 = Symbol(), h3 = this.getPropertyDescriptor(t3, i5, s4); void 0 !== h3 && e3(this.prototype, t3, h3); } } static getPropertyDescriptor(t3, s4, i5) { const { get: e4, set: r4 } = h2(this.prototype, t3) ?? { get() { return this[s4]; }, set(t4) { this[s4] = t4; } }; return { get: e4, set(s5) { const h3 = e4?.call(this); r4?.call(this, s5), this.requestUpdate(t3, h3, i5); }, configurable: true, enumerable: true }; } static getPropertyOptions(t3) { return this.elementProperties.get(t3) ?? b2; } static _$Ei() { if (this.hasOwnProperty(d2("elementProperties"))) return; const t3 = n3(this); t3.finalize(), void 0 !== t3.l && (this.l = [...t3.l]), this.elementProperties = new Map(t3.elementProperties); } static finalize() { if (this.hasOwnProperty(d2("finalized"))) return; if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d2("properties"))) { const t4 = this.properties, s4 = [...r3(t4), ...o3(t4)]; for (const i5 of s4) this.createProperty(i5, t4[i5]); } const t3 = this[Symbol.metadata]; if (null !== t3) { const s4 = litPropertyMetadata.get(t3); if (void 0 !== s4) for (const [t4, i5] of s4) this.elementProperties.set(t4, i5); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t4, s4] of this.elementProperties) { const i5 = this._$Eu(t4, s4); void 0 !== i5 && this._$Eh.set(i5, t4); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s4) { const i5 = []; if (Array.isArray(s4)) { const e4 = new Set(s4.flat(1 / 0).reverse()); for (const s5 of e4) i5.unshift(c2(s5)); } else void 0 !== s4 && i5.push(c2(s4)); return i5; } static _$Eu(t3, s4) { const i5 = s4.attribute; return false === i5 ? void 0 : "string" == typeof i5 ? i5 : "string" == typeof t3 ? t3.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev(); } _$Ev() { this._$ES = new Promise((t3) => this.enableUpdating = t3), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t3) => t3(this)); } addController(t3) { (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t3), void 0 !== this.renderRoot && this.isConnected && t3.hostConnected?.(); } removeController(t3) { this._$EO?.delete(t3); } _$E_() { const t3 = /* @__PURE__ */ new Map(), s4 = this.constructor.elementProperties; for (const i5 of s4.keys()) this.hasOwnProperty(i5) && (t3.set(i5, this[i5]), delete this[i5]); t3.size > 0 && (this._$Ep = t3); } createRenderRoot() { const t3 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return S2(t3, this.constructor.elementStyles), t3; } connectedCallback() { this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), this._$EO?.forEach((t3) => t3.hostConnected?.()); } enableUpdating(t3) { } disconnectedCallback() { this._$EO?.forEach((t3) => t3.hostDisconnected?.()); } attributeChangedCallback(t3, s4, i5) { this._$AK(t3, i5); } _$ET(t3, s4) { const i5 = this.constructor.elementProperties.get(t3), e4 = this.constructor._$Eu(t3, i5); if (void 0 !== e4 && true === i5.reflect) { const h3 = (void 0 !== i5.converter?.toAttribute ? i5.converter : u2).toAttribute(s4, i5.type); this._$Em = t3, null == h3 ? this.removeAttribute(e4) : this.setAttribute(e4, h3), this._$Em = null; } } _$AK(t3, s4) { const i5 = this.constructor, e4 = i5._$Eh.get(t3); if (void 0 !== e4 && this._$Em !== e4) { const t4 = i5.getPropertyOptions(e4), h3 = "function" == typeof t4.converter ? { fromAttribute: t4.converter } : void 0 !== t4.converter?.fromAttribute ? t4.converter : u2; this._$Em = e4; const r4 = h3.fromAttribute(s4, t4.type); this[e4] = r4 ?? this._$Ej?.get(e4) ?? r4, this._$Em = null; } } requestUpdate(t3, s4, i5) { if (void 0 !== t3) { const e4 = this.constructor, h3 = this[t3]; if (i5 ?? (i5 = e4.getPropertyOptions(t3)), !((i5.hasChanged ?? f2)(h3, s4) || i5.useDefault && i5.reflect && h3 === this._$Ej?.get(t3) && !this.hasAttribute(e4._$Eu(t3, i5)))) return; this.C(t3, s4, i5); } false === this.isUpdatePending && (this._$ES = this._$EP()); } C(t3, s4, { useDefault: i5, reflect: e4, wrapped: h3 }, r4) { i5 && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t3) && (this._$Ej.set(t3, r4 ?? s4 ?? this[t3]), true !== h3 || void 0 !== r4) || (this._$AL.has(t3) || (this.hasUpdated || i5 || (s4 = void 0), this._$AL.set(t3, s4)), true === e4 && this._$Em !== t3 && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t3)); } async _$EP() { this.isUpdatePending = true; try { await this._$ES; } catch (t4) { Promise.reject(t4); } const t3 = this.scheduleUpdate(); return null != t3 && await t3, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) { for (const [t5, s5] of this._$Ep) this[t5] = s5; this._$Ep = void 0; } const t4 = this.constructor.elementProperties; if (t4.size > 0) for (const [s5, i5] of t4) { const { wrapped: t5 } = i5, e4 = this[s5]; true !== t5 || this._$AL.has(s5) || void 0 === e4 || this.C(s5, void 0, i5, e4); } } let t3 = false; const s4 = this._$AL; try { t3 = this.shouldUpdate(s4), t3 ? (this.willUpdate(s4), this._$EO?.forEach((t4) => t4.hostUpdate?.()), this.update(s4)) : this._$EM(); } catch (s5) { throw t3 = false, this._$EM(), s5; } t3 && this._$AE(s4); } willUpdate(t3) { } _$AE(t3) { this._$EO?.forEach((t4) => t4.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t3)), this.updated(t3); } _$EM() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t3) { return true; } update(t3) { this._$Eq && (this._$Eq = this._$Eq.forEach((t4) => this._$ET(t4, this[t4]))), this._$EM(); } updated(t3) { } firstUpdated(t3) { } }; y2.elementStyles = [], y2.shadowRootOptions = { mode: "open" }, y2[d2("elementProperties")] = /* @__PURE__ */ new Map(), y2[d2("finalized")] = /* @__PURE__ */ new Map(), p2?.({ ReactiveElement: y2 }), (a2.reactiveElementVersions ?? (a2.reactiveElementVersions = [])).push("2.1.1"); // node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js var s3 = globalThis; var i4 = class extends y2 { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { var _a; const t3 = super.createRenderRoot(); return (_a = this.renderOptions).renderBefore ?? (_a.renderBefore = t3.firstChild), t3; } update(t3) { const r4 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t3), this._$Do = B(r4, this.renderRoot, this.renderOptions); } connectedCallback() { super.connectedCallback(), this._$Do?.setConnected(true); } disconnectedCallback() { super.disconnectedCallback(), this._$Do?.setConnected(false); } render() { return T; } }; i4._$litElement$ = true, i4["finalized"] = true, s3.litElementHydrateSupport?.({ LitElement: i4 }); var o4 = s3.litElementPolyfillSupport; o4?.({ LitElement: i4 }); (s3.litElementVersions ?? (s3.litElementVersions = [])).push("4.2.1"); export { x, b, T, E, Z, B, i2 as i, i4 as i2 }; /*! Bundled license information: lit-html/lit-html.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/css-tag.js: (** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/reactive-element.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-element/lit-element.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/is-server.js: (** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) */ //# sourceMappingURL=chunk-6JX5B4GC.js.map