@record-evolution/widget-gauge 1.7.34 → 1.7.36

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,9 +1,9 @@
1
- import * as G from "echarts/core";
2
- import { TooltipComponent as vt } from "echarts/components";
3
- import { GaugeChart as bt } from "echarts/charts";
4
- import { CanvasRenderer as At } from "echarts/renderers";
5
- const k = globalThis, K = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = /* @__PURE__ */ Symbol(), st = /* @__PURE__ */ new WeakMap();
6
- let ut = class {
1
+ import * as V from "echarts/core";
2
+ import { TooltipComponent as At } from "echarts/components";
3
+ import { GaugeChart as St } from "echarts/charts";
4
+ import { CanvasRenderer as Ct } from "echarts/renderers";
5
+ const B = globalThis, K = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = /* @__PURE__ */ Symbol(), nt = /* @__PURE__ */ new WeakMap();
6
+ let gt = class {
7
7
  constructor(t, e, i) {
8
8
  if (this._$cssResult$ = !0, i !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
9
  this.cssText = t, this.t = e;
@@ -13,7 +13,7 @@ let ut = class {
13
13
  const e = this.t;
14
14
  if (K && t === void 0) {
15
15
  const i = e !== void 0 && e.length === 1;
16
- i && (t = st.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && st.set(e, t));
16
+ i && (t = nt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && nt.set(e, t));
17
17
  }
18
18
  return t;
19
19
  }
@@ -21,28 +21,28 @@ let ut = class {
21
21
  return this.cssText;
22
22
  }
23
23
  };
24
- const St = (s) => new ut(typeof s == "string" ? s : s + "", void 0, Z), Ct = (s, ...t) => {
24
+ const wt = (s) => new gt(typeof s == "string" ? s : s + "", void 0, Z), xt = (s, ...t) => {
25
25
  const e = s.length === 1 ? s[0] : t.reduce(((i, r, n) => i + ((o) => {
26
26
  if (o._$cssResult$ === !0) return o.cssText;
27
27
  if (typeof o == "number") return o;
28
28
  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.");
29
29
  })(r) + s[n + 1]), s[0]);
30
- return new ut(e, s, Z);
31
- }, wt = (s, t) => {
30
+ return new gt(e, s, Z);
31
+ }, Et = (s, t) => {
32
32
  if (K) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
33
33
  else for (const e of t) {
34
- const i = document.createElement("style"), r = k.litNonce;
34
+ const i = document.createElement("style"), r = B.litNonce;
35
35
  r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
36
36
  }
37
- }, rt = K ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
37
+ }, ot = K ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
38
38
  let e = "";
39
39
  for (const i of t.cssRules) e += i.cssText;
40
- return St(e);
40
+ return wt(e);
41
41
  })(s) : s;
42
- const { is: xt, defineProperty: Et, getOwnPropertyDescriptor: Pt, getOwnPropertyNames: Tt, getOwnPropertySymbols: Ot, getPrototypeOf: Nt } = Object, W = globalThis, nt = W.trustedTypes, Mt = nt ? nt.emptyScript : "", Ht = W.reactiveElementPolyfillSupport, N = (s, t) => s, V = { toAttribute(s, t) {
42
+ const { is: Pt, defineProperty: Tt, getOwnPropertyDescriptor: Ot, getOwnPropertyNames: Nt, getOwnPropertySymbols: zt, getPrototypeOf: Mt } = Object, q = globalThis, at = q.trustedTypes, Ut = at ? at.emptyScript : "", Ht = q.reactiveElementPolyfillSupport, U = (s, t) => s, W = { toAttribute(s, t) {
43
43
  switch (t) {
44
44
  case Boolean:
45
- s = s ? Mt : null;
45
+ s = s ? Ut : null;
46
46
  break;
47
47
  case Object:
48
48
  case Array:
@@ -67,44 +67,44 @@ const { is: xt, defineProperty: Et, getOwnPropertyDescriptor: Pt, getOwnProperty
67
67
  }
68
68
  }
69
69
  return e;
70
- } }, F = (s, t) => !xt(s, t), ot = { attribute: !0, type: String, converter: V, reflect: !1, useDefault: !1, hasChanged: F };
71
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), W.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
72
- let w = class extends HTMLElement {
70
+ } }, F = (s, t) => !Pt(s, t), lt = { attribute: !0, type: String, converter: W, reflect: !1, useDefault: !1, hasChanged: F };
71
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), q.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
72
+ let T = class extends HTMLElement {
73
73
  static addInitializer(t) {
74
74
  this._$Ei(), (this.l ??= []).push(t);
75
75
  }
76
76
  static get observedAttributes() {
77
77
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
78
78
  }
79
- static createProperty(t, e = ot) {
79
+ static createProperty(t, e = lt) {
80
80
  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) {
81
81
  const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, e);
82
- r !== void 0 && Et(this.prototype, t, r);
82
+ r !== void 0 && Tt(this.prototype, t, r);
83
83
  }
84
84
  }
85
85
  static getPropertyDescriptor(t, e, i) {
86
- const { get: r, set: n } = Pt(this.prototype, t) ?? { get() {
86
+ const { get: r, set: n } = Ot(this.prototype, t) ?? { get() {
87
87
  return this[e];
88
88
  }, set(o) {
89
89
  this[e] = o;
90
90
  } };
91
91
  return { get: r, set(o) {
92
- const l = r?.call(this);
93
- n?.call(this, o), this.requestUpdate(t, l, i);
92
+ const h = r?.call(this);
93
+ n?.call(this, o), this.requestUpdate(t, h, i);
94
94
  }, configurable: !0, enumerable: !0 };
95
95
  }
96
96
  static getPropertyOptions(t) {
97
- return this.elementProperties.get(t) ?? ot;
97
+ return this.elementProperties.get(t) ?? lt;
98
98
  }
99
99
  static _$Ei() {
100
- if (this.hasOwnProperty(N("elementProperties"))) return;
101
- const t = Nt(this);
100
+ if (this.hasOwnProperty(U("elementProperties"))) return;
101
+ const t = Mt(this);
102
102
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
103
103
  }
104
104
  static finalize() {
105
- if (this.hasOwnProperty(N("finalized"))) return;
106
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
107
- const e = this.properties, i = [...Tt(e), ...Ot(e)];
105
+ if (this.hasOwnProperty(U("finalized"))) return;
106
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
107
+ const e = this.properties, i = [...Nt(e), ...zt(e)];
108
108
  for (const r of i) this.createProperty(r, e[r]);
109
109
  }
110
110
  const t = this[Symbol.metadata];
@@ -123,8 +123,8 @@ let w = class extends HTMLElement {
123
123
  const e = [];
124
124
  if (Array.isArray(t)) {
125
125
  const i = new Set(t.flat(1 / 0).reverse());
126
- for (const r of i) e.unshift(rt(r));
127
- } else t !== void 0 && e.push(rt(t));
126
+ for (const r of i) e.unshift(ot(r));
127
+ } else t !== void 0 && e.push(ot(t));
128
128
  return e;
129
129
  }
130
130
  static _$Eu(t, e) {
@@ -150,7 +150,7 @@ let w = class extends HTMLElement {
150
150
  }
151
151
  createRenderRoot() {
152
152
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
153
- return wt(t, this.constructor.elementStyles), t;
153
+ return Et(t, this.constructor.elementStyles), t;
154
154
  }
155
155
  connectedCallback() {
156
156
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
@@ -166,14 +166,14 @@ let w = class extends HTMLElement {
166
166
  _$ET(t, e) {
167
167
  const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
168
168
  if (r !== void 0 && i.reflect === !0) {
169
- const n = (i.converter?.toAttribute !== void 0 ? i.converter : V).toAttribute(e, i.type);
169
+ const n = (i.converter?.toAttribute !== void 0 ? i.converter : W).toAttribute(e, i.type);
170
170
  this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
171
171
  }
172
172
  }
173
173
  _$AK(t, e) {
174
174
  const i = this.constructor, r = i._$Eh.get(t);
175
175
  if (r !== void 0 && this._$Em !== r) {
176
- const n = i.getPropertyOptions(r), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : V;
176
+ const n = i.getPropertyOptions(r), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : W;
177
177
  this._$Em = r, this[r] = o.fromAttribute(e, n.type) ?? this._$Ej?.get(r) ?? null, this._$Em = null;
178
178
  }
179
179
  }
@@ -210,8 +210,8 @@ let w = class extends HTMLElement {
210
210
  }
211
211
  const i = this.constructor.elementProperties;
212
212
  if (i.size > 0) for (const [r, n] of i) {
213
- const { wrapped: o } = n, l = this[r];
214
- o !== !0 || this._$AL.has(r) || l === void 0 || this.C(r, void 0, n, l);
213
+ const { wrapped: o } = n, h = this[r];
214
+ o !== !0 || this._$AL.has(r) || h === void 0 || this.C(r, void 0, n, h);
215
215
  }
216
216
  }
217
217
  let t = !1;
@@ -248,70 +248,70 @@ let w = class extends HTMLElement {
248
248
  firstUpdated(t) {
249
249
  }
250
250
  };
251
- w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[N("elementProperties")] = /* @__PURE__ */ new Map(), w[N("finalized")] = /* @__PURE__ */ new Map(), Ht?.({ ReactiveElement: w }), (W.reactiveElementVersions ??= []).push("2.1.0");
252
- const J = globalThis, B = J.trustedTypes, at = B ? B.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ft = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, gt = "?" + b, zt = `<${gt}>`, C = document, H = () => C.createComment(""), z = (s) => s === null || typeof s != "object" && typeof s != "function", Q = Array.isArray, Lt = (s) => Q(s) || typeof s?.[Symbol.iterator] == "function", q = `[
253
- \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, lt = />/g, A = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
254
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, mt = /^(?:script|style|textarea|title)$/i, Ut = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), Dt = Ut(1), x = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), pt = /* @__PURE__ */ new WeakMap(), S = C.createTreeWalker(C, 129);
255
- function $t(s, t) {
256
- if (!Q(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
257
- return at !== void 0 ? at.createHTML(t) : t;
251
+ T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[U("elementProperties")] = /* @__PURE__ */ new Map(), T[U("finalized")] = /* @__PURE__ */ new Map(), Ht?.({ ReactiveElement: T }), (q.reactiveElementVersions ??= []).push("2.1.0");
252
+ const Q = globalThis, I = Q.trustedTypes, ht = I ? I.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, mt = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, $t = "?" + w, Lt = `<${$t}>`, P = document, L = () => P.createComment(""), D = (s) => s === null || typeof s != "object" && typeof s != "function", X = Array.isArray, Dt = (s) => X(s) || typeof s?.[Symbol.iterator] == "function", J = `[
253
+ \f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ct = /-->/g, dt = />/g, x = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
254
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), pt = /'/g, ut = /"/g, yt = /^(?:script|style|textarea|title)$/i, jt = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), Rt = jt(1), O = /* @__PURE__ */ Symbol.for("lit-noChange"), g = /* @__PURE__ */ Symbol.for("lit-nothing"), ft = /* @__PURE__ */ new WeakMap(), E = P.createTreeWalker(P, 129);
255
+ function _t(s, t) {
256
+ if (!X(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
257
+ return ht !== void 0 ? ht.createHTML(t) : t;
258
258
  }
259
- const jt = (s, t) => {
259
+ const kt = (s, t) => {
260
260
  const e = s.length - 1, i = [];
261
- let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = O;
262
- for (let l = 0; l < e; l++) {
263
- const a = s[l];
264
- let h, d, c = -1, f = 0;
265
- for (; f < a.length && (o.lastIndex = f, d = o.exec(a), d !== null); ) f = o.lastIndex, o === O ? d[1] === "!--" ? o = ht : d[1] !== void 0 ? o = lt : d[2] !== void 0 ? (mt.test(d[2]) && (r = RegExp("</" + d[2], "g")), o = A) : d[3] !== void 0 && (o = A) : o === A ? d[0] === ">" ? (o = r ?? O, c = -1) : d[1] === void 0 ? c = -2 : (c = o.lastIndex - d[2].length, h = d[1], o = d[3] === void 0 ? A : d[3] === '"' ? dt : ct) : o === dt || o === ct ? o = A : o === ht || o === lt ? o = O : (o = A, r = void 0);
266
- const u = o === A && s[l + 1].startsWith("/>") ? " " : "";
267
- n += o === O ? a + zt : c >= 0 ? (i.push(h), a.slice(0, c) + ft + a.slice(c) + b + u) : a + b + (c === -2 ? l : u);
268
- }
269
- return [$t(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
261
+ let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = M;
262
+ for (let h = 0; h < e; h++) {
263
+ const l = s[h];
264
+ let p, u, a = -1, c = 0;
265
+ for (; c < l.length && (o.lastIndex = c, u = o.exec(l), u !== null); ) c = o.lastIndex, o === M ? u[1] === "!--" ? o = ct : u[1] !== void 0 ? o = dt : u[2] !== void 0 ? (yt.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = x) : u[3] !== void 0 && (o = x) : o === x ? u[0] === ">" ? (o = r ?? M, a = -1) : u[1] === void 0 ? a = -2 : (a = o.lastIndex - u[2].length, p = u[1], o = u[3] === void 0 ? x : u[3] === '"' ? ut : pt) : o === ut || o === pt ? o = x : o === ct || o === dt ? o = M : (o = x, r = void 0);
266
+ const m = o === x && s[h + 1].startsWith("/>") ? " " : "";
267
+ n += o === M ? l + Lt : a >= 0 ? (i.push(p), l.slice(0, a) + mt + l.slice(a) + w + m) : l + w + (a === -2 ? h : m);
268
+ }
269
+ return [_t(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
270
270
  };
271
- class L {
271
+ class j {
272
272
  constructor({ strings: t, _$litType$: e }, i) {
273
273
  let r;
274
274
  this.parts = [];
275
275
  let n = 0, o = 0;
276
- const l = t.length - 1, a = this.parts, [h, d] = jt(t, e);
277
- if (this.el = L.createElement(h, i), S.currentNode = this.el.content, e === 2 || e === 3) {
278
- const c = this.el.content.firstChild;
279
- c.replaceWith(...c.childNodes);
276
+ const h = t.length - 1, l = this.parts, [p, u] = kt(t, e);
277
+ if (this.el = j.createElement(p, i), E.currentNode = this.el.content, e === 2 || e === 3) {
278
+ const a = this.el.content.firstChild;
279
+ a.replaceWith(...a.childNodes);
280
280
  }
281
- for (; (r = S.nextNode()) !== null && a.length < l; ) {
281
+ for (; (r = E.nextNode()) !== null && l.length < h; ) {
282
282
  if (r.nodeType === 1) {
283
- if (r.hasAttributes()) for (const c of r.getAttributeNames()) if (c.endsWith(ft)) {
284
- const f = d[o++], u = r.getAttribute(c).split(b), _ = /([.?@])?(.*)/.exec(f);
285
- a.push({ type: 1, index: n, name: _[2], strings: u, ctor: _[1] === "." ? kt : _[1] === "?" ? Vt : _[1] === "@" ? Bt : I }), r.removeAttribute(c);
286
- } else c.startsWith(b) && (a.push({ type: 6, index: n }), r.removeAttribute(c));
287
- if (mt.test(r.tagName)) {
288
- const c = r.textContent.split(b), f = c.length - 1;
289
- if (f > 0) {
290
- r.textContent = B ? B.emptyScript : "";
291
- for (let u = 0; u < f; u++) r.append(c[u], H()), S.nextNode(), a.push({ type: 2, index: ++n });
292
- r.append(c[f], H());
283
+ if (r.hasAttributes()) for (const a of r.getAttributeNames()) if (a.endsWith(mt)) {
284
+ const c = u[o++], m = r.getAttribute(a).split(w), $ = /([.?@])?(.*)/.exec(c);
285
+ l.push({ type: 1, index: n, name: $[2], strings: m, ctor: $[1] === "." ? Bt : $[1] === "?" ? Wt : $[1] === "@" ? It : G }), r.removeAttribute(a);
286
+ } else a.startsWith(w) && (l.push({ type: 6, index: n }), r.removeAttribute(a));
287
+ if (yt.test(r.tagName)) {
288
+ const a = r.textContent.split(w), c = a.length - 1;
289
+ if (c > 0) {
290
+ r.textContent = I ? I.emptyScript : "";
291
+ for (let m = 0; m < c; m++) r.append(a[m], L()), E.nextNode(), l.push({ type: 2, index: ++n });
292
+ r.append(a[c], L());
293
293
  }
294
294
  }
295
- } else if (r.nodeType === 8) if (r.data === gt) a.push({ type: 2, index: n });
295
+ } else if (r.nodeType === 8) if (r.data === $t) l.push({ type: 2, index: n });
296
296
  else {
297
- let c = -1;
298
- for (; (c = r.data.indexOf(b, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += b.length - 1;
297
+ let a = -1;
298
+ for (; (a = r.data.indexOf(w, a + 1)) !== -1; ) l.push({ type: 7, index: n }), a += w.length - 1;
299
299
  }
300
300
  n++;
301
301
  }
302
302
  }
303
303
  static createElement(t, e) {
304
- const i = C.createElement("template");
304
+ const i = P.createElement("template");
305
305
  return i.innerHTML = t, i;
306
306
  }
307
307
  }
308
- function E(s, t, e = s, i) {
309
- if (t === x) return t;
308
+ function N(s, t, e = s, i) {
309
+ if (t === O) return t;
310
310
  let r = i !== void 0 ? e._$Co?.[i] : e._$Cl;
311
- const n = z(t) ? void 0 : t._$litDirective$;
312
- return r?.constructor !== n && (r?._$AO?.(!1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = E(s, r._$AS(s, t.values), r, i)), t;
311
+ const n = D(t) ? void 0 : t._$litDirective$;
312
+ return r?.constructor !== n && (r?._$AO?.(!1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = N(s, r._$AS(s, t.values), r, i)), t;
313
313
  }
314
- class Rt {
314
+ class Vt {
315
315
  constructor(t, e) {
316
316
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
317
317
  }
@@ -322,29 +322,29 @@ class Rt {
322
322
  return this._$AM._$AU;
323
323
  }
324
324
  u(t) {
325
- const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? C).importNode(e, !0);
326
- S.currentNode = r;
327
- let n = S.nextNode(), o = 0, l = 0, a = i[0];
328
- for (; a !== void 0; ) {
329
- if (o === a.index) {
330
- let h;
331
- a.type === 2 ? h = new U(n, n.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (h = new Wt(n, this, t)), this._$AV.push(h), a = i[++l];
325
+ const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? P).importNode(e, !0);
326
+ E.currentNode = r;
327
+ let n = E.nextNode(), o = 0, h = 0, l = i[0];
328
+ for (; l !== void 0; ) {
329
+ if (o === l.index) {
330
+ let p;
331
+ l.type === 2 ? p = new R(n, n.nextSibling, this, t) : l.type === 1 ? p = new l.ctor(n, l.name, l.strings, this, t) : l.type === 6 && (p = new qt(n, this, t)), this._$AV.push(p), l = i[++h];
332
332
  }
333
- o !== a?.index && (n = S.nextNode(), o++);
333
+ o !== l?.index && (n = E.nextNode(), o++);
334
334
  }
335
- return S.currentNode = C, r;
335
+ return E.currentNode = P, r;
336
336
  }
337
337
  p(t) {
338
338
  let e = 0;
339
339
  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++;
340
340
  }
341
341
  }
342
- class U {
342
+ class R {
343
343
  get _$AU() {
344
344
  return this._$AM?._$AU ?? this._$Cv;
345
345
  }
346
346
  constructor(t, e, i, r) {
347
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
347
+ this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
348
348
  }
349
349
  get parentNode() {
350
350
  let t = this._$AA.parentNode;
@@ -358,7 +358,7 @@ class U {
358
358
  return this._$AB;
359
359
  }
360
360
  _$AI(t, e = this) {
361
- t = E(this, t, e), z(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Lt(t) ? this.k(t) : this._(t);
361
+ t = N(this, t, e), D(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Dt(t) ? this.k(t) : this._(t);
362
362
  }
363
363
  O(t) {
364
364
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -367,25 +367,25 @@ class U {
367
367
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
368
368
  }
369
369
  _(t) {
370
- this._$AH !== m && z(this._$AH) ? this._$AA.nextSibling.data = t : this.T(C.createTextNode(t)), this._$AH = t;
370
+ this._$AH !== g && D(this._$AH) ? this._$AA.nextSibling.data = t : this.T(P.createTextNode(t)), this._$AH = t;
371
371
  }
372
372
  $(t) {
373
- const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = L.createElement($t(i.h, i.h[0]), this.options)), i);
373
+ const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = j.createElement(_t(i.h, i.h[0]), this.options)), i);
374
374
  if (this._$AH?._$AD === r) this._$AH.p(e);
375
375
  else {
376
- const n = new Rt(r, this), o = n.u(this.options);
376
+ const n = new Vt(r, this), o = n.u(this.options);
377
377
  n.p(e), this.T(o), this._$AH = n;
378
378
  }
379
379
  }
380
380
  _$AC(t) {
381
- let e = pt.get(t.strings);
382
- return e === void 0 && pt.set(t.strings, e = new L(t)), e;
381
+ let e = ft.get(t.strings);
382
+ return e === void 0 && ft.set(t.strings, e = new j(t)), e;
383
383
  }
384
384
  k(t) {
385
- Q(this._$AH) || (this._$AH = [], this._$AR());
385
+ X(this._$AH) || (this._$AH = [], this._$AR());
386
386
  const e = this._$AH;
387
387
  let i, r = 0;
388
- for (const n of t) r === e.length ? e.push(i = new U(this.O(H()), this.O(H()), this, this.options)) : i = e[r], i._$AI(n), r++;
388
+ for (const n of t) r === e.length ? e.push(i = new R(this.O(L()), this.O(L()), this, this.options)) : i = e[r], i._$AI(n), r++;
389
389
  r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
390
390
  }
391
391
  _$AR(t = this._$AA.nextSibling, e) {
@@ -398,7 +398,7 @@ class U {
398
398
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
399
399
  }
400
400
  }
401
- class I {
401
+ class G {
402
402
  get tagName() {
403
403
  return this.element.tagName;
404
404
  }
@@ -406,53 +406,53 @@ class I {
406
406
  return this._$AM._$AU;
407
407
  }
408
408
  constructor(t, e, i, r, n) {
409
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = m;
409
+ this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
410
410
  }
411
411
  _$AI(t, e = this, i, r) {
412
412
  const n = this.strings;
413
413
  let o = !1;
414
- if (n === void 0) t = E(this, t, e, 0), o = !z(t) || t !== this._$AH && t !== x, o && (this._$AH = t);
414
+ if (n === void 0) t = N(this, t, e, 0), o = !D(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
415
415
  else {
416
- const l = t;
417
- let a, h;
418
- for (t = n[0], a = 0; a < n.length - 1; a++) h = E(this, l[i + a], e, a), h === x && (h = this._$AH[a]), o ||= !z(h) || h !== this._$AH[a], h === m ? t = m : t !== m && (t += (h ?? "") + n[a + 1]), this._$AH[a] = h;
416
+ const h = t;
417
+ let l, p;
418
+ for (t = n[0], l = 0; l < n.length - 1; l++) p = N(this, h[i + l], e, l), p === O && (p = this._$AH[l]), o ||= !D(p) || p !== this._$AH[l], p === g ? t = g : t !== g && (t += (p ?? "") + n[l + 1]), this._$AH[l] = p;
419
419
  }
420
420
  o && !r && this.j(t);
421
421
  }
422
422
  j(t) {
423
- t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
423
+ t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
424
424
  }
425
425
  }
426
- class kt extends I {
426
+ class Bt extends G {
427
427
  constructor() {
428
428
  super(...arguments), this.type = 3;
429
429
  }
430
430
  j(t) {
431
- this.element[this.name] = t === m ? void 0 : t;
431
+ this.element[this.name] = t === g ? void 0 : t;
432
432
  }
433
433
  }
434
- class Vt extends I {
434
+ class Wt extends G {
435
435
  constructor() {
436
436
  super(...arguments), this.type = 4;
437
437
  }
438
438
  j(t) {
439
- this.element.toggleAttribute(this.name, !!t && t !== m);
439
+ this.element.toggleAttribute(this.name, !!t && t !== g);
440
440
  }
441
441
  }
442
- class Bt extends I {
442
+ class It extends G {
443
443
  constructor(t, e, i, r, n) {
444
444
  super(t, e, i, r, n), this.type = 5;
445
445
  }
446
446
  _$AI(t, e = this) {
447
- if ((t = E(this, t, e, 0) ?? m) === x) return;
448
- const i = this._$AH, r = t === m && i !== m || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== m && (i === m || r);
447
+ if ((t = N(this, t, e, 0) ?? g) === O) return;
448
+ const i = this._$AH, r = t === g && i !== g || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== g && (i === g || r);
449
449
  r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
450
450
  }
451
451
  handleEvent(t) {
452
452
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
453
453
  }
454
454
  }
455
- class Wt {
455
+ class qt {
456
456
  constructor(t, e, i) {
457
457
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
458
458
  }
@@ -460,22 +460,22 @@ class Wt {
460
460
  return this._$AM._$AU;
461
461
  }
462
462
  _$AI(t) {
463
- E(this, t);
463
+ N(this, t);
464
464
  }
465
465
  }
466
- const It = J.litHtmlPolyfillSupport;
467
- It?.(L, U), (J.litHtmlVersions ??= []).push("3.3.0");
468
- const qt = (s, t, e) => {
466
+ const Gt = Q.litHtmlPolyfillSupport;
467
+ Gt?.(j, R), (Q.litHtmlVersions ??= []).push("3.3.0");
468
+ const Jt = (s, t, e) => {
469
469
  const i = e?.renderBefore ?? t;
470
470
  let r = i._$litPart$;
471
471
  if (r === void 0) {
472
472
  const n = e?.renderBefore ?? null;
473
- i._$litPart$ = r = new U(t.insertBefore(H(), n), n, void 0, e ?? {});
473
+ i._$litPart$ = r = new R(t.insertBefore(L(), n), n, void 0, e ?? {});
474
474
  }
475
475
  return r._$AI(s), r;
476
476
  };
477
- const X = globalThis;
478
- class M extends w {
477
+ const Y = globalThis;
478
+ class H extends T {
479
479
  constructor() {
480
480
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
481
481
  }
@@ -485,7 +485,7 @@ class M extends w {
485
485
  }
486
486
  update(t) {
487
487
  const e = this.render();
488
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = qt(e, this.renderRoot, this.renderOptions);
488
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Jt(e, this.renderRoot, this.renderOptions);
489
489
  }
490
490
  connectedCallback() {
491
491
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -494,66 +494,66 @@ class M extends w {
494
494
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
495
495
  }
496
496
  render() {
497
- return x;
497
+ return O;
498
498
  }
499
499
  }
500
- M._$litElement$ = !0, M.finalized = !0, X.litElementHydrateSupport?.({ LitElement: M });
501
- const Gt = X.litElementPolyfillSupport;
502
- Gt?.({ LitElement: M });
503
- (X.litElementVersions ??= []).push("4.2.0");
504
- const Kt = (s) => (t, e) => {
500
+ H._$litElement$ = !0, H.finalized = !0, Y.litElementHydrateSupport?.({ LitElement: H });
501
+ const Kt = Y.litElementPolyfillSupport;
502
+ Kt?.({ LitElement: H });
503
+ (Y.litElementVersions ??= []).push("4.2.0");
504
+ const Zt = (s) => (t, e) => {
505
505
  e !== void 0 ? e.addInitializer((() => {
506
506
  customElements.define(s, t);
507
507
  })) : customElements.define(s, t);
508
508
  };
509
- const Zt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: F }, Ft = (s = Zt, t, e) => {
509
+ const Ft = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: F }, Qt = (s = Ft, t, e) => {
510
510
  const { kind: i, metadata: r } = e;
511
511
  let n = globalThis.litPropertyMetadata.get(r);
512
512
  if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), n.set(e.name, s), i === "accessor") {
513
513
  const { name: o } = e;
514
- return { set(l) {
515
- const a = t.get.call(this);
516
- t.set.call(this, l), this.requestUpdate(o, a, s);
517
- }, init(l) {
518
- return l !== void 0 && this.C(o, void 0, s, l), l;
514
+ return { set(h) {
515
+ const l = t.get.call(this);
516
+ t.set.call(this, h), this.requestUpdate(o, l, s);
517
+ }, init(h) {
518
+ return h !== void 0 && this.C(o, void 0, s, h), h;
519
519
  } };
520
520
  }
521
521
  if (i === "setter") {
522
522
  const { name: o } = e;
523
- return function(l) {
524
- const a = this[o];
525
- t.call(this, l), this.requestUpdate(o, a, s);
523
+ return function(h) {
524
+ const l = this[o];
525
+ t.call(this, h), this.requestUpdate(o, l, s);
526
526
  };
527
527
  }
528
528
  throw Error("Unsupported decorator location: " + i);
529
529
  };
530
- function Y(s) {
531
- return (t, e) => typeof e == "object" ? Ft(s, t, e) : ((i, r, n) => {
530
+ function tt(s) {
531
+ return (t, e) => typeof e == "object" ? Qt(s, t, e) : ((i, r, n) => {
532
532
  const o = r.hasOwnProperty(n);
533
533
  return r.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
534
534
  })(s, t, e);
535
535
  }
536
- function D(s) {
537
- return Y({ ...s, state: !0, attribute: !1 });
536
+ function k(s) {
537
+ return tt({ ...s, state: !0, attribute: !1 });
538
538
  }
539
- const Jt = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
540
- function _t(s, t) {
539
+ const Xt = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
540
+ function vt(s, t) {
541
541
  return (e, i, r) => {
542
542
  const n = (o) => o.renderRoot?.querySelector(s) ?? null;
543
- return Jt(e, i, { get() {
543
+ return Xt(e, i, { get() {
544
544
  return n(this);
545
545
  } });
546
546
  };
547
547
  }
548
- var Qt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, v = (s, t, e, i) => {
549
- for (var r = i > 1 ? void 0 : i ? Xt(t, e) : t, n = s.length - 1, o; n >= 0; n--)
548
+ var Yt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, S = (s, t, e, i) => {
549
+ for (var r = i > 1 ? void 0 : i ? te(t, e) : t, n = s.length - 1, o; n >= 0; n--)
550
550
  (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
551
- return i && r && Qt(t, e, r), r;
551
+ return i && r && Yt(t, e, r), r;
552
552
  };
553
- G.use([vt, bt, At]);
554
- let $ = class extends M {
553
+ V.use([At, St, Ct]);
554
+ let v = class extends H {
555
555
  constructor() {
556
- super(), this.dataSets = [], this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 600, this.origHeight = 350, this.textContainerHeight = 36, this.modifier = 1, this.version = "1.7.34", this.resizeObserver = new ResizeObserver(() => {
556
+ super(), this.dataSets = [], this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 600, this.origHeight = 350, this.textContainerHeight = 36, this.modifier = 1, this.version = "1.7.36", this.resizeObserver = new ResizeObserver(() => {
557
557
  this.adjustSizes(), this.applyData();
558
558
  }), this.template = {
559
559
  series: [
@@ -664,32 +664,31 @@ let $ = class extends M {
664
664
  ], r = Object.fromEntries(
665
665
  Object.entries(s.theme_object).filter(([n]) => !i.includes(n))
666
666
  );
667
- G.registerTheme(s.theme_name, r);
667
+ V.registerTheme(s.theme_name, r);
668
668
  }
669
669
  adjustSizes() {
670
670
  if (!this.gaugeContainer) return;
671
671
  const s = this.gaugeContainer.getBoundingClientRect().width, t = this.gaugeContainer.getBoundingClientRect().height, e = this.dataSets.length, i = this.origWidth, r = this.origHeight;
672
672
  if (!t || !s || !i || !r) return;
673
673
  const n = [];
674
- for (let h = 1; h <= e; h++) {
675
- const d = Math.ceil(e / h), c = s - 24 * (h - 1), f = t - 24 * (d - 1), u = c / i / h, _ = u * u * i * r * e;
676
- d * u * r <= f && n.push({ c: h, r: d, m: u, size: _, uwgap: c, uhgap: f });
674
+ for (let a = 1; a <= e; a++) {
675
+ const c = Math.ceil(e / a), m = s - 24 * (a - 1), $ = t - 24 * (c - 1), y = m / i / a, A = y * y * i * r * e;
676
+ c * y * r <= $ && n.push({ c: a, r: c, m: y, size: A, uwgap: m, uhgap: $ });
677
677
  }
678
- for (let h = 1; h <= e; h++) {
679
- const d = Math.ceil(e / h), c = s - 24 * (d - 1), f = t - 24 * (h - 1), u = f / r / h, _ = u * u * i * r * e;
680
- d * u * i <= c && n.push({ c: d, r: h, m: u, size: _, uwgap: c, uhgap: f });
678
+ for (let a = 1; a <= e; a++) {
679
+ const c = Math.ceil(e / a), m = s - 24 * (c - 1), $ = t - 24 * (a - 1), y = $ / r / a, A = y * y * i * r * e;
680
+ c * y * i <= m && n.push({ c, r: a, m: y, size: A, uwgap: m, uhgap: $ });
681
681
  }
682
- const o = n.reduce((h, d) => d.size < h ? h : d.size, 0), l = n.find((h) => h.size === o);
683
- if (!l) return;
684
- const a = l.m ?? 0;
685
- this.boxes = Array.from(this.gaugeContainer?.querySelectorAll(".chart")), this.gaugeContainer.style.gridTemplateColumns = `repeat(${l.c}, 1fr)`, this.boxes?.forEach(
686
- (h) => h.setAttribute(
687
- "style",
688
- `width:${a * i}px; height:${a * (r - this.textContainerHeight)}px`
689
- )
690
- ), this.modifier = a, this.canvasList.forEach((h) => {
691
- h.echart?.resize();
692
- });
682
+ const o = n.reduce((a, c) => c.size < a ? a : c.size, 0), h = n.find((a) => a.size === o);
683
+ if (!h) return;
684
+ const l = h.m ?? 0;
685
+ this.boxes = Array.from(this.gaugeContainer?.querySelectorAll(".chart"));
686
+ const p = `repeat(${h.c}, 1fr)`;
687
+ this.gaugeContainer.style.gridTemplateColumns !== p && (this.gaugeContainer.style.gridTemplateColumns = p);
688
+ const u = `width:${l * i}px; height:${l * (r - this.textContainerHeight)}px`;
689
+ this.boxes?.forEach((a) => {
690
+ a.getAttribute("style") !== u && (a.setAttribute("style", u), V.getInstanceByDom(a)?.resize());
691
+ }), this.modifier = l;
693
692
  }
694
693
  async transformData() {
695
694
  this.dataSets = [], this?.inputData && this.inputData.dataseries?.sort((s, t) => (s.label ?? "") > (t.label ?? "") ? 1 : -1).forEach((s, t) => {
@@ -697,7 +696,7 @@ let $ = class extends M {
697
696
  e.forEach((i) => {
698
697
  const r = i ?? "";
699
698
  let n = String(s.label ?? "").trim();
700
- n = r + (r && n ? " - " : "") + n, this.dataSets.some((l) => l.label === n) && (n += " " + t);
699
+ n = r + (r && n ? " - " : "") + n, this.dataSets.some((h) => h.label === n) && (n += " " + t);
701
700
  const o = {
702
701
  label: n,
703
702
  unit: s.unit,
@@ -707,7 +706,7 @@ let $ = class extends M {
707
706
  sections: s.sections,
708
707
  multiChart: s.multiChart,
709
708
  value: s.value,
710
- data: e.length === 1 ? s.data : s?.data?.filter((l) => l.pivot === i)
709
+ data: e.length === 1 ? s.data : s?.data?.filter((h) => h.pivot === i)
711
710
  };
712
711
  this.dataSets.push(o);
713
712
  });
@@ -725,39 +724,62 @@ let $ = class extends M {
725
724
  if (!t.multiChart)
726
725
  t.needleValue = t.value === void 0 || t.value === null ? void 0 : Number(t.value);
727
726
  else {
728
- const p = e?.map((g) => g.value)?.filter((g) => g !== void 0)?.map(Number) ?? [];
729
- t.needleValue = p.reduce((g, y) => g + y, 0) / p.length;
727
+ const d = e?.map((f) => f.value)?.filter((f) => f !== void 0)?.map(Number) ?? [];
728
+ t.needleValue = d.reduce((f, b) => f + b, 0) / d.length;
730
729
  }
731
730
  t.needleValue = isNaN(t.needleValue) ? r : t.needleValue;
732
- const n = this.canvasList.get(t.label)?.echart, o = n?.getOption() ?? window.structuredClone(this.template), l = o.series, a = l?.[0], h = l?.[1], d = Date.parse(t?.data?.[0]?.tsp ?? "");
733
- isNaN(d) && (/* @__PURE__ */ new Date()).getTime() - d > (t.advanced?.maxLatency ?? 1 / 0) * 1e3 && (t.needleValue = void 0), a.data[0].value = t.needleValue, a.data[0].name = t.unit, a.title.fontSize = 32 * s, a.title.color = t.valueColor || this.themeTitleColor, a.title.opacity = 1, a.detail.color = t.valueColor || this.themeTitleColor, a.detail.opacity = 1, a.detail.fontSize = 60 * s, a.detail.formatter = (p) => {
734
- const g = Number(p);
735
- return isNaN(g) ? "-" : g.toFixed(Math.floor(t.precision ?? 0));
736
- };
737
- const c = ["#bf444c", "#d88273", "#f6efa6"], f = this.theme?.theme_object?.color ?? c, u = (t.sections?.sectionLimits ?? []).map((p, g) => {
738
- const y = p?.limit;
731
+ const n = Date.parse(t.data?.[t.data.length - 1]?.tsp ?? "");
732
+ isNaN(n) || (/* @__PURE__ */ new Date()).getTime() - n > (t.advanced?.maxLatency ?? 1 / 0) * 1e3 && (t.needleValue = void 0);
733
+ const o = ["#bf444c", "#d88273", "#f6efa6"], h = this.theme?.theme_object?.color ?? o, l = (t.sections?.sectionLimits ?? []).map((d, f) => {
734
+ const b = d?.limit;
739
735
  return {
740
- limit: y === "" || y == null ? void 0 : Number(y),
741
- color: p?.sectionColor || f[g % f.length]
736
+ limit: b === "" || b == null ? void 0 : Number(b),
737
+ color: d?.sectionColor || h[f % h.length]
742
738
  };
743
739
  }).filter(
744
- (p) => p.limit != null && !isNaN(p.limit)
745
- ), _ = !u.length || r <= u[0].limit, j = u.filter((p, g, y) => g === 0 ? !0 : _ ? p.limit > y[g - 1].limit : p.limit < y[g - 1].limit), R = j.length ? j.map((p) => p.limit) : [40, 80, 100], P = j.length ? j.map((p) => p.color) : f.slice(0, 3), tt = R?.[R.length - 1] ?? 100;
746
- t.range = Math.abs(tt - r), a.min = h.min = r, a.max = h.max = tt;
747
- const et = R.map((p, g) => {
748
- const y = Math.abs(p - r) / t.range, yt = P[g];
749
- return [y, yt];
750
- }).filter(([p]) => !isNaN(p) && p >= 0);
751
- h.axisLine.lineStyle.width = 8 * s, et.length && (h.axisLine.lineStyle.color = et), h.axisLabel.fontSize = 24 * s, h.axisLabel.distance = -24 * s, h.splitLine.length = 16 * s, h.splitLine.distance = -16 * s;
752
- let it = P?.[P.length - 1];
753
- for (const [p, g] of R?.entries() ?? [])
754
- if (_ ? g > t.needleValue : g < t.needleValue) {
755
- it = P?.[p] ?? P?.[0];
740
+ (d) => d.limit != null && !isNaN(d.limit)
741
+ ), p = !l.length || r <= l[0].limit, u = l.filter((d, f, b) => f === 0 ? !0 : p ? d.limit > b[f - 1].limit : d.limit < b[f - 1].limit), a = u.length ? u.map((d) => d.limit) : [40, 80, 100], c = u.length ? u.map((d) => d.color) : h.slice(0, 3), m = a?.[a.length - 1] ?? 100;
742
+ t.range = Math.abs(m - r);
743
+ const $ = a.map((d, f) => {
744
+ const b = Math.abs(d - r) / t.range, bt = c[f];
745
+ return [b, bt];
746
+ }).filter(([d]) => !isNaN(d) && d >= 0);
747
+ let y = c?.[c.length - 1];
748
+ for (const [d, f] of a?.entries() ?? [])
749
+ if (p ? f > t.needleValue : f < t.needleValue) {
750
+ y = c?.[d] ?? c?.[0];
756
751
  break;
757
752
  }
758
- a.progress.itemStyle.color = it, a.progress.width = 60 * s;
759
- const T = this.canvasList.get(t.label)?.title;
760
- T && (T.style.fontSize = String(36 * s) + "px", T.style.maxWidth = String(550 * s) + "px", T.style.height = String(this.textContainerHeight * s) + "px", T.textContent = t.label ?? ""), n?.setOption(o);
753
+ const A = this.canvasList.get(t.label), et = A?.echart, it = JSON.stringify([
754
+ s,
755
+ t.unit,
756
+ t.precision,
757
+ t.valueColor,
758
+ t.sections,
759
+ this.themeTitleColor
760
+ ]);
761
+ if (A && A.lastConfig === it) {
762
+ et?.setOption(
763
+ {
764
+ series: [
765
+ {
766
+ data: [{ value: t.needleValue ?? null, name: t.unit }],
767
+ progress: { itemStyle: { color: y } }
768
+ }
769
+ ]
770
+ },
771
+ { lazyUpdate: !0 }
772
+ );
773
+ continue;
774
+ }
775
+ A && (A.lastConfig = it);
776
+ const st = window.structuredClone(this.template), rt = st.series, _ = rt?.[0], C = rt?.[1];
777
+ _.data[0].value = t.needleValue, _.data[0].name = t.unit, _.title.fontSize = 32 * s, _.title.color = t.valueColor || this.themeTitleColor, _.title.opacity = 1, _.detail.color = t.valueColor || this.themeTitleColor, _.detail.opacity = 1, _.detail.fontSize = 60 * s, _.detail.formatter = (d) => {
778
+ const f = Number(d);
779
+ return isNaN(f) ? "-" : f.toFixed(Math.floor(t.precision ?? 0));
780
+ }, _.min = C.min = r, _.max = C.max = m, C.axisLine.lineStyle.width = 8 * s, $.length && (C.axisLine.lineStyle.color = $), C.axisLabel.fontSize = 24 * s, C.axisLabel.distance = -24 * s, C.splitLine.length = 16 * s, C.splitLine.distance = -16 * s, _.progress.itemStyle.color = y, _.progress.width = 60 * s;
781
+ const z = A?.title;
782
+ z && (z.style.fontSize = String(36 * s) + "px", z.style.maxWidth = String(550 * s) + "px", z.style.height = String(this.textContainerHeight * s) + "px", z.textContent = t.label ?? ""), et?.setOption(st, { lazyUpdate: !0 });
761
783
  }
762
784
  }
763
785
  deleteCharts() {
@@ -779,12 +801,12 @@ let $ = class extends M {
779
801
  "style",
780
802
  `min-width: ${this.origWidth}px; min-height: ${this.origHeight}px; width: ${this.origWidth}px; height: ${this.origHeight}px;`
781
803
  ), t.appendChild(e), t.appendChild(i), this.gaugeContainer.appendChild(t);
782
- const r = G.init(i, this.theme?.theme_name);
804
+ const r = V.init(i, this.theme?.theme_name);
783
805
  this.canvasList.set(s.label ?? "", { echart: r, title: e, wrapper: t });
784
806
  }));
785
807
  }
786
808
  render() {
787
- return Dt`
809
+ return Rt`
788
810
  <div
789
811
  class="wrapper"
790
812
  style="background-color: ${this.themeBgColor}; color: ${this.themeTitleColor}"
@@ -805,7 +827,7 @@ let $ = class extends M {
805
827
  `;
806
828
  }
807
829
  };
808
- $.styles = Ct`
830
+ v.styles = xt`
809
831
  :host {
810
832
  display: block;
811
833
  font-family: sans-serif;
@@ -880,37 +902,37 @@ $.styles = Ct`
880
902
  justify-content: center;
881
903
  }
882
904
  `;
883
- v([
884
- Y({ type: Object })
885
- ], $.prototype, "inputData", 2);
886
- v([
887
- Y({ type: Object })
888
- ], $.prototype, "theme", 2);
889
- v([
890
- D()
891
- ], $.prototype, "dataSets", 2);
892
- v([
893
- D()
894
- ], $.prototype, "canvasList", 2);
895
- v([
896
- D()
897
- ], $.prototype, "themeBgColor", 2);
898
- v([
899
- D()
900
- ], $.prototype, "themeTitleColor", 2);
901
- v([
902
- D()
903
- ], $.prototype, "themeSubtitleColor", 2);
904
- v([
905
- _t(".gauge-container")
906
- ], $.prototype, "gaugeContainer", 2);
907
- v([
908
- _t(".wrapper")
909
- ], $.prototype, "wrapper", 2);
910
- $ = v([
911
- Kt("widget-gauge-1.7.34")
912
- ], $);
905
+ S([
906
+ tt({ type: Object })
907
+ ], v.prototype, "inputData", 2);
908
+ S([
909
+ tt({ type: Object })
910
+ ], v.prototype, "theme", 2);
911
+ S([
912
+ k()
913
+ ], v.prototype, "dataSets", 2);
914
+ S([
915
+ k()
916
+ ], v.prototype, "canvasList", 2);
917
+ S([
918
+ k()
919
+ ], v.prototype, "themeBgColor", 2);
920
+ S([
921
+ k()
922
+ ], v.prototype, "themeTitleColor", 2);
923
+ S([
924
+ k()
925
+ ], v.prototype, "themeSubtitleColor", 2);
926
+ S([
927
+ vt(".gauge-container")
928
+ ], v.prototype, "gaugeContainer", 2);
929
+ S([
930
+ vt(".wrapper")
931
+ ], v.prototype, "wrapper", 2);
932
+ v = S([
933
+ Zt("widget-gauge-1.7.36")
934
+ ], v);
913
935
  export {
914
- $ as WidgetGauge
936
+ v as WidgetGauge
915
937
  };
916
938
  //# sourceMappingURL=widget-gauge.js.map