pollcatch 1.0.7 → 1.0.9

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 (3) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
  3. package/pc.js +185 -176
package/README.md CHANGED
@@ -42,7 +42,7 @@ pnpm install pollcatch
42
42
 
43
43
  <!-- Or use the components individually -->
44
44
  <pc-stars max-stars="5" label="How would you rate our service?"></pc-stars>
45
- <pc-reaction options="👍,👎" mode="expand" label="Was this helpful?"></pc-reaction>
45
+ <pc-reaction options="👍,👎" label="Was this helpful?"></pc-reaction>
46
46
  <pc-reaction icon="like" label="Like this article?"></pc-reaction>
47
47
  ```
48
48
 
@@ -79,15 +79,15 @@ A flexible star rating component with a sophisticated two-mode experience for co
79
79
  An emoji-based reaction component for emotional feedback. Can be used for thumbs up/down, emoji reactions, custom feedback options, and also supports custom reaction icons.
80
80
 
81
81
  ```html
82
- <pc-reaction label="Was this helpful?" options="👍,👎" mode="expand"></pc-reaction>
83
- <pc-reaction label="React to this article" options="👍,❤️,😂,😮,😢,😡" mode="compact" multiple show-stats></pc-reaction>
82
+ <pc-reaction label="Was this helpful?" options="👍,👎" </pc-reaction>
83
+ <pc-reaction label="React to this article" options="👍,❤️,😂,😮,😢,😡" compact multiple show-stats></pc-reaction>
84
84
  ```
85
85
 
86
86
  **Custom Reaction Icons:**
87
87
  You can define custom icons using the `<pc-reaction-icon>` element as children of `<pc-reaction>`. This allows you to use SVGs or custom images as reaction options.
88
88
 
89
89
  ```html
90
- <pc-reaction label="How do you feel?" mode="expand">
90
+ <pc-reaction label="How do you feel?"
91
91
  <pc-reaction-icon name="like" icon="👍" tooltip="Like"></pc-reaction-icon>
92
92
  <pc-reaction-icon name="love" icon="❤️" tooltip="Love"></pc-reaction-icon>
93
93
  <pc-reaction-icon name="star" icon="star-outline.svg" tooltip="Star"></pc-reaction-icon>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pollcatch",
3
3
  "private": false,
4
- "version": "1.0.7",
4
+ "version": "1.0.9",
5
5
  "type": "module",
6
6
  "main": "pc.js",
7
7
  "module": "pc.js",
package/pc.js CHANGED
@@ -22,14 +22,14 @@ let de = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Te = (e) => new de(typeof e == "string" ? e : e + "", void 0, At), B = (e, ...t) => {
25
+ const Pe = (e) => new de(typeof e == "string" ? e : e + "", void 0, At), B = (e, ...t) => {
26
26
  const s = e.length === 1 ? e[0] : t.reduce((i, o, r) => i + ((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
  })(o) + e[r + 1], e[0]);
31
31
  return new de(s, e, At);
32
- }, Oe = (e, t) => {
32
+ }, Me = (e, t) => {
33
33
  if (Et) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
34
34
  else for (const s of t) {
35
35
  const i = document.createElement("style"), o = pt.litNonce;
@@ -38,14 +38,14 @@ const Te = (e) => new de(typeof e == "string" ? e : e + "", void 0, At), B = (e,
38
38
  }, Dt = Et ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
39
39
  let s = "";
40
40
  for (const i of t.cssRules) s += i.cssText;
41
- return Te(s);
41
+ return Pe(s);
42
42
  })(e) : e;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Me, defineProperty: ze, getOwnPropertyDescriptor: Ne, getOwnPropertyNames: Re, getOwnPropertySymbols: Ie, getPrototypeOf: Ue } = Object, D = globalThis, Vt = D.trustedTypes, Le = Vt ? Vt.emptyScript : "", gt = D.reactiveElementPolyfillSupport, st = (e, t) => e, ht = { toAttribute(e, t) {
48
+ const { is: Oe, defineProperty: ze, getOwnPropertyDescriptor: Ne, getOwnPropertyNames: Re, getOwnPropertySymbols: Ie, getPrototypeOf: Ue } = Object, D = globalThis, Vt = D.trustedTypes, Le = Vt ? Vt.emptyScript : "", gt = D.reactiveElementPolyfillSupport, st = (e, t) => e, ht = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  e = e ? Le : null;
@@ -73,7 +73,7 @@ const { is: Me, defineProperty: ze, getOwnPropertyDescriptor: Ne, getOwnProperty
73
73
  }
74
74
  }
75
75
  return s;
76
- } }, _t = (e, t) => !Me(e, t), Ht = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged: _t };
76
+ } }, _t = (e, t) => !Oe(e, t), Ht = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged: _t };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), D.litPropertyMetadata ?? (D.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  let J = class extends HTMLElement {
79
79
  static addInitializer(t) {
@@ -161,7 +161,7 @@ let J = class extends HTMLElement {
161
161
  }
162
162
  createRenderRoot() {
163
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return Oe(t, this.constructor.elementStyles), t;
164
+ return Me(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -279,11 +279,11 @@ J.elementStyles = [], J.shadowRootOptions = { mode: "open" }, J[st("elementPrope
279
279
  * Copyright 2017 Google LLC
280
280
  * SPDX-License-Identifier: BSD-3-Clause
281
281
  */
282
- const it = globalThis, ut = it.trustedTypes, Bt = ut ? ut.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pe = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, he = "?" + j, je = `<${he}>`, W = document, rt = () => W.createComment(""), at = (e) => e === null || typeof e != "object" && typeof e != "function", Pt = Array.isArray, De = (e) => Pt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", ft = `[
283
- \f\r]`, et = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ft = /-->/g, qt = />/g, K = RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Kt = /'/g, Yt = /"/g, ue = /^(?:script|style|textarea|title)$/i, Ve = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), l = Ve(1), H = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Gt = /* @__PURE__ */ new WeakMap(), Y = W.createTreeWalker(W, 129);
282
+ const it = globalThis, ut = it.trustedTypes, Bt = ut ? ut.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pe = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, he = "?" + j, je = `<${he}>`, Z = document, rt = () => Z.createComment(""), at = (e) => e === null || typeof e != "object" && typeof e != "function", Tt = Array.isArray, De = (e) => Tt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", ft = `[
283
+ \f\r]`, et = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qt = /-->/g, Ft = />/g, K = RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Kt = /'/g, Yt = /"/g, ue = /^(?:script|style|textarea|title)$/i, Ve = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), l = Ve(1), H = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Gt = /* @__PURE__ */ new WeakMap(), Y = Z.createTreeWalker(Z, 129);
285
285
  function me(e, t) {
286
- if (!Pt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
286
+ if (!Tt(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 He = (e, t) => {
@@ -292,7 +292,7 @@ const He = (e, t) => {
292
292
  for (let n = 0; n < s; n++) {
293
293
  const c = e[n];
294
294
  let h, m, b = -1, S = 0;
295
- for (; S < c.length && (a.lastIndex = S, m = a.exec(c), m !== null); ) S = a.lastIndex, a === et ? m[1] === "!--" ? a = Ft : m[1] !== void 0 ? a = qt : m[2] !== void 0 ? (ue.test(m[2]) && (o = RegExp("</" + m[2], "g")), a = K) : m[3] !== void 0 && (a = K) : a === K ? m[0] === ">" ? (a = o ?? et, b = -1) : m[1] === void 0 ? b = -2 : (b = a.lastIndex - m[2].length, h = m[1], a = m[3] === void 0 ? K : m[3] === '"' ? Yt : Kt) : a === Yt || a === Kt ? a = K : a === Ft || a === qt ? a = et : (a = K, o = void 0);
295
+ for (; S < c.length && (a.lastIndex = S, m = a.exec(c), m !== null); ) S = a.lastIndex, a === et ? m[1] === "!--" ? a = qt : m[1] !== void 0 ? a = Ft : m[2] !== void 0 ? (ue.test(m[2]) && (o = RegExp("</" + m[2], "g")), a = K) : m[3] !== void 0 && (a = K) : a === K ? m[0] === ">" ? (a = o ?? et, b = -1) : m[1] === void 0 ? b = -2 : (b = a.lastIndex - m[2].length, h = m[1], a = m[3] === void 0 ? K : m[3] === '"' ? Yt : Kt) : a === Yt || a === Kt ? a = K : a === qt || a === Ft ? a = et : (a = K, o = void 0);
296
296
  const L = a === K && e[n + 1].startsWith("/>") ? " " : "";
297
297
  r += a === et ? c + je : b >= 0 ? (i.push(h), c.slice(0, b) + pe + c.slice(b) + j + L) : c + j + (b === -2 ? n : L);
298
298
  }
@@ -312,7 +312,7 @@ let kt = class be {
312
312
  if (o.nodeType === 1) {
313
313
  if (o.hasAttributes()) for (const b of o.getAttributeNames()) if (b.endsWith(pe)) {
314
314
  const S = m[a++], L = o.getAttribute(b).split(j), ct = /([.?@])?(.*)/.exec(S);
315
- c.push({ type: 1, index: r, name: ct[2], strings: L, ctor: ct[1] === "." ? Fe : ct[1] === "?" ? qe : ct[1] === "@" ? Ke : mt }), o.removeAttribute(b);
315
+ c.push({ type: 1, index: r, name: ct[2], strings: L, ctor: ct[1] === "." ? qe : ct[1] === "?" ? Fe : ct[1] === "@" ? Ke : mt }), o.removeAttribute(b);
316
316
  } else b.startsWith(j) && (c.push({ type: 6, index: r }), o.removeAttribute(b));
317
317
  if (ue.test(o.tagName)) {
318
318
  const b = o.textContent.split(j), S = b.length - 1;
@@ -331,7 +331,7 @@ let kt = class be {
331
331
  }
332
332
  }
333
333
  static createElement(t, s) {
334
- const i = W.createElement("template");
334
+ const i = Z.createElement("template");
335
335
  return i.innerHTML = t, i;
336
336
  }
337
337
  };
@@ -353,7 +353,7 @@ let Be = class {
353
353
  return this._$AM._$AU;
354
354
  }
355
355
  u(t) {
356
- const { el: { content: s }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? W).importNode(s, !0);
356
+ const { el: { content: s }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? Z).importNode(s, !0);
357
357
  Y.currentNode = o;
358
358
  let r = Y.nextNode(), a = 0, n = 0, c = i[0];
359
359
  for (; c !== void 0; ) {
@@ -363,7 +363,7 @@ let Be = class {
363
363
  }
364
364
  a !== (c == null ? void 0 : c.index) && (r = Y.nextNode(), a++);
365
365
  }
366
- return Y.currentNode = W, o;
366
+ return Y.currentNode = Z, o;
367
367
  }
368
368
  p(t) {
369
369
  let s = 0;
@@ -399,7 +399,7 @@ class nt {
399
399
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
400
400
  }
401
401
  _(t) {
402
- this._$AH !== d && at(this._$AH) ? this._$AA.nextSibling.data = t : this.T(W.createTextNode(t)), this._$AH = t;
402
+ this._$AH !== d && at(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Z.createTextNode(t)), this._$AH = t;
403
403
  }
404
404
  $(t) {
405
405
  var r;
@@ -415,7 +415,7 @@ class nt {
415
415
  return s === void 0 && Gt.set(t.strings, s = new kt(t)), s;
416
416
  }
417
417
  k(t) {
418
- Pt(this._$AH) || (this._$AH = [], this._$AR());
418
+ Tt(this._$AH) || (this._$AH = [], this._$AR());
419
419
  const s = this._$AH;
420
420
  let i, o = 0;
421
421
  for (const r of t) o === s.length ? s.push(i = new nt(this.O(rt()), this.O(rt()), this, this.options)) : i = s[o], i._$AI(r), o++;
@@ -458,7 +458,7 @@ class mt {
458
458
  t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- let Fe = class extends mt {
461
+ let qe = class extends mt {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
@@ -466,7 +466,7 @@ let Fe = class extends mt {
466
466
  this.element[this.name] = t === d ? void 0 : t;
467
467
  }
468
468
  };
469
- class qe extends mt {
469
+ class Fe extends mt {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
@@ -550,7 +550,7 @@ vt == null || vt({ LitElement: V });
550
550
  * Copyright 2017 Google LLC
551
551
  * SPDX-License-Identifier: BSD-3-Clause
552
552
  */
553
- const F = (e) => (t, s) => {
553
+ const q = (e) => (t, s) => {
554
554
  s !== void 0 ? s.addInitializer(() => {
555
555
  customElements.define(e, t);
556
556
  }) : customElements.define(e, t);
@@ -560,7 +560,7 @@ const F = (e) => (t, s) => {
560
560
  * Copyright 2017 Google LLC
561
561
  * SPDX-License-Identifier: BSD-3-Clause
562
562
  */
563
- const We = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged: _t }, Ze = (e = We, t, s) => {
563
+ const Ze = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged: _t }, We = (e = Ze, t, s) => {
564
564
  const { kind: i, metadata: o } = s;
565
565
  let r = globalThis.litPropertyMetadata.get(o);
566
566
  if (r === void 0 && globalThis.litPropertyMetadata.set(o, r = /* @__PURE__ */ new Map()), r.set(s.name, e), i === "accessor") {
@@ -582,7 +582,7 @@ const We = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged
582
582
  throw Error("Unsupported decorator location: " + i);
583
583
  };
584
584
  function p(e) {
585
- return (t, s) => typeof s == "object" ? Ze(e, t, s) : ((i, o, r) => {
585
+ return (t, s) => typeof s == "object" ? We(e, t, s) : ((i, o, r) => {
586
586
  const a = o.hasOwnProperty(r);
587
587
  return o.constructor.createProperty(r, a ? { ...i, wrapped: !0 } : i), a ? Object.getOwnPropertyDescriptor(o, r) : void 0;
588
588
  })(e, t, s);
@@ -624,6 +624,7 @@ const Je = B`
624
624
  --pc-bar-height: clamp(0.5em, 0.6em, 0.8em);
625
625
  --pc-font-size-small: clamp(0.6em, 0.7em, 0.8em);
626
626
  --pc-font-size-medium: clamp(0.8em, 0.9em, 1em);
627
+ --pc-font-size-large: clamp(1em, 1.1em, 1.2em);
627
628
  }
628
629
 
629
630
  .pc-container {
@@ -974,13 +975,13 @@ function ts(e) {
974
975
  };
975
976
  }
976
977
  const g = ts("Pollcatch");
977
- function Wt() {
978
+ function Zt() {
978
979
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (g.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
979
980
  const t = Math.random() * 16 | 0;
980
981
  return (e === "x" ? t : t & 3 | 8).toString(16);
981
982
  }));
982
983
  }
983
- function Tt() {
984
+ function Pt() {
984
985
  const e = "test-local-storage";
985
986
  try {
986
987
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
@@ -1017,9 +1018,9 @@ async function es() {
1017
1018
  }
1018
1019
  g.warn("No project key found in global variable or script tags");
1019
1020
  }
1020
- async function Zt() {
1021
+ async function Wt() {
1021
1022
  const e = Xe, t = Qe;
1022
- if (Tt()) {
1023
+ if (Pt()) {
1023
1024
  const s = fe(e);
1024
1025
  if (s && s.id && s.timestamp && Date.now() - s.timestamp < t)
1025
1026
  return g.debug("Using existing session ID from localStorage"), s.id;
@@ -1027,13 +1028,13 @@ async function Zt() {
1027
1028
  s ? "Session ID expired" : "No session ID found",
1028
1029
  "generating new one"
1029
1030
  );
1030
- const i = Wt();
1031
+ const i = Zt();
1031
1032
  return ye(e, {
1032
1033
  id: i,
1033
1034
  timestamp: Date.now()
1034
1035
  }) ? g.debug("Generated and stored new session ID") : g.warn("Generated session ID but failed to store it"), i;
1035
1036
  } else {
1036
- const s = Wt();
1037
+ const s = Zt();
1037
1038
  return g.debug("Generated non-persistent session ID"), s;
1038
1039
  }
1039
1040
  }
@@ -1089,7 +1090,7 @@ async function is(e) {
1089
1090
  function ve(e) {
1090
1091
  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);
1091
1092
  }
1092
- function Ot(e) {
1093
+ function Mt(e) {
1093
1094
  if (!e || typeof e != "string")
1094
1095
  return !1;
1095
1096
  const t = e.trim();
@@ -1380,7 +1381,7 @@ function G() {
1380
1381
  };
1381
1382
  }
1382
1383
  function vs(e) {
1383
- if (!Tt())
1384
+ if (!Pt())
1384
1385
  return G();
1385
1386
  try {
1386
1387
  const t = fe(e);
@@ -1390,7 +1391,7 @@ function vs(e) {
1390
1391
  }
1391
1392
  }
1392
1393
  function xs(e, t) {
1393
- if (!Tt())
1394
+ if (!Pt())
1394
1395
  return !1;
1395
1396
  try {
1396
1397
  return ye(e, t) ? (g.debug("Saved localStats to localStorage", t), !0) : !1;
@@ -1467,7 +1468,7 @@ const Lt = class Lt extends V {
1467
1468
  * Gets the localStorage key for this widget's localStats
1468
1469
  */
1469
1470
  async getLocalStatsKey() {
1470
- const t = await Zt(), s = await this.getProjectKey(), i = this.name || "unnamed";
1471
+ const t = await Wt(), s = await this.getProjectKey(), i = this.name || "unnamed";
1471
1472
  return `pc-local-stats-${t}-${s}-${i}`;
1472
1473
  }
1473
1474
  /**
@@ -1514,7 +1515,7 @@ const Lt = class Lt extends V {
1514
1515
  * Undo the stats with the localStats
1515
1516
  */
1516
1517
  async submitStats(t, s) {
1517
- const i = Math.floor(Date.now() / 1e3).toString(), o = await Zt(), r = await this.getProjectKey(), a = this.name || "", n = {
1518
+ const i = Math.floor(Date.now() / 1e3).toString(), o = await Wt(), r = await this.getProjectKey(), a = this.name || "", n = {
1518
1519
  sessionId: o,
1519
1520
  projectId: r,
1520
1521
  widgetName: a,
@@ -2000,7 +2001,7 @@ const v = Ce(class extends Ee {
2000
2001
  return H;
2001
2002
  }
2002
2003
  });
2003
- function Mt(e, t = {}) {
2004
+ function Ot(e, t = {}) {
2004
2005
  if (!e || e.length === 0)
2005
2006
  return l`<div class="pc-bar-chart pc-bar-chart--empty">No data available</div>`;
2006
2007
  const s = Math.max(...e.map((r) => r.value)), o = { ...{
@@ -2049,7 +2050,7 @@ function Ae(e, t = {}) {
2049
2050
  s === "functional" && !i && !o && console.warn(
2050
2051
  `No alt text or aria-label provided for functional icon in ${a}. This may cause accessibility issues.`
2051
2052
  );
2052
- const n = r ? " (selected)" : "", c = Ot(e) && !i ? "" : i || e, h = o || (c ? `${c}${n}` : n);
2053
+ const n = r ? " (selected)" : "", c = Mt(e) && !i ? "" : i || e, h = o || (c ? `${c}${n}` : n);
2053
2054
  return {
2054
2055
  alt: c,
2055
2056
  ariaLabel: h,
@@ -2066,7 +2067,7 @@ function Ut(e, t) {
2066
2067
  return `${e}: ${t}`;
2067
2068
  }
2068
2069
  var w = /* @__PURE__ */ ((e) => (e.BUTTON = "button", e.CHECKBOX = "checkbox", e.RADIO = "radio", e.RADIOGROUP = "radiogroup", e.SWITCH = "switch", e.TAB = "tab", e.TABLIST = "tablist", e.TABPANEL = "tabpanel", e.MENU = "menu", e.MENUITEM = "menuitem", e.MENUITEMCHECKBOX = "menuitemcheckbox", e.MENUITEMRADIO = "menuitemradio", e.SLIDER = "slider", e.TEXTBOX = "textbox", e.COMBOBOX = "combobox", e.LISTBOX = "listbox", e.OPTION = "option", e.PROGRESSBAR = "progressbar", e.STATUS = "status", e.ALERT = "alert", e.DIALOG = "dialog", e.GROUP = "group", e.REGION = "region", e.NONE = "none", e.PRESENTATION = "presentation", e))(w || {});
2069
- function T(e) {
2070
+ function P(e) {
2070
2071
  const t = {};
2071
2072
  e.role !== void 0 && (t.role = e.role);
2072
2073
  for (const [s, i] of Object.entries(e)) {
@@ -2077,7 +2078,7 @@ function T(e) {
2077
2078
  return t;
2078
2079
  }
2079
2080
  function Es(e, t, s) {
2080
- return T({
2081
+ return P({
2081
2082
  role: "button",
2082
2083
  ariaLabel: e,
2083
2084
  ariaPressed: t,
@@ -2085,19 +2086,19 @@ function Es(e, t, s) {
2085
2086
  });
2086
2087
  }
2087
2088
  function ne(e, t, s, i = !1) {
2088
- return T({
2089
+ return P({
2089
2090
  role: i ? "radio" : "checkbox",
2090
2091
  ariaLabel: e,
2091
2092
  ariaChecked: t,
2092
2093
  ariaDisabled: s
2093
2094
  });
2094
2095
  }
2095
- var As = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, q = (e, t, s, i) => {
2096
+ var As = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, F = (e, t, s, i) => {
2096
2097
  for (var o = i > 1 ? void 0 : i ? _s(t, s) : t, r = e.length - 1, a; r >= 0; r--)
2097
2098
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
2098
2099
  return i && o && As(t, s, o), o;
2099
2100
  };
2100
- let O = class extends u {
2101
+ let M = class extends u {
2101
2102
  constructor() {
2102
2103
  super(), this.min = 0, this.max = 10, this.minLabel = "Not at all", this.maxLabel = "Extremely", this.thankYouMsg = "Thank you for sharing your feedback!", this.minMaxPosition = "top", this.isChartVisible = !1, this.isEditMode = !0, this.hoverValue = -1, this.handleChartToggleKeyDown = (e) => {
2103
2104
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.toggleChart());
@@ -2146,7 +2147,7 @@ let O = class extends u {
2146
2147
  * Render NPS buttons for edit mode
2147
2148
  */
2148
2149
  renderEditNps() {
2149
- const e = this.getCurrentScore(), t = this.hasUserScore(), s = Array.from({ length: this.max - this.min + 1 }, (a, n) => n + this.min), i = `nps-control-${this.name || this.widgetType}`, o = T({
2150
+ const e = this.getCurrentScore(), t = this.hasUserScore(), s = Array.from({ length: this.max - this.min + 1 }, (a, n) => n + this.min), i = `nps-control-${this.name || this.widgetType}`, o = P({
2150
2151
  role: w.GROUP,
2151
2152
  ariaLabel: this.label || "NPS Rating",
2152
2153
  ariaDescribedby: `${i}-description`
@@ -2197,7 +2198,7 @@ let O = class extends u {
2197
2198
  "nps-button": !0,
2198
2199
  selected: !0,
2199
2200
  "view-mode": !0
2200
- }, i = T({
2201
+ }, i = P({
2201
2202
  role: w.PRESENTATION
2202
2203
  }), o = l`
2203
2204
  <button
@@ -2225,11 +2226,11 @@ let O = class extends u {
2225
2226
  label: c,
2226
2227
  value: h
2227
2228
  })
2228
- ), o = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", r = Mt(s, {
2229
+ ), o = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", r = Ot(s, {
2229
2230
  barColor: o,
2230
2231
  labelFormatter: (c) => `${c}`,
2231
2232
  valueFormatter: (c) => `${t > 0 ? Math.round(c / t * 100) : 0}%`
2232
- }), a = T({
2233
+ }), a = P({
2233
2234
  role: w.REGION,
2234
2235
  ariaLabel: `Results chart for ${this.label || "NPS Rating"}`
2235
2236
  });
@@ -2357,7 +2358,7 @@ let O = class extends u {
2357
2358
  nps: !0,
2358
2359
  [`pc-flex-pos-${this.statsPosition}`]: !0,
2359
2360
  [`pc-flex-align-${I(this.statsPosition, this.statsAlign)}`]: !0
2360
- }, s = T({
2361
+ }, s = P({
2361
2362
  role: w.REGION,
2362
2363
  ariaLabel: this.label || "NPS Rating"
2363
2364
  });
@@ -2377,32 +2378,32 @@ let O = class extends u {
2377
2378
  `;
2378
2379
  }
2379
2380
  };
2380
- O.styles = [...u.styles, Cs];
2381
- q([
2381
+ M.styles = [...u.styles, Cs];
2382
+ F([
2382
2383
  p({ type: String, attribute: "min-label" })
2383
- ], O.prototype, "minLabel", 2);
2384
- q([
2384
+ ], M.prototype, "minLabel", 2);
2385
+ F([
2385
2386
  p({ type: String, attribute: "max-label" })
2386
- ], O.prototype, "maxLabel", 2);
2387
- q([
2387
+ ], M.prototype, "maxLabel", 2);
2388
+ F([
2388
2389
  p({ type: String, attribute: "thank-you-msg" })
2389
- ], O.prototype, "thankYouMsg", 2);
2390
- q([
2390
+ ], M.prototype, "thankYouMsg", 2);
2391
+ F([
2391
2392
  p({ type: String, attribute: "min-max-position" })
2392
- ], O.prototype, "minMaxPosition", 2);
2393
- q([
2393
+ ], M.prototype, "minMaxPosition", 2);
2394
+ F([
2394
2395
  y()
2395
- ], O.prototype, "isChartVisible", 2);
2396
- q([
2396
+ ], M.prototype, "isChartVisible", 2);
2397
+ F([
2397
2398
  y()
2398
- ], O.prototype, "isEditMode", 2);
2399
- q([
2399
+ ], M.prototype, "isEditMode", 2);
2400
+ F([
2400
2401
  y()
2401
- ], O.prototype, "hoverValue", 2);
2402
- O = q([
2403
- F("pc-nps")
2404
- ], O);
2405
- const Ps = B`
2402
+ ], M.prototype, "hoverValue", 2);
2403
+ M = F([
2404
+ q("pc-nps")
2405
+ ], M);
2406
+ const Ts = B`
2406
2407
  /* Add responsive sizing with CSS variables */
2407
2408
  :host {
2408
2409
  --pc-checkbox-size: clamp(1em, calc(0.8em + 0.3vw), 1.4em);
@@ -2782,12 +2783,12 @@ const Ps = B`
2782
2783
  gap: 0.5em;
2783
2784
  }
2784
2785
  `;
2785
- var Ts = Object.defineProperty, Os = Object.getOwnPropertyDescriptor, Q = (e, t, s, i) => {
2786
- for (var o = i > 1 ? void 0 : i ? Os(t, s) : t, r = e.length - 1, a; r >= 0; r--)
2786
+ var Ps = Object.defineProperty, Ms = Object.getOwnPropertyDescriptor, Q = (e, t, s, i) => {
2787
+ for (var o = i > 1 ? void 0 : i ? Ms(t, s) : t, r = e.length - 1, a; r >= 0; r--)
2787
2788
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
2788
- return i && o && Ts(t, s, o), o;
2789
+ return i && o && Ps(t, s, o), o;
2789
2790
  };
2790
- let P = class extends V {
2791
+ let T = class extends V {
2791
2792
  constructor() {
2792
2793
  super(...arguments), this.value = "", this.icon = "", this.tooltip = "", this.disabled = !1, this.selected = !1;
2793
2794
  }
@@ -2806,33 +2807,33 @@ let P = class extends V {
2806
2807
  return l` <slot></slot> `;
2807
2808
  }
2808
2809
  };
2809
- P.styles = B`
2810
+ T.styles = B`
2810
2811
  :host {
2811
2812
  display: none;
2812
2813
  }
2813
2814
  `;
2814
2815
  Q([
2815
2816
  p({ type: String, reflect: !0 })
2816
- ], P.prototype, "value", 2);
2817
+ ], T.prototype, "value", 2);
2817
2818
  Q([
2818
2819
  p({ type: String })
2819
- ], P.prototype, "icon", 2);
2820
+ ], T.prototype, "icon", 2);
2820
2821
  Q([
2821
2822
  p({ type: String })
2822
- ], P.prototype, "tooltip", 2);
2823
+ ], T.prototype, "tooltip", 2);
2823
2824
  Q([
2824
2825
  p({ type: Boolean, reflect: !0 })
2825
- ], P.prototype, "disabled", 2);
2826
+ ], T.prototype, "disabled", 2);
2826
2827
  Q([
2827
2828
  p({ type: Boolean, reflect: !0 })
2828
- ], P.prototype, "selected", 2);
2829
- P = Q([
2830
- F("pc-poll-option")
2831
- ], P);
2832
- var Ms = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, z = (e, t, s, i) => {
2829
+ ], T.prototype, "selected", 2);
2830
+ T = Q([
2831
+ q("pc-poll-option")
2832
+ ], T);
2833
+ var Os = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, z = (e, t, s, i) => {
2833
2834
  for (var o = i > 1 ? void 0 : i ? zs(t, s) : t, r = e.length - 1, a; r >= 0; r--)
2834
2835
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
2835
- return i && o && Ms(t, s, o), o;
2836
+ return i && o && Os(t, s, o), o;
2836
2837
  };
2837
2838
  let C = class extends u {
2838
2839
  constructor() {
@@ -2862,7 +2863,7 @@ let C = class extends u {
2862
2863
  getSlottedOptions() {
2863
2864
  var s;
2864
2865
  const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
2865
- return e ? e.assignedElements().filter((i) => i instanceof P).map((i) => {
2866
+ return e ? e.assignedElements().filter((i) => i instanceof T).map((i) => {
2866
2867
  var o, r;
2867
2868
  return {
2868
2869
  value: i.value || i.labelContent || ((o = i.textContent) == null ? void 0 : o.trim()) || "",
@@ -2943,7 +2944,7 @@ let C = class extends u {
2943
2944
  if (!this.slotExists) return;
2944
2945
  const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
2945
2946
  if (!e) return;
2946
- e.assignedElements().filter((i) => i instanceof P).forEach((i) => {
2947
+ e.assignedElements().filter((i) => i instanceof T).forEach((i) => {
2947
2948
  i.selected = this.isSelected(i.value);
2948
2949
  });
2949
2950
  }
@@ -2955,7 +2956,7 @@ let C = class extends u {
2955
2956
  if (!this.slotExists) return;
2956
2957
  const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
2957
2958
  if (!e) return;
2958
- e.assignedElements().filter((i) => i instanceof P).forEach((i) => {
2959
+ e.assignedElements().filter((i) => i instanceof T).forEach((i) => {
2959
2960
  i.selected = this.pendingSelections.includes(i.value);
2960
2961
  });
2961
2962
  }
@@ -2974,7 +2975,7 @@ let C = class extends u {
2974
2975
  class="poll-option-icon"
2975
2976
  aria-hidden="${a.ariaHidden ? "true" : "false"}"
2976
2977
  >${e}</span
2977
- >` : Ot(e) ? l`<img
2978
+ >` : Mt(e) ? l`<img
2978
2979
  src="${e}"
2979
2980
  alt="${a.alt}"
2980
2981
  class="poll-option-icon-img"
@@ -3047,7 +3048,7 @@ let C = class extends u {
3047
3048
  * Render poll options with proper grouping role
3048
3049
  */
3049
3050
  renderPollOptions() {
3050
- const e = this.multiple ? w.GROUP : w.RADIOGROUP, t = this.label || this.name || "Options", s = T({
3051
+ const e = this.multiple ? w.GROUP : w.RADIOGROUP, t = this.label || this.name || "Options", s = P({
3051
3052
  role: e,
3052
3053
  ariaLabel: t
3053
3054
  });
@@ -3100,7 +3101,7 @@ let C = class extends u {
3100
3101
  renderStats() {
3101
3102
  if (!this.statsText) return d;
3102
3103
  if (this.statsIsLoading) {
3103
- const s = T({
3104
+ const s = P({
3104
3105
  ariaLabel: "Loading poll statistics",
3105
3106
  ariaBusy: !0
3106
3107
  });
@@ -3185,7 +3186,7 @@ let C = class extends u {
3185
3186
  * Render poll options with previous selections but disabled (for view mode)
3186
3187
  */
3187
3188
  renderDisabledPollOptions() {
3188
- const e = this.multiple ? w.GROUP : w.RADIOGROUP, t = this.label || this.name || "Options", s = T({
3189
+ const e = this.multiple ? w.GROUP : w.RADIOGROUP, t = this.label || this.name || "Options", s = P({
3189
3190
  role: e,
3190
3191
  ariaLabel: t
3191
3192
  });
@@ -3281,7 +3282,7 @@ let C = class extends u {
3281
3282
  poll: !0,
3282
3283
  [`pc-flex-pos-${t}`]: !0,
3283
3284
  [`pc-flex-align-${I(t, this.statsAlign)}`]: !0
3284
- }, i = T({
3285
+ }, i = P({
3285
3286
  role: w.REGION,
3286
3287
  ariaLabel: this.label || this.name || "Poll"
3287
3288
  });
@@ -3301,7 +3302,7 @@ let C = class extends u {
3301
3302
  `;
3302
3303
  }
3303
3304
  };
3304
- C.styles = [...u.styles, Ps];
3305
+ C.styles = [...u.styles, Ts];
3305
3306
  z([
3306
3307
  p({ type: Array })
3307
3308
  ], C.prototype, "options", 2);
@@ -3330,7 +3331,7 @@ z([
3330
3331
  y()
3331
3332
  ], C.prototype, "pendingSelections", 2);
3332
3333
  C = z([
3333
- F("pc-poll")
3334
+ q("pc-poll")
3334
3335
  ], C);
3335
3336
  const Ns = B`
3336
3337
  .pc-container {
@@ -3754,7 +3755,7 @@ A([
3754
3755
  y()
3755
3756
  ], $.prototype, "hasUserSubmitted", 2);
3756
3757
  $ = A([
3757
- F("pc-text")
3758
+ q("pc-text")
3758
3759
  ], $);
3759
3760
  const Us = B`
3760
3761
  /* Adjust stats text for reactions */
@@ -3776,6 +3777,7 @@ const Us = B`
3776
3777
  /* Main reaction container */
3777
3778
  .reaction {
3778
3779
  display: flex;
3780
+ flex-direction: row;
3779
3781
  gap: 0.5em;
3780
3782
  align-items: center;
3781
3783
  flex-wrap: wrap;
@@ -3800,19 +3802,21 @@ const Us = B`
3800
3802
  background: var(--pc-background-color, white);
3801
3803
  border-radius: var(--pc-button-radius, 1em);
3802
3804
  cursor: pointer;
3803
- transition: all 0.2s;
3805
+ transition:
3806
+ background 0.2s,
3807
+ color 0.2s,
3808
+ border-color 0.2s;
3804
3809
  position: relative;
3805
- font-size: var(--pc-font-size-small, 0.8em);
3810
+ font-size: var(--pc-font-size-medium, 1em);
3806
3811
  gap: 0.25em;
3807
- min-height: 2em;
3808
3812
  box-sizing: border-box;
3813
+ min-width: 2em;
3814
+ min-height: 2em;
3809
3815
  }
3810
3816
 
3811
3817
  /* Modifier class for reaction buttons without counts - creates circular appearance */
3812
3818
  .reaction-btn.no-counts {
3813
3819
  padding: 0.25em;
3814
- min-height: 2em;
3815
- min-width: 2em;
3816
3820
  }
3817
3821
 
3818
3822
  .reaction-btn.readonly {
@@ -3831,6 +3835,16 @@ const Us = B`
3831
3835
  color: var(--pc-primary-color, #007bff);
3832
3836
  }
3833
3837
 
3838
+ .reaction-btn:not(.readonly):hover {
3839
+ background: var(--pc-hover-color, #f5f5f5);
3840
+ color: var(--pc-primary-color, #007bff);
3841
+ transform: translateY(-1px);
3842
+ }
3843
+
3844
+ .reaction-btn.selected:not(.readonly):hover {
3845
+ background: var(--pc-primary-color-light, rgba(0, 123, 255, 0.2));
3846
+ }
3847
+
3834
3848
  /* Trigger button for compact mode */
3835
3849
  .trigger-btn {
3836
3850
  display: flex;
@@ -3841,8 +3855,11 @@ const Us = B`
3841
3855
  background: var(--pc-background-color, white);
3842
3856
  border-radius: var(--pc-button-radius, 1em);
3843
3857
  cursor: pointer;
3844
- transition: all 0.2s;
3845
- font-size: var(--pc-font-size-medium, 0.8em);
3858
+ transition:
3859
+ background 0.2s,
3860
+ color 0.2s,
3861
+ border-color 0.2s;
3862
+ font-size: var(--pc-font-size-medium, 1em);
3846
3863
  }
3847
3864
 
3848
3865
  .trigger-btn:hover {
@@ -3857,11 +3874,13 @@ const Us = B`
3857
3874
  /* Icon styling */
3858
3875
  .icon {
3859
3876
  display: inline-block;
3860
- line-height: 1;
3861
- transition: all 0.3s ease;
3877
+ line-height: 1.2;
3878
+ transition:
3879
+ color 0.3s,
3880
+ transform 0.3s;
3862
3881
  will-change: transform;
3863
3882
  font-size: 1em;
3864
- height: 0.9em; /* don't know why this is needed */
3883
+ height: 1em;
3865
3884
  }
3866
3885
 
3867
3886
  .icon-img {
@@ -3871,9 +3890,10 @@ const Us = B`
3871
3890
  }
3872
3891
 
3873
3892
  .trigger-icon {
3874
- width: 1em;
3875
- height: 1em;
3876
- object-fit: contain;
3893
+ width: 1.5em;
3894
+ height: 1.5em;
3895
+ display: block;
3896
+ filter: brightness(2) contrast(1);
3877
3897
  }
3878
3898
 
3879
3899
  /* Count label */
@@ -3883,16 +3903,6 @@ const Us = B`
3883
3903
  color: var(--pc-text-color, #333);
3884
3904
  }
3885
3905
 
3886
- /* Hover effects */
3887
- /* .reaction-btn:not(.readonly):hover {
3888
- background: var(--pc-hover-color, #f5f5f5);
3889
- transform: translateY(-1px);
3890
- } */
3891
-
3892
- .reaction-btn.selected:not(.readonly):hover {
3893
- background: var(--pc-primary-color-light, rgba(0, 123, 255, 0.2));
3894
- }
3895
-
3896
3906
  /* Popover styles */
3897
3907
  .popover {
3898
3908
  position: absolute;
@@ -4114,7 +4124,7 @@ const Us = B`
4114
4124
  };
4115
4125
  function Ls(e) {
4116
4126
  let t = "❓", s = !1;
4117
- return e ? e in le ? t = le[e] : ve(e) ? t = e : Ot(e) ? (s = !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}`, s = !0) : t = e : t = "❓", {
4127
+ return e ? e in le ? t = le[e] : ve(e) ? t = e : Mt(e) ? (s = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") ? (t = `https://cdn.jsdelivr.net/npm/pollcatch@latest/emoji/${e}`, s = !0) : t = e : t = "❓", {
4118
4128
  icon: t,
4119
4129
  isRemoteImage: s
4120
4130
  };
@@ -4124,7 +4134,7 @@ var js = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, tt = (e, t
4124
4134
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
4125
4135
  return i && o && js(t, s, o), o;
4126
4136
  };
4127
- let M = class extends V {
4137
+ let O = class extends V {
4128
4138
  constructor() {
4129
4139
  super(...arguments), this.name = "", this.icon = "", this.tooltip = "", this.disabled = !1, this.selected = !1;
4130
4140
  }
@@ -4143,38 +4153,38 @@ let M = class extends V {
4143
4153
  return l` <slot></slot> `;
4144
4154
  }
4145
4155
  };
4146
- M.styles = B`
4156
+ O.styles = B`
4147
4157
  :host {
4148
4158
  display: none;
4149
4159
  }
4150
4160
  `;
4151
4161
  tt([
4152
4162
  p({ type: String, reflect: !0 })
4153
- ], M.prototype, "name", 2);
4163
+ ], O.prototype, "name", 2);
4154
4164
  tt([
4155
4165
  p({ type: String })
4156
- ], M.prototype, "icon", 2);
4166
+ ], O.prototype, "icon", 2);
4157
4167
  tt([
4158
4168
  p({ type: String })
4159
- ], M.prototype, "tooltip", 2);
4169
+ ], O.prototype, "tooltip", 2);
4160
4170
  tt([
4161
4171
  p({ type: Boolean, reflect: !0 })
4162
- ], M.prototype, "disabled", 2);
4172
+ ], O.prototype, "disabled", 2);
4163
4173
  tt([
4164
4174
  p({ type: Boolean, reflect: !0 })
4165
- ], M.prototype, "selected", 2);
4166
- M = tt([
4167
- F("pc-reaction-icon")
4168
- ], M);
4169
- var Vs = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, N = (e, t, s, i) => {
4170
- for (var o = i > 1 ? void 0 : i ? Hs(t, s) : t, r = e.length - 1, a; r >= 0; r--)
4175
+ ], O.prototype, "selected", 2);
4176
+ O = tt([
4177
+ q("pc-reaction-icon")
4178
+ ], O);
4179
+ const Vs = "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";
4180
+ var Hs = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, N = (e, t, s, i) => {
4181
+ for (var o = i > 1 ? void 0 : i ? Bs(t, s) : t, r = e.length - 1, a; r >= 0; r--)
4171
4182
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
4172
- return i && o && Vs(t, s, o), o;
4183
+ return i && o && Hs(t, s, o), o;
4173
4184
  };
4174
- const Bs = "/src/images/emoji/add_reaction.svg";
4175
4185
  let E = class extends u {
4176
4186
  constructor() {
4177
- super(), this.options = [], this.multiple = !1, this.mode = "compact", this.popupPosition = "auto", this.buttonRadius = "999px", this.normalizedReactions = [], this.slotExists = !1, this.isPopoverVisible = !1, this.isChartVisible = !1, this.handleClickOutside = (e) => {
4187
+ super(), this.options = [], this.multiple = !1, this.compact = !1, this.popupPosition = "auto", this.buttonRadius = "999px", this.normalizedReactions = [], this.slotExists = !1, this.isPopoverVisible = !1, this.isChartVisible = !1, this.handleClickOutside = (e) => {
4178
4188
  var o, r;
4179
4189
  const t = e.target, s = (o = this.shadowRoot) == null ? void 0 : o.querySelector(".popover"), i = (r = this.shadowRoot) == null ? void 0 : r.querySelector(".trigger-btn");
4180
4190
  s && !s.contains(t) && !(i != null && i.contains(t)) && (this.isPopoverVisible = !1);
@@ -4191,7 +4201,7 @@ let E = class extends u {
4191
4201
  getSlottedReactions() {
4192
4202
  var s;
4193
4203
  const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
4194
- return e ? e.assignedElements().filter((i) => i instanceof M).map((i) => ({
4204
+ return e ? e.assignedElements().filter((i) => i instanceof O).map((i) => ({
4195
4205
  name: i.name || i.labelContent || i.icon,
4196
4206
  icon: i.icon,
4197
4207
  tooltip: i.tooltip,
@@ -4247,7 +4257,7 @@ let E = class extends u {
4247
4257
  return (((a = this.localStats.breakdown) == null ? void 0 : a[r]) || 0) > 0;
4248
4258
  }
4249
4259
  );
4250
- this.multiple ? t ? s = i.filter((r) => r !== e.name) : s = [...i, e.name] : t ? s = [] : s = [e.name], this.updateSlottedElementsState(), this.mode === "compact" && (this.isPopoverVisible = !1), this.announceReactionChange(e, !t);
4260
+ this.multiple ? t ? s = i.filter((r) => r !== e.name) : s = [...i, e.name] : t ? s = [] : s = [e.name], this.updateSlottedElementsState(), this.compact && (this.isPopoverVisible = !1), this.announceReactionChange(e, !t);
4251
4261
  const o = s.length;
4252
4262
  await this.handleChange(o, s);
4253
4263
  }
@@ -4259,7 +4269,7 @@ let E = class extends u {
4259
4269
  if (!this.slotExists) return;
4260
4270
  const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
4261
4271
  if (!e) return;
4262
- e.assignedElements().filter((i) => i instanceof M).forEach((i) => {
4272
+ e.assignedElements().filter((i) => i instanceof O).forEach((i) => {
4263
4273
  i.selected = this.isSelected(i.name);
4264
4274
  });
4265
4275
  }
@@ -4327,7 +4337,7 @@ let E = class extends u {
4327
4337
  aria-expanded="${this.isPopoverVisible}"
4328
4338
  aria-haspopup="menu"
4329
4339
  >
4330
- <img src="${Bs}" alt="" class="trigger-icon" />
4340
+ <img src="${Vs}" alt="" class="trigger-icon" />
4331
4341
  </button>
4332
4342
  `;
4333
4343
  }
@@ -4335,7 +4345,7 @@ let E = class extends u {
4335
4345
  * Render the popover for compact mode
4336
4346
  */
4337
4347
  renderPopover() {
4338
- if (!this.isPopoverVisible || this.mode !== "compact") return d;
4348
+ if (!this.isPopoverVisible || !this.compact) return d;
4339
4349
  const e = {
4340
4350
  popover: !0,
4341
4351
  top: this.popupPosition === "top" || this.popupPosition === "auto" && this.shouldShowPopoverOnTop(),
@@ -4380,20 +4390,10 @@ let E = class extends u {
4380
4390
  if (this.normalizedReactions.length === 0) return d;
4381
4391
  const e = {
4382
4392
  reaction: !0,
4383
- expand: this.mode === "expand",
4384
- compact: this.mode === "compact"
4393
+ expand: !this.compact,
4394
+ compact: this.compact
4385
4395
  };
4386
- if (this.mode === "expand")
4387
- return l`
4388
- <div class="${v(e)}">
4389
- <div class="reaction-list">
4390
- ${this.normalizedReactions.map(
4391
- (t) => this.renderReactionButton(t, this.showCounts)
4392
- )}
4393
- </div>
4394
- </div>
4395
- `;
4396
- {
4396
+ if (this.compact) {
4397
4397
  const t = this.getActiveReactions();
4398
4398
  return l`
4399
4399
  <div class="${v(e)}">
@@ -4408,7 +4408,16 @@ let E = class extends u {
4408
4408
  ${this.renderPopover()}
4409
4409
  </div>
4410
4410
  `;
4411
- }
4411
+ } else
4412
+ return l`
4413
+ <div class="${v(e)}">
4414
+ <div class="reaction-list">
4415
+ ${this.normalizedReactions.map(
4416
+ (t) => this.renderReactionButton(t, this.showCounts)
4417
+ )}
4418
+ </div>
4419
+ </div>
4420
+ `;
4412
4421
  }
4413
4422
  /**
4414
4423
  * Render chart for reaction stats
@@ -4426,7 +4435,7 @@ let E = class extends u {
4426
4435
  icon: h && this.renderReactionIcon((h == null ? void 0 : h.icon) || "", h ?? {}) || ""
4427
4436
  };
4428
4437
  }
4429
- ), o = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", r = Mt(s, {
4438
+ ), o = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", r = Ot(s, {
4430
4439
  barColor: o,
4431
4440
  labelFormatter: (n) => `${n}`,
4432
4441
  valueFormatter: (n) => `${t > 0 ? Math.round(n / t * 100) : 0}%`
@@ -4544,10 +4553,10 @@ N([
4544
4553
  p({ type: Boolean, reflect: !0 })
4545
4554
  ], E.prototype, "multiple", 2);
4546
4555
  N([
4547
- p({ type: String })
4548
- ], E.prototype, "mode", 2);
4556
+ p({ type: Boolean, reflect: !0 })
4557
+ ], E.prototype, "compact", 2);
4549
4558
  N([
4550
- p({ type: String, attribute: "popup-position" })
4559
+ p({ type: String })
4551
4560
  ], E.prototype, "popupPosition", 2);
4552
4561
  N([
4553
4562
  p({ type: String, attribute: "button-radius" })
@@ -4565,9 +4574,9 @@ N([
4565
4574
  y()
4566
4575
  ], E.prototype, "isChartVisible", 2);
4567
4576
  E = N([
4568
- F("pc-reaction")
4577
+ q("pc-reaction")
4569
4578
  ], E);
4570
- const Fs = B`
4579
+ const qs = B`
4571
4580
  /* Base variables */
4572
4581
  :host {
4573
4582
  --pc-stars-star-size: clamp(1.2em, calc(1.2em + 0.3vw), 2em);
@@ -4924,7 +4933,7 @@ const Fs = B`
4924
4933
  * Copyright 2018 Google LLC
4925
4934
  * SPDX-License-Identifier: BSD-3-Clause
4926
4935
  */
4927
- const _e = "important", qs = " !" + _e, Ks = Ce(class extends Ee {
4936
+ const _e = "important", Fs = " !" + _e, Ks = Ce(class extends Ee {
4928
4937
  constructor(e) {
4929
4938
  var t;
4930
4939
  if (super(e), e.type !== ke.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.");
@@ -4943,14 +4952,14 @@ const _e = "important", qs = " !" + _e, Ks = Ce(class extends Ee {
4943
4952
  const o = t[i];
4944
4953
  if (o != null) {
4945
4954
  this.ft.add(i);
4946
- const r = typeof o == "string" && o.endsWith(qs);
4955
+ const r = typeof o == "string" && o.endsWith(Fs);
4947
4956
  i.includes("-") || r ? s.setProperty(i, r ? o.slice(0, -11) : o, r ? _e : "") : s[i] = o;
4948
4957
  }
4949
4958
  }
4950
4959
  return H;
4951
4960
  }
4952
4961
  });
4953
- var Ys = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, Z = (e, t, s, i) => {
4962
+ var Ys = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, W = (e, t, s, i) => {
4954
4963
  for (var o = i > 1 ? void 0 : i ? Gs(t, s) : t, r = e.length - 1, a; r >= 0; r--)
4955
4964
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
4956
4965
  return i && o && Ys(t, s, o), o;
@@ -5129,7 +5138,7 @@ let U = class extends u {
5129
5138
  value: c,
5130
5139
  icon: "★"
5131
5140
  })
5132
- ), o = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", r = Mt(s, {
5141
+ ), o = getComputedStyle(this).getPropertyValue("--pc-accent-color").trim() || "#ffc107", r = Ot(s, {
5133
5142
  barColor: o,
5134
5143
  labelFormatter: (n) => `${n}`,
5135
5144
  valueFormatter: (n) => `${t > 0 ? Math.round(n / t * 100) : 0}%`
@@ -5198,32 +5207,32 @@ let U = class extends u {
5198
5207
  `;
5199
5208
  }
5200
5209
  };
5201
- U.styles = [...u.styles, Fs];
5202
- Z([
5210
+ U.styles = [...u.styles, qs];
5211
+ W([
5203
5212
  p({ type: Number, attribute: "num-stars" })
5204
5213
  ], U.prototype, "numStars", 2);
5205
- Z([
5214
+ W([
5206
5215
  p({ type: String, attribute: "default-mode" })
5207
5216
  ], U.prototype, "defaultMode", 2);
5208
- Z([
5217
+ W([
5209
5218
  y()
5210
5219
  ], U.prototype, "isChartVisible", 2);
5211
- Z([
5220
+ W([
5212
5221
  y()
5213
5222
  ], U.prototype, "isEditMode", 2);
5214
- Z([
5223
+ W([
5215
5224
  y()
5216
5225
  ], U.prototype, "hoverValue", 2);
5217
- Z([
5226
+ W([
5218
5227
  y()
5219
5228
  ], U.prototype, "editValue", 2);
5220
- U = Z([
5221
- F("pc-stars")
5229
+ U = W([
5230
+ q("pc-stars")
5222
5231
  ], U);
5223
- var Ws = Object.defineProperty, Zs = Object.getOwnPropertyDescriptor, Pe = (e, t, s, i) => {
5224
- for (var o = i > 1 ? void 0 : i ? Zs(t, s) : t, r = e.length - 1, a; r >= 0; r--)
5232
+ var Zs = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, Te = (e, t, s, i) => {
5233
+ for (var o = i > 1 ? void 0 : i ? Ws(t, s) : t, r = e.length - 1, a; r >= 0; r--)
5225
5234
  (a = e[r]) && (o = (i ? a(t, s, o) : a(o)) || o);
5226
- return i && o && Ws(t, s, o), o;
5235
+ return i && o && Zs(t, s, o), o;
5227
5236
  };
5228
5237
  let Ct = class extends V {
5229
5238
  /**
@@ -5283,18 +5292,18 @@ let Ct = class extends V {
5283
5292
  }
5284
5293
  }
5285
5294
  };
5286
- Pe([
5295
+ Te([
5287
5296
  p({ type: String })
5288
5297
  ], Ct.prototype, "type", 2);
5289
- Ct = Pe([
5290
- F("poll-catch")
5298
+ Ct = Te([
5299
+ q("poll-catch")
5291
5300
  ], Ct);
5292
5301
  export {
5293
- O as PcNps,
5302
+ M as PcNps,
5294
5303
  C as PcPoll,
5295
- P as PcPollOption,
5304
+ T as PcPollOption,
5296
5305
  E as PcReaction,
5297
- M as PcReactionIcon,
5306
+ O as PcReactionIcon,
5298
5307
  U as PcStars,
5299
5308
  $ as PcText,
5300
5309
  Ct as PollCatch