@decidables/decidables-elements 0.3.5 → 0.4.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.
@@ -3,21 +3,21 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t$3 = window,
7
- e$5 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
8
- s$6 = Symbol(),
9
- n$6 = new WeakMap();
10
- let o$6 = class o {
11
- constructor(t, e, n) {
12
- if (this._$cssResult$ = !0, n !== s$6) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
6
+ const t$1 = globalThis,
7
+ e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
8
+ s$2 = Symbol(),
9
+ o$3 = new WeakMap();
10
+ let n$2 = class n {
11
+ constructor(t, e, o) {
12
+ if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
13
13
  this.cssText = t, this.t = e;
14
14
  }
15
15
  get styleSheet() {
16
16
  let t = this.o;
17
17
  const s = this.t;
18
- if (e$5 && void 0 === t) {
18
+ if (e$2 && void 0 === t) {
19
19
  const e = void 0 !== s && 1 === s.length;
20
- e && (t = n$6.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$6.set(s, t));
20
+ e && (t = o$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
21
21
  }
22
22
  return t;
23
23
  }
@@ -25,18 +25,26 @@ let o$6 = class o {
25
25
  return this.cssText;
26
26
  }
27
27
  };
28
- const r$5 = t => new o$6("string" == typeof t ? t : t + "", void 0, s$6),
29
- S$3 = (s, n) => {
30
- e$5 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
31
- const n = document.createElement("style"),
32
- o = t$3.litNonce;
33
- void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
34
- });
28
+ const r$3 = t => new n$2("string" == typeof t ? t : t + "", void 0, s$2),
29
+ i$2 = (t, ...e) => {
30
+ const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
31
+ if (!0 === t._$cssResult$) return t.cssText;
32
+ if ("number" == typeof t) return t;
33
+ 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.");
34
+ })(s) + t[o + 1], t[0]);
35
+ return new n$2(o, t, s$2);
35
36
  },
36
- c$2 = e$5 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
37
+ S$1 = (s, o) => {
38
+ if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
39
+ const o = document.createElement("style"),
40
+ n = t$1.litNonce;
41
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
42
+ }
43
+ },
44
+ c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
37
45
  let e = "";
38
46
  for (const s of t.cssRules) e += s.cssText;
39
- return r$5(e);
47
+ return r$3(e);
40
48
  })(t) : t;
41
49
 
42
50
  /**
@@ -44,16 +52,24 @@ const r$5 = t => new o$6("string" == typeof t ? t : t + "", void 0, s$6),
44
52
  * Copyright 2017 Google LLC
45
53
  * SPDX-License-Identifier: BSD-3-Clause
46
54
  */
47
- var s$5;
48
- const e$4 = window,
49
- r$4 = e$4.trustedTypes,
50
- h$3 = r$4 ? r$4.emptyScript : "",
51
- o$5 = e$4.reactiveElementPolyfillSupport,
52
- n$5 = {
53
- toAttribute(t, i) {
54
- switch (i) {
55
+ const {
56
+ is: i$1,
57
+ defineProperty: e$1,
58
+ getOwnPropertyDescriptor: r$2,
59
+ getOwnPropertyNames: h$1,
60
+ getOwnPropertySymbols: o$2,
61
+ getPrototypeOf: n$1
62
+ } = Object,
63
+ a$1 = globalThis,
64
+ c$1 = a$1.trustedTypes,
65
+ l$1 = c$1 ? c$1.emptyScript : "",
66
+ p$1 = a$1.reactiveElementPolyfillSupport,
67
+ d$1 = (t, s) => t,
68
+ u$1 = {
69
+ toAttribute(t, s) {
70
+ switch (s) {
55
71
  case Boolean:
56
- t = t ? h$3 : null;
72
+ t = t ? l$1 : null;
57
73
  break;
58
74
  case Object:
59
75
  case Array:
@@ -61,752 +77,177 @@ const e$4 = window,
61
77
  }
62
78
  return t;
63
79
  },
64
- fromAttribute(t, i) {
65
- let s = t;
66
- switch (i) {
80
+ fromAttribute(t, s) {
81
+ let i = t;
82
+ switch (s) {
67
83
  case Boolean:
68
- s = null !== t;
84
+ i = null !== t;
69
85
  break;
70
86
  case Number:
71
- s = null === t ? null : Number(t);
87
+ i = null === t ? null : Number(t);
72
88
  break;
73
89
  case Object:
74
90
  case Array:
75
91
  try {
76
- s = JSON.parse(t);
92
+ i = JSON.parse(t);
77
93
  } catch (t) {
78
- s = null;
94
+ i = null;
79
95
  }
80
96
  }
81
- return s;
97
+ return i;
82
98
  }
83
99
  },
84
- a$3 = (t, i) => i !== t && (i == i || t == t),
85
- l$5 = {
100
+ f$1 = (t, s) => !i$1(t, s),
101
+ y$1 = {
86
102
  attribute: !0,
87
103
  type: String,
88
- converter: n$5,
104
+ converter: u$1,
89
105
  reflect: !1,
90
- hasChanged: a$3
106
+ hasChanged: f$1
91
107
  };
92
- let d$2 = class d extends HTMLElement {
93
- constructor() {
94
- super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
95
- }
108
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
109
+ let b$1 = class b extends HTMLElement {
96
110
  static addInitializer(t) {
97
- var i;
98
- this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
111
+ this._$Ei(), (this.l ??= []).push(t);
99
112
  }
100
113
  static get observedAttributes() {
101
- this.finalize();
102
- const t = [];
103
- return this.elementProperties.forEach((i, s) => {
104
- const e = this._$Ep(s, i);
105
- void 0 !== e && (this._$Ev.set(e, s), t.push(e));
106
- }), t;
107
- }
108
- static createProperty(t, i = l$5) {
109
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
110
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
111
- e = this.getPropertyDescriptor(t, s, i);
112
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
114
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
115
+ }
116
+ static createProperty(t, s = y$1) {
117
+ if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
118
+ const i = Symbol(),
119
+ r = this.getPropertyDescriptor(t, i, s);
120
+ void 0 !== r && e$1(this.prototype, t, r);
113
121
  }
114
122
  }
115
- static getPropertyDescriptor(t, i, s) {
123
+ static getPropertyDescriptor(t, s, i) {
124
+ const {
125
+ get: e,
126
+ set: h
127
+ } = r$2(this.prototype, t) ?? {
128
+ get() {
129
+ return this[s];
130
+ },
131
+ set(t) {
132
+ this[s] = t;
133
+ }
134
+ };
116
135
  return {
117
136
  get() {
118
- return this[i];
137
+ return e?.call(this);
119
138
  },
120
- set(e) {
121
- const r = this[t];
122
- this[i] = e, this.requestUpdate(t, r, s);
139
+ set(s) {
140
+ const r = e?.call(this);
141
+ h.call(this, s), this.requestUpdate(t, r, i);
123
142
  },
124
143
  configurable: !0,
125
144
  enumerable: !0
126
145
  };
127
146
  }
128
147
  static getPropertyOptions(t) {
129
- return this.elementProperties.get(t) || l$5;
148
+ return this.elementProperties.get(t) ?? y$1;
149
+ }
150
+ static _$Ei() {
151
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
152
+ const t = n$1(this);
153
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
130
154
  }
131
155
  static finalize() {
132
- if (this.hasOwnProperty("finalized")) return !1;
133
- this.finalized = !0;
134
- const t = Object.getPrototypeOf(this);
135
- if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
156
+ if (this.hasOwnProperty(d$1("finalized"))) return;
157
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
136
158
  const t = this.properties,
137
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
138
- for (const s of i) this.createProperty(s, t[s]);
139
- }
140
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
141
- }
142
- static finalizeStyles(i) {
143
- const s = [];
144
- if (Array.isArray(i)) {
145
- const e = new Set(i.flat(1 / 0).reverse());
146
- for (const i of e) s.unshift(c$2(i));
147
- } else void 0 !== i && s.push(c$2(i));
148
- return s;
149
- }
150
- static _$Ep(t, i) {
151
- const s = i.attribute;
152
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
153
- }
154
- u() {
155
- var t;
156
- this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
157
- }
158
- addController(t) {
159
- var i, s;
160
- (null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
161
- }
162
- removeController(t) {
163
- var i;
164
- null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
165
- }
166
- _$Eg() {
167
- this.constructor.elementProperties.forEach((t, i) => {
168
- this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
169
- });
170
- }
171
- createRenderRoot() {
172
- var t;
173
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
174
- return S$3(s, this.constructor.elementStyles), s;
175
- }
176
- connectedCallback() {
177
- var t;
178
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
179
- var i;
180
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
181
- });
182
- }
183
- enableUpdating(t) {}
184
- disconnectedCallback() {
185
- var t;
186
- null === (t = this._$ES) || void 0 === t || t.forEach(t => {
187
- var i;
188
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
189
- });
190
- }
191
- attributeChangedCallback(t, i, s) {
192
- this._$AK(t, s);
193
- }
194
- _$EO(t, i, s = l$5) {
195
- var e;
196
- const r = this.constructor._$Ep(t, s);
197
- if (void 0 !== r && !0 === s.reflect) {
198
- const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$5).toAttribute(i, s.type);
199
- this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
200
- }
201
- }
202
- _$AK(t, i) {
203
- var s;
204
- const e = this.constructor,
205
- r = e._$Ev.get(t);
206
- if (void 0 !== r && this._$El !== r) {
207
- const t = e.getPropertyOptions(r),
208
- h = "function" == typeof t.converter ? {
209
- fromAttribute: t.converter
210
- } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$5;
211
- this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
212
- }
213
- }
214
- requestUpdate(t, i, s) {
215
- let e = !0;
216
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$3)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
217
- }
218
- async _$Ej() {
219
- this.isUpdatePending = !0;
220
- try {
221
- await this._$E_;
222
- } catch (t) {
223
- Promise.reject(t);
224
- }
225
- const t = this.scheduleUpdate();
226
- return null != t && (await t), !this.isUpdatePending;
227
- }
228
- scheduleUpdate() {
229
- return this.performUpdate();
230
- }
231
- performUpdate() {
232
- var t;
233
- if (!this.isUpdatePending) return;
234
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
235
- let i = !1;
236
- const s = this._$AL;
237
- try {
238
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
239
- var i;
240
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
241
- }), this.update(s)) : this._$Ek();
242
- } catch (t) {
243
- throw i = !1, this._$Ek(), t;
244
- }
245
- i && this._$AE(s);
246
- }
247
- willUpdate(t) {}
248
- _$AE(t) {
249
- var i;
250
- null === (i = this._$ES) || void 0 === i || i.forEach(t => {
251
- var i;
252
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
253
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
254
- }
255
- _$Ek() {
256
- this._$AL = new Map(), this.isUpdatePending = !1;
257
- }
258
- get updateComplete() {
259
- return this.getUpdateComplete();
260
- }
261
- getUpdateComplete() {
262
- return this._$E_;
263
- }
264
- shouldUpdate(t) {
265
- return !0;
266
- }
267
- update(t) {
268
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
269
- }
270
- updated(t) {}
271
- firstUpdated(t) {}
272
- };
273
- d$2.finalized = !0, d$2.elementProperties = new Map(), d$2.elementStyles = [], d$2.shadowRootOptions = {
274
- mode: "open"
275
- }, null == o$5 || o$5({
276
- ReactiveElement: d$2
277
- }), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.6.1");
278
-
279
- /**
280
- * @license
281
- * Copyright 2017 Google LLC
282
- * SPDX-License-Identifier: BSD-3-Clause
283
- */
284
- var t$2;
285
- const i$2 = window,
286
- s$4 = i$2.trustedTypes,
287
- e$3 = s$4 ? s$4.createPolicy("lit-html", {
288
- createHTML: t => t
289
- }) : void 0,
290
- o$4 = "$lit$",
291
- n$4 = `lit$${(Math.random() + "").slice(9)}$`,
292
- l$4 = "?" + n$4,
293
- h$2 = `<${l$4}>`,
294
- r$3 = document,
295
- u$1 = () => r$3.createComment(""),
296
- d$1 = t => null === t || "object" != typeof t && "function" != typeof t,
297
- c$1 = Array.isArray,
298
- v$1 = t => c$1(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
299
- a$2 = "[ \t\n\f\r]",
300
- f$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
301
- _$1 = /-->/g,
302
- m$1 = />/g,
303
- p$1 = RegExp(`>|${a$2}(?:([^\\s"'>=/]+)(${a$2}*=${a$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
304
- g$1 = /'/g,
305
- $$1 = /"/g,
306
- y$1 = /^(?:script|style|textarea|title)$/i,
307
- T$1 = Symbol.for("lit-noChange"),
308
- A$1 = Symbol.for("lit-nothing"),
309
- E$1 = new WeakMap(),
310
- C$1 = r$3.createTreeWalker(r$3, 129, null, !1);
311
- function P$1(t, i) {
312
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
313
- return void 0 !== e$3 ? e$3.createHTML(i) : i;
314
- }
315
- const V$1 = (t, i) => {
316
- const s = t.length - 1,
317
- e = [];
318
- let l,
319
- r = 2 === i ? "<svg>" : "",
320
- u = f$1;
321
- for (let i = 0; i < s; i++) {
322
- const s = t[i];
323
- let d,
324
- c,
325
- v = -1,
326
- a = 0;
327
- for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f$1 ? "!--" === c[1] ? u = _$1 : void 0 !== c[1] ? u = m$1 : void 0 !== c[2] ? (y$1.test(c[2]) && (l = RegExp("</" + c[2], "g")), u = p$1) : void 0 !== c[3] && (u = p$1) : u === p$1 ? ">" === c[0] ? (u = null != l ? l : f$1, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, d = c[1], u = void 0 === c[3] ? p$1 : '"' === c[3] ? $$1 : g$1) : u === $$1 || u === g$1 ? u = p$1 : u === _$1 || u === m$1 ? u = f$1 : (u = p$1, l = void 0);
328
- const w = u === p$1 && t[i + 1].startsWith("/>") ? " " : "";
329
- r += u === f$1 ? s + h$2 : v >= 0 ? (e.push(d), s.slice(0, v) + o$4 + s.slice(v) + n$4 + w) : s + n$4 + (-2 === v ? (e.push(void 0), i) : w);
330
- }
331
- return [P$1(t, r + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), e];
332
- };
333
- let N$1 = class N {
334
- constructor({
335
- strings: t,
336
- _$litType$: i
337
- }, e) {
338
- let h;
339
- this.parts = [];
340
- let r = 0,
341
- d = 0;
342
- const c = t.length - 1,
343
- v = this.parts,
344
- [a, f] = V$1(t, i);
345
- if (this.el = N.createElement(a, e), C$1.currentNode = this.el.content, 2 === i) {
346
- const t = this.el.content,
347
- i = t.firstChild;
348
- i.remove(), t.append(...i.childNodes);
159
+ s = [...h$1(t), ...o$2(t)];
160
+ for (const i of s) this.createProperty(i, t[i]);
349
161
  }
350
- for (; null !== (h = C$1.nextNode()) && v.length < c;) {
351
- if (1 === h.nodeType) {
352
- if (h.hasAttributes()) {
353
- const t = [];
354
- for (const i of h.getAttributeNames()) if (i.endsWith(o$4) || i.startsWith(n$4)) {
355
- const s = f[d++];
356
- if (t.push(i), void 0 !== s) {
357
- const t = h.getAttribute(s.toLowerCase() + o$4).split(n$4),
358
- i = /([.?@])?(.*)/.exec(s);
359
- v.push({
360
- type: 1,
361
- index: r,
362
- name: i[2],
363
- strings: t,
364
- ctor: "." === i[1] ? H$1 : "?" === i[1] ? L$1 : "@" === i[1] ? z$1 : k$1
365
- });
366
- } else v.push({
367
- type: 6,
368
- index: r
369
- });
370
- }
371
- for (const i of t) h.removeAttribute(i);
372
- }
373
- if (y$1.test(h.tagName)) {
374
- const t = h.textContent.split(n$4),
375
- i = t.length - 1;
376
- if (i > 0) {
377
- h.textContent = s$4 ? s$4.emptyScript : "";
378
- for (let s = 0; s < i; s++) h.append(t[s], u$1()), C$1.nextNode(), v.push({
379
- type: 2,
380
- index: ++r
381
- });
382
- h.append(t[i], u$1());
383
- }
384
- }
385
- } else if (8 === h.nodeType) if (h.data === l$4) v.push({
386
- type: 2,
387
- index: r
388
- });else {
389
- let t = -1;
390
- for (; -1 !== (t = h.data.indexOf(n$4, t + 1));) v.push({
391
- type: 7,
392
- index: r
393
- }), t += n$4.length - 1;
394
- }
395
- r++;
396
- }
397
- }
398
- static createElement(t, i) {
399
- const s = r$3.createElement("template");
400
- return s.innerHTML = t, s;
401
- }
402
- };
403
- function S$2(t, i, s = t, e) {
404
- var o, n, l, h;
405
- if (i === T$1) return i;
406
- let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
407
- const u = d$1(i) ? void 0 : i._$litDirective$;
408
- return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = S$2(t, r._$AS(t, i.values), r, e)), i;
409
- }
410
- let M$1 = class M {
411
- constructor(t, i) {
412
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
413
- }
414
- get parentNode() {
415
- return this._$AM.parentNode;
416
- }
417
- get _$AU() {
418
- return this._$AM._$AU;
419
- }
420
- u(t) {
421
- var i;
422
- const {
423
- el: {
424
- content: s
425
- },
426
- parts: e
427
- } = this._$AD,
428
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r$3).importNode(s, !0);
429
- C$1.currentNode = o;
430
- let n = C$1.nextNode(),
431
- l = 0,
432
- h = 0,
433
- u = e[0];
434
- for (; void 0 !== u;) {
435
- if (l === u.index) {
436
- let i;
437
- 2 === u.type ? i = new R$1(n, n.nextSibling, this, t) : 1 === u.type ? i = new u.ctor(n, u.name, u.strings, this, t) : 6 === u.type && (i = new Z(n, this, t)), this._$AV.push(i), u = e[++h];
438
- }
439
- l !== (null == u ? void 0 : u.index) && (n = C$1.nextNode(), l++);
440
- }
441
- return C$1.currentNode = r$3, o;
442
- }
443
- v(t) {
444
- let i = 0;
445
- 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++;
446
- }
447
- };
448
- let R$1 = class R {
449
- constructor(t, i, s, e) {
450
- var o;
451
- this.type = 2, this._$AH = A$1, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cp = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
452
- }
453
- get _$AU() {
454
- var t, i;
455
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
456
- }
457
- get parentNode() {
458
- let t = this._$AA.parentNode;
459
- const i = this._$AM;
460
- return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
461
- }
462
- get startNode() {
463
- return this._$AA;
464
- }
465
- get endNode() {
466
- return this._$AB;
467
- }
468
- _$AI(t, i = this) {
469
- t = S$2(this, t, i), d$1(t) ? t === A$1 || null == t || "" === t ? (this._$AH !== A$1 && this._$AR(), this._$AH = A$1) : t !== this._$AH && t !== T$1 && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : v$1(t) ? this.T(t) : this._(t);
470
- }
471
- k(t) {
472
- return this._$AA.parentNode.insertBefore(t, this._$AB);
473
- }
474
- $(t) {
475
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
476
- }
477
- _(t) {
478
- this._$AH !== A$1 && d$1(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$3.createTextNode(t)), this._$AH = t;
479
- }
480
- g(t) {
481
- var i;
482
- const {
483
- values: s,
484
- _$litType$: e
485
- } = t,
486
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = N$1.createElement(P$1(e.h, e.h[0]), this.options)), e);
487
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.v(s);else {
488
- const t = new M$1(o, this),
489
- i = t.u(this.options);
490
- t.v(s), this.$(i), this._$AH = t;
162
+ const t = this[Symbol.metadata];
163
+ if (null !== t) {
164
+ const s = litPropertyMetadata.get(t);
165
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
491
166
  }
492
- }
493
- _$AC(t) {
494
- let i = E$1.get(t.strings);
495
- return void 0 === i && E$1.set(t.strings, i = new N$1(t)), i;
496
- }
497
- T(t) {
498
- c$1(this._$AH) || (this._$AH = [], this._$AR());
499
- const i = this._$AH;
500
- let s,
501
- e = 0;
502
- for (const o of t) e === i.length ? i.push(s = new R(this.k(u$1()), this.k(u$1()), this, this.options)) : s = i[e], s._$AI(o), e++;
503
- e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
504
- }
505
- _$AR(t = this._$AA.nextSibling, i) {
506
- var s;
507
- for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
508
- const i = t.nextSibling;
509
- t.remove(), t = i;
167
+ this._$Eh = new Map();
168
+ for (const [t, s] of this.elementProperties) {
169
+ const i = this._$Eu(t, s);
170
+ void 0 !== i && this._$Eh.set(i, t);
510
171
  }
172
+ this.elementStyles = this.finalizeStyles(this.styles);
511
173
  }
512
- setConnected(t) {
513
- var i;
514
- void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
515
- }
516
- };
517
- let k$1 = class k {
518
- constructor(t, i, s, e, o) {
519
- this.type = 1, this._$AH = A$1, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A$1;
520
- }
521
- get tagName() {
522
- return this.element.tagName;
523
- }
524
- get _$AU() {
525
- return this._$AM._$AU;
526
- }
527
- _$AI(t, i = this, s, e) {
528
- const o = this.strings;
529
- let n = !1;
530
- if (void 0 === o) t = S$2(this, t, i, 0), n = !d$1(t) || t !== this._$AH && t !== T$1, n && (this._$AH = t);else {
531
- const e = t;
532
- let l, h;
533
- for (t = o[0], l = 0; l < o.length - 1; l++) h = S$2(this, e[s + l], i, l), h === T$1 && (h = this._$AH[l]), n || (n = !d$1(h) || h !== this._$AH[l]), h === A$1 ? t = A$1 : t !== A$1 && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
534
- }
535
- n && !e && this.j(t);
174
+ static finalizeStyles(s) {
175
+ const i = [];
176
+ if (Array.isArray(s)) {
177
+ const e = new Set(s.flat(1 / 0).reverse());
178
+ for (const s of e) i.unshift(c$2(s));
179
+ } else void 0 !== s && i.push(c$2(s));
180
+ return i;
536
181
  }
537
- j(t) {
538
- t === A$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
182
+ static _$Eu(t, s) {
183
+ const i = s.attribute;
184
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
539
185
  }
540
- };
541
- let H$1 = class H extends k$1 {
542
186
  constructor() {
543
- super(...arguments), this.type = 3;
544
- }
545
- j(t) {
546
- this.element[this.name] = t === A$1 ? void 0 : t;
187
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
547
188
  }
548
- };
549
- const I$1 = s$4 ? s$4.emptyScript : "";
550
- let L$1 = class L extends k$1 {
551
- constructor() {
552
- super(...arguments), this.type = 4;
553
- }
554
- j(t) {
555
- t && t !== A$1 ? this.element.setAttribute(this.name, I$1) : this.element.removeAttribute(this.name);
556
- }
557
- };
558
- let z$1 = class z extends k$1 {
559
- constructor(t, i, s, e, o) {
560
- super(t, i, s, e, o), this.type = 5;
561
- }
562
- _$AI(t, i = this) {
563
- var s;
564
- if ((t = null !== (s = S$2(this, t, i, 0)) && void 0 !== s ? s : A$1) === T$1) return;
565
- const e = this._$AH,
566
- o = t === A$1 && e !== A$1 || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
567
- n = t !== A$1 && (e === A$1 || o);
568
- o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
569
- }
570
- handleEvent(t) {
571
- var i, s;
572
- "function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
573
- }
574
- };
575
- class Z {
576
- constructor(t, i, s) {
577
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
578
- }
579
- get _$AU() {
580
- return this._$AM._$AU;
581
- }
582
- _$AI(t) {
583
- S$2(this, t);
584
- }
585
- }
586
- const B$1 = i$2.litHtmlPolyfillSupport;
587
- null == B$1 || B$1(N$1, R$1), (null !== (t$2 = i$2.litHtmlVersions) && void 0 !== t$2 ? t$2 : i$2.litHtmlVersions = []).push("2.8.0");
588
-
589
- /**
590
- * @license
591
- * Copyright 2019 Google LLC
592
- * SPDX-License-Identifier: BSD-3-Clause
593
- */
594
- const t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
595
- e$2 = Symbol(),
596
- n$3 = new Map();
597
- let s$3 = class s {
598
- constructor(t, n) {
599
- if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
600
- this.cssText = t;
601
- }
602
- get styleSheet() {
603
- let e = n$3.get(this.cssText);
604
- return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
605
- }
606
- toString() {
607
- return this.cssText;
608
- }
609
- };
610
- const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
611
- r$2 = (t, ...n) => {
612
- const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
613
- if (!0 === t._$cssResult$) return t.cssText;
614
- if ("number" == typeof t) return t;
615
- 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.");
616
- })(n) + t[s + 1], t[0]);
617
- return new s$3(o, e$2);
618
- },
619
- i$1 = (e, n) => {
620
- t$1 ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
621
- const n = document.createElement("style"),
622
- s = window.litNonce;
623
- void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
624
- });
625
- },
626
- S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
627
- let e = "";
628
- for (const n of t.cssRules) e += n.cssText;
629
- return o$3(e);
630
- })(t) : t;
631
-
632
- /**
633
- * @license
634
- * Copyright 2017 Google LLC
635
- * SPDX-License-Identifier: BSD-3-Clause
636
- */
637
- var s$2;
638
- const e$1 = window.trustedTypes,
639
- r$1 = e$1 ? e$1.emptyScript : "",
640
- h$1 = window.reactiveElementPolyfillSupport,
641
- o$2 = {
642
- toAttribute(t, i) {
643
- switch (i) {
644
- case Boolean:
645
- t = t ? r$1 : null;
646
- break;
647
- case Object:
648
- case Array:
649
- t = null == t ? t : JSON.stringify(t);
650
- }
651
- return t;
652
- },
653
- fromAttribute(t, i) {
654
- let s = t;
655
- switch (i) {
656
- case Boolean:
657
- s = null !== t;
658
- break;
659
- case Number:
660
- s = null === t ? null : Number(t);
661
- break;
662
- case Object:
663
- case Array:
664
- try {
665
- s = JSON.parse(t);
666
- } catch (t) {
667
- s = null;
668
- }
669
- }
670
- return s;
671
- }
672
- },
673
- n$2 = (t, i) => i !== t && (i == i || t == t),
674
- l$3 = {
675
- attribute: !0,
676
- type: String,
677
- converter: o$2,
678
- reflect: !1,
679
- hasChanged: n$2
680
- };
681
- let a$1 = class a extends HTMLElement {
682
- constructor() {
683
- super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
684
- }
685
- static addInitializer(t) {
686
- var i;
687
- null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
688
- }
689
- static get observedAttributes() {
690
- this.finalize();
691
- const t = [];
692
- return this.elementProperties.forEach((i, s) => {
693
- const e = this._$Eh(s, i);
694
- void 0 !== e && (this._$Eu.set(e, s), t.push(e));
695
- }), t;
696
- }
697
- static createProperty(t, i = l$3) {
698
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
699
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
700
- e = this.getPropertyDescriptor(t, s, i);
701
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
702
- }
703
- }
704
- static getPropertyDescriptor(t, i, s) {
705
- return {
706
- get() {
707
- return this[i];
708
- },
709
- set(e) {
710
- const r = this[t];
711
- this[i] = e, this.requestUpdate(t, r, s);
712
- },
713
- configurable: !0,
714
- enumerable: !0
715
- };
716
- }
717
- static getPropertyOptions(t) {
718
- return this.elementProperties.get(t) || l$3;
719
- }
720
- static finalize() {
721
- if (this.hasOwnProperty("finalized")) return !1;
722
- this.finalized = !0;
723
- const t = Object.getPrototypeOf(this);
724
- if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
725
- const t = this.properties,
726
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
727
- for (const s of i) this.createProperty(s, t[s]);
728
- }
729
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
730
- }
731
- static finalizeStyles(i) {
732
- const s = [];
733
- if (Array.isArray(i)) {
734
- const e = new Set(i.flat(1 / 0).reverse());
735
- for (const i of e) s.unshift(S$1(i));
736
- } else void 0 !== i && s.push(S$1(i));
737
- return s;
738
- }
739
- static _$Eh(t, i) {
740
- const s = i.attribute;
741
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
742
- }
743
- o() {
744
- var t;
745
- this._$Ep = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(t => t(this));
189
+ _$Ev() {
190
+ this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
746
191
  }
747
192
  addController(t) {
748
- var i, s;
749
- (null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
193
+ (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
750
194
  }
751
195
  removeController(t) {
752
- var i;
753
- null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
196
+ this._$E_?.delete(t);
754
197
  }
755
- _$Em() {
756
- this.constructor.elementProperties.forEach((t, i) => {
757
- this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
758
- });
198
+ _$ES() {
199
+ const t = new Map(),
200
+ s = this.constructor.elementProperties;
201
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
202
+ t.size > 0 && (this._$Ep = t);
759
203
  }
760
204
  createRenderRoot() {
761
- var t;
762
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
763
- return i$1(s, this.constructor.elementStyles), s;
205
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
206
+ return S$1(t, this.constructor.elementStyles), t;
764
207
  }
765
208
  connectedCallback() {
766
- var t;
767
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
768
- var i;
769
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
770
- });
209
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
771
210
  }
772
211
  enableUpdating(t) {}
773
212
  disconnectedCallback() {
774
- var t;
775
- null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
776
- var i;
777
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
778
- });
213
+ this._$E_?.forEach(t => t.hostDisconnected?.());
779
214
  }
780
- attributeChangedCallback(t, i, s) {
781
- this._$AK(t, s);
215
+ attributeChangedCallback(t, s, i) {
216
+ this._$AK(t, i);
782
217
  }
783
- _$ES(t, i, s = l$3) {
784
- var e, r;
785
- const h = this.constructor._$Eh(t, s);
786
- if (void 0 !== h && !0 === s.reflect) {
787
- const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
788
- this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
218
+ _$EO(t, s) {
219
+ const i = this.constructor.elementProperties.get(t),
220
+ e = this.constructor._$Eu(t, i);
221
+ if (void 0 !== e && !0 === i.reflect) {
222
+ const r = (void 0 !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
223
+ this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
224
+ }
225
+ }
226
+ _$AK(t, s) {
227
+ const i = this.constructor,
228
+ e = i._$Eh.get(t);
229
+ if (void 0 !== e && this._$Em !== e) {
230
+ const t = i.getPropertyOptions(e),
231
+ r = "function" == typeof t.converter ? {
232
+ fromAttribute: t.converter
233
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$1;
234
+ this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
789
235
  }
790
236
  }
791
- _$AK(t, i) {
792
- var s, e, r;
793
- const h = this.constructor,
794
- n = h._$Eu.get(t);
795
- if (void 0 !== n && this._$Ei !== n) {
796
- const t = h.getPropertyOptions(n),
797
- l = t.converter,
798
- a = null !== (r = null !== (e = null === (s = l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : "function" == typeof l ? l : null) && void 0 !== r ? r : o$2.fromAttribute;
799
- this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
237
+ requestUpdate(t, s, i, e = !1, r) {
238
+ if (void 0 !== t) {
239
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
240
+ this.C(t, s, i);
800
241
  }
242
+ !1 === this.isUpdatePending && (this._$Eg = this._$EP());
801
243
  }
802
- requestUpdate(t, i, s) {
803
- let e = !0;
804
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
244
+ C(t, s, i) {
245
+ this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
805
246
  }
806
- async _$E_() {
247
+ async _$EP() {
807
248
  this.isUpdatePending = !0;
808
249
  try {
809
- await this._$Ep;
250
+ await this._$Eg;
810
251
  } catch (t) {
811
252
  Promise.reject(t);
812
253
  }
@@ -817,192 +258,184 @@ let a$1 = class a extends HTMLElement {
817
258
  return this.performUpdate();
818
259
  }
819
260
  performUpdate() {
820
- var t;
821
261
  if (!this.isUpdatePending) return;
822
- this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
823
- let i = !1;
262
+ if (!this.hasUpdated) {
263
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
264
+ for (const [t, s] of this._$Ep) this[t] = s;
265
+ this._$Ep = void 0;
266
+ }
267
+ const t = this.constructor.elementProperties;
268
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
269
+ }
270
+ let t = !1;
824
271
  const s = this._$AL;
825
272
  try {
826
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
827
- var i;
828
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
829
- }), this.update(s)) : this._$EU();
830
- } catch (t) {
831
- throw i = !1, this._$EU(), t;
273
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
274
+ } catch (s) {
275
+ throw t = !1, this._$ET(), s;
832
276
  }
833
- i && this._$AE(s);
277
+ t && this._$AE(s);
834
278
  }
835
279
  willUpdate(t) {}
836
280
  _$AE(t) {
837
- var i;
838
- null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
839
- var i;
840
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
841
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
281
+ this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
842
282
  }
843
- _$EU() {
283
+ _$ET() {
844
284
  this._$AL = new Map(), this.isUpdatePending = !1;
845
285
  }
846
286
  get updateComplete() {
847
287
  return this.getUpdateComplete();
848
288
  }
849
289
  getUpdateComplete() {
850
- return this._$Ep;
290
+ return this._$Eg;
851
291
  }
852
292
  shouldUpdate(t) {
853
293
  return !0;
854
294
  }
855
295
  update(t) {
856
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
296
+ this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
857
297
  }
858
298
  updated(t) {}
859
299
  firstUpdated(t) {}
860
300
  };
861
- a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
301
+ b$1.elementStyles = [], b$1.shadowRootOptions = {
862
302
  mode: "open"
863
- }, null == h$1 || h$1({
864
- ReactiveElement: a$1
865
- }), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.3.1");
303
+ }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
304
+ ReactiveElement: b$1
305
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
866
306
 
867
307
  /**
868
308
  * @license
869
309
  * Copyright 2017 Google LLC
870
310
  * SPDX-License-Identifier: BSD-3-Clause
871
311
  */
872
- var t;
873
- const i = window,
874
- s$1 = i.trustedTypes,
875
- e = s$1 ? s$1.createPolicy("lit-html", {
312
+ const t = globalThis,
313
+ i = t.trustedTypes,
314
+ s$1 = i ? i.createPolicy("lit-html", {
876
315
  createHTML: t => t
877
316
  }) : void 0,
878
- o$1 = "$lit$",
879
- n$1 = `lit$${(Math.random() + "").slice(9)}$`,
880
- l$2 = "?" + n$1,
881
- h = `<${l$2}>`,
882
- r = document,
883
- d = () => r.createComment(""),
884
- u = t => null === t || "object" != typeof t && "function" != typeof t,
885
- c = Array.isArray,
886
- v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
887
- a = "[ \t\n\f\r]",
317
+ e = "$lit$",
318
+ h = `lit$${(Math.random() + "").slice(9)}$`,
319
+ o$1 = "?" + h,
320
+ n = `<${o$1}>`,
321
+ r$1 = document,
322
+ l = () => r$1.createComment(""),
323
+ c = t => null === t || "object" != typeof t && "function" != typeof t,
324
+ a = Array.isArray,
325
+ u = t => a(t) || "function" == typeof t?.[Symbol.iterator],
326
+ d = "[ \t\n\f\r]",
888
327
  f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
889
- _ = /-->/g,
890
- m = />/g,
891
- p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
892
- g = /'/g,
893
- $ = /"/g,
894
- y = /^(?:script|style|textarea|title)$/i,
895
- w = t => (i, ...s) => ({
328
+ v = /-->/g,
329
+ _ = />/g,
330
+ m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
331
+ p = /'/g,
332
+ g = /"/g,
333
+ $ = /^(?:script|style|textarea|title)$/i,
334
+ y = t => (i, ...s) => ({
896
335
  _$litType$: t,
897
336
  strings: i,
898
337
  values: s
899
338
  }),
900
- x = w(1),
901
- b = w(2),
902
- T = Symbol.for("lit-noChange"),
903
- A = Symbol.for("lit-nothing"),
904
- E = new WeakMap(),
905
- C = r.createTreeWalker(r, 129, null, !1),
906
- P = (t, i) => {
907
- const s = t.length - 1,
908
- l = [];
909
- let r,
910
- d = 2 === i ? "<svg>" : "",
911
- u = f;
912
- for (let i = 0; i < s; i++) {
913
- const s = t[i];
914
- let e,
915
- c,
916
- v = -1,
917
- a = 0;
918
- for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f ? "!--" === c[1] ? u = _ : void 0 !== c[1] ? u = m : void 0 !== c[2] ? (y.test(c[2]) && (r = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != r ? r : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, e = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, r = void 0);
919
- const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
920
- d += u === f ? s + h : v >= 0 ? (l.push(e), s.slice(0, v) + o$1 + s.slice(v) + n$1 + w) : s + n$1 + (-2 === v ? (l.push(void 0), i) : w);
921
- }
922
- const c = d + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
923
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
924
- return [void 0 !== e ? e.createHTML(c) : c, l];
925
- };
339
+ x = y(1),
340
+ b = y(2),
341
+ w = Symbol.for("lit-noChange"),
342
+ T = Symbol.for("lit-nothing"),
343
+ A = new WeakMap(),
344
+ E = r$1.createTreeWalker(r$1, 129);
345
+ function C(t, i) {
346
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
347
+ return void 0 !== s$1 ? s$1.createHTML(i) : i;
348
+ }
349
+ const P = (t, i) => {
350
+ const s = t.length - 1,
351
+ o = [];
352
+ let r,
353
+ l = 2 === i ? "<svg>" : "",
354
+ c = f;
355
+ for (let i = 0; i < s; i++) {
356
+ const s = t[i];
357
+ let a,
358
+ u,
359
+ d = -1,
360
+ y = 0;
361
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === 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 : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
362
+ const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
363
+ l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
364
+ }
365
+ return [C(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), o];
366
+ };
926
367
  class V {
927
368
  constructor({
928
369
  strings: t,
929
- _$litType$: i
930
- }, e) {
931
- let h;
370
+ _$litType$: s
371
+ }, n) {
372
+ let r;
932
373
  this.parts = [];
933
- let r = 0,
934
- u = 0;
935
- const c = t.length - 1,
936
- v = this.parts,
937
- [a, f] = P(t, i);
938
- if (this.el = V.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
939
- const t = this.el.content,
940
- i = t.firstChild;
941
- i.remove(), t.append(...i.childNodes);
374
+ let c = 0,
375
+ a = 0;
376
+ const u = t.length - 1,
377
+ d = this.parts,
378
+ [f, v] = P(t, s);
379
+ if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
380
+ const t = this.el.content.firstChild;
381
+ t.replaceWith(...t.childNodes);
942
382
  }
943
- for (; null !== (h = C.nextNode()) && v.length < c;) {
944
- if (1 === h.nodeType) {
945
- if (h.hasAttributes()) {
946
- const t = [];
947
- for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
948
- const s = f[u++];
949
- if (t.push(i), void 0 !== s) {
950
- const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
951
- i = /([.?@])?(.*)/.exec(s);
952
- v.push({
953
- type: 1,
954
- index: r,
955
- name: i[2],
956
- strings: t,
957
- ctor: "." === i[1] ? k : "?" === i[1] ? I : "@" === i[1] ? L : R
958
- });
959
- } else v.push({
960
- type: 6,
961
- index: r
962
- });
963
- }
964
- for (const i of t) h.removeAttribute(i);
965
- }
966
- if (y.test(h.tagName)) {
967
- const t = h.textContent.split(n$1),
968
- i = t.length - 1;
969
- if (i > 0) {
970
- h.textContent = s$1 ? s$1.emptyScript : "";
971
- for (let s = 0; s < i; s++) h.append(t[s], d()), C.nextNode(), v.push({
383
+ for (; null !== (r = E.nextNode()) && d.length < u;) {
384
+ if (1 === r.nodeType) {
385
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e)) {
386
+ const i = v[a++],
387
+ s = r.getAttribute(t).split(h),
388
+ e = /([.?@])?(.*)/.exec(i);
389
+ d.push({
390
+ type: 1,
391
+ index: c,
392
+ name: e[2],
393
+ strings: s,
394
+ ctor: "." === e[1] ? k : "?" === e[1] ? H : "@" === e[1] ? I : R
395
+ }), r.removeAttribute(t);
396
+ } else t.startsWith(h) && (d.push({
397
+ type: 6,
398
+ index: c
399
+ }), r.removeAttribute(t));
400
+ if ($.test(r.tagName)) {
401
+ const t = r.textContent.split(h),
402
+ s = t.length - 1;
403
+ if (s > 0) {
404
+ r.textContent = i ? i.emptyScript : "";
405
+ for (let i = 0; i < s; i++) r.append(t[i], l()), E.nextNode(), d.push({
972
406
  type: 2,
973
- index: ++r
407
+ index: ++c
974
408
  });
975
- h.append(t[i], d());
409
+ r.append(t[s], l());
976
410
  }
977
411
  }
978
- } else if (8 === h.nodeType) if (h.data === l$2) v.push({
412
+ } else if (8 === r.nodeType) if (r.data === o$1) d.push({
979
413
  type: 2,
980
- index: r
414
+ index: c
981
415
  });else {
982
416
  let t = -1;
983
- for (; -1 !== (t = h.data.indexOf(n$1, t + 1));) v.push({
417
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
984
418
  type: 7,
985
- index: r
986
- }), t += n$1.length - 1;
419
+ index: c
420
+ }), t += h.length - 1;
987
421
  }
988
- r++;
422
+ c++;
989
423
  }
990
424
  }
991
425
  static createElement(t, i) {
992
- const s = r.createElement("template");
426
+ const s = r$1.createElement("template");
993
427
  return s.innerHTML = t, s;
994
428
  }
995
429
  }
996
430
  function N(t, i, s = t, e) {
997
- var o, n, l, h;
998
- if (i === T) return i;
999
- let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
1000
- const d = u(i) ? void 0 : i._$litDirective$;
1001
- return (null == r ? void 0 : r.constructor) !== d && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === d ? r = void 0 : (r = new d(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = N(t, r._$AS(t, i.values), r, e)), i;
431
+ if (i === w) return i;
432
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
433
+ const o = c(i) ? void 0 : i._$litDirective$;
434
+ return h?.constructor !== o && (h?._$AO?.(!1), 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 = N(t, h._$AS(t, i.values), h, e)), i;
1002
435
  }
1003
436
  class S {
1004
437
  constructor(t, i) {
1005
- this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
438
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1006
439
  }
1007
440
  get parentNode() {
1008
441
  return this._$AM.parentNode;
@@ -1010,47 +443,44 @@ class S {
1010
443
  get _$AU() {
1011
444
  return this._$AM._$AU;
1012
445
  }
1013
- v(t) {
1014
- var i;
446
+ u(t) {
1015
447
  const {
1016
448
  el: {
1017
- content: s
449
+ content: i
1018
450
  },
1019
- parts: e
451
+ parts: s
1020
452
  } = this._$AD,
1021
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r).importNode(s, !0);
1022
- C.currentNode = o;
1023
- let n = C.nextNode(),
1024
- l = 0,
1025
- h = 0,
1026
- d = e[0];
1027
- for (; void 0 !== d;) {
1028
- if (l === d.index) {
453
+ e = (t?.creationScope ?? r$1).importNode(i, !0);
454
+ E.currentNode = e;
455
+ let h = E.nextNode(),
456
+ o = 0,
457
+ n = 0,
458
+ l = s[0];
459
+ for (; void 0 !== l;) {
460
+ if (o === l.index) {
1029
461
  let i;
1030
- 2 === d.type ? i = new M(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new z(n, this, t)), this.u.push(i), d = e[++h];
462
+ 2 === l.type ? i = new M(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new L(h, this, t)), this._$AV.push(i), l = s[++n];
1031
463
  }
1032
- l !== (null == d ? void 0 : d.index) && (n = C.nextNode(), l++);
464
+ o !== l?.index && (h = E.nextNode(), o++);
1033
465
  }
1034
- return o;
466
+ return E.currentNode = r$1, e;
1035
467
  }
1036
468
  p(t) {
1037
469
  let i = 0;
1038
- for (const s of this.u) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
470
+ 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++;
1039
471
  }
1040
472
  }
1041
473
  class M {
1042
- constructor(t, i, s, e) {
1043
- var o;
1044
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cm = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
1045
- }
1046
474
  get _$AU() {
1047
- var t, i;
1048
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
475
+ return this._$AM?._$AU ?? this._$Cv;
476
+ }
477
+ constructor(t, i, s, e) {
478
+ this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
1049
479
  }
1050
480
  get parentNode() {
1051
481
  let t = this._$AA.parentNode;
1052
482
  const i = this._$AM;
1053
- return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
483
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
1054
484
  }
1055
485
  get startNode() {
1056
486
  return this._$AA;
@@ -1059,113 +489,107 @@ class M {
1059
489
  return this._$AB;
1060
490
  }
1061
491
  _$AI(t, i = this) {
1062
- t = N(this, t, i), u(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this.g(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : v(t) ? this.k(t) : this.g(t);
492
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u(t) ? this.T(t) : this._(t);
1063
493
  }
1064
- S(t) {
494
+ k(t) {
1065
495
  return this._$AA.parentNode.insertBefore(t, this._$AB);
1066
496
  }
1067
- T(t) {
1068
- this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
497
+ $(t) {
498
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
1069
499
  }
1070
- g(t) {
1071
- this._$AH !== A && u(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r.createTextNode(t)), this._$AH = t;
500
+ _(t) {
501
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
1072
502
  }
1073
- $(t) {
1074
- var i;
503
+ g(t) {
1075
504
  const {
1076
- values: s,
1077
- _$litType$: e
505
+ values: i,
506
+ _$litType$: s
1078
507
  } = t,
1079
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = V.createElement(e.h, this.options)), e);
1080
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
1081
- const t = new S(o, this),
1082
- i = t.v(this.options);
1083
- t.p(s), this.T(i), this._$AH = t;
508
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = V.createElement(C(s.h, s.h[0]), this.options)), s);
509
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
510
+ const t = new S(e, this),
511
+ s = t.u(this.options);
512
+ t.p(i), this.$(s), this._$AH = t;
1084
513
  }
1085
514
  }
1086
515
  _$AC(t) {
1087
- let i = E.get(t.strings);
1088
- return void 0 === i && E.set(t.strings, i = new V(t)), i;
516
+ let i = A.get(t.strings);
517
+ return void 0 === i && A.set(t.strings, i = new V(t)), i;
1089
518
  }
1090
- k(t) {
1091
- c(this._$AH) || (this._$AH = [], this._$AR());
519
+ T(t) {
520
+ a(this._$AH) || (this._$AH = [], this._$AR());
1092
521
  const i = this._$AH;
1093
522
  let s,
1094
523
  e = 0;
1095
- for (const o of t) e === i.length ? i.push(s = new M(this.S(d()), this.S(d()), this, this.options)) : s = i[e], s._$AI(o), e++;
524
+ for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
1096
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
1097
526
  }
1098
527
  _$AR(t = this._$AA.nextSibling, i) {
1099
- var s;
1100
- for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
528
+ for (this._$AP?.(!1, !0, i); t && t !== this._$AB;) {
1101
529
  const i = t.nextSibling;
1102
530
  t.remove(), t = i;
1103
531
  }
1104
532
  }
1105
533
  setConnected(t) {
1106
- var i;
1107
- void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
534
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
1108
535
  }
1109
536
  }
1110
537
  class R {
1111
- constructor(t, i, s, e, o) {
1112
- this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A;
1113
- }
1114
538
  get tagName() {
1115
539
  return this.element.tagName;
1116
540
  }
1117
541
  get _$AU() {
1118
542
  return this._$AM._$AU;
1119
543
  }
544
+ constructor(t, i, s, e, h) {
545
+ this.type = 1, this._$AH = T, 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 = T;
546
+ }
1120
547
  _$AI(t, i = this, s, e) {
1121
- const o = this.strings;
1122
- let n = !1;
1123
- if (void 0 === o) t = N(this, t, i, 0), n = !u(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
548
+ const h = this.strings;
549
+ let o = !1;
550
+ if (void 0 === h) t = N(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== w, o && (this._$AH = t);else {
1124
551
  const e = t;
1125
- let l, h;
1126
- for (t = o[0], l = 0; l < o.length - 1; l++) h = N(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !u(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
552
+ let n, r;
553
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
1127
554
  }
1128
- n && !e && this.j(t);
555
+ o && !e && this.O(t);
1129
556
  }
1130
- j(t) {
1131
- t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
557
+ O(t) {
558
+ t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1132
559
  }
1133
560
  }
1134
561
  class k extends R {
1135
562
  constructor() {
1136
563
  super(...arguments), this.type = 3;
1137
564
  }
1138
- j(t) {
1139
- this.element[this.name] = t === A ? void 0 : t;
565
+ O(t) {
566
+ this.element[this.name] = t === T ? void 0 : t;
1140
567
  }
1141
568
  }
1142
- const H = s$1 ? s$1.emptyScript : "";
1143
- class I extends R {
569
+ class H extends R {
1144
570
  constructor() {
1145
571
  super(...arguments), this.type = 4;
1146
572
  }
1147
- j(t) {
1148
- t && t !== A ? this.element.setAttribute(this.name, H) : this.element.removeAttribute(this.name);
573
+ O(t) {
574
+ this.element.toggleAttribute(this.name, !!t && t !== T);
1149
575
  }
1150
576
  }
1151
- class L extends R {
1152
- constructor(t, i, s, e, o) {
1153
- super(t, i, s, e, o), this.type = 5;
577
+ class I extends R {
578
+ constructor(t, i, s, e, h) {
579
+ super(t, i, s, e, h), this.type = 5;
1154
580
  }
1155
581
  _$AI(t, i = this) {
1156
- var s;
1157
- if ((t = null !== (s = N(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
1158
- const e = this._$AH,
1159
- o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
1160
- n = t !== A && (e === A || o);
1161
- o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
582
+ if ((t = N(this, t, i, 0) ?? T) === w) return;
583
+ const s = this._$AH,
584
+ e = t === T && s !== T || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
585
+ h = t !== T && (s === T || e);
586
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
1162
587
  }
1163
588
  handleEvent(t) {
1164
- var i, s;
1165
- "function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
589
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
1166
590
  }
1167
591
  }
1168
- class z {
592
+ class L {
1169
593
  constructor(t, i, s) {
1170
594
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1171
595
  }
@@ -1176,17 +600,16 @@ class z {
1176
600
  N(this, t);
1177
601
  }
1178
602
  }
1179
- const j = i.litHtmlPolyfillSupport;
1180
- null == j || j(V, M), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.7.0");
1181
- const B = (t, i, s) => {
1182
- var e, o;
1183
- const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
1184
- let l = n._$litPart$;
1185
- if (void 0 === l) {
1186
- const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
1187
- n._$litPart$ = l = new M(i.insertBefore(d(), t), t, void 0, null != s ? s : {});
603
+ const Z = t.litHtmlPolyfillSupport;
604
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
605
+ const j = (t, i, s) => {
606
+ const e = s?.renderBefore ?? i;
607
+ let h = e._$litPart$;
608
+ if (void 0 === h) {
609
+ const t = s?.renderBefore ?? null;
610
+ e._$litPart$ = h = new M(i.insertBefore(l(), t), t, void 0, s ?? {});
1188
611
  }
1189
- return l._$AI(t), l;
612
+ return h._$AI(t), h;
1190
613
  };
1191
614
 
1192
615
  /**
@@ -1194,42 +617,38 @@ const B = (t, i, s) => {
1194
617
  * Copyright 2017 Google LLC
1195
618
  * SPDX-License-Identifier: BSD-3-Clause
1196
619
  */
1197
- var l$1, o;
1198
- class s extends a$1 {
620
+ class s extends b$1 {
1199
621
  constructor() {
1200
622
  super(...arguments), this.renderOptions = {
1201
623
  host: this
1202
624
  }, this._$Do = void 0;
1203
625
  }
1204
626
  createRenderRoot() {
1205
- var t, e;
1206
- const i = super.createRenderRoot();
1207
- return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
627
+ const t = super.createRenderRoot();
628
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
1208
629
  }
1209
630
  update(t) {
1210
631
  const i = this.render();
1211
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(i, this.renderRoot, this.renderOptions);
632
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = j(i, this.renderRoot, this.renderOptions);
1212
633
  }
1213
634
  connectedCallback() {
1214
- var t;
1215
- super.connectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!0);
635
+ super.connectedCallback(), this._$Do?.setConnected(!0);
1216
636
  }
1217
637
  disconnectedCallback() {
1218
- var t;
1219
- super.disconnectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!1);
638
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
1220
639
  }
1221
640
  render() {
1222
- return T;
641
+ return w;
1223
642
  }
1224
643
  }
1225
- s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
644
+ s._$litElement$ = !0, s[("finalized")] = !0, globalThis.litElementHydrateSupport?.({
1226
645
  LitElement: s
1227
646
  });
1228
- const n = globalThis.litElementPolyfillSupport;
1229
- null == n || n({
647
+ const r = globalThis.litElementPolyfillSupport;
648
+ r?.({
1230
649
  LitElement: s
1231
650
  });
1232
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.0");
651
+ (globalThis.litElementVersions ??= []).push("4.0.2");
1233
652
 
1234
653
  var noop = {
1235
654
  value: () => {}
@@ -2146,15 +1565,15 @@ function Color() {}
2146
1565
  var darker = 0.7;
2147
1566
  var brighter = 1 / darker;
2148
1567
  var reI = "\\s*([+-]?\\d+)\\s*",
2149
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2150
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1568
+ reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1569
+ reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2151
1570
  reHex = /^#([0-9a-f]{3,8})$/,
2152
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
2153
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
2154
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
2155
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
2156
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
2157
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
1571
+ reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
1572
+ reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
1573
+ reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
1574
+ reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
1575
+ reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
1576
+ reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
2158
1577
  var named = {
2159
1578
  aliceblue: 0xf0f8ff,
2160
1579
  antiquewhite: 0xfaebd7,
@@ -2306,15 +1725,16 @@ var named = {
2306
1725
  yellowgreen: 0x9acd32
2307
1726
  };
2308
1727
  define(Color, color, {
2309
- copy: function (channels) {
1728
+ copy(channels) {
2310
1729
  return Object.assign(new this.constructor(), this, channels);
2311
1730
  },
2312
- displayable: function () {
1731
+ displayable() {
2313
1732
  return this.rgb().displayable();
2314
1733
  },
2315
1734
  hex: color_formatHex,
2316
1735
  // Deprecated! Use color.formatHex.
2317
1736
  formatHex: color_formatHex,
1737
+ formatHex8: color_formatHex8,
2318
1738
  formatHsl: color_formatHsl,
2319
1739
  formatRgb: color_formatRgb,
2320
1740
  toString: color_formatRgb
@@ -2322,6 +1742,9 @@ define(Color, color, {
2322
1742
  function color_formatHex() {
2323
1743
  return this.rgb().formatHex();
2324
1744
  }
1745
+ function color_formatHex8() {
1746
+ return this.rgb().formatHex8();
1747
+ }
2325
1748
  function color_formatHsl() {
2326
1749
  return hslConvert(this).formatHsl();
2327
1750
  }
@@ -2368,36 +1791,48 @@ function Rgb(r, g, b, opacity) {
2368
1791
  this.opacity = +opacity;
2369
1792
  }
2370
1793
  define(Rgb, rgb, extend(Color, {
2371
- brighter: function (k) {
1794
+ brighter(k) {
2372
1795
  k = k == null ? brighter : Math.pow(brighter, k);
2373
1796
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2374
1797
  },
2375
- darker: function (k) {
1798
+ darker(k) {
2376
1799
  k = k == null ? darker : Math.pow(darker, k);
2377
1800
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2378
1801
  },
2379
- rgb: function () {
1802
+ rgb() {
2380
1803
  return this;
2381
1804
  },
2382
- displayable: function () {
1805
+ clamp() {
1806
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
1807
+ },
1808
+ displayable() {
2383
1809
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
2384
1810
  },
2385
1811
  hex: rgb_formatHex,
2386
1812
  // Deprecated! Use color.formatHex.
2387
1813
  formatHex: rgb_formatHex,
1814
+ formatHex8: rgb_formatHex8,
2388
1815
  formatRgb: rgb_formatRgb,
2389
1816
  toString: rgb_formatRgb
2390
1817
  }));
2391
1818
  function rgb_formatHex() {
2392
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
1819
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
1820
+ }
1821
+ function rgb_formatHex8() {
1822
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2393
1823
  }
2394
1824
  function rgb_formatRgb() {
2395
- var a = this.opacity;
2396
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2397
- return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
1825
+ const a = clampa(this.opacity);
1826
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
1827
+ }
1828
+ function clampa(opacity) {
1829
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
1830
+ }
1831
+ function clampi(value) {
1832
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
2398
1833
  }
2399
1834
  function hex(value) {
2400
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
1835
+ value = clampi(value);
2401
1836
  return (value < 16 ? "0" : "") + value.toString(16);
2402
1837
  }
2403
1838
  function hsla(h, s, l, a) {
@@ -2437,15 +1872,15 @@ function Hsl(h, s, l, opacity) {
2437
1872
  this.opacity = +opacity;
2438
1873
  }
2439
1874
  define(Hsl, hsl, extend(Color, {
2440
- brighter: function (k) {
1875
+ brighter(k) {
2441
1876
  k = k == null ? brighter : Math.pow(brighter, k);
2442
1877
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2443
1878
  },
2444
- darker: function (k) {
1879
+ darker(k) {
2445
1880
  k = k == null ? darker : Math.pow(darker, k);
2446
1881
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2447
1882
  },
2448
- rgb: function () {
1883
+ rgb() {
2449
1884
  var h = this.h % 360 + (this.h < 0) * 360,
2450
1885
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
2451
1886
  l = this.l,
@@ -2453,15 +1888,24 @@ define(Hsl, hsl, extend(Color, {
2453
1888
  m1 = 2 * l - m2;
2454
1889
  return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
2455
1890
  },
2456
- displayable: function () {
1891
+ clamp() {
1892
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
1893
+ },
1894
+ displayable() {
2457
1895
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
2458
1896
  },
2459
- formatHsl: function () {
2460
- var a = this.opacity;
2461
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2462
- return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
1897
+ formatHsl() {
1898
+ const a = clampa(this.opacity);
1899
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
2463
1900
  }
2464
1901
  }));
1902
+ function clamph(value) {
1903
+ value = (value || 0) % 360;
1904
+ return value < 0 ? value + 360 : value;
1905
+ }
1906
+ function clampt(value) {
1907
+ return Math.max(0, Math.min(1, value || 0));
1908
+ }
2465
1909
 
2466
1910
  /* From FvD 13.37, CSS Color Module Level 3 */
2467
1911
  function hsl2rgb(h, m1, m2) {
@@ -3775,7 +3219,6 @@ class DecidablesElement extends s {
3775
3219
  };
3776
3220
  /* eslint-enable key-spacing, object-curly-newline */
3777
3221
  }
3778
-
3779
3222
  static cssBoxShadow(elevation, rotate = false, inverse = false) {
3780
3223
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
3781
3224
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
@@ -3791,6 +3234,48 @@ class DecidablesElement extends s {
3791
3234
  const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
3792
3235
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
3793
3236
  }
3237
+ static get svgDefs() {
3238
+ const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
3239
+
3240
+ const filters = shadows.elevations.map(z => {
3241
+ return `
3242
+ <filter id=${`shadow-${z}`} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">
3243
+ <feComponentTransfer in="SourceAlpha" result="solid">
3244
+ <feFuncA type="table" tableValues="0 1 1"/>
3245
+ </feComponentTransfer>
3246
+ <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
3247
+ <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
3248
+ <feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
3249
+ ${shadows.mapUmbra[z].s === 0 ? '' : `<feMorphology in="offU" result="spreadU" operator=${shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapUmbra[z].s)} />`}
3250
+ ${shadows.mapPenumbra[z].s === 0 ? '' : `<feMorphology in="offP" result="spreadP" operator=${shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapPenumbra[z].s)} />`}
3251
+ ${shadows.mapAmbient[z].s === 0 ? '' : `<feMorphology in="offA" result="spreadA" operator=${shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapAmbient[z].s)} />`}
3252
+ <feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
3253
+ <feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
3254
+ <feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
3255
+ <feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
3256
+ <feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
3257
+ <feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
3258
+ <feComposite in="opU" in2="blurU" result="shU" operator="in" />
3259
+ <feComposite in="opP" in2="blurP" result="shP" operator="in" />
3260
+ <feComposite in="opA" in2="blurA" result="shA" operator="in" />
3261
+ <feMorphology in="solid" result="smaller" operator="erode" radius="1" />
3262
+ <feComposite in="shU" in2="smaller" result="finalU" operator="out" />
3263
+ <feComposite in="shP" in2="smaller" result="finalP" operator="out" />
3264
+ <feComposite in="shA" in2="smaller" result="finalA" operator="out" />
3265
+ <feMerge>
3266
+ <feMergeNode in="finalU" />
3267
+ <feMergeNode in="finalP" />
3268
+ <feMergeNode in="finalA" />
3269
+ <feMergeNode in="SourceGraphic" />
3270
+ </feMerge>
3271
+ </filter>`;
3272
+ });
3273
+ return `
3274
+ <defs>
3275
+ ${filters}
3276
+ </defs>
3277
+ `;
3278
+ }
3794
3279
  static get svgFilters() {
3795
3280
  const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
3796
3281
 
@@ -3798,7 +3283,7 @@ class DecidablesElement extends s {
3798
3283
  return b`
3799
3284
  <filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
3800
3285
  <feComponentTransfer in="SourceAlpha" result="solid">
3801
- <feFuncA type="table" tableValues="0 1 1"/>
3286
+ <feFuncA type="table" tableValues="0 1 1"/>
3802
3287
  </feComponentTransfer>
3803
3288
  <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
3804
3289
  <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
@@ -3836,24 +3321,24 @@ class DecidablesElement extends s {
3836
3321
  `;
3837
3322
  }
3838
3323
  static get styles() {
3839
- return r$2`
3324
+ return i$2`
3840
3325
  :host {
3841
- ---shadow-0: var(--shadow-0, ${o$3(this.cssBoxShadow(0))});
3842
- ---shadow-2: var(--shadow-2, ${o$3(this.cssBoxShadow(2))});
3843
- ---shadow-4: var(--shadow-4, ${o$3(this.cssBoxShadow(4))});
3844
- ---shadow-8: var(--shadow-8, ${o$3(this.cssBoxShadow(8))});
3845
-
3846
- ---color-background: var(--color-background, ${o$3(this.greys.white)});
3847
- ---color-border: var(--color-border, ${o$3(this.greys.light75)});
3848
- ---color-text: var(--color-text, ${o$3(this.greys.dark75)});
3849
- ---color-text-inverse: var(--color-text-inverse, ${o$3(this.greys.white)});
3850
- ---color-link: var(--color-link, ${o$3(this.greys.dark25)});
3851
- ---color-element-background: var(--color-element-background, ${o$3(this.greys.light75)});
3852
- ---color-element-disabled: var(--color-element-disabled, ${o$3(this.greys.light50)});
3853
- ---color-element-enabled: var(--color-element-enabled, ${o$3(this.greys.dark25)});
3854
- ---color-element-selected: var(--color-element-selected, ${o$3(this.greys.grey)});
3855
- ---color-element-border: var(--color-element-border, ${o$3(this.greys.dark50)});
3856
- ---color-element-emphasis: var(--color-element-emphasis, ${o$3(this.greys.dark75)});
3326
+ ---shadow-0: var(--shadow-0, ${r$3(this.cssBoxShadow(0))});
3327
+ ---shadow-2: var(--shadow-2, ${r$3(this.cssBoxShadow(2))});
3328
+ ---shadow-4: var(--shadow-4, ${r$3(this.cssBoxShadow(4))});
3329
+ ---shadow-8: var(--shadow-8, ${r$3(this.cssBoxShadow(8))});
3330
+
3331
+ ---color-background: var(--color-background, ${r$3(this.greys.white)});
3332
+ ---color-border: var(--color-border, ${r$3(this.greys.light75)});
3333
+ ---color-text: var(--color-text, ${r$3(this.greys.dark75)});
3334
+ ---color-text-inverse: var(--color-text-inverse, ${r$3(this.greys.white)});
3335
+ ---color-link: var(--color-link, ${r$3(this.greys.dark25)});
3336
+ ---color-element-background: var(--color-element-background, ${r$3(this.greys.light75)});
3337
+ ---color-element-disabled: var(--color-element-disabled, ${r$3(this.greys.light50)});
3338
+ ---color-element-enabled: var(--color-element-enabled, ${r$3(this.greys.dark25)});
3339
+ ---color-element-selected: var(--color-element-selected, ${r$3(this.greys.grey)});
3340
+ ---color-element-border: var(--color-element-border, ${r$3(this.greys.dark50)});
3341
+ ---color-element-emphasis: var(--color-element-emphasis, ${r$3(this.greys.dark75)});
3857
3342
 
3858
3343
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
3859
3344
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
@@ -3914,7 +3399,7 @@ class DecidablesButton extends DecidablesElement {
3914
3399
  this.disabled = false;
3915
3400
  }
3916
3401
  static get styles() {
3917
- return [super.styles, r$2`
3402
+ return [super.styles, i$2`
3918
3403
  :host {
3919
3404
  margin: 0.25rem;
3920
3405
  }
@@ -3984,7 +3469,7 @@ customElements.define('decidables-button', DecidablesButton);
3984
3469
  * Copyright 2018 Google LLC
3985
3470
  * SPDX-License-Identifier: BSD-3-Clause
3986
3471
  */
3987
- const l = l => null != l ? l : A$1;
3472
+ const o = o => o ?? T;
3988
3473
 
3989
3474
  class DecidablesSlider extends DecidablesElement {
3990
3475
  static get properties() {
@@ -4039,11 +3524,11 @@ class DecidablesSlider extends DecidablesElement {
4039
3524
  this.value = event.target.value;
4040
3525
  }
4041
3526
  static get styles() {
4042
- return [super.styles, r$2`
3527
+ return [super.styles, i$2`
4043
3528
  :host {
4044
- ---shadow-2-rotate: var(--shadow-2-rotate, ${o$3(this.cssBoxShadow(2, true, false))});
4045
- ---shadow-4-rotate: var(--shadow-4-rotate, ${o$3(this.cssBoxShadow(4, true, false))});
4046
- ---shadow-8-rotate: var(--shadow-8-rotate, ${o$3(this.cssBoxShadow(8, true, false))});
3529
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${r$3(this.cssBoxShadow(2, true, false))});
3530
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${r$3(this.cssBoxShadow(4, true, false))});
3531
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${r$3(this.cssBoxShadow(8, true, false))});
4047
3532
 
4048
3533
  display: flex;
4049
3534
 
@@ -4297,9 +3782,9 @@ class DecidablesSlider extends DecidablesElement {
4297
3782
  <slot></slot>
4298
3783
  </label>
4299
3784
  <div class="range">
4300
- <input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
3785
+ <input type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
4301
3786
  </div>
4302
- <decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
3787
+ <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
4303
3788
  `;
4304
3789
  }
4305
3790
  }
@@ -4349,12 +3834,15 @@ class DecidablesSpinner extends DecidablesElement {
4349
3834
  this.value = event.target.value;
4350
3835
  }
4351
3836
  static get styles() {
4352
- return [super.styles, r$2`
3837
+ return [super.styles, i$2`
4353
3838
  :host {
4354
3839
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
4355
3840
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
4356
3841
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
4357
3842
 
3843
+ ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
3844
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
3845
+
4358
3846
  display: block;
4359
3847
  }
4360
3848
 
@@ -4382,8 +3870,20 @@ class DecidablesSpinner extends DecidablesElement {
4382
3870
  content: var(---decidables-spinner-prefix);
4383
3871
  }
4384
3872
 
3873
+ label::after {
3874
+ position: absolute;
3875
+ right: 0.25rem;
3876
+ bottom: 1px;
3877
+
3878
+ font-size: var(---decidables-spinner-font-size);
3879
+ line-height: normal;
3880
+
3881
+ content: var(---decidables-spinner-postfix);
3882
+ }
3883
+
4385
3884
  input[type=number] {
4386
3885
  width: var(---decidables-spinner-input-width);
3886
+ padding-right: var(---decidables-spinner-postfix-padding);
4387
3887
 
4388
3888
  font-family: var(---font-family-base);
4389
3889
  font-size: var(---decidables-spinner-font-size);
@@ -4434,7 +3934,7 @@ class DecidablesSpinner extends DecidablesElement {
4434
3934
  return x`
4435
3935
  <label>
4436
3936
  <slot></slot>
4437
- <input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
3937
+ <input ?disabled=${this.disabled} type="number" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
4438
3938
  </label>
4439
3939
  `;
4440
3940
  }
@@ -4473,7 +3973,7 @@ class DecidablesSwitch extends DecidablesElement {
4473
3973
  }));
4474
3974
  }
4475
3975
  static get styles() {
4476
- return [super.styles, r$2`
3976
+ return [super.styles, i$2`
4477
3977
  :host {
4478
3978
  display: flex;
4479
3979
 
@@ -4625,7 +4125,7 @@ class DecidablesToggle extends DecidablesElement {
4625
4125
  this.disabled = false;
4626
4126
  }
4627
4127
  static get styles() {
4628
- return [super.styles, r$2`
4128
+ return [super.styles, i$2`
4629
4129
  fieldset {
4630
4130
  display: flex;
4631
4131
 
@@ -4700,7 +4200,7 @@ class DecidablesToggleOption extends DecidablesElement {
4700
4200
  }));
4701
4201
  }
4702
4202
  static get styles() {
4703
- return [super.styles, r$2`
4203
+ return [super.styles, i$2`
4704
4204
  :host {
4705
4205
  display: flex;
4706
4206
  }
@@ -4836,5 +4336,49 @@ const DecidablesConverterSet = {
4836
4336
  }
4837
4337
  };
4838
4338
 
4839
- export { DecidablesButton, DecidablesConverterArray, DecidablesConverterSet, DecidablesElement, DecidablesSlider, DecidablesSpinner, DecidablesSwitch, DecidablesToggle, DecidablesToggleOption };
4339
+ function DecidablesMixinResizeable(superClass) {
4340
+ return class extends superClass {
4341
+ static get properties() {
4342
+ return {
4343
+ width: {
4344
+ attribute: false,
4345
+ type: Number,
4346
+ reflect: false
4347
+ },
4348
+ height: {
4349
+ attribute: false,
4350
+ type: Number,
4351
+ reflect: false
4352
+ },
4353
+ rem: {
4354
+ attribute: false,
4355
+ type: Number,
4356
+ reflect: false
4357
+ }
4358
+ };
4359
+ }
4360
+ constructor() {
4361
+ super();
4362
+ this.width = NaN;
4363
+ this.height = NaN;
4364
+ this.rem = NaN;
4365
+ }
4366
+ getDimensions() {
4367
+ this.width = parseFloat(this.getComputedStyleValue('width'), 10);
4368
+ this.height = parseFloat(this.getComputedStyleValue('height'), 10);
4369
+ this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
4370
+ }
4371
+ connectedCallback() {
4372
+ super.connectedCallback();
4373
+ this.resizeObserver = new ResizeObserver(this.getDimensions.bind(this));
4374
+ this.resizeObserver.observe(this);
4375
+ }
4376
+ disconnectedCallback() {
4377
+ this.resizeObserver.unobserve(this);
4378
+ super.disconnectedCallback();
4379
+ }
4380
+ };
4381
+ }
4382
+
4383
+ export { DecidablesButton, DecidablesConverterArray, DecidablesConverterSet, DecidablesElement, DecidablesMixinResizeable, DecidablesSlider, DecidablesSpinner, DecidablesSwitch, DecidablesToggle, DecidablesToggleOption };
4840
4384
  //# sourceMappingURL=decidablesElements.esm.js.map