pollcatch 2.3.2 → 2.3.4

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 +2 -2
  2. package/pc.js +250 -192
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pollcatch",
3
3
  "private": false,
4
- "version": "2.3.2",
4
+ "version": "2.3.4",
5
5
  "type": "module",
6
6
  "main": "pc.js",
7
7
  "module": "pc.js",
@@ -25,4 +25,4 @@
25
25
  ],
26
26
  "author": "David Lin <david@pollcatch.com>",
27
27
  "homepage": "https://www.pollcatch.com"
28
- }
28
+ }
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 yt = globalThis, qt = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ht = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
7
- let $e = class {
6
+ const yt = globalThis, Ht = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ft = Symbol(), Qt = /* @__PURE__ */ new WeakMap();
7
+ let Se = class {
8
8
  constructor(t, o, r) {
9
- if (this._$cssResult$ = !0, r !== Ht) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, r !== Ft) 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 (qt && t === void 0) {
15
+ if (Ht && t === void 0) {
16
16
  const r = o !== void 0 && o.length === 1;
17
- r && (t = Jt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Jt.set(o, t));
17
+ r && (t = Qt.get(o)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Qt.set(o, t));
18
18
  }
19
19
  return t;
20
20
  }
@@ -22,33 +22,33 @@ let $e = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const Ue = (e) => new $e(typeof e == "string" ? e : e + "", void 0, Ht), R = (e, ...t) => {
25
+ const qe = (e) => new Se(typeof e == "string" ? e : e + "", void 0, Ft), R = (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 $e(o, e, Ht);
32
- }, qe = (e, t) => {
33
- if (qt) e.adoptedStyleSheets = t.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
31
+ return new Se(o, e, Ft);
32
+ }, He = (e, t) => {
33
+ if (Ht) 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 = yt.litNonce;
36
36
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, e.appendChild(r);
37
37
  }
38
- }, Qt = qt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
38
+ }, te = Ht ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
39
39
  let o = "";
40
40
  for (const r of t.cssRules) o += r.cssText;
41
- return Ue(o);
41
+ return qe(o);
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: He, defineProperty: Fe, getOwnPropertyDescriptor: Ye, getOwnPropertyNames: Ke, getOwnPropertySymbols: Ge, getPrototypeOf: Ze } = Object, V = globalThis, te = V.trustedTypes, We = te ? te.emptyScript : "", Ot = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
48
+ const { is: Fe, defineProperty: Ye, getOwnPropertyDescriptor: Ke, getOwnPropertyNames: Ge, getOwnPropertySymbols: Ze, getPrototypeOf: We } = Object, V = globalThis, ee = V.trustedTypes, Xe = ee ? ee.emptyScript : "", It = V.reactiveElementPolyfillSupport, nt = (e, t) => e, wt = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
- e = e ? We : null;
51
+ e = e ? Xe : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,7 +73,7 @@ const { is: He, defineProperty: Fe, getOwnPropertyDescriptor: Ye, getOwnProperty
73
73
  }
74
74
  }
75
75
  return o;
76
- } }, Ft = (e, t) => !He(e, t), ee = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ft };
76
+ } }, Yt = (e, t) => !Fe(e, t), oe = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Yt };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), V.litPropertyMetadata ?? (V.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
78
  let Q = class extends HTMLElement {
79
79
  static addInitializer(t) {
@@ -82,14 +82,14 @@ let Q = 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 = ee) {
85
+ static createProperty(t, o = oe) {
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
- s !== void 0 && Fe(this.prototype, t, s);
88
+ s !== void 0 && Ye(this.prototype, t, s);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, o, r) {
92
- const { get: s, set: i } = Ye(this.prototype, t) ?? { get() {
92
+ const { get: s, set: i } = Ke(this.prototype, t) ?? { get() {
93
93
  return this[o];
94
94
  }, set(a) {
95
95
  this[o] = a;
@@ -102,17 +102,17 @@ let Q = class extends HTMLElement {
102
102
  }, configurable: !0, enumerable: !0 };
103
103
  }
104
104
  static getPropertyOptions(t) {
105
- return this.elementProperties.get(t) ?? ee;
105
+ return this.elementProperties.get(t) ?? oe;
106
106
  }
107
107
  static _$Ei() {
108
108
  if (this.hasOwnProperty(nt("elementProperties"))) return;
109
- const t = Ze(this);
109
+ const t = We(this);
110
110
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
111
111
  }
112
112
  static finalize() {
113
113
  if (this.hasOwnProperty(nt("finalized"))) return;
114
114
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(nt("properties"))) {
115
- const o = this.properties, r = [...Ke(o), ...Ge(o)];
115
+ const o = this.properties, r = [...Ge(o), ...Ze(o)];
116
116
  for (const s of r) this.createProperty(s, o[s]);
117
117
  }
118
118
  const t = this[Symbol.metadata];
@@ -131,8 +131,8 @@ let Q = 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(Qt(s));
135
- } else t !== void 0 && o.push(Qt(t));
134
+ for (const s of r) o.unshift(te(s));
135
+ } else t !== void 0 && o.push(te(t));
136
136
  return o;
137
137
  }
138
138
  static _$Eu(t, o) {
@@ -161,7 +161,7 @@ let Q = class extends HTMLElement {
161
161
  }
162
162
  createRenderRoot() {
163
163
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return qe(t, this.constructor.elementStyles), t;
164
+ return He(t, this.constructor.elementStyles), t;
165
165
  }
166
166
  connectedCallback() {
167
167
  var t;
@@ -200,7 +200,7 @@ let Q = 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 ?? Ft)(this[t], o)) return;
203
+ if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? Yt)(this[t], o)) return;
204
204
  this.P(t, o, r);
205
205
  }
206
206
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
@@ -273,48 +273,48 @@ let Q = class extends HTMLElement {
273
273
  firstUpdated(t) {
274
274
  }
275
275
  };
276
- Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[nt("elementProperties")] = /* @__PURE__ */ new Map(), Q[nt("finalized")] = /* @__PURE__ */ new Map(), Ot == null || Ot({ ReactiveElement: Q }), (V.reactiveElementVersions ?? (V.reactiveElementVersions = [])).push("2.0.4");
276
+ Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[nt("elementProperties")] = /* @__PURE__ */ new Map(), Q[nt("finalized")] = /* @__PURE__ */ new Map(), It == null || It({ ReactiveElement: Q }), (V.reactiveElementVersions ?? (V.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 lt = globalThis, $t = lt.trustedTypes, oe = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Se = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, Ce = "?" + B, Xe = `<${Ce}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Yt = Array.isArray, Je = (e) => Yt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", It = `[
283
- \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, se = />/g, Y = RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, ae = /"/g, ke = /^(?:script|style|textarea|title)$/i, Qe = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = Qe(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
285
- function Ee(e, t) {
286
- if (!Yt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return oe !== void 0 ? oe.createHTML(t) : t;
282
+ const lt = globalThis, $t = lt.trustedTypes, re = $t ? $t.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ce = "$lit$", B = `lit$${Math.random().toFixed(9).slice(2)}$`, ke = "?" + B, Je = `<${ke}>`, G = document, dt = () => G.createComment(""), pt = (e) => e === null || typeof e != "object" && typeof e != "function", Kt = Array.isArray, Qe = (e) => Kt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", zt = `[
283
+ \f\r]`, it = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, ie = />/g, Y = RegExp(`>|${zt}(?:([^\\s"'>=/]+)(${zt}*=${zt}*(?:[^
284
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ae = /'/g, ne = /"/g, Ee = /^(?:script|style|textarea|title)$/i, to = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = to(1), U = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), le = /* @__PURE__ */ new WeakMap(), K = G.createTreeWalker(G, 129);
285
+ function Ae(e, t) {
286
+ if (!Kt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
+ return re !== void 0 ? re.createHTML(t) : t;
288
288
  }
289
- const to = (e, t) => {
289
+ const eo = (e, t) => {
290
290
  const o = e.length - 1, r = [];
291
291
  let s, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = it;
292
292
  for (let l = 0; l < o; l++) {
293
293
  const n = e[l];
294
294
  let d, p, h = -1, b = 0;
295
- for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === it ? p[1] === "!--" ? a = re : p[1] !== void 0 ? a = se : p[2] !== void 0 ? (ke.test(p[2]) && (s = RegExp("</" + p[2], "g")), a = Y) : p[3] !== void 0 && (a = Y) : a === Y ? p[0] === ">" ? (a = s ?? it, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? Y : p[3] === '"' ? ae : ie) : a === ae || a === ie ? a = Y : a === re || a === se ? a = it : (a = Y, s = void 0);
295
+ for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === it ? p[1] === "!--" ? a = se : p[1] !== void 0 ? a = ie : p[2] !== void 0 ? (Ee.test(p[2]) && (s = RegExp("</" + p[2], "g")), a = Y) : p[3] !== void 0 && (a = Y) : a === Y ? p[0] === ">" ? (a = s ?? it, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? Y : p[3] === '"' ? ne : ae) : a === ne || a === ae ? a = Y : a === se || a === ie ? a = it : (a = Y, s = void 0);
296
296
  const x = a === Y && e[l + 1].startsWith("/>") ? " " : "";
297
- i += a === it ? n + Xe : h >= 0 ? (r.push(d), n.slice(0, h) + Se + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
297
+ i += a === it ? n + Je : h >= 0 ? (r.push(d), n.slice(0, h) + Ce + n.slice(h) + B + x) : n + B + (h === -2 ? l : x);
298
298
  }
299
- return [Ee(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
299
+ return [Ae(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
300
300
  };
301
- let Ut = class Ae {
301
+ let qt = class Pe {
302
302
  constructor({ strings: t, _$litType$: o }, r) {
303
303
  let s;
304
304
  this.parts = [];
305
305
  let i = 0, a = 0;
306
- const l = t.length - 1, n = this.parts, [d, p] = to(t, o);
307
- if (this.el = Ae.createElement(d, r), K.currentNode = this.el.content, o === 2 || o === 3) {
306
+ const l = t.length - 1, n = this.parts, [d, p] = eo(t, o);
307
+ if (this.el = Pe.createElement(d, r), K.currentNode = this.el.content, o === 2 || o === 3) {
308
308
  const h = this.el.content.firstChild;
309
309
  h.replaceWith(...h.childNodes);
310
310
  }
311
311
  for (; (s = K.nextNode()) !== null && n.length < l; ) {
312
312
  if (s.nodeType === 1) {
313
- if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Se)) {
313
+ if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Ce)) {
314
314
  const b = p[a++], x = s.getAttribute(h).split(B), E = /([.?@])?(.*)/.exec(b);
315
- n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? oo : E[1] === "?" ? ro : E[1] === "@" ? so : Et }), s.removeAttribute(h);
315
+ n.push({ type: 1, index: i, name: E[2], strings: x, ctor: E[1] === "." ? ro : E[1] === "?" ? so : E[1] === "@" ? io : Et }), s.removeAttribute(h);
316
316
  } else h.startsWith(B) && (n.push({ type: 6, index: i }), s.removeAttribute(h));
317
- if (ke.test(s.tagName)) {
317
+ if (Ee.test(s.tagName)) {
318
318
  const h = s.textContent.split(B), b = h.length - 1;
319
319
  if (b > 0) {
320
320
  s.textContent = $t ? $t.emptyScript : "";
@@ -322,7 +322,7 @@ let Ut = class Ae {
322
322
  s.append(h[b], dt());
323
323
  }
324
324
  }
325
- } else if (s.nodeType === 8) if (s.data === Ce) n.push({ type: 2, index: i });
325
+ } else if (s.nodeType === 8) if (s.data === ke) n.push({ type: 2, index: i });
326
326
  else {
327
327
  let h = -1;
328
328
  for (; (h = s.data.indexOf(B, h + 1)) !== -1; ) n.push({ type: 7, index: i }), h += B.length - 1;
@@ -342,7 +342,7 @@ function et(e, t, o = e, r) {
342
342
  const i = pt(t) ? void 0 : t._$litDirective$;
343
343
  return (s == null ? void 0 : s.constructor) !== i && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), i === void 0 ? s = void 0 : (s = new i(e), s._$AT(e, o, r)), r !== void 0 ? (o._$Co ?? (o._$Co = []))[r] = s : o._$Cl = s), s !== void 0 && (t = et(e, s._$AS(e, t.values), s, r)), t;
344
344
  }
345
- let eo = class {
345
+ let oo = class {
346
346
  constructor(t, o) {
347
347
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
348
348
  }
@@ -359,7 +359,7 @@ let eo = class {
359
359
  for (; n !== void 0; ) {
360
360
  if (a === n.index) {
361
361
  let d;
362
- n.type === 2 ? d = new ut(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new io(i, this, t)), this._$AV.push(d), n = r[++l];
362
+ n.type === 2 ? d = new ut(i, i.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(i, n.name, n.strings, this, t) : n.type === 6 && (d = new ao(i, this, t)), this._$AV.push(d), n = r[++l];
363
363
  }
364
364
  a !== (n == null ? void 0 : n.index) && (i = K.nextNode(), a++);
365
365
  }
@@ -390,7 +390,7 @@ class ut {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(t, o = this) {
393
- t = et(this, t, o), pt(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Je(t) ? this.k(t) : this._(t);
393
+ t = et(this, t, o), pt(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Qe(t) ? this.k(t) : this._(t);
394
394
  }
395
395
  O(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -403,19 +403,19 @@ class ut {
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 = Ut.createElement(Ee(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 = qt.createElement(Ae(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
- const a = new eo(s, this), l = a.u(this.options);
409
+ const a = new oo(s, this), l = a.u(this.options);
410
410
  a.p(o), this.T(l), this._$AH = a;
411
411
  }
412
412
  }
413
413
  _$AC(t) {
414
- let o = ne.get(t.strings);
415
- return o === void 0 && ne.set(t.strings, o = new Ut(t)), o;
414
+ let o = le.get(t.strings);
415
+ return o === void 0 && le.set(t.strings, o = new qt(t)), o;
416
416
  }
417
417
  k(t) {
418
- Yt(this._$AH) || (this._$AH = [], this._$AR());
418
+ Kt(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 ut(this.O(dt()), this.O(dt()), this, this.options)) : r = o[s], r._$AI(i), s++;
@@ -458,7 +458,7 @@ class Et {
458
458
  t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- let oo = class extends Et {
461
+ let ro = class extends Et {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
@@ -466,7 +466,7 @@ let oo = class extends Et {
466
466
  this.element[this.name] = t === u ? void 0 : t;
467
467
  }
468
468
  };
469
- class ro extends Et {
469
+ class so extends Et {
470
470
  constructor() {
471
471
  super(...arguments), this.type = 4;
472
472
  }
@@ -474,7 +474,7 @@ class ro extends Et {
474
474
  this.element.toggleAttribute(this.name, !!t && t !== u);
475
475
  }
476
476
  }
477
- class so extends Et {
477
+ class io extends Et {
478
478
  constructor(t, o, r, s, i) {
479
479
  super(t, o, r, s, i), this.type = 5;
480
480
  }
@@ -488,7 +488,7 @@ class so extends Et {
488
488
  typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, t) : this._$AH.handleEvent(t);
489
489
  }
490
490
  }
491
- class io {
491
+ class ao {
492
492
  constructor(t, o, r) {
493
493
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
494
494
  }
@@ -499,9 +499,9 @@ class io {
499
499
  et(this, t);
500
500
  }
501
501
  }
502
- const zt = lt.litHtmlPolyfillSupport;
503
- zt == null || zt(Ut, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
- const ao = (e, t, o) => {
502
+ const Mt = lt.litHtmlPolyfillSupport;
503
+ Mt == null || Mt(qt, ut), (lt.litHtmlVersions ?? (lt.litHtmlVersions = [])).push("3.2.1");
504
+ const no = (e, t, o) => {
505
505
  const r = (o == null ? void 0 : o.renderBefore) ?? t;
506
506
  let s = r._$litPart$;
507
507
  if (s === void 0) {
@@ -526,7 +526,7 @@ let N = class extends Q {
526
526
  }
527
527
  update(t) {
528
528
  const o = this.render();
529
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ao(o, this.renderRoot, this.renderOptions);
529
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = no(o, this.renderRoot, this.renderOptions);
530
530
  }
531
531
  connectedCallback() {
532
532
  var t;
@@ -540,10 +540,10 @@ let N = class extends Q {
540
540
  return U;
541
541
  }
542
542
  };
543
- var we;
544
- N._$litElement$ = !0, N.finalized = !0, (we = globalThis.litElementHydrateSupport) == null || we.call(globalThis, { LitElement: N });
545
- const Mt = globalThis.litElementPolyfillSupport;
546
- Mt == null || Mt({ LitElement: N });
543
+ var $e;
544
+ N._$litElement$ = !0, N.finalized = !0, ($e = globalThis.litElementHydrateSupport) == null || $e.call(globalThis, { LitElement: N });
545
+ const Lt = globalThis.litElementPolyfillSupport;
546
+ Lt == null || Lt({ LitElement: N });
547
547
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
548
548
  /**
549
549
  * @license
@@ -560,7 +560,7 @@ const H = (e) => (t, o) => {
560
560
  * Copyright 2017 Google LLC
561
561
  * SPDX-License-Identifier: BSD-3-Clause
562
562
  */
563
- const no = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Ft }, lo = (e = no, t, o) => {
563
+ const lo = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: Yt }, co = (e = lo, 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") {
@@ -582,7 +582,7 @@ const no = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged
582
582
  throw Error("Unsupported decorator location: " + r);
583
583
  };
584
584
  function f(e) {
585
- return (t, o) => typeof o == "object" ? lo(e, t, o) : ((r, s, i) => {
585
+ return (t, o) => typeof o == "object" ? co(e, t, o) : ((r, s, i) => {
586
586
  const a = s.hasOwnProperty(i);
587
587
  return s.constructor.createProperty(i, a ? { ...r, wrapped: !0 } : r), a ? Object.getOwnPropertyDescriptor(s, i) : void 0;
588
588
  })(e, t, o);
@@ -600,7 +600,7 @@ function k(e) {
600
600
  * Copyright 2017 Google LLC
601
601
  * SPDX-License-Identifier: BSD-3-Clause
602
602
  */
603
- const co = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
603
+ const po = (e, t, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, o), o);
604
604
  /**
605
605
  * @license
606
606
  * Copyright 2017 Google LLC
@@ -612,13 +612,13 @@ function ht(e, t) {
612
612
  var l;
613
613
  return ((l = a.renderRoot) == null ? void 0 : l.querySelector(e)) ?? null;
614
614
  };
615
- return co(o, r, { get() {
615
+ return po(o, r, { get() {
616
616
  return i(this);
617
617
  } });
618
618
  };
619
619
  }
620
620
  var S = /* @__PURE__ */ ((e) => (e.reaction = "reaction", e.stars = "stars", e.poll = "poll", e.text = "text", e.nps = "nps", e))(S || {});
621
- const Kt = c`
621
+ const Gt = c`
622
622
  <svg
623
623
  xmlns="http://www.w3.org/2000/svg"
624
624
  height="24px"
@@ -628,7 +628,7 @@ const Kt = c`
628
628
  >
629
629
  <path d="M640-160v-280h160v280H640Zm-240 0v-640h160v640H400Zm-240 0v-440h160v440H160Z" />
630
630
  </svg>
631
- `, Gt = c`
631
+ `, Zt = c`
632
632
  <svg
633
633
  xmlns="http://www.w3.org/2000/svg"
634
634
  height="24px"
@@ -652,7 +652,7 @@ const Kt = c`
652
652
  d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"
653
653
  />
654
654
  </svg>
655
- `, po = c`
655
+ `, At = c`
656
656
  <svg
657
657
  xmlns="http://www.w3.org/2000/svg"
658
658
  width="16"
@@ -664,7 +664,7 @@ const Kt = c`
664
664
  d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"
665
665
  />
666
666
  </svg>
667
- `, Pe = c`
667
+ `, Te = c`
668
668
  <svg
669
669
  xmlns="http://www.w3.org/2000/svg"
670
670
  height="24px"
@@ -681,116 +681,116 @@ var uo = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
681
681
  return t === void 0 && (t = 0), o === void 0 && (o = Math.pow(10, t)), Math.round(o * e) / o + 0;
682
682
  }, A = function(e, t, o) {
683
683
  return t === void 0 && (t = 0), o === void 0 && (o = 1), e > o ? o : e > t ? e : t;
684
- }, Te = function(e) {
684
+ }, _e = function(e) {
685
685
  return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
686
- }, le = function(e) {
686
+ }, ce = function(e) {
687
687
  return { r: A(e.r, 0, 255), g: A(e.g, 0, 255), b: A(e.b, 0, 255), a: A(e.a) };
688
- }, Lt = function(e) {
688
+ }, Nt = function(e) {
689
689
  return { r: $(e.r), g: $(e.g), b: $(e.b), a: $(e.a, 3) };
690
690
  }, ho = /^#([0-9a-f]{3,8})$/i, vt = function(e) {
691
691
  var t = e.toString(16);
692
692
  return t.length < 2 ? "0" + t : t;
693
- }, _e = function(e) {
693
+ }, Oe = function(e) {
694
694
  var t = e.r, o = e.g, r = e.b, s = e.a, i = Math.max(t, o, r), a = i - Math.min(t, o, r), l = a ? i === t ? (o - r) / a : i === o ? 2 + (r - t) / a : 4 + (t - o) / a : 0;
695
695
  return { h: 60 * (l < 0 ? l + 6 : l), s: i ? a / i * 100 : 0, v: i / 255 * 100, a: s };
696
- }, Oe = function(e) {
696
+ }, Ie = function(e) {
697
697
  var t = e.h, o = e.s, r = e.v, s = e.a;
698
698
  t = t / 360 * 6, o /= 100, r /= 100;
699
699
  var i = Math.floor(t), a = r * (1 - o), l = r * (1 - (t - i) * o), n = r * (1 - (1 - t + i) * o), d = i % 6;
700
700
  return { r: 255 * [r, l, a, a, n, r][d], g: 255 * [n, r, r, l, a, a][d], b: 255 * [a, a, n, r, r, l][d], a: s };
701
- }, ce = function(e) {
702
- return { h: Te(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
703
701
  }, de = function(e) {
704
- return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
702
+ return { h: _e(e.h), s: A(e.s, 0, 100), l: A(e.l, 0, 100), a: A(e.a) };
705
703
  }, pe = function(e) {
706
- return Oe((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 }));
704
+ return { h: $(e.h), s: $(e.s), l: $(e.l), a: $(e.a, 3) };
705
+ }, ue = function(e) {
706
+ return Ie((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 }));
707
707
  var t, o, r;
708
708
  }, ct = function(e) {
709
- return { h: (t = _e(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 };
709
+ return { h: (t = Oe(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 };
710
710
  var t, o, r, s;
711
- }, fo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, go = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, mo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, vo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ue = { string: [[function(e) {
711
+ }, fo = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, go = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, mo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, vo = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, he = { string: [[function(e) {
712
712
  var t = ho.exec(e);
713
713
  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;
714
714
  }, "hex"], [function(e) {
715
715
  var t = mo.exec(e) || vo.exec(e);
716
- return t ? t[2] !== t[4] || t[4] !== t[6] ? null : le({ 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;
716
+ return t ? t[2] !== t[4] || t[4] !== t[6] ? null : ce({ 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;
717
717
  }, "rgb"], [function(e) {
718
718
  var t = fo.exec(e) || go.exec(e);
719
719
  if (!t) return null;
720
- var o, r, s = ce({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (uo[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
721
- return pe(s);
720
+ var o, r, s = de({ h: (o = t[1], r = t[2], r === void 0 && (r = "deg"), Number(o) * (uo[r] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
721
+ return ue(s);
722
722
  }, "hsl"]], object: [[function(e) {
723
723
  var t = e.r, o = e.g, r = e.b, s = e.a, i = s === void 0 ? 1 : s;
724
- return z(t) && z(o) && z(r) ? le({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
724
+ return z(t) && z(o) && z(r) ? ce({ r: Number(t), g: Number(o), b: Number(r), a: Number(i) }) : null;
725
725
  }, "rgb"], [function(e) {
726
726
  var t = e.h, o = e.s, r = e.l, s = e.a, i = s === void 0 ? 1 : s;
727
727
  if (!z(t) || !z(o) || !z(r)) return null;
728
- var a = ce({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
729
- return pe(a);
728
+ var a = de({ h: Number(t), s: Number(o), l: Number(r), a: Number(i) });
729
+ return ue(a);
730
730
  }, "hsl"], [function(e) {
731
731
  var t = e.h, o = e.s, r = e.v, s = e.a, i = s === void 0 ? 1 : s;
732
732
  if (!z(t) || !z(o) || !z(r)) return null;
733
733
  var a = function(l) {
734
- return { h: Te(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
734
+ return { h: _e(l.h), s: A(l.s, 0, 100), v: A(l.v, 0, 100), a: A(l.a) };
735
735
  }({ h: Number(t), s: Number(o), v: Number(r), a: Number(i) });
736
- return Oe(a);
737
- }, "hsv"]] }, he = function(e, t) {
736
+ return Ie(a);
737
+ }, "hsv"]] }, fe = function(e, t) {
738
738
  for (var o = 0; o < t.length; o++) {
739
739
  var r = t[o][0](e);
740
740
  if (r) return [r, t[o][1]];
741
741
  }
742
742
  return [null, void 0];
743
743
  }, bo = function(e) {
744
- return typeof e == "string" ? he(e.trim(), ue.string) : typeof e == "object" && e !== null ? he(e, ue.object) : [null, void 0];
745
- }, Nt = function(e, t) {
744
+ return typeof e == "string" ? fe(e.trim(), he.string) : typeof e == "object" && e !== null ? fe(e, he.object) : [null, void 0];
745
+ }, Dt = function(e, t) {
746
746
  var o = ct(e);
747
747
  return { h: o.h, s: A(o.s + 100 * t, 0, 100), l: o.l, a: o.a };
748
- }, Dt = function(e) {
748
+ }, Rt = function(e) {
749
749
  return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
750
- }, fe = function(e, t) {
750
+ }, ge = function(e, t) {
751
751
  var o = ct(e);
752
752
  return { h: o.h, s: o.s, l: A(o.l + 100 * t, 0, 100), a: o.a };
753
- }, ge = function() {
753
+ }, me = function() {
754
754
  function e(t) {
755
755
  this.parsed = bo(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
756
756
  }
757
757
  return e.prototype.isValid = function() {
758
758
  return this.parsed !== null;
759
759
  }, e.prototype.brightness = function() {
760
- return $(Dt(this.rgba), 2);
760
+ return $(Rt(this.rgba), 2);
761
761
  }, e.prototype.isDark = function() {
762
- return Dt(this.rgba) < 0.5;
762
+ return Rt(this.rgba) < 0.5;
763
763
  }, e.prototype.isLight = function() {
764
- return Dt(this.rgba) >= 0.5;
764
+ return Rt(this.rgba) >= 0.5;
765
765
  }, e.prototype.toHex = function() {
766
- return t = Lt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? vt($(255 * i)) : "", "#" + vt(o) + vt(r) + vt(s) + a;
766
+ return t = Nt(this.rgba), o = t.r, r = t.g, s = t.b, a = (i = t.a) < 1 ? vt($(255 * i)) : "", "#" + vt(o) + vt(r) + vt(s) + a;
767
767
  var t, o, r, s, i, a;
768
768
  }, e.prototype.toRgb = function() {
769
- return Lt(this.rgba);
769
+ return Nt(this.rgba);
770
770
  }, e.prototype.toRgbString = function() {
771
- return t = Lt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
771
+ return t = Nt(this.rgba), o = t.r, r = t.g, s = t.b, (i = t.a) < 1 ? "rgba(" + o + ", " + r + ", " + s + ", " + i + ")" : "rgb(" + o + ", " + r + ", " + s + ")";
772
772
  var t, o, r, s, i;
773
773
  }, e.prototype.toHsl = function() {
774
- return de(ct(this.rgba));
774
+ return pe(ct(this.rgba));
775
775
  }, e.prototype.toHslString = function() {
776
- return t = de(ct(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
776
+ return t = pe(ct(this.rgba)), o = t.h, r = t.s, s = t.l, (i = t.a) < 1 ? "hsla(" + o + ", " + r + "%, " + s + "%, " + i + ")" : "hsl(" + o + ", " + r + "%, " + s + "%)";
777
777
  var t, o, r, s, i;
778
778
  }, e.prototype.toHsv = function() {
779
- return t = _e(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
779
+ return t = Oe(this.rgba), { h: $(t.h), s: $(t.s), v: $(t.v), a: $(t.a, 3) };
780
780
  var t;
781
781
  }, e.prototype.invert = function() {
782
782
  return T({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
783
783
  var t;
784
784
  }, e.prototype.saturate = function(t) {
785
- return t === void 0 && (t = 0.1), T(Nt(this.rgba, t));
785
+ return t === void 0 && (t = 0.1), T(Dt(this.rgba, t));
786
786
  }, e.prototype.desaturate = function(t) {
787
- return t === void 0 && (t = 0.1), T(Nt(this.rgba, -t));
787
+ return t === void 0 && (t = 0.1), T(Dt(this.rgba, -t));
788
788
  }, e.prototype.grayscale = function() {
789
- return T(Nt(this.rgba, -1));
789
+ return T(Dt(this.rgba, -1));
790
790
  }, e.prototype.lighten = function(t) {
791
- return t === void 0 && (t = 0.1), T(fe(this.rgba, t));
791
+ return t === void 0 && (t = 0.1), T(ge(this.rgba, t));
792
792
  }, e.prototype.darken = function(t) {
793
- return t === void 0 && (t = 0.1), T(fe(this.rgba, -t));
793
+ return t === void 0 && (t = 0.1), T(ge(this.rgba, -t));
794
794
  }, e.prototype.rotate = function(t) {
795
795
  return t === void 0 && (t = 15), this.hue(this.hue() + t);
796
796
  }, e.prototype.alpha = function(t) {
@@ -803,19 +803,19 @@ var uo = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, z = function(e) {
803
803
  return this.toHex() === T(t).toHex();
804
804
  }, e;
805
805
  }(), T = function(e) {
806
- return e instanceof ge ? e : new ge(e);
806
+ return e instanceof me ? e : new me(e);
807
807
  };
808
- const Rt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
808
+ const jt = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
809
809
  function yo(e) {
810
810
  return {
811
811
  debug: (t, ...o) => {
812
- Rt && console.debug(`[${e}]`, t, ...o);
812
+ jt && console.debug(`[${e}]`, t, ...o);
813
813
  },
814
814
  info: (t, ...o) => {
815
- Rt && console.info(`[${e}]`, t, ...o);
815
+ jt && console.info(`[${e}]`, t, ...o);
816
816
  },
817
817
  warn: (t, ...o) => {
818
- Rt && console.warn(`[${e}]`, t, ...o);
818
+ jt && console.warn(`[${e}]`, t, ...o);
819
819
  },
820
820
  error: (t, ...o) => {
821
821
  console.error(`[${e}]`, t, ...o);
@@ -823,7 +823,7 @@ function yo(e) {
823
823
  };
824
824
  }
825
825
  const m = yo("Pollcatch");
826
- var Ie = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(Ie || {});
826
+ var ze = /* @__PURE__ */ ((e) => (e[e.AA_NORMAL = 4.5] = "AA_NORMAL", e[e.AA_LARGE = 3] = "AA_LARGE", e[e.AAA_NORMAL = 7] = "AAA_NORMAL", e[e.AAA_LARGE = 4.5] = "AAA_LARGE", e))(ze || {});
827
827
  const xo = {
828
828
  black: "#000000",
829
829
  white: "#ffffff",
@@ -845,11 +845,11 @@ function wo(e) {
845
845
  const t = e.toLowerCase().trim();
846
846
  return xo[t] || null;
847
847
  }
848
- function jt(e, t) {
849
- const o = me(e), r = me(t), s = Math.max(o, r), i = Math.min(o, r);
848
+ function Bt(e, t) {
849
+ const o = ve(e), r = ve(t), s = Math.max(o, r), i = Math.min(o, r);
850
850
  return (s + 0.05) / (i + 0.05);
851
851
  }
852
- function me(e) {
852
+ function ve(e) {
853
853
  const t = So(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), l = s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
854
854
  return 0.2126 * i + 0.7152 * a + 0.0722 * l;
855
855
  }
@@ -867,15 +867,15 @@ function $o(e, t = {}) {
867
867
  } = t, l = s.map((p) => p === "black" ? "#000000" : p === "white" ? "#ffffff" : p === "light" ? i.light || "#f8f9fa" : p === "dark" ? i.dark || "#343a40" : p);
868
868
  let n = a, d = 0;
869
869
  for (const p of l) {
870
- const h = jt(e, p);
870
+ const h = Bt(e, p);
871
871
  h >= r && h > d && (d = h, n = p);
872
872
  }
873
873
  if (d === 0) {
874
- const p = jt(e, a);
874
+ const p = Bt(e, a);
875
875
  n = a, d = p;
876
876
  for (const h of l) {
877
877
  if (h === a) continue;
878
- const b = jt(e, h);
878
+ const b = Bt(e, h);
879
879
  b > d && (d = b, n = h);
880
880
  }
881
881
  m.warn(
@@ -903,7 +903,7 @@ function O(e, t) {
903
903
  }[t] : void 0;
904
904
  return e === "left" || e === "right" ? r || "center" : e === "top" || e === "bottom" ? r || "start" : r || "center";
905
905
  }
906
- function Bt(e, t = "1rem", o = 1) {
906
+ function Vt(e, t = "1rem", o = 1) {
907
907
  if (!e) return t;
908
908
  const r = {
909
909
  xs: 0.7,
@@ -969,7 +969,7 @@ function Eo(e, t, o, r = !1) {
969
969
  ariaDisabled: o
970
970
  });
971
971
  }
972
- function Vt(e, t, o) {
972
+ function Ut(e, t, o) {
973
973
  typeof o == "boolean" ? e.setAttribute(t, o ? "true" : "false") : e.setAttribute(t, o);
974
974
  }
975
975
  function Ao(e) {
@@ -993,14 +993,14 @@ function To(e) {
993
993
  (t, o, r, s, i) => s ? t : `${o}: ${r.trim()} !important${i}`
994
994
  );
995
995
  }
996
- const ve = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", _o = "pc_session_id", Oo = 24 * 60 * 60 * 1e3;
997
- function be() {
996
+ const be = "https://jpxwfjorwcsrqraorpbj.supabase.co/functions/v1/data", _o = "pc_session_id", Oo = 24 * 60 * 60 * 1e3;
997
+ function ye() {
998
998
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (m.warn("crypto.randomUUID not available, using fallback UUID generator"), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
999
999
  const t = Math.random() * 16 | 0;
1000
1000
  return (e === "x" ? t : t & 3 | 8).toString(16);
1001
1001
  }));
1002
1002
  }
1003
- function Zt() {
1003
+ function Wt() {
1004
1004
  const e = "test-local-storage";
1005
1005
  try {
1006
1006
  return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
@@ -1008,7 +1008,7 @@ function Zt() {
1008
1008
  return m.warn("localStorage not available, session ID will not persist"), !1;
1009
1009
  }
1010
1010
  }
1011
- function ze(e) {
1011
+ function Me(e) {
1012
1012
  try {
1013
1013
  const t = localStorage.getItem(e);
1014
1014
  return t ? JSON.parse(t) : void 0;
@@ -1017,7 +1017,7 @@ function ze(e) {
1017
1017
  return;
1018
1018
  }
1019
1019
  }
1020
- function Me(e, t) {
1020
+ function Le(e, t) {
1021
1021
  try {
1022
1022
  return localStorage.setItem(e, JSON.stringify(t)), !0;
1023
1023
  } catch (o) {
@@ -1037,23 +1037,23 @@ async function Io() {
1037
1037
  }
1038
1038
  m.warn("No project key found in global variable or script tags");
1039
1039
  }
1040
- async function ye() {
1040
+ async function xe() {
1041
1041
  const e = _o, t = Oo;
1042
- if (Zt()) {
1043
- const o = ze(e);
1042
+ if (Wt()) {
1043
+ const o = Me(e);
1044
1044
  if (o && o.id && o.timestamp && Date.now() - o.timestamp < t)
1045
1045
  return m.debug("Using existing session ID from localStorage"), o.id;
1046
1046
  m.debug(
1047
1047
  o ? "Session ID expired" : "No session ID found",
1048
1048
  "generating new one"
1049
1049
  );
1050
- const r = be();
1051
- return Me(e, {
1050
+ const r = ye();
1051
+ return Le(e, {
1052
1052
  id: r,
1053
1053
  timestamp: Date.now()
1054
1054
  }) ? m.debug("Generated and stored new session ID") : m.warn("Generated session ID but failed to store it"), r;
1055
1055
  } else {
1056
- const o = be();
1056
+ const o = ye();
1057
1057
  return m.debug("Generated non-persistent session ID"), o;
1058
1058
  }
1059
1059
  }
@@ -1107,20 +1107,20 @@ function L() {
1107
1107
  };
1108
1108
  }
1109
1109
  function No(e) {
1110
- if (!Zt())
1110
+ if (!Wt())
1111
1111
  return L();
1112
1112
  try {
1113
- const t = ze(e);
1113
+ const t = Me(e);
1114
1114
  return t ? { ...L(), ...t } : L();
1115
1115
  } catch (t) {
1116
1116
  return m.warn("Failed to load localStats from localStorage", t), L();
1117
1117
  }
1118
1118
  }
1119
1119
  function Do(e, t) {
1120
- if (!Zt())
1120
+ if (!Wt())
1121
1121
  return !1;
1122
1122
  try {
1123
- return Me(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1123
+ return Le(e, t) ? (m.debug("Saved localStats to localStorage", t), !0) : !1;
1124
1124
  } catch (o) {
1125
1125
  return m.warn("Failed to save localStats to localStorage", o), !1;
1126
1126
  }
@@ -1161,10 +1161,10 @@ function jo(e, t) {
1161
1161
  }
1162
1162
  return o.nps = Ct((o == null ? void 0 : o.breakdown) || {}), o;
1163
1163
  }
1164
- function Le(e) {
1164
+ function Ne(e) {
1165
1165
  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);
1166
1166
  }
1167
- function At(e) {
1167
+ function Pt(e) {
1168
1168
  if (!e || typeof e != "string")
1169
1169
  return !1;
1170
1170
  const t = e.trim();
@@ -1222,7 +1222,7 @@ class Ho {
1222
1222
  return this.host.project || await Io() || "public";
1223
1223
  }
1224
1224
  async getLocalStatsKey() {
1225
- const t = this.host, o = await ye(), r = await this.getProjectId(), s = t.name || "unnamed";
1225
+ const t = this.host, o = await xe(), r = await this.getProjectId(), s = t.name || "unnamed";
1226
1226
  return `pc-local-stats-${o}-${r}-${s}`;
1227
1227
  }
1228
1228
  /**
@@ -1262,7 +1262,7 @@ class Ho {
1262
1262
  } else
1263
1263
  l = a || {};
1264
1264
  } else {
1265
- const C = t.dataEndpoint || ve;
1265
+ const C = t.dataEndpoint || be;
1266
1266
  if (!r)
1267
1267
  throw new Error("Name parameter is required");
1268
1268
  const P = `${C}/${encodeURIComponent(o)}/${encodeURIComponent(r)}`;
@@ -1365,7 +1365,7 @@ class Ho {
1365
1365
  async submitStats() {
1366
1366
  if (!this.hasLocalStats() && !this.hasInteracted)
1367
1367
  throw m.warn("No local stats to submit"), new Error("No local stats to submit");
1368
- const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await ye(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, l = Object.keys(this.localStats.breakdown || {}), n = this.prevLocalStats.sum, d = Object.keys(this.prevLocalStats.breakdown || {});
1368
+ const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await xe(), s = await this.getProjectId(), i = t.name || "", a = this.localStats.sum, l = Object.keys(this.localStats.breakdown || {}), n = this.prevLocalStats.sum, d = Object.keys(this.prevLocalStats.breakdown || {});
1369
1369
  this.isSubmitting = !0, this.host.requestUpdate();
1370
1370
  const p = {
1371
1371
  sessionId: r,
@@ -1390,12 +1390,12 @@ class Ho {
1390
1390
  return p;
1391
1391
  }
1392
1392
  async sendStats(t) {
1393
- const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || ve;
1393
+ const o = JSON.stringify(t), r = this.host, s = r.dataEndpoint || be;
1394
1394
  if (r.dataFunc) {
1395
1395
  m.debug("Skip sending stats as data function is in use.");
1396
1396
  return;
1397
1397
  }
1398
- if (!At(s))
1398
+ if (!Pt(s))
1399
1399
  throw m.error("Invalid data endpoint", { dataEndpoint: s }), new Error(`Invalid data endpoint: ${s}`);
1400
1400
  try {
1401
1401
  if (m.debug("Sending stats", { endpoint: s, event: t }), typeof navigator < "u" && navigator.sendBeacon)
@@ -1564,10 +1564,15 @@ class Fo {
1564
1564
  }
1565
1565
  /**
1566
1566
  * Determine if stats should be shown
1567
+ * show-stats attribute values:
1568
+ * - undefined: don't show stats (default when attribute is absent)
1569
+ * - 'never': don't show stats
1570
+ * - 'always' or '' (empty/boolean style): always show stats
1571
+ * - 'after-vote': show stats after user interaction
1567
1572
  */
1568
1573
  shouldShowStats() {
1569
1574
  const t = this.host;
1570
- return t.showStats === void 0 || t.showStats === "never" ? !1 : t.showStats === "always" || t.showStats === "" || t.readonly && t.showStats === "after-vote" ? !0 : t.hasEditButton && this.isEditing ? !1 : this.dataController.hasLocalStats() || this.dataController.hasInteracted;
1575
+ return t.showStats === void 0 || t.showStats === "never" ? !1 : t.showStats === "after-vote" ? t.readonly ? !0 : t.hasEditButton && this.isEditing ? !1 : this.dataController.hasLocalStats() || this.dataController.hasInteracted : !0;
1571
1576
  }
1572
1577
  shouldShowFooter() {
1573
1578
  return this.shouldShowSubmitButton() || this.shouldShowStats();
@@ -1603,8 +1608,8 @@ class Fo {
1603
1608
  return !(this.host.readonly || !this.isEditing);
1604
1609
  }
1605
1610
  }
1606
- var Wt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Wt || {});
1607
- function Ne(e, t = {}) {
1611
+ var Xt = /* @__PURE__ */ ((e) => (e.DECORATIVE = "decorative", e.FUNCTIONAL = "functional", e.STATUS = "status", e))(Xt || {});
1612
+ function De(e, t = {}) {
1608
1613
  const { type: o = "functional", alt: r, ariaLabel: s, isSelected: i } = t;
1609
1614
  if (!e)
1610
1615
  return { alt: "", ariaHidden: !0 };
@@ -1613,7 +1618,7 @@ function Ne(e, t = {}) {
1613
1618
  o === "functional" && !r && !s && console.warn(
1614
1619
  "No alt text or aria-label provided for functional icon. This may cause accessibility issues."
1615
1620
  );
1616
- const a = i ? " (selected)" : "", l = At(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1621
+ const a = i ? " (selected)" : "", l = Pt(e) && !r ? "" : r || e, n = s || (l ? `${l}${a}` : a);
1617
1622
  return {
1618
1623
  alt: l,
1619
1624
  ariaLabel: n,
@@ -1634,8 +1639,8 @@ function Ko(e, t) {
1634
1639
  * Copyright 2017 Google LLC
1635
1640
  * SPDX-License-Identifier: BSD-3-Clause
1636
1641
  */
1637
- const De = { ATTRIBUTE: 1 }, Re = (e) => (...t) => ({ _$litDirective$: e, values: t });
1638
- let je = class {
1642
+ const Re = { ATTRIBUTE: 1 }, je = (e) => (...t) => ({ _$litDirective$: e, values: t });
1643
+ let Be = class {
1639
1644
  constructor(t) {
1640
1645
  }
1641
1646
  get _$AU() {
@@ -1656,10 +1661,10 @@ let je = class {
1656
1661
  * Copyright 2018 Google LLC
1657
1662
  * SPDX-License-Identifier: BSD-3-Clause
1658
1663
  */
1659
- const y = Re(class extends je {
1664
+ const y = je(class extends Be {
1660
1665
  constructor(e) {
1661
1666
  var t;
1662
- if (super(e), e.type !== De.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1667
+ if (super(e), e.type !== Re.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1663
1668
  }
1664
1669
  render(e) {
1665
1670
  return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
@@ -1689,9 +1694,9 @@ const bt = {
1689
1694
  mobile: "480px",
1690
1695
  tablet: "768px",
1691
1696
  desktop: "1024px"
1692
- }, Xt = class Xt extends N {
1697
+ }, Jt = class Jt extends N {
1693
1698
  constructor() {
1694
- super(...arguments), this.dataController = new Ho(this), this.displayController = new Fo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Ie.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.inline = !1, this.readonly = !1, this.handleEditToggleKeyDown = (t) => {
1699
+ super(...arguments), this.dataController = new Ho(this), this.displayController = new Fo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = ze.AA_NORMAL, this.options = [], this.project = "public", this.questionPosition = "top", this.statsText = "{count} votes", this.buttonText = "Submit", this.buttonRadius = "sm", this.multiple = !1, this.inline = !1, this.readonly = !1, this.handleEditToggleKeyDown = (t) => {
1695
1700
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
1696
1701
  };
1697
1702
  }
@@ -1757,17 +1762,17 @@ const bt = {
1757
1762
  const s = this.starHoverColor || (r ? `color-mix(in srgb, ${J(r)} 80%, white)` : null);
1758
1763
  if (s && (o += `--pc-star-hover-color: ${s} !important;
1759
1764
  `), this.starSize) {
1760
- const i = Bt(this.starSize, "1.5em", 1.5);
1765
+ const i = Vt(this.starSize, "1.5em", 1.5);
1761
1766
  o += `--pc-stars-star-size: ${i} !important;
1762
1767
  `;
1763
1768
  }
1764
1769
  if (this.reactionSize) {
1765
- const i = Bt(this.reactionSize, "1em", 1);
1770
+ const i = Vt(this.reactionSize, "1em", 1);
1766
1771
  o += `--pc-reaction-size: ${i} !important;
1767
1772
  `;
1768
1773
  }
1769
1774
  if (this.size) {
1770
- const i = Bt(this.size);
1775
+ const i = Vt(this.size);
1771
1776
  o += `font-size: ${i} !important;
1772
1777
  `;
1773
1778
  }
@@ -1783,7 +1788,7 @@ const bt = {
1783
1788
  * Update ARIA attributes for accessibility
1784
1789
  */
1785
1790
  updateAriaAttributes() {
1786
- this.ariaLabel && Vt(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Vt(this, "aria-describedby", this.ariaDescribedby), Vt(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1791
+ this.ariaLabel && Ut(this, "aria-label", this.ariaLabel), this.ariaDescribedby && Ut(this, "aria-describedby", this.ariaDescribedby), Ut(this, "aria-busy", this.dataController.isLoading ? "true" : "false");
1787
1792
  }
1788
1793
  /**
1789
1794
  * Update host CSS classes based on state
@@ -1858,7 +1863,7 @@ const bt = {
1858
1863
  tabindex="0"
1859
1864
  aria-label="${this.displayController.isChartVisible ? "Hide chart" : "Show chart"}"
1860
1865
  @keydown="${() => this.displayController.toggleChartVisibility()}"
1861
- >${this.displayController.isChartVisible ? Gt : Kt}</span
1866
+ >${this.displayController.isChartVisible ? Zt : Gt}</span
1862
1867
  >
1863
1868
  ` : u;
1864
1869
  }
@@ -1897,7 +1902,7 @@ const bt = {
1897
1902
  @click="${() => this.displayController.toggleThankYouVisibility(!1)}"
1898
1903
  role="button"
1899
1904
  aria-label="Close"
1900
- >${po}</span
1905
+ >${At}</span
1901
1906
  >
1902
1907
  </div>
1903
1908
  </div>
@@ -1905,7 +1910,7 @@ const bt = {
1905
1910
  `;
1906
1911
  }
1907
1912
  };
1908
- Xt.styles = [
1913
+ Jt.styles = [
1909
1914
  R`
1910
1915
  :host {
1911
1916
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
@@ -1986,7 +1991,7 @@ Xt.styles = [
1986
1991
  }
1987
1992
  `
1988
1993
  ];
1989
- let g = Xt;
1994
+ let g = Jt;
1990
1995
  v([
1991
1996
  f({ type: String, attribute: "show-stats" })
1992
1997
  ], g.prototype, "showStats");
@@ -2543,7 +2548,7 @@ const Zo = R`
2543
2548
  animation: none;
2544
2549
  }
2545
2550
  }
2546
- `, Pt = R`
2551
+ `, Tt = R`
2547
2552
  /* Default values for CSS variables - can be overridden by external :root or parent definitions */
2548
2553
  :host {
2549
2554
  --default-primary-color: #2196f3;
@@ -3012,12 +3017,41 @@ const Zo = R`
3012
3017
 
3013
3018
  /* Shared popover content container */
3014
3019
  .pc-popover-content {
3020
+ position: relative;
3015
3021
  display: flex;
3016
3022
  flex-direction: column;
3017
3023
  gap: 0.75rem;
3018
3024
  min-width: 200px;
3019
3025
  }
3020
3026
 
3027
+ /* Popover close button */
3028
+ .pc-popover-close {
3029
+ position: absolute;
3030
+ top: -8px;
3031
+ right: -8px;
3032
+ display: flex;
3033
+ align-items: center;
3034
+ justify-content: center;
3035
+ width: 28px;
3036
+ height: 28px;
3037
+ padding: 0;
3038
+ border: none;
3039
+ background: transparent;
3040
+ cursor: pointer;
3041
+ opacity: 0.5;
3042
+ transition: opacity 0.15s ease;
3043
+ color: var(--pc-text-color, var(--default-text-color));
3044
+ }
3045
+
3046
+ .pc-popover-close:hover {
3047
+ opacity: 1;
3048
+ }
3049
+
3050
+ .pc-popover-close svg {
3051
+ width: 18px;
3052
+ height: 18px;
3053
+ }
3054
+
3021
3055
  .pc-popover-question {
3022
3056
  font-size: 1em;
3023
3057
  font-weight: 500;
@@ -3844,7 +3878,7 @@ let I = class extends g {
3844
3878
  const e = this.dataController.stats, t = (e == null ? void 0 : e.nps) ?? 0, o = 100, r = 100, s = 80, i = (w) => ({
3845
3879
  x: o + s * Math.cos(w),
3846
3880
  y: r - s * Math.sin(w)
3847
- }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Ve = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Ve} 1 ${mt.x} ${mt.y}`, h = p(a, l), b = p(l, n), x = p(n, d), C = ((w) => Math.PI - (w + 100) / 200 * Math.PI)(t), P = i(C);
3881
+ }), a = i(Math.PI), l = i(Math.PI / 2), n = i(Math.PI / 4), d = i(0), p = (w, mt, Ue = 0) => `M ${w.x} ${w.y} A ${s} ${s} 0 ${Ue} 1 ${mt.x} ${mt.y}`, h = p(a, l), b = p(l, n), x = p(n, d), C = ((w) => Math.PI - (w + 100) / 200 * Math.PI)(t), P = i(C);
3848
3882
  return c`
3849
3883
  <div class="nps-semicircle-gauge" data-testid="nps-semicircle-gauge">
3850
3884
  <svg viewBox="0 0 200 115">
@@ -3975,7 +4009,7 @@ let I = class extends g {
3975
4009
  * Shows add icon when no selection, edit icon when user has submitted
3976
4010
  */
3977
4011
  renderInlineTrigger() {
3978
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Pe;
4012
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Te;
3979
4013
  return c`
3980
4014
  <button
3981
4015
  class="pc-inline-trigger"
@@ -4041,7 +4075,7 @@ let I = class extends g {
4041
4075
  @keydown="${(e) => {
4042
4076
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
4043
4077
  }}"
4044
- >${this.displayController.isChartVisible ? Gt : Kt}</span
4078
+ >${this.displayController.isChartVisible ? Zt : Gt}</span
4045
4079
  >
4046
4080
  `;
4047
4081
  }
@@ -4054,6 +4088,14 @@ let I = class extends g {
4054
4088
  const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", o = this.showChart, r = !!t || o;
4055
4089
  return c`
4056
4090
  <div class="pc-popover-content" data-testid="nps-popover-content">
4091
+ <button
4092
+ class="pc-popover-close"
4093
+ @click=${() => this.popoverOpen = !1}
4094
+ aria-label="Close"
4095
+ data-testid="popover-close-button"
4096
+ >
4097
+ ${At}
4098
+ </button>
4057
4099
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
4058
4100
  ${this.renderPopoverNpsButtons()}
4059
4101
  ${r ? c`
@@ -4125,7 +4167,7 @@ let I = class extends g {
4125
4167
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4126
4168
  }
4127
4169
  };
4128
- I.styles = [...g.styles, Pt, Zo];
4170
+ I.styles = [...g.styles, Tt, Zo];
4129
4171
  F([
4130
4172
  f({ type: String, attribute: "min-label" })
4131
4173
  ], I.prototype, "minLabel", 2);
@@ -4598,16 +4640,16 @@ let W = class extends g {
4598
4640
  */
4599
4641
  renderOptionIcon(e) {
4600
4642
  if (!(e != null && e.icon)) return "";
4601
- const t = Wt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = Ne(e == null ? void 0 : e.icon, {
4643
+ const t = Xt.DECORATIVE, o = (e == null ? void 0 : e.label) || "", r = e ? this.dataController.isValueSelected(e.value) : !1, s = De(e == null ? void 0 : e.icon, {
4602
4644
  type: t,
4603
4645
  alt: o,
4604
4646
  isSelected: r
4605
4647
  });
4606
- return Le(e == null ? void 0 : e.icon) ? c`<span
4648
+ return Ne(e == null ? void 0 : e.icon) ? c`<span
4607
4649
  class="poll-option-icon"
4608
4650
  aria-hidden="${s.ariaHidden ? "true" : "false"}"
4609
4651
  >${e == null ? void 0 : e.icon}</span
4610
- >` : At(e == null ? void 0 : e.icon) ? c`<img
4652
+ >` : Pt(e == null ? void 0 : e.icon) ? c`<img
4611
4653
  src="${e == null ? void 0 : e.icon}"
4612
4654
  alt="${s.alt}"
4613
4655
  class="poll-option-icon-img"
@@ -4793,7 +4835,7 @@ let W = class extends g {
4793
4835
  * Shows add icon when no selection, edit icon when user has submitted
4794
4836
  */
4795
4837
  renderInlineTrigger() {
4796
- const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Pe;
4838
+ const t = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = this.dataController.hasLocalStats() ? St : Te;
4797
4839
  return c`
4798
4840
  <button
4799
4841
  class="pc-inline-trigger"
@@ -4846,6 +4888,14 @@ let W = class extends g {
4846
4888
  const e = this.displayController.shouldShowChart(), o = this.displayController.shouldShowStats() && this.statsText ? this.dataController.formatStatsText(this.statsText) : "", r = e && !this.readonly;
4847
4889
  return c`
4848
4890
  <div class="pc-popover-content" data-testid="poll-popover-content">
4891
+ <button
4892
+ class="pc-popover-close"
4893
+ @click=${() => this.popoverOpen = !1}
4894
+ aria-label="Close"
4895
+ data-testid="popover-close-button"
4896
+ >
4897
+ ${At}
4898
+ </button>
4849
4899
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
4850
4900
  ${e ? this.renderBarChart() : this.renderPollOptions()}
4851
4901
  ${e ? u : this.renderPopoverSubmitButton()}
@@ -4947,7 +4997,7 @@ let W = class extends g {
4947
4997
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
4948
4998
  }
4949
4999
  };
4950
- W.styles = [...g.styles, Pt, nr];
5000
+ W.styles = [...g.styles, Tt, nr];
4951
5001
  gt([
4952
5002
  f({ type: Boolean })
4953
5003
  ], W.prototype, "multiple", 2);
@@ -5150,10 +5200,10 @@ const dr = R`
5150
5200
  * Copyright 2018 Google LLC
5151
5201
  * SPDX-License-Identifier: BSD-3-Clause
5152
5202
  */
5153
- const Be = "important", pr = " !" + Be, ur = Re(class extends je {
5203
+ const Ve = "important", pr = " !" + Ve, ur = je(class extends Be {
5154
5204
  constructor(e) {
5155
5205
  var t;
5156
- if (super(e), e.type !== De.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.");
5206
+ if (super(e), e.type !== Re.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.");
5157
5207
  }
5158
5208
  render(e) {
5159
5209
  return Object.keys(e).reduce((t, o) => {
@@ -5170,7 +5220,7 @@ const Be = "important", pr = " !" + Be, ur = Re(class extends je {
5170
5220
  if (s != null) {
5171
5221
  this.ft.add(r);
5172
5222
  const i = typeof s == "string" && s.endsWith(pr);
5173
- r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Be : "") : o[r] = s;
5223
+ r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Ve : "") : o[r] = s;
5174
5224
  }
5175
5225
  }
5176
5226
  return U;
@@ -5205,7 +5255,7 @@ function xt(e, t = {}) {
5205
5255
  </div>
5206
5256
  `;
5207
5257
  }
5208
- const xe = {
5258
+ const we = {
5209
5259
  // Faces
5210
5260
  smile: "😊",
5211
5261
  laugh: "😄",
@@ -5350,7 +5400,7 @@ const xe = {
5350
5400
  };
5351
5401
  function kt(e) {
5352
5402
  let t = "❓", o = !1;
5353
- return e ? e in xe ? t = xe[e] : Le(e) ? t = e : At(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
5403
+ return e ? e in we ? t = we[e] : Ne(e) ? t = e : Pt(e) ? (o = !0, t = e) : /^\w+@\w+$/.test(e) ? t = e : e.endsWith(".svg") && !e.includes("/") ? (t = `https://cdn.jsdelivr.net/npm/@mdi/svg@7.4.47/svg/${e}`, o = !0) : t = e : t = "❓", {
5354
5404
  icon: t,
5355
5405
  isRemoteImage: o
5356
5406
  };
@@ -5534,6 +5584,14 @@ let q = class extends g {
5534
5584
  const e = this.statsText ? this.dataController.formatStatsText(this.statsText) : "", t = this.showChart, o = !!e || t;
5535
5585
  return c`
5536
5586
  <div class="pc-popover-content" data-testid="stars-popover-content">
5587
+ <button
5588
+ class="pc-popover-close"
5589
+ @click=${() => this.popoverOpen = !1}
5590
+ aria-label="Close"
5591
+ data-testid="popover-close-button"
5592
+ >
5593
+ ${At}
5594
+ </button>
5537
5595
  ${this.question ? c`<div class="pc-popover-question">${this.question}</div>` : u}
5538
5596
  ${this.renderStars(!0)}
5539
5597
  ${o ? c`
@@ -5581,7 +5639,7 @@ let q = class extends g {
5581
5639
  @keydown="${(e) => {
5582
5640
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.displayController.toggleChartVisibility());
5583
5641
  }}"
5584
- >${this.displayController.isChartVisible ? Gt : Kt}</span
5642
+ >${this.displayController.isChartVisible ? Zt : Gt}</span
5585
5643
  >
5586
5644
  `;
5587
5645
  }
@@ -5662,7 +5720,7 @@ let q = class extends g {
5662
5720
  return this.inline ? this.renderInlineMode() : this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
5663
5721
  }
5664
5722
  };
5665
- q.styles = [...g.styles, Pt, dr];
5723
+ q.styles = [...g.styles, Tt, dr];
5666
5724
  st([
5667
5725
  f({ type: String })
5668
5726
  ], q.prototype, "icon", 2);
@@ -5945,7 +6003,7 @@ const gr = R`
5945
6003
  }
5946
6004
  }
5947
6005
  `, mr = "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";
5948
- var vr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
6006
+ var vr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, _t = (e, t, o, r) => {
5949
6007
  for (var s = r > 1 ? void 0 : r ? br(t, o) : t, i = e.length - 1, a; i >= 0; i--)
5950
6008
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
5951
6009
  return r && s && vr(t, o, s), s;
@@ -5974,7 +6032,7 @@ let ot = class extends g {
5974
6032
  * Renders the icon for a reaction
5975
6033
  */
5976
6034
  renderReactionIcon(e, t) {
5977
- const { icon: o, isRemoteImage: r } = kt(e), s = Wt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = Ne(o, {
6035
+ const { icon: o, isRemoteImage: r } = kt(e), s = Xt.FUNCTIONAL, i = t.tooltip || `${t.value} reaction`, a = De(o, {
5978
6036
  type: s,
5979
6037
  alt: i,
5980
6038
  ariaLabel: i,
@@ -6190,17 +6248,17 @@ let ot = class extends g {
6190
6248
  return this.readonly ? this.renderReadonlyMode() : this.renderStandardMode();
6191
6249
  }
6192
6250
  };
6193
- ot.styles = [...g.styles, Pt, gr];
6194
- Tt([
6251
+ ot.styles = [...g.styles, Tt, gr];
6252
+ _t([
6195
6253
  f({ type: Boolean, attribute: "show-counts" })
6196
6254
  ], ot.prototype, "showCounts", 2);
6197
- Tt([
6255
+ _t([
6198
6256
  f({ type: Boolean, reflect: !0 })
6199
6257
  ], ot.prototype, "compact", 2);
6200
- Tt([
6258
+ _t([
6201
6259
  f({ type: String, attribute: "popup-position" })
6202
6260
  ], ot.prototype, "popupPosition", 2);
6203
- ot = Tt([
6261
+ ot = _t([
6204
6262
  H("pc-reaction")
6205
6263
  ], ot);
6206
6264
  function at(e, t, o = void 0) {
@@ -6211,7 +6269,7 @@ function yr(e, t = void 0) {
6211
6269
  const o = e.textContent;
6212
6270
  return o === "" || o === null ? t : o == null ? void 0 : o.trim();
6213
6271
  }
6214
- var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, _t = (e, t, o, r) => {
6272
+ var xr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, Ot = (e, t, o, r) => {
6215
6273
  for (var s = r > 1 ? void 0 : r ? wr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
6216
6274
  (a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
6217
6275
  return r && s && xr(t, o, s), s;
@@ -6312,16 +6370,16 @@ let rt = class extends N {
6312
6370
  }
6313
6371
  }
6314
6372
  };
6315
- _t([
6373
+ Ot([
6316
6374
  f({ type: String })
6317
6375
  ], rt.prototype, "type", 2);
6318
- _t([
6376
+ Ot([
6319
6377
  f({ type: String })
6320
6378
  ], rt.prototype, "options", 2);
6321
- _t([
6379
+ Ot([
6322
6380
  k()
6323
6381
  ], rt.prototype, "parsedOptions", 2);
6324
- rt = _t([
6382
+ rt = Ot([
6325
6383
  H("poll-catch")
6326
6384
  ], rt);
6327
6385
  export {