pollcatch 2.1.1 → 2.1.2
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 +84 -78
package/package.json
CHANGED
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,
|
|
6
|
+
const it = globalThis, At = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Lt = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let ae = class {
|
|
8
8
|
constructor(t, o, r) {
|
|
9
|
-
if (this._$cssResult$ = !0, r !==
|
|
9
|
+
if (this._$cssResult$ = !0, r !== _t) 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 (At && 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 ae = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const ke = (e) => new ae(typeof e == "string" ? e : e + "", void 0,
|
|
25
|
+
const ke = (e) => new ae(typeof e == "string" ? e : e + "", void 0, _t), 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 ae(o, e,
|
|
31
|
+
return new ae(o, e, _t);
|
|
32
32
|
}, Ae = (e, t) => {
|
|
33
|
-
if (
|
|
33
|
+
if (At) 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
|
-
}, Rt =
|
|
38
|
+
}, Rt = At ? (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 ke(o);
|
|
@@ -45,7 +45,7 @@ const ke = (e) => new ae(typeof e == "string" ? e : e + "", void 0, At), F = (e,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Oe, getOwnPropertySymbols: Te, getPrototypeOf: ze } = Object, O = globalThis, Ut = O.trustedTypes, Ie = Ut ? Ut.emptyScript : "",
|
|
48
|
+
const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Oe, getOwnPropertySymbols: Te, getPrototypeOf: ze } = Object, O = globalThis, Ut = O.trustedTypes, Ie = Ut ? Ut.emptyScript : "", mt = O.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
e = e ? Ie : null;
|
|
@@ -73,7 +73,7 @@ const { is: _e, defineProperty: Ee, getOwnPropertyDescriptor: Pe, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
|
-
} },
|
|
76
|
+
} }, Et = (e, t) => !_e(e, t), jt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Et };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), O.litPropertyMetadata ?? (O.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let U = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -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 ?? Et)(this[t], o)) return;
|
|
204
204
|
this.P(t, o, r);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -273,17 +273,17 @@ 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(), mt == null || mt({ ReactiveElement: U }), (O.reactiveElementVersions ?? (O.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, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ne = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, le = "?" + E, Ne = `<${le}>`, M = document, X = () => M.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function",
|
|
283
|
-
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g, I = RegExp(`>|${
|
|
282
|
+
const W = globalThis, nt = W.trustedTypes, Bt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ne = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, le = "?" + E, Ne = `<${le}>`, M = document, X = () => M.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Pt = Array.isArray, Me = (e) => Pt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
|
|
283
|
+
\f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Vt = />/g, I = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
284
284
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), qt = /'/g, Ht = /"/g, ce = /^(?:script|style|textarea|title)$/i, Le = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Le(1), T = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), N = M.createTreeWalker(M, 129);
|
|
285
285
|
function de(e, t) {
|
|
286
|
-
if (!
|
|
286
|
+
if (!Pt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return Bt !== void 0 ? Bt.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
289
|
const Re = (e, t) => {
|
|
@@ -298,7 +298,7 @@ const Re = (e, t) => {
|
|
|
298
298
|
}
|
|
299
299
|
return [de(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
300
300
|
};
|
|
301
|
-
let
|
|
301
|
+
let kt = class pe {
|
|
302
302
|
constructor({ strings: t, _$litType$: o }, r) {
|
|
303
303
|
let s;
|
|
304
304
|
this.parts = [];
|
|
@@ -403,7 +403,7 @@ class et {
|
|
|
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 = kt.createElement(de(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 Ue(s, this), n = a.u(this.options);
|
|
@@ -412,10 +412,10 @@ class et {
|
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
414
|
let o = Ft.get(t.strings);
|
|
415
|
-
return o === void 0 && Ft.set(t.strings, o = new
|
|
415
|
+
return o === void 0 && Ft.set(t.strings, o = new kt(t)), o;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
|
-
|
|
418
|
+
Pt(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++;
|
|
@@ -499,8 +499,8 @@ class Ve {
|
|
|
499
499
|
D(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
502
|
+
const gt = W.litHtmlPolyfillSupport;
|
|
503
|
+
gt == null || gt(kt, et), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.2.1");
|
|
504
504
|
const qe = (e, t, o) => {
|
|
505
505
|
const r = (o == null ? void 0 : o.renderBefore) ?? t;
|
|
506
506
|
let s = r._$litPart$;
|
|
@@ -542,8 +542,8 @@ let j = class extends U {
|
|
|
542
542
|
};
|
|
543
543
|
var ie;
|
|
544
544
|
j._$litElement$ = !0, j.finalized = !0, (ie = globalThis.litElementHydrateSupport) == null || ie.call(globalThis, { LitElement: j });
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const vt = globalThis.litElementPolyfillSupport;
|
|
546
|
+
vt == null || vt({ 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 He = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged:
|
|
563
|
+
const He = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Et }, Fe = (e = He, 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 Ot(e) {
|
|
596
596
|
return f({ ...e, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
var x = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))(x || {});
|
|
@@ -607,7 +607,7 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
607
607
|
return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
|
|
608
608
|
}, Yt = 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
|
+
}, yt = function(e) {
|
|
611
611
|
return { r: y(e.r), g: y(e.g), b: y(e.b), a: y(e.a, 3) };
|
|
612
612
|
}, Je = /^#([0-9a-f]{3,8})$/i, rt = function(e) {
|
|
613
613
|
var t = e.toString(16);
|
|
@@ -664,10 +664,10 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
664
664
|
return [null, void 0];
|
|
665
665
|
}, oo = function(e) {
|
|
666
666
|
return typeof e == "string" ? Jt(e.trim(), Wt.string) : typeof e == "object" && e !== null ? Jt(e, Wt.object) : [null, void 0];
|
|
667
|
-
},
|
|
667
|
+
}, wt = 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
|
+
}, $t = function(e) {
|
|
671
671
|
return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
|
|
672
672
|
}, Xt = function(e, t) {
|
|
673
673
|
var o = J(e);
|
|
@@ -679,18 +679,18 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
679
679
|
return e.prototype.isValid = function() {
|
|
680
680
|
return this.parsed !== null;
|
|
681
681
|
}, e.prototype.brightness = function() {
|
|
682
|
-
return y(
|
|
682
|
+
return y($t(this.rgba), 2);
|
|
683
683
|
}, e.prototype.isDark = function() {
|
|
684
|
-
return
|
|
684
|
+
return $t(this.rgba) < 0.5;
|
|
685
685
|
}, e.prototype.isLight = function() {
|
|
686
|
-
return
|
|
686
|
+
return $t(this.rgba) >= 0.5;
|
|
687
687
|
}, e.prototype.toHex = function() {
|
|
688
|
-
return t =
|
|
688
|
+
return t = yt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? rt(y(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 yt(this.rgba);
|
|
692
692
|
}, e.prototype.toRgbString = function() {
|
|
693
|
-
return t =
|
|
693
|
+
return t = yt(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
696
|
return Gt(J(this.rgba));
|
|
@@ -704,11 +704,11 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
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(wt(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(wt(this.rgba, -t));
|
|
710
710
|
}, e.prototype.grayscale = function() {
|
|
711
|
-
return C(
|
|
711
|
+
return C(wt(this.rgba, -1));
|
|
712
712
|
}, e.prototype.lighten = function(t) {
|
|
713
713
|
return t === void 0 && (t = 0.1), C(Xt(this.rgba, t));
|
|
714
714
|
}, e.prototype.darken = function(t) {
|
|
@@ -727,17 +727,17 @@ var We = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
|
|
|
727
727
|
}(), C = function(e) {
|
|
728
728
|
return e instanceof Qt ? e : new Qt(e);
|
|
729
729
|
};
|
|
730
|
-
const
|
|
730
|
+
const xt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
731
731
|
function ro(e) {
|
|
732
732
|
return {
|
|
733
733
|
debug: (t, ...o) => {
|
|
734
|
-
|
|
734
|
+
xt && console.debug(`[${e}]`, t, ...o);
|
|
735
735
|
},
|
|
736
736
|
info: (t, ...o) => {
|
|
737
|
-
|
|
737
|
+
xt && console.info(`[${e}]`, t, ...o);
|
|
738
738
|
},
|
|
739
739
|
warn: (t, ...o) => {
|
|
740
|
-
|
|
740
|
+
xt && console.warn(`[${e}]`, t, ...o);
|
|
741
741
|
},
|
|
742
742
|
error: (t, ...o) => {
|
|
743
743
|
console.error(`[${e}]`, t, ...o);
|
|
@@ -767,7 +767,7 @@ function io(e) {
|
|
|
767
767
|
const t = e.toLowerCase().trim();
|
|
768
768
|
return so[t] || null;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function St(e, t) {
|
|
771
771
|
const o = te(e), r = te(t), s = Math.max(o, r), i = Math.min(o, r);
|
|
772
772
|
return (s + 0.05) / (i + 0.05);
|
|
773
773
|
}
|
|
@@ -789,15 +789,15 @@ function ao(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 h =
|
|
792
|
+
const h = St(e, c);
|
|
793
793
|
h >= r && h > p && (p = h, l = c);
|
|
794
794
|
}
|
|
795
795
|
if (p === 0) {
|
|
796
|
-
const c =
|
|
796
|
+
const c = St(e, a);
|
|
797
797
|
l = a, p = c;
|
|
798
798
|
for (const h of n) {
|
|
799
799
|
if (h === a) continue;
|
|
800
|
-
const w =
|
|
800
|
+
const w = St(e, h);
|
|
801
801
|
w > p && (p = w, l = h);
|
|
802
802
|
}
|
|
803
803
|
b.warn(
|
|
@@ -891,7 +891,7 @@ function uo(e, t, o, r = !1) {
|
|
|
891
891
|
ariaDisabled: o
|
|
892
892
|
});
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function Ct(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) {
|
|
@@ -916,7 +916,7 @@ function oe() {
|
|
|
916
916
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
917
917
|
}));
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Tt() {
|
|
920
920
|
const e = "test-local-storage";
|
|
921
921
|
try {
|
|
922
922
|
return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
|
|
@@ -955,7 +955,7 @@ async function go() {
|
|
|
955
955
|
}
|
|
956
956
|
async function re() {
|
|
957
957
|
const e = mo, t = bo;
|
|
958
|
-
if (
|
|
958
|
+
if (Tt()) {
|
|
959
959
|
const o = be(e);
|
|
960
960
|
if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
|
|
961
961
|
return b.debug("Using existing session ID from localStorage"), o.id;
|
|
@@ -997,7 +997,7 @@ function P() {
|
|
|
997
997
|
};
|
|
998
998
|
}
|
|
999
999
|
function vo(e) {
|
|
1000
|
-
if (!
|
|
1000
|
+
if (!Tt())
|
|
1001
1001
|
return P();
|
|
1002
1002
|
try {
|
|
1003
1003
|
const t = be(e);
|
|
@@ -1007,7 +1007,7 @@ function vo(e) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
1009
|
function yo(e, t) {
|
|
1010
|
-
if (!
|
|
1010
|
+
if (!Tt())
|
|
1011
1011
|
return !1;
|
|
1012
1012
|
try {
|
|
1013
1013
|
return ge(e, t) ? (b.debug("Saved localStats to localStorage", t), !0) : !1;
|
|
@@ -1054,7 +1054,7 @@ function $o(e, t) {
|
|
|
1054
1054
|
function ve(e) {
|
|
1055
1055
|
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);
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function dt(e) {
|
|
1058
1058
|
if (!e || typeof e != "string")
|
|
1059
1059
|
return !1;
|
|
1060
1060
|
const t = e.trim();
|
|
@@ -1243,7 +1243,13 @@ class Ao {
|
|
|
1243
1243
|
return l;
|
|
1244
1244
|
}
|
|
1245
1245
|
async sendStats(t) {
|
|
1246
|
-
const o = JSON.stringify(t),
|
|
1246
|
+
const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || ee;
|
|
1247
|
+
if (r.dataFunc) {
|
|
1248
|
+
b.debug("Skip sending stats as data function is in use.");
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
if (!dt(s))
|
|
1252
|
+
throw b.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
|
|
1247
1253
|
try {
|
|
1248
1254
|
if (b.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
|
|
1249
1255
|
if (navigator.sendBeacon(s, o)) {
|
|
@@ -1461,7 +1467,7 @@ function ye(e, t = {}) {
|
|
|
1461
1467
|
o === "functional" && !r && !s && console.warn(
|
|
1462
1468
|
"No alt text or aria-label provided for functional icon. This may cause accessibility issues."
|
|
1463
1469
|
);
|
|
1464
|
-
const a = i ? " (selected)" : "", n =
|
|
1470
|
+
const a = i ? " (selected)" : "", n = dt(e) && !r ? "" : r || e, l = s || (n ? `${n}${a}` : a);
|
|
1465
1471
|
return {
|
|
1466
1472
|
alt: n,
|
|
1467
1473
|
ariaLabel: l,
|
|
@@ -1621,7 +1627,7 @@ const st = {
|
|
|
1621
1627
|
* Update ARIA attributes for accessibility
|
|
1622
1628
|
*/
|
|
1623
1629
|
updateAriaAttributes() {
|
|
1624
|
-
this.ariaLabel &&
|
|
1630
|
+
this.ariaLabel && Ct(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Ct(this, "aria-describedby", this.ariaDescribedby), Ct(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
|
|
1625
1631
|
}
|
|
1626
1632
|
/**
|
|
1627
1633
|
* Update host CSS classes based on state
|
|
@@ -2079,7 +2085,7 @@ const To = F`
|
|
|
2079
2085
|
}
|
|
2080
2086
|
|
|
2081
2087
|
/* Removed unused responsive styles for action buttons */
|
|
2082
|
-
`,
|
|
2088
|
+
`, pt = F`
|
|
2083
2089
|
/* Default values for CSS variables - can be overridden by external :root or parent definitions */
|
|
2084
2090
|
:host {
|
|
2085
2091
|
--default-primary-color: #2196f3;
|
|
@@ -2721,7 +2727,7 @@ let z = class extends m {
|
|
|
2721
2727
|
`;
|
|
2722
2728
|
}
|
|
2723
2729
|
};
|
|
2724
|
-
z.styles = [...m.styles,
|
|
2730
|
+
z.styles = [...m.styles, pt, To];
|
|
2725
2731
|
Y([
|
|
2726
2732
|
f({ type: String, attribute: "min-label" })
|
|
2727
2733
|
], z.prototype, "minLabel", 2);
|
|
@@ -2735,7 +2741,7 @@ Y([
|
|
|
2735
2741
|
f({ type: String, attribute: "min-max-position" })
|
|
2736
2742
|
], z.prototype, "minMaxPosition", 2);
|
|
2737
2743
|
Y([
|
|
2738
|
-
|
|
2744
|
+
Ot()
|
|
2739
2745
|
], z.prototype, "hoverValue", 2);
|
|
2740
2746
|
z = Y([
|
|
2741
2747
|
ot("pc-nps")
|
|
@@ -3069,7 +3075,7 @@ let tt = class extends m {
|
|
|
3069
3075
|
class="poll-option-icon"
|
|
3070
3076
|
aria-hidden="${s.ariaHidden ? "true" : "false"}"
|
|
3071
3077
|
>${e == null ? void 0 : e.icon}</span
|
|
3072
|
-
>` :
|
|
3078
|
+
>` : dt(e == null ? void 0 : e.icon) ? d`<img
|
|
3073
3079
|
src="${e == null ? void 0 : e.icon}"
|
|
3074
3080
|
alt="${s.alt}"
|
|
3075
3081
|
class="poll-option-icon-img"
|
|
@@ -3265,7 +3271,7 @@ let tt = class extends m {
|
|
|
3265
3271
|
`;
|
|
3266
3272
|
}
|
|
3267
3273
|
};
|
|
3268
|
-
tt.styles = [...m.styles,
|
|
3274
|
+
tt.styles = [...m.styles, pt, No];
|
|
3269
3275
|
Nt([
|
|
3270
3276
|
f({ type: Boolean })
|
|
3271
3277
|
], tt.prototype, "multiple", 2);
|
|
@@ -3383,7 +3389,7 @@ const Se = "important", Uo = " !" + Se, jo = $e(class extends xe {
|
|
|
3383
3389
|
return T;
|
|
3384
3390
|
}
|
|
3385
3391
|
});
|
|
3386
|
-
var Bo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor,
|
|
3392
|
+
var Bo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, ut = (e, t, o, r) => {
|
|
3387
3393
|
for (var s = r > 1 ? void 0 : r ? Do(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3388
3394
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3389
3395
|
return r && s && Bo(t, o, s), s;
|
|
@@ -3485,17 +3491,17 @@ let V = class extends m {
|
|
|
3485
3491
|
`;
|
|
3486
3492
|
}
|
|
3487
3493
|
};
|
|
3488
|
-
V.styles = [...m.styles,
|
|
3489
|
-
|
|
3494
|
+
V.styles = [...m.styles, pt, Ro];
|
|
3495
|
+
ut([
|
|
3490
3496
|
f({ type: String })
|
|
3491
3497
|
], V.prototype, "icon", 2);
|
|
3492
|
-
|
|
3498
|
+
ut([
|
|
3493
3499
|
f({ type: Number, attribute: "num-stars" })
|
|
3494
3500
|
], V.prototype, "numStars", 2);
|
|
3495
|
-
|
|
3496
|
-
|
|
3501
|
+
ut([
|
|
3502
|
+
Ot()
|
|
3497
3503
|
], V.prototype, "hoverValue", 2);
|
|
3498
|
-
V =
|
|
3504
|
+
V = ut([
|
|
3499
3505
|
ot("pc-stars")
|
|
3500
3506
|
], V);
|
|
3501
3507
|
const Vo = F`
|
|
@@ -3836,13 +3842,13 @@ const Vo = F`
|
|
|
3836
3842
|
};
|
|
3837
3843
|
function Ce(e) {
|
|
3838
3844
|
let t = "❓", o = !1;
|
|
3839
|
-
return e ? e in se ? t = se[e] : ve(e) ? t = e :
|
|
3845
|
+
return e ? e in se ? t = se[e] : ve(e) ? t = e : dt(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
|
|
3840
3846
|
icon: t,
|
|
3841
3847
|
isRemoteImage: o
|
|
3842
3848
|
};
|
|
3843
3849
|
}
|
|
3844
3850
|
const qo = "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";
|
|
3845
|
-
var Ho = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor,
|
|
3851
|
+
var Ho = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, ht = (e, t, o, r) => {
|
|
3846
3852
|
for (var s = r > 1 ? void 0 : r ? Fo(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3847
3853
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3848
3854
|
return r && s && Ho(t, o, s), s;
|
|
@@ -4057,17 +4063,17 @@ let q = class extends m {
|
|
|
4057
4063
|
`;
|
|
4058
4064
|
}
|
|
4059
4065
|
};
|
|
4060
|
-
q.styles = [...m.styles,
|
|
4061
|
-
|
|
4066
|
+
q.styles = [...m.styles, pt, Vo];
|
|
4067
|
+
ht([
|
|
4062
4068
|
f({ type: Boolean, attribute: "show-counts" })
|
|
4063
4069
|
], q.prototype, "showCounts", 2);
|
|
4064
|
-
|
|
4070
|
+
ht([
|
|
4065
4071
|
f({ type: Boolean, reflect: !0 })
|
|
4066
4072
|
], q.prototype, "compact", 2);
|
|
4067
|
-
|
|
4073
|
+
ht([
|
|
4068
4074
|
f({ type: String, attribute: "popup-position" })
|
|
4069
4075
|
], q.prototype, "popupPosition", 2);
|
|
4070
|
-
q =
|
|
4076
|
+
q = ht([
|
|
4071
4077
|
ot("pc-reaction")
|
|
4072
4078
|
], q);
|
|
4073
4079
|
function G(e, t, o = void 0) {
|
|
@@ -4078,7 +4084,7 @@ function Yo(e, t = void 0) {
|
|
|
4078
4084
|
const o = e.textContent;
|
|
4079
4085
|
return o === "" || o === null ? t : o == null ? void 0 : o.trim();
|
|
4080
4086
|
}
|
|
4081
|
-
var Zo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor,
|
|
4087
|
+
var Zo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
|
|
4082
4088
|
for (var s = r > 1 ? void 0 : r ? Go(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
4083
4089
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
4084
4090
|
return r && s && Zo(t, o, s), s;
|
|
@@ -4179,16 +4185,16 @@ let H = class extends j {
|
|
|
4179
4185
|
}
|
|
4180
4186
|
}
|
|
4181
4187
|
};
|
|
4182
|
-
|
|
4188
|
+
ft([
|
|
4183
4189
|
f({ type: String })
|
|
4184
4190
|
], H.prototype, "type", 2);
|
|
4185
|
-
|
|
4191
|
+
ft([
|
|
4186
4192
|
f({ type: String })
|
|
4187
4193
|
], H.prototype, "options", 2);
|
|
4188
|
-
|
|
4189
|
-
|
|
4194
|
+
ft([
|
|
4195
|
+
Ot()
|
|
4190
4196
|
], H.prototype, "parsedOptions", 2);
|
|
4191
|
-
H =
|
|
4197
|
+
H = ft([
|
|
4192
4198
|
ot("poll-catch")
|
|
4193
4199
|
], H);
|
|
4194
4200
|
export {
|