@record-evolution/widget-overlay 1.0.7 → 1.0.9

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.
@@ -1,29 +1,749 @@
1
- import { css as ve, LitElement as Te, html as y, nothing as P } from "lit";
2
- import { property as te, customElement as Re, state as M, query as ke } from "lit/decorators.js";
3
- const $ = globalThis, u = (o) => {
1
+ const q = globalThis, ue = q.ShadowRoot && (q.ShadyCSS === void 0 || q.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, fe = /* @__PURE__ */ Symbol(), Te = /* @__PURE__ */ new WeakMap();
2
+ class We {
3
+ constructor(e, t, i) {
4
+ if (this._$cssResult$ = !0, i !== fe)
5
+ throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
6
+ this.cssText = e, this._strings = t;
7
+ }
8
+ // This is a getter so that it's lazy. In practice, this means stylesheets
9
+ // are not created until the first element instance is made.
10
+ get styleSheet() {
11
+ let e = this._styleSheet;
12
+ const t = this._strings;
13
+ if (ue && e === void 0) {
14
+ const i = t !== void 0 && t.length === 1;
15
+ i && (e = Te.get(t)), e === void 0 && ((this._styleSheet = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Te.set(t, e));
16
+ }
17
+ return e;
18
+ }
19
+ toString() {
20
+ return this.cssText;
21
+ }
22
+ }
23
+ const et = (n) => {
24
+ if (n._$cssResult$ === !0)
25
+ return n.cssText;
26
+ if (typeof n == "number")
27
+ return n;
28
+ throw new Error(`Value passed to 'css' function must be a 'css' function result: ${n}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`);
29
+ }, tt = (n) => new We(typeof n == "string" ? n : String(n), void 0, fe), He = (n, ...e) => {
30
+ const t = n.length === 1 ? n[0] : e.reduce((i, s, r) => i + et(s) + n[r + 1], n[0]);
31
+ return new We(t, n, fe);
32
+ }, it = (n, e) => {
33
+ if (ue)
34
+ n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
35
+ else
36
+ for (const t of e) {
37
+ const i = document.createElement("style"), s = q.litNonce;
38
+ s !== void 0 && i.setAttribute("nonce", s), i.textContent = t.cssText, n.appendChild(i);
39
+ }
40
+ }, st = (n) => {
41
+ let e = "";
42
+ for (const t of n.cssRules)
43
+ e += t.cssText;
44
+ return tt(e);
45
+ }, Ce = ue ? (n) => n : (n) => n instanceof CSSStyleSheet ? st(n) : n;
46
+ const { is: nt, defineProperty: rt, getOwnPropertyDescriptor: Ee, getOwnPropertyNames: ot, getOwnPropertySymbols: at, getPrototypeOf: Ne } = Object, $ = globalThis;
47
+ let v;
48
+ const Me = $.trustedTypes, lt = Me ? Me.emptyScript : "", je = $.reactiveElementPolyfillSupportDevMode;
49
+ $.litIssuedWarnings ??= /* @__PURE__ */ new Set(), v = (n, e) => {
50
+ e += ` See https://lit.dev/msg/${n} for more information.`, !$.litIssuedWarnings.has(e) && !$.litIssuedWarnings.has(n) && (console.warn(e), $.litIssuedWarnings.add(e));
51
+ }, queueMicrotask(() => {
52
+ v("dev-mode", "Lit is in dev mode. Not recommended for production!"), $.ShadyDOM?.inUse && je === void 0 && v("polyfill-support-missing", "Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.");
53
+ });
54
+ const dt = (n) => {
4
55
  $.emitLitDebugLogEvents && $.dispatchEvent(new CustomEvent("lit-debug", {
5
- detail: o
56
+ detail: n
6
57
  }));
58
+ }, V = (n, e) => n, G = {
59
+ toAttribute(n, e) {
60
+ switch (e) {
61
+ case Boolean:
62
+ n = n ? lt : null;
63
+ break;
64
+ case Object:
65
+ case Array:
66
+ n = n == null ? n : JSON.stringify(n);
67
+ break;
68
+ }
69
+ return n;
70
+ },
71
+ fromAttribute(n, e) {
72
+ let t = n;
73
+ switch (e) {
74
+ case Boolean:
75
+ t = n !== null;
76
+ break;
77
+ case Number:
78
+ t = n === null ? null : Number(n);
79
+ break;
80
+ case Object:
81
+ case Array:
82
+ try {
83
+ t = JSON.parse(n);
84
+ } catch {
85
+ t = null;
86
+ }
87
+ break;
88
+ }
89
+ return t;
90
+ }
91
+ }, me = (n, e) => !nt(n, e), Ue = {
92
+ attribute: !0,
93
+ type: String,
94
+ converter: G,
95
+ reflect: !1,
96
+ useDefault: !1,
97
+ hasChanged: me
7
98
  };
8
- let I;
9
- $.litIssuedWarnings ??= /* @__PURE__ */ new Set(), I = (o, e) => {
10
- e += o ? ` See https://lit.dev/msg/${o} for more information.` : "", !$.litIssuedWarnings.has(e) && !$.litIssuedWarnings.has(o) && (console.warn(e), $.litIssuedWarnings.add(e));
99
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata");
100
+ $.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
101
+ class C extends HTMLElement {
102
+ /**
103
+ * Adds an initializer function to the class that is called during instance
104
+ * construction.
105
+ *
106
+ * This is useful for code that runs against a `ReactiveElement`
107
+ * subclass, such as a decorator, that needs to do work for each
108
+ * instance, such as setting up a `ReactiveController`.
109
+ *
110
+ * ```ts
111
+ * const myDecorator = (target: typeof ReactiveElement, key: string) => {
112
+ * target.addInitializer((instance: ReactiveElement) => {
113
+ * // This is run during construction of the element
114
+ * new MyController(instance);
115
+ * });
116
+ * }
117
+ * ```
118
+ *
119
+ * Decorating a field will then cause each instance to run an initializer
120
+ * that adds a controller:
121
+ *
122
+ * ```ts
123
+ * class MyElement extends LitElement {
124
+ * @myDecorator foo;
125
+ * }
126
+ * ```
127
+ *
128
+ * Initializers are stored per-constructor. Adding an initializer to a
129
+ * subclass does not add it to a superclass. Since initializers are run in
130
+ * constructors, initializers will run in order of the class hierarchy,
131
+ * starting with superclasses and progressing to the instance's class.
132
+ *
133
+ * @nocollapse
134
+ */
135
+ static addInitializer(e) {
136
+ this.__prepare(), (this._initializers ??= []).push(e);
137
+ }
138
+ /**
139
+ * Returns a list of attributes corresponding to the registered properties.
140
+ * @nocollapse
141
+ * @category attributes
142
+ */
143
+ static get observedAttributes() {
144
+ return this.finalize(), this.__attributeToPropertyMap && [...this.__attributeToPropertyMap.keys()];
145
+ }
146
+ /**
147
+ * Creates a property accessor on the element prototype if one does not exist
148
+ * and stores a {@linkcode PropertyDeclaration} for the property with the
149
+ * given options. The property setter calls the property's `hasChanged`
150
+ * property option or uses a strict identity check to determine whether or not
151
+ * to request an update.
152
+ *
153
+ * This method may be overridden to customize properties; however,
154
+ * when doing so, it's important to call `super.createProperty` to ensure
155
+ * the property is setup correctly. This method calls
156
+ * `getPropertyDescriptor` internally to get a descriptor to install.
157
+ * To customize what properties do when they are get or set, override
158
+ * `getPropertyDescriptor`. To customize the options for a property,
159
+ * implement `createProperty` like this:
160
+ *
161
+ * ```ts
162
+ * static createProperty(name, options) {
163
+ * options = Object.assign(options, {myOption: true});
164
+ * super.createProperty(name, options);
165
+ * }
166
+ * ```
167
+ *
168
+ * @nocollapse
169
+ * @category properties
170
+ */
171
+ static createProperty(e, t = Ue) {
172
+ if (t.state && (t.attribute = !1), this.__prepare(), this.prototype.hasOwnProperty(e) && (t = Object.create(t), t.wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
173
+ const i = (
174
+ // Use Symbol.for in dev mode to make it easier to maintain state
175
+ // when doing HMR.
176
+ /* @__PURE__ */ Symbol.for(`${String(e)} (@property() cache)`)
177
+ ), s = this.getPropertyDescriptor(e, i, t);
178
+ s !== void 0 && rt(this.prototype, e, s);
179
+ }
180
+ }
181
+ /**
182
+ * Returns a property descriptor to be defined on the given named property.
183
+ * If no descriptor is returned, the property will not become an accessor.
184
+ * For example,
185
+ *
186
+ * ```ts
187
+ * class MyElement extends LitElement {
188
+ * static getPropertyDescriptor(name, key, options) {
189
+ * const defaultDescriptor =
190
+ * super.getPropertyDescriptor(name, key, options);
191
+ * const setter = defaultDescriptor.set;
192
+ * return {
193
+ * get: defaultDescriptor.get,
194
+ * set(value) {
195
+ * setter.call(this, value);
196
+ * // custom action.
197
+ * },
198
+ * configurable: true,
199
+ * enumerable: true
200
+ * }
201
+ * }
202
+ * }
203
+ * ```
204
+ *
205
+ * @nocollapse
206
+ * @category properties
207
+ */
208
+ static getPropertyDescriptor(e, t, i) {
209
+ const { get: s, set: r } = Ee(this.prototype, e) ?? {
210
+ get() {
211
+ return this[t];
212
+ },
213
+ set(o) {
214
+ this[t] = o;
215
+ }
216
+ };
217
+ if (s == null) {
218
+ if ("value" in (Ee(this.prototype, e) ?? {}))
219
+ throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);
220
+ v("reactive-property-without-getter", `Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`);
221
+ }
222
+ return {
223
+ get: s,
224
+ set(o) {
225
+ const l = s?.call(this);
226
+ r?.call(this, o), this.requestUpdate(e, l, i);
227
+ },
228
+ configurable: !0,
229
+ enumerable: !0
230
+ };
231
+ }
232
+ /**
233
+ * Returns the property options associated with the given property.
234
+ * These options are defined with a `PropertyDeclaration` via the `properties`
235
+ * object or the `@property` decorator and are registered in
236
+ * `createProperty(...)`.
237
+ *
238
+ * Note, this method should be considered "final" and not overridden. To
239
+ * customize the options for a given property, override
240
+ * {@linkcode createProperty}.
241
+ *
242
+ * @nocollapse
243
+ * @final
244
+ * @category properties
245
+ */
246
+ static getPropertyOptions(e) {
247
+ return this.elementProperties.get(e) ?? Ue;
248
+ }
249
+ /**
250
+ * Initializes static own properties of the class used in bookkeeping
251
+ * for element properties, initializers, etc.
252
+ *
253
+ * Can be called multiple times by code that needs to ensure these
254
+ * properties exist before using them.
255
+ *
256
+ * This method ensures the superclass is finalized so that inherited
257
+ * property metadata can be copied down.
258
+ * @nocollapse
259
+ */
260
+ static __prepare() {
261
+ if (this.hasOwnProperty(V("elementProperties")))
262
+ return;
263
+ const e = Ne(this);
264
+ e.finalize(), e._initializers !== void 0 && (this._initializers = [...e._initializers]), this.elementProperties = new Map(e.elementProperties);
265
+ }
266
+ /**
267
+ * Finishes setting up the class so that it's ready to be registered
268
+ * as a custom element and instantiated.
269
+ *
270
+ * This method is called by the ReactiveElement.observedAttributes getter.
271
+ * If you override the observedAttributes getter, you must either call
272
+ * super.observedAttributes to trigger finalization, or call finalize()
273
+ * yourself.
274
+ *
275
+ * @nocollapse
276
+ */
277
+ static finalize() {
278
+ if (this.hasOwnProperty(V("finalized")))
279
+ return;
280
+ if (this.finalized = !0, this.__prepare(), this.hasOwnProperty(V("properties"))) {
281
+ const t = this.properties, i = [
282
+ ...ot(t),
283
+ ...at(t)
284
+ ];
285
+ for (const s of i)
286
+ this.createProperty(s, t[s]);
287
+ }
288
+ const e = this[Symbol.metadata];
289
+ if (e !== null) {
290
+ const t = litPropertyMetadata.get(e);
291
+ if (t !== void 0)
292
+ for (const [i, s] of t)
293
+ this.elementProperties.set(i, s);
294
+ }
295
+ this.__attributeToPropertyMap = /* @__PURE__ */ new Map();
296
+ for (const [t, i] of this.elementProperties) {
297
+ const s = this.__attributeNameForProperty(t, i);
298
+ s !== void 0 && this.__attributeToPropertyMap.set(s, t);
299
+ }
300
+ this.elementStyles = this.finalizeStyles(this.styles), this.hasOwnProperty("createProperty") && v("no-override-create-property", "Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"), this.hasOwnProperty("getPropertyDescriptor") && v("no-override-get-property-descriptor", "Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators");
301
+ }
302
+ /**
303
+ * Takes the styles the user supplied via the `static styles` property and
304
+ * returns the array of styles to apply to the element.
305
+ * Override this method to integrate into a style management system.
306
+ *
307
+ * Styles are deduplicated preserving the _last_ instance in the list. This
308
+ * is a performance optimization to avoid duplicated styles that can occur
309
+ * especially when composing via subclassing. The last item is kept to try
310
+ * to preserve the cascade order with the assumption that it's most important
311
+ * that last added styles override previous styles.
312
+ *
313
+ * @nocollapse
314
+ * @category styles
315
+ */
316
+ static finalizeStyles(e) {
317
+ const t = [];
318
+ if (Array.isArray(e)) {
319
+ const i = new Set(e.flat(1 / 0).reverse());
320
+ for (const s of i)
321
+ t.unshift(Ce(s));
322
+ } else e !== void 0 && t.push(Ce(e));
323
+ return t;
324
+ }
325
+ /**
326
+ * Returns the property name for the given attribute `name`.
327
+ * @nocollapse
328
+ */
329
+ static __attributeNameForProperty(e, t) {
330
+ const i = t.attribute;
331
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
332
+ }
333
+ constructor() {
334
+ super(), this.__instanceProperties = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this.__reflectingProperty = null, this.__initialize();
335
+ }
336
+ /**
337
+ * Internal only override point for customizing work done when elements
338
+ * are constructed.
339
+ */
340
+ __initialize() {
341
+ this.__updatePromise = new Promise((e) => this.enableUpdating = e), this._$changedProperties = /* @__PURE__ */ new Map(), this.__saveInstanceProperties(), this.requestUpdate(), this.constructor._initializers?.forEach((e) => e(this));
342
+ }
343
+ /**
344
+ * Registers a `ReactiveController` to participate in the element's reactive
345
+ * update cycle. The element automatically calls into any registered
346
+ * controllers during its lifecycle callbacks.
347
+ *
348
+ * If the element is connected when `addController()` is called, the
349
+ * controller's `hostConnected()` callback will be immediately called.
350
+ * @category controllers
351
+ */
352
+ addController(e) {
353
+ (this.__controllers ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
354
+ }
355
+ /**
356
+ * Removes a `ReactiveController` from the element.
357
+ * @category controllers
358
+ */
359
+ removeController(e) {
360
+ this.__controllers?.delete(e);
361
+ }
362
+ /**
363
+ * Fixes any properties set on the instance before upgrade time.
364
+ * Otherwise these would shadow the accessor and break these properties.
365
+ * The properties are stored in a Map which is played back after the
366
+ * constructor runs.
367
+ */
368
+ __saveInstanceProperties() {
369
+ const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
370
+ for (const i of t.keys())
371
+ this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]);
372
+ e.size > 0 && (this.__instanceProperties = e);
373
+ }
374
+ /**
375
+ * Returns the node into which the element should render and by default
376
+ * creates and returns an open shadowRoot. Implement to customize where the
377
+ * element's DOM is rendered. For example, to render into the element's
378
+ * childNodes, return `this`.
379
+ *
380
+ * @return Returns a node into which to render.
381
+ * @category rendering
382
+ */
383
+ createRenderRoot() {
384
+ const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
385
+ return it(e, this.constructor.elementStyles), e;
386
+ }
387
+ /**
388
+ * On first connection, creates the element's renderRoot, sets up
389
+ * element styling, and enables updating.
390
+ * @category lifecycle
391
+ */
392
+ connectedCallback() {
393
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this.__controllers?.forEach((e) => e.hostConnected?.());
394
+ }
395
+ /**
396
+ * Note, this method should be considered final and not overridden. It is
397
+ * overridden on the element instance with a function that triggers the first
398
+ * update.
399
+ * @category updates
400
+ */
401
+ enableUpdating(e) {
402
+ }
403
+ /**
404
+ * Allows for `super.disconnectedCallback()` in extensions while
405
+ * reserving the possibility of making non-breaking feature additions
406
+ * when disconnecting at some point in the future.
407
+ * @category lifecycle
408
+ */
409
+ disconnectedCallback() {
410
+ this.__controllers?.forEach((e) => e.hostDisconnected?.());
411
+ }
412
+ /**
413
+ * Synchronizes property values when attributes change.
414
+ *
415
+ * Specifically, when an attribute is set, the corresponding property is set.
416
+ * You should rarely need to implement this callback. If this method is
417
+ * overridden, `super.attributeChangedCallback(name, _old, value)` must be
418
+ * called.
419
+ *
420
+ * See [responding to attribute changes](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes)
421
+ * on MDN for more information about the `attributeChangedCallback`.
422
+ * @category attributes
423
+ */
424
+ attributeChangedCallback(e, t, i) {
425
+ this._$attributeToProperty(e, i);
426
+ }
427
+ __propertyToAttribute(e, t) {
428
+ const s = this.constructor.elementProperties.get(e), r = this.constructor.__attributeNameForProperty(e, s);
429
+ if (r !== void 0 && s.reflect === !0) {
430
+ const l = (s.converter?.toAttribute !== void 0 ? s.converter : G).toAttribute(t, s.type);
431
+ this.constructor.enabledWarnings.includes("migration") && l === void 0 && v("undefined-attribute-value", `The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`), this.__reflectingProperty = e, l == null ? this.removeAttribute(r) : this.setAttribute(r, l), this.__reflectingProperty = null;
432
+ }
433
+ }
434
+ /** @internal */
435
+ _$attributeToProperty(e, t) {
436
+ const i = this.constructor, s = i.__attributeToPropertyMap.get(e);
437
+ if (s !== void 0 && this.__reflectingProperty !== s) {
438
+ const r = i.getPropertyOptions(s), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : G;
439
+ this.__reflectingProperty = s, this[s] = o.fromAttribute(t, r.type) ?? this.__defaultValues?.get(s) ?? // eslint-disable-next-line @typescript-eslint/no-explicit-any
440
+ null, this.__reflectingProperty = null;
441
+ }
442
+ }
443
+ /**
444
+ * Requests an update which is processed asynchronously. This should be called
445
+ * when an element should update based on some state not triggered by setting
446
+ * a reactive property. In this case, pass no arguments. It should also be
447
+ * called when manually implementing a property setter. In this case, pass the
448
+ * property `name` and `oldValue` to ensure that any configured property
449
+ * options are honored.
450
+ *
451
+ * @param name name of requesting property
452
+ * @param oldValue old value of requesting property
453
+ * @param options property options to use instead of the previously
454
+ * configured options
455
+ * @category updates
456
+ */
457
+ requestUpdate(e, t, i) {
458
+ if (e !== void 0) {
459
+ e instanceof Event && v("", "The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");
460
+ const s = this.constructor, r = this[e];
461
+ if (i ??= s.getPropertyOptions(e), (i.hasChanged ?? me)(r, t) || // When there is no change, check a corner case that can occur when
462
+ // 1. there's a initial value which was not reflected
463
+ // 2. the property is subsequently set to this value.
464
+ // For example, `prop: {useDefault: true, reflect: true}`
465
+ // and el.prop = 'foo'. This should be considered a change if the
466
+ // attribute is not set because we will now reflect the property to the attribute.
467
+ i.useDefault && i.reflect && r === this.__defaultValues?.get(e) && !this.hasAttribute(s.__attributeNameForProperty(e, i)))
468
+ this._$changeProperty(e, t, i);
469
+ else
470
+ return;
471
+ }
472
+ this.isUpdatePending === !1 && (this.__updatePromise = this.__enqueueUpdate());
473
+ }
474
+ /**
475
+ * @internal
476
+ */
477
+ _$changeProperty(e, t, { useDefault: i, reflect: s, wrapped: r }, o) {
478
+ i && !(this.__defaultValues ??= /* @__PURE__ */ new Map()).has(e) && (this.__defaultValues.set(e, o ?? t ?? this[e]), r !== !0 || o !== void 0) || (this._$changedProperties.has(e) || (!this.hasUpdated && !i && (t = void 0), this._$changedProperties.set(e, t)), s === !0 && this.__reflectingProperty !== e && (this.__reflectingProperties ??= /* @__PURE__ */ new Set()).add(e));
479
+ }
480
+ /**
481
+ * Sets up the element to asynchronously update.
482
+ */
483
+ async __enqueueUpdate() {
484
+ this.isUpdatePending = !0;
485
+ try {
486
+ await this.__updatePromise;
487
+ } catch (t) {
488
+ Promise.reject(t);
489
+ }
490
+ const e = this.scheduleUpdate();
491
+ return e != null && await e, !this.isUpdatePending;
492
+ }
493
+ /**
494
+ * Schedules an element update. You can override this method to change the
495
+ * timing of updates by returning a Promise. The update will await the
496
+ * returned Promise, and you should resolve the Promise to allow the update
497
+ * to proceed. If this method is overridden, `super.scheduleUpdate()`
498
+ * must be called.
499
+ *
500
+ * For instance, to schedule updates to occur just before the next frame:
501
+ *
502
+ * ```ts
503
+ * override protected async scheduleUpdate(): Promise<unknown> {
504
+ * await new Promise((resolve) => requestAnimationFrame(() => resolve()));
505
+ * super.scheduleUpdate();
506
+ * }
507
+ * ```
508
+ * @category updates
509
+ */
510
+ scheduleUpdate() {
511
+ const e = this.performUpdate();
512
+ return this.constructor.enabledWarnings.includes("async-perform-update") && typeof e?.then == "function" && v("async-perform-update", `Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`), e;
513
+ }
514
+ /**
515
+ * Performs an element update. Note, if an exception is thrown during the
516
+ * update, `firstUpdated` and `updated` will not be called.
517
+ *
518
+ * Call `performUpdate()` to immediately process a pending update. This should
519
+ * generally not be needed, but it can be done in rare cases when you need to
520
+ * update synchronously.
521
+ *
522
+ * @category updates
523
+ */
524
+ performUpdate() {
525
+ if (!this.isUpdatePending)
526
+ return;
527
+ if (dt?.({ kind: "update" }), !this.hasUpdated) {
528
+ this.renderRoot ??= this.createRenderRoot();
529
+ {
530
+ const r = [...this.constructor.elementProperties.keys()].filter((o) => this.hasOwnProperty(o) && o in Ne(this));
531
+ if (r.length)
532
+ throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${r.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`);
533
+ }
534
+ if (this.__instanceProperties) {
535
+ for (const [s, r] of this.__instanceProperties)
536
+ this[s] = r;
537
+ this.__instanceProperties = void 0;
538
+ }
539
+ const i = this.constructor.elementProperties;
540
+ if (i.size > 0)
541
+ for (const [s, r] of i) {
542
+ const { wrapped: o } = r, l = this[s];
543
+ o === !0 && !this._$changedProperties.has(s) && l !== void 0 && this._$changeProperty(s, void 0, r, l);
544
+ }
545
+ }
546
+ let e = !1;
547
+ const t = this._$changedProperties;
548
+ try {
549
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), this.__controllers?.forEach((i) => i.hostUpdate?.()), this.update(t)) : this.__markUpdated();
550
+ } catch (i) {
551
+ throw e = !1, this.__markUpdated(), i;
552
+ }
553
+ e && this._$didUpdate(t);
554
+ }
555
+ /**
556
+ * Invoked before `update()` to compute values needed during the update.
557
+ *
558
+ * Implement `willUpdate` to compute property values that depend on other
559
+ * properties and are used in the rest of the update process.
560
+ *
561
+ * ```ts
562
+ * willUpdate(changedProperties) {
563
+ * // only need to check changed properties for an expensive computation.
564
+ * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {
565
+ * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);
566
+ * }
567
+ * }
568
+ *
569
+ * render() {
570
+ * return html`SHA: ${this.sha}`;
571
+ * }
572
+ * ```
573
+ *
574
+ * @category updates
575
+ */
576
+ willUpdate(e) {
577
+ }
578
+ // Note, this is an override point for polyfill-support.
579
+ // @internal
580
+ _$didUpdate(e) {
581
+ this.__controllers?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e), this.isUpdatePending && this.constructor.enabledWarnings.includes("change-in-update") && v("change-in-update", `Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`);
582
+ }
583
+ __markUpdated() {
584
+ this._$changedProperties = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
585
+ }
586
+ /**
587
+ * Returns a Promise that resolves when the element has completed updating.
588
+ * The Promise value is a boolean that is `true` if the element completed the
589
+ * update without triggering another update. The Promise result is `false` if
590
+ * a property was set inside `updated()`. If the Promise is rejected, an
591
+ * exception was thrown during the update.
592
+ *
593
+ * To await additional asynchronous work, override the `getUpdateComplete`
594
+ * method. For example, it is sometimes useful to await a rendered element
595
+ * before fulfilling this Promise. To do this, first await
596
+ * `super.getUpdateComplete()`, then any subsequent state.
597
+ *
598
+ * @return A promise of a boolean that resolves to true if the update completed
599
+ * without triggering another update.
600
+ * @category updates
601
+ */
602
+ get updateComplete() {
603
+ return this.getUpdateComplete();
604
+ }
605
+ /**
606
+ * Override point for the `updateComplete` promise.
607
+ *
608
+ * It is not safe to override the `updateComplete` getter directly due to a
609
+ * limitation in TypeScript which means it is not possible to call a
610
+ * superclass getter (e.g. `super.updateComplete.then(...)`) when the target
611
+ * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).
612
+ * This method should be overridden instead. For example:
613
+ *
614
+ * ```ts
615
+ * class MyElement extends LitElement {
616
+ * override async getUpdateComplete() {
617
+ * const result = await super.getUpdateComplete();
618
+ * await this._myChild.updateComplete;
619
+ * return result;
620
+ * }
621
+ * }
622
+ * ```
623
+ *
624
+ * @return A promise of a boolean that resolves to true if the update completed
625
+ * without triggering another update.
626
+ * @category updates
627
+ */
628
+ getUpdateComplete() {
629
+ return this.__updatePromise;
630
+ }
631
+ /**
632
+ * Controls whether or not `update()` should be called when the element requests
633
+ * an update. By default, this method always returns `true`, but this can be
634
+ * customized to control when to update.
635
+ *
636
+ * @param _changedProperties Map of changed properties with old values
637
+ * @category updates
638
+ */
639
+ shouldUpdate(e) {
640
+ return !0;
641
+ }
642
+ /**
643
+ * Updates the element. This method reflects property values to attributes.
644
+ * It can be overridden to render and keep updated element DOM.
645
+ * Setting properties inside this method will *not* trigger
646
+ * another update.
647
+ *
648
+ * @param _changedProperties Map of changed properties with old values
649
+ * @category updates
650
+ */
651
+ update(e) {
652
+ this.__reflectingProperties &&= this.__reflectingProperties.forEach((t) => this.__propertyToAttribute(t, this[t])), this.__markUpdated();
653
+ }
654
+ /**
655
+ * Invoked whenever the element is updated. Implement to perform
656
+ * post-updating tasks via DOM APIs, for example, focusing an element.
657
+ *
658
+ * Setting properties inside this method will trigger the element to update
659
+ * again after this update cycle completes.
660
+ *
661
+ * @param _changedProperties Map of changed properties with old values
662
+ * @category updates
663
+ */
664
+ updated(e) {
665
+ }
666
+ /**
667
+ * Invoked when the element is first updated. Implement to perform one time
668
+ * work on the element after update.
669
+ *
670
+ * ```ts
671
+ * firstUpdated() {
672
+ * this.renderRoot.getElementById('my-text-area').focus();
673
+ * }
674
+ * ```
675
+ *
676
+ * Setting properties inside this method will trigger the element to update
677
+ * again after this update cycle completes.
678
+ *
679
+ * @param _changedProperties Map of changed properties with old values
680
+ * @category updates
681
+ */
682
+ firstUpdated(e) {
683
+ }
684
+ }
685
+ C.elementStyles = [];
686
+ C.shadowRootOptions = { mode: "open" };
687
+ C[V("elementProperties")] = /* @__PURE__ */ new Map();
688
+ C[V("finalized")] = /* @__PURE__ */ new Map();
689
+ je?.({ ReactiveElement: C });
690
+ {
691
+ C.enabledWarnings = [
692
+ "change-in-update",
693
+ "async-perform-update"
694
+ ];
695
+ const n = function(e) {
696
+ e.hasOwnProperty(V("enabledWarnings")) || (e.enabledWarnings = e.enabledWarnings.slice());
697
+ };
698
+ C.enableWarning = function(e) {
699
+ n(this), this.enabledWarnings.includes(e) || this.enabledWarnings.push(e);
700
+ }, C.disableWarning = function(e) {
701
+ n(this);
702
+ const t = this.enabledWarnings.indexOf(e);
703
+ t >= 0 && this.enabledWarnings.splice(t, 1);
704
+ };
705
+ }
706
+ ($.reactiveElementVersions ??= []).push("2.1.0");
707
+ $.reactiveElementVersions.length > 1 && queueMicrotask(() => {
708
+ v("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
709
+ });
710
+ const b = globalThis, u = (n) => {
711
+ b.emitLitDebugLogEvents && b.dispatchEvent(new CustomEvent("lit-debug", {
712
+ detail: n
713
+ }));
714
+ };
715
+ let ct = 0, H;
716
+ b.litIssuedWarnings ??= /* @__PURE__ */ new Set(), H = (n, e) => {
717
+ e += n ? ` See https://lit.dev/msg/${n} for more information.` : "", !b.litIssuedWarnings.has(e) && !b.litIssuedWarnings.has(n) && (console.warn(e), b.litIssuedWarnings.add(e));
11
718
  }, queueMicrotask(() => {
12
- I("dev-mode", "Lit is in dev mode. Not recommended for production!");
719
+ H("dev-mode", "Lit is in dev mode. Not recommended for production!");
13
720
  });
14
- const x = $.ShadyDOM?.inUse && $.ShadyDOM?.noPatch === !0 ? $.ShadyDOM.wrap : (o) => o, z = $.trustedTypes, pe = z ? z.createPolicy("lit-html", {
15
- createHTML: (o) => o
16
- }) : void 0, De = (o) => o, Ce = (o, e, t) => De, ue = (o, e, t) => j(), Ne = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Se = "?" + v, Ue = `<${Se}>`, V = document, O = () => V.createComment(""), D = (o) => o === null || typeof o != "object" && typeof o != "function", ie = Array.isArray, Ie = (o) => ie(o) || // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- typeof o?.[Symbol.iterator] == "function", K = `[
18
- \f\r]`, ze = `[^
19
- \f\r"'\`<>=]`, Oe = `[^\\s"'>=/]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fe = 1, G = 2, He = 3, ge = /-->/g, _e = />/g, S = new RegExp(`>|${K}(?:(${Oe}+)(${K}*=${K}*(?:${ze}|("|')|))|$)`, "g"), Be = 0, ye = 1, je = 2, $e = 3, Y = /'/g, Z = /"/g, Ee = /^(?:script|style|textarea|title)$/i, J = 2, ee = 3, se = 1, H = 2, We = 3, Fe = 4, Ke = 5, ne = 6, Ge = 7, N = /* @__PURE__ */ Symbol.for("lit-noChange"), _ = /* @__PURE__ */ Symbol.for("lit-nothing"), be = /* @__PURE__ */ new WeakMap(), A = V.createTreeWalker(
20
- V,
721
+ const S = b.ShadyDOM?.inUse && b.ShadyDOM?.noPatch === !0 ? b.ShadyDOM.wrap : (n) => n, Y = b.trustedTypes, Ae = Y ? Y.createPolicy("lit-html", {
722
+ createHTML: (n) => n
723
+ }) : void 0, ht = (n) => n, Z = (n, e, t) => ht, pt = (n) => {
724
+ if (O !== Z)
725
+ throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");
726
+ O = n;
727
+ }, ut = () => {
728
+ O = Z;
729
+ }, ce = (n, e, t) => O(n, e, t), Be = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, Fe = "?" + x, ft = `<${Fe}>`, k = document, j = () => k.createComment(""), B = (n) => n === null || typeof n != "object" && typeof n != "function", ge = Array.isArray, mt = (n) => ge(n) || // eslint-disable-next-line @typescript-eslint/no-explicit-any
730
+ typeof n?.[Symbol.iterator] == "function", se = `[
731
+ \f\r]`, gt = `[^
732
+ \f\r"'\`<>=]`, _t = `[^\\s"'>=/]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Re = 1, ne = 2, yt = 3, ke = /-->/g, Oe = />/g, U = new RegExp(`>|${se}(?:(${_t}+)(${se}*=${se}*(?:${gt}|("|')|))|$)`, "g"), bt = 0, Ve = 1, $t = 2, Le = 3, re = /'/g, oe = /"/g, qe = /^(?:script|style|textarea|title)$/i, wt = 1, he = 2, pe = 3, _e = 1, J = 2, St = 3, vt = 4, Pt = 5, ye = 6, xt = 7, Tt = (n) => (e, ...t) => (e.some((i) => i === void 0) && console.warn(`Some template strings are undefined.
733
+ This is probably caused by illegal octal escape sequences.`), t.some((i) => i?._$litStatic$) && H("", `Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
734
+ Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`), {
735
+ // This property needs to remain unminified.
736
+ _$litType$: n,
737
+ strings: e,
738
+ values: t
739
+ }), y = Tt(wt), E = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), De = /* @__PURE__ */ new WeakMap(), R = k.createTreeWalker(
740
+ k,
21
741
  129
22
742
  /* NodeFilter.SHOW_{ELEMENT|COMMENT} */
23
743
  );
24
- let j = Ce;
25
- function Ae(o, e) {
26
- if (!ie(o) || !o.hasOwnProperty("raw")) {
744
+ let O = Z;
745
+ function Ke(n, e) {
746
+ if (!ge(n) || !n.hasOwnProperty("raw")) {
27
747
  let t = "invalid template strings array";
28
748
  throw t = `
29
749
  Internal Error: expected template strings to be an array
@@ -38,87 +758,87 @@ function Ae(o, e) {
38
758
  `.trim().replace(/\n */g, `
39
759
  `), new Error(t);
40
760
  }
41
- return pe !== void 0 ? pe.createHTML(e) : e;
761
+ return Ae !== void 0 ? Ae.createHTML(e) : e;
42
762
  }
43
- const Ye = (o, e) => {
44
- const t = o.length - 1, i = [];
45
- let s = e === J ? "<svg>" : e === ee ? "<math>" : "", n, r = R;
763
+ const Ct = (n, e) => {
764
+ const t = n.length - 1, i = [];
765
+ let s = e === he ? "<svg>" : e === pe ? "<math>" : "", r, o = I;
46
766
  for (let a = 0; a < t; a++) {
47
- const c = o[a];
48
- let f = -1, m, d = 0, l;
49
- for (; d < c.length && (r.lastIndex = d, l = r.exec(c), l !== null); )
50
- if (d = r.lastIndex, r === R) {
51
- if (l[fe] === "!--")
52
- r = ge;
53
- else if (l[fe] !== void 0)
54
- r = _e;
55
- else if (l[G] !== void 0)
56
- Ee.test(l[G]) && (n = new RegExp(`</${l[G]}`, "g")), r = S;
57
- else if (l[He] !== void 0)
767
+ const h = n[a];
768
+ let g = -1, p, c = 0, d;
769
+ for (; c < h.length && (o.lastIndex = c, d = o.exec(h), d !== null); )
770
+ if (c = o.lastIndex, o === I) {
771
+ if (d[Re] === "!--")
772
+ o = ke;
773
+ else if (d[Re] !== void 0)
774
+ o = Oe;
775
+ else if (d[ne] !== void 0)
776
+ qe.test(d[ne]) && (r = new RegExp(`</${d[ne]}`, "g")), o = U;
777
+ else if (d[yt] !== void 0)
58
778
  throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions");
59
- } else r === S ? l[Be] === ">" ? (r = n ?? R, f = -1) : l[ye] === void 0 ? f = -2 : (f = r.lastIndex - l[je].length, m = l[ye], r = l[$e] === void 0 ? S : l[$e] === '"' ? Z : Y) : r === Z || r === Y ? r = S : r === ge || r === _e ? r = R : (r = S, n = void 0);
60
- console.assert(f === -1 || r === S || r === Y || r === Z, "unexpected parse state B");
61
- const p = r === S && o[a + 1].startsWith("/>") ? " " : "";
62
- s += r === R ? c + Ue : f >= 0 ? (i.push(m), c.slice(0, f) + Ne + c.slice(f) + v + p) : c + v + (f === -2 ? a : p);
779
+ } else o === U ? d[bt] === ">" ? (o = r ?? I, g = -1) : d[Ve] === void 0 ? g = -2 : (g = o.lastIndex - d[$t].length, p = d[Ve], o = d[Le] === void 0 ? U : d[Le] === '"' ? oe : re) : o === oe || o === re ? o = U : o === ke || o === Oe ? o = I : (o = U, r = void 0);
780
+ console.assert(g === -1 || o === U || o === re || o === oe, "unexpected parse state B");
781
+ const f = o === U && n[a + 1].startsWith("/>") ? " " : "";
782
+ s += o === I ? h + ft : g >= 0 ? (i.push(p), h.slice(0, g) + Be + h.slice(g) + x + f) : h + x + (g === -2 ? a : f);
63
783
  }
64
- const h = s + (o[t] || "<?>") + (e === J ? "</svg>" : e === ee ? "</math>" : "");
65
- return [Ae(o, h), i];
784
+ const l = s + (n[t] || "<?>") + (e === he ? "</svg>" : e === pe ? "</math>" : "");
785
+ return [Ke(n, l), i];
66
786
  };
67
- class U {
787
+ class F {
68
788
  constructor({ strings: e, ["_$litType$"]: t }, i) {
69
789
  this.parts = [];
70
- let s, n = 0, r = 0;
71
- const h = e.length - 1, a = this.parts, [c, f] = Ye(e, t);
72
- if (this.el = U.createElement(c, i), A.currentNode = this.el.content, t === J || t === ee) {
73
- const m = this.el.content.firstChild;
74
- m.replaceWith(...m.childNodes);
790
+ let s, r = 0, o = 0;
791
+ const l = e.length - 1, a = this.parts, [h, g] = Ct(e, t);
792
+ if (this.el = F.createElement(h, i), R.currentNode = this.el.content, t === he || t === pe) {
793
+ const p = this.el.content.firstChild;
794
+ p.replaceWith(...p.childNodes);
75
795
  }
76
- for (; (s = A.nextNode()) !== null && a.length < h; ) {
796
+ for (; (s = R.nextNode()) !== null && a.length < l; ) {
77
797
  if (s.nodeType === 1) {
78
798
  {
79
- const m = s.localName;
80
- if (/^(?:textarea|template)$/i.test(m) && s.innerHTML.includes(v)) {
81
- const d = `Expressions are not supported inside \`${m}\` elements. See https://lit.dev/msg/expression-in-${m} for more information.`;
82
- if (m === "template")
83
- throw new Error(d);
84
- I("", d);
799
+ const p = s.localName;
800
+ if (/^(?:textarea|template)$/i.test(p) && s.innerHTML.includes(x)) {
801
+ const c = `Expressions are not supported inside \`${p}\` elements. See https://lit.dev/msg/expression-in-${p} for more information.`;
802
+ if (p === "template")
803
+ throw new Error(c);
804
+ H("", c);
85
805
  }
86
806
  }
87
807
  if (s.hasAttributes())
88
- for (const m of s.getAttributeNames())
89
- if (m.endsWith(Ne)) {
90
- const d = f[r++], p = s.getAttribute(m).split(v), g = /([.?@])?(.*)/.exec(d);
808
+ for (const p of s.getAttributeNames())
809
+ if (p.endsWith(Be)) {
810
+ const c = g[o++], f = s.getAttribute(p).split(x), _ = /([.?@])?(.*)/.exec(c);
91
811
  a.push({
92
- type: se,
93
- index: n,
94
- name: g[2],
95
- strings: p,
96
- ctor: g[1] === "." ? qe : g[1] === "?" ? Qe : g[1] === "@" ? Xe : W
97
- }), s.removeAttribute(m);
98
- } else m.startsWith(v) && (a.push({
99
- type: ne,
100
- index: n
101
- }), s.removeAttribute(m));
102
- if (Ee.test(s.tagName)) {
103
- const m = s.textContent.split(v), d = m.length - 1;
104
- if (d > 0) {
105
- s.textContent = z ? z.emptyScript : "";
106
- for (let l = 0; l < d; l++)
107
- s.append(m[l], O()), A.nextNode(), a.push({ type: H, index: ++n });
108
- s.append(m[d], O());
812
+ type: _e,
813
+ index: r,
814
+ name: _[2],
815
+ strings: f,
816
+ ctor: _[1] === "." ? Nt : _[1] === "?" ? Mt : _[1] === "@" ? Ut : ee
817
+ }), s.removeAttribute(p);
818
+ } else p.startsWith(x) && (a.push({
819
+ type: ye,
820
+ index: r
821
+ }), s.removeAttribute(p));
822
+ if (qe.test(s.tagName)) {
823
+ const p = s.textContent.split(x), c = p.length - 1;
824
+ if (c > 0) {
825
+ s.textContent = Y ? Y.emptyScript : "";
826
+ for (let d = 0; d < c; d++)
827
+ s.append(p[d], j()), R.nextNode(), a.push({ type: J, index: ++r });
828
+ s.append(p[c], j());
109
829
  }
110
830
  }
111
831
  } else if (s.nodeType === 8)
112
- if (s.data === Se)
113
- a.push({ type: H, index: n });
832
+ if (s.data === Fe)
833
+ a.push({ type: J, index: r });
114
834
  else {
115
- let d = -1;
116
- for (; (d = s.data.indexOf(v, d + 1)) !== -1; )
117
- a.push({ type: Ge, index: n }), d += v.length - 1;
835
+ let c = -1;
836
+ for (; (c = s.data.indexOf(x, c + 1)) !== -1; )
837
+ a.push({ type: xt, index: r }), c += x.length - 1;
118
838
  }
119
- n++;
839
+ r++;
120
840
  }
121
- if (f.length !== r)
841
+ if (g.length !== o)
122
842
  throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`' + e.join("${...}") + "`");
123
843
  u && u({
124
844
  kind: "template prep",
@@ -131,21 +851,21 @@ class U {
131
851
  // Overridden via `litHtmlPolyfillSupport` to provide platform support.
132
852
  /** @nocollapse */
133
853
  static createElement(e, t) {
134
- const i = V.createElement("template");
854
+ const i = k.createElement("template");
135
855
  return i.innerHTML = e, i;
136
856
  }
137
857
  }
138
- function L(o, e, t = o, i) {
139
- if (e === N)
858
+ function L(n, e, t = n, i) {
859
+ if (e === E)
140
860
  return e;
141
861
  let s = i !== void 0 ? t.__directives?.[i] : t.__directive;
142
- const n = D(e) ? void 0 : (
862
+ const r = B(e) ? void 0 : (
143
863
  // This property needs to remain unminified.
144
864
  e._$litDirective$
145
865
  );
146
- return s?.constructor !== n && (s?._$notifyDirectiveConnectionChanged?.(!1), n === void 0 ? s = void 0 : (s = new n(o), s._$initialize(o, t, i)), i !== void 0 ? (t.__directives ??= [])[i] = s : t.__directive = s), s !== void 0 && (e = L(o, s._$resolve(o, e.values), s, i)), e;
866
+ return s?.constructor !== r && (s?._$notifyDirectiveConnectionChanged?.(!1), r === void 0 ? s = void 0 : (s = new r(n), s._$initialize(n, t, i)), i !== void 0 ? (t.__directives ??= [])[i] = s : t.__directive = s), s !== void 0 && (e = L(n, s._$resolve(n, e.values), s, i)), e;
147
867
  }
148
- class Ze {
868
+ class Et {
149
869
  constructor(e, t) {
150
870
  this._$parts = [], this._$disconnectableChildren = void 0, this._$template = e, this._$parent = t;
151
871
  }
@@ -160,17 +880,17 @@ class Ze {
160
880
  // This method is separate from the constructor because we need to return a
161
881
  // DocumentFragment and we don't want to hold onto it with an instance field.
162
882
  _clone(e) {
163
- const { el: { content: t }, parts: i } = this._$template, s = (e?.creationScope ?? V).importNode(t, !0);
164
- A.currentNode = s;
165
- let n = A.nextNode(), r = 0, h = 0, a = i[0];
883
+ const { el: { content: t }, parts: i } = this._$template, s = (e?.creationScope ?? k).importNode(t, !0);
884
+ R.currentNode = s;
885
+ let r = R.nextNode(), o = 0, l = 0, a = i[0];
166
886
  for (; a !== void 0; ) {
167
- if (r === a.index) {
168
- let c;
169
- a.type === H ? c = new oe(n, n.nextSibling, this, e) : a.type === se ? c = new a.ctor(n, a.name, a.strings, this, e) : a.type === ne && (c = new Je(n, this, e)), this._$parts.push(c), a = i[++h];
887
+ if (o === a.index) {
888
+ let h;
889
+ a.type === J ? h = new X(r, r.nextSibling, this, e) : a.type === _e ? h = new a.ctor(r, a.name, a.strings, this, e) : a.type === ye && (h = new At(r, this, e)), this._$parts.push(h), a = i[++l];
170
890
  }
171
- r !== a?.index && (n = A.nextNode(), r++);
891
+ o !== a?.index && (r = R.nextNode(), o++);
172
892
  }
173
- return A.currentNode = V, s;
893
+ return R.currentNode = k, s;
174
894
  }
175
895
  _update(e) {
176
896
  let t = 0;
@@ -185,13 +905,13 @@ class Ze {
185
905
  }), i.strings !== void 0 ? (i._$setValue(e, i, t), t += i.strings.length - 2) : i._$setValue(e[t])), t++;
186
906
  }
187
907
  }
188
- let oe = class Ve {
908
+ let X = class Ge {
189
909
  // See comment in Disconnectable interface for why this is a getter
190
910
  get _$isConnected() {
191
911
  return this._$parent?._$isConnected ?? this.__isConnected;
192
912
  }
193
913
  constructor(e, t, i, s) {
194
- this.type = H, this._$committedValue = _, this._$disconnectableChildren = void 0, this._$startNode = e, this._$endNode = t, this._$parent = i, this.options = s, this.__isConnected = s?.isConnected ?? !0, this._textSanitizer = void 0;
914
+ this.type = J, this._$committedValue = m, this._$disconnectableChildren = void 0, this._$startNode = e, this._$endNode = t, this._$parent = i, this.options = s, this.__isConnected = s?.isConnected ?? !0, this._textSanitizer = void 0;
195
915
  }
196
916
  /**
197
917
  * The parent node into which the part renders its content.
@@ -212,7 +932,7 @@ let oe = class Ve {
212
932
  * consists of all child nodes of `.parentNode`.
213
933
  */
214
934
  get parentNode() {
215
- let e = x(this._$startNode).parentNode;
935
+ let e = S(this._$startNode).parentNode;
216
936
  const t = this._$parent;
217
937
  return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
218
938
  }
@@ -233,14 +953,14 @@ let oe = class Ve {
233
953
  _$setValue(e, t = this) {
234
954
  if (this.parentNode === null)
235
955
  throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");
236
- if (e = L(this, e, t), D(e))
237
- e === _ || e == null || e === "" ? (this._$committedValue !== _ && (u && u({
956
+ if (e = L(this, e, t), B(e))
957
+ e === m || e == null || e === "" ? (this._$committedValue !== m && (u && u({
238
958
  kind: "commit nothing to child",
239
959
  start: this._$startNode,
240
960
  end: this._$endNode,
241
961
  parent: this._$parent,
242
962
  options: this.options
243
- }), this._$clear()), this._$committedValue = _) : e !== this._$committedValue && e !== N && this._commitText(e);
963
+ }), this._$clear()), this._$committedValue = m) : e !== this._$committedValue && e !== E && this._commitText(e);
244
964
  else if (e._$litType$ !== void 0)
245
965
  this._commitTemplateResult(e);
246
966
  else if (e.nodeType !== void 0) {
@@ -249,14 +969,14 @@ let oe = class Ve {
249
969
  return;
250
970
  }
251
971
  this._commitNode(e);
252
- } else Ie(e) ? this._commitIterable(e) : this._commitText(e);
972
+ } else mt(e) ? this._commitIterable(e) : this._commitText(e);
253
973
  }
254
974
  _insert(e) {
255
- return x(x(this._$startNode).parentNode).insertBefore(e, this._$endNode);
975
+ return S(S(this._$startNode).parentNode).insertBefore(e, this._$endNode);
256
976
  }
257
977
  _commitNode(e) {
258
978
  if (this._$committedValue !== e) {
259
- if (this._$clear(), j !== Ce) {
979
+ if (this._$clear(), O !== Z) {
260
980
  const t = this._$startNode.parentNode?.nodeName;
261
981
  if (t === "STYLE" || t === "SCRIPT") {
262
982
  let i = "Forbidden";
@@ -273,17 +993,17 @@ let oe = class Ve {
273
993
  }
274
994
  }
275
995
  _commitText(e) {
276
- if (this._$committedValue !== _ && D(this._$committedValue)) {
277
- const t = x(this._$startNode).nextSibling;
278
- this._textSanitizer === void 0 && (this._textSanitizer = ue()), e = this._textSanitizer(e), u && u({
996
+ if (this._$committedValue !== m && B(this._$committedValue)) {
997
+ const t = S(this._$startNode).nextSibling;
998
+ this._textSanitizer === void 0 && (this._textSanitizer = ce(t, "data", "property")), e = this._textSanitizer(e), u && u({
279
999
  kind: "commit text",
280
1000
  node: t,
281
1001
  value: e,
282
1002
  options: this.options
283
1003
  }), t.data = e;
284
1004
  } else {
285
- const t = V.createTextNode("");
286
- this._commitNode(t), this._textSanitizer === void 0 && (this._textSanitizer = ue()), e = this._textSanitizer(e), u && u({
1005
+ const t = k.createTextNode("");
1006
+ this._commitNode(t), this._textSanitizer === void 0 && (this._textSanitizer = ce(t, "data", "property")), e = this._textSanitizer(e), u && u({
287
1007
  kind: "commit text",
288
1008
  node: t,
289
1009
  value: e,
@@ -293,7 +1013,7 @@ let oe = class Ve {
293
1013
  this._$committedValue = e;
294
1014
  }
295
1015
  _commitTemplateResult(e) {
296
- const { values: t, ["_$litType$"]: i } = e, s = typeof i == "number" ? this._$getTemplate(e) : (i.el === void 0 && (i.el = U.createElement(Ae(i.h, i.h[0]), this.options)), i);
1016
+ const { values: t, ["_$litType$"]: i } = e, s = typeof i == "number" ? this._$getTemplate(e) : (i.el === void 0 && (i.el = F.createElement(Ke(i.h, i.h[0]), this.options)), i);
297
1017
  if (this._$committedValue?._$template === s)
298
1018
  u && u({
299
1019
  kind: "template updating",
@@ -304,39 +1024,39 @@ let oe = class Ve {
304
1024
  values: t
305
1025
  }), this._$committedValue._update(t);
306
1026
  else {
307
- const n = new Ze(s, this), r = n._clone(this.options);
1027
+ const r = new Et(s, this), o = r._clone(this.options);
308
1028
  u && u({
309
1029
  kind: "template instantiated",
310
1030
  template: s,
311
- instance: n,
312
- parts: n._$parts,
1031
+ instance: r,
1032
+ parts: r._$parts,
313
1033
  options: this.options,
314
- fragment: r,
1034
+ fragment: o,
315
1035
  values: t
316
- }), n._update(t), u && u({
1036
+ }), r._update(t), u && u({
317
1037
  kind: "template instantiated and updated",
318
1038
  template: s,
319
- instance: n,
320
- parts: n._$parts,
1039
+ instance: r,
1040
+ parts: r._$parts,
321
1041
  options: this.options,
322
- fragment: r,
1042
+ fragment: o,
323
1043
  values: t
324
- }), this._commitNode(r), this._$committedValue = n;
1044
+ }), this._commitNode(o), this._$committedValue = r;
325
1045
  }
326
1046
  }
327
1047
  // Overridden via `litHtmlPolyfillSupport` to provide platform support.
328
1048
  /** @internal */
329
1049
  _$getTemplate(e) {
330
- let t = be.get(e.strings);
331
- return t === void 0 && be.set(e.strings, t = new U(e)), t;
1050
+ let t = De.get(e.strings);
1051
+ return t === void 0 && De.set(e.strings, t = new F(e)), t;
332
1052
  }
333
1053
  _commitIterable(e) {
334
- ie(this._$committedValue) || (this._$committedValue = [], this._$clear());
1054
+ ge(this._$committedValue) || (this._$committedValue = [], this._$clear());
335
1055
  const t = this._$committedValue;
336
1056
  let i = 0, s;
337
- for (const n of e)
338
- i === t.length ? t.push(s = new Ve(this._insert(O()), this._insert(O()), this, this.options)) : s = t[i], s._$setValue(n), i++;
339
- i < t.length && (this._$clear(s && x(s._$endNode).nextSibling, i), t.length = i);
1057
+ for (const r of e)
1058
+ i === t.length ? t.push(s = new Ge(this._insert(j()), this._insert(j()), this, this.options)) : s = t[i], s._$setValue(r), i++;
1059
+ i < t.length && (this._$clear(s && S(s._$endNode).nextSibling, i), t.length = i);
340
1060
  }
341
1061
  /**
342
1062
  * Removes the nodes contained within this Part from the DOM.
@@ -349,10 +1069,10 @@ let oe = class Ve {
349
1069
  *
350
1070
  * @internal
351
1071
  */
352
- _$clear(e = x(this._$startNode).nextSibling, t) {
1072
+ _$clear(e = S(this._$startNode).nextSibling, t) {
353
1073
  for (this._$notifyConnectionChanged?.(!1, !0, t); e && e !== this._$endNode; ) {
354
- const i = x(e).nextSibling;
355
- x(e).remove(), e = i;
1074
+ const i = S(e).nextSibling;
1075
+ S(e).remove(), e = i;
356
1076
  }
357
1077
  }
358
1078
  /**
@@ -369,7 +1089,7 @@ let oe = class Ve {
369
1089
  throw new Error("part.setConnected() may only be called on a RootPart returned from render().");
370
1090
  }
371
1091
  };
372
- class W {
1092
+ class ee {
373
1093
  get tagName() {
374
1094
  return this.element.tagName;
375
1095
  }
@@ -377,8 +1097,8 @@ class W {
377
1097
  get _$isConnected() {
378
1098
  return this._$parent._$isConnected;
379
1099
  }
380
- constructor(e, t, i, s, n) {
381
- this.type = se, this._$committedValue = _, this._$disconnectableChildren = void 0, this.element = e, this.name = t, this._$parent = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$committedValue = new Array(i.length - 1).fill(new String()), this.strings = i) : this._$committedValue = _, this._sanitizer = void 0;
1100
+ constructor(e, t, i, s, r) {
1101
+ this.type = _e, this._$committedValue = m, this._$disconnectableChildren = void 0, this.element = e, this.name = t, this._$parent = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$committedValue = new Array(i.length - 1).fill(new String()), this.strings = i) : this._$committedValue = m, this._sanitizer = void 0;
382
1102
  }
383
1103
  /**
384
1104
  * Sets the value of this part by resolving the value from possibly multiple
@@ -403,48 +1123,48 @@ class W {
403
1123
  * @internal
404
1124
  */
405
1125
  _$setValue(e, t = this, i, s) {
406
- const n = this.strings;
407
- let r = !1;
408
- if (n === void 0)
409
- e = L(this, e, t, 0), r = !D(e) || e !== this._$committedValue && e !== N, r && (this._$committedValue = e);
1126
+ const r = this.strings;
1127
+ let o = !1;
1128
+ if (r === void 0)
1129
+ e = L(this, e, t, 0), o = !B(e) || e !== this._$committedValue && e !== E, o && (this._$committedValue = e);
410
1130
  else {
411
- const h = e;
412
- e = n[0];
413
- let a, c;
414
- for (a = 0; a < n.length - 1; a++)
415
- c = L(this, h[i + a], t, a), c === N && (c = this._$committedValue[a]), r ||= !D(c) || c !== this._$committedValue[a], c === _ ? e = _ : e !== _ && (e += (c ?? "") + n[a + 1]), this._$committedValue[a] = c;
1131
+ const l = e;
1132
+ e = r[0];
1133
+ let a, h;
1134
+ for (a = 0; a < r.length - 1; a++)
1135
+ h = L(this, l[i + a], t, a), h === E && (h = this._$committedValue[a]), o ||= !B(h) || h !== this._$committedValue[a], h === m ? e = m : e !== m && (e += (h ?? "") + r[a + 1]), this._$committedValue[a] = h;
416
1136
  }
417
- r && !s && this._commitValue(e);
1137
+ o && !s && this._commitValue(e);
418
1138
  }
419
1139
  /** @internal */
420
1140
  _commitValue(e) {
421
- e === _ ? x(this.element).removeAttribute(this.name) : (this._sanitizer === void 0 && (this._sanitizer = j(this.element, this.name)), e = this._sanitizer(e ?? ""), u && u({
1141
+ e === m ? S(this.element).removeAttribute(this.name) : (this._sanitizer === void 0 && (this._sanitizer = O(this.element, this.name, "attribute")), e = this._sanitizer(e ?? ""), u && u({
422
1142
  kind: "commit attribute",
423
1143
  element: this.element,
424
1144
  name: this.name,
425
1145
  value: e,
426
1146
  options: this.options
427
- }), x(this.element).setAttribute(this.name, e ?? ""));
1147
+ }), S(this.element).setAttribute(this.name, e ?? ""));
428
1148
  }
429
1149
  }
430
- class qe extends W {
1150
+ class Nt extends ee {
431
1151
  constructor() {
432
- super(...arguments), this.type = We;
1152
+ super(...arguments), this.type = St;
433
1153
  }
434
1154
  /** @internal */
435
1155
  _commitValue(e) {
436
- this._sanitizer === void 0 && (this._sanitizer = j(this.element, this.name)), e = this._sanitizer(e), u && u({
1156
+ this._sanitizer === void 0 && (this._sanitizer = O(this.element, this.name, "property")), e = this._sanitizer(e), u && u({
437
1157
  kind: "commit property",
438
1158
  element: this.element,
439
1159
  name: this.name,
440
1160
  value: e,
441
1161
  options: this.options
442
- }), this.element[this.name] = e === _ ? void 0 : e;
1162
+ }), this.element[this.name] = e === m ? void 0 : e;
443
1163
  }
444
1164
  }
445
- class Qe extends W {
1165
+ class Mt extends ee {
446
1166
  constructor() {
447
- super(...arguments), this.type = Fe;
1167
+ super(...arguments), this.type = vt;
448
1168
  }
449
1169
  /** @internal */
450
1170
  _commitValue(e) {
@@ -452,23 +1172,23 @@ class Qe extends W {
452
1172
  kind: "commit boolean attribute",
453
1173
  element: this.element,
454
1174
  name: this.name,
455
- value: !!(e && e !== _),
1175
+ value: !!(e && e !== m),
456
1176
  options: this.options
457
- }), x(this.element).toggleAttribute(this.name, !!e && e !== _);
1177
+ }), S(this.element).toggleAttribute(this.name, !!e && e !== m);
458
1178
  }
459
1179
  }
460
- class Xe extends W {
461
- constructor(e, t, i, s, n) {
462
- if (super(e, t, i, s, n), this.type = Ke, this.strings !== void 0)
1180
+ class Ut extends ee {
1181
+ constructor(e, t, i, s, r) {
1182
+ if (super(e, t, i, s, r), this.type = Pt, this.strings !== void 0)
463
1183
  throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`);
464
1184
  }
465
1185
  // EventPart does not use the base _$setValue/_resolveValue implementation
466
1186
  // since the dirty checking is more complex
467
1187
  /** @internal */
468
1188
  _$setValue(e, t = this) {
469
- if (e = L(this, e, t, 0) ?? _, e === N)
1189
+ if (e = L(this, e, t, 0) ?? m, e === E)
470
1190
  return;
471
- const i = this._$committedValue, s = e === _ && i !== _ || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== _ && (i === _ || s);
1191
+ const i = this._$committedValue, s = e === m && i !== m || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== m && (i === m || s);
472
1192
  u && u({
473
1193
  kind: "commit event listener",
474
1194
  element: this.element,
@@ -476,17 +1196,17 @@ class Xe extends W {
476
1196
  value: e,
477
1197
  options: this.options,
478
1198
  removeListener: s,
479
- addListener: n,
1199
+ addListener: r,
480
1200
  oldListener: i
481
- }), s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, e), this._$committedValue = e;
1201
+ }), s && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$committedValue = e;
482
1202
  }
483
1203
  handleEvent(e) {
484
1204
  typeof this._$committedValue == "function" ? this._$committedValue.call(this.options?.host ?? this.element, e) : this._$committedValue.handleEvent(e);
485
1205
  }
486
1206
  }
487
- class Je {
1207
+ class At {
488
1208
  constructor(e, t, i) {
489
- this.element = e, this.type = ne, this._$disconnectableChildren = void 0, this._$parent = t, this.options = i;
1209
+ this.element = e, this.type = ye, this._$disconnectableChildren = void 0, this._$parent = t, this.options = i;
490
1210
  }
491
1211
  // See comment in Disconnectable interface for why this is a getter
492
1212
  get _$isConnected() {
@@ -501,23 +1221,210 @@ class Je {
501
1221
  }), L(this, e);
502
1222
  }
503
1223
  }
504
- const et = {
505
- _ChildPart: oe
506
- }, tt = $.litHtmlPolyfillSupportDevMode;
507
- tt?.(U, oe);
508
- ($.litHtmlVersions ??= []).push("3.3.0");
509
- $.litHtmlVersions.length > 1 && queueMicrotask(() => {
510
- I("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
1224
+ const Rt = {
1225
+ _ChildPart: X
1226
+ }, kt = b.litHtmlPolyfillSupportDevMode;
1227
+ kt?.(F, X);
1228
+ (b.litHtmlVersions ??= []).push("3.3.0");
1229
+ b.litHtmlVersions.length > 1 && queueMicrotask(() => {
1230
+ H("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
511
1231
  });
512
- const re = {
1232
+ const K = (n, e, t) => {
1233
+ if (e == null)
1234
+ throw new TypeError(`The container to render into may not be ${e}`);
1235
+ const i = ct++, s = t?.renderBefore ?? e;
1236
+ let r = s._$litPart$;
1237
+ if (u && u({
1238
+ kind: "begin render",
1239
+ id: i,
1240
+ value: n,
1241
+ container: e,
1242
+ options: t,
1243
+ part: r
1244
+ }), r === void 0) {
1245
+ const o = t?.renderBefore ?? null;
1246
+ s._$litPart$ = r = new X(e.insertBefore(j(), o), o, void 0, t ?? {});
1247
+ }
1248
+ return r._$setValue(n), u && u({
1249
+ kind: "end render",
1250
+ id: i,
1251
+ value: n,
1252
+ container: e,
1253
+ options: t,
1254
+ part: r
1255
+ }), r;
1256
+ };
1257
+ K.setSanitizer = pt, K.createSanitizer = ce, K._testOnlyClearSanitizerFactoryDoNotCallOrElse = ut;
1258
+ const Ot = (n, e) => n, M = globalThis;
1259
+ let Ye;
1260
+ M.litIssuedWarnings ??= /* @__PURE__ */ new Set(), Ye = (n, e) => {
1261
+ e += ` See https://lit.dev/msg/${n} for more information.`, !M.litIssuedWarnings.has(e) && !M.litIssuedWarnings.has(n) && (console.warn(e), M.litIssuedWarnings.add(e));
1262
+ };
1263
+ class D extends C {
1264
+ constructor() {
1265
+ super(...arguments), this.renderOptions = { host: this }, this.__childPart = void 0;
1266
+ }
1267
+ /**
1268
+ * @category rendering
1269
+ */
1270
+ createRenderRoot() {
1271
+ const e = super.createRenderRoot();
1272
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
1273
+ }
1274
+ /**
1275
+ * Updates the element. This method reflects property values to attributes
1276
+ * and calls `render` to render DOM via lit-html. Setting properties inside
1277
+ * this method will *not* trigger another update.
1278
+ * @param changedProperties Map of changed properties with old values
1279
+ * @category updates
1280
+ */
1281
+ update(e) {
1282
+ const t = this.render();
1283
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this.__childPart = K(t, this.renderRoot, this.renderOptions);
1284
+ }
1285
+ /**
1286
+ * Invoked when the component is added to the document's DOM.
1287
+ *
1288
+ * In `connectedCallback()` you should setup tasks that should only occur when
1289
+ * the element is connected to the document. The most common of these is
1290
+ * adding event listeners to nodes external to the element, like a keydown
1291
+ * event handler added to the window.
1292
+ *
1293
+ * ```ts
1294
+ * connectedCallback() {
1295
+ * super.connectedCallback();
1296
+ * addEventListener('keydown', this._handleKeydown);
1297
+ * }
1298
+ * ```
1299
+ *
1300
+ * Typically, anything done in `connectedCallback()` should be undone when the
1301
+ * element is disconnected, in `disconnectedCallback()`.
1302
+ *
1303
+ * @category lifecycle
1304
+ */
1305
+ connectedCallback() {
1306
+ super.connectedCallback(), this.__childPart?.setConnected(!0);
1307
+ }
1308
+ /**
1309
+ * Invoked when the component is removed from the document's DOM.
1310
+ *
1311
+ * This callback is the main signal to the element that it may no longer be
1312
+ * used. `disconnectedCallback()` should ensure that nothing is holding a
1313
+ * reference to the element (such as event listeners added to nodes external
1314
+ * to the element), so that it is free to be garbage collected.
1315
+ *
1316
+ * ```ts
1317
+ * disconnectedCallback() {
1318
+ * super.disconnectedCallback();
1319
+ * window.removeEventListener('keydown', this._handleKeydown);
1320
+ * }
1321
+ * ```
1322
+ *
1323
+ * An element may be re-connected after being disconnected.
1324
+ *
1325
+ * @category lifecycle
1326
+ */
1327
+ disconnectedCallback() {
1328
+ super.disconnectedCallback(), this.__childPart?.setConnected(!1);
1329
+ }
1330
+ /**
1331
+ * Invoked on each update to perform rendering tasks. This method may return
1332
+ * any value renderable by lit-html's `ChildPart` - typically a
1333
+ * `TemplateResult`. Setting properties inside this method will *not* trigger
1334
+ * the element to update.
1335
+ * @category rendering
1336
+ */
1337
+ render() {
1338
+ return E;
1339
+ }
1340
+ }
1341
+ D._$litElement$ = !0;
1342
+ D[Ot("finalized")] = !0;
1343
+ M.litElementHydrateSupport?.({ LitElement: D });
1344
+ const Vt = M.litElementPolyfillSupportDevMode;
1345
+ Vt?.({ LitElement: D });
1346
+ (M.litElementVersions ??= []).push("4.2.0");
1347
+ M.litElementVersions.length > 1 && queueMicrotask(() => {
1348
+ Ye("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
1349
+ });
1350
+ const Lt = (n) => (e, t) => {
1351
+ t !== void 0 ? t.addInitializer(() => {
1352
+ customElements.define(n, e);
1353
+ }) : customElements.define(n, e);
1354
+ };
1355
+ let Je;
1356
+ globalThis.litIssuedWarnings ??= /* @__PURE__ */ new Set(), Je = (n, e) => {
1357
+ e += ` See https://lit.dev/msg/${n} for more information.`, !globalThis.litIssuedWarnings.has(e) && !globalThis.litIssuedWarnings.has(n) && (console.warn(e), globalThis.litIssuedWarnings.add(e));
1358
+ };
1359
+ const Dt = (n, e, t) => {
1360
+ const i = e.hasOwnProperty(t);
1361
+ return e.constructor.createProperty(t, n), i ? Object.getOwnPropertyDescriptor(e, t) : void 0;
1362
+ }, zt = {
1363
+ attribute: !0,
1364
+ type: String,
1365
+ converter: G,
1366
+ reflect: !1,
1367
+ hasChanged: me
1368
+ }, It = (n = zt, e, t) => {
1369
+ const { kind: i, metadata: s } = t;
1370
+ s == null && Je("missing-class-metadata", `The class ${e} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);
1371
+ let r = globalThis.litPropertyMetadata.get(s);
1372
+ if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), i === "setter" && (n = Object.create(n), n.wrapped = !0), r.set(t.name, n), i === "accessor") {
1373
+ const { name: o } = t;
1374
+ return {
1375
+ set(l) {
1376
+ const a = e.get.call(this);
1377
+ e.set.call(this, l), this.requestUpdate(o, a, n);
1378
+ },
1379
+ init(l) {
1380
+ return l !== void 0 && this._$changeProperty(o, void 0, n, l), l;
1381
+ }
1382
+ };
1383
+ } else if (i === "setter") {
1384
+ const { name: o } = t;
1385
+ return function(l) {
1386
+ const a = this[o];
1387
+ e.call(this, l), this.requestUpdate(o, a, n);
1388
+ };
1389
+ }
1390
+ throw new Error(`Unsupported decorator location: ${i}`);
1391
+ };
1392
+ function te(n) {
1393
+ return (e, t) => typeof t == "object" ? It(n, e, t) : Dt(n, e, t);
1394
+ }
1395
+ function z(n) {
1396
+ return te({
1397
+ ...n,
1398
+ // Add both `state` and `attribute` because we found a third party
1399
+ // controller that is keying off of PropertyOptions.state to determine
1400
+ // whether a field is a private internal property or not.
1401
+ state: !0,
1402
+ attribute: !1
1403
+ });
1404
+ }
1405
+ const Wt = (n, e, t) => (t.configurable = !0, t.enumerable = !0, // We check for Reflect.decorate each time, in case the zombiefill
1406
+ // is applied via lazy loading some Angular code.
1407
+ Reflect.decorate && typeof e != "object" && Object.defineProperty(n, e, t), t);
1408
+ globalThis.litIssuedWarnings ??= /* @__PURE__ */ new Set();
1409
+ function Ht(n, e) {
1410
+ return ((t, i, s) => {
1411
+ const r = (o) => o.renderRoot?.querySelector(n) ?? null;
1412
+ return Wt(t, i, {
1413
+ get() {
1414
+ return r(this);
1415
+ }
1416
+ });
1417
+ });
1418
+ }
1419
+ const be = {
513
1420
  ATTRIBUTE: 1,
514
1421
  CHILD: 2
515
- }, ae = (o) => (...e) => ({
1422
+ }, $e = (n) => (...e) => ({
516
1423
  // This property needs to remain unminified.
517
- _$litDirective$: o,
1424
+ _$litDirective$: n,
518
1425
  values: e
519
1426
  });
520
- class le {
1427
+ class we {
521
1428
  constructor(e) {
522
1429
  }
523
1430
  // See comment in Disconnectable interface for why this is a getter
@@ -536,10 +1443,10 @@ class le {
536
1443
  return this.render(...t);
537
1444
  }
538
1445
  }
539
- const Le = "important", Me = " !" + Le, it = 0 - Me.length;
540
- class st extends le {
1446
+ const Qe = "important", Ze = " !" + Qe, jt = 0 - Ze.length;
1447
+ class Bt extends we {
541
1448
  constructor(e) {
542
- if (super(e), e.type !== re.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2)
1449
+ if (super(e), e.type !== be.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2)
543
1450
  throw new Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
544
1451
  }
545
1452
  render(e) {
@@ -555,27 +1462,27 @@ class st extends le {
555
1462
  for (const s of this._previousStyleProperties)
556
1463
  t[s] == null && (this._previousStyleProperties.delete(s), s.includes("-") ? i.removeProperty(s) : i[s] = null);
557
1464
  for (const s in t) {
558
- const n = t[s];
559
- if (n != null) {
1465
+ const r = t[s];
1466
+ if (r != null) {
560
1467
  this._previousStyleProperties.add(s);
561
- const r = typeof n == "string" && n.endsWith(Me);
562
- s.includes("-") || r ? i.setProperty(s, r ? n.slice(0, it) : n, r ? Le : "") : i[s] = n;
1468
+ const o = typeof r == "string" && r.endsWith(Ze);
1469
+ s.includes("-") || o ? i.setProperty(s, o ? r.slice(0, jt) : r, o ? Qe : "") : i[s] = r;
563
1470
  }
564
1471
  }
565
- return N;
1472
+ return E;
566
1473
  }
567
1474
  }
568
- const q = ae(st);
569
- const nt = 1;
570
- class de extends le {
1475
+ const ae = $e(Bt);
1476
+ const Ft = 1;
1477
+ class Se extends we {
571
1478
  constructor(e) {
572
- if (super(e), this._value = _, e.type !== re.CHILD)
1479
+ if (super(e), this._value = m, e.type !== be.CHILD)
573
1480
  throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`);
574
1481
  }
575
1482
  render(e) {
576
- if (e === _ || e == null)
1483
+ if (e === m || e == null)
577
1484
  return this._templateResult = void 0, this._value = e;
578
- if (e === N)
1485
+ if (e === E)
579
1486
  return e;
580
1487
  if (typeof e != "string")
581
1488
  throw new Error(`${this.constructor.directiveName}() called with a non-string value`);
@@ -593,127 +1500,127 @@ class de extends le {
593
1500
  };
594
1501
  }
595
1502
  }
596
- de.directiveName = "unsafeHTML";
597
- de.resultType = nt;
598
- const ot = 2;
599
- class ce extends de {
1503
+ Se.directiveName = "unsafeHTML";
1504
+ Se.resultType = Ft;
1505
+ const qt = 2;
1506
+ class ve extends Se {
600
1507
  }
601
- ce.directiveName = "unsafeSVG";
602
- ce.resultType = ot;
603
- const rt = ae(ce);
604
- const { _ChildPart: at } = et, T = window.ShadyDOM?.inUse && window.ShadyDOM?.noPatch === !0 ? window.ShadyDOM.wrap : (o) => o, xe = () => document.createComment(""), k = (o, e, t) => {
605
- const i = T(o._$startNode).parentNode, s = e === void 0 ? o._$endNode : e._$startNode;
1508
+ ve.directiveName = "unsafeSVG";
1509
+ ve.resultType = qt;
1510
+ const Kt = $e(ve);
1511
+ const { _ChildPart: Gt } = Rt, T = window.ShadyDOM?.inUse && window.ShadyDOM?.noPatch === !0 ? window.ShadyDOM.wrap : (n) => n, ze = () => document.createComment(""), W = (n, e, t) => {
1512
+ const i = T(n._$startNode).parentNode, s = e === void 0 ? n._$endNode : e._$startNode;
606
1513
  if (t === void 0) {
607
- const n = T(i).insertBefore(xe(), s), r = T(i).insertBefore(xe(), s);
608
- t = new at(n, r, o, o.options);
1514
+ const r = T(i).insertBefore(ze(), s), o = T(i).insertBefore(ze(), s);
1515
+ t = new Gt(r, o, n, n.options);
609
1516
  } else {
610
- const n = T(t._$endNode).nextSibling, r = t._$parent, h = r !== o;
611
- if (h) {
612
- t._$reparentDisconnectables?.(o), t._$parent = o;
1517
+ const r = T(t._$endNode).nextSibling, o = t._$parent, l = o !== n;
1518
+ if (l) {
1519
+ t._$reparentDisconnectables?.(n), t._$parent = n;
613
1520
  let a;
614
- t._$notifyConnectionChanged !== void 0 && (a = o._$isConnected) !== r._$isConnected && t._$notifyConnectionChanged(a);
1521
+ t._$notifyConnectionChanged !== void 0 && (a = n._$isConnected) !== o._$isConnected && t._$notifyConnectionChanged(a);
615
1522
  }
616
- if (n !== s || h) {
1523
+ if (r !== s || l) {
617
1524
  let a = t._$startNode;
618
- for (; a !== n; ) {
619
- const c = T(a).nextSibling;
620
- T(i).insertBefore(a, s), a = c;
1525
+ for (; a !== r; ) {
1526
+ const h = T(a).nextSibling;
1527
+ T(i).insertBefore(a, s), a = h;
621
1528
  }
622
1529
  }
623
1530
  }
624
1531
  return t;
625
- }, E = (o, e, t = o) => (o._$setValue(e, t), o), lt = {}, dt = (o, e = lt) => o._$committedValue = e, ct = (o) => o._$committedValue, Q = (o) => {
626
- o._$notifyConnectionChanged?.(!1, !0);
627
- let e = o._$startNode;
628
- const t = T(o._$endNode).nextSibling;
1532
+ }, A = (n, e, t = n) => (n._$setValue(e, t), n), Yt = {}, Jt = (n, e = Yt) => n._$committedValue = e, Qt = (n) => n._$committedValue, le = (n) => {
1533
+ n._$notifyConnectionChanged?.(!1, !0);
1534
+ let e = n._$startNode;
1535
+ const t = T(n._$endNode).nextSibling;
629
1536
  for (; e !== t; ) {
630
1537
  const i = T(e).nextSibling;
631
1538
  T(e).remove(), e = i;
632
1539
  }
633
1540
  };
634
- const we = (o, e, t) => {
1541
+ const Ie = (n, e, t) => {
635
1542
  const i = /* @__PURE__ */ new Map();
636
1543
  for (let s = e; s <= t; s++)
637
- i.set(o[s], s);
1544
+ i.set(n[s], s);
638
1545
  return i;
639
1546
  };
640
- class ht extends le {
1547
+ class Zt extends we {
641
1548
  constructor(e) {
642
- if (super(e), e.type !== re.CHILD)
1549
+ if (super(e), e.type !== be.CHILD)
643
1550
  throw new Error("repeat() can only be used in text expressions");
644
1551
  }
645
1552
  _getValuesAndKeys(e, t, i) {
646
1553
  let s;
647
1554
  i === void 0 ? i = t : t !== void 0 && (s = t);
648
- const n = [], r = [];
649
- let h = 0;
1555
+ const r = [], o = [];
1556
+ let l = 0;
650
1557
  for (const a of e)
651
- n[h] = s ? s(a, h) : h, r[h] = i(a, h), h++;
1558
+ r[l] = s ? s(a, l) : l, o[l] = i(a, l), l++;
652
1559
  return {
653
- values: r,
654
- keys: n
1560
+ values: o,
1561
+ keys: r
655
1562
  };
656
1563
  }
657
1564
  render(e, t, i) {
658
1565
  return this._getValuesAndKeys(e, t, i).values;
659
1566
  }
660
1567
  update(e, [t, i, s]) {
661
- const n = ct(e), { values: r, keys: h } = this._getValuesAndKeys(t, i, s);
662
- if (!Array.isArray(n))
663
- return this._itemKeys = h, r;
664
- const a = this._itemKeys ??= [], c = [];
665
- let f, m, d = 0, l = n.length - 1, p = 0, g = r.length - 1;
666
- for (; d <= l && p <= g; )
667
- if (n[d] === null)
668
- d++;
669
- else if (n[l] === null)
670
- l--;
671
- else if (a[d] === h[p])
672
- c[p] = E(n[d], r[p]), d++, p++;
673
- else if (a[l] === h[g])
674
- c[g] = E(n[l], r[g]), l--, g--;
675
- else if (a[d] === h[g])
676
- c[g] = E(n[d], r[g]), k(e, c[g + 1], n[d]), d++, g--;
677
- else if (a[l] === h[p])
678
- c[p] = E(n[l], r[p]), k(e, n[d], n[l]), l--, p++;
679
- else if (f === void 0 && (f = we(h, p, g), m = we(a, d, l)), !f.has(a[d]))
680
- Q(n[d]), d++;
681
- else if (!f.has(a[l]))
682
- Q(n[l]), l--;
1568
+ const r = Qt(e), { values: o, keys: l } = this._getValuesAndKeys(t, i, s);
1569
+ if (!Array.isArray(r))
1570
+ return this._itemKeys = l, o;
1571
+ const a = this._itemKeys ??= [], h = [];
1572
+ let g, p, c = 0, d = r.length - 1, f = 0, _ = o.length - 1;
1573
+ for (; c <= d && f <= _; )
1574
+ if (r[c] === null)
1575
+ c++;
1576
+ else if (r[d] === null)
1577
+ d--;
1578
+ else if (a[c] === l[f])
1579
+ h[f] = A(r[c], o[f]), c++, f++;
1580
+ else if (a[d] === l[_])
1581
+ h[_] = A(r[d], o[_]), d--, _--;
1582
+ else if (a[c] === l[_])
1583
+ h[_] = A(r[c], o[_]), W(e, h[_ + 1], r[c]), c++, _--;
1584
+ else if (a[d] === l[f])
1585
+ h[f] = A(r[d], o[f]), W(e, r[c], r[d]), d--, f++;
1586
+ else if (g === void 0 && (g = Ie(l, f, _), p = Ie(a, c, d)), !g.has(a[c]))
1587
+ le(r[c]), c++;
1588
+ else if (!g.has(a[d]))
1589
+ le(r[d]), d--;
683
1590
  else {
684
- const w = m.get(h[p]), F = w !== void 0 ? n[w] : null;
685
- if (F === null) {
686
- const me = k(e, n[d]);
687
- E(me, r[p]), c[p] = me;
1591
+ const P = p.get(l[f]), ie = P !== void 0 ? r[P] : null;
1592
+ if (ie === null) {
1593
+ const xe = W(e, r[c]);
1594
+ A(xe, o[f]), h[f] = xe;
688
1595
  } else
689
- c[p] = E(F, r[p]), k(e, n[d], F), n[w] = null;
690
- p++;
1596
+ h[f] = A(ie, o[f]), W(e, r[c], ie), r[P] = null;
1597
+ f++;
691
1598
  }
692
- for (; p <= g; ) {
693
- const w = k(e, c[g + 1]);
694
- E(w, r[p]), c[p++] = w;
1599
+ for (; f <= _; ) {
1600
+ const P = W(e, h[_ + 1]);
1601
+ A(P, o[f]), h[f++] = P;
695
1602
  }
696
- for (; d <= l; ) {
697
- const w = n[d++];
698
- w !== null && Q(w);
1603
+ for (; c <= d; ) {
1604
+ const P = r[c++];
1605
+ P !== null && le(P);
699
1606
  }
700
- return this._itemKeys = h, dt(e, c), N;
1607
+ return this._itemKeys = l, Jt(e, h), E;
701
1608
  }
702
1609
  }
703
- const X = ae(ht);
704
- var mt = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, Pe = (o, e, t, i) => {
705
- for (var s = i > 1 ? void 0 : i ? pt(e, t) : e, n = o.length - 1, r; n >= 0; n--)
706
- (r = o[n]) && (s = (i ? r(e, t, s) : r(s)) || s);
707
- return i && s && mt(e, t, s), s;
1610
+ const de = $e(Zt);
1611
+ var Xt = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, Xe = (n, e, t, i) => {
1612
+ for (var s = i > 1 ? void 0 : i ? ei(e, t) : e, r = n.length - 1, o; r >= 0; r--)
1613
+ (o = n[r]) && (s = (i ? o(e, t, s) : o(s)) || s);
1614
+ return i && s && Xt(e, t, s), s;
708
1615
  };
709
- let B = class extends Te {
1616
+ let Q = class extends D {
710
1617
  render() {
711
1618
  return y`
712
1619
  ${this.value !== void 0 ? y`<div class="bar" style="width: ${this.value * 100}%;"></div>` : y`<div class="indeterminate"></div>`}
713
1620
  `;
714
1621
  }
715
1622
  };
716
- B.styles = ve`
1623
+ Q.styles = He`
717
1624
  :host {
718
1625
  display: inline-block;
719
1626
  width: var(--progress-width, 200px);
@@ -755,20 +1662,20 @@ B.styles = ve`
755
1662
  }
756
1663
  }
757
1664
  `;
758
- Pe([
1665
+ Xe([
759
1666
  te({ type: Number })
760
- ], B.prototype, "value", 2);
761
- B = Pe([
762
- Re("linear-progress")
763
- ], B);
764
- var ut = Object.defineProperty, C = (o, e, t, i) => {
765
- for (var s = void 0, n = o.length - 1, r; n >= 0; n--)
766
- (r = o[n]) && (s = r(e, t, s) || s);
767
- return s && ut(e, t, s), s;
1667
+ ], Q.prototype, "value", 2);
1668
+ Q = Xe([
1669
+ Lt("linear-progress")
1670
+ ], Q);
1671
+ var ti = Object.defineProperty, N = (n, e, t, i) => {
1672
+ for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
1673
+ (o = n[r]) && (s = o(e, t, s) || s);
1674
+ return s && ti(e, t, s), s;
768
1675
  };
769
- const he = class he extends Te {
1676
+ const Pe = class Pe extends D {
770
1677
  constructor() {
771
- super(), this.version = "1.0.7", this.getModifier = this.getModifier.bind(this);
1678
+ super(), this.version = "1.0.9", this.getModifier = this.getModifier.bind(this);
772
1679
  }
773
1680
  update(e) {
774
1681
  e.has("inputData") && (this.transform(), this.modifier || this.getModifier()), e.has("theme") && this.registerTheme(this.theme), super.update(e);
@@ -833,20 +1740,20 @@ const he = class he extends Te {
833
1740
  if (this.baseLayer instanceof HTMLImageElement)
834
1741
  i = this.baseLayer.naturalWidth, s = this.baseLayer.naturalHeight;
835
1742
  else {
836
- const d = this.baseLayer.querySelector("svg");
837
- if (d) {
838
- const l = d.viewBox.baseVal;
839
- if (console.log(l), l && l.width > 0 && l.height > 0)
840
- i = l.width, s = l.height;
1743
+ const c = this.baseLayer.querySelector("svg");
1744
+ if (c) {
1745
+ const d = c.viewBox.baseVal;
1746
+ if (console.log(d), d && d.width > 0 && d.height > 0)
1747
+ i = d.width, s = d.height;
841
1748
  else {
842
- const p = this.baseLayer.getAttribute("width"), g = this.baseLayer.getAttribute("height");
843
- p && g && (i = parseFloat(p), s = parseFloat(g));
1749
+ const f = this.baseLayer.getAttribute("width"), _ = this.baseLayer.getAttribute("height");
1750
+ f && _ && (i = parseFloat(f), s = parseFloat(_));
844
1751
  }
845
1752
  }
846
1753
  }
847
1754
  if (!i || !s) return;
848
- const n = e.width / i, r = e.height / s, h = Math.min(n, r), a = i * h, c = s * h, f = (t.width - a) / 2, m = (t.height - c) / 2;
849
- this.modifier = { scaler: h, xOffset: f, yOffset: m, visibleWidth: a, visibleHeight: c };
1755
+ const r = e.width / i, o = e.height / s, l = Math.min(r, o), a = i * l, h = s * l, g = (t.width - a) / 2, p = (t.height - h) / 2;
1756
+ this.modifier = { scaler: l, xOffset: g, yOffset: p, visibleWidth: a, visibleHeight: h };
850
1757
  }
851
1758
  getOverlayItemPosition(e, t, i) {
852
1759
  return {
@@ -855,53 +1762,53 @@ const he = class he extends Te {
855
1762
  };
856
1763
  }
857
1764
  renderText(e, t, i) {
858
- const s = e, n = this.getOverlayItemPosition(t.relXPos, t.relYPos, i);
859
- if (!n) return P;
860
- const r = s.textStyle?.precision ?? 1;
861
- let h = t.data;
862
- const a = Number(h);
863
- let c = "#333";
864
- if (!Number.isNaN(a) && typeof r == "number" && r >= 0) {
865
- h = a.toFixed(r);
866
- const m = s.sections?.sectionLimits.findIndex((d) => a <= d) ?? -2;
867
- c = (m >= 1 ? s.sections?.colors[m - 1] : "#333") ?? "#333";
1765
+ const s = e, r = this.getOverlayItemPosition(t.relXPos, t.relYPos, i);
1766
+ if (!r) return m;
1767
+ const o = s.textStyle?.precision ?? 1;
1768
+ let l = t.data;
1769
+ const a = Number(l);
1770
+ let h = "#333";
1771
+ if (!Number.isNaN(a) && typeof o == "number" && o >= 0) {
1772
+ l = a.toFixed(o);
1773
+ const p = s.sections?.sectionLimits.findIndex((c) => a <= c) ?? -2;
1774
+ h = (p >= 1 ? s.sections?.colors[p - 1] : "#333") ?? "#333";
868
1775
  }
869
- const f = {
1776
+ const g = {
870
1777
  "font-size": (s.textStyle.fontSize ?? 14) * i.scaler + "px",
871
- color: c,
1778
+ color: h,
872
1779
  "background-color": s.textStyle.backgroundColor,
873
1780
  "font-weight": s.textStyle.fontWeight,
874
- left: `${n.left}px`,
875
- top: `${n.top}px`,
1781
+ left: `${r.left}px`,
1782
+ top: `${r.top}px`,
876
1783
  "border-radius": 10 * i.scaler + "px",
877
1784
  "transform-origin": "50% 50%",
878
1785
  transform: "translate(-50%, -50%)",
879
1786
  padding: `${6 * i.scaler}px ${12 * i.scaler}px`
880
1787
  };
881
1788
  return y`
882
- <div class="overlay-item" style=${q(f)}>${t.prefix}${h}${t.suffix}</div>
1789
+ <div class="overlay-item" style=${ae(g)}>${t.prefix}${l}${t.suffix}</div>
883
1790
  `;
884
1791
  }
885
1792
  renderProgress(e, t, i) {
886
- const s = e, n = this.getOverlayItemPosition(t.relXPos, t.relYPos, i);
887
- if (!n) return P;
888
- const r = s.sections?.sectionLimits.findIndex((p) => Number(t.data) <= p) ?? -2, a = {
889
- "--progress-color": (r >= 1 ? s.sections?.colors[r - 1] : void 0) ?? "#333",
1793
+ const s = e, r = this.getOverlayItemPosition(t.relXPos, t.relYPos, i);
1794
+ if (!r) return m;
1795
+ const o = s.sections?.sectionLimits.findIndex((f) => Number(t.data) <= f) ?? -2, a = {
1796
+ "--progress-color": (o >= 1 ? s.sections?.colors[o - 1] : void 0) ?? "#333",
890
1797
  "--progress-width": (s.progressStyle?.width ?? 10) * i.scaler + "px",
891
1798
  "--progress-height": (s.progressStyle?.height ?? 100) * i.scaler + "px",
892
1799
  "--progress-background": s.progressStyle?.backgroundColor ?? "#fff",
893
1800
  "border-radius": 10 * i.scaler + "px",
894
1801
  "transform-origin": "50% 50%",
895
1802
  transform: `translate(-50%, -50%) rotate(${s.progressStyle?.rotate ?? 0}deg)`,
896
- left: `${n.left}px`,
897
- top: `${n.top}px`
898
- }, c = Number(t.data), f = s.sections ?? {}, m = Math.min(...f.sectionLimits.map(Number)), d = Math.max(...f.sectionLimits.map(Number));
899
- let l = d === m ? 0 : (c - m) / (d - m);
900
- return l = Math.min(1, Math.max(0, l)), y` <linear-progress .value=${l} style=${q(a)}></linear-progress> `;
1803
+ left: `${r.left}px`,
1804
+ top: `${r.top}px`
1805
+ }, h = Number(t.data), g = s.sections ?? {}, p = Math.min(...g.sectionLimits.map(Number)), c = Math.max(...g.sectionLimits.map(Number));
1806
+ let d = c === p ? 0 : (h - p) / (c - p);
1807
+ return d = Math.min(1, Math.max(0, d)), y` <linear-progress .value=${d} style=${ae(a)}></linear-progress> `;
901
1808
  }
902
1809
  renderLayer(e) {
903
1810
  const t = this.modifier;
904
- if (!t) return P;
1811
+ if (!t) return m;
905
1812
  const i = {
906
1813
  left: t.xOffset + "px",
907
1814
  top: t.yOffset + "px",
@@ -910,7 +1817,7 @@ const he = class he extends Te {
910
1817
  };
911
1818
  return y`<div
912
1819
  class="overlay"
913
- style=${q(i)}
1820
+ style=${ae(i)}
914
1821
  type="${e.layerType}"
915
1822
  name="${e.layerName}"
916
1823
  >
@@ -919,19 +1826,19 @@ const he = class he extends Te {
919
1826
  }
920
1827
  renderTextLayer(e) {
921
1828
  const t = this.modifier;
922
- return t ? y`${X(
1829
+ return t ? y`${de(
923
1830
  e.textPins ?? [],
924
1831
  (i, s) => s,
925
1832
  (i) => y`${this.renderText(e, i, t)}`
926
- )}` : P;
1833
+ )}` : m;
927
1834
  }
928
1835
  renderProgressLayer(e) {
929
1836
  const t = this.modifier;
930
- return t ? y`${X(
1837
+ return t ? y`${de(
931
1838
  e.progressPins ?? [],
932
1839
  (i, s) => s,
933
1840
  (i) => y`${this.renderProgress(e, i, t)}`
934
- )}` : P;
1841
+ )}` : m;
935
1842
  }
936
1843
  render() {
937
1844
  const e = !!this.inlineSvg || !!this.previewUrl;
@@ -950,14 +1857,14 @@ const he = class he extends Te {
950
1857
 
951
1858
  <div class="paging no-data" ?active=${!e}>No Image</div>
952
1859
  <div class="img-container paging" ?active="${e}">
953
- ${this.inlineSvg ? y`<div id="base-layer" class="svg-wrapper">${rt(this.inlineSvg)}</div>` : this.previewUrl ? y`<img
1860
+ ${this.inlineSvg ? y`<div id="base-layer" class="svg-wrapper">${Kt(this.inlineSvg)}</div>` : this.previewUrl ? y`<img
954
1861
  id="base-layer"
955
1862
  @load="${this.getModifier}"
956
1863
  src="${this.previewUrl}"
957
1864
  alt="Image Widget"
958
1865
  style="object-fit: ${this.inputData?.stretchToFit ? "fill" : "contain"}"
959
1866
  />` : ""}
960
- ${X(
1867
+ ${de(
961
1868
  this.inputData?.overlays ?? [],
962
1869
  (t) => t.layerName,
963
1870
  (t) => y` ${this.renderLayer(t)} `
@@ -967,12 +1874,13 @@ const he = class he extends Te {
967
1874
  `;
968
1875
  }
969
1876
  };
970
- he.styles = ve`
1877
+ Pe.styles = He`
971
1878
  :host {
972
1879
  display: block;
973
1880
  font-family: sans-serif;
974
1881
  box-sizing: border-box;
975
1882
  margin: auto;
1883
+ container-type: size;
976
1884
  }
977
1885
 
978
1886
  .paging:not([active]) {
@@ -984,7 +1892,7 @@ he.styles = ve`
984
1892
  flex-direction: column;
985
1893
  height: 100%;
986
1894
  width: 100%;
987
- padding: 2%;
1895
+ padding: 2cqh 2cqw;
988
1896
  box-sizing: border-box;
989
1897
  }
990
1898
 
@@ -1050,36 +1958,36 @@ he.styles = ve`
1050
1958
  pointer-events: auto;
1051
1959
  }
1052
1960
  `;
1053
- let b = he;
1054
- C([
1961
+ let w = Pe;
1962
+ N([
1055
1963
  te({ type: Object })
1056
- ], b.prototype, "inputData");
1057
- C([
1964
+ ], w.prototype, "inputData");
1965
+ N([
1058
1966
  te({ type: Object })
1059
- ], b.prototype, "theme");
1060
- C([
1061
- M()
1062
- ], b.prototype, "themeBgColor");
1063
- C([
1064
- M()
1065
- ], b.prototype, "themeTitleColor");
1066
- C([
1067
- M()
1068
- ], b.prototype, "themeSubtitleColor");
1069
- C([
1070
- M()
1071
- ], b.prototype, "previewUrl");
1072
- C([
1073
- M()
1074
- ], b.prototype, "inlineSvg");
1075
- C([
1076
- M()
1077
- ], b.prototype, "modifier");
1078
- C([
1079
- ke("#base-layer")
1080
- ], b.prototype, "baseLayer");
1081
- window.customElements.define("widget-overlay-1.0.7", b);
1967
+ ], w.prototype, "theme");
1968
+ N([
1969
+ z()
1970
+ ], w.prototype, "themeBgColor");
1971
+ N([
1972
+ z()
1973
+ ], w.prototype, "themeTitleColor");
1974
+ N([
1975
+ z()
1976
+ ], w.prototype, "themeSubtitleColor");
1977
+ N([
1978
+ z()
1979
+ ], w.prototype, "previewUrl");
1980
+ N([
1981
+ z()
1982
+ ], w.prototype, "inlineSvg");
1983
+ N([
1984
+ z()
1985
+ ], w.prototype, "modifier");
1986
+ N([
1987
+ Ht("#base-layer")
1988
+ ], w.prototype, "baseLayer");
1989
+ window.customElements.define("widget-overlay-1.0.9", w);
1082
1990
  export {
1083
- b as WidgetImage
1991
+ w as WidgetImage
1084
1992
  };
1085
1993
  //# sourceMappingURL=widget-overlay.js.map