@wral/hsot-data 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/define.mjs +1 -1
- package/dist/define.standalone.js +405 -375
- package/dist/{hsot-school-search-CBbEB6gv.js → hsot-school-search-Cv_ZdUOs.js} +272 -242
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -17,53 +17,53 @@ let Nt = class {
|
|
|
17
17
|
return this.cssText;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const
|
|
21
|
-
const e =
|
|
20
|
+
const ae = (a) => new Nt(typeof a == "string" ? a : a + "", void 0, lt), b = (a, ...t) => {
|
|
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
|
-
})(
|
|
26
|
-
return new Nt(e,
|
|
27
|
-
},
|
|
28
|
-
if (nt)
|
|
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);
|
|
29
29
|
else for (const e of t) {
|
|
30
|
-
const s = document.createElement("style"),
|
|
31
|
-
|
|
30
|
+
const s = document.createElement("style"), r = V.litNonce;
|
|
31
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, a.appendChild(s);
|
|
32
32
|
}
|
|
33
|
-
}, xt = nt ? (
|
|
33
|
+
}, xt = nt ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((t) => {
|
|
34
34
|
let e = "";
|
|
35
35
|
for (const s of t.cssRules) e += s.cssText;
|
|
36
|
-
return
|
|
37
|
-
})(
|
|
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 = (
|
|
36
|
+
return ae(e);
|
|
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) {
|
|
39
39
|
switch (t) {
|
|
40
40
|
case Boolean:
|
|
41
|
-
|
|
41
|
+
a = a ? de : null;
|
|
42
42
|
break;
|
|
43
43
|
case Object:
|
|
44
44
|
case Array:
|
|
45
|
-
|
|
45
|
+
a = a == null ? a : JSON.stringify(a);
|
|
46
46
|
}
|
|
47
|
-
return
|
|
48
|
-
}, fromAttribute(
|
|
49
|
-
let e =
|
|
47
|
+
return a;
|
|
48
|
+
}, fromAttribute(a, t) {
|
|
49
|
+
let e = a;
|
|
50
50
|
switch (t) {
|
|
51
51
|
case Boolean:
|
|
52
|
-
e =
|
|
52
|
+
e = a !== null;
|
|
53
53
|
break;
|
|
54
54
|
case Number:
|
|
55
|
-
e =
|
|
55
|
+
e = a === null ? null : Number(a);
|
|
56
56
|
break;
|
|
57
57
|
case Object:
|
|
58
58
|
case Array:
|
|
59
59
|
try {
|
|
60
|
-
e = JSON.parse(
|
|
60
|
+
e = JSON.parse(a);
|
|
61
61
|
} catch {
|
|
62
62
|
e = null;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return e;
|
|
66
|
-
} }, Ut = (
|
|
66
|
+
} }, Ut = (a, t) => !oe(a, t), _t = { attribute: !0, type: String, converter: it, reflect: !1, useDefault: !1, hasChanged: Ut };
|
|
67
67
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), X.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
68
|
let I = class extends HTMLElement {
|
|
69
69
|
static addInitializer(t) {
|
|
@@ -74,18 +74,18 @@ let I = class extends HTMLElement {
|
|
|
74
74
|
}
|
|
75
75
|
static createProperty(t, e = _t) {
|
|
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
|
-
const s = /* @__PURE__ */ Symbol(),
|
|
78
|
-
|
|
77
|
+
const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
78
|
+
r !== void 0 && ie(this.prototype, t, r);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
static getPropertyDescriptor(t, e, s) {
|
|
82
|
-
const { get:
|
|
82
|
+
const { get: r, set: o } = ne(this.prototype, t) ?? { get() {
|
|
83
83
|
return this[e];
|
|
84
84
|
}, set(i) {
|
|
85
85
|
this[e] = i;
|
|
86
86
|
} };
|
|
87
|
-
return { get:
|
|
88
|
-
const n =
|
|
87
|
+
return { get: r, set(i) {
|
|
88
|
+
const n = r?.call(this);
|
|
89
89
|
o?.call(this, i), this.requestUpdate(t, n, s);
|
|
90
90
|
}, configurable: !0, enumerable: !0 };
|
|
91
91
|
}
|
|
@@ -101,17 +101,17 @@ let I = class extends HTMLElement {
|
|
|
101
101
|
if (this.hasOwnProperty(B("finalized"))) return;
|
|
102
102
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(B("properties"))) {
|
|
103
103
|
const e = this.properties, s = [...le(e), ...ce(e)];
|
|
104
|
-
for (const
|
|
104
|
+
for (const r of s) this.createProperty(r, e[r]);
|
|
105
105
|
}
|
|
106
106
|
const t = this[Symbol.metadata];
|
|
107
107
|
if (t !== null) {
|
|
108
108
|
const e = litPropertyMetadata.get(t);
|
|
109
|
-
if (e !== void 0) for (const [s,
|
|
109
|
+
if (e !== void 0) for (const [s, r] of e) this.elementProperties.set(s, r);
|
|
110
110
|
}
|
|
111
111
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
112
112
|
for (const [e, s] of this.elementProperties) {
|
|
113
|
-
const
|
|
114
|
-
|
|
113
|
+
const r = this._$Eu(e, s);
|
|
114
|
+
r !== void 0 && this._$Eh.set(r, e);
|
|
115
115
|
}
|
|
116
116
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
117
117
|
}
|
|
@@ -119,7 +119,7 @@ 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
|
|
122
|
+
for (const r of s) e.unshift(xt(r));
|
|
123
123
|
} else t !== void 0 && e.push(xt(t));
|
|
124
124
|
return e;
|
|
125
125
|
}
|
|
@@ -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
|
|
149
|
+
return re(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?.());
|
|
@@ -160,31 +160,31 @@ let I = class extends HTMLElement {
|
|
|
160
160
|
this._$AK(t, s);
|
|
161
161
|
}
|
|
162
162
|
_$ET(t, e) {
|
|
163
|
-
const s = this.constructor.elementProperties.get(t),
|
|
164
|
-
if (
|
|
163
|
+
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
|
|
164
|
+
if (r !== void 0 && s.reflect === !0) {
|
|
165
165
|
const o = (s.converter?.toAttribute !== void 0 ? s.converter : it).toAttribute(e, s.type);
|
|
166
|
-
this._$Em = t, o == null ? this.removeAttribute(
|
|
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
|
-
const s = this.constructor,
|
|
171
|
-
if (
|
|
172
|
-
const o = s.getPropertyOptions(
|
|
173
|
-
this._$Em =
|
|
170
|
+
const s = this.constructor, r = s._$Eh.get(t);
|
|
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;
|
|
173
|
+
this._$Em = r;
|
|
174
174
|
const n = i.fromAttribute(e, o.type);
|
|
175
|
-
this[
|
|
175
|
+
this[r] = n ?? this._$Ej?.get(r) ?? n, this._$Em = null;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
requestUpdate(t, e, s,
|
|
178
|
+
requestUpdate(t, e, s, r = !1, o) {
|
|
179
179
|
if (t !== void 0) {
|
|
180
180
|
const i = this.constructor;
|
|
181
|
-
if (
|
|
181
|
+
if (r === !1 && (o = this[t]), s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Ut)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
|
|
182
182
|
this.C(t, e, s);
|
|
183
183
|
}
|
|
184
184
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
185
185
|
}
|
|
186
|
-
C(t, e, { useDefault: s, reflect:
|
|
187
|
-
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, i ?? e ?? this[t]), o !== !0 || i !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)),
|
|
186
|
+
C(t, e, { useDefault: s, reflect: r, wrapped: o }, i) {
|
|
187
|
+
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, i ?? e ?? this[t]), o !== !0 || i !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
188
188
|
}
|
|
189
189
|
async _$EP() {
|
|
190
190
|
this.isUpdatePending = !0;
|
|
@@ -203,13 +203,13 @@ let I = class extends HTMLElement {
|
|
|
203
203
|
if (!this.isUpdatePending) return;
|
|
204
204
|
if (!this.hasUpdated) {
|
|
205
205
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
206
|
-
for (const [
|
|
206
|
+
for (const [r, o] of this._$Ep) this[r] = o;
|
|
207
207
|
this._$Ep = void 0;
|
|
208
208
|
}
|
|
209
209
|
const s = this.constructor.elementProperties;
|
|
210
|
-
if (s.size > 0) for (const [
|
|
211
|
-
const { wrapped: i } = o, n = this[
|
|
212
|
-
i !== !0 || this._$AL.has(
|
|
210
|
+
if (s.size > 0) for (const [r, o] of s) {
|
|
211
|
+
const { wrapped: i } = o, n = this[r];
|
|
212
|
+
i !== !0 || this._$AL.has(r) || n === void 0 || this.C(r, void 0, o, n);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
let t = !1;
|
|
@@ -247,28 +247,28 @@ let I = class extends HTMLElement {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
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 = (
|
|
251
|
-
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, It = />/g, S = RegExp(`>|${
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ct = /'/g, Et = /"/g, Mt = /^(?:script|style|textarea|title)$/i, Lt = (
|
|
253
|
-
function jt(
|
|
254
|
-
if (!ht(
|
|
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
255
|
return At !== void 0 ? At.createHTML(t) : t;
|
|
256
256
|
}
|
|
257
|
-
const ue = (
|
|
258
|
-
const e =
|
|
259
|
-
let
|
|
257
|
+
const ue = (a, t) => {
|
|
258
|
+
const e = a.length - 1, s = [];
|
|
259
|
+
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = R;
|
|
260
260
|
for (let n = 0; n < e; n++) {
|
|
261
|
-
const d =
|
|
261
|
+
const d = a[n];
|
|
262
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]) && (
|
|
264
|
-
const u = i === S &&
|
|
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
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);
|
|
266
266
|
}
|
|
267
|
-
return [jt(
|
|
267
|
+
return [jt(a, o + (a[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
268
268
|
};
|
|
269
269
|
class U {
|
|
270
270
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
271
|
-
let
|
|
271
|
+
let r;
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let o = 0, i = 0;
|
|
274
274
|
const n = t.length - 1, d = this.parts, [l, h] = ue(t, e);
|
|
@@ -276,24 +276,24 @@ class U {
|
|
|
276
276
|
const p = this.el.content.firstChild;
|
|
277
277
|
p.replaceWith(...p.childNodes);
|
|
278
278
|
}
|
|
279
|
-
for (; (
|
|
280
|
-
if (
|
|
281
|
-
if (
|
|
282
|
-
const f = h[i++], u =
|
|
283
|
-
d.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? ve : $[1] === "?" ? $e : $[1] === "@" ? be : tt }),
|
|
284
|
-
} else p.startsWith(k) && (d.push({ type: 6, index: o }),
|
|
285
|
-
if (Mt.test(
|
|
286
|
-
const p =
|
|
279
|
+
for (; (r = A.nextNode()) !== null && d.length < n; ) {
|
|
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
287
|
if (f > 0) {
|
|
288
|
-
|
|
289
|
-
for (let u = 0; u < f; u++)
|
|
290
|
-
|
|
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());
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
} else if (
|
|
293
|
+
} else if (r.nodeType === 8) if (r.data === Ht) d.push({ type: 2, index: o });
|
|
294
294
|
else {
|
|
295
295
|
let p = -1;
|
|
296
|
-
for (; (p =
|
|
296
|
+
for (; (p = r.data.indexOf(k, p + 1)) !== -1; ) d.push({ type: 7, index: o }), p += k.length - 1;
|
|
297
297
|
}
|
|
298
298
|
o++;
|
|
299
299
|
}
|
|
@@ -303,11 +303,11 @@ class U {
|
|
|
303
303
|
return s.innerHTML = t, s;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
function D(
|
|
306
|
+
function D(a, t, e = a, s) {
|
|
307
307
|
if (t === P) return t;
|
|
308
|
-
let
|
|
308
|
+
let r = s !== void 0 ? e._$Co?.[s] : e._$Cl;
|
|
309
309
|
const o = N(t) ? void 0 : t._$litDirective$;
|
|
310
|
-
return
|
|
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;
|
|
311
311
|
}
|
|
312
312
|
class ge {
|
|
313
313
|
constructor(t, e) {
|
|
@@ -320,8 +320,8 @@ class ge {
|
|
|
320
320
|
return this._$AM._$AU;
|
|
321
321
|
}
|
|
322
322
|
u(t) {
|
|
323
|
-
const { el: { content: e }, parts: s } = this._$AD,
|
|
324
|
-
A.currentNode =
|
|
323
|
+
const { el: { content: e }, parts: s } = this._$AD, r = (t?.creationScope ?? T).importNode(e, !0);
|
|
324
|
+
A.currentNode = r;
|
|
325
325
|
let o = A.nextNode(), i = 0, n = 0, d = s[0];
|
|
326
326
|
for (; d !== void 0; ) {
|
|
327
327
|
if (i === d.index) {
|
|
@@ -330,7 +330,7 @@ class ge {
|
|
|
330
330
|
}
|
|
331
331
|
i !== d?.index && (o = A.nextNode(), i++);
|
|
332
332
|
}
|
|
333
|
-
return A.currentNode = T,
|
|
333
|
+
return A.currentNode = T, r;
|
|
334
334
|
}
|
|
335
335
|
p(t) {
|
|
336
336
|
let e = 0;
|
|
@@ -341,8 +341,8 @@ class M {
|
|
|
341
341
|
get _$AU() {
|
|
342
342
|
return this._$AM?._$AU ?? this._$Cv;
|
|
343
343
|
}
|
|
344
|
-
constructor(t, e, s,
|
|
345
|
-
this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options =
|
|
344
|
+
constructor(t, e, s, r) {
|
|
345
|
+
this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
346
346
|
}
|
|
347
347
|
get parentNode() {
|
|
348
348
|
let t = this._$AA.parentNode;
|
|
@@ -368,10 +368,10 @@ class M {
|
|
|
368
368
|
this._$AH !== m && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(T.createTextNode(t)), this._$AH = t;
|
|
369
369
|
}
|
|
370
370
|
$(t) {
|
|
371
|
-
const { values: e, _$litType$: s } = t,
|
|
372
|
-
if (this._$AH?._$AD ===
|
|
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);
|
|
372
|
+
if (this._$AH?._$AD === r) this._$AH.p(e);
|
|
373
373
|
else {
|
|
374
|
-
const o = new ge(
|
|
374
|
+
const o = new ge(r, this), i = o.u(this.options);
|
|
375
375
|
o.p(e), this.T(i), this._$AH = o;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -382,9 +382,9 @@ class M {
|
|
|
382
382
|
k(t) {
|
|
383
383
|
ht(this._$AH) || (this._$AH = [], this._$AR());
|
|
384
384
|
const e = this._$AH;
|
|
385
|
-
let s,
|
|
386
|
-
for (const o of t)
|
|
387
|
-
|
|
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++;
|
|
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; ) {
|
|
@@ -403,10 +403,10 @@ class tt {
|
|
|
403
403
|
get _$AU() {
|
|
404
404
|
return this._$AM._$AU;
|
|
405
405
|
}
|
|
406
|
-
constructor(t, e, s,
|
|
407
|
-
this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
|
406
|
+
constructor(t, e, s, r, o) {
|
|
407
|
+
this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = m;
|
|
408
408
|
}
|
|
409
|
-
_$AI(t, e = this, s,
|
|
409
|
+
_$AI(t, e = this, s, r) {
|
|
410
410
|
const o = this.strings;
|
|
411
411
|
let i = !1;
|
|
412
412
|
if (o === void 0) t = D(this, t, e, 0), i = !N(t) || t !== this._$AH && t !== P, i && (this._$AH = t);
|
|
@@ -415,7 +415,7 @@ class tt {
|
|
|
415
415
|
let d, l;
|
|
416
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;
|
|
417
417
|
}
|
|
418
|
-
i && !
|
|
418
|
+
i && !r && this.j(t);
|
|
419
419
|
}
|
|
420
420
|
j(t) {
|
|
421
421
|
t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
@@ -438,13 +438,13 @@ class $e extends tt {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
class be extends tt {
|
|
441
|
-
constructor(t, e, s,
|
|
442
|
-
super(t, e, s,
|
|
441
|
+
constructor(t, e, s, r, o) {
|
|
442
|
+
super(t, e, s, r, o), this.type = 5;
|
|
443
443
|
}
|
|
444
444
|
_$AI(t, e = this) {
|
|
445
445
|
if ((t = D(this, t, e, 0) ?? m) === P) return;
|
|
446
|
-
const s = this._$AH,
|
|
447
|
-
|
|
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
|
+
r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
448
448
|
}
|
|
449
449
|
handleEvent(t) {
|
|
450
450
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
@@ -463,14 +463,14 @@ class ye {
|
|
|
463
463
|
}
|
|
464
464
|
const we = ct.litHtmlPolyfillSupport;
|
|
465
465
|
we?.(U, M), (ct.litHtmlVersions ??= []).push("3.3.3");
|
|
466
|
-
const xe = (
|
|
466
|
+
const xe = (a, t, e) => {
|
|
467
467
|
const s = e?.renderBefore ?? t;
|
|
468
|
-
let
|
|
469
|
-
if (
|
|
468
|
+
let r = s._$litPart$;
|
|
469
|
+
if (r === void 0) {
|
|
470
470
|
const o = e?.renderBefore ?? null;
|
|
471
|
-
s._$litPart$ =
|
|
471
|
+
s._$litPart$ = r = new M(t.insertBefore(F(), o), o, void 0, e ?? {});
|
|
472
472
|
}
|
|
473
|
-
return
|
|
473
|
+
return r._$AI(a), r;
|
|
474
474
|
};
|
|
475
475
|
const dt = globalThis;
|
|
476
476
|
class E extends I {
|
|
@@ -500,19 +500,19 @@ const ke = dt.litElementPolyfillSupport;
|
|
|
500
500
|
ke?.({ LitElement: E });
|
|
501
501
|
(dt.litElementVersions ??= []).push("4.2.2");
|
|
502
502
|
const _e = 50;
|
|
503
|
-
function Se(
|
|
504
|
-
const t = Object.entries(
|
|
503
|
+
function Se(a = {}) {
|
|
504
|
+
const t = Object.entries(a).filter(([, s]) => s != null && s !== "");
|
|
505
505
|
if (!t.length) return "";
|
|
506
506
|
const e = new URLSearchParams();
|
|
507
|
-
return t.forEach(([s,
|
|
507
|
+
return t.forEach(([s, r]) => e.set(s, String(r))), `?${e.toString()}`;
|
|
508
508
|
}
|
|
509
|
-
function Ae({ baseUrl:
|
|
510
|
-
if (!
|
|
511
|
-
const s =
|
|
509
|
+
function Ae({ baseUrl: a, token: t = "", fetchFn: e } = {}) {
|
|
510
|
+
if (!a) throw new Error("createClient requires a baseUrl");
|
|
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
|
|
515
|
+
const l = await r(`${s}${n}`, { headers: d });
|
|
516
516
|
if (!l.ok) {
|
|
517
517
|
const h = new Error(`api-hsot ${l.status} on ${n}`);
|
|
518
518
|
throw h.status = l.status, h;
|
|
@@ -549,120 +549,123 @@ const ot = {
|
|
|
549
549
|
school: "/school/{id}/",
|
|
550
550
|
section: "/{sport}/{view}/"
|
|
551
551
|
};
|
|
552
|
-
function g(
|
|
553
|
-
return String(
|
|
552
|
+
function g(a, t) {
|
|
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(
|
|
555
|
+
function L(a) {
|
|
556
556
|
return {
|
|
557
|
-
game:
|
|
558
|
-
school:
|
|
559
|
-
section:
|
|
557
|
+
game: a.getAttribute("game-href") || ot.game,
|
|
558
|
+
school: a.getAttribute("school-href") || ot.school,
|
|
559
|
+
section: a.getAttribute("section-href") || ot.section
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
const z = (
|
|
563
|
-
function y(
|
|
564
|
-
if (!
|
|
565
|
-
const [e, s,
|
|
566
|
-
return !e || !s || !
|
|
562
|
+
const z = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
|
|
563
|
+
function y(a, t) {
|
|
564
|
+
if (!a) return "TBD";
|
|
565
|
+
const [e, s, r] = String(a).split("-").map(Number);
|
|
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(
|
|
569
|
-
if (!
|
|
570
|
-
const [t, e] = String(
|
|
568
|
+
function pt(a) {
|
|
569
|
+
if (!a) return "";
|
|
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(
|
|
576
|
-
return
|
|
575
|
+
function Te(a) {
|
|
576
|
+
return a ? `${Math.floor(a / 12)}-${a % 12}` : "·";
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
|
|
580
|
-
return r.getMonth() >= 6 ? `${t}-${t + 1}` : `${t - 1}-${t}`;
|
|
578
|
+
function Ie(a) {
|
|
579
|
+
return (Array.isArray(a?.positions) ? a.positions : String(a?.position ?? "").split(/[/,]/)).map((e) => String(e ?? "").trim()).filter(Boolean).join("/");
|
|
581
580
|
}
|
|
582
|
-
function
|
|
581
|
+
function et(a = /* @__PURE__ */ new Date()) {
|
|
582
|
+
const t = a.getFullYear();
|
|
583
|
+
return a.getMonth() >= 6 ? `${t}-${t + 1}` : `${t - 1}-${t}`;
|
|
584
|
+
}
|
|
585
|
+
function mt(a = /* @__PURE__ */ new Date()) {
|
|
583
586
|
const t = (e) => String(e).padStart(2, "0");
|
|
584
|
-
return `${
|
|
587
|
+
return `${a.getFullYear()}-${t(a.getMonth() + 1)}-${t(a.getDate())}`;
|
|
585
588
|
}
|
|
586
|
-
function
|
|
587
|
-
const e = [...new Set((
|
|
589
|
+
function Ce(a, t = mt()) {
|
|
590
|
+
const e = [...new Set((a || []).filter(Boolean))].sort();
|
|
588
591
|
if (!e.length || e.includes(t)) return t;
|
|
589
|
-
const s = e.filter((
|
|
592
|
+
const s = e.filter((r) => r < t);
|
|
590
593
|
return s.length ? s[s.length - 1] : e[0];
|
|
591
594
|
}
|
|
592
|
-
function ft(
|
|
593
|
-
return
|
|
595
|
+
function ft(a) {
|
|
596
|
+
return a ? (a.abbr || a.name || "?").slice(0, 4).toUpperCase() : "?";
|
|
594
597
|
}
|
|
595
|
-
function K(
|
|
596
|
-
if (!
|
|
597
|
-
const t = parseInt(
|
|
598
|
-
return 0.299 * e + 0.587 * s + 0.114 *
|
|
598
|
+
function K(a) {
|
|
599
|
+
if (!a || !/^#[0-9a-fA-F]{6}$/.test(a)) return "#FFFFFF";
|
|
600
|
+
const t = parseInt(a.slice(1), 16), e = t >> 16 & 255, s = t >> 8 & 255, r = t & 255;
|
|
601
|
+
return 0.299 * e + 0.587 * s + 0.114 * r > 150 ? "#0F1B33" : "#FFFFFF";
|
|
599
602
|
}
|
|
600
|
-
const
|
|
601
|
-
const t = ["th", "st", "nd", "rd"], e =
|
|
602
|
-
return
|
|
603
|
+
const Ee = (a) => {
|
|
604
|
+
const t = ["th", "st", "nd", "rd"], e = a % 100;
|
|
605
|
+
return a + (t[(e - 20) % 10] || t[e] || t[0]);
|
|
603
606
|
};
|
|
604
|
-
function zt(
|
|
607
|
+
function zt(a, t) {
|
|
605
608
|
const e = (o) => {
|
|
606
609
|
const i = /^\d+/.exec(String(o ?? ""));
|
|
607
610
|
return i ? Number(i[0]) : null;
|
|
608
|
-
}, s = e(
|
|
609
|
-
return s !== null &&
|
|
611
|
+
}, s = e(a), r = e(t);
|
|
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" });
|
|
610
613
|
}
|
|
611
|
-
function
|
|
614
|
+
function Pe(a, t) {
|
|
612
615
|
const e = (s) => String(s?.name ?? s ?? "");
|
|
613
|
-
return e(
|
|
616
|
+
return e(a).localeCompare(e(t), "en", { numeric: !0, sensitivity: "base" });
|
|
614
617
|
}
|
|
615
|
-
function Wt(
|
|
616
|
-
if (
|
|
617
|
-
if (
|
|
618
|
+
function Wt(a) {
|
|
619
|
+
if (a.state === "live") return { kind: "live", label: `Live · ${a.period || ""}`.replace(/ · $/, "") };
|
|
620
|
+
if (a.state === "final") {
|
|
618
621
|
const t = [];
|
|
619
|
-
return
|
|
622
|
+
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(" · ")}` : ""}` };
|
|
620
623
|
}
|
|
621
|
-
return
|
|
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(/ · $/, "") };
|
|
622
625
|
}
|
|
623
|
-
const
|
|
624
|
-
function _(
|
|
625
|
-
let t = String(
|
|
626
|
+
const De = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
|
|
627
|
+
function _(a) {
|
|
628
|
+
let t = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
|
|
626
629
|
const e = t.indexOf("#");
|
|
627
630
|
let s = "";
|
|
628
631
|
e !== -1 && (s = t.slice(e).split("?")[0], t = t.slice(0, e));
|
|
629
|
-
let
|
|
630
|
-
return
|
|
632
|
+
let r = t.split("?")[0] + s;
|
|
633
|
+
return r = r.replace(/([^:])\/{2,}/g, "$1/").replace(/^\/{2,}/, "/"), r = r.replace(/^\/(?=#)/, ""), r.length > 1 && (r = r.replace(/\/+$/, "")), r.toLowerCase();
|
|
631
634
|
}
|
|
632
635
|
function qt() {
|
|
633
|
-
const
|
|
634
|
-
if (!
|
|
635
|
-
const t = (
|
|
636
|
-
return _((
|
|
636
|
+
const a = globalThis.location;
|
|
637
|
+
if (!a) return "";
|
|
638
|
+
const t = (a.hash || "").startsWith("#/") ? a.hash : "";
|
|
639
|
+
return _((a.pathname || "") + t);
|
|
637
640
|
}
|
|
638
|
-
function
|
|
641
|
+
function ze(a, t, e) {
|
|
639
642
|
if (!e) return null;
|
|
640
|
-
const s = _(
|
|
643
|
+
const s = _(a);
|
|
641
644
|
if (!s) return null;
|
|
642
|
-
const
|
|
643
|
-
if (s ===
|
|
645
|
+
const r = _(g(t.game, { sport: e, id: "" })), o = _(g(t.school, { id: "" }));
|
|
646
|
+
if (s === r || s.startsWith(`${r}/`) || s === o || s.startsWith(`${o}/`)) return null;
|
|
644
647
|
const i = _(g(t.section, { sport: e, view: "" }));
|
|
645
648
|
if (s === i) return "";
|
|
646
649
|
if (!s.startsWith(`${i}/`)) return null;
|
|
647
650
|
const n = s.slice(i.length + 1), d = n.split("/");
|
|
648
|
-
return d.length > 2 || d.some((l) => !/^[a-z][a-z-]*$/.test(l)) ||
|
|
651
|
+
return d.length > 2 || d.some((l) => !/^[a-z][a-z-]*$/.test(l)) || De.has(d[0]) ? null : n;
|
|
649
652
|
}
|
|
650
|
-
function
|
|
651
|
-
const s = (i) => g(e.section, { sport:
|
|
653
|
+
function Re(a, t, e) {
|
|
654
|
+
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 ? [
|
|
652
655
|
{ label: "Boys Standings", href: s("boys/standings") },
|
|
653
656
|
{ label: "Girls Standings", href: s("girls/standings") }
|
|
654
657
|
] : [{ label: "Standings", href: s("standings") }];
|
|
655
658
|
return [
|
|
656
|
-
{ label: `${z(
|
|
659
|
+
{ label: `${z(a)} Home`, href: s("") },
|
|
657
660
|
{ label: "Scores/Schedule", href: s("scores") },
|
|
658
661
|
{ label: "Playoff Brackets", href: s("brackets") },
|
|
659
662
|
...o,
|
|
660
663
|
{ label: "Polls & Rankings", href: s("rankings") }
|
|
661
664
|
];
|
|
662
665
|
}
|
|
663
|
-
function
|
|
666
|
+
function Be(a, t = qt()) {
|
|
664
667
|
const e = _(t);
|
|
665
|
-
for (const s of
|
|
668
|
+
for (const s of a.querySelectorAll(':scope > a[slot="nav"]'))
|
|
666
669
|
e && _(s.getAttribute("href")) === e ? s.setAttribute("aria-current", "page") : s.removeAttribute("aria-current");
|
|
667
670
|
}
|
|
668
671
|
class w extends E {
|
|
@@ -696,7 +699,7 @@ class w extends E {
|
|
|
696
699
|
this.load();
|
|
697
700
|
}
|
|
698
701
|
updated(t) {
|
|
699
|
-
t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(),
|
|
702
|
+
t.has("api") && t.get("api") !== void 0 && t.get("api") !== this.api && this.load(), t.has("refreshInterval") && this._setupInterval(), Be(this);
|
|
700
703
|
}
|
|
701
704
|
async load() {
|
|
702
705
|
const t = this.client;
|
|
@@ -731,7 +734,7 @@ class w extends E {
|
|
|
731
734
|
return c``;
|
|
732
735
|
}
|
|
733
736
|
}
|
|
734
|
-
const v = (
|
|
737
|
+
const v = (a) => Object.fromEntries((a || []).map((t) => [t.id, t])), Fe = b`
|
|
735
738
|
:host {
|
|
736
739
|
--hsot-red: var(--color-red, #D1232A);
|
|
737
740
|
--hsot-red-deep: var(--color-red-dark, #951C21);
|
|
@@ -769,7 +772,7 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
769
772
|
outline-offset: 1px;
|
|
770
773
|
}
|
|
771
774
|
.mut { color: var(--hsot-gray-5); }
|
|
772
|
-
`,
|
|
775
|
+
`, Ne = b`
|
|
773
776
|
.band { background: var(--hsot-white); color: var(--hsot-black); }
|
|
774
777
|
.band .inner { max-width: 1366px; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
|
|
775
778
|
.band h1, .band h2.bandtitle {
|
|
@@ -818,7 +821,7 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
818
821
|
@media (max-width: 720px) {
|
|
819
822
|
.band h1, .band h2.bandtitle, .band.section h1, .band.section h2.bandtitle { font-size: 1.8rem; }
|
|
820
823
|
}
|
|
821
|
-
`,
|
|
824
|
+
`, Ue = b`
|
|
822
825
|
.view { max-width: 1366px; margin: 0 auto; padding: 1.25rem; box-sizing: border-box; }
|
|
823
826
|
/* Optional right rail (slot="rail" light-DOM children): a divided 300px
|
|
824
827
|
column on desktop, stacked under the view content on smaller screens. */
|
|
@@ -882,7 +885,7 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
882
885
|
.error { padding: 1.2rem 1rem; color: var(--hsot-red-deep); font-size: 0.9rem; }
|
|
883
886
|
.note { font-size: 0.8125rem; color: var(--hsot-gray-5); margin: 0.6rem 0 0; }
|
|
884
887
|
.loading { padding: 1.2rem; color: var(--hsot-gray-5); font-family: var(--hsot-heading-font); }
|
|
885
|
-
`,
|
|
888
|
+
`, Oe = b`
|
|
886
889
|
.pill {
|
|
887
890
|
display: inline-block; font-family: var(--hsot-heading-font); font-weight: 700;
|
|
888
891
|
font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em;
|
|
@@ -897,7 +900,7 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
897
900
|
.pill.champ { background: var(--hsot-straw); color: #6b5900; }
|
|
898
901
|
@keyframes hsot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
|
|
899
902
|
@media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } }
|
|
900
|
-
`,
|
|
903
|
+
`, He = b`
|
|
901
904
|
.tablewrap { overflow-x: auto; }
|
|
902
905
|
table.data { font-family: var(--hsot-heading-font); font-size: 14px; border-collapse: collapse; width: 100%; }
|
|
903
906
|
table.data th {
|
|
@@ -915,7 +918,7 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
915
918
|
table.data tbody tr.rowlink:hover { background: var(--hsot-gray-1); }
|
|
916
919
|
table.data td.teamcell a { color: inherit; text-decoration: none; font-weight: 500; }
|
|
917
920
|
table.data td.teamcell a:hover { text-decoration: underline; }
|
|
918
|
-
`,
|
|
921
|
+
`, Me = b`
|
|
919
922
|
.swatch {
|
|
920
923
|
display: inline-flex; align-items: center; justify-content: center;
|
|
921
924
|
width: 26px; height: 26px; border-radius: 50%;
|
|
@@ -939,7 +942,7 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
939
942
|
.dot.W { background: var(--hsot-win); }
|
|
940
943
|
.dot.L { background: var(--hsot-loss); }
|
|
941
944
|
.dot.T { background: var(--hsot-tie); }
|
|
942
|
-
`,
|
|
945
|
+
`, Le = b`
|
|
943
946
|
ul.gamelist { list-style: none; margin: 0; padding: 0; }
|
|
944
947
|
.gamelist li {
|
|
945
948
|
display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem;
|
|
@@ -989,16 +992,16 @@ const v = (r) => Object.fromEntries((r || []).map((t) => [t.id, t])), Be = b`
|
|
|
989
992
|
.gamelist .ff { color: var(--hsot-gray-5); font-size: 0.78rem; font-style: italic; }
|
|
990
993
|
.gamelist .where { color: var(--hsot-gray-5); font-size: 0.78rem; }
|
|
991
994
|
.gamelist a.box { font-size: 0.78rem; }
|
|
992
|
-
`, j = [
|
|
993
|
-
function ut(
|
|
994
|
-
return
|
|
995
|
+
`, j = [Fe, Ne, Ue, Oe, He, Me, Le];
|
|
996
|
+
function ut(a) {
|
|
997
|
+
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";
|
|
995
998
|
}
|
|
996
|
-
function
|
|
997
|
-
return
|
|
999
|
+
function je(a) {
|
|
1000
|
+
return a && (a.forfeit === "home" || a.forfeit === "away") ? a.forfeit : null;
|
|
998
1001
|
}
|
|
999
|
-
function W(
|
|
1000
|
-
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]),
|
|
1001
|
-
for (const o of
|
|
1002
|
+
function W(a, t) {
|
|
1003
|
+
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
|
+
for (const o of r) {
|
|
1002
1005
|
const i = ut(o), n = o.gameType === "conference";
|
|
1003
1006
|
for (const d of ["home", "away"]) {
|
|
1004
1007
|
const l = d === "home" ? o.homeTeamId : o.awayTeamId;
|
|
@@ -1011,41 +1014,41 @@ function W(r, t) {
|
|
|
1011
1014
|
}
|
|
1012
1015
|
return e;
|
|
1013
1016
|
}
|
|
1014
|
-
function st(
|
|
1015
|
-
if (!
|
|
1016
|
-
const t =
|
|
1017
|
+
function st(a) {
|
|
1018
|
+
if (!a || !a.length) return "";
|
|
1019
|
+
const t = a[a.length - 1].mark;
|
|
1017
1020
|
let e = 0;
|
|
1018
|
-
for (let s =
|
|
1021
|
+
for (let s = a.length - 1; s >= 0 && a[s].mark === t; s -= 1) e += 1;
|
|
1019
1022
|
return t + e;
|
|
1020
1023
|
}
|
|
1021
|
-
const Rt = (
|
|
1022
|
-
const s =
|
|
1023
|
-
return s ? (
|
|
1024
|
-
}, Bt = (
|
|
1025
|
-
function x(
|
|
1026
|
-
if (!
|
|
1027
|
-
const e = t ?
|
|
1028
|
-
return `${e}-${s}${
|
|
1029
|
-
}
|
|
1030
|
-
function Gt(
|
|
1031
|
-
return
|
|
1024
|
+
const Rt = (a, t, e) => {
|
|
1025
|
+
const s = a + t + e;
|
|
1026
|
+
return s ? (a + e / 2) / s : 0;
|
|
1027
|
+
}, Bt = (a) => a.toFixed(3).replace("0.", ".");
|
|
1028
|
+
function x(a, t = !1) {
|
|
1029
|
+
if (!a) return "0-0";
|
|
1030
|
+
const e = t ? a.cw : a.w, s = t ? a.cl : a.l, r = t ? a.ct : a.t;
|
|
1031
|
+
return `${e}-${s}${r ? `-${r}` : ""}`;
|
|
1032
|
+
}
|
|
1033
|
+
function Gt(a, t) {
|
|
1034
|
+
return a.map((e) => {
|
|
1032
1035
|
const s = t[e.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] };
|
|
1033
1036
|
return { team: e, rec: s, confPct: Rt(s.cw, s.cl, s.ct), overallPct: Rt(s.w, s.l, s.t) };
|
|
1034
1037
|
}).sort((e, s) => s.confPct - e.confPct || s.overallPct - e.overallPct || s.rec.pf - s.rec.pa - (e.rec.pf - e.rec.pa));
|
|
1035
1038
|
}
|
|
1036
|
-
function gt(
|
|
1037
|
-
return
|
|
1039
|
+
function gt(a, t) {
|
|
1040
|
+
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;
|
|
1038
1041
|
}
|
|
1039
|
-
function Ft(
|
|
1040
|
-
const e =
|
|
1042
|
+
function Ft(a, t) {
|
|
1043
|
+
const e = a[t];
|
|
1041
1044
|
return e && e.results.length ? e.results[e.results.length - 1] : null;
|
|
1042
1045
|
}
|
|
1043
|
-
function vt(
|
|
1046
|
+
function vt(a, t, e, s, r) {
|
|
1044
1047
|
const o = t[e];
|
|
1045
1048
|
if (!o) return null;
|
|
1046
1049
|
const i = /* @__PURE__ */ new Map();
|
|
1047
|
-
for (const d of
|
|
1048
|
-
if (d.sport !== s ||
|
|
1050
|
+
for (const d of a || []) {
|
|
1051
|
+
if (d.sport !== s || r && d.effectiveDate > r || d.gender && o.gender !== d.gender && o.gender !== "coed") continue;
|
|
1049
1052
|
const l = d.gender || "", h = i.get(l);
|
|
1050
1053
|
(!h || d.effectiveDate > h.effectiveDate) && i.set(l, d);
|
|
1051
1054
|
}
|
|
@@ -1056,35 +1059,35 @@ function vt(r, t, e, s, a) {
|
|
|
1056
1059
|
}
|
|
1057
1060
|
return n ? n.rank : null;
|
|
1058
1061
|
}
|
|
1059
|
-
function
|
|
1060
|
-
if (!
|
|
1061
|
-
const s = (
|
|
1062
|
+
function We(a, t, e) {
|
|
1063
|
+
if (!a) return { kind: "none", delta: 0 };
|
|
1064
|
+
const s = (a.teamIds || []).indexOf(e) + 1;
|
|
1062
1065
|
if (!s) return { kind: "none", delta: 0 };
|
|
1063
1066
|
if (!t) return { kind: "same", delta: 0 };
|
|
1064
|
-
const
|
|
1065
|
-
if (!
|
|
1066
|
-
const o =
|
|
1067
|
+
const r = (t.teamIds || []).indexOf(e) + 1;
|
|
1068
|
+
if (!r) return { kind: "new", delta: 0 };
|
|
1069
|
+
const o = r - s;
|
|
1067
1070
|
return o > 0 ? { kind: "up", delta: o } : o < 0 ? { kind: "down", delta: -o } : { kind: "same", delta: 0 };
|
|
1068
1071
|
}
|
|
1069
|
-
function
|
|
1070
|
-
return /^https?:\/\//i.test(String(
|
|
1072
|
+
function qe(a) {
|
|
1073
|
+
return /^https?:\/\//i.test(String(a || ""));
|
|
1071
1074
|
}
|
|
1072
|
-
function Vt(
|
|
1073
|
-
if (!
|
|
1075
|
+
function Vt(a, { w: t, h: e } = {}) {
|
|
1076
|
+
if (!qe(a)) return "";
|
|
1074
1077
|
const s = [];
|
|
1075
1078
|
t && s.push(`w=${Math.max(1, Math.round(t))}`), e && s.push(`h=${Math.max(1, Math.round(e))}`), s.push("f=webp");
|
|
1076
|
-
const
|
|
1077
|
-
return `${
|
|
1079
|
+
const r = a.includes("?") ? "&" : "?";
|
|
1080
|
+
return `${a}${r}${s.join("&")}`;
|
|
1078
1081
|
}
|
|
1079
|
-
function Q(
|
|
1082
|
+
function Q(a, t) {
|
|
1080
1083
|
const e = t * 2;
|
|
1081
|
-
return Vt(
|
|
1084
|
+
return Vt(a?.logoAssetId, { w: e, h: e });
|
|
1082
1085
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return Vt(
|
|
1086
|
+
function Ge(a, t) {
|
|
1087
|
+
return Vt(a?.photoAssetId, { w: t * 2 });
|
|
1085
1088
|
}
|
|
1086
|
-
function $t(
|
|
1087
|
-
const o = qt(), n = !!
|
|
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;
|
|
1088
1091
|
return c`
|
|
1089
1092
|
<div class="band section">
|
|
1090
1093
|
<div class="inner">
|
|
@@ -1095,7 +1098,7 @@ function $t(r, t, { title: e, sub: s, teams: a }) {
|
|
|
1095
1098
|
<nav class="sectionnav" aria-label="${z(t.sport)} section">
|
|
1096
1099
|
<div class="navrow">
|
|
1097
1100
|
<slot name="nav">
|
|
1098
|
-
${
|
|
1101
|
+
${Re(t.sport, r, t.hrefs).map((d) => c`<a href=${d.href}
|
|
1099
1102
|
aria-current=${o && _(d.href) === o ? "page" : m}>${d.label}</a>`)}
|
|
1100
1103
|
</slot>
|
|
1101
1104
|
</div>
|
|
@@ -1103,58 +1106,58 @@ function $t(r, t, { title: e, sub: s, teams: a }) {
|
|
|
1103
1106
|
</div>
|
|
1104
1107
|
`;
|
|
1105
1108
|
}
|
|
1106
|
-
const O = (
|
|
1107
|
-
const e =
|
|
1108
|
-
return e ?
|
|
1109
|
-
}, C = (
|
|
1110
|
-
function H(
|
|
1111
|
-
if (!
|
|
1112
|
-
const e = Q(
|
|
1109
|
+
const O = (a, t) => {
|
|
1110
|
+
const e = a.teamsById[t];
|
|
1111
|
+
return e ? a.schoolsById[e.schoolId] : null;
|
|
1112
|
+
}, C = (a, t) => O(a, t)?.name || "TBD", Z = (a, t) => O(a, t)?.abbr || "TBD";
|
|
1113
|
+
function H(a, t = 26) {
|
|
1114
|
+
if (!a) return m;
|
|
1115
|
+
const e = Q(a, t);
|
|
1113
1116
|
if (e)
|
|
1114
1117
|
return c`<img class="swatch logo" aria-hidden="true" alt="" loading="lazy"
|
|
1115
1118
|
src=${e} style="width:${t}px;height:${t}px" />`;
|
|
1116
|
-
const s =
|
|
1119
|
+
const s = a.colorPrimary || "#030711", r = K(s);
|
|
1117
1120
|
return c`<span class="swatch" aria-hidden="true"
|
|
1118
|
-
style="width:${t}px;height:${t}px;background:${s};color:${
|
|
1119
|
-
>${ft(
|
|
1121
|
+
style="width:${t}px;height:${t}px;background:${s};color:${r};font-size:${Math.max(8, t * 0.28)}px"
|
|
1122
|
+
>${ft(a)}</span>`;
|
|
1120
1123
|
}
|
|
1121
|
-
function bt(
|
|
1122
|
-
const s = vt(
|
|
1124
|
+
function bt(a, t, e) {
|
|
1125
|
+
const s = vt(a.rankings, a.teamsById, t, a.sport, e);
|
|
1123
1126
|
return s ? c`<span class="rankbadge">#${s}</span>` : m;
|
|
1124
1127
|
}
|
|
1125
|
-
function Yt(
|
|
1126
|
-
const s = O(
|
|
1127
|
-
return s ? c`${bt(
|
|
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>`;
|
|
1128
1131
|
}
|
|
1129
|
-
function yt(
|
|
1130
|
-
const s =
|
|
1132
|
+
function yt(a, t, e = 5) {
|
|
1133
|
+
const s = a.records[t];
|
|
1131
1134
|
if (!s || !s.results.length) return c`<span class="mut">·</span>`;
|
|
1132
|
-
const
|
|
1133
|
-
return c`<span class="dots" role="img" aria-label="last ${
|
|
1134
|
-
${
|
|
1135
|
-
title="${o.mark} ${o.my}-${o.their} vs ${C(
|
|
1136
|
-
href=${g(
|
|
1135
|
+
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
|
+
href=${g(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
|
|
1137
1140
|
</span>`;
|
|
1138
1141
|
}
|
|
1139
|
-
function q(
|
|
1140
|
-
return
|
|
1142
|
+
function q(a, t) {
|
|
1143
|
+
return a.querySelector(':scope > [slot="rail"]') ? c`<div class="view withrail">
|
|
1141
1144
|
<div class="viewmain">${t}</div>
|
|
1142
1145
|
<aside class="viewrail"><slot name="rail"></slot></aside>
|
|
1143
1146
|
</div>` : c`<div class="view">${t}</div>`;
|
|
1144
1147
|
}
|
|
1145
|
-
function G(
|
|
1146
|
-
if (!
|
|
1147
|
-
const t = c`<img src=${
|
|
1148
|
-
return c`<div class="promo">${
|
|
1148
|
+
function G(a) {
|
|
1149
|
+
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>`;
|
|
1149
1152
|
}
|
|
1150
|
-
function J(
|
|
1151
|
-
const t = Wt(
|
|
1153
|
+
function J(a) {
|
|
1154
|
+
const t = Wt(a);
|
|
1152
1155
|
return c`<span class="pill ${t.kind}">${t.label}</span>`;
|
|
1153
1156
|
}
|
|
1154
|
-
function Kt(
|
|
1157
|
+
function Kt(a, t, e) {
|
|
1155
1158
|
if (!t) return c`<span class="mut">·</span>`;
|
|
1156
|
-
const s = t.homeTeamId === e ? t.awayTeamId : t.homeTeamId,
|
|
1157
|
-
return c`${t.state === "live" ? c`<span class="pill live">Live</span> ` : c`${y(t.date, { month: "numeric", day: "numeric" })} `}${
|
|
1159
|
+
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)}`;
|
|
1158
1161
|
}
|
|
1159
1162
|
class Qt extends w {
|
|
1160
1163
|
static styles = j;
|
|
@@ -1175,17 +1178,17 @@ class Qt extends w {
|
|
|
1175
1178
|
this._datePinned = !!this.date;
|
|
1176
1179
|
}
|
|
1177
1180
|
async fetchData(t) {
|
|
1178
|
-
const e = this.season || et(), [s,
|
|
1181
|
+
const e = this.season || et(), [s, r, o, i, n] = await Promise.all([
|
|
1179
1182
|
t.listSchools(),
|
|
1180
1183
|
t.listTeams({ sport: this.sport }),
|
|
1181
1184
|
t.listConferences(),
|
|
1182
1185
|
t.listGames({ sport: this.sport, season: e }),
|
|
1183
1186
|
t.listRankings({ sport: this.sport })
|
|
1184
1187
|
]);
|
|
1185
|
-
return this._datePinned || (this.date =
|
|
1188
|
+
return this._datePinned || (this.date = Ce(i.items.map((d) => d.date)), this._datePinned = !0), {
|
|
1186
1189
|
season: e,
|
|
1187
1190
|
schools: s.items,
|
|
1188
|
-
teams:
|
|
1191
|
+
teams: r.items,
|
|
1189
1192
|
conferences: o.items,
|
|
1190
1193
|
games: i.items,
|
|
1191
1194
|
rankings: n.items
|
|
@@ -1202,9 +1205,9 @@ class Qt extends w {
|
|
|
1202
1205
|
}, this._ctxData = this.data), this._ctx;
|
|
1203
1206
|
}
|
|
1204
1207
|
renderView() {
|
|
1205
|
-
const t = this.ctx, e = v(this.data.conferences), s = [...new Set(this.data.games.map((l) => l.date).filter(Boolean))].sort(),
|
|
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) => {
|
|
1206
1209
|
const h = [l.awayTeamId, l.homeTeamId].map((p) => vt(t.rankings, t.teamsById, p, this.sport, l.date)).filter(Boolean);
|
|
1207
|
-
return h.length ? Math.min(...h) :
|
|
1210
|
+
return h.length ? Math.min(...h) : r;
|
|
1208
1211
|
}, i = this.data.games.filter((l) => l.date === this.date), n = new Map(i.map((l) => [l, o(l)]));
|
|
1209
1212
|
i.sort((l, h) => (l.state === "live" ? 0 : 1) - (h.state === "live" ? 0 : 1) || n.get(l) - n.get(h));
|
|
1210
1213
|
const d = /* @__PURE__ */ new Map();
|
|
@@ -1253,11 +1256,11 @@ class Qt extends w {
|
|
|
1253
1256
|
// a lone score column on the far right read as detached from the teams).
|
|
1254
1257
|
// Scheduled games carry their start time on the status pill alone.
|
|
1255
1258
|
renderGame(t, e) {
|
|
1256
|
-
const s = e.state === "final" || e.state === "live",
|
|
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);
|
|
1257
1260
|
return c`
|
|
1258
1261
|
<li>
|
|
1259
1262
|
${J(e)}
|
|
1260
|
-
<span class="opp matchup">${
|
|
1263
|
+
<span class="opp matchup">${r(e.awayTeamId, e.awayScore, c`<span class="at">at</span>`)}${r(e.homeTeamId, e.homeScore)}</span>
|
|
1261
1264
|
${o ? c`<span class="ff">${C(t, o === "home" ? e.homeTeamId : e.awayTeamId)} forfeited</span>` : m}
|
|
1262
1265
|
<span class="where">${e.venue || ""}</span>
|
|
1263
1266
|
${e.broadcast ? c`<span class="pill class">${e.broadcast}</span>` : m}
|
|
@@ -1280,7 +1283,7 @@ class Zt extends w {
|
|
|
1280
1283
|
super(), this.sport = "football", this.season = "", this.classFilter = "All", this.query = "";
|
|
1281
1284
|
}
|
|
1282
1285
|
async fetchData(t) {
|
|
1283
|
-
const e = this.season || et(), [s,
|
|
1286
|
+
const e = this.season || et(), [s, r, o, i, n] = await Promise.all([
|
|
1284
1287
|
t.listConferences({ active: !0 }),
|
|
1285
1288
|
t.listSchools(),
|
|
1286
1289
|
t.listTeams({ sport: this.sport }),
|
|
@@ -1290,7 +1293,7 @@ class Zt extends w {
|
|
|
1290
1293
|
return {
|
|
1291
1294
|
season: e,
|
|
1292
1295
|
conferences: s.items,
|
|
1293
|
-
schools:
|
|
1296
|
+
schools: r.items,
|
|
1294
1297
|
teams: o.items,
|
|
1295
1298
|
games: i.items,
|
|
1296
1299
|
rankings: n.items
|
|
@@ -1307,7 +1310,7 @@ class Zt extends w {
|
|
|
1307
1310
|
}, this._ctxData = this.data), this._ctx;
|
|
1308
1311
|
}
|
|
1309
1312
|
renderView() {
|
|
1310
|
-
const t = this.ctx, e = ["All", ...[...new Set(this.data.conferences.flatMap((
|
|
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);
|
|
1311
1314
|
return c`
|
|
1312
1315
|
${$t(this, t, {
|
|
1313
1316
|
title: c`${z(this.sport)} standings`,
|
|
@@ -1318,26 +1321,26 @@ class Zt extends w {
|
|
|
1318
1321
|
${G(this)}
|
|
1319
1322
|
<div class="toolbar">
|
|
1320
1323
|
<div role="group" aria-label="Classification filter">
|
|
1321
|
-
${e.map((
|
|
1324
|
+
${e.map((r) => c`<button class="chip ${this.classFilter === r ? "on" : ""}"
|
|
1322
1325
|
@click=${() => {
|
|
1323
|
-
this.classFilter =
|
|
1324
|
-
}}>${
|
|
1326
|
+
this.classFilter = r;
|
|
1327
|
+
}}>${r}</button>`)}
|
|
1325
1328
|
</div>
|
|
1326
1329
|
<input type="search" placeholder="Find a school…" aria-label="Find a school"
|
|
1327
|
-
.value=${this.query} @input=${(
|
|
1328
|
-
this.query =
|
|
1330
|
+
.value=${this.query} @input=${(r) => {
|
|
1331
|
+
this.query = r.target.value;
|
|
1329
1332
|
}}>
|
|
1330
1333
|
<span class="spacer"></span>
|
|
1331
1334
|
<span class="asof">Records through ${y(mt(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
|
|
1332
1335
|
</div>
|
|
1333
|
-
${s.map((
|
|
1336
|
+
${s.map((r) => this.renderConference(t, r))}
|
|
1334
1337
|
`)}
|
|
1335
1338
|
`;
|
|
1336
1339
|
}
|
|
1337
1340
|
renderConference(t, e) {
|
|
1338
1341
|
const s = this.data.teams.filter((i) => i.conferenceId === e.id);
|
|
1339
1342
|
if (!s.length) return m;
|
|
1340
|
-
const
|
|
1343
|
+
const r = this.query.trim().toLowerCase(), o = Gt(s, t.records);
|
|
1341
1344
|
return c`
|
|
1342
1345
|
<div class="card">
|
|
1343
1346
|
<div class="card-head">
|
|
@@ -1352,15 +1355,15 @@ class Zt extends w {
|
|
|
1352
1355
|
<th>Streak</th><th>Last 5</th><th>Next</th>
|
|
1353
1356
|
</tr></thead>
|
|
1354
1357
|
<tbody>
|
|
1355
|
-
${o.map((i, n) => this.renderRow(t, i, n,
|
|
1358
|
+
${o.map((i, n) => this.renderRow(t, i, n, r))}
|
|
1356
1359
|
</tbody>
|
|
1357
1360
|
</table></div>
|
|
1358
1361
|
</div>
|
|
1359
1362
|
`;
|
|
1360
1363
|
}
|
|
1361
|
-
renderRow(t, e, s,
|
|
1364
|
+
renderRow(t, e, s, r) {
|
|
1362
1365
|
const o = t.schoolsById[e.team.schoolId], i = o?.name || e.team.name || "TBD";
|
|
1363
|
-
if (
|
|
1366
|
+
if (r && !i.toLowerCase().includes(r)) return m;
|
|
1364
1367
|
const n = e.rec.pf - e.rec.pa, d = gt(this.data.games, e.team.id), l = () => {
|
|
1365
1368
|
location.href = g(t.hrefs.school, { id: e.team.schoolId });
|
|
1366
1369
|
};
|
|
@@ -1388,7 +1391,7 @@ class Zt extends w {
|
|
|
1388
1391
|
}
|
|
1389
1392
|
}
|
|
1390
1393
|
globalThis?.customElements && !globalThis.customElements.get("hsot-standings") && globalThis.customElements.define("hsot-standings", Zt);
|
|
1391
|
-
const
|
|
1394
|
+
const Ve = b`
|
|
1392
1395
|
.hero1 {
|
|
1393
1396
|
border-radius: var(--hsot-radius-md); color: var(--hsot-white);
|
|
1394
1397
|
padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1.2rem;
|
|
@@ -1406,7 +1409,7 @@ const Ge = b`
|
|
|
1406
1409
|
.sparkline { vertical-align: middle; }
|
|
1407
1410
|
`;
|
|
1408
1411
|
class Jt extends w {
|
|
1409
|
-
static styles = [...j,
|
|
1412
|
+
static styles = [...j, Ve];
|
|
1410
1413
|
static properties = {
|
|
1411
1414
|
...w.properties,
|
|
1412
1415
|
sport: { type: String },
|
|
@@ -1423,7 +1426,7 @@ class Jt extends w {
|
|
|
1423
1426
|
t && (this.pollDate = t);
|
|
1424
1427
|
}
|
|
1425
1428
|
async fetchData(t) {
|
|
1426
|
-
const e = this.season || et(), [s,
|
|
1429
|
+
const e = this.season || et(), [s, r, o, i, n] = await Promise.all([
|
|
1427
1430
|
t.listRankings({ sport: this.sport, ...this.gender ? { gender: this.gender } : {} }),
|
|
1428
1431
|
t.listSchools(),
|
|
1429
1432
|
t.listTeams({ sport: this.sport }),
|
|
@@ -1433,7 +1436,7 @@ class Jt extends w {
|
|
|
1433
1436
|
return {
|
|
1434
1437
|
season: e,
|
|
1435
1438
|
polls: d,
|
|
1436
|
-
schools:
|
|
1439
|
+
schools: r.items,
|
|
1437
1440
|
teams: o.items,
|
|
1438
1441
|
conferences: i.items,
|
|
1439
1442
|
games: n.items
|
|
@@ -1453,8 +1456,8 @@ class Jt extends w {
|
|
|
1453
1456
|
const n = e.map((p, f) => {
|
|
1454
1457
|
const u = (p.teamIds || []).indexOf(t);
|
|
1455
1458
|
if (u === -1) return null;
|
|
1456
|
-
const $ = e.length === 1 ? 96 / 2 : f / (e.length - 1) * 90 + 3,
|
|
1457
|
-
return { x: $, y:
|
|
1459
|
+
const $ = e.length === 1 ? 96 / 2 : f / (e.length - 1) * 90 + 3, at = 3 + u / 24 * 20;
|
|
1460
|
+
return { x: $, y: at };
|
|
1458
1461
|
}), d = [];
|
|
1459
1462
|
let l = [];
|
|
1460
1463
|
if (n.forEach((p) => {
|
|
@@ -1468,13 +1471,13 @@ class Jt extends w {
|
|
|
1468
1471
|
</svg>`;
|
|
1469
1472
|
}
|
|
1470
1473
|
movement(t, e, s) {
|
|
1471
|
-
const
|
|
1472
|
-
return
|
|
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>`;
|
|
1473
1476
|
}
|
|
1474
1477
|
renderView() {
|
|
1475
1478
|
const t = this.ctx, e = this.data.polls;
|
|
1476
1479
|
if (!e.length) return c`<div class="view"><p class="empty">No ${this.sport} polls published yet this season.</p></div>`;
|
|
1477
|
-
const s = Math.max(0, e.findIndex((p) => p.effectiveDate === this.pollDate)),
|
|
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;
|
|
1478
1481
|
return c`
|
|
1479
1482
|
${$t(this, t, {
|
|
1480
1483
|
title: c`${z(this.sport)} Top 25`,
|
|
@@ -1488,7 +1491,7 @@ class Jt extends w {
|
|
|
1488
1491
|
<select id="pollsel" @change=${(p) => {
|
|
1489
1492
|
this.pollDate = p.target.value;
|
|
1490
1493
|
}}>
|
|
1491
|
-
${e.map((p, f) => c`<option value=${p.effectiveDate} ?selected=${p ===
|
|
1494
|
+
${e.map((p, f) => c`<option value=${p.effectiveDate} ?selected=${p === r}>
|
|
1492
1495
|
${y(p.effectiveDate, { month: "long", day: "numeric", year: "numeric" })}${f === 0 ? " · current" : ""}
|
|
1493
1496
|
</option>`)}
|
|
1494
1497
|
</select>
|
|
@@ -1503,22 +1506,22 @@ class Jt extends w {
|
|
|
1503
1506
|
<span class="spacer"></span>
|
|
1504
1507
|
<span class="asof">Movement vs. the previous poll · sparkline = season rank history</span>
|
|
1505
1508
|
</div>
|
|
1506
|
-
${h ? this.renderHero(t,
|
|
1509
|
+
${h ? this.renderHero(t, r, o, l, h, d) : m}
|
|
1507
1510
|
<div class="card"><div class="tablewrap"><table class="data">
|
|
1508
1511
|
<thead><tr>
|
|
1509
1512
|
<th class="num">Rk</th><th>Mvmt</th><th>Team</th><th class="num">Record</th>
|
|
1510
1513
|
<th>Conference</th><th>Last result</th><th>Next</th><th>Season</th>
|
|
1511
1514
|
</tr></thead>
|
|
1512
1515
|
<tbody>
|
|
1513
|
-
${(
|
|
1516
|
+
${(r.teamIds || []).map((p, f) => f === 0 || !p ? m : this.renderRow(t, r, o, i, n, d, p, f + 1))}
|
|
1514
1517
|
</tbody>
|
|
1515
1518
|
</table></div></div>
|
|
1516
1519
|
<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>
|
|
1517
1520
|
`)}
|
|
1518
1521
|
`;
|
|
1519
1522
|
}
|
|
1520
|
-
renderHero(t, e, s,
|
|
1521
|
-
const n = t.records[
|
|
1523
|
+
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%)`;
|
|
1522
1525
|
return c`
|
|
1523
1526
|
<div class="hero1" style="background:${h}">
|
|
1524
1527
|
<div class="bigrank">#1</div>
|
|
@@ -1529,21 +1532,21 @@ class Jt extends w {
|
|
|
1529
1532
|
${x(n)} overall${l ? c` · ${x(n, !0)} ${l.name}` : m}
|
|
1530
1533
|
· streak ${st(n?.results) || "·"}
|
|
1531
1534
|
${d ? c` · last: ${d.mark} ${d.my}-${d.their} vs ${Z(t, d.opp)}` : m}
|
|
1532
|
-
${this.movement(e, s,
|
|
1535
|
+
${this.movement(e, s, r)}
|
|
1533
1536
|
</div>
|
|
1534
1537
|
</div>
|
|
1535
1538
|
</div>
|
|
1536
1539
|
`;
|
|
1537
1540
|
}
|
|
1538
|
-
renderRow(t, e, s,
|
|
1541
|
+
renderRow(t, e, s, r, o, i, n, d) {
|
|
1539
1542
|
const l = O(t, n);
|
|
1540
1543
|
if (!l) return m;
|
|
1541
1544
|
const h = t.records[n], p = Ft(t.records, n), f = gt(this.data.games, n), u = i[t.teamsById[n]?.conferenceId], $ = () => {
|
|
1542
1545
|
location.href = g(t.hrefs.school, { id: l.id });
|
|
1543
1546
|
};
|
|
1544
1547
|
return c`
|
|
1545
|
-
<tr class="rowlink" @click=${(
|
|
1546
|
-
|
|
1548
|
+
<tr class="rowlink" @click=${(at) => {
|
|
1549
|
+
at.target.closest("a") || $();
|
|
1547
1550
|
}}>
|
|
1548
1551
|
<td class="num" style="font-weight:700">${d}</td>
|
|
1549
1552
|
<td>${this.movement(e, s, n)}</td>
|
|
@@ -1555,13 +1558,13 @@ class Jt extends w {
|
|
|
1555
1558
|
<b style="color:${p.mark === "W" ? "var(--hsot-win)" : p.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${p.mark}</b>
|
|
1556
1559
|
${p.my}-${p.their} vs ${Z(t, p.opp)}</a>` : c`<span class="mut">·</span>`}</td>
|
|
1557
1560
|
<td>${Kt(t, f, n)}</td>
|
|
1558
|
-
<td>${this.sparkline(n,
|
|
1561
|
+
<td>${this.sparkline(n, r, o)}</td>
|
|
1559
1562
|
</tr>
|
|
1560
1563
|
`;
|
|
1561
1564
|
}
|
|
1562
1565
|
}
|
|
1563
1566
|
globalThis?.customElements && !globalThis.customElements.get("hsot-rankings") && globalThis.customElements.define("hsot-rankings", Jt);
|
|
1564
|
-
const
|
|
1567
|
+
const Ye = b`
|
|
1565
1568
|
.schoolhero { color: var(--hsot-white); padding: 1.6rem 1.25rem 1.3rem; }
|
|
1566
1569
|
.schoolhero .inner { max-width: 1366px; margin: 0 auto; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
|
|
1567
1570
|
.schoolhero .crest {
|
|
@@ -1583,15 +1586,40 @@ const Ve = b`
|
|
|
1583
1586
|
.tile .k { font-family: var(--hsot-heading-font); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; font-weight: 700; color: var(--hsot-red-deep); }
|
|
1584
1587
|
.tile .v { font-family: var(--hsot-heading-font); font-weight: 700; font-size: 1.7rem; line-height: 1.15; color: var(--hsot-black); }
|
|
1585
1588
|
.tile .s { font-size: 0.78rem; color: var(--hsot-gray-5); }
|
|
1586
|
-
|
|
1589
|
+
/* Schedule and roster split the width evenly. The roster used to get
|
|
1590
|
+
5/12 (~393px beside the rail), which held six columns; the season
|
|
1591
|
+
photo and the College column (2026-09) took its table to ~480px and
|
|
1592
|
+
gave the card a horizontal scrollbar on desktop while the schedule
|
|
1593
|
+
sat in white space. Both tracks are minmax(0, …) so a table that is
|
|
1594
|
+
still too wide scrolls inside its card instead of stretching the
|
|
1595
|
+
grid — and the page — past the viewport. */
|
|
1596
|
+
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
|
|
1587
1597
|
/* The season roster photo heads the roster card, above the table. Natural
|
|
1588
1598
|
height: a team photo is never cropped to a box — the card's overflow
|
|
1589
1599
|
rounds its top corners. */
|
|
1590
1600
|
.rosterphoto { display: block; width: 100%; height: auto; background: var(--hsot-gray-1); border-bottom: 1px solid var(--hsot-gray-2); }
|
|
1591
|
-
|
|
1601
|
+
/* Roster table: a little less side padding than the shared table so all
|
|
1602
|
+
seven columns fit the card beside the rail. */
|
|
1603
|
+
table.data.roster th, table.data.roster td { padding-left: 10px; padding-right: 10px; }
|
|
1604
|
+
table.data.roster .sub { display: none; }
|
|
1605
|
+
/* A bare 1fr here was the mobile bug: its implicit minimum is the
|
|
1606
|
+
content's width, so the nowrap roster table widened the single column
|
|
1607
|
+
past the phone and the whole page scrolled sideways. */
|
|
1608
|
+
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } .schoolhero h1 { font-size: 1.9rem; } }
|
|
1609
|
+
@media (max-width: 720px) {
|
|
1610
|
+
/* Phone: the roster fits the screen instead of scrolling. Position
|
|
1611
|
+
and class fold under the player's name, names and colleges may
|
|
1612
|
+
wrap, and cells tighten. Five columns come to ~330px, inside a
|
|
1613
|
+
360px phone's view padding. */
|
|
1614
|
+
table.data.roster { font-size: 13px; }
|
|
1615
|
+
table.data.roster th, table.data.roster td { padding: 7px 8px; }
|
|
1616
|
+
table.data.roster .pos, table.data.roster .cls { display: none; }
|
|
1617
|
+
table.data.roster td.player, table.data.roster td.college { white-space: normal; }
|
|
1618
|
+
table.data.roster .sub { display: block; font-weight: 400; font-size: 0.78rem; color: var(--hsot-gray-5); }
|
|
1619
|
+
}
|
|
1592
1620
|
`;
|
|
1593
1621
|
class Xt extends w {
|
|
1594
|
-
static styles = [...j,
|
|
1622
|
+
static styles = [...j, Ye];
|
|
1595
1623
|
static properties = {
|
|
1596
1624
|
...w.properties,
|
|
1597
1625
|
schoolId: { type: String, attribute: "school-id" },
|
|
@@ -1647,7 +1675,7 @@ class Xt extends w {
|
|
|
1647
1675
|
this.sport = t, this.load();
|
|
1648
1676
|
}
|
|
1649
1677
|
renderView() {
|
|
1650
|
-
const { school: t, teams: e, active: s, season:
|
|
1678
|
+
const { school: t, teams: e, active: s, season: r } = this.data;
|
|
1651
1679
|
if (!t) return c`<div class="view"><p class="empty">School not found.</p></div>`;
|
|
1652
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;
|
|
1653
1681
|
return c`
|
|
@@ -1676,17 +1704,17 @@ class Xt extends w {
|
|
|
1676
1704
|
</div>
|
|
1677
1705
|
${q(this, c`
|
|
1678
1706
|
${G(this)}
|
|
1679
|
-
${s ? this.renderTeam(o, s, l,
|
|
1707
|
+
${s ? this.renderTeam(o, s, l, r) : c`<p class="empty">No teams recorded for this school yet.</p>`}
|
|
1680
1708
|
`)}
|
|
1681
1709
|
`;
|
|
1682
1710
|
}
|
|
1683
|
-
renderTeam(t, e, s,
|
|
1711
|
+
renderTeam(t, e, s, r) {
|
|
1684
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)));
|
|
1685
1713
|
return c`
|
|
1686
1714
|
<div class="tiles">
|
|
1687
1715
|
<div class="tile"><div class="k">Overall</div><div class="v">${x(o)}</div><div class="s">${i} games played</div></div>
|
|
1688
1716
|
<div class="tile"><div class="k">${s?.name || "Conference"}</div><div class="v">${x(o, !0)}</div>
|
|
1689
|
-
<div class="s">${d ? `${
|
|
1717
|
+
<div class="s">${d ? `${Ee(d)} of ${n.length}` : "·"}</div></div>
|
|
1690
1718
|
<div class="tile"><div class="k">Points</div><div class="v">${i ? (o.pf / i).toFixed(1) : "0.0"}</div>
|
|
1691
1719
|
<div class="s">scored per game · ${i ? (o.pa / i).toFixed(1) : "0.0"} allowed</div></div>
|
|
1692
1720
|
<div class="tile"><div class="k">Streak</div><div class="v">${st(o.results) || "·"}</div>
|
|
@@ -1702,21 +1730,21 @@ class Xt extends w {
|
|
|
1702
1730
|
<div>
|
|
1703
1731
|
<div class="section-title">Schedule & results</div>
|
|
1704
1732
|
<div class="card">
|
|
1705
|
-
${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 ${
|
|
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>`}
|
|
1706
1734
|
</div>
|
|
1707
1735
|
</div>
|
|
1708
1736
|
<div>
|
|
1709
|
-
<div class="section-title">Roster · ${
|
|
1710
|
-
<div class="card">${this.renderRoster(e,
|
|
1737
|
+
<div class="section-title">Roster · ${r}</div>
|
|
1738
|
+
<div class="card">${this.renderRoster(e, r)}</div>
|
|
1711
1739
|
</div>
|
|
1712
1740
|
</div>
|
|
1713
1741
|
`;
|
|
1714
1742
|
}
|
|
1715
1743
|
renderGameRow(t, e, s) {
|
|
1716
|
-
const
|
|
1744
|
+
const r = s.homeTeamId === e.id, o = r ? s.awayTeamId : s.homeTeamId, i = r ? s.homeScore : s.awayScore, n = r ? s.awayScore : s.homeScore;
|
|
1717
1745
|
let d = c`<span class="mut">${pt(s.time)}</span>`;
|
|
1718
1746
|
if (s.state === "final") {
|
|
1719
|
-
const h = ut(s), p = h === "tie" ? "T" : h === (
|
|
1747
|
+
const h = ut(s), p = h === "tie" ? "T" : h === (r ? "home" : "away") ? "W" : "L";
|
|
1720
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}`;
|
|
1721
1749
|
} else s.state === "live" && (d = c`<span style="color:var(--hsot-red)">${i}-${n}</span>`);
|
|
1722
1750
|
const l = s.gameType === "conference" ? "Conf" : s.gameType === "nonconference" ? "Non-conf" : s.gameType === "playoff" ? `Playoff${s.label ? ` · ${s.label}` : ""}` : "Scrimmage";
|
|
@@ -1725,7 +1753,7 @@ class Xt extends w {
|
|
|
1725
1753
|
<span class="d">${y(s.date)}</span>
|
|
1726
1754
|
${Wt(s).kind === "sched" ? m : J(s)}
|
|
1727
1755
|
<span class="res">${d}</span>
|
|
1728
|
-
<span class="opp">${
|
|
1756
|
+
<span class="opp">${r ? "vs" : "at"} ${Yt(t, o, s.date)}
|
|
1729
1757
|
<span class="pill type">${l}</span>
|
|
1730
1758
|
${s.broadcast ? c`<span class="pill class">${s.broadcast}</span>` : m}
|
|
1731
1759
|
</span>
|
|
@@ -1738,24 +1766,26 @@ class Xt extends w {
|
|
|
1738
1766
|
const s = this.data.roster;
|
|
1739
1767
|
if (!s)
|
|
1740
1768
|
return c`<p class="empty">Roster not published for ${e}.</p>`;
|
|
1741
|
-
const
|
|
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);
|
|
1742
1770
|
return c`
|
|
1743
|
-
${
|
|
1771
|
+
${r ? c`<img class="rosterphoto" src=${r} loading="lazy" decoding="async"
|
|
1744
1772
|
alt="${o} ${t.name} ${e} team photo" />` : m}
|
|
1745
|
-
<div class="tablewrap"><table class="data">
|
|
1746
|
-
<thead><tr><th class="num">No.</th><th>Player</th><th>Pos</th><th>Class</th><th class="num">Ht</th><th class="num">Wt</th>${d ? c`<th>College</th>` : m}</tr></thead>
|
|
1773
|
+
<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>
|
|
1747
1775
|
<tbody>
|
|
1748
1776
|
${n.map((l) => {
|
|
1749
1777
|
const h = i[l.playerId];
|
|
1750
|
-
|
|
1778
|
+
if (!h) return m;
|
|
1779
|
+
const p = Ie(l), f = [p, h.classOf].filter(Boolean).join(" · ") || "·";
|
|
1780
|
+
return c`<tr>
|
|
1751
1781
|
<td class="num mut">${l.number ?? "·"}</td>
|
|
1752
|
-
<td style="font-weight:500">${h.firstName} ${h.lastName}</td>
|
|
1753
|
-
<td>${
|
|
1754
|
-
<td class="mut">${h.classOf || "·"}</td>
|
|
1782
|
+
<td class="player" style="font-weight:500">${h.firstName} ${h.lastName}<span class="sub">${f}</span></td>
|
|
1783
|
+
<td class="pos">${p || "·"}</td>
|
|
1784
|
+
<td class="cls mut">${h.classOf || "·"}</td>
|
|
1755
1785
|
<td class="num">${Te(h.heightIn)}</td>
|
|
1756
1786
|
<td class="num">${h.weightLb || "·"}</td>
|
|
1757
|
-
${d ? c`<td>${h.college || "·"}</td>` : m}
|
|
1758
|
-
</tr
|
|
1787
|
+
${d ? c`<td class="college">${h.college || "·"}</td>` : m}
|
|
1788
|
+
</tr>`;
|
|
1759
1789
|
})}
|
|
1760
1790
|
</tbody>
|
|
1761
1791
|
</table></div>
|
|
@@ -1763,36 +1793,36 @@ class Xt extends w {
|
|
|
1763
1793
|
}
|
|
1764
1794
|
}
|
|
1765
1795
|
globalThis?.customElements && !globalThis.customElements.get("hsot-school") && globalThis.customElements.define("hsot-school", Xt);
|
|
1766
|
-
const
|
|
1767
|
-
function
|
|
1768
|
-
return
|
|
1796
|
+
const Ke = "https://api.wral.com/search";
|
|
1797
|
+
function Qe(a) {
|
|
1798
|
+
return a.map((t) => `uri:"${t}"`).join(" OR ");
|
|
1769
1799
|
}
|
|
1770
|
-
function
|
|
1771
|
-
const e = String(
|
|
1800
|
+
function Ze(a, t) {
|
|
1801
|
+
const e = String(a || Ke).replace(/\/+$/, ""), s = new URLSearchParams({ query: Qe(t), sort: "score", lang: "en" });
|
|
1772
1802
|
return `${e}/v1/query?${s}`;
|
|
1773
1803
|
}
|
|
1774
|
-
function te(
|
|
1804
|
+
function te(a) {
|
|
1775
1805
|
try {
|
|
1776
|
-
const t = new URL(
|
|
1806
|
+
const t = new URL(a);
|
|
1777
1807
|
if (/(^|\.)smugmug\.com$/i.test(t.hostname)) {
|
|
1778
1808
|
const e = t.pathname.split("/").filter(Boolean).pop() || "", s = !e || /^[ni]-[A-Za-z0-9]+$/.test(e);
|
|
1779
1809
|
return {
|
|
1780
|
-
uri:
|
|
1781
|
-
title: s ?
|
|
1810
|
+
uri: a,
|
|
1811
|
+
title: s ? a : decodeURIComponent(e).replace(/-/g, " "),
|
|
1782
1812
|
photos: !0
|
|
1783
1813
|
};
|
|
1784
1814
|
}
|
|
1785
1815
|
} catch {
|
|
1786
1816
|
}
|
|
1787
|
-
return { uri:
|
|
1817
|
+
return { uri: a, title: a };
|
|
1788
1818
|
}
|
|
1789
|
-
async function
|
|
1790
|
-
const
|
|
1791
|
-
if (!
|
|
1792
|
-
const o = await
|
|
1819
|
+
async function Je(a, t, e) {
|
|
1820
|
+
const r = await ((...n) => fetch(...n))(Ze(a, t));
|
|
1821
|
+
if (!r.ok) throw new Error(`search answered ${r.status}`);
|
|
1822
|
+
const o = await r.json(), i = new Map((o.items || []).map((n) => [n.uri, n]));
|
|
1793
1823
|
return t.map((n) => i.get(n) || te(n));
|
|
1794
1824
|
}
|
|
1795
|
-
const
|
|
1825
|
+
const Xe = b`
|
|
1796
1826
|
.breadcrumbs { font-size: 0.8125rem; margin: 0.9rem 0 0; color: var(--hsot-gray-5); }
|
|
1797
1827
|
.breadcrumbs a { text-decoration: none; }
|
|
1798
1828
|
.scorehead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1rem; }
|
|
@@ -1832,7 +1862,7 @@ const Je = b`
|
|
|
1832
1862
|
}
|
|
1833
1863
|
`;
|
|
1834
1864
|
class ee extends w {
|
|
1835
|
-
static styles = [...j,
|
|
1865
|
+
static styles = [...j, Xe];
|
|
1836
1866
|
static properties = {
|
|
1837
1867
|
...w.properties,
|
|
1838
1868
|
gameId: { type: String, attribute: "game-id" },
|
|
@@ -1846,7 +1876,7 @@ class ee extends w {
|
|
|
1846
1876
|
super(), this.gameId = "", this.searchApi = "";
|
|
1847
1877
|
}
|
|
1848
1878
|
async fetchData(t) {
|
|
1849
|
-
const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [
|
|
1879
|
+
const e = await t.getGame(this.gameId), s = Array.isArray(e.coverageUrls) ? e.coverageUrls : [], [r, o, i, n, d, l] = await Promise.all([
|
|
1850
1880
|
t.listSchools(),
|
|
1851
1881
|
t.listTeams({ sport: e.sport }),
|
|
1852
1882
|
t.listConferences(),
|
|
@@ -1854,11 +1884,11 @@ class ee extends w {
|
|
|
1854
1884
|
t.listGames({ sport: e.sport, season: e.season }),
|
|
1855
1885
|
// A search outage must not blank the box score — degrade to bare
|
|
1856
1886
|
// links (fetchCoverage already degrades per-URL index misses).
|
|
1857
|
-
s.length ?
|
|
1887
|
+
s.length ? Je(this.searchApi, s).catch(() => s.map(te)) : Promise.resolve([])
|
|
1858
1888
|
]);
|
|
1859
1889
|
return {
|
|
1860
1890
|
game: e,
|
|
1861
|
-
schools:
|
|
1891
|
+
schools: r.items,
|
|
1862
1892
|
teams: o.items,
|
|
1863
1893
|
conferences: i.items,
|
|
1864
1894
|
rankings: n.items,
|
|
@@ -1879,7 +1909,7 @@ class ee extends w {
|
|
|
1879
1909
|
renderView() {
|
|
1880
1910
|
const t = this.data.game;
|
|
1881
1911
|
if (!t) return c`<div class="view"><p class="empty">Game not found.</p></div>`;
|
|
1882
|
-
const e = this.ctx, s = v(this.data.conferences),
|
|
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));
|
|
1883
1913
|
return c`
|
|
1884
1914
|
${q(this, c`
|
|
1885
1915
|
${G(this)}
|
|
@@ -1890,7 +1920,7 @@ class ee extends w {
|
|
|
1890
1920
|
</p>
|
|
1891
1921
|
<div class="card">
|
|
1892
1922
|
<div class="scorehead">
|
|
1893
|
-
${this.teamBlock(e, t, t.awayTeamId,
|
|
1923
|
+
${this.teamBlock(e, t, t.awayTeamId, r, !1)}
|
|
1894
1924
|
<div class="mid">
|
|
1895
1925
|
<div class="bigscore">
|
|
1896
1926
|
<span style=${n("away")}>${t.awayScore}</span>
|
|
@@ -1908,7 +1938,7 @@ class ee extends w {
|
|
|
1908
1938
|
</div>
|
|
1909
1939
|
${this.teamBlock(e, t, t.homeTeamId, o, !0)}
|
|
1910
1940
|
</div>
|
|
1911
|
-
${this.renderLineScore(t,
|
|
1941
|
+
${this.renderLineScore(t, r, o)}
|
|
1912
1942
|
${t.notes ? c`<p class="note" style="padding:0 1rem 0.9rem;text-align:center">${t.notes}</p>` : m}
|
|
1913
1943
|
</div>
|
|
1914
1944
|
${(this.data.coverage || []).length ? c`
|
|
@@ -1929,7 +1959,7 @@ class ee extends w {
|
|
|
1929
1959
|
</div>` : m}
|
|
1930
1960
|
<div class="section-title">Season context</div>
|
|
1931
1961
|
<div class="cols">
|
|
1932
|
-
${[[t.awayTeamId,
|
|
1962
|
+
${[[t.awayTeamId, r], [t.homeTeamId, o]].map(([h, p]) => this.renderContext(e, h, p))}
|
|
1933
1963
|
</div>
|
|
1934
1964
|
${l.length ? c`
|
|
1935
1965
|
<div class="section-title">Head to head this season</div>
|
|
@@ -1943,25 +1973,25 @@ class ee extends w {
|
|
|
1943
1973
|
`)}
|
|
1944
1974
|
`;
|
|
1945
1975
|
}
|
|
1946
|
-
teamBlock(t, e, s,
|
|
1947
|
-
if (!
|
|
1948
|
-
const i = t.teamsById[s], n = t.records[s], d = Q(
|
|
1976
|
+
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);
|
|
1949
1979
|
return c`
|
|
1950
1980
|
<div class="teamblock ${o ? "right" : ""}">
|
|
1951
|
-
${d ? c`<img class="crest logo" alt="" loading="lazy" src=${d} />` : c`<span class="crest" style="background:${
|
|
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>`}
|
|
1952
1982
|
<div>
|
|
1953
|
-
<div class="tname">${bt(t, s, e.date)}<a href=${g(t.hrefs.school, { id:
|
|
1954
|
-
<div class="trec">${
|
|
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>
|
|
1955
1985
|
</div>
|
|
1956
1986
|
</div>
|
|
1957
1987
|
`;
|
|
1958
1988
|
}
|
|
1959
1989
|
renderLineScore(t, e, s) {
|
|
1960
|
-
const
|
|
1961
|
-
if (!
|
|
1990
|
+
const r = t.periodScores || [];
|
|
1991
|
+
if (!r.length)
|
|
1962
1992
|
return c`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>`;
|
|
1963
|
-
const o = Math.max(4, ...
|
|
1964
|
-
const 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);
|
|
1965
1995
|
return p ? p[l] : t.state === "final" ? 0 : "·";
|
|
1966
1996
|
}, d = (l, h, p) => c`
|
|
1967
1997
|
<tr>
|
|
@@ -1983,14 +2013,14 @@ class ee extends w {
|
|
|
1983
2013
|
}
|
|
1984
2014
|
renderContext(t, e, s) {
|
|
1985
2015
|
if (!s) return m;
|
|
1986
|
-
const
|
|
2016
|
+
const r = t.records[e], o = gt(this.data.games, e);
|
|
1987
2017
|
return c`
|
|
1988
2018
|
<div class="card ctxcard">
|
|
1989
2019
|
<div class="who">${H(s)}${s.name}</div>
|
|
1990
2020
|
<div class="row">
|
|
1991
2021
|
<span>Last 5: ${yt(t, e)}</span>
|
|
1992
|
-
<span>Streak: <b>${
|
|
1993
|
-
<span>PF/PA: <b>${
|
|
2022
|
+
<span>Streak: <b>${r ? st(r.results) : "·"}</b></span>
|
|
2023
|
+
<span>PF/PA: <b>${r ? `${r.pf} / ${r.pa}` : "·"}</b></span>
|
|
1994
2024
|
<span>Next: ${o ? c`${y(o.date, { month: "numeric", day: "numeric" })}
|
|
1995
2025
|
${o.homeTeamId === e ? "vs" : "at"} ${Z(t, o.homeTeamId === e ? o.awayTeamId : o.homeTeamId)}` : "·"}</span>
|
|
1996
2026
|
</div>
|
|
@@ -1999,7 +2029,7 @@ class ee extends w {
|
|
|
1999
2029
|
}
|
|
2000
2030
|
}
|
|
2001
2031
|
globalThis?.customElements && !globalThis.customElements.get("hsot-boxscore") && globalThis.customElements.define("hsot-boxscore", ee);
|
|
2002
|
-
const
|
|
2032
|
+
const ts = 250, es = 2;
|
|
2003
2033
|
class se extends E {
|
|
2004
2034
|
static properties = {
|
|
2005
2035
|
api: { type: String },
|
|
@@ -2080,11 +2110,11 @@ class se extends E {
|
|
|
2080
2110
|
}
|
|
2081
2111
|
onInput(t) {
|
|
2082
2112
|
const e = t.target.value.trim();
|
|
2083
|
-
if (clearTimeout(this.debounceTimer), e.length <
|
|
2113
|
+
if (clearTimeout(this.debounceTimer), e.length < es) {
|
|
2084
2114
|
this.abortController?.abort(), this.results = [], this.open = !1, this.searched = !1;
|
|
2085
2115
|
return;
|
|
2086
2116
|
}
|
|
2087
|
-
this.debounceTimer = setTimeout(() => this.search(e),
|
|
2117
|
+
this.debounceTimer = setTimeout(() => this.search(e), ts);
|
|
2088
2118
|
}
|
|
2089
2119
|
async search(t) {
|
|
2090
2120
|
this.abortController?.abort(), this.abortController = new AbortController();
|
|
@@ -2094,8 +2124,8 @@ class se extends E {
|
|
|
2094
2124
|
});
|
|
2095
2125
|
if (!s.ok)
|
|
2096
2126
|
return;
|
|
2097
|
-
const
|
|
2098
|
-
this.results =
|
|
2127
|
+
const r = await s.json();
|
|
2128
|
+
this.results = r.items || [], this.activeIndex = -1, this.searched = !0, this.open = !0;
|
|
2099
2129
|
} catch (e) {
|
|
2100
2130
|
e.name !== "AbortError" && console.warn("school search failed", e);
|
|
2101
2131
|
}
|
|
@@ -2129,7 +2159,7 @@ class se extends E {
|
|
|
2129
2159
|
return [t.location, t.county && `${t.county} County`].filter(Boolean).join(" — ");
|
|
2130
2160
|
}
|
|
2131
2161
|
renderOption(t, e) {
|
|
2132
|
-
const s = this.where(t),
|
|
2162
|
+
const s = this.where(t), r = (o) => {
|
|
2133
2163
|
o.preventDefault(), this.go(t);
|
|
2134
2164
|
};
|
|
2135
2165
|
return c`
|
|
@@ -2137,7 +2167,7 @@ class se extends E {
|
|
|
2137
2167
|
id="school-option-${e}"
|
|
2138
2168
|
role="option"
|
|
2139
2169
|
aria-selected="${e === this.activeIndex ? "true" : "false"}"
|
|
2140
|
-
@pointerdown="${
|
|
2170
|
+
@pointerdown="${r}"
|
|
2141
2171
|
@mousemove="${() => {
|
|
2142
2172
|
this.activeIndex = e;
|
|
2143
2173
|
}}"
|
|
@@ -2151,7 +2181,7 @@ class se extends E {
|
|
|
2151
2181
|
const t = this.searched && !this.results.length, e = c`<li class="empty">No schools found</li>`;
|
|
2152
2182
|
return c`
|
|
2153
2183
|
<ul id="school-search-listbox" role="listbox" aria-label="Schools">
|
|
2154
|
-
${this.results.map((s,
|
|
2184
|
+
${this.results.map((s, r) => this.renderOption(s, r))}
|
|
2155
2185
|
${t ? e : m}
|
|
2156
2186
|
</ul>
|
|
2157
2187
|
`;
|
|
@@ -2178,7 +2208,7 @@ class se extends E {
|
|
|
2178
2208
|
}
|
|
2179
2209
|
}
|
|
2180
2210
|
globalThis?.customElements && !globalThis.customElements.get("hsot-school-search") && globalThis.customElements.define("hsot-school-search", se);
|
|
2181
|
-
const
|
|
2211
|
+
const ss = {
|
|
2182
2212
|
"hsot-scores": Qt,
|
|
2183
2213
|
"hsot-standings": Zt,
|
|
2184
2214
|
"hsot-rankings": Jt,
|
|
@@ -2186,13 +2216,13 @@ const es = {
|
|
|
2186
2216
|
"hsot-boxscore": ee,
|
|
2187
2217
|
"hsot-school-search": se
|
|
2188
2218
|
};
|
|
2189
|
-
function
|
|
2190
|
-
const
|
|
2191
|
-
if (
|
|
2192
|
-
for (const [t, e] of Object.entries(
|
|
2193
|
-
|
|
2219
|
+
function as() {
|
|
2220
|
+
const a = globalThis?.customElements;
|
|
2221
|
+
if (a)
|
|
2222
|
+
for (const [t, e] of Object.entries(ss))
|
|
2223
|
+
a.get(t) || a.define(t, e);
|
|
2194
2224
|
}
|
|
2195
|
-
typeof window < "u" && globalThis.customElements &&
|
|
2225
|
+
typeof window < "u" && globalThis.customElements && as();
|
|
2196
2226
|
export {
|
|
2197
|
-
|
|
2227
|
+
as as defineAll
|
|
2198
2228
|
};
|