@wral/hsot-data 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,47 +1,47 @@
1
- import { LitElement as ee, html as i, css as b, nothing as p, svg as Q } from "lit";
2
- const ne = 50;
3
- function le(a = {}) {
1
+ import { LitElement as ee, html as r, css as b, nothing as p, svg as Q } from "lit";
2
+ const le = 50;
3
+ function ce(a = {}) {
4
4
  const e = Object.entries(a).filter(([, s]) => s != null && s !== "");
5
5
  if (!e.length) return "";
6
6
  const t = new URLSearchParams();
7
- return e.forEach(([s, r]) => t.set(s, String(r))), `?${t.toString()}`;
7
+ return e.forEach(([s, o]) => t.set(s, String(o))), `?${t.toString()}`;
8
8
  }
9
- function ce({ baseUrl: a, token: e = "", fetchFn: t } = {}) {
9
+ function de({ baseUrl: a, token: e = "", fetchFn: t } = {}) {
10
10
  if (!a) throw new Error("createClient requires a baseUrl");
11
- const s = a.replace(/\/+$/, ""), r = t || ((...n) => fetch(...n));
12
- async function o(n) {
11
+ const s = a.replace(/\/+$/, ""), o = t || ((...n) => fetch(...n));
12
+ async function i(n) {
13
13
  const h = { Accept: "application/json" };
14
14
  e && (h.Authorization = `Bearer ${e}`);
15
- const c = await r(`${s}${n}`, { headers: h });
16
- if (!c.ok) {
17
- const d = new Error(`api-hsot ${c.status} on ${n}`);
18
- throw d.status = c.status, d;
15
+ const l = await o(`${s}${n}`, { headers: h });
16
+ if (!l.ok) {
17
+ const c = new Error(`api-hsot ${l.status} on ${n}`);
18
+ throw c.status = l.status, c;
19
19
  }
20
- return c.json();
21
- }
22
- async function l(n, h = {}) {
23
- const c = [];
24
- let d = null;
25
- for (let m = 0; m < ne; m += 1) {
26
- const f = le(d ? { ...h, cursor: d } : h), g = await o(`${n}${f}`);
27
- if (c.push(...g.items || []), d = g.nextCursor || null, !d) break;
20
+ return l.json();
21
+ }
22
+ async function d(n, h = {}) {
23
+ const l = [];
24
+ let c = null;
25
+ for (let m = 0; m < le; m += 1) {
26
+ const f = ce(c ? { ...h, cursor: c } : h), g = await i(`${n}${f}`);
27
+ if (l.push(...g.items || []), c = g.nextCursor || null, !c) break;
28
28
  }
29
- return { items: c, total: c.length, nextCursor: null };
29
+ return { items: l, total: l.length, nextCursor: null };
30
30
  }
31
31
  return {
32
- listSchools: (n) => l("/schools", n),
33
- getSchool: (n) => o(`/schools/${n}`),
34
- listTeams: (n) => l("/teams", n),
35
- getTeam: (n) => o(`/teams/${n}`),
36
- listConferences: (n) => l("/conferences", n),
37
- listPlayers: (n) => l("/players", n),
38
- listRosters: (n) => l("/rosters", n),
39
- listGames: (n) => l("/games", n),
40
- getGame: (n) => o(`/games/${n}`),
41
- listTournaments: (n) => l("/tournaments", n),
42
- listSeedings: (n, h) => l(`/tournaments/${n}/seedings`, h),
43
- listRankings: (n) => l("/rankings", n),
44
- listSports: () => o("/sports")
32
+ listSchools: (n) => d("/schools", n),
33
+ getSchool: (n) => i(`/schools/${n}`),
34
+ listTeams: (n) => d("/teams", n),
35
+ getTeam: (n) => i(`/teams/${n}`),
36
+ listConferences: (n) => d("/conferences", n),
37
+ listPlayers: (n) => d("/players", n),
38
+ listRosters: (n) => d("/rosters", n),
39
+ listGames: (n) => d("/games", n),
40
+ getGame: (n) => i(`/games/${n}`),
41
+ listTournaments: (n) => d("/tournaments", n),
42
+ listSeedings: (n, h) => d(`/tournaments/${n}/seedings`, h),
43
+ listRankings: (n) => d("/rankings", n),
44
+ listSports: () => i("/sports")
45
45
  };
46
46
  }
47
47
  const H = {
@@ -62,8 +62,8 @@ function D(a) {
62
62
  const I = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
63
63
  function y(a, e) {
64
64
  if (!a) return "TBD";
65
- const [t, s, r] = String(a).split("-").map(Number);
66
- return !t || !s || !r ? "TBD" : new Date(t, s - 1, r).toLocaleDateString("en-US", e || { weekday: "short", month: "short", day: "numeric" });
65
+ const [t, s, o] = String(a).split("-").map(Number);
66
+ return !t || !s || !o ? "TBD" : new Date(t, s - 1, o).toLocaleDateString("en-US", e || { weekday: "short", month: "short", day: "numeric" });
67
67
  }
68
68
  function U(a) {
69
69
  if (!a) return "";
@@ -72,7 +72,7 @@ function U(a) {
72
72
  const s = e >= 12 ? "PM" : "AM";
73
73
  return `${(e + 11) % 12 + 1}:${String(t || 0).padStart(2, "0")} ${s}`;
74
74
  }
75
- function de(a) {
75
+ function he(a) {
76
76
  return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
77
77
  }
78
78
  function N(a = /* @__PURE__ */ new Date()) {
@@ -83,10 +83,10 @@ function M(a = /* @__PURE__ */ new Date()) {
83
83
  const e = (t) => String(t).padStart(2, "0");
84
84
  return `${a.getFullYear()}-${e(a.getMonth() + 1)}-${e(a.getDate())}`;
85
85
  }
86
- function he(a, e = M()) {
86
+ function me(a, e = M()) {
87
87
  const t = [...new Set((a || []).filter(Boolean))].sort();
88
88
  if (!t.length || t.includes(e)) return e;
89
- const s = t.filter((r) => r < e);
89
+ const s = t.filter((o) => o < e);
90
90
  return s.length ? s[s.length - 1] : t[0];
91
91
  }
92
92
  function j(a) {
@@ -94,10 +94,10 @@ function j(a) {
94
94
  }
95
95
  function E(a) {
96
96
  if (!a || !/^#[0-9a-fA-F]{6}$/.test(a)) return "#FFFFFF";
97
- const e = parseInt(a.slice(1), 16), t = e >> 16 & 255, s = e >> 8 & 255, r = e & 255;
98
- return 0.299 * t + 0.587 * s + 0.114 * r > 150 ? "#0F1B33" : "#FFFFFF";
97
+ const e = parseInt(a.slice(1), 16), t = e >> 16 & 255, s = e >> 8 & 255, o = e & 255;
98
+ return 0.299 * t + 0.587 * s + 0.114 * o > 150 ? "#0F1B33" : "#FFFFFF";
99
99
  }
100
- const me = (a) => {
100
+ const pe = (a) => {
101
101
  const e = ["th", "st", "nd", "rd"], t = a % 100;
102
102
  return a + (e[(t - 20) % 10] || e[t] || e[0]);
103
103
  };
@@ -109,14 +109,14 @@ function te(a) {
109
109
  }
110
110
  return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${y(a.date, { month: "short", day: "numeric" })} · ${U(a.time)}`.replace(/ · $/, "") };
111
111
  }
112
- const pe = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
112
+ const fe = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
113
113
  function x(a) {
114
114
  let e = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
115
115
  const t = e.indexOf("#");
116
116
  let s = "";
117
117
  t !== -1 && (s = e.slice(t).split("?")[0], e = e.slice(0, t));
118
- let r = e.split("?")[0] + s;
119
- return r = r.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), r = r.replace(/^\/(?=#)/, ""), r.length > 1 && (r = r.replace(/\/+$/, "")), r.toLowerCase();
118
+ let o = e.split("?")[0] + s;
119
+ return o = o.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), o = o.replace(/^\/(?=#)/, ""), o.length > 1 && (o = o.replace(/\/+$/, "")), o.toLowerCase();
120
120
  }
121
121
  function se() {
122
122
  const a = globalThis.location;
@@ -124,20 +124,20 @@ function se() {
124
124
  const e = (a.hash || "").startsWith("#/") ? a.hash : "";
125
125
  return x((a.pathname || "") + e);
126
126
  }
127
- function fe(a, e, t) {
127
+ function ue(a, e, t) {
128
128
  if (!t) return null;
129
129
  const s = x(a);
130
130
  if (!s) return null;
131
- const r = x(u(e.game, { sport: t, id: "" })), o = x(u(e.school, { id: "" }));
132
- if (s === r || s.startsWith(`${r}/`) || s === o || s.startsWith(`${o}/`)) return null;
133
- const l = x(u(e.section, { sport: t, view: "" }));
134
- if (s === l) return "";
135
- if (!s.startsWith(`${l}/`)) return null;
136
- const n = s.slice(l.length + 1), h = n.split("/");
137
- return h.length > 2 || h.some((c) => !/^[a-z][a-z-]*$/.test(c)) || pe.has(h[0]) ? null : n;
131
+ const o = x(u(e.game, { sport: t, id: "" })), i = x(u(e.school, { id: "" }));
132
+ if (s === o || s.startsWith(`${o}/`) || s === i || s.startsWith(`${i}/`)) return null;
133
+ const d = x(u(e.section, { sport: t, view: "" }));
134
+ if (s === d) return "";
135
+ if (!s.startsWith(`${d}/`)) return null;
136
+ const n = s.slice(d.length + 1), h = n.split("/");
137
+ return h.length > 2 || h.some((l) => !/^[a-z][a-z-]*$/.test(l)) || fe.has(h[0]) ? null : n;
138
138
  }
139
- function ue(a, e, t) {
140
- const s = (l) => u(t.section, { sport: a, view: l }).replace(/([^:])\/{2,}/g, "$1/"), o = new Set((e || []).map((l) => l && l.gender).filter((l) => l === "boys" || l === "girls")).size === 2 ? [
139
+ function ge(a, e, t) {
140
+ const s = (d) => u(t.section, { sport: a, view: d }).replace(/([^:])\/{2,}/g, "$1/"), i = new Set((e || []).map((d) => d && d.gender).filter((d) => d === "boys" || d === "girls")).size === 2 ? [
141
141
  { label: "Boys Standings", href: s("boys/standings") },
142
142
  { label: "Girls Standings", href: s("girls/standings") }
143
143
  ] : [{ label: "Standings", href: s("standings") }];
@@ -145,11 +145,11 @@ function ue(a, e, t) {
145
145
  { label: `${I(a)} Home`, href: s("") },
146
146
  { label: "Scores/Schedule", href: s("scores") },
147
147
  { label: "Playoff Brackets", href: s("brackets") },
148
- ...o,
148
+ ...i,
149
149
  { label: "Polls & Rankings", href: s("rankings") }
150
150
  ];
151
151
  }
152
- function ge(a, e = se()) {
152
+ function ve(a, e = se()) {
153
153
  const t = x(e);
154
154
  for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
155
155
  t && x(s.getAttribute("href")) === t ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
@@ -173,7 +173,7 @@ class $ extends ee {
173
173
  this._client = e, this.isConnected && this.load();
174
174
  }
175
175
  get client() {
176
- return this._client ? this._client : this.api ? ce({ baseUrl: this.api }) : null;
176
+ return this._client ? this._client : this.api ? de({ baseUrl: this.api }) : null;
177
177
  }
178
178
  connectedCallback() {
179
179
  super.connectedCallback(), this._setupInterval();
@@ -185,7 +185,7 @@ class $ extends ee {
185
185
  this.load();
186
186
  }
187
187
  updated(e) {
188
- e.has("api") && e.get("api") !== void 0 && e.get("api") !== this.api && this.load(), e.has("refreshInterval") && this._setupInterval(), ge(this);
188
+ e.has("api") && e.get("api") !== void 0 && e.get("api") !== this.api && this.load(), e.has("refreshInterval") && this._setupInterval(), ve(this);
189
189
  }
190
190
  async load() {
191
191
  const e = this.client;
@@ -214,13 +214,13 @@ class $ extends ee {
214
214
  this._refreshId && (clearInterval(this._refreshId), this._refreshId = null);
215
215
  }
216
216
  render() {
217
- return this.error === "not-configured" ? i`<div class="error">This component needs an <code>api</code> attribute (the api-hsot public read-surface base URL) or an injected client.</div>` : this.error ? i`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : i`<div class="loading" role="status">Loading…</div>`;
217
+ return this.error === "not-configured" ? r`<div class="error">This component needs an <code>api</code> attribute (the api-hsot public read-surface base URL) or an injected client.</div>` : this.error ? r`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : r`<div class="loading" role="status">Loading…</div>`;
218
218
  }
219
219
  renderView() {
220
- return i``;
220
+ return r``;
221
221
  }
222
222
  }
223
- const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
223
+ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), be = b`
224
224
  :host {
225
225
  --hsot-red: var(--color-red, #D1232A);
226
226
  --hsot-red-deep: var(--color-red-dark, #951C21);
@@ -258,7 +258,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
258
258
  outline-offset: 1px;
259
259
  }
260
260
  .mut { color: var(--hsot-gray-5); }
261
- `, be = b`
261
+ `, ye = b`
262
262
  .band { background: var(--hsot-white); color: var(--hsot-black); }
263
263
  .band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
264
264
  .band h1, .band h2.bandtitle {
@@ -307,7 +307,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
307
307
  @media (max-width: 720px) {
308
308
  .band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
309
309
  }
310
- `, ye = b`
310
+ `, $e = b`
311
311
  .view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
312
312
  /* Optional right rail (slot="rail" light-DOM children): a divided 300px
313
313
  column on desktop, stacked under the view content on smaller screens. */
@@ -371,7 +371,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
371
371
  .error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
372
372
  .note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
373
373
  .loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
374
- `, $e = b`
374
+ `, we = b`
375
375
  .pill {
376
376
  display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
377
377
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
@@ -386,7 +386,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
386
386
  .pill.champ { background: var(--hsot-straw); color: #6b5900; }
387
387
  @keyframes hsot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
388
388
  @media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } }
389
- `, we = b`
389
+ `, xe = b`
390
390
  .tablewrap { overflow-x: auto; }
391
391
  table.data { font-family: var(--hsot-heading-font); font-size: 14px; border-collapse: collapse; width: 100%; }
392
392
  table.data th {
@@ -404,7 +404,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
404
404
  table.data tbody tr.rowlink:hover { background: var(--hsot-gray-1); }
405
405
  table.data td.teamcell a { color: inherit; text-decoration: none; font-weight: 500; }
406
406
  table.data td.teamcell a:hover { text-decoration: underline; }
407
- `, xe = b`
407
+ `, ke = b`
408
408
  .swatch {
409
409
  display: inline-flex; align-items: center; justify-content: center;
410
410
  width: 26px; height: 26px; border-radius: 50%;
@@ -428,7 +428,7 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
428
428
  .dot.W { background: var(--hsot-win); }
429
429
  .dot.L { background: var(--hsot-loss); }
430
430
  .dot.T { background: var(--hsot-tie); }
431
- `, ke = b`
431
+ `, Te = b`
432
432
  ul.gamelist { list-style: none; margin: 0; padding: 0; }
433
433
  .gamelist li {
434
434
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
@@ -478,24 +478,24 @@ const v = (a) => Object.fromEntries((a || []).map((e) => [e.id, e])), ve = b`
478
478
  .gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
479
479
  .gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
480
480
  .gamelist a.box { font-size: 0.78rem; }
481
- `, F = [ve, be, ye, $e, we, xe, ke];
481
+ `, F = [be, ye, $e, we, xe, ke, Te];
482
482
  function G(a) {
483
483
  return a.state !== "final" ? null : a.forfeit && a.forfeit !== "none" ? a.forfeit : a.homeScore > a.awayScore ? "home" : a.awayScore > a.homeScore ? "away" : a.tiebreakWinner && a.tiebreakWinner !== "none" ? a.tiebreakWinner : "tie";
484
484
  }
485
- function Te(a) {
485
+ function Ie(a) {
486
486
  return !a || !a.forfeit || a.forfeit === "none" ? null : a.forfeit === "home" ? "away" : a.forfeit === "away" ? "home" : null;
487
487
  }
488
488
  function z(a, e) {
489
- const t = {}, s = (o) => (t[o] = t[o] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, t[o]), r = a.filter((o) => o.state === "final" && o.gameType !== "scrimmage" && (!e || o.date <= e)).sort((o, l) => String(o.date).localeCompare(String(l.date)));
490
- for (const o of r) {
491
- const l = G(o), n = o.gameType === "conference";
489
+ const t = {}, s = (i) => (t[i] = t[i] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, t[i]), o = a.filter((i) => i.state === "final" && i.gameType !== "scrimmage" && (!e || i.date <= e)).sort((i, d) => String(i.date).localeCompare(String(d.date)));
490
+ for (const i of o) {
491
+ const d = G(i), n = i.gameType === "conference";
492
492
  for (const h of ["home", "away"]) {
493
- const c = h === "home" ? o.homeTeamId : o.awayTeamId;
494
- if (!c) continue;
495
- const d = s(c), m = h === "home" ? o.homeScore : o.awayScore, f = h === "home" ? o.awayScore : o.homeScore;
496
- d.pf += m, d.pa += f;
493
+ const l = h === "home" ? i.homeTeamId : i.awayTeamId;
494
+ if (!l) continue;
495
+ const c = s(l), m = h === "home" ? i.homeScore : i.awayScore, f = h === "home" ? i.awayScore : i.homeScore;
496
+ c.pf += m, c.pa += f;
497
497
  let g = "T";
498
- l === "tie" ? (d.t += 1, n && (d.ct += 1)) : l === h ? (d.w += 1, n && (d.cw += 1), g = "W") : (d.l += 1, n && (d.cl += 1), g = "L"), d.results.push({ gameId: o.id, date: o.date, mark: g, my: m, their: f, opp: h === "home" ? o.awayTeamId : o.homeTeamId, conf: n });
498
+ d === "tie" ? (c.t += 1, n && (c.ct += 1)) : d === h ? (c.w += 1, n && (c.cw += 1), g = "W") : (c.l += 1, n && (c.cl += 1), g = "L"), c.results.push({ gameId: i.id, date: i.date, mark: g, my: m, their: f, opp: h === "home" ? i.awayTeamId : i.homeTeamId, conf: n });
499
499
  }
500
500
  }
501
501
  return t;
@@ -513,8 +513,8 @@ const X = (a, e, t) => {
513
513
  }, Z = (a) => a.toFixed(3).replace("0.", ".");
514
514
  function w(a, e = !1) {
515
515
  if (!a) return "0-0";
516
- const t = e ? a.cw : a.w, s = e ? a.cl : a.l, r = e ? a.ct : a.t;
517
- return `${t}-${s}${r ? `-${r}` : ""}`;
516
+ const t = e ? a.cw : a.w, s = e ? a.cl : a.l, o = e ? a.ct : a.t;
517
+ return `${t}-${s}${o ? `-${o}` : ""}`;
518
518
  }
519
519
  function ae(a, e) {
520
520
  return a.map((t) => {
@@ -529,61 +529,69 @@ function J(a, e) {
529
529
  const t = a[e];
530
530
  return t && t.results.length ? t.results[t.results.length - 1] : null;
531
531
  }
532
- function je(a, e, t, s = "") {
533
- let r = null;
534
- for (const o of a || [])
535
- o.sport === e && (t && o.effectiveDate > t || s && o.gender && o.gender !== s || (!r || o.effectiveDate > r.effectiveDate) && (r = o));
536
- return r;
532
+ function qe(a, e, t, s = "") {
533
+ let o = null;
534
+ for (const i of a || [])
535
+ i.sport === e && (t && i.effectiveDate > t || s && i.gender && i.gender !== s || (!o || i.effectiveDate > o.effectiveDate) && (o = i));
536
+ return o;
537
537
  }
538
- function W(a, e, t, s, r) {
539
- const o = e[t];
540
- if (!o) return null;
541
- const l = /* @__PURE__ */ new Map();
538
+ function W(a, e, t, s, o) {
539
+ const i = e[t];
540
+ if (!i) return null;
541
+ const d = /* @__PURE__ */ new Map();
542
542
  for (const h of a || []) {
543
- if (h.sport !== s || r && h.effectiveDate > r || h.gender && o.gender !== h.gender && o.gender !== "coed") continue;
544
- const c = h.gender || "", d = l.get(c);
545
- (!d || h.effectiveDate > d.effectiveDate) && l.set(c, h);
543
+ if (h.sport !== s || o && h.effectiveDate > o || h.gender && i.gender !== h.gender && i.gender !== "coed") continue;
544
+ const l = h.gender || "", c = d.get(l);
545
+ (!c || h.effectiveDate > c.effectiveDate) && d.set(l, h);
546
546
  }
547
547
  let n = null;
548
- for (const h of l.values()) {
549
- const c = (h.teamIds || []).indexOf(t);
550
- c !== -1 && (!n || h.effectiveDate > n.effectiveDate) && (n = { poll: h, rank: c + 1 });
548
+ for (const h of d.values()) {
549
+ const l = (h.teamIds || []).indexOf(t);
550
+ l !== -1 && (!n || h.effectiveDate > n.effectiveDate) && (n = { poll: h, rank: l + 1 });
551
551
  }
552
552
  return n ? n.rank : null;
553
553
  }
554
- function Ie(a, e, t) {
554
+ function Se(a, e, t) {
555
555
  if (!a) return { kind: "none", delta: 0 };
556
556
  const s = (a.teamIds || []).indexOf(t) + 1;
557
557
  if (!s) return { kind: "none", delta: 0 };
558
558
  if (!e) return { kind: "same", delta: 0 };
559
- const r = (e.teamIds || []).indexOf(t) + 1;
560
- if (!r) return { kind: "new", delta: 0 };
561
- const o = r - s;
562
- return o > 0 ? { kind: "up", delta: o } : o < 0 ? { kind: "down", delta: -o } : { kind: "same", delta: 0 };
559
+ const o = (e.teamIds || []).indexOf(t) + 1;
560
+ if (!o) return { kind: "new", delta: 0 };
561
+ const i = o - s;
562
+ return i > 0 ? { kind: "up", delta: i } : i < 0 ? { kind: "down", delta: -i } : { kind: "same", delta: 0 };
563
563
  }
564
- function Se(a) {
564
+ function Ce(a) {
565
565
  return /^https?:\/\//i.test(String(a || ""));
566
566
  }
567
- function _(a, e) {
568
- const t = a?.logoAssetId;
569
- if (!Se(t)) return "";
570
- const s = Math.max(1, Math.round(e * 2)), r = t.includes("?") ? "&" : "?";
571
- return `${t}${r}w=${s}&h=${s}&f=webp`;
567
+ function oe(a, { w: e, h: t } = {}) {
568
+ if (!Ce(a)) return "";
569
+ const s = [];
570
+ e && s.push(`w=${Math.max(1, Math.round(e))}`), t && s.push(`h=${Math.max(1, Math.round(t))}`), s.push("f=webp");
571
+ const o = a.includes("?") ? "&" : "?";
572
+ return `${a}${o}${s.join("&")}`;
572
573
  }
573
- function V(a, e, { title: t, sub: s, teams: r }) {
574
- const o = se(), n = !!a.querySelector(':scope > a[slot="nav"]') || fe(o, e.hrefs, e.sport) !== null;
575
- return i`
574
+ function A(a, e) {
575
+ const t = e * 2;
576
+ return oe(a?.logoAssetId, { w: t, h: t });
577
+ }
578
+ function De(a, e) {
579
+ return oe(a?.photoAssetId, { w: e * 2 });
580
+ }
581
+ function V(a, e, { title: t, sub: s, teams: o }) {
582
+ const i = se(), n = !!a.querySelector(':scope > a[slot="nav"]') || ue(i, e.hrefs, e.sport) !== null;
583
+ return r`
576
584
  <div class="band section">
577
585
  <div class="inner">
578
586
  <h1>${t}</h1>
579
- ${s ? i`<p class="sub">${s}</p>` : p}
587
+ ${s ? r`<p class="sub">${s}</p>` : p}
580
588
  </div>
581
- ${n ? i`
589
+ ${n ? r`
582
590
  <nav class="sectionnav" aria-label="${I(e.sport)} section">
583
591
  <div class="navrow">
584
592
  <slot name="nav">
585
- ${ue(e.sport, r, e.hrefs).map((h) => i`<a href=${h.href}
586
- aria-current=${o && x(h.href) === o ? "page" : p}>${h.label}</a>`)}
593
+ ${ge(e.sport, o, e.hrefs).map((h) => r`<a href=${h.href}
594
+ aria-current=${i && x(h.href) === i ? "page" : p}>${h.label}</a>`)}
587
595
  </slot>
588
596
  </div>
589
597
  </nav>` : p}
@@ -593,57 +601,57 @@ function V(a, e, { title: t, sub: s, teams: r }) {
593
601
  const S = (a, e) => {
594
602
  const t = a.teamsById[e];
595
603
  return t ? a.schoolsById[t.schoolId] : null;
596
- }, T = (a, e) => S(a, e)?.name || "TBD", A = (a, e) => S(a, e)?.abbr || "TBD";
604
+ }, T = (a, e) => S(a, e)?.name || "TBD", _ = (a, e) => S(a, e)?.abbr || "TBD";
597
605
  function C(a, e = 26) {
598
606
  if (!a) return p;
599
- const t = _(a, e);
607
+ const t = A(a, e);
600
608
  if (t)
601
- return i`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
609
+ return r`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
602
610
  src=${t} style="width:${e}px;height:${e}px" />`;
603
- const s = a.colorPrimary || "#030711", r = E(s);
604
- return i`<span class="swatch" aria-hidden="true"
605
- style="width:${e}px;height:${e}px;background:${s};color:${r};font-size:${Math.max(8, e * 0.28)}px"
611
+ const s = a.colorPrimary || "#030711", o = E(s);
612
+ return r`<span class="swatch" aria-hidden="true"
613
+ style="width:${e}px;height:${e}px;background:${s};color:${o};font-size:${Math.max(8, e * 0.28)}px"
606
614
  >${j(a)}</span>`;
607
615
  }
608
616
  function Y(a, e, t) {
609
617
  const s = W(a.rankings, a.teamsById, e, a.sport, t);
610
- return s ? i`<span class="rankbadge">#${s}</span>` : p;
618
+ return s ? r`<span class="rankbadge">#${s}</span>` : p;
611
619
  }
612
620
  function re(a, e, t) {
613
621
  const s = S(a, e);
614
- return s ? i`${Y(a, e, t)}<a href=${u(a.hrefs.school, { id: s.id })}>${s.name}</a>` : i`<span class="mut">TBD</span>`;
622
+ return s ? r`${Y(a, e, t)}<a href=${u(a.hrefs.school, { id: s.id })}>${s.name}</a>` : r`<span class="mut">TBD</span>`;
615
623
  }
616
624
  function K(a, e, t = 5) {
617
625
  const s = a.records[e];
618
- if (!s || !s.results.length) return i`<span class="mut">·</span>`;
619
- const r = s.results.slice(-1 * t);
620
- return i`<span class="dots" role="img" aria-label="last ${r.length} results">
621
- ${r.map((o) => i`<a class="dot ${o.mark}"
622
- title="${o.mark} ${o.my}-${o.their} vs ${T(a, o.opp)}"
623
- href=${u(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
626
+ if (!s || !s.results.length) return r`<span class="mut">·</span>`;
627
+ const o = s.results.slice(-1 * t);
628
+ return r`<span class="dots" role="img" aria-label="last ${o.length} results">
629
+ ${o.map((i) => r`<a class="dot ${i.mark}"
630
+ title="${i.mark} ${i.my}-${i.their} vs ${T(a, i.opp)}"
631
+ href=${u(a.hrefs.game, { sport: a.sport, id: i.gameId })}>${i.mark}</a>`)}
624
632
  </span>`;
625
633
  }
626
634
  function B(a, e) {
627
- return a.querySelector(':scope > [slot="rail"]') ? i`<div class="view withrail">
635
+ return a.querySelector(':scope > [slot="rail"]') ? r`<div class="view withrail">
628
636
  <div class="viewmain">${e}</div>
629
637
  <aside class="viewrail"><slot name="rail"></slot></aside>
630
- </div>` : i`<div class="view">${e}</div>`;
638
+ </div>` : r`<div class="view">${e}</div>`;
631
639
  }
632
640
  function P(a) {
633
641
  if (!a.promoImage) return p;
634
- const e = i`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
635
- return i`<div class="promo">${a.promoHref ? i`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${e}</a>` : e}</div>`;
642
+ const e = r`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
643
+ return r`<div class="promo">${a.promoHref ? r`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${e}</a>` : e}</div>`;
636
644
  }
637
645
  function R(a) {
638
646
  const e = te(a);
639
- return i`<span class="pill ${e.kind}">${e.label}</span>`;
647
+ return r`<span class="pill ${e.kind}">${e.label}</span>`;
640
648
  }
641
- function oe(a, e, t) {
642
- if (!e) return i`<span class="mut">·</span>`;
643
- const s = e.homeTeamId === t ? e.awayTeamId : e.homeTeamId, r = e.homeTeamId === t ? "vs" : "at";
644
- return i`${e.state === "live" ? i`<span class="pill live">Live</span> ` : i`${y(e.date, { month: "numeric", day: "numeric" })} `}${r} ${A(a, s)}`;
649
+ function ie(a, e, t) {
650
+ if (!e) return r`<span class="mut">·</span>`;
651
+ const s = e.homeTeamId === t ? e.awayTeamId : e.homeTeamId, o = e.homeTeamId === t ? "vs" : "at";
652
+ return r`${e.state === "live" ? r`<span class="pill live">Live</span> ` : r`${y(e.date, { month: "numeric", day: "numeric" })} `}${o} ${_(a, s)}`;
645
653
  }
646
- class Ce extends $ {
654
+ class Fe extends $ {
647
655
  static styles = F;
648
656
  static properties = {
649
657
  ...$.properties,
@@ -662,19 +670,19 @@ class Ce extends $ {
662
670
  this._datePinned = !!this.date;
663
671
  }
664
672
  async fetchData(e) {
665
- const t = this.season || N(), [s, r, o, l, n] = await Promise.all([
673
+ const t = this.season || N(), [s, o, i, d, n] = await Promise.all([
666
674
  e.listSchools(),
667
675
  e.listTeams({ sport: this.sport }),
668
676
  e.listConferences(),
669
677
  e.listGames({ sport: this.sport, season: t }),
670
678
  e.listRankings({ sport: this.sport })
671
679
  ]);
672
- return this._datePinned || (this.date = he(l.items.map((h) => h.date)), this._datePinned = !0), {
680
+ return this._datePinned || (this.date = me(d.items.map((h) => h.date)), this._datePinned = !0), {
673
681
  season: t,
674
682
  schools: s.items,
675
- teams: r.items,
676
- conferences: o.items,
677
- games: l.items,
683
+ teams: o.items,
684
+ conferences: i.items,
685
+ games: d.items,
678
686
  rankings: n.items
679
687
  };
680
688
  }
@@ -689,30 +697,30 @@ class Ce extends $ {
689
697
  }, this._ctxData = this.data), this._ctx;
690
698
  }
691
699
  renderView() {
692
- const e = this.ctx, t = v(this.data.conferences), s = [...new Set(this.data.games.map((c) => c.date).filter(Boolean))].sort(), r = Number.MAX_SAFE_INTEGER, o = (c) => {
693
- const d = [c.awayTeamId, c.homeTeamId].map((m) => W(e.rankings, e.teamsById, m, this.sport, c.date)).filter(Boolean);
694
- return d.length ? Math.min(...d) : r;
695
- }, l = this.data.games.filter((c) => c.date === this.date), n = new Map(l.map((c) => [c, o(c)]));
696
- l.sort((c, d) => (c.state === "live" ? 0 : 1) - (d.state === "live" ? 0 : 1) || n.get(c) - n.get(d));
700
+ const e = this.ctx, t = v(this.data.conferences), s = [...new Set(this.data.games.map((l) => l.date).filter(Boolean))].sort(), o = Number.MAX_SAFE_INTEGER, i = (l) => {
701
+ const c = [l.awayTeamId, l.homeTeamId].map((m) => W(e.rankings, e.teamsById, m, this.sport, l.date)).filter(Boolean);
702
+ return c.length ? Math.min(...c) : o;
703
+ }, d = this.data.games.filter((l) => l.date === this.date), n = new Map(d.map((l) => [l, i(l)]));
704
+ d.sort((l, c) => (l.state === "live" ? 0 : 1) - (c.state === "live" ? 0 : 1) || n.get(l) - n.get(c));
697
705
  const h = /* @__PURE__ */ new Map();
698
- return l.forEach((c) => {
699
- const d = c.gameType === "conference" && c.conferenceId ? t[c.conferenceId]?.name || "Conference" : c.gameType === "playoff" ? "Playoffs" : c.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
700
- h.has(d) || h.set(d, []), h.get(d).push(c);
701
- }), i`
706
+ return d.forEach((l) => {
707
+ const c = l.gameType === "conference" && l.conferenceId ? t[l.conferenceId]?.name || "Conference" : l.gameType === "playoff" ? "Playoffs" : l.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
708
+ h.has(c) || h.set(c, []), h.get(c).push(l);
709
+ }), r`
702
710
  ${V(this, e, {
703
- title: i`${I(this.sport)} scores &amp; schedules`,
704
- sub: i`${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${l.length} games`,
711
+ title: r`${I(this.sport)} scores &amp; schedules`,
712
+ sub: r`${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${d.length} games`,
705
713
  teams: this.data.teams
706
714
  })}
707
- ${B(this, i`
715
+ ${B(this, r`
708
716
  ${P(this)}
709
717
  <div class="toolbar">
710
718
  <label class="asof" for="datesel">Date</label>
711
- <select id="datesel" @change=${(c) => {
712
- this.date = c.target.value;
719
+ <select id="datesel" @change=${(l) => {
720
+ this.date = l.target.value;
713
721
  }}>
714
- ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((c) => i`<option value=${c} ?selected=${c === this.date}>
715
- ${y(c, { weekday: "short", month: "short", day: "numeric" })}${c === M() ? " · today" : ""}
722
+ ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((l) => r`<option value=${l} ?selected=${l === this.date}>
723
+ ${y(l, { weekday: "short", month: "short", day: "numeric" })}${l === M() ? " · today" : ""}
716
724
  </option>`)}
717
725
  </select>
718
726
  <button class="chip" ?disabled=${s.indexOf(this.date) <= 0}
@@ -726,11 +734,11 @@ class Ce extends $ {
726
734
  <span class="spacer"></span>
727
735
  <span class="asof">Live games first · report a score to see it update here</span>
728
736
  </div>
729
- ${l.length ? p : i`<p class="empty">No ${this.sport} games on this date.</p>`}
730
- ${[...h.entries()].map(([c, d]) => i`
731
- <div class="section-title">${c}</div>
737
+ ${d.length ? p : r`<p class="empty">No ${this.sport} games on this date.</p>`}
738
+ ${[...h.entries()].map(([l, c]) => r`
739
+ <div class="section-title">${l}</div>
732
740
  <div class="card"><ul class="gamelist">
733
- ${d.map((m) => this.renderGame(e, m))}
741
+ ${c.map((m) => this.renderGame(e, m))}
734
742
  </ul></div>
735
743
  `)}
736
744
  `)}
@@ -740,21 +748,21 @@ class Ce extends $ {
740
748
  // a lone score column on the far right read as detached from the teams).
741
749
  // Scheduled games carry their start time on the status pill alone.
742
750
  renderGame(e, t) {
743
- const s = t.state === "final" || t.state === "live", r = (l, n, h = p) => i`<span class="side">${re(e, l, t.date)}${s ? i`<span class="score">${n}</span>` : p}${h}</span>`, o = Te(t);
744
- return i`
751
+ const s = t.state === "final" || t.state === "live", o = (d, n, h = p) => r`<span class="side">${re(e, d, t.date)}${s ? r`<span class="score">${n}</span>` : p}${h}</span>`, i = Ie(t);
752
+ return r`
745
753
  <li>
746
754
  ${R(t)}
747
- <span class="opp matchup">${r(t.awayTeamId, t.awayScore, i`<span class="at">at</span>`)}${r(t.homeTeamId, t.homeScore)}</span>
748
- ${o ? i`<span class="ff">${T(e, o === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : p}
755
+ <span class="opp matchup">${o(t.awayTeamId, t.awayScore, r`<span class="at">at</span>`)}${o(t.homeTeamId, t.homeScore)}</span>
756
+ ${i ? r`<span class="ff">${T(e, i === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : p}
749
757
  <span class="where">${t.venue || ""}</span>
750
- ${t.broadcast ? i`<span class="pill class">${t.broadcast}</span>` : p}
758
+ ${t.broadcast ? r`<span class="pill class">${t.broadcast}</span>` : p}
751
759
  <a class="box" href=${u(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score →</a>
752
760
  </li>
753
761
  `;
754
762
  }
755
763
  }
756
- globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Ce);
757
- class De extends $ {
764
+ globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Fe);
765
+ class ze extends $ {
758
766
  static styles = F;
759
767
  static properties = {
760
768
  ...$.properties,
@@ -767,7 +775,7 @@ class De extends $ {
767
775
  super(), this.sport = "football", this.season = "", this.classFilter = "All", this.query = "";
768
776
  }
769
777
  async fetchData(e) {
770
- const t = this.season || N(), [s, r, o, l, n] = await Promise.all([
778
+ const t = this.season || N(), [s, o, i, d, n] = await Promise.all([
771
779
  e.listConferences({ active: !0 }),
772
780
  e.listSchools(),
773
781
  e.listTeams({ sport: this.sport }),
@@ -777,9 +785,9 @@ class De extends $ {
777
785
  return {
778
786
  season: t,
779
787
  conferences: s.items,
780
- schools: r.items,
781
- teams: o.items,
782
- games: l.items,
788
+ schools: o.items,
789
+ teams: i.items,
790
+ games: d.items,
783
791
  rankings: n.items
784
792
  };
785
793
  }
@@ -794,43 +802,43 @@ class De extends $ {
794
802
  }, this._ctxData = this.data), this._ctx;
795
803
  }
796
804
  renderView() {
797
- const e = this.ctx, t = ["All", ...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter));
798
- return i`
805
+ const e = this.ctx, t = ["All", ...new Set(this.data.conferences.flatMap((o) => o.classifications || []))].slice(0, 9), s = this.data.conferences.filter((o) => o.active !== !1).filter((o) => this.classFilter === "All" || (o.classifications || []).includes(this.classFilter));
806
+ return r`
799
807
  ${V(this, e, {
800
- title: i`${I(this.sport)} standings`,
801
- sub: i`${this.data.season} season · every conference, computed live from reported results`,
808
+ title: r`${I(this.sport)} standings`,
809
+ sub: r`${this.data.season} season · every conference, computed live from reported results`,
802
810
  teams: this.data.teams
803
811
  })}
804
- ${B(this, i`
812
+ ${B(this, r`
805
813
  ${P(this)}
806
814
  <div class="toolbar">
807
815
  <div role="group" aria-label="Classification filter">
808
- ${t.map((r) => i`<button class="chip ${this.classFilter === r ? "on" : ""}"
816
+ ${t.map((o) => r`<button class="chip ${this.classFilter === o ? "on" : ""}"
809
817
  @click=${() => {
810
- this.classFilter = r;
811
- }}>${r}</button>`)}
818
+ this.classFilter = o;
819
+ }}>${o}</button>`)}
812
820
  </div>
813
821
  <input type="search" placeholder="Find a school…" aria-label="Find a school"
814
- .value=${this.query} @input=${(r) => {
815
- this.query = r.target.value;
822
+ .value=${this.query} @input=${(o) => {
823
+ this.query = o.target.value;
816
824
  }}>
817
825
  <span class="spacer"></span>
818
826
  <span class="asof">Records through ${y(M(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
819
827
  </div>
820
- ${s.map((r) => this.renderConference(e, r))}
828
+ ${s.map((o) => this.renderConference(e, o))}
821
829
  `)}
822
830
  `;
823
831
  }
824
832
  renderConference(e, t) {
825
- const s = this.data.teams.filter((l) => l.conferenceId === t.id);
833
+ const s = this.data.teams.filter((d) => d.conferenceId === t.id);
826
834
  if (!s.length) return p;
827
- const r = this.query.trim().toLowerCase(), o = ae(s, e.records);
828
- return i`
835
+ const o = this.query.trim().toLowerCase(), i = ae(s, e.records);
836
+ return r`
829
837
  <div class="card">
830
838
  <div class="card-head">
831
839
  <h2>${t.name}</h2>
832
- ${(t.classifications || []).map((l) => i`<span class="pill class">${l}</span>`)}
833
- <span class="meta">${o.length} teams · membership derives from teams</span>
840
+ ${(t.classifications || []).map((d) => r`<span class="pill class">${d}</span>`)}
841
+ <span class="meta">${i.length} teams · membership derives from teams</span>
834
842
  </div>
835
843
  <div class="tablewrap"><table class="data">
836
844
  <thead><tr>
@@ -839,27 +847,27 @@ class De extends $ {
839
847
  <th>Streak</th><th>Last 5</th><th>Next</th>
840
848
  </tr></thead>
841
849
  <tbody>
842
- ${o.map((l, n) => this.renderRow(e, l, n, r))}
850
+ ${i.map((d, n) => this.renderRow(e, d, n, o))}
843
851
  </tbody>
844
852
  </table></div>
845
853
  </div>
846
854
  `;
847
855
  }
848
- renderRow(e, t, s, r) {
849
- const o = e.schoolsById[t.team.schoolId], l = o?.name || t.team.name || "TBD";
850
- if (r && !l.toLowerCase().includes(r)) return p;
851
- const n = t.rec.pf - t.rec.pa, h = q(this.data.games, t.team.id), c = (t.team.championships || []).map((m) => i`
852
- <span class="pill champ" title="${m.season} ${m.title} champion">★ ${m.season} ${m.title}</span>`), d = () => {
856
+ renderRow(e, t, s, o) {
857
+ const i = e.schoolsById[t.team.schoolId], d = i?.name || t.team.name || "TBD";
858
+ if (o && !d.toLowerCase().includes(o)) return p;
859
+ const n = t.rec.pf - t.rec.pa, h = q(this.data.games, t.team.id), l = (t.team.championships || []).map((m) => r`
860
+ <span class="pill champ" title="${m.season} ${m.title} champion">★ ${m.season} ${m.title}</span>`), c = () => {
853
861
  location.href = u(e.hrefs.school, { id: t.team.schoolId });
854
862
  };
855
- return i`
863
+ return r`
856
864
  <tr class="rowlink" @click=${(m) => {
857
- m.target.closest("a") || d();
865
+ m.target.closest("a") || c();
858
866
  }}>
859
867
  <td class="mut">${s + 1}</td>
860
868
  <td class="teamcell">
861
- ${C(o)}${Y(e, t.team.id, null)}
862
- <a href=${u(e.hrefs.school, { id: t.team.schoolId })}>${l}</a> ${c}
869
+ ${C(i)}${Y(e, t.team.id, null)}
870
+ <a href=${u(e.hrefs.school, { id: t.team.schoolId })}>${d}</a> ${l}
863
871
  </td>
864
872
  <td class="num">${w(t.rec, !0)}</td>
865
873
  <td class="num">${Z(t.confPct)}</td>
@@ -870,13 +878,13 @@ class De extends $ {
870
878
  <td class="num" style="color:${n >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${n > 0 ? "+" : ""}${n}</td>
871
879
  <td>${L(t.rec.results) || "·"}</td>
872
880
  <td>${K(e, t.team.id)}</td>
873
- <td>${oe(e, h, t.team.id)}</td>
881
+ <td>${ie(e, h, t.team.id)}</td>
874
882
  </tr>
875
883
  `;
876
884
  }
877
885
  }
878
- globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", De);
879
- const Fe = b`
886
+ globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", ze);
887
+ const Be = b`
880
888
  .hero1 {
881
889
  border-radius: var(--hsot-radius-md); color: var(--hsot-white);
882
890
  padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
@@ -893,8 +901,8 @@ const Fe = b`
893
901
  .delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
894
902
  .sparkline { vertical-align: middle; }
895
903
  `;
896
- class ze extends $ {
897
- static styles = [...F, Fe];
904
+ class Pe extends $ {
905
+ static styles = [...F, Be];
898
906
  static properties = {
899
907
  ...$.properties,
900
908
  sport: { type: String },
@@ -911,19 +919,19 @@ class ze extends $ {
911
919
  e && (this.pollDate = e);
912
920
  }
913
921
  async fetchData(e) {
914
- const t = this.season || N(), [s, r, o, l, n] = await Promise.all([
922
+ const t = this.season || N(), [s, o, i, d, n] = await Promise.all([
915
923
  e.listRankings({ sport: this.sport, ...this.gender ? { gender: this.gender } : {} }),
916
924
  e.listSchools(),
917
925
  e.listTeams({ sport: this.sport }),
918
926
  e.listConferences(),
919
927
  e.listGames({ sport: this.sport, season: t })
920
- ]), h = s.items.filter((c) => !this.gender || !c.gender || c.gender === this.gender).sort((c, d) => d.effectiveDate.localeCompare(c.effectiveDate));
928
+ ]), h = s.items.filter((l) => !this.gender || !l.gender || l.gender === this.gender).sort((l, c) => c.effectiveDate.localeCompare(l.effectiveDate));
921
929
  return {
922
930
  season: t,
923
931
  polls: h,
924
- schools: r.items,
925
- teams: o.items,
926
- conferences: l.items,
932
+ schools: o.items,
933
+ teams: i.items,
934
+ conferences: d.items,
927
935
  games: n.items
928
936
  };
929
937
  }
@@ -944,39 +952,39 @@ class ze extends $ {
944
952
  const k = t.length === 1 ? 96 / 2 : f / (t.length - 1) * 90 + 3, O = 3 + g / 24 * 20;
945
953
  return { x: k, y: O };
946
954
  }), h = [];
947
- let c = [];
955
+ let l = [];
948
956
  if (n.forEach((m) => {
949
- m ? c.push(m) : c.length && (h.push(c), c = []);
950
- }), c.length && h.push(c), !h.length) return p;
951
- const d = n[s];
952
- return i`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
957
+ m ? l.push(m) : l.length && (h.push(l), l = []);
958
+ }), l.length && h.push(l), !h.length) return p;
959
+ const c = n[s];
960
+ return r`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
953
961
  ${h.map((m) => Q`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
954
962
  points=${m.map((f) => `${f.x.toFixed(1)},${f.y.toFixed(1)}`).join(" ")}></polyline>`)}
955
- ${d ? Q`<circle cx=${d.x.toFixed(1)} cy=${d.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : p}
963
+ ${c ? Q`<circle cx=${c.x.toFixed(1)} cy=${c.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : p}
956
964
  </svg>`;
957
965
  }
958
966
  movement(e, t, s) {
959
- const r = Ie(e, t, s);
960
- return r.kind === "up" ? i`<span class="delta up">▲ ${r.delta}</span>` : r.kind === "down" ? i`<span class="delta down">▼ ${r.delta}</span>` : r.kind === "new" ? i`<span class="delta new">NEW</span>` : r.kind === "same" ? i`<span class="delta same">—</span>` : i`<span class="delta same">·</span>`;
967
+ const o = Se(e, t, s);
968
+ return o.kind === "up" ? r`<span class="delta up">▲ ${o.delta}</span>` : o.kind === "down" ? r`<span class="delta down">▼ ${o.delta}</span>` : o.kind === "new" ? r`<span class="delta new">NEW</span>` : o.kind === "same" ? r`<span class="delta same">—</span>` : r`<span class="delta same">·</span>`;
961
969
  }
962
970
  renderView() {
963
971
  const e = this.ctx, t = this.data.polls;
964
- if (!t.length) return i`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
965
- const s = Math.max(0, t.findIndex((m) => m.effectiveDate === this.pollDate)), r = t[s] || t[0], o = t[s + 1] || null, l = t.slice().reverse(), n = l.indexOf(r), h = v(this.data.conferences), c = (r.teamIds || [])[0], d = c ? S(e, c) : null;
966
- return i`
972
+ if (!t.length) return r`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
973
+ const s = Math.max(0, t.findIndex((m) => m.effectiveDate === this.pollDate)), o = t[s] || t[0], i = t[s + 1] || null, d = t.slice().reverse(), n = d.indexOf(o), h = v(this.data.conferences), l = (o.teamIds || [])[0], c = l ? S(e, l) : null;
974
+ return r`
967
975
  ${V(this, e, {
968
- title: i`${I(this.sport)} Top 25`,
969
- sub: i`The HighSchoolOT poll · updated weekly · ${t.length} polls this season`,
976
+ title: r`${I(this.sport)} Top 25`,
977
+ sub: r`The HighSchoolOT poll · updated weekly · ${t.length} polls this season`,
970
978
  teams: this.data.teams
971
979
  })}
972
- ${B(this, i`
980
+ ${B(this, r`
973
981
  ${P(this)}
974
982
  <div class="toolbar">
975
983
  <label class="asof" for="pollsel">Poll of</label>
976
984
  <select id="pollsel" @change=${(m) => {
977
985
  this.pollDate = m.target.value;
978
986
  }}>
979
- ${t.map((m, f) => i`<option value=${m.effectiveDate} ?selected=${m === r}>
987
+ ${t.map((m, f) => r`<option value=${m.effectiveDate} ?selected=${m === o}>
980
988
  ${y(m.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${f === 0 ? " · current" : ""}
981
989
  </option>`)}
982
990
  </select>
@@ -991,65 +999,65 @@ class ze extends $ {
991
999
  <span class="spacer"></span>
992
1000
  <span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
993
1001
  </div>
994
- ${d ? this.renderHero(e, r, o, c, d, h) : p}
1002
+ ${c ? this.renderHero(e, o, i, l, c, h) : p}
995
1003
  <div class="card"><div class="tablewrap"><table class="data">
996
1004
  <thead><tr>
997
1005
  <th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
998
1006
  <th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
999
1007
  </tr></thead>
1000
1008
  <tbody>
1001
- ${(r.teamIds || []).map((m, f) => f === 0 || !m ? p : this.renderRow(e, r, o, l, n, h, m, f + 1))}
1009
+ ${(o.teamIds || []).map((m, f) => f === 0 || !m ? p : this.renderRow(e, o, i, d, n, h, m, f + 1))}
1002
1010
  </tbody>
1003
1011
  </table></div></div>
1004
1012
  <p class="note">Ranks elsewhere on the site resolve the poll in effect on the game date, so past box scores keep the ranks they were played under.</p>
1005
1013
  `)}
1006
1014
  `;
1007
1015
  }
1008
- renderHero(e, t, s, r, o, l) {
1009
- const n = e.records[r], h = J(e.records, r), c = l[e.teamsById[r]?.conferenceId], d = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1010
- return i`
1011
- <div class="hero1" style="background:${d}">
1016
+ renderHero(e, t, s, o, i, d) {
1017
+ const n = e.records[o], h = J(e.records, o), l = d[e.teamsById[o]?.conferenceId], c = `linear-gradient(120deg, ${i.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1018
+ return r`
1019
+ <div class="hero1" style="background:${c}">
1012
1020
  <div class="bigrank">#1</div>
1013
- ${C(o, 64)}
1021
+ ${C(i, 64)}
1014
1022
  <div>
1015
- <h2><a href=${u(e.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1023
+ <h2><a href=${u(e.hrefs.school, { id: i.id })}>${i.name} ${i.mascot || ""}</a></h2>
1016
1024
  <div class="facts">
1017
- ${w(n)} overall${c ? i` · ${w(n, !0)} ${c.name}` : p}
1025
+ ${w(n)} overall${l ? r` · ${w(n, !0)} ${l.name}` : p}
1018
1026
  · streak ${L(n?.results) || "·"}
1019
- ${h ? i` · last: ${h.mark} ${h.my}-${h.their} vs ${A(e, h.opp)}` : p}
1020
- &nbsp;${this.movement(t, s, r)}
1027
+ ${h ? r` · last: ${h.mark} ${h.my}-${h.their} vs ${_(e, h.opp)}` : p}
1028
+ &nbsp;${this.movement(t, s, o)}
1021
1029
  </div>
1022
1030
  </div>
1023
1031
  </div>
1024
1032
  `;
1025
1033
  }
1026
- renderRow(e, t, s, r, o, l, n, h) {
1027
- const c = S(e, n);
1028
- if (!c) return p;
1029
- const d = e.records[n], m = J(e.records, n), f = q(this.data.games, n), g = l[e.teamsById[n]?.conferenceId], k = () => {
1030
- location.href = u(e.hrefs.school, { id: c.id });
1034
+ renderRow(e, t, s, o, i, d, n, h) {
1035
+ const l = S(e, n);
1036
+ if (!l) return p;
1037
+ const c = e.records[n], m = J(e.records, n), f = q(this.data.games, n), g = d[e.teamsById[n]?.conferenceId], k = () => {
1038
+ location.href = u(e.hrefs.school, { id: l.id });
1031
1039
  };
1032
- return i`
1040
+ return r`
1033
1041
  <tr class="rowlink" @click=${(O) => {
1034
1042
  O.target.closest("a") || k();
1035
1043
  }}>
1036
1044
  <td class="num" style="font-weight:700">${h}</td>
1037
1045
  <td>${this.movement(t, s, n)}</td>
1038
- <td class="teamcell">${C(c)}<a href=${u(e.hrefs.school, { id: c.id })}>${c.name}</a>
1039
- <span class="mut" style="font-size:0.78rem">${c.mascot || ""}</span></td>
1040
- <td class="num">${w(d)}</td>
1046
+ <td class="teamcell">${C(l)}<a href=${u(e.hrefs.school, { id: l.id })}>${l.name}</a>
1047
+ <span class="mut" style="font-size:0.78rem">${l.mascot || ""}</span></td>
1048
+ <td class="num">${w(c)}</td>
1041
1049
  <td class="mut">${g?.name || "Independent"}</td>
1042
- <td>${m ? i`<a class="box" style="text-decoration:none" href=${u(e.hrefs.game, { sport: this.sport, id: m.gameId })}>
1050
+ <td>${m ? r`<a class="box" style="text-decoration:none" href=${u(e.hrefs.game, { sport: this.sport, id: m.gameId })}>
1043
1051
  <b style="color:${m.mark === "W" ? "var(--hsot-win)" : m.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${m.mark}</b>
1044
- ${m.my}-${m.their} vs ${A(e, m.opp)}</a>` : i`<span class="mut">·</span>`}</td>
1045
- <td>${oe(e, f, n)}</td>
1046
- <td>${this.sparkline(n, r, o)}</td>
1052
+ ${m.my}-${m.their} vs ${_(e, m.opp)}</a>` : r`<span class="mut">·</span>`}</td>
1053
+ <td>${ie(e, f, n)}</td>
1054
+ <td>${this.sparkline(n, o, i)}</td>
1047
1055
  </tr>
1048
1056
  `;
1049
1057
  }
1050
1058
  }
1051
- globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", ze);
1052
- const Be = b`
1059
+ globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Pe);
1060
+ const Ee = b`
1053
1061
  .schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
1054
1062
  .schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
1055
1063
  .schoolhero .crest {
@@ -1072,10 +1080,14 @@ const Be = b`
1072
1080
  .tile .v { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 1.7rem; line-height: 1.15; color: var(--hsot-black); }
1073
1081
  .tile .s { font-size: 0.78rem; color: var(--hsot-gray-5); }
1074
1082
  .cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.25rem; }
1083
+ /* The season roster photo heads the roster card, above the table. Natural
1084
+ height: a team photo is never cropped to a box — the card's overflow
1085
+ rounds its top corners. */
1086
+ .rosterphoto { display: block; width: 100%; height: auto; background: var(--hsot-gray-1); border-bottom: 1px solid var(--hsot-gray-2); }
1075
1087
  @media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .schoolhero h1 { font-size: 1.9rem; } }
1076
1088
  `;
1077
- class Pe extends $ {
1078
- static styles = [...F, Be];
1089
+ class Ae extends $ {
1090
+ static styles = [...F, Ee];
1079
1091
  static properties = {
1080
1092
  ...$.properties,
1081
1093
  schoolId: { type: String, attribute: "school-id" },
@@ -1092,26 +1104,26 @@ class Pe extends $ {
1092
1104
  e && !this.sport && (this.sport = e);
1093
1105
  }
1094
1106
  async fetchData(e) {
1095
- const t = this.season || N(), s = await e.getSchool(this.schoolId), o = (await e.listTeams({ schoolId: this.schoolId })).items, l = o.find((k) => k.sport === (this.sport || "football")) || o[0] || null, [n, h, c, d, m, f, g] = await Promise.all([
1096
- l ? e.listGames({ sport: l.sport, season: t }) : Promise.resolve({ items: [] }),
1097
- l ? e.listTeams({ sport: l.sport }) : Promise.resolve({ items: [] }),
1107
+ const t = this.season || N(), s = await e.getSchool(this.schoolId), i = (await e.listTeams({ schoolId: this.schoolId })).items, d = i.find((k) => k.sport === (this.sport || "football")) || i[0] || null, [n, h, l, c, m, f, g] = await Promise.all([
1108
+ d ? e.listGames({ sport: d.sport, season: t }) : Promise.resolve({ items: [] }),
1109
+ d ? e.listTeams({ sport: d.sport }) : Promise.resolve({ items: [] }),
1098
1110
  e.listSchools(),
1099
1111
  e.listConferences(),
1100
- l ? e.listRankings({ sport: l.sport }) : Promise.resolve({ items: [] }),
1101
- l ? e.listRosters({ teamId: l.id }) : Promise.resolve({ items: [] }),
1112
+ d ? e.listRankings({ sport: d.sport }) : Promise.resolve({ items: [] }),
1113
+ d ? e.listRosters({ teamId: d.id }) : Promise.resolve({ items: [] }),
1102
1114
  // teamId is the public surface's one players filter (roster
1103
1115
  // membership) — never fetch the whole collection.
1104
- l ? e.listPlayers({ teamId: l.id }) : Promise.resolve({ items: [] })
1116
+ d ? e.listPlayers({ teamId: d.id }) : Promise.resolve({ items: [] })
1105
1117
  ]);
1106
1118
  return {
1107
1119
  season: t,
1108
1120
  school: s,
1109
- teams: o,
1110
- active: l,
1121
+ teams: i,
1122
+ active: d,
1111
1123
  games: n.items,
1112
1124
  allTeams: h.items,
1113
- schools: c.items,
1114
- conferences: d.items,
1125
+ schools: l.items,
1126
+ conferences: c.items,
1115
1127
  rankings: m.items,
1116
1128
  roster: f.items.find((k) => k.season === t) || null,
1117
1129
  players: g.items
@@ -1131,111 +1143,114 @@ class Pe extends $ {
1131
1143
  this.sport = e, this.load();
1132
1144
  }
1133
1145
  renderView() {
1134
- const { school: e, teams: t, active: s, season: r } = this.data;
1135
- if (!e) return i`<div class="view"><p class="empty">School not found.</p></div>`;
1136
- const o = this.ctx, l = E(e.colorPrimary || "#030711"), n = (e.adm || [])[0], h = v(this.data.conferences), c = s ? h[s.conferenceId] : null;
1137
- return i`
1138
- <div class="schoolhero" style="background:linear-gradient(115deg, ${e.colorPrimary || "#030711"} 0%, ${e.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${l}">
1146
+ const { school: e, teams: t, active: s, season: o } = this.data;
1147
+ if (!e) return r`<div class="view"><p class="empty">School not found.</p></div>`;
1148
+ const i = this.ctx, d = E(e.colorPrimary || "#030711"), n = (e.adm || [])[0], h = v(this.data.conferences), l = s ? h[s.conferenceId] : null;
1149
+ return r`
1150
+ <div class="schoolhero" style="background:linear-gradient(115deg, ${e.colorPrimary || "#030711"} 0%, ${e.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${d}">
1139
1151
  <div class="inner">
1140
- ${_(e, 84) ? i`<img class="crest logo" alt="" loading="lazy" src=${_(e, 84)} />` : i`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${E(e.colorSecondary || "#7C7C7C")}">${j(e)}</div>`}
1152
+ ${A(e, 84) ? r`<img class="crest logo" alt="" loading="lazy" src=${A(e, 84)} />` : r`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${E(e.colorSecondary || "#7C7C7C")}">${j(e)}</div>`}
1141
1153
  <div style="min-width:260px">
1142
1154
  <h1>${e.name} <span class="mascot">${e.mascot || ""}</span></h1>
1143
1155
  <div class="facts">
1144
- ${e.location ? i`<span><b>Location</b>${e.location}${e.county ? i` · ${e.county} County` : p}</span>` : p}
1145
- ${e.association ? i`<span><b>League</b>${e.association}${e.classification ? i` · ${e.classification}` : p}</span>` : p}
1146
- ${c ? i`<span><b>Conference</b>${c.name}</span>` : p}
1147
- ${n ? i`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : p}
1148
- ${e.openingYear ? i`<span><b>Opened</b>${e.openingYear}</span>` : p}
1149
- ${e.areaCode ? i`<span><b>Area</b>${e.areaCode}</span>` : p}
1156
+ ${e.location ? r`<span><b>Location</b>${e.location}${e.county ? r` · ${e.county} County` : p}</span>` : p}
1157
+ ${e.association ? r`<span><b>League</b>${e.association}${e.classification ? r` · ${e.classification}` : p}</span>` : p}
1158
+ ${l ? r`<span><b>Conference</b>${l.name}</span>` : p}
1159
+ ${n ? r`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : p}
1160
+ ${e.openingYear ? r`<span><b>Opened</b>${e.openingYear}</span>` : p}
1161
+ ${e.areaCode ? r`<span><b>Area</b>${e.areaCode}</span>` : p}
1150
1162
  </div>
1151
1163
  </div>
1152
1164
  </div>
1153
1165
  </div>
1154
1166
  <div class="band">
1155
1167
  <nav class="tabs" aria-label="Teams">
1156
- ${t.map((d) => d.id === s?.id ? i`<a class="on" href="#" @click=${(m) => m.preventDefault()}>${d.name}</a>` : i`<a href="#" @click=${(m) => {
1157
- m.preventDefault(), this.switchSport(d.sport);
1158
- }}>${d.name}</a>`)}
1168
+ ${t.map((c) => c.id === s?.id ? r`<a class="on" href="#" @click=${(m) => m.preventDefault()}>${c.name}</a>` : r`<a href="#" @click=${(m) => {
1169
+ m.preventDefault(), this.switchSport(c.sport);
1170
+ }}>${c.name}</a>`)}
1159
1171
  </nav>
1160
1172
  </div>
1161
- ${B(this, i`
1173
+ ${B(this, r`
1162
1174
  ${P(this)}
1163
- ${s ? this.renderTeam(o, s, c, r) : i`<p class="empty">No teams recorded for this school yet.</p>`}
1175
+ ${s ? this.renderTeam(i, s, l, o) : r`<p class="empty">No teams recorded for this school yet.</p>`}
1164
1176
  `)}
1165
1177
  `;
1166
1178
  }
1167
- renderTeam(e, t, s, r) {
1168
- const o = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, l = o.w + o.l + o.t, n = s ? this.data.allTeams.filter((m) => m.conferenceId === s.id) : [], h = s ? ae(n, e.records).findIndex((m) => m.team.id === t.id) + 1 : 0, c = W(e.rankings, e.teamsById, t.id, t.sport, null), d = this.data.games.filter((m) => m.homeTeamId === t.id || m.awayTeamId === t.id).sort((m, f) => String(m.date).localeCompare(String(f.date)));
1169
- return i`
1179
+ renderTeam(e, t, s, o) {
1180
+ const i = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, d = i.w + i.l + i.t, n = s ? this.data.allTeams.filter((m) => m.conferenceId === s.id) : [], h = s ? ae(n, e.records).findIndex((m) => m.team.id === t.id) + 1 : 0, l = W(e.rankings, e.teamsById, t.id, t.sport, null), c = this.data.games.filter((m) => m.homeTeamId === t.id || m.awayTeamId === t.id).sort((m, f) => String(m.date).localeCompare(String(f.date)));
1181
+ return r`
1170
1182
  <div class="tiles">
1171
- <div class="tile"><div class="k">Overall</div><div class="v">${w(o)}</div><div class="s">${l} games played</div></div>
1172
- <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${w(o, !0)}</div>
1173
- <div class="s">${h ? `${me(h)} of ${n.length}` : "·"}</div></div>
1174
- <div class="tile"><div class="k">Points</div><div class="v">${l ? (o.pf / l).toFixed(1) : "0.0"}</div>
1175
- <div class="s">scored per game · ${l ? (o.pa / l).toFixed(1) : "0.0"} allowed</div></div>
1176
- <div class="tile"><div class="k">Streak</div><div class="v">${L(o.results) || "·"}</div>
1183
+ <div class="tile"><div class="k">Overall</div><div class="v">${w(i)}</div><div class="s">${d} games played</div></div>
1184
+ <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${w(i, !0)}</div>
1185
+ <div class="s">${h ? `${pe(h)} of ${n.length}` : "·"}</div></div>
1186
+ <div class="tile"><div class="k">Points</div><div class="v">${d ? (i.pf / d).toFixed(1) : "0.0"}</div>
1187
+ <div class="s">scored per game · ${d ? (i.pa / d).toFixed(1) : "0.0"} allowed</div></div>
1188
+ <div class="tile"><div class="k">Streak</div><div class="v">${L(i.results) || "·"}</div>
1177
1189
  <div class="s">last 5: ${K(e, t.id)}</div></div>
1178
- <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${c ? `#${c}` : "NR"}</div>
1190
+ <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${l ? `#${l}` : "NR"}</div>
1179
1191
  <div class="s"><a href=${u(e.hrefs.section, { sport: t.sport, view: "rankings" })}>full poll</a></div></div>
1180
1192
  </div>
1181
- ${(t.championships || []).length ? i`
1193
+ ${(t.championships || []).length ? r`
1182
1194
  <div style="margin:-0.2rem 0 1rem;display:flex;gap:0.4rem;flex-wrap:wrap">
1183
- ${t.championships.map((m) => i`<span class="pill champ">★ ${m.season} ${m.title} champion${m.classification ? ` · ${m.classification}` : ""}${m.region ? ` · ${m.region}` : ""}</span>`)}
1195
+ ${t.championships.map((m) => r`<span class="pill champ">★ ${m.season} ${m.title} champion${m.classification ? ` · ${m.classification}` : ""}${m.region ? ` · ${m.region}` : ""}</span>`)}
1184
1196
  </div>` : p}
1185
1197
  <div class="cols">
1186
1198
  <div>
1187
1199
  <div class="section-title">Schedule &amp; results</div>
1188
1200
  <div class="card">
1189
- ${d.length ? i`<ul class="gamelist">${d.map((m) => this.renderGameRow(e, t, m))}</ul>` : i`<p class="empty">No ${t.sport} games recorded for ${r}.</p>`}
1201
+ ${c.length ? r`<ul class="gamelist">${c.map((m) => this.renderGameRow(e, t, m))}</ul>` : r`<p class="empty">No ${t.sport} games recorded for ${o}.</p>`}
1190
1202
  </div>
1191
1203
  </div>
1192
1204
  <div>
1193
- <div class="section-title">Roster · ${r}</div>
1194
- <div class="card">${this.renderRoster(r)}</div>
1205
+ <div class="section-title">Roster · ${o}</div>
1206
+ <div class="card">${this.renderRoster(t, o)}</div>
1195
1207
  </div>
1196
1208
  </div>
1197
1209
  `;
1198
1210
  }
1199
1211
  renderGameRow(e, t, s) {
1200
- const r = s.homeTeamId === t.id, o = r ? s.awayTeamId : s.homeTeamId, l = r ? s.homeScore : s.awayScore, n = r ? s.awayScore : s.homeScore;
1201
- let h = i`<span class="mut">${U(s.time)}</span>`;
1212
+ const o = s.homeTeamId === t.id, i = o ? s.awayTeamId : s.homeTeamId, d = o ? s.homeScore : s.awayScore, n = o ? s.awayScore : s.homeScore;
1213
+ let h = r`<span class="mut">${U(s.time)}</span>`;
1202
1214
  if (s.state === "final") {
1203
- const d = G(s), m = d === "tie" ? "T" : d === (r ? "home" : "away") ? "W" : "L";
1204
- h = i`<span class=${m}>${m}</span> ${l}-${n}${s.finish === "overtime" ? i` <span class="mut">OT</span>` : p}${s.forfeit && s.forfeit !== "none" ? i` <span class="mut">FF</span>` : p}`;
1205
- } else s.state === "live" && (h = i`<span style="color:var(--hsot-red)">${l}-${n}</span>`);
1206
- const c = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1207
- return i`
1215
+ const c = G(s), m = c === "tie" ? "T" : c === (o ? "home" : "away") ? "W" : "L";
1216
+ h = r`<span class=${m}>${m}</span> ${d}-${n}${s.finish === "overtime" ? r` <span class="mut">OT</span>` : p}${s.forfeit && s.forfeit !== "none" ? r` <span class="mut">FF</span>` : p}`;
1217
+ } else s.state === "live" && (h = r`<span style="color:var(--hsot-red)">${d}-${n}</span>`);
1218
+ const l = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1219
+ return r`
1208
1220
  <li>
1209
1221
  <span class="d">${y(s.date)}</span>
1210
1222
  ${te(s).kind === "sched" ? p : R(s)}
1211
1223
  <span class="res">${h}</span>
1212
- <span class="opp">${r ? "vs" : "at"} ${re(e, o, s.date)}
1213
- <span class="pill type">${c}</span>
1214
- ${s.broadcast ? i`<span class="pill class">${s.broadcast}</span>` : p}
1224
+ <span class="opp">${o ? "vs" : "at"} ${re(e, i, s.date)}
1225
+ <span class="pill type">${l}</span>
1226
+ ${s.broadcast ? r`<span class="pill class">${s.broadcast}</span>` : p}
1215
1227
  </span>
1216
1228
  <span class="where">${s.venue || ""}</span>
1217
1229
  <a class="box" href=${u(e.hrefs.game, { sport: t.sport, id: s.id })}>Box score →</a>
1218
1230
  </li>
1219
1231
  `;
1220
1232
  }
1221
- renderRoster(e) {
1222
- const t = this.data.roster;
1223
- if (!t)
1224
- return i`<p class="empty">Roster not published for ${e}.</p>`;
1225
- const s = v(this.data.players), r = t.entries.slice().sort((o, l) => (o.number || 0) - (l.number || 0));
1226
- return i`
1233
+ renderRoster(e, t) {
1234
+ const s = this.data.roster;
1235
+ if (!s)
1236
+ return r`<p class="empty">Roster not published for ${t}.</p>`;
1237
+ const o = De(s, 560), i = this.data.school?.name || "", d = v(this.data.players), n = s.entries.slice().sort((l, c) => (l.number || 0) - (c.number || 0)), h = n.some((l) => d[l.playerId]?.college);
1238
+ return r`
1239
+ ${o ? r`<img class="rosterphoto" src=${o} loading="lazy" decoding="async"
1240
+ alt="${i} ${e.name} ${t} team photo" />` : p}
1227
1241
  <div class="tablewrap"><table class="data">
1228
- <thead><tr><th class="num">No.</th><th>Player</th><th>Pos</th><th>Class</th><th class="num">Ht</th><th class="num">Wt</th></tr></thead>
1242
+ <thead><tr><th class="num">No.</th><th>Player</th><th>Pos</th><th>Class</th><th class="num">Ht</th><th class="num">Wt</th>${h ? r`<th>College</th>` : p}</tr></thead>
1229
1243
  <tbody>
1230
- ${r.map((o) => {
1231
- const l = s[o.playerId];
1232
- return l ? i`<tr>
1233
- <td class="num mut">${o.number ?? "·"}</td>
1234
- <td style="font-weight:500">${l.firstName} ${l.lastName}</td>
1235
- <td>${o.position || "·"}</td>
1236
- <td class="mut">${l.classOf || "·"}</td>
1237
- <td class="num">${de(l.heightIn)}</td>
1238
- <td class="num">${l.weightLb || "·"}</td>
1244
+ ${n.map((l) => {
1245
+ const c = d[l.playerId];
1246
+ return c ? r`<tr>
1247
+ <td class="num mut">${l.number ?? "·"}</td>
1248
+ <td style="font-weight:500">${c.firstName} ${c.lastName}</td>
1249
+ <td>${l.position || "·"}</td>
1250
+ <td class="mut">${c.classOf || "·"}</td>
1251
+ <td class="num">${he(c.heightIn)}</td>
1252
+ <td class="num">${c.weightLb || "·"}</td>
1253
+ ${h ? r`<td>${c.college || "·"}</td>` : p}
1239
1254
  </tr>` : p;
1240
1255
  })}
1241
1256
  </tbody>
@@ -1243,16 +1258,16 @@ class Pe extends $ {
1243
1258
  `;
1244
1259
  }
1245
1260
  }
1246
- globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Pe);
1247
- const Ee = "https://api.wral.com/search";
1248
- function _e(a) {
1261
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Ae);
1262
+ const _e = "https://api.wral.com/search";
1263
+ function Re(a) {
1249
1264
  return a.map((e) => `uri:"${e}"`).join(" OR ");
1250
1265
  }
1251
- function Ae(a, e) {
1252
- const t = String(a || Ee).replace(/\/+$/, ""), s = new URLSearchParams({ query: _e(e), sort: "score", lang: "en" });
1266
+ function Ne(a, e) {
1267
+ const t = String(a || _e).replace(/\/+$/, ""), s = new URLSearchParams({ query: Re(e), sort: "score", lang: "en" });
1253
1268
  return `${t}/v1/query?${s}`;
1254
1269
  }
1255
- function ie(a) {
1270
+ function ne(a) {
1256
1271
  try {
1257
1272
  const e = new URL(a);
1258
1273
  if (/(^|\.)smugmug\.com$/i.test(e.hostname)) {
@@ -1267,13 +1282,13 @@ function ie(a) {
1267
1282
  }
1268
1283
  return { uri: a, title: a };
1269
1284
  }
1270
- async function Re(a, e, t) {
1271
- const r = await ((...n) => fetch(...n))(Ae(a, e));
1272
- if (!r.ok) throw new Error(`search answered ${r.status}`);
1273
- const o = await r.json(), l = new Map((o.items || []).map((n) => [n.uri, n]));
1274
- return e.map((n) => l.get(n) || ie(n));
1285
+ async function Le(a, e, t) {
1286
+ const o = await ((...n) => fetch(...n))(Ne(a, e));
1287
+ if (!o.ok) throw new Error(`search answered ${o.status}`);
1288
+ const i = await o.json(), d = new Map((i.items || []).map((n) => [n.uri, n]));
1289
+ return e.map((n) => d.get(n) || ne(n));
1275
1290
  }
1276
- const Ne = b`
1291
+ const Oe = b`
1277
1292
  .breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
1278
1293
  .breadcrumbs a { text-decoration: none; }
1279
1294
  .scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
@@ -1312,8 +1327,8 @@ const Ne = b`
1312
1327
  .cols { grid-template-columns: 1fr; }
1313
1328
  }
1314
1329
  `;
1315
- class Le extends $ {
1316
- static styles = [...F, Ne];
1330
+ class He extends $ {
1331
+ static styles = [...F, Oe];
1317
1332
  static properties = {
1318
1333
  ...$.properties,
1319
1334
  gameId: { type: String, attribute: "game-id" },
@@ -1327,7 +1342,7 @@ class Le extends $ {
1327
1342
  super(), this.gameId = "", this.searchApi = "";
1328
1343
  }
1329
1344
  async fetchData(e) {
1330
- const t = await e.getGame(this.gameId), s = Array.isArray(t.coverageUrls) ? t.coverageUrls : [], [r, o, l, n, h, c] = await Promise.all([
1345
+ const t = await e.getGame(this.gameId), s = Array.isArray(t.coverageUrls) ? t.coverageUrls : [], [o, i, d, n, h, l] = await Promise.all([
1331
1346
  e.listSchools(),
1332
1347
  e.listTeams({ sport: t.sport }),
1333
1348
  e.listConferences(),
@@ -1335,16 +1350,16 @@ class Le extends $ {
1335
1350
  e.listGames({ sport: t.sport, season: t.season }),
1336
1351
  // A search outage must not blank the box score — degrade to bare
1337
1352
  // links (fetchCoverage already degrades per-URL index misses).
1338
- s.length ? Re(this.searchApi, s).catch(() => s.map(ie)) : Promise.resolve([])
1353
+ s.length ? Le(this.searchApi, s).catch(() => s.map(ne)) : Promise.resolve([])
1339
1354
  ]);
1340
1355
  return {
1341
1356
  game: t,
1342
- schools: r.items,
1343
- teams: o.items,
1344
- conferences: l.items,
1357
+ schools: o.items,
1358
+ teams: i.items,
1359
+ conferences: d.items,
1345
1360
  rankings: n.items,
1346
1361
  games: h.items,
1347
- coverage: c
1362
+ coverage: l
1348
1363
  };
1349
1364
  }
1350
1365
  get ctx() {
@@ -1359,10 +1374,10 @@ class Le extends $ {
1359
1374
  }
1360
1375
  renderView() {
1361
1376
  const e = this.data.game;
1362
- if (!e) return i`<div class="view"><p class="empty">Game not found.</p></div>`;
1363
- const t = this.ctx, s = v(this.data.conferences), r = t.teamsById[e.awayTeamId] ? t.schoolsById[t.teamsById[e.awayTeamId].schoolId] : null, o = t.teamsById[e.homeTeamId] ? t.schoolsById[t.teamsById[e.homeTeamId].schoolId] : null, l = G(e), n = (d) => e.state === "final" && l !== d && l !== "tie" ? "opacity:0.45" : "", h = e.conferenceId ? s[e.conferenceId] : null, c = this.data.games.filter((d) => d.id !== e.id && d.state === "final" && d.gameType !== "scrimmage" && (d.homeTeamId === e.homeTeamId && d.awayTeamId === e.awayTeamId || d.homeTeamId === e.awayTeamId && d.awayTeamId === e.homeTeamId));
1364
- return i`
1365
- ${B(this, i`
1377
+ if (!e) return r`<div class="view"><p class="empty">Game not found.</p></div>`;
1378
+ const t = this.ctx, s = v(this.data.conferences), o = t.teamsById[e.awayTeamId] ? t.schoolsById[t.teamsById[e.awayTeamId].schoolId] : null, i = t.teamsById[e.homeTeamId] ? t.schoolsById[t.teamsById[e.homeTeamId].schoolId] : null, d = G(e), n = (c) => e.state === "final" && d !== c && d !== "tie" ? "opacity:0.45" : "", h = e.conferenceId ? s[e.conferenceId] : null, l = this.data.games.filter((c) => c.id !== e.id && c.state === "final" && c.gameType !== "scrimmage" && (c.homeTeamId === e.homeTeamId && c.awayTeamId === e.awayTeamId || c.homeTeamId === e.awayTeamId && c.awayTeamId === e.homeTeamId));
1379
+ return r`
1380
+ ${B(this, r`
1366
1381
  ${P(this)}
1367
1382
  <p class="breadcrumbs">
1368
1383
  <a href=${u(t.hrefs.section, { sport: e.sport, view: "scores" })}>${I(e.sport)}</a> /
@@ -1371,7 +1386,7 @@ class Le extends $ {
1371
1386
  </p>
1372
1387
  <div class="card">
1373
1388
  <div class="scorehead">
1374
- ${this.teamBlock(t, e, e.awayTeamId, r, !1)}
1389
+ ${this.teamBlock(t, e, e.awayTeamId, o, !1)}
1375
1390
  <div class="mid">
1376
1391
  <div class="bigscore">
1377
1392
  <span style=${n("away")}>${e.awayScore}</span>
@@ -1379,30 +1394,30 @@ class Le extends $ {
1379
1394
  <span style=${n("home")}>${e.homeScore}</span>
1380
1395
  </div>
1381
1396
  <div class="status">${R(e)}</div>
1382
- <div class="status">${y(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? i` · ${U(e.time)}` : p} · ${e.venue || "Venue TBD"}
1383
- ${e.broadcast ? i` · <span class="pill class">${e.broadcast}</span>` : p}</div>
1397
+ <div class="status">${y(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? r` · ${U(e.time)}` : p} · ${e.venue || "Venue TBD"}
1398
+ ${e.broadcast ? r` · <span class="pill class">${e.broadcast}</span>` : p}</div>
1384
1399
  <div class="status">
1385
1400
  <span class="pill type">${e.gameType === "conference" ? `${h?.name || "Conference"} game` : e.gameType}</span>
1386
- ${e.label ? i`<span class="pill type">Bracket ${e.label}</span>` : p}
1387
- ${(e.tags || []).map((d) => i`<span class="pill type">${d}</span>`)}
1401
+ ${e.label ? r`<span class="pill type">Bracket ${e.label}</span>` : p}
1402
+ ${(e.tags || []).map((c) => r`<span class="pill type">${c}</span>`)}
1388
1403
  </div>
1389
1404
  </div>
1390
- ${this.teamBlock(t, e, e.homeTeamId, o, !0)}
1405
+ ${this.teamBlock(t, e, e.homeTeamId, i, !0)}
1391
1406
  </div>
1392
- ${this.renderLineScore(e, r, o)}
1393
- ${e.notes ? i`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${e.notes}</p>` : p}
1407
+ ${this.renderLineScore(e, o, i)}
1408
+ ${e.notes ? r`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${e.notes}</p>` : p}
1394
1409
  </div>
1395
- ${(this.data.coverage || []).length ? i`
1410
+ ${(this.data.coverage || []).length ? r`
1396
1411
  <div class="section-title">Coverage</div>
1397
1412
  <div class="covgrid">
1398
- ${this.data.coverage.map((d) => i`
1399
- <a class="card covcard" href=${d.uri}>
1400
- ${d.image ? i`<img class="covimg" src=${d.image} alt="" loading="lazy" />` : p}
1413
+ ${this.data.coverage.map((c) => r`
1414
+ <a class="card covcard" href=${c.uri}>
1415
+ ${c.image ? r`<img class="covimg" src=${c.image} alt="" loading="lazy" />` : p}
1401
1416
  <div class="covbody">
1402
- <div class="covtitle">${d.videoDuration ? i`<span class="pill live" style="animation:none">Video</span> ` : p}${d.photos ? i`<span class="pill live" style="animation:none">Photos</span> ` : p}${d.title || d.uri}</div>
1403
- ${d.description ? i`<p class="covdesc">${d.description}</p>` : p}
1404
- ${d.author || d.publishedTime ? i`
1405
- <div class="covmeta">${[d.author, d.publishedTime ? new Date(d.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
1417
+ <div class="covtitle">${c.videoDuration ? r`<span class="pill live" style="animation:none">Video</span> ` : p}${c.photos ? r`<span class="pill live" style="animation:none">Photos</span> ` : p}${c.title || c.uri}</div>
1418
+ ${c.description ? r`<p class="covdesc">${c.description}</p>` : p}
1419
+ ${c.author || c.publishedTime ? r`
1420
+ <div class="covmeta">${[c.author, c.publishedTime ? new Date(c.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
1406
1421
  ` : p}
1407
1422
  </div>
1408
1423
  </a>
@@ -1410,50 +1425,50 @@ class Le extends $ {
1410
1425
  </div>` : p}
1411
1426
  <div class="section-title">Season context</div>
1412
1427
  <div class="cols">
1413
- ${[[e.awayTeamId, r], [e.homeTeamId, o]].map(([d, m]) => this.renderContext(t, d, m))}
1428
+ ${[[e.awayTeamId, o], [e.homeTeamId, i]].map(([c, m]) => this.renderContext(t, c, m))}
1414
1429
  </div>
1415
- ${c.length ? i`
1430
+ ${l.length ? r`
1416
1431
  <div class="section-title">Head to head this season</div>
1417
1432
  <div class="card"><ul class="gamelist">
1418
- ${c.map((d) => i`<li>
1419
- <span class="d">${y(d.date)}</span>${R(d)}
1420
- <span class="opp">${T(t, d.awayTeamId)} ${d.awayScore}, ${T(t, d.homeTeamId)} ${d.homeScore}</span>
1421
- <a class="box" href=${u(t.hrefs.game, { sport: e.sport, id: d.id })}>Box score →</a>
1433
+ ${l.map((c) => r`<li>
1434
+ <span class="d">${y(c.date)}</span>${R(c)}
1435
+ <span class="opp">${T(t, c.awayTeamId)} ${c.awayScore}, ${T(t, c.homeTeamId)} ${c.homeScore}</span>
1436
+ <a class="box" href=${u(t.hrefs.game, { sport: e.sport, id: c.id })}>Box score →</a>
1422
1437
  </li>`)}
1423
1438
  </ul></div>` : p}
1424
1439
  `)}
1425
1440
  `;
1426
1441
  }
1427
- teamBlock(e, t, s, r, o) {
1428
- if (!r) return i`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
1429
- const l = e.teamsById[s], n = e.records[s], h = _(r, 58);
1430
- return i`
1431
- <div class="teamblock ${o ? "right" : ""}">
1432
- ${h ? i`<img class="crest logo" alt="" loading="lazy" src=${h} />` : i`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${E(r.colorPrimary || "#030711")}">${j(r)}</span>`}
1442
+ teamBlock(e, t, s, o, i) {
1443
+ if (!o) return r`<div class="teamblock ${i ? "right" : ""}"><div class="tname">TBD</div></div>`;
1444
+ const d = e.teamsById[s], n = e.records[s], h = A(o, 58);
1445
+ return r`
1446
+ <div class="teamblock ${i ? "right" : ""}">
1447
+ ${h ? r`<img class="crest logo" alt="" loading="lazy" src=${h} />` : r`<span class="crest" style="background:${o.colorPrimary || "#030711"};color:${E(o.colorPrimary || "#030711")}">${j(o)}</span>`}
1433
1448
  <div>
1434
- <div class="tname">${Y(e, s, t.date)}<a href=${u(e.hrefs.school, { id: r.id })}>${r.name}</a></div>
1435
- <div class="trec">${r.mascot || ""} · ${w(n)}${l?.conferenceId ? i` · ${w(n, !0)} conf` : p}</div>
1449
+ <div class="tname">${Y(e, s, t.date)}<a href=${u(e.hrefs.school, { id: o.id })}>${o.name}</a></div>
1450
+ <div class="trec">${o.mascot || ""} · ${w(n)}${d?.conferenceId ? r` · ${w(n, !0)} conf` : p}</div>
1436
1451
  </div>
1437
1452
  </div>
1438
1453
  `;
1439
1454
  }
1440
1455
  renderLineScore(e, t, s) {
1441
- const r = e.periodScores || [];
1442
- if (!r.length)
1443
- return i`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
1444
- const o = Math.max(4, ...r.map((c) => c.period)), l = (c) => c <= 4 ? String(c) : `OT${c > 5 ? c - 4 : ""}`, n = (c, d) => {
1445
- const m = r.find((f) => f.period === d);
1446
- return m ? m[c] : e.state === "final" ? 0 : "·";
1447
- }, h = (c, d, m) => i`
1456
+ const o = e.periodScores || [];
1457
+ if (!o.length)
1458
+ return r`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
1459
+ const i = Math.max(4, ...o.map((l) => l.period)), d = (l) => l <= 4 ? String(l) : `OT${l > 5 ? l - 4 : ""}`, n = (l, c) => {
1460
+ const m = o.find((f) => f.period === c);
1461
+ return m ? m[l] : e.state === "final" ? 0 : "·";
1462
+ }, h = (l, c, m) => r`
1448
1463
  <tr>
1449
- <td class="teamcell">${C(c, 20)}${c?.abbr || "TBD"}</td>
1450
- ${Array.from({ length: o }, (f, g) => i`<td class="num">${n(d, g + 1)}</td>`)}
1464
+ <td class="teamcell">${C(l, 20)}${l?.abbr || "TBD"}</td>
1465
+ ${Array.from({ length: i }, (f, g) => r`<td class="num">${n(c, g + 1)}</td>`)}
1451
1466
  <td class="num" style="font-weight:700">${m}</td>
1452
1467
  </tr>`;
1453
- return i`
1468
+ return r`
1454
1469
  <div class="tablewrap" style="border-top:1px solid var(--hsot-gray-2)">
1455
1470
  <table class="data" style="max-width:560px;margin:0.6rem auto 0.9rem">
1456
- <thead><tr><th>Team</th>${Array.from({ length: o }, (c, d) => i`<th class="num">${l(d + 1)}</th>`)}<th class="num">T</th></tr></thead>
1471
+ <thead><tr><th>Team</th>${Array.from({ length: i }, (l, c) => r`<th class="num">${d(c + 1)}</th>`)}<th class="num">T</th></tr></thead>
1457
1472
  <tbody>
1458
1473
  ${h(t, "away", e.awayScore)}
1459
1474
  ${h(s, "home", e.homeScore)}
@@ -1464,24 +1479,24 @@ class Le extends $ {
1464
1479
  }
1465
1480
  renderContext(e, t, s) {
1466
1481
  if (!s) return p;
1467
- const r = e.records[t], o = q(this.data.games, t);
1468
- return i`
1482
+ const o = e.records[t], i = q(this.data.games, t);
1483
+ return r`
1469
1484
  <div class="card ctxcard">
1470
1485
  <div class="who">${C(s)}${s.name}</div>
1471
1486
  <div class="row">
1472
1487
  <span>Last 5: ${K(e, t)}</span>
1473
- <span>Streak: <b>${r ? L(r.results) : "·"}</b></span>
1474
- <span>PF/PA: <b>${r ? `${r.pf} / ${r.pa}` : "·"}</b></span>
1475
- <span>Next: ${o ? i`${y(o.date, { month: "numeric", day: "numeric" })}
1476
- ${o.homeTeamId === t ? "vs" : "at"} ${A(e, o.homeTeamId === t ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
1488
+ <span>Streak: <b>${o ? L(o.results) : "·"}</b></span>
1489
+ <span>PF/PA: <b>${o ? `${o.pf} / ${o.pa}` : "·"}</b></span>
1490
+ <span>Next: ${i ? r`${y(i.date, { month: "numeric", day: "numeric" })}
1491
+ ${i.homeTeamId === t ? "vs" : "at"} ${_(e, i.homeTeamId === t ? i.awayTeamId : i.homeTeamId)}` : "·"}</span>
1477
1492
  </div>
1478
1493
  </div>
1479
1494
  `;
1480
1495
  }
1481
1496
  }
1482
- globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", Le);
1483
- const Oe = 250, He = 2;
1484
- class Ue extends ee {
1497
+ globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", He);
1498
+ const Ue = 250, Me = 2;
1499
+ class je extends ee {
1485
1500
  static properties = {
1486
1501
  api: { type: String },
1487
1502
  schoolHref: { type: String, attribute: "school-href" },
@@ -1561,11 +1576,11 @@ class Ue extends ee {
1561
1576
  }
1562
1577
  onInput(e) {
1563
1578
  const t = e.target.value.trim();
1564
- if (clearTimeout(this.debounceTimer), t.length < He) {
1579
+ if (clearTimeout(this.debounceTimer), t.length < Me) {
1565
1580
  this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
1566
1581
  return;
1567
1582
  }
1568
- this.debounceTimer = setTimeout(() => this.search(t), Oe);
1583
+ this.debounceTimer = setTimeout(() => this.search(t), Ue);
1569
1584
  }
1570
1585
  async search(e) {
1571
1586
  this.abortController?.abort(), this.abortController = new AbortController();
@@ -1575,8 +1590,8 @@ class Ue extends ee {
1575
1590
  });
1576
1591
  if (!s.ok)
1577
1592
  return;
1578
- const r = await s.json();
1579
- this.results = r.items || [], this.activeIndex = -1, this.searched = !0, this.open = !0;
1593
+ const o = await s.json();
1594
+ this.results = o.items || [], this.activeIndex = -1, this.searched = !0, this.open = !0;
1580
1595
  } catch (t) {
1581
1596
  t.name !== "AbortError" && console.warn("school search failed", t);
1582
1597
  }
@@ -1610,36 +1625,36 @@ class Ue extends ee {
1610
1625
  return [e.location, e.county && `${e.county} County`].filter(Boolean).join(" — ");
1611
1626
  }
1612
1627
  renderOption(e, t) {
1613
- const s = this.where(e), r = (o) => {
1614
- o.preventDefault(), this.go(e);
1628
+ const s = this.where(e), o = (i) => {
1629
+ i.preventDefault(), this.go(e);
1615
1630
  };
1616
- return i`
1631
+ return r`
1617
1632
  <li
1618
1633
  id="school-option-${t}"
1619
1634
  role="option"
1620
1635
  aria-selected="${t === this.activeIndex ? "true" : "false"}"
1621
- @pointerdown="${r}"
1636
+ @pointerdown="${o}"
1622
1637
  @mousemove="${() => {
1623
1638
  this.activeIndex = t;
1624
1639
  }}"
1625
1640
  >
1626
1641
  <span class="name">${e.name}</span>
1627
- ${s ? i`<span class="where">${s}</span>` : p}
1642
+ ${s ? r`<span class="where">${s}</span>` : p}
1628
1643
  </li>
1629
1644
  `;
1630
1645
  }
1631
1646
  renderListbox() {
1632
- const e = this.searched && !this.results.length, t = i`<li class="empty">No schools found</li>`;
1633
- return i`
1647
+ const e = this.searched && !this.results.length, t = r`<li class="empty">No schools found</li>`;
1648
+ return r`
1634
1649
  <ul id="school-search-listbox" role="listbox" aria-label="Schools">
1635
- ${this.results.map((s, r) => this.renderOption(s, r))}
1650
+ ${this.results.map((s, o) => this.renderOption(s, o))}
1636
1651
  ${e ? t : p}
1637
1652
  </ul>
1638
1653
  `;
1639
1654
  }
1640
1655
  render() {
1641
1656
  const e = this.activeIndex >= 0 ? `school-option-${this.activeIndex}` : "";
1642
- return i`
1657
+ return r`
1643
1658
  <input
1644
1659
  type="text"
1645
1660
  role="combobox"
@@ -1658,22 +1673,22 @@ class Ue extends ee {
1658
1673
  `;
1659
1674
  }
1660
1675
  }
1661
- globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", Ue);
1676
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", je);
1662
1677
  export {
1663
1678
  H as D,
1664
- Le as H,
1665
- ze as a,
1666
- Pe as b,
1667
- Ue as c,
1668
- Ce as d,
1669
- De as e,
1679
+ He as H,
1680
+ Pe as a,
1681
+ Ae as b,
1682
+ je as c,
1683
+ Fe as d,
1684
+ ze as e,
1670
1685
  z as f,
1671
- ce as g,
1686
+ de as g,
1672
1687
  u as h,
1673
1688
  G as i,
1674
- je as j,
1689
+ qe as j,
1675
1690
  L as k,
1676
- Ie as p,
1691
+ Se as p,
1677
1692
  w as r,
1678
1693
  ae as s,
1679
1694
  W as t