@empoweredvote/ev-ui 0.9.8 → 0.10.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/README.md +111 -111
- package/dist/index.js +673 -352
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +651 -331
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/tailwind-preset.js +81 -81
- package/src/tokens.js +415 -415
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ __export(index_exports, {
|
|
|
54
54
|
PoliticianCard: () => PoliticianCard,
|
|
55
55
|
PoliticianProfile: () => PoliticianProfile,
|
|
56
56
|
RadarChartCore: () => RadarChartCore,
|
|
57
|
+
SiteFooter: () => SiteFooter,
|
|
57
58
|
SiteHeader: () => SiteHeader,
|
|
58
59
|
SocialLinks: () => SocialLinks,
|
|
59
60
|
StanceAccordion: () => StanceAccordion,
|
|
@@ -1785,8 +1786,328 @@ function SiteHeader({
|
|
|
1785
1786
|
);
|
|
1786
1787
|
}
|
|
1787
1788
|
|
|
1788
|
-
// src/
|
|
1789
|
+
// src/SiteFooter.jsx
|
|
1789
1790
|
var import_react9 = __toESM(require("react"));
|
|
1791
|
+
var SIGNUP_ENDPOINT_DEFAULT = "https://gq2nohazl3447rhtau34o6yqs40vpude.lambda-url.us-east-1.on.aws/";
|
|
1792
|
+
var DEFAULT_LINKS = [
|
|
1793
|
+
{ label: "Mind Map", href: "https://empowered.vote/maps/purpose-map.html" },
|
|
1794
|
+
{ label: "Briefing", href: "https://empowered.vote/briefing" },
|
|
1795
|
+
{ label: "Financials", href: "https://financials.empowered.vote", external: true }
|
|
1796
|
+
];
|
|
1797
|
+
function SiteFooter({
|
|
1798
|
+
darkMode = false,
|
|
1799
|
+
brandLabel = "Empowered Vote \xB7 Alpha",
|
|
1800
|
+
year,
|
|
1801
|
+
links = DEFAULT_LINKS,
|
|
1802
|
+
newsletter = true,
|
|
1803
|
+
endpoint = SIGNUP_ENDPOINT_DEFAULT,
|
|
1804
|
+
className = "",
|
|
1805
|
+
style = {}
|
|
1806
|
+
}) {
|
|
1807
|
+
const [open, setOpen] = (0, import_react9.useState)(false);
|
|
1808
|
+
const [submitting, setSubmitting] = (0, import_react9.useState)(false);
|
|
1809
|
+
const [note, setNote] = (0, import_react9.useState)(null);
|
|
1810
|
+
const formRef = (0, import_react9.useRef)(null);
|
|
1811
|
+
const emailRef = (0, import_react9.useRef)(null);
|
|
1812
|
+
const uid = (0, import_react9.useId)().replace(/:/g, "");
|
|
1813
|
+
const formId = `ev-sf-form-${uid}`;
|
|
1814
|
+
const emailId = `ev-sf-email-${uid}`;
|
|
1815
|
+
const noteId = `ev-sf-note-${uid}`;
|
|
1816
|
+
const resolvedYear = year != null ? year : (/* @__PURE__ */ new Date()).getFullYear();
|
|
1817
|
+
const t = darkMode ? {
|
|
1818
|
+
bg: "#131416",
|
|
1819
|
+
borderTop: "#2D2D32",
|
|
1820
|
+
brand: "#F2F2F2",
|
|
1821
|
+
muted: "#8B949E",
|
|
1822
|
+
link: "#8B949E",
|
|
1823
|
+
linkHover: "#F2F2F2",
|
|
1824
|
+
dot: "#FFD740",
|
|
1825
|
+
inputBg: "#1C1C1F",
|
|
1826
|
+
inputBorder: "#41454E",
|
|
1827
|
+
inputText: "#F2F2F2",
|
|
1828
|
+
placeholder: "#8B949E",
|
|
1829
|
+
btnBg: "#F2F2F2",
|
|
1830
|
+
btnText: "#111113",
|
|
1831
|
+
btnHover: "#FFFFFF",
|
|
1832
|
+
teal: "#1DA8C6",
|
|
1833
|
+
coral: "#FF6B52",
|
|
1834
|
+
noteText: "#F2F2F2",
|
|
1835
|
+
noteBg: "rgba(29, 168, 198, 0.15)",
|
|
1836
|
+
errorBg: "rgba(255, 107, 82, 0.18)"
|
|
1837
|
+
} : {
|
|
1838
|
+
bg: "#F7F7F8",
|
|
1839
|
+
borderTop: "#E5E7EB",
|
|
1840
|
+
brand: "#1C1C1C",
|
|
1841
|
+
muted: "#6B7280",
|
|
1842
|
+
link: "#6B7280",
|
|
1843
|
+
linkHover: "#1C1C1C",
|
|
1844
|
+
dot: "#FED12E",
|
|
1845
|
+
inputBg: "#FFFFFF",
|
|
1846
|
+
inputBorder: "#D3D7DE",
|
|
1847
|
+
inputText: "#1C1C1C",
|
|
1848
|
+
placeholder: "#6B7280",
|
|
1849
|
+
btnBg: "#1C1C1C",
|
|
1850
|
+
btnText: "#FFFFFF",
|
|
1851
|
+
btnHover: "#000000",
|
|
1852
|
+
teal: "#00657C",
|
|
1853
|
+
coral: "#FF5740",
|
|
1854
|
+
noteText: "#1C1C1C",
|
|
1855
|
+
noteBg: "rgba(0, 101, 124, 0.10)",
|
|
1856
|
+
errorBg: "rgba(255, 87, 64, 0.12)"
|
|
1857
|
+
};
|
|
1858
|
+
function toggle() {
|
|
1859
|
+
setOpen((prev) => {
|
|
1860
|
+
const next = !prev;
|
|
1861
|
+
if (next) {
|
|
1862
|
+
setTimeout(() => emailRef.current && emailRef.current.focus(), 260);
|
|
1863
|
+
}
|
|
1864
|
+
return next;
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
function handleSubmit(e) {
|
|
1868
|
+
e.preventDefault();
|
|
1869
|
+
const form = formRef.current;
|
|
1870
|
+
if (!form) return;
|
|
1871
|
+
const emailInput = form.elements.email;
|
|
1872
|
+
if (emailInput && !emailInput.checkValidity()) {
|
|
1873
|
+
emailInput.reportValidity();
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
const payload = {
|
|
1877
|
+
email: emailInput ? emailInput.value.trim() : "",
|
|
1878
|
+
company: form.elements.company && form.elements.company.value || ""
|
|
1879
|
+
// honeypot
|
|
1880
|
+
};
|
|
1881
|
+
setSubmitting(true);
|
|
1882
|
+
setNote({ msg: "Adding you\u2026", kind: null });
|
|
1883
|
+
fetch(endpoint, {
|
|
1884
|
+
method: "POST",
|
|
1885
|
+
headers: { "Content-Type": "application/json" },
|
|
1886
|
+
body: JSON.stringify(payload)
|
|
1887
|
+
}).then((r) => r.json().catch(() => ({ ok: r.ok }))).then((data) => {
|
|
1888
|
+
if (data && data.ok) {
|
|
1889
|
+
form.reset();
|
|
1890
|
+
setNote({ msg: "You\u2019re on the list \u2014 thanks for following the build. \u{1F389}", kind: "ok" });
|
|
1891
|
+
} else {
|
|
1892
|
+
setNote({ msg: data && data.error || "Something went wrong. Please try again.", kind: "error" });
|
|
1893
|
+
}
|
|
1894
|
+
}).catch(() => {
|
|
1895
|
+
setNote({ msg: "Couldn\u2019t reach us just now. Please try again in a moment.", kind: "error" });
|
|
1896
|
+
}).then(() => setSubmitting(false));
|
|
1897
|
+
}
|
|
1898
|
+
const rootStyle = {
|
|
1899
|
+
borderTop: `1px solid ${t.borderTop}`,
|
|
1900
|
+
padding: "32px 0 40px",
|
|
1901
|
+
background: t.bg,
|
|
1902
|
+
color: t.muted,
|
|
1903
|
+
fontFamily: fonts.primary,
|
|
1904
|
+
fontSize: "0.88rem",
|
|
1905
|
+
// CSS custom props consumed by the scoped <style> for pseudo-selectors.
|
|
1906
|
+
"--ev-sf-placeholder": t.placeholder,
|
|
1907
|
+
"--ev-sf-focus": t.teal,
|
|
1908
|
+
"--ev-sf-input-bg": t.inputBg,
|
|
1909
|
+
"--ev-sf-input-border": t.inputBorder,
|
|
1910
|
+
"--ev-sf-input-text": t.inputText,
|
|
1911
|
+
...style
|
|
1912
|
+
};
|
|
1913
|
+
const linkBase = { color: t.link, textDecoration: "none", transition: "color 0.15s ease" };
|
|
1914
|
+
const onLinkEnter = (e) => {
|
|
1915
|
+
e.currentTarget.style.color = t.linkHover;
|
|
1916
|
+
};
|
|
1917
|
+
const onLinkLeave = (e) => {
|
|
1918
|
+
e.currentTarget.style.color = t.link;
|
|
1919
|
+
};
|
|
1920
|
+
return /* @__PURE__ */ import_react9.default.createElement("footer", { className: `ev-site-footer ${className}`.trim(), style: rootStyle }, /* @__PURE__ */ import_react9.default.createElement("style", null, CSS), /* @__PURE__ */ import_react9.default.createElement("div", { className: "ev-sf-wrap" }, /* @__PURE__ */ import_react9.default.createElement("span", { className: "ev-sf-brand", style: { color: t.brand, fontWeight: fontWeights.bold } }, /* @__PURE__ */ import_react9.default.createElement("span", { className: "ev-sf-dot", style: { background: t.dot } }), brandLabel), /* @__PURE__ */ import_react9.default.createElement("span", { className: "ev-sf-links" }, /* @__PURE__ */ import_react9.default.createElement("span", { style: { color: t.muted } }, "\xA9 ", resolvedYear), links.map((link) => /* @__PURE__ */ import_react9.default.createElement(
|
|
1921
|
+
"a",
|
|
1922
|
+
{
|
|
1923
|
+
key: link.href,
|
|
1924
|
+
href: link.href,
|
|
1925
|
+
style: linkBase,
|
|
1926
|
+
onMouseEnter: onLinkEnter,
|
|
1927
|
+
onMouseLeave: onLinkLeave,
|
|
1928
|
+
...link.external ? { target: "_blank", rel: "noopener noreferrer" } : {}
|
|
1929
|
+
},
|
|
1930
|
+
link.label
|
|
1931
|
+
)), newsletter && /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement(
|
|
1932
|
+
"button",
|
|
1933
|
+
{
|
|
1934
|
+
type: "button",
|
|
1935
|
+
className: "ev-sf-toggle",
|
|
1936
|
+
"aria-expanded": open,
|
|
1937
|
+
"aria-controls": formId,
|
|
1938
|
+
onClick: toggle,
|
|
1939
|
+
style: { color: open ? t.linkHover : t.link },
|
|
1940
|
+
onMouseEnter: (e) => {
|
|
1941
|
+
e.currentTarget.style.color = t.linkHover;
|
|
1942
|
+
},
|
|
1943
|
+
onMouseLeave: (e) => {
|
|
1944
|
+
e.currentTarget.style.color = open ? t.linkHover : t.link;
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
"Newsletter ",
|
|
1948
|
+
/* @__PURE__ */ import_react9.default.createElement("span", { className: "ev-sf-caret", "aria-hidden": "true" }, "\u25B8")
|
|
1949
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
1950
|
+
"form",
|
|
1951
|
+
{
|
|
1952
|
+
ref: formRef,
|
|
1953
|
+
className: `ev-sf-form${open ? " open" : ""}`,
|
|
1954
|
+
id: formId,
|
|
1955
|
+
method: "post",
|
|
1956
|
+
noValidate: true,
|
|
1957
|
+
"aria-hidden": !open,
|
|
1958
|
+
onSubmit: handleSubmit
|
|
1959
|
+
},
|
|
1960
|
+
/* @__PURE__ */ import_react9.default.createElement("label", { className: "ev-sf-sr-only", htmlFor: emailId }, "Email address"),
|
|
1961
|
+
/* @__PURE__ */ import_react9.default.createElement(
|
|
1962
|
+
"input",
|
|
1963
|
+
{
|
|
1964
|
+
ref: emailRef,
|
|
1965
|
+
id: emailId,
|
|
1966
|
+
name: "email",
|
|
1967
|
+
type: "email",
|
|
1968
|
+
required: true,
|
|
1969
|
+
autoComplete: "email",
|
|
1970
|
+
placeholder: "you@example.com",
|
|
1971
|
+
tabIndex: open ? 0 : -1,
|
|
1972
|
+
style: {
|
|
1973
|
+
background: t.inputBg,
|
|
1974
|
+
borderColor: t.inputBorder,
|
|
1975
|
+
color: t.inputText
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
),
|
|
1979
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { className: "ev-sf-hp", "aria-hidden": "true" }, /* @__PURE__ */ import_react9.default.createElement("label", null, "Company", /* @__PURE__ */ import_react9.default.createElement("input", { type: "text", name: "company", tabIndex: -1, autoComplete: "off" }))),
|
|
1980
|
+
/* @__PURE__ */ import_react9.default.createElement(
|
|
1981
|
+
"button",
|
|
1982
|
+
{
|
|
1983
|
+
type: "submit",
|
|
1984
|
+
className: "ev-sf-btn",
|
|
1985
|
+
tabIndex: open ? 0 : -1,
|
|
1986
|
+
disabled: submitting,
|
|
1987
|
+
style: { background: t.btnBg, color: t.btnText },
|
|
1988
|
+
onMouseEnter: (e) => {
|
|
1989
|
+
if (!submitting) e.currentTarget.style.background = t.btnHover;
|
|
1990
|
+
},
|
|
1991
|
+
onMouseLeave: (e) => {
|
|
1992
|
+
e.currentTarget.style.background = t.btnBg;
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1995
|
+
"Subscribe"
|
|
1996
|
+
)
|
|
1997
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
1998
|
+
"p",
|
|
1999
|
+
{
|
|
2000
|
+
className: "ev-sf-note",
|
|
2001
|
+
id: noteId,
|
|
2002
|
+
role: "status",
|
|
2003
|
+
"aria-live": "polite",
|
|
2004
|
+
hidden: !note,
|
|
2005
|
+
style: note ? {
|
|
2006
|
+
color: t.noteText,
|
|
2007
|
+
background: note.kind === "error" ? t.errorBg : t.noteBg,
|
|
2008
|
+
borderColor: note.kind === "error" ? t.coral : t.teal
|
|
2009
|
+
} : void 0
|
|
2010
|
+
},
|
|
2011
|
+
note ? note.msg : ""
|
|
2012
|
+
)))));
|
|
2013
|
+
}
|
|
2014
|
+
var CSS = `
|
|
2015
|
+
.ev-site-footer .ev-sf-wrap {
|
|
2016
|
+
max-width: 1280px; margin: 0 auto; padding: 0 24px;
|
|
2017
|
+
display: flex; justify-content: space-between; align-items: center;
|
|
2018
|
+
flex-wrap: wrap; gap: 12px;
|
|
2019
|
+
}
|
|
2020
|
+
.ev-site-footer .ev-sf-brand {
|
|
2021
|
+
display: inline-flex; align-items: center; gap: 10px;
|
|
2022
|
+
}
|
|
2023
|
+
.ev-site-footer .ev-sf-dot {
|
|
2024
|
+
width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto;
|
|
2025
|
+
}
|
|
2026
|
+
.ev-site-footer .ev-sf-links {
|
|
2027
|
+
display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap;
|
|
2028
|
+
}
|
|
2029
|
+
.ev-site-footer .ev-sf-sr-only {
|
|
2030
|
+
position: absolute; width: 1px; height: 1px;
|
|
2031
|
+
padding: 0; margin: -1px; overflow: hidden;
|
|
2032
|
+
clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
2033
|
+
}
|
|
2034
|
+
.ev-site-footer .ev-sf-hp {
|
|
2035
|
+
position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
|
|
2036
|
+
}
|
|
2037
|
+
.ev-site-footer .ev-sf-toggle {
|
|
2038
|
+
font: inherit; background: none; border: none; padding: 0; cursor: pointer;
|
|
2039
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
2040
|
+
transition: color 0.15s ease;
|
|
2041
|
+
}
|
|
2042
|
+
.ev-site-footer .ev-sf-toggle:focus-visible {
|
|
2043
|
+
outline: 2px solid var(--ev-sf-focus); outline-offset: 3px; border-radius: 4px;
|
|
2044
|
+
}
|
|
2045
|
+
.ev-site-footer .ev-sf-caret {
|
|
2046
|
+
font-size: 0.7em; display: inline-block; transition: transform 0.25s ease;
|
|
2047
|
+
}
|
|
2048
|
+
.ev-site-footer .ev-sf-toggle[aria-expanded="true"] .ev-sf-caret {
|
|
2049
|
+
transform: rotate(90deg);
|
|
2050
|
+
}
|
|
2051
|
+
/* Collapsed by default; slides open to the right, pushing the links left.
|
|
2052
|
+
margin-left cancels the parent flex gap so there is no phantom slot when closed. */
|
|
2053
|
+
.ev-site-footer .ev-sf-form {
|
|
2054
|
+
display: flex; align-items: center; gap: 8px;
|
|
2055
|
+
max-width: 0; opacity: 0; margin-left: -18px;
|
|
2056
|
+
overflow: hidden; pointer-events: none;
|
|
2057
|
+
transition: max-width 0.4s cubic-bezier(.4, 0, .2, 1), opacity 0.3s ease, margin-left 0.4s ease;
|
|
2058
|
+
}
|
|
2059
|
+
.ev-site-footer .ev-sf-form.open {
|
|
2060
|
+
max-width: 360px; opacity: 1; margin-left: 0; pointer-events: auto;
|
|
2061
|
+
}
|
|
2062
|
+
.ev-site-footer .ev-sf-form input[type="email"] {
|
|
2063
|
+
width: 188px; flex: 0 0 auto; min-width: 0;
|
|
2064
|
+
font-family: inherit; font-size: 0.9rem;
|
|
2065
|
+
color: var(--ev-sf-input-text); background: var(--ev-sf-input-bg);
|
|
2066
|
+
border: 1.5px solid var(--ev-sf-input-border);
|
|
2067
|
+
border-radius: 999px; padding: 9px 15px;
|
|
2068
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
2069
|
+
}
|
|
2070
|
+
.ev-site-footer .ev-sf-form input[type="email"]::placeholder { color: var(--ev-sf-placeholder); }
|
|
2071
|
+
.ev-site-footer .ev-sf-form input[type="email"]:focus {
|
|
2072
|
+
outline: 2px solid transparent; outline-offset: 1px;
|
|
2073
|
+
border-color: var(--ev-sf-focus);
|
|
2074
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev-sf-focus) 20%, transparent);
|
|
2075
|
+
}
|
|
2076
|
+
.ev-site-footer .ev-sf-btn {
|
|
2077
|
+
font-family: inherit; font-weight: 700; font-size: 0.88rem;
|
|
2078
|
+
white-space: nowrap; padding: 9px 18px;
|
|
2079
|
+
border: 1.5px solid transparent; border-radius: 999px; cursor: pointer;
|
|
2080
|
+
transition: background 0.15s ease, transform 0.15s ease;
|
|
2081
|
+
}
|
|
2082
|
+
.ev-site-footer .ev-sf-btn:hover { transform: translateY(-1px); }
|
|
2083
|
+
.ev-site-footer .ev-sf-btn:disabled { opacity: 0.7; cursor: default; transform: none; }
|
|
2084
|
+
.ev-site-footer .ev-sf-btn:focus-visible {
|
|
2085
|
+
outline: 2px solid var(--ev-sf-focus); outline-offset: 2px;
|
|
2086
|
+
}
|
|
2087
|
+
.ev-site-footer .ev-sf-note {
|
|
2088
|
+
flex-basis: 100%; width: 100%;
|
|
2089
|
+
font-size: 0.82rem; line-height: 1.4;
|
|
2090
|
+
margin: 12px 0 0; padding: 11px 14px;
|
|
2091
|
+
border-radius: 10px; text-align: right;
|
|
2092
|
+
border: 1px solid transparent;
|
|
2093
|
+
}
|
|
2094
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2095
|
+
.ev-site-footer .ev-sf-form { transition: opacity 0.2s ease; }
|
|
2096
|
+
.ev-site-footer .ev-sf-caret { transition: none; }
|
|
2097
|
+
.ev-site-footer .ev-sf-btn:hover { transform: none; }
|
|
2098
|
+
}
|
|
2099
|
+
@media (max-width: 640px) {
|
|
2100
|
+
.ev-site-footer .ev-sf-wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
|
|
2101
|
+
}
|
|
2102
|
+
@media (max-width: 480px) {
|
|
2103
|
+
.ev-site-footer .ev-sf-form.open { flex-basis: 100%; max-width: 100%; margin-left: 0; }
|
|
2104
|
+
.ev-site-footer .ev-sf-form.open input[type="email"] { flex: 1; width: auto; }
|
|
2105
|
+
.ev-site-footer .ev-sf-note { text-align: left; }
|
|
2106
|
+
}
|
|
2107
|
+
`;
|
|
2108
|
+
|
|
2109
|
+
// src/FilterSidebar.jsx
|
|
2110
|
+
var import_react10 = __toESM(require("react"));
|
|
1790
2111
|
function FilterSidebar({
|
|
1791
2112
|
title = "Filter by",
|
|
1792
2113
|
zipCode = "",
|
|
@@ -1940,14 +2261,14 @@ function FilterSidebar({
|
|
|
1940
2261
|
fontSize: fontSizes.sm
|
|
1941
2262
|
}
|
|
1942
2263
|
};
|
|
1943
|
-
return /* @__PURE__ */
|
|
2264
|
+
return /* @__PURE__ */ import_react10.default.createElement("aside", { style: styles2.sidebar, className: "ev-filter-sidebar" }, !isMobile && /* @__PURE__ */ import_react10.default.createElement("h2", { style: styles2.title }, title), /* @__PURE__ */ import_react10.default.createElement("div", { style: isMobile ? void 0 : styles2.contentTop }, /* @__PURE__ */ import_react10.default.createElement("div", { style: isMobile ? { marginBottom: spacing[3] } : styles2.section }, !isMobile && /* @__PURE__ */ import_react10.default.createElement("label", { style: styles2.sectionLabel }, "Location"), autocompleteContainerRef ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1944
2265
|
"div",
|
|
1945
2266
|
{
|
|
1946
2267
|
ref: autocompleteContainerRef,
|
|
1947
2268
|
style: styles2.zipInputWrapper,
|
|
1948
2269
|
className: "ev-autocomplete-container"
|
|
1949
2270
|
}
|
|
1950
|
-
) : /* @__PURE__ */
|
|
2271
|
+
) : /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.zipInputWrapper }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1951
2272
|
"input",
|
|
1952
2273
|
{
|
|
1953
2274
|
ref: zipInputRef,
|
|
@@ -1959,7 +2280,7 @@ function FilterSidebar({
|
|
|
1959
2280
|
style: styles2.zipInput,
|
|
1960
2281
|
"aria-label": "Search location"
|
|
1961
2282
|
}
|
|
1962
|
-
), /* @__PURE__ */
|
|
2283
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
1963
2284
|
"button",
|
|
1964
2285
|
{
|
|
1965
2286
|
type: "button",
|
|
@@ -1968,7 +2289,7 @@ function FilterSidebar({
|
|
|
1968
2289
|
"aria-label": "Clear ZIP code"
|
|
1969
2290
|
},
|
|
1970
2291
|
"\xD7"
|
|
1971
|
-
))), /* @__PURE__ */
|
|
2292
|
+
))), /* @__PURE__ */ import_react10.default.createElement("div", { style: isMobile ? {} : styles2.section }, !isMobile && /* @__PURE__ */ import_react10.default.createElement("label", { style: styles2.sectionLabel }, "Group"), /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.radioGroup, role: "radiogroup", "aria-label": "Filter by group" }, filterOptions.map((option) => /* @__PURE__ */ import_react10.default.createElement("label", { key: option.value, style: styles2.radioLabel }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1972
2293
|
"input",
|
|
1973
2294
|
{
|
|
1974
2295
|
type: "radio",
|
|
@@ -1978,18 +2299,18 @@ function FilterSidebar({
|
|
|
1978
2299
|
onChange: () => onFilterChange == null ? void 0 : onFilterChange(option.value),
|
|
1979
2300
|
style: styles2.radioInput
|
|
1980
2301
|
}
|
|
1981
|
-
), option.label))))), !isMobile && /* @__PURE__ */
|
|
2302
|
+
), option.label))))), !isMobile && /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.imageSection }, locationLabel && /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.locationLabel }, locationLabel), buildingImageSrc ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1982
2303
|
"img",
|
|
1983
2304
|
{
|
|
1984
2305
|
src: buildingImageSrc,
|
|
1985
2306
|
alt: `${selectedFilter} government building`,
|
|
1986
2307
|
style: styles2.buildingImage
|
|
1987
2308
|
}
|
|
1988
|
-
) : /* @__PURE__ */
|
|
2309
|
+
) : /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.buildingPlaceholder }, "No image")));
|
|
1989
2310
|
}
|
|
1990
2311
|
|
|
1991
2312
|
// src/PoliticianCard.jsx
|
|
1992
|
-
var
|
|
2313
|
+
var import_react11 = __toESM(require("react"));
|
|
1993
2314
|
function PoliticianCard({
|
|
1994
2315
|
id,
|
|
1995
2316
|
imageSrc,
|
|
@@ -2157,7 +2478,7 @@ function PoliticianCard({
|
|
|
2157
2478
|
textTransform: "uppercase"
|
|
2158
2479
|
}
|
|
2159
2480
|
};
|
|
2160
|
-
const CompassIcon2 = () => /* @__PURE__ */
|
|
2481
|
+
const CompassIcon2 = () => /* @__PURE__ */ import_react11.default.createElement(
|
|
2161
2482
|
"svg",
|
|
2162
2483
|
{
|
|
2163
2484
|
style: styles2.compassIcon,
|
|
@@ -2165,7 +2486,7 @@ function PoliticianCard({
|
|
|
2165
2486
|
fill: "none",
|
|
2166
2487
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2167
2488
|
},
|
|
2168
|
-
/* @__PURE__ */
|
|
2489
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
2169
2490
|
"polygon",
|
|
2170
2491
|
{
|
|
2171
2492
|
points: "12,1 21.5,6.5 21.5,17.5 12,23 2.5,17.5 2.5,6.5",
|
|
@@ -2175,13 +2496,13 @@ function PoliticianCard({
|
|
|
2175
2496
|
strokeLinejoin: "round"
|
|
2176
2497
|
}
|
|
2177
2498
|
),
|
|
2178
|
-
/* @__PURE__ */
|
|
2179
|
-
/* @__PURE__ */
|
|
2180
|
-
/* @__PURE__ */
|
|
2181
|
-
/* @__PURE__ */
|
|
2182
|
-
/* @__PURE__ */
|
|
2183
|
-
/* @__PURE__ */
|
|
2184
|
-
/* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ import_react11.default.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "1", stroke: "currentColor", strokeWidth: "1" }),
|
|
2500
|
+
/* @__PURE__ */ import_react11.default.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
2501
|
+
/* @__PURE__ */ import_react11.default.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
2502
|
+
/* @__PURE__ */ import_react11.default.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "23", stroke: "currentColor", strokeWidth: "1" }),
|
|
2503
|
+
/* @__PURE__ */ import_react11.default.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
2504
|
+
/* @__PURE__ */ import_react11.default.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
|
|
2505
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
2185
2506
|
"polygon",
|
|
2186
2507
|
{
|
|
2187
2508
|
points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
|
|
@@ -2189,7 +2510,7 @@ function PoliticianCard({
|
|
|
2189
2510
|
opacity: "0.35"
|
|
2190
2511
|
}
|
|
2191
2512
|
),
|
|
2192
|
-
/* @__PURE__ */
|
|
2513
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
2193
2514
|
"polygon",
|
|
2194
2515
|
{
|
|
2195
2516
|
points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
|
|
@@ -2200,8 +2521,8 @@ function PoliticianCard({
|
|
|
2200
2521
|
}
|
|
2201
2522
|
)
|
|
2202
2523
|
);
|
|
2203
|
-
const [imgError, setImgError] = (0,
|
|
2204
|
-
(0,
|
|
2524
|
+
const [imgError, setImgError] = (0, import_react11.useState)(false);
|
|
2525
|
+
(0, import_react11.useEffect)(() => {
|
|
2205
2526
|
setImgError(false);
|
|
2206
2527
|
}, [imageSrc]);
|
|
2207
2528
|
const getInitials = (n) => {
|
|
@@ -2210,7 +2531,7 @@ function PoliticianCard({
|
|
|
2210
2531
|
const initials = parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_a = parts[0]) == null ? void 0 : _a[0]) || "?";
|
|
2211
2532
|
return initials.toUpperCase();
|
|
2212
2533
|
};
|
|
2213
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
2214
2535
|
"div",
|
|
2215
2536
|
{
|
|
2216
2537
|
style: styles2.card,
|
|
@@ -2235,8 +2556,8 @@ function PoliticianCard({
|
|
|
2235
2556
|
}
|
|
2236
2557
|
}
|
|
2237
2558
|
},
|
|
2238
|
-
badge && /* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2559
|
+
badge && /* @__PURE__ */ import_react11.default.createElement("span", { style: styles2.badge }, badge),
|
|
2560
|
+
/* @__PURE__ */ import_react11.default.createElement("div", { style: styles2.imageWrapper }, imageSrc && !imgError ? /* @__PURE__ */ import_react11.default.createElement(
|
|
2240
2561
|
"img",
|
|
2241
2562
|
{
|
|
2242
2563
|
src: imageSrc,
|
|
@@ -2244,9 +2565,9 @@ function PoliticianCard({
|
|
|
2244
2565
|
style: styles2.image,
|
|
2245
2566
|
onError: () => setImgError(true)
|
|
2246
2567
|
}
|
|
2247
|
-
) : /* @__PURE__ */
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
onCompassClick && /* @__PURE__ */
|
|
2568
|
+
) : /* @__PURE__ */ import_react11.default.createElement("div", { style: styles2.imagePlaceholder }, getInitials(name))),
|
|
2569
|
+
/* @__PURE__ */ import_react11.default.createElement("div", { style: styles2.content }, /* @__PURE__ */ import_react11.default.createElement("h3", { style: styles2.name }, name), /* @__PURE__ */ import_react11.default.createElement("p", { style: styles2.title }, title), subtitle && /* @__PURE__ */ import_react11.default.createElement("p", { style: styles2.subtitle }, subtitle), footer && /* @__PURE__ */ import_react11.default.createElement("div", { style: { marginTop: "auto", marginLeft: "-5px" } }, footer)),
|
|
2570
|
+
onCompassClick && /* @__PURE__ */ import_react11.default.createElement(
|
|
2250
2571
|
"button",
|
|
2251
2572
|
{
|
|
2252
2573
|
type: "button",
|
|
@@ -2261,25 +2582,25 @@ function PoliticianCard({
|
|
|
2261
2582
|
},
|
|
2262
2583
|
"aria-label": `View ${name}'s compass`
|
|
2263
2584
|
},
|
|
2264
|
-
/* @__PURE__ */
|
|
2585
|
+
/* @__PURE__ */ import_react11.default.createElement(CompassIcon2, null)
|
|
2265
2586
|
)
|
|
2266
2587
|
);
|
|
2267
2588
|
}
|
|
2268
2589
|
|
|
2269
2590
|
// src/CompassCardHorizontal.jsx
|
|
2270
|
-
var
|
|
2591
|
+
var import_react16 = __toESM(require("react"));
|
|
2271
2592
|
|
|
2272
2593
|
// src/CompassCardHorizontalMeta.jsx
|
|
2273
|
-
var
|
|
2594
|
+
var import_react15 = __toESM(require("react"));
|
|
2274
2595
|
|
|
2275
2596
|
// src/IconOverlay.jsx
|
|
2276
|
-
var
|
|
2277
|
-
var
|
|
2597
|
+
var import_react13 = __toESM(require("react"));
|
|
2598
|
+
var import_react14 = require("@floating-ui/react");
|
|
2278
2599
|
|
|
2279
2600
|
// src/icons.js
|
|
2280
|
-
var
|
|
2601
|
+
var import_react12 = __toESM(require("react"));
|
|
2281
2602
|
function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
2282
|
-
return /* @__PURE__ */
|
|
2603
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
2283
2604
|
"svg",
|
|
2284
2605
|
{
|
|
2285
2606
|
width: size,
|
|
@@ -2292,13 +2613,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
|
|
|
2292
2613
|
strokeLinejoin: "round",
|
|
2293
2614
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2294
2615
|
},
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ import_react12.default.createElement("path", { d: "m9 12 2 2 4-4" }),
|
|
2617
|
+
/* @__PURE__ */ import_react12.default.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
|
|
2618
|
+
/* @__PURE__ */ import_react12.default.createElement("path", { d: "M22 19H2" })
|
|
2298
2619
|
);
|
|
2299
2620
|
}
|
|
2300
2621
|
function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
2301
|
-
return /* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
2302
2623
|
"svg",
|
|
2303
2624
|
{
|
|
2304
2625
|
width: size,
|
|
@@ -2311,27 +2632,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
|
|
|
2311
2632
|
strokeLinejoin: "round",
|
|
2312
2633
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2313
2634
|
},
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ import_react12.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2636
|
+
/* @__PURE__ */ import_react12.default.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" })
|
|
2316
2637
|
);
|
|
2317
2638
|
}
|
|
2318
2639
|
function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
2319
2640
|
let paths;
|
|
2320
2641
|
switch (branch) {
|
|
2321
2642
|
case "executive":
|
|
2322
|
-
paths = /* @__PURE__ */
|
|
2643
|
+
paths = /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ import_react12.default.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ import_react12.default.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
|
|
2323
2644
|
break;
|
|
2324
2645
|
case "legislative":
|
|
2325
|
-
paths = /* @__PURE__ */
|
|
2646
|
+
paths = /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.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__ */ import_react12.default.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M15 12h-5" }));
|
|
2326
2647
|
break;
|
|
2327
2648
|
case "judicial":
|
|
2328
|
-
paths = /* @__PURE__ */
|
|
2649
|
+
paths = /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M8 21h8" }));
|
|
2329
2650
|
break;
|
|
2330
2651
|
default:
|
|
2331
|
-
paths = /* @__PURE__ */
|
|
2652
|
+
paths = /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ import_react12.default.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__ */ import_react12.default.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ import_react12.default.createElement("path", { d: "M6 18v-7" }));
|
|
2332
2653
|
break;
|
|
2333
2654
|
}
|
|
2334
|
-
return /* @__PURE__ */
|
|
2655
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
2335
2656
|
"svg",
|
|
2336
2657
|
{
|
|
2337
2658
|
width: size,
|
|
@@ -2350,24 +2671,24 @@ function BranchIcon({ size = 16, color = "currentColor", branch }) {
|
|
|
2350
2671
|
|
|
2351
2672
|
// src/IconOverlay.jsx
|
|
2352
2673
|
function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps = {}, onClick }) {
|
|
2353
|
-
const [isOpen, setIsOpen] = (0,
|
|
2354
|
-
const { refs, floatingStyles, context } = (0,
|
|
2674
|
+
const [isOpen, setIsOpen] = (0, import_react13.useState)(false);
|
|
2675
|
+
const { refs, floatingStyles, context } = (0, import_react14.useFloating)({
|
|
2355
2676
|
open: isOpen,
|
|
2356
2677
|
onOpenChange: setIsOpen,
|
|
2357
|
-
middleware: [(0,
|
|
2358
|
-
whileElementsMounted:
|
|
2678
|
+
middleware: [(0, import_react14.offset)(8), (0, import_react14.flip)(), (0, import_react14.shift)({ padding: 4 })],
|
|
2679
|
+
whileElementsMounted: import_react14.autoUpdate
|
|
2359
2680
|
});
|
|
2360
|
-
const hover = (0,
|
|
2361
|
-
const focus2 = (0,
|
|
2362
|
-
const dismiss = (0,
|
|
2363
|
-
const role = (0,
|
|
2364
|
-
const { getReferenceProps, getFloatingProps } = (0,
|
|
2681
|
+
const hover = (0, import_react14.useHover)(context);
|
|
2682
|
+
const focus2 = (0, import_react14.useFocus)(context);
|
|
2683
|
+
const dismiss = (0, import_react14.useDismiss)(context);
|
|
2684
|
+
const role = (0, import_react14.useRole)(context, { role: "tooltip" });
|
|
2685
|
+
const { getReferenceProps, getFloatingProps } = (0, import_react14.useInteractions)([
|
|
2365
2686
|
hover,
|
|
2366
2687
|
focus2,
|
|
2367
2688
|
dismiss,
|
|
2368
2689
|
role
|
|
2369
2690
|
]);
|
|
2370
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
|
|
2371
2692
|
"span",
|
|
2372
2693
|
{
|
|
2373
2694
|
ref: refs.setReference,
|
|
@@ -2380,8 +2701,8 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
2380
2701
|
onClick(e);
|
|
2381
2702
|
} : void 0
|
|
2382
2703
|
},
|
|
2383
|
-
/* @__PURE__ */
|
|
2384
|
-
), isOpen && /* @__PURE__ */
|
|
2704
|
+
/* @__PURE__ */ import_react13.default.createElement(IconComponent, { size, color, ...extraProps })
|
|
2705
|
+
), isOpen && /* @__PURE__ */ import_react13.default.createElement(import_react14.FloatingPortal, null, /* @__PURE__ */ import_react13.default.createElement(
|
|
2385
2706
|
"div",
|
|
2386
2707
|
{
|
|
2387
2708
|
ref: refs.setFloating,
|
|
@@ -2405,7 +2726,7 @@ function IconWithTooltip({ IconComponent, color, tooltip, size = 14, extraProps
|
|
|
2405
2726
|
function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
2406
2727
|
if (!ballot && !hasStances && !branch) return null;
|
|
2407
2728
|
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;
|
|
2408
|
-
return /* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
2409
2730
|
"div",
|
|
2410
2731
|
{
|
|
2411
2732
|
style: {
|
|
@@ -2418,7 +2739,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2418
2739
|
// offset icon wrapper padding so icons align flush-left with text
|
|
2419
2740
|
}
|
|
2420
2741
|
},
|
|
2421
|
-
ballot && /* @__PURE__ */
|
|
2742
|
+
ballot && /* @__PURE__ */ import_react13.default.createElement(
|
|
2422
2743
|
IconWithTooltip,
|
|
2423
2744
|
{
|
|
2424
2745
|
IconComponent: BallotIcon,
|
|
@@ -2427,7 +2748,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2427
2748
|
size: 14
|
|
2428
2749
|
}
|
|
2429
2750
|
),
|
|
2430
|
-
hasStances && /* @__PURE__ */
|
|
2751
|
+
hasStances && /* @__PURE__ */ import_react13.default.createElement(
|
|
2431
2752
|
IconWithTooltip,
|
|
2432
2753
|
{
|
|
2433
2754
|
IconComponent: CompassIcon,
|
|
@@ -2437,7 +2758,7 @@ function IconOverlay({ ballot, hasStances, branch, onCompassClick }) {
|
|
|
2437
2758
|
onClick: onCompassClick
|
|
2438
2759
|
}
|
|
2439
2760
|
),
|
|
2440
|
-
branch && /* @__PURE__ */
|
|
2761
|
+
branch && /* @__PURE__ */ import_react13.default.createElement(
|
|
2441
2762
|
IconWithTooltip,
|
|
2442
2763
|
{
|
|
2443
2764
|
IconComponent: BranchIcon,
|
|
@@ -2457,20 +2778,20 @@ function CompassCardHorizontalMeta({
|
|
|
2457
2778
|
userAnswers
|
|
2458
2779
|
}) {
|
|
2459
2780
|
const titleText = surface === "elections" ? politician.office_running_for : politician.office_title;
|
|
2460
|
-
return /* @__PURE__ */
|
|
2781
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2461
2782
|
flex: 1,
|
|
2462
2783
|
minWidth: 0,
|
|
2463
2784
|
display: "flex",
|
|
2464
2785
|
flexDirection: "column",
|
|
2465
2786
|
gap: spacing[1]
|
|
2466
|
-
} }, /* @__PURE__ */
|
|
2787
|
+
} }, /* @__PURE__ */ import_react15.default.createElement("p", { style: {
|
|
2467
2788
|
fontFamily: fonts.primary,
|
|
2468
2789
|
fontSize: fontSizes.lg,
|
|
2469
2790
|
fontWeight: fontWeights.semibold,
|
|
2470
2791
|
lineHeight: 1.4,
|
|
2471
2792
|
color: colors.evMutedBlue,
|
|
2472
2793
|
margin: 0
|
|
2473
|
-
} }, politician.full_name), /* @__PURE__ */
|
|
2794
|
+
} }, politician.full_name), /* @__PURE__ */ import_react15.default.createElement("p", { style: {
|
|
2474
2795
|
fontFamily: fonts.primary,
|
|
2475
2796
|
fontSize: fontSizes.sm,
|
|
2476
2797
|
fontWeight: fontWeights.semibold,
|
|
@@ -2481,7 +2802,7 @@ function CompassCardHorizontalMeta({
|
|
|
2481
2802
|
display: "-webkit-box",
|
|
2482
2803
|
WebkitLineClamp: 2,
|
|
2483
2804
|
WebkitBoxOrient: "vertical"
|
|
2484
|
-
} }, titleText || ""), politician.district_label && /* @__PURE__ */
|
|
2805
|
+
} }, titleText || ""), politician.district_label && /* @__PURE__ */ import_react15.default.createElement("p", { style: {
|
|
2485
2806
|
fontFamily: fonts.primary,
|
|
2486
2807
|
fontSize: fontSizes.sm,
|
|
2487
2808
|
fontWeight: fontWeights.regular,
|
|
@@ -2491,7 +2812,7 @@ function CompassCardHorizontalMeta({
|
|
|
2491
2812
|
overflow: "hidden",
|
|
2492
2813
|
textOverflow: "ellipsis",
|
|
2493
2814
|
whiteSpace: "nowrap"
|
|
2494
|
-
} }, politician.district_label), /* @__PURE__ */
|
|
2815
|
+
} }, politician.district_label), /* @__PURE__ */ import_react15.default.createElement(
|
|
2495
2816
|
IconOverlay,
|
|
2496
2817
|
{
|
|
2497
2818
|
ballot: politician.ballot || null,
|
|
@@ -2540,11 +2861,11 @@ function CompassCardHorizontal({
|
|
|
2540
2861
|
onClick
|
|
2541
2862
|
}) {
|
|
2542
2863
|
var _a;
|
|
2543
|
-
const [hovered, setHovered] = (0,
|
|
2544
|
-
const [focused, setFocused] = (0,
|
|
2545
|
-
const [imgError, setImgError] = (0,
|
|
2546
|
-
const [emptyCtaHovered, setEmptyCtaHovered] = (0,
|
|
2547
|
-
(0,
|
|
2864
|
+
const [hovered, setHovered] = (0, import_react16.useState)(false);
|
|
2865
|
+
const [focused, setFocused] = (0, import_react16.useState)(false);
|
|
2866
|
+
const [imgError, setImgError] = (0, import_react16.useState)(false);
|
|
2867
|
+
const [emptyCtaHovered, setEmptyCtaHovered] = (0, import_react16.useState)(false);
|
|
2868
|
+
(0, import_react16.useEffect)(() => {
|
|
2548
2869
|
setImgError(false);
|
|
2549
2870
|
}, [politician == null ? void 0 : politician.photo_origin_url]);
|
|
2550
2871
|
const cardStyle = {
|
|
@@ -2568,7 +2889,7 @@ function CompassCardHorizontal({
|
|
|
2568
2889
|
function renderCompass() {
|
|
2569
2890
|
var _a2, _b, _c;
|
|
2570
2891
|
if (!userAnswers || userAnswers.length === 0) {
|
|
2571
|
-
return /* @__PURE__ */
|
|
2892
|
+
return /* @__PURE__ */ import_react16.default.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2572
2893
|
}
|
|
2573
2894
|
let topics = [];
|
|
2574
2895
|
let data = {};
|
|
@@ -2604,12 +2925,12 @@ function CompassCardHorizontal({
|
|
|
2604
2925
|
}, {}) : politician.stances;
|
|
2605
2926
|
}
|
|
2606
2927
|
if (topics.length === 0) {
|
|
2607
|
-
return /* @__PURE__ */
|
|
2928
|
+
return /* @__PURE__ */ import_react16.default.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2608
2929
|
}
|
|
2609
2930
|
} catch (err) {
|
|
2610
|
-
return /* @__PURE__ */
|
|
2931
|
+
return /* @__PURE__ */ import_react16.default.createElement(PlaceholderRadar, { size: RADAR_SIZE, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2611
2932
|
}
|
|
2612
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2613
2934
|
RadarChartCore,
|
|
2614
2935
|
{
|
|
2615
2936
|
topics,
|
|
@@ -2631,7 +2952,7 @@ function CompassCardHorizontal({
|
|
|
2631
2952
|
var _a2, _b, _c;
|
|
2632
2953
|
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;
|
|
2633
2954
|
if (imageSrc && !imgError) {
|
|
2634
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2635
2956
|
"img",
|
|
2636
2957
|
{
|
|
2637
2958
|
src: imageSrc,
|
|
@@ -2649,7 +2970,7 @@ function CompassCardHorizontal({
|
|
|
2649
2970
|
}
|
|
2650
2971
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2651
2972
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2652
|
-
return /* @__PURE__ */
|
|
2973
|
+
return /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2653
2974
|
width: "100%",
|
|
2654
2975
|
height: "100%",
|
|
2655
2976
|
backgroundColor: colors.evMutedBlue,
|
|
@@ -2663,7 +2984,7 @@ function CompassCardHorizontal({
|
|
|
2663
2984
|
} }, initials);
|
|
2664
2985
|
}
|
|
2665
2986
|
function renderEmptyVariant() {
|
|
2666
|
-
return /* @__PURE__ */
|
|
2987
|
+
return /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2667
2988
|
width: "100%",
|
|
2668
2989
|
height: "100%",
|
|
2669
2990
|
display: "flex",
|
|
@@ -2674,14 +2995,14 @@ function CompassCardHorizontal({
|
|
|
2674
2995
|
padding: "12px 14px",
|
|
2675
2996
|
boxSizing: "border-box",
|
|
2676
2997
|
backgroundColor: colorScales.teal["050"]
|
|
2677
|
-
} }, /* @__PURE__ */
|
|
2998
|
+
} }, /* @__PURE__ */ import_react16.default.createElement(PlaceholderRadar, { size: 140, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ import_react16.default.createElement("p", { style: {
|
|
2678
2999
|
margin: 0,
|
|
2679
3000
|
fontSize: fontSizes.xs,
|
|
2680
3001
|
color: colors.textMuted,
|
|
2681
3002
|
textAlign: "center",
|
|
2682
3003
|
lineHeight: 1.4,
|
|
2683
3004
|
fontFamily: fonts.primary
|
|
2684
|
-
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */
|
|
3005
|
+
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ import_react16.default.createElement(
|
|
2685
3006
|
"button",
|
|
2686
3007
|
{
|
|
2687
3008
|
type: "button",
|
|
@@ -2709,7 +3030,7 @@ function CompassCardHorizontal({
|
|
|
2709
3030
|
));
|
|
2710
3031
|
}
|
|
2711
3032
|
function renderUnavailablePlate(message = "Compass currently unavailable for this role.") {
|
|
2712
|
-
return /* @__PURE__ */
|
|
3033
|
+
return /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2713
3034
|
width: "100%",
|
|
2714
3035
|
height: "100%",
|
|
2715
3036
|
backgroundColor: colorScales.teal["050"],
|
|
@@ -2718,7 +3039,7 @@ function CompassCardHorizontal({
|
|
|
2718
3039
|
justifyContent: "center",
|
|
2719
3040
|
padding: spacing[4],
|
|
2720
3041
|
boxSizing: "border-box"
|
|
2721
|
-
} }, /* @__PURE__ */
|
|
3042
|
+
} }, /* @__PURE__ */ import_react16.default.createElement("p", { style: {
|
|
2722
3043
|
fontSize: fontSizes.sm,
|
|
2723
3044
|
fontWeight: fontWeights.semibold,
|
|
2724
3045
|
lineHeight: 1.4,
|
|
@@ -2737,7 +3058,7 @@ function CompassCardHorizontal({
|
|
|
2737
3058
|
const name = (politician == null ? void 0 : politician.full_name) || "this official";
|
|
2738
3059
|
return renderUnavailablePlate(`No compass stances on file for ${name} yet.`);
|
|
2739
3060
|
}
|
|
2740
|
-
return /* @__PURE__ */
|
|
3061
|
+
return /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2741
3062
|
width: "100%",
|
|
2742
3063
|
height: "100%",
|
|
2743
3064
|
display: "flex",
|
|
@@ -2747,7 +3068,7 @@ function CompassCardHorizontal({
|
|
|
2747
3068
|
boxSizing: "border-box"
|
|
2748
3069
|
} }, renderCompass());
|
|
2749
3070
|
}
|
|
2750
|
-
return /* @__PURE__ */
|
|
3071
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2751
3072
|
"div",
|
|
2752
3073
|
{
|
|
2753
3074
|
role: "article",
|
|
@@ -2766,7 +3087,7 @@ function CompassCardHorizontal({
|
|
|
2766
3087
|
onFocus: () => setFocused(true),
|
|
2767
3088
|
onBlur: () => setFocused(false)
|
|
2768
3089
|
},
|
|
2769
|
-
/* @__PURE__ */
|
|
3090
|
+
/* @__PURE__ */ import_react16.default.createElement("div", { style: slotStyle }, renderSlotContent(), surface === "elections" && politician.running_unopposed && /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2770
3091
|
position: "absolute",
|
|
2771
3092
|
bottom: "15px",
|
|
2772
3093
|
left: 0,
|
|
@@ -2781,7 +3102,7 @@ function CompassCardHorizontal({
|
|
|
2781
3102
|
padding: "6px 0",
|
|
2782
3103
|
pointerEvents: "none"
|
|
2783
3104
|
} }, typeof politician.running_unopposed === "string" ? politician.running_unopposed : "Running Unopposed")),
|
|
2784
|
-
/* @__PURE__ */
|
|
3105
|
+
/* @__PURE__ */ import_react16.default.createElement("div", { style: { flex: 1, minWidth: 0, padding: spacing[4], paddingLeft: spacing[3] } }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2785
3106
|
CompassCardHorizontalMeta,
|
|
2786
3107
|
{
|
|
2787
3108
|
politician,
|
|
@@ -2793,7 +3114,7 @@ function CompassCardHorizontal({
|
|
|
2793
3114
|
}
|
|
2794
3115
|
|
|
2795
3116
|
// src/CompassCardVertical.jsx
|
|
2796
|
-
var
|
|
3117
|
+
var import_react17 = __toESM(require("react"));
|
|
2797
3118
|
var RADAR_SIZE2 = 400;
|
|
2798
3119
|
function CompassCardVertical({
|
|
2799
3120
|
politician,
|
|
@@ -2807,11 +3128,11 @@ function CompassCardVertical({
|
|
|
2807
3128
|
onClick
|
|
2808
3129
|
}) {
|
|
2809
3130
|
var _a;
|
|
2810
|
-
const [hovered, setHovered] = (0,
|
|
2811
|
-
const [focused, setFocused] = (0,
|
|
2812
|
-
const [imgError, setImgError] = (0,
|
|
2813
|
-
const [emptyCtaHovered, setEmptyCtaHovered] = (0,
|
|
2814
|
-
(0,
|
|
3131
|
+
const [hovered, setHovered] = (0, import_react17.useState)(false);
|
|
3132
|
+
const [focused, setFocused] = (0, import_react17.useState)(false);
|
|
3133
|
+
const [imgError, setImgError] = (0, import_react17.useState)(false);
|
|
3134
|
+
const [emptyCtaHovered, setEmptyCtaHovered] = (0, import_react17.useState)(false);
|
|
3135
|
+
(0, import_react17.useEffect)(() => {
|
|
2815
3136
|
setImgError(false);
|
|
2816
3137
|
}, [politician == null ? void 0 : politician.photo_origin_url]);
|
|
2817
3138
|
const cardStyle = {
|
|
@@ -2834,7 +3155,7 @@ function CompassCardVertical({
|
|
|
2834
3155
|
function renderCompass() {
|
|
2835
3156
|
var _a2, _b, _c;
|
|
2836
3157
|
if (!userAnswers || userAnswers.length === 0) {
|
|
2837
|
-
return /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ import_react17.default.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2838
3159
|
}
|
|
2839
3160
|
let topics = [];
|
|
2840
3161
|
let data = {};
|
|
@@ -2870,17 +3191,17 @@ function CompassCardVertical({
|
|
|
2870
3191
|
}, {}) : politician.stances;
|
|
2871
3192
|
}
|
|
2872
3193
|
if (topics.length === 0) {
|
|
2873
|
-
return /* @__PURE__ */
|
|
3194
|
+
return /* @__PURE__ */ import_react17.default.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2874
3195
|
}
|
|
2875
3196
|
} catch {
|
|
2876
|
-
return /* @__PURE__ */
|
|
3197
|
+
return /* @__PURE__ */ import_react17.default.createElement(PlaceholderRadar, { size: RADAR_SIZE2, name: (politician == null ? void 0 : politician.full_name) || "" });
|
|
2877
3198
|
}
|
|
2878
3199
|
const unansweredSpokes = {};
|
|
2879
3200
|
for (const t of topics) {
|
|
2880
3201
|
const v = compareData[t.short_title];
|
|
2881
3202
|
if (!v || Number(v) === 0) unansweredSpokes[t.short_title] = true;
|
|
2882
3203
|
}
|
|
2883
|
-
return /* @__PURE__ */
|
|
3204
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: { width: RADAR_SIZE2 + 240, maxWidth: "100%", flexShrink: 0 } }, /* @__PURE__ */ import_react17.default.createElement(
|
|
2884
3205
|
RadarChartCore,
|
|
2885
3206
|
{
|
|
2886
3207
|
topics,
|
|
@@ -2915,7 +3236,7 @@ function CompassCardVertical({
|
|
|
2915
3236
|
justifyContent: "center"
|
|
2916
3237
|
};
|
|
2917
3238
|
if (imageSrc && !imgError) {
|
|
2918
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: baseStyle }, /* @__PURE__ */ import_react17.default.createElement(
|
|
2919
3240
|
"img",
|
|
2920
3241
|
{
|
|
2921
3242
|
src: imageSrc,
|
|
@@ -2933,7 +3254,7 @@ function CompassCardVertical({
|
|
|
2933
3254
|
}
|
|
2934
3255
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2935
3256
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2936
|
-
return /* @__PURE__ */
|
|
3257
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: baseStyle }, /* @__PURE__ */ import_react17.default.createElement("span", { style: {
|
|
2937
3258
|
color: colors.textWhite,
|
|
2938
3259
|
fontFamily: fonts.primary,
|
|
2939
3260
|
fontWeight: fontWeights.bold,
|
|
@@ -2944,7 +3265,7 @@ function CompassCardVertical({
|
|
|
2944
3265
|
var _a2, _b, _c;
|
|
2945
3266
|
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;
|
|
2946
3267
|
if (imageSrc && !imgError) {
|
|
2947
|
-
return /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
2948
3269
|
"img",
|
|
2949
3270
|
{
|
|
2950
3271
|
src: imageSrc,
|
|
@@ -2963,7 +3284,7 @@ function CompassCardVertical({
|
|
|
2963
3284
|
}
|
|
2964
3285
|
const parts = ((politician == null ? void 0 : politician.full_name) || "").split(" ").filter(Boolean);
|
|
2965
3286
|
const initials = (parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_c = parts[0]) == null ? void 0 : _c[0]) || "?").toUpperCase();
|
|
2966
|
-
return /* @__PURE__ */
|
|
3287
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
2967
3288
|
width: RADAR_SIZE2,
|
|
2968
3289
|
height: RADAR_SIZE2,
|
|
2969
3290
|
backgroundColor: colors.evMutedBlue,
|
|
@@ -2978,7 +3299,7 @@ function CompassCardVertical({
|
|
|
2978
3299
|
} }, initials);
|
|
2979
3300
|
}
|
|
2980
3301
|
function renderEmptyVariant() {
|
|
2981
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
2982
3303
|
width: "100%",
|
|
2983
3304
|
height: "100%",
|
|
2984
3305
|
flex: 1,
|
|
@@ -2991,14 +3312,14 @@ function CompassCardVertical({
|
|
|
2991
3312
|
boxSizing: "border-box",
|
|
2992
3313
|
backgroundColor: colorScales.teal["050"],
|
|
2993
3314
|
borderRadius: borderRadius.md
|
|
2994
|
-
} }, /* @__PURE__ */
|
|
3315
|
+
} }, /* @__PURE__ */ import_react17.default.createElement(PlaceholderRadar, { size: 220, name: (politician == null ? void 0 : politician.full_name) || "" }), /* @__PURE__ */ import_react17.default.createElement("p", { style: {
|
|
2995
3316
|
margin: 0,
|
|
2996
3317
|
fontSize: fontSizes.sm,
|
|
2997
3318
|
color: colors.textMuted,
|
|
2998
3319
|
textAlign: "center",
|
|
2999
3320
|
lineHeight: 1.4,
|
|
3000
3321
|
fontFamily: fonts.primary
|
|
3001
|
-
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */
|
|
3322
|
+
} }, "Calibrate your compass to see how you align with ", (politician == null ? void 0 : politician.full_name) || "this official"), /* @__PURE__ */ import_react17.default.createElement(
|
|
3002
3323
|
"button",
|
|
3003
3324
|
{
|
|
3004
3325
|
type: "button",
|
|
@@ -3024,7 +3345,7 @@ function CompassCardVertical({
|
|
|
3024
3345
|
));
|
|
3025
3346
|
}
|
|
3026
3347
|
function renderUnavailablePlate(message) {
|
|
3027
|
-
return /* @__PURE__ */
|
|
3348
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
3028
3349
|
width: "100%",
|
|
3029
3350
|
height: "100%",
|
|
3030
3351
|
flex: 1,
|
|
@@ -3035,7 +3356,7 @@ function CompassCardVertical({
|
|
|
3035
3356
|
justifyContent: "center",
|
|
3036
3357
|
padding: spacing[6],
|
|
3037
3358
|
boxSizing: "border-box"
|
|
3038
|
-
} }, /* @__PURE__ */
|
|
3359
|
+
} }, /* @__PURE__ */ import_react17.default.createElement("p", { style: {
|
|
3039
3360
|
fontSize: fontSizes.base,
|
|
3040
3361
|
fontWeight: fontWeights.semibold,
|
|
3041
3362
|
lineHeight: 1.4,
|
|
@@ -3056,7 +3377,7 @@ function CompassCardVertical({
|
|
|
3056
3377
|
}
|
|
3057
3378
|
return renderCompass();
|
|
3058
3379
|
}
|
|
3059
|
-
return /* @__PURE__ */
|
|
3380
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
3060
3381
|
"div",
|
|
3061
3382
|
{
|
|
3062
3383
|
role: "article",
|
|
@@ -3075,21 +3396,21 @@ function CompassCardVertical({
|
|
|
3075
3396
|
onFocus: () => setFocused(true),
|
|
3076
3397
|
onBlur: () => setFocused(false)
|
|
3077
3398
|
},
|
|
3078
|
-
/* @__PURE__ */
|
|
3399
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { style: { padding: spacing[4], paddingBottom: spacing[3], display: "flex", alignItems: "stretch", gap: spacing[3], flexShrink: 0 } }, renderAvatar(), /* @__PURE__ */ import_react17.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: spacing[1], minWidth: 0, flex: 1 } }, /* @__PURE__ */ import_react17.default.createElement("p", { style: {
|
|
3079
3400
|
fontFamily: fonts.primary,
|
|
3080
3401
|
fontSize: fontSizes.xl,
|
|
3081
3402
|
fontWeight: fontWeights.semibold,
|
|
3082
3403
|
lineHeight: 1.3,
|
|
3083
3404
|
color: colors.evMutedBlue,
|
|
3084
3405
|
margin: 0
|
|
3085
|
-
} }, politician.full_name), /* @__PURE__ */
|
|
3406
|
+
} }, politician.full_name), /* @__PURE__ */ import_react17.default.createElement("p", { style: {
|
|
3086
3407
|
fontFamily: fonts.primary,
|
|
3087
3408
|
fontSize: fontSizes.sm,
|
|
3088
3409
|
fontWeight: fontWeights.semibold,
|
|
3089
3410
|
lineHeight: 1.4,
|
|
3090
3411
|
color: colors.textSecondary,
|
|
3091
3412
|
margin: 0
|
|
3092
|
-
} }, titleText || ""), politician.district_label && /* @__PURE__ */
|
|
3413
|
+
} }, titleText || ""), politician.district_label && /* @__PURE__ */ import_react17.default.createElement("p", { style: {
|
|
3093
3414
|
fontFamily: fonts.primary,
|
|
3094
3415
|
fontSize: fontSizes.sm,
|
|
3095
3416
|
fontWeight: fontWeights.regular,
|
|
@@ -3099,7 +3420,7 @@ function CompassCardVertical({
|
|
|
3099
3420
|
overflow: "hidden",
|
|
3100
3421
|
textOverflow: "ellipsis",
|
|
3101
3422
|
whiteSpace: "nowrap"
|
|
3102
|
-
} }, politician.district_label), /* @__PURE__ */
|
|
3423
|
+
} }, politician.district_label), /* @__PURE__ */ import_react17.default.createElement("div", { style: { marginTop: "auto" } }, /* @__PURE__ */ import_react17.default.createElement(
|
|
3103
3424
|
IconOverlay,
|
|
3104
3425
|
{
|
|
3105
3426
|
ballot: politician.ballot || null,
|
|
@@ -3107,7 +3428,7 @@ function CompassCardVertical({
|
|
|
3107
3428
|
branch: politician.branch || null
|
|
3108
3429
|
}
|
|
3109
3430
|
)))),
|
|
3110
|
-
surface === "elections" && politician.withdrawn && /* @__PURE__ */
|
|
3431
|
+
surface === "elections" && politician.withdrawn && /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
3111
3432
|
margin: `0 ${spacing[4]} ${spacing[3]}`,
|
|
3112
3433
|
backgroundColor: "rgba(120,0,0,0.85)",
|
|
3113
3434
|
color: "#fff",
|
|
@@ -3119,7 +3440,7 @@ function CompassCardVertical({
|
|
|
3119
3440
|
padding: "6px 0",
|
|
3120
3441
|
borderRadius: borderRadius.sm
|
|
3121
3442
|
} }, "Withdrawn"),
|
|
3122
|
-
surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */
|
|
3443
|
+
surface === "elections" && !politician.withdrawn && politician.running_unopposed && /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
3123
3444
|
margin: `0 ${spacing[4]} ${spacing[3]}`,
|
|
3124
3445
|
backgroundColor: "rgba(0,0,0,0.75)",
|
|
3125
3446
|
color: "#fff",
|
|
@@ -3131,7 +3452,7 @@ function CompassCardVertical({
|
|
|
3131
3452
|
padding: "6px 0",
|
|
3132
3453
|
borderRadius: borderRadius.sm
|
|
3133
3454
|
} }, typeof politician.running_unopposed === "string" ? politician.running_unopposed : "Running Unopposed"),
|
|
3134
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
3135
3456
|
flex: 1,
|
|
3136
3457
|
padding: spacing[4],
|
|
3137
3458
|
paddingTop: 0,
|
|
@@ -3145,7 +3466,7 @@ function CompassCardVertical({
|
|
|
3145
3466
|
}
|
|
3146
3467
|
|
|
3147
3468
|
// src/CompassKey.jsx
|
|
3148
|
-
var
|
|
3469
|
+
var import_react18 = __toESM(require("react"));
|
|
3149
3470
|
|
|
3150
3471
|
// src/evContext.js
|
|
3151
3472
|
var DEFAULT_BROKER_URL = "https://ev-context.empowered.vote/";
|
|
@@ -3390,9 +3711,9 @@ var evContext = {
|
|
|
3390
3711
|
|
|
3391
3712
|
// src/CompassKey.jsx
|
|
3392
3713
|
function CompassKey({ compact = false } = {}) {
|
|
3393
|
-
const [dismissed, setDismissed] = (0,
|
|
3394
|
-
const [loaded, setLoaded] = (0,
|
|
3395
|
-
(0,
|
|
3714
|
+
const [dismissed, setDismissed] = (0, import_react18.useState)(false);
|
|
3715
|
+
const [loaded, setLoaded] = (0, import_react18.useState)(false);
|
|
3716
|
+
(0, import_react18.useEffect)(() => {
|
|
3396
3717
|
let cancelled = false;
|
|
3397
3718
|
evContext.get().then((shared) => {
|
|
3398
3719
|
if (cancelled) return;
|
|
@@ -3422,17 +3743,16 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3422
3743
|
persistDismissed(false);
|
|
3423
3744
|
}
|
|
3424
3745
|
if (!loaded) return null;
|
|
3425
|
-
const Swatch = ({ color, label
|
|
3746
|
+
const Swatch = ({ color, label }) => /* @__PURE__ */ import_react18.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ import_react18.default.createElement("span", { style: {
|
|
3426
3747
|
display: "inline-block",
|
|
3427
|
-
width:
|
|
3428
|
-
height:
|
|
3748
|
+
width: 16,
|
|
3749
|
+
height: 16,
|
|
3429
3750
|
borderRadius: "50%",
|
|
3430
3751
|
background: color,
|
|
3431
|
-
border: `2px solid ${ring || "#fff"}`,
|
|
3432
3752
|
boxShadow: "0 0 0 1px rgba(0,0,0,0.08)"
|
|
3433
|
-
} }), /* @__PURE__ */
|
|
3753
|
+
} }), /* @__PURE__ */ import_react18.default.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, label));
|
|
3434
3754
|
if (dismissed) {
|
|
3435
|
-
return /* @__PURE__ */
|
|
3755
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
3436
3756
|
"button",
|
|
3437
3757
|
{
|
|
3438
3758
|
type: "button",
|
|
@@ -3453,11 +3773,11 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3453
3773
|
cursor: "pointer"
|
|
3454
3774
|
}
|
|
3455
3775
|
},
|
|
3456
|
-
/* @__PURE__ */
|
|
3776
|
+
/* @__PURE__ */ import_react18.default.createElement("span", { "aria-hidden": "true" }, "?"),
|
|
3457
3777
|
" Compass key"
|
|
3458
3778
|
);
|
|
3459
3779
|
}
|
|
3460
|
-
return /* @__PURE__ */
|
|
3780
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
3461
3781
|
"div",
|
|
3462
3782
|
{
|
|
3463
3783
|
role: "region",
|
|
@@ -3476,17 +3796,17 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3476
3796
|
boxSizing: "border-box"
|
|
3477
3797
|
}
|
|
3478
3798
|
},
|
|
3479
|
-
!compact && /* @__PURE__ */
|
|
3799
|
+
!compact && /* @__PURE__ */ import_react18.default.createElement("span", { style: {
|
|
3480
3800
|
fontSize: fontSizes.xs,
|
|
3481
3801
|
fontWeight: fontWeights.semibold,
|
|
3482
3802
|
color: colors.textMuted,
|
|
3483
3803
|
textTransform: "uppercase",
|
|
3484
3804
|
letterSpacing: "0.5px"
|
|
3485
3805
|
} }, "Compass key"),
|
|
3486
|
-
/* @__PURE__ */
|
|
3487
|
-
/* @__PURE__ */
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
/* @__PURE__ */
|
|
3806
|
+
/* @__PURE__ */ import_react18.default.createElement(Swatch, { color: "#7C6B9E", label: "You" }),
|
|
3807
|
+
/* @__PURE__ */ import_react18.default.createElement(Swatch, { color: "#5A9A6E", label: "Politician" }),
|
|
3808
|
+
/* @__PURE__ */ import_react18.default.createElement(Swatch, { color: "#fed12e", label: "Match" }),
|
|
3809
|
+
/* @__PURE__ */ import_react18.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: spacing[1] } }, /* @__PURE__ */ import_react18.default.createElement("span", { style: {
|
|
3490
3810
|
fontSize: fontSizes.xs,
|
|
3491
3811
|
fontWeight: fontWeights.semibold,
|
|
3492
3812
|
color: "#9ca3af",
|
|
@@ -3494,8 +3814,8 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3494
3814
|
textDecoration: "underline",
|
|
3495
3815
|
textDecorationStyle: "dashed",
|
|
3496
3816
|
textUnderlineOffset: "3px"
|
|
3497
|
-
} }, "Topic"), /* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3817
|
+
} }, "Topic"), /* @__PURE__ */ import_react18.default.createElement("span", { style: { fontSize: fontSizes.xs, color: colors.textSecondary, fontFamily: fonts.primary } }, "= no stance")),
|
|
3818
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
3499
3819
|
"button",
|
|
3500
3820
|
{
|
|
3501
3821
|
type: "button",
|
|
@@ -3518,7 +3838,7 @@ function CompassKey({ compact = false } = {}) {
|
|
|
3518
3838
|
}
|
|
3519
3839
|
|
|
3520
3840
|
// src/CategorySection.jsx
|
|
3521
|
-
var
|
|
3841
|
+
var import_react19 = __toESM(require("react"));
|
|
3522
3842
|
function CategorySection({
|
|
3523
3843
|
title,
|
|
3524
3844
|
infoTooltip,
|
|
@@ -3528,7 +3848,7 @@ function CategorySection({
|
|
|
3528
3848
|
tier
|
|
3529
3849
|
}) {
|
|
3530
3850
|
var _a, _b;
|
|
3531
|
-
const [showTooltip, setShowTooltip] = (0,
|
|
3851
|
+
const [showTooltip, setShowTooltip] = (0, import_react19.useState)(false);
|
|
3532
3852
|
const tierStyle = tier ? tierColors[tier] : null;
|
|
3533
3853
|
const styles2 = {
|
|
3534
3854
|
section: {
|
|
@@ -3596,7 +3916,7 @@ function CategorySection({
|
|
|
3596
3916
|
gap: spacing[4]
|
|
3597
3917
|
}
|
|
3598
3918
|
};
|
|
3599
|
-
return /* @__PURE__ */
|
|
3919
|
+
return /* @__PURE__ */ import_react19.default.createElement("section", { style: styles2.section, className: "ev-category-section" }, /* @__PURE__ */ import_react19.default.createElement("div", { style: styles2.header }, /* @__PURE__ */ import_react19.default.createElement("span", { style: styles2.titlePill }, title), infoTooltip && /* @__PURE__ */ import_react19.default.createElement(
|
|
3600
3920
|
"button",
|
|
3601
3921
|
{
|
|
3602
3922
|
type: "button",
|
|
@@ -3608,8 +3928,8 @@ function CategorySection({
|
|
|
3608
3928
|
"aria-label": `Info about ${title}`
|
|
3609
3929
|
},
|
|
3610
3930
|
"i",
|
|
3611
|
-
showTooltip && /* @__PURE__ */
|
|
3612
|
-
), websiteUrl && /* @__PURE__ */
|
|
3931
|
+
showTooltip && /* @__PURE__ */ import_react19.default.createElement("div", { style: styles2.tooltip, role: "tooltip" }, infoTooltip)
|
|
3932
|
+
), websiteUrl && /* @__PURE__ */ import_react19.default.createElement(
|
|
3613
3933
|
"a",
|
|
3614
3934
|
{
|
|
3615
3935
|
href: websiteUrl,
|
|
@@ -3618,7 +3938,7 @@ function CategorySection({
|
|
|
3618
3938
|
style: styles2.externalLink,
|
|
3619
3939
|
"aria-label": `Visit official website for ${title}`
|
|
3620
3940
|
},
|
|
3621
|
-
/* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
3622
3942
|
"svg",
|
|
3623
3943
|
{
|
|
3624
3944
|
viewBox: "0 0 24 24",
|
|
@@ -3626,7 +3946,7 @@ function CategorySection({
|
|
|
3626
3946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3627
3947
|
style: { width: "14px", height: "14px" }
|
|
3628
3948
|
},
|
|
3629
|
-
/* @__PURE__ */
|
|
3949
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
3630
3950
|
"path",
|
|
3631
3951
|
{
|
|
3632
3952
|
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
|
|
@@ -3637,11 +3957,11 @@ function CategorySection({
|
|
|
3637
3957
|
}
|
|
3638
3958
|
)
|
|
3639
3959
|
)
|
|
3640
|
-
)), /* @__PURE__ */
|
|
3960
|
+
)), /* @__PURE__ */ import_react19.default.createElement("div", { style: styles2.grid, className: "ev-category-grid" }, children));
|
|
3641
3961
|
}
|
|
3642
3962
|
|
|
3643
3963
|
// src/SubGroupSection.jsx
|
|
3644
|
-
var
|
|
3964
|
+
var import_react20 = __toESM(require("react"));
|
|
3645
3965
|
function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap, justifyContent }) {
|
|
3646
3966
|
const styles2 = {
|
|
3647
3967
|
section: {
|
|
@@ -3676,7 +3996,7 @@ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap
|
|
|
3676
3996
|
width: "100%"
|
|
3677
3997
|
}
|
|
3678
3998
|
};
|
|
3679
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ import_react20.default.createElement("div", { style: styles2.section }, title && /* @__PURE__ */ import_react20.default.createElement("div", { style: styles2.header }, /* @__PURE__ */ import_react20.default.createElement("span", { style: styles2.label }, title), websiteUrl && /* @__PURE__ */ import_react20.default.createElement(
|
|
3680
4000
|
"a",
|
|
3681
4001
|
{
|
|
3682
4002
|
href: websiteUrl,
|
|
@@ -3684,12 +4004,12 @@ function SubGroupSection({ title, websiteUrl, children, gridTemplateColumns, gap
|
|
|
3684
4004
|
rel: "noopener noreferrer",
|
|
3685
4005
|
style: styles2.link
|
|
3686
4006
|
},
|
|
3687
|
-
/* @__PURE__ */
|
|
3688
|
-
)), /* @__PURE__ */
|
|
4007
|
+
/* @__PURE__ */ import_react20.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "12px", height: "12px" } }, /* @__PURE__ */ import_react20.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react20.default.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" }))
|
|
4008
|
+
)), /* @__PURE__ */ import_react20.default.createElement("div", { style: styles2.grid, className: "ev-subgroup-grid" }, children));
|
|
3689
4009
|
}
|
|
3690
4010
|
|
|
3691
4011
|
// src/GovernmentBodySection.jsx
|
|
3692
|
-
var
|
|
4012
|
+
var import_react21 = __toESM(require("react"));
|
|
3693
4013
|
function GovernmentBodySection({
|
|
3694
4014
|
title,
|
|
3695
4015
|
websiteUrl,
|
|
@@ -3698,7 +4018,7 @@ function GovernmentBodySection({
|
|
|
3698
4018
|
children
|
|
3699
4019
|
}) {
|
|
3700
4020
|
var _a;
|
|
3701
|
-
const [expanded, setExpanded] = (0,
|
|
4021
|
+
const [expanded, setExpanded] = (0, import_react21.useState)(defaultExpanded);
|
|
3702
4022
|
const tierStyle = tier ? tierColors[tier] : null;
|
|
3703
4023
|
const accentColor = (_a = tierStyle == null ? void 0 : tierStyle.accent) != null ? _a : colors.borderMedium;
|
|
3704
4024
|
const styles2 = {
|
|
@@ -3738,7 +4058,7 @@ function GovernmentBodySection({
|
|
|
3738
4058
|
display: expanded ? "block" : "none"
|
|
3739
4059
|
}
|
|
3740
4060
|
};
|
|
3741
|
-
return /* @__PURE__ */
|
|
4061
|
+
return /* @__PURE__ */ import_react21.default.createElement("section", { style: styles2.section, className: "ev-gov-body-section" }, /* @__PURE__ */ import_react21.default.createElement(
|
|
3742
4062
|
"div",
|
|
3743
4063
|
{
|
|
3744
4064
|
style: styles2.header,
|
|
@@ -3754,8 +4074,8 @@ function GovernmentBodySection({
|
|
|
3754
4074
|
"aria-expanded": expanded,
|
|
3755
4075
|
"aria-label": `${expanded ? "Collapse" : "Expand"} ${title}`
|
|
3756
4076
|
},
|
|
3757
|
-
/* @__PURE__ */
|
|
3758
|
-
websiteUrl && /* @__PURE__ */
|
|
4077
|
+
/* @__PURE__ */ import_react21.default.createElement("span", { style: styles2.title }, title),
|
|
4078
|
+
websiteUrl && /* @__PURE__ */ import_react21.default.createElement(
|
|
3759
4079
|
"a",
|
|
3760
4080
|
{
|
|
3761
4081
|
href: websiteUrl,
|
|
@@ -3765,14 +4085,14 @@ function GovernmentBodySection({
|
|
|
3765
4085
|
onClick: (e) => e.stopPropagation(),
|
|
3766
4086
|
"aria-label": `Visit ${title} website`
|
|
3767
4087
|
},
|
|
3768
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ import_react21.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: "14px", height: "14px" } }, /* @__PURE__ */ import_react21.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react21.default.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" }))
|
|
3769
4089
|
),
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
), /* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ import_react21.default.createElement("span", { style: styles2.toggle, "aria-hidden": "true" }, "\u25BC")
|
|
4091
|
+
), /* @__PURE__ */ import_react21.default.createElement("div", { style: styles2.content }, children));
|
|
3772
4092
|
}
|
|
3773
4093
|
|
|
3774
4094
|
// src/SocialLinks.jsx
|
|
3775
|
-
var
|
|
4095
|
+
var import_react22 = __toESM(require("react"));
|
|
3776
4096
|
var SOCIAL_PLATFORMS = [
|
|
3777
4097
|
{ test: /facebook\.com/i, platform: "facebook" },
|
|
3778
4098
|
{ test: /twitter\.com|x\.com/i, platform: "twitter" },
|
|
@@ -3844,7 +4164,7 @@ function SocialLinks({
|
|
|
3844
4164
|
}
|
|
3845
4165
|
};
|
|
3846
4166
|
const platformIconMap = {
|
|
3847
|
-
twitter: /* @__PURE__ */
|
|
4167
|
+
twitter: /* @__PURE__ */ import_react22.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.createElement(
|
|
3848
4168
|
"path",
|
|
3849
4169
|
{
|
|
3850
4170
|
d: "M4 4L10.5 12.5M20 20L13.5 11.5M10.5 12.5L4 20H8L13.5 11.5M10.5 12.5L16 4H20L13.5 11.5",
|
|
@@ -3854,7 +4174,7 @@ function SocialLinks({
|
|
|
3854
4174
|
strokeLinejoin: "round"
|
|
3855
4175
|
}
|
|
3856
4176
|
)),
|
|
3857
|
-
facebook: /* @__PURE__ */
|
|
4177
|
+
facebook: /* @__PURE__ */ import_react22.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.createElement(
|
|
3858
4178
|
"path",
|
|
3859
4179
|
{
|
|
3860
4180
|
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",
|
|
@@ -3864,8 +4184,8 @@ function SocialLinks({
|
|
|
3864
4184
|
strokeLinejoin: "round"
|
|
3865
4185
|
}
|
|
3866
4186
|
)),
|
|
3867
|
-
instagram: /* @__PURE__ */
|
|
3868
|
-
linkedin: /* @__PURE__ */
|
|
4187
|
+
instagram: /* @__PURE__ */ import_react22.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.createElement("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "18", cy: "6", r: "1", fill: "currentColor" })),
|
|
4188
|
+
linkedin: /* @__PURE__ */ import_react22.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.createElement(
|
|
3869
4189
|
"path",
|
|
3870
4190
|
{
|
|
3871
4191
|
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",
|
|
@@ -3874,8 +4194,8 @@ function SocialLinks({
|
|
|
3874
4194
|
strokeLinecap: "round",
|
|
3875
4195
|
strokeLinejoin: "round"
|
|
3876
4196
|
}
|
|
3877
|
-
), /* @__PURE__ */
|
|
3878
|
-
youtube: /* @__PURE__ */
|
|
4197
|
+
), /* @__PURE__ */ import_react22.default.createElement("rect", { x: "2", y: "9", width: "4", height: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "4", cy: "4", r: "2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })),
|
|
4198
|
+
youtube: /* @__PURE__ */ import_react22.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.createElement("rect", { x: "2", y: "5", width: "20", height: "14", rx: "3", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react22.default.createElement("polygon", { points: "10,9 16,12 10,15", fill: "currentColor" }))
|
|
3879
4199
|
};
|
|
3880
4200
|
const links = [
|
|
3881
4201
|
{
|
|
@@ -3901,7 +4221,7 @@ function SocialLinks({
|
|
|
3901
4221
|
{
|
|
3902
4222
|
href: website,
|
|
3903
4223
|
label: "Website",
|
|
3904
|
-
icon: /* @__PURE__ */
|
|
4224
|
+
icon: /* @__PURE__ */ import_react22.default.createElement("svg", { style: styles2.icon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react22.default.createElement(
|
|
3905
4225
|
"path",
|
|
3906
4226
|
{
|
|
3907
4227
|
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",
|
|
@@ -3931,7 +4251,7 @@ function SocialLinks({
|
|
|
3931
4251
|
if (links.length === 0) {
|
|
3932
4252
|
return null;
|
|
3933
4253
|
}
|
|
3934
|
-
return /* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", { style: styles2.container, className: "ev-social-links" }, links.map((link) => /* @__PURE__ */ import_react22.default.createElement(
|
|
3935
4255
|
"a",
|
|
3936
4256
|
{
|
|
3937
4257
|
key: link.label,
|
|
@@ -3954,7 +4274,7 @@ function SocialLinks({
|
|
|
3954
4274
|
}
|
|
3955
4275
|
|
|
3956
4276
|
// src/IssueTags.jsx
|
|
3957
|
-
var
|
|
4277
|
+
var import_react23 = __toESM(require("react"));
|
|
3958
4278
|
function IssueTags({
|
|
3959
4279
|
tags = [],
|
|
3960
4280
|
selectedTags = [],
|
|
@@ -3997,9 +4317,9 @@ function IssueTags({
|
|
|
3997
4317
|
onTagClick(tag.value);
|
|
3998
4318
|
}
|
|
3999
4319
|
};
|
|
4000
|
-
return /* @__PURE__ */
|
|
4320
|
+
return /* @__PURE__ */ import_react23.default.createElement("div", { style: styles2.container, className: "ev-issue-tags", role: "list" }, tags.map((tag) => {
|
|
4001
4321
|
const isSelected = selectedTags.includes(tag.value);
|
|
4002
|
-
return /* @__PURE__ */
|
|
4322
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
4003
4323
|
"span",
|
|
4004
4324
|
{
|
|
4005
4325
|
key: tag.value,
|
|
@@ -4028,7 +4348,7 @@ function IssueTags({
|
|
|
4028
4348
|
}
|
|
4029
4349
|
|
|
4030
4350
|
// src/CommitteeTable.jsx
|
|
4031
|
-
var
|
|
4351
|
+
var import_react24 = __toESM(require("react"));
|
|
4032
4352
|
var ROLE_ORDER = {
|
|
4033
4353
|
"chair": 0,
|
|
4034
4354
|
"co-chair": 1,
|
|
@@ -4055,7 +4375,7 @@ function CommitteeTable({
|
|
|
4055
4375
|
maxVisible = 6,
|
|
4056
4376
|
style = {}
|
|
4057
4377
|
}) {
|
|
4058
|
-
const [showAll, setShowAll] = (0,
|
|
4378
|
+
const [showAll, setShowAll] = (0, import_react24.useState)(false);
|
|
4059
4379
|
if (committees.length === 0) {
|
|
4060
4380
|
return null;
|
|
4061
4381
|
}
|
|
@@ -4117,7 +4437,7 @@ function CommitteeTable({
|
|
|
4117
4437
|
cursor: "pointer"
|
|
4118
4438
|
}
|
|
4119
4439
|
};
|
|
4120
|
-
return /* @__PURE__ */
|
|
4440
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", { style: styles2.container, className: "ev-committee-table" }, /* @__PURE__ */ import_react24.default.createElement("h4", { style: styles2.heading }, /* @__PURE__ */ import_react24.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react24.default.createElement("path", { d: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" }), /* @__PURE__ */ import_react24.default.createElement("circle", { cx: "9", cy: "7", r: "4" }), /* @__PURE__ */ import_react24.default.createElement("path", { d: "M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" })), title), /* @__PURE__ */ import_react24.default.createElement("table", { style: styles2.table }, /* @__PURE__ */ import_react24.default.createElement("tbody", null, visible.map((committee, index) => /* @__PURE__ */ import_react24.default.createElement("tr", { key: index, style: styles2.row }, /* @__PURE__ */ import_react24.default.createElement("td", { style: { ...styles2.cell, ...styles2.nameCell } }, committee.url ? /* @__PURE__ */ import_react24.default.createElement(
|
|
4121
4441
|
"a",
|
|
4122
4442
|
{
|
|
4123
4443
|
href: committee.url,
|
|
@@ -4132,7 +4452,7 @@ function CommitteeTable({
|
|
|
4132
4452
|
}
|
|
4133
4453
|
},
|
|
4134
4454
|
committee.name
|
|
4135
|
-
) : committee.name), /* @__PURE__ */
|
|
4455
|
+
) : committee.name), /* @__PURE__ */ import_react24.default.createElement("td", { style: { ...styles2.cell, ...styles2.positionCell } }, formatPosition(committee.position)))))), hasMore && /* @__PURE__ */ import_react24.default.createElement(
|
|
4136
4456
|
"button",
|
|
4137
4457
|
{
|
|
4138
4458
|
type: "button",
|
|
@@ -4140,7 +4460,7 @@ function CommitteeTable({
|
|
|
4140
4460
|
onClick: () => setShowAll(!showAll)
|
|
4141
4461
|
},
|
|
4142
4462
|
showAll ? "Show less" : `Show all ${sorted.length} committees`,
|
|
4143
|
-
/* @__PURE__ */
|
|
4463
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
4144
4464
|
"svg",
|
|
4145
4465
|
{
|
|
4146
4466
|
width: "14",
|
|
@@ -4153,16 +4473,16 @@ function CommitteeTable({
|
|
|
4153
4473
|
strokeLinejoin: "round",
|
|
4154
4474
|
style: { transform: showAll ? "rotate(180deg)" : "none", transition: "transform 0.2s" }
|
|
4155
4475
|
},
|
|
4156
|
-
/* @__PURE__ */
|
|
4476
|
+
/* @__PURE__ */ import_react24.default.createElement("polyline", { points: "6 9 12 15 18 9" })
|
|
4157
4477
|
)
|
|
4158
4478
|
));
|
|
4159
4479
|
}
|
|
4160
4480
|
|
|
4161
4481
|
// src/PoliticianProfile.jsx
|
|
4162
|
-
var
|
|
4482
|
+
var import_react27 = __toESM(require("react"));
|
|
4163
4483
|
|
|
4164
4484
|
// src/LegislativeInlineSummary.jsx
|
|
4165
|
-
var
|
|
4485
|
+
var import_react25 = __toESM(require("react"));
|
|
4166
4486
|
function normalizePosition(pos) {
|
|
4167
4487
|
if (!pos) return "";
|
|
4168
4488
|
return pos.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
@@ -4270,7 +4590,7 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
|
|
|
4270
4590
|
fontSize: fontSizes.sm,
|
|
4271
4591
|
fontWeight: fontWeights.medium
|
|
4272
4592
|
};
|
|
4273
|
-
return /* @__PURE__ */
|
|
4593
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", { style: card }, stats.length > 0 && /* @__PURE__ */ import_react25.default.createElement("div", { style: statsRow }, stats.map((s, i) => /* @__PURE__ */ import_react25.default.createElement("div", { key: i, style: statItem }, /* @__PURE__ */ import_react25.default.createElement("span", { style: statValue }, s.value), s.label && /* @__PURE__ */ import_react25.default.createElement("span", { style: statLabel }, s.label)))), mostRecentAction && /* @__PURE__ */ import_react25.default.createElement("div", { style: actionLine, title: mostRecentAction }, mostRecentAction), /* @__PURE__ */ import_react25.default.createElement("div", null), /* @__PURE__ */ import_react25.default.createElement("div", { style: footerRow }, /* @__PURE__ */ import_react25.default.createElement(
|
|
4274
4594
|
"button",
|
|
4275
4595
|
{
|
|
4276
4596
|
onClick: () => {
|
|
@@ -4295,12 +4615,12 @@ function LegislativeInlineSummary({ summary, politicianId, onNavigateToRecord })
|
|
|
4295
4615
|
}
|
|
4296
4616
|
},
|
|
4297
4617
|
"View Full Legislative Record",
|
|
4298
|
-
/* @__PURE__ */
|
|
4618
|
+
/* @__PURE__ */ import_react25.default.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__ */ import_react25.default.createElement("path", { d: "M9 18l6-6-6-6" }))
|
|
4299
4619
|
)));
|
|
4300
4620
|
}
|
|
4301
4621
|
|
|
4302
4622
|
// src/JudicialScorecard.jsx
|
|
4303
|
-
var
|
|
4623
|
+
var import_react26 = __toESM(require("react"));
|
|
4304
4624
|
|
|
4305
4625
|
// src/judicialUtils.js
|
|
4306
4626
|
function formatDate(dateStr) {
|
|
@@ -4418,7 +4738,7 @@ function JudicialScorecard({ judicialRecord, politicianId, onNavigateToRecord })
|
|
|
4418
4738
|
onNavigateToRecord(`/politician/${politicianId}/judicial-record`);
|
|
4419
4739
|
}
|
|
4420
4740
|
};
|
|
4421
|
-
return /* @__PURE__ */
|
|
4741
|
+
return /* @__PURE__ */ import_react26.default.createElement("section", { style: sectionStyle }, /* @__PURE__ */ import_react26.default.createElement("h3", { style: headingStyle }, "Judicial Record"), evaluations.length > 0 && /* @__PURE__ */ import_react26.default.createElement("div", { style: { marginBottom: "16px" } }, evaluations.slice(0, 3).map((ev, i) => /* @__PURE__ */ import_react26.default.createElement("span", { key: i, style: evalChipStyle }, ev.rating, /* @__PURE__ */ import_react26.default.createElement("span", { style: { fontWeight: 400, color: "#4a90a4", fontSize: "11px" } }, "\u2014 ", ev.source)))), metrics.length > 0 && /* @__PURE__ */ import_react26.default.createElement("div", { style: cardGridStyle }, metrics.slice(0, 4).map((m, i) => /* @__PURE__ */ import_react26.default.createElement("div", { key: i, style: metricCardStyle }, /* @__PURE__ */ import_react26.default.createElement("div", { style: metricLabelStyle }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ import_react26.default.createElement("div", { style: metricValueStyle }, formatMetricValue(m.metric_type, m.value)), m.context_label && /* @__PURE__ */ import_react26.default.createElement("div", { style: metricContextStyle }, m.context_label)))), disciplinary.length > 0 && /* @__PURE__ */ import_react26.default.createElement("div", { style: { marginBottom: "12px" } }, disciplinary.slice(0, 2).map((d, i) => /* @__PURE__ */ import_react26.default.createElement("div", { key: i, style: disciplinaryStyle }, /* @__PURE__ */ import_react26.default.createElement("strong", null, d.record_type), " \u2014 ", formatDate(d.record_date), d.description && /* @__PURE__ */ import_react26.default.createElement("div", { style: { marginTop: "4px" } }, d.description)))), /* @__PURE__ */ import_react26.default.createElement("a", { href: `/politician/${politicianId}/judicial-record`, onClick: handleNavigate, style: linkStyle }, "View Full Judicial Record \u2192"));
|
|
4422
4742
|
}
|
|
4423
4743
|
|
|
4424
4744
|
// src/PoliticianProfile.jsx
|
|
@@ -4594,13 +4914,13 @@ function formatAddress(addr) {
|
|
|
4594
4914
|
if (cityStateZip) lines.push(cityStateZip);
|
|
4595
4915
|
return lines;
|
|
4596
4916
|
}
|
|
4597
|
-
var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4598
|
-
var ClockIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4599
|
-
var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4600
|
-
var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4601
|
-
var MailIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4602
|
-
var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4603
|
-
var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
4917
|
+
var CalendarIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ import_react27.default.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ import_react27.default.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ import_react27.default.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
|
|
4918
|
+
var ClockIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react27.default.createElement("polyline", { points: "12 6 12 12 16 14" }));
|
|
4919
|
+
var MapPinIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.createElement("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" }), /* @__PURE__ */ import_react27.default.createElement("circle", { cx: "12", cy: "10", r: "3" }));
|
|
4920
|
+
var PhoneIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.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" }));
|
|
4921
|
+
var MailIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.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__ */ import_react27.default.createElement("path", { d: "M22 6L12 13L2 6" }));
|
|
4922
|
+
var GlobeIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react27.default.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" }));
|
|
4923
|
+
var ExternalLinkIcon = ({ size = 16 }) => /* @__PURE__ */ import_react27.default.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.createElement("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }), /* @__PURE__ */ import_react27.default.createElement("polyline", { points: "15 3 21 3 21 9" }), /* @__PURE__ */ import_react27.default.createElement("line", { x1: "10", y1: "14", x2: "21", y2: "3" }));
|
|
4604
4924
|
function PoliticianProfile({
|
|
4605
4925
|
politician = {},
|
|
4606
4926
|
onBack,
|
|
@@ -4628,8 +4948,8 @@ function PoliticianProfile({
|
|
|
4628
4948
|
return pol.photo_origin_url;
|
|
4629
4949
|
})();
|
|
4630
4950
|
const initials = [pol.first_name, pol.last_name].filter(Boolean).map((n) => n[0]).join("");
|
|
4631
|
-
const [imgError, setImgError] = (0,
|
|
4632
|
-
(0,
|
|
4951
|
+
const [imgError, setImgError] = (0, import_react27.useState)(false);
|
|
4952
|
+
(0, import_react27.useEffect)(() => {
|
|
4633
4953
|
setImgError(false);
|
|
4634
4954
|
}, [profileImageUrl]);
|
|
4635
4955
|
const getSocialHandle = (type) => {
|
|
@@ -4929,7 +5249,7 @@ function PoliticianProfile({
|
|
|
4929
5249
|
borderRadius: borderRadius.full
|
|
4930
5250
|
}
|
|
4931
5251
|
};
|
|
4932
|
-
return /* @__PURE__ */
|
|
5252
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.container, className: "ev-politician-profile" }, onBack && /* @__PURE__ */ import_react27.default.createElement(
|
|
4933
5253
|
"button",
|
|
4934
5254
|
{
|
|
4935
5255
|
type: "button",
|
|
@@ -4942,9 +5262,9 @@ function PoliticianProfile({
|
|
|
4942
5262
|
e.currentTarget.style.textDecoration = "none";
|
|
4943
5263
|
}
|
|
4944
5264
|
},
|
|
4945
|
-
/* @__PURE__ */
|
|
5265
|
+
/* @__PURE__ */ import_react27.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react27.default.createElement("path", { d: "M15 19l-7-7 7-7" })),
|
|
4946
5266
|
label
|
|
4947
|
-
), /* @__PURE__ */
|
|
5267
|
+
), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.card }, /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.heroRow }, /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.photoWrap }, profileImageUrl && !imgError ? /* @__PURE__ */ import_react27.default.createElement(
|
|
4948
5268
|
"img",
|
|
4949
5269
|
{
|
|
4950
5270
|
src: profileImageUrl,
|
|
@@ -4952,7 +5272,7 @@ function PoliticianProfile({
|
|
|
4952
5272
|
style: styles2.photo,
|
|
4953
5273
|
onError: () => setImgError(true)
|
|
4954
5274
|
}
|
|
4955
|
-
) : /* @__PURE__ */
|
|
5275
|
+
) : /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.placeholder }, initials || "?")), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.infoCol }, styles2.tierBadge && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.tierBadge }, tier), /* @__PURE__ */ import_react27.default.createElement("h1", { style: styles2.name }, displayName), banner, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.roleLine }, roleLine), pol.office_description && /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.officeDesc }, pol.office_description), pol.bio_text && /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.bioText }, pol.bio_text), (termLine || pol.total_years_in_office > 0) && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.metaRow }, termLine && /* @__PURE__ */ import_react27.default.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ import_react27.default.createElement(CalendarIcon, { size: 14 }), termLine), pol.total_years_in_office > 0 && /* @__PURE__ */ import_react27.default.createElement("span", { style: styles2.metaItem }, /* @__PURE__ */ import_react27.default.createElement(ClockIcon, { size: 14 }), pol.total_years_in_office, " ", pol.total_years_in_office === 1 ? "year" : "years", " in office")), pol.web_form_url && /* @__PURE__ */ import_react27.default.createElement(
|
|
4956
5276
|
"a",
|
|
4957
5277
|
{
|
|
4958
5278
|
href: pol.web_form_url,
|
|
@@ -4966,9 +5286,9 @@ function PoliticianProfile({
|
|
|
4966
5286
|
e.currentTarget.style.background = colors.evTeal;
|
|
4967
5287
|
}
|
|
4968
5288
|
},
|
|
4969
|
-
/* @__PURE__ */
|
|
5289
|
+
/* @__PURE__ */ import_react27.default.createElement(ExternalLinkIcon, { size: 14 }),
|
|
4970
5290
|
"Submit a Message"
|
|
4971
|
-
))), hasContactInfo && /* @__PURE__ */
|
|
5291
|
+
))), hasContactInfo && /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, /* @__PURE__ */ import_react27.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react27.default.createElement("div", { style: sectionHeading }, /* @__PURE__ */ import_react27.default.createElement(MailIcon, { size: 20 }), "Contact Information"), /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.contactGrid }, hasAddresses && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react27.default.createElement(MapPinIcon, { size: 12 }), "Addresses"), addresses.map((addr, i) => /* @__PURE__ */ import_react27.default.createElement("div", { key: `addr-${i}` }, /* @__PURE__ */ import_react27.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, addr.type), /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.contactValue }, addr.lines.map((line, j) => /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, { key: j }, line, j < addr.lines.length - 1 && /* @__PURE__ */ import_react27.default.createElement("br", null))))))), hasPhones && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react27.default.createElement(PhoneIcon, { size: 12 }), "Phone"), Object.entries(phonesByType).map(([type, phones], i) => /* @__PURE__ */ import_react27.default.createElement("div", { key: `phone-${type}` }, /* @__PURE__ */ import_react27.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), phones.map((phone, j) => /* @__PURE__ */ import_react27.default.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ import_react27.default.createElement(
|
|
4972
5292
|
"a",
|
|
4973
5293
|
{
|
|
4974
5294
|
href: `tel:${phone}`,
|
|
@@ -4981,7 +5301,7 @@ function PoliticianProfile({
|
|
|
4981
5301
|
}
|
|
4982
5302
|
},
|
|
4983
5303
|
phone
|
|
4984
|
-
)))))), hasEmails && /* @__PURE__ */
|
|
5304
|
+
)))))), hasEmails && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react27.default.createElement(MailIcon, { size: 12 }), "Email"), Object.entries(emailsByType).filter(([, emails]) => emails.some((e) => e && e.trim())).map(([type, emails], i) => /* @__PURE__ */ import_react27.default.createElement("div", { key: `email-${type}` }, /* @__PURE__ */ import_react27.default.createElement("p", { style: { ...styles2.contactSubLabel, ...i === 0 ? { marginTop: 0 } : { marginTop: spacing[2] } } }, type), emails.filter((e) => e && e.trim()).map((email, j) => /* @__PURE__ */ import_react27.default.createElement("p", { key: j, style: styles2.contactValue }, /* @__PURE__ */ import_react27.default.createElement(
|
|
4985
5305
|
"a",
|
|
4986
5306
|
{
|
|
4987
5307
|
href: `mailto:${email}`,
|
|
@@ -4994,7 +5314,7 @@ function PoliticianProfile({
|
|
|
4994
5314
|
}
|
|
4995
5315
|
},
|
|
4996
5316
|
email
|
|
4997
|
-
)))))), hasWebsitesCol && /* @__PURE__ */
|
|
5317
|
+
)))))), hasWebsitesCol && /* @__PURE__ */ import_react27.default.createElement("div", { style: styles2.contactGroup }, /* @__PURE__ */ import_react27.default.createElement("p", { style: styles2.contactLabel }, /* @__PURE__ */ import_react27.default.createElement(GlobeIcon, { size: 12 }), "Websites"), allWebsites.map((url, i) => /* @__PURE__ */ import_react27.default.createElement("p", { key: i, style: styles2.contactValue }, /* @__PURE__ */ import_react27.default.createElement(
|
|
4998
5318
|
"a",
|
|
4999
5319
|
{
|
|
5000
5320
|
href: url,
|
|
@@ -5009,7 +5329,7 @@ function PoliticianProfile({
|
|
|
5009
5329
|
}
|
|
5010
5330
|
},
|
|
5011
5331
|
extractDomain(url)
|
|
5012
|
-
))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */
|
|
5332
|
+
))), (hasSocial || socialWebsiteUrls.length > 0) && /* @__PURE__ */ import_react27.default.createElement(
|
|
5013
5333
|
SocialLinks,
|
|
5014
5334
|
{
|
|
5015
5335
|
twitter,
|
|
@@ -5021,14 +5341,14 @@ function PoliticianProfile({
|
|
|
5021
5341
|
darkMode,
|
|
5022
5342
|
style: { marginTop: allWebsites.length > 0 ? "8px" : 0 }
|
|
5023
5343
|
}
|
|
5024
|
-
)))), committees.length > 0 && /* @__PURE__ */
|
|
5344
|
+
)))), committees.length > 0 && /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, /* @__PURE__ */ import_react27.default.createElement("div", { style: divider }), /* @__PURE__ */ import_react27.default.createElement(CommitteeTable, { committees })), pol.is_judicial ? /* @__PURE__ */ import_react27.default.createElement(
|
|
5025
5345
|
JudicialScorecard,
|
|
5026
5346
|
{
|
|
5027
5347
|
judicialRecord,
|
|
5028
5348
|
politicianId,
|
|
5029
5349
|
onNavigateToRecord
|
|
5030
5350
|
}
|
|
5031
|
-
) : /* @__PURE__ */
|
|
5351
|
+
) : /* @__PURE__ */ import_react27.default.createElement(
|
|
5032
5352
|
LegislativeInlineSummary,
|
|
5033
5353
|
{
|
|
5034
5354
|
summary: legislativeSummary,
|
|
@@ -5039,7 +5359,7 @@ function PoliticianProfile({
|
|
|
5039
5359
|
}
|
|
5040
5360
|
|
|
5041
5361
|
// src/LegislativeRecord.jsx
|
|
5042
|
-
var
|
|
5362
|
+
var import_react28 = __toESM(require("react"));
|
|
5043
5363
|
var DEFAULT_LIMIT = 25;
|
|
5044
5364
|
function normalizeText(str) {
|
|
5045
5365
|
if (!str) return "";
|
|
@@ -5119,7 +5439,7 @@ function getPositionBadge(position) {
|
|
|
5119
5439
|
return { bg: colors.borderLight, text: colors.textSecondary };
|
|
5120
5440
|
}
|
|
5121
5441
|
function Badge({ label, bg, text }) {
|
|
5122
|
-
return /* @__PURE__ */
|
|
5442
|
+
return /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5123
5443
|
display: "inline-block",
|
|
5124
5444
|
background: bg,
|
|
5125
5445
|
color: text,
|
|
@@ -5132,18 +5452,18 @@ function Badge({ label, bg, text }) {
|
|
|
5132
5452
|
} }, label);
|
|
5133
5453
|
}
|
|
5134
5454
|
function SectionHeader({ title, yearFilter, years, onYearChange }) {
|
|
5135
|
-
return /* @__PURE__ */
|
|
5455
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: {
|
|
5136
5456
|
display: "flex",
|
|
5137
5457
|
alignItems: "center",
|
|
5138
5458
|
justifyContent: "space-between",
|
|
5139
5459
|
marginBottom: spacing[4]
|
|
5140
|
-
} }, /* @__PURE__ */
|
|
5460
|
+
} }, /* @__PURE__ */ import_react28.default.createElement("h2", { style: {
|
|
5141
5461
|
fontFamily: fonts.primary,
|
|
5142
5462
|
fontSize: fontSizes.xl,
|
|
5143
5463
|
fontWeight: fontWeights.bold,
|
|
5144
5464
|
color: colors.evTeal,
|
|
5145
5465
|
margin: 0
|
|
5146
|
-
} }, title), years && years.length > 0 && /* @__PURE__ */
|
|
5466
|
+
} }, title), years && years.length > 0 && /* @__PURE__ */ import_react28.default.createElement(
|
|
5147
5467
|
"select",
|
|
5148
5468
|
{
|
|
5149
5469
|
value: yearFilter,
|
|
@@ -5159,13 +5479,13 @@ function SectionHeader({ title, yearFilter, years, onYearChange }) {
|
|
|
5159
5479
|
cursor: "pointer"
|
|
5160
5480
|
}
|
|
5161
5481
|
},
|
|
5162
|
-
/* @__PURE__ */
|
|
5163
|
-
years.map((y) => /* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ import_react28.default.createElement("option", { value: "All" }, "All years"),
|
|
5483
|
+
years.map((y) => /* @__PURE__ */ import_react28.default.createElement("option", { key: y, value: y }, y))
|
|
5164
5484
|
));
|
|
5165
5485
|
}
|
|
5166
5486
|
function ShowAllLink({ totalCount, visibleCount, onClick }) {
|
|
5167
5487
|
if (totalCount <= visibleCount) return null;
|
|
5168
|
-
return /* @__PURE__ */
|
|
5488
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: { textAlign: "center", marginTop: spacing[3] } }, /* @__PURE__ */ import_react28.default.createElement(
|
|
5169
5489
|
"button",
|
|
5170
5490
|
{
|
|
5171
5491
|
type: "button",
|
|
@@ -5193,7 +5513,7 @@ function ShowAllLink({ totalCount, visibleCount, onClick }) {
|
|
|
5193
5513
|
));
|
|
5194
5514
|
}
|
|
5195
5515
|
function EmptyState({ message }) {
|
|
5196
|
-
return /* @__PURE__ */
|
|
5516
|
+
return /* @__PURE__ */ import_react28.default.createElement("p", { style: {
|
|
5197
5517
|
fontFamily: fonts.primary,
|
|
5198
5518
|
fontSize: fontSizes.sm,
|
|
5199
5519
|
color: colors.textMuted,
|
|
@@ -5203,24 +5523,24 @@ function EmptyState({ message }) {
|
|
|
5203
5523
|
} }, message);
|
|
5204
5524
|
}
|
|
5205
5525
|
function Spinner() {
|
|
5206
|
-
return /* @__PURE__ */
|
|
5526
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: {
|
|
5207
5527
|
display: "flex",
|
|
5208
5528
|
justifyContent: "center",
|
|
5209
5529
|
alignItems: "center",
|
|
5210
5530
|
padding: spacing[10]
|
|
5211
|
-
} }, /* @__PURE__ */
|
|
5531
|
+
} }, /* @__PURE__ */ import_react28.default.createElement("div", { style: {
|
|
5212
5532
|
width: "40px",
|
|
5213
5533
|
height: "40px",
|
|
5214
5534
|
borderRadius: borderRadius.full,
|
|
5215
5535
|
border: `3px solid ${colors.borderLight}`,
|
|
5216
5536
|
borderTopColor: colors.evTeal,
|
|
5217
5537
|
animation: "ev-spin 0.8s linear infinite"
|
|
5218
|
-
} }), /* @__PURE__ */
|
|
5538
|
+
} }), /* @__PURE__ */ import_react28.default.createElement("style", null, `@keyframes ev-spin { to { transform: rotate(360deg); } }`));
|
|
5219
5539
|
}
|
|
5220
5540
|
function CommitteesSection({ committees, leadership }) {
|
|
5221
|
-
const [showAll, setShowAll] = (0,
|
|
5541
|
+
const [showAll, setShowAll] = (0, import_react28.useState)(false);
|
|
5222
5542
|
const visible = showAll ? committees : committees.slice(0, DEFAULT_LIMIT);
|
|
5223
|
-
return /* @__PURE__ */
|
|
5543
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react28.default.createElement(SectionHeader, { title: "Committees & Leadership" }), leadership && leadership.length > 0 && /* @__PURE__ */ import_react28.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: spacing[2], marginBottom: spacing[4] } }, leadership.map((role, i) => /* @__PURE__ */ import_react28.default.createElement("div", { key: i, style: {
|
|
5224
5544
|
display: "inline-flex",
|
|
5225
5545
|
alignItems: "center",
|
|
5226
5546
|
gap: spacing[1],
|
|
@@ -5231,23 +5551,23 @@ function CommitteesSection({ committees, leadership }) {
|
|
|
5231
5551
|
fontFamily: fonts.primary,
|
|
5232
5552
|
fontSize: fontSizes.sm,
|
|
5233
5553
|
fontWeight: fontWeights.semibold
|
|
5234
|
-
} }, role.title, role.chamber && /* @__PURE__ */
|
|
5554
|
+
} }, role.title, role.chamber && /* @__PURE__ */ import_react28.default.createElement("span", { style: { fontWeight: fontWeights.regular, opacity: 0.85 } }, "(", role.chamber, ")")))), committees.length === 0 ? /* @__PURE__ */ import_react28.default.createElement(EmptyState, { message: "Committee information is not available for this office." }) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("div", null, visible.map((c, i) => {
|
|
5235
5555
|
const badge = getRoleBadge(c.role);
|
|
5236
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { key: i, style: {
|
|
5237
5557
|
display: "flex",
|
|
5238
5558
|
alignItems: "center",
|
|
5239
5559
|
justifyContent: "space-between",
|
|
5240
5560
|
padding: `${spacing[3]} 0`,
|
|
5241
5561
|
borderBottom: `1px solid ${colors.borderLight}`,
|
|
5242
5562
|
gap: spacing[3]
|
|
5243
|
-
} }, /* @__PURE__ */
|
|
5563
|
+
} }, /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5244
5564
|
fontFamily: fonts.primary,
|
|
5245
5565
|
fontSize: fontSizes.sm,
|
|
5246
5566
|
color: colors.textSecondary,
|
|
5247
5567
|
flex: 1,
|
|
5248
5568
|
minWidth: 0
|
|
5249
|
-
} }, c.committee_name, c.parent_name && /* @__PURE__ */
|
|
5250
|
-
})), !showAll && /* @__PURE__ */
|
|
5569
|
+
} }, c.committee_name, c.parent_name && /* @__PURE__ */ import_react28.default.createElement("span", { style: { color: colors.textMuted, marginLeft: spacing[1] } }, "(", c.parent_name, ")")), /* @__PURE__ */ import_react28.default.createElement(Badge, { label: badge.label, bg: badge.bg, text: badge.text }));
|
|
5570
|
+
})), !showAll && /* @__PURE__ */ import_react28.default.createElement(
|
|
5251
5571
|
ShowAllLink,
|
|
5252
5572
|
{
|
|
5253
5573
|
totalCount: committees.length,
|
|
@@ -5258,15 +5578,15 @@ function CommitteesSection({ committees, leadership }) {
|
|
|
5258
5578
|
}
|
|
5259
5579
|
function LegislationSection({ bills, isMobile }) {
|
|
5260
5580
|
const years = getYears(bills, "introduced_at");
|
|
5261
|
-
const [yearFilter, setYearFilter] = (0,
|
|
5262
|
-
const [showAll, setShowAll] = (0,
|
|
5581
|
+
const [yearFilter, setYearFilter] = (0, import_react28.useState)("All");
|
|
5582
|
+
const [showAll, setShowAll] = (0, import_react28.useState)(false);
|
|
5263
5583
|
const handleYearChange = (y) => {
|
|
5264
5584
|
setYearFilter(y);
|
|
5265
5585
|
setShowAll(false);
|
|
5266
5586
|
};
|
|
5267
5587
|
const filtered = yearFilter === "All" ? bills : bills.filter((b) => extractYear(b.introduced_at) === yearFilter);
|
|
5268
5588
|
const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
|
|
5269
|
-
return /* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react28.default.createElement(
|
|
5270
5590
|
SectionHeader,
|
|
5271
5591
|
{
|
|
5272
5592
|
title: "Sponsored Legislation",
|
|
@@ -5274,42 +5594,42 @@ function LegislationSection({ bills, isMobile }) {
|
|
|
5274
5594
|
years,
|
|
5275
5595
|
onYearChange: handleYearChange
|
|
5276
5596
|
}
|
|
5277
|
-
), bills.length === 0 ? /* @__PURE__ */
|
|
5597
|
+
), bills.length === 0 ? /* @__PURE__ */ import_react28.default.createElement(EmptyState, { message: "Sponsored legislation data is not available for this office." }) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("div", null, visible.map((bill, i) => {
|
|
5278
5598
|
const statusBadge = getStatusBadge(bill.status_label);
|
|
5279
|
-
return /* @__PURE__ */
|
|
5599
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { key: i, style: {
|
|
5280
5600
|
display: "flex",
|
|
5281
5601
|
flexDirection: isMobile ? "column" : "row",
|
|
5282
5602
|
alignItems: isMobile ? "flex-start" : "center",
|
|
5283
5603
|
gap: isMobile ? spacing[1] : spacing[3],
|
|
5284
5604
|
padding: `${spacing[3]} 0`,
|
|
5285
5605
|
borderBottom: `1px solid ${colors.borderLight}`
|
|
5286
|
-
} }, /* @__PURE__ */
|
|
5606
|
+
} }, /* @__PURE__ */ import_react28.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5287
5607
|
fontFamily: fonts.primary,
|
|
5288
5608
|
fontSize: fontSizes.xs,
|
|
5289
5609
|
fontWeight: fontWeights.bold,
|
|
5290
5610
|
color: colors.textSecondary,
|
|
5291
5611
|
marginRight: spacing[2]
|
|
5292
|
-
} }, bill.number), /* @__PURE__ */
|
|
5612
|
+
} }, bill.number), /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5293
5613
|
fontFamily: fonts.primary,
|
|
5294
5614
|
fontSize: fontSizes.sm,
|
|
5295
5615
|
color: colors.textSecondary
|
|
5296
|
-
} }, bill.title)), /* @__PURE__ */
|
|
5616
|
+
} }, bill.title)), /* @__PURE__ */ import_react28.default.createElement("div", { style: {
|
|
5297
5617
|
display: "flex",
|
|
5298
5618
|
alignItems: "center",
|
|
5299
5619
|
gap: spacing[2],
|
|
5300
5620
|
flexShrink: 0,
|
|
5301
5621
|
flexWrap: "wrap"
|
|
5302
|
-
} }, /* @__PURE__ */
|
|
5622
|
+
} }, /* @__PURE__ */ import_react28.default.createElement(Badge, { label: bill.status_label || "Unknown", bg: statusBadge.bg, text: statusBadge.text }), bill.introduced_at && /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5303
5623
|
fontFamily: fonts.primary,
|
|
5304
5624
|
fontSize: fontSizes.xs,
|
|
5305
5625
|
color: colors.textMuted
|
|
5306
|
-
} }, formatDate2(bill.introduced_at)), /* @__PURE__ */
|
|
5626
|
+
} }, formatDate2(bill.introduced_at)), /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5307
5627
|
fontFamily: fonts.primary,
|
|
5308
5628
|
fontSize: fontSizes.xs,
|
|
5309
5629
|
color: colors.textMuted,
|
|
5310
5630
|
fontStyle: "italic"
|
|
5311
5631
|
} }, bill.is_sponsor ? "Sponsored" : "Cosponsored")));
|
|
5312
|
-
})), !showAll && /* @__PURE__ */
|
|
5632
|
+
})), !showAll && /* @__PURE__ */ import_react28.default.createElement(
|
|
5313
5633
|
ShowAllLink,
|
|
5314
5634
|
{
|
|
5315
5635
|
totalCount: filtered.length,
|
|
@@ -5320,15 +5640,15 @@ function LegislationSection({ bills, isMobile }) {
|
|
|
5320
5640
|
}
|
|
5321
5641
|
function VotingSection({ votes, isMobile }) {
|
|
5322
5642
|
const years = getYears(votes, "vote_date");
|
|
5323
|
-
const [yearFilter, setYearFilter] = (0,
|
|
5324
|
-
const [showAll, setShowAll] = (0,
|
|
5643
|
+
const [yearFilter, setYearFilter] = (0, import_react28.useState)("All");
|
|
5644
|
+
const [showAll, setShowAll] = (0, import_react28.useState)(false);
|
|
5325
5645
|
const handleYearChange = (y) => {
|
|
5326
5646
|
setYearFilter(y);
|
|
5327
5647
|
setShowAll(false);
|
|
5328
5648
|
};
|
|
5329
5649
|
const filtered = yearFilter === "All" ? votes : votes.filter((v) => extractYear(v.vote_date) === yearFilter);
|
|
5330
5650
|
const visible = showAll ? filtered : filtered.slice(0, DEFAULT_LIMIT);
|
|
5331
|
-
return /* @__PURE__ */
|
|
5651
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: { marginBottom: spacing[8] } }, /* @__PURE__ */ import_react28.default.createElement(
|
|
5332
5652
|
SectionHeader,
|
|
5333
5653
|
{
|
|
5334
5654
|
title: "Voting Record",
|
|
@@ -5336,38 +5656,38 @@ function VotingSection({ votes, isMobile }) {
|
|
|
5336
5656
|
years,
|
|
5337
5657
|
onYearChange: handleYearChange
|
|
5338
5658
|
}
|
|
5339
|
-
), votes.length === 0 ? /* @__PURE__ */
|
|
5659
|
+
), votes.length === 0 ? /* @__PURE__ */ import_react28.default.createElement(EmptyState, { message: "Voting records are not available for this office." }) : /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("div", null, visible.map((vote, i) => {
|
|
5340
5660
|
const positionBadge = getPositionBadge(vote.position);
|
|
5341
5661
|
const normPosition = normalizeText(vote.position);
|
|
5342
5662
|
const topic = vote.bill_title || vote.vote_question;
|
|
5343
5663
|
const sourceUrl = vote.bill_url;
|
|
5344
|
-
return /* @__PURE__ */
|
|
5664
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { key: i, style: {
|
|
5345
5665
|
display: "flex",
|
|
5346
5666
|
flexDirection: isMobile ? "column" : "row",
|
|
5347
5667
|
alignItems: isMobile ? "flex-start" : "center",
|
|
5348
5668
|
gap: isMobile ? spacing[1] : spacing[3],
|
|
5349
5669
|
padding: `${spacing[3]} 0`,
|
|
5350
5670
|
borderBottom: `1px solid ${colors.borderLight}`
|
|
5351
|
-
} }, /* @__PURE__ */
|
|
5671
|
+
} }, /* @__PURE__ */ import_react28.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5352
5672
|
fontFamily: fonts.primary,
|
|
5353
5673
|
fontSize: fontSizes.sm,
|
|
5354
5674
|
color: colors.textSecondary
|
|
5355
|
-
} }, topic)), /* @__PURE__ */
|
|
5675
|
+
} }, topic)), /* @__PURE__ */ import_react28.default.createElement("div", { style: {
|
|
5356
5676
|
display: "flex",
|
|
5357
5677
|
alignItems: "center",
|
|
5358
5678
|
gap: spacing[2],
|
|
5359
5679
|
flexShrink: 0,
|
|
5360
5680
|
flexWrap: "wrap"
|
|
5361
|
-
} }, vote.vote_date && /* @__PURE__ */
|
|
5681
|
+
} }, vote.vote_date && /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5362
5682
|
fontFamily: fonts.primary,
|
|
5363
5683
|
fontSize: fontSizes.xs,
|
|
5364
5684
|
color: colors.textMuted
|
|
5365
|
-
} }, formatDate2(vote.vote_date)), /* @__PURE__ */
|
|
5685
|
+
} }, formatDate2(vote.vote_date)), /* @__PURE__ */ import_react28.default.createElement(Badge, { label: normPosition || "Unknown", bg: positionBadge.bg, text: positionBadge.text }), vote.result && /* @__PURE__ */ import_react28.default.createElement("span", { style: {
|
|
5366
5686
|
fontFamily: fonts.primary,
|
|
5367
5687
|
fontSize: fontSizes.xs,
|
|
5368
5688
|
color: vote.result === "Passed" ? colors.success : colors.textMuted,
|
|
5369
5689
|
fontWeight: fontWeights.medium
|
|
5370
|
-
} }, vote.result), sourceUrl && /* @__PURE__ */
|
|
5690
|
+
} }, vote.result), sourceUrl && /* @__PURE__ */ import_react28.default.createElement(
|
|
5371
5691
|
"a",
|
|
5372
5692
|
{
|
|
5373
5693
|
href: sourceUrl,
|
|
@@ -5388,7 +5708,7 @@ function VotingSection({ votes, isMobile }) {
|
|
|
5388
5708
|
},
|
|
5389
5709
|
"Source"
|
|
5390
5710
|
)));
|
|
5391
|
-
})), !showAll && /* @__PURE__ */
|
|
5711
|
+
})), !showAll && /* @__PURE__ */ import_react28.default.createElement(
|
|
5392
5712
|
ShowAllLink,
|
|
5393
5713
|
{
|
|
5394
5714
|
totalCount: filtered.length,
|
|
@@ -5407,20 +5727,20 @@ function LegislativeRecord({
|
|
|
5407
5727
|
}) {
|
|
5408
5728
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
5409
5729
|
if (loading) {
|
|
5410
|
-
return /* @__PURE__ */
|
|
5730
|
+
return /* @__PURE__ */ import_react28.default.createElement(Spinner, null);
|
|
5411
5731
|
}
|
|
5412
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", { style: { fontFamily: fonts.primary } }, politicianName && /* @__PURE__ */ import_react28.default.createElement("h1", { style: {
|
|
5413
5733
|
fontFamily: fonts.primary,
|
|
5414
5734
|
fontSize: isMobile ? fontSizes["2xl"] : fontSizes["4xl"],
|
|
5415
5735
|
fontWeight: fontWeights.bold,
|
|
5416
5736
|
color: colors.evTeal,
|
|
5417
5737
|
marginBottom: spacing[8],
|
|
5418
5738
|
marginTop: 0
|
|
5419
|
-
} }, "Legislative Record: ", politicianName), /* @__PURE__ */
|
|
5739
|
+
} }, "Legislative Record: ", politicianName), /* @__PURE__ */ import_react28.default.createElement(CommitteesSection, { committees, leadership }), /* @__PURE__ */ import_react28.default.createElement(LegislationSection, { bills, isMobile }), /* @__PURE__ */ import_react28.default.createElement(VotingSection, { votes, isMobile }));
|
|
5420
5740
|
}
|
|
5421
5741
|
|
|
5422
5742
|
// src/JudicialRecordDetail.jsx
|
|
5423
|
-
var
|
|
5743
|
+
var import_react29 = __toESM(require("react"));
|
|
5424
5744
|
var containerStyle = {
|
|
5425
5745
|
fontFamily: "'Manrope', sans-serif",
|
|
5426
5746
|
maxWidth: "800px"
|
|
@@ -5505,7 +5825,7 @@ var emptyStateStyle = {
|
|
|
5505
5825
|
function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
5506
5826
|
var _a;
|
|
5507
5827
|
if (!judicialRecord) {
|
|
5508
|
-
return /* @__PURE__ */
|
|
5828
|
+
return /* @__PURE__ */ import_react29.default.createElement("div", { style: containerStyle }, /* @__PURE__ */ import_react29.default.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ import_react29.default.createElement("div", { style: emptyStateStyle }, "No judicial record data available."));
|
|
5509
5829
|
}
|
|
5510
5830
|
const {
|
|
5511
5831
|
judge_detail: detail,
|
|
@@ -5514,13 +5834,13 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
|
5514
5834
|
disciplinary_records: disciplinary = []
|
|
5515
5835
|
} = judicialRecord;
|
|
5516
5836
|
const displayName = politician.full_name || `${politician.first_name || ""} ${politician.last_name || ""}`.trim();
|
|
5517
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ import_react29.default.createElement("div", { style: containerStyle }, /* @__PURE__ */ import_react29.default.createElement("button", { style: backBtnStyle, onClick: onBack }, "\u2190 Back to Profile"), /* @__PURE__ */ import_react29.default.createElement("h1", { style: nameStyle }, displayName), /* @__PURE__ */ import_react29.default.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__ */ import_react29.default.createElement(import_react29.default.Fragment, null, /* @__PURE__ */ import_react29.default.createElement("h2", { style: sectionHeadingStyle }, "Background"), detail.appointed_by && /* @__PURE__ */ import_react29.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react29.default.createElement("span", { style: detailLabelStyle }, "Appointed by"), /* @__PURE__ */ import_react29.default.createElement("span", { style: detailValueStyle }, detail.appointed_by, " (", detail.appointing_president_party, ")")), detail.confirmation_vote && /* @__PURE__ */ import_react29.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react29.default.createElement("span", { style: detailLabelStyle }, "Confirmation Vote"), /* @__PURE__ */ import_react29.default.createElement("span", { style: detailValueStyle }, detail.confirmation_vote)), detail.election_type && /* @__PURE__ */ import_react29.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react29.default.createElement("span", { style: detailLabelStyle }, "Election Type"), /* @__PURE__ */ import_react29.default.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__ */ import_react29.default.createElement("div", { style: detailRowStyle }, /* @__PURE__ */ import_react29.default.createElement("span", { style: detailLabelStyle }, "Areas of Focus"), /* @__PURE__ */ import_react29.default.createElement("span", { style: detailValueStyle }, detail.areas_of_focus.join(", ")))), /* @__PURE__ */ import_react29.default.createElement("h2", { style: sectionHeadingStyle }, "Performance Evaluations"), evaluations.length === 0 ? /* @__PURE__ */ import_react29.default.createElement("div", { style: emptyStateStyle }, "No evaluation data available yet.") : /* @__PURE__ */ import_react29.default.createElement("table", { style: tableStyle }, /* @__PURE__ */ import_react29.default.createElement("thead", null, /* @__PURE__ */ import_react29.default.createElement("tr", null, /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Source"), /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Rating"), /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Date"))), /* @__PURE__ */ import_react29.default.createElement("tbody", null, evaluations.map((ev, i) => /* @__PURE__ */ import_react29.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react29.default.createElement("td", { style: tdStyle }, ev.source_url ? /* @__PURE__ */ import_react29.default.createElement("a", { href: ev.source_url, target: "_blank", rel: "noopener noreferrer", style: { color: "#319795" } }, ev.source) : ev.source), /* @__PURE__ */ import_react29.default.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, ev.rating), /* @__PURE__ */ import_react29.default.createElement("td", { style: tdStyle }, formatDate(ev.rating_date)))))), /* @__PURE__ */ import_react29.default.createElement("h2", { style: sectionHeadingStyle }, "Performance Metrics"), metrics.length === 0 ? /* @__PURE__ */ import_react29.default.createElement("div", { style: emptyStateStyle }, "No performance metric data available yet.") : /* @__PURE__ */ import_react29.default.createElement("table", { style: tableStyle }, /* @__PURE__ */ import_react29.default.createElement("thead", null, /* @__PURE__ */ import_react29.default.createElement("tr", null, /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Metric"), /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Value"), /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Context"), /* @__PURE__ */ import_react29.default.createElement("th", { style: thStyle }, "Period"))), /* @__PURE__ */ import_react29.default.createElement("tbody", null, metrics.map((m, i) => /* @__PURE__ */ import_react29.default.createElement("tr", { key: i }, /* @__PURE__ */ import_react29.default.createElement("td", { style: { ...tdStyle, fontWeight: 600 } }, METRIC_LABELS[m.metric_type] || m.metric_type.replace(/_/g, " ")), /* @__PURE__ */ import_react29.default.createElement("td", { style: tdStyle }, formatMetricValue(m.metric_type, m.value)), /* @__PURE__ */ import_react29.default.createElement("td", { style: { ...tdStyle, color: "#718096", fontSize: "13px" } }, m.context_label), /* @__PURE__ */ import_react29.default.createElement("td", { style: tdStyle }, m.time_period))))), disciplinary.length > 0 && /* @__PURE__ */ import_react29.default.createElement(import_react29.default.Fragment, null, /* @__PURE__ */ import_react29.default.createElement("h2", { style: sectionHeadingStyle }, "Disciplinary History"), disciplinary.map((d, i) => /* @__PURE__ */ import_react29.default.createElement("div", { key: i, style: {
|
|
5518
5838
|
borderLeft: "3px solid #fc8181",
|
|
5519
5839
|
backgroundColor: "#fff5f5",
|
|
5520
5840
|
borderRadius: "0 6px 6px 0",
|
|
5521
5841
|
padding: "12px 16px",
|
|
5522
5842
|
marginBottom: "10px"
|
|
5523
|
-
} }, /* @__PURE__ */
|
|
5843
|
+
} }, /* @__PURE__ */ import_react29.default.createElement("div", { style: { fontWeight: 700, color: "#742a2a", fontSize: "14px" } }, d.record_type, " \u2014 ", formatDate(d.record_date)), d.description && /* @__PURE__ */ import_react29.default.createElement("div", { style: { color: "#9b2c2c", fontSize: "13px", marginTop: "4px" } }, d.description), d.source_url && /* @__PURE__ */ import_react29.default.createElement(
|
|
5524
5844
|
"a",
|
|
5525
5845
|
{
|
|
5526
5846
|
href: d.source_url,
|
|
@@ -5533,7 +5853,7 @@ function JudicialRecordDetail({ politician = {}, judicialRecord, onBack }) {
|
|
|
5533
5853
|
}
|
|
5534
5854
|
|
|
5535
5855
|
// src/AuthForm.jsx
|
|
5536
|
-
var
|
|
5856
|
+
var import_react30 = __toESM(require("react"));
|
|
5537
5857
|
function AuthForm({
|
|
5538
5858
|
logoSrc = "/EVLogo.svg",
|
|
5539
5859
|
appName = "Empowered Vote",
|
|
@@ -5544,11 +5864,11 @@ function AuthForm({
|
|
|
5544
5864
|
error = null,
|
|
5545
5865
|
submitting = false
|
|
5546
5866
|
}) {
|
|
5547
|
-
const [username, setUsername] = (0,
|
|
5548
|
-
const [password, setPassword] = (0,
|
|
5549
|
-
const [confirmPassword, setConfirmPassword] = (0,
|
|
5550
|
-
const [showPasswords, setShowPasswords] = (0,
|
|
5551
|
-
const [passwordMismatch, setPasswordMismatch] = (0,
|
|
5867
|
+
const [username, setUsername] = (0, import_react30.useState)("");
|
|
5868
|
+
const [password, setPassword] = (0, import_react30.useState)("");
|
|
5869
|
+
const [confirmPassword, setConfirmPassword] = (0, import_react30.useState)("");
|
|
5870
|
+
const [showPasswords, setShowPasswords] = (0, import_react30.useState)(false);
|
|
5871
|
+
const [passwordMismatch, setPasswordMismatch] = (0, import_react30.useState)(false);
|
|
5552
5872
|
const isLogin = mode === "login";
|
|
5553
5873
|
const handleSubmit = (e) => {
|
|
5554
5874
|
e.preventDefault();
|
|
@@ -5560,7 +5880,7 @@ function AuthForm({
|
|
|
5560
5880
|
setPasswordMismatch(false);
|
|
5561
5881
|
onSubmit == null ? void 0 : onSubmit(username.trim(), password);
|
|
5562
5882
|
};
|
|
5563
|
-
const EyeOpen = () => /* @__PURE__ */
|
|
5883
|
+
const EyeOpen = () => /* @__PURE__ */ import_react30.default.createElement(
|
|
5564
5884
|
"svg",
|
|
5565
5885
|
{
|
|
5566
5886
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5570,7 +5890,7 @@ function AuthForm({
|
|
|
5570
5890
|
stroke: "currentColor",
|
|
5571
5891
|
style: { width: "20px", height: "20px" }
|
|
5572
5892
|
},
|
|
5573
|
-
/* @__PURE__ */
|
|
5893
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
5574
5894
|
"path",
|
|
5575
5895
|
{
|
|
5576
5896
|
strokeLinecap: "round",
|
|
@@ -5578,7 +5898,7 @@ function AuthForm({
|
|
|
5578
5898
|
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"
|
|
5579
5899
|
}
|
|
5580
5900
|
),
|
|
5581
|
-
/* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
5582
5902
|
"path",
|
|
5583
5903
|
{
|
|
5584
5904
|
strokeLinecap: "round",
|
|
@@ -5587,7 +5907,7 @@ function AuthForm({
|
|
|
5587
5907
|
}
|
|
5588
5908
|
)
|
|
5589
5909
|
);
|
|
5590
|
-
const EyeClosed = () => /* @__PURE__ */
|
|
5910
|
+
const EyeClosed = () => /* @__PURE__ */ import_react30.default.createElement(
|
|
5591
5911
|
"svg",
|
|
5592
5912
|
{
|
|
5593
5913
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5597,7 +5917,7 @@ function AuthForm({
|
|
|
5597
5917
|
stroke: "currentColor",
|
|
5598
5918
|
style: { width: "20px", height: "20px" }
|
|
5599
5919
|
},
|
|
5600
|
-
/* @__PURE__ */
|
|
5920
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
5601
5921
|
"path",
|
|
5602
5922
|
{
|
|
5603
5923
|
strokeLinecap: "round",
|
|
@@ -5606,17 +5926,17 @@ function AuthForm({
|
|
|
5606
5926
|
}
|
|
5607
5927
|
)
|
|
5608
5928
|
);
|
|
5609
|
-
const PasswordToggle = () => /* @__PURE__ */
|
|
5929
|
+
const PasswordToggle = () => /* @__PURE__ */ import_react30.default.createElement(
|
|
5610
5930
|
"button",
|
|
5611
5931
|
{
|
|
5612
5932
|
type: "button",
|
|
5613
5933
|
onClick: () => setShowPasswords((prev) => !prev),
|
|
5614
5934
|
style: styles.passwordToggle
|
|
5615
5935
|
},
|
|
5616
|
-
showPasswords ? /* @__PURE__ */
|
|
5936
|
+
showPasswords ? /* @__PURE__ */ import_react30.default.createElement(EyeOpen, null) : /* @__PURE__ */ import_react30.default.createElement(EyeClosed, null)
|
|
5617
5937
|
);
|
|
5618
5938
|
const displayError = passwordMismatch ? "Passwords do not match." : error;
|
|
5619
|
-
return /* @__PURE__ */
|
|
5939
|
+
return /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.wrapper }, /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.container }, /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.header }, logoSrc && /* @__PURE__ */ import_react30.default.createElement("img", { src: logoSrc, alt: appName, style: styles.logo }), appName && /* @__PURE__ */ import_react30.default.createElement("h1", { style: styles.appName }, appName), appSubtitle && /* @__PURE__ */ import_react30.default.createElement("p", { style: styles.appSubtitle }, appSubtitle)), /* @__PURE__ */ import_react30.default.createElement("form", { onSubmit: handleSubmit, style: styles.card }, /* @__PURE__ */ import_react30.default.createElement("h2", { style: styles.cardTitle }, isLogin ? "Welcome Back" : "Create Account"), /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react30.default.createElement("label", { style: styles.label }, "Username"), /* @__PURE__ */ import_react30.default.createElement(
|
|
5620
5940
|
"input",
|
|
5621
5941
|
{
|
|
5622
5942
|
type: "text",
|
|
@@ -5633,7 +5953,7 @@ function AuthForm({
|
|
|
5633
5953
|
},
|
|
5634
5954
|
required: true
|
|
5635
5955
|
}
|
|
5636
|
-
)), /* @__PURE__ */
|
|
5956
|
+
)), /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react30.default.createElement("label", { style: styles.label }, "Password"), /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ import_react30.default.createElement(
|
|
5637
5957
|
"input",
|
|
5638
5958
|
{
|
|
5639
5959
|
type: showPasswords ? "text" : "password",
|
|
@@ -5649,7 +5969,7 @@ function AuthForm({
|
|
|
5649
5969
|
},
|
|
5650
5970
|
required: true
|
|
5651
5971
|
}
|
|
5652
|
-
), /* @__PURE__ */
|
|
5972
|
+
), /* @__PURE__ */ import_react30.default.createElement(PasswordToggle, null))), !isLogin && /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.fieldGroup }, /* @__PURE__ */ import_react30.default.createElement("label", { style: styles.label }, "Confirm Password"), /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.passwordWrapper }, /* @__PURE__ */ import_react30.default.createElement(
|
|
5653
5973
|
"input",
|
|
5654
5974
|
{
|
|
5655
5975
|
type: showPasswords ? "text" : "password",
|
|
@@ -5665,7 +5985,7 @@ function AuthForm({
|
|
|
5665
5985
|
},
|
|
5666
5986
|
required: true
|
|
5667
5987
|
}
|
|
5668
|
-
), /* @__PURE__ */
|
|
5988
|
+
), /* @__PURE__ */ import_react30.default.createElement(PasswordToggle, null))), displayError && /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.errorBox }, /* @__PURE__ */ import_react30.default.createElement("p", { style: styles.errorText }, displayError)), /* @__PURE__ */ import_react30.default.createElement(
|
|
5669
5989
|
"button",
|
|
5670
5990
|
{
|
|
5671
5991
|
type: "submit",
|
|
@@ -5683,7 +6003,7 @@ function AuthForm({
|
|
|
5683
6003
|
}
|
|
5684
6004
|
},
|
|
5685
6005
|
submitting ? isLogin ? "Signing In..." : "Creating Account..." : isLogin ? "Sign In" : "Create Account"
|
|
5686
|
-
), onModeSwitch && /* @__PURE__ */
|
|
6006
|
+
), onModeSwitch && /* @__PURE__ */ import_react30.default.createElement("div", { style: styles.modeSwitch }, /* @__PURE__ */ import_react30.default.createElement("p", { style: styles.modeSwitchText }, isLogin ? "Don't have an account?" : "Already have an account?"), /* @__PURE__ */ import_react30.default.createElement(
|
|
5687
6007
|
"button",
|
|
5688
6008
|
{
|
|
5689
6009
|
type: "button",
|
|
@@ -5856,9 +6176,9 @@ var styles = {
|
|
|
5856
6176
|
};
|
|
5857
6177
|
|
|
5858
6178
|
// src/TopicTierBadge.jsx
|
|
5859
|
-
var
|
|
6179
|
+
var import_react31 = __toESM(require("react"));
|
|
5860
6180
|
function LandmarkIcon({ size = 14 }) {
|
|
5861
|
-
return /* @__PURE__ */
|
|
6181
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
5862
6182
|
"svg",
|
|
5863
6183
|
{
|
|
5864
6184
|
width: size,
|
|
@@ -5872,16 +6192,16 @@ function LandmarkIcon({ size = 14 }) {
|
|
|
5872
6192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5873
6193
|
"aria-hidden": "true"
|
|
5874
6194
|
},
|
|
5875
|
-
/* @__PURE__ */
|
|
5876
|
-
/* @__PURE__ */
|
|
5877
|
-
/* @__PURE__ */
|
|
5878
|
-
/* @__PURE__ */
|
|
5879
|
-
/* @__PURE__ */
|
|
5880
|
-
/* @__PURE__ */
|
|
6195
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M10 18v-7" }),
|
|
6196
|
+
/* @__PURE__ */ import_react31.default.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" }),
|
|
6197
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M14 18v-7" }),
|
|
6198
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M18 18v-7" }),
|
|
6199
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M3 22h18" }),
|
|
6200
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M6 18v-7" })
|
|
5881
6201
|
);
|
|
5882
6202
|
}
|
|
5883
6203
|
function Building2Icon({ size = 14 }) {
|
|
5884
|
-
return /* @__PURE__ */
|
|
6204
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
5885
6205
|
"svg",
|
|
5886
6206
|
{
|
|
5887
6207
|
width: size,
|
|
@@ -5895,17 +6215,17 @@ function Building2Icon({ size = 14 }) {
|
|
|
5895
6215
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5896
6216
|
"aria-hidden": "true"
|
|
5897
6217
|
},
|
|
5898
|
-
/* @__PURE__ */
|
|
5899
|
-
/* @__PURE__ */
|
|
5900
|
-
/* @__PURE__ */
|
|
5901
|
-
/* @__PURE__ */
|
|
5902
|
-
/* @__PURE__ */
|
|
5903
|
-
/* @__PURE__ */
|
|
5904
|
-
/* @__PURE__ */
|
|
6218
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
|
|
6219
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
|
|
6220
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
|
|
6221
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M10 6h4" }),
|
|
6222
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M10 10h4" }),
|
|
6223
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M10 14h4" }),
|
|
6224
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "M10 18h4" })
|
|
5905
6225
|
);
|
|
5906
6226
|
}
|
|
5907
6227
|
function HomeIcon({ size = 14 }) {
|
|
5908
|
-
return /* @__PURE__ */
|
|
6228
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
5909
6229
|
"svg",
|
|
5910
6230
|
{
|
|
5911
6231
|
width: size,
|
|
@@ -5919,8 +6239,8 @@ function HomeIcon({ size = 14 }) {
|
|
|
5919
6239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5920
6240
|
"aria-hidden": "true"
|
|
5921
6241
|
},
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
6242
|
+
/* @__PURE__ */ import_react31.default.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
6243
|
+
/* @__PURE__ */ import_react31.default.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
|
|
5924
6244
|
);
|
|
5925
6245
|
}
|
|
5926
6246
|
var TIER_INFO = {
|
|
@@ -5980,7 +6300,7 @@ function TopicTierBadge({
|
|
|
5980
6300
|
userSelect: "none"
|
|
5981
6301
|
};
|
|
5982
6302
|
};
|
|
5983
|
-
return /* @__PURE__ */
|
|
6303
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
5984
6304
|
"span",
|
|
5985
6305
|
{
|
|
5986
6306
|
className: "ev-topic-tier-badge",
|
|
@@ -5990,13 +6310,13 @@ function TopicTierBadge({
|
|
|
5990
6310
|
},
|
|
5991
6311
|
effectiveTiers.map((tier) => {
|
|
5992
6312
|
const { label, Icon } = TIER_INFO[tier];
|
|
5993
|
-
return /* @__PURE__ */
|
|
6313
|
+
return /* @__PURE__ */ import_react31.default.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ import_react31.default.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ import_react31.default.createElement("span", null, label));
|
|
5994
6314
|
})
|
|
5995
6315
|
);
|
|
5996
6316
|
}
|
|
5997
6317
|
|
|
5998
6318
|
// src/CompassCoverageCallout.jsx
|
|
5999
|
-
var
|
|
6319
|
+
var import_react32 = __toESM(require("react"));
|
|
6000
6320
|
var TIER_LABELS = {
|
|
6001
6321
|
federal: "federal",
|
|
6002
6322
|
state: "state",
|
|
@@ -6009,7 +6329,7 @@ function CompassCoverageCallout({
|
|
|
6009
6329
|
compassUrl,
|
|
6010
6330
|
onDismiss
|
|
6011
6331
|
}) {
|
|
6012
|
-
const [dismissed, setDismissed] = (0,
|
|
6332
|
+
const [dismissed, setDismissed] = (0, import_react32.useState)(false);
|
|
6013
6333
|
if (dismissed) return null;
|
|
6014
6334
|
const tierLabel = TIER_LABELS[tier] || tier;
|
|
6015
6335
|
const tierStyle = tierColors[tier] || tierColors.federal;
|
|
@@ -6060,15 +6380,15 @@ function CompassCoverageCallout({
|
|
|
6060
6380
|
setDismissed(true);
|
|
6061
6381
|
if (onDismiss) onDismiss();
|
|
6062
6382
|
};
|
|
6063
|
-
return /* @__PURE__ */
|
|
6383
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
|
6064
6384
|
"div",
|
|
6065
6385
|
{
|
|
6066
6386
|
className: "ev-compass-coverage-callout",
|
|
6067
6387
|
role: "status",
|
|
6068
6388
|
style: containerStyle2
|
|
6069
6389
|
},
|
|
6070
|
-
/* @__PURE__ */
|
|
6071
|
-
onDismiss !== void 0 && /* @__PURE__ */
|
|
6390
|
+
/* @__PURE__ */ import_react32.default.createElement("div", { style: textStyle }, /* @__PURE__ */ import_react32.default.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ import_react32.default.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__ */ import_react32.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
|
|
6391
|
+
onDismiss !== void 0 && /* @__PURE__ */ import_react32.default.createElement(
|
|
6072
6392
|
"button",
|
|
6073
6393
|
{
|
|
6074
6394
|
onClick: handleDismiss,
|
|
@@ -6081,7 +6401,7 @@ function CompassCoverageCallout({
|
|
|
6081
6401
|
}
|
|
6082
6402
|
|
|
6083
6403
|
// src/ExpandCompassNudge.jsx
|
|
6084
|
-
var
|
|
6404
|
+
var import_react33 = __toESM(require("react"));
|
|
6085
6405
|
function ExpandCompassNudge({
|
|
6086
6406
|
politicianName,
|
|
6087
6407
|
missingCount,
|
|
@@ -6128,7 +6448,7 @@ function ExpandCompassNudge({
|
|
|
6128
6448
|
};
|
|
6129
6449
|
const topicsLabel = missingCount === 1 ? "topic" : "topics";
|
|
6130
6450
|
const speakerName = politicianName || "This politician";
|
|
6131
|
-
return /* @__PURE__ */
|
|
6451
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ import_react33.default.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ import_react33.default.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__ */ import_react33.default.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
|
|
6132
6452
|
}
|
|
6133
6453
|
|
|
6134
6454
|
// src/computeTierCoverage.js
|
|
@@ -6149,7 +6469,7 @@ function computeTierCoverage(topics) {
|
|
|
6149
6469
|
}
|
|
6150
6470
|
|
|
6151
6471
|
// src/useEvContextPromotion.js
|
|
6152
|
-
var
|
|
6472
|
+
var import_react34 = require("react");
|
|
6153
6473
|
function useEvContextPromotion({
|
|
6154
6474
|
domain,
|
|
6155
6475
|
isLoggedIn,
|
|
@@ -6158,23 +6478,23 @@ function useEvContextPromotion({
|
|
|
6158
6478
|
apiWriter,
|
|
6159
6479
|
enabled = true
|
|
6160
6480
|
}) {
|
|
6161
|
-
const [shouldPrompt, setShouldPrompt] = (0,
|
|
6162
|
-
const [payload, setPayload] = (0,
|
|
6163
|
-
const [status, setStatus] = (0,
|
|
6164
|
-
const [error, setError] = (0,
|
|
6165
|
-
const apiDataRef = (0,
|
|
6481
|
+
const [shouldPrompt, setShouldPrompt] = (0, import_react34.useState)(false);
|
|
6482
|
+
const [payload, setPayload] = (0, import_react34.useState)(null);
|
|
6483
|
+
const [status, setStatus] = (0, import_react34.useState)("idle");
|
|
6484
|
+
const [error, setError] = (0, import_react34.useState)(null);
|
|
6485
|
+
const apiDataRef = (0, import_react34.useRef)(apiData);
|
|
6166
6486
|
apiDataRef.current = apiData;
|
|
6167
|
-
const userIdRef = (0,
|
|
6487
|
+
const userIdRef = (0, import_react34.useRef)(userId);
|
|
6168
6488
|
userIdRef.current = userId;
|
|
6169
|
-
const isLoggedInRef = (0,
|
|
6489
|
+
const isLoggedInRef = (0, import_react34.useRef)(isLoggedIn);
|
|
6170
6490
|
isLoggedInRef.current = isLoggedIn;
|
|
6171
|
-
const enabledRef = (0,
|
|
6491
|
+
const enabledRef = (0, import_react34.useRef)(enabled);
|
|
6172
6492
|
enabledRef.current = enabled;
|
|
6173
|
-
const domainRef = (0,
|
|
6493
|
+
const domainRef = (0, import_react34.useRef)(domain);
|
|
6174
6494
|
domainRef.current = domain;
|
|
6175
|
-
const apiWriterRef = (0,
|
|
6495
|
+
const apiWriterRef = (0, import_react34.useRef)(apiWriter);
|
|
6176
6496
|
apiWriterRef.current = apiWriter;
|
|
6177
|
-
const detect = (0,
|
|
6497
|
+
const detect = (0, import_react34.useCallback)(async () => {
|
|
6178
6498
|
const _enabled = enabledRef.current;
|
|
6179
6499
|
const _isLoggedIn = isLoggedInRef.current;
|
|
6180
6500
|
const _userId = userIdRef.current;
|
|
@@ -6213,16 +6533,16 @@ function useEvContextPromotion({
|
|
|
6213
6533
|
setPayload(null);
|
|
6214
6534
|
}
|
|
6215
6535
|
}, []);
|
|
6216
|
-
(0,
|
|
6536
|
+
(0, import_react34.useEffect)(() => {
|
|
6217
6537
|
detect();
|
|
6218
6538
|
}, [detect, isLoggedIn, userId, apiData, enabled, domain]);
|
|
6219
|
-
(0,
|
|
6539
|
+
(0, import_react34.useEffect)(() => {
|
|
6220
6540
|
const unsub = evContext.subscribe(() => {
|
|
6221
6541
|
detect();
|
|
6222
6542
|
});
|
|
6223
6543
|
return unsub;
|
|
6224
6544
|
}, [detect]);
|
|
6225
|
-
const promote = (0,
|
|
6545
|
+
const promote = (0, import_react34.useCallback)(async () => {
|
|
6226
6546
|
const _userId = userIdRef.current;
|
|
6227
6547
|
const _domain = domainRef.current;
|
|
6228
6548
|
const _writer = apiWriterRef.current;
|
|
@@ -6249,7 +6569,7 @@ function useEvContextPromotion({
|
|
|
6249
6569
|
setError(err instanceof Error ? err : new Error(String(err)));
|
|
6250
6570
|
}
|
|
6251
6571
|
}, [payload]);
|
|
6252
|
-
const dismiss = (0,
|
|
6572
|
+
const dismiss = (0, import_react34.useCallback)(async () => {
|
|
6253
6573
|
const _userId = userIdRef.current;
|
|
6254
6574
|
const _domain = domainRef.current;
|
|
6255
6575
|
if (!_userId) return;
|
|
@@ -6308,14 +6628,14 @@ function isGuestPopulated(domain, fullEvContext) {
|
|
|
6308
6628
|
}
|
|
6309
6629
|
|
|
6310
6630
|
// src/StanceAccordion.jsx
|
|
6311
|
-
var
|
|
6631
|
+
var import_react36 = __toESM(require("react"));
|
|
6312
6632
|
|
|
6313
6633
|
// src/Favicon.jsx
|
|
6314
|
-
var
|
|
6634
|
+
var import_react35 = __toESM(require("react"));
|
|
6315
6635
|
function Favicon({ url, size = 16 }) {
|
|
6316
6636
|
try {
|
|
6317
6637
|
const domain = new URL(url).hostname;
|
|
6318
|
-
return /* @__PURE__ */
|
|
6638
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
6319
6639
|
"img",
|
|
6320
6640
|
{
|
|
6321
6641
|
src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
|
|
@@ -6326,7 +6646,7 @@ function Favicon({ url, size = 16 }) {
|
|
|
6326
6646
|
}
|
|
6327
6647
|
);
|
|
6328
6648
|
} catch {
|
|
6329
|
-
return /* @__PURE__ */
|
|
6649
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
6330
6650
|
"svg",
|
|
6331
6651
|
{
|
|
6332
6652
|
width: size,
|
|
@@ -6337,8 +6657,8 @@ function Favicon({ url, size = 16 }) {
|
|
|
6337
6657
|
strokeWidth: "1.5",
|
|
6338
6658
|
style: { verticalAlign: "middle", flexShrink: 0 }
|
|
6339
6659
|
},
|
|
6340
|
-
/* @__PURE__ */
|
|
6341
|
-
/* @__PURE__ */
|
|
6660
|
+
/* @__PURE__ */ import_react35.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
6661
|
+
/* @__PURE__ */ import_react35.default.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" })
|
|
6342
6662
|
);
|
|
6343
6663
|
}
|
|
6344
6664
|
}
|
|
@@ -6433,11 +6753,11 @@ function StanceAccordion({
|
|
|
6433
6753
|
apiUrl = "https://api.empowered.vote"
|
|
6434
6754
|
}) {
|
|
6435
6755
|
var _a;
|
|
6436
|
-
const [expandedTopicId, setExpandedTopicId] = (0,
|
|
6437
|
-
const [loadingId, setLoadingId] = (0,
|
|
6438
|
-
const [showAll, setShowAll] = (0,
|
|
6439
|
-
const contextCache = (0,
|
|
6440
|
-
const quotesCache = (0,
|
|
6756
|
+
const [expandedTopicId, setExpandedTopicId] = (0, import_react36.useState)(null);
|
|
6757
|
+
const [loadingId, setLoadingId] = (0, import_react36.useState)(null);
|
|
6758
|
+
const [showAll, setShowAll] = (0, import_react36.useState)(false);
|
|
6759
|
+
const contextCache = (0, import_react36.useRef)(/* @__PURE__ */ new Map());
|
|
6760
|
+
const quotesCache = (0, import_react36.useRef)(null);
|
|
6441
6761
|
const c = palette(darkMode);
|
|
6442
6762
|
const polAnswerMap = {};
|
|
6443
6763
|
if (polAnswers) {
|
|
@@ -6497,7 +6817,7 @@ function StanceAccordion({
|
|
|
6497
6817
|
quotesCache.current = [];
|
|
6498
6818
|
}
|
|
6499
6819
|
}
|
|
6500
|
-
const handleToggle = (0,
|
|
6820
|
+
const handleToggle = (0, import_react36.useCallback)(
|
|
6501
6821
|
async (topicId) => {
|
|
6502
6822
|
if (expandedTopicId === topicId) {
|
|
6503
6823
|
setExpandedTopicId(null);
|
|
@@ -6514,7 +6834,7 @@ function StanceAccordion({
|
|
|
6514
6834
|
},
|
|
6515
6835
|
[expandedTopicId, politicianId, apiUrl]
|
|
6516
6836
|
);
|
|
6517
|
-
(0,
|
|
6837
|
+
(0, import_react36.useEffect)(() => {
|
|
6518
6838
|
if (initialExpandedTopicId && topics && topics.length > 0) {
|
|
6519
6839
|
handleToggle(String(initialExpandedTopicId));
|
|
6520
6840
|
}
|
|
@@ -6537,13 +6857,13 @@ function StanceAccordion({
|
|
|
6537
6857
|
textTransform: "uppercase",
|
|
6538
6858
|
letterSpacing: "0.06em"
|
|
6539
6859
|
};
|
|
6540
|
-
return /* @__PURE__ */
|
|
6860
|
+
return /* @__PURE__ */ import_react36.default.createElement(
|
|
6541
6861
|
"div",
|
|
6542
6862
|
{
|
|
6543
6863
|
className: "ev-stance-panel flex flex-col",
|
|
6544
6864
|
style: { fontFamily: "'Manrope', sans-serif" }
|
|
6545
6865
|
},
|
|
6546
|
-
/* @__PURE__ */
|
|
6866
|
+
/* @__PURE__ */ import_react36.default.createElement("h3", { style: { ...sectionLabelStyle, marginBottom: "8px" } }, "Stance Breakdown"),
|
|
6547
6867
|
visibleTopics.map((topic) => {
|
|
6548
6868
|
const topicId = String(topic.id);
|
|
6549
6869
|
const polValue = polAnswerMap[topicId];
|
|
@@ -6562,13 +6882,13 @@ function StanceAccordion({
|
|
|
6562
6882
|
if (topic.topic_key) return q.issue === topic.topic_key;
|
|
6563
6883
|
return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
|
|
6564
6884
|
}) : [];
|
|
6565
|
-
return /* @__PURE__ */
|
|
6885
|
+
return /* @__PURE__ */ import_react36.default.createElement(
|
|
6566
6886
|
"div",
|
|
6567
6887
|
{
|
|
6568
6888
|
key: topicId,
|
|
6569
6889
|
style: { borderBottom: `1px solid ${c.rowBorder}` }
|
|
6570
6890
|
},
|
|
6571
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
6572
6892
|
"button",
|
|
6573
6893
|
{
|
|
6574
6894
|
type: "button",
|
|
@@ -6588,7 +6908,7 @@ function StanceAccordion({
|
|
|
6588
6908
|
e.currentTarget.style.background = "transparent";
|
|
6589
6909
|
}
|
|
6590
6910
|
},
|
|
6591
|
-
/* @__PURE__ */
|
|
6911
|
+
/* @__PURE__ */ import_react36.default.createElement("div", { className: "flex flex-col min-w-0", style: { gap: "5px" } }, /* @__PURE__ */ import_react36.default.createElement(
|
|
6592
6912
|
"span",
|
|
6593
6913
|
{
|
|
6594
6914
|
style: {
|
|
@@ -6599,7 +6919,7 @@ function StanceAccordion({
|
|
|
6599
6919
|
}
|
|
6600
6920
|
},
|
|
6601
6921
|
titleText
|
|
6602
|
-
), /* @__PURE__ */
|
|
6922
|
+
), /* @__PURE__ */ import_react36.default.createElement("span", { style: { display: "flex", alignItems: "flex-start", gap: "8px" } }, /* @__PURE__ */ import_react36.default.createElement(
|
|
6603
6923
|
"span",
|
|
6604
6924
|
{
|
|
6605
6925
|
style: {
|
|
@@ -6611,7 +6931,7 @@ function StanceAccordion({
|
|
|
6611
6931
|
marginTop: "6px"
|
|
6612
6932
|
}
|
|
6613
6933
|
}
|
|
6614
|
-
), /* @__PURE__ */
|
|
6934
|
+
), /* @__PURE__ */ import_react36.default.createElement(
|
|
6615
6935
|
"span",
|
|
6616
6936
|
{
|
|
6617
6937
|
style: {
|
|
@@ -6622,7 +6942,7 @@ function StanceAccordion({
|
|
|
6622
6942
|
},
|
|
6623
6943
|
label
|
|
6624
6944
|
))),
|
|
6625
|
-
/* @__PURE__ */
|
|
6945
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
6626
6946
|
"svg",
|
|
6627
6947
|
{
|
|
6628
6948
|
width: "16",
|
|
@@ -6640,10 +6960,10 @@ function StanceAccordion({
|
|
|
6640
6960
|
transition: "transform 0.2s ease"
|
|
6641
6961
|
}
|
|
6642
6962
|
},
|
|
6643
|
-
/* @__PURE__ */
|
|
6963
|
+
/* @__PURE__ */ import_react36.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
6644
6964
|
)
|
|
6645
6965
|
),
|
|
6646
|
-
/* @__PURE__ */
|
|
6966
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
6647
6967
|
"div",
|
|
6648
6968
|
{
|
|
6649
6969
|
style: {
|
|
@@ -6652,7 +6972,7 @@ function StanceAccordion({
|
|
|
6652
6972
|
transition: "grid-template-rows 0.25s ease"
|
|
6653
6973
|
}
|
|
6654
6974
|
},
|
|
6655
|
-
/* @__PURE__ */
|
|
6975
|
+
/* @__PURE__ */ import_react36.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react36.default.createElement("div", { style: { padding: "4px 8px 16px" } }, stances.length > 0 && /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, (userValue > 0 || polValue > 0) && /* @__PURE__ */ import_react36.default.createElement(
|
|
6656
6976
|
"div",
|
|
6657
6977
|
{
|
|
6658
6978
|
style: {
|
|
@@ -6664,14 +6984,14 @@ function StanceAccordion({
|
|
|
6664
6984
|
color: c.sourceText
|
|
6665
6985
|
}
|
|
6666
6986
|
},
|
|
6667
|
-
userValue > 0 && /* @__PURE__ */
|
|
6668
|
-
/* @__PURE__ */
|
|
6669
|
-
), /* @__PURE__ */
|
|
6987
|
+
userValue > 0 && /* @__PURE__ */ import_react36.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" } }, /* @__PURE__ */ import_react36.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: USER_DOT } }), "You"),
|
|
6988
|
+
/* @__PURE__ */ import_react36.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" } }, /* @__PURE__ */ import_react36.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: c.polDot } }), "Their stance")
|
|
6989
|
+
), /* @__PURE__ */ import_react36.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "6px", marginBottom: "14px" } }, stances.map((stance, i) => {
|
|
6670
6990
|
const stanceNum = i + 1;
|
|
6671
6991
|
const isUser = userValue === stanceNum;
|
|
6672
6992
|
const isPol = polValue === stanceNum;
|
|
6673
6993
|
const isActive = isUser || isPol;
|
|
6674
|
-
return /* @__PURE__ */
|
|
6994
|
+
return /* @__PURE__ */ import_react36.default.createElement(
|
|
6675
6995
|
"div",
|
|
6676
6996
|
{
|
|
6677
6997
|
key: i,
|
|
@@ -6687,7 +7007,7 @@ function StanceAccordion({
|
|
|
6687
7007
|
backgroundColor: isActive ? c.pillActiveBg : "transparent"
|
|
6688
7008
|
}
|
|
6689
7009
|
},
|
|
6690
|
-
/* @__PURE__ */
|
|
7010
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
6691
7011
|
"span",
|
|
6692
7012
|
{
|
|
6693
7013
|
style: {
|
|
@@ -6699,10 +7019,10 @@ function StanceAccordion({
|
|
|
6699
7019
|
paddingTop: "3px"
|
|
6700
7020
|
}
|
|
6701
7021
|
},
|
|
6702
|
-
isUser && /* @__PURE__ */
|
|
6703
|
-
isPol && /* @__PURE__ */
|
|
7022
|
+
isUser && /* @__PURE__ */ import_react36.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: USER_DOT, boxShadow: `0 0 0 3px ${USER_DOT}33` } }),
|
|
7023
|
+
isPol && /* @__PURE__ */ import_react36.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: c.polDot, boxShadow: `0 0 0 3px ${c.polDot}33` } })
|
|
6704
7024
|
),
|
|
6705
|
-
/* @__PURE__ */
|
|
7025
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
6706
7026
|
"span",
|
|
6707
7027
|
{
|
|
6708
7028
|
style: {
|
|
@@ -6714,7 +7034,7 @@ function StanceAccordion({
|
|
|
6714
7034
|
stance.text
|
|
6715
7035
|
)
|
|
6716
7036
|
);
|
|
6717
|
-
}))), isLoading && /* @__PURE__ */
|
|
7037
|
+
}))), isLoading && /* @__PURE__ */ import_react36.default.createElement("div", { className: "flex items-center", style: { padding: "12px 0" } }, /* @__PURE__ */ import_react36.default.createElement(
|
|
6718
7038
|
"div",
|
|
6719
7039
|
{
|
|
6720
7040
|
style: {
|
|
@@ -6726,7 +7046,7 @@ function StanceAccordion({
|
|
|
6726
7046
|
animation: "ev-spin 0.8s linear infinite"
|
|
6727
7047
|
}
|
|
6728
7048
|
}
|
|
6729
|
-
)), !isLoading && cached && /* @__PURE__ */
|
|
7049
|
+
)), !isLoading && cached && /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react36.default.createElement(
|
|
6730
7050
|
"p",
|
|
6731
7051
|
{
|
|
6732
7052
|
style: {
|
|
@@ -6738,7 +7058,7 @@ function StanceAccordion({
|
|
|
6738
7058
|
}
|
|
6739
7059
|
},
|
|
6740
7060
|
cached.reasoning
|
|
6741
|
-
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */
|
|
7061
|
+
) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react36.default.createElement("div", { style: { marginTop: "8px" } }, /* @__PURE__ */ import_react36.default.createElement("p", { style: { ...sectionLabelStyle, marginBottom: "6px" } }, "References"), /* @__PURE__ */ import_react36.default.createElement("ol", { style: { listStyle: "decimal", listStylePosition: "inside", display: "flex", flexDirection: "column", gap: "4px" } }, cached.sources.map((src, i) => /* @__PURE__ */ import_react36.default.createElement("li", { key: i, style: { fontSize: "12px", color: c.sourceText } }, /* @__PURE__ */ import_react36.default.createElement(
|
|
6742
7062
|
"a",
|
|
6743
7063
|
{
|
|
6744
7064
|
href: src,
|
|
@@ -6747,13 +7067,13 @@ function StanceAccordion({
|
|
|
6747
7067
|
className: "inline-flex items-center gap-1.5",
|
|
6748
7068
|
style: { color: c.link }
|
|
6749
7069
|
},
|
|
6750
|
-
/* @__PURE__ */
|
|
6751
|
-
/* @__PURE__ */
|
|
6752
|
-
))))), topicQuotes.length > 0 && /* @__PURE__ */
|
|
7070
|
+
/* @__PURE__ */ import_react36.default.createElement(Favicon, { url: src }),
|
|
7071
|
+
/* @__PURE__ */ import_react36.default.createElement("span", { style: { textDecoration: "underline", textUnderlineOffset: "2px" } }, getDisplayUrl(src))
|
|
7072
|
+
))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react36.default.createElement("div", { style: { marginTop: "14px" } }, /* @__PURE__ */ import_react36.default.createElement("p", { style: { ...sectionLabelStyle, marginBottom: "8px" } }, "Quotes"), topicQuotes.map((quote) => {
|
|
6753
7073
|
const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
|
|
6754
7074
|
const borderColor = verdict === "agreed" ? c.agreedText : verdict === "disagreed" ? c.disagreedText : c.quoteBorder;
|
|
6755
7075
|
const sourceName = quote.source_name || quote.sourceName;
|
|
6756
|
-
return /* @__PURE__ */
|
|
7076
|
+
return /* @__PURE__ */ import_react36.default.createElement(
|
|
6757
7077
|
"div",
|
|
6758
7078
|
{
|
|
6759
7079
|
key: quote.id,
|
|
@@ -6765,7 +7085,7 @@ function StanceAccordion({
|
|
|
6765
7085
|
marginBottom: "8px"
|
|
6766
7086
|
}
|
|
6767
7087
|
},
|
|
6768
|
-
/* @__PURE__ */
|
|
7088
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
6769
7089
|
"p",
|
|
6770
7090
|
{
|
|
6771
7091
|
style: {
|
|
@@ -6778,7 +7098,7 @@ function StanceAccordion({
|
|
|
6778
7098
|
},
|
|
6779
7099
|
quote.text
|
|
6780
7100
|
),
|
|
6781
|
-
verdict === "agreed" && /* @__PURE__ */
|
|
7101
|
+
verdict === "agreed" && /* @__PURE__ */ import_react36.default.createElement(
|
|
6782
7102
|
"span",
|
|
6783
7103
|
{
|
|
6784
7104
|
style: {
|
|
@@ -6795,10 +7115,10 @@ function StanceAccordion({
|
|
|
6795
7115
|
flexShrink: 0
|
|
6796
7116
|
}
|
|
6797
7117
|
},
|
|
6798
|
-
/* @__PURE__ */
|
|
7118
|
+
/* @__PURE__ */ import_react36.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react36.default.createElement("path", { d: "M5 13l4 4L19 7" })),
|
|
6799
7119
|
"Agreed"
|
|
6800
7120
|
),
|
|
6801
|
-
verdict === "disagreed" && /* @__PURE__ */
|
|
7121
|
+
verdict === "disagreed" && /* @__PURE__ */ import_react36.default.createElement(
|
|
6802
7122
|
"span",
|
|
6803
7123
|
{
|
|
6804
7124
|
style: {
|
|
@@ -6815,10 +7135,10 @@ function StanceAccordion({
|
|
|
6815
7135
|
flexShrink: 0
|
|
6816
7136
|
}
|
|
6817
7137
|
},
|
|
6818
|
-
/* @__PURE__ */
|
|
7138
|
+
/* @__PURE__ */ import_react36.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react36.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
|
|
6819
7139
|
"Disagreed"
|
|
6820
7140
|
),
|
|
6821
|
-
sourceName && /* @__PURE__ */
|
|
7141
|
+
sourceName && /* @__PURE__ */ import_react36.default.createElement(
|
|
6822
7142
|
"a",
|
|
6823
7143
|
{
|
|
6824
7144
|
href: quote.source_url || quote.sourceUrl,
|
|
@@ -6835,11 +7155,11 @@ function StanceAccordion({
|
|
|
6835
7155
|
sourceName
|
|
6836
7156
|
)
|
|
6837
7157
|
);
|
|
6838
|
-
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */
|
|
7158
|
+
})), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react36.default.createElement("p", { style: { fontSize: "14px", color: c.emptyText, fontStyle: "italic", padding: "8px 0" } }, "No detailed reasoning available for this topic."))))
|
|
6839
7159
|
)
|
|
6840
7160
|
);
|
|
6841
7161
|
}),
|
|
6842
|
-
hasToggle && /* @__PURE__ */
|
|
7162
|
+
hasToggle && /* @__PURE__ */ import_react36.default.createElement(
|
|
6843
7163
|
"button",
|
|
6844
7164
|
{
|
|
6845
7165
|
type: "button",
|
|
@@ -6878,6 +7198,7 @@ function StanceAccordion({
|
|
|
6878
7198
|
PoliticianCard,
|
|
6879
7199
|
PoliticianProfile,
|
|
6880
7200
|
RadarChartCore,
|
|
7201
|
+
SiteFooter,
|
|
6881
7202
|
SiteHeader,
|
|
6882
7203
|
SocialLinks,
|
|
6883
7204
|
StanceAccordion,
|