pollcatch 2.5.5 → 2.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/pc.js +80 -74
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pollcatch",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.7",
|
|
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
|
@@ -22,7 +22,7 @@ let ke = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Ke = (e) => new ke(typeof e == "string" ? e : e + "", void 0, Yt),
|
|
25
|
+
const Ke = (e) => new ke(typeof e == "string" ? e : e + "", void 0, Yt), 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;
|
|
@@ -279,7 +279,7 @@ et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[lt("elementPr
|
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const ct = globalThis, St = ct.trustedTypes, se = St ? St.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ee = "$lit$",
|
|
282
|
+
const ct = globalThis, St = ct.trustedTypes, se = St ? St.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ee = "$lit$", V = `lit$${Math.random().toFixed(9).slice(2)}$`, Ae = "?" + V, oo = `<${Ae}>`, G = document, pt = () => G.createComment(""), ut = (e) => e === null || typeof e != "object" && typeof e != "function", Wt = Array.isArray, ro = (e) => Wt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", Mt = `[
|
|
283
283
|
\f\r]`, at = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ie = /-->/g, ae = />/g, K = RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
|
|
284
284
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), ne = /'/g, le = /"/g, Pe = /^(?:script|style|textarea|title)$/i, so = (e) => (t, ...o) => ({ _$litType$: e, strings: t, values: o }), c = so(1), q = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ce = /* @__PURE__ */ new WeakMap(), W = G.createTreeWalker(G, 129);
|
|
285
285
|
function Te(e, t) {
|
|
@@ -294,7 +294,7 @@ const io = (e, t) => {
|
|
|
294
294
|
let d, p, h = -1, b = 0;
|
|
295
295
|
for (; b < n.length && (a.lastIndex = b, p = a.exec(n), p !== null); ) b = a.lastIndex, a === at ? p[1] === "!--" ? a = ie : p[1] !== void 0 ? a = ae : p[2] !== void 0 ? (Pe.test(p[2]) && (s = RegExp("</" + p[2], "g")), a = K) : p[3] !== void 0 && (a = K) : a === K ? p[0] === ">" ? (a = s ?? at, h = -1) : p[1] === void 0 ? h = -2 : (h = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? K : p[3] === '"' ? le : ne) : a === le || a === ne ? a = K : a === ie || a === ae ? a = at : (a = K, s = void 0);
|
|
296
296
|
const w = a === K && e[l + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
i += a === at ? n + oo : h >= 0 ? (r.push(d), n.slice(0, h) + Ee + n.slice(h) +
|
|
297
|
+
i += a === at ? n + oo : h >= 0 ? (r.push(d), n.slice(0, h) + Ee + n.slice(h) + V + w) : n + V + (h === -2 ? l : w);
|
|
298
298
|
}
|
|
299
299
|
return [Te(e, i + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
300
300
|
};
|
|
@@ -311,11 +311,11 @@ let Ht = class _e {
|
|
|
311
311
|
for (; (s = W.nextNode()) !== null && n.length < l; ) {
|
|
312
312
|
if (s.nodeType === 1) {
|
|
313
313
|
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Ee)) {
|
|
314
|
-
const b = p[a++], w = s.getAttribute(h).split(
|
|
314
|
+
const b = p[a++], w = s.getAttribute(h).split(V), E = /([.?@])?(.*)/.exec(b);
|
|
315
315
|
n.push({ type: 1, index: i, name: E[2], strings: w, ctor: E[1] === "." ? no : E[1] === "?" ? lo : E[1] === "@" ? co : At }), s.removeAttribute(h);
|
|
316
|
-
} else h.startsWith(
|
|
316
|
+
} else h.startsWith(V) && (n.push({ type: 6, index: i }), s.removeAttribute(h));
|
|
317
317
|
if (Pe.test(s.tagName)) {
|
|
318
|
-
const h = s.textContent.split(
|
|
318
|
+
const h = s.textContent.split(V), b = h.length - 1;
|
|
319
319
|
if (b > 0) {
|
|
320
320
|
s.textContent = St ? St.emptyScript : "";
|
|
321
321
|
for (let w = 0; w < b; w++) s.append(h[w], pt()), W.nextNode(), n.push({ type: 2, index: ++i });
|
|
@@ -325,7 +325,7 @@ let Ht = class _e {
|
|
|
325
325
|
} else if (s.nodeType === 8) if (s.data === Ae) n.push({ type: 2, index: i });
|
|
326
326
|
else {
|
|
327
327
|
let h = -1;
|
|
328
|
-
for (; (h = s.data.indexOf(
|
|
328
|
+
for (; (h = s.data.indexOf(V, h + 1)) !== -1; ) n.push({ type: 7, index: i }), h += V.length - 1;
|
|
329
329
|
}
|
|
330
330
|
i++;
|
|
331
331
|
}
|
|
@@ -515,7 +515,7 @@ const uo = (e, t, o) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let
|
|
518
|
+
let N = class extends et {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -541,9 +541,9 @@ let D = class extends et {
|
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
var Ce;
|
|
544
|
-
|
|
544
|
+
N._$litElement$ = !0, N.finalized = !0, (Ce = globalThis.litElementHydrateSupport) == null || Ce.call(globalThis, { LitElement: N });
|
|
545
545
|
const Nt = globalThis.litElementPolyfillSupport;
|
|
546
|
-
Nt == null || Nt({ LitElement:
|
|
546
|
+
Nt == null || Nt({ LitElement: N });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
@@ -1091,7 +1091,7 @@ function Vo(e, t) {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
return { avg: s > 0 ? Math.round(r / s * 10) / 10 : 0, count: s, sum: r, breakdown: o };
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function U() {
|
|
1095
1095
|
return {
|
|
1096
1096
|
count: 0,
|
|
1097
1097
|
sum: 0,
|
|
@@ -1103,12 +1103,12 @@ function N() {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
function Uo(e) {
|
|
1105
1105
|
if (!Xt())
|
|
1106
|
-
return
|
|
1106
|
+
return U();
|
|
1107
1107
|
try {
|
|
1108
1108
|
const t = Ne(e);
|
|
1109
|
-
return t ? { ...
|
|
1109
|
+
return t ? { ...U(), ...t } : U();
|
|
1110
1110
|
} catch (t) {
|
|
1111
|
-
return g.warn("Failed to load localStats from localStorage", t),
|
|
1111
|
+
return g.warn("Failed to load localStats from localStorage", t), U();
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
function jo(e, t) {
|
|
@@ -1137,7 +1137,7 @@ function qo(e, t) {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
function Ho(e, t) {
|
|
1139
1139
|
if (!e.count && !t.count)
|
|
1140
|
-
return
|
|
1140
|
+
return U();
|
|
1141
1141
|
if (!e.count)
|
|
1142
1142
|
return { ...t };
|
|
1143
1143
|
const o = {
|
|
@@ -1248,7 +1248,7 @@ async function Go(e, t, o) {
|
|
|
1248
1248
|
class Zo {
|
|
1249
1249
|
// Set when a fatal error occurs (e.g. type mismatch for registered widget)
|
|
1250
1250
|
constructor(t) {
|
|
1251
|
-
this.stats =
|
|
1251
|
+
this.stats = U(), this.localStats = U(), this.isLoading = !0, this.isLoadingConfig = !1, this.isSubmitting = !1, this.hasInteracted = !1, this.hasError = !1, (this.host = t).addController(this);
|
|
1252
1252
|
}
|
|
1253
1253
|
hostConnected() {
|
|
1254
1254
|
this.loadStats();
|
|
@@ -1280,20 +1280,28 @@ class Zo {
|
|
|
1280
1280
|
*/
|
|
1281
1281
|
applyWidgetAttributes(t) {
|
|
1282
1282
|
if (!t) return;
|
|
1283
|
-
const o = typeof t.attributes == "object" && t.attributes !== null && !Array.isArray(t.attributes) ? t.attributes : t, r = this.host, s = r;
|
|
1284
|
-
for (
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1283
|
+
const o = typeof t.attributes == "object" && t.attributes !== null && !Array.isArray(t.attributes) ? t.attributes : t, r = this.host, s = r, i = /* @__PURE__ */ new Set(["type", "options", "initialized", "num-stars", "multiple"]), a = /* @__PURE__ */ new Set();
|
|
1284
|
+
for (let l = 0; l < s.attributes.length; l++) {
|
|
1285
|
+
const n = s.attributes[l];
|
|
1286
|
+
n && !i.has(n.name) && a.add(n.name);
|
|
1287
|
+
}
|
|
1288
|
+
for (const [l, n] of Object.entries(o)) {
|
|
1289
|
+
if (n == null) continue;
|
|
1290
|
+
if (l === "options" && typeof n == "string") {
|
|
1291
|
+
const p = Be(n);
|
|
1292
|
+
r.options = p.map((h) => ({
|
|
1293
|
+
value: h,
|
|
1294
|
+
label: h,
|
|
1295
|
+
icon: r.type === $.reaction ? h : void 0
|
|
1296
|
+
})), g.debug("Applied widget options as property:", p);
|
|
1297
|
+
continue;
|
|
1298
|
+
}
|
|
1299
|
+
const d = l.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
1300
|
+
if (a.has(d)) {
|
|
1301
|
+
g.debug(`Skipping server attribute "${d}" — overridden by inline attribute`);
|
|
1293
1302
|
continue;
|
|
1294
1303
|
}
|
|
1295
|
-
|
|
1296
|
-
typeof a == "boolean" ? a ? s.setAttribute(l, "") : s.removeAttribute(l) : typeof a == "object" ? s.setAttribute(l, JSON.stringify(a)) : s.setAttribute(l, String(a)), g.debug(`Applied widget attribute: ${l}=${a}`);
|
|
1304
|
+
typeof n == "boolean" ? n ? s.setAttribute(d, "") : s.removeAttribute(d) : typeof n == "object" ? s.setAttribute(d, JSON.stringify(n)) : s.setAttribute(d, String(n)), g.debug(`Applied widget attribute: ${d}=${n}`);
|
|
1297
1305
|
}
|
|
1298
1306
|
}
|
|
1299
1307
|
/**
|
|
@@ -1386,9 +1394,9 @@ class Zo {
|
|
|
1386
1394
|
const t = await this.getLocalStatsKey();
|
|
1387
1395
|
try {
|
|
1388
1396
|
const o = Uo(t);
|
|
1389
|
-
g.debug("Loaded localStats from localStorage", o), this.localStats = o
|
|
1397
|
+
g.debug("Loaded localStats from localStorage", o), this.localStats = o;
|
|
1390
1398
|
} catch (o) {
|
|
1391
|
-
g.warn("Failed to generate localStorage key for localStats", o), this.localStats =
|
|
1399
|
+
g.warn("Failed to generate localStorage key for localStats", o), this.localStats = U();
|
|
1392
1400
|
}
|
|
1393
1401
|
this.host.requestUpdate();
|
|
1394
1402
|
}
|
|
@@ -1426,17 +1434,17 @@ class Zo {
|
|
|
1426
1434
|
}, o && o.length > 0)
|
|
1427
1435
|
for (const r of o)
|
|
1428
1436
|
r && (this.localStats.breakdown[r] = 1);
|
|
1429
|
-
this.stats = Ho(this.stats, this.localStats), g.debug("Stats updated - remote: ", this.stats), g.debug("Stats updated - local: ", this.
|
|
1437
|
+
this.stats = Ho(this.stats, this.localStats), g.debug("Stats updated - remote: ", this.stats), g.debug("Stats updated - local: ", this.localStats), this.persistLocalStats(), this.host.requestUpdate();
|
|
1430
1438
|
}
|
|
1431
1439
|
async markStatsAsSubmitted() {
|
|
1432
|
-
this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(),
|
|
1440
|
+
this.localStats.submitted = (/* @__PURE__ */ new Date()).toISOString(), await this.persistLocalStats(), this.host.requestUpdate();
|
|
1433
1441
|
}
|
|
1434
1442
|
async submitStats() {
|
|
1435
1443
|
if (!this.hasLocalStats() && !this.hasInteracted)
|
|
1436
1444
|
throw g.warn("No local stats to submit"), new Error("No local stats to submit");
|
|
1437
|
-
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await xe(), s = this.localStats.sum, i = Object.keys(this.localStats.breakdown || {})
|
|
1445
|
+
const t = this.host, o = Math.floor(Date.now() / 1e3).toString(), r = await xe(), s = this.localStats.sum, i = Object.keys(this.localStats.breakdown || {});
|
|
1438
1446
|
this.isSubmitting = !0, this.host.requestUpdate();
|
|
1439
|
-
const
|
|
1447
|
+
const a = {
|
|
1440
1448
|
sessionId: r,
|
|
1441
1449
|
widgetId: t.widgetId,
|
|
1442
1450
|
widgetName: t.name,
|
|
@@ -1444,19 +1452,17 @@ class Zo {
|
|
|
1444
1452
|
url: window.location.href,
|
|
1445
1453
|
numericValue: s,
|
|
1446
1454
|
textValues: i,
|
|
1447
|
-
prevNumericValue: a,
|
|
1448
|
-
prevTextValues: l,
|
|
1449
1455
|
metadata: t.metadata,
|
|
1450
1456
|
timestamp: o
|
|
1451
|
-
},
|
|
1457
|
+
}, l = Yo(JSON.stringify(a), o);
|
|
1452
1458
|
try {
|
|
1453
|
-
await this.sendStats({ ...
|
|
1454
|
-
} catch (
|
|
1455
|
-
g.warn("Failed to send stats event",
|
|
1459
|
+
await this.sendStats({ ...a, hash: l }), await this.markStatsAsSubmitted(), this.dispatchSubmitEvent(a);
|
|
1460
|
+
} catch (n) {
|
|
1461
|
+
g.warn("Failed to send stats event", n);
|
|
1456
1462
|
} finally {
|
|
1457
1463
|
this.isSubmitting = !1, this.host.requestUpdate();
|
|
1458
1464
|
}
|
|
1459
|
-
return
|
|
1465
|
+
return a;
|
|
1460
1466
|
}
|
|
1461
1467
|
async sendStats(t) {
|
|
1462
1468
|
const o = this.host, r = this.getWidgetIdentifier();
|
|
@@ -1750,7 +1756,7 @@ const yt = {
|
|
|
1750
1756
|
mobile: "480px",
|
|
1751
1757
|
tablet: "768px",
|
|
1752
1758
|
desktop: "1024px"
|
|
1753
|
-
}, Qt = class Qt extends
|
|
1759
|
+
}, Qt = class Qt extends N {
|
|
1754
1760
|
constructor() {
|
|
1755
1761
|
super(...arguments), this.dataController = new Zo(this), this.displayController = new Xo(this, this.dataController), this.hasEditButton = !0, this.showStats = "never", this.showChart = !1, this.initialized = !1, this.ariaLabel = null, this.minContrast = Le.AA_NORMAL, this.options = [], 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) => {
|
|
1756
1762
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleEnterEditMode());
|
|
@@ -1967,7 +1973,7 @@ const yt = {
|
|
|
1967
1973
|
}
|
|
1968
1974
|
};
|
|
1969
1975
|
Qt.styles = [
|
|
1970
|
-
|
|
1976
|
+
R`
|
|
1971
1977
|
:host {
|
|
1972
1978
|
/* Default values for CSS variables - can be overridden by external :root or parent definitions */
|
|
1973
1979
|
--default-font-size-base: 1rem;
|
|
@@ -2153,7 +2159,7 @@ v([
|
|
|
2153
2159
|
v([
|
|
2154
2160
|
f({ type: Boolean, reflect: !0 })
|
|
2155
2161
|
], m.prototype, "readonly");
|
|
2156
|
-
const er =
|
|
2162
|
+
const er = R`
|
|
2157
2163
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
2158
2164
|
|
|
2159
2165
|
.pc-body {
|
|
@@ -2604,7 +2610,7 @@ const er = B`
|
|
|
2604
2610
|
animation: none;
|
|
2605
2611
|
}
|
|
2606
2612
|
}
|
|
2607
|
-
`, _t =
|
|
2613
|
+
`, _t = R`
|
|
2608
2614
|
/* Default values for CSS variables - can be overridden by external :root or parent definitions */
|
|
2609
2615
|
:host {
|
|
2610
2616
|
--default-primary-color: #2196f3;
|
|
@@ -3323,7 +3329,7 @@ const er = B`
|
|
|
3323
3329
|
opacity: 1;
|
|
3324
3330
|
}
|
|
3325
3331
|
}
|
|
3326
|
-
`, or =
|
|
3332
|
+
`, or = R`
|
|
3327
3333
|
:host {
|
|
3328
3334
|
--popover-bg: light-dark(#ffffff, #1a1a1a);
|
|
3329
3335
|
--popover-border: light-dark(#e0e0e0, #333333);
|
|
@@ -3445,12 +3451,12 @@ const er = B`
|
|
|
3445
3451
|
max-width: 100%;
|
|
3446
3452
|
}
|
|
3447
3453
|
`;
|
|
3448
|
-
var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor,
|
|
3454
|
+
var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, B = (e, t, o, r) => {
|
|
3449
3455
|
for (var s = r > 1 ? void 0 : r ? sr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3450
3456
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3451
3457
|
return r && s && rr(t, o, s), s;
|
|
3452
3458
|
};
|
|
3453
|
-
let _ = class extends
|
|
3459
|
+
let _ = class extends N {
|
|
3454
3460
|
constructor() {
|
|
3455
3461
|
super(...arguments), this.open = !1, this.position = "auto", this.isClosing = !1, this.computedPosition = "bottom", this.popoverStyles = {}, this.arrowStyles = {}, this.updatePosition = () => {
|
|
3456
3462
|
var h;
|
|
@@ -3540,34 +3546,34 @@ let _ = class extends D {
|
|
|
3540
3546
|
}
|
|
3541
3547
|
};
|
|
3542
3548
|
_.styles = [or];
|
|
3543
|
-
|
|
3549
|
+
B([
|
|
3544
3550
|
f({ type: Boolean, reflect: !0 })
|
|
3545
3551
|
], _.prototype, "open", 2);
|
|
3546
|
-
|
|
3552
|
+
B([
|
|
3547
3553
|
f({ type: String })
|
|
3548
3554
|
], _.prototype, "position", 2);
|
|
3549
|
-
|
|
3555
|
+
B([
|
|
3550
3556
|
f({ attribute: !1 })
|
|
3551
3557
|
], _.prototype, "anchor", 2);
|
|
3552
|
-
|
|
3558
|
+
B([
|
|
3553
3559
|
k()
|
|
3554
3560
|
], _.prototype, "isClosing", 2);
|
|
3555
|
-
|
|
3561
|
+
B([
|
|
3556
3562
|
k()
|
|
3557
3563
|
], _.prototype, "computedPosition", 2);
|
|
3558
|
-
|
|
3564
|
+
B([
|
|
3559
3565
|
k()
|
|
3560
3566
|
], _.prototype, "popoverStyles", 2);
|
|
3561
|
-
|
|
3567
|
+
B([
|
|
3562
3568
|
k()
|
|
3563
3569
|
], _.prototype, "arrowStyles", 2);
|
|
3564
|
-
|
|
3570
|
+
B([
|
|
3565
3571
|
ft(".pc-popover")
|
|
3566
3572
|
], _.prototype, "popoverElement", 2);
|
|
3567
|
-
_ =
|
|
3573
|
+
_ = B([
|
|
3568
3574
|
F("pc-popover")
|
|
3569
3575
|
], _);
|
|
3570
|
-
const ir =
|
|
3576
|
+
const ir = R`
|
|
3571
3577
|
:host {
|
|
3572
3578
|
--sheet-bg: light-dark(#ffffff, #1a1a1a);
|
|
3573
3579
|
--sheet-border: light-dark(#e0e0e0, #333333);
|
|
@@ -3685,7 +3691,7 @@ var ar = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, Q = (e, t,
|
|
|
3685
3691
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3686
3692
|
return r && s && ar(t, o, s), s;
|
|
3687
3693
|
};
|
|
3688
|
-
let
|
|
3694
|
+
let D = class extends N {
|
|
3689
3695
|
constructor() {
|
|
3690
3696
|
super(...arguments), this.open = !1, this.dragToClose = !0, this.isClosing = !1, this.isDragging = !1, this.dragOffset = 0, this.dragStartY = 0, this.sheetHeight = 0, this.handleKeyDown = (e) => {
|
|
3691
3697
|
if (e.key === "Escape" && this.open && (e.preventDefault(), e.stopPropagation(), this.close()), e.key === "Tab" && this.open && this.sheetElement) {
|
|
@@ -3779,35 +3785,35 @@ let R = class extends D {
|
|
|
3779
3785
|
`;
|
|
3780
3786
|
}
|
|
3781
3787
|
};
|
|
3782
|
-
|
|
3788
|
+
D.styles = [ir];
|
|
3783
3789
|
Q([
|
|
3784
3790
|
f({ type: Boolean, reflect: !0 })
|
|
3785
|
-
],
|
|
3791
|
+
], D.prototype, "open", 2);
|
|
3786
3792
|
Q([
|
|
3787
3793
|
f({ type: Boolean, attribute: "drag-to-close" })
|
|
3788
|
-
],
|
|
3794
|
+
], D.prototype, "dragToClose", 2);
|
|
3789
3795
|
Q([
|
|
3790
3796
|
k()
|
|
3791
|
-
],
|
|
3797
|
+
], D.prototype, "isClosing", 2);
|
|
3792
3798
|
Q([
|
|
3793
3799
|
k()
|
|
3794
|
-
],
|
|
3800
|
+
], D.prototype, "isDragging", 2);
|
|
3795
3801
|
Q([
|
|
3796
3802
|
k()
|
|
3797
|
-
],
|
|
3803
|
+
], D.prototype, "dragOffset", 2);
|
|
3798
3804
|
Q([
|
|
3799
3805
|
ft(".pc-bottom-sheet")
|
|
3800
|
-
],
|
|
3801
|
-
|
|
3806
|
+
], D.prototype, "sheetElement", 2);
|
|
3807
|
+
D = Q([
|
|
3802
3808
|
F("pc-bottom-sheet")
|
|
3803
|
-
],
|
|
3809
|
+
], D);
|
|
3804
3810
|
var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, gt = (e, t, o, r) => {
|
|
3805
3811
|
for (var s = r > 1 ? void 0 : r ? cr(t, o) : t, i = e.length - 1, a; i >= 0; i--)
|
|
3806
3812
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
3807
3813
|
return r && s && lr(t, o, s), s;
|
|
3808
3814
|
};
|
|
3809
3815
|
const dr = 768;
|
|
3810
|
-
let Z = class extends
|
|
3816
|
+
let Z = class extends N {
|
|
3811
3817
|
constructor() {
|
|
3812
3818
|
super(...arguments), this.open = !1, this.position = "auto", this.isMobile = !1, this.handleMediaChange = (e) => {
|
|
3813
3819
|
this.isMobile = e.matches;
|
|
@@ -3842,7 +3848,7 @@ let Z = class extends D {
|
|
|
3842
3848
|
`;
|
|
3843
3849
|
}
|
|
3844
3850
|
};
|
|
3845
|
-
Z.styles =
|
|
3851
|
+
Z.styles = R`
|
|
3846
3852
|
:host {
|
|
3847
3853
|
display: contents;
|
|
3848
3854
|
}
|
|
@@ -4248,7 +4254,7 @@ Y([
|
|
|
4248
4254
|
I = Y([
|
|
4249
4255
|
F("pc-nps")
|
|
4250
4256
|
], I);
|
|
4251
|
-
const hr =
|
|
4257
|
+
const hr = R`
|
|
4252
4258
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
4253
4259
|
|
|
4254
4260
|
.pc-container {
|
|
@@ -5069,7 +5075,7 @@ mt([
|
|
|
5069
5075
|
X = mt([
|
|
5070
5076
|
F("pc-poll")
|
|
5071
5077
|
], X);
|
|
5072
|
-
const mr =
|
|
5078
|
+
const mr = R`
|
|
5073
5079
|
/* CSS variables inherit from parent - defaults are specified at usage sites */
|
|
5074
5080
|
|
|
5075
5081
|
.pc-section {
|
|
@@ -5795,7 +5801,7 @@ it([
|
|
|
5795
5801
|
H = it([
|
|
5796
5802
|
F("pc-stars")
|
|
5797
5803
|
], H);
|
|
5798
|
-
const wr =
|
|
5804
|
+
const wr = R`
|
|
5799
5805
|
/* Adjust stats text for reactions */
|
|
5800
5806
|
.pc-stats-text {
|
|
5801
5807
|
font-size: var(--pc-font-size-small, var(--default-font-size-small));
|
|
@@ -6330,7 +6336,7 @@ var Er = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, vt = (e, t
|
|
|
6330
6336
|
(a = e[i]) && (s = (r ? a(t, o, s) : a(s)) || s);
|
|
6331
6337
|
return r && s && Er(t, o, s), s;
|
|
6332
6338
|
};
|
|
6333
|
-
let J = class extends
|
|
6339
|
+
let J = class extends N {
|
|
6334
6340
|
constructor() {
|
|
6335
6341
|
super(), this.options = "", this.parsedOptions = [], J.injectGlobalStyle();
|
|
6336
6342
|
}
|