@empoweredvote/ev-ui 0.6.6 → 0.7.0
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/dist/index.js +512 -367
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +448 -303
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -770,6 +770,7 @@ function Header({
|
|
|
770
770
|
logoAlt = "Empowered Vote",
|
|
771
771
|
navItems = [],
|
|
772
772
|
ctaButton,
|
|
773
|
+
secondaryAction,
|
|
773
774
|
currentPath,
|
|
774
775
|
onNavigate,
|
|
775
776
|
profileMenu,
|
|
@@ -879,6 +880,22 @@ function Header({
|
|
|
879
880
|
textDecoration: "none",
|
|
880
881
|
display: "inline-block"
|
|
881
882
|
},
|
|
883
|
+
secondaryAction: {
|
|
884
|
+
display: "inline-flex",
|
|
885
|
+
alignItems: "center",
|
|
886
|
+
backgroundColor: "transparent",
|
|
887
|
+
color: colors.evTeal,
|
|
888
|
+
fontFamily: fonts.primary,
|
|
889
|
+
fontWeight: fontWeights.bold,
|
|
890
|
+
fontSize: fontSizes.base,
|
|
891
|
+
padding: `${spacing[2]} ${spacing[5]}`,
|
|
892
|
+
borderRadius: borderRadius.full || "999px",
|
|
893
|
+
border: `1.5px solid ${colors.evTeal}`,
|
|
894
|
+
cursor: "pointer",
|
|
895
|
+
textDecoration: "none",
|
|
896
|
+
lineHeight: 1.2,
|
|
897
|
+
transition: "background-color 0.15s ease, color 0.15s ease"
|
|
898
|
+
},
|
|
882
899
|
mobileMenuButton: {
|
|
883
900
|
display: isMobile ? "block" : "none",
|
|
884
901
|
background: "none",
|
|
@@ -1050,7 +1067,30 @@ function Header({
|
|
|
1050
1067
|
},
|
|
1051
1068
|
"empowered.vote"
|
|
1052
1069
|
)
|
|
1053
|
-
), /* @__PURE__ */ React2.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ React2.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ React2.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[
|
|
1070
|
+
), /* @__PURE__ */ React2.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ React2.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ React2.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[3] } }, secondaryAction && React2.isValidElement(secondaryAction) && secondaryAction, secondaryAction && !React2.isValidElement(secondaryAction) && /* @__PURE__ */ React2.createElement(
|
|
1071
|
+
"a",
|
|
1072
|
+
{
|
|
1073
|
+
href: secondaryAction.href,
|
|
1074
|
+
target: secondaryAction.target || "_self",
|
|
1075
|
+
rel: secondaryAction.target === "_blank" ? "noopener noreferrer" : secondaryAction.rel || void 0,
|
|
1076
|
+
onClick: (e) => {
|
|
1077
|
+
if (secondaryAction.target !== "_blank") {
|
|
1078
|
+
handleNavClick(e, secondaryAction.href);
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
style: styles2.secondaryAction,
|
|
1082
|
+
className: "ev-header-secondary",
|
|
1083
|
+
onMouseEnter: (e) => {
|
|
1084
|
+
e.currentTarget.style.backgroundColor = colors.evTeal;
|
|
1085
|
+
e.currentTarget.style.color = colors.textWhite;
|
|
1086
|
+
},
|
|
1087
|
+
onMouseLeave: (e) => {
|
|
1088
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
1089
|
+
e.currentTarget.style.color = colors.evTeal;
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
secondaryAction.label
|
|
1093
|
+
), ctaButton && /* @__PURE__ */ React2.createElement(
|
|
1054
1094
|
"a",
|
|
1055
1095
|
{
|
|
1056
1096
|
href: ctaButton.href,
|
|
@@ -1207,7 +1247,22 @@ function Header({
|
|
|
1207
1247
|
},
|
|
1208
1248
|
item.label
|
|
1209
1249
|
));
|
|
1210
|
-
}),
|
|
1250
|
+
}), secondaryAction && React2.isValidElement(secondaryAction) && /* @__PURE__ */ React2.createElement("div", { style: { marginTop: spacing[4], textAlign: "center" } }, secondaryAction), secondaryAction && !React2.isValidElement(secondaryAction) && /* @__PURE__ */ React2.createElement(
|
|
1251
|
+
"a",
|
|
1252
|
+
{
|
|
1253
|
+
href: secondaryAction.href,
|
|
1254
|
+
target: secondaryAction.target || "_self",
|
|
1255
|
+
rel: secondaryAction.target === "_blank" ? "noopener noreferrer" : secondaryAction.rel || void 0,
|
|
1256
|
+
onClick: (e) => {
|
|
1257
|
+
if (secondaryAction.target !== "_blank") {
|
|
1258
|
+
handleNavClick(e, secondaryAction.href);
|
|
1259
|
+
}
|
|
1260
|
+
setMobileMenuOpen(false);
|
|
1261
|
+
},
|
|
1262
|
+
style: { ...styles2.secondaryAction, marginTop: spacing[4], textAlign: "center", justifyContent: "center" }
|
|
1263
|
+
},
|
|
1264
|
+
secondaryAction.label
|
|
1265
|
+
), ctaButton && /* @__PURE__ */ React2.createElement(
|
|
1211
1266
|
"a",
|
|
1212
1267
|
{
|
|
1213
1268
|
href: ctaButton.href,
|
|
@@ -1275,7 +1330,107 @@ function Header({
|
|
|
1275
1330
|
}
|
|
1276
1331
|
|
|
1277
1332
|
// src/SiteHeader.jsx
|
|
1333
|
+
import React4 from "react";
|
|
1334
|
+
|
|
1335
|
+
// src/FeedbackButton.jsx
|
|
1278
1336
|
import React3 from "react";
|
|
1337
|
+
var FEEDBACK_BASE_DEFAULT = "https://alpha.empowered.vote/feedback";
|
|
1338
|
+
var HOST_FEATURE_MAP = {
|
|
1339
|
+
"compass.empowered.vote": "compass",
|
|
1340
|
+
"essentials.empowered.vote": "essentials",
|
|
1341
|
+
"readrank.empowered.vote": "readrank",
|
|
1342
|
+
"treasurytracker.empowered.vote": "treasury",
|
|
1343
|
+
"badges.empowered.vote": "badges",
|
|
1344
|
+
"ctc.empowered.vote": "trivia",
|
|
1345
|
+
"alpha.empowered.vote": "landing",
|
|
1346
|
+
"ev-landing.empowered.vote": "landing",
|
|
1347
|
+
"ev-landing.onrender.com": "landing"
|
|
1348
|
+
};
|
|
1349
|
+
function detectFeature() {
|
|
1350
|
+
if (typeof window === "undefined") return void 0;
|
|
1351
|
+
const host = window.location.hostname;
|
|
1352
|
+
if (HOST_FEATURE_MAP[host]) return HOST_FEATURE_MAP[host];
|
|
1353
|
+
const firstLabel = host.split(".")[0];
|
|
1354
|
+
for (const [knownHost, feature] of Object.entries(HOST_FEATURE_MAP)) {
|
|
1355
|
+
const knownPrefix = knownHost.split(".")[0];
|
|
1356
|
+
if (firstLabel === knownPrefix || firstLabel.startsWith(`${knownPrefix}-`)) {
|
|
1357
|
+
return feature;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
return "other";
|
|
1361
|
+
}
|
|
1362
|
+
function buildHref({ baseUrl, feature, includeUrl }) {
|
|
1363
|
+
const params = new URLSearchParams();
|
|
1364
|
+
if (feature) params.set("feature", feature);
|
|
1365
|
+
if (includeUrl && typeof window !== "undefined") {
|
|
1366
|
+
params.set("url", window.location.href);
|
|
1367
|
+
}
|
|
1368
|
+
const qs = params.toString();
|
|
1369
|
+
return qs ? `${baseUrl}?${qs}` : baseUrl;
|
|
1370
|
+
}
|
|
1371
|
+
function FeedbackButton({
|
|
1372
|
+
feature: featureProp,
|
|
1373
|
+
baseUrl = FEEDBACK_BASE_DEFAULT,
|
|
1374
|
+
label = "Feedback",
|
|
1375
|
+
variant = "pill",
|
|
1376
|
+
includeUrl = true,
|
|
1377
|
+
className = "",
|
|
1378
|
+
style = {}
|
|
1379
|
+
}) {
|
|
1380
|
+
const feature = featureProp != null ? featureProp : detectFeature();
|
|
1381
|
+
const href = buildHref({ baseUrl, feature, includeUrl });
|
|
1382
|
+
const pillStyle = {
|
|
1383
|
+
display: "inline-flex",
|
|
1384
|
+
alignItems: "center",
|
|
1385
|
+
gap: spacing[1],
|
|
1386
|
+
padding: `${spacing[2]} ${spacing[4]}`,
|
|
1387
|
+
backgroundColor: "transparent",
|
|
1388
|
+
color: colors.evTeal,
|
|
1389
|
+
border: `1.5px solid ${colors.evTeal}`,
|
|
1390
|
+
borderRadius: borderRadius.full || "999px",
|
|
1391
|
+
fontFamily: fonts.primary,
|
|
1392
|
+
fontWeight: fontWeights.bold,
|
|
1393
|
+
fontSize: fontSizes.base,
|
|
1394
|
+
lineHeight: 1.2,
|
|
1395
|
+
textDecoration: "none",
|
|
1396
|
+
cursor: "pointer",
|
|
1397
|
+
transition: "background-color 0.15s ease, color 0.15s ease"
|
|
1398
|
+
};
|
|
1399
|
+
const linkStyle2 = {
|
|
1400
|
+
color: colors.evTeal,
|
|
1401
|
+
fontFamily: fonts.primary,
|
|
1402
|
+
fontWeight: fontWeights.medium,
|
|
1403
|
+
textDecoration: "underline",
|
|
1404
|
+
cursor: "pointer"
|
|
1405
|
+
};
|
|
1406
|
+
const baseStyle = variant === "link" ? linkStyle2 : pillStyle;
|
|
1407
|
+
return /* @__PURE__ */ React3.createElement(
|
|
1408
|
+
"a",
|
|
1409
|
+
{
|
|
1410
|
+
href,
|
|
1411
|
+
target: "_blank",
|
|
1412
|
+
rel: "noopener noreferrer",
|
|
1413
|
+
className: `ev-feedback-button ${className}`.trim(),
|
|
1414
|
+
style: { ...baseStyle, ...style },
|
|
1415
|
+
"aria-label": "Send feedback",
|
|
1416
|
+
onMouseEnter: (e) => {
|
|
1417
|
+
if (variant === "pill") {
|
|
1418
|
+
e.currentTarget.style.backgroundColor = colors.evTeal;
|
|
1419
|
+
e.currentTarget.style.color = colors.textWhite || "#ffffff";
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
onMouseLeave: (e) => {
|
|
1423
|
+
if (variant === "pill") {
|
|
1424
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
1425
|
+
e.currentTarget.style.color = colors.evTeal;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
label
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
// src/SiteHeader.jsx
|
|
1279
1434
|
var defaultNavItems = [
|
|
1280
1435
|
{
|
|
1281
1436
|
label: "Features",
|
|
@@ -1287,10 +1442,6 @@ var defaultNavItems = [
|
|
|
1287
1442
|
{ label: "Treasury Tracker", href: "https://treasurytracker.empowered.vote" },
|
|
1288
1443
|
{ label: "Empowered Badges", href: "https://badges.empowered.vote" }
|
|
1289
1444
|
]
|
|
1290
|
-
},
|
|
1291
|
-
{
|
|
1292
|
-
label: "Feedback",
|
|
1293
|
-
href: "https://ev-landing.empowered.vote/feedback.html"
|
|
1294
1445
|
}
|
|
1295
1446
|
];
|
|
1296
1447
|
var defaultCtaButton = {
|
|
@@ -1302,6 +1453,8 @@ function SiteHeader({
|
|
|
1302
1453
|
currentPath,
|
|
1303
1454
|
onNavigate,
|
|
1304
1455
|
profileMenu,
|
|
1456
|
+
secondaryAction,
|
|
1457
|
+
feedbackFeature,
|
|
1305
1458
|
style = {}
|
|
1306
1459
|
}) {
|
|
1307
1460
|
const handleNavigate = (href) => {
|
|
@@ -1311,13 +1464,22 @@ function SiteHeader({
|
|
|
1311
1464
|
window.location.href = href;
|
|
1312
1465
|
}
|
|
1313
1466
|
};
|
|
1314
|
-
|
|
1467
|
+
let resolvedSecondary;
|
|
1468
|
+
if (secondaryAction === false) {
|
|
1469
|
+
resolvedSecondary = void 0;
|
|
1470
|
+
} else if (secondaryAction === void 0) {
|
|
1471
|
+
resolvedSecondary = /* @__PURE__ */ React4.createElement(FeedbackButton, { feature: feedbackFeature });
|
|
1472
|
+
} else {
|
|
1473
|
+
resolvedSecondary = secondaryAction;
|
|
1474
|
+
}
|
|
1475
|
+
return /* @__PURE__ */ React4.createElement(
|
|
1315
1476
|
Header,
|
|
1316
1477
|
{
|
|
1317
1478
|
logoSrc,
|
|
1318
1479
|
logoAlt: "Empowered Vote",
|
|
1319
1480
|
navItems: defaultNavItems,
|
|
1320
1481
|
ctaButton: defaultCtaButton,
|
|
1482
|
+
secondaryAction: resolvedSecondary,
|
|
1321
1483
|
currentPath,
|
|
1322
1484
|
onNavigate: handleNavigate,
|
|
1323
1485
|
profileMenu,
|
|
@@ -1327,7 +1489,7 @@ function SiteHeader({
|
|
|
1327
1489
|
}
|
|
1328
1490
|
|
|
1329
1491
|
// src/FilterSidebar.jsx
|
|
1330
|
-
import
|
|
1492
|
+
import React5 from "react";
|
|
1331
1493
|
function FilterSidebar({
|
|
1332
1494
|
title = "Filter by",
|
|
1333
1495
|
zipCode = "",
|
|
@@ -1481,14 +1643,14 @@ function FilterSidebar({
|
|
|
1481
1643
|
fontSize: fontSizes.sm
|
|
1482
1644
|
}
|
|
1483
1645
|
};
|
|
1484
|
-
return /* @__PURE__ */
|
|
1646
|
+
return /* @__PURE__ */ React5.createElement("aside", { style: styles2.sidebar, className: "ev-filter-sidebar" }, !isMobile && /* @__PURE__ */ React5.createElement("h2", { style: styles2.title }, title), /* @__PURE__ */ React5.createElement("div", { style: isMobile ? void 0 : styles2.contentTop }, /* @__PURE__ */ React5.createElement("div", { style: isMobile ? { marginBottom: spacing[3] } : styles2.section }, !isMobile && /* @__PURE__ */ React5.createElement("label", { style: styles2.sectionLabel }, "Location"), autocompleteContainerRef ? /* @__PURE__ */ React5.createElement(
|
|
1485
1647
|
"div",
|
|
1486
1648
|
{
|
|
1487
1649
|
ref: autocompleteContainerRef,
|
|
1488
1650
|
style: styles2.zipInputWrapper,
|
|
1489
1651
|
className: "ev-autocomplete-container"
|
|
1490
1652
|
}
|
|
1491
|
-
) : /* @__PURE__ */
|
|
1653
|
+
) : /* @__PURE__ */ React5.createElement("div", { style: styles2.zipInputWrapper }, /* @__PURE__ */ React5.createElement(
|
|
1492
1654
|
"input",
|
|
1493
1655
|
{
|
|
1494
1656
|
ref: zipInputRef,
|
|
@@ -1500,7 +1662,7 @@ function FilterSidebar({
|
|
|
1500
1662
|
style: styles2.zipInput,
|
|
1501
1663
|
"aria-label": "Search location"
|
|
1502
1664
|
}
|
|
1503
|
-
), /* @__PURE__ */
|
|
1665
|
+
), /* @__PURE__ */ React5.createElement(
|
|
1504
1666
|
"button",
|
|
1505
1667
|
{
|
|
1506
1668
|
type: "button",
|
|
@@ -1509,7 +1671,7 @@ function FilterSidebar({
|
|
|
1509
1671
|
"aria-label": "Clear ZIP code"
|
|
1510
1672
|
},
|
|
1511
1673
|
"\xD7"
|
|
1512
|
-
))), /* @__PURE__ */
|
|
1674
|
+
))), /* @__PURE__ */ React5.createElement("div", { style: isMobile ? {} : styles2.section }, !isMobile && /* @__PURE__ */ React5.createElement("label", { style: styles2.sectionLabel }, "Group"), /* @__PURE__ */ React5.createElement("div", { style: styles2.radioGroup, role: "radiogroup", "aria-label": "Filter by group" }, filterOptions.map((option) => /* @__PURE__ */ React5.createElement("label", { key: option.value, style: styles2.radioLabel }, /* @__PURE__ */ React5.createElement(
|
|
1513
1675
|
"input",
|
|
1514
1676
|
{
|
|
1515
1677
|
type: "radio",
|
|
@@ -1519,18 +1681,18 @@ function FilterSidebar({
|
|
|
1519
1681
|
onChange: () => onFilterChange == null ? void 0 : onFilterChange(option.value),
|
|
1520
1682
|
style: styles2.radioInput
|
|
1521
1683
|
}
|
|
1522
|
-
), option.label))))), !isMobile && /* @__PURE__ */
|
|
1684
|
+
), option.label))))), !isMobile && /* @__PURE__ */ React5.createElement("div", { style: styles2.imageSection }, locationLabel && /* @__PURE__ */ React5.createElement("div", { style: styles2.locationLabel }, locationLabel), buildingImageSrc ? /* @__PURE__ */ React5.createElement(
|
|
1523
1685
|
"img",
|
|
1524
1686
|
{
|
|
1525
1687
|
src: buildingImageSrc,
|
|
1526
1688
|
alt: `${selectedFilter} government building`,
|
|
1527
1689
|
style: styles2.buildingImage
|
|
1528
1690
|
}
|
|
1529
|
-
) : /* @__PURE__ */
|
|
1691
|
+
) : /* @__PURE__ */ React5.createElement("div", { style: styles2.buildingPlaceholder }, "No image")));
|
|
1530
1692
|
}
|
|
1531
1693
|
|
|
1532
1694
|
// src/PoliticianCard.jsx
|
|
1533
|
-
import
|
|
1695
|
+
import React6, { useState as useState3, useEffect as useEffect4 } from "react";
|
|
1534
1696
|
function PoliticianCard({
|
|
1535
1697
|
id,
|
|
1536
1698
|
imageSrc,
|
|
@@ -1682,7 +1844,7 @@ function PoliticianCard({
|
|
|
1682
1844
|
textTransform: "uppercase"
|
|
1683
1845
|
}
|
|
1684
1846
|
};
|
|
1685
|
-
const CompassIcon2 = () => /* @__PURE__ */
|
|
1847
|
+
const CompassIcon2 = () => /* @__PURE__ */ React6.createElement(
|
|
1686
1848
|
"svg",
|
|
1687
1849
|
{
|
|
1688
1850
|
style: styles2.compassIcon,
|
|
@@ -1690,7 +1852,7 @@ function PoliticianCard({
|
|
|
1690
1852
|
fill: "none",
|
|
1691
1853
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1692
1854
|
},
|
|
1693
|
-
/* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ React6.createElement(
|
|
1694
1856
|
"polygon",
|
|
1695
1857
|
{
|
|
1696
1858
|
points: "12,1 21.5,6.5 21.5,17.5 12,23 2.5,17.5 2.5,6.5",
|
|
@@ -1700,13 +1862,13 @@ function PoliticianCard({
|
|
|
1700
1862
|
strokeLinejoin: "round"
|
|
1701
1863
|
}
|
|
1702
1864
|
),
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1706
|
-
/* @__PURE__ */
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "1", stroke: "currentColor", strokeWidth: "1" }),
|
|
1866
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1867
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1868
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "23", stroke: "currentColor", strokeWidth: "1" }),
|
|
1869
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1870
|
+
/* @__PURE__ */ React6.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
1871
|
+
/* @__PURE__ */ React6.createElement(
|
|
1710
1872
|
"polygon",
|
|
1711
1873
|
{
|
|
1712
1874
|
points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
|
|
@@ -1714,7 +1876,7 @@ function PoliticianCard({
|
|
|
1714
1876
|
opacity: "0.35"
|
|
1715
1877
|
}
|
|
1716
1878
|
),
|
|
1717
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ React6.createElement(
|
|
1718
1880
|
"polygon",
|
|
1719
1881
|
{
|
|
1720
1882
|
points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
|
|
@@ -1735,7 +1897,7 @@ function PoliticianCard({
|
|
|
1735
1897
|
const initials = parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_a = parts[0]) == null ? void 0 : _a[0]) || "?";
|
|
1736
1898
|
return initials.toUpperCase();
|
|
1737
1899
|
};
|
|
1738
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ React6.createElement(
|
|
1739
1901
|
"div",
|
|
1740
1902
|
{
|
|
1741
1903
|
style: styles2.card,
|
|
@@ -1760,8 +1922,8 @@ function PoliticianCard({
|
|
|
1760
1922
|
}
|
|
1761
1923
|
}
|
|
1762
1924
|
},
|
|
1763
|
-
badge && /* @__PURE__ */
|
|
1764
|
-
/* @__PURE__ */
|
|
1925
|
+
badge && /* @__PURE__ */ React6.createElement("span", { style: styles2.badge }, badge),
|
|
1926
|
+
/* @__PURE__ */ React6.createElement("div", { style: styles2.imageWrapper }, imageSrc && !imgError ? /* @__PURE__ */ React6.createElement(
|
|
1765
1927
|
"img",
|
|
1766
1928
|
{
|
|
1767
1929
|
src: imageSrc,
|
|
@@ -1769,9 +1931,9 @@ function PoliticianCard({
|
|
|
1769
1931
|
style: styles2.image,
|
|
1770
1932
|
onError: () => setImgError(true)
|
|
1771
1933
|
}
|
|
1772
|
-
) : /* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
onCompassClick && /* @__PURE__ */
|
|
1934
|
+
) : /* @__PURE__ */ React6.createElement("div", { style: styles2.imagePlaceholder }, getInitials(name))),
|
|
1935
|
+
/* @__PURE__ */ React6.createElement("div", { style: styles2.content }, /* @__PURE__ */ React6.createElement("h3", { style: styles2.name }, name), /* @__PURE__ */ React6.createElement("p", { style: styles2.title }, title), subtitle && /* @__PURE__ */ React6.createElement("p", { style: styles2.subtitle }, subtitle), footer && /* @__PURE__ */ React6.createElement("div", { style: { marginTop: "auto", marginLeft: "-5px" } }, footer)),
|
|
1936
|
+
onCompassClick && /* @__PURE__ */ React6.createElement(
|
|
1775
1937
|
"button",
|
|
1776
1938
|
{
|
|
1777
1939
|
type: "button",
|
|
@@ -1786,16 +1948,16 @@ function PoliticianCard({
|
|
|
1786
1948
|
},
|
|
1787
1949
|
"aria-label": `View ${name}'s compass`
|
|
1788
1950
|
},
|
|
1789
|
-
/* @__PURE__ */
|
|
1951
|
+
/* @__PURE__ */ React6.createElement(CompassIcon2, null)
|
|
1790
1952
|
)
|
|
1791
1953
|
);
|
|
1792
1954
|
}
|
|
1793
1955
|
|
|
1794
1956
|
// src/CompassCardHorizontal.jsx
|
|
1795
|
-
import
|
|
1957
|
+
import React11, { useState as useState5, useEffect as useEffect5 } from "react";
|
|
1796
1958
|
|
|
1797
1959
|
// src/PlaceholderRadar.jsx
|
|
1798
|
-
import
|
|
1960
|
+
import React7 from "react";
|
|
1799
1961
|
function PlaceholderRadar({ size = 250, name = "" }) {
|
|
1800
1962
|
const cx = size / 2;
|
|
1801
1963
|
const cy = size / 2;
|
|
@@ -1808,7 +1970,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1808
1970
|
const outerPts = vertices.map(([x, y]) => `${x},${y}`).join(" ");
|
|
1809
1971
|
const midPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.6},${cy + (y - cy) * 0.6}`).join(" ");
|
|
1810
1972
|
const innerPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.3},${cy + (y - cy) * 0.3}`).join(" ");
|
|
1811
|
-
return /* @__PURE__ */
|
|
1973
|
+
return /* @__PURE__ */ React7.createElement(
|
|
1812
1974
|
"svg",
|
|
1813
1975
|
{
|
|
1814
1976
|
width: size,
|
|
@@ -1822,7 +1984,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1822
1984
|
flexShrink: 0
|
|
1823
1985
|
}
|
|
1824
1986
|
},
|
|
1825
|
-
vertices.map(([x, y], i) => /* @__PURE__ */
|
|
1987
|
+
vertices.map(([x, y], i) => /* @__PURE__ */ React7.createElement(
|
|
1826
1988
|
"line",
|
|
1827
1989
|
{
|
|
1828
1990
|
key: i,
|
|
@@ -1836,7 +1998,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1836
1998
|
opacity: "0.6"
|
|
1837
1999
|
}
|
|
1838
2000
|
)),
|
|
1839
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ React7.createElement(
|
|
1840
2002
|
"polygon",
|
|
1841
2003
|
{
|
|
1842
2004
|
points: innerPts,
|
|
@@ -1847,7 +2009,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1847
2009
|
opacity: "0.5"
|
|
1848
2010
|
}
|
|
1849
2011
|
),
|
|
1850
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ React7.createElement(
|
|
1851
2013
|
"polygon",
|
|
1852
2014
|
{
|
|
1853
2015
|
points: midPts,
|
|
@@ -1858,7 +2020,7 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1858
2020
|
opacity: "0.6"
|
|
1859
2021
|
}
|
|
1860
2022
|
),
|
|
1861
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ React7.createElement(
|
|
1862
2024
|
"polygon",
|
|
1863
2025
|
{
|
|
1864
2026
|
points: outerPts,
|
|
@@ -1872,10 +2034,10 @@ function PlaceholderRadar({ size = 250, name = "" }) {
|
|
|
1872
2034
|
}
|
|
1873
2035
|
|
|
1874
2036
|
// src/CompassCardHorizontalMeta.jsx
|
|
1875
|
-
import
|
|
2037
|
+
import React10 from "react";
|
|
1876
2038
|
|
|
1877
2039
|
// src/IconOverlay.jsx
|
|
1878
|
-
import
|
|
2040
|
+
import React9, { useState as useState4 } from "react";
|
|
1879
2041
|
import {
|
|
1880
2042
|
useFloating,
|
|
1881
2043
|
useHover,
|
|
@@ -1891,9 +2053,9 @@ import {
|
|
|
1891
2053
|
} from "@floating-ui/react";
|
|
1892
2054
|
|
|
1893
2055
|
// src/icons.js
|
|
1894
|
-
import
|
|
2056
|
+
import React8 from "react";
|
|
1895
2057
|
function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
1896
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1897
2059
|
"svg",
|
|
1898
2060
|
{
|
|
1899
2061
|
width: size,
|
|
@@ -1906,13 +2068,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
|
1906
2068
|
strokeLinejoin: "round",
|
|
1907
2069
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1908
2070
|
},
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
/* @__PURE__ */
|
|
1911
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ React8.createElement("path", { d: "m9 12 2 2 4-4" }),
|
|
2072
|
+
/* @__PURE__ */ React8.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
|
|
2073
|
+
/* @__PURE__ */ React8.createElement("path", { d: "M22 19H2" })
|
|
1912
2074
|
);
|
|
1913
2075
|
}
|
|
1914
2076
|
function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
1915
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1916
2078
|
"svg",
|
|
1917
2079
|
{
|
|
1918
2080
|
width: size,
|
|
@@ -1925,27 +2087,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
|
1925
2087
|
strokeLinejoin: "round",
|
|
1926
2088
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1927
2089
|
},
|
|
1928
|
-
/* @__PURE__ */
|
|
1929
|
-
/* @__PURE__ */
|
|
2090
|
+
/* @__PURE__ */ React8.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2091
|
+
/* @__PURE__ */ React8.createElement("path", { d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" })
|
|
1930
2092
|
);
|
|
1931
2093
|
}
|
|
1932
2094
|
function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
1933
2095
|
let paths;
|
|
1934
2096
|
switch (branch) {
|
|
1935
2097
|
case "executive":
|
|
1936
|
-
paths = /* @__PURE__ */
|
|
2098
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ React8.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ React8.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ React8.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ React8.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ React8.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
|
|
1937
2099
|
break;
|
|
1938
2100
|
case "legislative":
|
|
1939
|
-
paths = /* @__PURE__ */
|
|
2101
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4" }), /* @__PURE__ */ React8.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ React8.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ React8.createElement("path", { d: "M15 12h-5" }));
|
|
1940
2102
|
break;
|
|
1941
2103
|
case "judicial":
|
|
1942
|
-
paths = /* @__PURE__ */
|
|
2104
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ React8.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ React8.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React8.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React8.createElement("path", { d: "M8 21h8" }));
|
|
1943
2105
|
break;
|
|
1944
2106
|
default:
|
|
1945
|
-
paths = /* @__PURE__ */
|
|
2107
|
+
paths = /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ React8.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }), /* @__PURE__ */ React8.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ React8.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ React8.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ React8.createElement("path", { d: "M6 18v-7" }));
|
|
1946
2108
|
break;
|
|
1947
2109
|
}
|
|
1948
|
-
return /* @__PURE__ */
|
|
2110
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1949
2111
|
"svg",
|
|
1950
2112
|
{
|
|
1951
2113
|
width: size,
|
|
@@ -1981,7 +2143,7 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
1981
2143
|
dismiss,
|
|
1982
2144
|
role
|
|
1983
2145
|
]);
|
|
1984
|
-
return /* @__PURE__ */
|
|
2146
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
|
|
1985
2147
|
"span",
|
|
1986
2148
|
{
|
|
1987
2149
|
ref: refs.setReference,
|
|
@@ -1994,8 +2156,8 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
1994
2156
|
onClick(e);
|
|
1995
2157
|
} : void 0
|
|
1996
2158
|
},
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
), isOpen && /* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ React9.createElement(IconComponent, { size, color, ...extraProps })
|
|
2160
|
+
), isOpen && /* @__PURE__ */ React9.createElement(FloatingPortal, null, /* @__PURE__ */ React9.createElement(
|
|
1999
2161
|
"div",
|
|
2000
2162
|
{
|
|
2001
2163
|
ref: refs.setFloating,
|
|
@@ -2019,7 +2181,7 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
2019
2181
|
function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
2020
2182
|
if (!ballot && !hasStances && !branch) return null;
|
|
2021
2183
|
const ballotTooltip = ballot ? `This seat is on your ballot \u2014 ${ballot.electionLabel}: ${new Date(ballot.electionDate).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })}` : null;
|
|
2022
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ React9.createElement(
|
|
2023
2185
|
"div",
|
|
2024
2186
|
{
|
|
2025
2187
|
style: {
|
|
@@ -2032,7 +2194,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2032
2194
|
// offset icon wrapper padding so icons align flush-left with text
|
|
2033
2195
|
}
|
|
2034
2196
|
},
|
|
2035
|
-
ballot && /* @__PURE__ */
|
|
2197
|
+
ballot && /* @__PURE__ */ React9.createElement(
|
|
2036
2198
|
IconWithTooltip,
|
|
2037
2199
|
{
|
|
2038
2200
|
IconComponent: BallotIcon,
|
|
@@ -2041,7 +2203,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2041
2203
|
size: 14
|
|
2042
2204
|
}
|
|
2043
2205
|
),
|
|
2044
|
-
hasStances && /* @__PURE__ */
|
|
2206
|
+
hasStances && /* @__PURE__ */ React9.createElement(
|
|
2045
2207
|
IconWithTooltip,
|
|
2046
2208
|
{
|
|
2047
2209
|
IconComponent: CompassIcon,
|
|
@@ -2051,7 +2213,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2051
2213
|
onClick: onCompassClick
|
|
2052
2214
|
}
|
|
2053
2215
|
),
|
|
2054
|
-
branch && /* @__PURE__ */
|
|
2216
|
+
branch && /* @__PURE__ */ React9.createElement(
|
|
2055
2217
|
IconWithTooltip,
|
|
2056
2218
|
{
|
|
2057
2219
|
IconComponent: BranchIcon,
|
|
@@ -2071,20 +2233,20 @@ function CompassCardHorizontalMeta({
|
|
|
2071
2233
|
userAnswers
|
|
2072
2234
|
}) {
|
|
2073
2235
|
const titleText = surface === "elections" ? politician.office_running_for : politician.office_title;
|
|
2074
|
-
return /* @__PURE__ */
|
|
2236
|
+
return /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2075
2237
|
flex: 1,
|
|
2076
2238
|
minWidth: 0,
|
|
2077
2239
|
display: "flex",
|
|
2078
2240
|
flexDirection: "column",
|
|
2079
2241
|
gap: spacing[1]
|
|
2080
|
-
} }, /* @__PURE__ */
|
|
2242
|
+
} }, /* @__PURE__ */ React10.createElement("p", { style: {
|
|
2081
2243
|
fontFamily: fonts.primary,
|
|
2082
2244
|
fontSize: fontSizes.lg,
|
|
2083
2245
|
fontWeight: fontWeights.semibold,
|
|
2084
2246
|
lineHeight: 1.4,
|
|
2085
2247
|
color: colors.evMutedBlue,
|
|
2086
2248
|
margin: 0
|
|
2087
|
-
} }, politician.full_name), /* @__PURE__ */
|
|
2249
|
+
} }, politician.full_name), /* @__PURE__ */ React10.createElement("p", { style: {
|
|
2088
2250
|
fontFamily: fonts.primary,
|
|
2089
2251
|
fontSize: fontSizes.sm,
|
|
2090
2252
|
fontWeight: fontWeights.semibold,
|
|
@@ -2095,7 +2257,7 @@ function CompassCardHorizontalMeta({
|
|
|
2095
2257
|
display: "-webkit-box",
|
|
2096
2258
|
WebkitLineClamp: 2,
|
|
2097
2259
|
WebkitBoxOrient: "vertical"
|
|
2098
|
-
} }, titleText || ""), politician.district_label && /* @__PURE__ */
|
|
2260
|
+
} }, titleText || ""), politician.district_label && /* @__PURE__ */ React10.createElement("p", { style: {
|
|
2099
2261
|
fontFamily: fonts.primary,
|
|
2100
2262
|
fontSize: fontSizes.sm,
|
|
2101
2263
|
fontWeight: fontWeights.regular,
|
|
@@ -2105,7 +2267,7 @@ function CompassCardHorizontalMeta({
|
|
|
2105
2267
|
overflow: "hidden",
|
|
2106
2268
|
textOverflow: "ellipsis",
|
|
2107
2269
|
whiteSpace: "nowrap"
|
|
2108
|
-
} }, politician.district_label), /* @__PURE__ */
|
|
2270
|
+
} }, politician.district_label), /* @__PURE__ */ React10.createElement(
|
|
2109
2271
|
IconOverlay,
|
|
2110
2272
|
{
|
|
2111
2273
|
ballot: politician.ballot || null,
|
|
@@ -2182,7 +2344,7 @@ function CompassCardHorizontal({
|
|
|
2182
2344
|
function renderCompass() {
|
|
2183
2345
|
var _a2, _b, _c;
|
|
2184
2346
|
if (!userAnswers || userAnswers.length === 0) {
|
|
2185
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2186
2348
|
}
|
|
2187
2349
|
let topics = [];
|
|
2188
2350
|
let data = {};
|
|
@@ -2218,12 +2380,12 @@ function CompassCardHorizontal({
|
|
|
2218
2380
|
}, {}) : politician.stances;
|
|
2219
2381
|
}
|
|
2220
2382
|
if (topics.length === 0) {
|
|
2221
|
-
return /* @__PURE__ */
|
|
2383
|
+
return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2222
2384
|
}
|
|
2223
2385
|
} catch (err) {
|
|
2224
|
-
return /* @__PURE__ */
|
|
2386
|
+
return /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2225
2387
|
}
|
|
2226
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ React11.createElement(
|
|
2227
2389
|
RadarChartCore,
|
|
2228
2390
|
{
|
|
2229
2391
|
topics,
|
|
@@ -2245,7 +2407,7 @@ function CompassCardHorizontal({
|
|
|
2245
2407
|
var _a2, _b, _c;
|
|
2246
2408
|
const imageSrc = (politician == null ? void 0 : politician.photo_origin_url) || (politician == null ? void 0 : politician.images) && ((_a2 = politician.images[0]) == null ? void 0 : _a2.url) || null;
|
|
2247
2409
|
if (imageSrc && !imgError) {
|
|
2248
|
-
return /* @__PURE__ */
|
|
2410
|
+
return /* @__PURE__ */ React11.createElement(
|
|
2249
2411
|
"img",
|
|
2250
2412
|
{
|
|
2251
2413
|
src: imageSrc,
|
|
@@ -2263,7 +2425,7 @@ function CompassCardHorizontal({
|
|
|
2263
2425
|
}
|
|
2264
2426
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2265
2427
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2266
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2267
2429
|
width: "100%",
|
|
2268
2430
|
height: "100%",
|
|
2269
2431
|
backgroundColor: colors.evMutedBlue,
|
|
@@ -2277,7 +2439,7 @@ function CompassCardHorizontal({
|
|
|
2277
2439
|
} }, initials);
|
|
2278
2440
|
}
|
|
2279
2441
|
function renderEmptyVariant() {
|
|
2280
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2281
2443
|
width: "100%",
|
|
2282
2444
|
height: "100%",
|
|
2283
2445
|
display: "flex",
|
|
@@ -2288,14 +2450,14 @@ function CompassCardHorizontal({
|
|
|
2288
2450
|
padding: "12px 14px",
|
|
2289
2451
|
boxSizing: "border-box",
|
|
2290
2452
|
backgroundColor: colorScales.teal["050"]
|
|
2291
|
-
} }, /* @__PURE__ */
|
|
2453
|
+
} }, /* @__PURE__ */ React11.createElement(PlaceholderRadar, { size: 140, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ React11.createElement("p", { style: {
|
|
2292
2454
|
margin: 0,
|
|
2293
2455
|
fontSize: fontSizes.xs,
|
|
2294
2456
|
color: colors.textMuted,
|
|
2295
2457
|
textAlign: "center",
|
|
2296
2458
|
lineHeight: 1.4,
|
|
2297
2459
|
fontFamily: fonts.primary
|
|
2298
|
-
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */
|
|
2460
|
+
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ React11.createElement(
|
|
2299
2461
|
"button",
|
|
2300
2462
|
{
|
|
2301
2463
|
type: "button",
|
|
@@ -2323,7 +2485,7 @@ function CompassCardHorizontal({
|
|
|
2323
2485
|
));
|
|
2324
2486
|
}
|
|
2325
2487
|
function renderUnavailablePlate(message = "Compass currently unavailable for this role.") {
|
|
2326
|
-
return /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2327
2489
|
width: "100%",
|
|
2328
2490
|
height: "100%",
|
|
2329
2491
|
backgroundColor: colorScales.teal["050"],
|
|
@@ -2332,7 +2494,7 @@ function CompassCardHorizontal({
|
|
|
2332
2494
|
justifyContent: "center",
|
|
2333
2495
|
padding: spacing[4],
|
|
2334
2496
|
boxSizing: "border-box"
|
|
2335
|
-
} }, /* @__PURE__ */
|
|
2497
|
+
} }, /* @__PURE__ */ React11.createElement("p", { style: {
|
|
2336
2498
|
fontSize: fontSizes.sm,
|
|
2337
2499
|
fontWeight: fontWeights.semibold,
|
|
2338
2500
|
lineHeight: 1.4,
|
|
@@ -2351,7 +2513,7 @@ function CompassCardHorizontal({
|
|
|
2351
2513
|
const name = (politician == null ? void 0 : politician.full_name) || "this official";
|
|
2352
2514
|
return renderUnavailablePlate(`No compass stances on file for ${name} yet.`);
|
|
2353
2515
|
}
|
|
2354
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2355
2517
|
width: "100%",
|
|
2356
2518
|
height: "100%",
|
|
2357
2519
|
display: "flex",
|
|
@@ -2361,7 +2523,7 @@ function CompassCardHorizontal({
|
|
|
2361
2523
|
boxSizing: "border-box"
|
|
2362
2524
|
} }, renderCompass());
|
|
2363
2525
|
}
|
|
2364
|
-
return /* @__PURE__ */
|
|
2526
|
+
return /* @__PURE__ */ React11.createElement(
|
|
2365
2527
|
"div",
|
|
2366
2528
|
{
|
|
2367
2529
|
role: "article",
|
|
@@ -2380,7 +2542,7 @@ function CompassCardHorizontal({
|
|
|
2380
2542
|
onFocus: () => setFocused(true),
|
|
2381
2543
|
onBlur: () => setFocused(false)
|
|
2382
2544
|
},
|
|
2383
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ React11.createElement("div", { style: slotStyle }, renderSlotContent(), surface === "elections" && politician.running_unopposed && /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2384
2546
|
position: "absolute",
|
|
2385
2547
|
bottom: "15px",
|
|
2386
2548
|
left: 0,
|
|
@@ -2395,7 +2557,7 @@ function CompassCardHorizontal({
|
|
|
2395
2557
|
padding: "6px 0",
|
|
2396
2558
|
pointerEvents: "none"
|
|
2397
2559
|
} }, typeof politician.running_unopposed === "string" ? politician.running_unopposed : "Running Unopposed")),
|
|
2398
|
-
/* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ React11.createElement("div", { style: { flex: 1, minWidth: 0, padding: spacing[4], paddingLeft: spacing[3] } }, /* @__PURE__ */ React11.createElement(
|
|
2399
2561
|
CompassCardHorizontalMeta,
|
|
2400
2562
|
{
|
|
2401
2563
|
politician,
|
|
@@ -2407,7 +2569,7 @@ function CompassCardHorizontal({
|
|
|
2407
2569
|
}
|
|
2408
2570
|
|
|
2409
2571
|
// src/CompassCardVertical.jsx
|
|
2410
|
-
import
|
|
2572
|
+
import React12, { useState as useState6, useEffect as useEffect6 } from "react";
|
|
2411
2573
|
var RADAR_SIZE2 = 400;
|
|
2412
2574
|
function CompassCardVertical({
|
|
2413
2575
|
politician,
|
|
@@ -2448,7 +2610,7 @@ function CompassCardVertical({
|
|
|
2448
2610
|
function renderCompass() {
|
|
2449
2611
|
var _a2, _b, _c;
|
|
2450
2612
|
if (!userAnswers || userAnswers.length === 0) {
|
|
2451
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2452
2614
|
}
|
|
2453
2615
|
let topics = [];
|
|
2454
2616
|
let data = {};
|
|
@@ -2484,17 +2646,17 @@ function CompassCardVertical({
|
|
|
2484
2646
|
}, {}) : politician.stances;
|
|
2485
2647
|
}
|
|
2486
2648
|
if (topics.length === 0) {
|
|
2487
|
-
return /* @__PURE__ */
|
|
2649
|
+
return /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2488
2650
|
}
|
|
2489
2651
|
} catch {
|
|
2490
|
-
return /* @__PURE__ */
|
|
2652
|
+
return /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2491
2653
|
}
|
|
2492
2654
|
const unansweredSpokes = {};
|
|
2493
2655
|
for (const t of topics) {
|
|
2494
2656
|
const v = compareData[t.short_title];
|
|
2495
2657
|
if (!v || Number(v) === 0) unansweredSpokes[t.short_title] = true;
|
|
2496
2658
|
}
|
|
2497
|
-
return /* @__PURE__ */
|
|
2659
|
+
return /* @__PURE__ */ React12.createElement("div", { style: { width: RADAR_SIZE2 + 240, maxWidth: "100%", flexShrink: 0 } }, /* @__PURE__ */ React12.createElement(
|
|
2498
2660
|
RadarChartCore,
|
|
2499
2661
|
{
|
|
2500
2662
|
topics,
|
|
@@ -2529,7 +2691,7 @@ function CompassCardVertical({
|
|
|
2529
2691
|
justifyContent: "center"
|
|
2530
2692
|
};
|
|
2531
2693
|
if (imageSrc && !imgError) {
|
|
2532
|
-
return /* @__PURE__ */
|
|
2694
|
+
return /* @__PURE__ */ React12.createElement("div", { style: baseStyle }, /* @__PURE__ */ React12.createElement(
|
|
2533
2695
|
"img",
|
|
2534
2696
|
{
|
|
2535
2697
|
src: imageSrc,
|
|
@@ -2547,7 +2709,7 @@ function CompassCardVertical({
|
|
|
2547
2709
|
}
|
|
2548
2710
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2549
2711
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2550
|
-
return /* @__PURE__ */
|
|
2712
|
+
return /* @__PURE__ */ React12.createElement("div", { style: baseStyle }, /* @__PURE__ */ React12.createElement("span", { style: {
|
|
2551
2713
|
color: colors.textWhite,
|
|
2552
2714
|
fontFamily: fonts.primary,
|
|
2553
2715
|
fontWeight: fontWeights.bold,
|
|
@@ -2558,7 +2720,7 @@ function CompassCardVertical({
|
|
|
2558
2720
|
var _a2, _b, _c;
|
|
2559
2721
|
const imageSrc = (politician == null ? void 0 : politician.photo_origin_url) || (politician == null ? void 0 : politician.images) && ((_a2 = politician.images[0]) == null ? void 0 : _a2.url) || null;
|
|
2560
2722
|
if (imageSrc && !imgError) {
|
|
2561
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ React12.createElement(
|
|
2562
2724
|
"img",
|
|
2563
2725
|
{
|
|
2564
2726
|
src: imageSrc,
|
|
@@ -2577,7 +2739,7 @@ function CompassCardVertical({
|
|
|
2577
2739
|
}
|
|
2578
2740
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2579
2741
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2580
|
-
return /* @__PURE__ */
|
|
2742
|
+
return /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2581
2743
|
width: RADAR_SIZE2,
|
|
2582
2744
|
height: RADAR_SIZE2,
|
|
2583
2745
|
backgroundColor: colors.evMutedBlue,
|
|
@@ -2592,7 +2754,7 @@ function CompassCardVertical({
|
|
|
2592
2754
|
} }, initials);
|
|
2593
2755
|
}
|
|
2594
2756
|
function renderEmptyVariant() {
|
|
2595
|
-
return /* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2596
2758
|
width: "100%",
|
|
2597
2759
|
height: "100%",
|
|
2598
2760
|
flex: 1,
|
|
@@ -2605,14 +2767,14 @@ function CompassCardVertical({
|
|
|
2605
2767
|
boxSizing: "border-box",
|
|
2606
2768
|
backgroundColor: colorScales.teal["050"],
|
|
2607
2769
|
borderRadius: borderRadius.md
|
|
2608
|
-
} }, /* @__PURE__ */
|
|
2770
|
+
} }, /* @__PURE__ */ React12.createElement(PlaceholderRadar, { size: 220, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2609
2771
|
margin: 0,
|
|
2610
2772
|
fontSize: fontSizes.sm,
|
|
2611
2773
|
color: colors.textMuted,
|
|
2612
2774
|
textAlign: "center",
|
|
2613
2775
|
lineHeight: 1.4,
|
|
2614
2776
|
fontFamily: fonts.primary
|
|
2615
|
-
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */
|
|
2777
|
+
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ React12.createElement(
|
|
2616
2778
|
"button",
|
|
2617
2779
|
{
|
|
2618
2780
|
type: "button",
|
|
@@ -2638,7 +2800,7 @@ function CompassCardVertical({
|
|
|
2638
2800
|
));
|
|
2639
2801
|
}
|
|
2640
2802
|
function renderUnavailablePlate(message) {
|
|
2641
|
-
return /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2642
2804
|
width: "100%",
|
|
2643
2805
|
height: "100%",
|
|
2644
2806
|
flex: 1,
|
|
@@ -2649,7 +2811,7 @@ function CompassCardVertical({
|
|
|
2649
2811
|
justifyContent: "center",
|
|
2650
2812
|
padding: spacing[6],
|
|
2651
2813
|
boxSizing: "border-box"
|
|
2652
|
-
} }, /* @__PURE__ */
|
|
2814
|
+
} }, /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2653
2815
|
fontSize: fontSizes.base,
|
|
2654
2816
|
fontWeight: fontWeights.semibold,
|
|
2655
2817
|
lineHeight: 1.4,
|
|
@@ -2670,7 +2832,7 @@ function CompassCardVertical({
|
|
|
2670
2832
|
}
|
|
2671
2833
|
return renderCompass();
|
|
2672
2834
|
}
|
|
2673
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ React12.createElement(
|
|
2674
2836
|
"div",
|
|
2675
2837
|
{
|
|
2676
2838
|
role: "article",
|
|
@@ -2689,21 +2851,21 @@ function CompassCardVertical({
|
|
|
2689
2851
|
onFocus: () => setFocused(true),
|
|
2690
2852
|
onBlur: () => setFocused(false)
|
|
2691
2853
|
},
|
|
2692
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ React12.createElement("div", { style: { padding: spacing[4], paddingBottom: spacing[3], display: "flex", alignItems: "stretch", gap: spacing[3], flexShrink: 0 } }, renderAvatar(), /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", flexDirection: "column", gap: spacing[1], minWidth: 0, flex: 1 } }, /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2693
2855
|
fontFamily: fonts.primary,
|
|
2694
2856
|
fontSize: fontSizes.xl,
|
|
2695
2857
|
fontWeight: fontWeights.semibold,
|
|
2696
2858
|
lineHeight: 1.3,
|
|
2697
2859
|
color: colors.evMutedBlue,
|
|
2698
2860
|
margin: 0
|
|
2699
|
-
} }, politician.full_name), /* @__PURE__ */
|
|
2861
|
+
} }, politician.full_name), /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2700
2862
|
fontFamily: fonts.primary,
|
|
2701
2863
|
fontSize: fontSizes.sm,
|
|
2702
2864
|
fontWeight: fontWeights.semibold,
|
|
2703
2865
|
lineHeight: 1.4,
|
|
2704
2866
|
color: colors.textSecondary,
|
|
2705
2867
|
margin: 0
|
|
2706
|
-
} }, titleText || ""), politician.district_label && /* @__PURE__ */
|
|
2868
|
+
} }, titleText || ""), politician.district_label && /* @__PURE__ */ React12.createElement("p", { style: {
|
|
2707
2869
|
fontFamily: fonts.primary,
|
|
2708
2870
|
fontSize: fontSizes.sm,
|
|
2709
2871
|
fontWeight: fontWeights.regular,
|
|
@@ -2713,7 +2875,7 @@ function CompassCardVertical({
|
|
|
2713
2875
|
overflow: "hidden",
|
|
2714
2876
|
textOverflow: "ellipsis",
|
|
2715
2877
|
whiteSpace: "nowrap"
|
|
2716
|
-
} }, politician.district_label), /* @__PURE__ */
|
|
2878
|
+
} }, politician.district_label), /* @__PURE__ */ React12.createElement("div", { style: { marginTop: "auto" } }, /* @__PURE__ */ React12.createElement(
|
|
2717
2879
|
IconOverlay,
|
|
2718
2880
|
{
|
|
2719
2881
|
ballot: politician.ballot || null,
|
|
@@ -2721,7 +2883,7 @@ function CompassCardVertical({
|
|
|
2721
2883
|
branch: politician.branch || null
|
|
2722
2884
|
}
|
|
2723
2885
|
)))),
|
|
2724
|
-
surface === "elections" && politician.withdrawn && /* @__PURE__ */
|
|
2886
|
+
surface === "elections" && politician.withdrawn && /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2725
2887
|
margin: `0 ${spacing[4]} ${spacing[3]}`,
|
|
2726
2888
|
backgroundColor: "rgba(120,0,0,0.85)",
|
|
2727
2889
|
color: "#fff",
|
|
@@ -2733,7 +2895,7 @@ function CompassCardVertical({
|
|
|
2733
2895
|
padding: "6px 0",
|
|
2734
2896
|
borderRadius: borderRadius.sm
|
|
2735
2897
|
} }, "Withdrawn"),
|
|
2736
|
-
surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */
|
|
2898
|
+
surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */ React12.createElement("div", { style: {
|
|
2737
2899
|
margin: `0 ${spacing[4]} ${spacing[3]}`,
|
|
2738
2900
|
backgroundColor: "rgba(0,0,0,0.75)",
|
|
2739
2901
|
color: "#fff",
|
|
@@ -2745,7 +2907,7 @@ function CompassCardVertical({
|
|
|
2745
2907
|
padding: "6px 0",
|
|
2746
2908
|
borderRadius: borderRadius.sm
|
|
2747
2909
|
} }, typeof politician.running_unopposed === "string" ? politician.running_unopposed : "Running Unopposed"),
|
|
2748
|
-
/* @__PURE__ */
|
|
2910
|
+
/* @__PURE__ */ React12.createElement("div", { style: {
|
|
2749
2911
|
flex: 1,
|
|
2750
2912
|
padding: spacing[4],
|
|
2751
2913
|
paddingTop: 0,
|
|
@@ -2759,7 +2921,7 @@ function CompassCardVertical({
|
|
|
2759
2921
|
}
|
|
2760
2922
|
|
|
2761
2923
|
// src/CompassKey.jsx
|
|
2762
|
-
import
|
|
2924
|
+
import React13, { useEffect as useEffect7, useState as useState7 } from "react";
|
|
2763
2925
|
|
|
2764
2926
|
// src/evContext.js
|
|
2765
2927
|
var DEFAULT_BROKER_URL = "https://ev-context.empowered.vote/";
|
|
@@ -3036,7 +3198,7 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3036
3198
|
persistDismissed(false);
|
|
3037
3199
|
}
|
|
3038
3200
|
if (!loaded) return null;
|
|
3039
|
-
const Swatch = ({ color, label, ring }) => /* @__PURE__ */
|
|
3201
|
+
const Swatch = ({ color, label, ring }) => /* @__PURE__ */ React13.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3040
3202
|
display: "inline-block",
|
|
3041
3203
|
width: 12,
|
|
3042
3204
|
height: 12,
|
|
@@ -3044,9 +3206,9 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3044
3206
|
background: color,
|
|
3045
3207
|
border: `2px solid ${ring || "#fff"}`,
|
|
3046
3208
|
boxShadow: "0 0 0 1px rgba(0,0,0,0.08)"
|
|
3047
|
-
} }), /* @__PURE__ */
|
|
3209
|
+
} }), /* @__PURE__ */ React13.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, label));
|
|
3048
3210
|
if (dismissed) {
|
|
3049
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ React13.createElement(
|
|
3050
3212
|
"button",
|
|
3051
3213
|
{
|
|
3052
3214
|
type: "button",
|
|
@@ -3067,11 +3229,11 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3067
3229
|
cursor: "pointer"
|
|
3068
3230
|
}
|
|
3069
3231
|
},
|
|
3070
|
-
/* @__PURE__ */
|
|
3232
|
+
/* @__PURE__ */ React13.createElement("span", { "aria-hidden": "true" }, "?"),
|
|
3071
3233
|
" Compass key"
|
|
3072
3234
|
);
|
|
3073
3235
|
}
|
|
3074
|
-
return /* @__PURE__ */
|
|
3236
|
+
return /* @__PURE__ */ React13.createElement(
|
|
3075
3237
|
"div",
|
|
3076
3238
|
{
|
|
3077
3239
|
role: "region",
|
|
@@ -3090,17 +3252,17 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3090
3252
|
boxSizing: "border-box"
|
|
3091
3253
|
}
|
|
3092
3254
|
},
|
|
3093
|
-
!compact && /* @__PURE__ */
|
|
3255
|
+
!compact && /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3094
3256
|
fontSize: fontSizes.xs,
|
|
3095
3257
|
fontWeight: fontWeights.semibold,
|
|
3096
3258
|
color: colors.textMuted,
|
|
3097
3259
|
textTransform: "uppercase",
|
|
3098
3260
|
letterSpacing: "0.5px"
|
|
3099
3261
|
} }, "Compass key"),
|
|
3100
|
-
/* @__PURE__ */
|
|
3101
|
-
/* @__PURE__ */
|
|
3102
|
-
/* @__PURE__ */
|
|
3103
|
-
/* @__PURE__ */
|
|
3262
|
+
/* @__PURE__ */ React13.createElement(Swatch, { color: "#7C6B9E", label: "You" }),
|
|
3263
|
+
/* @__PURE__ */ React13.createElement(Swatch, { color: "#5A9A6E", label: "Politician" }),
|
|
3264
|
+
/* @__PURE__ */ React13.createElement(Swatch, { color: "#fed12e", label: "Match" }),
|
|
3265
|
+
/* @__PURE__ */ React13.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ React13.createElement("span", { style: {
|
|
3104
3266
|
fontSize: fontSizes.xs,
|
|
3105
3267
|
fontWeight: fontWeights.semibold,
|
|
3106
3268
|
color: "#9ca3af",
|
|
@@ -3108,8 +3270,8 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3108
3270
|
textDecoration: "underline",
|
|
3109
3271
|
textDecorationStyle: "dashed",
|
|
3110
3272
|
textUnderlineOffset: "3px"
|
|
3111
|
-
} }, "Topic"), /* @__PURE__ */
|
|
3112
|
-
/* @__PURE__ */
|
|
3273
|
+
} }, "Topic"), /* @__PURE__ */ React13.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, "= no stance")),
|
|
3274
|
+
/* @__PURE__ */ React13.createElement(
|
|
3113
3275
|
"button",
|
|
3114
3276
|
{
|
|
3115
3277
|
type: "button",
|
|
@@ -3132,7 +3294,7 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3132
3294
|
}
|
|
3133
3295
|
|
|
3134
3296
|
// src/CategorySection.jsx
|
|
3135
|
-
import
|
|
3297
|
+
import React14, { useState as useState8 } from "react";
|
|
3136
3298
|
function CategorySection({
|
|
3137
3299
|
title,
|
|
3138
3300
|
infoTooltip,
|
|
@@ -3210,7 +3372,7 @@ function CategorySection({
|
|
|
3210
3372
|
gap: spacing[4]
|
|
3211
3373
|
}
|
|
3212
3374
|
};
|
|
3213
|
-
return /* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ React14.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ React14.createElement("div", { style: styles2.header }, /* @__PURE__ */ React14.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ React14.createElement(
|
|
3214
3376
|
"button",
|
|
3215
3377
|
{
|
|
3216
3378
|
type: "button",
|
|
@@ -3222,8 +3384,8 @@ function CategorySection({
|
|
|
3222
3384
|
"aria-label": `Info about ${title}`
|
|
3223
3385
|
},
|
|
3224
3386
|
"i",
|
|
3225
|
-
showTooltip && /* @__PURE__ */
|
|
3226
|
-
), websiteUrl && /* @__PURE__ */
|
|
3387
|
+
showTooltip && /* @__PURE__ */ React14.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
|
|
3388
|
+
), websiteUrl && /* @__PURE__ */ React14.createElement(
|
|
3227
3389
|
"a",
|
|
3228
3390
|
{
|
|
3229
3391
|
href: websiteUrl,
|
|
@@ -3232,7 +3394,7 @@ function CategorySection({
|
|
|
3232
3394
|
style: styles2.externalLink,
|
|
3233
3395
|
"aria-label": `Visit official website for ${title}`
|
|
3234
3396
|
},
|
|
3235
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ React14.createElement(
|
|
3236
3398
|
"svg",
|
|
3237
3399
|
{
|
|
3238
3400
|
viewBox: "0 0 24 24",
|
|
@@ -3240,7 +3402,7 @@ function CategorySection({
|
|
|
3240
3402
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3241
3403
|
style: { width: "14px", height: "14px" }
|
|
3242
3404
|
},
|
|
3243
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ React14.createElement(
|
|
3244
3406
|
"path",
|
|
3245
3407
|
{
|
|
3246
3408
|
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
|
|
@@ -3251,11 +3413,11 @@ function CategorySection({
|
|
|
3251
3413
|
}
|
|
3252
3414
|
)
|
|
3253
3415
|
)
|
|
3254
|
-
)), /* @__PURE__ */
|
|
3416
|
+
)), /* @__PURE__ */ React14.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
|
|
3255
3417
|
}
|
|
3256
3418
|
|
|
3257
3419
|
// src/SubGroupSection.jsx
|
|
3258
|
-
import
|
|
3420
|
+
import React15 from "react";
|
|
3259
3421
|
function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap, justifyContent }) {
|
|
3260
3422
|
const styles2 = {
|
|
3261
3423
|
section: {
|
|
@@ -3290,7 +3452,7 @@ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap
|
|
|
3290
3452
|
width: "100%"
|
|
3291
3453
|
}
|
|
3292
3454
|
};
|
|
3293
|
-
return /* @__PURE__ */
|
|
3455
|
+
return /* @__PURE__ */ React15.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ React15.createElement("div", { style: styles2.header }, /* @__PURE__ */ React15.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ React15.createElement(
|
|
3294
3456
|
"a",
|
|
3295
3457
|
{
|
|
3296
3458
|
href: websiteUrl,
|
|
@@ -3298,12 +3460,12 @@ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap
|
|
|
3298
3460
|
rel: "noopener noreferrer",
|
|
3299
3461
|
style: styles2.link
|
|
3300
3462
|
},
|
|
3301
|
-
/* @__PURE__ */
|
|
3302
|
-
)), /* @__PURE__ */
|
|
3463
|
+
/* @__PURE__ */ React15.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ React15.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React15.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z", stroke: "currentColor", strokeWidth: "2" }))
|
|
3464
|
+
)), /* @__PURE__ */ React15.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
|
|
3303
3465
|
}
|
|
3304
3466
|
|
|
3305
3467
|
// src/GovernmentBodySection.jsx
|
|
3306
|
-
import
|
|
3468
|
+
import React16, { useState as useState9 } from "react";
|
|
3307
3469
|
function GovernmentBodySection({
|
|
3308
3470
|
title,
|
|
3309
3471
|
websiteUrl,
|
|
@@ -3352,7 +3514,7 @@ function GovernmentBodySection({
|
|
|
3352
3514
|
display: expanded ? "block" : "none"
|
|
3353
3515
|
}
|
|
3354
3516
|
};
|
|
3355
|
-
return /* @__PURE__ */
|
|
3517
|
+
return /* @__PURE__ */ React16.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ React16.createElement(
|
|
3356
3518
|
"div",
|
|
3357
3519
|
{
|
|
3358
3520
|
style: styles2.header,
|
|
@@ -3368,8 +3530,8 @@ function GovernmentBodySection({
|
|
|
3368
3530
|
"aria-expanded": expanded,
|
|
3369
3531
|
"aria-label": `${expanded ? "Collapse" : "Expand"} ${title}`
|
|
3370
3532
|
},
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
websiteUrl && /* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ React16.createElement("span", { style: styles2.title }, title),
|
|
3534
|
+
websiteUrl && /* @__PURE__ */ React16.createElement(
|
|
3373
3535
|
"a",
|
|
3374
3536
|
{
|
|
3375
3537
|
href: websiteUrl,
|
|
@@ -3379,14 +3541,14 @@ function GovernmentBodySection({
|
|
|
3379
3541
|
onClick: (e) => e.stopPropagation(),
|
|
3380
3542
|
"aria-label": `Visit ${title} website`
|
|
3381
3543
|
},
|
|
3382
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ React16.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__PURE__ */ React16.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React16.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z", stroke: "currentColor", strokeWidth: "2" }))
|
|
3383
3545
|
),
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
), /* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ React16.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
|
|
3547
|
+
), /* @__PURE__ */ React16.createElement("div", { style: styles2.content }, children));
|
|
3386
3548
|
}
|
|
3387
3549
|
|
|
3388
3550
|
// src/SocialLinks.jsx
|
|
3389
|
-
import
|
|
3551
|
+
import React17 from "react";
|
|
3390
3552
|
var SOCIAL_PLATFORMS = [
|
|
3391
3553
|
{ test: /facebook\.com/i, platform: "facebook" },
|
|
3392
3554
|
{ test: /twitter\.com|x\.com/i, platform: "twitter" },
|
|
@@ -3457,7 +3619,7 @@ function SocialLinks({
|
|
|
3457
3619
|
}
|
|
3458
3620
|
};
|
|
3459
3621
|
const platformIconMap = {
|
|
3460
|
-
twitter: /* @__PURE__ */
|
|
3622
|
+
twitter: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement(
|
|
3461
3623
|
"path",
|
|
3462
3624
|
{
|
|
3463
3625
|
d: "M4 4L10.5 12.5M20 20L13.5 11.5M10.5 12.5L4 20H8L13.5 11.5M10.5 12.5L16 4H20L13.5 11.5",
|
|
@@ -3467,7 +3629,7 @@ function SocialLinks({
|
|
|
3467
3629
|
strokeLinejoin: "round"
|
|
3468
3630
|
}
|
|
3469
3631
|
)),
|
|
3470
|
-
facebook: /* @__PURE__ */
|
|
3632
|
+
facebook: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement(
|
|
3471
3633
|
"path",
|
|
3472
3634
|
{
|
|
3473
3635
|
d: "M18 2H15C13.6739 2 12.4021 2.52678 11.4645 3.46447C10.5268 4.40215 10 5.67392 10 7V10H7V14H10V22H14V14H17L18 10H14V7C14 6.73478 14.1054 6.48043 14.2929 6.29289C14.4804 6.10536 14.7348 6 15 6H18V2Z",
|
|
@@ -3477,8 +3639,8 @@ function SocialLinks({
|
|
|
3477
3639
|
strokeLinejoin: "round"
|
|
3478
3640
|
}
|
|
3479
3641
|
)),
|
|
3480
|
-
instagram: /* @__PURE__ */
|
|
3481
|
-
linkedin: /* @__PURE__ */
|
|
3642
|
+
instagram: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
|
|
3643
|
+
linkedin: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement(
|
|
3482
3644
|
"path",
|
|
3483
3645
|
{
|
|
3484
3646
|
d: "M16 8C17.5913 8 19.1174 8.63214 20.2426 9.75736C21.3679 10.8826 22 12.4087 22 14V21H18V14C18 13.4696 17.7893 12.9609 17.4142 12.5858C17.0391 12.2107 16.5304 12 16 12C15.4696 12 14.9609 12.2107 14.5858 12.5858C14.2107 12.9609 14 13.4696 14 14V21H10V14C10 12.4087 10.6321 10.8826 11.7574 9.75736C12.8826 8.63214 14.4087 8 16 8Z",
|
|
@@ -3487,8 +3649,8 @@ function SocialLinks({
|
|
|
3487
3649
|
strokeLinecap: "round",
|
|
3488
3650
|
strokeLinejoin: "round"
|
|
3489
3651
|
}
|
|
3490
|
-
), /* @__PURE__ */
|
|
3491
|
-
youtube: /* @__PURE__ */
|
|
3652
|
+
), /* @__PURE__ */ React17.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React17.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
|
|
3653
|
+
youtube: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
|
|
3492
3654
|
};
|
|
3493
3655
|
const links = [
|
|
3494
3656
|
{
|
|
@@ -3514,7 +3676,7 @@ function SocialLinks({
|
|
|
3514
3676
|
{
|
|
3515
3677
|
href: website,
|
|
3516
3678
|
label: "Website",
|
|
3517
|
-
icon: /* @__PURE__ */
|
|
3679
|
+
icon: /* @__PURE__ */ React17.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ React17.createElement(
|
|
3518
3680
|
"path",
|
|
3519
3681
|
{
|
|
3520
3682
|
d: "M2 12H22M12 2C14.5 4.5 16 8 16 12C16 16 14.5 19.5 12 22C9.5 19.5 8 16 8 12C8 8 9.5 4.5 12 2Z",
|
|
@@ -3544,7 +3706,7 @@ function SocialLinks({
|
|
|
3544
3706
|
if (links.length === 0) {
|
|
3545
3707
|
return null;
|
|
3546
3708
|
}
|
|
3547
|
-
return /* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ React17.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ React17.createElement(
|
|
3548
3710
|
"a",
|
|
3549
3711
|
{
|
|
3550
3712
|
key: link.label,
|
|
@@ -3567,7 +3729,7 @@ function SocialLinks({
|
|
|
3567
3729
|
}
|
|
3568
3730
|
|
|
3569
3731
|
// src/IssueTags.jsx
|
|
3570
|
-
import
|
|
3732
|
+
import React18 from "react";
|
|
3571
3733
|
function IssueTags({
|
|
3572
3734
|
tags = [],
|
|
3573
3735
|
selectedTags = [],
|
|
@@ -3610,9 +3772,9 @@ function IssueTags({
|
|
|
3610
3772
|
onTagClick(tag.value);
|
|
3611
3773
|
}
|
|
3612
3774
|
};
|
|
3613
|
-
return /* @__PURE__ */
|
|
3775
|
+
return /* @__PURE__ */ React18.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
|
|
3614
3776
|
const isSelected = selectedTags.includes(tag.value);
|
|
3615
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ React18.createElement(
|
|
3616
3778
|
"span",
|
|
3617
3779
|
{
|
|
3618
3780
|
key: tag.value,
|
|
@@ -3641,7 +3803,7 @@ function IssueTags({
|
|
|
3641
3803
|
}
|
|
3642
3804
|
|
|
3643
3805
|
// src/CommitteeTable.jsx
|
|
3644
|
-
import
|
|
3806
|
+
import React19, { useState as useState10 } from "react";
|
|
3645
3807
|
var ROLE_ORDER = {
|
|
3646
3808
|
"chair": 0,
|
|
3647
3809
|
"co-chair": 1,
|
|
@@ -3730,7 +3892,7 @@ function CommitteeTable({
|
|
|
3730
3892
|
cursor: "pointer"
|
|
3731
3893
|
}
|
|
3732
3894
|
};
|
|
3733
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ React19.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ React19.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ React19.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React19.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ React19.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ React19.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ React19.createElement("table", { style: styles2.table }, /* @__PURE__ */ React19.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ React19.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ React19.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ React19.createElement(
|
|
3734
3896
|
"a",
|
|
3735
3897
|
{
|
|
3736
3898
|
href: committee.url,
|
|
@@ -3745,7 +3907,7 @@ function CommitteeTable({
|
|
|
3745
3907
|
}
|
|
3746
3908
|
},
|
|
3747
3909
|
committee.name
|
|
3748
|
-
) : committee.name), /* @__PURE__ */
|
|
3910
|
+
) : committee.name), /* @__PURE__ */ React19.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ React19.createElement(
|
|
3749
3911
|
"button",
|
|
3750
3912
|
{
|
|
3751
3913
|
type: "button",
|
|
@@ -3753,7 +3915,7 @@ function CommitteeTable({
|
|
|
3753
3915
|
onClick: () => setShowAll(!showAll)
|
|
3754
3916
|
},
|
|
3755
3917
|
showAll ? "Show less" : `Show all ${sorted.length} committees`,
|
|
3756
|
-
/* @__PURE__ */
|
|
3918
|
+
/* @__PURE__ */ React19.createElement(
|
|
3757
3919
|
"svg",
|
|
3758
3920
|
{
|
|
3759
3921
|
width: "14",
|
|
@@ -3766,16 +3928,16 @@ function CommitteeTable({
|
|
|
3766
3928
|
strokeLinejoin: "round",
|
|
3767
3929
|
style: { transform: showAll ? "rotate(180deg)" : "none", transition: "transform 0.2s" }
|
|
3768
3930
|
},
|
|
3769
|
-
/* @__PURE__ */
|
|
3931
|
+
/* @__PURE__ */ React19.createElement("polyline", { points: "6 9 12 15 18 9" })
|
|
3770
3932
|
)
|
|
3771
3933
|
));
|
|
3772
3934
|
}
|
|
3773
3935
|
|
|
3774
3936
|
// src/PoliticianProfile.jsx
|
|
3775
|
-
import
|
|
3937
|
+
import React22, { useState as useState11, useEffect as useEffect8 } from "react";
|
|
3776
3938
|
|
|
3777
3939
|
// src/LegislativeInlineSummary.jsx
|
|
3778
|
-
import
|
|
3940
|
+
import React20 from "react";
|
|
3779
3941
|
function normalizePosition(pos) {
|
|
3780
3942
|
if (!pos) return "";
|
|
3781
3943
|
return pos.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
@@ -3883,7 +4045,7 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
|
|
|
3883
4045
|
fontSize: fontSizes.sm,
|
|
3884
4046
|
fontWeight: fontWeights.medium
|
|
3885
4047
|
};
|
|
3886
|
-
return /* @__PURE__ */
|
|
4048
|
+
return /* @__PURE__ */ React20.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ React20.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ React20.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ React20.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ React20.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ React20.createElement("div", null), /* @__PURE__ */ React20.createElement("div", { style: footerRow }, /* @__PURE__ */ React20.createElement(
|
|
3887
4049
|
"button",
|
|
3888
4050
|
{
|
|
3889
4051
|
onClick: () => {
|
|
@@ -3908,12 +4070,12 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
|
|
|
3908
4070
|
}
|
|
3909
4071
|
},
|
|
3910
4072
|
"View Full Legislative Record",
|
|
3911
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ React20.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("path", { d: "M9 18l6-6-6-6" }))
|
|
3912
4074
|
)));
|
|
3913
4075
|
}
|
|
3914
4076
|
|
|
3915
4077
|
// src/JudicialScorecard.jsx
|
|
3916
|
-
import
|
|
4078
|
+
import React21 from "react";
|
|
3917
4079
|
|
|
3918
4080
|
// src/judicialUtils.js
|
|
3919
4081
|
function formatDate(dateStr) {
|
|
@@ -4031,7 +4193,7 @@ function JudicialScorecard({ judicialRecord, politicianId, onNavigateToRecord })
|
|
|
4031
4193
|
onNavigateToRecord(`/politician/${politicianId}/judicial-record`);
|
|
4032
4194
|
}
|
|
4033
4195
|
};
|
|
4034
|
-
return /* @__PURE__ */
|
|
4196
|
+
return /* @__PURE__ */ React21.createElement("section", { style: sectionStyle }, /* @__PURE__ */ React21.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ React21.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ React21.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ React21.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ React21.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ React21.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ React21.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React21.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ React21.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ React21.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ React21.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ React21.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ React21.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ React21.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
|
|
4035
4197
|
}
|
|
4036
4198
|
|
|
4037
4199
|
// src/PoliticianProfile.jsx
|
|
@@ -4182,13 +4344,13 @@ function formatAddress(addr) {
|
|
|
4182
4344
|
if (cityStateZip) lines.push(cityStateZip);
|
|
4183
4345
|
return lines;
|
|
4184
4346
|
}
|
|
4185
|
-
var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4186
|
-
var ClockIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4187
|
-
var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4188
|
-
var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4189
|
-
var MailIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4190
|
-
var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4191
|
-
var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4347
|
+
var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React22.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React22.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React22.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
|
|
4348
|
+
var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React22.createElement("polyline", { points: "12 6 12 12 16 14" }));
|
|
4349
|
+
var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ React22.createElement("circle", { cx: "12", cy: "10", r: "3" }));
|
|
4350
|
+
var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 10.8 19.79 19.79 0 01.07 2.18 2 2 0 012.02 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L6.09 7.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z" }));
|
|
4351
|
+
var MailIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M4 4H20C21.1 4 22 4.9 22 6V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V6C2 4.9 2.9 4 4 4Z" }), /* @__PURE__ */ React22.createElement("path", { d: "M22 6L12 13L2 6" }));
|
|
4352
|
+
var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React22.createElement("path", { d: "M2 12H22M12 2C14.5 4.5 16 8 16 12C16 16 14.5 19.5 12 22C9.5 19.5 8 16 8 12C8 8 9.5 4.5 12 2Z" }));
|
|
4353
|
+
var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ React22.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ React22.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ React22.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
|
|
4192
4354
|
function PoliticianProfile({
|
|
4193
4355
|
politician = {},
|
|
4194
4356
|
onBack,
|
|
@@ -4516,7 +4678,7 @@ function PoliticianProfile({
|
|
|
4516
4678
|
borderRadius: borderRadius.full
|
|
4517
4679
|
}
|
|
4518
4680
|
};
|
|
4519
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ React22.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ React22.createElement(
|
|
4520
4682
|
"button",
|
|
4521
4683
|
{
|
|
4522
4684
|
type: "button",
|
|
@@ -4529,9 +4691,9 @@ function PoliticianProfile({
|
|
|
4529
4691
|
e.currentTarget.style.textDecoration = "none";
|
|
4530
4692
|
}
|
|
4531
4693
|
},
|
|
4532
|
-
/* @__PURE__ */
|
|
4694
|
+
/* @__PURE__ */ React22.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M15 19l-7-7 7-7" })),
|
|
4533
4695
|
label
|
|
4534
|
-
), /* @__PURE__ */
|
|
4696
|
+
), /* @__PURE__ */ React22.createElement("div", { style: styles2.card }, /* @__PURE__ */ React22.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ React22.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ React22.createElement(
|
|
4535
4697
|
"img",
|
|
4536
4698
|
{
|
|
4537
4699
|
src: profileImageUrl,
|
|
@@ -4539,7 +4701,7 @@ function PoliticianProfile({
|
|
|
4539
4701
|
style: styles2.photo,
|
|
4540
4702
|
onError: () => setImgError(true)
|
|
4541
4703
|
}
|
|
4542
|
-
) : /* @__PURE__ */
|
|
4704
|
+
) : /* @__PURE__ */ React22.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ React22.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ React22.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ React22.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ React22.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ React22.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ React22.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ React22.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ React22.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React22.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ React22.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ React22.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ React22.createElement(
|
|
4543
4705
|
"a",
|
|
4544
4706
|
{
|
|
4545
4707
|
href: pol.web_form_url,
|
|
@@ -4553,9 +4715,9 @@ function PoliticianProfile({
|
|
|
4553
4715
|
e.currentTarget.style.background = colors.evTeal;
|
|
4554
4716
|
}
|
|
4555
4717
|
},
|
|
4556
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ React22.createElement(ExternalLinkIcon, { size: 14 }),
|
|
4557
4719
|
"Submit a Message"
|
|
4558
|
-
))), hasContactInfo && /* @__PURE__ */
|
|
4720
|
+
))), hasContactInfo && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", { style: divider }), /* @__PURE__ */ React22.createElement("div", { style: sectionHeading }, /* @__PURE__ */ React22.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ React22.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ React22.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ React22.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ React22.createElement(React22.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ React22.createElement("br", null))))))), hasPhones && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ React22.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ React22.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ React22.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React22.createElement(
|
|
4559
4721
|
"a",
|
|
4560
4722
|
{
|
|
4561
4723
|
href: `tel:${phone}`,
|
|
@@ -4568,7 +4730,7 @@ function PoliticianProfile({
|
|
|
4568
4730
|
}
|
|
4569
4731
|
},
|
|
4570
4732
|
phone
|
|
4571
|
-
)))))), hasEmails && /* @__PURE__ */
|
|
4733
|
+
)))))), hasEmails && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ React22.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ React22.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ React22.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ React22.createElement(
|
|
4572
4734
|
"a",
|
|
4573
4735
|
{
|
|
4574
4736
|
href: `mailto:${email}`,
|
|
@@ -4581,7 +4743,7 @@ function PoliticianProfile({
|
|
|
4581
4743
|
}
|
|
4582
4744
|
},
|
|
4583
4745
|
email
|
|
4584
|
-
)))))), hasWebsitesCol && /* @__PURE__ */
|
|
4746
|
+
)))))), hasWebsitesCol && /* @__PURE__ */ React22.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ React22.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ React22.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ React22.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ React22.createElement(
|
|
4585
4747
|
"a",
|
|
4586
4748
|
{
|
|
4587
4749
|
href: url,
|
|
@@ -4596,7 +4758,7 @@ function PoliticianProfile({
|
|
|
4596
4758
|
}
|
|
4597
4759
|
},
|
|
4598
4760
|
extractDomain(url)
|
|
4599
|
-
))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */
|
|
4761
|
+
))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ React22.createElement(
|
|
4600
4762
|
SocialLinks,
|
|
4601
4763
|
{
|
|
4602
4764
|
twitter,
|
|
@@ -4607,14 +4769,14 @@ function PoliticianProfile({
|
|
|
4607
4769
|
size: "sm",
|
|
4608
4770
|
style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
|
|
4609
4771
|
}
|
|
4610
|
-
)))), committees.length > 0 && /* @__PURE__ */
|
|
4772
|
+
)))), committees.length > 0 && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", { style: divider }), /* @__PURE__ */ React22.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ React22.createElement(
|
|
4611
4773
|
JudicialScorecard,
|
|
4612
4774
|
{
|
|
4613
4775
|
judicialRecord,
|
|
4614
4776
|
politicianId,
|
|
4615
4777
|
onNavigateToRecord
|
|
4616
4778
|
}
|
|
4617
|
-
) : /* @__PURE__ */
|
|
4779
|
+
) : /* @__PURE__ */ React22.createElement(
|
|
4618
4780
|
LegislativeInlineSummary,
|
|
4619
4781
|
{
|
|
4620
4782
|
summary: legislativeSummary,
|
|
@@ -4625,7 +4787,7 @@ function PoliticianProfile({
|
|
|
4625
4787
|
}
|
|
4626
4788
|
|
|
4627
4789
|
// src/LegislativeRecord.jsx
|
|
4628
|
-
import
|
|
4790
|
+
import React23, { useState as useState12 } from "react";
|
|
4629
4791
|
var DEFAULT_LIMIT = 25;
|
|
4630
4792
|
function normalizeText(str) {
|
|
4631
4793
|
if (!str) return "";
|
|
@@ -4705,7 +4867,7 @@ function getPositionBadge(position) {
|
|
|
4705
4867
|
return { bg: colors.borderLight, text: colors.textSecondary };
|
|
4706
4868
|
}
|
|
4707
4869
|
function Badge({ label, bg, text }) {
|
|
4708
|
-
return /* @__PURE__ */
|
|
4870
|
+
return /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4709
4871
|
display: "inline-block",
|
|
4710
4872
|
background: bg,
|
|
4711
4873
|
color: text,
|
|
@@ -4718,18 +4880,18 @@ function Badge({ label, bg, text }) {
|
|
|
4718
4880
|
} }, label);
|
|
4719
4881
|
}
|
|
4720
4882
|
function SectionHeader({ title, yearFilter, years, onYearChange }) {
|
|
4721
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4722
4884
|
display: "flex",
|
|
4723
4885
|
alignItems: "center",
|
|
4724
4886
|
justifyContent: "space-between",
|
|
4725
4887
|
marginBottom: spacing[4]
|
|
4726
|
-
} }, /* @__PURE__ */
|
|
4888
|
+
} }, /* @__PURE__ */ React23.createElement("h2", { style: {
|
|
4727
4889
|
fontFamily: fonts.primary,
|
|
4728
4890
|
fontSize: fontSizes.xl,
|
|
4729
4891
|
fontWeight: fontWeights.bold,
|
|
4730
4892
|
color: colors.evTeal,
|
|
4731
4893
|
margin: 0
|
|
4732
|
-
} }, title), years && years.length > 0 && /* @__PURE__ */
|
|
4894
|
+
} }, title), years && years.length > 0 && /* @__PURE__ */ React23.createElement(
|
|
4733
4895
|
"select",
|
|
4734
4896
|
{
|
|
4735
4897
|
value: yearFilter,
|
|
@@ -4745,13 +4907,13 @@ function SectionHeader({ title, yearFilter, years, onYearChange }) {
|
|
|
4745
4907
|
cursor: "pointer"
|
|
4746
4908
|
}
|
|
4747
4909
|
},
|
|
4748
|
-
/* @__PURE__ */
|
|
4749
|
-
years.map((y) => /* @__PURE__ */
|
|
4910
|
+
/* @__PURE__ */ React23.createElement("option", { value: "All" }, "All years"),
|
|
4911
|
+
years.map((y) => /* @__PURE__ */ React23.createElement("option", { key: y, value: y }, y))
|
|
4750
4912
|
));
|
|
4751
4913
|
}
|
|
4752
4914
|
function ShowAllLink({ totalCount, visibleCount, onClick }) {
|
|
4753
4915
|
if (totalCount <= visibleCount) return null;
|
|
4754
|
-
return /* @__PURE__ */
|
|
4916
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ React23.createElement(
|
|
4755
4917
|
"button",
|
|
4756
4918
|
{
|
|
4757
4919
|
type: "button",
|
|
@@ -4779,7 +4941,7 @@ function ShowAllLink({ totalCount, visibleCount, onClick }) {
|
|
|
4779
4941
|
));
|
|
4780
4942
|
}
|
|
4781
4943
|
function EmptyState({ message }) {
|
|
4782
|
-
return /* @__PURE__ */
|
|
4944
|
+
return /* @__PURE__ */ React23.createElement("p", { style: {
|
|
4783
4945
|
fontFamily: fonts.primary,
|
|
4784
4946
|
fontSize: fontSizes.sm,
|
|
4785
4947
|
color: colors.textMuted,
|
|
@@ -4789,24 +4951,24 @@ function EmptyState({ message }) {
|
|
|
4789
4951
|
} }, message);
|
|
4790
4952
|
}
|
|
4791
4953
|
function Spinner() {
|
|
4792
|
-
return /* @__PURE__ */
|
|
4954
|
+
return /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4793
4955
|
display: "flex",
|
|
4794
4956
|
justifyContent: "center",
|
|
4795
4957
|
alignItems: "center",
|
|
4796
4958
|
padding: spacing[10]
|
|
4797
|
-
} }, /* @__PURE__ */
|
|
4959
|
+
} }, /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4798
4960
|
width: "40px",
|
|
4799
4961
|
height: "40px",
|
|
4800
4962
|
borderRadius: borderRadius.full,
|
|
4801
4963
|
border: `3px solid ${colors.borderLight}`,
|
|
4802
4964
|
borderTopColor: colors.evTeal,
|
|
4803
4965
|
animation: "ev-spin 0.8s linear infinite"
|
|
4804
|
-
} }), /* @__PURE__ */
|
|
4966
|
+
} }), /* @__PURE__ */ React23.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
|
|
4805
4967
|
}
|
|
4806
4968
|
function CommitteesSection({ committees, leadership }) {
|
|
4807
4969
|
const [showAll, setShowAll] = useState12(false);
|
|
4808
4970
|
const visible = showAll ? committees : committees.slice(0, DEFAULT_LIMIT);
|
|
4809
|
-
return /* @__PURE__ */
|
|
4971
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React23.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ React23.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4810
4972
|
display: "inline-flex",
|
|
4811
4973
|
alignItems: "center",
|
|
4812
4974
|
gap: spacing[1],
|
|
@@ -4817,23 +4979,23 @@ function CommitteesSection({ committees, leadership }) {
|
|
|
4817
4979
|
fontFamily: fonts.primary,
|
|
4818
4980
|
fontSize: fontSizes.sm,
|
|
4819
4981
|
fontWeight: fontWeights.semibold
|
|
4820
|
-
} }, role.title, role.chamber && /* @__PURE__ */
|
|
4982
|
+
} }, role.title, role.chamber && /* @__PURE__ */ React23.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ React23.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", null, visible.map((c, i) => {
|
|
4821
4983
|
const badge = getRoleBadge(c.role);
|
|
4822
|
-
return /* @__PURE__ */
|
|
4984
|
+
return /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4823
4985
|
display: "flex",
|
|
4824
4986
|
alignItems: "center",
|
|
4825
4987
|
justifyContent: "space-between",
|
|
4826
4988
|
padding: `${spacing[3]} 0`,
|
|
4827
4989
|
borderBottom: `1px solid ${colors.borderLight}`,
|
|
4828
4990
|
gap: spacing[3]
|
|
4829
|
-
} }, /* @__PURE__ */
|
|
4991
|
+
} }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4830
4992
|
fontFamily: fonts.primary,
|
|
4831
4993
|
fontSize: fontSizes.sm,
|
|
4832
4994
|
color: colors.textSecondary,
|
|
4833
4995
|
flex: 1,
|
|
4834
4996
|
minWidth: 0
|
|
4835
|
-
} }, c.committee_name, c.parent_name && /* @__PURE__ */
|
|
4836
|
-
})), !showAll && /* @__PURE__ */
|
|
4997
|
+
} }, c.committee_name, c.parent_name && /* @__PURE__ */ React23.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ React23.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
|
|
4998
|
+
})), !showAll && /* @__PURE__ */ React23.createElement(
|
|
4837
4999
|
ShowAllLink,
|
|
4838
5000
|
{
|
|
4839
5001
|
totalCount: committees.length,
|
|
@@ -4852,7 +5014,7 @@ function LegislationSection({ bills, isMobile }) {
|
|
|
4852
5014
|
};
|
|
4853
5015
|
const filtered = yearFilter === "All" ? bills : bills.filter((b) => extractYear(b.introduced_at) === yearFilter);
|
|
4854
5016
|
const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
|
|
4855
|
-
return /* @__PURE__ */
|
|
5017
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React23.createElement(
|
|
4856
5018
|
SectionHeader,
|
|
4857
5019
|
{
|
|
4858
5020
|
title: "Sponsored Legislation",
|
|
@@ -4860,42 +5022,42 @@ function LegislationSection({ bills, isMobile }) {
|
|
|
4860
5022
|
years,
|
|
4861
5023
|
onYearChange: handleYearChange
|
|
4862
5024
|
}
|
|
4863
|
-
), bills.length === 0 ? /* @__PURE__ */
|
|
5025
|
+
), bills.length === 0 ? /* @__PURE__ */ React23.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", null, visible.map((bill, i) => {
|
|
4864
5026
|
const statusBadge = getStatusBadge(bill.status_label);
|
|
4865
|
-
return /* @__PURE__ */
|
|
5027
|
+
return /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4866
5028
|
display: "flex",
|
|
4867
5029
|
flexDirection: isMobile ? "column" : "row",
|
|
4868
5030
|
alignItems: isMobile ? "flex-start" : "center",
|
|
4869
5031
|
gap: isMobile ? spacing[1] : spacing[3],
|
|
4870
5032
|
padding: `${spacing[3]} 0`,
|
|
4871
5033
|
borderBottom: `1px solid ${colors.borderLight}`
|
|
4872
|
-
} }, /* @__PURE__ */
|
|
5034
|
+
} }, /* @__PURE__ */ React23.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4873
5035
|
fontFamily: fonts.primary,
|
|
4874
5036
|
fontSize: fontSizes.xs,
|
|
4875
5037
|
fontWeight: fontWeights.bold,
|
|
4876
5038
|
color: colors.textSecondary,
|
|
4877
5039
|
marginRight: spacing[2]
|
|
4878
|
-
} }, bill.number), /* @__PURE__ */
|
|
5040
|
+
} }, bill.number), /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4879
5041
|
fontFamily: fonts.primary,
|
|
4880
5042
|
fontSize: fontSizes.sm,
|
|
4881
5043
|
color: colors.textSecondary
|
|
4882
|
-
} }, bill.title)), /* @__PURE__ */
|
|
5044
|
+
} }, bill.title)), /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4883
5045
|
display: "flex",
|
|
4884
5046
|
alignItems: "center",
|
|
4885
5047
|
gap: spacing[2],
|
|
4886
5048
|
flexShrink: 0,
|
|
4887
5049
|
flexWrap: "wrap"
|
|
4888
|
-
} }, /* @__PURE__ */
|
|
5050
|
+
} }, /* @__PURE__ */ React23.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4889
5051
|
fontFamily: fonts.primary,
|
|
4890
5052
|
fontSize: fontSizes.xs,
|
|
4891
5053
|
color: colors.textMuted
|
|
4892
|
-
} }, formatDate2(bill.introduced_at)), /* @__PURE__ */
|
|
5054
|
+
} }, formatDate2(bill.introduced_at)), /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4893
5055
|
fontFamily: fonts.primary,
|
|
4894
5056
|
fontSize: fontSizes.xs,
|
|
4895
5057
|
color: colors.textMuted,
|
|
4896
5058
|
fontStyle: "italic"
|
|
4897
5059
|
} }, bill.is_sponsor ? "Sponsored" : "Cosponsored")));
|
|
4898
|
-
})), !showAll && /* @__PURE__ */
|
|
5060
|
+
})), !showAll && /* @__PURE__ */ React23.createElement(
|
|
4899
5061
|
ShowAllLink,
|
|
4900
5062
|
{
|
|
4901
5063
|
totalCount: filtered.length,
|
|
@@ -4914,7 +5076,7 @@ function VotingSection({ votes, isMobile }) {
|
|
|
4914
5076
|
};
|
|
4915
5077
|
const filtered = yearFilter === "All" ? votes : votes.filter((v) => extractYear(v.vote_date) === yearFilter);
|
|
4916
5078
|
const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
|
|
4917
|
-
return /* @__PURE__ */
|
|
5079
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ React23.createElement(
|
|
4918
5080
|
SectionHeader,
|
|
4919
5081
|
{
|
|
4920
5082
|
title: "Voting Record",
|
|
@@ -4922,38 +5084,38 @@ function VotingSection({ votes, isMobile }) {
|
|
|
4922
5084
|
years,
|
|
4923
5085
|
onYearChange: handleYearChange
|
|
4924
5086
|
}
|
|
4925
|
-
), votes.length === 0 ? /* @__PURE__ */
|
|
5087
|
+
), votes.length === 0 ? /* @__PURE__ */ React23.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", null, visible.map((vote, i) => {
|
|
4926
5088
|
const positionBadge = getPositionBadge(vote.position);
|
|
4927
5089
|
const normPosition = normalizeText(vote.position);
|
|
4928
5090
|
const topic = vote.bill_title || vote.vote_question;
|
|
4929
5091
|
const sourceUrl = vote.bill_url;
|
|
4930
|
-
return /* @__PURE__ */
|
|
5092
|
+
return /* @__PURE__ */ React23.createElement("div", { key: i, style: {
|
|
4931
5093
|
display: "flex",
|
|
4932
5094
|
flexDirection: isMobile ? "column" : "row",
|
|
4933
5095
|
alignItems: isMobile ? "flex-start" : "center",
|
|
4934
5096
|
gap: isMobile ? spacing[1] : spacing[3],
|
|
4935
5097
|
padding: `${spacing[3]} 0`,
|
|
4936
5098
|
borderBottom: `1px solid ${colors.borderLight}`
|
|
4937
|
-
} }, /* @__PURE__ */
|
|
5099
|
+
} }, /* @__PURE__ */ React23.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4938
5100
|
fontFamily: fonts.primary,
|
|
4939
5101
|
fontSize: fontSizes.sm,
|
|
4940
5102
|
color: colors.textSecondary
|
|
4941
|
-
} }, topic)), /* @__PURE__ */
|
|
5103
|
+
} }, topic)), /* @__PURE__ */ React23.createElement("div", { style: {
|
|
4942
5104
|
display: "flex",
|
|
4943
5105
|
alignItems: "center",
|
|
4944
5106
|
gap: spacing[2],
|
|
4945
5107
|
flexShrink: 0,
|
|
4946
5108
|
flexWrap: "wrap"
|
|
4947
|
-
} }, vote.vote_date && /* @__PURE__ */
|
|
5109
|
+
} }, vote.vote_date && /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4948
5110
|
fontFamily: fonts.primary,
|
|
4949
5111
|
fontSize: fontSizes.xs,
|
|
4950
5112
|
color: colors.textMuted
|
|
4951
|
-
} }, formatDate2(vote.vote_date)), /* @__PURE__ */
|
|
5113
|
+
} }, formatDate2(vote.vote_date)), /* @__PURE__ */ React23.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ React23.createElement("span", { style: {
|
|
4952
5114
|
fontFamily: fonts.primary,
|
|
4953
5115
|
fontSize: fontSizes.xs,
|
|
4954
5116
|
color: vote.result === "Passed" ? colors.success : colors.textMuted,
|
|
4955
5117
|
fontWeight: fontWeights.medium
|
|
4956
|
-
} }, vote.result), sourceUrl && /* @__PURE__ */
|
|
5118
|
+
} }, vote.result), sourceUrl && /* @__PURE__ */ React23.createElement(
|
|
4957
5119
|
"a",
|
|
4958
5120
|
{
|
|
4959
5121
|
href: sourceUrl,
|
|
@@ -4974,7 +5136,7 @@ function VotingSection({ votes, isMobile }) {
|
|
|
4974
5136
|
},
|
|
4975
5137
|
"Source"
|
|
4976
5138
|
)));
|
|
4977
|
-
})), !showAll && /* @__PURE__ */
|
|
5139
|
+
})), !showAll && /* @__PURE__ */ React23.createElement(
|
|
4978
5140
|
ShowAllLink,
|
|
4979
5141
|
{
|
|
4980
5142
|
totalCount: filtered.length,
|
|
@@ -4993,20 +5155,20 @@ function LegislativeRecord({
|
|
|
4993
5155
|
}) {
|
|
4994
5156
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
4995
5157
|
if (loading) {
|
|
4996
|
-
return /* @__PURE__ */
|
|
5158
|
+
return /* @__PURE__ */ React23.createElement(Spinner, null);
|
|
4997
5159
|
}
|
|
4998
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ React23.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ React23.createElement("h1", { style: {
|
|
4999
5161
|
fontFamily: fonts.primary,
|
|
5000
5162
|
fontSize: isMobile ? fontSizes["2xl"] : fontSizes["4xl"],
|
|
5001
5163
|
fontWeight: fontWeights.bold,
|
|
5002
5164
|
color: colors.evTeal,
|
|
5003
5165
|
marginBottom: spacing[8],
|
|
5004
5166
|
marginTop: 0
|
|
5005
|
-
} }, "Legislative Record: ", politicianName), /* @__PURE__ */
|
|
5167
|
+
} }, "Legislative Record: ", politicianName), /* @__PURE__ */ React23.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ React23.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ React23.createElement(VotingSection, { votes, isMobile }));
|
|
5006
5168
|
}
|
|
5007
5169
|
|
|
5008
5170
|
// src/JudicialRecordDetail.jsx
|
|
5009
|
-
import
|
|
5171
|
+
import React24 from "react";
|
|
5010
5172
|
var containerStyle = {
|
|
5011
5173
|
fontFamily: "'Manrope', sans-serif",
|
|
5012
5174
|
maxWidth: "800px"
|
|
@@ -5091,7 +5253,7 @@ var emptyStateStyle = {
|
|
|
5091
5253
|
function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
5092
5254
|
var _a;
|
|
5093
5255
|
if (!judicialRecord) {
|
|
5094
|
-
return /* @__PURE__ */
|
|
5256
|
+
return /* @__PURE__ */ React24.createElement("div", { style: containerStyle }, /* @__PURE__ */ React24.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React24.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
|
|
5095
5257
|
}
|
|
5096
5258
|
const {
|
|
5097
5259
|
judge_detail: detail,
|
|
@@ -5100,13 +5262,13 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
|
5100
5262
|
disciplinary_records: disciplinary = []
|
|
5101
5263
|
} = judicialRecord;
|
|
5102
5264
|
const displayName = politician.full_name || `${politician.first_name || ""} ${politician.last_name || ""}`.trim();
|
|
5103
|
-
return /* @__PURE__ */
|
|
5265
|
+
return /* @__PURE__ */ React24.createElement("div", { style: containerStyle }, /* @__PURE__ */ React24.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ React24.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ React24.createElement("p", { style: roleStyle }, (detail == null ? void 0 : detail.court_role) || politician.office_title, (detail == null ? void 0 : detail.date_seated) && ` \xB7 Seated ${formatDate(detail.date_seated)}`), detail && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.election_type === "retention" ? "Retention (Yes/No)" : "Contested Election")), ((_a = detail.areas_of_focus) == null ? void 0 : _a.length) > 0 && /* @__PURE__ */ React24.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ React24.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ React24.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ React24.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ React24.createElement("table", { style: tableStyle }, /* @__PURE__ */ React24.createElement("thead", null, /* @__PURE__ */ React24.createElement("tr", null, /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ React24.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ React24.createElement("tr", { key: i }, /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ React24.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ React24.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ React24.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ React24.createElement("table", { style: tableStyle }, /* @__PURE__ */ React24.createElement("thead", null, /* @__PURE__ */ React24.createElement("tr", null, /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ React24.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ React24.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ React24.createElement("tr", { key: i }, /* @__PURE__ */ React24.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ React24.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ React24.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ React24.createElement("div", { key: i, style: {
|
|
5104
5266
|
borderLeft: "3px solid #fc8181",
|
|
5105
5267
|
backgroundColor: "#fff5f5",
|
|
5106
5268
|
borderRadius: "0 6px 6px 0",
|
|
5107
5269
|
padding: "12px 16px",
|
|
5108
5270
|
marginBottom: "10px"
|
|
5109
|
-
} }, /* @__PURE__ */
|
|
5271
|
+
} }, /* @__PURE__ */ React24.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ React24.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ React24.createElement(
|
|
5110
5272
|
"a",
|
|
5111
5273
|
{
|
|
5112
5274
|
href: d.source_url,
|
|
@@ -5119,7 +5281,7 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
|
5119
5281
|
}
|
|
5120
5282
|
|
|
5121
5283
|
// src/AuthForm.jsx
|
|
5122
|
-
import
|
|
5284
|
+
import React25, { useState as useState13 } from "react";
|
|
5123
5285
|
function AuthForm({
|
|
5124
5286
|
logoSrc = "/EVLogo.svg",
|
|
5125
5287
|
appName = "Empowered Vote",
|
|
@@ -5146,7 +5308,7 @@ function AuthForm({
|
|
|
5146
5308
|
setPasswordMismatch(false);
|
|
5147
5309
|
onSubmit == null ? void 0 : onSubmit(username.trim(), password);
|
|
5148
5310
|
};
|
|
5149
|
-
const EyeOpen = () => /* @__PURE__ */
|
|
5311
|
+
const EyeOpen = () => /* @__PURE__ */ React25.createElement(
|
|
5150
5312
|
"svg",
|
|
5151
5313
|
{
|
|
5152
5314
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5156,7 +5318,7 @@ function AuthForm({
|
|
|
5156
5318
|
stroke: "currentColor",
|
|
5157
5319
|
style: { width: "20px", height: "20px" }
|
|
5158
5320
|
},
|
|
5159
|
-
/* @__PURE__ */
|
|
5321
|
+
/* @__PURE__ */ React25.createElement(
|
|
5160
5322
|
"path",
|
|
5161
5323
|
{
|
|
5162
5324
|
strokeLinecap: "round",
|
|
@@ -5164,7 +5326,7 @@ function AuthForm({
|
|
|
5164
5326
|
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
|
5165
5327
|
}
|
|
5166
5328
|
),
|
|
5167
|
-
/* @__PURE__ */
|
|
5329
|
+
/* @__PURE__ */ React25.createElement(
|
|
5168
5330
|
"path",
|
|
5169
5331
|
{
|
|
5170
5332
|
strokeLinecap: "round",
|
|
@@ -5173,7 +5335,7 @@ function AuthForm({
|
|
|
5173
5335
|
}
|
|
5174
5336
|
)
|
|
5175
5337
|
);
|
|
5176
|
-
const EyeClosed = () => /* @__PURE__ */
|
|
5338
|
+
const EyeClosed = () => /* @__PURE__ */ React25.createElement(
|
|
5177
5339
|
"svg",
|
|
5178
5340
|
{
|
|
5179
5341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5183,7 +5345,7 @@ function AuthForm({
|
|
|
5183
5345
|
stroke: "currentColor",
|
|
5184
5346
|
style: { width: "20px", height: "20px" }
|
|
5185
5347
|
},
|
|
5186
|
-
/* @__PURE__ */
|
|
5348
|
+
/* @__PURE__ */ React25.createElement(
|
|
5187
5349
|
"path",
|
|
5188
5350
|
{
|
|
5189
5351
|
strokeLinecap: "round",
|
|
@@ -5192,17 +5354,17 @@ function AuthForm({
|
|
|
5192
5354
|
}
|
|
5193
5355
|
)
|
|
5194
5356
|
);
|
|
5195
|
-
const PasswordToggle = () => /* @__PURE__ */
|
|
5357
|
+
const PasswordToggle = () => /* @__PURE__ */ React25.createElement(
|
|
5196
5358
|
"button",
|
|
5197
5359
|
{
|
|
5198
5360
|
type: "button",
|
|
5199
5361
|
onClick: () => setShowPasswords((prev) => !prev),
|
|
5200
5362
|
style: styles.passwordToggle
|
|
5201
5363
|
},
|
|
5202
|
-
showPasswords ? /* @__PURE__ */
|
|
5364
|
+
showPasswords ? /* @__PURE__ */ React25.createElement(EyeOpen, null) : /* @__PURE__ */ React25.createElement(EyeClosed, null)
|
|
5203
5365
|
);
|
|
5204
5366
|
const displayError = passwordMismatch ? "Passwords do not match." : error;
|
|
5205
|
-
return /* @__PURE__ */
|
|
5367
|
+
return /* @__PURE__ */ React25.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ React25.createElement("div", { style: styles.container }, /* @__PURE__ */ React25.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ React25.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ React25.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ React25.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ React25.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ React25.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ React25.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React25.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ React25.createElement(
|
|
5206
5368
|
"input",
|
|
5207
5369
|
{
|
|
5208
5370
|
type: "text",
|
|
@@ -5219,7 +5381,7 @@ function AuthForm({
|
|
|
5219
5381
|
},
|
|
5220
5382
|
required: true
|
|
5221
5383
|
}
|
|
5222
|
-
)), /* @__PURE__ */
|
|
5384
|
+
)), /* @__PURE__ */ React25.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React25.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ React25.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React25.createElement(
|
|
5223
5385
|
"input",
|
|
5224
5386
|
{
|
|
5225
5387
|
type: showPasswords ? "text" : "password",
|
|
@@ -5235,7 +5397,7 @@ function AuthForm({
|
|
|
5235
5397
|
},
|
|
5236
5398
|
required: true
|
|
5237
5399
|
}
|
|
5238
|
-
), /* @__PURE__ */
|
|
5400
|
+
), /* @__PURE__ */ React25.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ React25.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ React25.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ React25.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ React25.createElement(
|
|
5239
5401
|
"input",
|
|
5240
5402
|
{
|
|
5241
5403
|
type: showPasswords ? "text" : "password",
|
|
@@ -5251,7 +5413,7 @@ function AuthForm({
|
|
|
5251
5413
|
},
|
|
5252
5414
|
required: true
|
|
5253
5415
|
}
|
|
5254
|
-
), /* @__PURE__ */
|
|
5416
|
+
), /* @__PURE__ */ React25.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ React25.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ React25.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ React25.createElement(
|
|
5255
5417
|
"button",
|
|
5256
5418
|
{
|
|
5257
5419
|
type: "submit",
|
|
@@ -5269,7 +5431,7 @@ function AuthForm({
|
|
|
5269
5431
|
}
|
|
5270
5432
|
},
|
|
5271
5433
|
submitting ? isLogin ? "Signing In..." : "Creating Account..." : isLogin ? "Sign In" : "Create Account"
|
|
5272
|
-
), onModeSwitch && /* @__PURE__ */
|
|
5434
|
+
), onModeSwitch && /* @__PURE__ */ React25.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ React25.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ React25.createElement(
|
|
5273
5435
|
"button",
|
|
5274
5436
|
{
|
|
5275
5437
|
type: "button",
|
|
@@ -5442,9 +5604,9 @@ var styles = {
|
|
|
5442
5604
|
};
|
|
5443
5605
|
|
|
5444
5606
|
// src/TopicTierBadge.jsx
|
|
5445
|
-
import
|
|
5607
|
+
import React26 from "react";
|
|
5446
5608
|
function LandmarkIcon({ size = 14 }) {
|
|
5447
|
-
return /* @__PURE__ */
|
|
5609
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5448
5610
|
"svg",
|
|
5449
5611
|
{
|
|
5450
5612
|
width: size,
|
|
@@ -5458,16 +5620,16 @@ function LandmarkIcon({ size = 14 }) {
|
|
|
5458
5620
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5459
5621
|
"aria-hidden": "true"
|
|
5460
5622
|
},
|
|
5461
|
-
/* @__PURE__ */
|
|
5462
|
-
/* @__PURE__ */
|
|
5463
|
-
/* @__PURE__ */
|
|
5464
|
-
/* @__PURE__ */
|
|
5465
|
-
/* @__PURE__ */
|
|
5466
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 18v-7" }),
|
|
5624
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }),
|
|
5625
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M14 18v-7" }),
|
|
5626
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M18 18v-7" }),
|
|
5627
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M3 22h18" }),
|
|
5628
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M6 18v-7" })
|
|
5467
5629
|
);
|
|
5468
5630
|
}
|
|
5469
5631
|
function Building2Icon({ size = 14 }) {
|
|
5470
|
-
return /* @__PURE__ */
|
|
5632
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5471
5633
|
"svg",
|
|
5472
5634
|
{
|
|
5473
5635
|
width: size,
|
|
@@ -5481,17 +5643,17 @@ function Building2Icon({ size = 14 }) {
|
|
|
5481
5643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5482
5644
|
"aria-hidden": "true"
|
|
5483
5645
|
},
|
|
5484
|
-
/* @__PURE__ */
|
|
5485
|
-
/* @__PURE__ */
|
|
5486
|
-
/* @__PURE__ */
|
|
5487
|
-
/* @__PURE__ */
|
|
5488
|
-
/* @__PURE__ */
|
|
5489
|
-
/* @__PURE__ */
|
|
5490
|
-
/* @__PURE__ */
|
|
5646
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
|
|
5647
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
|
|
5648
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
|
|
5649
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 6h4" }),
|
|
5650
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 10h4" }),
|
|
5651
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 14h4" }),
|
|
5652
|
+
/* @__PURE__ */ React26.createElement("path", { d: "M10 18h4" })
|
|
5491
5653
|
);
|
|
5492
5654
|
}
|
|
5493
5655
|
function HomeIcon({ size = 14 }) {
|
|
5494
|
-
return /* @__PURE__ */
|
|
5656
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5495
5657
|
"svg",
|
|
5496
5658
|
{
|
|
5497
5659
|
width: size,
|
|
@@ -5505,8 +5667,8 @@ function HomeIcon({ size = 14 }) {
|
|
|
5505
5667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5506
5668
|
"aria-hidden": "true"
|
|
5507
5669
|
},
|
|
5508
|
-
/* @__PURE__ */
|
|
5509
|
-
/* @__PURE__ */
|
|
5670
|
+
/* @__PURE__ */ React26.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
5671
|
+
/* @__PURE__ */ React26.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
5510
5672
|
);
|
|
5511
5673
|
}
|
|
5512
5674
|
var TIER_INFO = {
|
|
@@ -5566,7 +5728,7 @@ function TopicTierBadge({
|
|
|
5566
5728
|
userSelect: "none"
|
|
5567
5729
|
};
|
|
5568
5730
|
};
|
|
5569
|
-
return /* @__PURE__ */
|
|
5731
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5570
5732
|
"span",
|
|
5571
5733
|
{
|
|
5572
5734
|
className: "ev-topic-tier-badge",
|
|
@@ -5576,13 +5738,13 @@ function TopicTierBadge({
|
|
|
5576
5738
|
},
|
|
5577
5739
|
effectiveTiers.map((tier) => {
|
|
5578
5740
|
const { label, Icon } = TIER_INFO[tier];
|
|
5579
|
-
return /* @__PURE__ */
|
|
5741
|
+
return /* @__PURE__ */ React26.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ React26.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ React26.createElement("span", null, label));
|
|
5580
5742
|
})
|
|
5581
5743
|
);
|
|
5582
5744
|
}
|
|
5583
5745
|
|
|
5584
5746
|
// src/CompassCoverageCallout.jsx
|
|
5585
|
-
import
|
|
5747
|
+
import React27, { useState as useState14 } from "react";
|
|
5586
5748
|
var TIER_LABELS = {
|
|
5587
5749
|
federal: "federal",
|
|
5588
5750
|
state: "state",
|
|
@@ -5646,15 +5808,15 @@ function CompassCoverageCallout({
|
|
|
5646
5808
|
setDismissed(true);
|
|
5647
5809
|
if (onDismiss) onDismiss();
|
|
5648
5810
|
};
|
|
5649
|
-
return /* @__PURE__ */
|
|
5811
|
+
return /* @__PURE__ */ React27.createElement(
|
|
5650
5812
|
"div",
|
|
5651
5813
|
{
|
|
5652
5814
|
className: "ev-compass-coverage-callout",
|
|
5653
5815
|
role: "status",
|
|
5654
5816
|
style: containerStyle2
|
|
5655
5817
|
},
|
|
5656
|
-
/* @__PURE__ */
|
|
5657
|
-
onDismiss !== void 0 && /* @__PURE__ */
|
|
5818
|
+
/* @__PURE__ */ React27.createElement("div", { style: textStyle }, /* @__PURE__ */ React27.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ React27.createElement("div", null, count === 0 ? `None of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. ` : `Only ${count} of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. `, "Add more ", tierLabel, "-applicable topics to get better comparisons with ", tierLabel, " officials."), /* @__PURE__ */ React27.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
|
|
5819
|
+
onDismiss !== void 0 && /* @__PURE__ */ React27.createElement(
|
|
5658
5820
|
"button",
|
|
5659
5821
|
{
|
|
5660
5822
|
onClick: handleDismiss,
|
|
@@ -5667,7 +5829,7 @@ function CompassCoverageCallout({
|
|
|
5667
5829
|
}
|
|
5668
5830
|
|
|
5669
5831
|
// src/ExpandCompassNudge.jsx
|
|
5670
|
-
import
|
|
5832
|
+
import React28 from "react";
|
|
5671
5833
|
function ExpandCompassNudge({
|
|
5672
5834
|
politicianName,
|
|
5673
5835
|
missingCount,
|
|
@@ -5714,7 +5876,7 @@ function ExpandCompassNudge({
|
|
|
5714
5876
|
};
|
|
5715
5877
|
const topicsLabel = missingCount === 1 ? "topic" : "topics";
|
|
5716
5878
|
const speakerName = politicianName || "This politician";
|
|
5717
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ React28.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ React28.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ React28.createElement("p", { style: bodyStyle }, speakerName, " has stances on ", missingCount, " more ", topicsLabel, " you haven't answered yet. Expand your compass to see where you stand on all of them."), /* @__PURE__ */ React28.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
|
|
5718
5880
|
}
|
|
5719
5881
|
|
|
5720
5882
|
// src/computeTierCoverage.js
|
|
@@ -5894,14 +6056,14 @@ function isGuestPopulated(domain, fullEvContext) {
|
|
|
5894
6056
|
}
|
|
5895
6057
|
|
|
5896
6058
|
// src/StanceAccordion.jsx
|
|
5897
|
-
import
|
|
6059
|
+
import React30, { useState as useState16, useRef as useRef4, useCallback as useCallback2, useEffect as useEffect10 } from "react";
|
|
5898
6060
|
|
|
5899
6061
|
// src/Favicon.jsx
|
|
5900
|
-
import
|
|
6062
|
+
import React29 from "react";
|
|
5901
6063
|
function Favicon({ url, size = 16 }) {
|
|
5902
6064
|
try {
|
|
5903
6065
|
const domain = new URL(url).hostname;
|
|
5904
|
-
return /* @__PURE__ */
|
|
6066
|
+
return /* @__PURE__ */ React29.createElement(
|
|
5905
6067
|
"img",
|
|
5906
6068
|
{
|
|
5907
6069
|
src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
|
|
@@ -5912,7 +6074,7 @@ function Favicon({ url, size = 16 }) {
|
|
|
5912
6074
|
}
|
|
5913
6075
|
);
|
|
5914
6076
|
} catch {
|
|
5915
|
-
return /* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ React29.createElement(
|
|
5916
6078
|
"svg",
|
|
5917
6079
|
{
|
|
5918
6080
|
width: size,
|
|
@@ -5923,8 +6085,8 @@ function Favicon({ url, size = 16 }) {
|
|
|
5923
6085
|
strokeWidth: "1.5",
|
|
5924
6086
|
style: { verticalAlign: "middle", flexShrink: 0 }
|
|
5925
6087
|
},
|
|
5926
|
-
/* @__PURE__ */
|
|
5927
|
-
/* @__PURE__ */
|
|
6088
|
+
/* @__PURE__ */ React29.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
6089
|
+
/* @__PURE__ */ React29.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
5928
6090
|
);
|
|
5929
6091
|
}
|
|
5930
6092
|
}
|
|
@@ -6051,13 +6213,13 @@ function StanceAccordion({
|
|
|
6051
6213
|
visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
|
|
6052
6214
|
}
|
|
6053
6215
|
}
|
|
6054
|
-
return /* @__PURE__ */
|
|
6216
|
+
return /* @__PURE__ */ React30.createElement(
|
|
6055
6217
|
"div",
|
|
6056
6218
|
{
|
|
6057
6219
|
className: "flex flex-col",
|
|
6058
6220
|
style: { fontFamily: "'Manrope', sans-serif" }
|
|
6059
6221
|
},
|
|
6060
|
-
/* @__PURE__ */
|
|
6222
|
+
/* @__PURE__ */ React30.createElement(
|
|
6061
6223
|
"h3",
|
|
6062
6224
|
{
|
|
6063
6225
|
className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
|
|
@@ -6080,15 +6242,15 @@ function StanceAccordion({
|
|
|
6080
6242
|
if (topic.topic_key) return q.issue === topic.topic_key;
|
|
6081
6243
|
return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
|
|
6082
6244
|
}) : [];
|
|
6083
|
-
return /* @__PURE__ */
|
|
6245
|
+
return /* @__PURE__ */ React30.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React30.createElement(
|
|
6084
6246
|
"button",
|
|
6085
6247
|
{
|
|
6086
6248
|
type: "button",
|
|
6087
6249
|
onClick: () => handleToggle(topicId),
|
|
6088
6250
|
className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
|
|
6089
6251
|
},
|
|
6090
|
-
/* @__PURE__ */
|
|
6091
|
-
/* @__PURE__ */
|
|
6252
|
+
/* @__PURE__ */ React30.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React30.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React30.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React30.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
|
|
6253
|
+
/* @__PURE__ */ React30.createElement(
|
|
6092
6254
|
"svg",
|
|
6093
6255
|
{
|
|
6094
6256
|
width: "16",
|
|
@@ -6105,9 +6267,9 @@ function StanceAccordion({
|
|
|
6105
6267
|
transition: "transform 0.2s ease"
|
|
6106
6268
|
}
|
|
6107
6269
|
},
|
|
6108
|
-
/* @__PURE__ */
|
|
6270
|
+
/* @__PURE__ */ React30.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
6109
6271
|
)
|
|
6110
|
-
), /* @__PURE__ */
|
|
6272
|
+
), /* @__PURE__ */ React30.createElement(
|
|
6111
6273
|
"div",
|
|
6112
6274
|
{
|
|
6113
6275
|
style: {
|
|
@@ -6116,7 +6278,7 @@ function StanceAccordion({
|
|
|
6116
6278
|
transition: "grid-template-rows 0.25s ease"
|
|
6117
6279
|
}
|
|
6118
6280
|
},
|
|
6119
|
-
/* @__PURE__ */
|
|
6281
|
+
/* @__PURE__ */ React30.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React30.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React30.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React30.createElement(
|
|
6120
6282
|
"div",
|
|
6121
6283
|
{
|
|
6122
6284
|
style: {
|
|
@@ -6128,14 +6290,14 @@ function StanceAccordion({
|
|
|
6128
6290
|
animation: "ev-spin 0.8s linear infinite"
|
|
6129
6291
|
}
|
|
6130
6292
|
}
|
|
6131
|
-
)), !isLoading && cached && /* @__PURE__ */
|
|
6293
|
+
)), !isLoading && cached && /* @__PURE__ */ React30.createElement(React30.Fragment, null, cached.reasoning ? /* @__PURE__ */ React30.createElement(
|
|
6132
6294
|
"p",
|
|
6133
6295
|
{
|
|
6134
6296
|
className: "text-sm text-neutral-700 mb-3",
|
|
6135
6297
|
style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
|
|
6136
6298
|
},
|
|
6137
6299
|
cached.reasoning
|
|
6138
|
-
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */
|
|
6300
|
+
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React30.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React30.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React30.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React30.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React30.createElement(
|
|
6139
6301
|
"a",
|
|
6140
6302
|
{
|
|
6141
6303
|
href: src,
|
|
@@ -6143,9 +6305,9 @@ function StanceAccordion({
|
|
|
6143
6305
|
rel: "noreferrer",
|
|
6144
6306
|
className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
|
|
6145
6307
|
},
|
|
6146
|
-
/* @__PURE__ */
|
|
6147
|
-
/* @__PURE__ */
|
|
6148
|
-
))))), topicQuotes.length > 0 && /* @__PURE__ */
|
|
6308
|
+
/* @__PURE__ */ React30.createElement(Favicon, { url: src }),
|
|
6309
|
+
/* @__PURE__ */ React30.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
|
|
6310
|
+
))))), topicQuotes.length > 0 && /* @__PURE__ */ React30.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React30.createElement(
|
|
6149
6311
|
"p",
|
|
6150
6312
|
{
|
|
6151
6313
|
style: {
|
|
@@ -6162,7 +6324,7 @@ function StanceAccordion({
|
|
|
6162
6324
|
const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
|
|
6163
6325
|
const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
|
|
6164
6326
|
const sourceName = quote.source_name || quote.sourceName;
|
|
6165
|
-
return /* @__PURE__ */
|
|
6327
|
+
return /* @__PURE__ */ React30.createElement(
|
|
6166
6328
|
"div",
|
|
6167
6329
|
{
|
|
6168
6330
|
key: quote.id,
|
|
@@ -6174,7 +6336,7 @@ function StanceAccordion({
|
|
|
6174
6336
|
marginBottom: "8px"
|
|
6175
6337
|
}
|
|
6176
6338
|
},
|
|
6177
|
-
/* @__PURE__ */
|
|
6339
|
+
/* @__PURE__ */ React30.createElement(
|
|
6178
6340
|
"p",
|
|
6179
6341
|
{
|
|
6180
6342
|
style: {
|
|
@@ -6187,7 +6349,7 @@ function StanceAccordion({
|
|
|
6187
6349
|
},
|
|
6188
6350
|
quote.text
|
|
6189
6351
|
),
|
|
6190
|
-
verdict === "agreed" && /* @__PURE__ */
|
|
6352
|
+
verdict === "agreed" && /* @__PURE__ */ React30.createElement(
|
|
6191
6353
|
"span",
|
|
6192
6354
|
{
|
|
6193
6355
|
style: {
|
|
@@ -6204,10 +6366,10 @@ function StanceAccordion({
|
|
|
6204
6366
|
flexShrink: 0
|
|
6205
6367
|
}
|
|
6206
6368
|
},
|
|
6207
|
-
/* @__PURE__ */
|
|
6369
|
+
/* @__PURE__ */ React30.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React30.createElement("path", { d: "M5 13l4 4L19 7" })),
|
|
6208
6370
|
"Agreed"
|
|
6209
6371
|
),
|
|
6210
|
-
verdict === "disagreed" && /* @__PURE__ */
|
|
6372
|
+
verdict === "disagreed" && /* @__PURE__ */ React30.createElement(
|
|
6211
6373
|
"span",
|
|
6212
6374
|
{
|
|
6213
6375
|
style: {
|
|
@@ -6224,10 +6386,10 @@ function StanceAccordion({
|
|
|
6224
6386
|
flexShrink: 0
|
|
6225
6387
|
}
|
|
6226
6388
|
},
|
|
6227
|
-
/* @__PURE__ */
|
|
6389
|
+
/* @__PURE__ */ React30.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React30.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
|
|
6228
6390
|
"Disagreed"
|
|
6229
6391
|
),
|
|
6230
|
-
sourceName && /* @__PURE__ */
|
|
6392
|
+
sourceName && /* @__PURE__ */ React30.createElement(
|
|
6231
6393
|
"a",
|
|
6232
6394
|
{
|
|
6233
6395
|
href: quote.source_url || quote.sourceUrl,
|
|
@@ -6244,10 +6406,10 @@ function StanceAccordion({
|
|
|
6244
6406
|
sourceName
|
|
6245
6407
|
)
|
|
6246
6408
|
);
|
|
6247
|
-
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */
|
|
6409
|
+
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
|
|
6248
6410
|
));
|
|
6249
6411
|
}),
|
|
6250
|
-
hasToggle && /* @__PURE__ */
|
|
6412
|
+
hasToggle && /* @__PURE__ */ React30.createElement(
|
|
6251
6413
|
"button",
|
|
6252
6414
|
{
|
|
6253
6415
|
type: "button",
|
|
@@ -6259,23 +6421,6 @@ function StanceAccordion({
|
|
|
6259
6421
|
)
|
|
6260
6422
|
);
|
|
6261
6423
|
}
|
|
6262
|
-
|
|
6263
|
-
// src/FeedbackButton.jsx
|
|
6264
|
-
import React30 from "react";
|
|
6265
|
-
var FEEDBACK_BASE = "https://ev-landing.empowered.vote/feedback.html";
|
|
6266
|
-
function FeedbackButton({ feature, className = "", label = "Feedback" }) {
|
|
6267
|
-
const href = feature ? `${FEEDBACK_BASE}?feature=${encodeURIComponent(feature)}` : FEEDBACK_BASE;
|
|
6268
|
-
return /* @__PURE__ */ React30.createElement(
|
|
6269
|
-
"a",
|
|
6270
|
-
{
|
|
6271
|
-
href,
|
|
6272
|
-
target: "_blank",
|
|
6273
|
-
rel: "noopener noreferrer",
|
|
6274
|
-
className
|
|
6275
|
-
},
|
|
6276
|
-
label
|
|
6277
|
-
);
|
|
6278
|
-
}
|
|
6279
6424
|
export {
|
|
6280
6425
|
AuthForm,
|
|
6281
6426
|
BallotIcon,
|