@record-evolution/widget-image 1.1.15 → 1.1.17

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,15 +1,15 @@
1
- const z = globalThis, V = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, G = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
1
+ const z = globalThis, F = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, G = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
2
2
  let pt = class {
3
- constructor(t, e, i) {
4
- if (this._$cssResult$ = !0, i !== G) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
3
+ constructor(t, e, s) {
4
+ if (this._$cssResult$ = !0, s !== G) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
5
  this.cssText = t, this.t = e;
6
6
  }
7
7
  get styleSheet() {
8
8
  let t = this.o;
9
9
  const e = this.t;
10
- if (V && t === void 0) {
11
- const i = e !== void 0 && e.length === 1;
12
- i && (t = Y.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Y.set(e, t));
10
+ if (F && t === void 0) {
11
+ const s = e !== void 0 && e.length === 1;
12
+ s && (t = Y.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Y.set(e, t));
13
13
  }
14
14
  return t;
15
15
  }
@@ -17,23 +17,23 @@ let pt = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const gt = (r) => new pt(typeof r == "string" ? r : r + "", void 0, G), mt = (r, ...t) => {
21
- const e = r.length === 1 ? r[0] : t.reduce(((i, s, n) => i + ((o) => {
20
+ const mt = (r) => new pt(typeof r == "string" ? r : r + "", void 0, G), gt = (r, ...t) => {
21
+ const e = r.length === 1 ? r[0] : t.reduce(((s, i, n) => s + ((o) => {
22
22
  if (o._$cssResult$ === !0) return o.cssText;
23
23
  if (typeof o == "number") return o;
24
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
- })(s) + r[n + 1]), r[0]);
25
+ })(i) + r[n + 1]), r[0]);
26
26
  return new pt(e, r, G);
27
27
  }, _t = (r, t) => {
28
- if (V) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
28
+ if (F) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
29
29
  else for (const e of t) {
30
- const i = document.createElement("style"), s = z.litNonce;
31
- s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
30
+ const s = document.createElement("style"), i = z.litNonce;
31
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
32
32
  }
33
- }, tt = V ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
33
+ }, tt = F ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
34
34
  let e = "";
35
- for (const i of t.cssRules) e += i.cssText;
36
- return gt(e);
35
+ for (const s of t.cssRules) e += s.cssText;
36
+ return mt(e);
37
37
  })(r) : r;
38
38
  const { is: yt, defineProperty: At, getOwnPropertyDescriptor: vt, getOwnPropertyNames: bt, getOwnPropertySymbols: wt, getPrototypeOf: xt } = Object, k = globalThis, et = k.trustedTypes, St = et ? et.emptyScript : "", Et = k.reactiveElementPolyfillSupport, T = (r, t) => r, j = { toAttribute(r, t) {
39
39
  switch (t) {
@@ -74,19 +74,19 @@ let S = class extends HTMLElement {
74
74
  }
75
75
  static createProperty(t, e = it) {
76
76
  if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
77
- const i = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(t, i, e);
78
- s !== void 0 && At(this.prototype, t, s);
77
+ const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
78
+ i !== void 0 && At(this.prototype, t, i);
79
79
  }
80
80
  }
81
- static getPropertyDescriptor(t, e, i) {
82
- const { get: s, set: n } = vt(this.prototype, t) ?? { get() {
81
+ static getPropertyDescriptor(t, e, s) {
82
+ const { get: i, set: n } = vt(this.prototype, t) ?? { get() {
83
83
  return this[e];
84
84
  }, set(o) {
85
85
  this[e] = o;
86
86
  } };
87
- return { get: s, set(o) {
88
- const l = s?.call(this);
89
- n?.call(this, o), this.requestUpdate(t, l, i);
87
+ return { get: i, set(o) {
88
+ const a = i?.call(this);
89
+ n?.call(this, o), this.requestUpdate(t, a, s);
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(t) {
@@ -100,32 +100,32 @@ let S = class extends HTMLElement {
100
100
  static finalize() {
101
101
  if (this.hasOwnProperty(T("finalized"))) return;
102
102
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
103
- const e = this.properties, i = [...bt(e), ...wt(e)];
104
- for (const s of i) this.createProperty(s, e[s]);
103
+ const e = this.properties, s = [...bt(e), ...wt(e)];
104
+ for (const i of s) this.createProperty(i, e[i]);
105
105
  }
106
106
  const t = this[Symbol.metadata];
107
107
  if (t !== null) {
108
108
  const e = litPropertyMetadata.get(t);
109
- if (e !== void 0) for (const [i, s] of e) this.elementProperties.set(i, s);
109
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
110
110
  }
111
111
  this._$Eh = /* @__PURE__ */ new Map();
112
- for (const [e, i] of this.elementProperties) {
113
- const s = this._$Eu(e, i);
114
- s !== void 0 && this._$Eh.set(s, e);
112
+ for (const [e, s] of this.elementProperties) {
113
+ const i = this._$Eu(e, s);
114
+ i !== void 0 && this._$Eh.set(i, e);
115
115
  }
116
116
  this.elementStyles = this.finalizeStyles(this.styles);
117
117
  }
118
118
  static finalizeStyles(t) {
119
119
  const e = [];
120
120
  if (Array.isArray(t)) {
121
- const i = new Set(t.flat(1 / 0).reverse());
122
- for (const s of i) e.unshift(tt(s));
121
+ const s = new Set(t.flat(1 / 0).reverse());
122
+ for (const i of s) e.unshift(tt(i));
123
123
  } else t !== void 0 && e.push(tt(t));
124
124
  return e;
125
125
  }
126
126
  static _$Eu(t, e) {
127
- const i = e.attribute;
128
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
127
+ const s = e.attribute;
128
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
129
129
  }
130
130
  constructor() {
131
131
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -141,7 +141,7 @@ let S = class extends HTMLElement {
141
141
  }
142
142
  _$E_() {
143
143
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
144
- for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
144
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
145
145
  t.size > 0 && (this._$Ep = t);
146
146
  }
147
147
  createRenderRoot() {
@@ -156,33 +156,33 @@ let S = class extends HTMLElement {
156
156
  disconnectedCallback() {
157
157
  this._$EO?.forEach(((t) => t.hostDisconnected?.()));
158
158
  }
159
- attributeChangedCallback(t, e, i) {
160
- this._$AK(t, i);
159
+ attributeChangedCallback(t, e, s) {
160
+ this._$AK(t, s);
161
161
  }
162
162
  _$ET(t, e) {
163
- const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
164
- if (s !== void 0 && i.reflect === !0) {
165
- const n = (i.converter?.toAttribute !== void 0 ? i.converter : j).toAttribute(e, i.type);
166
- this._$Em = t, n == null ? this.removeAttribute(s) : this.setAttribute(s, n), this._$Em = null;
163
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
164
+ if (i !== void 0 && s.reflect === !0) {
165
+ const n = (s.converter?.toAttribute !== void 0 ? s.converter : j).toAttribute(e, s.type);
166
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
167
167
  }
168
168
  }
169
169
  _$AK(t, e) {
170
- const i = this.constructor, s = i._$Eh.get(t);
171
- if (s !== void 0 && this._$Em !== s) {
172
- const n = i.getPropertyOptions(s), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : j;
173
- this._$Em = s, this[s] = o.fromAttribute(e, n.type) ?? this._$Ej?.get(s) ?? null, this._$Em = null;
170
+ const s = this.constructor, i = s._$Eh.get(t);
171
+ if (i !== void 0 && this._$Em !== i) {
172
+ const n = s.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : j;
173
+ this._$Em = i, this[i] = o.fromAttribute(e, n.type) ?? this._$Ej?.get(i) ?? null, this._$Em = null;
174
174
  }
175
175
  }
176
- requestUpdate(t, e, i) {
176
+ requestUpdate(t, e, s) {
177
177
  if (t !== void 0) {
178
- const s = this.constructor, n = this[t];
179
- if (i ??= s.getPropertyOptions(t), !((i.hasChanged ?? Z)(n, e) || i.useDefault && i.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(s._$Eu(t, i)))) return;
180
- this.C(t, e, i);
178
+ const i = this.constructor, n = this[t];
179
+ if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Z)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
180
+ this.C(t, e, s);
181
181
  }
182
182
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
183
183
  }
184
- C(t, e, { useDefault: i, reflect: s, wrapped: n }, o) {
185
- i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), s === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
184
+ C(t, e, { useDefault: s, reflect: i, wrapped: n }, o) {
185
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
186
186
  }
187
187
  async _$EP() {
188
188
  this.isUpdatePending = !0;
@@ -201,21 +201,21 @@ let S = class extends HTMLElement {
201
201
  if (!this.isUpdatePending) return;
202
202
  if (!this.hasUpdated) {
203
203
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
204
- for (const [s, n] of this._$Ep) this[s] = n;
204
+ for (const [i, n] of this._$Ep) this[i] = n;
205
205
  this._$Ep = void 0;
206
206
  }
207
- const i = this.constructor.elementProperties;
208
- if (i.size > 0) for (const [s, n] of i) {
209
- const { wrapped: o } = n, l = this[s];
210
- o !== !0 || this._$AL.has(s) || l === void 0 || this.C(s, void 0, n, l);
207
+ const s = this.constructor.elementProperties;
208
+ if (s.size > 0) for (const [i, n] of s) {
209
+ const { wrapped: o } = n, a = this[i];
210
+ o !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, n, a);
211
211
  }
212
212
  }
213
213
  let t = !1;
214
214
  const e = this._$AL;
215
215
  try {
216
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(e)) : this._$EM();
217
- } catch (i) {
218
- throw t = !1, this._$EM(), i;
216
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EM();
217
+ } catch (s) {
218
+ throw t = !1, this._$EM(), s;
219
219
  }
220
220
  t && this._$AE(e);
221
221
  }
@@ -245,67 +245,67 @@ let S = class extends HTMLElement {
245
245
  }
246
246
  };
247
247
  S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[T("elementProperties")] = /* @__PURE__ */ new Map(), S[T("finalized")] = /* @__PURE__ */ new Map(), Et?.({ ReactiveElement: S }), (k.reactiveElementVersions ??= []).push("2.1.0");
248
- const F = globalThis, I = F.trustedTypes, st = I ? I.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, dt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + y, Ct = `<${ut}>`, w = document, D = () => w.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", J = Array.isArray, Pt = (r) => J(r) || typeof r?.[Symbol.iterator] == "function", W = `[
249
- \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, nt = />/g, A = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
248
+ const J = globalThis, I = J.trustedTypes, st = I ? I.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, dt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + y, Ct = `<${ut}>`, w = document, M = () => w.createComment(""), N = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, Pt = (r) => K(r) || typeof r?.[Symbol.iterator] == "function", q = `[
249
+ \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, nt = />/g, A = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
250
250
  \f\r"'\`<>=]|("|')|))|$)`, "g"), ot = /'/g, ht = /"/g, $t = /^(?:script|style|textarea|title)$/i, Ut = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), U = Ut(1), x = /* @__PURE__ */ Symbol.for("lit-noChange"), $ = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), b = w.createTreeWalker(w, 129);
251
251
  function ft(r, t) {
252
- if (!J(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
252
+ if (!K(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
253
253
  return st !== void 0 ? st.createHTML(t) : t;
254
254
  }
255
255
  const Ot = (r, t) => {
256
- const e = r.length - 1, i = [];
257
- let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = P;
258
- for (let l = 0; l < e; l++) {
259
- const h = r[l];
260
- let p, u, a = -1, d = 0;
261
- for (; d < h.length && (o.lastIndex = d, u = o.exec(h), u !== null); ) d = o.lastIndex, o === P ? u[1] === "!--" ? o = rt : u[1] !== void 0 ? o = nt : u[2] !== void 0 ? ($t.test(u[2]) && (s = RegExp("</" + u[2], "g")), o = A) : u[3] !== void 0 && (o = A) : o === A ? u[0] === ">" ? (o = s ?? P, a = -1) : u[1] === void 0 ? a = -2 : (a = o.lastIndex - u[2].length, p = u[1], o = u[3] === void 0 ? A : u[3] === '"' ? ht : ot) : o === ht || o === ot ? o = A : o === rt || o === nt ? o = P : (o = A, s = void 0);
262
- const c = o === A && r[l + 1].startsWith("/>") ? " " : "";
263
- n += o === P ? h + Ct : a >= 0 ? (i.push(p), h.slice(0, a) + dt + h.slice(a) + y + c) : h + y + (a === -2 ? l : c);
264
- }
265
- return [ft(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
256
+ const e = r.length - 1, s = [];
257
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = P;
258
+ for (let a = 0; a < e; a++) {
259
+ const h = r[a];
260
+ let c, u, l = -1, d = 0;
261
+ for (; d < h.length && (o.lastIndex = d, u = o.exec(h), u !== null); ) d = o.lastIndex, o === P ? u[1] === "!--" ? o = rt : u[1] !== void 0 ? o = nt : u[2] !== void 0 ? ($t.test(u[2]) && (i = RegExp("</" + u[2], "g")), o = A) : u[3] !== void 0 && (o = A) : o === A ? u[0] === ">" ? (o = i ?? P, l = -1) : u[1] === void 0 ? l = -2 : (l = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? A : u[3] === '"' ? ht : ot) : o === ht || o === ot ? o = A : o === rt || o === nt ? o = P : (o = A, i = void 0);
262
+ const p = o === A && r[a + 1].startsWith("/>") ? " " : "";
263
+ n += o === P ? h + Ct : l >= 0 ? (s.push(c), h.slice(0, l) + dt + h.slice(l) + y + p) : h + y + (l === -2 ? a : p);
264
+ }
265
+ return [ft(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
266
266
  };
267
- class R {
268
- constructor({ strings: t, _$litType$: e }, i) {
269
- let s;
267
+ class D {
268
+ constructor({ strings: t, _$litType$: e }, s) {
269
+ let i;
270
270
  this.parts = [];
271
271
  let n = 0, o = 0;
272
- const l = t.length - 1, h = this.parts, [p, u] = Ot(t, e);
273
- if (this.el = R.createElement(p, i), b.currentNode = this.el.content, e === 2 || e === 3) {
274
- const a = this.el.content.firstChild;
275
- a.replaceWith(...a.childNodes);
272
+ const a = t.length - 1, h = this.parts, [c, u] = Ot(t, e);
273
+ if (this.el = D.createElement(c, s), b.currentNode = this.el.content, e === 2 || e === 3) {
274
+ const l = this.el.content.firstChild;
275
+ l.replaceWith(...l.childNodes);
276
276
  }
277
- for (; (s = b.nextNode()) !== null && h.length < l; ) {
278
- if (s.nodeType === 1) {
279
- if (s.hasAttributes()) for (const a of s.getAttributeNames()) if (a.endsWith(dt)) {
280
- const d = u[o++], c = s.getAttribute(a).split(y), f = /([.?@])?(.*)/.exec(d);
281
- h.push({ type: 1, index: n, name: f[2], strings: c, ctor: f[1] === "." ? Ht : f[1] === "?" ? Dt : f[1] === "@" ? Mt : L }), s.removeAttribute(a);
282
- } else a.startsWith(y) && (h.push({ type: 6, index: n }), s.removeAttribute(a));
283
- if ($t.test(s.tagName)) {
284
- const a = s.textContent.split(y), d = a.length - 1;
277
+ for (; (i = b.nextNode()) !== null && h.length < a; ) {
278
+ if (i.nodeType === 1) {
279
+ if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(dt)) {
280
+ const d = u[o++], p = i.getAttribute(l).split(y), f = /([.?@])?(.*)/.exec(d);
281
+ h.push({ type: 1, index: n, name: f[2], strings: p, ctor: f[1] === "." ? Ht : f[1] === "?" ? Mt : f[1] === "@" ? Nt : L }), i.removeAttribute(l);
282
+ } else l.startsWith(y) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
283
+ if ($t.test(i.tagName)) {
284
+ const l = i.textContent.split(y), d = l.length - 1;
285
285
  if (d > 0) {
286
- s.textContent = I ? I.emptyScript : "";
287
- for (let c = 0; c < d; c++) s.append(a[c], D()), b.nextNode(), h.push({ type: 2, index: ++n });
288
- s.append(a[d], D());
286
+ i.textContent = I ? I.emptyScript : "";
287
+ for (let p = 0; p < d; p++) i.append(l[p], M()), b.nextNode(), h.push({ type: 2, index: ++n });
288
+ i.append(l[d], M());
289
289
  }
290
290
  }
291
- } else if (s.nodeType === 8) if (s.data === ut) h.push({ type: 2, index: n });
291
+ } else if (i.nodeType === 8) if (i.data === ut) h.push({ type: 2, index: n });
292
292
  else {
293
- let a = -1;
294
- for (; (a = s.data.indexOf(y, a + 1)) !== -1; ) h.push({ type: 7, index: n }), a += y.length - 1;
293
+ let l = -1;
294
+ for (; (l = i.data.indexOf(y, l + 1)) !== -1; ) h.push({ type: 7, index: n }), l += y.length - 1;
295
295
  }
296
296
  n++;
297
297
  }
298
298
  }
299
299
  static createElement(t, e) {
300
- const i = w.createElement("template");
301
- return i.innerHTML = t, i;
300
+ const s = w.createElement("template");
301
+ return s.innerHTML = t, s;
302
302
  }
303
303
  }
304
- function E(r, t, e = r, i) {
304
+ function E(r, t, e = r, s) {
305
305
  if (t === x) return t;
306
- let s = i !== void 0 ? e._$Co?.[i] : e._$Cl;
307
- const n = M(t) ? void 0 : t._$litDirective$;
308
- return s?.constructor !== n && (s?._$AO?.(!1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = s : e._$Cl = s), s !== void 0 && (t = E(r, s._$AS(r, t.values), s, i)), t;
306
+ let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
307
+ const n = N(t) ? void 0 : t._$litDirective$;
308
+ return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = E(r, i._$AS(r, t.values), i, s)), t;
309
309
  }
310
310
  let Tt = class {
311
311
  constructor(t, e) {
@@ -318,29 +318,29 @@ let Tt = class {
318
318
  return this._$AM._$AU;
319
319
  }
320
320
  u(t) {
321
- const { el: { content: e }, parts: i } = this._$AD, s = (t?.creationScope ?? w).importNode(e, !0);
322
- b.currentNode = s;
323
- let n = b.nextNode(), o = 0, l = 0, h = i[0];
321
+ const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? w).importNode(e, !0);
322
+ b.currentNode = i;
323
+ let n = b.nextNode(), o = 0, a = 0, h = s[0];
324
324
  for (; h !== void 0; ) {
325
325
  if (o === h.index) {
326
- let p;
327
- h.type === 2 ? p = new C(n, n.nextSibling, this, t) : h.type === 1 ? p = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (p = new Rt(n, this, t)), this._$AV.push(p), h = i[++l];
326
+ let c;
327
+ h.type === 2 ? c = new C(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Dt(n, this, t)), this._$AV.push(c), h = s[++a];
328
328
  }
329
329
  o !== h?.index && (n = b.nextNode(), o++);
330
330
  }
331
- return b.currentNode = w, s;
331
+ return b.currentNode = w, i;
332
332
  }
333
333
  p(t) {
334
334
  let e = 0;
335
- for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
335
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
336
336
  }
337
337
  };
338
338
  class C {
339
339
  get _$AU() {
340
340
  return this._$AM?._$AU ?? this._$Cv;
341
341
  }
342
- constructor(t, e, i, s) {
343
- this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = s?.isConnected ?? !0;
342
+ constructor(t, e, s, i) {
343
+ this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
344
344
  }
345
345
  get parentNode() {
346
346
  let t = this._$AA.parentNode;
@@ -354,7 +354,7 @@ class C {
354
354
  return this._$AB;
355
355
  }
356
356
  _$AI(t, e = this) {
357
- t = E(this, t, e), M(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Pt(t) ? this.k(t) : this._(t);
357
+ t = E(this, t, e), N(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Pt(t) ? this.k(t) : this._(t);
358
358
  }
359
359
  O(t) {
360
360
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -363,31 +363,31 @@ class C {
363
363
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
364
364
  }
365
365
  _(t) {
366
- this._$AH !== $ && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
366
+ this._$AH !== $ && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
367
367
  }
368
368
  $(t) {
369
- const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = R.createElement(ft(i.h, i.h[0]), this.options)), i);
370
- if (this._$AH?._$AD === s) this._$AH.p(e);
369
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = D.createElement(ft(s.h, s.h[0]), this.options)), s);
370
+ if (this._$AH?._$AD === i) this._$AH.p(e);
371
371
  else {
372
- const n = new Tt(s, this), o = n.u(this.options);
372
+ const n = new Tt(i, this), o = n.u(this.options);
373
373
  n.p(e), this.T(o), this._$AH = n;
374
374
  }
375
375
  }
376
376
  _$AC(t) {
377
377
  let e = at.get(t.strings);
378
- return e === void 0 && at.set(t.strings, e = new R(t)), e;
378
+ return e === void 0 && at.set(t.strings, e = new D(t)), e;
379
379
  }
380
380
  k(t) {
381
- J(this._$AH) || (this._$AH = [], this._$AR());
381
+ K(this._$AH) || (this._$AH = [], this._$AR());
382
382
  const e = this._$AH;
383
- let i, s = 0;
384
- for (const n of t) s === e.length ? e.push(i = new C(this.O(D()), this.O(D()), this, this.options)) : i = e[s], i._$AI(n), s++;
385
- s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
383
+ let s, i = 0;
384
+ for (const n of t) i === e.length ? e.push(s = new C(this.O(M()), this.O(M()), this, this.options)) : s = e[i], s._$AI(n), i++;
385
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
386
386
  }
387
387
  _$AR(t = this._$AA.nextSibling, e) {
388
388
  for (this._$AP?.(!1, !0, e); t && t !== this._$AB; ) {
389
- const i = t.nextSibling;
390
- t.remove(), t = i;
389
+ const s = t.nextSibling;
390
+ t.remove(), t = s;
391
391
  }
392
392
  }
393
393
  setConnected(t) {
@@ -401,19 +401,19 @@ class L {
401
401
  get _$AU() {
402
402
  return this._$AM._$AU;
403
403
  }
404
- constructor(t, e, i, s, n) {
405
- this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = $;
404
+ constructor(t, e, s, i, n) {
405
+ this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = $;
406
406
  }
407
- _$AI(t, e = this, i, s) {
407
+ _$AI(t, e = this, s, i) {
408
408
  const n = this.strings;
409
409
  let o = !1;
410
- if (n === void 0) t = E(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== x, o && (this._$AH = t);
410
+ if (n === void 0) t = E(this, t, e, 0), o = !N(t) || t !== this._$AH && t !== x, o && (this._$AH = t);
411
411
  else {
412
- const l = t;
413
- let h, p;
414
- for (t = n[0], h = 0; h < n.length - 1; h++) p = E(this, l[i + h], e, h), p === x && (p = this._$AH[h]), o ||= !M(p) || p !== this._$AH[h], p === $ ? t = $ : t !== $ && (t += (p ?? "") + n[h + 1]), this._$AH[h] = p;
412
+ const a = t;
413
+ let h, c;
414
+ for (t = n[0], h = 0; h < n.length - 1; h++) c = E(this, a[s + h], e, h), c === x && (c = this._$AH[h]), o ||= !N(c) || c !== this._$AH[h], c === $ ? t = $ : t !== $ && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
415
415
  }
416
- o && !s && this.j(t);
416
+ o && !i && this.j(t);
417
417
  }
418
418
  j(t) {
419
419
  t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
@@ -427,7 +427,7 @@ class Ht extends L {
427
427
  this.element[this.name] = t === $ ? void 0 : t;
428
428
  }
429
429
  }
430
- class Dt extends L {
430
+ class Mt extends L {
431
431
  constructor() {
432
432
  super(...arguments), this.type = 4;
433
433
  }
@@ -435,22 +435,22 @@ class Dt extends L {
435
435
  this.element.toggleAttribute(this.name, !!t && t !== $);
436
436
  }
437
437
  }
438
- class Mt extends L {
439
- constructor(t, e, i, s, n) {
440
- super(t, e, i, s, n), this.type = 5;
438
+ class Nt extends L {
439
+ constructor(t, e, s, i, n) {
440
+ super(t, e, s, i, n), this.type = 5;
441
441
  }
442
442
  _$AI(t, e = this) {
443
443
  if ((t = E(this, t, e, 0) ?? $) === x) return;
444
- const i = this._$AH, s = t === $ && i !== $ || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== $ && (i === $ || s);
445
- s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
444
+ const s = this._$AH, i = t === $ && s !== $ || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== $ && (s === $ || i);
445
+ i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
446
446
  }
447
447
  handleEvent(t) {
448
448
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
449
449
  }
450
450
  }
451
- class Rt {
452
- constructor(t, e, i) {
453
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
451
+ class Dt {
452
+ constructor(t, e, s) {
453
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
454
454
  }
455
455
  get _$AU() {
456
456
  return this._$AM._$AU;
@@ -459,18 +459,18 @@ class Rt {
459
459
  E(this, t);
460
460
  }
461
461
  }
462
- const Nt = { I: C }, zt = F.litHtmlPolyfillSupport;
463
- zt?.(R, C), (F.litHtmlVersions ??= []).push("3.3.0");
462
+ const Rt = { I: C }, zt = J.litHtmlPolyfillSupport;
463
+ zt?.(D, C), (J.litHtmlVersions ??= []).push("3.3.0");
464
464
  const jt = (r, t, e) => {
465
- const i = e?.renderBefore ?? t;
466
- let s = i._$litPart$;
467
- if (s === void 0) {
465
+ const s = e?.renderBefore ?? t;
466
+ let i = s._$litPart$;
467
+ if (i === void 0) {
468
468
  const n = e?.renderBefore ?? null;
469
- i._$litPart$ = s = new C(t.insertBefore(D(), n), n, void 0, e ?? {});
469
+ s._$litPart$ = i = new C(t.insertBefore(M(), n), n, void 0, e ?? {});
470
470
  }
471
- return s._$AI(r), s;
471
+ return i._$AI(r), i;
472
472
  };
473
- const K = globalThis;
473
+ const Q = globalThis;
474
474
  let H = class extends S {
475
475
  constructor() {
476
476
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -493,10 +493,10 @@ let H = class extends S {
493
493
  return x;
494
494
  }
495
495
  };
496
- H._$litElement$ = !0, H.finalized = !0, K.litElementHydrateSupport?.({ LitElement: H });
497
- const It = K.litElementPolyfillSupport;
496
+ H._$litElement$ = !0, H.finalized = !0, Q.litElementHydrateSupport?.({ LitElement: H });
497
+ const It = Q.litElementPolyfillSupport;
498
498
  It?.({ LitElement: H });
499
- (K.litElementVersions ??= []).push("4.2.0");
499
+ (Q.litElementVersions ??= []).push("4.2.0");
500
500
  const kt = { CHILD: 2 }, Lt = (r) => (...t) => ({ _$litDirective$: r, values: t });
501
501
  class Bt {
502
502
  constructor(t) {
@@ -504,8 +504,8 @@ class Bt {
504
504
  get _$AU() {
505
505
  return this._$AM._$AU;
506
506
  }
507
- _$AT(t, e, i) {
508
- this._$Ct = t, this._$AM = e, this._$Ci = i;
507
+ _$AT(t, e, s) {
508
+ this._$Ct = t, this._$AM = e, this._$Ci = s;
509
509
  }
510
510
  _$AS(t, e) {
511
511
  return this.update(t, e);
@@ -514,144 +514,144 @@ class Bt {
514
514
  return this.render(...e);
515
515
  }
516
516
  }
517
- const { I: Wt } = Nt, lt = () => document.createComment(""), O = (r, t, e) => {
518
- const i = r._$AA.parentNode, s = t === void 0 ? r._$AB : t._$AA;
517
+ const { I: Wt } = Rt, lt = () => document.createComment(""), O = (r, t, e) => {
518
+ const s = r._$AA.parentNode, i = t === void 0 ? r._$AB : t._$AA;
519
519
  if (e === void 0) {
520
- const n = i.insertBefore(lt(), s), o = i.insertBefore(lt(), s);
520
+ const n = s.insertBefore(lt(), i), o = s.insertBefore(lt(), i);
521
521
  e = new Wt(n, o, r, r.options);
522
522
  } else {
523
- const n = e._$AB.nextSibling, o = e._$AM, l = o !== r;
524
- if (l) {
523
+ const n = e._$AB.nextSibling, o = e._$AM, a = o !== r;
524
+ if (a) {
525
525
  let h;
526
526
  e._$AQ?.(r), e._$AM = r, e._$AP !== void 0 && (h = r._$AU) !== o._$AU && e._$AP(h);
527
527
  }
528
- if (n !== s || l) {
528
+ if (n !== i || a) {
529
529
  let h = e._$AA;
530
530
  for (; h !== n; ) {
531
- const p = h.nextSibling;
532
- i.insertBefore(h, s), h = p;
531
+ const c = h.nextSibling;
532
+ s.insertBefore(h, i), h = c;
533
533
  }
534
534
  }
535
535
  }
536
536
  return e;
537
- }, v = (r, t, e = r) => (r._$AI(t, e), r), qt = {}, Vt = (r, t = qt) => r._$AH = t, Gt = (r) => r._$AH, q = (r) => {
537
+ }, v = (r, t, e = r) => (r._$AI(t, e), r), qt = {}, Vt = (r, t = qt) => r._$AH = t, Ft = (r) => r._$AH, V = (r) => {
538
538
  r._$AP?.(!1, !0);
539
539
  let t = r._$AA;
540
540
  const e = r._$AB.nextSibling;
541
541
  for (; t !== e; ) {
542
- const i = t.nextSibling;
543
- t.remove(), t = i;
542
+ const s = t.nextSibling;
543
+ t.remove(), t = s;
544
544
  }
545
545
  };
546
546
  const ct = (r, t, e) => {
547
- const i = /* @__PURE__ */ new Map();
548
- for (let s = t; s <= e; s++) i.set(r[s], s);
549
- return i;
550
- }, Zt = Lt(class extends Bt {
547
+ const s = /* @__PURE__ */ new Map();
548
+ for (let i = t; i <= e; i++) s.set(r[i], i);
549
+ return s;
550
+ }, Gt = Lt(class extends Bt {
551
551
  constructor(r) {
552
552
  if (super(r), r.type !== kt.CHILD) throw Error("repeat() can only be used in text expressions");
553
553
  }
554
554
  dt(r, t, e) {
555
- let i;
556
- e === void 0 ? e = t : t !== void 0 && (i = t);
557
- const s = [], n = [];
555
+ let s;
556
+ e === void 0 ? e = t : t !== void 0 && (s = t);
557
+ const i = [], n = [];
558
558
  let o = 0;
559
- for (const l of r) s[o] = i ? i(l, o) : o, n[o] = e(l, o), o++;
560
- return { values: n, keys: s };
559
+ for (const a of r) i[o] = s ? s(a, o) : o, n[o] = e(a, o), o++;
560
+ return { values: n, keys: i };
561
561
  }
562
562
  render(r, t, e) {
563
563
  return this.dt(r, t, e).values;
564
564
  }
565
- update(r, [t, e, i]) {
566
- const s = Gt(r), { values: n, keys: o } = this.dt(t, e, i);
567
- if (!Array.isArray(s)) return this.ut = o, n;
568
- const l = this.ut ??= [], h = [];
569
- let p, u, a = 0, d = s.length - 1, c = 0, f = n.length - 1;
570
- for (; a <= d && c <= f; ) if (s[a] === null) a++;
571
- else if (s[d] === null) d--;
572
- else if (l[a] === o[c]) h[c] = v(s[a], n[c]), a++, c++;
573
- else if (l[d] === o[f]) h[f] = v(s[d], n[f]), d--, f--;
574
- else if (l[a] === o[f]) h[f] = v(s[a], n[f]), O(r, h[f + 1], s[a]), a++, f--;
575
- else if (l[d] === o[c]) h[c] = v(s[d], n[c]), O(r, s[a], s[d]), d--, c++;
576
- else if (p === void 0 && (p = ct(o, c, f), u = ct(l, a, d)), p.has(l[a])) if (p.has(l[d])) {
577
- const m = u.get(o[c]), B = m !== void 0 ? s[m] : null;
578
- if (B === null) {
579
- const X = O(r, s[a]);
580
- v(X, n[c]), h[c] = X;
581
- } else h[c] = v(B, n[c]), O(r, s[a], B), s[m] = null;
582
- c++;
583
- } else q(s[d]), d--;
584
- else q(s[a]), a++;
585
- for (; c <= f; ) {
586
- const m = O(r, h[f + 1]);
587
- v(m, n[c]), h[c++] = m;
565
+ update(r, [t, e, s]) {
566
+ const i = Ft(r), { values: n, keys: o } = this.dt(t, e, s);
567
+ if (!Array.isArray(i)) return this.ut = o, n;
568
+ const a = this.ut ??= [], h = [];
569
+ let c, u, l = 0, d = i.length - 1, p = 0, f = n.length - 1;
570
+ for (; l <= d && p <= f; ) if (i[l] === null) l++;
571
+ else if (i[d] === null) d--;
572
+ else if (a[l] === o[p]) h[p] = v(i[l], n[p]), l++, p++;
573
+ else if (a[d] === o[f]) h[f] = v(i[d], n[f]), d--, f--;
574
+ else if (a[l] === o[f]) h[f] = v(i[l], n[f]), O(r, h[f + 1], i[l]), l++, f--;
575
+ else if (a[d] === o[p]) h[p] = v(i[d], n[p]), O(r, i[l], i[d]), d--, p++;
576
+ else if (c === void 0 && (c = ct(o, p, f), u = ct(a, l, d)), c.has(a[l])) if (c.has(a[d])) {
577
+ const _ = u.get(o[p]), W = _ !== void 0 ? i[_] : null;
578
+ if (W === null) {
579
+ const X = O(r, i[l]);
580
+ v(X, n[p]), h[p] = X;
581
+ } else h[p] = v(W, n[p]), O(r, i[l], W), i[_] = null;
582
+ p++;
583
+ } else V(i[d]), d--;
584
+ else V(i[l]), l++;
585
+ for (; p <= f; ) {
586
+ const _ = O(r, h[f + 1]);
587
+ v(_, n[p]), h[p++] = _;
588
588
  }
589
- for (; a <= d; ) {
590
- const m = s[a++];
591
- m !== null && q(m);
589
+ for (; l <= d; ) {
590
+ const _ = i[l++];
591
+ _ !== null && V(_);
592
592
  }
593
593
  return this.ut = o, Vt(r, h), x;
594
594
  }
595
595
  });
596
- const Ft = (r) => r ?? $;
596
+ const Zt = (r) => r ?? $;
597
597
  const Jt = (r) => (t, e) => {
598
598
  e !== void 0 ? e.addInitializer((() => {
599
599
  customElements.define(r, t);
600
600
  })) : customElements.define(r, t);
601
601
  };
602
602
  const Kt = { attribute: !0, type: String, converter: j, reflect: !1, hasChanged: Z }, Qt = (r = Kt, t, e) => {
603
- const { kind: i, metadata: s } = e;
604
- let n = globalThis.litPropertyMetadata.get(s);
605
- if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), i === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), i === "accessor") {
603
+ const { kind: s, metadata: i } = e;
604
+ let n = globalThis.litPropertyMetadata.get(i);
605
+ if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), s === "accessor") {
606
606
  const { name: o } = e;
607
- return { set(l) {
607
+ return { set(a) {
608
608
  const h = t.get.call(this);
609
- t.set.call(this, l), this.requestUpdate(o, h, r);
610
- }, init(l) {
611
- return l !== void 0 && this.C(o, void 0, r, l), l;
609
+ t.set.call(this, a), this.requestUpdate(o, h, r);
610
+ }, init(a) {
611
+ return a !== void 0 && this.C(o, void 0, r, a), a;
612
612
  } };
613
613
  }
614
- if (i === "setter") {
614
+ if (s === "setter") {
615
615
  const { name: o } = e;
616
- return function(l) {
616
+ return function(a) {
617
617
  const h = this[o];
618
- t.call(this, l), this.requestUpdate(o, h, r);
618
+ t.call(this, a), this.requestUpdate(o, h, r);
619
619
  };
620
620
  }
621
- throw Error("Unsupported decorator location: " + i);
621
+ throw Error("Unsupported decorator location: " + s);
622
622
  };
623
- function Q(r) {
624
- return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((i, s, n) => {
625
- const o = s.hasOwnProperty(n);
626
- return s.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(s, n) : void 0;
623
+ function B(r) {
624
+ return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((s, i, n) => {
625
+ const o = i.hasOwnProperty(n);
626
+ return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
627
627
  })(r, t, e);
628
628
  }
629
- function N(r) {
630
- return Q({ ...r, state: !0, attribute: !1 });
629
+ function R(r) {
630
+ return B({ ...r, state: !0, attribute: !1 });
631
631
  }
632
632
  const Xt = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
633
633
  function Yt(r, t) {
634
- return (e, i, s) => {
634
+ return (e, s, i) => {
635
635
  const n = (o) => o.renderRoot?.querySelector(r) ?? null;
636
- return Xt(e, i, { get() {
636
+ return Xt(e, s, { get() {
637
637
  return n(this);
638
638
  } });
639
639
  };
640
640
  }
641
- var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (r, t, e, i) => {
642
- for (var s = i > 1 ? void 0 : i ? ee(t, e) : t, n = r.length - 1, o; n >= 0; n--)
643
- (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
644
- return i && s && te(t, e, s), s;
641
+ var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, g = (r, t, e, s) => {
642
+ for (var i = s > 1 ? void 0 : s ? ee(t, e) : t, n = r.length - 1, o; n >= 0; n--)
643
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
644
+ return s && i && te(t, e, i), i;
645
645
  };
646
- let g = class extends H {
646
+ let m = class extends H {
647
647
  constructor() {
648
- super(...arguments), this.elementWidth = 0, this.elementHeight = 0, this.version = "1.1.15";
648
+ super(...arguments), this.elementWidth = 0, this.elementHeight = 0, this.version = "1.1.17";
649
649
  }
650
650
  disconnectedCallback() {
651
651
  super.disconnectedCallback(), this.resizeObserver && this.resizeObserver.disconnect();
652
652
  }
653
653
  update(r) {
654
- r.has("inputData") && this.updateGridLayout(), r.has("theme") && this.registerTheme(this.theme), super.update(r);
654
+ (r.has("inputData") || r.has("timeRange")) && this.updateGridLayout(), r.has("theme") && this.registerTheme(this.theme), super.update(r);
655
655
  }
656
656
  firstUpdated(r) {
657
657
  this.registerTheme(this.theme), this.wrapper && (this.resizeObserver = new ResizeObserver(() => {
@@ -662,24 +662,41 @@ let g = class extends H {
662
662
  const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), e = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
663
663
  this.themeBgColor = e || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = t || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor;
664
664
  }
665
+ /**
666
+ * Get images filtered by timeRange if available
667
+ */
668
+ getFilteredImages() {
669
+ const r = this.inputData?.useUpload ? typeof this.inputData?.image == "string" ? this.inputData.image : "" : this.inputData?.imageUrl ?? "";
670
+ let t = this.inputData?.multiImage ? this.inputData?.data ?? [] : [{ imageUrl: r, label: this.inputData?.title ?? "" }];
671
+ if (this.timeRange && this.inputData?.multiImage) {
672
+ const e = Number(this.timeRange.start), s = Number(this.timeRange.end);
673
+ (!isNaN(e) || !isNaN(s)) && (t = t.filter((i) => {
674
+ const n = i.timestamp;
675
+ if (n == null) return !0;
676
+ const o = Number(n);
677
+ return isNaN(o) ? !0 : !(!isNaN(e) && o < e || !isNaN(s) && o > s);
678
+ }));
679
+ }
680
+ return t;
681
+ }
665
682
  /**
666
683
  * Update grid layout based on container size and number of elements
667
684
  */
668
685
  updateGridLayout() {
669
686
  if (!this.wrapper) return;
670
- const r = this.inputData?.useUpload ? typeof this.inputData?.image == "string" ? this.inputData.image : "" : this.inputData?.imageUrl ?? "", e = (this.inputData?.multiImage ? this.inputData?.data ?? [] : [{ imageUrl: r, title: this.inputData?.title ?? "" }]).length;
671
- if (e === 0) return;
672
- const i = this.wrapper.getBoundingClientRect(), s = i.width * 0.04, n = i.height * 0.04, o = i.width - s, l = i.height - n;
673
- if (o <= 0 || l <= 0) return;
674
- const h = this.optimizeLayout(
687
+ const t = this.getFilteredImages().length;
688
+ if (t === 0) return;
689
+ const e = this.wrapper.getBoundingClientRect(), s = e.width * 0.04, i = e.height * 0.04, n = e.width - s, o = e.height - i;
690
+ if (n <= 0 || o <= 0) return;
691
+ const a = this.optimizeLayout(
692
+ n,
675
693
  o,
676
- l,
677
- e,
678
- (u, a) => Math.abs(u / a - 1 / 1),
694
+ t,
695
+ (c, u) => Math.abs(c / u - 1 / 1),
679
696
  this.inputData?.gap ?? 12
680
697
  );
681
- this.elementWidth = h.elementWidth, this.elementHeight = h.elementHeight, this.wrapper.querySelectorAll(".image-item").forEach((u) => {
682
- u.style.width = `${h.elementWidth}px`, u.style.height = `${h.elementHeight}px`;
698
+ this.elementWidth = a.elementWidth, this.elementHeight = a.elementHeight, this.wrapper.querySelectorAll(".image-item").forEach((c) => {
699
+ c.style.width = `${a.elementWidth}px`, c.style.height = `${a.elementHeight}px`;
683
700
  });
684
701
  }
685
702
  /**
@@ -691,7 +708,7 @@ let g = class extends H {
691
708
  * @param gap - Gap between elements (default: 12)
692
709
  * @returns Optimal layout configuration
693
710
  */
694
- optimizeLayout(r, t, e, i, s = 12) {
711
+ optimizeLayout(r, t, e, s, i = 12) {
695
712
  let n = {
696
713
  elementWidth: 0,
697
714
  elementHeight: 0,
@@ -700,27 +717,27 @@ let g = class extends H {
700
717
  error: 1 / 0
701
718
  };
702
719
  for (let o = 1; o <= e; o++) {
703
- const l = Math.ceil(e / o), h = s * (o - 1), p = s * (l - 1), u = r - h, a = t - p;
704
- if (u <= 0 || a <= 0) continue;
705
- const d = u / o, c = a / l, f = i(d, c);
720
+ const a = Math.ceil(e / o), h = i * (o - 1), c = i * (a - 1), u = r - h, l = t - c;
721
+ if (u <= 0 || l <= 0) continue;
722
+ const d = u / o, p = l / a, f = s(d, p);
706
723
  f < n.error && (n = {
707
724
  elementWidth: d,
708
- elementHeight: c,
725
+ elementHeight: p,
709
726
  numCols: o,
710
- numRows: l,
727
+ numRows: a,
711
728
  error: f
712
729
  });
713
730
  }
714
731
  return n;
715
732
  }
716
733
  render() {
717
- const r = this.inputData?.useUpload ? typeof this.inputData?.image == "string" ? this.inputData.image : "" : this.inputData?.imageUrl ?? "", t = this.inputData?.multiImage ? this.inputData?.data ?? [] : [{ imageUrl: r, title: this.inputData?.title ?? "" }], e = t.length > 1, i = t.filter((n) => n.title).length > 0, s = t.some((n) => n.imageUrl);
734
+ const r = this.getFilteredImages(), t = r.length > 1, e = r.filter((i) => i.label).length > 0, s = r.some((i) => i.imageUrl);
718
735
  return U`
719
736
  <div
720
737
  class="wrapper"
721
- style="background-color: ${this.themeBgColor}; color: ${this.themeTitleColor}; gap: ${e ? `${this.inputData?.gap ?? 12}px` : "0px"}; ${e ? "" : "flex-direction: column;"}"
738
+ style="background-color: ${this.themeBgColor}; color: ${this.themeTitleColor}; gap: ${t ? `${this.inputData?.gap ?? 12}px` : "0px"}; ${t ? "" : "flex-direction: column;"}"
722
739
  >
723
- ${!e && this.inputData?.title ? U`
740
+ ${!t && this.inputData?.title ? U`
724
741
  <h3
725
742
  class="paging"
726
743
  ?active=${this.inputData?.title}
@@ -729,7 +746,7 @@ let g = class extends H {
729
746
  ${this.inputData?.title}
730
747
  </h3>
731
748
  ` : $}
732
- ${!e && this.inputData?.subTitle ? U`
749
+ ${!t && this.inputData?.subTitle ? U`
733
750
  <p
734
751
  class="paging"
735
752
  ?active=${this.inputData?.subTitle}
@@ -741,19 +758,24 @@ let g = class extends H {
741
758
  <div class="paging no-data" ?active=${!s} style="color: ${this.themeTitleColor};">
742
759
  No Image
743
760
  </div>
744
- ${Zt(
745
- t,
746
- (n) => n.imageUrl,
747
- (n) => U`
761
+ ${Gt(
762
+ r,
763
+ (i) => i.imageUrl,
764
+ (i) => U`
748
765
  <div
749
766
  class="image-item"
750
767
  style="width: ${this.elementWidth}px; height: ${this.elementHeight}px;"
751
768
  >
752
- ${i ? U`<h2 class="title">${n.title ?? ""}</h2>` : $}
753
- <div class="img-container paging" ?active="${n.imageUrl}">
769
+ ${e ? U`<h2
770
+ class="title"
771
+ style="${this.inputData?.labelFontSize ? `font-size: ${this.inputData.labelFontSize}px;` : ""}"
772
+ >
773
+ ${i.label ?? ""}
774
+ </h2>` : $}
775
+ <div class="img-container paging" ?active="${i.imageUrl}">
754
776
  <img
755
- src="${Ft(n.imageUrl)}"
756
- alt="${n.title || "Image Widget"}"
777
+ src="${Zt(i.imageUrl)}"
778
+ alt="${i.label || "Image Widget"}"
757
779
  style="object-fit: ${this.inputData?.stretchToFit ? "fill" : "contain"}"
758
780
  />
759
781
  </div>
@@ -764,7 +786,7 @@ let g = class extends H {
764
786
  `;
765
787
  }
766
788
  };
767
- g.styles = mt`
789
+ m.styles = gt`
768
790
  :host {
769
791
  display: block;
770
792
  font-family: sans-serif;
@@ -855,34 +877,37 @@ g.styles = mt`
855
877
  justify-content: center;
856
878
  }
857
879
  `;
858
- _([
859
- Q({ type: Object })
860
- ], g.prototype, "inputData", 2);
861
- _([
862
- Q({ type: Object })
863
- ], g.prototype, "theme", 2);
864
- _([
865
- N()
866
- ], g.prototype, "themeBgColor", 2);
867
- _([
868
- N()
869
- ], g.prototype, "themeTitleColor", 2);
870
- _([
871
- N()
872
- ], g.prototype, "themeSubtitleColor", 2);
873
- _([
874
- N()
875
- ], g.prototype, "elementWidth", 2);
876
- _([
877
- N()
878
- ], g.prototype, "elementHeight", 2);
879
- _([
880
+ g([
881
+ B({ type: Object })
882
+ ], m.prototype, "inputData", 2);
883
+ g([
884
+ B({ type: Object })
885
+ ], m.prototype, "theme", 2);
886
+ g([
887
+ B({ type: Object })
888
+ ], m.prototype, "timeRange", 2);
889
+ g([
890
+ R()
891
+ ], m.prototype, "themeBgColor", 2);
892
+ g([
893
+ R()
894
+ ], m.prototype, "themeTitleColor", 2);
895
+ g([
896
+ R()
897
+ ], m.prototype, "themeSubtitleColor", 2);
898
+ g([
899
+ R()
900
+ ], m.prototype, "elementWidth", 2);
901
+ g([
902
+ R()
903
+ ], m.prototype, "elementHeight", 2);
904
+ g([
880
905
  Yt(".wrapper")
881
- ], g.prototype, "wrapper", 2);
882
- g = _([
883
- Jt("widget-image-1.1.15")
884
- ], g);
906
+ ], m.prototype, "wrapper", 2);
907
+ m = g([
908
+ Jt("widget-image-1.1.17")
909
+ ], m);
885
910
  export {
886
- g as WidgetImage
911
+ m as WidgetImage
887
912
  };
888
913
  //# sourceMappingURL=widget-image.js.map