@triptease/tt-navbar 0.0.13 → 0.0.15

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.
package/dist/web/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.13
2
+ * @triptease/tt-navbar v0.0.15
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -18,16 +18,16 @@ var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "a
18
18
  var s = Symbol();
19
19
  var o = /* @__PURE__ */ new WeakMap();
20
20
  var n = class {
21
- constructor(t5, e7, o8) {
21
+ constructor(t5, e8, o8) {
22
22
  if (this._$cssResult$ = true, o8 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
23
- this.cssText = t5, this.t = e7;
23
+ this.cssText = t5, this.t = e8;
24
24
  }
25
25
  get styleSheet() {
26
26
  let t5 = this.o;
27
27
  const s4 = this.t;
28
28
  if (e && void 0 === t5) {
29
- const e7 = void 0 !== s4 && 1 === s4.length;
30
- e7 && (t5 = o.get(s4)), void 0 === t5 && ((this.o = t5 = new CSSStyleSheet()).replaceSync(this.cssText), e7 && o.set(s4, t5));
29
+ const e8 = void 0 !== s4 && 1 === s4.length;
30
+ e8 && (t5 = o.get(s4)), void 0 === t5 && ((this.o = t5 = new CSSStyleSheet()).replaceSync(this.cssText), e8 && o.set(s4, t5));
31
31
  }
32
32
  return t5;
33
33
  }
@@ -36,8 +36,8 @@ var n = class {
36
36
  }
37
37
  };
38
38
  var r = (t5) => new n("string" == typeof t5 ? t5 : t5 + "", void 0, s);
39
- var i = (t5, ...e7) => {
40
- const o8 = 1 === t5.length ? t5[0] : e7.reduce((e8, s4, o9) => e8 + ((t6) => {
39
+ var i = (t5, ...e8) => {
40
+ const o8 = 1 === t5.length ? t5[0] : e8.reduce((e9, s4, o9) => e9 + ((t6) => {
41
41
  if (true === t6._$cssResult$) return t6.cssText;
42
42
  if ("number" == typeof t6) return t6;
43
43
  throw Error("Value passed to 'css' function must be a 'css' function result: " + t6 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
@@ -46,15 +46,15 @@ var i = (t5, ...e7) => {
46
46
  };
47
47
  var S = (s4, o8) => {
48
48
  if (e) s4.adoptedStyleSheets = o8.map((t5) => t5 instanceof CSSStyleSheet ? t5 : t5.styleSheet);
49
- else for (const e7 of o8) {
49
+ else for (const e8 of o8) {
50
50
  const o9 = document.createElement("style"), n5 = t.litNonce;
51
- void 0 !== n5 && o9.setAttribute("nonce", n5), o9.textContent = e7.cssText, s4.appendChild(o9);
51
+ void 0 !== n5 && o9.setAttribute("nonce", n5), o9.textContent = e8.cssText, s4.appendChild(o9);
52
52
  }
53
53
  };
54
54
  var c = e ? (t5) => t5 : (t5) => t5 instanceof CSSStyleSheet ? ((t6) => {
55
- let e7 = "";
56
- for (const s4 of t6.cssRules) e7 += s4.cssText;
57
- return r(e7);
55
+ let e8 = "";
56
+ for (const s4 of t6.cssRules) e8 += s4.cssText;
57
+ return r(e8);
58
58
  })(t5) : t5;
59
59
 
60
60
  // ../../node_modules/@lit/reactive-element/reactive-element.js
@@ -110,14 +110,14 @@ var y = class extends HTMLElement {
110
110
  }
111
111
  }
112
112
  static getPropertyDescriptor(t5, s4, i6) {
113
- const { get: e7, set: r5 } = h(this.prototype, t5) ?? { get() {
113
+ const { get: e8, set: r7 } = h(this.prototype, t5) ?? { get() {
114
114
  return this[s4];
115
115
  }, set(t6) {
116
116
  this[s4] = t6;
117
117
  } };
118
- return { get: e7, set(s5) {
119
- const h3 = e7?.call(this);
120
- r5?.call(this, s5), this.requestUpdate(t5, h3, i6);
118
+ return { get: e8, set(s5) {
119
+ const h3 = e8?.call(this);
120
+ r7?.call(this, s5), this.requestUpdate(t5, h3, i6);
121
121
  }, configurable: true, enumerable: true };
122
122
  }
123
123
  static getPropertyOptions(t5) {
@@ -149,8 +149,8 @@ var y = class extends HTMLElement {
149
149
  static finalizeStyles(s4) {
150
150
  const i6 = [];
151
151
  if (Array.isArray(s4)) {
152
- const e7 = new Set(s4.flat(1 / 0).reverse());
153
- for (const s5 of e7) i6.unshift(c(s5));
152
+ const e8 = new Set(s4.flat(1 / 0).reverse());
153
+ for (const s5 of e8) i6.unshift(c(s5));
154
154
  } else void 0 !== s4 && i6.push(c(s4));
155
155
  return i6;
156
156
  }
@@ -191,29 +191,29 @@ var y = class extends HTMLElement {
191
191
  this._$AK(t5, i6);
192
192
  }
193
193
  _$ET(t5, s4) {
194
- const i6 = this.constructor.elementProperties.get(t5), e7 = this.constructor._$Eu(t5, i6);
195
- if (void 0 !== e7 && true === i6.reflect) {
194
+ const i6 = this.constructor.elementProperties.get(t5), e8 = this.constructor._$Eu(t5, i6);
195
+ if (void 0 !== e8 && true === i6.reflect) {
196
196
  const h3 = (void 0 !== i6.converter?.toAttribute ? i6.converter : u).toAttribute(s4, i6.type);
197
- this._$Em = t5, null == h3 ? this.removeAttribute(e7) : this.setAttribute(e7, h3), this._$Em = null;
197
+ this._$Em = t5, null == h3 ? this.removeAttribute(e8) : this.setAttribute(e8, h3), this._$Em = null;
198
198
  }
199
199
  }
200
200
  _$AK(t5, s4) {
201
- const i6 = this.constructor, e7 = i6._$Eh.get(t5);
202
- if (void 0 !== e7 && this._$Em !== e7) {
203
- const t6 = i6.getPropertyOptions(e7), h3 = "function" == typeof t6.converter ? { fromAttribute: t6.converter } : void 0 !== t6.converter?.fromAttribute ? t6.converter : u;
204
- this._$Em = e7, this[e7] = h3.fromAttribute(s4, t6.type) ?? this._$Ej?.get(e7) ?? null, this._$Em = null;
201
+ const i6 = this.constructor, e8 = i6._$Eh.get(t5);
202
+ if (void 0 !== e8 && this._$Em !== e8) {
203
+ const t6 = i6.getPropertyOptions(e8), h3 = "function" == typeof t6.converter ? { fromAttribute: t6.converter } : void 0 !== t6.converter?.fromAttribute ? t6.converter : u;
204
+ this._$Em = e8, this[e8] = h3.fromAttribute(s4, t6.type) ?? this._$Ej?.get(e8) ?? null, this._$Em = null;
205
205
  }
206
206
  }
207
207
  requestUpdate(t5, s4, i6) {
208
208
  if (void 0 !== t5) {
209
- const e7 = this.constructor, h3 = this[t5];
210
- if (i6 ?? (i6 = e7.getPropertyOptions(t5)), !((i6.hasChanged ?? f)(h3, s4) || i6.useDefault && i6.reflect && h3 === this._$Ej?.get(t5) && !this.hasAttribute(e7._$Eu(t5, i6)))) return;
209
+ const e8 = this.constructor, h3 = this[t5];
210
+ if (i6 ?? (i6 = e8.getPropertyOptions(t5)), !((i6.hasChanged ?? f)(h3, s4) || i6.useDefault && i6.reflect && h3 === this._$Ej?.get(t5) && !this.hasAttribute(e8._$Eu(t5, i6)))) return;
211
211
  this.C(t5, s4, i6);
212
212
  }
213
213
  false === this.isUpdatePending && (this._$ES = this._$EP());
214
214
  }
215
- C(t5, s4, { useDefault: i6, reflect: e7, wrapped: h3 }, r5) {
216
- i6 && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t5) && (this._$Ej.set(t5, r5 ?? s4 ?? this[t5]), true !== h3 || void 0 !== r5) || (this._$AL.has(t5) || (this.hasUpdated || i6 || (s4 = void 0), this._$AL.set(t5, s4)), true === e7 && this._$Em !== t5 && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t5));
215
+ C(t5, s4, { useDefault: i6, reflect: e8, wrapped: h3 }, r7) {
216
+ i6 && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t5) && (this._$Ej.set(t5, r7 ?? s4 ?? this[t5]), true !== h3 || void 0 !== r7) || (this._$AL.has(t5) || (this.hasUpdated || i6 || (s4 = void 0), this._$AL.set(t5, s4)), true === e8 && this._$Em !== t5 && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t5));
217
217
  }
218
218
  async _$EP() {
219
219
  this.isUpdatePending = true;
@@ -237,8 +237,8 @@ var y = class extends HTMLElement {
237
237
  }
238
238
  const t6 = this.constructor.elementProperties;
239
239
  if (t6.size > 0) for (const [s5, i6] of t6) {
240
- const { wrapped: t7 } = i6, e7 = this[s5];
241
- true !== t7 || this._$AL.has(s5) || void 0 === e7 || this.C(s5, void 0, i6, e7);
240
+ const { wrapped: t7 } = i6, e8 = this[s5];
241
+ true !== t7 || this._$AL.has(s5) || void 0 === e8 || this.C(s5, void 0, i6, e8);
242
242
  }
243
243
  }
244
244
  let t5 = false;
@@ -313,11 +313,11 @@ function P(t5, i6) {
313
313
  }
314
314
  var V = (t5, i6) => {
315
315
  const s4 = t5.length - 1, o8 = [];
316
- let r5, l3 = 2 === i6 ? "<svg>" : 3 === i6 ? "<math>" : "", c4 = f2;
316
+ let r7, l3 = 2 === i6 ? "<svg>" : 3 === i6 ? "<math>" : "", c4 = f2;
317
317
  for (let i7 = 0; i7 < s4; i7++) {
318
318
  const s5 = t5[i7];
319
319
  let a3, u3, d3 = -1, y3 = 0;
320
- for (; y3 < s5.length && (c4.lastIndex = y3, u3 = c4.exec(s5), null !== u3); ) y3 = c4.lastIndex, c4 === f2 ? "!--" === u3[1] ? c4 = v : void 0 !== u3[1] ? c4 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r5 = RegExp("</" + u3[2], "g")), c4 = m) : void 0 !== u3[3] && (c4 = m) : c4 === m ? ">" === u3[0] ? (c4 = r5 ?? f2, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p2) : c4 === g || c4 === p2 ? c4 = m : c4 === v || c4 === _ ? c4 = f2 : (c4 = m, r5 = void 0);
320
+ for (; y3 < s5.length && (c4.lastIndex = y3, u3 = c4.exec(s5), null !== u3); ) y3 = c4.lastIndex, c4 === f2 ? "!--" === u3[1] ? c4 = v : void 0 !== u3[1] ? c4 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r7 = RegExp("</" + u3[2], "g")), c4 = m) : void 0 !== u3[3] && (c4 = m) : c4 === m ? ">" === u3[0] ? (c4 = r7 ?? f2, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p2) : c4 === g || c4 === p2 ? c4 = m : c4 === v || c4 === _ ? c4 = f2 : (c4 = m, r7 = void 0);
321
321
  const x2 = c4 === m && t5[i7 + 1].startsWith("/>") ? " " : "";
322
322
  l3 += c4 === f2 ? s5 + n3 : d3 >= 0 ? (o8.push(a3), s5.slice(0, d3) + e3 + s5.slice(d3) + h2 + x2) : s5 + h2 + (-2 === d3 ? i7 : x2);
323
323
  }
@@ -325,7 +325,7 @@ var V = (t5, i6) => {
325
325
  };
326
326
  var N = class _N {
327
327
  constructor({ strings: t5, _$litType$: s4 }, n5) {
328
- let r5;
328
+ let r7;
329
329
  this.parts = [];
330
330
  let c4 = 0, a3 = 0;
331
331
  const u3 = t5.length - 1, d3 = this.parts, [f3, v2] = V(t5, s4);
@@ -333,24 +333,24 @@ var N = class _N {
333
333
  const t6 = this.el.content.firstChild;
334
334
  t6.replaceWith(...t6.childNodes);
335
335
  }
336
- for (; null !== (r5 = C.nextNode()) && d3.length < u3; ) {
337
- if (1 === r5.nodeType) {
338
- if (r5.hasAttributes()) for (const t6 of r5.getAttributeNames()) if (t6.endsWith(e3)) {
339
- const i6 = v2[a3++], s5 = r5.getAttribute(t6).split(h2), e7 = /([.?@])?(.*)/.exec(i6);
340
- d3.push({ type: 1, index: c4, name: e7[2], strings: s5, ctor: "." === e7[1] ? H : "?" === e7[1] ? I : "@" === e7[1] ? L : k }), r5.removeAttribute(t6);
341
- } else t6.startsWith(h2) && (d3.push({ type: 6, index: c4 }), r5.removeAttribute(t6));
342
- if ($.test(r5.tagName)) {
343
- const t6 = r5.textContent.split(h2), s5 = t6.length - 1;
336
+ for (; null !== (r7 = C.nextNode()) && d3.length < u3; ) {
337
+ if (1 === r7.nodeType) {
338
+ if (r7.hasAttributes()) for (const t6 of r7.getAttributeNames()) if (t6.endsWith(e3)) {
339
+ const i6 = v2[a3++], s5 = r7.getAttribute(t6).split(h2), e8 = /([.?@])?(.*)/.exec(i6);
340
+ d3.push({ type: 1, index: c4, name: e8[2], strings: s5, ctor: "." === e8[1] ? H : "?" === e8[1] ? I : "@" === e8[1] ? L : k }), r7.removeAttribute(t6);
341
+ } else t6.startsWith(h2) && (d3.push({ type: 6, index: c4 }), r7.removeAttribute(t6));
342
+ if ($.test(r7.tagName)) {
343
+ const t6 = r7.textContent.split(h2), s5 = t6.length - 1;
344
344
  if (s5 > 0) {
345
- r5.textContent = i3 ? i3.emptyScript : "";
346
- for (let i6 = 0; i6 < s5; i6++) r5.append(t6[i6], l2()), C.nextNode(), d3.push({ type: 2, index: ++c4 });
347
- r5.append(t6[s5], l2());
345
+ r7.textContent = i3 ? i3.emptyScript : "";
346
+ for (let i6 = 0; i6 < s5; i6++) r7.append(t6[i6], l2()), C.nextNode(), d3.push({ type: 2, index: ++c4 });
347
+ r7.append(t6[s5], l2());
348
348
  }
349
349
  }
350
- } else if (8 === r5.nodeType) if (r5.data === o3) d3.push({ type: 2, index: c4 });
350
+ } else if (8 === r7.nodeType) if (r7.data === o3) d3.push({ type: 2, index: c4 });
351
351
  else {
352
352
  let t6 = -1;
353
- for (; -1 !== (t6 = r5.data.indexOf(h2, t6 + 1)); ) d3.push({ type: 7, index: c4 }), t6 += h2.length - 1;
353
+ for (; -1 !== (t6 = r7.data.indexOf(h2, t6 + 1)); ) d3.push({ type: 7, index: c4 }), t6 += h2.length - 1;
354
354
  }
355
355
  c4++;
356
356
  }
@@ -360,11 +360,11 @@ var N = class _N {
360
360
  return s4.innerHTML = t5, s4;
361
361
  }
362
362
  };
363
- function S2(t5, i6, s4 = t5, e7) {
363
+ function S2(t5, i6, s4 = t5, e8) {
364
364
  if (i6 === T) return i6;
365
- let h3 = void 0 !== e7 ? s4._$Co?.[e7] : s4._$Cl;
365
+ let h3 = void 0 !== e8 ? s4._$Co?.[e8] : s4._$Cl;
366
366
  const o8 = c3(i6) ? void 0 : i6._$litDirective$;
367
- return h3?.constructor !== o8 && (h3?._$AO?.(false), void 0 === o8 ? h3 = void 0 : (h3 = new o8(t5), h3._$AT(t5, s4, e7)), void 0 !== e7 ? (s4._$Co ?? (s4._$Co = []))[e7] = h3 : s4._$Cl = h3), void 0 !== h3 && (i6 = S2(t5, h3._$AS(t5, i6.values), h3, e7)), i6;
367
+ return h3?.constructor !== o8 && (h3?._$AO?.(false), void 0 === o8 ? h3 = void 0 : (h3 = new o8(t5), h3._$AT(t5, s4, e8)), void 0 !== e8 ? (s4._$Co ?? (s4._$Co = []))[e8] = h3 : s4._$Cl = h3), void 0 !== h3 && (i6 = S2(t5, h3._$AS(t5, i6.values), h3, e8)), i6;
368
368
  }
369
369
  var M = class {
370
370
  constructor(t5, i6) {
@@ -377,8 +377,8 @@ var M = class {
377
377
  return this._$AM._$AU;
378
378
  }
379
379
  u(t5) {
380
- const { el: { content: i6 }, parts: s4 } = this._$AD, e7 = (t5?.creationScope ?? r3).importNode(i6, true);
381
- C.currentNode = e7;
380
+ const { el: { content: i6 }, parts: s4 } = this._$AD, e8 = (t5?.creationScope ?? r3).importNode(i6, true);
381
+ C.currentNode = e8;
382
382
  let h3 = C.nextNode(), o8 = 0, n5 = 0, l3 = s4[0];
383
383
  for (; void 0 !== l3; ) {
384
384
  if (o8 === l3.index) {
@@ -387,7 +387,7 @@ var M = class {
387
387
  }
388
388
  o8 !== l3?.index && (h3 = C.nextNode(), o8++);
389
389
  }
390
- return C.currentNode = r3, e7;
390
+ return C.currentNode = r3, e8;
391
391
  }
392
392
  p(t5) {
393
393
  let i6 = 0;
@@ -398,8 +398,8 @@ var R = class _R {
398
398
  get _$AU() {
399
399
  return this._$AM?._$AU ?? this._$Cv;
400
400
  }
401
- constructor(t5, i6, s4, e7) {
402
- this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t5, this._$AB = i6, this._$AM = s4, this.options = e7, this._$Cv = e7?.isConnected ?? true;
401
+ constructor(t5, i6, s4, e8) {
402
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t5, this._$AB = i6, this._$AM = s4, this.options = e8, this._$Cv = e8?.isConnected ?? true;
403
403
  }
404
404
  get parentNode() {
405
405
  let t5 = this._$AA.parentNode;
@@ -425,10 +425,10 @@ var R = class _R {
425
425
  this._$AH !== E && c3(this._$AH) ? this._$AA.nextSibling.data = t5 : this.T(r3.createTextNode(t5)), this._$AH = t5;
426
426
  }
427
427
  $(t5) {
428
- const { values: i6, _$litType$: s4 } = t5, e7 = "number" == typeof s4 ? this._$AC(t5) : (void 0 === s4.el && (s4.el = N.createElement(P(s4.h, s4.h[0]), this.options)), s4);
429
- if (this._$AH?._$AD === e7) this._$AH.p(i6);
428
+ const { values: i6, _$litType$: s4 } = t5, e8 = "number" == typeof s4 ? this._$AC(t5) : (void 0 === s4.el && (s4.el = N.createElement(P(s4.h, s4.h[0]), this.options)), s4);
429
+ if (this._$AH?._$AD === e8) this._$AH.p(i6);
430
430
  else {
431
- const t6 = new M(e7, this), s5 = t6.u(this.options);
431
+ const t6 = new M(e8, this), s5 = t6.u(this.options);
432
432
  t6.p(i6), this.T(s5), this._$AH = t6;
433
433
  }
434
434
  }
@@ -439,9 +439,9 @@ var R = class _R {
439
439
  k(t5) {
440
440
  a2(this._$AH) || (this._$AH = [], this._$AR());
441
441
  const i6 = this._$AH;
442
- let s4, e7 = 0;
443
- for (const h3 of t5) e7 === i6.length ? i6.push(s4 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s4 = i6[e7], s4._$AI(h3), e7++;
444
- e7 < i6.length && (this._$AR(s4 && s4._$AB.nextSibling, e7), i6.length = e7);
442
+ let s4, e8 = 0;
443
+ for (const h3 of t5) e8 === i6.length ? i6.push(s4 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s4 = i6[e8], s4._$AI(h3), e8++;
444
+ e8 < i6.length && (this._$AR(s4 && s4._$AB.nextSibling, e8), i6.length = e8);
445
445
  }
446
446
  _$AR(t5 = this._$AA.nextSibling, i6) {
447
447
  for (this._$AP?.(false, true, i6); t5 && t5 !== this._$AB; ) {
@@ -460,19 +460,19 @@ var k = class {
460
460
  get _$AU() {
461
461
  return this._$AM._$AU;
462
462
  }
463
- constructor(t5, i6, s4, e7, h3) {
464
- this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t5, this.name = i6, this._$AM = e7, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = E;
463
+ constructor(t5, i6, s4, e8, h3) {
464
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t5, this.name = i6, this._$AM = e8, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = E;
465
465
  }
466
- _$AI(t5, i6 = this, s4, e7) {
466
+ _$AI(t5, i6 = this, s4, e8) {
467
467
  const h3 = this.strings;
468
468
  let o8 = false;
469
469
  if (void 0 === h3) t5 = S2(this, t5, i6, 0), o8 = !c3(t5) || t5 !== this._$AH && t5 !== T, o8 && (this._$AH = t5);
470
470
  else {
471
- const e8 = t5;
472
- let n5, r5;
473
- for (t5 = h3[0], n5 = 0; n5 < h3.length - 1; n5++) r5 = S2(this, e8[s4 + n5], i6, n5), r5 === T && (r5 = this._$AH[n5]), o8 || (o8 = !c3(r5) || r5 !== this._$AH[n5]), r5 === E ? t5 = E : t5 !== E && (t5 += (r5 ?? "") + h3[n5 + 1]), this._$AH[n5] = r5;
471
+ const e9 = t5;
472
+ let n5, r7;
473
+ for (t5 = h3[0], n5 = 0; n5 < h3.length - 1; n5++) r7 = S2(this, e9[s4 + n5], i6, n5), r7 === T && (r7 = this._$AH[n5]), o8 || (o8 = !c3(r7) || r7 !== this._$AH[n5]), r7 === E ? t5 = E : t5 !== E && (t5 += (r7 ?? "") + h3[n5 + 1]), this._$AH[n5] = r7;
474
474
  }
475
- o8 && !e7 && this.j(t5);
475
+ o8 && !e8 && this.j(t5);
476
476
  }
477
477
  j(t5) {
478
478
  t5 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t5 ?? "");
@@ -495,13 +495,13 @@ var I = class extends k {
495
495
  }
496
496
  };
497
497
  var L = class extends k {
498
- constructor(t5, i6, s4, e7, h3) {
499
- super(t5, i6, s4, e7, h3), this.type = 5;
498
+ constructor(t5, i6, s4, e8, h3) {
499
+ super(t5, i6, s4, e8, h3), this.type = 5;
500
500
  }
501
501
  _$AI(t5, i6 = this) {
502
502
  if ((t5 = S2(this, t5, i6, 0) ?? E) === T) return;
503
- const s4 = this._$AH, e7 = t5 === E && s4 !== E || t5.capture !== s4.capture || t5.once !== s4.once || t5.passive !== s4.passive, h3 = t5 !== E && (s4 === E || e7);
504
- e7 && this.element.removeEventListener(this.name, this, s4), h3 && this.element.addEventListener(this.name, this, t5), this._$AH = t5;
503
+ const s4 = this._$AH, e8 = t5 === E && s4 !== E || t5.capture !== s4.capture || t5.once !== s4.once || t5.passive !== s4.passive, h3 = t5 !== E && (s4 === E || e8);
504
+ e8 && this.element.removeEventListener(this.name, this, s4), h3 && this.element.addEventListener(this.name, this, t5), this._$AH = t5;
505
505
  }
506
506
  handleEvent(t5) {
507
507
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t5) : this._$AH.handleEvent(t5);
@@ -521,11 +521,11 @@ var z = class {
521
521
  var j = t2.litHtmlPolyfillSupport;
522
522
  j?.(N, R), (t2.litHtmlVersions ?? (t2.litHtmlVersions = [])).push("3.3.0");
523
523
  var B = (t5, i6, s4) => {
524
- const e7 = s4?.renderBefore ?? i6;
525
- let h3 = e7._$litPart$;
524
+ const e8 = s4?.renderBefore ?? i6;
525
+ let h3 = e8._$litPart$;
526
526
  if (void 0 === h3) {
527
527
  const t6 = s4?.renderBefore ?? null;
528
- e7._$litPart$ = h3 = new R(i6.insertBefore(l2(), t6), t6, void 0, s4 ?? {});
528
+ e8._$litPart$ = h3 = new R(i6.insertBefore(l2(), t6), t6, void 0, s4 ?? {});
529
529
  }
530
530
  return h3._$AI(t5), h3;
531
531
  };
@@ -542,8 +542,8 @@ var i4 = class extends y {
542
542
  return (_a = this.renderOptions).renderBefore ?? (_a.renderBefore = t5.firstChild), t5;
543
543
  }
544
544
  update(t5) {
545
- const r5 = this.render();
546
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t5), this._$Do = B(r5, this.renderRoot, this.renderOptions);
545
+ const r7 = this.render();
546
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t5), this._$Do = B(r7, this.renderRoot, this.renderOptions);
547
547
  }
548
548
  connectedCallback() {
549
549
  super.connectedCallback(), this._$Do?.setConnected(true);
@@ -562,77 +562,93 @@ o4?.({ LitElement: i4 });
562
562
 
563
563
  // ../../node_modules/@lit/reactive-element/decorators/property.js
564
564
  var o5 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f };
565
- var r4 = (t5 = o5, e7, r5) => {
566
- const { kind: n5, metadata: i6 } = r5;
565
+ var r4 = (t5 = o5, e8, r7) => {
566
+ const { kind: n5, metadata: i6 } = r7;
567
567
  let s4 = globalThis.litPropertyMetadata.get(i6);
568
- if (void 0 === s4 && globalThis.litPropertyMetadata.set(i6, s4 = /* @__PURE__ */ new Map()), "setter" === n5 && ((t5 = Object.create(t5)).wrapped = true), s4.set(r5.name, t5), "accessor" === n5) {
569
- const { name: o8 } = r5;
570
- return { set(r6) {
571
- const n6 = e7.get.call(this);
572
- e7.set.call(this, r6), this.requestUpdate(o8, n6, t5);
573
- }, init(e8) {
574
- return void 0 !== e8 && this.C(o8, void 0, t5, e8), e8;
568
+ if (void 0 === s4 && globalThis.litPropertyMetadata.set(i6, s4 = /* @__PURE__ */ new Map()), "setter" === n5 && ((t5 = Object.create(t5)).wrapped = true), s4.set(r7.name, t5), "accessor" === n5) {
569
+ const { name: o8 } = r7;
570
+ return { set(r8) {
571
+ const n6 = e8.get.call(this);
572
+ e8.set.call(this, r8), this.requestUpdate(o8, n6, t5);
573
+ }, init(e9) {
574
+ return void 0 !== e9 && this.C(o8, void 0, t5, e9), e9;
575
575
  } };
576
576
  }
577
577
  if ("setter" === n5) {
578
- const { name: o8 } = r5;
579
- return function(r6) {
578
+ const { name: o8 } = r7;
579
+ return function(r8) {
580
580
  const n6 = this[o8];
581
- e7.call(this, r6), this.requestUpdate(o8, n6, t5);
581
+ e8.call(this, r8), this.requestUpdate(o8, n6, t5);
582
582
  };
583
583
  }
584
584
  throw Error("Unsupported decorator location: " + n5);
585
585
  };
586
586
  function n4(t5) {
587
- return (e7, o8) => "object" == typeof o8 ? r4(t5, e7, o8) : ((t6, e8, o9) => {
588
- const r5 = e8.hasOwnProperty(o9);
589
- return e8.constructor.createProperty(o9, t6), r5 ? Object.getOwnPropertyDescriptor(e8, o9) : void 0;
590
- })(t5, e7, o8);
587
+ return (e8, o8) => "object" == typeof o8 ? r4(t5, e8, o8) : ((t6, e9, o9) => {
588
+ const r7 = e9.hasOwnProperty(o9);
589
+ return e9.constructor.createProperty(o9, t6), r7 ? Object.getOwnPropertyDescriptor(e9, o9) : void 0;
590
+ })(t5, e8, o8);
591
+ }
592
+
593
+ // ../../node_modules/@lit/reactive-element/decorators/state.js
594
+ function r5(r7) {
595
+ return n4({ ...r7, state: true, attribute: false });
596
+ }
597
+
598
+ // ../../node_modules/@lit/reactive-element/decorators/base.js
599
+ var e4 = (e8, t5, c4) => (c4.configurable = true, c4.enumerable = true, Reflect.decorate && "object" != typeof t5 && Object.defineProperty(e8, t5, c4), c4);
600
+
601
+ // ../../node_modules/@lit/reactive-element/decorators/query-all.js
602
+ var e5;
603
+ function r6(r7) {
604
+ return (n5, o8) => e4(n5, o8, { get() {
605
+ return (this.renderRoot ?? (e5 ?? (e5 = document.createDocumentFragment()))).querySelectorAll(r7);
606
+ } });
591
607
  }
592
608
 
593
609
  // ../../node_modules/lit-html/directive.js
594
610
  var t3 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
595
- var e5 = (t5) => (...e7) => ({ _$litDirective$: t5, values: e7 });
611
+ var e6 = (t5) => (...e8) => ({ _$litDirective$: t5, values: e8 });
596
612
  var i5 = class {
597
613
  constructor(t5) {
598
614
  }
599
615
  get _$AU() {
600
616
  return this._$AM._$AU;
601
617
  }
602
- _$AT(t5, e7, i6) {
603
- this._$Ct = t5, this._$AM = e7, this._$Ci = i6;
618
+ _$AT(t5, e8, i6) {
619
+ this._$Ct = t5, this._$AM = e8, this._$Ci = i6;
604
620
  }
605
- _$AS(t5, e7) {
606
- return this.update(t5, e7);
621
+ _$AS(t5, e8) {
622
+ return this.update(t5, e8);
607
623
  }
608
- update(t5, e7) {
609
- return this.render(...e7);
624
+ update(t5, e8) {
625
+ return this.render(...e8);
610
626
  }
611
627
  };
612
628
 
613
629
  // ../../node_modules/lit-html/directives/unsafe-html.js
614
- var e6 = class extends i5 {
630
+ var e7 = class extends i5 {
615
631
  constructor(i6) {
616
632
  if (super(i6), this.it = E, i6.type !== t3.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
617
633
  }
618
- render(r5) {
619
- if (r5 === E || null == r5) return this._t = void 0, this.it = r5;
620
- if (r5 === T) return r5;
621
- if ("string" != typeof r5) throw Error(this.constructor.directiveName + "() called with a non-string value");
622
- if (r5 === this.it) return this._t;
623
- this.it = r5;
624
- const s4 = [r5];
634
+ render(r7) {
635
+ if (r7 === E || null == r7) return this._t = void 0, this.it = r7;
636
+ if (r7 === T) return r7;
637
+ if ("string" != typeof r7) throw Error(this.constructor.directiveName + "() called with a non-string value");
638
+ if (r7 === this.it) return this._t;
639
+ this.it = r7;
640
+ const s4 = [r7];
625
641
  return s4.raw = s4, this._t = { _$litType$: this.constructor.resultType, strings: s4, values: [] };
626
642
  }
627
643
  };
628
- e6.directiveName = "unsafeHTML", e6.resultType = 1;
629
- var o6 = e5(e6);
644
+ e7.directiveName = "unsafeHTML", e7.resultType = 1;
645
+ var o6 = e6(e7);
630
646
 
631
647
  // ../../node_modules/lit-html/directives/unsafe-svg.js
632
- var t4 = class extends e6 {
648
+ var t4 = class extends e7 {
633
649
  };
634
650
  t4.directiveName = "unsafeSVG", t4.resultType = 2;
635
- var o7 = e5(t4);
651
+ var o7 = e6(t4);
636
652
 
637
653
  // node_modules/@triptease/icons/dist/src/icons/chevron-down.js
638
654
  var chevronDown = `
@@ -679,6 +695,11 @@ var logout = `<svg width="17" height="20" viewBox="0 0 17 20" fill="currentColor
679
695
  <path d="M12 0C12.4142 0 12.75 0.335786 12.75 0.75C12.75 1.16421 12.4142 1.5 12 1.5H3.75C2.50736 1.5 1.5 2.50736 1.5 3.75V16.25C1.5 17.4926 2.50736 18.5 3.75 18.5H12C12.4142 18.5 12.75 18.8358 12.75 19.25C12.75 19.6642 12.4142 20 12 20H3.75C1.67893 20 0 18.3211 0 16.25V3.75C2.57706e-07 1.67893 1.67893 1.28851e-07 3.75 0H12ZM10.7197 5.71973C11.0125 5.42693 11.4874 5.42713 11.7803 5.71973L16.0605 10L11.7803 14.2803C11.4874 14.5729 11.0126 14.573 10.7197 14.2803C10.4272 13.9874 10.4272 13.5125 10.7197 13.2197L13.1895 10.75H6.5C6.08605 10.7498 5.7501 10.414 5.75 10C5.75009 9.58601 6.08604 9.25023 6.5 9.25H13.1895L10.7197 6.78027C10.4272 6.48743 10.4272 6.01254 10.7197 5.71973Z" />
680
696
  </svg>`;
681
697
 
698
+ // node_modules/@triptease/icons/dist/src/icons/sidebar-collapsed.js
699
+ var sidebarCollapsed = `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
700
+ <path d="M17 3.25C19.0711 3.25 20.75 4.92893 20.75 7V17C20.75 19.0711 19.0711 20.75 17 20.75H7C4.92893 20.75 3.25 19.0711 3.25 17V7C3.25 4.92893 4.92893 3.25 7 3.25H17ZM10 19.25H17C18.2426 19.25 19.25 18.2426 19.25 17V7C19.25 5.75736 18.2426 4.75 17 4.75H10V19.25Z"/>
701
+ </svg>`;
702
+
682
703
  // node_modules/@triptease/icons/dist/src/icons/user.js
683
704
  var user = `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
684
705
  <path d="M12 2C17.5228 2 22 6.47715 22 12C22 15.2098 20.4857 18.0638 18.1348 19.8936C18.0344 20.055 17.8763 20.1738 17.6875 20.2227C16.0725 21.3418 14.1137 22 12 22C9.88604 22 7.92664 21.3421 6.31152 20.2227C6.12294 20.1736 5.96441 20.055 5.86426 19.8936C3.51367 18.0638 2 15.2095 2 12C2 6.47715 6.47715 2 12 2ZM11.25 15.5C9.1884 15.5 7.49093 17.0597 7.27344 19.0635C8.62515 19.9698 10.2503 20.5 12 20.5C13.7494 20.5 15.374 19.9695 16.7256 19.0635C16.508 17.0598 14.8116 15.5 12.75 15.5H11.25ZM12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 14.3333 4.44073 16.4464 5.96289 17.9824C6.62169 15.683 8.73895 14 11.25 14H12.75C15.2609 14 17.3772 15.6832 18.0361 17.9824C19.5586 16.4464 20.5 14.3335 20.5 12C20.5 7.30558 16.6944 3.5 12 3.5ZM12 5.25C14.0711 5.25 15.75 6.92893 15.75 9C15.75 11.0711 14.0711 12.75 12 12.75C9.92893 12.75 8.25 11.0711 8.25 9C8.25 6.92893 9.92893 5.25 12 5.25ZM12 6.75C10.7574 6.75 9.75 7.75736 9.75 9C9.75 10.2426 10.7574 11.25 12 11.25C13.2426 11.25 14.25 10.2426 14.25 9C14.25 7.75736 13.2426 6.75 12 6.75Z" />
@@ -690,6 +711,18 @@ var wallet = `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor
690
711
  </svg>`;
691
712
 
692
713
  // src/styles.ts
714
+ var visuallyHiddenCss = i`
715
+ position: absolute;
716
+ width: 1px;
717
+ height: 1px;
718
+ margin: -1px;
719
+ padding: 0;
720
+ border: 0;
721
+ overflow: hidden;
722
+ clip: rect(0 0 0 0);
723
+ clip-path: inset(50%);
724
+ white-space: nowrap;
725
+ `;
693
726
  var styles = i`
694
727
  :host {
695
728
  --nav-bar-width: 260px;
@@ -724,6 +757,39 @@ var styles = i`
724
757
  width: 100%;
725
758
  }
726
759
 
760
+ .nav-items.sidebar-closed {
761
+ a span {
762
+ ${visuallyHiddenCss}
763
+ }
764
+
765
+ details summary span {
766
+ ${visuallyHiddenCss}
767
+ }
768
+ }
769
+
770
+ .sidebar-header {
771
+ width: 100%;
772
+ display: grid;
773
+ grid-template-columns: 1fr auto;
774
+ align-items: center;
775
+ justify-content: center;
776
+ padding: 0 var(--space-scale-2);
777
+
778
+ button {
779
+ background-color: transparent;
780
+ color: var(--color-text-inverted-400);
781
+ border: none;
782
+ }
783
+ }
784
+
785
+ .sidebar-header.sidebar-closed {
786
+ padding: 0 var(--space-scale-1);
787
+ .logo {
788
+ display: none;
789
+ visibility: hidden;
790
+ }
791
+ }
792
+
727
793
  hr {
728
794
  width: 100%;
729
795
  height: 1px;
@@ -749,6 +815,19 @@ var styles = i`
749
815
  }
750
816
  }
751
817
 
818
+ .tertiary-nav.sidebar-closed {
819
+ .external-link,
820
+ slot,
821
+ hr {
822
+ display: none;
823
+ visibility: hidden;
824
+ }
825
+
826
+ a span {
827
+ ${visuallyHiddenCss}
828
+ }
829
+ }
830
+
752
831
  .icon {
753
832
  display: flex;
754
833
  align-items: center;
@@ -771,6 +850,10 @@ var styles = i`
771
850
  }
772
851
  }
773
852
 
853
+ nav.sidebar-closed {
854
+ width: fit-content;
855
+ }
856
+
774
857
  details {
775
858
  border-radius: var(--border-radius-100);
776
859
 
@@ -839,10 +922,6 @@ var styles = i`
839
922
  }
840
923
  }
841
924
 
842
- .logo {
843
- padding: 0 var(--space-scale-2);
844
- }
845
-
846
925
  .sub-nav-item:hover,
847
926
  .sub-nav-item:focus-visible,
848
927
  .nav-item:hover,
@@ -984,41 +1063,75 @@ var tripteaseLogo = `<svg width="112" height="32" viewBox="0 0 112 32" fill="no
984
1063
  var TtNavbar = class extends i4 {
985
1064
  constructor() {
986
1065
  super(...arguments);
1066
+ this.sidebarOpen = true;
1067
+ this.closeAllDetails = (element) => {
1068
+ this.allDetailsElements.forEach((detail) => {
1069
+ if (element && !detail.contains(element)) {
1070
+ detail.removeAttribute("open");
1071
+ } else if (!element) {
1072
+ detail.removeAttribute("open");
1073
+ }
1074
+ });
1075
+ };
1076
+ this.toggleSidebar = () => {
1077
+ this.closeAllDetails();
1078
+ this.sidebarOpen = !this.sidebarOpen;
1079
+ };
1080
+ this.handleToggle = (e8) => {
1081
+ const { newState } = e8;
1082
+ const target = e8.currentTarget;
1083
+ if (newState === "open") {
1084
+ if (!this.sidebarOpen) {
1085
+ this.sidebarOpen = true;
1086
+ }
1087
+ this.closeAllDetails(target);
1088
+ }
1089
+ };
987
1090
  this.buildUrl = (path) => {
988
1091
  if (!this.clientKey) throw new Error("clientKey is required");
989
1092
  const formattedPath = path.replace("$CLIENT_KEY", this.clientKey);
990
1093
  if (!this.baseUrl) return formattedPath;
991
1094
  return new URL(formattedPath, this.baseUrl).toString();
992
1095
  };
993
- this.onAnchorClick = (e7) => {
1096
+ this.onAnchorClick = (e8) => {
994
1097
  if (this.navigate) {
995
- this.navigate(e7);
1098
+ this.navigate(e8);
996
1099
  }
997
1100
  };
998
1101
  }
999
1102
  render() {
1000
1103
  return x`
1001
- <nav id=${this.id}>
1002
- <div class="logo">
1003
- ${o7(tripteaseLogo)}
1104
+ <nav id=${this.id} class="${this.sidebarOpen ? "" : "sidebar-closed"}">
1105
+ <div class="sidebar-header ${this.sidebarOpen ? "" : "sidebar-closed"}">
1106
+ <div class="logo">
1107
+ ${o7(tripteaseLogo)}
1108
+ </div>
1109
+ <button id="navbar-toggle-btn" class="nav-item nav-toggle-button" @click=${this.toggleSidebar}>
1110
+ ${o7(sidebarCollapsed)}
1111
+ <span class="tooltip nav-toggle-tooltip">
1112
+ ${o7(sidebarCollapsed)}
1113
+ <span>Collapse sidebar</span>
1114
+ </span>
1115
+ </button>
1004
1116
  </div>
1005
- <div class="nav-items">
1117
+
1118
+ <div class="nav-items ${this.sidebarOpen ? "" : "sidebar-closed"}">
1006
1119
  <a
1007
1120
  class="nav-item"
1008
1121
  href=${this.buildUrl("/")}
1009
1122
  @click=${this.onAnchorClick}
1010
- >${o7(home)}Dashboard</a
1123
+ >${o7(home)}<span>Dashboard</span></a
1011
1124
  >
1012
1125
  <a class="nav-item" href="https://app.campaign-manager.triptease.io"
1013
- >${o7(campaigns)}Campaigns</a
1126
+ >${o7(campaigns)}<span>Campaigns</span></a
1014
1127
  >
1015
1128
  <a
1016
1129
  class="nav-item"
1017
1130
  href=${this.buildUrl("/channels")}
1018
1131
  @click=${this.onAnchorClick}
1019
- >${o7(channels)}Channels</a
1132
+ >${o7(channels)}<span>Channels</span></a
1020
1133
  >
1021
- <details>
1134
+ <details id="market-insights" @toggle=${this.handleToggle}>
1022
1135
  <summary>
1023
1136
  ${o7(graph)}
1024
1137
  <span>Market Insights</span>
@@ -1039,7 +1152,7 @@ var TtNavbar = class extends i4 {
1039
1152
  >
1040
1153
  </div>
1041
1154
  </details>
1042
- <details>
1155
+ <details id="settings" @toggle=${this.handleToggle}>
1043
1156
  <summary>
1044
1157
  ${o7(gear)}
1045
1158
  <span>Settings</span>
@@ -1073,7 +1186,7 @@ var TtNavbar = class extends i4 {
1073
1186
  </div>
1074
1187
  </details>
1075
1188
  <hr />
1076
- <details>
1189
+ <details id="account" @toggle=${this.handleToggle}>
1077
1190
  <summary>
1078
1191
  ${o7(user)}
1079
1192
  <span>Account</span>
@@ -1094,7 +1207,7 @@ var TtNavbar = class extends i4 {
1094
1207
  >
1095
1208
  </div>
1096
1209
  </details>
1097
- <details class="dropdown-items">
1210
+ <details id="billing-routes" @toggle=${this.handleToggle}>
1098
1211
  <summary>
1099
1212
  ${o7(wallet)}
1100
1213
  <span>Billing</span>
@@ -1116,8 +1229,8 @@ var TtNavbar = class extends i4 {
1116
1229
  </div>
1117
1230
  </details>
1118
1231
  </div>
1119
- <div class="tertiary-nav">
1120
- <div class="nav-items">
1232
+ <div class="tertiary-nav ${this.sidebarOpen ? "" : "sidebar-closed"}">
1233
+ <div id="external-links" class="nav-items">
1121
1234
  <a
1122
1235
  class="nav-item external-link"
1123
1236
  href='https://triptease.canny.io/feature-requests'
@@ -1148,12 +1261,13 @@ var TtNavbar = class extends i4 {
1148
1261
  <hr />
1149
1262
  </div>
1150
1263
  <div class='nav-items'>
1151
- <slot name="clientSelector"></slot>
1264
+ <slot id="client-selector" name="clientSelector"></slot>
1152
1265
  <a
1266
+ id="logout-link"
1153
1267
  class="nav-item"
1154
1268
  href=${this.buildUrl("/logout")}
1155
1269
  @click=${this.onAnchorClick}
1156
- >${o7(logout)}Logout</a>
1270
+ >${o7(logout)}<span>Logout</span></a>
1157
1271
  </div>
1158
1272
  <div>
1159
1273
  </nav>
@@ -1170,6 +1284,12 @@ __decorateClass([
1170
1284
  __decorateClass([
1171
1285
  n4({ type: String, attribute: "client-key" })
1172
1286
  ], TtNavbar.prototype, "clientKey", 2);
1287
+ __decorateClass([
1288
+ r5()
1289
+ ], TtNavbar.prototype, "sidebarOpen", 2);
1290
+ __decorateClass([
1291
+ r6("details")
1292
+ ], TtNavbar.prototype, "allDetailsElements", 2);
1173
1293
  export {
1174
1294
  TtNavbar
1175
1295
  };