pollcatch 2.1.15 → 2.2.0
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/package.json +1 -1
- package/pc.js +381 -356
package/pc.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const it = globalThis,
|
|
7
|
-
let
|
|
6
|
+
const it = globalThis, _t = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Et = Symbol(), Lt = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let le = class {
|
|
8
8
|
constructor(t, o, r) {
|
|
9
|
-
if (this._$cssResult$ = !0, r !==
|
|
9
|
+
if (this._$cssResult$ = !0, r !== Et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = o;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const o = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (_t && t === void 0) {
|
|
16
16
|
const r = o !== void 0 && o.length === 1;
|
|
17
17
|
r && (t = Lt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Lt.set(o, t));
|
|
18
18
|
}
|
|
@@ -22,20 +22,20 @@ let ne = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Ae = (e) => new
|
|
25
|
+
const Ae = (e) => new le(typeof e == "string" ? e : e + "", void 0, Et), F = (e, ...t) => {
|
|
26
26
|
const o = e.length === 1 ? e[0] : t.reduce((r, s, i) => r + ((a) => {
|
|
27
27
|
if (a._$cssResult$ === !0) return a.cssText;
|
|
28
28
|
if (typeof a == "number") return a;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(s) + e[i + 1], e[0]);
|
|
31
|
-
return new
|
|
31
|
+
return new le(o, e, Et);
|
|
32
32
|
}, _e = (e, t) => {
|
|
33
|
-
if (
|
|
33
|
+
if (_t) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
|
|
34
34
|
else for (const o of t) {
|
|
35
35
|
const r = document.createElement("style"), s = it.litNonce;
|
|
36
36
|
s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, e.appendChild(r);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Ut = _t ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let o = "";
|
|
40
40
|
for (const r of t.cssRules) o += r.cssText;
|
|
41
41
|
return Ae(o);
|
|
@@ -45,7 +45,7 @@ const Ae = (e) => new ne(typeof e == "string" ? e : e + "", void 0, _t), F = (e,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: Ee, defineProperty: Pe, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Te, getOwnPropertySymbols: ze, getPrototypeOf: Ie } = Object, T = globalThis,
|
|
48
|
+
const { is: Ee, defineProperty: Pe, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Te, getOwnPropertySymbols: ze, getPrototypeOf: Ie } = Object, T = globalThis, jt = T.trustedTypes, Ne = jt ? jt.emptyScript : "", bt = T.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
e = e ? Ne : null;
|
|
@@ -73,7 +73,7 @@ const { is: Ee, defineProperty: Pe, getOwnPropertyDescriptor: Oe, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
|
-
} },
|
|
76
|
+
} }, Pt = (e, t) => !Ee(e, t), Bt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Pt };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), T.litPropertyMetadata ?? (T.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let U = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -82,7 +82,7 @@ let U = class extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, o =
|
|
85
|
+
static createProperty(t, o = Bt) {
|
|
86
86
|
if (o.state && (o.attribute = !1), this._$Ei(), this.elementProperties.set(t, o), !o.noAccessor) {
|
|
87
87
|
const r = Symbol(), s = this.getPropertyDescriptor(t, r, o);
|
|
88
88
|
s !== void 0 && Pe(this.prototype, t, s);
|
|
@@ -102,7 +102,7 @@ let U = class extends HTMLElement {
|
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
105
|
+
return this.elementProperties.get(t) ?? Bt;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
108
|
if (this.hasOwnProperty(K("elementProperties"))) return;
|
|
@@ -131,8 +131,8 @@ let U = class extends HTMLElement {
|
|
|
131
131
|
const o = [];
|
|
132
132
|
if (Array.isArray(t)) {
|
|
133
133
|
const r = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const s of r) o.unshift(
|
|
135
|
-
} else t !== void 0 && o.push(
|
|
134
|
+
for (const s of r) o.unshift(Ut(s));
|
|
135
|
+
} else t !== void 0 && o.push(Ut(t));
|
|
136
136
|
return o;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(t, o) {
|
|
@@ -200,7 +200,7 @@ let U = class extends HTMLElement {
|
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(t, o, r) {
|
|
202
202
|
if (t !== void 0) {
|
|
203
|
-
if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ??
|
|
203
|
+
if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Pt)(this[t], o)) return;
|
|
204
204
|
this.P(t, o, r);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -273,18 +273,18 @@ let U = class extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[K("elementProperties")] = /* @__PURE__ */ new Map(), U[K("finalized")] = /* @__PURE__ */ new Map(),
|
|
276
|
+
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[K("elementProperties")] = /* @__PURE__ */ new Map(), U[K("finalized")] = /* @__PURE__ */ new Map(), bt == null || bt({ ReactiveElement: U }), (T.reactiveElementVersions ?? (T.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const W = globalThis, nt = W.trustedTypes,
|
|
283
|
-
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
282
|
+
const W = globalThis, nt = W.trustedTypes, Dt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ce = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, de = "?" + P, Me = `<${de}>`, R = document, X = () => R.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Ot = Array.isArray, Re = (e) => Ot(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", gt = `[
|
|
283
|
+
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Vt = /-->/g, qt = />/g, N = RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, Ft = /"/g, pe = /^(?:script|style|textarea|title)$/i, Le = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Le(1), z = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), Yt = /* @__PURE__ */ new WeakMap(), M = R.createTreeWalker(R, 129);
|
|
285
|
+
function ue(e, t) {
|
|
286
|
+
if (!Ot(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return Dt !== void 0 ? Dt.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
289
|
const Ue = (e, t) => {
|
|
290
290
|
const o = e.length - 1, r = [];
|
|
@@ -292,29 +292,29 @@ const Ue = (e, t) => {
|
|
|
292
292
|
for (let n = 0; n < o; n++) {
|
|
293
293
|
const l = e[n];
|
|
294
294
|
let p, c, u = -1, w = 0;
|
|
295
|
-
for (; w < l.length && (a.lastIndex = w, c = a.exec(l), c !== null); ) w = a.lastIndex, a === Z ? c[1] === "!--" ? a =
|
|
295
|
+
for (; w < l.length && (a.lastIndex = w, c = a.exec(l), c !== null); ) w = a.lastIndex, a === Z ? c[1] === "!--" ? a = Vt : c[1] !== void 0 ? a = qt : c[2] !== void 0 ? (pe.test(c[2]) && (s = RegExp("</" + c[2], "g")), a = N) : c[3] !== void 0 && (a = N) : a === N ? c[0] === ">" ? (a = s ?? Z, u = -1) : c[1] === void 0 ? u = -2 : (u = a.lastIndex - c[2].length, p = c[1], a = c[3] === void 0 ? N : c[3] === '"' ? Ft : Ht) : a === Ft || a === Ht ? a = N : a === Vt || a === qt ? a = Z : (a = N, s = void 0);
|
|
296
296
|
const v = a === N && e[n + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
i += a === Z ? l + Me : u >= 0 ? (r.push(p), l.slice(0, u) +
|
|
297
|
+
i += a === Z ? l + Me : u >= 0 ? (r.push(p), l.slice(0, u) + ce + l.slice(u) + P + v) : l + P + (u === -2 ? n : v);
|
|
298
298
|
}
|
|
299
|
-
return [
|
|
299
|
+
return [ue(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
300
300
|
};
|
|
301
|
-
let
|
|
301
|
+
let At = class he {
|
|
302
302
|
constructor({ strings: t, _$litType$: o }, r) {
|
|
303
303
|
let s;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let i = 0, a = 0;
|
|
306
306
|
const n = t.length - 1, l = this.parts, [p, c] = Ue(t, o);
|
|
307
|
-
if (this.el =
|
|
307
|
+
if (this.el = he.createElement(p, r), M.currentNode = this.el.content, o === 2 || o === 3) {
|
|
308
308
|
const u = this.el.content.firstChild;
|
|
309
309
|
u.replaceWith(...u.childNodes);
|
|
310
310
|
}
|
|
311
311
|
for (; (s = M.nextNode()) !== null && l.length < n; ) {
|
|
312
312
|
if (s.nodeType === 1) {
|
|
313
|
-
if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(
|
|
313
|
+
if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(ce)) {
|
|
314
314
|
const w = c[a++], v = s.getAttribute(u).split(P), E = /([.?@])?(.*)/.exec(w);
|
|
315
|
-
l.push({ type: 1, index: i, name: E[2], strings: v, ctor: E[1] === "." ? Be : E[1] === "?" ? De : E[1] === "@" ? Ve :
|
|
315
|
+
l.push({ type: 1, index: i, name: E[2], strings: v, ctor: E[1] === "." ? Be : E[1] === "?" ? De : E[1] === "@" ? Ve : dt }), s.removeAttribute(u);
|
|
316
316
|
} else u.startsWith(P) && (l.push({ type: 6, index: i }), s.removeAttribute(u));
|
|
317
|
-
if (
|
|
317
|
+
if (pe.test(s.tagName)) {
|
|
318
318
|
const u = s.textContent.split(P), w = u.length - 1;
|
|
319
319
|
if (w > 0) {
|
|
320
320
|
s.textContent = nt ? nt.emptyScript : "";
|
|
@@ -322,7 +322,7 @@ let kt = class ue {
|
|
|
322
322
|
s.append(u[w], X());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (s.nodeType === 8) if (s.data ===
|
|
325
|
+
} else if (s.nodeType === 8) if (s.data === de) l.push({ type: 2, index: i });
|
|
326
326
|
else {
|
|
327
327
|
let u = -1;
|
|
328
328
|
for (; (u = s.data.indexOf(P, u + 1)) !== -1; ) l.push({ type: 7, index: i }), u += P.length - 1;
|
|
@@ -331,7 +331,7 @@ let kt = class ue {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(t, o) {
|
|
334
|
-
const r =
|
|
334
|
+
const r = R.createElement("template");
|
|
335
335
|
return r.innerHTML = t, r;
|
|
336
336
|
}
|
|
337
337
|
};
|
|
@@ -353,7 +353,7 @@ let je = class {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(t) {
|
|
356
|
-
const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ??
|
|
356
|
+
const { el: { content: o }, parts: r } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? R).importNode(o, !0);
|
|
357
357
|
M.currentNode = s;
|
|
358
358
|
let i = M.nextNode(), a = 0, n = 0, l = r[0];
|
|
359
359
|
for (; l !== void 0; ) {
|
|
@@ -363,7 +363,7 @@ let je = class {
|
|
|
363
363
|
}
|
|
364
364
|
a !== (l == null ? void 0 : l.index) && (i = M.nextNode(), a++);
|
|
365
365
|
}
|
|
366
|
-
return M.currentNode =
|
|
366
|
+
return M.currentNode = R, s;
|
|
367
367
|
}
|
|
368
368
|
p(t) {
|
|
369
369
|
let o = 0;
|
|
@@ -390,7 +390,7 @@ class et {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(t, o = this) {
|
|
393
|
-
t = D(this, t, o), Q(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== z && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
393
|
+
t = D(this, t, o), Q(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== z && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Re(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
O(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,11 +399,11 @@ class et {
|
|
|
399
399
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
400
400
|
}
|
|
401
401
|
_(t) {
|
|
402
|
-
this._$AH !== h && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
402
|
+
this._$AH !== h && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
405
|
var i;
|
|
406
|
-
const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el =
|
|
406
|
+
const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = At.createElement(ue(r.h, r.h[0]), this.options)), r);
|
|
407
407
|
if (((i = this._$AH) == null ? void 0 : i._$AD) === s) this._$AH.p(o);
|
|
408
408
|
else {
|
|
409
409
|
const a = new je(s, this), n = a.u(this.options);
|
|
@@ -411,11 +411,11 @@ class et {
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
|
-
let o =
|
|
415
|
-
return o === void 0 &&
|
|
414
|
+
let o = Yt.get(t.strings);
|
|
415
|
+
return o === void 0 && Yt.set(t.strings, o = new At(t)), o;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
|
-
|
|
418
|
+
Ot(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const o = this._$AH;
|
|
420
420
|
let r, s = 0;
|
|
421
421
|
for (const i of t) s === o.length ? o.push(r = new et(this.O(X()), this.O(X()), this, this.options)) : r = o[s], r._$AI(i), s++;
|
|
@@ -433,7 +433,7 @@ class et {
|
|
|
433
433
|
this._$AM === void 0 && (this._$Cv = t, (o = this._$AP) == null || o.call(this, t));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class dt {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
@@ -458,7 +458,7 @@ class ct {
|
|
|
458
458
|
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
let Be = class extends
|
|
461
|
+
let Be = class extends dt {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ let Be = class extends ct {
|
|
|
466
466
|
this.element[this.name] = t === h ? void 0 : t;
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
|
-
class De extends
|
|
469
|
+
class De extends dt {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,7 +474,7 @@ class De extends ct {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!t && t !== h);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class Ve extends
|
|
477
|
+
class Ve extends dt {
|
|
478
478
|
constructor(t, o, r, s, i) {
|
|
479
479
|
super(t, o, r, s, i), this.type = 5;
|
|
480
480
|
}
|
|
@@ -499,8 +499,8 @@ class qe {
|
|
|
499
499
|
D(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
502
|
+
const vt = W.litHtmlPolyfillSupport;
|
|
503
|
+
vt == null || vt(At, et), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.2.1");
|
|
504
504
|
const He = (e, t, o) => {
|
|
505
505
|
const r = (o == null ? void 0 : o.renderBefore) ?? t;
|
|
506
506
|
let s = r._$litPart$;
|
|
@@ -540,10 +540,10 @@ let j = class extends U {
|
|
|
540
540
|
return z;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
j._$litElement$ = !0, j.finalized = !0, (
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var ne;
|
|
544
|
+
j._$litElement$ = !0, j.finalized = !0, (ne = globalThis.litElementHydrateSupport) == null || ne.call(globalThis, { LitElement: j });
|
|
545
|
+
const yt = globalThis.litElementPolyfillSupport;
|
|
546
|
+
yt == null || yt({ LitElement: j });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
@@ -560,7 +560,7 @@ const ot = (e) => (t, o) => {
|
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const Fe = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged:
|
|
563
|
+
const Fe = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Pt }, Ye = (e = Fe, t, o) => {
|
|
564
564
|
const { kind: r, metadata: s } = o;
|
|
565
565
|
let i = globalThis.litPropertyMetadata.get(s);
|
|
566
566
|
if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), i.set(o.name, e), r === "accessor") {
|
|
@@ -592,7 +592,7 @@ function f(e) {
|
|
|
592
592
|
* Copyright 2017 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
594
|
*/
|
|
595
|
-
function
|
|
595
|
+
function Tt(e) {
|
|
596
596
|
return f({ ...e, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
var $ = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))($ || {});
|
|
@@ -603,116 +603,116 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
603
603
|
return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
|
|
604
604
|
}, S = function(e, t, o) {
|
|
605
605
|
return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
|
|
606
|
-
},
|
|
606
|
+
}, fe = function(e) {
|
|
607
607
|
return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
|
|
608
|
-
},
|
|
608
|
+
}, Zt = function(e) {
|
|
609
609
|
return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
|
|
610
|
-
},
|
|
610
|
+
}, wt = function(e) {
|
|
611
611
|
return { r: x(e.r), g: x(e.g), b: x(e.b), a: x(e.a, 3) };
|
|
612
612
|
}, Xe = /^#([0-9a-f]{3,8})$/i, rt = function(e) {
|
|
613
613
|
var t = e.toString(16);
|
|
614
614
|
return t.length < 2 ? "0" + t : t;
|
|
615
|
-
},
|
|
615
|
+
}, me = function(e) {
|
|
616
616
|
var t = e.r, o = e.g, r = e.b, s = e.a, i = Math.max(t, o, r), a = i - Math.min(t, o, r), n = a ? i === t ? (o - r) / a : i === o ? 2 + (r - t) / a : 4 + (t - o) / a : 0;
|
|
617
617
|
return { h: 60 * (n < 0 ? n + 6 : n), s: i ? a / i * 100 : 0, v: i / 255 * 100, a: s };
|
|
618
|
-
},
|
|
618
|
+
}, be = function(e) {
|
|
619
619
|
var t = e.h, o = e.s, r = e.v, s = e.a;
|
|
620
620
|
t = t / 360 * 6, o /= 100, r /= 100;
|
|
621
621
|
var i = Math.floor(t), a = r * (1 - o), n = r * (1 - (t - i) * o), l = r * (1 - (1 - t + i) * o), p = i % 6;
|
|
622
622
|
return { r: 255 * [r, n, a, a, l, r][p], g: 255 * [l, r, r, n, a, a][p], b: 255 * [a, a, l, r, r, n][p], a: s };
|
|
623
|
-
}, Zt = function(e) {
|
|
624
|
-
return { h: he(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
|
|
625
623
|
}, Gt = function(e) {
|
|
626
|
-
return { h:
|
|
624
|
+
return { h: fe(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
|
|
627
625
|
}, Kt = function(e) {
|
|
628
|
-
return
|
|
626
|
+
return { h: x(e.h), s: x(e.s), l: x(e.l), a: x(e.a, 3) };
|
|
627
|
+
}, Wt = function(e) {
|
|
628
|
+
return be((o = (t = e).s, { h: t.h, s: (o *= ((r = t.l) < 50 ? r : 100 - r) / 100) > 0 ? 2 * o / (r + o) * 100 : 0, v: r + o, a: t.a }));
|
|
629
629
|
var t, o, r;
|
|
630
630
|
}, J = function(e) {
|
|
631
|
-
return { h: (t =
|
|
631
|
+
return { h: (t = me(e)).h, s: (s = (200 - (o = t.s)) * (r = t.v) / 100) > 0 && s < 200 ? o * r / 100 / (s <= 100 ? s : 200 - s) * 100 : 0, l: s / 2, a: t.a };
|
|
632
632
|
var t, o, r, s;
|
|
633
|
-
}, Qe = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, to = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, eo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, oo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
|
|
633
|
+
}, Qe = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, to = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, eo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, oo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = { string: [[function(e) {
|
|
634
634
|
var t = Xe.exec(e);
|
|
635
635
|
return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? x(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? x(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
636
636
|
}, "hex"], [function(e) {
|
|
637
637
|
var t = eo.exec(e) || oo.exec(e);
|
|
638
|
-
return t ? t[2] !== t[4] || t[4] !== t[6] ? null :
|
|
638
|
+
return t ? t[2] !== t[4] || t[4] !== t[6] ? null : Zt({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
|
|
639
639
|
}, "rgb"], [function(e) {
|
|
640
640
|
var t = Qe.exec(e) || to.exec(e);
|
|
641
641
|
if (!t) return null;
|
|
642
|
-
var o, r, s =
|
|
643
|
-
return
|
|
642
|
+
var o, r, s = Gt({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (Je[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
|
|
643
|
+
return Wt(s);
|
|
644
644
|
}, "hsl"]], object: [[function(e) {
|
|
645
645
|
var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
|
|
646
|
-
return A(t) && A(o) && A(r) ?
|
|
646
|
+
return A(t) && A(o) && A(r) ? Zt({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
|
|
647
647
|
}, "rgb"], [function(e) {
|
|
648
648
|
var t = e.h, o = e.s, r = e.l, s = e.a, i = s === void 0 ? 1 : s;
|
|
649
649
|
if (!A(t) || !A(o) || !A(r)) return null;
|
|
650
|
-
var a =
|
|
651
|
-
return
|
|
650
|
+
var a = Gt({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
|
|
651
|
+
return Wt(a);
|
|
652
652
|
}, "hsl"], [function(e) {
|
|
653
653
|
var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
|
|
654
654
|
if (!A(t) || !A(o) || !A(r)) return null;
|
|
655
655
|
var a = function(n) {
|
|
656
|
-
return { h:
|
|
656
|
+
return { h: fe(n.h), s: S(n.s, 0, 100), v: S(n.v, 0, 100), a: S(n.a) };
|
|
657
657
|
}({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
|
|
658
|
-
return
|
|
659
|
-
}, "hsv"]] },
|
|
658
|
+
return be(a);
|
|
659
|
+
}, "hsv"]] }, Xt = function(e, t) {
|
|
660
660
|
for (var o = 0; o < t.length; o++) {
|
|
661
661
|
var r = t[o][0](e);
|
|
662
662
|
if (r) return [r, t[o][1]];
|
|
663
663
|
}
|
|
664
664
|
return [null, void 0];
|
|
665
665
|
}, ro = function(e) {
|
|
666
|
-
return typeof e == "string" ?
|
|
667
|
-
},
|
|
666
|
+
return typeof e == "string" ? Xt(e.trim(), Jt.string) : typeof e == "object" && e !== null ? Xt(e, Jt.object) : [null, void 0];
|
|
667
|
+
}, $t = function(e, t) {
|
|
668
668
|
var o = J(e);
|
|
669
669
|
return { h: o.h, s: S(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
|
|
670
|
-
},
|
|
670
|
+
}, xt = function(e) {
|
|
671
671
|
return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
|
|
672
|
-
},
|
|
672
|
+
}, Qt = function(e, t) {
|
|
673
673
|
var o = J(e);
|
|
674
674
|
return { h: o.h, s: o.s, l: S(o.l + 100 * t, 0, 100), a: o.a };
|
|
675
|
-
},
|
|
675
|
+
}, te = function() {
|
|
676
676
|
function e(t) {
|
|
677
677
|
this.parsed = ro(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
678
678
|
}
|
|
679
679
|
return e.prototype.isValid = function() {
|
|
680
680
|
return this.parsed !== null;
|
|
681
681
|
}, e.prototype.brightness = function() {
|
|
682
|
-
return x(
|
|
682
|
+
return x(xt(this.rgba), 2);
|
|
683
683
|
}, e.prototype.isDark = function() {
|
|
684
|
-
return
|
|
684
|
+
return xt(this.rgba) < 0.5;
|
|
685
685
|
}, e.prototype.isLight = function() {
|
|
686
|
-
return
|
|
686
|
+
return xt(this.rgba) >= 0.5;
|
|
687
687
|
}, e.prototype.toHex = function() {
|
|
688
|
-
return t =
|
|
688
|
+
return t = wt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? rt(x(255 * i)) : "", "#" + rt(o) + rt(r) + rt(s) + a;
|
|
689
689
|
var t, o, r, s, i, a;
|
|
690
690
|
}, e.prototype.toRgb = function() {
|
|
691
|
-
return
|
|
691
|
+
return wt(this.rgba);
|
|
692
692
|
}, e.prototype.toRgbString = function() {
|
|
693
|
-
return t =
|
|
693
|
+
return t = wt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
|
|
694
694
|
var t, o, r, s, i;
|
|
695
695
|
}, e.prototype.toHsl = function() {
|
|
696
|
-
return
|
|
696
|
+
return Kt(J(this.rgba));
|
|
697
697
|
}, e.prototype.toHslString = function() {
|
|
698
|
-
return t =
|
|
698
|
+
return t = Kt(J(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
|
|
699
699
|
var t, o, r, s, i;
|
|
700
700
|
}, e.prototype.toHsv = function() {
|
|
701
|
-
return t =
|
|
701
|
+
return t = me(this.rgba), { h: x(t.h), s: x(t.s), v: x(t.v), a: x(t.a, 3) };
|
|
702
702
|
var t;
|
|
703
703
|
}, e.prototype.invert = function() {
|
|
704
704
|
return C({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
|
|
705
705
|
var t;
|
|
706
706
|
}, e.prototype.saturate = function(t) {
|
|
707
|
-
return t === void 0 && (t = 0.1), C(
|
|
707
|
+
return t === void 0 && (t = 0.1), C($t(this.rgba, t));
|
|
708
708
|
}, e.prototype.desaturate = function(t) {
|
|
709
|
-
return t === void 0 && (t = 0.1), C(
|
|
709
|
+
return t === void 0 && (t = 0.1), C($t(this.rgba, -t));
|
|
710
710
|
}, e.prototype.grayscale = function() {
|
|
711
|
-
return C(
|
|
711
|
+
return C($t(this.rgba, -1));
|
|
712
712
|
}, e.prototype.lighten = function(t) {
|
|
713
|
-
return t === void 0 && (t = 0.1), C(
|
|
713
|
+
return t === void 0 && (t = 0.1), C(Qt(this.rgba, t));
|
|
714
714
|
}, e.prototype.darken = function(t) {
|
|
715
|
-
return t === void 0 && (t = 0.1), C(
|
|
715
|
+
return t === void 0 && (t = 0.1), C(Qt(this.rgba, -t));
|
|
716
716
|
}, e.prototype.rotate = function(t) {
|
|
717
717
|
return t === void 0 && (t = 15), this.hue(this.hue() + t);
|
|
718
718
|
}, e.prototype.alpha = function(t) {
|
|
@@ -725,19 +725,19 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
725
725
|
return this.toHex() === C(t).toHex();
|
|
726
726
|
}, e;
|
|
727
727
|
}(), C = function(e) {
|
|
728
|
-
return e instanceof
|
|
728
|
+
return e instanceof te ? e : new te(e);
|
|
729
729
|
};
|
|
730
|
-
const
|
|
730
|
+
const St = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
731
731
|
function so(e) {
|
|
732
732
|
return {
|
|
733
733
|
debug: (t, ...o) => {
|
|
734
|
-
|
|
734
|
+
St && console.debug(`[${e}]`, t, ...o);
|
|
735
735
|
},
|
|
736
736
|
info: (t, ...o) => {
|
|
737
|
-
|
|
737
|
+
St && console.info(`[${e}]`, t, ...o);
|
|
738
738
|
},
|
|
739
739
|
warn: (t, ...o) => {
|
|
740
|
-
|
|
740
|
+
St && console.warn(`[${e}]`, t, ...o);
|
|
741
741
|
},
|
|
742
742
|
error: (t, ...o) => {
|
|
743
743
|
console.error(`[${e}]`, t, ...o);
|
|
@@ -745,7 +745,7 @@ function so(e) {
|
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
747
|
const b = so("Pollcatch");
|
|
748
|
-
var
|
|
748
|
+
var ge = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(ge || {});
|
|
749
749
|
const io = {
|
|
750
750
|
black: "#000000",
|
|
751
751
|
white: "#ffffff",
|
|
@@ -767,11 +767,11 @@ function ao(e) {
|
|
|
767
767
|
const t = e.toLowerCase().trim();
|
|
768
768
|
return io[t] || null;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
771
|
-
const o =
|
|
770
|
+
function Ct(e, t) {
|
|
771
|
+
const o = ee(e), r = ee(t), s = Math.max(o, r), i = Math.min(o, r);
|
|
772
772
|
return (s + 0.05) / (i + 0.05);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function ee(e) {
|
|
775
775
|
const t = lo(e), o = t.r / 255, r = t.g / 255, s = t.b / 255, i = o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4), a = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), n = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
776
776
|
return 0.2126 * i + 0.7152 * a + 0.0722 * n;
|
|
777
777
|
}
|
|
@@ -789,15 +789,15 @@ function no(e, t = {}) {
|
|
|
789
789
|
} = t, n = s.map((c) => c === "black" ? "#000000" : c === "white" ? "#ffffff" : c === "light" ? i.light || "#f8f9fa" : c === "dark" ? i.dark || "#343a40" : c);
|
|
790
790
|
let l = a, p = 0;
|
|
791
791
|
for (const c of n) {
|
|
792
|
-
const u =
|
|
792
|
+
const u = Ct(e, c);
|
|
793
793
|
u >= r && u > p && (p = u, l = c);
|
|
794
794
|
}
|
|
795
795
|
if (p === 0) {
|
|
796
|
-
const c =
|
|
796
|
+
const c = Ct(e, a);
|
|
797
797
|
l = a, p = c;
|
|
798
798
|
for (const u of n) {
|
|
799
799
|
if (u === a) continue;
|
|
800
|
-
const w =
|
|
800
|
+
const w = Ct(e, u);
|
|
801
801
|
w > p && (p = w, l = u);
|
|
802
802
|
}
|
|
803
803
|
b.warn(
|
|
@@ -825,7 +825,7 @@ function k(e, t) {
|
|
|
825
825
|
}[t] : void 0;
|
|
826
826
|
return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function oe(e, t = "1rem", o = 1) {
|
|
829
829
|
if (!e) return t;
|
|
830
830
|
const r = {
|
|
831
831
|
xs: 0.75,
|
|
@@ -891,7 +891,7 @@ function uo(e, t, o, r = !1) {
|
|
|
891
891
|
ariaDisabled: o
|
|
892
892
|
});
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function kt(e, t, o) {
|
|
895
895
|
typeof o == "boolean" ? e.setAttribute(t, o ? "true" : "false") : e.setAttribute(t, o);
|
|
896
896
|
}
|
|
897
897
|
function ho(e) {
|
|
@@ -900,7 +900,7 @@ function ho(e) {
|
|
|
900
900
|
const t = e.replace(/[<>"']/g, "").trim();
|
|
901
901
|
return /^(#[0-9a-fA-F]{3,8}|rgb\([^)]+\)|rgba\([^)]+\)|hsl\([^)]+\)|hsla\([^)]+\)|[a-zA-Z]+)$/.test(t);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function L(e) {
|
|
904
904
|
return ho(e) ? e.replace(/[<>"']/g, "").trim() : (b.warn("Invalid color value:", e), "#000000");
|
|
905
905
|
}
|
|
906
906
|
function fo(e) {
|
|
@@ -915,14 +915,14 @@ function mo(e) {
|
|
|
915
915
|
(t, o, r, s, i) => s ? t : `${o}: ${r.trim()} !important${i}`
|
|
916
916
|
);
|
|
917
917
|
}
|
|
918
|
-
const
|
|
919
|
-
function
|
|
918
|
+
const re = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", bo = "pc_session_id", go = 24 * 60 * 60 * 1e3;
|
|
919
|
+
function se() {
|
|
920
920
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (b.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
921
921
|
const t = Math.random() * 16 | 0;
|
|
922
922
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
923
923
|
}));
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function zt() {
|
|
926
926
|
const e = "test-local-storage";
|
|
927
927
|
try {
|
|
928
928
|
return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
|
|
@@ -930,7 +930,7 @@ function Tt() {
|
|
|
930
930
|
return b.warn("localStorage not available, session ID will not persist"), !1;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function ve(e) {
|
|
934
934
|
try {
|
|
935
935
|
const t = localStorage.getItem(e);
|
|
936
936
|
return t ? JSON.parse(t) : void 0;
|
|
@@ -939,7 +939,7 @@ function ge(e) {
|
|
|
939
939
|
return;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ye(e, t) {
|
|
943
943
|
try {
|
|
944
944
|
return localStorage.setItem(e, JSON.stringify(t)), !0;
|
|
945
945
|
} catch (o) {
|
|
@@ -959,23 +959,23 @@ async function vo() {
|
|
|
959
959
|
}
|
|
960
960
|
b.warn("No project key found in global variable or script tags");
|
|
961
961
|
}
|
|
962
|
-
async function
|
|
962
|
+
async function ie() {
|
|
963
963
|
const e = bo, t = go;
|
|
964
|
-
if (
|
|
965
|
-
const o =
|
|
964
|
+
if (zt()) {
|
|
965
|
+
const o = ve(e);
|
|
966
966
|
if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
|
|
967
967
|
return b.debug("Using existing session ID from localStorage"), o.id;
|
|
968
968
|
b.debug(
|
|
969
969
|
o ? "Session ID expired" : "No session ID found",
|
|
970
970
|
"generating new one"
|
|
971
971
|
);
|
|
972
|
-
const r =
|
|
973
|
-
return
|
|
972
|
+
const r = se();
|
|
973
|
+
return ye(e, {
|
|
974
974
|
id: r,
|
|
975
975
|
timestamp: Date.now()
|
|
976
976
|
}) ? b.debug("Generated and stored new session ID") : b.warn("Generated session ID but failed to store it"), r;
|
|
977
977
|
} else {
|
|
978
|
-
const o =
|
|
978
|
+
const o = se();
|
|
979
979
|
return b.debug("Generated non-persistent session ID"), o;
|
|
980
980
|
}
|
|
981
981
|
}
|
|
@@ -1003,20 +1003,20 @@ function O() {
|
|
|
1003
1003
|
};
|
|
1004
1004
|
}
|
|
1005
1005
|
function yo(e) {
|
|
1006
|
-
if (!
|
|
1006
|
+
if (!zt())
|
|
1007
1007
|
return O();
|
|
1008
1008
|
try {
|
|
1009
|
-
const t =
|
|
1009
|
+
const t = ve(e);
|
|
1010
1010
|
return t ? { ...O(), ...t } : O();
|
|
1011
1011
|
} catch (t) {
|
|
1012
1012
|
return b.warn("Failed to load localStats from localStorage", t), O();
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
function wo(e, t) {
|
|
1016
|
-
if (!
|
|
1016
|
+
if (!zt())
|
|
1017
1017
|
return !1;
|
|
1018
1018
|
try {
|
|
1019
|
-
return
|
|
1019
|
+
return ye(e, t) ? (b.debug("Saved localStats to localStorage", t), !0) : !1;
|
|
1020
1020
|
} catch (o) {
|
|
1021
1021
|
return b.warn("Failed to save localStats to localStorage", o), !1;
|
|
1022
1022
|
}
|
|
@@ -1057,10 +1057,10 @@ function xo(e, t) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
return o.nps = lt((o == null ? void 0 : o.breakdown) || {}), o;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function we(e) {
|
|
1061
1061
|
return !e || typeof e != "string" ? !1 : /^[\p{Emoji}]$/u.test(e) ? !0 : new RegExp("^\\p{Emoji}(\\p{Emoji_Modifier}|\\u200D\\p{Emoji})*$", "u").test(e);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function pt(e) {
|
|
1064
1064
|
if (!e || typeof e != "string")
|
|
1065
1065
|
return !1;
|
|
1066
1066
|
const t = e.trim();
|
|
@@ -1118,7 +1118,7 @@ class _o {
|
|
|
1118
1118
|
return this.host.project || await vo() || "public";
|
|
1119
1119
|
}
|
|
1120
1120
|
async getLocalStatsKey() {
|
|
1121
|
-
const t = this.host, o = await
|
|
1121
|
+
const t = this.host, o = await ie(), r = await this.getProjectId(), s = t.name || "unnamed";
|
|
1122
1122
|
return `pc-local-stats-${o}-${r}-${s}`;
|
|
1123
1123
|
}
|
|
1124
1124
|
/**
|
|
@@ -1158,7 +1158,7 @@ class _o {
|
|
|
1158
1158
|
} else
|
|
1159
1159
|
n = a || {};
|
|
1160
1160
|
} else {
|
|
1161
|
-
const u = t.dataEndpoint ||
|
|
1161
|
+
const u = t.dataEndpoint || re;
|
|
1162
1162
|
if (!r)
|
|
1163
1163
|
throw new Error("Name parameter is required");
|
|
1164
1164
|
const w = `${u}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
|
|
@@ -1263,7 +1263,7 @@ class _o {
|
|
|
1263
1263
|
async submitStats() {
|
|
1264
1264
|
if (!this.hasLocalStats() && !this.hasInteracted)
|
|
1265
1265
|
throw b.warn("No local stats to submit"), new Error("No local stats to submit");
|
|
1266
|
-
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await
|
|
1266
|
+
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await ie(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, n = Object.keys(this.localStats.breakdown || {});
|
|
1267
1267
|
this.isSubmitting = !0, this.host.requestUpdate();
|
|
1268
1268
|
const l = {
|
|
1269
1269
|
sessionId: r,
|
|
@@ -1286,12 +1286,12 @@ class _o {
|
|
|
1286
1286
|
return l;
|
|
1287
1287
|
}
|
|
1288
1288
|
async sendStats(t) {
|
|
1289
|
-
const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint ||
|
|
1289
|
+
const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || re;
|
|
1290
1290
|
if (r.dataFunc) {
|
|
1291
1291
|
b.debug("Skip sending stats as data function is in use.");
|
|
1292
1292
|
return;
|
|
1293
1293
|
}
|
|
1294
|
-
if (!
|
|
1294
|
+
if (!pt(s))
|
|
1295
1295
|
throw b.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
|
|
1296
1296
|
try {
|
|
1297
1297
|
if (b.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
|
|
@@ -1500,8 +1500,8 @@ class Eo {
|
|
|
1500
1500
|
return !(t.readOnly || !this.isEditing || t.lockAnswer && this.dataController.hasSubmittedStats());
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
var
|
|
1504
|
-
function
|
|
1503
|
+
var It = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(It || {});
|
|
1504
|
+
function $e(e, t = {}) {
|
|
1505
1505
|
const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
|
|
1506
1506
|
if (!e)
|
|
1507
1507
|
return { alt: "", ariaHidden: !0 };
|
|
@@ -1510,7 +1510,7 @@ function we(e, t = {}) {
|
|
|
1510
1510
|
o === "functional" && !r && !s && console.warn(
|
|
1511
1511
|
"No alt text or aria-label provided for functional icon. This may cause accessibility issues."
|
|
1512
1512
|
);
|
|
1513
|
-
const a = i ? " (selected)" : "", n =
|
|
1513
|
+
const a = i ? " (selected)" : "", n = pt(e) && !r ? "" : r || e, l = s || (n ? `${n}${a}` : a);
|
|
1514
1514
|
return {
|
|
1515
1515
|
alt: n,
|
|
1516
1516
|
ariaLabel: l,
|
|
@@ -1531,8 +1531,8 @@ function Oo(e, t) {
|
|
|
1531
1531
|
* Copyright 2017 Google LLC
|
|
1532
1532
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1533
1533
|
*/
|
|
1534
|
-
const
|
|
1535
|
-
let
|
|
1534
|
+
const xe = { ATTRIBUTE: 1 }, Se = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
1535
|
+
let Ce = class {
|
|
1536
1536
|
constructor(t) {
|
|
1537
1537
|
}
|
|
1538
1538
|
get _$AU() {
|
|
@@ -1553,10 +1553,10 @@ let Se = class {
|
|
|
1553
1553
|
* Copyright 2018 Google LLC
|
|
1554
1554
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1555
1555
|
*/
|
|
1556
|
-
const y =
|
|
1556
|
+
const y = Se(class extends Ce {
|
|
1557
1557
|
constructor(e) {
|
|
1558
1558
|
var t;
|
|
1559
|
-
if (super(e), e.type !==
|
|
1559
|
+
if (super(e), e.type !== xe.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1560
1560
|
}
|
|
1561
1561
|
render(e) {
|
|
1562
1562
|
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
@@ -1586,9 +1586,9 @@ const st = {
|
|
|
1586
1586
|
mobile: "480px",
|
|
1587
1587
|
tablet: "768px",
|
|
1588
1588
|
desktop: "1024px"
|
|
1589
|
-
},
|
|
1589
|
+
}, Rt = class Rt extends j {
|
|
1590
1590
|
constructor() {
|
|
1591
|
-
super(...arguments), this.dataController = new _o(this), this.displayController = new Eo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.lockAnswer = !1, this.ariaLabel = null, this.minContrast =
|
|
1591
|
+
super(...arguments), this.dataController = new _o(this), this.displayController = new Eo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.lockAnswer = !1, this.ariaLabel = null, this.minContrast = ge.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.readOnly = !1, this.handleEditToggleKeyDown = (t) => {
|
|
1592
1592
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
@@ -1620,7 +1620,7 @@ const st = {
|
|
|
1620
1620
|
let o = `:host {
|
|
1621
1621
|
`;
|
|
1622
1622
|
if (this.primaryColor) {
|
|
1623
|
-
const i =
|
|
1623
|
+
const i = L(this.primaryColor);
|
|
1624
1624
|
o += `--pc-primary-color: ${i} !important;
|
|
1625
1625
|
`;
|
|
1626
1626
|
const a = no(i, {
|
|
@@ -1631,35 +1631,35 @@ const st = {
|
|
|
1631
1631
|
`;
|
|
1632
1632
|
}
|
|
1633
1633
|
if (this.muteColor) {
|
|
1634
|
-
const i =
|
|
1634
|
+
const i = L(this.muteColor);
|
|
1635
1635
|
o += `--pc-mute-color: ${i} !important;
|
|
1636
1636
|
`;
|
|
1637
1637
|
}
|
|
1638
1638
|
if (this.textColor) {
|
|
1639
|
-
const i =
|
|
1639
|
+
const i = L(this.textColor);
|
|
1640
1640
|
o += `--pc-text-color: ${i} !important;
|
|
1641
1641
|
`;
|
|
1642
1642
|
}
|
|
1643
1643
|
if (this.backgroundColor) {
|
|
1644
|
-
const i =
|
|
1644
|
+
const i = L(this.backgroundColor);
|
|
1645
1645
|
o += `--pc-background-color: ${i} !important;
|
|
1646
1646
|
`;
|
|
1647
1647
|
}
|
|
1648
1648
|
const r = this.starColor || this.accentColor || this.primaryColor;
|
|
1649
1649
|
if (r) {
|
|
1650
|
-
const i =
|
|
1650
|
+
const i = L(r);
|
|
1651
1651
|
o += `--pc-star-color: ${i} !important;
|
|
1652
1652
|
`;
|
|
1653
1653
|
}
|
|
1654
|
-
const s = this.starHoverColor || (r ? `color-mix(in srgb, ${
|
|
1654
|
+
const s = this.starHoverColor || (r ? `color-mix(in srgb, ${L(r)} 80%, white)` : null);
|
|
1655
1655
|
if (s && (o += `--pc-star-hover-color: ${s} !important;
|
|
1656
1656
|
`), this.starSize) {
|
|
1657
|
-
const i =
|
|
1657
|
+
const i = oe(this.starSize, "1rem", 1.5);
|
|
1658
1658
|
o += `--pc-stars-star-size: ${i} !important;
|
|
1659
1659
|
`;
|
|
1660
1660
|
}
|
|
1661
1661
|
if (this.size) {
|
|
1662
|
-
const i =
|
|
1662
|
+
const i = oe(this.size);
|
|
1663
1663
|
o += `font-size: ${i} !important;
|
|
1664
1664
|
`;
|
|
1665
1665
|
}
|
|
@@ -1675,7 +1675,7 @@ const st = {
|
|
|
1675
1675
|
* Update ARIA attributes for accessibility
|
|
1676
1676
|
*/
|
|
1677
1677
|
updateAriaAttributes() {
|
|
1678
|
-
this.ariaLabel &&
|
|
1678
|
+
this.ariaLabel && kt(this, "aria-label", this.ariaLabel), this.ariaDescribedby && kt(this, "aria-describedby", this.ariaDescribedby), kt(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
|
|
1679
1679
|
}
|
|
1680
1680
|
/**
|
|
1681
1681
|
* Update host CSS classes based on state
|
|
@@ -1797,7 +1797,7 @@ const st = {
|
|
|
1797
1797
|
`;
|
|
1798
1798
|
}
|
|
1799
1799
|
};
|
|
1800
|
-
|
|
1800
|
+
Rt.styles = [
|
|
1801
1801
|
F`
|
|
1802
1802
|
:host {
|
|
1803
1803
|
/* Default values for CSS variables - can be overridden by external :root or parent definitions */
|
|
@@ -1872,12 +1872,12 @@ Mt.styles = [
|
|
|
1872
1872
|
border-color: var(--pc-error-color);
|
|
1873
1873
|
}
|
|
1874
1874
|
|
|
1875
|
-
/*
|
|
1876
|
-
:host([
|
|
1875
|
+
/* Readonly state */
|
|
1876
|
+
:host([readonly]) {
|
|
1877
1877
|
pointer-events: auto;
|
|
1878
1878
|
}
|
|
1879
1879
|
|
|
1880
|
-
:host([
|
|
1880
|
+
:host([readonly]) button:not(.chart-toggle-icon):not([role='button']) {
|
|
1881
1881
|
cursor: default;
|
|
1882
1882
|
}
|
|
1883
1883
|
|
|
@@ -1887,7 +1887,7 @@ Mt.styles = [
|
|
|
1887
1887
|
}
|
|
1888
1888
|
`
|
|
1889
1889
|
];
|
|
1890
|
-
let m =
|
|
1890
|
+
let m = Rt;
|
|
1891
1891
|
g([
|
|
1892
1892
|
f({ type: String, attribute: "show-stats" })
|
|
1893
1893
|
], m.prototype, "showStats");
|
|
@@ -1988,7 +1988,7 @@ g([
|
|
|
1988
1988
|
f({ type: Boolean, attribute: "multiple" })
|
|
1989
1989
|
], m.prototype, "multiple");
|
|
1990
1990
|
g([
|
|
1991
|
-
f({ type: Boolean, attribute: "
|
|
1991
|
+
f({ type: Boolean, attribute: "readonly" })
|
|
1992
1992
|
], m.prototype, "readOnly");
|
|
1993
1993
|
const zo = F`
|
|
1994
1994
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
@@ -2136,7 +2136,7 @@ const zo = F`
|
|
|
2136
2136
|
}
|
|
2137
2137
|
|
|
2138
2138
|
/* Removed unused responsive styles for action buttons */
|
|
2139
|
-
`,
|
|
2139
|
+
`, ut = F`
|
|
2140
2140
|
/* Default values for CSS variables - can be overridden by external :root or parent definitions */
|
|
2141
2141
|
:host {
|
|
2142
2142
|
--default-primary-color: #2196f3;
|
|
@@ -2305,6 +2305,7 @@ const zo = F`
|
|
|
2305
2305
|
cursor: pointer;
|
|
2306
2306
|
transition: all 0.2s ease;
|
|
2307
2307
|
align-self: flex-end;
|
|
2308
|
+
white-space: nowrap;
|
|
2308
2309
|
}
|
|
2309
2310
|
|
|
2310
2311
|
.pc-submit-button--compact {
|
|
@@ -2616,7 +2617,7 @@ const zo = F`
|
|
|
2616
2617
|
}
|
|
2617
2618
|
}
|
|
2618
2619
|
`;
|
|
2619
|
-
function
|
|
2620
|
+
function Nt(e, t = {}) {
|
|
2620
2621
|
if (!e || e.length === 0)
|
|
2621
2622
|
return d`<div class="pc-bar-chart pc-bar-chart--empty">No data available</div>`;
|
|
2622
2623
|
const o = Math.max(...e.map((i) => i.value)), s = { ...{
|
|
@@ -2717,7 +2718,7 @@ let I = class extends m {
|
|
|
2717
2718
|
const e = ((a = this.dataController.stats) == null ? void 0 : a.breakdown) || {}, t = Object.values(e).reduce((n, l) => n + l, 0), o = Object.entries(e).map(([n, l]) => ({
|
|
2718
2719
|
label: n,
|
|
2719
2720
|
value: l
|
|
2720
|
-
})), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i =
|
|
2721
|
+
})), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = Nt(o, {
|
|
2721
2722
|
barColor: s,
|
|
2722
2723
|
labelFormatter: (n) => `${n.label}`,
|
|
2723
2724
|
valueFormatter: (n) => `${t > 0 ? Math.round(n.value / t * 100) : 0}%`
|
|
@@ -2778,7 +2779,7 @@ let I = class extends m {
|
|
|
2778
2779
|
`;
|
|
2779
2780
|
}
|
|
2780
2781
|
};
|
|
2781
|
-
I.styles = [...m.styles,
|
|
2782
|
+
I.styles = [...m.styles, ut, zo];
|
|
2782
2783
|
Y([
|
|
2783
2784
|
f({ type: String, attribute: "min-label" })
|
|
2784
2785
|
], I.prototype, "minLabel", 2);
|
|
@@ -2792,7 +2793,7 @@ Y([
|
|
|
2792
2793
|
f({ type: String, attribute: "min-max-position" })
|
|
2793
2794
|
], I.prototype, "minMaxPosition", 2);
|
|
2794
2795
|
Y([
|
|
2795
|
-
|
|
2796
|
+
Tt()
|
|
2796
2797
|
], I.prototype, "hoverValue", 2);
|
|
2797
2798
|
I = Y([
|
|
2798
2799
|
ot("pc-nps")
|
|
@@ -3054,10 +3055,10 @@ const Mo = F`
|
|
|
3054
3055
|
visibility: hidden;
|
|
3055
3056
|
}
|
|
3056
3057
|
`;
|
|
3057
|
-
var
|
|
3058
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
3058
|
+
var Ro = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Mt = (e, t, o, r) => {
|
|
3059
|
+
for (var s = r > 1 ? void 0 : r ? Lo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3059
3060
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3060
|
-
return r && s &&
|
|
3061
|
+
return r && s && Ro(t, o, s), s;
|
|
3061
3062
|
};
|
|
3062
3063
|
let tt = class extends m {
|
|
3063
3064
|
constructor() {
|
|
@@ -3117,16 +3118,16 @@ let tt = class extends m {
|
|
|
3117
3118
|
*/
|
|
3118
3119
|
renderOptionIcon(e) {
|
|
3119
3120
|
if (!(e != null && e.icon)) return "";
|
|
3120
|
-
const t =
|
|
3121
|
+
const t = It.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = $e(e == null ? void 0 : e.icon, {
|
|
3121
3122
|
type: t,
|
|
3122
3123
|
alt: o,
|
|
3123
3124
|
isSelected: r
|
|
3124
3125
|
});
|
|
3125
|
-
return
|
|
3126
|
+
return we(e == null ? void 0 : e.icon) ? d`<span
|
|
3126
3127
|
class="poll-option-icon"
|
|
3127
3128
|
aria-hidden="${s.ariaHidden ? "true" : "false"}"
|
|
3128
3129
|
>${e == null ? void 0 : e.icon}</span
|
|
3129
|
-
>` :
|
|
3130
|
+
>` : pt(e == null ? void 0 : e.icon) ? d`<img
|
|
3130
3131
|
src="${e == null ? void 0 : e.icon}"
|
|
3131
3132
|
alt="${s.alt}"
|
|
3132
3133
|
class="poll-option-icon-img"
|
|
@@ -3322,14 +3323,14 @@ let tt = class extends m {
|
|
|
3322
3323
|
`;
|
|
3323
3324
|
}
|
|
3324
3325
|
};
|
|
3325
|
-
tt.styles = [...m.styles,
|
|
3326
|
-
|
|
3326
|
+
tt.styles = [...m.styles, ut, Mo];
|
|
3327
|
+
Mt([
|
|
3327
3328
|
f({ type: Boolean })
|
|
3328
3329
|
], tt.prototype, "multiple", 2);
|
|
3329
|
-
|
|
3330
|
+
Mt([
|
|
3330
3331
|
f({ type: Boolean })
|
|
3331
3332
|
], tt.prototype, "compact", 2);
|
|
3332
|
-
tt =
|
|
3333
|
+
tt = Mt([
|
|
3333
3334
|
ot("pc-poll")
|
|
3334
3335
|
], tt);
|
|
3335
3336
|
const Uo = F`
|
|
@@ -3363,6 +3364,8 @@ const Uo = F`
|
|
|
3363
3364
|
transition: all 0.2s ease;
|
|
3364
3365
|
position: relative;
|
|
3365
3366
|
z-index: 1;
|
|
3367
|
+
/* Apply grayscale and increased brightness/opacity to unselected stars (for emoji/custom icons) */
|
|
3368
|
+
filter: grayscale(80%) opacity(0.4);
|
|
3366
3369
|
}
|
|
3367
3370
|
|
|
3368
3371
|
.star:not(.view-mode):hover {
|
|
@@ -3375,6 +3378,15 @@ const Uo = F`
|
|
|
3375
3378
|
|
|
3376
3379
|
.star.selected {
|
|
3377
3380
|
color: var(--pc-star-color, var(--default-star-color));
|
|
3381
|
+
filter: none;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
/* Image-based star icons */
|
|
3385
|
+
.star-icon-img {
|
|
3386
|
+
width: 1em;
|
|
3387
|
+
height: 1em;
|
|
3388
|
+
object-fit: contain;
|
|
3389
|
+
vertical-align: middle;
|
|
3378
3390
|
}
|
|
3379
3391
|
|
|
3380
3392
|
.star.partial {
|
|
@@ -3414,10 +3426,10 @@ const Uo = F`
|
|
|
3414
3426
|
* Copyright 2018 Google LLC
|
|
3415
3427
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3416
3428
|
*/
|
|
3417
|
-
const
|
|
3429
|
+
const ke = "important", jo = " !" + ke, Bo = Se(class extends Ce {
|
|
3418
3430
|
constructor(e) {
|
|
3419
3431
|
var t;
|
|
3420
|
-
if (super(e), e.type !==
|
|
3432
|
+
if (super(e), e.type !== xe.ATTRIBUTE || e.name !== "style" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
3421
3433
|
}
|
|
3422
3434
|
render(e) {
|
|
3423
3435
|
return Object.keys(e).reduce((t, o) => {
|
|
@@ -3434,20 +3446,169 @@ const Ce = "important", jo = " !" + Ce, Bo = xe(class extends Se {
|
|
|
3434
3446
|
if (s != null) {
|
|
3435
3447
|
this.ft.add(r);
|
|
3436
3448
|
const i = typeof s == "string" && s.endsWith(jo);
|
|
3437
|
-
r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ?
|
|
3449
|
+
r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? ke : "") : o[r] = s;
|
|
3438
3450
|
}
|
|
3439
3451
|
}
|
|
3440
3452
|
return z;
|
|
3441
3453
|
}
|
|
3442
|
-
})
|
|
3443
|
-
|
|
3454
|
+
}), ae = {
|
|
3455
|
+
// Faces
|
|
3456
|
+
smile: "😊",
|
|
3457
|
+
laugh: "😄",
|
|
3458
|
+
wink: "😉",
|
|
3459
|
+
"heart-eyes": "🥰",
|
|
3460
|
+
cool: "😎",
|
|
3461
|
+
thinking: "🤔",
|
|
3462
|
+
confused: "😕",
|
|
3463
|
+
sad: "😢",
|
|
3464
|
+
angry: "😠",
|
|
3465
|
+
surprised: "😲",
|
|
3466
|
+
worried: "😟",
|
|
3467
|
+
tired: "😫",
|
|
3468
|
+
sleepy: "😴",
|
|
3469
|
+
sick: "🤒",
|
|
3470
|
+
nerd: "🤓",
|
|
3471
|
+
clown: "🤡",
|
|
3472
|
+
robot: "🤖",
|
|
3473
|
+
alien: "👽",
|
|
3474
|
+
ghost: "👻",
|
|
3475
|
+
poop: "💩",
|
|
3476
|
+
// Hands
|
|
3477
|
+
"thumbs-up": "👍",
|
|
3478
|
+
"thumbs-down": "👎",
|
|
3479
|
+
ok: "👌",
|
|
3480
|
+
peace: "✌️",
|
|
3481
|
+
wave: "👋",
|
|
3482
|
+
clap: "👏",
|
|
3483
|
+
pray: "🙏",
|
|
3484
|
+
rock: "🤘",
|
|
3485
|
+
"point-up": "☝️",
|
|
3486
|
+
"point-down": "👇",
|
|
3487
|
+
"point-left": "👈",
|
|
3488
|
+
"point-right": "👉",
|
|
3489
|
+
// Hearts
|
|
3490
|
+
heart: "❤️",
|
|
3491
|
+
like: "❤️",
|
|
3492
|
+
// alias for heart
|
|
3493
|
+
"blue-heart": "💙",
|
|
3494
|
+
"green-heart": "💚",
|
|
3495
|
+
"yellow-heart": "💛",
|
|
3496
|
+
"purple-heart": "💜",
|
|
3497
|
+
"black-heart": "🖤",
|
|
3498
|
+
"white-heart": "🤍",
|
|
3499
|
+
"broken-heart": "💔",
|
|
3500
|
+
"sparkling-heart": "💖",
|
|
3501
|
+
"growing-heart": "💗",
|
|
3502
|
+
"beating-heart": "💓",
|
|
3503
|
+
// Stars
|
|
3504
|
+
star: "⭐",
|
|
3505
|
+
"glowing-star": "🌟",
|
|
3506
|
+
"shooting-star": "🌠",
|
|
3507
|
+
sparkles: "✨",
|
|
3508
|
+
// Weather
|
|
3509
|
+
sun: "☀️",
|
|
3510
|
+
cloud: "☁️",
|
|
3511
|
+
rain: "🌧️",
|
|
3512
|
+
snow: "🌨️",
|
|
3513
|
+
thunder: "⛈️",
|
|
3514
|
+
rainbow: "🌈",
|
|
3515
|
+
// Nature
|
|
3516
|
+
flower: "🌸",
|
|
3517
|
+
leaf: "🍃",
|
|
3518
|
+
tree: "🌳",
|
|
3519
|
+
mountain: "⛰️",
|
|
3520
|
+
beach: "🏖️",
|
|
3521
|
+
sunset: "🌅",
|
|
3522
|
+
moon: "🌙",
|
|
3523
|
+
fire: "🔥",
|
|
3524
|
+
water: "💧",
|
|
3525
|
+
// Food
|
|
3526
|
+
pizza: "🍕",
|
|
3527
|
+
burger: "🍔",
|
|
3528
|
+
taco: "🌮",
|
|
3529
|
+
sushi: "🍱",
|
|
3530
|
+
"ice-cream": "🍦",
|
|
3531
|
+
coffee: "☕",
|
|
3532
|
+
beer: "🍺",
|
|
3533
|
+
wine: "🍷",
|
|
3534
|
+
cocktail: "🍸",
|
|
3535
|
+
// Animals
|
|
3536
|
+
dog: "🐕",
|
|
3537
|
+
cat: "🐱",
|
|
3538
|
+
rabbit: "🐰",
|
|
3539
|
+
bear: "🐻",
|
|
3540
|
+
lion: "🦁",
|
|
3541
|
+
tiger: "🐯",
|
|
3542
|
+
monkey: "🐒",
|
|
3543
|
+
panda: "🐼",
|
|
3544
|
+
fox: "🦊",
|
|
3545
|
+
owl: "🦉",
|
|
3546
|
+
dolphin: "🐬",
|
|
3547
|
+
whale: "🐋",
|
|
3548
|
+
fish: "🐟",
|
|
3549
|
+
turtle: "🐢",
|
|
3550
|
+
snake: "🐍",
|
|
3551
|
+
spider: "🕷️",
|
|
3552
|
+
bee: "🐝",
|
|
3553
|
+
butterfly: "🦋",
|
|
3554
|
+
// Objects
|
|
3555
|
+
book: "📚",
|
|
3556
|
+
pencil: "✏️",
|
|
3557
|
+
scissors: "✂️",
|
|
3558
|
+
camera: "📷",
|
|
3559
|
+
phone: "📱",
|
|
3560
|
+
computer: "💻",
|
|
3561
|
+
key: "🔑",
|
|
3562
|
+
lock: "🔒",
|
|
3563
|
+
bell: "🔔",
|
|
3564
|
+
gift: "🎁",
|
|
3565
|
+
balloon: "🎈",
|
|
3566
|
+
crown: "👑",
|
|
3567
|
+
trophy: "🏆",
|
|
3568
|
+
medal: "🏅",
|
|
3569
|
+
flag: "🚩",
|
|
3570
|
+
umbrella: "☂️",
|
|
3571
|
+
bag: "👜",
|
|
3572
|
+
shoes: "👞",
|
|
3573
|
+
watch: "⌚",
|
|
3574
|
+
glasses: "👓",
|
|
3575
|
+
// Activities
|
|
3576
|
+
soccer: "⚽",
|
|
3577
|
+
basketball: "🏀",
|
|
3578
|
+
tennis: "🎾",
|
|
3579
|
+
golf: "⛳",
|
|
3580
|
+
swimming: "🏊",
|
|
3581
|
+
running: "🏃",
|
|
3582
|
+
dancing: "💃",
|
|
3583
|
+
singing: "🎤",
|
|
3584
|
+
music: "🎵",
|
|
3585
|
+
movie: "🎬",
|
|
3586
|
+
game: "🎮",
|
|
3587
|
+
puzzle: "🧩",
|
|
3588
|
+
art: "🎨",
|
|
3589
|
+
theater: "🎭",
|
|
3590
|
+
party: "🎉",
|
|
3591
|
+
travel: "✈️",
|
|
3592
|
+
camping: "⛺",
|
|
3593
|
+
fishing: "🎣",
|
|
3594
|
+
hiking: "🥾",
|
|
3595
|
+
yoga: "🧘"
|
|
3596
|
+
};
|
|
3597
|
+
function ct(e) {
|
|
3598
|
+
let t = "❓", o = !1;
|
|
3599
|
+
return e ? e in ae ? t = ae[e] : we(e) ? t = e : pt(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
|
|
3600
|
+
icon: t,
|
|
3601
|
+
isRemoteImage: o
|
|
3602
|
+
};
|
|
3603
|
+
}
|
|
3604
|
+
var Do = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, ht = (e, t, o, r) => {
|
|
3444
3605
|
for (var s = r > 1 ? void 0 : r ? Vo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3445
3606
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3446
3607
|
return r && s && Do(t, o, s), s;
|
|
3447
3608
|
};
|
|
3448
3609
|
let V = class extends m {
|
|
3449
3610
|
constructor() {
|
|
3450
|
-
super(), this.type = $.stars, this.numStars = 5, this.hoverValue = -1, this.handleStarKeyDown = (e) => {
|
|
3611
|
+
super(), this.type = $.stars, this.icon = "★", this.numStars = 5, this.hoverValue = -1, this.handleStarKeyDown = (e) => {
|
|
3451
3612
|
if (e.key === "Enter" || e.key === " ") {
|
|
3452
3613
|
e.preventDefault();
|
|
3453
3614
|
const t = e.target, o = parseInt(t.dataset.star || "0");
|
|
@@ -3464,6 +3625,20 @@ let V = class extends m {
|
|
|
3464
3625
|
async handleStarClick(e) {
|
|
3465
3626
|
this.displayController.allowEdit() && (await this.dataController.toggleValueSelected(String(e), !1), await this.dataController.submitStats());
|
|
3466
3627
|
}
|
|
3628
|
+
/**
|
|
3629
|
+
* Renders the star icon using resolveIcon for emoji, URL, or MDI support
|
|
3630
|
+
*/
|
|
3631
|
+
renderStarIcon() {
|
|
3632
|
+
const { icon: e, isRemoteImage: t } = ct(this.icon);
|
|
3633
|
+
return t ? d`<img class="star-icon-img" src="${e}" alt="star" />` : e;
|
|
3634
|
+
}
|
|
3635
|
+
/**
|
|
3636
|
+
* Gets the resolved icon string (for use in chart labels)
|
|
3637
|
+
*/
|
|
3638
|
+
getResolvedIconString() {
|
|
3639
|
+
const { icon: e, isRemoteImage: t } = ct(this.icon);
|
|
3640
|
+
return t ? "★" : e;
|
|
3641
|
+
}
|
|
3467
3642
|
/**
|
|
3468
3643
|
* Render stars for view mode (showing average rating)
|
|
3469
3644
|
*/
|
|
@@ -3493,7 +3668,7 @@ let V = class extends m {
|
|
|
3493
3668
|
@blur="${this.handleStarLeave}"
|
|
3494
3669
|
@keydown="${this.handleStarKeyDown}"
|
|
3495
3670
|
>
|
|
3496
|
-
|
|
3671
|
+
${this.renderStarIcon()}
|
|
3497
3672
|
</span>
|
|
3498
3673
|
</div>
|
|
3499
3674
|
`;
|
|
@@ -3504,20 +3679,20 @@ let V = class extends m {
|
|
|
3504
3679
|
* Render the chart - always under the stars
|
|
3505
3680
|
*/
|
|
3506
3681
|
renderChart() {
|
|
3507
|
-
var
|
|
3682
|
+
var n;
|
|
3508
3683
|
if (!this.displayController.shouldShowChart()) return h;
|
|
3509
|
-
const e = ((
|
|
3510
|
-
label:
|
|
3511
|
-
value:
|
|
3512
|
-
icon:
|
|
3513
|
-
})),
|
|
3514
|
-
barColor:
|
|
3515
|
-
labelFormatter: (
|
|
3516
|
-
valueFormatter: (
|
|
3684
|
+
const e = ((n = this.dataController.stats) == null ? void 0 : n.breakdown) || {}, t = Object.values(e).reduce((l, p) => l + p, 0), o = this.getResolvedIconString(), r = Object.entries(e).map(([l, p]) => ({
|
|
3685
|
+
label: l,
|
|
3686
|
+
value: p,
|
|
3687
|
+
icon: o
|
|
3688
|
+
})), i = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", a = Nt(r, {
|
|
3689
|
+
barColor: i,
|
|
3690
|
+
labelFormatter: (l) => `${l.label} ${l.icon}`,
|
|
3691
|
+
valueFormatter: (l) => `${t > 0 ? Math.round(l.value / t * 100) : 0}%`
|
|
3517
3692
|
});
|
|
3518
3693
|
return d`
|
|
3519
3694
|
<div class="pc-stats-chart pc-stats-chart-inline visible" data-testid="stars-chart">
|
|
3520
|
-
<div class="pc-chart-container" data-testid="chart-container">${
|
|
3695
|
+
<div class="pc-chart-container" data-testid="chart-container">${a}</div>
|
|
3521
3696
|
</div>
|
|
3522
3697
|
`;
|
|
3523
3698
|
}
|
|
@@ -3542,17 +3717,17 @@ let V = class extends m {
|
|
|
3542
3717
|
`;
|
|
3543
3718
|
}
|
|
3544
3719
|
};
|
|
3545
|
-
V.styles = [...m.styles,
|
|
3546
|
-
|
|
3720
|
+
V.styles = [...m.styles, ut, Uo];
|
|
3721
|
+
ht([
|
|
3547
3722
|
f({ type: String })
|
|
3548
3723
|
], V.prototype, "icon", 2);
|
|
3549
|
-
|
|
3724
|
+
ht([
|
|
3550
3725
|
f({ type: Number, attribute: "num-stars" })
|
|
3551
3726
|
], V.prototype, "numStars", 2);
|
|
3552
|
-
|
|
3553
|
-
|
|
3727
|
+
ht([
|
|
3728
|
+
Tt()
|
|
3554
3729
|
], V.prototype, "hoverValue", 2);
|
|
3555
|
-
V =
|
|
3730
|
+
V = ht([
|
|
3556
3731
|
ot("pc-stars")
|
|
3557
3732
|
], V);
|
|
3558
3733
|
const qo = F`
|
|
@@ -3749,158 +3924,8 @@ const qo = F`
|
|
|
3749
3924
|
.reaction.expand .reaction-list {
|
|
3750
3925
|
order: 1;
|
|
3751
3926
|
}
|
|
3752
|
-
`,
|
|
3753
|
-
|
|
3754
|
-
smile: "😊",
|
|
3755
|
-
laugh: "😄",
|
|
3756
|
-
wink: "😉",
|
|
3757
|
-
"heart-eyes": "🥰",
|
|
3758
|
-
cool: "😎",
|
|
3759
|
-
thinking: "🤔",
|
|
3760
|
-
confused: "😕",
|
|
3761
|
-
sad: "😢",
|
|
3762
|
-
angry: "😠",
|
|
3763
|
-
surprised: "😲",
|
|
3764
|
-
worried: "😟",
|
|
3765
|
-
tired: "😫",
|
|
3766
|
-
sleepy: "😴",
|
|
3767
|
-
sick: "🤒",
|
|
3768
|
-
nerd: "🤓",
|
|
3769
|
-
clown: "🤡",
|
|
3770
|
-
robot: "🤖",
|
|
3771
|
-
alien: "👽",
|
|
3772
|
-
ghost: "👻",
|
|
3773
|
-
poop: "💩",
|
|
3774
|
-
// Hands
|
|
3775
|
-
"thumbs-up": "👍",
|
|
3776
|
-
"thumbs-down": "👎",
|
|
3777
|
-
ok: "👌",
|
|
3778
|
-
peace: "✌️",
|
|
3779
|
-
wave: "👋",
|
|
3780
|
-
clap: "👏",
|
|
3781
|
-
pray: "🙏",
|
|
3782
|
-
rock: "🤘",
|
|
3783
|
-
"point-up": "☝️",
|
|
3784
|
-
"point-down": "👇",
|
|
3785
|
-
"point-left": "👈",
|
|
3786
|
-
"point-right": "👉",
|
|
3787
|
-
// Hearts
|
|
3788
|
-
heart: "❤️",
|
|
3789
|
-
like: "❤️",
|
|
3790
|
-
// alias for heart
|
|
3791
|
-
"blue-heart": "💙",
|
|
3792
|
-
"green-heart": "💚",
|
|
3793
|
-
"yellow-heart": "💛",
|
|
3794
|
-
"purple-heart": "💜",
|
|
3795
|
-
"black-heart": "🖤",
|
|
3796
|
-
"white-heart": "🤍",
|
|
3797
|
-
"broken-heart": "💔",
|
|
3798
|
-
"sparkling-heart": "💖",
|
|
3799
|
-
"growing-heart": "💗",
|
|
3800
|
-
"beating-heart": "💓",
|
|
3801
|
-
// Stars
|
|
3802
|
-
star: "⭐",
|
|
3803
|
-
"glowing-star": "🌟",
|
|
3804
|
-
"shooting-star": "🌠",
|
|
3805
|
-
sparkles: "✨",
|
|
3806
|
-
// Weather
|
|
3807
|
-
sun: "☀️",
|
|
3808
|
-
cloud: "☁️",
|
|
3809
|
-
rain: "🌧️",
|
|
3810
|
-
snow: "🌨️",
|
|
3811
|
-
thunder: "⛈️",
|
|
3812
|
-
rainbow: "🌈",
|
|
3813
|
-
// Nature
|
|
3814
|
-
flower: "🌸",
|
|
3815
|
-
leaf: "🍃",
|
|
3816
|
-
tree: "🌳",
|
|
3817
|
-
mountain: "⛰️",
|
|
3818
|
-
beach: "🏖️",
|
|
3819
|
-
sunset: "🌅",
|
|
3820
|
-
moon: "🌙",
|
|
3821
|
-
fire: "🔥",
|
|
3822
|
-
water: "💧",
|
|
3823
|
-
// Food
|
|
3824
|
-
pizza: "🍕",
|
|
3825
|
-
burger: "🍔",
|
|
3826
|
-
taco: "🌮",
|
|
3827
|
-
sushi: "🍱",
|
|
3828
|
-
"ice-cream": "🍦",
|
|
3829
|
-
coffee: "☕",
|
|
3830
|
-
beer: "🍺",
|
|
3831
|
-
wine: "🍷",
|
|
3832
|
-
cocktail: "🍸",
|
|
3833
|
-
// Animals
|
|
3834
|
-
dog: "🐕",
|
|
3835
|
-
cat: "🐱",
|
|
3836
|
-
rabbit: "🐰",
|
|
3837
|
-
bear: "🐻",
|
|
3838
|
-
lion: "🦁",
|
|
3839
|
-
tiger: "🐯",
|
|
3840
|
-
monkey: "🐒",
|
|
3841
|
-
panda: "🐼",
|
|
3842
|
-
fox: "🦊",
|
|
3843
|
-
owl: "🦉",
|
|
3844
|
-
dolphin: "🐬",
|
|
3845
|
-
whale: "🐋",
|
|
3846
|
-
fish: "🐟",
|
|
3847
|
-
turtle: "🐢",
|
|
3848
|
-
snake: "🐍",
|
|
3849
|
-
spider: "🕷️",
|
|
3850
|
-
bee: "🐝",
|
|
3851
|
-
butterfly: "🦋",
|
|
3852
|
-
// Objects
|
|
3853
|
-
book: "📚",
|
|
3854
|
-
pencil: "✏️",
|
|
3855
|
-
scissors: "✂️",
|
|
3856
|
-
camera: "📷",
|
|
3857
|
-
phone: "📱",
|
|
3858
|
-
computer: "💻",
|
|
3859
|
-
key: "🔑",
|
|
3860
|
-
lock: "🔒",
|
|
3861
|
-
bell: "🔔",
|
|
3862
|
-
gift: "🎁",
|
|
3863
|
-
balloon: "🎈",
|
|
3864
|
-
crown: "👑",
|
|
3865
|
-
trophy: "🏆",
|
|
3866
|
-
medal: "🏅",
|
|
3867
|
-
flag: "🚩",
|
|
3868
|
-
umbrella: "☂️",
|
|
3869
|
-
bag: "👜",
|
|
3870
|
-
shoes: "👞",
|
|
3871
|
-
watch: "⌚",
|
|
3872
|
-
glasses: "👓",
|
|
3873
|
-
// Activities
|
|
3874
|
-
soccer: "⚽",
|
|
3875
|
-
basketball: "🏀",
|
|
3876
|
-
tennis: "🎾",
|
|
3877
|
-
golf: "⛳",
|
|
3878
|
-
swimming: "🏊",
|
|
3879
|
-
running: "🏃",
|
|
3880
|
-
dancing: "💃",
|
|
3881
|
-
singing: "🎤",
|
|
3882
|
-
music: "🎵",
|
|
3883
|
-
movie: "🎬",
|
|
3884
|
-
game: "🎮",
|
|
3885
|
-
puzzle: "🧩",
|
|
3886
|
-
art: "🎨",
|
|
3887
|
-
theater: "🎭",
|
|
3888
|
-
party: "🎉",
|
|
3889
|
-
travel: "✈️",
|
|
3890
|
-
camping: "⛺",
|
|
3891
|
-
fishing: "🎣",
|
|
3892
|
-
hiking: "🥾",
|
|
3893
|
-
yoga: "🧘"
|
|
3894
|
-
};
|
|
3895
|
-
function ke(e) {
|
|
3896
|
-
let t = "❓", o = !1;
|
|
3897
|
-
return e ? e in ie ? t = ie[e] : ye(e) ? t = e : dt(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
|
|
3898
|
-
icon: t,
|
|
3899
|
-
isRemoteImage: o
|
|
3900
|
-
};
|
|
3901
|
-
}
|
|
3902
|
-
const Ho = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23434343'%3e%3cpath%20d='M480-480Zm0%20400q-83%200-156-31.5T197-197q-54-54-85.5-127T80-480q0-83%2031.5-156T197-763q54-54%20127-85.5T480-880q43%200%2083%208.5t77%2024.5v90q-35-20-75.5-31.5T480-800q-133%200-226.5%2093.5T160-480q0%20133%2093.5%20226.5T480-160q133%200%20226.5-93.5T800-480q0-32-6.5-62T776-600h86q9%2029%2013.5%2058.5T880-480q0%2083-31.5%20156T763-197q-54%2054-127%2085.5T480-80Zm320-600v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM620-520q25%200%2042.5-17.5T680-580q0-25-17.5-42.5T620-640q-25%200-42.5%2017.5T560-580q0%2025%2017.5%2042.5T620-520Zm-280%200q25%200%2042.5-17.5T400-580q0-25-17.5-42.5T340-640q-25%200-42.5%2017.5T280-580q0%2025%2017.5%2042.5T340-520Zm140%20260q68%200%20123.5-38.5T684-400H276q25%2063%2080.5%20101.5T480-260Z'/%3e%3c/svg%3e";
|
|
3903
|
-
var Fo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ht = (e, t, o, r) => {
|
|
3927
|
+
`, Ho = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23434343'%3e%3cpath%20d='M480-480Zm0%20400q-83%200-156-31.5T197-197q-54-54-85.5-127T80-480q0-83%2031.5-156T197-763q54-54%20127-85.5T480-880q43%200%2083%208.5t77%2024.5v90q-35-20-75.5-31.5T480-800q-133%200-226.5%2093.5T160-480q0%20133%2093.5%20226.5T480-160q133%200%20226.5-93.5T800-480q0-32-6.5-62T776-600h86q9%2029%2013.5%2058.5T880-480q0%2083-31.5%20156T763-197q-54%2054-127%2085.5T480-80Zm320-600v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80ZM620-520q25%200%2042.5-17.5T680-580q0-25-17.5-42.5T620-640q-25%200-42.5%2017.5T560-580q0%2025%2017.5%2042.5T620-520Zm-280%200q25%200%2042.5-17.5T400-580q0-25-17.5-42.5T340-640q-25%200-42.5%2017.5T280-580q0%2025%2017.5%2042.5T340-520Zm140%20260q68%200%20123.5-38.5T684-400H276q25%2063%2080.5%20101.5T480-260Z'/%3e%3c/svg%3e";
|
|
3928
|
+
var Fo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
|
|
3904
3929
|
for (var s = r > 1 ? void 0 : r ? Yo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3905
3930
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3906
3931
|
return r && s && Fo(t, o, s), s;
|
|
@@ -3929,7 +3954,7 @@ let q = class extends m {
|
|
|
3929
3954
|
* Renders the icon for a reaction
|
|
3930
3955
|
*/
|
|
3931
3956
|
renderReactionIcon(e, t) {
|
|
3932
|
-
const { icon: o, isRemoteImage: r } =
|
|
3957
|
+
const { icon: o, isRemoteImage: r } = ct(e), s = It.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = $e(o, {
|
|
3933
3958
|
type: s,
|
|
3934
3959
|
alt: i,
|
|
3935
3960
|
ariaLabel: i,
|
|
@@ -4082,7 +4107,7 @@ let q = class extends m {
|
|
|
4082
4107
|
icon: (c == null ? void 0 : c.icon) || l
|
|
4083
4108
|
// Use the icon or fall back to reaction value
|
|
4084
4109
|
};
|
|
4085
|
-
}), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", n =
|
|
4110
|
+
}), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", n = Nt(o, {
|
|
4086
4111
|
barColor: a,
|
|
4087
4112
|
labelFormatter: (l) => `${l.label}`,
|
|
4088
4113
|
valueFormatter: (l) => `${e.totalCount > 0 ? Math.round(l.value / e.totalCount * 100) : 0}%`
|
|
@@ -4114,17 +4139,17 @@ let q = class extends m {
|
|
|
4114
4139
|
`;
|
|
4115
4140
|
}
|
|
4116
4141
|
};
|
|
4117
|
-
q.styles = [...m.styles,
|
|
4118
|
-
|
|
4142
|
+
q.styles = [...m.styles, ut, qo];
|
|
4143
|
+
ft([
|
|
4119
4144
|
f({ type: Boolean, attribute: "show-counts" })
|
|
4120
4145
|
], q.prototype, "showCounts", 2);
|
|
4121
|
-
|
|
4146
|
+
ft([
|
|
4122
4147
|
f({ type: Boolean, reflect: !0 })
|
|
4123
4148
|
], q.prototype, "compact", 2);
|
|
4124
|
-
|
|
4149
|
+
ft([
|
|
4125
4150
|
f({ type: String, attribute: "popup-position" })
|
|
4126
4151
|
], q.prototype, "popupPosition", 2);
|
|
4127
|
-
q =
|
|
4152
|
+
q = ft([
|
|
4128
4153
|
ot("pc-reaction")
|
|
4129
4154
|
], q);
|
|
4130
4155
|
function G(e, t, o = void 0) {
|
|
@@ -4135,7 +4160,7 @@ function Zo(e, t = void 0) {
|
|
|
4135
4160
|
const o = e.textContent;
|
|
4136
4161
|
return o === "" || o === null ? t : o == null ? void 0 : o.trim();
|
|
4137
4162
|
}
|
|
4138
|
-
var Go = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor,
|
|
4163
|
+
var Go = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, mt = (e, t, o, r) => {
|
|
4139
4164
|
for (var s = r > 1 ? void 0 : r ? Ko(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
4140
4165
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
4141
4166
|
return r && s && Go(t, o, s), s;
|
|
@@ -4210,7 +4235,7 @@ let H = class extends j {
|
|
|
4210
4235
|
t && t.length > 0 && (r = Array.from(t).map((s) => {
|
|
4211
4236
|
const i = G(s, "value", "") || "", a = G(s, "label", Zo(s, i)) || "", n = G(s, "icon", void 0), l = G(s, "tooltip", void 0), p = G(s, "disabled", void 0), c = { value: i, label: a };
|
|
4212
4237
|
if (n !== void 0) {
|
|
4213
|
-
const u =
|
|
4238
|
+
const u = ct(n);
|
|
4214
4239
|
c.icon = u.icon;
|
|
4215
4240
|
}
|
|
4216
4241
|
return l !== void 0 && (c.tooltip = l), p !== void 0 && (c.disabled = !0), c;
|
|
@@ -4236,16 +4261,16 @@ let H = class extends j {
|
|
|
4236
4261
|
}
|
|
4237
4262
|
}
|
|
4238
4263
|
};
|
|
4239
|
-
|
|
4264
|
+
mt([
|
|
4240
4265
|
f({ type: String })
|
|
4241
4266
|
], H.prototype, "type", 2);
|
|
4242
|
-
|
|
4267
|
+
mt([
|
|
4243
4268
|
f({ type: String })
|
|
4244
4269
|
], H.prototype, "options", 2);
|
|
4245
|
-
|
|
4246
|
-
|
|
4270
|
+
mt([
|
|
4271
|
+
Tt()
|
|
4247
4272
|
], H.prototype, "parsedOptions", 2);
|
|
4248
|
-
H =
|
|
4273
|
+
H = mt([
|
|
4249
4274
|
ot("poll-catch")
|
|
4250
4275
|
], H);
|
|
4251
4276
|
export {
|