UNPKG

native-spa-route

Version:

provide SPA route's experience with native web component

1,380 lines (1,358 loc) 77.1 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a4, b2) => { for (var prop in b2 || (b2 = {})) if (__hasOwnProp.call(b2, prop)) __defNormalProp(a4, prop, b2[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b2)) { if (__propIsEnum.call(b2, prop)) __defNormalProp(a4, prop, b2[prop]); } return a4; }; var __spreadProps = (a4, b2) => __defProps(a4, __getOwnPropDescs(b2)); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); var __decorateClass = (decorators, target, key, kind) => { var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; for (var i7 = decorators.length - 1, decorator; i7 >= 0; i7--) if (decorator = decorators[i7]) result = (kind ? decorator(target, key, result) : decorator(result)) || result; if (kind && result) __defProp(target, key, result); return result; }; // node_modules/.pnpm/registry.npmmirror.com+ms@2.1.2/node_modules/ms/index.js var require_ms = __commonJS({ "node_modules/.pnpm/registry.npmmirror.com+ms@2.1.2/node_modules/ms/index.js"(exports, module) { var s6 = 1e3; var m2 = s6 * 60; var h5 = m2 * 60; var d4 = h5 * 24; var w2 = d4 * 7; var y2 = d4 * 365.25; module.exports = function(val, options) { options = options || {}; var type = typeof val; if (type === "string" && val.length > 0) { return parse(val); } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); }; function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); if (!match) { return; } var n9 = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n9 * y2; case "weeks": case "week": case "w": return n9 * w2; case "days": case "day": case "d": return n9 * d4; case "hours": case "hour": case "hrs": case "hr": case "h": return n9 * h5; case "minutes": case "minute": case "mins": case "min": case "m": return n9 * m2; case "seconds": case "second": case "secs": case "sec": case "s": return n9 * s6; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n9; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d4) { return Math.round(ms / d4) + "d"; } if (msAbs >= h5) { return Math.round(ms / h5) + "h"; } if (msAbs >= m2) { return Math.round(ms / m2) + "m"; } if (msAbs >= s6) { return Math.round(ms / s6) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d4) { return plural(ms, msAbs, d4, "day"); } if (msAbs >= h5) { return plural(ms, msAbs, h5, "hour"); } if (msAbs >= m2) { return plural(ms, msAbs, m2, "minute"); } if (msAbs >= s6) { return plural(ms, msAbs, s6, "second"); } return ms + " ms"; } function plural(ms, msAbs, n9, name) { var isPlural = msAbs >= n9 * 1.5; return Math.round(ms / n9) + " " + name + (isPlural ? "s" : ""); } } }); // node_modules/.pnpm/registry.npmmirror.com+debug@4.3.4/node_modules/debug/src/common.js var require_common = __commonJS({ "node_modules/.pnpm/registry.npmmirror.com+debug@4.3.4/node_modules/debug/src/common.js"(exports, module) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require_ms(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; for (let i7 = 0; i7 < namespace.length; i7++) { hash = (hash << 5) - hash + namespace.charCodeAt(i7); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; let namespacesCache; let enabledCache; function debug3(...args) { if (!debug3.enabled) { return; } const self = debug3; const curr = Number(new Date()); const ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { if (match === "%%") { return "%"; } index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val = args[index]; match = formatter.call(self, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self, args); const logFn = self.log || createDebug.log; logFn.apply(self, args); } debug3.namespace = namespace; debug3.useColors = createDebug.useColors(); debug3.color = createDebug.selectColor(namespace); debug3.extend = extend; debug3.destroy = createDebug.destroy; Object.defineProperty(debug3, "enabled", { enumerable: true, configurable: false, get: () => { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: (v3) => { enableOverride = v3; } }); if (typeof createDebug.init === "function") { createDebug.init(debug3); } return debug3; } function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; let i7; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; for (i7 = 0; i7 < len; i7++) { if (!split[i7]) { continue; } namespaces = split[i7].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { createDebug.names.push(new RegExp("^" + namespaces + "$")); } } } function disable() { const namespaces = [ ...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } function enabled(name) { if (name[name.length - 1] === "*") { return true; } let i7; let len; for (i7 = 0, len = createDebug.skips.length; i7 < len; i7++) { if (createDebug.skips[i7].test(name)) { return false; } } for (i7 = 0, len = createDebug.names.length; i7 < len; i7++) { if (createDebug.names[i7].test(name)) { return true; } } return false; } function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; } }); // node_modules/.pnpm/registry.npmmirror.com+debug@4.3.4/node_modules/debug/src/browser.js var require_browser = __commonJS({ "node_modules/.pnpm/registry.npmmirror.com+debug@4.3.4/node_modules/debug/src/browser.js"(exports, module) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = (() => { let warned = false; return () => { if (!warned) { warned = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff); if (!this.useColors) { return; } const c2 = "color: " + this.color; args.splice(1, 0, c2, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index++; if (match === "%c") { lastC = index; } }); args.splice(lastC, 0, c2); } exports.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports.storage.setItem("debug", namespaces); } else { exports.storage.removeItem("debug"); } } catch (error) { } } function load() { let r6; try { r6 = exports.storage.getItem("debug"); } catch (error) { } if (!r6 && typeof process !== "undefined" && "env" in process) { r6 = process.env.DEBUG; } return r6; } function localstorage() { try { return localStorage; } catch (error) { } } module.exports = require_common()(exports); var { formatters } = module.exports; formatters.j = function(v3) { try { return JSON.stringify(v3); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // src/components/route.ts var import_debug = __toESM(require_browser()); // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/css-tag.js var t = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; var e = Symbol(); var n = /* @__PURE__ */ new Map(); var s = class { constructor(t5, n9) { if (this._$cssResult$ = true, n9 !== e) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t5; } get styleSheet() { let e12 = n.get(this.cssText); return t && void 0 === e12 && (n.set(this.cssText, e12 = new CSSStyleSheet()), e12.replaceSync(this.cssText)), e12; } toString() { return this.cssText; } }; var o = (t5) => new s("string" == typeof t5 ? t5 : t5 + "", e); var r = (t5, ...n9) => { const o9 = 1 === t5.length ? t5[0] : n9.reduce((e12, n10, s6) => e12 + ((t6) => { if (true === t6._$cssResult$) return t6.cssText; if ("number" == typeof t6) return t6; throw Error("Value passed to 'css' function must be a 'css' function result: " + t6 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(n10) + t5[s6 + 1], t5[0]); return new s(o9, e); }; var i = (e12, n9) => { t ? e12.adoptedStyleSheets = n9.map((t5) => t5 instanceof CSSStyleSheet ? t5 : t5.styleSheet) : n9.forEach((t5) => { const n10 = document.createElement("style"), s6 = window.litNonce; void 0 !== s6 && n10.setAttribute("nonce", s6), n10.textContent = t5.cssText, e12.appendChild(n10); }); }; var S = t ? (t5) => t5 : (t5) => t5 instanceof CSSStyleSheet ? ((t6) => { let e12 = ""; for (const n9 of t6.cssRules) e12 += n9.cssText; return o(e12); })(t5) : t5; // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/reactive-element.js var s2; var e2 = window.trustedTypes; var r2 = e2 ? e2.emptyScript : ""; var h = window.reactiveElementPolyfillSupport; var o2 = { toAttribute(t5, i7) { switch (i7) { case Boolean: t5 = t5 ? r2 : null; break; case Object: case Array: t5 = null == t5 ? t5 : JSON.stringify(t5); } return t5; }, fromAttribute(t5, i7) { let s6 = t5; switch (i7) { case Boolean: s6 = null !== t5; break; case Number: s6 = null === t5 ? null : Number(t5); break; case Object: case Array: try { s6 = JSON.parse(t5); } catch (t6) { s6 = null; } } return s6; } }; var n2 = (t5, i7) => i7 !== t5 && (i7 == i7 || t5 == t5); var l = { attribute: true, type: String, converter: o2, reflect: false, hasChanged: n2 }; var a = class extends HTMLElement { constructor() { super(), this._$Et = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$Ei = null, this.o(); } static addInitializer(t5) { var i7; null !== (i7 = this.l) && void 0 !== i7 || (this.l = []), this.l.push(t5); } static get observedAttributes() { this.finalize(); const t5 = []; return this.elementProperties.forEach((i7, s6) => { const e12 = this._$Eh(s6, i7); void 0 !== e12 && (this._$Eu.set(e12, s6), t5.push(e12)); }), t5; } static createProperty(t5, i7 = l) { if (i7.state && (i7.attribute = false), this.finalize(), this.elementProperties.set(t5, i7), !i7.noAccessor && !this.prototype.hasOwnProperty(t5)) { const s6 = "symbol" == typeof t5 ? Symbol() : "__" + t5, e12 = this.getPropertyDescriptor(t5, s6, i7); void 0 !== e12 && Object.defineProperty(this.prototype, t5, e12); } } static getPropertyDescriptor(t5, i7, s6) { return { get() { return this[i7]; }, set(e12) { const r6 = this[t5]; this[i7] = e12, this.requestUpdate(t5, r6, s6); }, configurable: true, enumerable: true }; } static getPropertyOptions(t5) { return this.elementProperties.get(t5) || l; } static finalize() { if (this.hasOwnProperty("finalized")) return false; this.finalized = true; const t5 = Object.getPrototypeOf(this); if (t5.finalize(), this.elementProperties = new Map(t5.elementProperties), this._$Eu = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { const t6 = this.properties, i7 = [...Object.getOwnPropertyNames(t6), ...Object.getOwnPropertySymbols(t6)]; for (const s6 of i7) this.createProperty(s6, t6[s6]); } return this.elementStyles = this.finalizeStyles(this.styles), true; } static finalizeStyles(i7) { const s6 = []; if (Array.isArray(i7)) { const e12 = new Set(i7.flat(1 / 0).reverse()); for (const i8 of e12) s6.unshift(S(i8)); } else void 0 !== i7 && s6.push(S(i7)); return s6; } static _$Eh(t5, i7) { const s6 = i7.attribute; return false === s6 ? void 0 : "string" == typeof s6 ? s6 : "string" == typeof t5 ? t5.toLowerCase() : void 0; } o() { var t5; this._$Ep = new Promise((t6) => this.enableUpdating = t6), this._$AL = /* @__PURE__ */ new Map(), this._$Em(), this.requestUpdate(), null === (t5 = this.constructor.l) || void 0 === t5 || t5.forEach((t6) => t6(this)); } addController(t5) { var i7, s6; (null !== (i7 = this._$Eg) && void 0 !== i7 ? i7 : this._$Eg = []).push(t5), void 0 !== this.renderRoot && this.isConnected && (null === (s6 = t5.hostConnected) || void 0 === s6 || s6.call(t5)); } removeController(t5) { var i7; null === (i7 = this._$Eg) || void 0 === i7 || i7.splice(this._$Eg.indexOf(t5) >>> 0, 1); } _$Em() { this.constructor.elementProperties.forEach((t5, i7) => { this.hasOwnProperty(i7) && (this._$Et.set(i7, this[i7]), delete this[i7]); }); } createRenderRoot() { var t5; const s6 = null !== (t5 = this.shadowRoot) && void 0 !== t5 ? t5 : this.attachShadow(this.constructor.shadowRootOptions); return i(s6, this.constructor.elementStyles), s6; } connectedCallback() { var t5; void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), null === (t5 = this._$Eg) || void 0 === t5 || t5.forEach((t6) => { var i7; return null === (i7 = t6.hostConnected) || void 0 === i7 ? void 0 : i7.call(t6); }); } enableUpdating(t5) { } disconnectedCallback() { var t5; null === (t5 = this._$Eg) || void 0 === t5 || t5.forEach((t6) => { var i7; return null === (i7 = t6.hostDisconnected) || void 0 === i7 ? void 0 : i7.call(t6); }); } attributeChangedCallback(t5, i7, s6) { this._$AK(t5, s6); } _$ES(t5, i7, s6 = l) { var e12, r6; const h5 = this.constructor._$Eh(t5, s6); if (void 0 !== h5 && true === s6.reflect) { const n9 = (null !== (r6 = null === (e12 = s6.converter) || void 0 === e12 ? void 0 : e12.toAttribute) && void 0 !== r6 ? r6 : o2.toAttribute)(i7, s6.type); this._$Ei = t5, null == n9 ? this.removeAttribute(h5) : this.setAttribute(h5, n9), this._$Ei = null; } } _$AK(t5, i7) { var s6, e12, r6; const h5 = this.constructor, n9 = h5._$Eu.get(t5); if (void 0 !== n9 && this._$Ei !== n9) { const t6 = h5.getPropertyOptions(n9), l6 = t6.converter, a4 = null !== (r6 = null !== (e12 = null === (s6 = l6) || void 0 === s6 ? void 0 : s6.fromAttribute) && void 0 !== e12 ? e12 : "function" == typeof l6 ? l6 : null) && void 0 !== r6 ? r6 : o2.fromAttribute; this._$Ei = n9, this[n9] = a4(i7, t6.type), this._$Ei = null; } } requestUpdate(t5, i7, s6) { let e12 = true; void 0 !== t5 && (((s6 = s6 || this.constructor.getPropertyOptions(t5)).hasChanged || n2)(this[t5], i7) ? (this._$AL.has(t5) || this._$AL.set(t5, i7), true === s6.reflect && this._$Ei !== t5 && (void 0 === this._$EC && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t5, s6))) : e12 = false), !this.isUpdatePending && e12 && (this._$Ep = this._$E_()); } async _$E_() { this.isUpdatePending = true; try { await this._$Ep; } catch (t6) { Promise.reject(t6); } const t5 = this.scheduleUpdate(); return null != t5 && await t5, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { var t5; if (!this.isUpdatePending) return; this.hasUpdated, this._$Et && (this._$Et.forEach((t6, i8) => this[i8] = t6), this._$Et = void 0); let i7 = false; const s6 = this._$AL; try { i7 = this.shouldUpdate(s6), i7 ? (this.willUpdate(s6), null === (t5 = this._$Eg) || void 0 === t5 || t5.forEach((t6) => { var i8; return null === (i8 = t6.hostUpdate) || void 0 === i8 ? void 0 : i8.call(t6); }), this.update(s6)) : this._$EU(); } catch (t6) { throw i7 = false, this._$EU(), t6; } i7 && this._$AE(s6); } willUpdate(t5) { } _$AE(t5) { var i7; null === (i7 = this._$Eg) || void 0 === i7 || i7.forEach((t6) => { var i8; return null === (i8 = t6.hostUpdated) || void 0 === i8 ? void 0 : i8.call(t6); }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t5)), this.updated(t5); } _$EU() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$Ep; } shouldUpdate(t5) { return true; } update(t5) { void 0 !== this._$EC && (this._$EC.forEach((t6, i7) => this._$ES(i7, this[i7], t6)), this._$EC = void 0), this._$EU(); } updated(t5) { } firstUpdated(t5) { } }; a.finalized = true, a.elementProperties = /* @__PURE__ */ new Map(), a.elementStyles = [], a.shadowRootOptions = { mode: "open" }, null == h || h({ ReactiveElement: a }), (null !== (s2 = globalThis.reactiveElementVersions) && void 0 !== s2 ? s2 : globalThis.reactiveElementVersions = []).push("1.3.2"); // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/lit-html.js var t2; var i2 = globalThis.trustedTypes; var s3 = i2 ? i2.createPolicy("lit-html", { createHTML: (t5) => t5 }) : void 0; var e3 = `lit$${(Math.random() + "").slice(9)}$`; var o3 = "?" + e3; var n3 = `<${o3}>`; var l2 = document; var h2 = (t5 = "") => l2.createComment(t5); var r3 = (t5) => null === t5 || "object" != typeof t5 && "function" != typeof t5; var d = Array.isArray; var u = (t5) => { var i7; return d(t5) || "function" == typeof (null === (i7 = t5) || void 0 === i7 ? void 0 : i7[Symbol.iterator]); }; var c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var v = /-->/g; var a2 = />/g; var f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g; var _ = /'/g; var m = /"/g; var g = /^(?:script|style|textarea|title)$/i; var p = (t5) => (i7, ...s6) => ({ _$litType$: t5, strings: i7, values: s6 }); var $ = p(1); var y = p(2); var b = Symbol.for("lit-noChange"); var w = Symbol.for("lit-nothing"); var T = /* @__PURE__ */ new WeakMap(); var x = (t5, i7, s6) => { var e12, o9; const n9 = null !== (e12 = null == s6 ? void 0 : s6.renderBefore) && void 0 !== e12 ? e12 : i7; let l6 = n9._$litPart$; if (void 0 === l6) { const t6 = null !== (o9 = null == s6 ? void 0 : s6.renderBefore) && void 0 !== o9 ? o9 : null; n9._$litPart$ = l6 = new N(i7.insertBefore(h2(), t6), t6, void 0, null != s6 ? s6 : {}); } return l6._$AI(t5), l6; }; var A = l2.createTreeWalker(l2, 129, null, false); var C = (t5, i7) => { const o9 = t5.length - 1, l6 = []; let h5, r6 = 2 === i7 ? "<svg>" : "", d4 = c; for (let i8 = 0; i8 < o9; i8++) { const s6 = t5[i8]; let o10, u4, p3 = -1, $2 = 0; for (; $2 < s6.length && (d4.lastIndex = $2, u4 = d4.exec(s6), null !== u4); ) $2 = d4.lastIndex, d4 === c ? "!--" === u4[1] ? d4 = v : void 0 !== u4[1] ? d4 = a2 : void 0 !== u4[2] ? (g.test(u4[2]) && (h5 = RegExp("</" + u4[2], "g")), d4 = f) : void 0 !== u4[3] && (d4 = f) : d4 === f ? ">" === u4[0] ? (d4 = null != h5 ? h5 : c, p3 = -1) : void 0 === u4[1] ? p3 = -2 : (p3 = d4.lastIndex - u4[2].length, o10 = u4[1], d4 = void 0 === u4[3] ? f : '"' === u4[3] ? m : _) : d4 === m || d4 === _ ? d4 = f : d4 === v || d4 === a2 ? d4 = c : (d4 = f, h5 = void 0); const y2 = d4 === f && t5[i8 + 1].startsWith("/>") ? " " : ""; r6 += d4 === c ? s6 + n3 : p3 >= 0 ? (l6.push(o10), s6.slice(0, p3) + "$lit$" + s6.slice(p3) + e3 + y2) : s6 + e3 + (-2 === p3 ? (l6.push(void 0), i8) : y2); } const u3 = r6 + (t5[o9] || "<?>") + (2 === i7 ? "</svg>" : ""); if (!Array.isArray(t5) || !t5.hasOwnProperty("raw")) throw Error("invalid template strings array"); return [void 0 !== s3 ? s3.createHTML(u3) : u3, l6]; }; var E = class { constructor({ strings: t5, _$litType$: s6 }, n9) { let l6; this.parts = []; let r6 = 0, d4 = 0; const u3 = t5.length - 1, c2 = this.parts, [v3, a4] = C(t5, s6); if (this.el = E.createElement(v3, n9), A.currentNode = this.el.content, 2 === s6) { const t6 = this.el.content, i7 = t6.firstChild; i7.remove(), t6.append(...i7.childNodes); } for (; null !== (l6 = A.nextNode()) && c2.length < u3; ) { if (1 === l6.nodeType) { if (l6.hasAttributes()) { const t6 = []; for (const i7 of l6.getAttributeNames()) if (i7.endsWith("$lit$") || i7.startsWith(e3)) { const s7 = a4[d4++]; if (t6.push(i7), void 0 !== s7) { const t7 = l6.getAttribute(s7.toLowerCase() + "$lit$").split(e3), i8 = /([.?@])?(.*)/.exec(s7); c2.push({ type: 1, index: r6, name: i8[2], strings: t7, ctor: "." === i8[1] ? M : "?" === i8[1] ? H : "@" === i8[1] ? I : S2 }); } else c2.push({ type: 6, index: r6 }); } for (const i7 of t6) l6.removeAttribute(i7); } if (g.test(l6.tagName)) { const t6 = l6.textContent.split(e3), s7 = t6.length - 1; if (s7 > 0) { l6.textContent = i2 ? i2.emptyScript : ""; for (let i7 = 0; i7 < s7; i7++) l6.append(t6[i7], h2()), A.nextNode(), c2.push({ type: 2, index: ++r6 }); l6.append(t6[s7], h2()); } } } else if (8 === l6.nodeType) if (l6.data === o3) c2.push({ type: 2, index: r6 }); else { let t6 = -1; for (; -1 !== (t6 = l6.data.indexOf(e3, t6 + 1)); ) c2.push({ type: 7, index: r6 }), t6 += e3.length - 1; } r6++; } } static createElement(t5, i7) { const s6 = l2.createElement("template"); return s6.innerHTML = t5, s6; } }; function P(t5, i7, s6 = t5, e12) { var o9, n9, l6, h5; if (i7 === b) return i7; let d4 = void 0 !== e12 ? null === (o9 = s6._$Cl) || void 0 === o9 ? void 0 : o9[e12] : s6._$Cu; const u3 = r3(i7) ? void 0 : i7._$litDirective$; return (null == d4 ? void 0 : d4.constructor) !== u3 && (null === (n9 = null == d4 ? void 0 : d4._$AO) || void 0 === n9 || n9.call(d4, false), void 0 === u3 ? d4 = void 0 : (d4 = new u3(t5), d4._$AT(t5, s6, e12)), void 0 !== e12 ? (null !== (l6 = (h5 = s6)._$Cl) && void 0 !== l6 ? l6 : h5._$Cl = [])[e12] = d4 : s6._$Cu = d4), void 0 !== d4 && (i7 = P(t5, d4._$AS(t5, i7.values), d4, e12)), i7; } var V = class { constructor(t5, i7) { this.v = [], this._$AN = void 0, this._$AD = t5, this._$AM = i7; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } p(t5) { var i7; const { el: { content: s6 }, parts: e12 } = this._$AD, o9 = (null !== (i7 = null == t5 ? void 0 : t5.creationScope) && void 0 !== i7 ? i7 : l2).importNode(s6, true); A.currentNode = o9; let n9 = A.nextNode(), h5 = 0, r6 = 0, d4 = e12[0]; for (; void 0 !== d4; ) { if (h5 === d4.index) { let i8; 2 === d4.type ? i8 = new N(n9, n9.nextSibling, this, t5) : 1 === d4.type ? i8 = new d4.ctor(n9, d4.name, d4.strings, this, t5) : 6 === d4.type && (i8 = new L(n9, this, t5)), this.v.push(i8), d4 = e12[++r6]; } h5 !== (null == d4 ? void 0 : d4.index) && (n9 = A.nextNode(), h5++); } return o9; } m(t5) { let i7 = 0; for (const s6 of this.v) void 0 !== s6 && (void 0 !== s6.strings ? (s6._$AI(t5, s6, i7), i7 += s6.strings.length - 2) : s6._$AI(t5[i7])), i7++; } }; var N = class { constructor(t5, i7, s6, e12) { var o9; this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t5, this._$AB = i7, this._$AM = s6, this.options = e12, this._$Cg = null === (o9 = null == e12 ? void 0 : e12.isConnected) || void 0 === o9 || o9; } get _$AU() { var t5, i7; return null !== (i7 = null === (t5 = this._$AM) || void 0 === t5 ? void 0 : t5._$AU) && void 0 !== i7 ? i7 : this._$Cg; } get parentNode() { let t5 = this._$AA.parentNode; const i7 = this._$AM; return void 0 !== i7 && 11 === t5.nodeType && (t5 = i7.parentNode), t5; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t5, i7 = this) { t5 = P(this, t5, i7), r3(t5) ? t5 === w || null == t5 || "" === t5 ? (this._$AH !== w && this._$AR(), this._$AH = w) : t5 !== this._$AH && t5 !== b && this.$(t5) : void 0 !== t5._$litType$ ? this.T(t5) : void 0 !== t5.nodeType ? this.k(t5) : u(t5) ? this.S(t5) : this.$(t5); } M(t5, i7 = this._$AB) { return this._$AA.parentNode.insertBefore(t5, i7); } k(t5) { this._$AH !== t5 && (this._$AR(), this._$AH = this.M(t5)); } $(t5) { this._$AH !== w && r3(this._$AH) ? this._$AA.nextSibling.data = t5 : this.k(l2.createTextNode(t5)), this._$AH = t5; } T(t5) { var i7; const { values: s6, _$litType$: e12 } = t5, o9 = "number" == typeof e12 ? this._$AC(t5) : (void 0 === e12.el && (e12.el = E.createElement(e12.h, this.options)), e12); if ((null === (i7 = this._$AH) || void 0 === i7 ? void 0 : i7._$AD) === o9) this._$AH.m(s6); else { const t6 = new V(o9, this), i8 = t6.p(this.options); t6.m(s6), this.k(i8), this._$AH = t6; } } _$AC(t5) { let i7 = T.get(t5.strings); return void 0 === i7 && T.set(t5.strings, i7 = new E(t5)), i7; } S(t5) { d(this._$AH) || (this._$AH = [], this._$AR()); const i7 = this._$AH; let s6, e12 = 0; for (const o9 of t5) e12 === i7.length ? i7.push(s6 = new N(this.M(h2()), this.M(h2()), this, this.options)) : s6 = i7[e12], s6._$AI(o9), e12++; e12 < i7.length && (this._$AR(s6 && s6._$AB.nextSibling, e12), i7.length = e12); } _$AR(t5 = this._$AA.nextSibling, i7) { var s6; for (null === (s6 = this._$AP) || void 0 === s6 || s6.call(this, false, true, i7); t5 && t5 !== this._$AB; ) { const i8 = t5.nextSibling; t5.remove(), t5 = i8; } } setConnected(t5) { var i7; void 0 === this._$AM && (this._$Cg = t5, null === (i7 = this._$AP) || void 0 === i7 || i7.call(this, t5)); } }; var S2 = class { constructor(t5, i7, s6, e12, o9) { this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t5, this.name = i7, this._$AM = e12, this.options = o9, s6.length > 2 || "" !== s6[0] || "" !== s6[1] ? (this._$AH = Array(s6.length - 1).fill(new String()), this.strings = s6) : this._$AH = w; } get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } _$AI(t5, i7 = this, s6, e12) { const o9 = this.strings; let n9 = false; if (void 0 === o9) t5 = P(this, t5, i7, 0), n9 = !r3(t5) || t5 !== this._$AH && t5 !== b, n9 && (this._$AH = t5); else { const e13 = t5; let l6, h5; for (t5 = o9[0], l6 = 0; l6 < o9.length - 1; l6++) h5 = P(this, e13[s6 + l6], i7, l6), h5 === b && (h5 = this._$AH[l6]), n9 || (n9 = !r3(h5) || h5 !== this._$AH[l6]), h5 === w ? t5 = w : t5 !== w && (t5 += (null != h5 ? h5 : "") + o9[l6 + 1]), this._$AH[l6] = h5; } n9 && !e12 && this.C(t5); } C(t5) { t5 === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t5 ? t5 : ""); } }; var M = class extends S2 { constructor() { super(...arguments), this.type = 3; } C(t5) { this.element[this.name] = t5 === w ? void 0 : t5; } }; var k = i2 ? i2.emptyScript : ""; var H = class extends S2 { constructor() { super(...arguments), this.type = 4; } C(t5) { t5 && t5 !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name); } }; var I = class extends S2 { constructor(t5, i7, s6, e12, o9) { super(t5, i7, s6, e12, o9), this.type = 5; } _$AI(t5, i7 = this) { var s6; if ((t5 = null !== (s6 = P(this, t5, i7, 0)) && void 0 !== s6 ? s6 : w) === b) return; const e12 = this._$AH, o9 = t5 === w && e12 !== w || t5.capture !== e12.capture || t5.once !== e12.once || t5.passive !== e12.passive, n9 = t5 !== w && (e12 === w || o9); o9 && this.element.removeEventListener(this.name, this, e12), n9 && this.element.addEventListener(this.name, this, t5), this._$AH = t5; } handleEvent(t5) { var i7, s6; "function" == typeof this._$AH ? this._$AH.call(null !== (s6 = null === (i7 = this.options) || void 0 === i7 ? void 0 : i7.host) && void 0 !== s6 ? s6 : this.element, t5) : this._$AH.handleEvent(t5); } }; var L = class { constructor(t5, i7, s6) { this.element = t5, this.type = 6, this._$AN = void 0, this._$AM = i7, this.options = s6; } get _$AU() { return this._$AM._$AU; } _$AI(t5) { P(this, t5); } }; var R = { L: "$lit$", P: e3, V: o3, I: 1, N: C, R: V, j: u, D: P, H: N, F: S2, O: H, W: I, B: M, Z: L }; var z = window.litHtmlPolyfillSupport; null == z || z(E, N), (null !== (t2 = globalThis.litHtmlVersions) && void 0 !== t2 ? t2 : globalThis.litHtmlVersions = []).push("2.2.5"); // node_modules/.pnpm/registry.npmmirror.com+lit-element@3.2.0/node_modules/lit-element/lit-element.js var l3; var o4; var s4 = class extends a { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Dt = void 0; } createRenderRoot() { var t5, e12; const i7 = super.createRenderRoot(); return null !== (t5 = (e12 = this.renderOptions).renderBefore) && void 0 !== t5 || (e12.renderBefore = i7.firstChild), i7; } update(t5) { const i7 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t5), this._$Dt = x(i7, this.renderRoot, this.renderOptions); } connectedCallback() { var t5; super.connectedCallback(), null === (t5 = this._$Dt) || void 0 === t5 || t5.setConnected(true); } disconnectedCallback() { var t5; super.disconnectedCallback(), null === (t5 = this._$Dt) || void 0 === t5 || t5.setConnected(false); } render() { return b; } }; s4.finalized = true, s4._$litElement$ = true, null === (l3 = globalThis.litElementHydrateSupport) || void 0 === l3 || l3.call(globalThis, { LitElement: s4 }); var n4 = globalThis.litElementPolyfillSupport; null == n4 || n4({ LitElement: s4 }); (null !== (o4 = globalThis.litElementVersions) && void 0 !== o4 ? o4 : globalThis.litElementVersions = []).push("3.2.0"); // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/custom-element.js var n5 = (n9) => (e12) => "function" == typeof e12 ? ((n10, e13) => (window.customElements.define(n10, e13), e13))(n9, e12) : ((n10, e13) => { const { kind: t5, elements: i7 } = e13; return { kind: t5, elements: i7, finisher(e14) { window.customElements.define(n10, e14); } }; })(n9, e12); // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/property.js var i3 = (i7, e12) => "method" === e12.kind && e12.descriptor && !("value" in e12.descriptor) ? __spreadProps(__spreadValues({}, e12), { finisher(n9) { n9.createProperty(e12.key, i7); } }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e12.key, initializer() { "function" == typeof e12.initializer && (this[e12.key] = e12.initializer.call(this)); }, finisher(n9) { n9.createProperty(e12.key, i7); } }; function e4(e12) { return (n9, t5) => void 0 !== t5 ? ((i7, e13, n10) => { e13.constructor.createProperty(n10, i7); })(e12, n9, t5) : i3(e12, n9); } // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/state.js function t3(t5) { return e4(__spreadProps(__spreadValues({}, t5), { state: true })); } // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/base.js var o5 = ({ finisher: e12, descriptor: t5 }) => (o9, n9) => { var r6; if (void 0 === n9) { const n10 = null !== (r6 = o9.originalKey) && void 0 !== r6 ? r6 : o9.key, i7 = null != t5 ? { kind: "method", placement: "prototype", key: n10, descriptor: t5(o9.key) } : __spreadProps(__spreadValues({}, o9), { key: n10 }); return null != e12 && (i7.finisher = function(t6) { e12(t6, n10); }), i7; } { const r7 = o9.constructor; void 0 !== t5 && Object.defineProperty(o9, n9, t5(n9)), null == e12 || e12(r7, n9); } }; // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/query.js function i4(i7, n9) { return o5({ descriptor: (o9) => { const t5 = { get() { var o10, n10; return null !== (n10 = null === (o10 = this.renderRoot) || void 0 === o10 ? void 0 : o10.querySelector(i7)) && void 0 !== n10 ? n10 : null; }, enumerable: true, configurable: true }; if (n9) { const n10 = "symbol" == typeof o9 ? Symbol() : "__" + o9; t5.get = function() { var o10, t6; return void 0 === this[n10] && (this[n10] = null !== (t6 = null === (o10 = this.renderRoot) || void 0 === o10 ? void 0 : o10.querySelector(i7)) && void 0 !== t6 ? t6 : null), this[n10]; }; } return t5; } }); } // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/query-all.js function e5(e12) { return o5({ descriptor: (r6) => ({ get() { var r7, o9; return null !== (o9 = null === (r7 = this.renderRoot) || void 0 === r7 ? void 0 : r7.querySelectorAll(e12)) && void 0 !== o9 ? o9 : []; }, enumerable: true, configurable: true }) }); } // node_modules/.pnpm/registry.npmmirror.com+@lit+reactive-element@1.3.2/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js var n6; var e6 = null != (null === (n6 = window.HTMLSlotElement) || void 0 === n6 ? void 0 : n6.prototype.assignedElements) ? (o9, n9) => o9.assignedElements(n9) : (o9, n9) => o9.assignedNodes(n9).filter((o10) => o10.nodeType === Node.ELEMENT_NODE); // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/directive.js var t4 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }; var e7 = (t5) => (...e12) => ({ _$litDirective$: t5, values: e12 }); var i5 = class { constructor(t5) { } get _$AU() { return this._$AM._$AU; } _$AT(t5, e12, i7) { this._$Ct = t5, this._$AM = e12, this._$Ci = i7; } _$AS(t5, e12) { return this.update(t5, e12); } update(t5, e12) { return this.render(...e12); } }; // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/directives/unsafe-html.js var e8 = class extends i5 { constructor(i7) { if (super(i7), this.it = w, i7.type !== t4.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); } render(r6) { if (r6 === w || null == r6) return this.ft = void 0, this.it = r6; if (r6 === b) return r6; if ("string" != typeof r6) throw Error(this.constructor.directiveName + "() called with a non-string value"); if (r6 === this.it) return this.ft; this.it = r6; const s6 = [r6]; return s6.raw = s6, this.ft = { _$litType$: this.constructor.resultType, strings: s6, values: [] }; } }; e8.directiveName = "unsafeHTML", e8.resultType = 1; var o6 = e7(e8); // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/directive-helpers.js var { H: i6 } = R; var v2 = (o9, i7) => { var t5, n9; return void 0 === i7 ? void 0 !== (null === (t5 = o9) || void 0 === t5 ? void 0 : t5._$litType$) : (null === (n9 = o9) || void 0 === n9 ? void 0 : n9._$litType$) === i7; }; var r4 = (o9) => void 0 === o9.strings; var e9 = () => document.createComment(""); var u2 = (o9, t5, n9) => { var v3; const l6 = o9._$AA.parentNode, d4 = void 0 === t5 ? o9._$AB : t5._$AA; if (void 0 === n9) { const t6 = l6.insertBefore(e9(), d4), v4 = l6.insertBefore(e9(), d4); n9 = new i6(t6, v4, o9, o9.options); } else { const i7 = n9._$AB.nextSibling, t6 = n9._$AM, r6 = t6 !== o9; if (r6) { let i8; null === (v3 = n9._$AQ) || void 0 === v3 || v3.call(n9, o9), n9._$AM = o9, void 0 !== n9._$AP && (i8 = o9._$AU) !== t6._$AU && n9._$AP(i8); } if (i7 !== d4 || r6) { let o10 = n9._$AA; for (; o10 !== i7; ) { const i8 = o10.nextSibling; l6.insertBefore(o10, d4), o10 = i8; } } } return n9; }; var f2 = {}; var s5 = (o9, i7 = f2) => o9._$AH = i7; var a3 = (o9) => o9._$AH; var p2 = (o9) => { o9._$AR(); }; // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/directives/cache.js var d2 = e7(class extends i5 { constructor(t5) { super(t5), this.tt = /* @__PURE__ */ new WeakMap(); } render(t5) { return [t5]; } update(s6, [e12]) { if (v2(this.it) && (!v2(e12) || this.it.strings !== e12.strings)) { const e13 = a3(s6).pop(); let o9 = this.tt.get(this.it.strings); if (void 0 === o9) { const s7 = document.createDocumentFragment(); o9 = x(w, s7), o9.setConnected(false), this.tt.set(this.it.strings, o9); } s5(o9, [e13]), u2(o9, void 0, e13); } if (v2(e12)) { if (!v2(this.it) || this.it.strings !== e12.strings) { const t5 = this.tt.get(e12.strings); if (void 0 !== t5) { const i7 = a3(t5).pop(); p2(s6), u2(s6, void 0, i7), s5(s6, [i7]); } } this.it = e12; } else this.it = void 0; return this.render(e12); } }); // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/async-directive.js var e10 = (i7, t5) => { var s6, o9; const n9 = i7._$AN; if (void 0 === n9) return false; for (const i8 of n9) null === (o9 = (s6 = i8)._$AO) || void 0 === o9 || o9.call(s6, t5, false), e10(i8, t5); return true; }; var o7 = (i7) => { let t5, s6; do { if (void 0 === (t5 = i7._$AM)) break; s6 = t5._$AN, s6.delete(i7), i7 = t5; } while (0 === (null == s6 ? void 0 : s6.size)); }; var n7 = (i7) => { for (let t5; t5 = i7._$AM; i7 = t5) { let s6 = t5._$AN; if (void 0 === s6) t5._$AN = s6 = /* @__PURE__ */ new Set(); else if (s6.has(i7)) break; s6.add(i7), l5(t5); } }; function r5(i7) { void 0 !== this._$AN ? (o7(this), this._$AM = i7, n7(this)) : this._$AM = i7; } function h3(i7, t5 = false, s6 = 0) { const n9 = this._$AH, r6 = this._$AN; if (void 0 !== r6 && 0 !== r6.size) if (t5) if (Array.isArray(n9)) for (let i8 = s6; i8 < n9.length; i8++) e10(n9[i8], false), o7(n9[i8]); else null != n9 && (e10(n9, false), o7(n9)); else e10(this, i7); } var l5 = (i7) => { var t5, e12, o9, n9; i7.type == t4.CHILD && (null !== (t5 = (o9 = i7)._$AP) && void 0 !== t5 || (o9._$AP = h3), null !== (e12 = (n9 = i7)._$AQ) && void 0 !== e12 || (n9._$AQ = r5)); }; var d3 = class extends i5 { constructor() { super(...arguments), this._$AN = void 0; } _$AT(i7, t5, s6) { super._$AT(i7, t5, s6), n7(this), this.isConnected = i7._$AU; } _$AO(i7, t5 = true) { var s6, n9; i7 !== this.isConnected && (this.isConnected = i7, i7 ? null === (s6 = this.reconnected) || void 0 === s6 || s6.call(this) : null === (n9 = this.disconnected) || void 0 === n9 || n9.call(this)), t5 && (e10(this, i7), o7(this)); } setValue(t5) { if (r4(this._$Ct)) this._$Ct._$AI(t5, this); else { const i7 = [...this._$Ct._$AH]; i7[this._$Ci] = t5, this._$Ct._$AI(i7, this, 0); } } disconnected() { } reconnected() { } }; // node_modules/.pnpm/registry.npmmirror.com+lit-html@2.2.5/node_modules/lit-html/directives/ref.js var e11 = () => new o8(); var o8 = class { }; var h4 = /* @__PURE__ */ new WeakMap(); var n8 = e7(class extends d3 { render(t5) { return w; } update(t5, [s6]) { var e12; const o9 = s6 !== this.U; return o9 && void 0 !== this.U && this.ot(void 0), (o9 || this.rt !== this.lt) && (this.U = s6, this.ht = null === (e12 = t5.options) || void 0 === e12 ? void 0 : e12.host, this.ot(this.lt = t5.element)), w; } ot(i7) { var t5; if ("function" == typeof this.U) { const s6 = null !== (t5 = this.ht) && void 0 !== t5 ? t5 : globalThis; let e12 = h4.get(s6); void 0 === e12 && (e12 = /* @__PURE__ */ new WeakMap(), h4.set(s6, e12)), void 0 !== e12.get(this.U) && this.U.call(this.ht, void 0), e12.set(this.U, i7), void 0 !== i7 && this.U.call(this.ht, i7); } else this.U.value = i7; } get rt() { var i7, t5, s6; return "function" == typeof this.U ? null === (t5 = h4.get(null !== (i7 = this.ht) && void 0 !== i7 ? i7 : globalThis)) || void 0 === t5 ? void 0 : t5.get(this.U) : null === (s6 = this.U) || void 0 === s6 ? void 0 : s6.value; } disconnected() { this.rt === this.lt && this.ot(void 0); } reconnected() { this.ot(this.lt); } }); // src/lib/hooks.ts function hook_a_link() { document.body.addEventListener("click", (e12) => { var _a; const target = e12.composedPath()[0]; if (target.tagName === "A") { const href = target.getAttribute("href"); if (typeof href === "string") { if (href.startsWith("http")) { return; } e12.preventDefault(); history.pushState({}, (_a = target.getAttribute("title")) != null ? _a : "", href); } } }); } function hook_history_change(lifecycle) { const prototype = Reflect.getPrototypeOf(history); const originPushState = prototype.pushState; History.prototype.pushState = function pushState(data, unused, url) { var _a, _b, _c, _d; let _url = url