@record-evolution/widget-overlay 1.0.11 → 1.0.13

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.
@@ -18,11 +18,11 @@ let _t = class {
18
18
  }
19
19
  };
20
20
  const Pt = (r) => new _t(typeof r == "string" ? r : r + "", void 0, K), bt = (r, ...t) => {
21
- const e = r.length === 1 ? r[0] : t.reduce(((s, i, o) => s + ((n) => {
22
- if (n._$cssResult$ === !0) return n.cssText;
23
- if (typeof n == "number") return n;
24
- throw 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.");
25
- })(i) + r[o + 1]), r[0]);
21
+ const e = r.length === 1 ? r[0] : t.reduce(((s, i, n) => s + ((o) => {
22
+ if (o._$cssResult$ === !0) return o.cssText;
23
+ if (typeof o == "number") return o;
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
+ })(i) + r[n + 1]), r[0]);
26
26
  return new _t(e, r, K);
27
27
  }, Ut = (r, t) => {
28
28
  if (J) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
@@ -79,14 +79,14 @@ let E = class extends HTMLElement {
79
79
  }
80
80
  }
81
81
  static getPropertyDescriptor(t, e, s) {
82
- const { get: i, set: o } = Mt(this.prototype, t) ?? { get() {
82
+ const { get: i, set: n } = Mt(this.prototype, t) ?? { get() {
83
83
  return this[e];
84
- }, set(n) {
85
- this[e] = n;
84
+ }, set(o) {
85
+ this[e] = o;
86
86
  } };
87
- return { get: i, set(n) {
87
+ return { get: i, set(o) {
88
88
  const h = i?.call(this);
89
- o?.call(this, n), this.requestUpdate(t, h, s);
89
+ n?.call(this, o), this.requestUpdate(t, h, s);
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(t) {
@@ -162,27 +162,27 @@ let E = class extends HTMLElement {
162
162
  _$ET(t, e) {
163
163
  const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
164
164
  if (i !== void 0 && s.reflect === !0) {
165
- const o = (s.converter?.toAttribute !== void 0 ? s.converter : j).toAttribute(e, s.type);
166
- this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
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
170
  const s = this.constructor, i = s._$Eh.get(t);
171
171
  if (i !== void 0 && this._$Em !== i) {
172
- const o = s.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : j;
173
- this._$Em = i, this[i] = n.fromAttribute(e, o.type) ?? this._$Ej?.get(i) ?? null, this._$Em = null;
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
176
  requestUpdate(t, e, s) {
177
177
  if (t !== void 0) {
178
- const i = this.constructor, o = this[t];
179
- if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Q)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
178
+ const i = this.constructor, n = this[t];
179
+ if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Q)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
180
180
  this.C(t, e, s);
181
181
  }
182
182
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
183
183
  }
184
- C(t, e, { useDefault: s, reflect: i, wrapped: o }, n) {
185
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== 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));
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,13 +201,13 @@ let E = 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 [i, o] of this._$Ep) this[i] = o;
204
+ for (const [i, n] of this._$Ep) this[i] = n;
205
205
  this._$Ep = void 0;
206
206
  }
207
207
  const s = this.constructor.elementProperties;
208
- if (s.size > 0) for (const [i, o] of s) {
209
- const { wrapped: n } = o, h = this[i];
210
- n !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, o, h);
208
+ if (s.size > 0) for (const [i, n] of s) {
209
+ const { wrapped: o } = n, h = this[i];
210
+ o !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
211
211
  }
212
212
  }
213
213
  let t = !1;
@@ -246,29 +246,29 @@ let E = class extends HTMLElement {
246
246
  };
247
247
  E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[N("elementProperties")] = /* @__PURE__ */ new Map(), E[N("finalized")] = /* @__PURE__ */ new Map(), kt?.({ ReactiveElement: E }), (z.reactiveElementVersions ??= []).push("2.1.0");
248
248
  const tt = globalThis, D = tt.trustedTypes, pt = D ? D.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, At = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, wt = "?" + b, jt = `<${wt}>`, S = document, H = () => S.createComment(""), L = (r) => r === null || typeof r != "object" && typeof r != "function", et = Array.isArray, Dt = (r) => et(r) || typeof r?.[Symbol.iterator] == "function", q = `[
249
- \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ut = /-->/g, ft = />/g, A = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
250
- \f\r"'\`<>=]|("|')|))|$)`, "g"), $t = /'/g, gt = /"/g, xt = /^(?:script|style|textarea|title)$/i, It = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), g = It(1), y = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), mt = /* @__PURE__ */ new WeakMap(), x = S.createTreeWalker(S, 129);
249
+ \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ut = /-->/g, $t = />/g, A = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
250
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ft = /'/g, gt = /"/g, xt = /^(?:script|style|textarea|title)$/i, It = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), g = It(1), y = /* @__PURE__ */ Symbol.for("lit-noChange"), $ = /* @__PURE__ */ Symbol.for("lit-nothing"), mt = /* @__PURE__ */ new WeakMap(), x = S.createTreeWalker(S, 129);
251
251
  function St(r, t) {
252
252
  if (!et(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
253
253
  return pt !== void 0 ? pt.createHTML(t) : t;
254
254
  }
255
255
  const zt = (r, t) => {
256
256
  const e = r.length - 1, s = [];
257
- let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = O;
257
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = O;
258
258
  for (let h = 0; h < e; h++) {
259
259
  const a = r[h];
260
260
  let d, u, l = -1, p = 0;
261
- for (; p < a.length && (n.lastIndex = p, u = n.exec(a), u !== null); ) p = n.lastIndex, n === O ? u[1] === "!--" ? n = ut : u[1] !== void 0 ? n = ft : u[2] !== void 0 ? (xt.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = A) : u[3] !== void 0 && (n = A) : n === A ? u[0] === ">" ? (n = i ?? O, l = -1) : u[1] === void 0 ? l = -2 : (l = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? A : u[3] === '"' ? gt : $t) : n === gt || n === $t ? n = A : n === ut || n === ft ? n = O : (n = A, i = void 0);
262
- const c = n === A && r[h + 1].startsWith("/>") ? " " : "";
263
- o += n === O ? a + jt : l >= 0 ? (s.push(d), a.slice(0, l) + At + a.slice(l) + b + c) : a + b + (l === -2 ? h : c);
261
+ for (; p < a.length && (o.lastIndex = p, u = o.exec(a), u !== null); ) p = o.lastIndex, o === O ? u[1] === "!--" ? o = ut : u[1] !== void 0 ? o = $t : u[2] !== void 0 ? (xt.test(u[2]) && (i = RegExp("</" + u[2], "g")), o = A) : u[3] !== void 0 && (o = A) : o === A ? u[0] === ">" ? (o = i ?? O, l = -1) : u[1] === void 0 ? l = -2 : (l = o.lastIndex - u[2].length, d = u[1], o = u[3] === void 0 ? A : u[3] === '"' ? gt : ft) : o === gt || o === ft ? o = A : o === ut || o === $t ? o = O : (o = A, i = void 0);
262
+ const c = o === A && r[h + 1].startsWith("/>") ? " " : "";
263
+ n += o === O ? a + jt : l >= 0 ? (s.push(d), a.slice(0, l) + At + a.slice(l) + b + c) : a + b + (l === -2 ? h : c);
264
264
  }
265
- return [St(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
265
+ return [St(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
266
266
  };
267
267
  class R {
268
268
  constructor({ strings: t, _$litType$: e }, s) {
269
269
  let i;
270
270
  this.parts = [];
271
- let o = 0, n = 0;
271
+ let n = 0, o = 0;
272
272
  const h = t.length - 1, a = this.parts, [d, u] = zt(t, e);
273
273
  if (this.el = R.createElement(d, s), x.currentNode = this.el.content, e === 2 || e === 3) {
274
274
  const l = this.el.content.firstChild;
@@ -277,23 +277,23 @@ class R {
277
277
  for (; (i = x.nextNode()) !== null && a.length < h; ) {
278
278
  if (i.nodeType === 1) {
279
279
  if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(At)) {
280
- const p = u[n++], c = i.getAttribute(l).split(b), $ = /([.?@])?(.*)/.exec(p);
281
- a.push({ type: 1, index: o, name: $[2], strings: c, ctor: $[1] === "." ? Vt : $[1] === "?" ? Wt : $[1] === "@" ? qt : B }), i.removeAttribute(l);
282
- } else l.startsWith(b) && (a.push({ type: 6, index: o }), i.removeAttribute(l));
280
+ const p = u[o++], c = i.getAttribute(l).split(b), f = /([.?@])?(.*)/.exec(p);
281
+ a.push({ type: 1, index: n, name: f[2], strings: c, ctor: f[1] === "." ? Wt : f[1] === "?" ? Vt : f[1] === "@" ? qt : B }), i.removeAttribute(l);
282
+ } else l.startsWith(b) && (a.push({ type: 6, index: n }), i.removeAttribute(l));
283
283
  if (xt.test(i.tagName)) {
284
284
  const l = i.textContent.split(b), p = l.length - 1;
285
285
  if (p > 0) {
286
286
  i.textContent = D ? D.emptyScript : "";
287
- for (let c = 0; c < p; c++) i.append(l[c], H()), x.nextNode(), a.push({ type: 2, index: ++o });
287
+ for (let c = 0; c < p; c++) i.append(l[c], H()), x.nextNode(), a.push({ type: 2, index: ++n });
288
288
  i.append(l[p], H());
289
289
  }
290
290
  }
291
- } else if (i.nodeType === 8) if (i.data === wt) a.push({ type: 2, index: o });
291
+ } else if (i.nodeType === 8) if (i.data === wt) a.push({ type: 2, index: n });
292
292
  else {
293
293
  let l = -1;
294
- for (; (l = i.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += b.length - 1;
294
+ for (; (l = i.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: n }), l += b.length - 1;
295
295
  }
296
- o++;
296
+ n++;
297
297
  }
298
298
  }
299
299
  static createElement(t, e) {
@@ -304,8 +304,8 @@ class R {
304
304
  function P(r, t, e = r, s) {
305
305
  if (t === y) return t;
306
306
  let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
307
- const o = L(t) ? void 0 : t._$litDirective$;
308
- return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = P(r, i._$AS(r, t.values), i, s)), t;
307
+ const n = L(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 = P(r, i._$AS(r, t.values), i, s)), t;
309
309
  }
310
310
  let Bt = class {
311
311
  constructor(t, e) {
@@ -320,13 +320,13 @@ let Bt = class {
320
320
  u(t) {
321
321
  const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? S).importNode(e, !0);
322
322
  x.currentNode = i;
323
- let o = x.nextNode(), n = 0, h = 0, a = s[0];
323
+ let n = x.nextNode(), o = 0, h = 0, a = s[0];
324
324
  for (; a !== void 0; ) {
325
- if (n === a.index) {
325
+ if (o === a.index) {
326
326
  let d;
327
- a.type === 2 ? d = new U(o, o.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (d = new Ft(o, this, t)), this._$AV.push(d), a = s[++h];
327
+ a.type === 2 ? d = new U(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Ft(n, this, t)), this._$AV.push(d), a = s[++h];
328
328
  }
329
- n !== a?.index && (o = x.nextNode(), n++);
329
+ o !== a?.index && (n = x.nextNode(), o++);
330
330
  }
331
331
  return x.currentNode = S, i;
332
332
  }
@@ -340,7 +340,7 @@ class U {
340
340
  return this._$AM?._$AU ?? this._$Cv;
341
341
  }
342
342
  constructor(t, e, s, i) {
343
- this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
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 U {
354
354
  return this._$AB;
355
355
  }
356
356
  _$AI(t, e = this) {
357
- t = P(this, t, e), L(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== y && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Dt(t) ? this.k(t) : this._(t);
357
+ t = P(this, t, e), L(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== y && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Dt(t) ? this.k(t) : this._(t);
358
358
  }
359
359
  O(t) {
360
360
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -363,14 +363,14 @@ class U {
363
363
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
364
364
  }
365
365
  _(t) {
366
- this._$AH !== f && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
366
+ this._$AH !== $ && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
367
367
  }
368
368
  $(t) {
369
369
  const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = R.createElement(St(s.h, s.h[0]), this.options)), s);
370
370
  if (this._$AH?._$AD === i) this._$AH.p(e);
371
371
  else {
372
- const o = new Bt(i, this), n = o.u(this.options);
373
- o.p(e), this.T(n), this._$AH = o;
372
+ const n = new Bt(i, this), o = n.u(this.options);
373
+ n.p(e), this.T(o), this._$AH = n;
374
374
  }
375
375
  }
376
376
  _$AC(t) {
@@ -381,7 +381,7 @@ class U {
381
381
  et(this._$AH) || (this._$AH = [], this._$AR());
382
382
  const e = this._$AH;
383
383
  let s, i = 0;
384
- for (const o of t) i === e.length ? e.push(s = new U(this.O(H()), this.O(H()), this, this.options)) : s = e[i], s._$AI(o), i++;
384
+ for (const n of t) i === e.length ? e.push(s = new U(this.O(H()), this.O(H()), this, this.options)) : s = e[i], s._$AI(n), i++;
385
385
  i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
386
386
  }
387
387
  _$AR(t = this._$AA.nextSibling, e) {
@@ -401,48 +401,48 @@ class B {
401
401
  get _$AU() {
402
402
  return this._$AM._$AU;
403
403
  }
404
- constructor(t, e, s, i, o) {
405
- this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
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
407
  _$AI(t, e = this, s, i) {
408
- const o = this.strings;
409
- let n = !1;
410
- if (o === void 0) t = P(this, t, e, 0), n = !L(t) || t !== this._$AH && t !== y, n && (this._$AH = t);
408
+ const n = this.strings;
409
+ let o = !1;
410
+ if (n === void 0) t = P(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== y, o && (this._$AH = t);
411
411
  else {
412
412
  const h = t;
413
413
  let a, d;
414
- for (t = o[0], a = 0; a < o.length - 1; a++) d = P(this, h[s + a], e, a), d === y && (d = this._$AH[a]), n ||= !L(d) || d !== this._$AH[a], d === f ? t = f : t !== f && (t += (d ?? "") + o[a + 1]), this._$AH[a] = d;
414
+ for (t = n[0], a = 0; a < n.length - 1; a++) d = P(this, h[s + a], e, a), d === y && (d = this._$AH[a]), o ||= !L(d) || d !== this._$AH[a], d === $ ? t = $ : t !== $ && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
415
415
  }
416
- n && !i && this.j(t);
416
+ o && !i && this.j(t);
417
417
  }
418
418
  j(t) {
419
- t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
419
+ t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
420
420
  }
421
421
  }
422
- class Vt extends B {
422
+ class Wt extends B {
423
423
  constructor() {
424
424
  super(...arguments), this.type = 3;
425
425
  }
426
426
  j(t) {
427
- this.element[this.name] = t === f ? void 0 : t;
427
+ this.element[this.name] = t === $ ? void 0 : t;
428
428
  }
429
429
  }
430
- class Wt extends B {
430
+ class Vt extends B {
431
431
  constructor() {
432
432
  super(...arguments), this.type = 4;
433
433
  }
434
434
  j(t) {
435
- this.element.toggleAttribute(this.name, !!t && t !== f);
435
+ this.element.toggleAttribute(this.name, !!t && t !== $);
436
436
  }
437
437
  }
438
438
  class qt extends B {
439
- constructor(t, e, s, i, o) {
440
- super(t, e, s, i, o), this.type = 5;
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
- if ((t = P(this, t, e, 0) ?? f) === y) return;
444
- const s = this._$AH, i = t === f && s !== f || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== f && (s === f || i);
445
- i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
443
+ if ((t = P(this, t, e, 0) ?? $) === y) return;
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);
@@ -465,8 +465,8 @@ const Yt = (r, t, e) => {
465
465
  const s = e?.renderBefore ?? t;
466
466
  let i = s._$litPart$;
467
467
  if (i === void 0) {
468
- const o = e?.renderBefore ?? null;
469
- s._$litPart$ = i = new U(t.insertBefore(H(), o), o, void 0, e ?? {});
468
+ const n = e?.renderBefore ?? null;
469
+ s._$litPart$ = i = new U(t.insertBefore(H(), n), n, void 0, e ?? {});
470
470
  }
471
471
  return i._$AI(r), i;
472
472
  };
@@ -504,45 +504,45 @@ const Jt = (r) => (t, e) => {
504
504
  };
505
505
  const Kt = { attribute: !0, type: String, converter: j, reflect: !1, hasChanged: Q }, Qt = (r = Kt, t, e) => {
506
506
  const { kind: s, metadata: i } = e;
507
- let o = globalThis.litPropertyMetadata.get(i);
508
- if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), o.set(e.name, r), s === "accessor") {
509
- const { name: n } = e;
507
+ let n = globalThis.litPropertyMetadata.get(i);
508
+ 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") {
509
+ const { name: o } = e;
510
510
  return { set(h) {
511
511
  const a = t.get.call(this);
512
- t.set.call(this, h), this.requestUpdate(n, a, r);
512
+ t.set.call(this, h), this.requestUpdate(o, a, r);
513
513
  }, init(h) {
514
- return h !== void 0 && this.C(n, void 0, r, h), h;
514
+ return h !== void 0 && this.C(o, void 0, r, h), h;
515
515
  } };
516
516
  }
517
517
  if (s === "setter") {
518
- const { name: n } = e;
518
+ const { name: o } = e;
519
519
  return function(h) {
520
- const a = this[n];
521
- t.call(this, h), this.requestUpdate(n, a, r);
520
+ const a = this[o];
521
+ t.call(this, h), this.requestUpdate(o, a, r);
522
522
  };
523
523
  }
524
524
  throw Error("Unsupported decorator location: " + s);
525
525
  };
526
- function V(r) {
527
- return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((s, i, o) => {
528
- const n = i.hasOwnProperty(o);
529
- return i.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
526
+ function W(r) {
527
+ return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((s, i, n) => {
528
+ const o = i.hasOwnProperty(n);
529
+ return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
530
530
  })(r, t, e);
531
531
  }
532
532
  function T(r) {
533
- return V({ ...r, state: !0, attribute: !1 });
533
+ return W({ ...r, state: !0, attribute: !1 });
534
534
  }
535
535
  const te = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
536
536
  function ee(r, t) {
537
537
  return (e, s, i) => {
538
- const o = (n) => n.renderRoot?.querySelector(r) ?? null;
538
+ const n = (o) => o.renderRoot?.querySelector(r) ?? null;
539
539
  return te(e, s, { get() {
540
- return o(this);
540
+ return n(this);
541
541
  } });
542
542
  };
543
543
  }
544
544
  const it = { ATTRIBUTE: 1, CHILD: 2 }, rt = (r) => (...t) => ({ _$litDirective$: r, values: t });
545
- let ot = class {
545
+ let nt = class {
546
546
  constructor(t) {
547
547
  }
548
548
  get _$AU() {
@@ -558,7 +558,7 @@ let ot = class {
558
558
  return this.render(...e);
559
559
  }
560
560
  };
561
- const Et = "important", se = " !" + Et, F = rt(class extends ot {
561
+ const Et = "important", se = " !" + Et, F = rt(class extends nt {
562
562
  constructor(r) {
563
563
  if (super(r), r.type !== it.ATTRIBUTE || r.name !== "style" || r.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
564
564
  }
@@ -576,19 +576,19 @@ const Et = "important", se = " !" + Et, F = rt(class extends ot {
576
576
  const i = t[s];
577
577
  if (i != null) {
578
578
  this.ft.add(s);
579
- const o = typeof i == "string" && i.endsWith(se);
580
- s.includes("-") || o ? e.setProperty(s, o ? i.slice(0, -11) : i, o ? Et : "") : e[s] = i;
579
+ const n = typeof i == "string" && i.endsWith(se);
580
+ s.includes("-") || n ? e.setProperty(s, n ? i.slice(0, -11) : i, n ? Et : "") : e[s] = i;
581
581
  }
582
582
  }
583
583
  return y;
584
584
  }
585
585
  });
586
- class Y extends ot {
586
+ class Y extends nt {
587
587
  constructor(t) {
588
- if (super(t), this.it = f, t.type !== it.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
588
+ if (super(t), this.it = $, t.type !== it.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
589
589
  }
590
590
  render(t) {
591
- if (t === f || t == null) return this._t = void 0, this.it = t;
591
+ if (t === $ || t == null) return this._t = void 0, this.it = t;
592
592
  if (t === y) return t;
593
593
  if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
594
594
  if (t === this.it) return this._t;
@@ -605,24 +605,24 @@ const ie = rt(G);
605
605
  const { I: re } = Zt, vt = () => document.createComment(""), M = (r, t, e) => {
606
606
  const s = r._$AA.parentNode, i = t === void 0 ? r._$AB : t._$AA;
607
607
  if (e === void 0) {
608
- const o = s.insertBefore(vt(), i), n = s.insertBefore(vt(), i);
609
- e = new re(o, n, r, r.options);
608
+ const n = s.insertBefore(vt(), i), o = s.insertBefore(vt(), i);
609
+ e = new re(n, o, r, r.options);
610
610
  } else {
611
- const o = e._$AB.nextSibling, n = e._$AM, h = n !== r;
611
+ const n = e._$AB.nextSibling, o = e._$AM, h = o !== r;
612
612
  if (h) {
613
613
  let a;
614
- e._$AQ?.(r), e._$AM = r, e._$AP !== void 0 && (a = r._$AU) !== n._$AU && e._$AP(a);
614
+ e._$AQ?.(r), e._$AM = r, e._$AP !== void 0 && (a = r._$AU) !== o._$AU && e._$AP(a);
615
615
  }
616
- if (o !== i || h) {
616
+ if (n !== i || h) {
617
617
  let a = e._$AA;
618
- for (; a !== o; ) {
618
+ for (; a !== n; ) {
619
619
  const d = a.nextSibling;
620
620
  s.insertBefore(a, i), a = d;
621
621
  }
622
622
  }
623
623
  }
624
624
  return e;
625
- }, w = (r, t, e = r) => (r._$AI(t, e), r), oe = {}, ne = (r, t = oe) => r._$AH = t, ae = (r) => r._$AH, Z = (r) => {
625
+ }, w = (r, t, e = r) => (r._$AI(t, e), r), ne = {}, oe = (r, t = ne) => r._$AH = t, ae = (r) => r._$AH, Z = (r) => {
626
626
  r._$AP?.(!1, !0);
627
627
  let t = r._$AA;
628
628
  const e = r._$AB.nextSibling;
@@ -635,55 +635,55 @@ const yt = (r, t, e) => {
635
635
  const s = /* @__PURE__ */ new Map();
636
636
  for (let i = t; i <= e; i++) s.set(r[i], i);
637
637
  return s;
638
- }, X = rt(class extends ot {
638
+ }, X = rt(class extends nt {
639
639
  constructor(r) {
640
640
  if (super(r), r.type !== it.CHILD) throw Error("repeat() can only be used in text expressions");
641
641
  }
642
642
  dt(r, t, e) {
643
643
  let s;
644
644
  e === void 0 ? e = t : t !== void 0 && (s = t);
645
- const i = [], o = [];
646
- let n = 0;
647
- for (const h of r) i[n] = s ? s(h, n) : n, o[n] = e(h, n), n++;
648
- return { values: o, keys: i };
645
+ const i = [], n = [];
646
+ let o = 0;
647
+ for (const h of r) i[o] = s ? s(h, o) : o, n[o] = e(h, o), o++;
648
+ return { values: n, keys: i };
649
649
  }
650
650
  render(r, t, e) {
651
651
  return this.dt(r, t, e).values;
652
652
  }
653
653
  update(r, [t, e, s]) {
654
- const i = ae(r), { values: o, keys: n } = this.dt(t, e, s);
655
- if (!Array.isArray(i)) return this.ut = n, o;
654
+ const i = ae(r), { values: n, keys: o } = this.dt(t, e, s);
655
+ if (!Array.isArray(i)) return this.ut = o, n;
656
656
  const h = this.ut ??= [], a = [];
657
- let d, u, l = 0, p = i.length - 1, c = 0, $ = o.length - 1;
658
- for (; l <= p && c <= $; ) if (i[l] === null) l++;
657
+ let d, u, l = 0, p = i.length - 1, c = 0, f = n.length - 1;
658
+ for (; l <= p && c <= f; ) if (i[l] === null) l++;
659
659
  else if (i[p] === null) p--;
660
- else if (h[l] === n[c]) a[c] = w(i[l], o[c]), l++, c++;
661
- else if (h[p] === n[$]) a[$] = w(i[p], o[$]), p--, $--;
662
- else if (h[l] === n[$]) a[$] = w(i[l], o[$]), M(r, a[$ + 1], i[l]), l++, $--;
663
- else if (h[p] === n[c]) a[c] = w(i[p], o[c]), M(r, i[l], i[p]), p--, c++;
664
- else if (d === void 0 && (d = yt(n, c, $), u = yt(h, l, p)), d.has(h[l])) if (d.has(h[p])) {
665
- const m = u.get(n[c]), W = m !== void 0 ? i[m] : null;
666
- if (W === null) {
660
+ else if (h[l] === o[c]) a[c] = w(i[l], n[c]), l++, c++;
661
+ else if (h[p] === o[f]) a[f] = w(i[p], n[f]), p--, f--;
662
+ else if (h[l] === o[f]) a[f] = w(i[l], n[f]), M(r, a[f + 1], i[l]), l++, f--;
663
+ else if (h[p] === o[c]) a[c] = w(i[p], n[c]), M(r, i[l], i[p]), p--, c++;
664
+ else if (d === void 0 && (d = yt(o, c, f), u = yt(h, l, p)), d.has(h[l])) if (d.has(h[p])) {
665
+ const m = u.get(o[c]), V = m !== void 0 ? i[m] : null;
666
+ if (V === null) {
667
667
  const at = M(r, i[l]);
668
- w(at, o[c]), a[c] = at;
669
- } else a[c] = w(W, o[c]), M(r, i[l], W), i[m] = null;
668
+ w(at, n[c]), a[c] = at;
669
+ } else a[c] = w(V, n[c]), M(r, i[l], V), i[m] = null;
670
670
  c++;
671
671
  } else Z(i[p]), p--;
672
672
  else Z(i[l]), l++;
673
- for (; c <= $; ) {
674
- const m = M(r, a[$ + 1]);
675
- w(m, o[c]), a[c++] = m;
673
+ for (; c <= f; ) {
674
+ const m = M(r, a[f + 1]);
675
+ w(m, n[c]), a[c++] = m;
676
676
  }
677
677
  for (; l <= p; ) {
678
678
  const m = i[l++];
679
679
  m !== null && Z(m);
680
680
  }
681
- return this.ut = n, ne(r, a), y;
681
+ return this.ut = o, oe(r, a), y;
682
682
  }
683
683
  });
684
684
  var le = Object.defineProperty, he = Object.getOwnPropertyDescriptor, Ct = (r, t, e, s) => {
685
- for (var i = s > 1 ? void 0 : s ? he(t, e) : t, o = r.length - 1, n; o >= 0; o--)
686
- (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
685
+ for (var i = s > 1 ? void 0 : s ? he(t, e) : t, n = r.length - 1, o; n >= 0; n--)
686
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
687
687
  return s && i && le(t, e, i), i;
688
688
  };
689
689
  let I = class extends C {
@@ -736,19 +736,19 @@ I.styles = bt`
736
736
  }
737
737
  `;
738
738
  Ct([
739
- V({ type: Number })
739
+ W({ type: Number })
740
740
  ], I.prototype, "value", 2);
741
741
  I = Ct([
742
742
  Jt("linear-progress")
743
743
  ], I);
744
744
  var ce = Object.defineProperty, _ = (r, t, e, s) => {
745
- for (var i = void 0, o = r.length - 1, n; o >= 0; o--)
746
- (n = r[o]) && (i = n(t, e, i) || i);
745
+ for (var i = void 0, n = r.length - 1, o; n >= 0; n--)
746
+ (o = r[n]) && (i = o(t, e, i) || i);
747
747
  return i && ce(t, e, i), i;
748
748
  };
749
- const nt = class nt extends C {
749
+ const ot = class ot extends C {
750
750
  constructor() {
751
- super(), this.version = "1.0.11", this.getModifier = this.getModifier.bind(this);
751
+ super(), this.version = "1.0.13", this.getModifier = this.getModifier.bind(this);
752
752
  }
753
753
  update(t) {
754
754
  t.has("inputData") && (this.transform(), this.modifier || this.getModifier()), t.has("theme") && this.registerTheme(this.theme), super.update(t);
@@ -757,8 +757,7 @@ const nt = class nt extends C {
757
757
  this.registerTheme(this.theme), new ResizeObserver(this.getModifier).observe(this);
758
758
  }
759
759
  registerTheme(t) {
760
- const e = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), s = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
761
- this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = e || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = e || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor;
760
+ this.themeBgColor = `var(--re-tile-background-color, ${this.theme?.theme_object?.backgroundColor || "transparent"})`, this.themeTitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.textStyle?.color || "inherit"})`, this.themeSubtitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.subtextStyle?.color || this.theme?.theme_object?.title?.textStyle?.color || "inherit"})`;
762
761
  }
763
762
  handleFileChange(t) {
764
763
  const s = t.target.files?.[0];
@@ -819,13 +818,13 @@ const nt = class nt extends C {
819
818
  if (console.log(c), c && c.width > 0 && c.height > 0)
820
819
  s = c.width, i = c.height;
821
820
  else {
822
- const $ = this.baseLayer.getAttribute("width"), m = this.baseLayer.getAttribute("height");
823
- $ && m && (s = parseFloat($), i = parseFloat(m));
821
+ const f = this.baseLayer.getAttribute("width"), m = this.baseLayer.getAttribute("height");
822
+ f && m && (s = parseFloat(f), i = parseFloat(m));
824
823
  }
825
824
  }
826
825
  }
827
826
  if (!s || !i) return;
828
- const o = t.width / s, n = t.height / i, h = Math.min(o, n), a = s * h, d = i * h, u = (e.width - a) / 2, l = (e.height - d) / 2;
827
+ const n = t.width / s, o = t.height / i, h = Math.min(n, o), a = s * h, d = i * h, u = (e.width - a) / 2, l = (e.height - d) / 2;
829
828
  this.modifier = { scaler: h, xOffset: u, yOffset: l, visibleWidth: a, visibleHeight: d };
830
829
  }
831
830
  getOverlayItemPosition(t, e, s) {
@@ -835,14 +834,14 @@ const nt = class nt extends C {
835
834
  };
836
835
  }
837
836
  renderText(t, e, s) {
838
- const i = t, o = this.getOverlayItemPosition(e.relXPos, e.relYPos, s);
839
- if (!o) return f;
840
- const n = i.textStyle?.precision ?? 1;
837
+ const i = t, n = this.getOverlayItemPosition(e.relXPos, e.relYPos, s);
838
+ if (!n) return $;
839
+ const o = i.textStyle?.precision ?? 1;
841
840
  let h = e.data;
842
841
  const a = Number(h);
843
842
  let d = "#333";
844
- if (!Number.isNaN(a) && typeof n == "number" && n >= 0) {
845
- h = a.toFixed(n);
843
+ if (!Number.isNaN(a) && typeof o == "number" && o >= 0) {
844
+ h = a.toFixed(o);
846
845
  const l = i.sections?.sectionLimits.findIndex((p) => a <= p) ?? -2;
847
846
  d = (l >= 1 ? i.sections?.colors[l - 1] : "#333") ?? "#333";
848
847
  }
@@ -851,8 +850,8 @@ const nt = class nt extends C {
851
850
  color: d,
852
851
  "background-color": i.textStyle.backgroundColor,
853
852
  "font-weight": i.textStyle.fontWeight,
854
- left: `${o.left}px`,
855
- top: `${o.top}px`,
853
+ left: `${n.left}px`,
854
+ top: `${n.top}px`,
856
855
  "border-radius": 10 * s.scaler + "px",
857
856
  "transform-origin": "50% 50%",
858
857
  transform: "translate(-50%, -50%)",
@@ -863,25 +862,25 @@ const nt = class nt extends C {
863
862
  `;
864
863
  }
865
864
  renderProgress(t, e, s) {
866
- const i = t, o = this.getOverlayItemPosition(e.relXPos, e.relYPos, s);
867
- if (!o) return f;
868
- const n = i.sections?.sectionLimits.findIndex(($) => Number(e.data) <= $) ?? -2, a = {
869
- "--progress-color": (n >= 1 ? i.sections?.colors[n - 1] : void 0) ?? "#333",
865
+ const i = t, n = this.getOverlayItemPosition(e.relXPos, e.relYPos, s);
866
+ if (!n) return $;
867
+ const o = i.sections?.sectionLimits.findIndex((f) => Number(e.data) <= f) ?? -2, a = {
868
+ "--progress-color": (o >= 1 ? i.sections?.colors[o - 1] : void 0) ?? "#333",
870
869
  "--progress-width": (i.progressStyle?.width ?? 10) * s.scaler + "px",
871
870
  "--progress-height": (i.progressStyle?.height ?? 100) * s.scaler + "px",
872
871
  "--progress-background": i.progressStyle?.backgroundColor ?? "#fff",
873
872
  "border-radius": 10 * s.scaler + "px",
874
873
  "transform-origin": "50% 50%",
875
874
  transform: `translate(-50%, -50%) rotate(${i.progressStyle?.rotate ?? 0}deg)`,
876
- left: `${o.left}px`,
877
- top: `${o.top}px`
875
+ left: `${n.left}px`,
876
+ top: `${n.top}px`
878
877
  }, d = Number(e.data), u = i.sections ?? {}, l = Math.min(...u.sectionLimits.map(Number)), p = Math.max(...u.sectionLimits.map(Number));
879
878
  let c = p === l ? 0 : (d - l) / (p - l);
880
879
  return c = Math.min(1, Math.max(0, c)), g` <linear-progress .value=${c} style=${F(a)}></linear-progress> `;
881
880
  }
882
881
  renderLayer(t) {
883
882
  const e = this.modifier;
884
- if (!e) return f;
883
+ if (!e) return $;
885
884
  const s = {
886
885
  left: e.xOffset + "px",
887
886
  top: e.yOffset + "px",
@@ -903,7 +902,7 @@ const nt = class nt extends C {
903
902
  t.textPins ?? [],
904
903
  (s, i) => i,
905
904
  (s) => g`${this.renderText(t, s, e)}`
906
- )}` : f;
905
+ )}` : $;
907
906
  }
908
907
  renderProgressLayer(t) {
909
908
  const e = this.modifier;
@@ -911,7 +910,7 @@ const nt = class nt extends C {
911
910
  t.progressPins ?? [],
912
911
  (s, i) => i,
913
912
  (s) => g`${this.renderProgress(t, s, e)}`
914
- )}` : f;
913
+ )}` : $;
915
914
  }
916
915
  render() {
917
916
  const t = !!this.inlineSvg || !!this.previewUrl;
@@ -947,7 +946,7 @@ const nt = class nt extends C {
947
946
  `;
948
947
  }
949
948
  };
950
- nt.styles = bt`
949
+ ot.styles = bt`
951
950
  :host {
952
951
  display: block;
953
952
  font-family: sans-serif;
@@ -1031,12 +1030,12 @@ nt.styles = bt`
1031
1030
  pointer-events: auto;
1032
1031
  }
1033
1032
  `;
1034
- let v = nt;
1033
+ let v = ot;
1035
1034
  _([
1036
- V({ type: Object })
1035
+ W({ type: Object })
1037
1036
  ], v.prototype, "inputData");
1038
1037
  _([
1039
- V({ type: Object })
1038
+ W({ type: Object })
1040
1039
  ], v.prototype, "theme");
1041
1040
  _([
1042
1041
  T()
@@ -1059,7 +1058,7 @@ _([
1059
1058
  _([
1060
1059
  ee("#base-layer")
1061
1060
  ], v.prototype, "baseLayer");
1062
- window.customElements.define("widget-overlay-1.0.11", v);
1061
+ window.customElements.define("widget-overlay-1.0.13", v);
1063
1062
  export {
1064
1063
  v as WidgetImage
1065
1064
  };