@record-evolution/widget-sidenav 1.0.1

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,1040 @@
1
+ /* @license Copyright (c) 2025 IronFlock GmbH. All rights reserved.*/
2
+ /******************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */
16
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
17
+
18
+ function __decorate(decorators, target, key, desc) {
19
+ var c = arguments.length,
20
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
21
+ d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
23
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
24
+ }
25
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
26
+ var e = new Error(message);
27
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
28
+ };
29
+
30
+ /**
31
+ * @license
32
+ * Copyright 2019 Google LLC
33
+ * SPDX-License-Identifier: BSD-3-Clause
34
+ */
35
+ const t$3 = globalThis,
36
+ e$3 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
37
+ s$3 = Symbol(),
38
+ o$4 = new WeakMap();
39
+ let n$3 = class n {
40
+ constructor(t, e, o) {
41
+ if (this._$cssResult$ = true, o !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
42
+ this.cssText = t, this.t = e;
43
+ }
44
+ get styleSheet() {
45
+ let t = this.o;
46
+ const s = this.t;
47
+ if (e$3 && void 0 === t) {
48
+ const e = void 0 !== s && 1 === s.length;
49
+ e && (t = o$4.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$4.set(s, t));
50
+ }
51
+ return t;
52
+ }
53
+ toString() {
54
+ return this.cssText;
55
+ }
56
+ };
57
+ const r$5 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$3),
58
+ i$4 = (t, ...e) => {
59
+ const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
60
+ if (true === t._$cssResult$) return t.cssText;
61
+ if ("number" == typeof t) return t;
62
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
63
+ })(s) + t[o + 1], t[0]);
64
+ return new n$3(o, t, s$3);
65
+ },
66
+ S$1 = (s, o) => {
67
+ if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
68
+ const o = document.createElement("style"),
69
+ n = t$3.litNonce;
70
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
71
+ }
72
+ },
73
+ c$3 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
74
+ let e = "";
75
+ for (const s of t.cssRules) e += s.cssText;
76
+ return r$5(e);
77
+ })(t) : t;
78
+
79
+ /**
80
+ * @license
81
+ * Copyright 2017 Google LLC
82
+ * SPDX-License-Identifier: BSD-3-Clause
83
+ */
84
+ const {
85
+ is: i$3,
86
+ defineProperty: e$2,
87
+ getOwnPropertyDescriptor: h$1,
88
+ getOwnPropertyNames: r$4,
89
+ getOwnPropertySymbols: o$3,
90
+ getPrototypeOf: n$2
91
+ } = Object,
92
+ a$1 = globalThis,
93
+ c$2 = a$1.trustedTypes,
94
+ l$1 = c$2 ? c$2.emptyScript : "",
95
+ p$2 = a$1.reactiveElementPolyfillSupport,
96
+ d$1 = (t, s) => t,
97
+ u$3 = {
98
+ toAttribute(t, s) {
99
+ switch (s) {
100
+ case Boolean:
101
+ t = t ? l$1 : null;
102
+ break;
103
+ case Object:
104
+ case Array:
105
+ t = null == t ? t : JSON.stringify(t);
106
+ }
107
+ return t;
108
+ },
109
+ fromAttribute(t, s) {
110
+ let i = t;
111
+ switch (s) {
112
+ case Boolean:
113
+ i = null !== t;
114
+ break;
115
+ case Number:
116
+ i = null === t ? null : Number(t);
117
+ break;
118
+ case Object:
119
+ case Array:
120
+ try {
121
+ i = JSON.parse(t);
122
+ } catch (t) {
123
+ i = null;
124
+ }
125
+ }
126
+ return i;
127
+ }
128
+ },
129
+ f$1 = (t, s) => !i$3(t, s),
130
+ b = {
131
+ attribute: true,
132
+ type: String,
133
+ converter: u$3,
134
+ reflect: false,
135
+ useDefault: false,
136
+ hasChanged: f$1
137
+ };
138
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
139
+ let y$1 = class y extends HTMLElement {
140
+ static addInitializer(t) {
141
+ this._$Ei(), (this.l ??= []).push(t);
142
+ }
143
+ static get observedAttributes() {
144
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
145
+ }
146
+ static createProperty(t, s = b) {
147
+ if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
148
+ const i = Symbol(),
149
+ h = this.getPropertyDescriptor(t, i, s);
150
+ void 0 !== h && e$2(this.prototype, t, h);
151
+ }
152
+ }
153
+ static getPropertyDescriptor(t, s, i) {
154
+ const {
155
+ get: e,
156
+ set: r
157
+ } = h$1(this.prototype, t) ?? {
158
+ get() {
159
+ return this[s];
160
+ },
161
+ set(t) {
162
+ this[s] = t;
163
+ }
164
+ };
165
+ return {
166
+ get: e,
167
+ set(s) {
168
+ const h = e?.call(this);
169
+ r?.call(this, s), this.requestUpdate(t, h, i);
170
+ },
171
+ configurable: true,
172
+ enumerable: true
173
+ };
174
+ }
175
+ static getPropertyOptions(t) {
176
+ return this.elementProperties.get(t) ?? b;
177
+ }
178
+ static _$Ei() {
179
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
180
+ const t = n$2(this);
181
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
182
+ }
183
+ static finalize() {
184
+ if (this.hasOwnProperty(d$1("finalized"))) return;
185
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
186
+ const t = this.properties,
187
+ s = [...r$4(t), ...o$3(t)];
188
+ for (const i of s) this.createProperty(i, t[i]);
189
+ }
190
+ const t = this[Symbol.metadata];
191
+ if (null !== t) {
192
+ const s = litPropertyMetadata.get(t);
193
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
194
+ }
195
+ this._$Eh = new Map();
196
+ for (const [t, s] of this.elementProperties) {
197
+ const i = this._$Eu(t, s);
198
+ void 0 !== i && this._$Eh.set(i, t);
199
+ }
200
+ this.elementStyles = this.finalizeStyles(this.styles);
201
+ }
202
+ static finalizeStyles(s) {
203
+ const i = [];
204
+ if (Array.isArray(s)) {
205
+ const e = new Set(s.flat(1 / 0).reverse());
206
+ for (const s of e) i.unshift(c$3(s));
207
+ } else void 0 !== s && i.push(c$3(s));
208
+ return i;
209
+ }
210
+ static _$Eu(t, s) {
211
+ const i = s.attribute;
212
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
213
+ }
214
+ constructor() {
215
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
216
+ }
217
+ _$Ev() {
218
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
219
+ }
220
+ addController(t) {
221
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
222
+ }
223
+ removeController(t) {
224
+ this._$EO?.delete(t);
225
+ }
226
+ _$E_() {
227
+ const t = new Map(),
228
+ s = this.constructor.elementProperties;
229
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
230
+ t.size > 0 && (this._$Ep = t);
231
+ }
232
+ createRenderRoot() {
233
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
234
+ return S$1(t, this.constructor.elementStyles), t;
235
+ }
236
+ connectedCallback() {
237
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
238
+ }
239
+ enableUpdating(t) {}
240
+ disconnectedCallback() {
241
+ this._$EO?.forEach(t => t.hostDisconnected?.());
242
+ }
243
+ attributeChangedCallback(t, s, i) {
244
+ this._$AK(t, i);
245
+ }
246
+ _$ET(t, s) {
247
+ const i = this.constructor.elementProperties.get(t),
248
+ e = this.constructor._$Eu(t, i);
249
+ if (void 0 !== e && true === i.reflect) {
250
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$3).toAttribute(s, i.type);
251
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
252
+ }
253
+ }
254
+ _$AK(t, s) {
255
+ const i = this.constructor,
256
+ e = i._$Eh.get(t);
257
+ if (void 0 !== e && this._$Em !== e) {
258
+ const t = i.getPropertyOptions(e),
259
+ h = "function" == typeof t.converter ? {
260
+ fromAttribute: t.converter
261
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$3;
262
+ this._$Em = e;
263
+ const r = h.fromAttribute(s, t.type);
264
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
265
+ }
266
+ }
267
+ requestUpdate(t, s, i) {
268
+ if (void 0 !== t) {
269
+ const e = this.constructor,
270
+ h = this[t];
271
+ if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
272
+ this.C(t, s, i);
273
+ }
274
+ false === this.isUpdatePending && (this._$ES = this._$EP());
275
+ }
276
+ C(t, s, {
277
+ useDefault: i,
278
+ reflect: e,
279
+ wrapped: h
280
+ }, r) {
281
+ i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
282
+ }
283
+ async _$EP() {
284
+ this.isUpdatePending = true;
285
+ try {
286
+ await this._$ES;
287
+ } catch (t) {
288
+ Promise.reject(t);
289
+ }
290
+ const t = this.scheduleUpdate();
291
+ return null != t && (await t), !this.isUpdatePending;
292
+ }
293
+ scheduleUpdate() {
294
+ return this.performUpdate();
295
+ }
296
+ performUpdate() {
297
+ if (!this.isUpdatePending) return;
298
+ if (!this.hasUpdated) {
299
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
300
+ for (const [t, s] of this._$Ep) this[t] = s;
301
+ this._$Ep = void 0;
302
+ }
303
+ const t = this.constructor.elementProperties;
304
+ if (t.size > 0) for (const [s, i] of t) {
305
+ const {
306
+ wrapped: t
307
+ } = i,
308
+ e = this[s];
309
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
310
+ }
311
+ }
312
+ let t = false;
313
+ const s = this._$AL;
314
+ try {
315
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
316
+ } catch (s) {
317
+ throw t = false, this._$EM(), s;
318
+ }
319
+ t && this._$AE(s);
320
+ }
321
+ willUpdate(t) {}
322
+ _$AE(t) {
323
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
324
+ }
325
+ _$EM() {
326
+ this._$AL = new Map(), this.isUpdatePending = false;
327
+ }
328
+ get updateComplete() {
329
+ return this.getUpdateComplete();
330
+ }
331
+ getUpdateComplete() {
332
+ return this._$ES;
333
+ }
334
+ shouldUpdate(t) {
335
+ return true;
336
+ }
337
+ update(t) {
338
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
339
+ }
340
+ updated(t) {}
341
+ firstUpdated(t) {}
342
+ };
343
+ y$1.elementStyles = [], y$1.shadowRootOptions = {
344
+ mode: "open"
345
+ }, y$1[d$1("elementProperties")] = new Map(), y$1[d$1("finalized")] = new Map(), p$2?.({
346
+ ReactiveElement: y$1
347
+ }), (a$1.reactiveElementVersions ??= []).push("2.1.1");
348
+
349
+ /**
350
+ * @license
351
+ * Copyright 2017 Google LLC
352
+ * SPDX-License-Identifier: BSD-3-Clause
353
+ */
354
+ const t$2 = globalThis,
355
+ i$2 = t$2.trustedTypes,
356
+ s$2 = i$2 ? i$2.createPolicy("lit-html", {
357
+ createHTML: t => t
358
+ }) : void 0,
359
+ e$1 = "$lit$",
360
+ h = `lit$${Math.random().toFixed(9).slice(2)}$`,
361
+ o$2 = "?" + h,
362
+ n$1 = `<${o$2}>`,
363
+ r$3 = document,
364
+ l = () => r$3.createComment(""),
365
+ c$1 = t => null === t || "object" != typeof t && "function" != typeof t,
366
+ a = Array.isArray,
367
+ u$2 = t => a(t) || "function" == typeof t?.[Symbol.iterator],
368
+ d = "[ \t\n\f\r]",
369
+ f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
370
+ v$1 = /-->/g,
371
+ _ = />/g,
372
+ m$1 = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
373
+ p$1 = /'/g,
374
+ g = /"/g,
375
+ $ = /^(?:script|style|textarea|title)$/i,
376
+ y = t => (i, ...s) => ({
377
+ _$litType$: t,
378
+ strings: i,
379
+ values: s
380
+ }),
381
+ x = y(1),
382
+ T = Symbol.for("lit-noChange"),
383
+ E = Symbol.for("lit-nothing"),
384
+ A = new WeakMap(),
385
+ C = r$3.createTreeWalker(r$3, 129);
386
+ function P(t, i) {
387
+ if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
388
+ return void 0 !== s$2 ? s$2.createHTML(i) : i;
389
+ }
390
+ const V = (t, i) => {
391
+ const s = t.length - 1,
392
+ o = [];
393
+ let r,
394
+ l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "",
395
+ c = f;
396
+ for (let i = 0; i < s; i++) {
397
+ const s = t[i];
398
+ let a,
399
+ u,
400
+ d = -1,
401
+ y = 0;
402
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v$1 : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m$1) : void 0 !== u[3] && (c = m$1) : c === m$1 ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m$1 : '"' === u[3] ? g : p$1) : c === g || c === p$1 ? c = m$1 : c === v$1 || c === _ ? c = f : (c = m$1, r = void 0);
403
+ const x = c === m$1 && t[i + 1].startsWith("/>") ? " " : "";
404
+ l += c === f ? s + n$1 : d >= 0 ? (o.push(a), s.slice(0, d) + e$1 + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
405
+ }
406
+ return [P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), o];
407
+ };
408
+ class N {
409
+ constructor({
410
+ strings: t,
411
+ _$litType$: s
412
+ }, n) {
413
+ let r;
414
+ this.parts = [];
415
+ let c = 0,
416
+ a = 0;
417
+ const u = t.length - 1,
418
+ d = this.parts,
419
+ [f, v] = V(t, s);
420
+ if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
421
+ const t = this.el.content.firstChild;
422
+ t.replaceWith(...t.childNodes);
423
+ }
424
+ for (; null !== (r = C.nextNode()) && d.length < u;) {
425
+ if (1 === r.nodeType) {
426
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e$1)) {
427
+ const i = v[a++],
428
+ s = r.getAttribute(t).split(h),
429
+ e = /([.?@])?(.*)/.exec(i);
430
+ d.push({
431
+ type: 1,
432
+ index: c,
433
+ name: e[2],
434
+ strings: s,
435
+ ctor: "." === e[1] ? H : "?" === e[1] ? I : "@" === e[1] ? L : k
436
+ }), r.removeAttribute(t);
437
+ } else t.startsWith(h) && (d.push({
438
+ type: 6,
439
+ index: c
440
+ }), r.removeAttribute(t));
441
+ if ($.test(r.tagName)) {
442
+ const t = r.textContent.split(h),
443
+ s = t.length - 1;
444
+ if (s > 0) {
445
+ r.textContent = i$2 ? i$2.emptyScript : "";
446
+ for (let i = 0; i < s; i++) r.append(t[i], l()), C.nextNode(), d.push({
447
+ type: 2,
448
+ index: ++c
449
+ });
450
+ r.append(t[s], l());
451
+ }
452
+ }
453
+ } else if (8 === r.nodeType) if (r.data === o$2) d.push({
454
+ type: 2,
455
+ index: c
456
+ });else {
457
+ let t = -1;
458
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
459
+ type: 7,
460
+ index: c
461
+ }), t += h.length - 1;
462
+ }
463
+ c++;
464
+ }
465
+ }
466
+ static createElement(t, i) {
467
+ const s = r$3.createElement("template");
468
+ return s.innerHTML = t, s;
469
+ }
470
+ }
471
+ function S(t, i, s = t, e) {
472
+ if (i === T) return i;
473
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
474
+ const o = c$1(i) ? void 0 : i._$litDirective$;
475
+ return h?.constructor !== o && (h?._$AO?.(false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
476
+ }
477
+ let M$1 = class M {
478
+ constructor(t, i) {
479
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
480
+ }
481
+ get parentNode() {
482
+ return this._$AM.parentNode;
483
+ }
484
+ get _$AU() {
485
+ return this._$AM._$AU;
486
+ }
487
+ u(t) {
488
+ const {
489
+ el: {
490
+ content: i
491
+ },
492
+ parts: s
493
+ } = this._$AD,
494
+ e = (t?.creationScope ?? r$3).importNode(i, true);
495
+ C.currentNode = e;
496
+ let h = C.nextNode(),
497
+ o = 0,
498
+ n = 0,
499
+ l = s[0];
500
+ for (; void 0 !== l;) {
501
+ if (o === l.index) {
502
+ let i;
503
+ 2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z(h, this, t)), this._$AV.push(i), l = s[++n];
504
+ }
505
+ o !== l?.index && (h = C.nextNode(), o++);
506
+ }
507
+ return C.currentNode = r$3, e;
508
+ }
509
+ p(t) {
510
+ let i = 0;
511
+ for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
512
+ }
513
+ };
514
+ class R {
515
+ get _$AU() {
516
+ return this._$AM?._$AU ?? this._$Cv;
517
+ }
518
+ constructor(t, i, s, e) {
519
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? true;
520
+ }
521
+ get parentNode() {
522
+ let t = this._$AA.parentNode;
523
+ const i = this._$AM;
524
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
525
+ }
526
+ get startNode() {
527
+ return this._$AA;
528
+ }
529
+ get endNode() {
530
+ return this._$AB;
531
+ }
532
+ _$AI(t, i = this) {
533
+ t = S(this, t, i), c$1(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u$2(t) ? this.k(t) : this._(t);
534
+ }
535
+ O(t) {
536
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
537
+ }
538
+ T(t) {
539
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
540
+ }
541
+ _(t) {
542
+ this._$AH !== E && c$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$3.createTextNode(t)), this._$AH = t;
543
+ }
544
+ $(t) {
545
+ const {
546
+ values: i,
547
+ _$litType$: s
548
+ } = t,
549
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
550
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
551
+ const t = new M$1(e, this),
552
+ s = t.u(this.options);
553
+ t.p(i), this.T(s), this._$AH = t;
554
+ }
555
+ }
556
+ _$AC(t) {
557
+ let i = A.get(t.strings);
558
+ return void 0 === i && A.set(t.strings, i = new N(t)), i;
559
+ }
560
+ k(t) {
561
+ a(this._$AH) || (this._$AH = [], this._$AR());
562
+ const i = this._$AH;
563
+ let s,
564
+ e = 0;
565
+ for (const h of t) e === i.length ? i.push(s = new R(this.O(l()), this.O(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
566
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
567
+ }
568
+ _$AR(t = this._$AA.nextSibling, i) {
569
+ for (this._$AP?.(false, true, i); t !== this._$AB;) {
570
+ const i = t.nextSibling;
571
+ t.remove(), t = i;
572
+ }
573
+ }
574
+ setConnected(t) {
575
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
576
+ }
577
+ }
578
+ class k {
579
+ get tagName() {
580
+ return this.element.tagName;
581
+ }
582
+ get _$AU() {
583
+ return this._$AM._$AU;
584
+ }
585
+ constructor(t, i, s, e, h) {
586
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = E;
587
+ }
588
+ _$AI(t, i = this, s, e) {
589
+ const h = this.strings;
590
+ let o = false;
591
+ if (void 0 === h) t = S(this, t, i, 0), o = !c$1(t) || t !== this._$AH && t !== T, o && (this._$AH = t);else {
592
+ const e = t;
593
+ let n, r;
594
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = S(this, e[s + n], i, n), r === T && (r = this._$AH[n]), o ||= !c$1(r) || r !== this._$AH[n], r === E ? t = E : t !== E && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
595
+ }
596
+ o && !e && this.j(t);
597
+ }
598
+ j(t) {
599
+ t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
600
+ }
601
+ }
602
+ class H extends k {
603
+ constructor() {
604
+ super(...arguments), this.type = 3;
605
+ }
606
+ j(t) {
607
+ this.element[this.name] = t === E ? void 0 : t;
608
+ }
609
+ }
610
+ class I extends k {
611
+ constructor() {
612
+ super(...arguments), this.type = 4;
613
+ }
614
+ j(t) {
615
+ this.element.toggleAttribute(this.name, !!t && t !== E);
616
+ }
617
+ }
618
+ class L extends k {
619
+ constructor(t, i, s, e, h) {
620
+ super(t, i, s, e, h), this.type = 5;
621
+ }
622
+ _$AI(t, i = this) {
623
+ if ((t = S(this, t, i, 0) ?? E) === T) return;
624
+ const s = this._$AH,
625
+ e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
626
+ h = t !== E && (s === E || e);
627
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
628
+ }
629
+ handleEvent(t) {
630
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
631
+ }
632
+ }
633
+ class z {
634
+ constructor(t, i, s) {
635
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
636
+ }
637
+ get _$AU() {
638
+ return this._$AM._$AU;
639
+ }
640
+ _$AI(t) {
641
+ S(this, t);
642
+ }
643
+ }
644
+ const Z = {
645
+ I: R},
646
+ j = t$2.litHtmlPolyfillSupport;
647
+ j?.(N, R), (t$2.litHtmlVersions ??= []).push("3.3.1");
648
+ const B = (t, i, s) => {
649
+ const e = s?.renderBefore ?? i;
650
+ let h = e._$litPart$;
651
+ if (void 0 === h) {
652
+ const t = s?.renderBefore ?? null;
653
+ e._$litPart$ = h = new R(i.insertBefore(l(), t), t, void 0, s ?? {});
654
+ }
655
+ return h._$AI(t), h;
656
+ };
657
+
658
+ /**
659
+ * @license
660
+ * Copyright 2017 Google LLC
661
+ * SPDX-License-Identifier: BSD-3-Clause
662
+ */
663
+ const s$1 = globalThis;
664
+ let i$1 = class i extends y$1 {
665
+ constructor() {
666
+ super(...arguments), this.renderOptions = {
667
+ host: this
668
+ }, this._$Do = void 0;
669
+ }
670
+ createRenderRoot() {
671
+ const t = super.createRenderRoot();
672
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
673
+ }
674
+ update(t) {
675
+ const r = this.render();
676
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(r, this.renderRoot, this.renderOptions);
677
+ }
678
+ connectedCallback() {
679
+ super.connectedCallback(), this._$Do?.setConnected(true);
680
+ }
681
+ disconnectedCallback() {
682
+ super.disconnectedCallback(), this._$Do?.setConnected(false);
683
+ }
684
+ render() {
685
+ return T;
686
+ }
687
+ };
688
+ i$1._$litElement$ = true, i$1["finalized"] = true, s$1.litElementHydrateSupport?.({
689
+ LitElement: i$1
690
+ });
691
+ const o$1 = s$1.litElementPolyfillSupport;
692
+ o$1?.({
693
+ LitElement: i$1
694
+ });
695
+ (s$1.litElementVersions ??= []).push("4.2.1");
696
+
697
+ /**
698
+ * @license
699
+ * Copyright 2017 Google LLC
700
+ * SPDX-License-Identifier: BSD-3-Clause
701
+ */
702
+ const o = {
703
+ attribute: true,
704
+ type: String,
705
+ converter: u$3,
706
+ reflect: false,
707
+ hasChanged: f$1
708
+ },
709
+ r$2 = (t = o, e, r) => {
710
+ const {
711
+ kind: n,
712
+ metadata: i
713
+ } = r;
714
+ let s = globalThis.litPropertyMetadata.get(i);
715
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = true), s.set(r.name, t), "accessor" === n) {
716
+ const {
717
+ name: o
718
+ } = r;
719
+ return {
720
+ set(r) {
721
+ const n = e.get.call(this);
722
+ e.set.call(this, r), this.requestUpdate(o, n, t);
723
+ },
724
+ init(e) {
725
+ return void 0 !== e && this.C(o, void 0, t, e), e;
726
+ }
727
+ };
728
+ }
729
+ if ("setter" === n) {
730
+ const {
731
+ name: o
732
+ } = r;
733
+ return function (r) {
734
+ const n = this[o];
735
+ e.call(this, r), this.requestUpdate(o, n, t);
736
+ };
737
+ }
738
+ throw Error("Unsupported decorator location: " + n);
739
+ };
740
+ function n(t) {
741
+ return (e, o) => "object" == typeof o ? r$2(t, e, o) : ((t, e, o) => {
742
+ const r = e.hasOwnProperty(o);
743
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
744
+ })(t, e, o);
745
+ }
746
+
747
+ /**
748
+ * @license
749
+ * Copyright 2017 Google LLC
750
+ * SPDX-License-Identifier: BSD-3-Clause
751
+ */
752
+ function r$1(r) {
753
+ return n({
754
+ ...r,
755
+ state: true,
756
+ attribute: false
757
+ });
758
+ }
759
+
760
+ /**
761
+ * @license
762
+ * Copyright 2017 Google LLC
763
+ * SPDX-License-Identifier: BSD-3-Clause
764
+ */
765
+ const t$1 = {
766
+ CHILD: 2},
767
+ e = t => (...e) => ({
768
+ _$litDirective$: t,
769
+ values: e
770
+ });
771
+ class i {
772
+ constructor(t) {}
773
+ get _$AU() {
774
+ return this._$AM._$AU;
775
+ }
776
+ _$AT(t, e, i) {
777
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
778
+ }
779
+ _$AS(t, e) {
780
+ return this.update(t, e);
781
+ }
782
+ update(t, e) {
783
+ return this.render(...e);
784
+ }
785
+ }
786
+
787
+ /**
788
+ * @license
789
+ * Copyright 2020 Google LLC
790
+ * SPDX-License-Identifier: BSD-3-Clause
791
+ */
792
+ const {
793
+ I: t
794
+ } = Z,
795
+ r = () => document.createComment(""),
796
+ s = (o, i, n) => {
797
+ const e = o._$AA.parentNode,
798
+ l = void 0 === i ? o._$AB : i._$AA;
799
+ if (void 0 === n) {
800
+ const i = e.insertBefore(r(), l),
801
+ d = e.insertBefore(r(), l);
802
+ n = new t(i, d, o, o.options);
803
+ } else {
804
+ const t = n._$AB.nextSibling,
805
+ i = n._$AM,
806
+ d = i !== o;
807
+ if (d) {
808
+ let t;
809
+ n._$AQ?.(o), n._$AM = o, void 0 !== n._$AP && (t = o._$AU) !== i._$AU && n._$AP(t);
810
+ }
811
+ if (t !== l || d) {
812
+ let o = n._$AA;
813
+ for (; o !== t;) {
814
+ const t = o.nextSibling;
815
+ e.insertBefore(o, l), o = t;
816
+ }
817
+ }
818
+ }
819
+ return n;
820
+ },
821
+ v = (o, t, i = o) => (o._$AI(t, i), o),
822
+ u$1 = {},
823
+ m = (o, t = u$1) => o._$AH = t,
824
+ p = o => o._$AH,
825
+ M = o => {
826
+ o._$AR(), o._$AA.remove();
827
+ };
828
+
829
+ /**
830
+ * @license
831
+ * Copyright 2017 Google LLC
832
+ * SPDX-License-Identifier: BSD-3-Clause
833
+ */
834
+ const u = (e, s, t) => {
835
+ const r = new Map();
836
+ for (let l = s; l <= t; l++) r.set(e[l], l);
837
+ return r;
838
+ },
839
+ c = e(class extends i {
840
+ constructor(e) {
841
+ if (super(e), e.type !== t$1.CHILD) throw Error("repeat() can only be used in text expressions");
842
+ }
843
+ dt(e, s, t) {
844
+ let r;
845
+ void 0 === t ? t = s : void 0 !== s && (r = s);
846
+ const l = [],
847
+ o = [];
848
+ let i = 0;
849
+ for (const s of e) l[i] = r ? r(s, i) : i, o[i] = t(s, i), i++;
850
+ return {
851
+ values: o,
852
+ keys: l
853
+ };
854
+ }
855
+ render(e, s, t) {
856
+ return this.dt(e, s, t).values;
857
+ }
858
+ update(s$1, [t, r, c]) {
859
+ const d = p(s$1),
860
+ {
861
+ values: p$1,
862
+ keys: a
863
+ } = this.dt(t, r, c);
864
+ if (!Array.isArray(d)) return this.ut = a, p$1;
865
+ const h = this.ut ??= [],
866
+ v$1 = [];
867
+ let m$1,
868
+ y,
869
+ x = 0,
870
+ j = d.length - 1,
871
+ k = 0,
872
+ w = p$1.length - 1;
873
+ for (; x <= j && k <= w;) if (null === d[x]) x++;else if (null === d[j]) j--;else if (h[x] === a[k]) v$1[k] = v(d[x], p$1[k]), x++, k++;else if (h[j] === a[w]) v$1[w] = v(d[j], p$1[w]), j--, w--;else if (h[x] === a[w]) v$1[w] = v(d[x], p$1[w]), s(s$1, v$1[w + 1], d[x]), x++, w--;else if (h[j] === a[k]) v$1[k] = v(d[j], p$1[k]), s(s$1, d[x], d[j]), j--, k++;else if (void 0 === m$1 && (m$1 = u(a, k, w), y = u(h, x, j)), m$1.has(h[x])) {
874
+ if (m$1.has(h[j])) {
875
+ const e = y.get(a[k]),
876
+ t = void 0 !== e ? d[e] : null;
877
+ if (null === t) {
878
+ const e = s(s$1, d[x]);
879
+ v(e, p$1[k]), v$1[k] = e;
880
+ } else v$1[k] = v(t, p$1[k]), s(s$1, d[x], t), d[e] = null;
881
+ k++;
882
+ } else M(d[j]), j--;
883
+ } else M(d[x]), x++;
884
+ for (; k <= w;) {
885
+ const e = s(s$1, v$1[w + 1]);
886
+ v(e, p$1[k]), v$1[k++] = e;
887
+ }
888
+ for (; x <= j;) {
889
+ const e = d[x++];
890
+ null !== e && M(e);
891
+ }
892
+ return this.ut = a, m(s$1, v$1), T;
893
+ }
894
+ });
895
+
896
+ class WidgetTextbox extends i$1 {
897
+ constructor() {
898
+ super(...arguments);
899
+ this.version = '1.0.1';
900
+ }
901
+ update(changedProperties) {
902
+ if (changedProperties.has('theme')) {
903
+ this.registerTheme(this.theme);
904
+ }
905
+ super.update(changedProperties);
906
+ }
907
+ firstUpdated(_changedProperties) {
908
+ this.registerTheme(this.theme);
909
+ }
910
+ registerTheme(theme) {
911
+ var _a, _b, _c, _d, _e, _f;
912
+ const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim();
913
+ const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim();
914
+ this.themeBgColor = cssBgColor || ((_b = (_a = this.theme) === null || _a === void 0 ? void 0 : _a.theme_object) === null || _b === void 0 ? void 0 : _b.backgroundColor);
915
+ this.themeTitleColor = cssTextColor || ((_f = (_e = (_d = (_c = this.theme) === null || _c === void 0 ? void 0 : _c.theme_object) === null || _d === void 0 ? void 0 : _d.title) === null || _e === void 0 ? void 0 : _e.textStyle) === null || _f === void 0 ? void 0 : _f.color);
916
+ }
917
+ handleNavItemClick(item) {
918
+ console.log('Navigating to:', item.route);
919
+ const event = new CustomEvent('nav-submit', {
920
+ detail: { path: item.route },
921
+ bubbles: true,
922
+ composed: true
923
+ });
924
+ this.dispatchEvent(event);
925
+ }
926
+ normalizeRoute(route) {
927
+ if (!route)
928
+ return '/';
929
+ return route;
930
+ }
931
+ render() {
932
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
933
+ const fontSize = (_c = (_b = (_a = this.inputData) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fontSize) !== null && _c !== void 0 ? _c : 16;
934
+ const iconFontSize = (_f = (_e = (_d = this.inputData) === null || _d === void 0 ? void 0 : _d.style) === null || _e === void 0 ? void 0 : _e.fontSize) !== null && _f !== void 0 ? _f : 16 * 1.5;
935
+ const gap = fontSize * 0.4;
936
+ const lastRouteSegment = decodeURIComponent(((_g = this.route) === null || _g === void 0 ? void 0 : _g.split('/').pop()) || '');
937
+ return x `
938
+ <div
939
+ class="wrapper"
940
+ style="background-color: ${((_j = (_h = this.inputData) === null || _h === void 0 ? void 0 : _h.style) === null || _j === void 0 ? void 0 : _j.backgroundColor) ||
941
+ this.themeBgColor}; color: ${((_l = (_k = this.inputData) === null || _k === void 0 ? void 0 : _k.style) === null || _l === void 0 ? void 0 : _l.color) || this.themeTitleColor};
942
+ font-weight: ${(_o = (_m = this.inputData) === null || _m === void 0 ? void 0 : _m.style) === null || _o === void 0 ? void 0 : _o.fontWeight};
943
+ font-size: ${fontSize}px;"
944
+ >
945
+ <h2 class="paging" ?active=${(_p = this.inputData) === null || _p === void 0 ? void 0 : _p.title}>${(_q = this.inputData) === null || _q === void 0 ? void 0 : _q.title}</h2>
946
+ <div class="nav-list">
947
+ ${c(((_r = this.inputData) === null || _r === void 0 ? void 0 : _r.navItems) || [], (item) => item.label, (item) => x `
948
+ <div
949
+ class="nav-item ${lastRouteSegment === item.route ? 'selected' : ''}"
950
+ style="gap: ${gap}px;"
951
+ @click=${() => this.handleNavItemClick(item)}
952
+ >
953
+ ${item.iconName
954
+ ? x `<md-icon
955
+ style="font-size: ${iconFontSize}px;width: ${iconFontSize}px;height: ${iconFontSize}px;"
956
+ >${item.iconName}</md-icon
957
+ >`
958
+ : ''}
959
+ ${item.label}
960
+ </div>
961
+ `)}
962
+ </div>
963
+ </div>
964
+ `;
965
+ }
966
+ }
967
+ WidgetTextbox.styles = i$4 `
968
+ :host {
969
+ display: block;
970
+ font-family: sans-serif;
971
+ box-sizing: border-box;
972
+ margin: auto;
973
+ }
974
+
975
+ .paging:not([active]) {
976
+ display: none !important;
977
+ }
978
+
979
+ .wrapper {
980
+ display: flex;
981
+ flex-direction: column;
982
+ height: 100%;
983
+ width: 100%;
984
+ padding: 12px;
985
+ gap: 12px;
986
+ box-sizing: border-box;
987
+ }
988
+
989
+ .nav-list {
990
+ display: flex;
991
+ flex-direction: column;
992
+ gap: 2px;
993
+ margin-top: 12px;
994
+ overflow-y: auto;
995
+ flex-grow: 1;
996
+ }
997
+
998
+ .nav-item {
999
+ cursor: pointer;
1000
+ display: flex;
1001
+ align-items: center;
1002
+ gap: 8px;
1003
+ padding: 8px;
1004
+ border-radius: 4px;
1005
+ }
1006
+
1007
+ md-icon {
1008
+ font-family: 'Material Symbols Outlined';
1009
+ }
1010
+
1011
+ .selected {
1012
+ font-weight: bold;
1013
+ background-color: rgba(0, 0, 0, 0.1);
1014
+ }
1015
+
1016
+ h2 {
1017
+ margin: 0;
1018
+ padding: 0px;
1019
+ font-size: 1.2em;
1020
+ }
1021
+ `;
1022
+ __decorate([
1023
+ n({ type: Object })
1024
+ ], WidgetTextbox.prototype, "inputData", void 0);
1025
+ __decorate([
1026
+ n({ type: Object })
1027
+ ], WidgetTextbox.prototype, "theme", void 0);
1028
+ __decorate([
1029
+ n({ type: String })
1030
+ ], WidgetTextbox.prototype, "route", void 0);
1031
+ __decorate([
1032
+ r$1()
1033
+ ], WidgetTextbox.prototype, "themeBgColor", void 0);
1034
+ __decorate([
1035
+ r$1()
1036
+ ], WidgetTextbox.prototype, "themeTitleColor", void 0);
1037
+ window.customElements.define('widget-sidenav-1.0.1', WidgetTextbox);
1038
+
1039
+ export { WidgetTextbox };
1040
+ //# sourceMappingURL=widget-sidenav.js.map