@wral/hsot-data 0.1.13 → 0.1.15

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,15 +1,15 @@
1
- const V = globalThis, nt = V.ShadowRoot && (V.ShadyCSS === void 0 || V.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = /* @__PURE__ */ Symbol(), wt = /* @__PURE__ */ new WeakMap();
2
- let Nt = class {
1
+ const K = globalThis, lt = K.ShadowRoot && (K.ShadyCSS === void 0 || K.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ct = /* @__PURE__ */ Symbol(), kt = /* @__PURE__ */ new WeakMap();
2
+ let Ot = class {
3
3
  constructor(t, e, s) {
4
- if (this._$cssResult$ = !0, s !== lt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
4
+ if (this._$cssResult$ = !0, s !== ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
5
  this.cssText = t, this.t = e;
6
6
  }
7
7
  get styleSheet() {
8
8
  let t = this.o;
9
9
  const e = this.t;
10
- if (nt && t === void 0) {
10
+ if (lt && t === void 0) {
11
11
  const s = e !== void 0 && e.length === 1;
12
- s && (t = wt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && wt.set(e, t));
12
+ s && (t = kt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && kt.set(e, t));
13
13
  }
14
14
  return t;
15
15
  }
@@ -17,28 +17,28 @@ let Nt = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const ae = (a) => new Nt(typeof a == "string" ? a : a + "", void 0, lt), b = (a, ...t) => {
20
+ const ne = (a) => new Ot(typeof a == "string" ? a : a + "", void 0, ct), b = (a, ...t) => {
21
21
  const e = a.length === 1 ? a[0] : t.reduce((s, r, o) => s + ((i) => {
22
22
  if (i._$cssResult$ === !0) return i.cssText;
23
23
  if (typeof i == "number") return i;
24
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
25
  })(r) + a[o + 1], a[0]);
26
- return new Nt(e, a, lt);
27
- }, re = (a, t) => {
28
- if (nt) a.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
26
+ return new Ot(e, a, ct);
27
+ }, le = (a, t) => {
28
+ if (lt) a.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
29
29
  else for (const e of t) {
30
- const s = document.createElement("style"), r = V.litNonce;
30
+ const s = document.createElement("style"), r = K.litNonce;
31
31
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, a.appendChild(s);
32
32
  }
33
- }, xt = nt ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
33
+ }, St = lt ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
34
34
  let e = "";
35
35
  for (const s of t.cssRules) e += s.cssText;
36
- return ae(e);
36
+ return ne(e);
37
37
  })(a) : a;
38
- const { is: oe, defineProperty: ie, getOwnPropertyDescriptor: ne, getOwnPropertyNames: le, getOwnPropertySymbols: ce, getPrototypeOf: he } = Object, X = globalThis, kt = X.trustedTypes, de = kt ? kt.emptyScript : "", pe = X.reactiveElementPolyfillSupport, B = (a, t) => a, it = { toAttribute(a, t) {
38
+ const { is: ce, defineProperty: he, getOwnPropertyDescriptor: de, getOwnPropertyNames: pe, getOwnPropertySymbols: me, getPrototypeOf: ue } = Object, et = globalThis, _t = et.trustedTypes, fe = _t ? _t.emptyScript : "", ge = et.reactiveElementPolyfillSupport, N = (a, t) => a, nt = { toAttribute(a, t) {
39
39
  switch (t) {
40
40
  case Boolean:
41
- a = a ? de : null;
41
+ a = a ? fe : null;
42
42
  break;
43
43
  case Object:
44
44
  case Array:
@@ -63,23 +63,23 @@ const { is: oe, defineProperty: ie, getOwnPropertyDescriptor: ne, getOwnProperty
63
63
  }
64
64
  }
65
65
  return e;
66
- } }, Ut = (a, t) => !oe(a, t), _t = { attribute: !0, type: String, converter: it, reflect: !1, useDefault: !1, hasChanged: Ut };
67
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), X.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
- let I = class extends HTMLElement {
66
+ } }, Ut = (a, t) => !ce(a, t), At = { attribute: !0, type: String, converter: nt, reflect: !1, useDefault: !1, hasChanged: Ut };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), et.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
+ let C = class extends HTMLElement {
69
69
  static addInitializer(t) {
70
70
  this._$Ei(), (this.l ??= []).push(t);
71
71
  }
72
72
  static get observedAttributes() {
73
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
74
  }
75
- static createProperty(t, e = _t) {
75
+ static createProperty(t, e = At) {
76
76
  if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
77
77
  const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, e);
78
- r !== void 0 && ie(this.prototype, t, r);
78
+ r !== void 0 && he(this.prototype, t, r);
79
79
  }
80
80
  }
81
81
  static getPropertyDescriptor(t, e, s) {
82
- const { get: r, set: o } = ne(this.prototype, t) ?? { get() {
82
+ const { get: r, set: o } = de(this.prototype, t) ?? { get() {
83
83
  return this[e];
84
84
  }, set(i) {
85
85
  this[e] = i;
@@ -90,17 +90,17 @@ let I = class extends HTMLElement {
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(t) {
93
- return this.elementProperties.get(t) ?? _t;
93
+ return this.elementProperties.get(t) ?? At;
94
94
  }
95
95
  static _$Ei() {
96
- if (this.hasOwnProperty(B("elementProperties"))) return;
97
- const t = he(this);
96
+ if (this.hasOwnProperty(N("elementProperties"))) return;
97
+ const t = ue(this);
98
98
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
99
99
  }
100
100
  static finalize() {
101
- if (this.hasOwnProperty(B("finalized"))) return;
102
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(B("properties"))) {
103
- const e = this.properties, s = [...le(e), ...ce(e)];
101
+ if (this.hasOwnProperty(N("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
103
+ const e = this.properties, s = [...pe(e), ...me(e)];
104
104
  for (const r of s) this.createProperty(r, e[r]);
105
105
  }
106
106
  const t = this[Symbol.metadata];
@@ -119,8 +119,8 @@ let I = class extends HTMLElement {
119
119
  const e = [];
120
120
  if (Array.isArray(t)) {
121
121
  const s = new Set(t.flat(1 / 0).reverse());
122
- for (const r of s) e.unshift(xt(r));
123
- } else t !== void 0 && e.push(xt(t));
122
+ for (const r of s) e.unshift(St(r));
123
+ } else t !== void 0 && e.push(St(t));
124
124
  return e;
125
125
  }
126
126
  static _$Eu(t, e) {
@@ -146,7 +146,7 @@ let I = class extends HTMLElement {
146
146
  }
147
147
  createRenderRoot() {
148
148
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
- return re(t, this.constructor.elementStyles), t;
149
+ return le(t, this.constructor.elementStyles), t;
150
150
  }
151
151
  connectedCallback() {
152
152
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
@@ -162,14 +162,14 @@ let I = class extends HTMLElement {
162
162
  _$ET(t, e) {
163
163
  const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
164
164
  if (r !== void 0 && s.reflect === !0) {
165
- const o = (s.converter?.toAttribute !== void 0 ? s.converter : it).toAttribute(e, s.type);
165
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : nt).toAttribute(e, s.type);
166
166
  this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
167
167
  }
168
168
  }
169
169
  _$AK(t, e) {
170
170
  const s = this.constructor, r = s._$Eh.get(t);
171
171
  if (r !== void 0 && this._$Em !== r) {
172
- const o = s.getPropertyOptions(r), i = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : it;
172
+ const o = s.getPropertyOptions(r), i = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : nt;
173
173
  this._$Em = r;
174
174
  const n = i.fromAttribute(e, o.type);
175
175
  this[r] = n ?? this._$Ej?.get(r) ?? n, this._$Em = null;
@@ -246,70 +246,70 @@ let I = class extends HTMLElement {
246
246
  firstUpdated(t) {
247
247
  }
248
248
  };
249
- I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[B("elementProperties")] = /* @__PURE__ */ new Map(), I[B("finalized")] = /* @__PURE__ */ new Map(), pe?.({ ReactiveElement: I }), (X.reactiveElementVersions ??= []).push("2.1.2");
250
- const ct = globalThis, St = (a) => a, Y = ct.trustedTypes, At = Y ? Y.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ot = "$lit$", k = `lit$${Math.random().toFixed(9).slice(2)}$`, Ht = "?" + k, me = `<${Ht}>`, T = document, F = () => T.createComment(""), N = (a) => a === null || typeof a != "object" && typeof a != "function", ht = Array.isArray, fe = (a) => ht(a) || typeof a?.[Symbol.iterator] == "function", rt = `[
251
- \f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, It = />/g, S = RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ct = /'/g, Et = /"/g, Mt = /^(?:script|style|textarea|title)$/i, Lt = (a) => (t, ...e) => ({ _$litType$: a, strings: t, values: e }), c = Lt(1), Pt = Lt(2), P = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), A = T.createTreeWalker(T, 129);
253
- function jt(a, t) {
254
- if (!ht(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
- return At !== void 0 ? At.createHTML(t) : t;
256
- }
257
- const ue = (a, t) => {
249
+ C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[N("elementProperties")] = /* @__PURE__ */ new Map(), C[N("finalized")] = /* @__PURE__ */ new Map(), ge?.({ ReactiveElement: C }), (et.reactiveElementVersions ??= []).push("2.1.2");
250
+ const ht = globalThis, Tt = (a) => a, Q = ht.trustedTypes, It = Q ? Q.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ht = "$lit$", S = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + S, ve = `<${Lt}>`, I = document, F = () => I.createComment(""), M = (a) => a === null || typeof a != "object" && typeof a != "function", dt = Array.isArray, $e = (a) => dt(a) || typeof a?.[Symbol.iterator] == "function", ot = `[
251
+ \f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ct = /-->/g, Et = />/g, A = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Pt = /'/g, Dt = /"/g, jt = /^(?:script|style|textarea|title)$/i, qt = (a) => (t, ...e) => ({ _$litType$: a, strings: t, values: e }), l = qt(1), zt = qt(2), D = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Bt = /* @__PURE__ */ new WeakMap(), T = I.createTreeWalker(I, 129);
253
+ function Wt(a, t) {
254
+ if (!dt(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
+ return It !== void 0 ? It.createHTML(t) : t;
256
+ }
257
+ const be = (a, t) => {
258
258
  const e = a.length - 1, s = [];
259
259
  let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = R;
260
260
  for (let n = 0; n < e; n++) {
261
261
  const d = a[n];
262
- let l, h, p = -1, f = 0;
263
- for (; f < d.length && (i.lastIndex = f, h = i.exec(d), h !== null); ) f = i.lastIndex, i === R ? h[1] === "!--" ? i = Tt : h[1] !== void 0 ? i = It : h[2] !== void 0 ? (Mt.test(h[2]) && (r = RegExp("</" + h[2], "g")), i = S) : h[3] !== void 0 && (i = S) : i === S ? h[0] === ">" ? (i = r ?? R, p = -1) : h[1] === void 0 ? p = -2 : (p = i.lastIndex - h[2].length, l = h[1], i = h[3] === void 0 ? S : h[3] === '"' ? Et : Ct) : i === Et || i === Ct ? i = S : i === Tt || i === It ? i = R : (i = S, r = void 0);
264
- const u = i === S && a[n + 1].startsWith("/>") ? " " : "";
265
- o += i === R ? d + me : p >= 0 ? (s.push(l), d.slice(0, p) + Ot + d.slice(p) + k + u) : d + k + (p === -2 ? n : u);
262
+ let c, h, p = -1, u = 0;
263
+ for (; u < d.length && (i.lastIndex = u, h = i.exec(d), h !== null); ) u = i.lastIndex, i === R ? h[1] === "!--" ? i = Ct : h[1] !== void 0 ? i = Et : h[2] !== void 0 ? (jt.test(h[2]) && (r = RegExp("</" + h[2], "g")), i = A) : h[3] !== void 0 && (i = A) : i === A ? h[0] === ">" ? (i = r ?? R, p = -1) : h[1] === void 0 ? p = -2 : (p = i.lastIndex - h[2].length, c = h[1], i = h[3] === void 0 ? A : h[3] === '"' ? Dt : Pt) : i === Dt || i === Pt ? i = A : i === Ct || i === Et ? i = R : (i = A, r = void 0);
264
+ const f = i === A && a[n + 1].startsWith("/>") ? " " : "";
265
+ o += i === R ? d + ve : p >= 0 ? (s.push(c), d.slice(0, p) + Ht + d.slice(p) + S + f) : d + S + (p === -2 ? n : f);
266
266
  }
267
- return [jt(a, o + (a[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
267
+ return [Wt(a, o + (a[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
268
268
  };
269
- class U {
269
+ class O {
270
270
  constructor({ strings: t, _$litType$: e }, s) {
271
271
  let r;
272
272
  this.parts = [];
273
273
  let o = 0, i = 0;
274
- const n = t.length - 1, d = this.parts, [l, h] = ue(t, e);
275
- if (this.el = U.createElement(l, s), A.currentNode = this.el.content, e === 2 || e === 3) {
274
+ const n = t.length - 1, d = this.parts, [c, h] = be(t, e);
275
+ if (this.el = O.createElement(c, s), T.currentNode = this.el.content, e === 2 || e === 3) {
276
276
  const p = this.el.content.firstChild;
277
277
  p.replaceWith(...p.childNodes);
278
278
  }
279
- for (; (r = A.nextNode()) !== null && d.length < n; ) {
279
+ for (; (r = T.nextNode()) !== null && d.length < n; ) {
280
280
  if (r.nodeType === 1) {
281
- if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith(Ot)) {
282
- const f = h[i++], u = r.getAttribute(p).split(k), $ = /([.?@])?(.*)/.exec(f);
283
- d.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? ve : $[1] === "?" ? $e : $[1] === "@" ? be : tt }), r.removeAttribute(p);
284
- } else p.startsWith(k) && (d.push({ type: 6, index: o }), r.removeAttribute(p));
285
- if (Mt.test(r.tagName)) {
286
- const p = r.textContent.split(k), f = p.length - 1;
287
- if (f > 0) {
288
- r.textContent = Y ? Y.emptyScript : "";
289
- for (let u = 0; u < f; u++) r.append(p[u], F()), A.nextNode(), d.push({ type: 2, index: ++o });
290
- r.append(p[f], F());
281
+ if (r.hasAttributes()) for (const p of r.getAttributeNames()) if (p.endsWith(Ht)) {
282
+ const u = h[i++], f = r.getAttribute(p).split(S), v = /([.?@])?(.*)/.exec(u);
283
+ d.push({ type: 1, index: o, name: v[2], strings: f, ctor: v[1] === "." ? we : v[1] === "?" ? xe : v[1] === "@" ? ke : st }), r.removeAttribute(p);
284
+ } else p.startsWith(S) && (d.push({ type: 6, index: o }), r.removeAttribute(p));
285
+ if (jt.test(r.tagName)) {
286
+ const p = r.textContent.split(S), u = p.length - 1;
287
+ if (u > 0) {
288
+ r.textContent = Q ? Q.emptyScript : "";
289
+ for (let f = 0; f < u; f++) r.append(p[f], F()), T.nextNode(), d.push({ type: 2, index: ++o });
290
+ r.append(p[u], F());
291
291
  }
292
292
  }
293
- } else if (r.nodeType === 8) if (r.data === Ht) d.push({ type: 2, index: o });
293
+ } else if (r.nodeType === 8) if (r.data === Lt) d.push({ type: 2, index: o });
294
294
  else {
295
295
  let p = -1;
296
- for (; (p = r.data.indexOf(k, p + 1)) !== -1; ) d.push({ type: 7, index: o }), p += k.length - 1;
296
+ for (; (p = r.data.indexOf(S, p + 1)) !== -1; ) d.push({ type: 7, index: o }), p += S.length - 1;
297
297
  }
298
298
  o++;
299
299
  }
300
300
  }
301
301
  static createElement(t, e) {
302
- const s = T.createElement("template");
302
+ const s = I.createElement("template");
303
303
  return s.innerHTML = t, s;
304
304
  }
305
305
  }
306
- function D(a, t, e = a, s) {
307
- if (t === P) return t;
306
+ function z(a, t, e = a, s) {
307
+ if (t === D) return t;
308
308
  let r = s !== void 0 ? e._$Co?.[s] : e._$Cl;
309
- const o = N(t) ? void 0 : t._$litDirective$;
310
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = D(a, r._$AS(a, t.values), r, s)), t;
309
+ const o = M(t) ? void 0 : t._$litDirective$;
310
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(a), r._$AT(a, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = r : e._$Cl = r), r !== void 0 && (t = z(a, r._$AS(a, t.values), r, s)), t;
311
311
  }
312
- class ge {
312
+ class ye {
313
313
  constructor(t, e) {
314
314
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
315
315
  }
@@ -320,24 +320,24 @@ class ge {
320
320
  return this._$AM._$AU;
321
321
  }
322
322
  u(t) {
323
- const { el: { content: e }, parts: s } = this._$AD, r = (t?.creationScope ?? T).importNode(e, !0);
324
- A.currentNode = r;
325
- let o = A.nextNode(), i = 0, n = 0, d = s[0];
323
+ const { el: { content: e }, parts: s } = this._$AD, r = (t?.creationScope ?? I).importNode(e, !0);
324
+ T.currentNode = r;
325
+ let o = T.nextNode(), i = 0, n = 0, d = s[0];
326
326
  for (; d !== void 0; ) {
327
327
  if (i === d.index) {
328
- let l;
329
- d.type === 2 ? l = new M(o, o.nextSibling, this, t) : d.type === 1 ? l = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (l = new ye(o, this, t)), this._$AV.push(l), d = s[++n];
328
+ let c;
329
+ d.type === 2 ? c = new L(o, o.nextSibling, this, t) : d.type === 1 ? c = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (c = new Se(o, this, t)), this._$AV.push(c), d = s[++n];
330
330
  }
331
- i !== d?.index && (o = A.nextNode(), i++);
331
+ i !== d?.index && (o = T.nextNode(), i++);
332
332
  }
333
- return A.currentNode = T, r;
333
+ return T.currentNode = I, r;
334
334
  }
335
335
  p(t) {
336
336
  let e = 0;
337
337
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
338
338
  }
339
339
  }
340
- class M {
340
+ class L {
341
341
  get _$AU() {
342
342
  return this._$AM?._$AU ?? this._$Cv;
343
343
  }
@@ -356,7 +356,7 @@ class M {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(t, e = this) {
359
- t = D(this, t, e), N(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : fe(t) ? this.k(t) : this._(t);
359
+ t = z(this, t, e), M(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== D && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : $e(t) ? this.k(t) : this._(t);
360
360
  }
361
361
  O(t) {
362
362
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -365,38 +365,38 @@ class M {
365
365
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
366
366
  }
367
367
  _(t) {
368
- this._$AH !== m && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(T.createTextNode(t)), this._$AH = t;
368
+ this._$AH !== m && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(I.createTextNode(t)), this._$AH = t;
369
369
  }
370
370
  $(t) {
371
- const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = U.createElement(jt(s.h, s.h[0]), this.options)), s);
371
+ const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(Wt(s.h, s.h[0]), this.options)), s);
372
372
  if (this._$AH?._$AD === r) this._$AH.p(e);
373
373
  else {
374
- const o = new ge(r, this), i = o.u(this.options);
374
+ const o = new ye(r, this), i = o.u(this.options);
375
375
  o.p(e), this.T(i), this._$AH = o;
376
376
  }
377
377
  }
378
378
  _$AC(t) {
379
- let e = Dt.get(t.strings);
380
- return e === void 0 && Dt.set(t.strings, e = new U(t)), e;
379
+ let e = Bt.get(t.strings);
380
+ return e === void 0 && Bt.set(t.strings, e = new O(t)), e;
381
381
  }
382
382
  k(t) {
383
- ht(this._$AH) || (this._$AH = [], this._$AR());
383
+ dt(this._$AH) || (this._$AH = [], this._$AR());
384
384
  const e = this._$AH;
385
385
  let s, r = 0;
386
- for (const o of t) r === e.length ? e.push(s = new M(this.O(F()), this.O(F()), this, this.options)) : s = e[r], s._$AI(o), r++;
386
+ for (const o of t) r === e.length ? e.push(s = new L(this.O(F()), this.O(F()), this, this.options)) : s = e[r], s._$AI(o), r++;
387
387
  r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
388
388
  }
389
389
  _$AR(t = this._$AA.nextSibling, e) {
390
390
  for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
391
- const s = St(t).nextSibling;
392
- St(t).remove(), t = s;
391
+ const s = Tt(t).nextSibling;
392
+ Tt(t).remove(), t = s;
393
393
  }
394
394
  }
395
395
  setConnected(t) {
396
396
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
397
397
  }
398
398
  }
399
- class tt {
399
+ class st {
400
400
  get tagName() {
401
401
  return this.element.tagName;
402
402
  }
@@ -409,11 +409,11 @@ class tt {
409
409
  _$AI(t, e = this, s, r) {
410
410
  const o = this.strings;
411
411
  let i = !1;
412
- if (o === void 0) t = D(this, t, e, 0), i = !N(t) || t !== this._$AH && t !== P, i && (this._$AH = t);
412
+ if (o === void 0) t = z(this, t, e, 0), i = !M(t) || t !== this._$AH && t !== D, i && (this._$AH = t);
413
413
  else {
414
414
  const n = t;
415
- let d, l;
416
- for (t = o[0], d = 0; d < o.length - 1; d++) l = D(this, n[s + d], e, d), l === P && (l = this._$AH[d]), i ||= !N(l) || l !== this._$AH[d], l === m ? t = m : t !== m && (t += (l ?? "") + o[d + 1]), this._$AH[d] = l;
415
+ let d, c;
416
+ for (t = o[0], d = 0; d < o.length - 1; d++) c = z(this, n[s + d], e, d), c === D && (c = this._$AH[d]), i ||= !M(c) || c !== this._$AH[d], c === m ? t = m : t !== m && (t += (c ?? "") + o[d + 1]), this._$AH[d] = c;
417
417
  }
418
418
  i && !r && this.j(t);
419
419
  }
@@ -421,7 +421,7 @@ class tt {
421
421
  t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
422
422
  }
423
423
  }
424
- class ve extends tt {
424
+ class we extends st {
425
425
  constructor() {
426
426
  super(...arguments), this.type = 3;
427
427
  }
@@ -429,7 +429,7 @@ class ve extends tt {
429
429
  this.element[this.name] = t === m ? void 0 : t;
430
430
  }
431
431
  }
432
- class $e extends tt {
432
+ class xe extends st {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 4;
435
435
  }
@@ -437,12 +437,12 @@ class $e extends tt {
437
437
  this.element.toggleAttribute(this.name, !!t && t !== m);
438
438
  }
439
439
  }
440
- class be extends tt {
440
+ class ke extends st {
441
441
  constructor(t, e, s, r, o) {
442
442
  super(t, e, s, r, o), this.type = 5;
443
443
  }
444
444
  _$AI(t, e = this) {
445
- if ((t = D(this, t, e, 0) ?? m) === P) return;
445
+ if ((t = z(this, t, e, 0) ?? m) === D) return;
446
446
  const s = this._$AH, r = t === m && s !== m || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== m && (s === m || r);
447
447
  r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
448
448
  }
@@ -450,7 +450,7 @@ class be extends tt {
450
450
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
451
451
  }
452
452
  }
453
- class ye {
453
+ class Se {
454
454
  constructor(t, e, s) {
455
455
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
456
456
  }
@@ -458,22 +458,22 @@ class ye {
458
458
  return this._$AM._$AU;
459
459
  }
460
460
  _$AI(t) {
461
- D(this, t);
461
+ z(this, t);
462
462
  }
463
463
  }
464
- const we = ct.litHtmlPolyfillSupport;
465
- we?.(U, M), (ct.litHtmlVersions ??= []).push("3.3.3");
466
- const xe = (a, t, e) => {
464
+ const _e = ht.litHtmlPolyfillSupport;
465
+ _e?.(O, L), (ht.litHtmlVersions ??= []).push("3.3.3");
466
+ const Ae = (a, t, e) => {
467
467
  const s = e?.renderBefore ?? t;
468
468
  let r = s._$litPart$;
469
469
  if (r === void 0) {
470
470
  const o = e?.renderBefore ?? null;
471
- s._$litPart$ = r = new M(t.insertBefore(F(), o), o, void 0, e ?? {});
471
+ s._$litPart$ = r = new L(t.insertBefore(F(), o), o, void 0, e ?? {});
472
472
  }
473
473
  return r._$AI(a), r;
474
474
  };
475
- const dt = globalThis;
476
- class E extends I {
475
+ const pt = globalThis;
476
+ class P extends C {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
479
  }
@@ -483,7 +483,7 @@ class E extends I {
483
483
  }
484
484
  update(t) {
485
485
  const e = this.render();
486
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = xe(e, this.renderRoot, this.renderOptions);
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ae(e, this.renderRoot, this.renderOptions);
487
487
  }
488
488
  connectedCallback() {
489
489
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -492,41 +492,41 @@ class E extends I {
492
492
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
493
  }
494
494
  render() {
495
- return P;
495
+ return D;
496
496
  }
497
497
  }
498
- E._$litElement$ = !0, E.finalized = !0, dt.litElementHydrateSupport?.({ LitElement: E });
499
- const ke = dt.litElementPolyfillSupport;
500
- ke?.({ LitElement: E });
501
- (dt.litElementVersions ??= []).push("4.2.2");
502
- const _e = 50;
503
- function Se(a = {}) {
498
+ P._$litElement$ = !0, P.finalized = !0, pt.litElementHydrateSupport?.({ LitElement: P });
499
+ const Te = pt.litElementPolyfillSupport;
500
+ Te?.({ LitElement: P });
501
+ (pt.litElementVersions ??= []).push("4.2.2");
502
+ const Ie = 50;
503
+ function Ce(a = {}) {
504
504
  const t = Object.entries(a).filter(([, s]) => s != null && s !== "");
505
505
  if (!t.length) return "";
506
506
  const e = new URLSearchParams();
507
507
  return t.forEach(([s, r]) => e.set(s, String(r))), `?${e.toString()}`;
508
508
  }
509
- function Ae({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
509
+ function Ee({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
510
510
  if (!a) throw new Error("createClient requires a baseUrl");
511
511
  const s = a.replace(/\/+$/, ""), r = e || ((...n) => fetch(...n));
512
512
  async function o(n) {
513
513
  const d = { Accept: "application/json" };
514
514
  t && (d.Authorization = `Bearer ${t}`);
515
- const l = await r(`${s}${n}`, { headers: d });
516
- if (!l.ok) {
517
- const h = new Error(`api-hsot ${l.status} on ${n}`);
518
- throw h.status = l.status, h;
515
+ const c = await r(`${s}${n}`, { headers: d });
516
+ if (!c.ok) {
517
+ const h = new Error(`api-hsot ${c.status} on ${n}`);
518
+ throw h.status = c.status, h;
519
519
  }
520
- return l.json();
520
+ return c.json();
521
521
  }
522
522
  async function i(n, d = {}) {
523
- const l = [];
523
+ const c = [];
524
524
  let h = null;
525
- for (let p = 0; p < _e; p += 1) {
526
- const f = Se(h ? { ...d, cursor: h } : d), u = await o(`${n}${f}`);
527
- if (l.push(...u.items || []), h = u.nextCursor || null, !h) break;
525
+ for (let p = 0; p < Ie; p += 1) {
526
+ const u = Ce(h ? { ...d, cursor: h } : d), f = await o(`${n}${u}`);
527
+ if (c.push(...f.items || []), h = f.nextCursor || null, !h) break;
528
528
  }
529
- return { items: l, total: l.length, nextCursor: null };
529
+ return { items: c, total: c.length, nextCursor: null };
530
530
  }
531
531
  return {
532
532
  listSchools: (n) => i("/schools", n),
@@ -544,7 +544,7 @@ function Ae({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
544
544
  listSports: () => o("/sports")
545
545
  };
546
546
  }
547
- const ot = {
547
+ const it = {
548
548
  game: "/{sport}/game/{id}/",
549
549
  school: "/school/{id}/",
550
550
  section: "/{sport}/{view}/"
@@ -552,41 +552,41 @@ const ot = {
552
552
  function g(a, t) {
553
553
  return String(a).replace(/\{(\w+)\}/g, (e, s) => t[s] !== void 0 && t[s] !== null ? String(t[s]) : e);
554
554
  }
555
- function L(a) {
555
+ function j(a) {
556
556
  return {
557
- game: a.getAttribute("game-href") || ot.game,
558
- school: a.getAttribute("school-href") || ot.school,
559
- section: a.getAttribute("section-href") || ot.section
557
+ game: a.getAttribute("game-href") || it.game,
558
+ school: a.getAttribute("school-href") || it.school,
559
+ section: a.getAttribute("section-href") || it.section
560
560
  };
561
561
  }
562
- const z = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
562
+ const B = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
563
563
  function y(a, t) {
564
564
  if (!a) return "TBD";
565
565
  const [e, s, r] = String(a).split("-").map(Number);
566
566
  return !e || !s || !r ? "TBD" : new Date(e, s - 1, r).toLocaleDateString("en-US", t || { weekday: "short", month: "short", day: "numeric" });
567
567
  }
568
- function pt(a) {
568
+ function mt(a) {
569
569
  if (!a) return "";
570
570
  const [t, e] = String(a).split(":").map(Number);
571
571
  if (Number.isNaN(t)) return "";
572
572
  const s = t >= 12 ? "PM" : "AM";
573
573
  return `${(t + 11) % 12 + 1}:${String(e || 0).padStart(2, "0")} ${s}`;
574
574
  }
575
- function Te(a) {
575
+ function Pe(a) {
576
576
  return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
577
577
  }
578
- function Ie(a) {
578
+ function De(a) {
579
579
  return (Array.isArray(a?.positions) ? a.positions : String(a?.position ?? "").split(/[/,]/)).map((e) => String(e ?? "").trim()).filter(Boolean).join("/");
580
580
  }
581
- function et(a = /* @__PURE__ */ new Date()) {
581
+ function at(a = /* @__PURE__ */ new Date()) {
582
582
  const t = a.getFullYear();
583
583
  return a.getMonth() >= 6 ? `${t}-${t + 1}` : `${t - 1}-${t}`;
584
584
  }
585
- function mt(a = /* @__PURE__ */ new Date()) {
585
+ function ut(a = /* @__PURE__ */ new Date()) {
586
586
  const t = (e) => String(e).padStart(2, "0");
587
587
  return `${a.getFullYear()}-${t(a.getMonth() + 1)}-${t(a.getDate())}`;
588
588
  }
589
- function Ce(a, t = mt()) {
589
+ function ze(a, t = ut()) {
590
590
  const e = [...new Set((a || []).filter(Boolean))].sort();
591
591
  if (!e.length || e.includes(t)) return t;
592
592
  const s = e.filter((r) => r < t);
@@ -595,35 +595,38 @@ function Ce(a, t = mt()) {
595
595
  function ft(a) {
596
596
  return a ? (a.abbr || a.name || "?").slice(0, 4).toUpperCase() : "?";
597
597
  }
598
- function K(a) {
598
+ function Z(a) {
599
599
  if (!a || !/^#[0-9a-fA-F]{6}$/.test(a)) return "#FFFFFF";
600
600
  const t = parseInt(a.slice(1), 16), e = t >> 16 & 255, s = t >> 8 & 255, r = t & 255;
601
601
  return 0.299 * e + 0.587 * s + 0.114 * r > 150 ? "#0F1B33" : "#FFFFFF";
602
602
  }
603
- const Ee = (a) => {
603
+ const Be = (a) => {
604
604
  const t = ["th", "st", "nd", "rd"], e = a % 100;
605
605
  return a + (t[(e - 20) % 10] || t[e] || t[0]);
606
606
  };
607
- function zt(a, t) {
607
+ function Rt(a, t) {
608
608
  const e = (o) => {
609
609
  const i = /^\d+/.exec(String(o ?? ""));
610
610
  return i ? Number(i[0]) : null;
611
611
  }, s = e(a), r = e(t);
612
612
  return s !== null && r !== null && s !== r ? r - s : s !== null && r === null ? -1 : s === null && r !== null ? 1 : String(a ?? "").localeCompare(String(t ?? ""), "en", { sensitivity: "base" });
613
613
  }
614
- function Pe(a, t) {
614
+ function Re(a, t) {
615
615
  const e = (s) => String(s?.name ?? s ?? "");
616
616
  return e(a).localeCompare(e(t), "en", { numeric: !0, sensitivity: "base" });
617
617
  }
618
- function Wt(a) {
619
- if (a.state === "live") return { kind: "live", label: `Live · ${a.period || ""}`.replace(/ · $/, "") };
618
+ function Gt(a) {
619
+ if (a.state === "live") {
620
+ const t = [a.period, a.clock].filter(Boolean).join(" ");
621
+ return { kind: "live", label: t ? `Live · ${t}` : "Live" };
622
+ }
620
623
  if (a.state === "final") {
621
624
  const t = [];
622
625
  return a.finish === "overtime" && t.push("OT"), a.finish === "shootout" && t.push("PK-SO"), a.forfeit && a.forfeit !== "none" && t.push("Forfeit"), { kind: "final", label: `Final${t.length ? ` · ${t.join(" · ")}` : ""}` };
623
626
  }
624
- 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" })} · ${pt(a.time)}`.replace(/ · $/, "") };
627
+ 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" })} · ${mt(a.time)}`.replace(/ · $/, "") };
625
628
  }
626
- const De = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
629
+ const Ne = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
627
630
  function _(a) {
628
631
  let t = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
629
632
  const e = t.indexOf("#");
@@ -632,13 +635,13 @@ function _(a) {
632
635
  let r = t.split("?")[0] + s;
633
636
  return r = r.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), r = r.replace(/^\/(?=#)/, ""), r.length > 1 && (r = r.replace(/\/+$/, "")), r.toLowerCase();
634
637
  }
635
- function qt() {
638
+ function Vt() {
636
639
  const a = globalThis.location;
637
640
  if (!a) return "";
638
641
  const t = (a.hash || "").startsWith("#/") ? a.hash : "";
639
642
  return _((a.pathname || "") + t);
640
643
  }
641
- function ze(a, t, e) {
644
+ function Fe(a, t, e) {
642
645
  if (!e) return null;
643
646
  const s = _(a);
644
647
  if (!s) return null;
@@ -648,27 +651,27 @@ function ze(a, t, e) {
648
651
  if (s === i) return "";
649
652
  if (!s.startsWith(`${i}/`)) return null;
650
653
  const n = s.slice(i.length + 1), d = n.split("/");
651
- return d.length > 2 || d.some((l) => !/^[a-z][a-z-]*$/.test(l)) || De.has(d[0]) ? null : n;
654
+ return d.length > 2 || d.some((c) => !/^[a-z][a-z-]*$/.test(c)) || Ne.has(d[0]) ? null : n;
652
655
  }
653
- function Re(a, t, e) {
656
+ function Me(a, t, e) {
654
657
  const s = (i) => g(e.section, { sport: a, view: i }).replace(/([^:])\/{2,}/g, "$1/"), o = new Set((t || []).map((i) => i && i.gender).filter((i) => i === "boys" || i === "girls")).size === 2 ? [
655
658
  { label: "Boys Standings", href: s("boys/standings") },
656
659
  { label: "Girls Standings", href: s("girls/standings") }
657
660
  ] : [{ label: "Standings", href: s("standings") }];
658
661
  return [
659
- { label: `${z(a)} Home`, href: s("") },
662
+ { label: `${B(a)} Home`, href: s("") },
660
663
  { label: "Scores/Schedule", href: s("scores") },
661
664
  { label: "Playoff Brackets", href: s("brackets") },
662
665
  ...o,
663
666
  { label: "Polls & Rankings", href: s("rankings") }
664
667
  ];
665
668
  }
666
- function Be(a, t = qt()) {
669
+ function Oe(a, t = Vt()) {
667
670
  const e = _(t);
668
671
  for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
669
672
  e && _(s.getAttribute("href")) === e ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
670
673
  }
671
- class w extends E {
674
+ class w extends P {
672
675
  static properties = {
673
676
  api: { type: String },
674
677
  refreshInterval: { type: Number, attribute: "refresh-interval" },
@@ -687,7 +690,7 @@ class w extends E {
687
690
  this._client = t, this.isConnected && this.load();
688
691
  }
689
692
  get client() {
690
- return this._client ? this._client : this.api ? Ae({ baseUrl: this.api }) : null;
693
+ return this._client ? this._client : this.api ? Ee({ baseUrl: this.api }) : null;
691
694
  }
692
695
  connectedCallback() {
693
696
  super.connectedCallback(), this._setupInterval();
@@ -699,7 +702,7 @@ class w extends E {
699
702
  this.load();
700
703
  }
701
704
  updated(t) {
702
- t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(), Be(this);
705
+ t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(), Oe(this);
703
706
  }
704
707
  async load() {
705
708
  const t = this.client;
@@ -728,13 +731,13 @@ class w extends E {
728
731
  this._refreshId && (clearInterval(this._refreshId), this._refreshId = null);
729
732
  }
730
733
  render() {
731
- return this.error === "not-configured" ? c`<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 ? c`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : c`<div class="loading" role="status">Loading…</div>`;
734
+ return this.error === "not-configured" ? l`<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 ? l`<div class="error">Unable to load right now. <button class="chip" @click=${() => this.load()}>Retry</button></div>` : this.data ? this.renderView() : l`<div class="loading" role="status">Loading…</div>`;
732
735
  }
733
736
  renderView() {
734
- return c``;
737
+ return l``;
735
738
  }
736
739
  }
737
- const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
740
+ const $ = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Ue = b`
738
741
  :host {
739
742
  --hsot-red: var(--color-red, #D1232A);
740
743
  --hsot-red-deep: var(--color-red-dark, #951C21);
@@ -772,7 +775,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
772
775
  outline-offset: 1px;
773
776
  }
774
777
  .mut { color: var(--hsot-gray-5); }
775
- `, Ne = b`
778
+ `, He = b`
776
779
  .band { background: var(--hsot-white); color: var(--hsot-black); }
777
780
  .band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
778
781
  .band h1, .band h2.bandtitle {
@@ -821,7 +824,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
821
824
  @media (max-width: 720px) {
822
825
  .band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
823
826
  }
824
- `, Ue = b`
827
+ `, Le = b`
825
828
  .view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
826
829
  /* Optional right rail (slot="rail" light-DOM children): a divided 300px
827
830
  column on desktop, stacked under the view content on smaller screens. */
@@ -885,7 +888,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
885
888
  .error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
886
889
  .note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
887
890
  .loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
888
- `, Oe = b`
891
+ `, je = b`
889
892
  .pill {
890
893
  display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
891
894
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
@@ -900,7 +903,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
900
903
  .pill.champ { background: var(--hsot-straw); color: #6b5900; }
901
904
  @keyframes hsot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
902
905
  @media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } }
903
- `, He = b`
906
+ `, qe = b`
904
907
  .tablewrap { overflow-x: auto; }
905
908
  table.data { font-family: var(--hsot-heading-font); font-size: 14px; border-collapse: collapse; width: 100%; }
906
909
  table.data th {
@@ -918,7 +921,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
918
921
  table.data tbody tr.rowlink:hover { background: var(--hsot-gray-1); }
919
922
  table.data td.teamcell a { color: inherit; text-decoration: none; font-weight: 500; }
920
923
  table.data td.teamcell a:hover { text-decoration: underline; }
921
- `, Me = b`
924
+ `, We = b`
922
925
  .swatch {
923
926
  display: inline-flex; align-items: center; justify-content: center;
924
927
  width: 26px; height: 26px; border-radius: 50%;
@@ -942,7 +945,7 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
942
945
  .dot.W { background: var(--hsot-win); }
943
946
  .dot.L { background: var(--hsot-loss); }
944
947
  .dot.T { background: var(--hsot-tie); }
945
- `, Le = b`
948
+ `, Ge = b`
946
949
  ul.gamelist { list-style: none; margin: 0; padding: 0; }
947
950
  .gamelist li {
948
951
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
@@ -992,74 +995,74 @@ const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
992
995
  .gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
993
996
  .gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
994
997
  .gamelist a.box { font-size: 0.78rem; }
995
- `, j = [Fe, Ne, Ue, Oe, He, Me, Le];
996
- function ut(a) {
998
+ `, q = [Ue, He, Le, je, qe, We, Ge];
999
+ function gt(a) {
997
1000
  return a.state !== "final" ? null : a.forfeit === "home" ? "away" : a.forfeit === "away" || a.homeScore > a.awayScore ? "home" : a.awayScore > a.homeScore ? "away" : a.tiebreakWinner && a.tiebreakWinner !== "none" ? a.tiebreakWinner : "tie";
998
1001
  }
999
- function je(a) {
1002
+ function Ve(a) {
1000
1003
  return a && (a.forfeit === "home" || a.forfeit === "away") ? a.forfeit : null;
1001
1004
  }
1002
1005
  function W(a, t) {
1003
1006
  const e = {}, s = (o) => (e[o] = e[o] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, e[o]), r = a.filter((o) => o.state === "final" && o.gameType !== "scrimmage" && !0).sort((o, i) => String(o.date).localeCompare(String(i.date)));
1004
1007
  for (const o of r) {
1005
- const i = ut(o), n = o.gameType === "conference";
1008
+ const i = gt(o), n = o.gameType === "conference";
1006
1009
  for (const d of ["home", "away"]) {
1007
- const l = d === "home" ? o.homeTeamId : o.awayTeamId;
1008
- if (!l) continue;
1009
- const h = s(l), p = d === "home" ? o.homeScore : o.awayScore, f = d === "home" ? o.awayScore : o.homeScore;
1010
- h.pf += p, h.pa += f;
1011
- let u = "T";
1012
- i === "tie" ? (h.t += 1, n && (h.ct += 1)) : i === d ? (h.w += 1, n && (h.cw += 1), u = "W") : (h.l += 1, n && (h.cl += 1), u = "L"), h.results.push({ gameId: o.id, date: o.date, mark: u, my: p, their: f, opp: d === "home" ? o.awayTeamId : o.homeTeamId, conf: n });
1010
+ const c = d === "home" ? o.homeTeamId : o.awayTeamId;
1011
+ if (!c) continue;
1012
+ const h = s(c), p = d === "home" ? o.homeScore : o.awayScore, u = d === "home" ? o.awayScore : o.homeScore;
1013
+ h.pf += p, h.pa += u;
1014
+ let f = "T";
1015
+ i === "tie" ? (h.t += 1, n && (h.ct += 1)) : i === d ? (h.w += 1, n && (h.cw += 1), f = "W") : (h.l += 1, n && (h.cl += 1), f = "L"), h.results.push({ gameId: o.id, date: o.date, mark: f, my: p, their: u, opp: d === "home" ? o.awayTeamId : o.homeTeamId, conf: n });
1013
1016
  }
1014
1017
  }
1015
1018
  return e;
1016
1019
  }
1017
- function st(a) {
1020
+ function rt(a) {
1018
1021
  if (!a || !a.length) return "";
1019
1022
  const t = a[a.length - 1].mark;
1020
1023
  let e = 0;
1021
1024
  for (let s = a.length - 1; s >= 0 && a[s].mark === t; s -= 1) e += 1;
1022
1025
  return t + e;
1023
1026
  }
1024
- const Rt = (a, t, e) => {
1027
+ const Nt = (a, t, e) => {
1025
1028
  const s = a + t + e;
1026
1029
  return s ? (a + e / 2) / s : 0;
1027
- }, Bt = (a) => a.toFixed(3).replace("0.", ".");
1028
- function x(a, t = !1) {
1030
+ }, Ft = (a) => a.toFixed(3).replace("0.", ".");
1031
+ function k(a, t = !1) {
1029
1032
  if (!a) return "0-0";
1030
1033
  const e = t ? a.cw : a.w, s = t ? a.cl : a.l, r = t ? a.ct : a.t;
1031
1034
  return `${e}-${s}${r ? `-${r}` : ""}`;
1032
1035
  }
1033
- function Gt(a, t) {
1036
+ function Yt(a, t) {
1034
1037
  return a.map((e) => {
1035
1038
  const s = t[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] };
1036
- return { team: e, rec: s, confPct: Rt(s.cw, s.cl, s.ct), overallPct: Rt(s.w, s.l, s.t) };
1039
+ return { team: e, rec: s, confPct: Nt(s.cw, s.cl, s.ct), overallPct: Nt(s.w, s.l, s.t) };
1037
1040
  }).sort((e, s) => s.confPct - e.confPct || s.overallPct - e.overallPct || s.rec.pf - s.rec.pa - (e.rec.pf - e.rec.pa));
1038
1041
  }
1039
- function gt(a, t) {
1042
+ function vt(a, t) {
1040
1043
  return a.filter((e) => (e.homeTeamId === t || e.awayTeamId === t) && (e.state === "scheduled" || e.state === "live") && e.gameType !== "scrimmage").sort((e, s) => String(e.date).localeCompare(String(s.date)))[0] || null;
1041
1044
  }
1042
- function Ft(a, t) {
1045
+ function Mt(a, t) {
1043
1046
  const e = a[t];
1044
1047
  return e && e.results.length ? e.results[e.results.length - 1] : null;
1045
1048
  }
1046
- function vt(a, t, e, s, r) {
1049
+ function $t(a, t, e, s, r) {
1047
1050
  const o = t[e];
1048
1051
  if (!o) return null;
1049
1052
  const i = /* @__PURE__ */ new Map();
1050
1053
  for (const d of a || []) {
1051
1054
  if (d.sport !== s || r && d.effectiveDate > r || d.gender && o.gender !== d.gender && o.gender !== "coed") continue;
1052
- const l = d.gender || "", h = i.get(l);
1053
- (!h || d.effectiveDate > h.effectiveDate) && i.set(l, d);
1055
+ const c = d.gender || "", h = i.get(c);
1056
+ (!h || d.effectiveDate > h.effectiveDate) && i.set(c, d);
1054
1057
  }
1055
1058
  let n = null;
1056
1059
  for (const d of i.values()) {
1057
- const l = (d.teamIds || []).indexOf(e);
1058
- l !== -1 && (!n || d.effectiveDate > n.effectiveDate) && (n = { poll: d, rank: l + 1 });
1060
+ const c = (d.teamIds || []).indexOf(e);
1061
+ c !== -1 && (!n || d.effectiveDate > n.effectiveDate) && (n = { poll: d, rank: c + 1 });
1059
1062
  }
1060
1063
  return n ? n.rank : null;
1061
1064
  }
1062
- function We(a, t, e) {
1065
+ function Ye(a, t, e) {
1063
1066
  if (!a) return { kind: "none", delta: 0 };
1064
1067
  const s = (a.teamIds || []).indexOf(e) + 1;
1065
1068
  if (!s) return { kind: "none", delta: 0 };
@@ -1069,36 +1072,36 @@ function We(a, t, e) {
1069
1072
  const o = r - s;
1070
1073
  return o > 0 ? { kind: "up", delta: o } : o < 0 ? { kind: "down", delta: -o } : { kind: "same", delta: 0 };
1071
1074
  }
1072
- function qe(a) {
1075
+ function Ke(a) {
1073
1076
  return /^https?:\/\//i.test(String(a || ""));
1074
1077
  }
1075
- function Vt(a, { w: t, h: e } = {}) {
1076
- if (!qe(a)) return "";
1078
+ function Kt(a, { w: t, h: e } = {}) {
1079
+ if (!Ke(a)) return "";
1077
1080
  const s = [];
1078
1081
  t && s.push(`w=${Math.max(1, Math.round(t))}`), e && s.push(`h=${Math.max(1, Math.round(e))}`), s.push("f=webp");
1079
1082
  const r = a.includes("?") ? "&" : "?";
1080
1083
  return `${a}${r}${s.join("&")}`;
1081
1084
  }
1082
- function Q(a, t) {
1085
+ function J(a, t) {
1083
1086
  const e = t * 2;
1084
- return Vt(a?.logoAssetId, { w: e, h: e });
1087
+ return Kt(a?.logoAssetId, { w: e, h: e });
1085
1088
  }
1086
- function Ge(a, t) {
1087
- return Vt(a?.photoAssetId, { w: t * 2 });
1089
+ function Qe(a, t) {
1090
+ return Kt(a?.photoAssetId, { w: t * 2 });
1088
1091
  }
1089
- function $t(a, t, { title: e, sub: s, teams: r }) {
1090
- const o = qt(), n = !!a.querySelector(':scope > a[slot="nav"]') || ze(o, t.hrefs, t.sport) !== null;
1091
- return c`
1092
+ function bt(a, t, { title: e, sub: s, teams: r }) {
1093
+ const o = Vt(), n = !!a.querySelector(':scope > a[slot="nav"]') || Fe(o, t.hrefs, t.sport) !== null;
1094
+ return l`
1092
1095
  <div class="band section">
1093
1096
  <div class="inner">
1094
1097
  <h1>${e}</h1>
1095
- ${s ? c`<p class="sub">${s}</p>` : m}
1098
+ ${s ? l`<p class="sub">${s}</p>` : m}
1096
1099
  </div>
1097
- ${n ? c`
1098
- <nav class="sectionnav" aria-label="${z(t.sport)} section">
1100
+ ${n ? l`
1101
+ <nav class="sectionnav" aria-label="${B(t.sport)} section">
1099
1102
  <div class="navrow">
1100
1103
  <slot name="nav">
1101
- ${Re(t.sport, r, t.hrefs).map((d) => c`<a href=${d.href}
1104
+ ${Me(t.sport, r, t.hrefs).map((d) => l`<a href=${d.href}
1102
1105
  aria-current=${o && _(d.href) === o ? "page" : m}>${d.label}</a>`)}
1103
1106
  </slot>
1104
1107
  </div>
@@ -1106,61 +1109,61 @@ function $t(a, t, { title: e, sub: s, teams: r }) {
1106
1109
  </div>
1107
1110
  `;
1108
1111
  }
1109
- const O = (a, t) => {
1112
+ const U = (a, t) => {
1110
1113
  const e = a.teamsById[t];
1111
1114
  return e ? a.schoolsById[e.schoolId] : null;
1112
- }, C = (a, t) => O(a, t)?.name || "TBD", Z = (a, t) => O(a, t)?.abbr || "TBD";
1115
+ }, E = (a, t) => U(a, t)?.name || "TBD", X = (a, t) => U(a, t)?.abbr || "TBD";
1113
1116
  function H(a, t = 26) {
1114
1117
  if (!a) return m;
1115
- const e = Q(a, t);
1118
+ const e = J(a, t);
1116
1119
  if (e)
1117
- return c`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
1120
+ return l`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
1118
1121
  src=${e} style="width:${t}px;height:${t}px" />`;
1119
- const s = a.colorPrimary || "#030711", r = K(s);
1120
- return c`<span class="swatch" aria-hidden="true"
1122
+ const s = a.colorPrimary || "#030711", r = Z(s);
1123
+ return l`<span class="swatch" aria-hidden="true"
1121
1124
  style="width:${t}px;height:${t}px;background:${s};color:${r};font-size:${Math.max(8, t * 0.28)}px"
1122
1125
  >${ft(a)}</span>`;
1123
1126
  }
1124
- function bt(a, t, e) {
1125
- const s = vt(a.rankings, a.teamsById, t, a.sport, e);
1126
- return s ? c`<span class="rankbadge">#${s}</span>` : m;
1127
+ function yt(a, t, e) {
1128
+ const s = $t(a.rankings, a.teamsById, t, a.sport, e);
1129
+ return s ? l`<span class="rankbadge">#${s}</span>` : m;
1127
1130
  }
1128
- function Yt(a, t, e) {
1129
- const s = O(a, t);
1130
- return s ? c`${bt(a, t, e)}<a href=${g(a.hrefs.school, { id: s.id })}>${s.name}</a>` : c`<span class="mut">TBD</span>`;
1131
+ function Qt(a, t, e) {
1132
+ const s = U(a, t);
1133
+ return s ? l`${yt(a, t, e)}<a href=${g(a.hrefs.school, { id: s.id })}>${s.name}</a>` : l`<span class="mut">TBD</span>`;
1131
1134
  }
1132
- function yt(a, t, e = 5) {
1135
+ function wt(a, t, e = 5) {
1133
1136
  const s = a.records[t];
1134
- if (!s || !s.results.length) return c`<span class="mut">·</span>`;
1137
+ if (!s || !s.results.length) return l`<span class="mut">·</span>`;
1135
1138
  const r = s.results.slice(-1 * e);
1136
- return c`<span class="dots" role="img" aria-label="last ${r.length} results">
1137
- ${r.map((o) => c`<a class="dot ${o.mark}"
1138
- title="${o.mark} ${o.my}-${o.their} vs ${C(a, o.opp)}"
1139
+ return l`<span class="dots" role="img" aria-label="last ${r.length} results">
1140
+ ${r.map((o) => l`<a class="dot ${o.mark}"
1141
+ title="${o.mark} ${o.my}-${o.their} vs ${E(a, o.opp)}"
1139
1142
  href=${g(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
1140
1143
  </span>`;
1141
1144
  }
1142
- function q(a, t) {
1143
- return a.querySelector(':scope > [slot="rail"]') ? c`<div class="view withrail">
1145
+ function G(a, t) {
1146
+ return a.querySelector(':scope > [slot="rail"]') ? l`<div class="view withrail">
1144
1147
  <div class="viewmain">${t}</div>
1145
1148
  <aside class="viewrail"><slot name="rail"></slot></aside>
1146
- </div>` : c`<div class="view">${t}</div>`;
1149
+ </div>` : l`<div class="view">${t}</div>`;
1147
1150
  }
1148
- function G(a) {
1151
+ function V(a) {
1149
1152
  if (!a.promoImage) return m;
1150
- const t = c`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
1151
- return c`<div class="promo">${a.promoHref ? c`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${t}</a>` : t}</div>`;
1153
+ const t = l`<img src=${a.promoImage} alt=${a.promoAlt || "Sponsor"}>`;
1154
+ return l`<div class="promo">${a.promoHref ? l`<a href=${a.promoHref} target="_blank" rel="sponsored noopener">${t}</a>` : t}</div>`;
1152
1155
  }
1153
- function J(a) {
1154
- const t = Wt(a);
1155
- return c`<span class="pill ${t.kind}">${t.label}</span>`;
1156
+ function tt(a) {
1157
+ const t = Gt(a);
1158
+ return l`<span class="pill ${t.kind}">${t.label}</span>`;
1156
1159
  }
1157
- function Kt(a, t, e) {
1158
- if (!t) return c`<span class="mut">·</span>`;
1160
+ function Zt(a, t, e) {
1161
+ if (!t) return l`<span class="mut">·</span>`;
1159
1162
  const s = t.homeTeamId === e ? t.awayTeamId : t.homeTeamId, r = t.homeTeamId === e ? "vs" : "at";
1160
- return c`${t.state === "live" ? c`<span class="pill live">Live</span> ` : c`${y(t.date, { month: "numeric", day: "numeric" })} `}${r} ${Z(a, s)}`;
1163
+ return l`${t.state === "live" ? l`<span class="pill live">Live</span> ` : l`${y(t.date, { month: "numeric", day: "numeric" })} `}${r} ${X(a, s)}`;
1161
1164
  }
1162
- class Qt extends w {
1163
- static styles = j;
1165
+ class Jt extends w {
1166
+ static styles = q;
1164
1167
  static properties = {
1165
1168
  ...w.properties,
1166
1169
  sport: { type: String },
@@ -1178,14 +1181,14 @@ class Qt extends w {
1178
1181
  this._datePinned = !!this.date;
1179
1182
  }
1180
1183
  async fetchData(t) {
1181
- const e = this.season || et(), [s, r, o, i, n] = await Promise.all([
1184
+ const e = this.season || at(), [s, r, o, i, n] = await Promise.all([
1182
1185
  t.listSchools(),
1183
1186
  t.listTeams({ sport: this.sport }),
1184
1187
  t.listConferences(),
1185
1188
  t.listGames({ sport: this.sport, season: e }),
1186
1189
  t.listRankings({ sport: this.sport })
1187
1190
  ]);
1188
- return this._datePinned || (this.date = Ce(i.items.map((d) => d.date)), this._datePinned = !0), {
1191
+ return this._datePinned || (this.date = ze(i.items.map((d) => d.date)), this._datePinned = !0), {
1189
1192
  season: e,
1190
1193
  schools: s.items,
1191
1194
  teams: r.items,
@@ -1196,39 +1199,39 @@ class Qt extends w {
1196
1199
  }
1197
1200
  get ctx() {
1198
1201
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1199
- teamsById: v(this.data.teams),
1200
- schoolsById: v(this.data.schools),
1202
+ teamsById: $(this.data.teams),
1203
+ schoolsById: $(this.data.schools),
1201
1204
  records: W(this.data.games),
1202
1205
  rankings: this.data.rankings,
1203
- hrefs: L(this),
1206
+ hrefs: j(this),
1204
1207
  sport: this.sport
1205
1208
  }, this._ctxData = this.data), this._ctx;
1206
1209
  }
1207
1210
  renderView() {
1208
- const t = this.ctx, e = v(this.data.conferences), s = [...new Set(this.data.games.map((l) => l.date).filter(Boolean))].sort(), r = Number.MAX_SAFE_INTEGER, o = (l) => {
1209
- const h = [l.awayTeamId, l.homeTeamId].map((p) => vt(t.rankings, t.teamsById, p, this.sport, l.date)).filter(Boolean);
1211
+ const t = this.ctx, e = $(this.data.conferences), s = [...new Set(this.data.games.map((c) => c.date).filter(Boolean))].sort(), r = Number.MAX_SAFE_INTEGER, o = (c) => {
1212
+ const h = [c.awayTeamId, c.homeTeamId].map((p) => $t(t.rankings, t.teamsById, p, this.sport, c.date)).filter(Boolean);
1210
1213
  return h.length ? Math.min(...h) : r;
1211
- }, i = this.data.games.filter((l) => l.date === this.date), n = new Map(i.map((l) => [l, o(l)]));
1212
- i.sort((l, h) => (l.state === "live" ? 0 : 1) - (h.state === "live" ? 0 : 1) || n.get(l) - n.get(h));
1214
+ }, i = this.data.games.filter((c) => c.date === this.date), n = new Map(i.map((c) => [c, o(c)]));
1215
+ i.sort((c, h) => (c.state === "live" ? 0 : 1) - (h.state === "live" ? 0 : 1) || n.get(c) - n.get(h));
1213
1216
  const d = /* @__PURE__ */ new Map();
1214
- return i.forEach((l) => {
1215
- const h = l.gameType === "conference" && l.conferenceId ? e[l.conferenceId]?.name || "Conference" : l.gameType === "playoff" ? "Playoffs" : l.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
1216
- d.has(h) || d.set(h, []), d.get(h).push(l);
1217
- }), c`
1218
- ${$t(this, t, {
1219
- title: c`${z(this.sport)} scores &amp; schedules`,
1220
- sub: c`${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${i.length} games`,
1217
+ return i.forEach((c) => {
1218
+ const h = c.gameType === "conference" && c.conferenceId ? e[c.conferenceId]?.name || "Conference" : c.gameType === "playoff" ? "Playoffs" : c.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
1219
+ d.has(h) || d.set(h, []), d.get(h).push(c);
1220
+ }), l`
1221
+ ${bt(this, t, {
1222
+ title: l`${B(this.sport)} scores &amp; schedules`,
1223
+ sub: l`${y(this.date, { weekday: "long", month: "long", day: "numeric", year: "numeric" })} · ${i.length} games`,
1221
1224
  teams: this.data.teams
1222
1225
  })}
1223
- ${q(this, c`
1224
- ${G(this)}
1226
+ ${G(this, l`
1227
+ ${V(this)}
1225
1228
  <div class="toolbar">
1226
1229
  <label class="asof" for="datesel">Date</label>
1227
- <select id="datesel" @change=${(l) => {
1228
- this.date = l.target.value;
1230
+ <select id="datesel" @change=${(c) => {
1231
+ this.date = c.target.value;
1229
1232
  }}>
1230
- ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((l) => c`<option value=${l} ?selected=${l === this.date}>
1231
- ${y(l, { weekday: "short", month: "short", day: "numeric" })}${l === mt() ? " · today" : ""}
1233
+ ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((c) => l`<option value=${c} ?selected=${c === this.date}>
1234
+ ${y(c, { weekday: "short", month: "short", day: "numeric" })}${c === ut() ? " · today" : ""}
1232
1235
  </option>`)}
1233
1236
  </select>
1234
1237
  <button class="chip" ?disabled=${s.indexOf(this.date) <= 0}
@@ -1242,9 +1245,9 @@ class Qt extends w {
1242
1245
  <span class="spacer"></span>
1243
1246
  <span class="asof">Live games first · report a score to see it update here</span>
1244
1247
  </div>
1245
- ${i.length ? m : c`<p class="empty">No ${this.sport} games on this date.</p>`}
1246
- ${[...d.entries()].map(([l, h]) => c`
1247
- <div class="section-title">${l}</div>
1248
+ ${i.length ? m : l`<p class="empty">No ${this.sport} games on this date.</p>`}
1249
+ ${[...d.entries()].map(([c, h]) => l`
1250
+ <div class="section-title">${c}</div>
1248
1251
  <div class="card"><ul class="gamelist">
1249
1252
  ${h.map((p) => this.renderGame(t, p))}
1250
1253
  </ul></div>
@@ -1256,22 +1259,22 @@ class Qt extends w {
1256
1259
  // a lone score column on the far right read as detached from the teams).
1257
1260
  // Scheduled games carry their start time on the status pill alone.
1258
1261
  renderGame(t, e) {
1259
- const s = e.state === "final" || e.state === "live", r = (i, n, d = m) => c`<span class="side">${Yt(t, i, e.date)}${s ? c`<span class="score">${n}</span>` : m}${d}</span>`, o = je(e);
1260
- return c`
1262
+ const s = e.state === "final" || e.state === "live", r = (i, n, d = m) => l`<span class="side">${Qt(t, i, e.date)}${s ? l`<span class="score">${n}</span>` : m}${d}</span>`, o = Ve(e);
1263
+ return l`
1261
1264
  <li>
1262
- ${J(e)}
1263
- <span class="opp matchup">${r(e.awayTeamId, e.awayScore, c`<span class="at">at</span>`)}${r(e.homeTeamId, e.homeScore)}</span>
1264
- ${o ? c`<span class="ff">${C(t, o === "home" ? e.homeTeamId : e.awayTeamId)} forfeited</span>` : m}
1265
+ ${tt(e)}
1266
+ <span class="opp matchup">${r(e.awayTeamId, e.awayScore, l`<span class="at">at</span>`)}${r(e.homeTeamId, e.homeScore)}</span>
1267
+ ${o ? l`<span class="ff">${E(t, o === "home" ? e.homeTeamId : e.awayTeamId)} forfeited</span>` : m}
1265
1268
  <span class="where">${e.venue || ""}</span>
1266
- ${e.broadcast ? c`<span class="pill class">${e.broadcast}</span>` : m}
1269
+ ${e.broadcast ? l`<span class="pill class">${e.broadcast}</span>` : m}
1267
1270
  <a class="box" href=${g(t.hrefs.game, { sport: this.sport, id: e.id })}>Box score →</a>
1268
1271
  </li>
1269
1272
  `;
1270
1273
  }
1271
1274
  }
1272
- globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Qt);
1273
- class Zt extends w {
1274
- static styles = j;
1275
+ globalThis?.customElements && !globalThis.customElements.get("hsot-scores") && globalThis.customElements.define("hsot-scores", Jt);
1276
+ class Xt extends w {
1277
+ static styles = q;
1275
1278
  static properties = {
1276
1279
  ...w.properties,
1277
1280
  sport: { type: String },
@@ -1283,7 +1286,7 @@ class Zt extends w {
1283
1286
  super(), this.sport = "football", this.season = "", this.classFilter = "All", this.query = "";
1284
1287
  }
1285
1288
  async fetchData(t) {
1286
- const e = this.season || et(), [s, r, o, i, n] = await Promise.all([
1289
+ const e = this.season || at(), [s, r, o, i, n] = await Promise.all([
1287
1290
  t.listConferences({ active: !0 }),
1288
1291
  t.listSchools(),
1289
1292
  t.listTeams({ sport: this.sport }),
@@ -1301,27 +1304,27 @@ class Zt extends w {
1301
1304
  }
1302
1305
  get ctx() {
1303
1306
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1304
- teamsById: v(this.data.teams),
1305
- schoolsById: v(this.data.schools),
1307
+ teamsById: $(this.data.teams),
1308
+ schoolsById: $(this.data.schools),
1306
1309
  records: W(this.data.games),
1307
1310
  rankings: this.data.rankings,
1308
- hrefs: L(this),
1311
+ hrefs: j(this),
1309
1312
  sport: this.sport
1310
1313
  }, this._ctxData = this.data), this._ctx;
1311
1314
  }
1312
1315
  renderView() {
1313
- const t = this.ctx, e = ["All", ...[...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].sort(zt)].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter)).sort(Pe);
1314
- return c`
1315
- ${$t(this, t, {
1316
- title: c`${z(this.sport)} standings`,
1317
- sub: c`${this.data.season} season · every conference, computed live from reported results`,
1316
+ const t = this.ctx, e = ["All", ...[...new Set(this.data.conferences.flatMap((r) => r.classifications || []))].sort(Rt)].slice(0, 9), s = this.data.conferences.filter((r) => r.active !== !1).filter((r) => this.classFilter === "All" || (r.classifications || []).includes(this.classFilter)).sort(Re);
1317
+ return l`
1318
+ ${bt(this, t, {
1319
+ title: l`${B(this.sport)} standings`,
1320
+ sub: l`${this.data.season} season · every conference, computed live from reported results`,
1318
1321
  teams: this.data.teams
1319
1322
  })}
1320
- ${q(this, c`
1321
- ${G(this)}
1323
+ ${G(this, l`
1324
+ ${V(this)}
1322
1325
  <div class="toolbar">
1323
1326
  <div role="group" aria-label="Classification filter">
1324
- ${e.map((r) => c`<button class="chip ${this.classFilter === r ? "on" : ""}"
1327
+ ${e.map((r) => l`<button class="chip ${this.classFilter === r ? "on" : ""}"
1325
1328
  @click=${() => {
1326
1329
  this.classFilter = r;
1327
1330
  }}>${r}</button>`)}
@@ -1331,7 +1334,7 @@ class Zt extends w {
1331
1334
  this.query = r.target.value;
1332
1335
  }}>
1333
1336
  <span class="spacer"></span>
1334
- <span class="asof">Records through ${y(mt(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1337
+ <span class="asof">Records through ${y(ut(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1335
1338
  </div>
1336
1339
  ${s.map((r) => this.renderConference(t, r))}
1337
1340
  `)}
@@ -1340,12 +1343,12 @@ class Zt extends w {
1340
1343
  renderConference(t, e) {
1341
1344
  const s = this.data.teams.filter((i) => i.conferenceId === e.id);
1342
1345
  if (!s.length) return m;
1343
- const r = this.query.trim().toLowerCase(), o = Gt(s, t.records);
1344
- return c`
1346
+ const r = this.query.trim().toLowerCase(), o = Yt(s, t.records);
1347
+ return l`
1345
1348
  <div class="card">
1346
1349
  <div class="card-head">
1347
1350
  <h2>${e.name}</h2>
1348
- ${[...e.classifications || []].sort(zt).map((i) => c`<span class="pill class">${i}</span>`)}
1351
+ ${[...e.classifications || []].sort(Rt).map((i) => l`<span class="pill class">${i}</span>`)}
1349
1352
  <span class="meta">${o.length} teams · membership derives from teams</span>
1350
1353
  </div>
1351
1354
  <div class="tablewrap"><table class="data">
@@ -1364,34 +1367,34 @@ class Zt extends w {
1364
1367
  renderRow(t, e, s, r) {
1365
1368
  const o = t.schoolsById[e.team.schoolId], i = o?.name || e.team.name || "TBD";
1366
1369
  if (r && !i.toLowerCase().includes(r)) return m;
1367
- const n = e.rec.pf - e.rec.pa, d = gt(this.data.games, e.team.id), l = () => {
1370
+ const n = e.rec.pf - e.rec.pa, d = vt(this.data.games, e.team.id), c = () => {
1368
1371
  location.href = g(t.hrefs.school, { id: e.team.schoolId });
1369
1372
  };
1370
- return c`
1373
+ return l`
1371
1374
  <tr class="rowlink" @click=${(h) => {
1372
- h.target.closest("a") || l();
1375
+ h.target.closest("a") || c();
1373
1376
  }}>
1374
1377
  <td class="mut">${s + 1}</td>
1375
1378
  <td class="teamcell">
1376
- ${H(o)}${bt(t, e.team.id, null)}
1379
+ ${H(o)}${yt(t, e.team.id, null)}
1377
1380
  <a href=${g(t.hrefs.school, { id: e.team.schoolId })}>${i}</a>
1378
1381
  </td>
1379
- <td class="num">${x(e.rec, !0)}</td>
1380
- <td class="num">${Bt(e.confPct)}</td>
1381
- <td class="num">${x(e.rec)}</td>
1382
- <td class="num">${Bt(e.overallPct)}</td>
1382
+ <td class="num">${k(e.rec, !0)}</td>
1383
+ <td class="num">${Ft(e.confPct)}</td>
1384
+ <td class="num">${k(e.rec)}</td>
1385
+ <td class="num">${Ft(e.overallPct)}</td>
1383
1386
  <td class="num">${e.rec.pf}</td>
1384
1387
  <td class="num">${e.rec.pa}</td>
1385
1388
  <td class="num" style="color:${n >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${n > 0 ? "+" : ""}${n}</td>
1386
- <td>${st(e.rec.results) || "·"}</td>
1387
- <td>${yt(t, e.team.id)}</td>
1388
- <td>${Kt(t, d, e.team.id)}</td>
1389
+ <td>${rt(e.rec.results) || "·"}</td>
1390
+ <td>${wt(t, e.team.id)}</td>
1391
+ <td>${Zt(t, d, e.team.id)}</td>
1389
1392
  </tr>
1390
1393
  `;
1391
1394
  }
1392
1395
  }
1393
- globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Zt);
1394
- const Ve = b`
1396
+ globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Xt);
1397
+ const Ze = b`
1395
1398
  .hero1 {
1396
1399
  border-radius: var(--hsot-radius-md); color: var(--hsot-white);
1397
1400
  padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
@@ -1408,8 +1411,8 @@ const Ve = b`
1408
1411
  .delta.new { background: var(--hsot-straw); color: #6b5900; border-radius: var(--hsot-radius-xs); padding: 0.1rem 0.3rem; font-size: 0.7rem; }
1409
1412
  .sparkline { vertical-align: middle; }
1410
1413
  `;
1411
- class Jt extends w {
1412
- static styles = [...j, Ve];
1414
+ class te extends w {
1415
+ static styles = [...q, Ze];
1413
1416
  static properties = {
1414
1417
  ...w.properties,
1415
1418
  sport: { type: String },
@@ -1426,13 +1429,13 @@ class Jt extends w {
1426
1429
  t && (this.pollDate = t);
1427
1430
  }
1428
1431
  async fetchData(t) {
1429
- const e = this.season || et(), [s, r, o, i, n] = await Promise.all([
1432
+ const e = this.season || at(), [s, r, o, i, n] = await Promise.all([
1430
1433
  t.listRankings({ sport: this.sport, ...this.gender ? { gender: this.gender } : {} }),
1431
1434
  t.listSchools(),
1432
1435
  t.listTeams({ sport: this.sport }),
1433
1436
  t.listConferences(),
1434
1437
  t.listGames({ sport: this.sport, season: e })
1435
- ]), d = s.items.filter((l) => !this.gender || !l.gender || l.gender === this.gender).sort((l, h) => h.effectiveDate.localeCompare(l.effectiveDate));
1438
+ ]), d = s.items.filter((c) => !this.gender || !c.gender || c.gender === this.gender).sort((c, h) => h.effectiveDate.localeCompare(c.effectiveDate));
1436
1439
  return {
1437
1440
  season: e,
1438
1441
  polls: d,
@@ -1444,55 +1447,55 @@ class Jt extends w {
1444
1447
  }
1445
1448
  get ctx() {
1446
1449
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1447
- teamsById: v(this.data.teams),
1448
- schoolsById: v(this.data.schools),
1450
+ teamsById: $(this.data.teams),
1451
+ schoolsById: $(this.data.schools),
1449
1452
  records: W(this.data.games),
1450
1453
  rankings: this.data.polls,
1451
- hrefs: L(this),
1454
+ hrefs: j(this),
1452
1455
  sport: this.sport
1453
1456
  }, this._ctxData = this.data), this._ctx;
1454
1457
  }
1455
1458
  sparkline(t, e, s) {
1456
- const n = e.map((p, f) => {
1457
- const u = (p.teamIds || []).indexOf(t);
1458
- if (u === -1) return null;
1459
- const $ = e.length === 1 ? 96 / 2 : f / (e.length - 1) * 90 + 3, at = 3 + u / 24 * 20;
1460
- return { x: $, y: at };
1459
+ const n = e.map((p, u) => {
1460
+ const f = (p.teamIds || []).indexOf(t);
1461
+ if (f === -1) return null;
1462
+ const v = e.length === 1 ? 96 / 2 : u / (e.length - 1) * 90 + 3, x = 3 + f / 24 * 20;
1463
+ return { x: v, y: x };
1461
1464
  }), d = [];
1462
- let l = [];
1465
+ let c = [];
1463
1466
  if (n.forEach((p) => {
1464
- p ? l.push(p) : l.length && (d.push(l), l = []);
1465
- }), l.length && d.push(l), !d.length) return m;
1467
+ p ? c.push(p) : c.length && (d.push(c), c = []);
1468
+ }), c.length && d.push(c), !d.length) return m;
1466
1469
  const h = n[s];
1467
- return c`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1468
- ${d.map((p) => Pt`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1469
- points=${p.map((f) => `${f.x.toFixed(1)},${f.y.toFixed(1)}`).join(" ")}></polyline>`)}
1470
- ${h ? Pt`<circle cx=${h.x.toFixed(1)} cy=${h.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1470
+ return l`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1471
+ ${d.map((p) => zt`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1472
+ points=${p.map((u) => `${u.x.toFixed(1)},${u.y.toFixed(1)}`).join(" ")}></polyline>`)}
1473
+ ${h ? zt`<circle cx=${h.x.toFixed(1)} cy=${h.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1471
1474
  </svg>`;
1472
1475
  }
1473
1476
  movement(t, e, s) {
1474
- const r = We(t, e, s);
1475
- return r.kind === "up" ? c`<span class="delta up">▲ ${r.delta}</span>` : r.kind === "down" ? c`<span class="delta down">▼ ${r.delta}</span>` : r.kind === "new" ? c`<span class="delta new">NEW</span>` : r.kind === "same" ? c`<span class="delta same">—</span>` : c`<span class="delta same">·</span>`;
1477
+ const r = Ye(t, e, s);
1478
+ return r.kind === "up" ? l`<span class="delta up">▲ ${r.delta}</span>` : r.kind === "down" ? l`<span class="delta down">▼ ${r.delta}</span>` : r.kind === "new" ? l`<span class="delta new">NEW</span>` : r.kind === "same" ? l`<span class="delta same">—</span>` : l`<span class="delta same">·</span>`;
1476
1479
  }
1477
1480
  renderView() {
1478
1481
  const t = this.ctx, e = this.data.polls;
1479
- if (!e.length) return c`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1480
- const s = Math.max(0, e.findIndex((p) => p.effectiveDate === this.pollDate)), r = e[s] || e[0], o = e[s + 1] || null, i = e.slice().reverse(), n = i.indexOf(r), d = v(this.data.conferences), l = (r.teamIds || [])[0], h = l ? O(t, l) : null;
1481
- return c`
1482
- ${$t(this, t, {
1483
- title: c`${z(this.sport)} Top 25`,
1484
- sub: c`The HighSchoolOT poll · updated weekly · ${e.length} polls this season`,
1482
+ if (!e.length) return l`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
1483
+ const s = Math.max(0, e.findIndex((p) => p.effectiveDate === this.pollDate)), r = e[s] || e[0], o = e[s + 1] || null, i = e.slice().reverse(), n = i.indexOf(r), d = $(this.data.conferences), c = (r.teamIds || [])[0], h = c ? U(t, c) : null;
1484
+ return l`
1485
+ ${bt(this, t, {
1486
+ title: l`${B(this.sport)} Top 25`,
1487
+ sub: l`The HighSchoolOT poll · updated weekly · ${e.length} polls this season`,
1485
1488
  teams: this.data.teams
1486
1489
  })}
1487
- ${q(this, c`
1488
- ${G(this)}
1490
+ ${G(this, l`
1491
+ ${V(this)}
1489
1492
  <div class="toolbar">
1490
1493
  <label class="asof" for="pollsel">Poll of</label>
1491
1494
  <select id="pollsel" @change=${(p) => {
1492
1495
  this.pollDate = p.target.value;
1493
1496
  }}>
1494
- ${e.map((p, f) => c`<option value=${p.effectiveDate} ?selected=${p === r}>
1495
- ${y(p.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${f === 0 ? " · current" : ""}
1497
+ ${e.map((p, u) => l`<option value=${p.effectiveDate} ?selected=${p === r}>
1498
+ ${y(p.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${u === 0 ? " · current" : ""}
1496
1499
  </option>`)}
1497
1500
  </select>
1498
1501
  <button class="chip" ?disabled=${s >= e.length - 1}
@@ -1506,14 +1509,14 @@ class Jt extends w {
1506
1509
  <span class="spacer"></span>
1507
1510
  <span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
1508
1511
  </div>
1509
- ${h ? this.renderHero(t, r, o, l, h, d) : m}
1512
+ ${h ? this.renderHero(t, r, o, c, h, d) : m}
1510
1513
  <div class="card"><div class="tablewrap"><table class="data">
1511
1514
  <thead><tr>
1512
1515
  <th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
1513
1516
  <th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
1514
1517
  </tr></thead>
1515
1518
  <tbody>
1516
- ${(r.teamIds || []).map((p, f) => f === 0 || !p ? m : this.renderRow(t, r, o, i, n, d, p, f + 1))}
1519
+ ${(r.teamIds || []).map((p, u) => u === 0 || !p ? m : this.renderRow(t, r, o, i, n, d, p, u + 1))}
1517
1520
  </tbody>
1518
1521
  </table></div></div>
1519
1522
  <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>
@@ -1521,17 +1524,17 @@ class Jt extends w {
1521
1524
  `;
1522
1525
  }
1523
1526
  renderHero(t, e, s, r, o, i) {
1524
- const n = t.records[r], d = Ft(t.records, r), l = i[t.teamsById[r]?.conferenceId], h = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1525
- return c`
1527
+ const n = t.records[r], d = Mt(t.records, r), c = i[t.teamsById[r]?.conferenceId], h = `linear-gradient(120deg, ${o.colorPrimary || "#030711"} 0%, var(--hsot-black) 85%)`;
1528
+ return l`
1526
1529
  <div class="hero1" style="background:${h}">
1527
1530
  <div class="bigrank">#1</div>
1528
1531
  ${H(o, 64)}
1529
1532
  <div>
1530
1533
  <h2><a href=${g(t.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1531
1534
  <div class="facts">
1532
- ${x(n)} overall${l ? c` · ${x(n, !0)} ${l.name}` : m}
1533
- · streak ${st(n?.results) || "·"}
1534
- ${d ? c` · last: ${d.mark} ${d.my}-${d.their} vs ${Z(t, d.opp)}` : m}
1535
+ ${k(n)} overall${c ? l` · ${k(n, !0)} ${c.name}` : m}
1536
+ · streak ${rt(n?.results) || "·"}
1537
+ ${d ? l` · last: ${d.mark} ${d.my}-${d.their} vs ${X(t, d.opp)}` : m}
1535
1538
  &nbsp;${this.movement(e, s, r)}
1536
1539
  </div>
1537
1540
  </div>
@@ -1539,32 +1542,32 @@ class Jt extends w {
1539
1542
  `;
1540
1543
  }
1541
1544
  renderRow(t, e, s, r, o, i, n, d) {
1542
- const l = O(t, n);
1543
- if (!l) return m;
1544
- const h = t.records[n], p = Ft(t.records, n), f = gt(this.data.games, n), u = i[t.teamsById[n]?.conferenceId], $ = () => {
1545
- location.href = g(t.hrefs.school, { id: l.id });
1545
+ const c = U(t, n);
1546
+ if (!c) return m;
1547
+ const h = t.records[n], p = Mt(t.records, n), u = vt(this.data.games, n), f = i[t.teamsById[n]?.conferenceId], v = () => {
1548
+ location.href = g(t.hrefs.school, { id: c.id });
1546
1549
  };
1547
- return c`
1548
- <tr class="rowlink" @click=${(at) => {
1549
- at.target.closest("a") || $();
1550
+ return l`
1551
+ <tr class="rowlink" @click=${(x) => {
1552
+ x.target.closest("a") || v();
1550
1553
  }}>
1551
1554
  <td class="num" style="font-weight:700">${d}</td>
1552
1555
  <td>${this.movement(e, s, n)}</td>
1553
- <td class="teamcell">${H(l)}<a href=${g(t.hrefs.school, { id: l.id })}>${l.name}</a>
1554
- <span class="mut" style="font-size:0.78rem">${l.mascot || ""}</span></td>
1555
- <td class="num">${x(h)}</td>
1556
- <td class="mut">${u?.name || "Independent"}</td>
1557
- <td>${p ? c`<a class="box" style="text-decoration:none" href=${g(t.hrefs.game, { sport: this.sport, id: p.gameId })}>
1556
+ <td class="teamcell">${H(c)}<a href=${g(t.hrefs.school, { id: c.id })}>${c.name}</a>
1557
+ <span class="mut" style="font-size:0.78rem">${c.mascot || ""}</span></td>
1558
+ <td class="num">${k(h)}</td>
1559
+ <td class="mut">${f?.name || "Independent"}</td>
1560
+ <td>${p ? l`<a class="box" style="text-decoration:none" href=${g(t.hrefs.game, { sport: this.sport, id: p.gameId })}>
1558
1561
  <b style="color:${p.mark === "W" ? "var(--hsot-win)" : p.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${p.mark}</b>
1559
- ${p.my}-${p.their} vs ${Z(t, p.opp)}</a>` : c`<span class="mut">·</span>`}</td>
1560
- <td>${Kt(t, f, n)}</td>
1562
+ ${p.my}-${p.their} vs ${X(t, p.opp)}</a>` : l`<span class="mut">·</span>`}</td>
1563
+ <td>${Zt(t, u, n)}</td>
1561
1564
  <td>${this.sparkline(n, r, o)}</td>
1562
1565
  </tr>
1563
1566
  `;
1564
1567
  }
1565
1568
  }
1566
- globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Jt);
1567
- const Ye = b`
1569
+ globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", te);
1570
+ const Je = b`
1568
1571
  .schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
1569
1572
  .schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
1570
1573
  .schoolhero .crest {
@@ -1618,8 +1621,8 @@ const Ye = b`
1618
1621
  table.data.roster .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--hsot-gray-5); }
1619
1622
  }
1620
1623
  `;
1621
- class Xt extends w {
1622
- static styles = [...j, Ye];
1624
+ class ee extends w {
1625
+ static styles = [...q, Je];
1623
1626
  static properties = {
1624
1627
  ...w.properties,
1625
1628
  schoolId: { type: String, attribute: "school-id" },
@@ -1636,7 +1639,7 @@ class Xt extends w {
1636
1639
  t && !this.sport && (this.sport = t);
1637
1640
  }
1638
1641
  async fetchData(t) {
1639
- const e = this.season || et(), s = await t.getSchool(this.schoolId), o = (await t.listTeams({ schoolId: this.schoolId })).items, i = o.find(($) => $.sport === (this.sport || "football")) || o[0] || null, [n, d, l, h, p, f, u] = await Promise.all([
1642
+ const e = this.season || at(), s = await t.getSchool(this.schoolId), o = (await t.listTeams({ schoolId: this.schoolId })).items, i = o.find((v) => v.sport === (this.sport || "football")) || o[0] || null, [n, d, c, h, p, u, f] = await Promise.all([
1640
1643
  i ? t.listGames({ sport: i.sport, season: e }) : Promise.resolve({ items: [] }),
1641
1644
  i ? t.listTeams({ sport: i.sport }) : Promise.resolve({ items: [] }),
1642
1645
  t.listSchools(),
@@ -1654,20 +1657,20 @@ class Xt extends w {
1654
1657
  active: i,
1655
1658
  games: n.items,
1656
1659
  allTeams: d.items,
1657
- schools: l.items,
1660
+ schools: c.items,
1658
1661
  conferences: h.items,
1659
1662
  rankings: p.items,
1660
- roster: f.items.find(($) => $.season === e) || null,
1661
- players: u.items
1663
+ roster: u.items.find((v) => v.season === e) || null,
1664
+ players: f.items
1662
1665
  };
1663
1666
  }
1664
1667
  get ctx() {
1665
1668
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1666
- teamsById: v(this.data.allTeams.length ? this.data.allTeams : this.data.teams),
1667
- schoolsById: v(this.data.schools),
1669
+ teamsById: $(this.data.allTeams.length ? this.data.allTeams : this.data.teams),
1670
+ schoolsById: $(this.data.schools),
1668
1671
  records: W(this.data.games),
1669
1672
  rankings: this.data.rankings,
1670
- hrefs: L(this),
1673
+ hrefs: j(this),
1671
1674
  sport: this.data.active?.sport || "football"
1672
1675
  }, this._ctxData = this.data), this._ctx;
1673
1676
  }
@@ -1676,61 +1679,61 @@ class Xt extends w {
1676
1679
  }
1677
1680
  renderView() {
1678
1681
  const { school: t, teams: e, active: s, season: r } = this.data;
1679
- if (!t) return c`<div class="view"><p class="empty">School not found.</p></div>`;
1680
- const o = this.ctx, i = K(t.colorPrimary || "#030711"), n = (t.adm || [])[0], d = v(this.data.conferences), l = s ? d[s.conferenceId] : null;
1681
- return c`
1682
+ if (!t) return l`<div class="view"><p class="empty">School not found.</p></div>`;
1683
+ const o = this.ctx, i = Z(t.colorPrimary || "#030711"), n = (t.adm || [])[0], d = $(this.data.conferences), c = s ? d[s.conferenceId] : null;
1684
+ return l`
1682
1685
  <div class="schoolhero" style="background:linear-gradient(115deg, ${t.colorPrimary || "#030711"} 0%, ${t.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${i}">
1683
1686
  <div class="inner">
1684
- ${Q(t, 84) ? c`<img class="crest logo" alt="" loading="lazy" src=${Q(t, 84)} />` : c`<div class="crest" style="background:${t.colorSecondary || "#7C7C7C"};color:${K(t.colorSecondary || "#7C7C7C")}">${ft(t)}</div>`}
1687
+ ${J(t, 84) ? l`<img class="crest logo" alt="" loading="lazy" src=${J(t, 84)} />` : l`<div class="crest" style="background:${t.colorSecondary || "#7C7C7C"};color:${Z(t.colorSecondary || "#7C7C7C")}">${ft(t)}</div>`}
1685
1688
  <div style="min-width:260px">
1686
1689
  <h1>${t.name} <span class="mascot">${t.mascot || ""}</span></h1>
1687
1690
  <div class="facts">
1688
- ${t.location ? c`<span><b>Location</b>${t.location}${t.county ? c` · ${t.county} County` : m}</span>` : m}
1689
- ${t.association ? c`<span><b>League</b>${t.association}${t.classification ? c` · ${t.classification}` : m}</span>` : m}
1690
- ${l ? c`<span><b>Conference</b>${l.name}</span>` : m}
1691
- ${n ? c`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : m}
1692
- ${t.openingYear ? c`<span><b>Opened</b>${t.openingYear}</span>` : m}
1693
- ${t.areaCode ? c`<span><b>Area</b>${t.areaCode}</span>` : m}
1691
+ ${t.location ? l`<span><b>Location</b>${t.location}${t.county ? l` · ${t.county} County` : m}</span>` : m}
1692
+ ${t.association ? l`<span><b>League</b>${t.association}${t.classification ? l` · ${t.classification}` : m}</span>` : m}
1693
+ ${c ? l`<span><b>Conference</b>${c.name}</span>` : m}
1694
+ ${n ? l`<span><b>Enrollment</b>${n.value.toLocaleString()} (${n.season} ADM)</span>` : m}
1695
+ ${t.openingYear ? l`<span><b>Opened</b>${t.openingYear}</span>` : m}
1696
+ ${t.areaCode ? l`<span><b>Area</b>${t.areaCode}</span>` : m}
1694
1697
  </div>
1695
1698
  </div>
1696
1699
  </div>
1697
1700
  </div>
1698
1701
  <div class="band">
1699
1702
  <nav class="tabs" aria-label="Teams">
1700
- ${e.map((h) => h.id === s?.id ? c`<a class="on" href="#" @click=${(p) => p.preventDefault()}>${h.name}</a>` : c`<a href="#" @click=${(p) => {
1703
+ ${e.map((h) => h.id === s?.id ? l`<a class="on" href="#" @click=${(p) => p.preventDefault()}>${h.name}</a>` : l`<a href="#" @click=${(p) => {
1701
1704
  p.preventDefault(), this.switchSport(h.sport);
1702
1705
  }}>${h.name}</a>`)}
1703
1706
  </nav>
1704
1707
  </div>
1705
- ${q(this, c`
1706
- ${G(this)}
1707
- ${s ? this.renderTeam(o, s, l, r) : c`<p class="empty">No teams recorded for this school yet.</p>`}
1708
+ ${G(this, l`
1709
+ ${V(this)}
1710
+ ${s ? this.renderTeam(o, s, c, r) : l`<p class="empty">No teams recorded for this school yet.</p>`}
1708
1711
  `)}
1709
1712
  `;
1710
1713
  }
1711
1714
  renderTeam(t, e, s, r) {
1712
- const o = t.records[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, i = o.w + o.l + o.t, n = s ? this.data.allTeams.filter((p) => p.conferenceId === s.id) : [], d = s ? Gt(n, t.records).findIndex((p) => p.team.id === e.id) + 1 : 0, l = vt(t.rankings, t.teamsById, e.id, e.sport, null), h = this.data.games.filter((p) => p.homeTeamId === e.id || p.awayTeamId === e.id).sort((p, f) => String(p.date).localeCompare(String(f.date)));
1713
- return c`
1715
+ const o = t.records[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, i = o.w + o.l + o.t, n = s ? this.data.allTeams.filter((p) => p.conferenceId === s.id) : [], d = s ? Yt(n, t.records).findIndex((p) => p.team.id === e.id) + 1 : 0, c = $t(t.rankings, t.teamsById, e.id, e.sport, null), h = this.data.games.filter((p) => p.homeTeamId === e.id || p.awayTeamId === e.id).sort((p, u) => String(p.date).localeCompare(String(u.date)));
1716
+ return l`
1714
1717
  <div class="tiles">
1715
- <div class="tile"><div class="k">Overall</div><div class="v">${x(o)}</div><div class="s">${i} games played</div></div>
1716
- <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${x(o, !0)}</div>
1717
- <div class="s">${d ? `${Ee(d)} of ${n.length}` : "·"}</div></div>
1718
+ <div class="tile"><div class="k">Overall</div><div class="v">${k(o)}</div><div class="s">${i} games played</div></div>
1719
+ <div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${k(o, !0)}</div>
1720
+ <div class="s">${d ? `${Be(d)} of ${n.length}` : "·"}</div></div>
1718
1721
  <div class="tile"><div class="k">Points</div><div class="v">${i ? (o.pf / i).toFixed(1) : "0.0"}</div>
1719
1722
  <div class="s">scored per game · ${i ? (o.pa / i).toFixed(1) : "0.0"} allowed</div></div>
1720
- <div class="tile"><div class="k">Streak</div><div class="v">${st(o.results) || "·"}</div>
1721
- <div class="s">last 5: ${yt(t, e.id)}</div></div>
1722
- <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${l ? `#${l}` : "NR"}</div>
1723
+ <div class="tile"><div class="k">Streak</div><div class="v">${rt(o.results) || "·"}</div>
1724
+ <div class="s">last 5: ${wt(t, e.id)}</div></div>
1725
+ <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${c ? `#${c}` : "NR"}</div>
1723
1726
  <div class="s"><a href=${g(t.hrefs.section, { sport: e.sport, view: "rankings" })}>full poll</a></div></div>
1724
1727
  </div>
1725
- ${(e.championships || []).length ? c`
1728
+ ${(e.championships || []).length ? l`
1726
1729
  <div style="margin:-0.2rem 0 1rem;display:flex;gap:0.4rem;flex-wrap:wrap">
1727
- ${e.championships.map((p) => c`<span class="pill champ">★ ${p.season} ${p.title} champion${p.classification ? ` · ${p.classification}` : ""}${p.region ? ` · ${p.region}` : ""}</span>`)}
1730
+ ${e.championships.map((p) => l`<span class="pill champ">★ ${p.season} ${p.title} champion${p.classification ? ` · ${p.classification}` : ""}${p.region ? ` · ${p.region}` : ""}</span>`)}
1728
1731
  </div>` : m}
1729
1732
  <div class="cols">
1730
1733
  <div>
1731
1734
  <div class="section-title">Schedule &amp; results</div>
1732
1735
  <div class="card">
1733
- ${h.length ? c`<ul class="gamelist">${h.map((p) => this.renderGameRow(t, e, p))}</ul>` : c`<p class="empty">No ${e.sport} games recorded for ${r}.</p>`}
1736
+ ${h.length ? l`<ul class="gamelist">${h.map((p) => this.renderGameRow(t, e, p))}</ul>` : l`<p class="empty">No ${e.sport} games recorded for ${r}.</p>`}
1734
1737
  </div>
1735
1738
  </div>
1736
1739
  <div>
@@ -1742,20 +1745,20 @@ class Xt extends w {
1742
1745
  }
1743
1746
  renderGameRow(t, e, s) {
1744
1747
  const r = s.homeTeamId === e.id, o = r ? s.awayTeamId : s.homeTeamId, i = r ? s.homeScore : s.awayScore, n = r ? s.awayScore : s.homeScore;
1745
- let d = c`<span class="mut">${pt(s.time)}</span>`;
1748
+ let d = l`<span class="mut">${mt(s.time)}</span>`;
1746
1749
  if (s.state === "final") {
1747
- const h = ut(s), p = h === "tie" ? "T" : h === (r ? "home" : "away") ? "W" : "L";
1748
- d = c`<span class=${p}>${p}</span> ${i}-${n}${s.finish === "overtime" ? c` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? c` <span class="mut">FF</span>` : m}`;
1749
- } else s.state === "live" && (d = c`<span style="color:var(--hsot-red)">${i}-${n}</span>`);
1750
- const l = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1751
- return c`
1750
+ const h = gt(s), p = h === "tie" ? "T" : h === (r ? "home" : "away") ? "W" : "L";
1751
+ d = l`<span class=${p}>${p}</span> ${i}-${n}${s.finish === "overtime" ? l` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? l` <span class="mut">FF</span>` : m}`;
1752
+ } else s.state === "live" && (d = l`<span style="color:var(--hsot-red)">${i}-${n}</span>`);
1753
+ const c = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
1754
+ return l`
1752
1755
  <li>
1753
1756
  <span class="d">${y(s.date)}</span>
1754
- ${Wt(s).kind === "sched" ? m : J(s)}
1757
+ ${Gt(s).kind === "sched" ? m : tt(s)}
1755
1758
  <span class="res">${d}</span>
1756
- <span class="opp">${r ? "vs" : "at"} ${Yt(t, o, s.date)}
1757
- <span class="pill type">${l}</span>
1758
- ${s.broadcast ? c`<span class="pill class">${s.broadcast}</span>` : m}
1759
+ <span class="opp">${r ? "vs" : "at"} ${Qt(t, o, s.date)}
1760
+ <span class="pill type">${c}</span>
1761
+ ${s.broadcast ? l`<span class="pill class">${s.broadcast}</span>` : m}
1759
1762
  </span>
1760
1763
  <span class="where">${s.venue || ""}</span>
1761
1764
  <a class="box" href=${g(t.hrefs.game, { sport: e.sport, id: s.id })}>Box score →</a>
@@ -1765,26 +1768,26 @@ class Xt extends w {
1765
1768
  renderRoster(t, e) {
1766
1769
  const s = this.data.roster;
1767
1770
  if (!s)
1768
- return c`<p class="empty">Roster not published for ${e}.</p>`;
1769
- const r = Ge(s, 560), o = this.data.school?.name || "", i = v(this.data.players), n = s.entries.slice().sort((l, h) => (l.number || 0) - (h.number || 0)), d = n.some((l) => i[l.playerId]?.college);
1770
- return c`
1771
- ${r ? c`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
1771
+ return l`<p class="empty">Roster not published for ${e}.</p>`;
1772
+ const r = Qe(s, 560), o = this.data.school?.name || "", i = $(this.data.players), n = s.entries.slice().sort((c, h) => (c.number || 0) - (h.number || 0)), d = n.some((c) => i[c.playerId]?.college);
1773
+ return l`
1774
+ ${r ? l`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
1772
1775
  alt="${o} ${t.name} ${e} team photo" />` : m}
1773
1776
  <div class="tablewrap"><table class="data roster">
1774
- <thead><tr><th class="num">No.</th><th>Player</th><th class="pos">Pos</th><th class="cls">Class</th><th class="num">Ht</th><th class="num">Wt</th>${d ? c`<th>College</th>` : m}</tr></thead>
1777
+ <thead><tr><th class="num">No.</th><th>Player</th><th class="pos">Pos</th><th class="cls">Class</th><th class="num">Ht</th><th class="num">Wt</th>${d ? l`<th>College</th>` : m}</tr></thead>
1775
1778
  <tbody>
1776
- ${n.map((l) => {
1777
- const h = i[l.playerId];
1779
+ ${n.map((c) => {
1780
+ const h = i[c.playerId];
1778
1781
  if (!h) return m;
1779
- const p = Ie(l), f = [p, h.classOf].filter(Boolean).join(" · ") || "·";
1780
- return c`<tr>
1781
- <td class="num mut">${l.number ?? "·"}</td>
1782
- <td class="player" style="font-weight:500">${h.firstName} ${h.lastName}<span class="sub">${f}</span></td>
1782
+ const p = De(c), u = [p, h.classOf].filter(Boolean).join(" · ") || "·";
1783
+ return l`<tr>
1784
+ <td class="num mut">${c.number ?? "·"}</td>
1785
+ <td class="player" style="font-weight:500">${h.firstName} ${h.lastName}<span class="sub">${u}</span></td>
1783
1786
  <td class="pos">${p || "·"}</td>
1784
1787
  <td class="cls mut">${h.classOf || "·"}</td>
1785
- <td class="num">${Te(h.heightIn)}</td>
1788
+ <td class="num">${Pe(h.heightIn)}</td>
1786
1789
  <td class="num">${h.weightLb || "·"}</td>
1787
- ${d ? c`<td class="college">${h.college || "·"}</td>` : m}
1790
+ ${d ? l`<td class="college">${h.college || "·"}</td>` : m}
1788
1791
  </tr>`;
1789
1792
  })}
1790
1793
  </tbody>
@@ -1792,16 +1795,69 @@ class Xt extends w {
1792
1795
  `;
1793
1796
  }
1794
1797
  }
1795
- globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Xt);
1796
- const Ke = "https://api.wral.com/search";
1797
- function Qe(a) {
1798
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", ee);
1799
+ const se = {
1800
+ football: ["quarters", 4],
1801
+ flag_football: ["quarters", 4],
1802
+ basketball: ["quarters", 4],
1803
+ lacrosse: ["quarters", 4],
1804
+ field_hockey: ["quarters", 4],
1805
+ soccer: ["halves", 2],
1806
+ baseball: ["innings", 7],
1807
+ softball: ["innings", 7],
1808
+ volleyball: ["sets", 3]
1809
+ };
1810
+ function ae(a) {
1811
+ return (se[a] || ["quarters", 4])[0];
1812
+ }
1813
+ function xt(a) {
1814
+ return (se[a] || ["quarters", 4])[1];
1815
+ }
1816
+ function Xe(a, t) {
1817
+ const e = ae(a), s = xt(a);
1818
+ if (t <= s || e === "innings" || e === "sets") return String(t);
1819
+ const r = t - s;
1820
+ return `OT${r > 1 ? r : ""}`;
1821
+ }
1822
+ function ts(a, t) {
1823
+ const e = String(a ?? "").trim();
1824
+ let s;
1825
+ return (s = /^(\d+)Q$/i.exec(e)) || (s = /^(\d+)H$/i.exec(e)) ? Number(s[1]) : /^half$/i.test(e) ? ae(t) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(e)) ? xt(t) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(e)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(e)) || (s = /^set\s*(\d+)$/i.exec(e)) ? Number(s[1]) : null;
1826
+ }
1827
+ const Y = (a) => Number.isInteger(a) && a >= 0 ? a : null;
1828
+ function es(a) {
1829
+ const t = Array.isArray(a?.scoringPlays) ? a.scoringPlays : [];
1830
+ if (!t.length) return null;
1831
+ const e = a.sport, s = /* @__PURE__ */ new Map();
1832
+ for (const p of t) {
1833
+ const u = ts(p?.period, e), f = Y(p?.homeScore), v = Y(p?.awayScore);
1834
+ if (!u || f === null || v === null) return null;
1835
+ const x = s.get(u) || { home: 0, away: 0 };
1836
+ x.home = Math.max(x.home, f), x.away = Math.max(x.away, v), s.set(u, x);
1837
+ }
1838
+ const r = Math.max(...s.keys()), o = [];
1839
+ let i = !0, n = { home: 0, away: 0 };
1840
+ for (let p = 1; p <= r; p += 1) {
1841
+ const u = s.get(p) || n, f = u.home - n.home, v = u.away - n.away;
1842
+ (f < 0 || v < 0) && (i = !1), o.push({ period: p, home: Math.max(f, 0), away: Math.max(v, 0) }), n = { home: Math.max(u.home, n.home), away: Math.max(u.away, n.away) };
1843
+ }
1844
+ const d = Y(a.homeScore) ?? 0, c = Y(a.awayScore) ?? 0, h = i && n.home === d && n.away === c;
1845
+ return i = i && n.home <= d && n.away <= c, { periods: o, reconciled: h, consistent: i };
1846
+ }
1847
+ function ss(a) {
1848
+ if (Array.isArray(a?.periodScores) && a.periodScores.length) return a.periodScores;
1849
+ const t = es(a);
1850
+ return t ? a.state === "final" ? t.reconciled ? t.periods : null : t.consistent ? t.periods : null : null;
1851
+ }
1852
+ const as = "https://api.wral.com/search";
1853
+ function rs(a) {
1798
1854
  return a.map((t) => `uri:"${t}"`).join(" OR ");
1799
1855
  }
1800
- function Ze(a, t) {
1801
- const e = String(a || Ke).replace(/\/+$/, ""), s = new URLSearchParams({ query: Qe(t), sort: "score", lang: "en" });
1856
+ function os(a, t) {
1857
+ const e = String(a || as).replace(/\/+$/, ""), s = new URLSearchParams({ query: rs(t), sort: "score", lang: "en" });
1802
1858
  return `${e}/v1/query?${s}`;
1803
1859
  }
1804
- function te(a) {
1860
+ function re(a) {
1805
1861
  try {
1806
1862
  const t = new URL(a);
1807
1863
  if (/(^|\.)smugmug\.com$/i.test(t.hostname)) {
@@ -1816,13 +1872,13 @@ function te(a) {
1816
1872
  }
1817
1873
  return { uri: a, title: a };
1818
1874
  }
1819
- async function Je(a, t, e) {
1820
- const r = await ((...n) => fetch(...n))(Ze(a, t));
1875
+ async function is(a, t, e) {
1876
+ const r = await ((...n) => fetch(...n))(os(a, t));
1821
1877
  if (!r.ok) throw new Error(`search answered ${r.status}`);
1822
1878
  const o = await r.json(), i = new Map((o.items || []).map((n) => [n.uri, n]));
1823
- return t.map((n) => i.get(n) || te(n));
1879
+ return t.map((n) => i.get(n) || re(n));
1824
1880
  }
1825
- const Xe = b`
1881
+ const ns = b`
1826
1882
  .breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
1827
1883
  .breadcrumbs a { text-decoration: none; }
1828
1884
  .scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
@@ -1851,6 +1907,20 @@ const Xe = b`
1851
1907
  .covtitle { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
1852
1908
  .covdesc { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--hsot-gray-5); line-height: 1.4; }
1853
1909
  .covmeta { margin-top: 0.45rem; font-size: 0.78rem; color: var(--hsot-gray-5); }
1910
+ /* Scoring plays: a compact log under the line score. The play cell is the
1911
+ one table.data cell allowed to wrap — a 60-yard touchdown description
1912
+ must fit a phone. */
1913
+ .plays { border-top: 1px solid var(--hsot-gray-2); padding: 0.7rem 1rem 0.9rem; }
1914
+ .plays-title {
1915
+ font-family: var(--hsot-heading-font); font-weight: 700; font-size: 0.9rem;
1916
+ text-transform: uppercase; letter-spacing: 0.03em; color: var(--hsot-gray-6);
1917
+ text-align: center; margin: 0 0 0.4rem;
1918
+ }
1919
+ table.plays-table { max-width: 720px; margin: 0 auto; }
1920
+ table.plays-table td.when { color: var(--hsot-gray-5); font-variant-numeric: tabular-nums; }
1921
+ table.plays-table td.play { white-space: normal; min-width: 12rem; }
1922
+ /* Game notes are typed with line breaks the desk means to keep. */
1923
+ .gamenote { padding: 0 1rem 0.9rem; text-align: center; white-space: pre-line; }
1854
1924
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
1855
1925
  .ctxcard { padding: 0.85rem 1rem; }
1856
1926
  .ctxcard .who { font-family: var(--hsot-heading-font); font-weight: 700; margin-bottom: 0.4rem; }
@@ -1861,8 +1931,8 @@ const Xe = b`
1861
1931
  .cols { grid-template-columns: 1fr; }
1862
1932
  }
1863
1933
  `;
1864
- class ee extends w {
1865
- static styles = [...j, Xe];
1934
+ class oe extends w {
1935
+ static styles = [...q, ns];
1866
1936
  static properties = {
1867
1937
  ...w.properties,
1868
1938
  gameId: { type: String, attribute: "game-id" },
@@ -1876,7 +1946,7 @@ class ee extends w {
1876
1946
  super(), this.gameId = "", this.searchApi = "";
1877
1947
  }
1878
1948
  async fetchData(t) {
1879
- const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [r, o, i, n, d, l] = await Promise.all([
1949
+ const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [r, o, i, n, d, c] = await Promise.all([
1880
1950
  t.listSchools(),
1881
1951
  t.listTeams({ sport: e.sport }),
1882
1952
  t.listConferences(),
@@ -1884,7 +1954,7 @@ class ee extends w {
1884
1954
  t.listGames({ sport: e.sport, season: e.season }),
1885
1955
  // A search outage must not blank the box score — degrade to bare
1886
1956
  // links (fetchCoverage already degrades per-URL index misses).
1887
- s.length ? Je(this.searchApi, s).catch(() => s.map(te)) : Promise.resolve([])
1957
+ s.length ? is(this.searchApi, s).catch(() => s.map(re)) : Promise.resolve([])
1888
1958
  ]);
1889
1959
  return {
1890
1960
  game: e,
@@ -1893,30 +1963,30 @@ class ee extends w {
1893
1963
  conferences: i.items,
1894
1964
  rankings: n.items,
1895
1965
  games: d.items,
1896
- coverage: l
1966
+ coverage: c
1897
1967
  };
1898
1968
  }
1899
1969
  get ctx() {
1900
1970
  return (!this._ctx || this._ctxData !== this.data) && (this._ctx = {
1901
- teamsById: v(this.data.teams),
1902
- schoolsById: v(this.data.schools),
1971
+ teamsById: $(this.data.teams),
1972
+ schoolsById: $(this.data.schools),
1903
1973
  records: W(this.data.games),
1904
1974
  rankings: this.data.rankings,
1905
- hrefs: L(this),
1975
+ hrefs: j(this),
1906
1976
  sport: this.data.game.sport
1907
1977
  }, this._ctxData = this.data), this._ctx;
1908
1978
  }
1909
1979
  renderView() {
1910
1980
  const t = this.data.game;
1911
- if (!t) return c`<div class="view"><p class="empty">Game not found.</p></div>`;
1912
- const e = this.ctx, s = v(this.data.conferences), r = e.teamsById[t.awayTeamId] ? e.schoolsById[e.teamsById[t.awayTeamId].schoolId] : null, o = e.teamsById[t.homeTeamId] ? e.schoolsById[e.teamsById[t.homeTeamId].schoolId] : null, i = ut(t), n = (h) => t.state === "final" && i !== h && i !== "tie" ? "opacity:0.45" : "", d = t.conferenceId ? s[t.conferenceId] : null, l = this.data.games.filter((h) => h.id !== t.id && h.state === "final" && h.gameType !== "scrimmage" && (h.homeTeamId === t.homeTeamId && h.awayTeamId === t.awayTeamId || h.homeTeamId === t.awayTeamId && h.awayTeamId === t.homeTeamId));
1913
- return c`
1914
- ${q(this, c`
1915
- ${G(this)}
1981
+ if (!t) return l`<div class="view"><p class="empty">Game not found.</p></div>`;
1982
+ const e = this.ctx, s = $(this.data.conferences), r = e.teamsById[t.awayTeamId] ? e.schoolsById[e.teamsById[t.awayTeamId].schoolId] : null, o = e.teamsById[t.homeTeamId] ? e.schoolsById[e.teamsById[t.homeTeamId].schoolId] : null, i = gt(t), n = (h) => t.state === "final" && i !== h && i !== "tie" ? "opacity:0.45" : "", d = t.conferenceId ? s[t.conferenceId] : null, c = this.data.games.filter((h) => h.id !== t.id && h.state === "final" && h.gameType !== "scrimmage" && (h.homeTeamId === t.homeTeamId && h.awayTeamId === t.awayTeamId || h.homeTeamId === t.awayTeamId && h.awayTeamId === t.homeTeamId));
1983
+ return l`
1984
+ ${G(this, l`
1985
+ ${V(this)}
1916
1986
  <p class="breadcrumbs">
1917
- <a href=${g(e.hrefs.section, { sport: t.sport, view: "scores" })}>${z(t.sport)}</a> /
1987
+ <a href=${g(e.hrefs.section, { sport: t.sport, view: "scores" })}>${B(t.sport)}</a> /
1918
1988
  <a href=${g(e.hrefs.section, { sport: t.sport, view: "scores" })}>Scores/Schedules</a> /
1919
- ${C(e, t.awayTeamId)} at ${C(e, t.homeTeamId)}
1989
+ ${E(e, t.awayTeamId)} at ${E(e, t.homeTeamId)}
1920
1990
  </p>
1921
1991
  <div class="card">
1922
1992
  <div class="scorehead">
@@ -1927,30 +1997,31 @@ class ee extends w {
1927
1997
  <span class="mut" style="font-size:1.6rem">–</span>
1928
1998
  <span style=${n("home")}>${t.homeScore}</span>
1929
1999
  </div>
1930
- <div class="status">${J(t)}</div>
1931
- <div class="status">${y(t.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${t.state === "scheduled" && t.time ? c` · ${pt(t.time)}` : m} · ${t.venue || "Venue TBD"}
1932
- ${t.broadcast ? c` · <span class="pill class">${t.broadcast}</span>` : m}</div>
2000
+ <div class="status">${tt(t)}</div>
2001
+ <div class="status">${y(t.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${t.state === "scheduled" && t.time ? l` · ${mt(t.time)}` : m} · ${t.venue || "Venue TBD"}
2002
+ ${t.broadcast ? l` · <span class="pill class">${t.broadcast}</span>` : m}</div>
1933
2003
  <div class="status">
1934
2004
  <span class="pill type">${t.gameType === "conference" ? `${d?.name || "Conference"} game` : t.gameType}</span>
1935
- ${t.label ? c`<span class="pill type">Bracket ${t.label}</span>` : m}
1936
- ${(t.tags || []).map((h) => c`<span class="pill type">${h}</span>`)}
2005
+ ${t.label ? l`<span class="pill type">Bracket ${t.label}</span>` : m}
2006
+ ${(t.tags || []).map((h) => l`<span class="pill type">${h}</span>`)}
1937
2007
  </div>
1938
2008
  </div>
1939
2009
  ${this.teamBlock(e, t, t.homeTeamId, o, !0)}
1940
2010
  </div>
1941
2011
  ${this.renderLineScore(t, r, o)}
1942
- ${t.notes ? c`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${t.notes}</p>` : m}
2012
+ ${this.renderScoringPlays(t, r, o)}
2013
+ ${t.notes ? l`<p class="note gamenote">${t.notes}</p>` : m}
1943
2014
  </div>
1944
- ${(this.data.coverage || []).length ? c`
2015
+ ${(this.data.coverage || []).length ? l`
1945
2016
  <div class="section-title">Coverage</div>
1946
2017
  <div class="covgrid">
1947
- ${this.data.coverage.map((h) => c`
2018
+ ${this.data.coverage.map((h) => l`
1948
2019
  <a class="card covcard" href=${h.uri}>
1949
- ${h.image ? c`<img class="covimg" src=${h.image} alt="" loading="lazy" />` : m}
2020
+ ${h.image ? l`<img class="covimg" src=${h.image} alt="" loading="lazy" />` : m}
1950
2021
  <div class="covbody">
1951
- <div class="covtitle">${h.videoDuration ? c`<span class="pill live" style="animation:none">Video</span> ` : m}${h.photos ? c`<span class="pill live" style="animation:none">Photos</span> ` : m}${h.title || h.uri}</div>
1952
- ${h.description ? c`<p class="covdesc">${h.description}</p>` : m}
1953
- ${h.author || h.publishedTime ? c`
2022
+ <div class="covtitle">${h.videoDuration ? l`<span class="pill live" style="animation:none">Video</span> ` : m}${h.photos ? l`<span class="pill live" style="animation:none">Photos</span> ` : m}${h.title || h.uri}</div>
2023
+ ${h.description ? l`<p class="covdesc">${h.description}</p>` : m}
2024
+ ${h.author || h.publishedTime ? l`
1954
2025
  <div class="covmeta">${[h.author, h.publishedTime ? new Date(h.publishedTime).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : ""].filter(Boolean).join(" · ")}</div>
1955
2026
  ` : m}
1956
2027
  </div>
@@ -1961,12 +2032,12 @@ class ee extends w {
1961
2032
  <div class="cols">
1962
2033
  ${[[t.awayTeamId, r], [t.homeTeamId, o]].map(([h, p]) => this.renderContext(e, h, p))}
1963
2034
  </div>
1964
- ${l.length ? c`
2035
+ ${c.length ? l`
1965
2036
  <div class="section-title">Head to head this season</div>
1966
2037
  <div class="card"><ul class="gamelist">
1967
- ${l.map((h) => c`<li>
1968
- <span class="d">${y(h.date)}</span>${J(h)}
1969
- <span class="opp">${C(e, h.awayTeamId)} ${h.awayScore}, ${C(e, h.homeTeamId)} ${h.homeScore}</span>
2038
+ ${c.map((h) => l`<li>
2039
+ <span class="d">${y(h.date)}</span>${tt(h)}
2040
+ <span class="opp">${E(e, h.awayTeamId)} ${h.awayScore}, ${E(e, h.homeTeamId)} ${h.homeScore}</span>
1970
2041
  <a class="box" href=${g(e.hrefs.game, { sport: t.sport, id: h.id })}>Box score →</a>
1971
2042
  </li>`)}
1972
2043
  </ul></div>` : m}
@@ -1974,35 +2045,35 @@ class ee extends w {
1974
2045
  `;
1975
2046
  }
1976
2047
  teamBlock(t, e, s, r, o) {
1977
- if (!r) return c`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
1978
- const i = t.teamsById[s], n = t.records[s], d = Q(r, 58);
1979
- return c`
2048
+ if (!r) return l`<div class="teamblock ${o ? "right" : ""}"><div class="tname">TBD</div></div>`;
2049
+ const i = t.teamsById[s], n = t.records[s], d = J(r, 58);
2050
+ return l`
1980
2051
  <div class="teamblock ${o ? "right" : ""}">
1981
- ${d ? c`<img class="crest logo" alt="" loading="lazy" src=${d} />` : c`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${K(r.colorPrimary || "#030711")}">${ft(r)}</span>`}
2052
+ ${d ? l`<img class="crest logo" alt="" loading="lazy" src=${d} />` : l`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${Z(r.colorPrimary || "#030711")}">${ft(r)}</span>`}
1982
2053
  <div>
1983
- <div class="tname">${bt(t, s, e.date)}<a href=${g(t.hrefs.school, { id: r.id })}>${r.name}</a></div>
1984
- <div class="trec">${r.mascot || ""} · ${x(n)}${i?.conferenceId ? c` · ${x(n, !0)} conf` : m}</div>
2054
+ <div class="tname">${yt(t, s, e.date)}<a href=${g(t.hrefs.school, { id: r.id })}>${r.name}</a></div>
2055
+ <div class="trec">${r.mascot || ""} · ${k(n)}${i?.conferenceId ? l` · ${k(n, !0)} conf` : m}</div>
1985
2056
  </div>
1986
2057
  </div>
1987
2058
  `;
1988
2059
  }
1989
2060
  renderLineScore(t, e, s) {
1990
- const r = t.periodScores || [];
1991
- if (!r.length)
1992
- return c`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
1993
- const o = Math.max(4, ...r.map((l) => l.period)), i = (l) => l <= 4 ? String(l) : `OT${l > 5 ? l - 4 : ""}`, n = (l, h) => {
1994
- const p = r.find((f) => f.period === h);
1995
- return p ? p[l] : t.state === "final" ? 0 : "·";
1996
- }, d = (l, h, p) => c`
2061
+ const r = ss(t);
2062
+ if (!r)
2063
+ return t.state === "scheduled" ? l`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>` : m;
2064
+ const o = Math.max(xt(t.sport), ...r.map((c) => c.period)), i = (c) => Xe(t.sport, c), n = (c, h) => {
2065
+ const p = r.find((u) => u.period === h);
2066
+ return p ? p[c] : t.state === "final" ? 0 : "·";
2067
+ }, d = (c, h, p) => l`
1997
2068
  <tr>
1998
- <td class="teamcell">${H(l, 20)}${l?.abbr || "TBD"}</td>
1999
- ${Array.from({ length: o }, (f, u) => c`<td class="num">${n(h, u + 1)}</td>`)}
2069
+ <td class="teamcell">${H(c, 20)}${c?.abbr || "TBD"}</td>
2070
+ ${Array.from({ length: o }, (u, f) => l`<td class="num">${n(h, f + 1)}</td>`)}
2000
2071
  <td class="num" style="font-weight:700">${p}</td>
2001
2072
  </tr>`;
2002
- return c`
2073
+ return l`
2003
2074
  <div class="tablewrap" style="border-top:1px solid var(--hsot-gray-2)">
2004
2075
  <table class="data" style="max-width:560px;margin:0.6rem auto 0.9rem">
2005
- <thead><tr><th>Team</th>${Array.from({ length: o }, (l, h) => c`<th class="num">${i(h + 1)}</th>`)}<th class="num">T</th></tr></thead>
2076
+ <thead><tr><th>Team</th>${Array.from({ length: o }, (c, h) => l`<th class="num">${i(h + 1)}</th>`)}<th class="num">T</th></tr></thead>
2006
2077
  <tbody>
2007
2078
  ${d(e, "away", t.awayScore)}
2008
2079
  ${d(s, "home", t.homeScore)}
@@ -2011,26 +2082,52 @@ class ee extends w {
2011
2082
  </div>
2012
2083
  `;
2013
2084
  }
2085
+ renderScoringPlays(t, e, s) {
2086
+ const r = Array.isArray(t.scoringPlays) ? t.scoringPlays : [];
2087
+ if (!r.length) return m;
2088
+ const o = (i) => [i.period, i.clock].filter(Boolean).join(" ");
2089
+ return l`
2090
+ <div class="plays">
2091
+ <div class="plays-title">Scoring plays</div>
2092
+ <div class="tablewrap">
2093
+ <table class="data plays-table">
2094
+ <thead><tr>
2095
+ <th>When</th><th>Play</th>
2096
+ <th class="num">${e?.abbr || "Away"}</th><th class="num">${s?.abbr || "Home"}</th>
2097
+ </tr></thead>
2098
+ <tbody>
2099
+ ${r.map((i) => l`<tr>
2100
+ <td class="when">${o(i) || "·"}</td>
2101
+ <td class="play">${i.description || "·"}</td>
2102
+ <td class="num">${i.awayScore}</td>
2103
+ <td class="num">${i.homeScore}</td>
2104
+ </tr>`)}
2105
+ </tbody>
2106
+ </table>
2107
+ </div>
2108
+ </div>
2109
+ `;
2110
+ }
2014
2111
  renderContext(t, e, s) {
2015
2112
  if (!s) return m;
2016
- const r = t.records[e], o = gt(this.data.games, e);
2017
- return c`
2113
+ const r = t.records[e], o = vt(this.data.games, e);
2114
+ return l`
2018
2115
  <div class="card ctxcard">
2019
2116
  <div class="who">${H(s)}${s.name}</div>
2020
2117
  <div class="row">
2021
- <span>Last 5: ${yt(t, e)}</span>
2022
- <span>Streak: <b>${r ? st(r.results) : "·"}</b></span>
2118
+ <span>Last 5: ${wt(t, e)}</span>
2119
+ <span>Streak: <b>${r ? rt(r.results) : "·"}</b></span>
2023
2120
  <span>PF/PA: <b>${r ? `${r.pf} / ${r.pa}` : "·"}</b></span>
2024
- <span>Next: ${o ? c`${y(o.date, { month: "numeric", day: "numeric" })}
2025
- ${o.homeTeamId === e ? "vs" : "at"} ${Z(t, o.homeTeamId === e ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
2121
+ <span>Next: ${o ? l`${y(o.date, { month: "numeric", day: "numeric" })}
2122
+ ${o.homeTeamId === e ? "vs" : "at"} ${X(t, o.homeTeamId === e ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
2026
2123
  </div>
2027
2124
  </div>
2028
2125
  `;
2029
2126
  }
2030
2127
  }
2031
- globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", ee);
2032
- const ts = 250, es = 2;
2033
- class se extends E {
2128
+ globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", oe);
2129
+ const ls = 250, cs = 2;
2130
+ class ie extends P {
2034
2131
  static properties = {
2035
2132
  api: { type: String },
2036
2133
  schoolHref: { type: String, attribute: "school-href" },
@@ -2110,11 +2207,11 @@ class se extends E {
2110
2207
  }
2111
2208
  onInput(t) {
2112
2209
  const e = t.target.value.trim();
2113
- if (clearTimeout(this.debounceTimer), e.length < es) {
2210
+ if (clearTimeout(this.debounceTimer), e.length < cs) {
2114
2211
  this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
2115
2212
  return;
2116
2213
  }
2117
- this.debounceTimer = setTimeout(() => this.search(e), ts);
2214
+ this.debounceTimer = setTimeout(() => this.search(e), ls);
2118
2215
  }
2119
2216
  async search(t) {
2120
2217
  this.abortController?.abort(), this.abortController = new AbortController();
@@ -2162,7 +2259,7 @@ class se extends E {
2162
2259
  const s = this.where(t), r = (o) => {
2163
2260
  o.preventDefault(), this.go(t);
2164
2261
  };
2165
- return c`
2262
+ return l`
2166
2263
  <li
2167
2264
  id="school-option-${e}"
2168
2265
  role="option"
@@ -2173,13 +2270,13 @@ class se extends E {
2173
2270
  }}"
2174
2271
  >
2175
2272
  <span class="name">${t.name}</span>
2176
- ${s ? c`<span class="where">${s}</span>` : m}
2273
+ ${s ? l`<span class="where">${s}</span>` : m}
2177
2274
  </li>
2178
2275
  `;
2179
2276
  }
2180
2277
  renderListbox() {
2181
- const t = this.searched && !this.results.length, e = c`<li class="empty">No schools found</li>`;
2182
- return c`
2278
+ const t = this.searched && !this.results.length, e = l`<li class="empty">No schools found</li>`;
2279
+ return l`
2183
2280
  <ul id="school-search-listbox" role="listbox" aria-label="Schools">
2184
2281
  ${this.results.map((s, r) => this.renderOption(s, r))}
2185
2282
  ${t ? e : m}
@@ -2188,7 +2285,7 @@ class se extends E {
2188
2285
  }
2189
2286
  render() {
2190
2287
  const t = this.activeIndex >= 0 ? `school-option-${this.activeIndex}` : "";
2191
- return c`
2288
+ return l`
2192
2289
  <input
2193
2290
  type="text"
2194
2291
  role="combobox"
@@ -2207,22 +2304,22 @@ class se extends E {
2207
2304
  `;
2208
2305
  }
2209
2306
  }
2210
- globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", se);
2211
- const ss = {
2212
- "hsot-scores": Qt,
2213
- "hsot-standings": Zt,
2214
- "hsot-rankings": Jt,
2215
- "hsot-school": Xt,
2216
- "hsot-boxscore": ee,
2217
- "hsot-school-search": se
2307
+ globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", ie);
2308
+ const hs = {
2309
+ "hsot-scores": Jt,
2310
+ "hsot-standings": Xt,
2311
+ "hsot-rankings": te,
2312
+ "hsot-school": ee,
2313
+ "hsot-boxscore": oe,
2314
+ "hsot-school-search": ie
2218
2315
  };
2219
- function as() {
2316
+ function ds() {
2220
2317
  const a = globalThis?.customElements;
2221
2318
  if (a)
2222
- for (const [t, e] of Object.entries(ss))
2319
+ for (const [t, e] of Object.entries(hs))
2223
2320
  a.get(t) || a.define(t, e);
2224
2321
  }
2225
- typeof window < "u" && globalThis.customElements && as();
2322
+ typeof window < "u" && globalThis.customElements && ds();
2226
2323
  export {
2227
- as as defineAll
2324
+ ds as defineAll
2228
2325
  };