var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; 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 = (a2, b2) => { for (var prop in b2 || (b2 = {})) if (__hasOwnProp.call(b2, prop)) __defNormalProp(a2, prop, b2[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b2)) { if (__propIsEnum.call(b2, prop)) __defNormalProp(a2, prop, b2[prop]); } return a2; }; var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2)); var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const t$2 = window.ShadowRoot && (window.ShadyCSS === void 0 || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, e$4 = Symbol(), n$3 = new Map(); class s$3 { constructor(t2, n2) { if (this._$cssResult$ = true, n2 !== e$4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t2; } get styleSheet() { let e2 = n$3.get(this.cssText); return t$2 && e2 === void 0 && (n$3.set(this.cssText, e2 = new CSSStyleSheet()), e2.replaceSync(this.cssText)), e2; } toString() { return this.cssText; } } const o$4 = (t2) => new s$3(typeof t2 == "string" ? t2 : t2 + "", e$4), r$2 = (t2, ...n2) => { const o2 = t2.length === 1 ? t2[0] : n2.reduce((e2, n3, s2) => e2 + ((t3) => { if (t3._$cssResult$ === true) return t3.cssText; if (typeof t3 == "number") return t3; throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(n3) + t2[s2 + 1], t2[0]); return new s$3(o2, e$4); }, i$2 = (e2, n2) => { t$2 ? e2.adoptedStyleSheets = n2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet) : n2.forEach((t2) => { const n3 = document.createElement("style"), s2 = window.litNonce; s2 !== void 0 && n3.setAttribute("nonce", s2), n3.textContent = t2.cssText, e2.appendChild(n3); }); }, S$1 = t$2 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => { let e2 = ""; for (const n2 of t3.cssRules) e2 += n2.cssText; return o$4(e2); })(t2) : t2; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var s$2; const e$3 = window.trustedTypes, r$1 = e$3 ? e$3.emptyScript : "", h$1 = window.reactiveElementPolyfillSupport, o$3 = { toAttribute(t2, i2) { switch (i2) { case Boolean: t2 = t2 ? r$1 : null; break; case Object: case Array: t2 = t2 == null ? t2 : JSON.stringify(t2); } return t2; }, fromAttribute(t2, i2) { let s2 = t2; switch (i2) { case Boolean: s2 = t2 !== null; break; case Number: s2 = t2 === null ? null : Number(t2); break; case Object: case Array: try { s2 = JSON.parse(t2); } catch (t3) { s2 = null; } } return s2; } }, n$2 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$2 = { attribute: true, type: String, converter: o$3, reflect: false, hasChanged: n$2 }; class a$1 extends HTMLElement { constructor() { super(), this._$Et = new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$Ei = null, this.o(); } static addInitializer(t2) { var i2; (i2 = this.l) !== null && i2 !== void 0 || (this.l = []), this.l.push(t2); } static get observedAttributes() { this.finalize(); const t2 = []; return this.elementProperties.forEach((i2, s2) => { const e2 = this._$Eh(s2, i2); e2 !== void 0 && (this._$Eu.set(e2, s2), t2.push(e2)); }), t2; } static createProperty(t2, i2 = l$2) { if (i2.state && (i2.attribute = false), this.finalize(), this.elementProperties.set(t2, i2), !i2.noAccessor && !this.prototype.hasOwnProperty(t2)) { const s2 = typeof t2 == "symbol" ? Symbol() : "__" + t2, e2 = this.getPropertyDescriptor(t2, s2, i2); e2 !== void 0 && Object.defineProperty(this.prototype, t2, e2); } } static getPropertyDescriptor(t2, i2, s2) { return { get() { return this[i2]; }, set(e2) { const r2 = this[t2]; this[i2] = e2, this.requestUpdate(t2, r2, s2); }, configurable: true, enumerable: true }; } static getPropertyOptions(t2) { return this.elementProperties.get(t2) || l$2; } static finalize() { if (this.hasOwnProperty("finalized")) return false; this.finalized = true; const t2 = Object.getPrototypeOf(this); if (t2.finalize(), this.elementProperties = new Map(t2.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) { const t3 = this.properties, i2 = [...Object.getOwnPropertyNames(t3), ...Object.getOwnPropertySymbols(t3)]; for (const s2 of i2) this.createProperty(s2, t3[s2]); } return this.elementStyles = this.finalizeStyles(this.styles), true; } static finalizeStyles(i2) { const s2 = []; if (Array.isArray(i2)) { const e2 = new Set(i2.flat(1 / 0).reverse()); for (const i3 of e2) s2.unshift(S$1(i3)); } else i2 !== void 0 && s2.push(S$1(i2)); return s2; } static _$Eh(t2, i2) { const s2 = i2.attribute; return s2 === false ? void 0 : typeof s2 == "string" ? s2 : typeof t2 == "string" ? t2.toLowerCase() : void 0; } o() { var t2; this._$Ep = new Promise((t3) => this.enableUpdating = t3), this._$AL = new Map(), this._$Em(), this.requestUpdate(), (t2 = this.constructor.l) === null || t2 === void 0 || t2.forEach((t3) => t3(this)); } addController(t2) { var i2, s2; ((i2 = this._$Eg) !== null && i2 !== void 0 ? i2 : this._$Eg = []).push(t2), this.renderRoot !== void 0 && this.isConnected && ((s2 = t2.hostConnected) === null || s2 === void 0 || s2.call(t2)); } removeController(t2) { var i2; (i2 = this._$Eg) === null || i2 === void 0 || i2.splice(this._$Eg.indexOf(t2) >>> 0, 1); } _$Em() { this.constructor.elementProperties.forEach((t2, i2) => { this.hasOwnProperty(i2) && (this._$Et.set(i2, this[i2]), delete this[i2]); }); } createRenderRoot() { var t2; const s2 = (t2 = this.shadowRoot) !== null && t2 !== void 0 ? t2 : this.attachShadow(this.constructor.shadowRootOptions); return i$2(s2, this.constructor.elementStyles), s2; } connectedCallback() { var t2; this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => { var i2; return (i2 = t3.hostConnected) === null || i2 === void 0 ? void 0 : i2.call(t3); }); } enableUpdating(t2) { } disconnectedCallback() { var t2; (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => { var i2; return (i2 = t3.hostDisconnected) === null || i2 === void 0 ? void 0 : i2.call(t3); }); } attributeChangedCallback(t2, i2, s2) { this._$AK(t2, s2); } _$ES(t2, i2, s2 = l$2) { var e2, r2; const h2 = this.constructor._$Eh(t2, s2); if (h2 !== void 0 && s2.reflect === true) { const n2 = ((r2 = (e2 = s2.converter) === null || e2 === void 0 ? void 0 : e2.toAttribute) !== null && r2 !== void 0 ? r2 : o$3.toAttribute)(i2, s2.type); this._$Ei = t2, n2 == null ? this.removeAttribute(h2) : this.setAttribute(h2, n2), this._$Ei = null; } } _$AK(t2, i2) { var s2, e2, r2; const h2 = this.constructor, n2 = h2._$Eu.get(t2); if (n2 !== void 0 && this._$Ei !== n2) { const t3 = h2.getPropertyOptions(n2), l2 = t3.converter, a2 = (r2 = (e2 = (s2 = l2) === null || s2 === void 0 ? void 0 : s2.fromAttribute) !== null && e2 !== void 0 ? e2 : typeof l2 == "function" ? l2 : null) !== null && r2 !== void 0 ? r2 : o$3.fromAttribute; this._$Ei = n2, this[n2] = a2(i2, t3.type), this._$Ei = null; } } requestUpdate(t2, i2, s2) { let e2 = true; t2 !== void 0 && (((s2 = s2 || this.constructor.getPropertyOptions(t2)).hasChanged || n$2)(this[t2], i2) ? (this._$AL.has(t2) || this._$AL.set(t2, i2), s2.reflect === true && this._$Ei !== t2 && (this._$E_ === void 0 && (this._$E_ = new Map()), this._$E_.set(t2, s2))) : e2 = false), !this.isUpdatePending && e2 && (this._$Ep = this._$EC()); } async _$EC() { this.isUpdatePending = true; try { await this._$Ep; } catch (t3) { Promise.reject(t3); } const t2 = this.scheduleUpdate(); return t2 != null && await t2, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { var t2; if (!this.isUpdatePending) return; this.hasUpdated, this._$Et && (this._$Et.forEach((t3, i3) => this[i3] = t3), this._$Et = void 0); let i2 = false; const s2 = this._$AL; try { i2 = this.shouldUpdate(s2), i2 ? (this.willUpdate(s2), (t2 = this._$Eg) === null || t2 === void 0 || t2.forEach((t3) => { var i3; return (i3 = t3.hostUpdate) === null || i3 === void 0 ? void 0 : i3.call(t3); }), this.update(s2)) : this._$EU(); } catch (t3) { throw i2 = false, this._$EU(), t3; } i2 && this._$AE(s2); } willUpdate(t2) { } _$AE(t2) { var i2; (i2 = this._$Eg) === null || i2 === void 0 || i2.forEach((t3) => { var i3; return (i3 = t3.hostUpdated) === null || i3 === void 0 ? void 0 : i3.call(t3); }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2); } _$EU() { this._$AL = new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$Ep; } shouldUpdate(t2) { return true; } update(t2) { this._$E_ !== void 0 && (this._$E_.forEach((t3, i2) => this._$ES(i2, this[i2], t3)), this._$E_ = void 0), this._$EU(); } updated(t2) { } firstUpdated(t2) { } } a$1.finalized = true, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = { mode: "open" }, h$1 == null || h$1({ ReactiveElement: a$1 }), ((s$2 = globalThis.reactiveElementVersions) !== null && s$2 !== void 0 ? s$2 : globalThis.reactiveElementVersions = []).push("1.0.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var t$1; const i$1 = globalThis.trustedTypes, s$1 = i$1 ? i$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$2 = `lit$${(Math.random() + "").slice(9)}$`, o$2 = "?" + e$2, n$1 = `<${o$2}>`, l$1 = document, h = (t2 = "") => l$1.createComment(t2), r = (t2) => t2 === null || typeof t2 != "object" && typeof t2 != "function", d = Array.isArray, u = (t2) => { var i2; return d(t2) || typeof ((i2 = t2) === null || i2 === void 0 ? void 0 : i2[Symbol.iterator]) == "function"; }, c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, a = />/g, f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g, _ = /'/g, m = /"/g, g = /^(?:script|style|textarea)$/i, $ = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), p = $(1), b = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), x = new WeakMap(), w = (t2, i2, s2) => { var e2, o2; const n2 = (e2 = s2 == null ? void 0 : s2.renderBefore) !== null && e2 !== void 0 ? e2 : i2; let l2 = n2._$litPart$; if (l2 === void 0) { const t3 = (o2 = s2 == null ? void 0 : s2.renderBefore) !== null && o2 !== void 0 ? o2 : null; n2._$litPart$ = l2 = new N(i2.insertBefore(h(), t3), t3, void 0, s2 != null ? s2 : {}); } return l2._$AI(t2), l2; }, A = l$1.createTreeWalker(l$1, 129, null, false), C = (t2, i2) => { const o2 = t2.length - 1, l2 = []; let h2, r2 = i2 === 2 ? "" : "", d2 = c; for (let i3 = 0; i3 < o2; i3++) { const s2 = t2[i3]; let o3, u3, $2 = -1, p2 = 0; for (; p2 < s2.length && (d2.lastIndex = p2, u3 = d2.exec(s2), u3 !== null); ) p2 = d2.lastIndex, d2 === c ? u3[1] === "!--" ? d2 = v : u3[1] !== void 0 ? d2 = a : u3[2] !== void 0 ? (g.test(u3[2]) && (h2 = RegExp("" ? (d2 = h2 != null ? h2 : c, $2 = -1) : u3[1] === void 0 ? $2 = -2 : ($2 = d2.lastIndex - u3[2].length, o3 = u3[1], d2 = u3[3] === void 0 ? f : u3[3] === '"' ? m : _) : d2 === m || d2 === _ ? d2 = f : d2 === v || d2 === a ? d2 = c : (d2 = f, h2 = void 0); const y = d2 === f && t2[i3 + 1].startsWith("/>") ? " " : ""; r2 += d2 === c ? s2 + n$1 : $2 >= 0 ? (l2.push(o3), s2.slice(0, $2) + "$lit$" + s2.slice($2) + e$2 + y) : s2 + e$2 + ($2 === -2 ? (l2.push(void 0), i3) : y); } const u2 = r2 + (t2[o2] || "") + (i2 === 2 ? "" : ""); return [s$1 !== void 0 ? s$1.createHTML(u2) : u2, l2]; }; class P { constructor({ strings: t2, _$litType$: s2 }, n2) { let l2; this.parts = []; let r2 = 0, d2 = 0; const u2 = t2.length - 1, c2 = this.parts, [v2, a2] = C(t2, s2); if (this.el = P.createElement(v2, n2), A.currentNode = this.el.content, s2 === 2) { const t3 = this.el.content, i2 = t3.firstChild; i2.remove(), t3.append(...i2.childNodes); } for (; (l2 = A.nextNode()) !== null && c2.length < u2; ) { if (l2.nodeType === 1) { if (l2.hasAttributes()) { const t3 = []; for (const i2 of l2.getAttributeNames()) if (i2.endsWith("$lit$") || i2.startsWith(e$2)) { const s3 = a2[d2++]; if (t3.push(i2), s3 !== void 0) { const t4 = l2.getAttribute(s3.toLowerCase() + "$lit$").split(e$2), i3 = /([.?@])?(.*)/.exec(s3); c2.push({ type: 1, index: r2, name: i3[2], strings: t4, ctor: i3[1] === "." ? M : i3[1] === "?" ? H : i3[1] === "@" ? I : S }); } else c2.push({ type: 6, index: r2 }); } for (const i2 of t3) l2.removeAttribute(i2); } if (g.test(l2.tagName)) { const t3 = l2.textContent.split(e$2), s3 = t3.length - 1; if (s3 > 0) { l2.textContent = i$1 ? i$1.emptyScript : ""; for (let i2 = 0; i2 < s3; i2++) l2.append(t3[i2], h()), A.nextNode(), c2.push({ type: 2, index: ++r2 }); l2.append(t3[s3], h()); } } } else if (l2.nodeType === 8) if (l2.data === o$2) c2.push({ type: 2, index: r2 }); else { let t3 = -1; for (; (t3 = l2.data.indexOf(e$2, t3 + 1)) !== -1; ) c2.push({ type: 7, index: r2 }), t3 += e$2.length - 1; } r2++; } } static createElement(t2, i2) { const s2 = l$1.createElement("template"); return s2.innerHTML = t2, s2; } } function V(t2, i2, s2 = t2, e2) { var o2, n2, l2, h2; if (i2 === b) return i2; let d2 = e2 !== void 0 ? (o2 = s2._$Cl) === null || o2 === void 0 ? void 0 : o2[e2] : s2._$Cu; const u2 = r(i2) ? void 0 : i2._$litDirective$; return (d2 == null ? void 0 : d2.constructor) !== u2 && ((n2 = d2 == null ? void 0 : d2._$AO) === null || n2 === void 0 || n2.call(d2, false), u2 === void 0 ? d2 = void 0 : (d2 = new u2(t2), d2._$AT(t2, s2, e2)), e2 !== void 0 ? ((l2 = (h2 = s2)._$Cl) !== null && l2 !== void 0 ? l2 : h2._$Cl = [])[e2] = d2 : s2._$Cu = d2), d2 !== void 0 && (i2 = V(t2, d2._$AS(t2, i2.values), d2, e2)), i2; } class E { constructor(t2, i2) { this.v = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } p(t2) { var i2; const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = ((i2 = t2 == null ? void 0 : t2.creationScope) !== null && i2 !== void 0 ? i2 : l$1).importNode(s2, true); A.currentNode = o2; let n2 = A.nextNode(), h2 = 0, r2 = 0, d2 = e2[0]; for (; d2 !== void 0; ) { if (h2 === d2.index) { let i3; d2.type === 2 ? i3 = new N(n2, n2.nextSibling, this, t2) : d2.type === 1 ? i3 = new d2.ctor(n2, d2.name, d2.strings, this, t2) : d2.type === 6 && (i3 = new L(n2, this, t2)), this.v.push(i3), d2 = e2[++r2]; } h2 !== (d2 == null ? void 0 : d2.index) && (n2 = A.nextNode(), h2++); } return o2; } m(t2) { let i2 = 0; for (const s2 of this.v) s2 !== void 0 && (s2.strings !== void 0 ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++; } } class N { constructor(t2, i2, s2, e2) { var o2; this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cg = (o2 = e2 == null ? void 0 : e2.isConnected) === null || o2 === void 0 || o2; } get _$AU() { var t2, i2; return (i2 = (t2 = this._$AM) === null || t2 === void 0 ? void 0 : t2._$AU) !== null && i2 !== void 0 ? i2 : this._$Cg; } get parentNode() { let t2 = this._$AA.parentNode; const i2 = this._$AM; return i2 !== void 0 && t2.nodeType === 11 && (t2 = i2.parentNode), t2; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t2, i2 = this) { t2 = V(this, t2, i2), r(t2) ? t2 === T || t2 == null || t2 === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : t2 !== this._$AH && t2 !== b && this.$(t2) : t2._$litType$ !== void 0 ? this.T(t2) : t2.nodeType !== void 0 ? this.S(t2) : u(t2) ? this.M(t2) : this.$(t2); } A(t2, i2 = this._$AB) { return this._$AA.parentNode.insertBefore(t2, i2); } S(t2) { this._$AH !== t2 && (this._$AR(), this._$AH = this.A(t2)); } $(t2) { this._$AH !== T && r(this._$AH) ? this._$AA.nextSibling.data = t2 : this.S(l$1.createTextNode(t2)), this._$AH = t2; } T(t2) { var i2; const { values: s2, _$litType$: e2 } = t2, o2 = typeof e2 == "number" ? this._$AC(t2) : (e2.el === void 0 && (e2.el = P.createElement(e2.h, this.options)), e2); if (((i2 = this._$AH) === null || i2 === void 0 ? void 0 : i2._$AD) === o2) this._$AH.m(s2); else { const t3 = new E(o2, this), i3 = t3.p(this.options); t3.m(s2), this.S(i3), this._$AH = t3; } } _$AC(t2) { let i2 = x.get(t2.strings); return i2 === void 0 && x.set(t2.strings, i2 = new P(t2)), i2; } M(t2) { d(this._$AH) || (this._$AH = [], this._$AR()); const i2 = this._$AH; let s2, e2 = 0; for (const o2 of t2) e2 === i2.length ? i2.push(s2 = new N(this.A(h()), this.A(h()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++; e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2); } _$AR(t2 = this._$AA.nextSibling, i2) { var s2; for ((s2 = this._$AP) === null || s2 === void 0 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) { const i3 = t2.nextSibling; t2.remove(), t2 = i3; } } setConnected(t2) { var i2; this._$AM === void 0 && (this._$Cg = t2, (i2 = this._$AP) === null || i2 === void 0 || i2.call(this, t2)); } } class S { constructor(t2, i2, s2, e2, o2) { this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || s2[0] !== "" || s2[1] !== "" ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = T; } get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } _$AI(t2, i2 = this, s2, e2) { const o2 = this.strings; let n2 = false; if (o2 === void 0) t2 = V(this, t2, i2, 0), n2 = !r(t2) || t2 !== this._$AH && t2 !== b, n2 && (this._$AH = t2); else { const e3 = t2; let l2, h2; for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++) h2 = V(this, e3[s2 + l2], i2, l2), h2 === b && (h2 = this._$AH[l2]), n2 || (n2 = !r(h2) || h2 !== this._$AH[l2]), h2 === T ? t2 = T : t2 !== T && (t2 += (h2 != null ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2; } n2 && !e2 && this.k(t2); } k(t2) { t2 === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 != null ? t2 : ""); } } class M extends S { constructor() { super(...arguments), this.type = 3; } k(t2) { this.element[this.name] = t2 === T ? void 0 : t2; } } const k = i$1 ? i$1.emptyScript : ""; class H extends S { constructor() { super(...arguments), this.type = 4; } k(t2) { t2 && t2 !== T ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name); } } class I extends S { constructor(t2, i2, s2, e2, o2) { super(t2, i2, s2, e2, o2), this.type = 5; } _$AI(t2, i2 = this) { var s2; if ((t2 = (s2 = V(this, t2, i2, 0)) !== null && s2 !== void 0 ? s2 : T) === b) return; const e2 = this._$AH, o2 = t2 === T && e2 !== T || t2.capture !== e2.capture || t2.once !== e2.once || t2.passive !== e2.passive, n2 = t2 !== T && (e2 === T || o2); o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2; } handleEvent(t2) { var i2, s2; typeof this._$AH == "function" ? this._$AH.call((s2 = (i2 = this.options) === null || i2 === void 0 ? void 0 : i2.host) !== null && s2 !== void 0 ? s2 : this.element, t2) : this._$AH.handleEvent(t2); } } class L { constructor(t2, i2, s2) { this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2; } get _$AU() { return this._$AM._$AU; } _$AI(t2) { V(this, t2); } } const z = window.litHtmlPolyfillSupport; z == null || z(P, N), ((t$1 = globalThis.litHtmlVersions) !== null && t$1 !== void 0 ? t$1 : globalThis.litHtmlVersions = []).push("2.0.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var l, o$1; class s extends a$1 { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Dt = void 0; } createRenderRoot() { var t2, e2; const i2 = super.createRenderRoot(); return (t2 = (e2 = this.renderOptions).renderBefore) !== null && t2 !== void 0 || (e2.renderBefore = i2.firstChild), i2; } update(t2) { const i2 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Dt = w(i2, this.renderRoot, this.renderOptions); } connectedCallback() { var t2; super.connectedCallback(), (t2 = this._$Dt) === null || t2 === void 0 || t2.setConnected(true); } disconnectedCallback() { var t2; super.disconnectedCallback(), (t2 = this._$Dt) === null || t2 === void 0 || t2.setConnected(false); } render() { return b; } } s.finalized = true, s._$litElement$ = true, (l = globalThis.litElementHydrateSupport) === null || l === void 0 || l.call(globalThis, { LitElement: s }); const n = globalThis.litElementPolyfillSupport; n == null || n({ LitElement: s }); ((o$1 = globalThis.litElementVersions) !== null && o$1 !== void 0 ? o$1 : globalThis.litElementVersions = []).push("3.0.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$1 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 }); class i { constructor(t2) { } get _$AU() { return this._$AM._$AU; } _$AT(t2, e2, i2) { this._$Ct = t2, this._$AM = e2, this._$Ci = i2; } _$AS(t2, e2) { return this.update(t2, e2); } update(t2, e2) { return this.render(...e2); } } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ class e extends i { constructor(i2) { if (super(i2), this.it = T, i2.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); } render(r2) { if (r2 === T || r2 == null) return this.vt = void 0, this.it = r2; if (r2 === b) return r2; if (typeof r2 != "string") throw Error(this.constructor.directiveName + "() called with a non-string value"); if (r2 === this.it) return this.vt; this.it = r2; const s2 = [r2]; return s2.raw = s2, this.vt = { _$litType$: this.constructor.resultType, strings: s2, values: [] }; } } e.directiveName = "unsafeHTML", e.resultType = 1; const o = e$1(e); function queryShadowRoot(root, skipNode, isMatch, maxDepth = 20, depth = 0) { let matches = []; if (depth >= maxDepth) { return matches; } const traverseSlot = ($slot) => { const assignedNodes = $slot.assignedNodes().filter((node) => node.nodeType === 1); if (assignedNodes.length > 0) { return queryShadowRoot(assignedNodes[0].parentElement, skipNode, isMatch, maxDepth, depth + 1); } return []; }; const children = Array.from(root.children || []); for (const $child of children) { if (skipNode($child)) { continue; } if (isMatch($child)) { matches.push($child); } if ($child.shadowRoot != null) { matches.push(...queryShadowRoot($child.shadowRoot, skipNode, isMatch, maxDepth, depth + 1)); } else if ($child.tagName === "SLOT") { matches.push(...traverseSlot($child)); } else { matches.push(...queryShadowRoot($child, skipNode, isMatch, maxDepth, depth + 1)); } } return matches; } function isHidden($elem) { return $elem.hasAttribute("hidden") || $elem.hasAttribute("aria-hidden") && $elem.getAttribute("aria-hidden") !== "false" || $elem.style.display === `none` || $elem.style.opacity === `0` || $elem.style.visibility === `hidden` || $elem.style.visibility === `collapse`; } function isDisabled($elem) { return $elem.hasAttribute("disabled") || $elem.hasAttribute("aria-disabled") && $elem.getAttribute("aria-disabled") !== "false"; } function isFocusable($elem) { if ($elem.getAttribute("tabindex") === "-1" || isHidden($elem) || isDisabled($elem)) { return false; } return $elem.hasAttribute("tabindex") || ($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) && $elem.hasAttribute("href") || ($elem instanceof HTMLButtonElement || $elem instanceof HTMLInputElement || $elem instanceof HTMLTextAreaElement || $elem instanceof HTMLSelectElement) || $elem instanceof HTMLIFrameElement; } const timeouts = new Map(); function debounce(cb, ms, id) { const timeout = timeouts.get(id); if (timeout != null) { window.clearTimeout(timeout); } timeouts.set(id, window.setTimeout(() => { cb(); timeouts.delete(id); }, ms)); } const template = document.createElement("template"); template.innerHTML = `
`; class FocusTrap extends HTMLElement { constructor() { super(); this.debounceId = Math.random().toString(); this._focused = false; const shadow = this.attachShadow({ mode: "open" }); shadow.appendChild(template.content.cloneNode(true)); this.$backup = shadow.querySelector("#backup"); this.$start = shadow.querySelector("#start"); this.$end = shadow.querySelector("#end"); this.focusLastElement = this.focusLastElement.bind(this); this.focusFirstElement = this.focusFirstElement.bind(this); this.onFocusIn = this.onFocusIn.bind(this); this.onFocusOut = this.onFocusOut.bind(this); } static get observedAttributes() { return [ "inactive" ]; } get inactive() { return this.hasAttribute("inactive"); } set inactive(value) { value ? this.setAttribute("inactive", "") : this.removeAttribute("inactive"); } get focused() { return this._focused; } connectedCallback() { this.$start.addEventListener("focus", this.focusLastElement); this.$end.addEventListener("focus", this.focusFirstElement); this.addEventListener("focusin", this.onFocusIn); this.addEventListener("focusout", this.onFocusOut); this.render(); } disconnectedCallback() { this.$start.removeEventListener("focus", this.focusLastElement); this.$end.removeEventListener("focus", this.focusFirstElement); this.removeEventListener("focusin", this.onFocusIn); this.removeEventListener("focusout", this.onFocusOut); } attributeChangedCallback() { this.render(); } focusFirstElement() { this.trapFocus(); } focusLastElement() { this.trapFocus(true); } getFocusableElements() { return queryShadowRoot(this, isHidden, isFocusable); } trapFocus(trapToEnd) { if (this.inactive) return; let focusableChildren = this.getFocusableElements(); if (focusableChildren.length > 0) { if (trapToEnd) { focusableChildren[focusableChildren.length - 1].focus(); } else { focusableChildren[0].focus(); } this.$backup.setAttribute("tabindex", "-1"); } else { this.$backup.setAttribute("tabindex", "0"); this.$backup.focus(); } } onFocusIn() { this.updateFocused(true); } onFocusOut() { this.updateFocused(false); } updateFocused(value) { debounce(() => { if (this.focused !== value) { this._focused = value; this.render(); } }, 0, this.debounceId); } render() { this.$start.setAttribute("tabindex", !this.focused || this.inactive ? `-1` : `0`); this.$end.setAttribute("tabindex", !this.focused || this.inactive ? `-1` : `0`); this.focused ? this.setAttribute("focused", "") : this.removeAttribute("focused"); } } window.customElements.define("focus-trap", FocusTrap); var globalStyles = r$2` :host { --_content-padding: 16px; font-family: var(--cookie-consent-family-body, system-ui); color: var(--cookie-consent-color-text, #1e2a3b); } @media (min-width: 480px) { :host { --_content-padding: 24px 32px; } } @media (min-width: 980px) { :host { --_content-padding: 24px 48px; } } :host * { box-sizing: border-box; } .outline-0 { outline: none; } button { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; font-family: inherit; } button:disabled { cursor: not-allowed; } .backdrop { z-index: var(--cookie-consent-z-index, 99999); display: flex; align-items: center; justify-content: center; position: fixed; bottom: 0; left: 0; width: 100%; background-color: var( --cookie-consent-backdrop-background, rgba(60, 64, 67, 0.74) ); height: 100%; } .modal-container { padding: var(--_content-padding); background-color: #ffffff; width: 100%; max-height: calc(100vh - 64px); display: flex; flex-direction: column; position: relative; margin: auto; box-shadow: var(--cookie-consent-shadow, 0 0 68px rgba(0, 0, 0, 0.25)); } .first-modal { background: var(--cookie-consent-bg, rgba(255,255,255,0.9)); -webkit-backdrop-filter: blur(6px) brightness(80%); backdrop-filter: blur(6px) brightness(80%); color: var(--cookie-consent-color, inherit); max-width: 600px; width: calc(100% - 32px); border-radius: var(--cookie-consent-content-radius, 12px); position: fixed; right: 0; bottom: 0; margin-right: 16px; margin-bottom: 32px; overflow: hidden; z-index: var(--z-index-modal, 1300) } .notice-container { max-height: calc(100vh - 64px); display: flex; flex-direction: column; z-index: 1; } .modal-container { max-height: calc(100vh - 40px); } .modal-container-content { flex-grow: 1; overflow: auto; margin-bottom: 16px; } .modal-container-pre-footer { font-family: var(--cookie-consent-family-body, system-ui); color: var(--cookie-consent-color-light-text, #687589); font-size: 14px; line-height: 1.5; margin-bottom: 16px; } .modal-container[data-size="large"] { max-width: none; max-height: none; width: 100vw; height: 100vh; border-radius: 0; } .scrollable { overflow: auto; } .actions { display: flex; justify-content: center; } .actions > button { width: fit-content; } @media (min-width: 520px) { .notice-container { max-height: calc(100vh - 80px); } .actions { flex-shrink: 0; justify-content: flex-start; } .actions > button { width: auto; } .modal-container[data-size="large"] { max-height: 74vh; max-width: 980px; width: calc(100% - 32px); border-radius: var(--cookie-consent-content-radius, 12px); } } @media (min-width: 520px) and (max-height: 520px) { .modal-container[data-size="large"] { max-height: calc(100vh - 24px); } } @media (min-width: 520px) and (min-height: 820px) { .modal-container[data-size="large"] { max-height: 60vh; } } .cookies { border-radius: var(--cookie-consent-content-inner-radius, 8px); border: 1px solid var(--cookie-consent-border-color, #dfe2eb); padding: 0 24px; } .cookies-list, .cookies-list > li { margin: 0; padding: 0; list-style: none; } .cookies-list > li:not(:last-child) { border-bottom: 1px solid var(--cookie-consent-border-light-color, rgba(223, 226, 235, 0.65)); } .button-config { display: inline-flex; background: var(--cookie-consent-button-secondary-bg, transparent); border: 0; color: var(--cookie-consent-button-secondary-color, #3498db); font-size: var(--cookie-consent-button-font-size, 12px); font-weight: 700; text-decoration: underline; } .button-link, .button-primary { height: var(--cookie-consent-button-height, 42px); display: inline-flex; border-radius: var(--cookie-consent-button-radius, 8px); justify-content: center; align-items: center; padding: 8px; border: 0; font-weight: var(--cookie-consent-button-font-weight, 400); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-weight: 600; } .button-link { background: var(--cookie-consent-button-secondary-bg, transparent); color: var(--cookie-consent-button-secondary-color, #3498db); font-size: var(--cookie-consent-button-font-size, 16px); padding: 0 16px; } .button-primary { color: var(--cookie-consent-button-color, #ffffff); background: var(--cookie-consent-button-bg, #3498db); font-size: var(--cookie-consent-button-font-size, 16px); } .button-primary:disabled { background: var(--cookie-consent-button-disabled-bg, #e9eaed); color: var(--cookie-consent-button-disabled-color, #949aa5); } @media (min-width: 880px) { .button-primary { padding: 0 12px; } } @media (min-width: 1024px) { .button-primary { padding: 0 16px; } } .config-title { font-size: 22px; font-weight: 700; line-height: 1.2; padding: 0; margin: 0 0 8px; } .config-info { padding: 16px 0; } `; class CookieConsentSwitch extends s { static get properties() { return { name: { type: String }, actived: { type: Boolean } }; } render() { return p`
`; } _handleChange(e2) { const { name, checked } = e2.target; const status = checked ? "accepted" : "rejected"; const detail = { name, status }; const event = new CustomEvent("change", { detail }); this.dispatchEvent(event); } } __publicField(CookieConsentSwitch, "styles", r$2` :host { --cookie-consent-switch-width: 48px; --cookie-consent-switch-height: 26px; --cookie-consent-switch-padding: 2px; --cookie-consent-switch-active-color: #3498DB; --cookie-consent-switch-bg: #CDD5E0; --cookie-consent-switch-bg-marker: #ffffff; } .switch { --cookie-consent-switch-transition-duration: .2s; box-sizing: border-box; position: relative; display: inline-flex; flex-shrink: 0; align-items: center; width: var(--cookie-consent-switch-width); height: var(--cookie-consent-switch-height); border-radius: 9999em; padding: var(--cookie-consent-switch-padding) 0; } .switch__input, .switch__label { position: absolute; left: 0; top: 0; cursor: pointer; } .switch__input { opacity: 0; height: 0; width: 0; pointer-events: none; } .switch__input:checked + .switch__label { background-color: var(--cookie-consent-switch-active-color); } .switch__input:checked + .switch__label + .switch__marker { left: calc(100% - var(--cookie-consent-switch-height) + var(--cookie-consent-switch-padding)); } .switch__label { width: 100%; height: 100%; color: transparent; user-select: none; background-color: var(--cookie-consent-switch-bg); border-radius: inherit; z-index: 1; transition: background var(--cookie-consent-switch-transition-duration); overflow: hidden; } .switch__marker { position: relative; background-color: var(--cookie-consent-switch-bg-marker); width: calc(var(--cookie-consent-switch-height) - var(--cookie-consent-switch-padding) * 2); height: calc(var(--cookie-consent-switch-height) - var(--cookie-consent-switch-padding) * 2); border-radius: 50%; z-index: 2; pointer-events: none; left: var(--cookie-consent-switch-padding); transition: left var(--cookie-consent-switch-transition-duration); will-change: left; } `); customElements.define("cookie-consent-switch", CookieConsentSwitch); class CookieConsentCard extends s { static get properties() { return { name: { type: String }, status: { type: String }, controls: { type: Boolean } }; } optionChange({ detail }) { const event = new CustomEvent("change", { detail }); this.dispatchEvent(event); } render() { return p` `; } } __publicField(CookieConsentCard, "styles", r$2` .cookie { padding: 21px 0; display: flex; gap: 12px; } .cookie__title { font-weight: 600; margin-bottom: 8px; font-size: 15px; font-family: var(--cookie-consent-family-heading, system-ui); } .cookie__details { color: var(--cookie-consent-color-light-text, #687589); } .cookie__actions { display: flex; justify-content: flex-end; align-items: flex-start; } .cookie__content { flex-grow: 1; } @media (min-width: 880px) { .cookie { gap: 24px; } .cookie__actions { flex: 0 0 25%; } } `); customElements.define("cookie-consent-card", CookieConsentCard); class CookieImage extends s { render() { return p`
`; } } customElements.define("cookie-image", CookieImage); class CookieConsent extends s { static get styles() { return [ globalStyles, r$2` :host:not([hidden]) { display: block; } [hidden][hidden] { display: none; } ` ]; } static get properties() { return { textConfig: { type: String, attribute: "text-config" }, textAccept: { type: String, attribute: "text-accept" }, textConfig: { type: String, attribute: "text-config" }, textBack: { type: String, attribute: "text-back" }, cookies: { type: Array, attribute: true, reflect: true }, configOpened: { type: Boolean, attribute: "config-opened", reflect: true }, opened: { type: Boolean } }; } constructor() { super(); this.textAccept = "Accept"; this.textConfig = "Configure"; this.textBack = "Back"; this.configOpened = false; this.opened = false; const cookies = this.getLocalCookies(); if (cookies) { document.addEventListener("DOMContentLoaded", () => { setTimeout(() => this._dispatchCookies(cookies)); }); } else { this.open(); } } get $notice() { return this.renderRoot.querySelector("#notice"); } get $config() { return this.renderRoot.querySelector("#config"); } get $closeButton() { return this.renderRoot.querySelector(".close-button"); } connectedCallback() { super.connectedCallback(); window.addEventListener("keydown", this._handleKeyDown.bind(this)); } disconnectedCallback() { super.disconnectedCallback(); window.removeEventListener("keydown", this._handleKeyDown.bind(this)); } async closeConfig() { if (this.configOpened) { this.configOpened = false; await this.updateComplete; this.$notice.focus(); } } async open() { this.opened = true; await this.updateComplete; this.$notice.focus(); } async _openConfig() { this.configOpened = true; await this.updateComplete; this.$config.focus(); } getLocalCookies() { const cookies = window.localStorage.getItem("cookies-consent"); return JSON.parse(cookies); } setLocalCookies(cookies) { const cookiesString = JSON.stringify(cookies); window.localStorage.setItem("cookies-consent", cookiesString); } getCookiesAcceptedName() { return this.cookies.map((cookie) => cookie.status === "accepted" ? cookie.name : false).filter(Boolean); } close() { const cookiesAccepted = this.getCookiesAcceptedName(); this.setLocalCookies(cookiesAccepted); this._dispatchCookies(cookiesAccepted); this.opened = false; this.configOpened = false; } acceptAllAndClose() { this.cookies = this.cookies.map((cookie) => __spreadProps(__spreadValues({}, cookie), { status: "accepted" })); this.close(); } _dispatchCookies(cookies) { const event = new CustomEvent("cookies-status-changed", { detail: { consent: cookies } }); this.dispatchEvent(event); } changeCookie(e2) { e2.stopPropagation(); const { name, status } = e2.detail; this.cookies = this.cookies.map((cookie) => { if (cookie.name === name) { return __spreadProps(__spreadValues({}, cookie), { status }); } return cookie; }); } render() { return p` `; } _handleKeyDown(event) { if (event.key === "Escape") { this.closeConfig(); } } } window.customElements.define("cookie-consent", CookieConsent);