const L = globalThis, Y = L.ShadowRoot && (L.ShadyCSS === void 0 || L.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, tt = /* @__PURE__ */ Symbol(), rt = /* @__PURE__ */ new WeakMap(); let Nt = class { constructor(t, e, n) { if (this._$cssResult$ = !0, n !== tt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t, this.t = e; } get styleSheet() { let t = this.o; const e = this.t; if (Y && t === void 0) { const n = e !== void 0 && e.length === 1; n && (t = rt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && rt.set(e, t)); } return t; } toString() { return this.cssText; } }; const b = (i) => new Nt(typeof i == "string" ? i : i + "", void 0, tt), Tt = (i, ...t) => { const e = i.length === 1 ? i[0] : t.reduce((n, s, r) => n + ((o) => { if (o._$cssResult$ === !0) return o.cssText; if (typeof o == "number") return o; throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(s) + i[r + 1], i[0]); return new Nt(e, i, tt); }, It = (i, t) => { if (Y) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); else for (const e of t) { const n = document.createElement("style"), s = L.litNonce; s !== void 0 && n.setAttribute("nonce", s), n.textContent = e.cssText, i.appendChild(n); } }, ot = Y ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { let e = ""; for (const n of t.cssRules) e += n.cssText; return b(e); })(i) : i; const { is: Ht, defineProperty: jt, getOwnPropertyDescriptor: Lt, getOwnPropertyNames: Rt, getOwnPropertySymbols: Bt, getPrototypeOf: Ft } = Object, F = globalThis, at = F.trustedTypes, Qt = at ? at.emptyScript : "", Wt = F.reactiveElementPolyfillSupport, U = (i, t) => i, X = { toAttribute(i, t) { switch (t) { case Boolean: i = i ? Qt : null; break; case Object: case Array: i = i == null ? i : JSON.stringify(i); } return i; }, fromAttribute(i, t) { let e = i; switch (t) { case Boolean: e = i !== null; break; case Number: e = i === null ? null : Number(i); break; case Object: case Array: try { e = JSON.parse(i); } catch { e = null; } } return e; } }, Mt = (i, t) => !Ht(i, t), lt = { attribute: !0, type: String, converter: X, reflect: !1, useDefault: !1, hasChanged: Mt }; Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), F.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); let T = class extends HTMLElement { static addInitializer(t) { this._$Ei(), (this.l ??= []).push(t); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t, e = lt) { if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) { const n = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(t, n, e); s !== void 0 && jt(this.prototype, t, s); } } static getPropertyDescriptor(t, e, n) { const { get: s, set: r } = Lt(this.prototype, t) ?? { get() { return this[e]; }, set(o) { this[e] = o; } }; return { get: s, set(o) { const l = s?.call(this); r?.call(this, o), this.requestUpdate(t, l, n); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(t) { return this.elementProperties.get(t) ?? lt; } static _$Ei() { if (this.hasOwnProperty(U("elementProperties"))) return; const t = Ft(this); t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); } static finalize() { if (this.hasOwnProperty(U("finalized"))) return; if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) { const e = this.properties, n = [...Rt(e), ...Bt(e)]; for (const s of n) this.createProperty(s, e[s]); } const t = this[Symbol.metadata]; if (t !== null) { const e = litPropertyMetadata.get(t); if (e !== void 0) for (const [n, s] of e) this.elementProperties.set(n, s); } this._$Eh = /* @__PURE__ */ new Map(); for (const [e, n] of this.elementProperties) { const s = this._$Eu(e, n); s !== void 0 && this._$Eh.set(s, e); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(t) { const e = []; if (Array.isArray(t)) { const n = new Set(t.flat(1 / 0).reverse()); for (const s of n) e.unshift(ot(s)); } else t !== void 0 && e.push(ot(t)); return e; } static _$Eu(t, e) { const n = e.attribute; return n === !1 ? void 0 : typeof n == "string" ? n : 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 = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this)); } addController(t) { (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.(); } removeController(t) { this._$EO?.delete(t); } _$E_() { const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties; for (const n of e.keys()) this.hasOwnProperty(n) && (t.set(n, this[n]), delete this[n]); t.size > 0 && (this._$Ep = t); } createRenderRoot() { const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return It(t, this.constructor.elementStyles), t; } connectedCallback() { this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.()); } enableUpdating(t) { } disconnectedCallback() { this._$EO?.forEach((t) => t.hostDisconnected?.()); } attributeChangedCallback(t, e, n) { this._$AK(t, n); } _$ET(t, e) { const n = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, n); if (s !== void 0 && n.reflect === !0) { const r = (n.converter?.toAttribute !== void 0 ? n.converter : X).toAttribute(e, n.type); this._$Em = t, r == null ? this.removeAttribute(s) : this.setAttribute(s, r), this._$Em = null; } } _$AK(t, e) { const n = this.constructor, s = n._$Eh.get(t); if (s !== void 0 && this._$Em !== s) { const r = n.getPropertyOptions(s), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : X; this._$Em = s; const l = o.fromAttribute(e, r.type); this[s] = l ?? this._$Ej?.get(s) ?? l, this._$Em = null; } } requestUpdate(t, e, n, s = !1, r) { if (t !== void 0) { const o = this.constructor; if (s === !1 && (r = this[t]), n ??= o.getPropertyOptions(t), !((n.hasChanged ?? Mt)(r, e) || n.useDefault && n.reflect && r === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, n)))) return; this.C(t, e, n); } this.isUpdatePending === !1 && (this._$ES = this._$EP()); } C(t, e, { useDefault: n, reflect: s, wrapped: r }, o) { n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), r !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || n || (e = void 0), this._$AL.set(t, e)), s === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t)); } async _$EP() { this.isUpdatePending = !0; try { await this._$ES; } catch (e) { Promise.reject(e); } const t = this.scheduleUpdate(); return t != null && await t, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { for (const [s, r] of this._$Ep) this[s] = r; this._$Ep = void 0; } const n = this.constructor.elementProperties; if (n.size > 0) for (const [s, r] of n) { const { wrapped: o } = r, l = this[s]; o !== !0 || this._$AL.has(s) || l === void 0 || this.C(s, void 0, r, l); } } let t = !1; const e = this._$AL; try { t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((n) => n.hostUpdate?.()), this.update(e)) : this._$EM(); } catch (n) { throw t = !1, this._$EM(), n; } t && this._$AE(e); } willUpdate(t) { } _$AE(t) { this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); } _$EM() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t) { return !0; } update(t) { this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM(); } updated(t) { } firstUpdated(t) { } }; T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[U("elementProperties")] = /* @__PURE__ */ new Map(), T[U("finalized")] = /* @__PURE__ */ new Map(), Wt?.({ ReactiveElement: T }), (F.reactiveElementVersions ??= []).push("2.1.2"); const et = globalThis, dt = (i) => i, R = et.trustedTypes, pt = R ? R.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, zt = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, Pt = "?" + x, Zt = `<${Pt}>`, S = document, D = () => S.createComment(""), I = (i) => i === null || typeof i != "object" && typeof i != "function", nt = Array.isArray, Vt = (i) => nt(i) || typeof i?.[Symbol.iterator] == "function", W = `[ \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ct = /-->/g, ht = />/g, q = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), ut = /'/g, ft = /"/g, Ot = /^(?:script|style|textarea|title)$/i, Kt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = Kt(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), mt = /* @__PURE__ */ new WeakMap(), A = S.createTreeWalker(S, 129); function Ut(i, t) { if (!nt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array"); return pt !== void 0 ? pt.createHTML(t) : t; } const Jt = (i, t) => { const e = i.length - 1, n = []; let s, r = t === 2 ? "" : t === 3 ? "" : "")), n]; }; class H { constructor({ strings: t, _$litType$: e }, n) { let s; this.parts = []; let r = 0, o = 0; const l = t.length - 1, a = this.parts, [p, u] = Jt(t, e); if (this.el = H.createElement(p, n), A.currentNode = this.el.content, e === 2 || e === 3) { const d = this.el.content.firstChild; d.replaceWith(...d.childNodes); } for (; (s = A.nextNode()) !== null && a.length < l; ) { if (s.nodeType === 1) { if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(zt)) { const h = u[o++], c = s.getAttribute(d).split(x), f = /([.?@])?(.*)/.exec(h); a.push({ type: 1, index: r, name: f[2], strings: c, ctor: f[1] === "." ? Xt : f[1] === "?" ? Yt : f[1] === "@" ? te : Q }), s.removeAttribute(d); } else d.startsWith(x) && (a.push({ type: 6, index: r }), s.removeAttribute(d)); if (Ot.test(s.tagName)) { const d = s.textContent.split(x), h = d.length - 1; if (h > 0) { s.textContent = R ? R.emptyScript : ""; for (let c = 0; c < h; c++) s.append(d[c], D()), A.nextNode(), a.push({ type: 2, index: ++r }); s.append(d[h], D()); } } } else if (s.nodeType === 8) if (s.data === Pt) a.push({ type: 2, index: r }); else { let d = -1; for (; (d = s.data.indexOf(x, d + 1)) !== -1; ) a.push({ type: 7, index: r }), d += x.length - 1; } r++; } } static createElement(t, e) { const n = S.createElement("template"); return n.innerHTML = t, n; } } function M(i, t, e = i, n) { if (t === E) return t; let s = n !== void 0 ? e._$Co?.[n] : e._$Cl; const r = I(t) ? void 0 : t._$litDirective$; return s?.constructor !== r && (s?._$AO?.(!1), r === void 0 ? s = void 0 : (s = new r(i), s._$AT(i, e, n)), n !== void 0 ? (e._$Co ??= [])[n] = s : e._$Cl = s), s !== void 0 && (t = M(i, s._$AS(i, t.values), s, n)), t; } class Gt { constructor(t, e) { this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t) { const { el: { content: e }, parts: n } = this._$AD, s = (t?.creationScope ?? S).importNode(e, !0); A.currentNode = s; let r = A.nextNode(), o = 0, l = 0, a = n[0]; for (; a !== void 0; ) { if (o === a.index) { let p; a.type === 2 ? p = new z(r, r.nextSibling, this, t) : a.type === 1 ? p = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (p = new ee(r, this, t)), this._$AV.push(p), a = n[++l]; } o !== a?.index && (r = A.nextNode(), o++); } return A.currentNode = S, s; } p(t) { let e = 0; for (const n of this._$AV) n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++; } } class z { get _$AU() { return this._$AM?._$AU ?? this._$Cv; } constructor(t, e, n, s) { this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = s, this._$Cv = s?.isConnected ?? !0; } get parentNode() { let t = this._$AA.parentNode; const e = this._$AM; return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t, e = this) { t = M(this, t, e), I(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Vt(t) ? this.k(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 !== m && I(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t; } $(t) { const { values: e, _$litType$: n } = t, s = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = H.createElement(Ut(n.h, n.h[0]), this.options)), n); if (this._$AH?._$AD === s) this._$AH.p(e); else { const r = new Gt(s, this), o = r.u(this.options); r.p(e), this.T(o), this._$AH = r; } } _$AC(t) { let e = mt.get(t.strings); return e === void 0 && mt.set(t.strings, e = new H(t)), e; } k(t) { nt(this._$AH) || (this._$AH = [], this._$AR()); const e = this._$AH; let n, s = 0; for (const r of t) s === e.length ? e.push(n = new z(this.O(D()), this.O(D()), this, this.options)) : n = e[s], n._$AI(r), s++; s < e.length && (this._$AR(n && n._$AB.nextSibling, s), e.length = s); } _$AR(t = this._$AA.nextSibling, e) { for (this._$AP?.(!1, !0, e); t !== this._$AB; ) { const n = dt(t).nextSibling; dt(t).remove(), t = n; } } setConnected(t) { this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t)); } } class Q { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t, e, n, s, r) { this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = m; } _$AI(t, e = this, n, s) { const r = this.strings; let o = !1; if (r === void 0) t = M(this, t, e, 0), o = !I(t) || t !== this._$AH && t !== E, o && (this._$AH = t); else { const l = t; let a, p; for (t = r[0], a = 0; a < r.length - 1; a++) p = M(this, l[n + a], e, a), p === E && (p = this._$AH[a]), o ||= !I(p) || p !== this._$AH[a], p === m ? t = m : t !== m && (t += (p ?? "") + r[a + 1]), this._$AH[a] = p; } o && !s && this.j(t); } j(t) { t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? ""); } } class Xt extends Q { constructor() { super(...arguments), this.type = 3; } j(t) { this.element[this.name] = t === m ? void 0 : t; } } class Yt extends Q { constructor() { super(...arguments), this.type = 4; } j(t) { this.element.toggleAttribute(this.name, !!t && t !== m); } } class te extends Q { constructor(t, e, n, s, r) { super(t, e, n, s, r), this.type = 5; } _$AI(t, e = this) { if ((t = M(this, t, e, 0) ?? m) === E) return; const n = this._$AH, s = t === m && n !== m || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, r = t !== m && (n === m || s); s && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, t), this._$AH = t; } handleEvent(t) { typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t); } } class ee { constructor(t, e, n) { this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n; } get _$AU() { return this._$AM._$AU; } _$AI(t) { M(this, t); } } const ne = { I: z }, ie = et.litHtmlPolyfillSupport; ie?.(H, z), (et.litHtmlVersions ??= []).push("3.3.3"); const se = (i, t, e) => { const n = e?.renderBefore ?? t; let s = n._$litPart$; if (s === void 0) { const r = e?.renderBefore ?? null; n._$litPart$ = s = new z(t.insertBefore(D(), r), r, void 0, e ?? {}); } return s._$AI(i), s; }; const it = globalThis; let C = class extends T { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { const t = super.createRenderRoot(); return this.renderOptions.renderBefore ??= t.firstChild, t; } update(t) { const e = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = se(e, this.renderRoot, this.renderOptions); } connectedCallback() { super.connectedCallback(), this._$Do?.setConnected(!0); } disconnectedCallback() { super.disconnectedCallback(), this._$Do?.setConnected(!1); } render() { return E; } }; C._$litElement$ = !0, C.finalized = !0, it.litElementHydrateSupport?.({ LitElement: C }); const re = it.litElementPolyfillSupport; re?.({ LitElement: C }); (it.litElementVersions ??= []).push("4.2.2"); const Dt = ':host{--nq-p-parchment-top: #f0e4c7;--nq-p-parchment-bottom: #ddcca3;--nq-p-parchment: radial-gradient(ellipse at 25% 10%, rgba(255,255,255,.5), transparent 55%), radial-gradient(ellipse at 85% 90%, rgba(120,86,44,.28), transparent 60%), repeating-linear-gradient(93deg, rgba(150,115,70,.05) 0 2px, transparent 2px 6px), repeating-linear-gradient(2deg, rgba(150,115,70,.04) 0 3px, transparent 3px 7px), linear-gradient(var(--nq-p-parchment-top), var(--nq-p-parchment-bottom));--nq-p-vignette: inset 0 0 200px rgba(80,52,20,.35);--nq-p-card-open: linear-gradient(#fdf7e6, #f2e7c9);--nq-p-card-done: linear-gradient(#f0e8d3, #e6dcc2);--nq-p-card-panel: linear-gradient(#fcf6e6, #f1e6ca);--nq-p-card-border: rgba(120,88,48,.38);--nq-p-panel-border: rgba(92,62,26,.4);--nq-p-card-shadow: 0 3px 0 rgba(120,88,48,.2), inset 0 1px 0 rgba(255,255,255,.7);--nq-p-panel-shadow: 0 6px 0 rgba(92,62,26,.18), inset 0 2px 0 rgba(255,255,255,.7);--nq-p-frame-outer: 2px solid rgba(92,62,26,.45);--nq-p-frame-inner: 1px solid rgba(92,62,26,.28);--nq-p-rule: 2px solid rgba(92,62,26,.35);--nq-p-ink: #2b1f14;--nq-p-ink-secondary: #5c452a;--nq-p-ink-muted: #6f6455;--nq-p-ink-away: #4d4433;--nq-p-ink-late: #8f1526;--nq-brand-blue: #3B3AB8;--nq-brand-purple: #A035CC;--nq-brand-gradient: linear-gradient(135deg, var(--nq-brand-blue), var(--nq-brand-purple));--nq-p-icon-tile: var(--nq-brand-gradient);--nq-p-icon-tile-done: rgba(92,62,26,.16);--nq-p-crest: var(--nq-brand-gradient);--nq-p-crest-away: linear-gradient(135deg, #6b6b7a, #7a7286);--nq-p-seal: radial-gradient(circle at 35% 30%, #a8283a, #6d1322);--nq-p-seal-shadow: 0 4px 10px rgba(60,10,20,.4), inset 0 0 0 4px rgba(255,255,255,.14);--nq-p-seal-size: 78px;--nq-p-dock-bg: rgba(43,31,20,.9);--nq-p-dock-ink: #f7efdb;--nq-p-dock-ink-secondary: #d8c9a6;--nq-p-dock-divider: rgba(233,220,189,.3);--nq-p-dock-height: 84px;--nq-p-font-display: "Cinzel Decorative", Cinzel, serif;--nq-p-font-heading: Cinzel, serif;--nq-p-font-body: Nunito, system-ui, sans-serif;--nq-p-size-hero: 86px;--nq-p-size-wordmark: 66px;--nq-p-size-title: 56px;--nq-p-size-name: 48px;--nq-p-size-section: 32px;--nq-p-size-quest: 30px;--nq-p-size-body: 22px;--nq-p-size-label: 21px;--nq-p-track-label: .14em;--nq-p-track-kicker: .3em;--nq-p-quest-min-height: 116px;--nq-p-quest-gap: 24px;--nq-p-quest-pad: 22px;--nq-p-tile-size: 64px;--nq-p-button-height: 72px;--nq-p-button-min-width: 150px;--nq-p-confirm-button: 108px;--nq-p-radius-card: 12px;--nq-p-radius-panel: 20px;--nq-p-radius-pill: 9999px;--nq-p-page-inset: 62px;--nq-p-frame-inset: 26px;--nq-ease-out: cubic-bezier(0, 0, .2, 1);--nq-dur-micro: .12s;--nq-dur-base: .2s;--nq-dur-modal: .35s}'; function st(i) { window.customCards = window.customCards ?? [], window.customCards.push(i); } const gt = /* @__PURE__ */ new Map(); function B(i, t) { const e = `${i ?? "local"}|${JSON.stringify(t)}`, n = gt.get(e); if (n) return n; let s; try { s = new Intl.DateTimeFormat("en-US", { ...t, ...i ? { timeZone: i } : {} }); } catch { s = new Intl.DateTimeFormat("en-US", t); } return gt.set(e, s), s; } function oe(i) { const t = i?.config; if (!t || typeof t != "object") return; const e = t.time_zone; return typeof e == "string" && e.trim() ? e.trim() : void 0; } function Z(i, t) { return `${B(t, { weekday: "long" }).format(i)}, ${B(t, { month: "short", day: "numeric" }).format(i)}`; } function ae(i, t) { return B(t, { hour: "numeric", minute: "2-digit", hour12: !0 }).format(i); } const le = { "clear-night": "Clear", cloudy: "Cloudy", exceptional: "Clear", fog: "Foggy", hail: "Hail", lightning: "Storms", "lightning-rimmed": "Storms", partlycloudy: "Partly cloudy", pouring: "Heavy rain", rainy: "Rain", snowy: "Snow", "snowy-rainy": "Sleet", sunny: "Sunny", windy: "Windy", "windy-variant": "Windy" }, de = { "clear-night": "Clear night skies", cloudy: "Grey skies today", exceptional: "A striking day", fog: "Mist on the road", hail: "Ice from the sky", lightning: "Storms may roll in", "lightning-rimmed": "Storms may roll in", partlycloudy: "Sun between clouds", pouring: "Heavy rain outside", rainy: "Rain on the walls", snowy: "Snow on the peaks", "snowy-rainy": "Sleet may fall", sunny: "Clear skies today", windy: "A blustery day", "windy-variant": "A blustery day" }; function _t(i) { return typeof i == "string" ? i.trim() : ""; } function V(i, t) { if (i == null || i === "") return t; const e = typeof i == "number" ? i : Number(i); return Number.isFinite(e) ? e : t; } function yt(i) { return Number.isFinite(i) ? Math.min(100, Math.max(0, i)) : 0; } function bt(i) { return Math.max(0, Math.round(i)); } function pe(i) { return i.split(/[-_]+/).filter(Boolean).map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" "); } function ce(i, t) { const e = B(t, { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", hourCycle: "h23" }).formatToParts(new Date(i)), n = (r) => { const o = e.find((l) => l.type === r); return o ? Number(o.value) : Number.NaN; }, s = Date.UTC( n("year"), n("month") - 1, n("day"), n("hour"), n("minute"), n("second") ); return Number.isFinite(s) ? s - i : 0; } function he(i, t) { if (typeof i != "string") return null; const e = i.split("-"); if (e.length !== 3) return null; const [n, s, r] = e.map((a) => Number(a)); if (!n || !s || !r) return null; if (!t) { const a = new Date(n, s - 1, r); return Number.isNaN(a.getTime()) ? null : a; } const o = Date.UTC(n, s - 1, r), l = new Date(o - ce(o, t)); return Number.isNaN(l.getTime()) ? null : l; } function ue(i) { const t = le[i]; return t || i.charAt(0).toUpperCase() + i.slice(1); } function fe(i, t) { return de[i] ?? t; } const vt = "polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%)", me = "polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%)", ge = Tt` * { box-sizing: border-box; } :host { display: block; height: 100%; --nq-brand-gradient-h: linear-gradient( 90deg, var(--nq-brand-blue), var(--nq-brand-purple) ); } .board { position: relative; display: flex; flex-direction: column; align-items: center; height: 1080px; padding: 0; overflow: hidden; background: var(--nq-p-parchment); box-shadow: var(--nq-p-vignette); font-family: var(--nq-p-font-body); } .frame { position: absolute; pointer-events: none; } .frame-outer { inset: 26px; border: var(--nq-p-frame-outer); border-radius: 14px; } .frame-inner { inset: 36px; border: var(--nq-p-frame-inner); border-radius: 8px; } .wordmark-row { position: absolute; top: 64px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 26px; width: 100%; } .rule { flex: 1 1 0; max-width: 340px; height: 2px; border-radius: 1px; background: rgba(92, 62, 26, 0.35); } .d20 { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; clip-path: ${b(me)}; background: var(--nq-brand-gradient); } .d20-numeral { font-family: var(--nq-p-font-heading); font-size: 15px; font-weight: 700; line-height: 1; color: #ffffff; } .wordmark { font-family: var(--nq-p-font-display); font-size: var(--nq-p-size-wordmark); font-weight: 900; line-height: 1.15; background: var(--nq-brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; } .kicker { position: absolute; top: 154px; left: 0; right: 0; font-family: var(--nq-p-font-heading); font-size: 22px; font-weight: 600; letter-spacing: var(--nq-p-track-kicker); text-transform: uppercase; line-height: 1.2; text-align: center; color: var(--nq-p-ink-secondary); } .plates { position: absolute; top: 262px; left: 110px; right: 110px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; } .plate { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; height: 600px; padding: 44px 28px 40px; border: 2px solid var(--nq-p-panel-border); border-radius: var(--nq-p-radius-panel); background: var(--nq-p-card-panel); box-shadow: var(--nq-p-panel-shadow); font: inherit; } button.plate { width: 100%; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--nq-dur-micro) var(--nq-ease-out); } button.plate:active { transform: scale(0.98); } button.plate:focus-visible { outline: 3px solid var(--nq-brand-purple); outline-offset: 4px; } .plate.away { border: 2px dashed var(--nq-p-panel-border); background: linear-gradient(#f2ecdd, #e6dcc6); box-shadow: none; } .crest { position: relative; flex: none; width: 188px; height: 214px; padding: 4px; clip-path: ${b(vt)}; background: rgba(255, 255, 255, 0.22); } .crest-face { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding-bottom: 70px; clip-path: ${b(vt)}; background: var(--nq-p-crest); } .crest.away .crest-face { background: var(--nq-p-crest-away); } .crest .initial { font-family: var(--nq-p-font-display); font-size: 82px; font-weight: 700; line-height: 1; color: #ffffff; } .name { font-family: var(--nq-p-font-heading); font-size: var(--nq-p-size-name); font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; color: var(--nq-p-ink); } .plate.away .name { color: var(--nq-p-ink-away); } .pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 20px; border-radius: var(--nq-p-radius-pill); background: rgba(22, 120, 60, 0.35); font-family: var(--nq-p-font-heading); font-size: 22px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; color: #146b36; } .pill svg { width: 22px; height: 22px; color: #157a3c; } .pill.away { background: rgba(92, 62, 26, 0.16); color: var(--nq-p-ink-away); } .pill.away svg { color: var(--nq-p-ink-away); } .progress-line { font-family: var(--nq-p-font-heading); font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--nq-p-ink-secondary); } .bar { width: 100%; height: 16px; border: 1px solid rgba(92, 62, 26, 0.35); border-radius: var(--nq-p-radius-pill); background: rgba(92, 62, 26, 0.18); overflow: hidden; } .bar .fill { display: block; height: 100%; border-radius: inherit; background: var(--nq-brand-gradient-h); } .hint { position: absolute; top: 930px; left: 0; right: 0; font-family: var(--nq-p-font-body); font-size: 24px; font-weight: 600; line-height: 1.4; text-align: center; color: var(--nq-p-ink-secondary); } .spacer { flex: 1 1 0; } .dock { position: absolute; left: 46px; right: 46px; bottom: 46px; height: var(--nq-p-dock-height); display: flex; align-items: center; justify-content: center; gap: 24px; padding: 0 40px; border-radius: 14px; background: var(--nq-p-dock-bg); pointer-events: none; user-select: none; color: var(--nq-p-dock-ink); } .dock svg { flex: none; width: 40px; height: 40px; color: var(--nq-p-dock-ink); } .dock .divider { flex: none; width: 1px; height: 40px; background: var(--nq-p-dock-divider); } .dock .temp { font-family: var(--nq-p-font-body); font-size: 38px; font-weight: 800; line-height: 1; } .dock .condition { font-family: var(--nq-p-font-body); font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--nq-p-dock-ink-secondary); } .dock .date { font-family: var(--nq-p-font-body); font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--nq-p-dock-ink-secondary); } .dock .clock { font-family: var(--nq-p-font-body); font-size: 38px; font-weight: 800; line-height: 1; } `, _e = g``, ye = g``, be = g``; class ve extends C { static properties = { hass: { attribute: !1 }, _config: { state: !0 }, _now: { state: !0 } }; static styles = [b(Dt), ge]; hass; _config; _now = /* @__PURE__ */ new Date(); _clockTimer; setConfig(t) { if (!t || typeof t != "object") throw new Error("Invalid configuration"); this._config = t; } getCardSize() { return 22; } connectedCallback() { super.connectedCallback(), this._now = /* @__PURE__ */ new Date(), this._clockTimer = window.setInterval(() => { this._now = /* @__PURE__ */ new Date(); }, 1e3); } disconnectedCallback() { this._clockTimer !== void 0 && (window.clearInterval(this._clockTimer), this._clockTimer = void 0), super.disconnectedCallback(); } render() { return g`
The Party · ${Z(this._now, this._timeZone())}
Tap your crest to open your Quest Log
${this._renderDock()}${Ee(this._now, this._timeZone())} · ${r} of ${s} claimed
${e.join(" ")}
Mark this quest complete? Once the seal is set, only a parent can undo it.