@record-evolution/widget-navbar 1.0.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.
@@ -0,0 +1,1792 @@
1
+ /* @license Copyright (c) 2025 IronFlock GmbH. All rights reserved.*/
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const Y = globalThis, ut = Y.ShadowRoot && (Y.ShadyCSS === void 0 || Y.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, vt = Symbol(), wt = /* @__PURE__ */ new WeakMap();
8
+ let Ut = class {
9
+ constructor(t, e, i) {
10
+ if (this._$cssResult$ = !0, i !== vt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
+ this.cssText = t, this.t = e;
12
+ }
13
+ get styleSheet() {
14
+ let t = this.o;
15
+ const e = this.t;
16
+ if (ut && t === void 0) {
17
+ const i = e !== void 0 && e.length === 1;
18
+ i && (t = wt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && wt.set(e, t));
19
+ }
20
+ return t;
21
+ }
22
+ toString() {
23
+ return this.cssText;
24
+ }
25
+ };
26
+ const ee = (s) => new Ut(typeof s == "string" ? s : s + "", void 0, vt), $ = (s, ...t) => {
27
+ const e = s.length === 1 ? s[0] : t.reduce(((i, r, o) => i + ((a) => {
28
+ if (a._$cssResult$ === !0) return a.cssText;
29
+ if (typeof a == "number") return a;
30
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
31
+ })(r) + s[o + 1]), s[0]);
32
+ return new Ut(e, s, vt);
33
+ }, ie = (s, t) => {
34
+ if (ut) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
35
+ else for (const e of t) {
36
+ const i = document.createElement("style"), r = Y.litNonce;
37
+ r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
38
+ }
39
+ }, Ct = ut ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
40
+ let e = "";
41
+ for (const i of t.cssRules) e += i.cssText;
42
+ return ee(e);
43
+ })(s) : s;
44
+ /**
45
+ * @license
46
+ * Copyright 2017 Google LLC
47
+ * SPDX-License-Identifier: BSD-3-Clause
48
+ */
49
+ const { is: re, defineProperty: se, getOwnPropertyDescriptor: oe, getOwnPropertyNames: ae, getOwnPropertySymbols: ne, getPrototypeOf: ce } = Object, J = globalThis, Et = J.trustedTypes, le = Et ? Et.emptyScript : "", de = J.reactiveElementPolyfillSupport, U = (s, t) => s, Z = { toAttribute(s, t) {
50
+ switch (t) {
51
+ case Boolean:
52
+ s = s ? le : null;
53
+ break;
54
+ case Object:
55
+ case Array:
56
+ s = s == null ? s : JSON.stringify(s);
57
+ }
58
+ return s;
59
+ }, fromAttribute(s, t) {
60
+ let e = s;
61
+ switch (t) {
62
+ case Boolean:
63
+ e = s !== null;
64
+ break;
65
+ case Number:
66
+ e = s === null ? null : Number(s);
67
+ break;
68
+ case Object:
69
+ case Array:
70
+ try {
71
+ e = JSON.parse(s);
72
+ } catch {
73
+ e = null;
74
+ }
75
+ }
76
+ return e;
77
+ } }, mt = (s, t) => !re(s, t), St = { attribute: !0, type: String, converter: Z, reflect: !1, useDefault: !1, hasChanged: mt };
78
+ Symbol.metadata ??= Symbol("metadata"), J.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
79
+ let k = class extends HTMLElement {
80
+ static addInitializer(t) {
81
+ this._$Ei(), (this.l ??= []).push(t);
82
+ }
83
+ static get observedAttributes() {
84
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
85
+ }
86
+ static createProperty(t, e = St) {
87
+ 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) {
88
+ const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
89
+ r !== void 0 && se(this.prototype, t, r);
90
+ }
91
+ }
92
+ static getPropertyDescriptor(t, e, i) {
93
+ const { get: r, set: o } = oe(this.prototype, t) ?? { get() {
94
+ return this[e];
95
+ }, set(a) {
96
+ this[e] = a;
97
+ } };
98
+ return { get: r, set(a) {
99
+ const c = r?.call(this);
100
+ o?.call(this, a), this.requestUpdate(t, c, i);
101
+ }, configurable: !0, enumerable: !0 };
102
+ }
103
+ static getPropertyOptions(t) {
104
+ return this.elementProperties.get(t) ?? St;
105
+ }
106
+ static _$Ei() {
107
+ if (this.hasOwnProperty(U("elementProperties"))) return;
108
+ const t = ce(this);
109
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
110
+ }
111
+ static finalize() {
112
+ if (this.hasOwnProperty(U("finalized"))) return;
113
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
114
+ const e = this.properties, i = [...ae(e), ...ne(e)];
115
+ for (const r of i) this.createProperty(r, e[r]);
116
+ }
117
+ const t = this[Symbol.metadata];
118
+ if (t !== null) {
119
+ const e = litPropertyMetadata.get(t);
120
+ if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
121
+ }
122
+ this._$Eh = /* @__PURE__ */ new Map();
123
+ for (const [e, i] of this.elementProperties) {
124
+ const r = this._$Eu(e, i);
125
+ r !== void 0 && this._$Eh.set(r, e);
126
+ }
127
+ this.elementStyles = this.finalizeStyles(this.styles);
128
+ }
129
+ static finalizeStyles(t) {
130
+ const e = [];
131
+ if (Array.isArray(t)) {
132
+ const i = new Set(t.flat(1 / 0).reverse());
133
+ for (const r of i) e.unshift(Ct(r));
134
+ } else t !== void 0 && e.push(Ct(t));
135
+ return e;
136
+ }
137
+ static _$Eu(t, e) {
138
+ const i = e.attribute;
139
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
140
+ }
141
+ constructor() {
142
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
143
+ }
144
+ _$Ev() {
145
+ this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
146
+ }
147
+ addController(t) {
148
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
149
+ }
150
+ removeController(t) {
151
+ this._$EO?.delete(t);
152
+ }
153
+ _$E_() {
154
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
155
+ for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
156
+ t.size > 0 && (this._$Ep = t);
157
+ }
158
+ createRenderRoot() {
159
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
160
+ return ie(t, this.constructor.elementStyles), t;
161
+ }
162
+ connectedCallback() {
163
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
164
+ }
165
+ enableUpdating(t) {
166
+ }
167
+ disconnectedCallback() {
168
+ this._$EO?.forEach(((t) => t.hostDisconnected?.()));
169
+ }
170
+ attributeChangedCallback(t, e, i) {
171
+ this._$AK(t, i);
172
+ }
173
+ _$ET(t, e) {
174
+ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
175
+ if (r !== void 0 && i.reflect === !0) {
176
+ const o = (i.converter?.toAttribute !== void 0 ? i.converter : Z).toAttribute(e, i.type);
177
+ this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
178
+ }
179
+ }
180
+ _$AK(t, e) {
181
+ const i = this.constructor, r = i._$Eh.get(t);
182
+ if (r !== void 0 && this._$Em !== r) {
183
+ const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Z;
184
+ this._$Em = r;
185
+ const c = a.fromAttribute(e, o.type);
186
+ this[r] = c ?? this._$Ej?.get(r) ?? c, this._$Em = null;
187
+ }
188
+ }
189
+ requestUpdate(t, e, i) {
190
+ if (t !== void 0) {
191
+ const r = this.constructor, o = this[t];
192
+ if (i ??= r.getPropertyOptions(t), !((i.hasChanged ?? mt)(o, e) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
193
+ this.C(t, e, i);
194
+ }
195
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
196
+ }
197
+ C(t, e, { useDefault: i, reflect: r, wrapped: o }, a) {
198
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? e ?? this[t]), o !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
199
+ }
200
+ async _$EP() {
201
+ this.isUpdatePending = !0;
202
+ try {
203
+ await this._$ES;
204
+ } catch (e) {
205
+ Promise.reject(e);
206
+ }
207
+ const t = this.scheduleUpdate();
208
+ return t != null && await t, !this.isUpdatePending;
209
+ }
210
+ scheduleUpdate() {
211
+ return this.performUpdate();
212
+ }
213
+ performUpdate() {
214
+ if (!this.isUpdatePending) return;
215
+ if (!this.hasUpdated) {
216
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
217
+ for (const [r, o] of this._$Ep) this[r] = o;
218
+ this._$Ep = void 0;
219
+ }
220
+ const i = this.constructor.elementProperties;
221
+ if (i.size > 0) for (const [r, o] of i) {
222
+ const { wrapped: a } = o, c = this[r];
223
+ a !== !0 || this._$AL.has(r) || c === void 0 || this.C(r, void 0, o, c);
224
+ }
225
+ }
226
+ let t = !1;
227
+ const e = this._$AL;
228
+ try {
229
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(e)) : this._$EM();
230
+ } catch (i) {
231
+ throw t = !1, this._$EM(), i;
232
+ }
233
+ t && this._$AE(e);
234
+ }
235
+ willUpdate(t) {
236
+ }
237
+ _$AE(t) {
238
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
239
+ }
240
+ _$EM() {
241
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
242
+ }
243
+ get updateComplete() {
244
+ return this.getUpdateComplete();
245
+ }
246
+ getUpdateComplete() {
247
+ return this._$ES;
248
+ }
249
+ shouldUpdate(t) {
250
+ return !0;
251
+ }
252
+ update(t) {
253
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
254
+ }
255
+ updated(t) {
256
+ }
257
+ firstUpdated(t) {
258
+ }
259
+ };
260
+ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[U("elementProperties")] = /* @__PURE__ */ new Map(), k[U("finalized")] = /* @__PURE__ */ new Map(), de?.({ ReactiveElement: k }), (J.reactiveElementVersions ??= []).push("2.1.1");
261
+ /**
262
+ * @license
263
+ * Copyright 2017 Google LLC
264
+ * SPDX-License-Identifier: BSD-3-Clause
265
+ */
266
+ const bt = globalThis, X = bt.trustedTypes, Tt = X ? X.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ht = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + w, he = `<${Lt}>`, R = document, H = () => R.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", yt = Array.isArray, pe = (s) => yt(s) || typeof s?.[Symbol.iterator] == "function", rt = `[
267
+ \f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Pt = />/g, T = RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
268
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Rt = /'/g, kt = /"/g, Bt = /^(?:script|style|textarea|title)$/i, fe = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), A = fe(1), C = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), Ot = /* @__PURE__ */ new WeakMap(), P = R.createTreeWalker(R, 129);
269
+ function Ft(s, t) {
270
+ if (!yt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
271
+ return Tt !== void 0 ? Tt.createHTML(t) : t;
272
+ }
273
+ const ue = (s, t) => {
274
+ const e = s.length - 1, i = [];
275
+ let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = z;
276
+ for (let c = 0; c < e; c++) {
277
+ const n = s[c];
278
+ let d, p, l = -1, f = 0;
279
+ for (; f < n.length && (a.lastIndex = f, p = a.exec(n), p !== null); ) f = a.lastIndex, a === z ? p[1] === "!--" ? a = It : p[1] !== void 0 ? a = Pt : p[2] !== void 0 ? (Bt.test(p[2]) && (r = RegExp("</" + p[2], "g")), a = T) : p[3] !== void 0 && (a = T) : a === T ? p[0] === ">" ? (a = r ?? z, l = -1) : p[1] === void 0 ? l = -2 : (l = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? T : p[3] === '"' ? kt : Rt) : a === kt || a === Rt ? a = T : a === It || a === Pt ? a = z : (a = T, r = void 0);
280
+ const u = a === T && s[c + 1].startsWith("/>") ? " " : "";
281
+ o += a === z ? n + he : l >= 0 ? (i.push(d), n.slice(0, l) + Ht + n.slice(l) + w + u) : n + w + (l === -2 ? c : u);
282
+ }
283
+ return [Ft(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
284
+ };
285
+ class B {
286
+ constructor({ strings: t, _$litType$: e }, i) {
287
+ let r;
288
+ this.parts = [];
289
+ let o = 0, a = 0;
290
+ const c = t.length - 1, n = this.parts, [d, p] = ue(t, e);
291
+ if (this.el = B.createElement(d, i), P.currentNode = this.el.content, e === 2 || e === 3) {
292
+ const l = this.el.content.firstChild;
293
+ l.replaceWith(...l.childNodes);
294
+ }
295
+ for (; (r = P.nextNode()) !== null && n.length < c; ) {
296
+ if (r.nodeType === 1) {
297
+ if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(Ht)) {
298
+ const f = p[a++], u = r.getAttribute(l).split(w), b = /([.?@])?(.*)/.exec(f);
299
+ n.push({ type: 1, index: o, name: b[2], strings: u, ctor: b[1] === "." ? me : b[1] === "?" ? be : b[1] === "@" ? ye : Q }), r.removeAttribute(l);
300
+ } else l.startsWith(w) && (n.push({ type: 6, index: o }), r.removeAttribute(l));
301
+ if (Bt.test(r.tagName)) {
302
+ const l = r.textContent.split(w), f = l.length - 1;
303
+ if (f > 0) {
304
+ r.textContent = X ? X.emptyScript : "";
305
+ for (let u = 0; u < f; u++) r.append(l[u], H()), P.nextNode(), n.push({ type: 2, index: ++o });
306
+ r.append(l[f], H());
307
+ }
308
+ }
309
+ } else if (r.nodeType === 8) if (r.data === Lt) n.push({ type: 2, index: o });
310
+ else {
311
+ let l = -1;
312
+ for (; (l = r.data.indexOf(w, l + 1)) !== -1; ) n.push({ type: 7, index: o }), l += w.length - 1;
313
+ }
314
+ o++;
315
+ }
316
+ }
317
+ static createElement(t, e) {
318
+ const i = R.createElement("template");
319
+ return i.innerHTML = t, i;
320
+ }
321
+ }
322
+ function O(s, t, e = s, i) {
323
+ if (t === C) return t;
324
+ let r = i !== void 0 ? e._$Co?.[i] : e._$Cl;
325
+ const o = L(t) ? void 0 : t._$litDirective$;
326
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = O(s, r._$AS(s, t.values), r, i)), t;
327
+ }
328
+ let ve = class {
329
+ constructor(t, e) {
330
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
331
+ }
332
+ get parentNode() {
333
+ return this._$AM.parentNode;
334
+ }
335
+ get _$AU() {
336
+ return this._$AM._$AU;
337
+ }
338
+ u(t) {
339
+ const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? R).importNode(e, !0);
340
+ P.currentNode = r;
341
+ let o = P.nextNode(), a = 0, c = 0, n = i[0];
342
+ for (; n !== void 0; ) {
343
+ if (a === n.index) {
344
+ let d;
345
+ n.type === 2 ? d = new M(o, o.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(o, n.name, n.strings, this, t) : n.type === 6 && (d = new ge(o, this, t)), this._$AV.push(d), n = i[++c];
346
+ }
347
+ a !== n?.index && (o = P.nextNode(), a++);
348
+ }
349
+ return P.currentNode = R, r;
350
+ }
351
+ p(t) {
352
+ let e = 0;
353
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
354
+ }
355
+ };
356
+ class M {
357
+ get _$AU() {
358
+ return this._$AM?._$AU ?? this._$Cv;
359
+ }
360
+ constructor(t, e, i, r) {
361
+ this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
362
+ }
363
+ get parentNode() {
364
+ let t = this._$AA.parentNode;
365
+ const e = this._$AM;
366
+ return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
367
+ }
368
+ get startNode() {
369
+ return this._$AA;
370
+ }
371
+ get endNode() {
372
+ return this._$AB;
373
+ }
374
+ _$AI(t, e = this) {
375
+ t = O(this, t, e), L(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : pe(t) ? this.k(t) : this._(t);
376
+ }
377
+ O(t) {
378
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
379
+ }
380
+ T(t) {
381
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
382
+ }
383
+ _(t) {
384
+ this._$AH !== v && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
385
+ }
386
+ $(t) {
387
+ const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = B.createElement(Ft(i.h, i.h[0]), this.options)), i);
388
+ if (this._$AH?._$AD === r) this._$AH.p(e);
389
+ else {
390
+ const o = new ve(r, this), a = o.u(this.options);
391
+ o.p(e), this.T(a), this._$AH = o;
392
+ }
393
+ }
394
+ _$AC(t) {
395
+ let e = Ot.get(t.strings);
396
+ return e === void 0 && Ot.set(t.strings, e = new B(t)), e;
397
+ }
398
+ k(t) {
399
+ yt(this._$AH) || (this._$AH = [], this._$AR());
400
+ const e = this._$AH;
401
+ let i, r = 0;
402
+ for (const o of t) r === e.length ? e.push(i = new M(this.O(H()), this.O(H()), this, this.options)) : i = e[r], i._$AI(o), r++;
403
+ r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
404
+ }
405
+ _$AR(t = this._$AA.nextSibling, e) {
406
+ for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
407
+ const i = t.nextSibling;
408
+ t.remove(), t = i;
409
+ }
410
+ }
411
+ setConnected(t) {
412
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
413
+ }
414
+ }
415
+ class Q {
416
+ get tagName() {
417
+ return this.element.tagName;
418
+ }
419
+ get _$AU() {
420
+ return this._$AM._$AU;
421
+ }
422
+ constructor(t, e, i, r, o) {
423
+ this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = v;
424
+ }
425
+ _$AI(t, e = this, i, r) {
426
+ const o = this.strings;
427
+ let a = !1;
428
+ if (o === void 0) t = O(this, t, e, 0), a = !L(t) || t !== this._$AH && t !== C, a && (this._$AH = t);
429
+ else {
430
+ const c = t;
431
+ let n, d;
432
+ for (t = o[0], n = 0; n < o.length - 1; n++) d = O(this, c[i + n], e, n), d === C && (d = this._$AH[n]), a ||= !L(d) || d !== this._$AH[n], d === v ? t = v : t !== v && (t += (d ?? "") + o[n + 1]), this._$AH[n] = d;
433
+ }
434
+ a && !r && this.j(t);
435
+ }
436
+ j(t) {
437
+ t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
438
+ }
439
+ }
440
+ class me extends Q {
441
+ constructor() {
442
+ super(...arguments), this.type = 3;
443
+ }
444
+ j(t) {
445
+ this.element[this.name] = t === v ? void 0 : t;
446
+ }
447
+ }
448
+ class be extends Q {
449
+ constructor() {
450
+ super(...arguments), this.type = 4;
451
+ }
452
+ j(t) {
453
+ this.element.toggleAttribute(this.name, !!t && t !== v);
454
+ }
455
+ }
456
+ class ye extends Q {
457
+ constructor(t, e, i, r, o) {
458
+ super(t, e, i, r, o), this.type = 5;
459
+ }
460
+ _$AI(t, e = this) {
461
+ if ((t = O(this, t, e, 0) ?? v) === C) return;
462
+ const i = this._$AH, r = t === v && i !== v || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== v && (i === v || r);
463
+ r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
464
+ }
465
+ handleEvent(t) {
466
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
467
+ }
468
+ }
469
+ class ge {
470
+ constructor(t, e, i) {
471
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
472
+ }
473
+ get _$AU() {
474
+ return this._$AM._$AU;
475
+ }
476
+ _$AI(t) {
477
+ O(this, t);
478
+ }
479
+ }
480
+ const _e = { I: M }, $e = bt.litHtmlPolyfillSupport;
481
+ $e?.(B, M), (bt.litHtmlVersions ??= []).push("3.3.1");
482
+ const xe = (s, t, e) => {
483
+ const i = e?.renderBefore ?? t;
484
+ let r = i._$litPart$;
485
+ if (r === void 0) {
486
+ const o = e?.renderBefore ?? null;
487
+ i._$litPart$ = r = new M(t.insertBefore(H(), o), o, void 0, e ?? {});
488
+ }
489
+ return r._$AI(s), r;
490
+ };
491
+ /**
492
+ * @license
493
+ * Copyright 2017 Google LLC
494
+ * SPDX-License-Identifier: BSD-3-Clause
495
+ */
496
+ const gt = globalThis;
497
+ let g = class extends k {
498
+ constructor() {
499
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
500
+ }
501
+ createRenderRoot() {
502
+ const t = super.createRenderRoot();
503
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
504
+ }
505
+ update(t) {
506
+ const e = this.render();
507
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = xe(e, this.renderRoot, this.renderOptions);
508
+ }
509
+ connectedCallback() {
510
+ super.connectedCallback(), this._$Do?.setConnected(!0);
511
+ }
512
+ disconnectedCallback() {
513
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
514
+ }
515
+ render() {
516
+ return C;
517
+ }
518
+ };
519
+ g._$litElement$ = !0, g.finalized = !0, gt.litElementHydrateSupport?.({ LitElement: g });
520
+ const Ae = gt.litElementPolyfillSupport;
521
+ Ae?.({ LitElement: g });
522
+ (gt.litElementVersions ??= []).push("4.2.1");
523
+ /**
524
+ * @license
525
+ * Copyright 2017 Google LLC
526
+ * SPDX-License-Identifier: BSD-3-Clause
527
+ */
528
+ const S = (s) => (t, e) => {
529
+ e !== void 0 ? e.addInitializer((() => {
530
+ customElements.define(s, t);
531
+ })) : customElements.define(s, t);
532
+ };
533
+ /**
534
+ * @license
535
+ * Copyright 2017 Google LLC
536
+ * SPDX-License-Identifier: BSD-3-Clause
537
+ */
538
+ const we = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: mt }, Ce = (s = we, t, e) => {
539
+ const { kind: i, metadata: r } = e;
540
+ let o = globalThis.litPropertyMetadata.get(r);
541
+ if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), i === "accessor") {
542
+ const { name: a } = e;
543
+ return { set(c) {
544
+ const n = t.get.call(this);
545
+ t.set.call(this, c), this.requestUpdate(a, n, s);
546
+ }, init(c) {
547
+ return c !== void 0 && this.C(a, void 0, s, c), c;
548
+ } };
549
+ }
550
+ if (i === "setter") {
551
+ const { name: a } = e;
552
+ return function(c) {
553
+ const n = this[a];
554
+ t.call(this, c), this.requestUpdate(a, n, s);
555
+ };
556
+ }
557
+ throw Error("Unsupported decorator location: " + i);
558
+ };
559
+ function m(s) {
560
+ return (t, e) => typeof e == "object" ? Ce(s, t, e) : ((i, r, o) => {
561
+ const a = r.hasOwnProperty(o);
562
+ return r.constructor.createProperty(o, i), a ? Object.getOwnPropertyDescriptor(r, o) : void 0;
563
+ })(s, t, e);
564
+ }
565
+ /**
566
+ * @license
567
+ * Copyright 2017 Google LLC
568
+ * SPDX-License-Identifier: BSD-3-Clause
569
+ */
570
+ function F(s) {
571
+ return m({ ...s, state: !0, attribute: !1 });
572
+ }
573
+ /**
574
+ * @license
575
+ * Copyright 2017 Google LLC
576
+ * SPDX-License-Identifier: BSD-3-Clause
577
+ */
578
+ const _t = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
579
+ /**
580
+ * @license
581
+ * Copyright 2017 Google LLC
582
+ * SPDX-License-Identifier: BSD-3-Clause
583
+ */
584
+ function tt(s, t) {
585
+ return (e, i, r) => {
586
+ const o = (a) => a.renderRoot?.querySelector(s) ?? null;
587
+ return _t(e, i, { get() {
588
+ return o(this);
589
+ } });
590
+ };
591
+ }
592
+ /**
593
+ * @license
594
+ * Copyright 2021 Google LLC
595
+ * SPDX-License-Identifier: BSD-3-Clause
596
+ */
597
+ function jt(s) {
598
+ return (t, e) => {
599
+ const { slot: i, selector: r } = s ?? {}, o = "slot" + (i ? `[name=${i}]` : ":not([name])");
600
+ return _t(t, e, { get() {
601
+ const a = this.renderRoot?.querySelector(o), c = a?.assignedElements(s) ?? [];
602
+ return r === void 0 ? c : c.filter(((n) => n.matches(r)));
603
+ } });
604
+ };
605
+ }
606
+ /**
607
+ * @license
608
+ * Copyright 2017 Google LLC
609
+ * SPDX-License-Identifier: BSD-3-Clause
610
+ */
611
+ function Ee(s) {
612
+ return (t, e) => {
613
+ const { slot: i } = s ?? {}, r = "slot" + (i ? `[name=${i}]` : ":not([name])");
614
+ return _t(t, e, { get() {
615
+ return this.renderRoot?.querySelector(r)?.assignedNodes(s) ?? [];
616
+ } });
617
+ };
618
+ }
619
+ /**
620
+ * @license
621
+ * Copyright 2017 Google LLC
622
+ * SPDX-License-Identifier: BSD-3-Clause
623
+ */
624
+ const Wt = { ATTRIBUTE: 1, CHILD: 2 }, Vt = (s) => (...t) => ({ _$litDirective$: s, values: t });
625
+ class Gt {
626
+ constructor(t) {
627
+ }
628
+ get _$AU() {
629
+ return this._$AM._$AU;
630
+ }
631
+ _$AT(t, e, i) {
632
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
633
+ }
634
+ _$AS(t, e) {
635
+ return this.update(t, e);
636
+ }
637
+ update(t, e) {
638
+ return this.render(...e);
639
+ }
640
+ }
641
+ /**
642
+ * @license
643
+ * Copyright 2020 Google LLC
644
+ * SPDX-License-Identifier: BSD-3-Clause
645
+ */
646
+ const { I: Se } = _e, Mt = () => document.createComment(""), D = (s, t, e) => {
647
+ const i = s._$AA.parentNode, r = t === void 0 ? s._$AB : t._$AA;
648
+ if (e === void 0) {
649
+ const o = i.insertBefore(Mt(), r), a = i.insertBefore(Mt(), r);
650
+ e = new Se(o, a, s, s.options);
651
+ } else {
652
+ const o = e._$AB.nextSibling, a = e._$AM, c = a !== s;
653
+ if (c) {
654
+ let n;
655
+ e._$AQ?.(s), e._$AM = s, e._$AP !== void 0 && (n = s._$AU) !== a._$AU && e._$AP(n);
656
+ }
657
+ if (o !== r || c) {
658
+ let n = e._$AA;
659
+ for (; n !== o; ) {
660
+ const d = n.nextSibling;
661
+ i.insertBefore(n, r), n = d;
662
+ }
663
+ }
664
+ }
665
+ return e;
666
+ }, I = (s, t, e = s) => (s._$AI(t, e), s), Te = {}, Ie = (s, t = Te) => s._$AH = t, Pe = (s) => s._$AH, st = (s) => {
667
+ s._$AR(), s._$AA.remove();
668
+ };
669
+ /**
670
+ * @license
671
+ * Copyright 2017 Google LLC
672
+ * SPDX-License-Identifier: BSD-3-Clause
673
+ */
674
+ const Nt = (s, t, e) => {
675
+ const i = /* @__PURE__ */ new Map();
676
+ for (let r = t; r <= e; r++) i.set(s[r], r);
677
+ return i;
678
+ }, Re = Vt(class extends Gt {
679
+ constructor(s) {
680
+ if (super(s), s.type !== Wt.CHILD) throw Error("repeat() can only be used in text expressions");
681
+ }
682
+ dt(s, t, e) {
683
+ let i;
684
+ e === void 0 ? e = t : t !== void 0 && (i = t);
685
+ const r = [], o = [];
686
+ let a = 0;
687
+ for (const c of s) r[a] = i ? i(c, a) : a, o[a] = e(c, a), a++;
688
+ return { values: o, keys: r };
689
+ }
690
+ render(s, t, e) {
691
+ return this.dt(s, t, e).values;
692
+ }
693
+ update(s, [t, e, i]) {
694
+ const r = Pe(s), { values: o, keys: a } = this.dt(t, e, i);
695
+ if (!Array.isArray(r)) return this.ut = a, o;
696
+ const c = this.ut ??= [], n = [];
697
+ let d, p, l = 0, f = r.length - 1, u = 0, b = o.length - 1;
698
+ for (; l <= f && u <= b; ) if (r[l] === null) l++;
699
+ else if (r[f] === null) f--;
700
+ else if (c[l] === a[u]) n[u] = I(r[l], o[u]), l++, u++;
701
+ else if (c[f] === a[b]) n[b] = I(r[f], o[b]), f--, b--;
702
+ else if (c[l] === a[b]) n[b] = I(r[l], o[b]), D(s, n[b + 1], r[l]), l++, b--;
703
+ else if (c[f] === a[u]) n[u] = I(r[f], o[u]), D(s, r[l], r[f]), f--, u++;
704
+ else if (d === void 0 && (d = Nt(a, u, b), p = Nt(c, l, f)), d.has(c[l])) if (d.has(c[f])) {
705
+ const x = p.get(a[u]), it = x !== void 0 ? r[x] : null;
706
+ if (it === null) {
707
+ const At = D(s, r[l]);
708
+ I(At, o[u]), n[u] = At;
709
+ } else n[u] = I(it, o[u]), D(s, r[l], it), r[x] = null;
710
+ u++;
711
+ } else st(r[f]), f--;
712
+ else st(r[l]), l++;
713
+ for (; u <= b; ) {
714
+ const x = D(s, n[b + 1]);
715
+ I(x, o[u]), n[u++] = x;
716
+ }
717
+ for (; l <= f; ) {
718
+ const x = r[l++];
719
+ x !== null && st(x);
720
+ }
721
+ return this.ut = a, Ie(s, n), C;
722
+ }
723
+ });
724
+ function h(s, t, e, i) {
725
+ var r = arguments.length, o = r < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, e) : i, a;
726
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, t, e, i);
727
+ else for (var c = s.length - 1; c >= 0; c--) (a = s[c]) && (o = (r < 3 ? a(o) : r > 3 ? a(t, e, o) : a(t, e)) || o);
728
+ return r > 3 && o && Object.defineProperty(t, e, o), o;
729
+ }
730
+ /**
731
+ * @license
732
+ * Copyright 2022 Google LLC
733
+ * SPDX-License-Identifier: Apache-2.0
734
+ */
735
+ class ke extends g {
736
+ render() {
737
+ return A`<slot></slot>`;
738
+ }
739
+ connectedCallback() {
740
+ if (super.connectedCallback(), this.getAttribute("aria-hidden") === "false") {
741
+ this.removeAttribute("aria-hidden");
742
+ return;
743
+ }
744
+ this.setAttribute("aria-hidden", "true");
745
+ }
746
+ }
747
+ /**
748
+ * @license
749
+ * Copyright 2024 Google LLC
750
+ * SPDX-License-Identifier: Apache-2.0
751
+ */
752
+ const Oe = $`:host{font-size:var(--mdif4-icon-size, 24px);width:var(--mdif4-icon-size, 24px);height:var(--mdif4-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--mdif4-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
753
+ `;
754
+ /**
755
+ * @license
756
+ * Copyright 2022 Google LLC
757
+ * SPDX-License-Identifier: Apache-2.0
758
+ */
759
+ let at = class extends ke {
760
+ };
761
+ at.styles = [Oe];
762
+ at = h([
763
+ S("mdif4-icon")
764
+ ], at);
765
+ /**
766
+ * @license
767
+ * Copyright 2023 Google LLC
768
+ * SPDX-License-Identifier: Apache-2.0
769
+ */
770
+ class et extends g {
771
+ constructor() {
772
+ super(...arguments), this.inset = !1, this.insetStart = !1, this.insetEnd = !1;
773
+ }
774
+ }
775
+ h([
776
+ m({ type: Boolean, reflect: !0 })
777
+ ], et.prototype, "inset", void 0);
778
+ h([
779
+ m({ type: Boolean, reflect: !0, attribute: "inset-start" })
780
+ ], et.prototype, "insetStart", void 0);
781
+ h([
782
+ m({ type: Boolean, reflect: !0, attribute: "inset-end" })
783
+ ], et.prototype, "insetEnd", void 0);
784
+ /**
785
+ * @license
786
+ * Copyright 2024 Google LLC
787
+ * SPDX-License-Identifier: Apache-2.0
788
+ */
789
+ const Me = $`:host{box-sizing:border-box;color:var(--mdif4-divider-color, var(--mdif4-sys-color-outline-variant, #cac4d0));display:flex;height:var(--mdif4-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
790
+ `;
791
+ /**
792
+ * @license
793
+ * Copyright 2023 Google LLC
794
+ * SPDX-License-Identifier: Apache-2.0
795
+ */
796
+ let nt = class extends et {
797
+ };
798
+ nt.styles = [Me];
799
+ nt = h([
800
+ S("mdif4-divider")
801
+ ], nt);
802
+ /**
803
+ * @license
804
+ * Copyright 2022 Google LLC
805
+ * SPDX-License-Identifier: Apache-2.0
806
+ */
807
+ class Ne extends g {
808
+ connectedCallback() {
809
+ super.connectedCallback(), this.setAttribute("aria-hidden", "true");
810
+ }
811
+ render() {
812
+ return A`<span class="shadow"></span>`;
813
+ }
814
+ }
815
+ /**
816
+ * @license
817
+ * Copyright 2024 Google LLC
818
+ * SPDX-License-Identifier: Apache-2.0
819
+ */
820
+ const ze = $`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--mdif4-elevation-level, 0);--_shadow-color: var(--mdif4-elevation-shadow-color, var(--mdif4-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
821
+ `;
822
+ /**
823
+ * @license
824
+ * Copyright 2022 Google LLC
825
+ * SPDX-License-Identifier: Apache-2.0
826
+ */
827
+ let ct = class extends Ne {
828
+ };
829
+ ct.styles = [ze];
830
+ ct = h([
831
+ S("mdif4-elevation")
832
+ ], ct);
833
+ /**
834
+ * @license
835
+ * Copyright 2023 Google LLC
836
+ * SPDX-License-Identifier: Apache-2.0
837
+ */
838
+ const Kt = Symbol("attachableController");
839
+ let qt;
840
+ qt = new MutationObserver((s) => {
841
+ for (const t of s)
842
+ t.target[Kt]?.hostConnected();
843
+ });
844
+ class Yt {
845
+ get htmlFor() {
846
+ return this.host.getAttribute("for");
847
+ }
848
+ set htmlFor(t) {
849
+ t === null ? this.host.removeAttribute("for") : this.host.setAttribute("for", t);
850
+ }
851
+ get control() {
852
+ return this.host.hasAttribute("for") ? !this.htmlFor || !this.host.isConnected ? null : this.host.getRootNode().querySelector(`#${this.htmlFor}`) : this.currentControl || this.host.parentElement;
853
+ }
854
+ set control(t) {
855
+ t ? this.attach(t) : this.detach();
856
+ }
857
+ /**
858
+ * Creates a new controller for an `Attachable` element.
859
+ *
860
+ * @param host The `Attachable` element.
861
+ * @param onControlChange A callback with two parameters for the previous and
862
+ * next control. An `Attachable` element may perform setup or teardown
863
+ * logic whenever the control changes.
864
+ */
865
+ constructor(t, e) {
866
+ this.host = t, this.onControlChange = e, this.currentControl = null, t.addController(this), t[Kt] = this, qt?.observe(t, { attributeFilter: ["for"] });
867
+ }
868
+ attach(t) {
869
+ t !== this.currentControl && (this.setCurrentControl(t), this.host.removeAttribute("for"));
870
+ }
871
+ detach() {
872
+ this.setCurrentControl(null), this.host.setAttribute("for", "");
873
+ }
874
+ /** @private */
875
+ hostConnected() {
876
+ this.setCurrentControl(this.control);
877
+ }
878
+ /** @private */
879
+ hostDisconnected() {
880
+ this.setCurrentControl(null);
881
+ }
882
+ setCurrentControl(t) {
883
+ this.onControlChange(this.currentControl, t), this.currentControl = t;
884
+ }
885
+ }
886
+ /**
887
+ * @license
888
+ * Copyright 2021 Google LLC
889
+ * SPDX-License-Identifier: Apache-2.0
890
+ */
891
+ const De = ["focusin", "focusout", "pointerdown"];
892
+ class $t extends g {
893
+ constructor() {
894
+ super(...arguments), this.visible = !1, this.inward = !1, this.attachableController = new Yt(this, this.onControlChange.bind(this));
895
+ }
896
+ get htmlFor() {
897
+ return this.attachableController.htmlFor;
898
+ }
899
+ set htmlFor(t) {
900
+ this.attachableController.htmlFor = t;
901
+ }
902
+ get control() {
903
+ return this.attachableController.control;
904
+ }
905
+ set control(t) {
906
+ this.attachableController.control = t;
907
+ }
908
+ attach(t) {
909
+ this.attachableController.attach(t);
910
+ }
911
+ detach() {
912
+ this.attachableController.detach();
913
+ }
914
+ connectedCallback() {
915
+ super.connectedCallback(), this.setAttribute("aria-hidden", "true");
916
+ }
917
+ /** @private */
918
+ handleEvent(t) {
919
+ if (!t[zt]) {
920
+ switch (t.type) {
921
+ default:
922
+ return;
923
+ case "focusin":
924
+ this.visible = this.control?.matches(":focus-visible") ?? !1;
925
+ break;
926
+ case "focusout":
927
+ case "pointerdown":
928
+ this.visible = !1;
929
+ break;
930
+ }
931
+ t[zt] = !0;
932
+ }
933
+ }
934
+ onControlChange(t, e) {
935
+ for (const i of De)
936
+ t?.removeEventListener(i, this), e?.addEventListener(i, this);
937
+ }
938
+ update(t) {
939
+ t.has("visible") && this.dispatchEvent(new Event("visibility-changed")), super.update(t);
940
+ }
941
+ }
942
+ h([
943
+ m({ type: Boolean, reflect: !0 })
944
+ ], $t.prototype, "visible", void 0);
945
+ h([
946
+ m({ type: Boolean, reflect: !0 })
947
+ ], $t.prototype, "inward", void 0);
948
+ const zt = Symbol("handledByFocusRing");
949
+ /**
950
+ * @license
951
+ * Copyright 2024 Google LLC
952
+ * SPDX-License-Identifier: Apache-2.0
953
+ */
954
+ const Ue = $`:host{animation-delay:0s,calc(var(--mdif4-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--mdif4-focus-ring-duration, 600ms)*.25),calc(var(--mdif4-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--mdif4-focus-ring-color, var(--mdif4-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--mdif4-focus-ring-shape-end-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--mdif4-focus-ring-shape-end-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--mdif4-focus-ring-shape-start-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--mdif4-focus-ring-shape-start-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));inset:calc(-1*var(--mdif4-focus-ring-outward-offset, 2px));outline:var(--mdif4-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--mdif4-focus-ring-shape-end-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--mdif4-focus-ring-shape-end-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--mdif4-focus-ring-shape-start-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--mdif4-focus-ring-shape-start-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border:var(--mdif4-focus-ring-width, 3px) solid currentColor;inset:var(--mdif4-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--mdif4-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--mdif4-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--mdif4-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--mdif4-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
955
+ `;
956
+ /**
957
+ * @license
958
+ * Copyright 2021 Google LLC
959
+ * SPDX-License-Identifier: Apache-2.0
960
+ */
961
+ let lt = class extends $t {
962
+ };
963
+ lt.styles = [Ue];
964
+ lt = h([
965
+ S("mdif4-focus-ring")
966
+ ], lt);
967
+ /**
968
+ * @license
969
+ * Copyright 2018 Google LLC
970
+ * SPDX-License-Identifier: BSD-3-Clause
971
+ */
972
+ const Zt = Vt(class extends Gt {
973
+ constructor(s) {
974
+ if (super(s), s.type !== Wt.ATTRIBUTE || s.name !== "class" || s.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
975
+ }
976
+ render(s) {
977
+ return " " + Object.keys(s).filter(((t) => s[t])).join(" ") + " ";
978
+ }
979
+ update(s, [t]) {
980
+ if (this.st === void 0) {
981
+ this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter(((i) => i !== ""))));
982
+ for (const i in t) t[i] && !this.nt?.has(i) && this.st.add(i);
983
+ return this.render(t);
984
+ }
985
+ const e = s.element.classList;
986
+ for (const i of this.st) i in t || (e.remove(i), this.st.delete(i));
987
+ for (const i in t) {
988
+ const r = !!t[i];
989
+ r === this.st.has(i) || this.nt?.has(i) || (r ? (e.add(i), this.st.add(i)) : (e.remove(i), this.st.delete(i)));
990
+ }
991
+ return C;
992
+ }
993
+ });
994
+ /**
995
+ * @license
996
+ * Copyright 2021 Google LLC
997
+ * SPDX-License-Identifier: Apache-2.0
998
+ */
999
+ const Xt = {
1000
+ STANDARD: "cubic-bezier(0.2, 0, 0, 1)",
1001
+ EMPHASIZED: "cubic-bezier(.3,0,0,1)"
1002
+ };
1003
+ /**
1004
+ * @license
1005
+ * Copyright 2022 Google LLC
1006
+ * SPDX-License-Identifier: Apache-2.0
1007
+ */
1008
+ const He = 450, Dt = 225, Le = 0.2, Be = 10, Fe = 75, je = 0.35, We = "::after", Ve = "forwards";
1009
+ var y;
1010
+ (function(s) {
1011
+ s[s.INACTIVE = 0] = "INACTIVE", s[s.TOUCH_DELAY = 1] = "TOUCH_DELAY", s[s.HOLDING = 2] = "HOLDING", s[s.WAITING_FOR_CLICK = 3] = "WAITING_FOR_CLICK";
1012
+ })(y || (y = {}));
1013
+ const Ge = [
1014
+ "click",
1015
+ "contextmenu",
1016
+ "pointercancel",
1017
+ "pointerdown",
1018
+ "pointerenter",
1019
+ "pointerleave",
1020
+ "pointerup"
1021
+ ], Ke = 150, qe = window.matchMedia("(forced-colors: active)");
1022
+ class j extends g {
1023
+ constructor() {
1024
+ super(...arguments), this.disabled = !1, this.hovered = !1, this.pressed = !1, this.rippleSize = "", this.rippleScale = "", this.initialSize = 0, this.state = y.INACTIVE, this.attachableController = new Yt(this, this.onControlChange.bind(this));
1025
+ }
1026
+ get htmlFor() {
1027
+ return this.attachableController.htmlFor;
1028
+ }
1029
+ set htmlFor(t) {
1030
+ this.attachableController.htmlFor = t;
1031
+ }
1032
+ get control() {
1033
+ return this.attachableController.control;
1034
+ }
1035
+ set control(t) {
1036
+ this.attachableController.control = t;
1037
+ }
1038
+ attach(t) {
1039
+ this.attachableController.attach(t);
1040
+ }
1041
+ detach() {
1042
+ this.attachableController.detach();
1043
+ }
1044
+ connectedCallback() {
1045
+ super.connectedCallback(), this.setAttribute("aria-hidden", "true");
1046
+ }
1047
+ render() {
1048
+ const t = {
1049
+ hovered: this.hovered,
1050
+ pressed: this.pressed
1051
+ };
1052
+ return A`<div class="surface ${Zt(t)}"></div>`;
1053
+ }
1054
+ update(t) {
1055
+ t.has("disabled") && this.disabled && (this.hovered = !1, this.pressed = !1), super.update(t);
1056
+ }
1057
+ /**
1058
+ * TODO(b/269799771): make private
1059
+ * @private only public for slider
1060
+ */
1061
+ handlePointerenter(t) {
1062
+ this.shouldReactToEvent(t) && (this.hovered = !0);
1063
+ }
1064
+ /**
1065
+ * TODO(b/269799771): make private
1066
+ * @private only public for slider
1067
+ */
1068
+ handlePointerleave(t) {
1069
+ this.shouldReactToEvent(t) && (this.hovered = !1, this.state !== y.INACTIVE && this.endPressAnimation());
1070
+ }
1071
+ handlePointerup(t) {
1072
+ if (this.shouldReactToEvent(t)) {
1073
+ if (this.state === y.HOLDING) {
1074
+ this.state = y.WAITING_FOR_CLICK;
1075
+ return;
1076
+ }
1077
+ if (this.state === y.TOUCH_DELAY) {
1078
+ this.state = y.WAITING_FOR_CLICK, this.startPressAnimation(this.rippleStartEvent);
1079
+ return;
1080
+ }
1081
+ }
1082
+ }
1083
+ async handlePointerdown(t) {
1084
+ if (this.shouldReactToEvent(t)) {
1085
+ if (this.rippleStartEvent = t, !this.isTouch(t)) {
1086
+ this.state = y.WAITING_FOR_CLICK, this.startPressAnimation(t);
1087
+ return;
1088
+ }
1089
+ this.state = y.TOUCH_DELAY, await new Promise((e) => {
1090
+ setTimeout(e, Ke);
1091
+ }), this.state === y.TOUCH_DELAY && (this.state = y.HOLDING, this.startPressAnimation(t));
1092
+ }
1093
+ }
1094
+ handleClick() {
1095
+ if (!this.disabled) {
1096
+ if (this.state === y.WAITING_FOR_CLICK) {
1097
+ this.endPressAnimation();
1098
+ return;
1099
+ }
1100
+ this.state === y.INACTIVE && (this.startPressAnimation(), this.endPressAnimation());
1101
+ }
1102
+ }
1103
+ handlePointercancel(t) {
1104
+ this.shouldReactToEvent(t) && this.endPressAnimation();
1105
+ }
1106
+ handleContextmenu() {
1107
+ this.disabled || this.endPressAnimation();
1108
+ }
1109
+ determineRippleSize() {
1110
+ const { height: t, width: e } = this.getBoundingClientRect(), i = Math.max(t, e), r = Math.max(je * i, Fe), o = this.currentCSSZoom ?? 1, a = Math.floor(i * Le / o), n = Math.sqrt(e ** 2 + t ** 2) + Be;
1111
+ this.initialSize = a;
1112
+ const d = (n + r) / a;
1113
+ this.rippleScale = `${d / o}`, this.rippleSize = `${a}px`;
1114
+ }
1115
+ getNormalizedPointerEventCoords(t) {
1116
+ const { scrollX: e, scrollY: i } = window, { left: r, top: o } = this.getBoundingClientRect(), a = e + r, c = i + o, { pageX: n, pageY: d } = t, p = this.currentCSSZoom ?? 1;
1117
+ return {
1118
+ x: (n - a) / p,
1119
+ y: (d - c) / p
1120
+ };
1121
+ }
1122
+ getTranslationCoordinates(t) {
1123
+ const { height: e, width: i } = this.getBoundingClientRect(), r = this.currentCSSZoom ?? 1, o = {
1124
+ x: (i / r - this.initialSize) / 2,
1125
+ y: (e / r - this.initialSize) / 2
1126
+ };
1127
+ let a;
1128
+ return t instanceof PointerEvent ? a = this.getNormalizedPointerEventCoords(t) : a = {
1129
+ x: i / r / 2,
1130
+ y: e / r / 2
1131
+ }, a = {
1132
+ x: a.x - this.initialSize / 2,
1133
+ y: a.y - this.initialSize / 2
1134
+ }, { startPoint: a, endPoint: o };
1135
+ }
1136
+ startPressAnimation(t) {
1137
+ if (!this.mdRoot)
1138
+ return;
1139
+ this.pressed = !0, this.growAnimation?.cancel(), this.determineRippleSize();
1140
+ const { startPoint: e, endPoint: i } = this.getTranslationCoordinates(t), r = `${e.x}px, ${e.y}px`, o = `${i.x}px, ${i.y}px`;
1141
+ this.growAnimation = this.mdRoot.animate({
1142
+ top: [0, 0],
1143
+ left: [0, 0],
1144
+ height: [this.rippleSize, this.rippleSize],
1145
+ width: [this.rippleSize, this.rippleSize],
1146
+ transform: [
1147
+ `translate(${r}) scale(1)`,
1148
+ `translate(${o}) scale(${this.rippleScale})`
1149
+ ]
1150
+ }, {
1151
+ pseudoElement: We,
1152
+ duration: He,
1153
+ easing: Xt.STANDARD,
1154
+ fill: Ve
1155
+ });
1156
+ }
1157
+ async endPressAnimation() {
1158
+ this.rippleStartEvent = void 0, this.state = y.INACTIVE;
1159
+ const t = this.growAnimation;
1160
+ let e = 1 / 0;
1161
+ if (typeof t?.currentTime == "number" ? e = t.currentTime : t?.currentTime && (e = t.currentTime.to("ms").value), e >= Dt) {
1162
+ this.pressed = !1;
1163
+ return;
1164
+ }
1165
+ await new Promise((i) => {
1166
+ setTimeout(i, Dt - e);
1167
+ }), this.growAnimation === t && (this.pressed = !1);
1168
+ }
1169
+ /**
1170
+ * Returns `true` if
1171
+ * - the ripple element is enabled
1172
+ * - the pointer is primary for the input type
1173
+ * - the pointer is the pointer that started the interaction, or will start
1174
+ * the interaction
1175
+ * - the pointer is a touch, or the pointer state has the primary button
1176
+ * held, or the pointer is hovering
1177
+ */
1178
+ shouldReactToEvent(t) {
1179
+ if (this.disabled || !t.isPrimary || this.rippleStartEvent && this.rippleStartEvent.pointerId !== t.pointerId)
1180
+ return !1;
1181
+ if (t.type === "pointerenter" || t.type === "pointerleave")
1182
+ return !this.isTouch(t);
1183
+ const e = t.buttons === 1;
1184
+ return this.isTouch(t) || e;
1185
+ }
1186
+ isTouch({ pointerType: t }) {
1187
+ return t === "touch";
1188
+ }
1189
+ /** @private */
1190
+ async handleEvent(t) {
1191
+ if (!qe?.matches)
1192
+ switch (t.type) {
1193
+ case "click":
1194
+ this.handleClick();
1195
+ break;
1196
+ case "contextmenu":
1197
+ this.handleContextmenu();
1198
+ break;
1199
+ case "pointercancel":
1200
+ this.handlePointercancel(t);
1201
+ break;
1202
+ case "pointerdown":
1203
+ await this.handlePointerdown(t);
1204
+ break;
1205
+ case "pointerenter":
1206
+ this.handlePointerenter(t);
1207
+ break;
1208
+ case "pointerleave":
1209
+ this.handlePointerleave(t);
1210
+ break;
1211
+ case "pointerup":
1212
+ this.handlePointerup(t);
1213
+ break;
1214
+ }
1215
+ }
1216
+ onControlChange(t, e) {
1217
+ for (const i of Ge)
1218
+ t?.removeEventListener(i, this), e?.addEventListener(i, this);
1219
+ }
1220
+ }
1221
+ h([
1222
+ m({ type: Boolean, reflect: !0 })
1223
+ ], j.prototype, "disabled", void 0);
1224
+ h([
1225
+ F()
1226
+ ], j.prototype, "hovered", void 0);
1227
+ h([
1228
+ F()
1229
+ ], j.prototype, "pressed", void 0);
1230
+ h([
1231
+ tt(".surface")
1232
+ ], j.prototype, "mdRoot", void 0);
1233
+ /**
1234
+ * @license
1235
+ * Copyright 2024 Google LLC
1236
+ * SPDX-License-Identifier: Apache-2.0
1237
+ */
1238
+ const Ye = $`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--mdif4-ripple-hover-color, var(--mdif4-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--mdif4-ripple-pressed-color, var(--mdif4-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--mdif4-ripple-hover-color, var(--mdif4-sys-color-on-surface, #1d1b20));opacity:var(--mdif4-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--mdif4-ripple-pressed-opacity, 0.12);transition-duration:105ms}
1239
+ `;
1240
+ /**
1241
+ * @license
1242
+ * Copyright 2022 Google LLC
1243
+ * SPDX-License-Identifier: Apache-2.0
1244
+ */
1245
+ let dt = class extends j {
1246
+ };
1247
+ dt.styles = [Ye];
1248
+ dt = h([
1249
+ S("mdif4-ripple")
1250
+ ], dt);
1251
+ /**
1252
+ * @license
1253
+ * Copyright 2023 Google LLC
1254
+ * SPDX-License-Identifier: Apache-2.0
1255
+ */
1256
+ const V = Symbol("isFocusable"), ot = Symbol("privateIsFocusable"), G = Symbol("externalTabIndex"), K = Symbol("isUpdatingTabIndex"), q = Symbol("updateTabIndex");
1257
+ function Ze(s) {
1258
+ var t, e, i;
1259
+ class r extends s {
1260
+ constructor() {
1261
+ super(...arguments), this[t] = !0, this[e] = null, this[i] = !1;
1262
+ }
1263
+ get [V]() {
1264
+ return this[ot];
1265
+ }
1266
+ set [V](a) {
1267
+ this[V] !== a && (this[ot] = a, this[q]());
1268
+ }
1269
+ connectedCallback() {
1270
+ super.connectedCallback(), this[q]();
1271
+ }
1272
+ attributeChangedCallback(a, c, n) {
1273
+ if (a !== "tabindex") {
1274
+ super.attributeChangedCallback(a, c, n);
1275
+ return;
1276
+ }
1277
+ if (this.requestUpdate("tabIndex", Number(c ?? -1)), !this[K]) {
1278
+ if (!this.hasAttribute("tabindex")) {
1279
+ this[G] = null, this[q]();
1280
+ return;
1281
+ }
1282
+ this[G] = this.tabIndex;
1283
+ }
1284
+ }
1285
+ [(t = ot, e = G, i = K, q)]() {
1286
+ const a = this[V] ? 0 : -1, c = this[G] ?? a;
1287
+ this[K] = !0, this.tabIndex = c, this[K] = !1;
1288
+ }
1289
+ }
1290
+ return h([
1291
+ m({ noAccessor: !0 })
1292
+ ], r.prototype, "tabIndex", void 0), r;
1293
+ }
1294
+ /**
1295
+ * @license
1296
+ * Copyright 2023 Google LLC
1297
+ * SPDX-License-Identifier: Apache-2.0
1298
+ */
1299
+ const Jt = Symbol("animateIndicator"), Xe = Ze(g);
1300
+ class _ extends Xe {
1301
+ /**
1302
+ * @deprecated use `active`
1303
+ */
1304
+ get selected() {
1305
+ return this.active;
1306
+ }
1307
+ set selected(t) {
1308
+ this.active = t;
1309
+ }
1310
+ constructor() {
1311
+ super(), this.isTab = !0, this.active = !1, this.hasIcon = !1, this.iconOnly = !1, this.fullWidthIndicator = !1, this.internals = // Cast needed for closure
1312
+ this.attachInternals(), this.internals.role = "tab", this.addEventListener("keydown", this.handleKeydown.bind(this));
1313
+ }
1314
+ render() {
1315
+ const t = A`<div class="indicator"></div>`;
1316
+ return A`<div
1317
+ class="button"
1318
+ role="presentation"
1319
+ @click=${this.handleContentClick}>
1320
+ <mdif4-focus-ring part="focus-ring" inward .control=${this}></mdif4-focus-ring>
1321
+ <mdif4-elevation part="elevation"></mdif4-elevation>
1322
+ <mdif4-ripple .control=${this}></mdif4-ripple>
1323
+ <div
1324
+ class="content ${Zt(this.getContentClasses())}"
1325
+ role="presentation">
1326
+ <slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>
1327
+ <slot @slotchange=${this.handleSlotChange}></slot>
1328
+ ${this.fullWidthIndicator ? v : t}
1329
+ </div>
1330
+ ${this.fullWidthIndicator ? t : v}
1331
+ </div>`;
1332
+ }
1333
+ getContentClasses() {
1334
+ return {
1335
+ "has-icon": this.hasIcon,
1336
+ "has-label": !this.iconOnly
1337
+ };
1338
+ }
1339
+ updated() {
1340
+ this.internals.ariaSelected = String(this.active);
1341
+ }
1342
+ async handleKeydown(t) {
1343
+ await 0, !t.defaultPrevented && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.click());
1344
+ }
1345
+ handleContentClick(t) {
1346
+ t.stopPropagation(), this.click();
1347
+ }
1348
+ [Jt](t) {
1349
+ if (!this.indicator)
1350
+ return;
1351
+ this.indicator.getAnimations().forEach((i) => {
1352
+ i.cancel();
1353
+ });
1354
+ const e = this.getKeyframes(t);
1355
+ e !== null && this.indicator.animate(e, {
1356
+ duration: 250,
1357
+ easing: Xt.EMPHASIZED
1358
+ });
1359
+ }
1360
+ getKeyframes(t) {
1361
+ const e = Je();
1362
+ if (!this.active)
1363
+ return e ? [{ opacity: 1 }, { transform: "none" }] : null;
1364
+ const i = {}, r = t.indicator?.getBoundingClientRect() ?? {}, o = r.left, a = r.width, c = this.indicator.getBoundingClientRect(), n = c.left, d = c.width, p = a / d;
1365
+ return !e && o !== void 0 && n !== void 0 && !isNaN(p) ? i.transform = `translateX(${(o - n).toFixed(4)}px) scaleX(${p.toFixed(4)})` : i.opacity = 0, [i, { transform: "none" }];
1366
+ }
1367
+ handleSlotChange() {
1368
+ this.iconOnly = !1;
1369
+ for (const t of this.assignedDefaultNodes) {
1370
+ const e = t.nodeType === Node.TEXT_NODE && !!t.wholeText.match(/\S/);
1371
+ if (t.nodeType === Node.ELEMENT_NODE || e)
1372
+ return;
1373
+ }
1374
+ this.iconOnly = !0;
1375
+ }
1376
+ handleIconSlotChange() {
1377
+ this.hasIcon = this.assignedIcons.length > 0;
1378
+ }
1379
+ }
1380
+ h([
1381
+ m({ type: Boolean, reflect: !0, attribute: "mdif4-tab" })
1382
+ ], _.prototype, "isTab", void 0);
1383
+ h([
1384
+ m({ type: Boolean, reflect: !0 })
1385
+ ], _.prototype, "active", void 0);
1386
+ h([
1387
+ m({ type: Boolean })
1388
+ ], _.prototype, "selected", null);
1389
+ h([
1390
+ m({ type: Boolean, attribute: "has-icon" })
1391
+ ], _.prototype, "hasIcon", void 0);
1392
+ h([
1393
+ m({ type: Boolean, attribute: "icon-only" })
1394
+ ], _.prototype, "iconOnly", void 0);
1395
+ h([
1396
+ tt(".indicator")
1397
+ ], _.prototype, "indicator", void 0);
1398
+ h([
1399
+ F()
1400
+ ], _.prototype, "fullWidthIndicator", void 0);
1401
+ h([
1402
+ Ee({ flatten: !0 })
1403
+ ], _.prototype, "assignedDefaultNodes", void 0);
1404
+ h([
1405
+ jt({ slot: "icon", flatten: !0 })
1406
+ ], _.prototype, "assignedIcons", void 0);
1407
+ function Je() {
1408
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1409
+ }
1410
+ /**
1411
+ * @license
1412
+ * Copyright 2023 Google LLC
1413
+ * SPDX-License-Identifier: Apache-2.0
1414
+ */
1415
+ class N extends g {
1416
+ /**
1417
+ * The currently selected tab, `null` only when there are no tab children.
1418
+ *
1419
+ * @export
1420
+ */
1421
+ get activeTab() {
1422
+ return this.tabs.find((t) => t.active) ?? null;
1423
+ }
1424
+ set activeTab(t) {
1425
+ t && this.activateTab(t);
1426
+ }
1427
+ /**
1428
+ * The index of the currently selected tab.
1429
+ *
1430
+ * @export
1431
+ */
1432
+ get activeTabIndex() {
1433
+ return this.tabs.findIndex((t) => t.active);
1434
+ }
1435
+ set activeTabIndex(t) {
1436
+ const e = () => {
1437
+ const i = this.tabs[t];
1438
+ i && this.activateTab(i);
1439
+ };
1440
+ if (!this.slotElement) {
1441
+ this.updateComplete.then(e);
1442
+ return;
1443
+ }
1444
+ e();
1445
+ }
1446
+ get focusedTab() {
1447
+ return this.tabs.find((t) => t.matches(":focus-within"));
1448
+ }
1449
+ constructor() {
1450
+ super(), this.autoActivate = !1, this.internals = // Cast needed for closure
1451
+ this.attachInternals(), this.internals.role = "tablist", this.addEventListener("keydown", this.handleKeydown.bind(this)), this.addEventListener("keyup", this.handleKeyup.bind(this)), this.addEventListener("focusout", this.handleFocusout.bind(this));
1452
+ }
1453
+ /**
1454
+ * Scrolls the toolbar, if overflowing, to the active tab, or the provided
1455
+ * tab.
1456
+ *
1457
+ * @param tabToScrollTo The tab that should be scrolled to. Defaults to the
1458
+ * active tab.
1459
+ * @return A Promise that resolves after the tab has been scrolled to.
1460
+ */
1461
+ async scrollToTab(t) {
1462
+ await this.updateComplete;
1463
+ const { tabs: e } = this;
1464
+ if (t ??= this.activeTab, !t || !e.includes(t) || !this.tabsScrollerElement)
1465
+ return;
1466
+ for (const f of this.tabs)
1467
+ await f.updateComplete;
1468
+ const i = t.offsetLeft, r = t.offsetWidth, o = this.scrollLeft, a = this.offsetWidth, c = 48, n = i - c, d = i + r - a + c, p = Math.min(n, Math.max(d, o)), l = this.focusedTab ? "auto" : "instant";
1469
+ this.tabsScrollerElement.scrollTo({ behavior: l, top: 0, left: p });
1470
+ }
1471
+ render() {
1472
+ return A`
1473
+ <div class="tabs">
1474
+ <slot
1475
+ @slotchange=${this.handleSlotChange}
1476
+ @click=${this.handleTabClick}></slot>
1477
+ </div>
1478
+ <mdif4-divider part="divider"></mdif4-divider>
1479
+ `;
1480
+ }
1481
+ async handleTabClick(t) {
1482
+ const e = t.target;
1483
+ await 0, !(t.defaultPrevented || !Qe(e) || e.active) && this.activateTab(e);
1484
+ }
1485
+ activateTab(t) {
1486
+ const { tabs: e } = this, i = this.activeTab;
1487
+ if (!(!e.includes(t) || i === t)) {
1488
+ for (const r of e)
1489
+ r.active = r === t;
1490
+ if (i) {
1491
+ if (!this.dispatchEvent(new Event("change", { bubbles: !0, cancelable: !0 }))) {
1492
+ for (const o of e)
1493
+ o.active = o === i;
1494
+ return;
1495
+ }
1496
+ t[Jt](i);
1497
+ }
1498
+ this.updateFocusableTab(t), this.scrollToTab(t);
1499
+ }
1500
+ }
1501
+ updateFocusableTab(t) {
1502
+ for (const e of this.tabs)
1503
+ e.tabIndex = e === t ? 0 : -1;
1504
+ }
1505
+ // focus item on keydown and optionally select it
1506
+ async handleKeydown(t) {
1507
+ await 0;
1508
+ const e = t.key === "ArrowLeft", i = t.key === "ArrowRight", r = t.key === "Home", o = t.key === "End";
1509
+ if (t.defaultPrevented || !e && !i && !r && !o)
1510
+ return;
1511
+ const { tabs: a } = this;
1512
+ if (a.length < 2)
1513
+ return;
1514
+ t.preventDefault();
1515
+ let c;
1516
+ if (r || o)
1517
+ c = r ? 0 : a.length - 1;
1518
+ else {
1519
+ const p = getComputedStyle(this).direction === "rtl" ? e : i, { focusedTab: l } = this;
1520
+ if (!l)
1521
+ c = p ? 0 : a.length - 1;
1522
+ else {
1523
+ const f = this.tabs.indexOf(l);
1524
+ c = p ? f + 1 : f - 1, c >= a.length ? c = 0 : c < 0 && (c = a.length - 1);
1525
+ }
1526
+ }
1527
+ const n = a[c];
1528
+ n.focus(), this.autoActivate ? this.activateTab(n) : this.updateFocusableTab(n);
1529
+ }
1530
+ // scroll to item on keyup.
1531
+ handleKeyup() {
1532
+ this.scrollToTab(this.focusedTab ?? this.activeTab);
1533
+ }
1534
+ handleFocusout() {
1535
+ if (this.matches(":focus-within"))
1536
+ return;
1537
+ const { activeTab: t } = this;
1538
+ t && this.updateFocusableTab(t);
1539
+ }
1540
+ handleSlotChange() {
1541
+ const t = this.tabs[0];
1542
+ !this.activeTab && t && this.activateTab(t), this.scrollToTab(this.activeTab);
1543
+ }
1544
+ }
1545
+ h([
1546
+ jt({ flatten: !0, selector: "[mdif4-tab]" })
1547
+ ], N.prototype, "tabs", void 0);
1548
+ h([
1549
+ m({ type: Number, attribute: "active-tab-index" })
1550
+ ], N.prototype, "activeTabIndex", null);
1551
+ h([
1552
+ m({ type: Boolean, attribute: "auto-activate" })
1553
+ ], N.prototype, "autoActivate", void 0);
1554
+ h([
1555
+ tt(".tabs")
1556
+ ], N.prototype, "tabsScrollerElement", void 0);
1557
+ h([
1558
+ tt("slot")
1559
+ ], N.prototype, "slotElement", void 0);
1560
+ function Qe(s) {
1561
+ return s instanceof HTMLElement && s.hasAttribute("mdif4-tab");
1562
+ }
1563
+ /**
1564
+ * @license
1565
+ * Copyright 2024 Google LLC
1566
+ * SPDX-License-Identifier: Apache-2.0
1567
+ */
1568
+ const ti = $`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1}
1569
+ `;
1570
+ /**
1571
+ * @license
1572
+ * Copyright 2023 Google LLC
1573
+ * SPDX-License-Identifier: Apache-2.0
1574
+ */
1575
+ let ht = class extends N {
1576
+ };
1577
+ ht.styles = [ti];
1578
+ ht = h([
1579
+ S("mdif4-tabs")
1580
+ ], ht);
1581
+ /**
1582
+ * @license
1583
+ * Copyright 2023 Google LLC
1584
+ * SPDX-License-Identifier: Apache-2.0
1585
+ */
1586
+ class Qt extends _ {
1587
+ constructor() {
1588
+ super(...arguments), this.inlineIcon = !1;
1589
+ }
1590
+ getContentClasses() {
1591
+ return {
1592
+ ...super.getContentClasses(),
1593
+ stacked: !this.inlineIcon
1594
+ };
1595
+ }
1596
+ }
1597
+ h([
1598
+ m({ type: Boolean, attribute: "inline-icon" })
1599
+ ], Qt.prototype, "inlineIcon", void 0);
1600
+ /**
1601
+ * @license
1602
+ * Copyright 2024 Google LLC
1603
+ * SPDX-License-Identifier: Apache-2.0
1604
+ */
1605
+ const ei = $`:host{--_active-indicator-color: var(--mdif4-primary-tab-active-indicator-color, var(--mdif4-sys-color-primary, #6750a4));--_active-indicator-height: var(--mdif4-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--mdif4-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--mdif4-primary-tab-active-hover-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--mdif4-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--mdif4-primary-tab-active-pressed-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--mdif4-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--mdif4-primary-tab-container-color, var(--mdif4-sys-color-surface, #fef7ff));--_container-elevation: var(--mdif4-primary-tab-container-elevation, 0);--_container-height: var(--mdif4-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--mdif4-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--mdif4-primary-tab-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--mdif4-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--mdif4-primary-tab-pressed-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--mdif4-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--mdif4-primary-tab-active-focus-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--mdif4-primary-tab-active-hover-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-icon-color: var(--mdif4-primary-tab-active-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--mdif4-primary-tab-active-pressed-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_icon-size: var(--mdif4-primary-tab-icon-size, 24px);--_focus-icon-color: var(--mdif4-primary-tab-focus-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--mdif4-primary-tab-hover-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_icon-color: var(--mdif4-primary-tab-icon-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--mdif4-primary-tab-pressed-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_label-text-font: var(--mdif4-primary-tab-label-text-font, var(--mdif4-sys-typescale-title-small-font, var(--mdif4-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--mdif4-primary-tab-label-text-line-height, var(--mdif4-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--mdif4-primary-tab-label-text-size, var(--mdif4-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--mdif4-primary-tab-label-text-weight, var(--mdif4-sys-typescale-title-small-weight, var(--mdif4-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--mdif4-primary-tab-active-focus-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--mdif4-primary-tab-active-hover-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-label-text-color: var(--mdif4-primary-tab-active-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--mdif4-primary-tab-active-pressed-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_focus-label-text-color: var(--mdif4-primary-tab-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--mdif4-primary-tab-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_label-text-color: var(--mdif4-primary-tab-label-text-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--mdif4-primary-tab-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--mdif4-primary-tab-container-shape-start-start, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--mdif4-primary-tab-container-shape-start-end, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--mdif4-primary-tab-container-shape-end-end, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--mdif4-primary-tab-container-shape-end-start, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
1606
+ `;
1607
+ /**
1608
+ * @license
1609
+ * Copyright 2024 Google LLC
1610
+ * SPDX-License-Identifier: Apache-2.0
1611
+ */
1612
+ const te = $`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--mdif4-ripple-hover-color: var(--_hover-state-layer-color);--mdif4-ripple-hover-opacity: var(--_hover-state-layer-opacity);--mdif4-ripple-pressed-color: var(--_pressed-state-layer-color);--mdif4-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--mdif4-elevation-level: var(--_container-elevation)}mdif4-focus-ring{--mdif4-focus-ring-shape: 8px}:host([active]) mdif4-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,mdif4-ripple,mdif4-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--mdif4-ripple-hover-color: var(--_active-hover-state-layer-color);--mdif4-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--mdif4-ripple-pressed-color: var(--_active-pressed-state-layer-color);--mdif4-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}}
1613
+ `;
1614
+ /**
1615
+ * @license
1616
+ * Copyright 2023 Google LLC
1617
+ * SPDX-License-Identifier: Apache-2.0
1618
+ */
1619
+ let pt = class extends Qt {
1620
+ };
1621
+ pt.styles = [te, ei];
1622
+ pt = h([
1623
+ S("mdif4-primary-tab")
1624
+ ], pt);
1625
+ /**
1626
+ * @license
1627
+ * Copyright 2023 Google LLC
1628
+ * SPDX-License-Identifier: Apache-2.0
1629
+ */
1630
+ class ii extends _ {
1631
+ constructor() {
1632
+ super(...arguments), this.fullWidthIndicator = !0;
1633
+ }
1634
+ }
1635
+ /**
1636
+ * @license
1637
+ * Copyright 2024 Google LLC
1638
+ * SPDX-License-Identifier: Apache-2.0
1639
+ */
1640
+ const ri = $`:host{--_active-indicator-color: var(--mdif4-secondary-tab-active-indicator-color, var(--mdif4-sys-color-primary, #6750a4));--_active-indicator-height: var(--mdif4-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--mdif4-secondary-tab-active-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-color: var(--mdif4-secondary-tab-container-color, var(--mdif4-sys-color-surface, #fef7ff));--_container-elevation: var(--mdif4-secondary-tab-container-elevation, 0);--_container-height: var(--mdif4-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--mdif4-secondary-tab-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--mdif4-secondary-tab-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--mdif4-secondary-tab-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--mdif4-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--mdif4-secondary-tab-label-text-font, var(--mdif4-sys-typescale-title-small-font, var(--mdif4-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--mdif4-secondary-tab-label-text-line-height, var(--mdif4-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--mdif4-secondary-tab-label-text-size, var(--mdif4-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--mdif4-secondary-tab-label-text-weight, var(--mdif4-sys-typescale-title-small-weight, var(--mdif4-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--mdif4-secondary-tab-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--mdif4-secondary-tab-pressed-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--mdif4-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--mdif4-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--mdif4-secondary-tab-active-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--mdif4-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--mdif4-secondary-tab-active-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--mdif4-secondary-tab-active-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--mdif4-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--mdif4-secondary-tab-active-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--mdif4-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--mdif4-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--mdif4-secondary-tab-active-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--mdif4-secondary-tab-active-pressed-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--mdif4-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--mdif4-secondary-tab-label-text-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--mdif4-secondary-tab-focus-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--mdif4-secondary-tab-hover-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_icon-size: var(--mdif4-secondary-tab-icon-size, 24px);--_icon-color: var(--mdif4-secondary-tab-icon-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--mdif4-secondary-tab-pressed-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--mdif4-secondary-tab-container-shape-start-start, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--mdif4-secondary-tab-container-shape-start-end, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--mdif4-secondary-tab-container-shape-end-end, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--mdif4-secondary-tab-container-shape-end-start, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)))}
1641
+ `;
1642
+ /**
1643
+ * @license
1644
+ * Copyright 2023 Google LLC
1645
+ * SPDX-License-Identifier: Apache-2.0
1646
+ */
1647
+ let ft = class extends ii {
1648
+ };
1649
+ ft.styles = [te, ri];
1650
+ ft = h([
1651
+ S("mdif4-secondary-tab")
1652
+ ], ft);
1653
+ var si = Object.defineProperty, W = (s, t, e, i) => {
1654
+ for (var r = void 0, o = s.length - 1, a; o >= 0; o--)
1655
+ (a = s[o]) && (r = a(t, e, r) || r);
1656
+ return r && si(t, e, r), r;
1657
+ };
1658
+ const xt = class xt extends g {
1659
+ constructor() {
1660
+ super(...arguments), this.version = "1.0.2";
1661
+ }
1662
+ update(t) {
1663
+ t.has("theme") && this.registerTheme(this.theme), super.update(t);
1664
+ }
1665
+ firstUpdated(t) {
1666
+ this.registerTheme(this.theme);
1667
+ }
1668
+ registerTheme(t) {
1669
+ const e = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), i = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
1670
+ this.themeBgColor = i || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = e || this.theme?.theme_object?.title?.textStyle?.color;
1671
+ }
1672
+ handleNavItemClick(t) {
1673
+ const e = new CustomEvent("nav-submit", {
1674
+ detail: { path: t },
1675
+ bubbles: !0,
1676
+ composed: !0
1677
+ });
1678
+ this.dispatchEvent(e);
1679
+ }
1680
+ normalizeRoute(t) {
1681
+ return t || "/";
1682
+ }
1683
+ trimRoute(t) {
1684
+ return t ? "/" + t.split("/").filter(Boolean).join("/") : "";
1685
+ }
1686
+ matchesRoute(t) {
1687
+ if (t === void 0) return !1;
1688
+ const e = this.trimRoute(decodeURIComponent(this.route || "/")), i = this.trimRoute(t);
1689
+ return t.startsWith("/") ? e.startsWith(i) : e.endsWith("/" + i) || e === i;
1690
+ }
1691
+ render() {
1692
+ const t = this.inputData?.style?.fontSize ?? 16, e = (this.inputData?.style?.fontSize ?? 16) * 1.5, i = this.inputData?.style?.color || this.themeTitleColor || "black", r = this.inputData?.style?.backgroundColor || this.themeBgColor || "white";
1693
+ return A`
1694
+ <div
1695
+ class="wrapper"
1696
+ style="background-color: ${r}; color: ${i};
1697
+ font-weight: ${this.inputData?.style?.fontWeight};
1698
+ font-size: ${t}px;"
1699
+ >
1700
+ <h2
1701
+ class="paging"
1702
+ style=${this.inputData?.route ? "cursor: pointer" : ""}
1703
+ ?active=${this.inputData?.title}
1704
+ @click=${() => this.handleNavItemClick(this.inputData?.route)}
1705
+ >
1706
+ ${this.inputData?.title}
1707
+ </h2>
1708
+ <mdif4-tab class="xnav-list">
1709
+ ${Re(
1710
+ this.inputData?.navItems || [],
1711
+ (o) => o.label,
1712
+ (o) => A`
1713
+ <mdif4-secondary-tab
1714
+ ?active=${this.matchesRoute(o.route)}
1715
+ style="font-size: ${t}px;
1716
+ --mdif4-secondary-tab-container-color: ${r};
1717
+ color: ${i};"
1718
+ @click=${() => this.handleNavItemClick(o.route)}
1719
+ >
1720
+ ${o.iconName ? A`
1721
+ <mdif4-icon
1722
+ slot="icon"
1723
+ style="font-size: ${e}px;width: ${e}px;color: ${i}"
1724
+ >
1725
+ ${o.iconName}
1726
+ </mdif4-icon>
1727
+ ` : v}
1728
+ ${o.label}
1729
+ </mdif4-secondary-tab>
1730
+ `
1731
+ )}
1732
+ </mdif4-tab>
1733
+ </div>
1734
+ `;
1735
+ }
1736
+ };
1737
+ xt.styles = $`
1738
+ :host {
1739
+ display: block;
1740
+ font-family: sans-serif;
1741
+ box-sizing: border-box;
1742
+ margin: auto;
1743
+ }
1744
+
1745
+ .paging:not([active]) {
1746
+ display: none !important;
1747
+ }
1748
+
1749
+ .wrapper {
1750
+ display: flex;
1751
+ align-items: end;
1752
+ height: 100%;
1753
+ width: 100%;
1754
+ box-sizing: border-box;
1755
+ }
1756
+
1757
+ mdif4-icon {
1758
+ font-family: 'Material Symbols Outlined';
1759
+ }
1760
+
1761
+ .selected {
1762
+ font-weight: bold;
1763
+ background-color: rgba(0, 0, 0, 0.1);
1764
+ }
1765
+
1766
+ h2 {
1767
+ margin: 0;
1768
+ padding: 0px;
1769
+ font-size: 1.2em;
1770
+ }
1771
+ `;
1772
+ let E = xt;
1773
+ W([
1774
+ m({ type: Object })
1775
+ ], E.prototype, "inputData");
1776
+ W([
1777
+ m({ type: Object })
1778
+ ], E.prototype, "theme");
1779
+ W([
1780
+ m({ type: String })
1781
+ ], E.prototype, "route");
1782
+ W([
1783
+ F()
1784
+ ], E.prototype, "themeBgColor");
1785
+ W([
1786
+ F()
1787
+ ], E.prototype, "themeTitleColor");
1788
+ window.customElements.define("widget-navbar-1.0.2", E);
1789
+ export {
1790
+ E as WidgetNavbar
1791
+ };
1792
+ //# sourceMappingURL=widget-navbar.js.map