@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.
- package/dist/widget-overlay.js +151 -152
- package/dist/widget-overlay.js.map +1 -1
- package/package.json +8 -4
- package/src/definition-schema.d.ts +189 -0
- package/src/definition-schema.json +15 -1
- package/src/widget-overlay.ts +24 -16
package/dist/widget-overlay.js
CHANGED
|
@@ -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,
|
|
22
|
-
if (
|
|
23
|
-
if (typeof
|
|
24
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
25
|
-
})(i) + r[
|
|
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:
|
|
82
|
+
const { get: i, set: n } = Mt(this.prototype, t) ?? { get() {
|
|
83
83
|
return this[e];
|
|
84
|
-
}, set(
|
|
85
|
-
this[e] =
|
|
84
|
+
}, set(o) {
|
|
85
|
+
this[e] = o;
|
|
86
86
|
} };
|
|
87
|
-
return { get: i, set(
|
|
87
|
+
return { get: i, set(o) {
|
|
88
88
|
const h = i?.call(this);
|
|
89
|
-
|
|
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
|
|
166
|
-
this._$Em = t,
|
|
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
|
|
173
|
-
this._$Em = i, this[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
176
|
requestUpdate(t, e, s) {
|
|
177
177
|
if (t !== void 0) {
|
|
178
|
-
const i = this.constructor,
|
|
179
|
-
if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Q)(
|
|
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:
|
|
185
|
-
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(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,
|
|
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,
|
|
209
|
-
const { wrapped:
|
|
210
|
-
|
|
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,
|
|
250
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
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,
|
|
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 && (
|
|
262
|
-
const c =
|
|
263
|
-
|
|
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,
|
|
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
|
|
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[
|
|
281
|
-
a.push({ type: 1, index:
|
|
282
|
-
} else l.startsWith(b) && (a.push({ type: 6, index:
|
|
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: ++
|
|
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:
|
|
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:
|
|
294
|
+
for (; (l = i.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: n }), l += b.length - 1;
|
|
295
295
|
}
|
|
296
|
-
|
|
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
|
|
308
|
-
return i?.constructor !==
|
|
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
|
|
323
|
+
let n = x.nextNode(), o = 0, h = 0, a = s[0];
|
|
324
324
|
for (; a !== void 0; ) {
|
|
325
|
-
if (
|
|
325
|
+
if (o === a.index) {
|
|
326
326
|
let d;
|
|
327
|
-
a.type === 2 ? d = new U(
|
|
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
|
-
|
|
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 =
|
|
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 ===
|
|
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 !==
|
|
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
|
|
373
|
-
|
|
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
|
|
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,
|
|
405
|
-
this.type = 1, 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
407
|
_$AI(t, e = this, s, i) {
|
|
408
|
-
const
|
|
409
|
-
let
|
|
410
|
-
if (
|
|
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 =
|
|
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
|
-
|
|
416
|
+
o && !i && this.j(t);
|
|
417
417
|
}
|
|
418
418
|
j(t) {
|
|
419
|
-
t ===
|
|
419
|
+
t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
class
|
|
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 ===
|
|
427
|
+
this.element[this.name] = t === $ ? void 0 : t;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
class
|
|
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 !==
|
|
435
|
+
this.element.toggleAttribute(this.name, !!t && t !== $);
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
class qt extends B {
|
|
439
|
-
constructor(t, e, s, i,
|
|
440
|
-
super(t, e, s, i,
|
|
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) ??
|
|
444
|
-
const s = this._$AH, i = t ===
|
|
445
|
-
i && this.element.removeEventListener(this.name, this, s),
|
|
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
|
|
469
|
-
s._$litPart$ = i = new U(t.insertBefore(H(),
|
|
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
|
|
508
|
-
if (
|
|
509
|
-
const { name:
|
|
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(
|
|
512
|
+
t.set.call(this, h), this.requestUpdate(o, a, r);
|
|
513
513
|
}, init(h) {
|
|
514
|
-
return h !== void 0 && this.C(
|
|
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:
|
|
518
|
+
const { name: o } = e;
|
|
519
519
|
return function(h) {
|
|
520
|
-
const a = this[
|
|
521
|
-
t.call(this, h), this.requestUpdate(
|
|
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
|
|
527
|
-
return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((s, i,
|
|
528
|
-
const
|
|
529
|
-
return i.constructor.createProperty(
|
|
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
|
|
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
|
|
538
|
+
const n = (o) => o.renderRoot?.querySelector(r) ?? null;
|
|
539
539
|
return te(e, s, { get() {
|
|
540
|
-
return
|
|
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
|
|
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
|
|
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
|
|
580
|
-
s.includes("-") ||
|
|
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
|
|
586
|
+
class Y extends nt {
|
|
587
587
|
constructor(t) {
|
|
588
|
-
if (super(t), this.it =
|
|
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 ===
|
|
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
|
|
609
|
-
e = new re(
|
|
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
|
|
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) !==
|
|
614
|
+
e._$AQ?.(r), e._$AM = r, e._$AP !== void 0 && (a = r._$AU) !== o._$AU && e._$AP(a);
|
|
615
615
|
}
|
|
616
|
-
if (
|
|
616
|
+
if (n !== i || h) {
|
|
617
617
|
let a = e._$AA;
|
|
618
|
-
for (; a !==
|
|
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),
|
|
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
|
|
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 = [],
|
|
646
|
-
let
|
|
647
|
-
for (const h of r) i[
|
|
648
|
-
return { values:
|
|
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:
|
|
655
|
-
if (!Array.isArray(i)) return this.ut =
|
|
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,
|
|
658
|
-
for (; l <= p && c <=
|
|
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] ===
|
|
661
|
-
else if (h[p] ===
|
|
662
|
-
else if (h[l] ===
|
|
663
|
-
else if (h[p] ===
|
|
664
|
-
else if (d === void 0 && (d = yt(
|
|
665
|
-
const m = u.get(
|
|
666
|
-
if (
|
|
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,
|
|
669
|
-
} else a[c] = w(
|
|
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[
|
|
675
|
-
w(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 =
|
|
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,
|
|
686
|
-
(
|
|
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
|
-
|
|
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,
|
|
746
|
-
(
|
|
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
|
|
749
|
+
const ot = class ot extends C {
|
|
750
750
|
constructor() {
|
|
751
|
-
super(), this.version = "1.0.
|
|
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
|
-
|
|
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
|
|
823
|
-
|
|
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
|
|
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,
|
|
839
|
-
if (!
|
|
840
|
-
const
|
|
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
|
|
845
|
-
h = a.toFixed(
|
|
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: `${
|
|
855
|
-
top: `${
|
|
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,
|
|
867
|
-
if (!
|
|
868
|
-
const
|
|
869
|
-
"--progress-color": (
|
|
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: `${
|
|
877
|
-
top: `${
|
|
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
|
|
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
|
-
)}` :
|
|
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
|
-
)}` :
|
|
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
|
-
|
|
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 =
|
|
1033
|
+
let v = ot;
|
|
1035
1034
|
_([
|
|
1036
|
-
|
|
1035
|
+
W({ type: Object })
|
|
1037
1036
|
], v.prototype, "inputData");
|
|
1038
1037
|
_([
|
|
1039
|
-
|
|
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.
|
|
1061
|
+
window.customElements.define("widget-overlay-1.0.13", v);
|
|
1063
1062
|
export {
|
|
1064
1063
|
v as WidgetImage
|
|
1065
1064
|
};
|