@vibe-flags/core 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,208 +3,208 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const F = globalThis, W = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, q = Symbol(), G = /* @__PURE__ */ new WeakMap();
7
- let ct = class {
8
- constructor(t, e, s) {
9
- if (this._$cssResult$ = !0, s !== q) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
- this.cssText = t, this.t = e;
6
+ const z = globalThis, Y = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), re = /* @__PURE__ */ new WeakMap();
7
+ let be = class {
8
+ constructor(e, t, s) {
9
+ if (this._$cssResult$ = !0, s !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
+ this.cssText = e, this.t = t;
11
11
  }
12
12
  get styleSheet() {
13
- let t = this.o;
14
- const e = this.t;
15
- if (W && t === void 0) {
16
- const s = e !== void 0 && e.length === 1;
17
- s && (t = G.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && G.set(e, t));
13
+ let e = this.o;
14
+ const t = this.t;
15
+ if (Y && e === void 0) {
16
+ const s = t !== void 0 && t.length === 1;
17
+ s && (e = re.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && re.set(t, e));
18
18
  }
19
- return t;
19
+ return e;
20
20
  }
21
21
  toString() {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const vt = (i) => new ct(typeof i == "string" ? i : i + "", void 0, q), dt = (i, ...t) => {
26
- const e = i.length === 1 ? i[0] : t.reduce((s, r, o) => s + ((n) => {
25
+ const _e = (i) => new be(typeof i == "string" ? i : i + "", void 0, Z), G = (i, ...e) => {
26
+ const t = i.length === 1 ? i[0] : e.reduce((s, r, o) => s + ((n) => {
27
27
  if (n._$cssResult$ === !0) return n.cssText;
28
28
  if (typeof n == "number") return n;
29
29
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
30
  })(r) + i[o + 1], i[0]);
31
- return new ct(e, i, q);
32
- }, $t = (i, t) => {
33
- if (W) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
34
- else for (const e of t) {
35
- const s = document.createElement("style"), r = F.litNonce;
36
- r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
37
- }
38
- }, Q = W ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
39
- let e = "";
40
- for (const s of t.cssRules) e += s.cssText;
41
- return vt(e);
31
+ return new be(t, i, Z);
32
+ }, we = (i, e) => {
33
+ if (Y) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
34
+ else for (const t of e) {
35
+ const s = document.createElement("style"), r = z.litNonce;
36
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, i.appendChild(s);
37
+ }
38
+ }, oe = Y ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
39
+ let t = "";
40
+ for (const s of e.cssRules) t += s.cssText;
41
+ return _e(t);
42
42
  })(i) : i;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: bt, defineProperty: yt, getOwnPropertyDescriptor: mt, getOwnPropertyNames: _t, getOwnPropertySymbols: xt, getPrototypeOf: wt } = Object, D = globalThis, tt = D.trustedTypes, At = tt ? tt.emptyScript : "", St = D.reactiveElementPolyfillSupport, M = (i, t) => i, j = { toAttribute(i, t) {
49
- switch (t) {
48
+ const { is: Ae, defineProperty: Se, getOwnPropertyDescriptor: Ee, getOwnPropertyNames: Ce, getOwnPropertySymbols: ke, getPrototypeOf: Pe } = Object, q = globalThis, ne = q.trustedTypes, Oe = ne ? ne.emptyScript : "", Me = q.reactiveElementPolyfillSupport, T = (i, e) => i, B = { toAttribute(i, e) {
49
+ switch (e) {
50
50
  case Boolean:
51
- i = i ? At : null;
51
+ i = i ? Oe : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
55
55
  i = i == null ? i : JSON.stringify(i);
56
56
  }
57
57
  return i;
58
- }, fromAttribute(i, t) {
59
- let e = i;
60
- switch (t) {
58
+ }, fromAttribute(i, e) {
59
+ let t = i;
60
+ switch (e) {
61
61
  case Boolean:
62
- e = i !== null;
62
+ t = i !== null;
63
63
  break;
64
64
  case Number:
65
- e = i === null ? null : Number(i);
65
+ t = i === null ? null : Number(i);
66
66
  break;
67
67
  case Object:
68
68
  case Array:
69
69
  try {
70
- e = JSON.parse(i);
70
+ t = JSON.parse(i);
71
71
  } catch {
72
- e = null;
72
+ t = null;
73
73
  }
74
74
  }
75
- return e;
76
- } }, J = (i, t) => !bt(i, t), et = { attribute: !0, type: String, converter: j, reflect: !1, useDefault: !1, hasChanged: J };
77
- Symbol.metadata ??= Symbol("metadata"), D.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let S = class extends HTMLElement {
79
- static addInitializer(t) {
80
- this._$Ei(), (this.l ??= []).push(t);
75
+ return t;
76
+ } }, Q = (i, e) => !Ae(i, e), ae = { attribute: !0, type: String, converter: B, reflect: !1, useDefault: !1, hasChanged: Q };
77
+ Symbol.metadata ??= Symbol("metadata"), q.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
+ let E = class extends HTMLElement {
79
+ static addInitializer(e) {
80
+ this._$Ei(), (this.l ??= []).push(e);
81
81
  }
82
82
  static get observedAttributes() {
83
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
84
  }
85
- static createProperty(t, e = et) {
86
- 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) {
87
- const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
88
- r !== void 0 && yt(this.prototype, t, r);
85
+ static createProperty(e, t = ae) {
86
+ if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
87
+ const s = Symbol(), r = this.getPropertyDescriptor(e, s, t);
88
+ r !== void 0 && Se(this.prototype, e, r);
89
89
  }
90
90
  }
91
- static getPropertyDescriptor(t, e, s) {
92
- const { get: r, set: o } = mt(this.prototype, t) ?? { get() {
93
- return this[e];
91
+ static getPropertyDescriptor(e, t, s) {
92
+ const { get: r, set: o } = Ee(this.prototype, e) ?? { get() {
93
+ return this[t];
94
94
  }, set(n) {
95
- this[e] = n;
95
+ this[t] = n;
96
96
  } };
97
97
  return { get: r, set(n) {
98
98
  const l = r?.call(this);
99
- o?.call(this, n), this.requestUpdate(t, l, s);
99
+ o?.call(this, n), this.requestUpdate(e, l, s);
100
100
  }, configurable: !0, enumerable: !0 };
101
101
  }
102
- static getPropertyOptions(t) {
103
- return this.elementProperties.get(t) ?? et;
102
+ static getPropertyOptions(e) {
103
+ return this.elementProperties.get(e) ?? ae;
104
104
  }
105
105
  static _$Ei() {
106
- if (this.hasOwnProperty(M("elementProperties"))) return;
107
- const t = wt(this);
108
- t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
106
+ if (this.hasOwnProperty(T("elementProperties"))) return;
107
+ const e = Pe(this);
108
+ e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
109
  }
110
110
  static finalize() {
111
- if (this.hasOwnProperty(M("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
113
- const e = this.properties, s = [..._t(e), ...xt(e)];
114
- for (const r of s) this.createProperty(r, e[r]);
111
+ if (this.hasOwnProperty(T("finalized"))) return;
112
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
113
+ const t = this.properties, s = [...Ce(t), ...ke(t)];
114
+ for (const r of s) this.createProperty(r, t[r]);
115
115
  }
116
- const t = this[Symbol.metadata];
117
- if (t !== null) {
118
- const e = litPropertyMetadata.get(t);
119
- if (e !== void 0) for (const [s, r] of e) this.elementProperties.set(s, r);
116
+ const e = this[Symbol.metadata];
117
+ if (e !== null) {
118
+ const t = litPropertyMetadata.get(e);
119
+ if (t !== void 0) for (const [s, r] of t) this.elementProperties.set(s, r);
120
120
  }
121
121
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [e, s] of this.elementProperties) {
123
- const r = this._$Eu(e, s);
124
- r !== void 0 && this._$Eh.set(r, e);
122
+ for (const [t, s] of this.elementProperties) {
123
+ const r = this._$Eu(t, s);
124
+ r !== void 0 && this._$Eh.set(r, t);
125
125
  }
126
126
  this.elementStyles = this.finalizeStyles(this.styles);
127
127
  }
128
- static finalizeStyles(t) {
129
- const e = [];
130
- if (Array.isArray(t)) {
131
- const s = new Set(t.flat(1 / 0).reverse());
132
- for (const r of s) e.unshift(Q(r));
133
- } else t !== void 0 && e.push(Q(t));
134
- return e;
128
+ static finalizeStyles(e) {
129
+ const t = [];
130
+ if (Array.isArray(e)) {
131
+ const s = new Set(e.flat(1 / 0).reverse());
132
+ for (const r of s) t.unshift(oe(r));
133
+ } else e !== void 0 && t.push(oe(e));
134
+ return t;
135
135
  }
136
- static _$Eu(t, e) {
137
- const s = e.attribute;
138
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
136
+ static _$Eu(e, t) {
137
+ const s = t.attribute;
138
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
139
139
  }
140
140
  constructor() {
141
141
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
142
142
  }
143
143
  _$Ev() {
144
- this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
144
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
145
145
  }
146
- addController(t) {
147
- (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
146
+ addController(e) {
147
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
148
148
  }
149
- removeController(t) {
150
- this._$EO?.delete(t);
149
+ removeController(e) {
150
+ this._$EO?.delete(e);
151
151
  }
152
152
  _$E_() {
153
- const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
154
- for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
155
- t.size > 0 && (this._$Ep = t);
153
+ const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
154
+ for (const s of t.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
155
+ e.size > 0 && (this._$Ep = e);
156
156
  }
157
157
  createRenderRoot() {
158
- const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return $t(t, this.constructor.elementStyles), t;
158
+ const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
+ return we(e, this.constructor.elementStyles), e;
160
160
  }
161
161
  connectedCallback() {
162
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
162
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
163
163
  }
164
- enableUpdating(t) {
164
+ enableUpdating(e) {
165
165
  }
166
166
  disconnectedCallback() {
167
- this._$EO?.forEach((t) => t.hostDisconnected?.());
167
+ this._$EO?.forEach((e) => e.hostDisconnected?.());
168
168
  }
169
- attributeChangedCallback(t, e, s) {
170
- this._$AK(t, s);
169
+ attributeChangedCallback(e, t, s) {
170
+ this._$AK(e, s);
171
171
  }
172
- _$ET(t, e) {
173
- const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
172
+ _$ET(e, t) {
173
+ const s = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, s);
174
174
  if (r !== void 0 && s.reflect === !0) {
175
- const o = (s.converter?.toAttribute !== void 0 ? s.converter : j).toAttribute(e, s.type);
176
- this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
175
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : B).toAttribute(t, s.type);
176
+ this._$Em = e, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
177
177
  }
178
178
  }
179
- _$AK(t, e) {
180
- const s = this.constructor, r = s._$Eh.get(t);
179
+ _$AK(e, t) {
180
+ const s = this.constructor, r = s._$Eh.get(e);
181
181
  if (r !== void 0 && this._$Em !== r) {
182
- const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : j;
182
+ const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : B;
183
183
  this._$Em = r;
184
- const l = n.fromAttribute(e, o.type);
184
+ const l = n.fromAttribute(t, o.type);
185
185
  this[r] = l ?? this._$Ej?.get(r) ?? l, this._$Em = null;
186
186
  }
187
187
  }
188
- requestUpdate(t, e, s, r = !1, o) {
189
- if (t !== void 0) {
188
+ requestUpdate(e, t, s, r = !1, o) {
189
+ if (e !== void 0) {
190
190
  const n = this.constructor;
191
- if (r === !1 && (o = this[t]), s ??= n.getPropertyOptions(t), !((s.hasChanged ?? J)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, s)))) return;
192
- this.C(t, e, s);
191
+ if (r === !1 && (o = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? Q)(o, t) || s.useDefault && s.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
192
+ this.C(e, t, s);
193
193
  }
194
194
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
195
195
  }
196
- C(t, e, { useDefault: s, reflect: r, wrapped: o }, n) {
197
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
196
+ C(e, t, { useDefault: s, reflect: r, wrapped: o }, n) {
197
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? t ?? this[e]), o !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
198
198
  }
199
199
  async _$EP() {
200
200
  this.isUpdatePending = !0;
201
201
  try {
202
202
  await this._$ES;
203
- } catch (e) {
204
- Promise.reject(e);
203
+ } catch (t) {
204
+ Promise.reject(t);
205
205
  }
206
- const t = this.scheduleUpdate();
207
- return t != null && await t, !this.isUpdatePending;
206
+ const e = this.scheduleUpdate();
207
+ return e != null && await e, !this.isUpdatePending;
208
208
  }
209
209
  scheduleUpdate() {
210
210
  return this.performUpdate();
@@ -222,19 +222,19 @@ let S = class extends HTMLElement {
222
222
  n !== !0 || this._$AL.has(r) || l === void 0 || this.C(r, void 0, o, l);
223
223
  }
224
224
  }
225
- let t = !1;
226
- const e = this._$AL;
225
+ let e = !1;
226
+ const t = this._$AL;
227
227
  try {
228
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(e)) : this._$EM();
228
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(t)) : this._$EM();
229
229
  } catch (s) {
230
- throw t = !1, this._$EM(), s;
230
+ throw e = !1, this._$EM(), s;
231
231
  }
232
- t && this._$AE(e);
232
+ e && this._$AE(t);
233
233
  }
234
- willUpdate(t) {
234
+ willUpdate(e) {
235
235
  }
236
- _$AE(t) {
237
- this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
236
+ _$AE(e) {
237
+ this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
238
238
  }
239
239
  _$EM() {
240
240
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -245,88 +245,88 @@ let S = class extends HTMLElement {
245
245
  getUpdateComplete() {
246
246
  return this._$ES;
247
247
  }
248
- shouldUpdate(t) {
248
+ shouldUpdate(e) {
249
249
  return !0;
250
250
  }
251
- update(t) {
252
- this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
251
+ update(e) {
252
+ this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
253
253
  }
254
- updated(t) {
254
+ updated(e) {
255
255
  }
256
- firstUpdated(t) {
256
+ firstUpdated(e) {
257
257
  }
258
258
  };
259
- S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[M("elementProperties")] = /* @__PURE__ */ new Map(), S[M("finalized")] = /* @__PURE__ */ new Map(), St?.({ ReactiveElement: S }), (D.reactiveElementVersions ??= []).push("2.1.2");
259
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T("elementProperties")] = /* @__PURE__ */ new Map(), E[T("finalized")] = /* @__PURE__ */ new Map(), Me?.({ ReactiveElement: E }), (q.reactiveElementVersions ??= []).push("2.1.2");
260
260
  /**
261
261
  * @license
262
262
  * Copyright 2017 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
264
  */
265
- const K = globalThis, st = (i) => i, z = K.trustedTypes, it = z ? z.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, pt = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, ft = "?" + $, Et = `<${ft}>`, w = document, U = () => w.createComment(""), T = (i) => i === null || typeof i != "object" && typeof i != "function", X = Array.isArray, kt = (i) => X(i) || typeof i?.[Symbol.iterator] == "function", B = `[
266
- \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, ot = />/g, y = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, at = /"/g, ut = /^(?:script|style|textarea|title)$/i, Ct = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), f = Ct(1), E = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), lt = /* @__PURE__ */ new WeakMap(), _ = w.createTreeWalker(w, 129);
268
- function gt(i, t) {
269
- if (!X(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
- return it !== void 0 ? it.createHTML(t) : t;
265
+ const ee = globalThis, le = (i) => i, L = ee.trustedTypes, he = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ye = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, $e = "?" + y, Te = `<${$e}>`, w = document, U = () => w.createComment(""), F = (i) => i === null || typeof i != "object" && typeof i != "function", te = Array.isArray, Ue = (i) => te(i) || typeof i?.[Symbol.iterator] == "function", J = `[
266
+ \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ce = /-->/g, de = />/g, x = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, fe = /"/g, me = /^(?:script|style|textarea|title)$/i, Fe = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), f = Fe(1), C = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ue = /* @__PURE__ */ new WeakMap(), _ = w.createTreeWalker(w, 129);
268
+ function xe(i, e) {
269
+ if (!te(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
+ return he !== void 0 ? he.createHTML(e) : e;
271
271
  }
272
- const Pt = (i, t) => {
273
- const e = i.length - 1, s = [];
274
- let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = P;
275
- for (let l = 0; l < e; l++) {
272
+ const Ne = (i, e) => {
273
+ const t = i.length - 1, s = [];
274
+ let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = O;
275
+ for (let l = 0; l < t; l++) {
276
276
  const a = i[l];
277
- let d, p, h = -1, u = 0;
278
- for (; u < a.length && (n.lastIndex = u, p = n.exec(a), p !== null); ) u = n.lastIndex, n === P ? p[1] === "!--" ? n = rt : p[1] !== void 0 ? n = ot : p[2] !== void 0 ? (ut.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = y) : p[3] !== void 0 && (n = y) : n === y ? p[0] === ">" ? (n = r ?? P, h = -1) : p[1] === void 0 ? h = -2 : (h = n.lastIndex - p[2].length, d = p[1], n = p[3] === void 0 ? y : p[3] === '"' ? at : nt) : n === at || n === nt ? n = y : n === rt || n === ot ? n = P : (n = y, r = void 0);
279
- const v = n === y && i[l + 1].startsWith("/>") ? " " : "";
280
- o += n === P ? a + Et : h >= 0 ? (s.push(d), a.slice(0, h) + pt + a.slice(h) + $ + v) : a + $ + (h === -2 ? l : v);
277
+ let d, p, h = -1, g = 0;
278
+ for (; g < a.length && (n.lastIndex = g, p = n.exec(a), p !== null); ) g = n.lastIndex, n === O ? p[1] === "!--" ? n = ce : p[1] !== void 0 ? n = de : p[2] !== void 0 ? (me.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = x) : p[3] !== void 0 && (n = x) : n === x ? p[0] === ">" ? (n = r ?? O, h = -1) : p[1] === void 0 ? h = -2 : (h = n.lastIndex - p[2].length, d = p[1], n = p[3] === void 0 ? x : p[3] === '"' ? fe : pe) : n === fe || n === pe ? n = x : n === ce || n === de ? n = O : (n = x, r = void 0);
279
+ const b = n === x && i[l + 1].startsWith("/>") ? " " : "";
280
+ o += n === O ? a + Te : h >= 0 ? (s.push(d), a.slice(0, h) + ye + a.slice(h) + y + b) : a + y + (h === -2 ? l : b);
281
281
  }
282
- return [gt(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
282
+ return [xe(i, o + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
283
283
  };
284
284
  class N {
285
- constructor({ strings: t, _$litType$: e }, s) {
285
+ constructor({ strings: e, _$litType$: t }, s) {
286
286
  let r;
287
287
  this.parts = [];
288
288
  let o = 0, n = 0;
289
- const l = t.length - 1, a = this.parts, [d, p] = Pt(t, e);
290
- if (this.el = N.createElement(d, s), _.currentNode = this.el.content, e === 2 || e === 3) {
289
+ const l = e.length - 1, a = this.parts, [d, p] = Ne(e, t);
290
+ if (this.el = N.createElement(d, s), _.currentNode = this.el.content, t === 2 || t === 3) {
291
291
  const h = this.el.content.firstChild;
292
292
  h.replaceWith(...h.childNodes);
293
293
  }
294
294
  for (; (r = _.nextNode()) !== null && a.length < l; ) {
295
295
  if (r.nodeType === 1) {
296
- if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(pt)) {
297
- const u = p[n++], v = r.getAttribute(h).split($), R = /([.?@])?(.*)/.exec(u);
298
- a.push({ type: 1, index: o, name: R[2], strings: v, ctor: R[1] === "." ? Mt : R[1] === "?" ? Ut : R[1] === "@" ? Tt : I }), r.removeAttribute(h);
299
- } else h.startsWith($) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
300
- if (ut.test(r.tagName)) {
301
- const h = r.textContent.split($), u = h.length - 1;
302
- if (u > 0) {
303
- r.textContent = z ? z.emptyScript : "";
304
- for (let v = 0; v < u; v++) r.append(h[v], U()), _.nextNode(), a.push({ type: 2, index: ++o });
305
- r.append(h[u], U());
296
+ if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(ye)) {
297
+ const g = p[n++], b = r.getAttribute(h).split(y), D = /([.?@])?(.*)/.exec(g);
298
+ a.push({ type: 1, index: o, name: D[2], strings: b, ctor: D[1] === "." ? Re : D[1] === "?" ? je : D[1] === "@" ? Ie : W }), r.removeAttribute(h);
299
+ } else h.startsWith(y) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
300
+ if (me.test(r.tagName)) {
301
+ const h = r.textContent.split(y), g = h.length - 1;
302
+ if (g > 0) {
303
+ r.textContent = L ? L.emptyScript : "";
304
+ for (let b = 0; b < g; b++) r.append(h[b], U()), _.nextNode(), a.push({ type: 2, index: ++o });
305
+ r.append(h[g], U());
306
306
  }
307
307
  }
308
- } else if (r.nodeType === 8) if (r.data === ft) a.push({ type: 2, index: o });
308
+ } else if (r.nodeType === 8) if (r.data === $e) a.push({ type: 2, index: o });
309
309
  else {
310
310
  let h = -1;
311
- for (; (h = r.data.indexOf($, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += $.length - 1;
311
+ for (; (h = r.data.indexOf(y, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += y.length - 1;
312
312
  }
313
313
  o++;
314
314
  }
315
315
  }
316
- static createElement(t, e) {
316
+ static createElement(e, t) {
317
317
  const s = w.createElement("template");
318
- return s.innerHTML = t, s;
318
+ return s.innerHTML = e, s;
319
319
  }
320
320
  }
321
- function k(i, t, e = i, s) {
322
- if (t === E) return t;
323
- let r = s !== void 0 ? e._$Co?.[s] : e._$Cl;
324
- const o = T(t) ? void 0 : t._$litDirective$;
325
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = k(i, r._$AS(i, t.values), r, s)), t;
321
+ function k(i, e, t = i, s) {
322
+ if (e === C) return e;
323
+ let r = s !== void 0 ? t._$Co?.[s] : t._$Cl;
324
+ const o = F(e) ? void 0 : e._$litDirective$;
325
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = k(i, r._$AS(i, e.values), r, s)), e;
326
326
  }
327
- class Ot {
328
- constructor(t, e) {
329
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
327
+ class He {
328
+ constructor(e, t) {
329
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
330
330
  }
331
331
  get parentNode() {
332
332
  return this._$AM.parentNode;
@@ -334,35 +334,35 @@ class Ot {
334
334
  get _$AU() {
335
335
  return this._$AM._$AU;
336
336
  }
337
- u(t) {
338
- const { el: { content: e }, parts: s } = this._$AD, r = (t?.creationScope ?? w).importNode(e, !0);
337
+ u(e) {
338
+ const { el: { content: t }, parts: s } = this._$AD, r = (e?.creationScope ?? w).importNode(t, !0);
339
339
  _.currentNode = r;
340
340
  let o = _.nextNode(), n = 0, l = 0, a = s[0];
341
341
  for (; a !== void 0; ) {
342
342
  if (n === a.index) {
343
343
  let d;
344
- a.type === 2 ? d = new H(o, o.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (d = new Nt(o, this, t)), this._$AV.push(d), a = s[++l];
344
+ a.type === 2 ? d = new R(o, o.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (d = new De(o, this, e)), this._$AV.push(d), a = s[++l];
345
345
  }
346
346
  n !== a?.index && (o = _.nextNode(), n++);
347
347
  }
348
348
  return _.currentNode = w, r;
349
349
  }
350
- p(t) {
351
- let e = 0;
352
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
350
+ p(e) {
351
+ let t = 0;
352
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
353
353
  }
354
354
  }
355
- class H {
355
+ class R {
356
356
  get _$AU() {
357
357
  return this._$AM?._$AU ?? this._$Cv;
358
358
  }
359
- constructor(t, e, s, r) {
360
- this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
359
+ constructor(e, t, s, r) {
360
+ this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
361
361
  }
362
362
  get parentNode() {
363
- let t = this._$AA.parentNode;
364
- const e = this._$AM;
365
- return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
363
+ let e = this._$AA.parentNode;
364
+ const t = this._$AM;
365
+ return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
366
366
  }
367
367
  get startNode() {
368
368
  return this._$AA;
@@ -370,120 +370,120 @@ class H {
370
370
  get endNode() {
371
371
  return this._$AB;
372
372
  }
373
- _$AI(t, e = this) {
374
- t = k(this, t, e), T(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : kt(t) ? this.k(t) : this._(t);
373
+ _$AI(e, t = this) {
374
+ e = k(this, e, t), F(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== C && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ue(e) ? this.k(e) : this._(e);
375
375
  }
376
- O(t) {
377
- return this._$AA.parentNode.insertBefore(t, this._$AB);
376
+ O(e) {
377
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
378
378
  }
379
- T(t) {
380
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
379
+ T(e) {
380
+ this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
381
381
  }
382
- _(t) {
383
- this._$AH !== c && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
382
+ _(e) {
383
+ this._$AH !== c && F(this._$AH) ? this._$AA.nextSibling.data = e : this.T(w.createTextNode(e)), this._$AH = e;
384
384
  }
385
- $(t) {
386
- const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = N.createElement(gt(s.h, s.h[0]), this.options)), s);
387
- if (this._$AH?._$AD === r) this._$AH.p(e);
385
+ $(e) {
386
+ const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = N.createElement(xe(s.h, s.h[0]), this.options)), s);
387
+ if (this._$AH?._$AD === r) this._$AH.p(t);
388
388
  else {
389
- const o = new Ot(r, this), n = o.u(this.options);
390
- o.p(e), this.T(n), this._$AH = o;
389
+ const o = new He(r, this), n = o.u(this.options);
390
+ o.p(t), this.T(n), this._$AH = o;
391
391
  }
392
392
  }
393
- _$AC(t) {
394
- let e = lt.get(t.strings);
395
- return e === void 0 && lt.set(t.strings, e = new N(t)), e;
393
+ _$AC(e) {
394
+ let t = ue.get(e.strings);
395
+ return t === void 0 && ue.set(e.strings, t = new N(e)), t;
396
396
  }
397
- k(t) {
398
- X(this._$AH) || (this._$AH = [], this._$AR());
399
- const e = this._$AH;
397
+ k(e) {
398
+ te(this._$AH) || (this._$AH = [], this._$AR());
399
+ const t = this._$AH;
400
400
  let s, r = 0;
401
- for (const o of t) r === e.length ? e.push(s = new H(this.O(U()), this.O(U()), this, this.options)) : s = e[r], s._$AI(o), r++;
402
- r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
401
+ for (const o of e) r === t.length ? t.push(s = new R(this.O(U()), this.O(U()), this, this.options)) : s = t[r], s._$AI(o), r++;
402
+ r < t.length && (this._$AR(s && s._$AB.nextSibling, r), t.length = r);
403
403
  }
404
- _$AR(t = this._$AA.nextSibling, e) {
405
- for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
406
- const s = st(t).nextSibling;
407
- st(t).remove(), t = s;
404
+ _$AR(e = this._$AA.nextSibling, t) {
405
+ for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
406
+ const s = le(e).nextSibling;
407
+ le(e).remove(), e = s;
408
408
  }
409
409
  }
410
- setConnected(t) {
411
- this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
410
+ setConnected(e) {
411
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
412
412
  }
413
413
  }
414
- class I {
414
+ class W {
415
415
  get tagName() {
416
416
  return this.element.tagName;
417
417
  }
418
418
  get _$AU() {
419
419
  return this._$AM._$AU;
420
420
  }
421
- constructor(t, e, s, r, o) {
422
- this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
421
+ constructor(e, t, s, r, o) {
422
+ this.type = 1, this._$AH = c, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
423
423
  }
424
- _$AI(t, e = this, s, r) {
424
+ _$AI(e, t = this, s, r) {
425
425
  const o = this.strings;
426
426
  let n = !1;
427
- if (o === void 0) t = k(this, t, e, 0), n = !T(t) || t !== this._$AH && t !== E, n && (this._$AH = t);
427
+ if (o === void 0) e = k(this, e, t, 0), n = !F(e) || e !== this._$AH && e !== C, n && (this._$AH = e);
428
428
  else {
429
- const l = t;
429
+ const l = e;
430
430
  let a, d;
431
- for (t = o[0], a = 0; a < o.length - 1; a++) d = k(this, l[s + a], e, a), d === E && (d = this._$AH[a]), n ||= !T(d) || d !== this._$AH[a], d === c ? t = c : t !== c && (t += (d ?? "") + o[a + 1]), this._$AH[a] = d;
431
+ for (e = o[0], a = 0; a < o.length - 1; a++) d = k(this, l[s + a], t, a), d === C && (d = this._$AH[a]), n ||= !F(d) || d !== this._$AH[a], d === c ? e = c : e !== c && (e += (d ?? "") + o[a + 1]), this._$AH[a] = d;
432
432
  }
433
- n && !r && this.j(t);
433
+ n && !r && this.j(e);
434
434
  }
435
- j(t) {
436
- t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
435
+ j(e) {
436
+ e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
437
437
  }
438
438
  }
439
- class Mt extends I {
439
+ class Re extends W {
440
440
  constructor() {
441
441
  super(...arguments), this.type = 3;
442
442
  }
443
- j(t) {
444
- this.element[this.name] = t === c ? void 0 : t;
443
+ j(e) {
444
+ this.element[this.name] = e === c ? void 0 : e;
445
445
  }
446
446
  }
447
- class Ut extends I {
447
+ class je extends W {
448
448
  constructor() {
449
449
  super(...arguments), this.type = 4;
450
450
  }
451
- j(t) {
452
- this.element.toggleAttribute(this.name, !!t && t !== c);
451
+ j(e) {
452
+ this.element.toggleAttribute(this.name, !!e && e !== c);
453
453
  }
454
454
  }
455
- class Tt extends I {
456
- constructor(t, e, s, r, o) {
457
- super(t, e, s, r, o), this.type = 5;
455
+ class Ie extends W {
456
+ constructor(e, t, s, r, o) {
457
+ super(e, t, s, r, o), this.type = 5;
458
458
  }
459
- _$AI(t, e = this) {
460
- if ((t = k(this, t, e, 0) ?? c) === E) return;
461
- const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== c && (s === c || r);
462
- r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
459
+ _$AI(e, t = this) {
460
+ if ((e = k(this, e, t, 0) ?? c) === C) return;
461
+ const s = this._$AH, r = e === c && s !== c || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, o = e !== c && (s === c || r);
462
+ r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
463
463
  }
464
- handleEvent(t) {
465
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
464
+ handleEvent(e) {
465
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
466
466
  }
467
467
  }
468
- class Nt {
469
- constructor(t, e, s) {
470
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
468
+ class De {
469
+ constructor(e, t, s) {
470
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
471
471
  }
472
472
  get _$AU() {
473
473
  return this._$AM._$AU;
474
474
  }
475
- _$AI(t) {
476
- k(this, t);
475
+ _$AI(e) {
476
+ k(this, e);
477
477
  }
478
478
  }
479
- const Ht = K.litHtmlPolyfillSupport;
480
- Ht?.(N, H), (K.litHtmlVersions ??= []).push("3.3.2");
481
- const Rt = (i, t, e) => {
482
- const s = e?.renderBefore ?? t;
479
+ const ze = ee.litHtmlPolyfillSupport;
480
+ ze?.(N, R), (ee.litHtmlVersions ??= []).push("3.3.2");
481
+ const Be = (i, e, t) => {
482
+ const s = t?.renderBefore ?? e;
483
483
  let r = s._$litPart$;
484
484
  if (r === void 0) {
485
- const o = e?.renderBefore ?? null;
486
- s._$litPart$ = r = new H(t.insertBefore(U(), o), o, void 0, e ?? {});
485
+ const o = t?.renderBefore ?? null;
486
+ s._$litPart$ = r = new R(e.insertBefore(U(), o), o, void 0, t ?? {});
487
487
  }
488
488
  return r._$AI(i), r;
489
489
  };
@@ -492,18 +492,18 @@ const Rt = (i, t, e) => {
492
492
  * Copyright 2017 Google LLC
493
493
  * SPDX-License-Identifier: BSD-3-Clause
494
494
  */
495
- const Z = globalThis;
496
- class x extends S {
495
+ const se = globalThis;
496
+ class v extends E {
497
497
  constructor() {
498
498
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
499
  }
500
500
  createRenderRoot() {
501
- const t = super.createRenderRoot();
502
- return this.renderOptions.renderBefore ??= t.firstChild, t;
501
+ const e = super.createRenderRoot();
502
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
503
503
  }
504
- update(t) {
505
- const e = this.render();
506
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Rt(e, this.renderRoot, this.renderOptions);
504
+ update(e) {
505
+ const t = this.render();
506
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Be(t, this.renderRoot, this.renderOptions);
507
507
  }
508
508
  connectedCallback() {
509
509
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -512,104 +512,107 @@ class x extends S {
512
512
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
513
  }
514
514
  render() {
515
- return E;
515
+ return C;
516
516
  }
517
517
  }
518
- x._$litElement$ = !0, x.finalized = !0, Z.litElementHydrateSupport?.({ LitElement: x });
519
- const Ft = Z.litElementPolyfillSupport;
520
- Ft?.({ LitElement: x });
521
- (Z.litElementVersions ??= []).push("4.2.2");
518
+ v._$litElement$ = !0, v.finalized = !0, se.litElementHydrateSupport?.({ LitElement: v });
519
+ const Le = se.litElementPolyfillSupport;
520
+ Le?.({ LitElement: v });
521
+ (se.litElementVersions ??= []).push("4.2.2");
522
522
  /**
523
523
  * @license
524
524
  * Copyright 2017 Google LLC
525
525
  * SPDX-License-Identifier: BSD-3-Clause
526
526
  */
527
- const Y = (i) => (t, e) => {
528
- e !== void 0 ? e.addInitializer(() => {
529
- customElements.define(i, t);
530
- }) : customElements.define(i, t);
527
+ const j = (i) => (e, t) => {
528
+ t !== void 0 ? t.addInitializer(() => {
529
+ customElements.define(i, e);
530
+ }) : customElements.define(i, e);
531
531
  };
532
532
  /**
533
533
  * @license
534
534
  * Copyright 2017 Google LLC
535
535
  * SPDX-License-Identifier: BSD-3-Clause
536
536
  */
537
- const jt = { attribute: !0, type: String, converter: j, reflect: !1, hasChanged: J }, zt = (i = jt, t, e) => {
538
- const { kind: s, metadata: r } = e;
537
+ const Ve = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged: Q }, qe = (i = Ve, e, t) => {
538
+ const { kind: s, metadata: r } = t;
539
539
  let o = globalThis.litPropertyMetadata.get(r);
540
- if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(e.name, i), s === "accessor") {
541
- const { name: n } = e;
540
+ if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(t.name, i), s === "accessor") {
541
+ const { name: n } = t;
542
542
  return { set(l) {
543
- const a = t.get.call(this);
544
- t.set.call(this, l), this.requestUpdate(n, a, i, !0, l);
543
+ const a = e.get.call(this);
544
+ e.set.call(this, l), this.requestUpdate(n, a, i, !0, l);
545
545
  }, init(l) {
546
546
  return l !== void 0 && this.C(n, void 0, i, l), l;
547
547
  } };
548
548
  }
549
549
  if (s === "setter") {
550
- const { name: n } = e;
550
+ const { name: n } = t;
551
551
  return function(l) {
552
552
  const a = this[n];
553
- t.call(this, l), this.requestUpdate(n, a, i, !0, l);
553
+ e.call(this, l), this.requestUpdate(n, a, i, !0, l);
554
554
  };
555
555
  }
556
556
  throw Error("Unsupported decorator location: " + s);
557
557
  };
558
- function A(i) {
559
- return (t, e) => typeof e == "object" ? zt(i, t, e) : ((s, r, o) => {
558
+ function S(i) {
559
+ return (e, t) => typeof t == "object" ? qe(i, e, t) : ((s, r, o) => {
560
560
  const n = r.hasOwnProperty(o);
561
561
  return r.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
562
- })(i, t, e);
562
+ })(i, e, t);
563
563
  }
564
564
  /**
565
565
  * @license
566
566
  * Copyright 2017 Google LLC
567
567
  * SPDX-License-Identifier: BSD-3-Clause
568
568
  */
569
- function L(i) {
570
- return A({ ...i, state: !0, attribute: !1 });
569
+ function m(i) {
570
+ return S({ ...i, state: !0, attribute: !1 });
571
571
  }
572
- var Dt = Object.getOwnPropertyDescriptor, It = (i, t, e, s) => {
573
- for (var r = s > 1 ? void 0 : s ? Dt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
572
+ var We = Object.getOwnPropertyDescriptor, Ke = (i, e, t, s) => {
573
+ for (var r = s > 1 ? void 0 : s ? We(e, t) : e, o = i.length - 1, n; o >= 0; o--)
574
574
  (n = i[o]) && (r = n(r) || r);
575
575
  return r;
576
576
  };
577
- let ht = class extends x {
577
+ let ge = class extends v {
578
578
  render() {
579
579
  return f`<slot></slot>`;
580
580
  }
581
581
  };
582
- ht = It([
583
- Y("vibe-flags")
584
- ], ht);
585
- const O = "vibe-flags:";
586
- class Lt extends EventTarget {
582
+ ge = Ke([
583
+ j("vibe-flags")
584
+ ], ge);
585
+ const M = "vibe-flags:";
586
+ function X(i) {
587
+ return i.type === "boolean" ? !1 : i.options[0] || "";
588
+ }
589
+ class Je extends EventTarget {
587
590
  constructor() {
588
- super(...arguments), this.configs = /* @__PURE__ */ new Map(), this.state = {}, this.listening = !1, this.onStorageEvent = (t) => {
589
- if (!t.key?.startsWith(O)) return;
590
- const e = t.key.slice(O.length);
591
- if (this.configs.has(e))
591
+ super(...arguments), this.configs = /* @__PURE__ */ new Map(), this.state = {}, this.listening = !1, this.onStorageEvent = (e) => {
592
+ if (!e.key?.startsWith(M)) return;
593
+ const t = e.key.slice(M.length), s = this.configs.get(t);
594
+ if (s)
592
595
  try {
593
- const s = t.newValue ? JSON.parse(t.newValue) : this.configs.get(e).default;
594
- this.state[e] = s, this.dispatch(e);
596
+ const r = e.newValue ? JSON.parse(e.newValue) : X(s);
597
+ this.state[t] = r, this.dispatch(t);
595
598
  } catch {
596
599
  }
597
600
  };
598
601
  }
599
- register(t) {
600
- this.configs.set(t.key, t);
601
- const e = this.readFromStorage(t.key);
602
- this.state[t.key] = e ?? t.default, this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(t.key);
602
+ register(e) {
603
+ this.configs.set(e.key, e);
604
+ const t = this.readFromStorage(e.key);
605
+ this.state[e.key] = t ?? X(e), this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
603
606
  }
604
- unregister(t) {
605
- this.configs.delete(t), delete this.state[t], this.dispatch();
607
+ unregister(e) {
608
+ this.configs.delete(e), delete this.state[e], this.dispatch();
606
609
  }
607
- get(t) {
608
- return this.state[t];
610
+ get(e) {
611
+ return this.state[e];
609
612
  }
610
- set(t, e) {
611
- const s = this.configs.get(t);
612
- s && (s.type === "boolean" && typeof e != "boolean" || s.type === "select" && (typeof e != "string" || !s.options.includes(e)) || (this.state[t] = e, this.writeToStorage(t, e), this.dispatch(t)));
613
+ set(e, t) {
614
+ const s = this.configs.get(e);
615
+ s && (s.type === "boolean" && typeof t != "boolean" || s.type === "select" && (typeof t != "string" || !s.options.includes(t)) || (this.state[e] = t, this.writeToStorage(e, t), this.dispatch(e)));
613
616
  }
614
617
  getAll() {
615
618
  return { ...this.state };
@@ -617,122 +620,205 @@ class Lt extends EventTarget {
617
620
  getConfig() {
618
621
  return Array.from(this.configs.values());
619
622
  }
620
- getConfigForKey(t) {
621
- return this.configs.get(t);
623
+ getConfigForKey(e) {
624
+ return this.configs.get(e);
622
625
  }
623
626
  reset() {
624
- for (const [t, e] of this.configs)
625
- this.state[t] = e.default, this.removeFromStorage(t);
627
+ for (const [e, t] of this.configs)
628
+ this.state[e] = X(t), this.removeFromStorage(e);
626
629
  this.dispatch();
627
630
  }
628
- readFromStorage(t) {
631
+ readFromStorage(e) {
629
632
  if (typeof window > "u") return null;
630
633
  try {
631
- const e = localStorage.getItem(O + t);
632
- return e === null ? null : JSON.parse(e);
634
+ const t = localStorage.getItem(M + e);
635
+ return t === null ? null : JSON.parse(t);
633
636
  } catch {
634
637
  return null;
635
638
  }
636
639
  }
637
- writeToStorage(t, e) {
640
+ writeToStorage(e, t) {
638
641
  if (!(typeof window > "u"))
639
642
  try {
640
- localStorage.setItem(O + t, JSON.stringify(e));
643
+ localStorage.setItem(M + e, JSON.stringify(t));
641
644
  } catch {
642
645
  }
643
646
  }
644
- removeFromStorage(t) {
647
+ removeFromStorage(e) {
645
648
  if (!(typeof window > "u"))
646
649
  try {
647
- localStorage.removeItem(O + t);
650
+ localStorage.removeItem(M + e);
648
651
  } catch {
649
652
  }
650
653
  }
651
- dispatch(t) {
652
- const e = { key: t, state: this.getAll() }, s = new CustomEvent("vibe-flags-changed", {
653
- detail: e,
654
+ dispatch(e) {
655
+ const t = { key: e, state: this.getAll() }, s = new CustomEvent("vibe-flags-changed", {
656
+ detail: t,
654
657
  bubbles: !0
655
658
  });
656
- this.dispatchEvent(s), typeof window < "u" && window.dispatchEvent(new CustomEvent("vibe-flags-changed", { detail: e }));
659
+ this.dispatchEvent(s), typeof window < "u" && window.dispatchEvent(new CustomEvent("vibe-flags-changed", { detail: t }));
657
660
  }
658
661
  }
659
- const m = new Lt();
660
- var Vt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, b = (i, t, e, s) => {
661
- for (var r = s > 1 ? void 0 : s ? Bt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
662
- (n = i[o]) && (r = (s ? n(t, e, r) : n(r)) || r);
663
- return s && r && Vt(t, e, r), r;
662
+ const u = new Je();
663
+ var Xe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, P = (i, e, t, s) => {
664
+ for (var r = s > 1 ? void 0 : s ? Ye(e, t) : e, o = i.length - 1, n; o >= 0; o--)
665
+ (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
666
+ return s && r && Xe(e, t, r), r;
664
667
  };
665
- let g = class extends x {
668
+ if (typeof document < "u" && !document.getElementById("vibe-flag-fouc")) {
669
+ const i = document.createElement("style");
670
+ i.id = "vibe-flag-fouc", i.textContent = "vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{visibility:hidden}", document.head.appendChild(i);
671
+ }
672
+ let A = class extends v {
666
673
  constructor() {
667
- super(...arguments), this.key = "", this.description = "", this.type = "boolean", this.value = "true", this.defaultValue = "", this.options = "", this.isMatch = !1, this.registered = !1, this.onFlagChange = () => {
674
+ super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.ready = !1, this.onFlagChange = () => {
668
675
  this.evaluate();
669
676
  };
670
677
  }
671
678
  connectedCallback() {
672
- super.connectedCallback(), window.addEventListener("vibe-flags-changed", this.onFlagChange), this.registerFlag(), this.evaluate();
679
+ super.connectedCallback(), window.addEventListener("vibe-flags-changed", this.onFlagChange), this.registerFlag();
673
680
  }
674
681
  disconnectedCallback() {
675
682
  super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
676
683
  }
677
684
  willUpdate(i) {
678
- ["key", "description", "type", "defaultValue", "options"].some((e) => i.has(e)) && this.registerFlag();
685
+ (i.has("name") || i.has("description")) && this.registerFlag();
679
686
  }
680
687
  registerFlag() {
681
- if (!this.key) return;
682
- const i = this.type === "select" ? {
683
- key: this.key,
684
- type: "select",
685
- default: this.defaultValue || this.parseOptions()[0] || "",
686
- options: this.parseOptions(),
687
- label: this.description || void 0
688
- } : {
689
- key: this.key,
688
+ this.name && (u.getConfigForKey(this.name) || u.register({
689
+ key: this.name,
690
690
  type: "boolean",
691
- default: this.defaultValue ? this.defaultValue === "true" : !1,
692
691
  label: this.description || void 0
693
- };
694
- m.register(i), this.registered = !0, this.evaluate();
695
- }
696
- parseOptions() {
697
- return this.options.split(",").map((i) => i.trim()).filter(Boolean);
692
+ }), this.evaluate());
698
693
  }
699
694
  evaluate() {
700
- const i = m.get(this.key);
701
- if (i === void 0) {
702
- this.isMatch = !1;
703
- return;
704
- }
705
- this.isMatch = String(i) === this.value;
695
+ const i = u.get(this.name);
696
+ i === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(i) === this.value, this.ready || (this.ready = !0, this.style.visibility = "visible");
706
697
  }
707
698
  render() {
708
699
  return this.isMatch ? f`<slot></slot>` : c;
709
700
  }
710
701
  };
711
- b([
712
- A({ type: String })
713
- ], g.prototype, "key", 2);
714
- b([
715
- A({ type: String })
716
- ], g.prototype, "description", 2);
717
- b([
718
- A({ type: String })
719
- ], g.prototype, "type", 2);
720
- b([
721
- A({ type: String })
722
- ], g.prototype, "value", 2);
723
- b([
724
- A({ type: String, attribute: "default" })
725
- ], g.prototype, "defaultValue", 2);
726
- b([
727
- A({ type: String })
728
- ], g.prototype, "options", 2);
729
- b([
730
- L()
731
- ], g.prototype, "isMatch", 2);
732
- g = b([
733
- Y("vibe-flag")
734
- ], g);
735
- const Wt = dt`
702
+ P([
703
+ S({ type: String })
704
+ ], A.prototype, "name", 2);
705
+ P([
706
+ S({ type: String })
707
+ ], A.prototype, "description", 2);
708
+ P([
709
+ S({ type: String })
710
+ ], A.prototype, "value", 2);
711
+ P([
712
+ m()
713
+ ], A.prototype, "isMatch", 2);
714
+ P([
715
+ m()
716
+ ], A.prototype, "ready", 2);
717
+ A = P([
718
+ j("vibe-flag-boolean")
719
+ ], A);
720
+ var Ze = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, K = (i, e, t, s) => {
721
+ for (var r = s > 1 ? void 0 : s ? Ge(e, t) : e, o = i.length - 1, n; o >= 0; o--)
722
+ (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
723
+ return s && r && Ze(e, t, r), r;
724
+ };
725
+ let H = class extends v {
726
+ constructor() {
727
+ super(...arguments), this.name = "", this.description = "", this.ready = !1, this.onFlagChange = () => {
728
+ this.syncOptions();
729
+ };
730
+ }
731
+ connectedCallback() {
732
+ super.connectedCallback(), window.addEventListener("vibe-flags-changed", this.onFlagChange), queueMicrotask(() => this.registerFlag());
733
+ }
734
+ disconnectedCallback() {
735
+ super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
736
+ }
737
+ willUpdate(i) {
738
+ (i.has("name") || i.has("description")) && this.registerFlag();
739
+ }
740
+ getOptions() {
741
+ return Array.from(this.querySelectorAll("vibe-flag-option"));
742
+ }
743
+ registerFlag() {
744
+ if (!this.name) return;
745
+ const i = this.getOptions().map((e) => e.value).filter(Boolean);
746
+ i.length !== 0 && (u.getConfigForKey(this.name) || u.register({
747
+ key: this.name,
748
+ type: "select",
749
+ options: i,
750
+ label: this.description || void 0
751
+ }), this.syncOptions());
752
+ }
753
+ syncOptions() {
754
+ const i = u.get(this.name);
755
+ for (const e of this.getOptions())
756
+ e.active = e.value === i;
757
+ this.ready || (this.ready = !0, this.style.visibility = "visible");
758
+ }
759
+ render() {
760
+ return f`<slot></slot>`;
761
+ }
762
+ };
763
+ K([
764
+ S({ type: String })
765
+ ], H.prototype, "name", 2);
766
+ K([
767
+ S({ type: String })
768
+ ], H.prototype, "description", 2);
769
+ K([
770
+ m()
771
+ ], H.prototype, "ready", 2);
772
+ H = K([
773
+ j("vibe-flag-select")
774
+ ], H);
775
+ var Qe = Object.defineProperty, et = Object.getOwnPropertyDescriptor, ie = (i, e, t, s) => {
776
+ for (var r = s > 1 ? void 0 : s ? et(e, t) : e, o = i.length - 1, n; o >= 0; o--)
777
+ (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
778
+ return s && r && Qe(e, t, r), r;
779
+ };
780
+ let V = class extends v {
781
+ constructor() {
782
+ super(...arguments), this.value = "", this.active = !1;
783
+ }
784
+ render() {
785
+ return this.active ? f`<slot></slot>` : c;
786
+ }
787
+ };
788
+ ie([
789
+ S({ type: String })
790
+ ], V.prototype, "value", 2);
791
+ ie([
792
+ m()
793
+ ], V.prototype, "active", 2);
794
+ V = ie([
795
+ j("vibe-flag-option")
796
+ ], V);
797
+ const tt = G`
798
+ :host {
799
+ --vf-bg: #0a0a0a;
800
+ --vf-bg-muted: #171717;
801
+ --vf-bg-hover: #262626;
802
+ --vf-border: #2e2e2e;
803
+ --vf-text: #fafafa;
804
+ --vf-text-muted: #a3a3a3;
805
+ --vf-primary: #fafafa;
806
+ --vf-primary-fg: #0a0a0a;
807
+ --vf-accent: #818cf8;
808
+ --vf-accent-fg: #ffffff;
809
+ --vf-destructive: #ef4444;
810
+ --vf-radius: 6px;
811
+ --vf-radius-lg: 8px;
812
+ --vf-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
813
+ 'Helvetica Neue', Arial, sans-serif;
814
+ --vf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4),
815
+ 0 1px 2px -1px rgba(0, 0, 0, 0.4);
816
+ --vf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
817
+ 0 4px 6px -4px rgba(0, 0, 0, 0.5);
818
+ --vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
819
+ 0 8px 10px -6px rgba(0, 0, 0, 0.6);
820
+ }
821
+ `, st = G`
736
822
  :host {
737
823
  --vf-bg: #ffffff;
738
824
  --vf-bg-muted: #f5f5f5;
@@ -757,25 +843,41 @@ const Wt = dt`
757
843
  0 8px 10px -6px rgba(0, 0, 0, 0.1);
758
844
  }
759
845
  `;
760
- var qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, V = (i, t, e, s) => {
761
- for (var r = s > 1 ? void 0 : s ? Jt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
762
- (n = i[o]) && (r = (s ? n(t, e, r) : n(r)) || r);
763
- return s && r && qt(t, e, r), r;
846
+ var it = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, I = (i, e, t, s) => {
847
+ for (var r = s > 1 ? void 0 : s ? rt(e, t) : e, o = i.length - 1, n; o >= 0; o--)
848
+ (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
849
+ return s && r && it(e, t, r), r;
764
850
  };
765
- let C = class extends x {
851
+ const ve = "vibeFlagsTheme";
852
+ let $ = class extends v {
766
853
  constructor() {
767
- super(...arguments), this.open = !1, this.flags = {}, this.configs = [], this.onFlagChange = () => {
854
+ super(...arguments), this.open = !1, this.flags = {}, this.configs = [], this.darkMode = !0, this.onFlagChange = () => {
768
855
  this.syncFromStore();
769
856
  };
770
857
  }
771
858
  connectedCallback() {
772
- super.connectedCallback(), window.addEventListener("vibe-flags-changed", this.onFlagChange), this.syncFromStore();
859
+ super.connectedCallback(), window.addEventListener("vibe-flags-changed", this.onFlagChange), this.syncFromStore(), this.loadTheme();
773
860
  }
774
861
  disconnectedCallback() {
775
862
  super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
776
863
  }
864
+ loadTheme() {
865
+ if (typeof window > "u") return;
866
+ const i = localStorage.getItem(ve);
867
+ this.darkMode = i ? i === "dark" : !0, this.applyTheme();
868
+ }
869
+ toggleTheme() {
870
+ this.darkMode = !this.darkMode, localStorage.setItem(ve, this.darkMode ? "dark" : "light"), this.applyTheme();
871
+ }
872
+ applyTheme() {
873
+ const i = this.darkMode ? tt : st, e = new CSSStyleSheet();
874
+ e.replaceSync(i.cssText), this.shadowRoot.adoptedStyleSheets = [
875
+ ...$.elementStyles.map((t) => t.styleSheet),
876
+ e
877
+ ];
878
+ }
777
879
  syncFromStore() {
778
- this.configs = m.getConfig(), this.flags = m.getAll();
880
+ this.configs = u.getConfig(), this.flags = u.getAll();
779
881
  }
780
882
  toggleSidebar() {
781
883
  this.open = !this.open;
@@ -784,15 +886,15 @@ let C = class extends x {
784
886
  this.open = !1;
785
887
  }
786
888
  onToggle(i) {
787
- const t = this.flags[i];
788
- m.set(i, !t);
889
+ const e = this.flags[i];
890
+ u.set(i, !e);
789
891
  }
790
- onSelect(i, t) {
791
- const e = t.target;
792
- m.set(i, e.value);
892
+ onSelect(i, e) {
893
+ const t = e.target;
894
+ u.set(i, t.value);
793
895
  }
794
896
  onReset() {
795
- m.reset();
897
+ u.reset();
796
898
  }
797
899
  renderFlagIcon() {
798
900
  return f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" y1="22" x2="4" y2="15"/></svg>`;
@@ -803,8 +905,14 @@ let C = class extends x {
803
905
  renderChevronDown() {
804
906
  return f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>`;
805
907
  }
908
+ renderSunIcon() {
909
+ return f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>`;
910
+ }
911
+ renderMoonIcon() {
912
+ return f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>`;
913
+ }
806
914
  renderBooleanFlag(i) {
807
- const t = this.flags[i.key] === !0;
915
+ const e = this.flags[i.key] === !0;
808
916
  return f`
809
917
  <div class="flag-item">
810
918
  <div class="flag-row">
@@ -815,7 +923,7 @@ let C = class extends x {
815
923
  <label class="toggle">
816
924
  <input
817
925
  type="checkbox"
818
- .checked=${t}
926
+ .checked=${e}
819
927
  @change=${() => this.onToggle(i.key)}
820
928
  />
821
929
  <span class="toggle-track"></span>
@@ -827,7 +935,7 @@ let C = class extends x {
827
935
  }
828
936
  renderSelectFlag(i) {
829
937
  if (i.type !== "select") return c;
830
- const t = this.flags[i.key];
938
+ const e = this.flags[i.key];
831
939
  return f`
832
940
  <div class="flag-item">
833
941
  <div class="flag-row">
@@ -838,12 +946,12 @@ let C = class extends x {
838
946
  <div class="select-wrapper">
839
947
  <select
840
948
  class="select"
841
- .value=${t}
842
- @change=${(e) => this.onSelect(i.key, e)}
949
+ .value=${e}
950
+ @change=${(t) => this.onSelect(i.key, t)}
843
951
  >
844
952
  ${i.options.map(
845
- (e) => f`<option value=${e} ?selected=${e === t}>
846
- ${e}
953
+ (t) => f`<option value=${t} ?selected=${t === e}>
954
+ ${t}
847
955
  </option>`
848
956
  )}
849
957
  </select>
@@ -870,9 +978,14 @@ let C = class extends x {
870
978
  VibeFlags
871
979
  <span class="badge">${this.configs.length}</span>
872
980
  </h2>
873
- <button class="close-btn" @click=${this.closeSidebar} aria-label="Close">
874
- ${this.renderCloseIcon()}
875
- </button>
981
+ <div class="header-actions">
982
+ <button class="icon-btn" @click=${this.toggleTheme} aria-label="Toggle theme" title="${this.darkMode ? "Switch to light theme" : "Switch to dark theme"}">
983
+ ${this.darkMode ? this.renderSunIcon() : this.renderMoonIcon()}
984
+ </button>
985
+ <button class="icon-btn" @click=${this.closeSidebar} aria-label="Close">
986
+ ${this.renderCloseIcon()}
987
+ </button>
988
+ </div>
876
989
  </div>
877
990
 
878
991
  <div class="flags">
@@ -890,9 +1003,8 @@ let C = class extends x {
890
1003
  `;
891
1004
  }
892
1005
  };
893
- C.styles = [
894
- Wt,
895
- dt`
1006
+ $.styles = [
1007
+ G`
896
1008
  * {
897
1009
  box-sizing: border-box;
898
1010
  margin: 0;
@@ -979,6 +1091,12 @@ C.styles = [
979
1091
  flex-shrink: 0;
980
1092
  }
981
1093
 
1094
+ .header-left {
1095
+ display: flex;
1096
+ align-items: center;
1097
+ gap: 8px;
1098
+ }
1099
+
982
1100
  .header h2 {
983
1101
  font-size: 16px;
984
1102
  font-weight: 600;
@@ -994,6 +1112,12 @@ C.styles = [
994
1112
  color: var(--vf-accent);
995
1113
  }
996
1114
 
1115
+ .header-actions {
1116
+ display: flex;
1117
+ align-items: center;
1118
+ gap: 4px;
1119
+ }
1120
+
997
1121
  .badge {
998
1122
  font-size: 11px;
999
1123
  font-weight: 500;
@@ -1004,7 +1128,7 @@ C.styles = [
1004
1128
  border: 1px solid var(--vf-border);
1005
1129
  }
1006
1130
 
1007
- .close-btn {
1131
+ .icon-btn {
1008
1132
  width: 32px;
1009
1133
  height: 32px;
1010
1134
  border: none;
@@ -1018,12 +1142,12 @@ C.styles = [
1018
1142
  transition: all 0.15s ease;
1019
1143
  }
1020
1144
 
1021
- .close-btn:hover {
1145
+ .icon-btn:hover {
1022
1146
  background: var(--vf-bg-muted);
1023
1147
  color: var(--vf-text);
1024
1148
  }
1025
1149
 
1026
- .close-btn svg {
1150
+ .icon-btn svg {
1027
1151
  width: 16px;
1028
1152
  height: 16px;
1029
1153
  }
@@ -1196,21 +1320,26 @@ C.styles = [
1196
1320
  }
1197
1321
  `
1198
1322
  ];
1199
- V([
1200
- L()
1201
- ], C.prototype, "open", 2);
1202
- V([
1203
- L()
1204
- ], C.prototype, "flags", 2);
1205
- V([
1206
- L()
1207
- ], C.prototype, "configs", 2);
1208
- C = V([
1209
- Y("vibe-toolbar")
1210
- ], C);
1323
+ I([
1324
+ m()
1325
+ ], $.prototype, "open", 2);
1326
+ I([
1327
+ m()
1328
+ ], $.prototype, "flags", 2);
1329
+ I([
1330
+ m()
1331
+ ], $.prototype, "configs", 2);
1332
+ I([
1333
+ m()
1334
+ ], $.prototype, "darkMode", 2);
1335
+ $ = I([
1336
+ j("vibe-toolbar")
1337
+ ], $);
1211
1338
  export {
1212
- g as VibeFlag,
1213
- ht as VibeFlags,
1214
- C as VibeToolbar,
1215
- m as flagStore
1339
+ A as VibeFlagBoolean,
1340
+ V as VibeFlagOption,
1341
+ H as VibeFlagSelect,
1342
+ ge as VibeFlags,
1343
+ $ as VibeToolbar,
1344
+ u as flagStore
1216
1345
  };