pollcatch 2.2.4 → 2.2.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pc.js +94 -83
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pollcatch",
3
3
  "private": false,
4
- "version": "2.2.4",
4
+ "version": "2.2.5",
5
5
  "type": "module",
6
6
  "main": "pc.js",
7
7
  "module": "pc.js",
package/pc.js CHANGED
@@ -3,18 +3,18 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const it = globalThis, _t = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Et = Symbol(), Rt = /* @__PURE__ */ new WeakMap();
6
+ const it = globalThis, Et = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Pt = Symbol(), jt = /* @__PURE__ */ new WeakMap();
7
7
  let le = class {
8
8
  constructor(t, o, r) {
9
- if (this._$cssResult$ = !0, r !== Et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, r !== Pt) 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 (_t && t === void 0) {
15
+ if (Et && t === void 0) {
16
16
  const r = o !== void 0 && o.length === 1;
17
- r && (t = Rt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Rt.set(o, t));
17
+ r && (t = jt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && jt.set(o, t));
18
18
  }
19
19
  return t;
20
20
  }
@@ -22,20 +22,20 @@ let le = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Ae = (e) => new le(typeof e == "string" ? e : e + "", void 0, Et), F = (e, ...t) => {
25
+ const Ae = (e) => new le(typeof e == "string" ? e : e + "", void 0, Pt), 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 le(o, e, Et);
31
+ return new le(o, e, Pt);
32
32
  }, _e = (e, t) => {
33
- if (_t) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
33
+ if (Et) 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
- }, jt = _t ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
38
+ }, Ut = Et ? (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 le(typeof e == "string" ? e : e + "", void 0, Et), 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, Ut = T.trustedTypes, Ne = Ut ? Ut.emptyScript : "", bt = T.reactiveElementPolyfillSupport, K = (e, t) => e, at = { toAttribute(e, t) {
48
+ const { is: Ee, defineProperty: Pe, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Te, getOwnPropertySymbols: ze, getPrototypeOf: Ie } = Object, T = globalThis, Bt = T.trustedTypes, Ne = Bt ? Bt.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
- } }, Pt = (e, t) => !Ee(e, t), Bt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Pt };
76
+ } }, Ot = (e, t) => !Ee(e, t), Dt = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Ot };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), T.litPropertyMetadata ?? (T.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  let j = class extends HTMLElement {
79
79
  static addInitializer(t) {
@@ -82,7 +82,7 @@ let j = 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 = Bt) {
85
+ static createProperty(t, o = Dt) {
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 j = class extends HTMLElement {
102
102
  }, configurable: !0, enumerable: !0 };
103
103
  }
104
104
  static getPropertyOptions(t) {
105
- return this.elementProperties.get(t) ?? Bt;
105
+ return this.elementProperties.get(t) ?? Dt;
106
106
  }
107
107
  static _$Ei() {
108
108
  if (this.hasOwnProperty(K("elementProperties"))) return;
@@ -131,8 +131,8 @@ let j = 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(jt(s));
135
- } else t !== void 0 && o.push(jt(t));
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 j = 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 ?? Pt)(this[t], o)) return;
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Ot)(this[t], o)) return;
204
204
  this.P(t, o, r);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -279,12 +279,12 @@ j.elementStyles = [], j.shadowRootOptions = { mode: "open" }, j[K("elementProper
279
279
  * Copyright 2017 Google LLC
280
280
  * SPDX-License-Identifier: BSD-3-Clause
281
281
  */
282
- const W = globalThis, nt = W.trustedTypes, Dt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ce = "$lit$", O = `lit$${Math.random().toFixed(9).slice(2)}$`, de = "?" + O, Me = `<${de}>`, L = document, X = () => L.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Ot = Array.isArray, Le = (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, Re = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Re(1), z = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), Yt = /* @__PURE__ */ new WeakMap(), M = L.createTreeWalker(L, 129);
282
+ const W = globalThis, nt = W.trustedTypes, Vt = nt ? nt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ce = "$lit$", O = `lit$${Math.random().toFixed(9).slice(2)}$`, de = "?" + O, Me = `<${de}>`, L = document, X = () => L.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", Tt = Array.isArray, Le = (e) => Tt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", gt = `[
283
+ \f\r]`, Z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qt = /-->/g, Ht = />/g, N = RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ft = /'/g, Yt = /"/g, pe = /^(?:script|style|textarea|title)$/i, Re = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), d = Re(1), z = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), Zt = /* @__PURE__ */ new WeakMap(), M = L.createTreeWalker(L, 129);
285
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;
286
+ if (!Tt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
+ return Vt !== void 0 ? Vt.createHTML(t) : t;
288
288
  }
289
289
  const je = (e, t) => {
290
290
  const o = e.length - 1, r = [];
@@ -292,13 +292,13 @@ const je = (e, t) => {
292
292
  for (let n = 0; n < o; n++) {
293
293
  const l = e[n];
294
294
  let p, c, u = -1, v = 0;
295
- for (; v < l.length && (a.lastIndex = v, c = a.exec(l), c !== null); ) v = 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);
295
+ for (; v < l.length && (a.lastIndex = v, c = a.exec(l), c !== null); ) v = a.lastIndex, a === Z ? c[1] === "!--" ? a = qt : c[1] !== void 0 ? a = Ht : 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] === '"' ? Yt : Ft) : a === Yt || a === Ft ? a = N : a === qt || a === Ht ? a = Z : (a = N, s = void 0);
296
296
  const y = a === N && e[n + 1].startsWith("/>") ? " " : "";
297
297
  i += a === Z ? l + Me : u >= 0 ? (r.push(p), l.slice(0, u) + ce + l.slice(u) + O + y) : l + O + (u === -2 ? n : y);
298
298
  }
299
299
  return [ue(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
301
- let At = class he {
301
+ let _t = class he {
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 = At.createElement(ue(r.h, r.h[0]), this.options)), r);
406
+ const { values: o, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = _t.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 Ue(s, this), n = a.u(this.options);
@@ -411,11 +411,11 @@ class et {
411
411
  }
412
412
  }
413
413
  _$AC(t) {
414
- let o = Yt.get(t.strings);
415
- return o === void 0 && Yt.set(t.strings, o = new At(t)), o;
414
+ let o = Zt.get(t.strings);
415
+ return o === void 0 && Zt.set(t.strings, o = new _t(t)), o;
416
416
  }
417
417
  k(t) {
418
- Ot(this._$AH) || (this._$AH = [], this._$AR());
418
+ Tt(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++;
@@ -500,7 +500,7 @@ class qe {
500
500
  }
501
501
  }
502
502
  const vt = W.litHtmlPolyfillSupport;
503
- vt == null || vt(At, et), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.2.1");
503
+ vt == null || vt(_t, 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$;
@@ -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: Pt }, Ye = (e = Fe, t, o) => {
563
+ const Fe = { attribute: !0, type: String, converter: at, reflect: !1, hasChanged: Ot }, 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 Tt(e) {
595
+ function zt(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 || {});
@@ -651,7 +651,7 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
651
651
  return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
652
652
  }, fe = function(e) {
653
653
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
654
- }, Zt = function(e) {
654
+ }, Gt = function(e) {
655
655
  return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
656
656
  }, wt = function(e) {
657
657
  return { r: $(e.r), g: $(e.g), b: $(e.b), a: $(e.a, 3) };
@@ -666,35 +666,35 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
666
666
  t = t / 360 * 6, o /= 100, r /= 100;
667
667
  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;
668
668
  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 };
669
- }, Gt = function(e) {
670
- return { h: fe(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
671
669
  }, Kt = function(e) {
672
- return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
670
+ return { h: fe(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
673
671
  }, Wt = function(e) {
672
+ return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
673
+ }, Jt = function(e) {
674
674
  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 }));
675
675
  var t, o, r;
676
676
  }, J = function(e) {
677
677
  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 };
678
678
  var t, o, r, s;
679
- }, 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) {
679
+ }, 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, Xt = { string: [[function(e) {
680
680
  var t = Xe.exec(e);
681
681
  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 ? $(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 ? $(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
682
682
  }, "hex"], [function(e) {
683
683
  var t = eo.exec(e) || oo.exec(e);
684
- 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;
684
+ return t ? t[2] !== t[4] || t[4] !== t[6] ? null : Gt({ 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;
685
685
  }, "rgb"], [function(e) {
686
686
  var t = Qe.exec(e) || to.exec(e);
687
687
  if (!t) return null;
688
- 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) });
689
- return Wt(s);
688
+ var o, r, s = Kt({ 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) });
689
+ return Jt(s);
690
690
  }, "hsl"]], object: [[function(e) {
691
691
  var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
692
- return A(t) && A(o) && A(r) ? Zt({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
692
+ return A(t) && A(o) && A(r) ? Gt({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
693
693
  }, "rgb"], [function(e) {
694
694
  var t = e.h, o = e.s, r = e.l, s = e.a, i = s === void 0 ? 1 : s;
695
695
  if (!A(t) || !A(o) || !A(r)) return null;
696
- var a = Gt({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
697
- return Wt(a);
696
+ var a = Kt({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
697
+ return Jt(a);
698
698
  }, "hsl"], [function(e) {
699
699
  var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
700
700
  if (!A(t) || !A(o) || !A(r)) return null;
@@ -702,23 +702,23 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
702
702
  return { h: fe(n.h), s: S(n.s, 0, 100), v: S(n.v, 0, 100), a: S(n.a) };
703
703
  }({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
704
704
  return be(a);
705
- }, "hsv"]] }, Xt = function(e, t) {
705
+ }, "hsv"]] }, Qt = function(e, t) {
706
706
  for (var o = 0; o < t.length; o++) {
707
707
  var r = t[o][0](e);
708
708
  if (r) return [r, t[o][1]];
709
709
  }
710
710
  return [null, void 0];
711
711
  }, ro = function(e) {
712
- return typeof e == "string" ? Xt(e.trim(), Jt.string) : typeof e == "object" && e !== null ? Xt(e, Jt.object) : [null, void 0];
712
+ return typeof e == "string" ? Qt(e.trim(), Xt.string) : typeof e == "object" && e !== null ? Qt(e, Xt.object) : [null, void 0];
713
713
  }, $t = function(e, t) {
714
714
  var o = J(e);
715
715
  return { h: o.h, s: S(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
716
716
  }, xt = function(e) {
717
717
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
718
- }, Qt = function(e, t) {
718
+ }, te = function(e, t) {
719
719
  var o = J(e);
720
720
  return { h: o.h, s: o.s, l: S(o.l + 100 * t, 0, 100), a: o.a };
721
- }, te = function() {
721
+ }, ee = function() {
722
722
  function e(t) {
723
723
  this.parsed = ro(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
724
724
  }
@@ -739,9 +739,9 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
739
739
  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 + ")";
740
740
  var t, o, r, s, i;
741
741
  }, e.prototype.toHsl = function() {
742
- return Kt(J(this.rgba));
742
+ return Wt(J(this.rgba));
743
743
  }, e.prototype.toHslString = function() {
744
- 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 + "%)";
744
+ return t = Wt(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 + "%)";
745
745
  var t, o, r, s, i;
746
746
  }, e.prototype.toHsv = function() {
747
747
  return t = me(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
@@ -756,9 +756,9 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
756
756
  }, e.prototype.grayscale = function() {
757
757
  return C($t(this.rgba, -1));
758
758
  }, e.prototype.lighten = function(t) {
759
- return t === void 0 && (t = 0.1), C(Qt(this.rgba, t));
759
+ return t === void 0 && (t = 0.1), C(te(this.rgba, t));
760
760
  }, e.prototype.darken = function(t) {
761
- return t === void 0 && (t = 0.1), C(Qt(this.rgba, -t));
761
+ return t === void 0 && (t = 0.1), C(te(this.rgba, -t));
762
762
  }, e.prototype.rotate = function(t) {
763
763
  return t === void 0 && (t = 15), this.hue(this.hue() + t);
764
764
  }, e.prototype.alpha = function(t) {
@@ -771,7 +771,7 @@ var Je = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
771
771
  return this.toHex() === C(t).toHex();
772
772
  }, e;
773
773
  }(), C = function(e) {
774
- return e instanceof te ? e : new te(e);
774
+ return e instanceof ee ? e : new ee(e);
775
775
  };
776
776
  const St = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
777
777
  function so(e) {
@@ -814,10 +814,10 @@ function ao(e) {
814
814
  return io[t] || null;
815
815
  }
816
816
  function Ct(e, t) {
817
- const o = ee(e), r = ee(t), s = Math.max(o, r), i = Math.min(o, r);
817
+ const o = oe(e), r = oe(t), s = Math.max(o, r), i = Math.min(o, r);
818
818
  return (s + 0.05) / (i + 0.05);
819
819
  }
820
- function ee(e) {
820
+ function oe(e) {
821
821
  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);
822
822
  return 0.2126 * i + 0.7152 * a + 0.0722 * n;
823
823
  }
@@ -871,17 +871,17 @@ function k(e, t) {
871
871
  }[t] : void 0;
872
872
  return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
873
873
  }
874
- function oe(e, t = "1rem", o = 1) {
874
+ function kt(e, t = "1rem", o = 1) {
875
875
  if (!e) return t;
876
876
  const r = {
877
- xs: 0.75,
878
- sm: 0.875,
877
+ xs: 0.7,
878
+ sm: 0.8,
879
879
  md: 1,
880
- lg: 1.25,
880
+ lg: 1.2,
881
881
  xl: 1.5
882
882
  }, s = e.toLowerCase().trim();
883
883
  if (r[s] !== void 0)
884
- return `${r[s] * o}rem`;
884
+ return `${r[s] * o}em`;
885
885
  const i = e.trim().replace(/\s+/g, " ");
886
886
  if (/\d+(\.\d+)?\s*(px|em|rem|%|vh|vw|pt|pc|in|cm|mm|ex|ch|vmin|vmax)$/i.test(
887
887
  i
@@ -937,7 +937,7 @@ function uo(e, t, o, r = !1) {
937
937
  ariaDisabled: o
938
938
  });
939
939
  }
940
- function kt(e, t, o) {
940
+ function At(e, t, o) {
941
941
  typeof o == "boolean" ? e.setAttribute(t, o ? "true" : "false") : e.setAttribute(t, o);
942
942
  }
943
943
  function ho(e) {
@@ -968,7 +968,7 @@ function se() {
968
968
  return (e === "x" ? t : t & 3 | 8).toString(16);
969
969
  }));
970
970
  }
971
- function zt() {
971
+ function It() {
972
972
  const e = "test-local-storage";
973
973
  try {
974
974
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
@@ -1007,7 +1007,7 @@ async function vo() {
1007
1007
  }
1008
1008
  async function ie() {
1009
1009
  const e = bo, t = go;
1010
- if (zt()) {
1010
+ if (It()) {
1011
1011
  const o = ve(e);
1012
1012
  if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
1013
1013
  return b.debug("Using existing session ID from localStorage"), o.id;
@@ -1049,7 +1049,7 @@ function E() {
1049
1049
  };
1050
1050
  }
1051
1051
  function yo(e) {
1052
- if (!zt())
1052
+ if (!It())
1053
1053
  return E();
1054
1054
  try {
1055
1055
  const t = ve(e);
@@ -1059,7 +1059,7 @@ function yo(e) {
1059
1059
  }
1060
1060
  }
1061
1061
  function wo(e, t) {
1062
- if (!zt())
1062
+ if (!It())
1063
1063
  return !1;
1064
1064
  try {
1065
1065
  return ye(e, t) ? (b.debug("Saved localStats to localStorage", t), !0) : !1;
@@ -1546,7 +1546,7 @@ class Eo {
1546
1546
  return !(t.readOnly || !this.isEditing || t.lockAnswer && this.dataController.hasSubmittedStats());
1547
1547
  }
1548
1548
  }
1549
- var It = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(It || {});
1549
+ var Nt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Nt || {});
1550
1550
  function $e(e, t = {}) {
1551
1551
  const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
1552
1552
  if (!e)
@@ -1632,7 +1632,7 @@ const st = {
1632
1632
  mobile: "480px",
1633
1633
  tablet: "768px",
1634
1634
  desktop: "1024px"
1635
- }, Lt = class Lt extends U {
1635
+ }, Rt = class Rt extends U {
1636
1636
  constructor() {
1637
1637
  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) => {
1638
1638
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
@@ -1700,12 +1700,17 @@ const st = {
1700
1700
  const s = this.starHoverColor || (r ? `color-mix(in srgb, ${R(r)} 80%, white)` : null);
1701
1701
  if (s && (o += `--pc-star-hover-color: ${s} !important;
1702
1702
  `), this.starSize) {
1703
- const i = oe(this.starSize, "1rem", 1.5);
1703
+ const i = kt(this.starSize, "1.5em", 1.5);
1704
1704
  o += `--pc-stars-star-size: ${i} !important;
1705
+ `;
1706
+ }
1707
+ if (this.reactionSize) {
1708
+ const i = kt(this.reactionSize, "1em", 1);
1709
+ o += `--pc-reaction-size: ${i} !important;
1705
1710
  `;
1706
1711
  }
1707
1712
  if (this.size) {
1708
- const i = oe(this.size);
1713
+ const i = kt(this.size);
1709
1714
  o += `font-size: ${i} !important;
1710
1715
  `;
1711
1716
  }
@@ -1721,7 +1726,7 @@ const st = {
1721
1726
  * Update ARIA attributes for accessibility
1722
1727
  */
1723
1728
  updateAriaAttributes() {
1724
- 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");
1729
+ this.ariaLabel && At(this, "aria-label", this.ariaLabel), this.ariaDescribedby && At(this, "aria-describedby", this.ariaDescribedby), At(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1725
1730
  }
1726
1731
  /**
1727
1732
  * Update host CSS classes based on state
@@ -1843,7 +1848,7 @@ const st = {
1843
1848
  `;
1844
1849
  }
1845
1850
  };
1846
- Lt.styles = [
1851
+ Rt.styles = [
1847
1852
  F`
1848
1853
  :host {
1849
1854
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
@@ -1933,7 +1938,7 @@ Lt.styles = [
1933
1938
  }
1934
1939
  `
1935
1940
  ];
1936
- let m = Lt;
1941
+ let m = Rt;
1937
1942
  g([
1938
1943
  f({ type: String, attribute: "show-stats" })
1939
1944
  ], m.prototype, "showStats");
@@ -1970,6 +1975,9 @@ g([
1970
1975
  g([
1971
1976
  f({ type: String, attribute: "star-size" })
1972
1977
  ], m.prototype, "starSize");
1978
+ g([
1979
+ f({ type: String, attribute: "reaction-size" })
1980
+ ], m.prototype, "reactionSize");
1973
1981
  g([
1974
1982
  f({ type: String })
1975
1983
  ], m.prototype, "size");
@@ -2229,6 +2237,9 @@ const zo = F`
2229
2237
  --default-stars-hover-glow: rgba(255, 193, 7, 0.15);
2230
2238
  --default-stars-drop-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
2231
2239
 
2240
+ /* Reaction-specific defaults */
2241
+ --default-reaction-size: 1em;
2242
+
2232
2243
  /* NPS-specific defaults */
2233
2244
  --default-nps-button-height: clamp(1.6em, calc(1.5em + 0.5vw), 2.4em);
2234
2245
  --default-nps-button-width: clamp(1.4em, calc(1.2em + 0.3vw), 2em);
@@ -2682,7 +2693,7 @@ const zo = F`
2682
2693
  }
2683
2694
  }
2684
2695
  `;
2685
- function Nt(e, t = {}) {
2696
+ function Mt(e, t = {}) {
2686
2697
  if (!e || e.length === 0)
2687
2698
  return d`<div class="pc-bar-chart pc-bar-chart--empty">No data available</div>`;
2688
2699
  const o = Math.max(...e.map((i) => i.value)), s = { ...{
@@ -2783,7 +2794,7 @@ let I = class extends m {
2783
2794
  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]) => ({
2784
2795
  label: n,
2785
2796
  value: l
2786
- })), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = Nt(o, {
2797
+ })), s = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", i = Mt(o, {
2787
2798
  barColor: s,
2788
2799
  labelFormatter: (n) => `${n.label}`,
2789
2800
  valueFormatter: (n) => `${t > 0 ? Math.round(n.value / t * 100) : 0}%`
@@ -2858,7 +2869,7 @@ Y([
2858
2869
  f({ type: String, attribute: "min-max-position" })
2859
2870
  ], I.prototype, "minMaxPosition", 2);
2860
2871
  Y([
2861
- Tt()
2872
+ zt()
2862
2873
  ], I.prototype, "hoverValue", 2);
2863
2874
  I = Y([
2864
2875
  ot("pc-nps")
@@ -3120,7 +3131,7 @@ const Mo = F`
3120
3131
  visibility: hidden;
3121
3132
  }
3122
3133
  `;
3123
- var Lo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, Mt = (e, t, o, r) => {
3134
+ var Lo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, Lt = (e, t, o, r) => {
3124
3135
  for (var s = r > 1 ? void 0 : r ? Ro(t, o) : t, i = e.length - 1, a; i >= 0; i--)
3125
3136
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
3126
3137
  return r && s && Lo(t, o, s), s;
@@ -3183,7 +3194,7 @@ let tt = class extends m {
3183
3194
  */
3184
3195
  renderOptionIcon(e) {
3185
3196
  if (!(e != null && e.icon)) return "";
3186
- 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, {
3197
+ const t = Nt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = $e(e == null ? void 0 : e.icon, {
3187
3198
  type: t,
3188
3199
  alt: o,
3189
3200
  isSelected: r
@@ -3389,13 +3400,13 @@ let tt = class extends m {
3389
3400
  }
3390
3401
  };
3391
3402
  tt.styles = [...m.styles, ut, Mo];
3392
- Mt([
3403
+ Lt([
3393
3404
  f({ type: Boolean })
3394
3405
  ], tt.prototype, "multiple", 2);
3395
- Mt([
3406
+ Lt([
3396
3407
  f({ type: Boolean })
3397
3408
  ], tt.prototype, "compact", 2);
3398
- tt = Mt([
3409
+ tt = Lt([
3399
3410
  ot("pc-poll")
3400
3411
  ], tt);
3401
3412
  const jo = F`
@@ -3750,7 +3761,7 @@ let V = class extends m {
3750
3761
  label: l,
3751
3762
  value: p,
3752
3763
  icon: o
3753
- })), i = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", a = Nt(r, {
3764
+ })), i = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", a = Mt(r, {
3754
3765
  barColor: i,
3755
3766
  labelFormatter: (l) => `${l.label} ${l.icon}`,
3756
3767
  valueFormatter: (l) => `${t > 0 ? Math.round(l.value / t * 100) : 0}%`
@@ -3790,7 +3801,7 @@ ht([
3790
3801
  f({ type: Number, attribute: "num-stars" })
3791
3802
  ], V.prototype, "numStars", 2);
3792
3803
  ht([
3793
- Tt()
3804
+ zt()
3794
3805
  ], V.prototype, "hoverValue", 2);
3795
3806
  V = ht([
3796
3807
  ot("pc-stars")
@@ -3838,7 +3849,7 @@ const qo = F`
3838
3849
  color 0.2s,
3839
3850
  border-color 0.2s;
3840
3851
  position: relative;
3841
- font-size: var(--pc-font-size-medium, var(--default-font-size-medium));
3852
+ font-size: var(--pc-reaction-size, var(--default-reaction-size));
3842
3853
  gap: 0.25em;
3843
3854
  box-sizing: border-box;
3844
3855
  min-width: 2em;
@@ -3880,7 +3891,7 @@ const qo = F`
3880
3891
  background 0.2s,
3881
3892
  color 0.2s,
3882
3893
  border-color 0.2s;
3883
- font-size: var(--pc-font-size-medium, var(--default-font-size-medium));
3894
+ font-size: var(--pc-reaction-size, var(--default-reaction-size));
3884
3895
  }
3885
3896
 
3886
3897
  .trigger-btn:hover {
@@ -4019,7 +4030,7 @@ let q = class extends m {
4019
4030
  * Renders the icon for a reaction
4020
4031
  */
4021
4032
  renderReactionIcon(e, t) {
4022
- const { icon: o, isRemoteImage: r } = ct(e), s = It.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = $e(o, {
4033
+ const { icon: o, isRemoteImage: r } = ct(e), s = Nt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = $e(o, {
4023
4034
  type: s,
4024
4035
  alt: i,
4025
4036
  ariaLabel: i,
@@ -4172,7 +4183,7 @@ let q = class extends m {
4172
4183
  icon: (c == null ? void 0 : c.icon) || l
4173
4184
  // Use the icon or fall back to reaction value
4174
4185
  };
4175
- }), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", n = Nt(o, {
4186
+ }), r = getComputedStyle(this), s = r.getPropertyValue("--pc-primary-color").trim(), a = r.getPropertyValue("--pc-accent-color").trim() || s || "#ffc107", n = Mt(o, {
4176
4187
  barColor: a,
4177
4188
  labelFormatter: (l) => `${l.label}`,
4178
4189
  valueFormatter: (l) => `${e.totalCount > 0 ? Math.round(l.value / e.totalCount * 100) : 0}%`
@@ -4333,7 +4344,7 @@ mt([
4333
4344
  f({ type: String })
4334
4345
  ], H.prototype, "options", 2);
4335
4346
  mt([
4336
- Tt()
4347
+ zt()
4337
4348
  ], H.prototype, "parsedOptions", 2);
4338
4349
  H = mt([
4339
4350
  ot("poll-catch")