@sensiblestats/widget-react 0.94.0 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +227 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +227 -7
- package/dist/index.js.map +1 -1
- package/dist/styles.css +22 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.95.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- NBA matchup, quarter ladder and settle recap cards, behind the nba_insight_v2 capability.
|
|
8
|
+
- Malformed matchup, quarter ladder and settle recap cards are dropped instead of crashing the widget; a card of an unknown kind renders nothing.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @sensiblestats/widget-sdk@0.64.0
|
|
14
|
+
|
|
3
15
|
## 0.94.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -57,6 +57,8 @@ var NBA_STAT_EN = { points: "Points", rebounds: "Rebounds", assists: "Assists",
|
|
|
57
57
|
var NBA_STAT_TR = { points: "Say\u0131", rebounds: "Ribaund", assists: "Asist", threes: "\xDC\xE7l\xFCk", steals: "Top \xE7alma", blocks: "Blok" };
|
|
58
58
|
var NBA_STAT_SHORT_EN = { points: "PTS", rebounds: "REB", assists: "AST", threes: "3PM" };
|
|
59
59
|
var NBA_STAT_SHORT_TR = { points: "SAY", rebounds: "RIB", assists: "AST", threes: "3SY" };
|
|
60
|
+
var NBA_POSITION_EN = { G: "guards", F: "forwards", C: "centers" };
|
|
61
|
+
var NBA_POSITION_TR = { G: "guard", F: "forvet", C: "pivot" };
|
|
60
62
|
var NBA_STATUS_TR = { Out: "Oynamayacak", Doubtful: "\u015E\xFCpheli", Questionable: "Belirsiz", Probable: "Muhtemel" };
|
|
61
63
|
var signed = (line) => line.replace(/^-/, "\u2212");
|
|
62
64
|
var GROUP_NOUN_EN = { G: "goalkeepers", D: "defenders", M: "midfielders", F: "forwards" };
|
|
@@ -372,7 +374,26 @@ var STRINGS = {
|
|
|
372
374
|
propsLast5: "Last 5 games",
|
|
373
375
|
propsLadderOnly: "Ladder only",
|
|
374
376
|
propsMarkets: (n) => `${n} markets`,
|
|
375
|
-
propsStatShort: (stat) => NBA_STAT_SHORT_EN[stat] ?? stat
|
|
377
|
+
propsStatShort: (stat) => NBA_STAT_SHORT_EN[stat] ?? stat,
|
|
378
|
+
matchupPace: "Pace",
|
|
379
|
+
matchupOffRating: "Offensive rating",
|
|
380
|
+
matchupDefRating: "Defensive rating",
|
|
381
|
+
rankOf: (r, n) => `rank ${r} of ${n}`,
|
|
382
|
+
daysRest: (d) => `${d} ${d === 1 ? "day" : "days"} rest`,
|
|
383
|
+
backToBack: "Back-to-back",
|
|
384
|
+
allowsToPosition: (team, v, stat, pos, avg) => `${team} allows ${v} ${(NBA_STAT_EN[stat] ?? stat).toLowerCase()} per game to ${NBA_POSITION_EN[pos] ?? pos} (league average ${avg})`,
|
|
385
|
+
quarterWindow1q: "First quarter",
|
|
386
|
+
quarterWindowFirst3: "First 3 min",
|
|
387
|
+
hitsOf: (h, n) => `${h} of ${n}`,
|
|
388
|
+
settled: "Settled",
|
|
389
|
+
actual: "Actual",
|
|
390
|
+
resultOver: "Over",
|
|
391
|
+
resultUnder: "Under",
|
|
392
|
+
resultPush: "Push",
|
|
393
|
+
resultVoid: "Void",
|
|
394
|
+
lastLineBeforeTip: "Last line before tip",
|
|
395
|
+
morePlayers: (n) => `+${n} more players`,
|
|
396
|
+
smallSample: "Small sample"
|
|
376
397
|
},
|
|
377
398
|
games: {
|
|
378
399
|
lang: "en",
|
|
@@ -882,7 +903,26 @@ var STRINGS = {
|
|
|
882
903
|
propsLast5: "Son 5 ma\xE7",
|
|
883
904
|
propsLadderOnly: "Sadece alternatif",
|
|
884
905
|
propsMarkets: (n) => `${n} market`,
|
|
885
|
-
propsStatShort: (stat) => NBA_STAT_SHORT_TR[stat] ?? stat
|
|
906
|
+
propsStatShort: (stat) => NBA_STAT_SHORT_TR[stat] ?? stat,
|
|
907
|
+
matchupPace: "Tempo",
|
|
908
|
+
matchupOffRating: "H\xFCcum reytingi",
|
|
909
|
+
matchupDefRating: "Savunma reytingi",
|
|
910
|
+
rankOf: (r, n) => `${n} tak\u0131mda ${r}. s\u0131ra`,
|
|
911
|
+
daysRest: (d) => `${d} g\xFCn dinlenme`,
|
|
912
|
+
backToBack: "Arka arkaya ma\xE7",
|
|
913
|
+
allowsToPosition: (team, v, stat, pos, avg) => `${team}, ${NBA_POSITION_TR[pos] ?? pos} oyunculara ma\xE7 ba\u015F\u0131na ${v} ${(NBA_STAT_TR[stat] ?? stat).toLocaleLowerCase("tr-TR")} veriyor (lig ortalamas\u0131 ${avg})`,
|
|
914
|
+
quarterWindow1q: "\u0130lk \xE7eyrek",
|
|
915
|
+
quarterWindowFirst3: "\u0130lk 3 dakika",
|
|
916
|
+
hitsOf: (h, n) => `${n} ma\xE7ta ${h}`,
|
|
917
|
+
settled: "Sonu\xE7land\u0131",
|
|
918
|
+
actual: "Ger\xE7ek",
|
|
919
|
+
resultOver: "\xDCst",
|
|
920
|
+
resultUnder: "Alt",
|
|
921
|
+
resultPush: "\u0130ade",
|
|
922
|
+
resultVoid: "\u0130ptal",
|
|
923
|
+
lastLineBeforeTip: "Ma\xE7 \xF6ncesi son baraj",
|
|
924
|
+
morePlayers: (n) => `+${n} oyuncu daha`,
|
|
925
|
+
smallSample: "Az ma\xE7"
|
|
886
926
|
},
|
|
887
927
|
games: {
|
|
888
928
|
lang: "tr",
|
|
@@ -1097,7 +1137,7 @@ function isEnglishLocale(locale) {
|
|
|
1097
1137
|
}
|
|
1098
1138
|
|
|
1099
1139
|
// src/version.generated.ts
|
|
1100
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1140
|
+
var WIDGET_REACT_VERSION = "0.95.0";
|
|
1101
1141
|
|
|
1102
1142
|
// src/config.ts
|
|
1103
1143
|
function normalizeUi(cfg) {
|
|
@@ -1692,6 +1732,27 @@ function comboLegToSlipSelection(leg, conversationId) {
|
|
|
1692
1732
|
if (conversationId !== void 0) selection.conversationId = conversationId;
|
|
1693
1733
|
return selection;
|
|
1694
1734
|
}
|
|
1735
|
+
var isNum = (v) => typeof v === "number" && Number.isFinite(v);
|
|
1736
|
+
var isObj = (v) => typeof v === "object" && v !== null;
|
|
1737
|
+
var numOrNull = (v) => v === null || v === void 0 || isNum(v);
|
|
1738
|
+
function validMatchupTeam(t) {
|
|
1739
|
+
return isObj(t) && typeof t.name === "string" && typeof t.abbr === "string" && isNum(t.pace) && isNum(t.offRating) && isNum(t.defRating) && isNum(t.n) && isNum(t.teamsRanked) && numOrNull(t.daysRest) && numOrNull(t.paceRank) && numOrNull(t.offRatingRank) && numOrNull(t.defRatingRank);
|
|
1740
|
+
}
|
|
1741
|
+
function validMatchupPosition(p) {
|
|
1742
|
+
return isObj(p) && typeof p.defendingTeamAbbr === "string" && typeof p.position === "string" && typeof p.stat === "string" && isNum(p.allowedPerGame) && isNum(p.leagueAvg) && isNum(p.rank) && isNum(p.teamsRanked) && isNum(p.n);
|
|
1743
|
+
}
|
|
1744
|
+
function sanitizeMatchup(m) {
|
|
1745
|
+
if (!m || !Array.isArray(m.teams) || m.teams.length !== 2 || !m.teams.every(validMatchupTeam)) return null;
|
|
1746
|
+
const teams = m.teams.map((t) => ({ ...t, daysRest: t.daysRest ?? null, paceRank: t.paceRank ?? null, offRatingRank: t.offRatingRank ?? null, defRatingRank: t.defRatingRank ?? null }));
|
|
1747
|
+
return { teams, position: validMatchupPosition(m.position) ? m.position : null };
|
|
1748
|
+
}
|
|
1749
|
+
function validQuarterLadder(q) {
|
|
1750
|
+
return !!q && (q.window === "1q" || q.window === "first3min") && Array.isArray(q.stats) && q.stats.every((st) => isObj(st) && Array.isArray(st.rungs) && st.rungs.every((r) => isObj(r) && typeof r.at === "string" && isNum(r.hits) && isNum(r.n)));
|
|
1751
|
+
}
|
|
1752
|
+
var SETTLE_RESULTS = ["over", "under", "push", "void"];
|
|
1753
|
+
function validSettleRecap(sr) {
|
|
1754
|
+
return !!sr && isObj(sr.summary) && isNum(sr.summary.over) && isNum(sr.summary.under) && isNum(sr.summary.pushes) && isNum(sr.summary.voids) && Array.isArray(sr.players) && sr.players.every((p) => isObj(p) && Array.isArray(p.lines) && p.lines.every((l) => isObj(l) && typeof l.line === "string" && (l.actual === null || typeof l.actual === "string") && SETTLE_RESULTS.includes(l.result)));
|
|
1755
|
+
}
|
|
1695
1756
|
function nbaEvidence(insight) {
|
|
1696
1757
|
switch (insight.kind) {
|
|
1697
1758
|
case "prop_reason":
|
|
@@ -1704,6 +1765,14 @@ function nbaEvidence(insight) {
|
|
|
1704
1765
|
return insight.coHit && insight.coHit.legs.length === 2 ? { kind: "co_hit", coHit: insight.coHit } : null;
|
|
1705
1766
|
case "ladder":
|
|
1706
1767
|
return insight.ladder ? { kind: "ladder", ladder: insight.ladder } : null;
|
|
1768
|
+
case "matchup": {
|
|
1769
|
+
const matchup = sanitizeMatchup(insight.matchup);
|
|
1770
|
+
return matchup ? { kind: "matchup", matchup } : null;
|
|
1771
|
+
}
|
|
1772
|
+
case "quarter_ladder":
|
|
1773
|
+
return validQuarterLadder(insight.quarterLadder) ? { kind: "quarter_ladder", quarterLadder: insight.quarterLadder } : null;
|
|
1774
|
+
case "settle_recap":
|
|
1775
|
+
return validSettleRecap(insight.settleRecap) ? { kind: "settle_recap", settleRecap: insight.settleRecap } : null;
|
|
1707
1776
|
default:
|
|
1708
1777
|
return null;
|
|
1709
1778
|
}
|
|
@@ -2650,7 +2719,7 @@ function clearConversation(storageKey) {
|
|
|
2650
2719
|
}
|
|
2651
2720
|
|
|
2652
2721
|
// src/presets.ts
|
|
2653
|
-
var CLIENT_CAPABILITIES = ["price_presets", "price_presets_open", "limit_notice", "nba_insight"];
|
|
2722
|
+
var CLIENT_CAPABILITIES = ["price_presets", "price_presets_open", "limit_notice", "nba_insight", "nba_insight_v2"];
|
|
2654
2723
|
var PRICE_TILE_PREFIX = "goal-preset-";
|
|
2655
2724
|
function isPriceTile(tile) {
|
|
2656
2725
|
const id = tile.signal?.entityId;
|
|
@@ -5091,19 +5160,23 @@ function NbaPrice({ vm, selectionKey, label, ui, slip }) {
|
|
|
5091
5160
|
function Head({ vm, chip, ui, monitor }) {
|
|
5092
5161
|
const fixture = vm.homeTeamName && vm.awayTeamName ? `${vm.homeTeamName} vs ${vm.awayTeamName}` : vm.competition;
|
|
5093
5162
|
const meta = [fixture, vm.kickoffLabel].filter(Boolean).join(" \xB7 ");
|
|
5163
|
+
const pinnable = monitor?.enabled === true && vm.evidence.kind !== "settle_recap";
|
|
5094
5164
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-head", children: [
|
|
5095
5165
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-head-l", children: [
|
|
5096
5166
|
meta ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-meta", children: meta }) : null,
|
|
5097
5167
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-title", children: vm.title })
|
|
5098
5168
|
] }),
|
|
5099
|
-
chip ||
|
|
5169
|
+
chip || pinnable ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-bi-meta-right", children: [
|
|
5100
5170
|
chip ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-chip", children: chip }) : null,
|
|
5101
|
-
monitor
|
|
5171
|
+
pinnable && monitor ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: vm.matchId, sport: "basketball" } }) : null
|
|
5102
5172
|
] }) : null
|
|
5103
5173
|
] });
|
|
5104
5174
|
}
|
|
5105
5175
|
function Foot({ vm, ui, lines }) {
|
|
5106
|
-
|
|
5176
|
+
const quoted = Object.keys(vm.selections).length > 0 ? [ui.nba.quoted(clock(vm.quotedAtUtc))] : [];
|
|
5177
|
+
const parts = [...lines, ...quoted, ...vm.disclaimer ? [vm.disclaimer] : []];
|
|
5178
|
+
if (parts.length === 0) return null;
|
|
5179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ss-w-nba-foot", children: parts.join(" ") });
|
|
5107
5180
|
}
|
|
5108
5181
|
function PropReason({ vm, pr, ui, slip }) {
|
|
5109
5182
|
const nba = ui.nba;
|
|
@@ -5172,6 +5245,117 @@ function Ladder({ vm, ld, ui, slip }) {
|
|
|
5172
5245
|
] })
|
|
5173
5246
|
] }, `${st.stat}:${si}`)) });
|
|
5174
5247
|
}
|
|
5248
|
+
function SmallSample({ ui }) {
|
|
5249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-small", children: ui.nba.smallSample });
|
|
5250
|
+
}
|
|
5251
|
+
function NbaMatchupBody({ mu, ui }) {
|
|
5252
|
+
const nba = ui.nba;
|
|
5253
|
+
const metrics = [
|
|
5254
|
+
{ label: nba.matchupPace, value: (t) => t.pace, rank: (t) => t.paceRank },
|
|
5255
|
+
{ label: nba.matchupOffRating, value: (t) => t.offRating, rank: (t) => t.offRatingRank },
|
|
5256
|
+
{ label: nba.matchupDefRating, value: (t) => t.defRating, rank: (t) => t.defRatingRank }
|
|
5257
|
+
];
|
|
5258
|
+
const pos = mu.position;
|
|
5259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
5260
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-mu", children: [
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5262
|
+
mu.teams.map((t) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-nba-mu-team", title: t.name, children: [
|
|
5263
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: t.abbr }),
|
|
5264
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd", children: nba.lastN(t.n) }),
|
|
5265
|
+
t.smallSample ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SmallSample, { ui }) : null
|
|
5266
|
+
] }, `h:${t.teamId}`)),
|
|
5267
|
+
metrics.map((m) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5268
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd", children: m.label }),
|
|
5269
|
+
mu.teams.map((t) => {
|
|
5270
|
+
const r = m.rank(t);
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-nba-mu-v", children: [
|
|
5272
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: oneDecimal(m.value(t), ui) }),
|
|
5273
|
+
r !== null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.rankOf(r, t.teamsRanked) }) : null
|
|
5274
|
+
] }, `${m.label}:${t.teamId}`);
|
|
5275
|
+
})
|
|
5276
|
+
] }, m.label)),
|
|
5277
|
+
mu.teams.some((t) => t.daysRest !== null || t.backToBack) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5278
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5279
|
+
mu.teams.map((t) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ss-w-nba-mu-rest", children: [
|
|
5280
|
+
t.daysRest !== null ? nba.daysRest(t.daysRest) : "",
|
|
5281
|
+
t.daysRest !== null && t.backToBack ? " \xB7 " : "",
|
|
5282
|
+
t.backToBack ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-b2b", children: nba.backToBack }) : null
|
|
5283
|
+
] }, `rest:${t.teamId}`))
|
|
5284
|
+
] }) : null
|
|
5285
|
+
] }),
|
|
5286
|
+
pos ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "ss-w-nba-mu-pos", children: [
|
|
5287
|
+
nba.allowsToPosition(pos.defendingTeamAbbr, oneDecimal(pos.allowedPerGame, ui), pos.stat, pos.position, oneDecimal(pos.leagueAvg, ui)),
|
|
5288
|
+
" ",
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-note", children: nba.rankOf(pos.rank, pos.teamsRanked) }),
|
|
5290
|
+
pos.smallSample ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SmallSample, { ui }) : null
|
|
5291
|
+
] }) : null
|
|
5292
|
+
] });
|
|
5293
|
+
}
|
|
5294
|
+
function NbaQuarterLadderBody({ vm, ql, ui, slip }) {
|
|
5295
|
+
const nba = ui.nba;
|
|
5296
|
+
const windowLabel = ql.window === "1q" ? nba.quarterWindow1q : ql.window === "first3min" ? nba.quarterWindowFirst3 : "";
|
|
5297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: ql.stats.map((st, si) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-stat", children: [
|
|
5298
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-stathd", children: [
|
|
5299
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("b", { children: nba.stat(st.stat) }),
|
|
5300
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: windowLabel }),
|
|
5301
|
+
st.rungs.some((r) => r.n < 5) ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SmallSample, { ui }) : null
|
|
5302
|
+
] }),
|
|
5303
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-ladder ss-w-nba-ladder--q", children: [
|
|
5304
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5305
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd", children: nba.line }),
|
|
5306
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd ss-w-nba-n", children: nba.price })
|
|
5309
|
+
] }),
|
|
5310
|
+
st.rungs.map((r, ri) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5311
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-at", children: nba.over(nba.lineText(r.at)) }),
|
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-meter", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { width: r.n > 0 ? `${r.hits / r.n * 100}%` : "0%" } }) }),
|
|
5313
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-n", children: nba.hitsOf(r.hits, r.n) }),
|
|
5314
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-pcell", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaPrice, { vm, selectionKey: r.selectionKey, ui, slip }) })
|
|
5315
|
+
] }, `${r.selectionKey}:${ri}`))
|
|
5316
|
+
] })
|
|
5317
|
+
] }, `${st.stat}:${si}`)) });
|
|
5318
|
+
}
|
|
5319
|
+
function NbaSettleRecapBody({ sr, ui }) {
|
|
5320
|
+
const nba = ui.nba;
|
|
5321
|
+
const result = { over: nba.resultOver, under: nba.resultUnder, push: nba.resultPush, void: nba.resultVoid };
|
|
5322
|
+
const { over, under, pushes, voids } = sr.summary;
|
|
5323
|
+
const summary = [
|
|
5324
|
+
`${nba.resultOver} ${over}`,
|
|
5325
|
+
`${nba.resultUnder} ${under}`,
|
|
5326
|
+
...pushes > 0 ? [`${nba.resultPush} ${pushes}`] : [],
|
|
5327
|
+
...voids > 0 ? [`${nba.resultVoid} ${voids}`] : []
|
|
5328
|
+
].join(" \xB7 ");
|
|
5329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
5330
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-stathd", children: [
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("b", { children: [
|
|
5332
|
+
nba.settled,
|
|
5333
|
+
" ",
|
|
5334
|
+
sr.finalScore
|
|
5335
|
+
] }),
|
|
5336
|
+
sr.lineBasis === "last_before_tip" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.lastLineBeforeTip }) : null
|
|
5337
|
+
] }),
|
|
5338
|
+
sr.players.map((p) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-sr-player", children: [
|
|
5339
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-who", children: p.playerName }),
|
|
5340
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-sr", children: [
|
|
5341
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-row", children: [
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
|
|
5343
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd ss-w-nba-n", children: nba.line }),
|
|
5344
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-hd ss-w-nba-n", children: nba.actual }),
|
|
5345
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {})
|
|
5346
|
+
] }),
|
|
5347
|
+
p.lines.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-sr-line", children: [
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: nba.stat(l.stat) }),
|
|
5349
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-n", children: nba.lineText(l.line) }),
|
|
5350
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-n", children: l.actual === null ? "\u2014" : nba.lineText(l.actual) }),
|
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ss-w-nba-res", "data-result": l.result, children: result[l.result] })
|
|
5352
|
+
] }, `${l.stat}:${i}`))
|
|
5353
|
+
] })
|
|
5354
|
+
] }, p.playerId)),
|
|
5355
|
+
sr.morePlayers > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-more", children: nba.morePlayers(sr.morePlayers) }) : null,
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ss-w-nba-sr-sum", children: summary })
|
|
5357
|
+
] });
|
|
5358
|
+
}
|
|
5175
5359
|
function TeammateOut({ vm, to, ui, slip }) {
|
|
5176
5360
|
const nba = ui.nba;
|
|
5177
5361
|
const first = to.rows[0];
|
|
@@ -5358,6 +5542,20 @@ function NbaCard({ vm, ui, slip, monitor }) {
|
|
|
5358
5542
|
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LineMove, { vm, lm: ev.lineMove, ui, slip });
|
|
5359
5543
|
foot = [nba.lineMoveKey];
|
|
5360
5544
|
break;
|
|
5545
|
+
case "matchup":
|
|
5546
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaMatchupBody, { mu: ev.matchup, ui });
|
|
5547
|
+
foot = [];
|
|
5548
|
+
break;
|
|
5549
|
+
case "quarter_ladder":
|
|
5550
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaQuarterLadderBody, { vm, ql: ev.quarterLadder, ui, slip });
|
|
5551
|
+
foot = [];
|
|
5552
|
+
break;
|
|
5553
|
+
case "settle_recap":
|
|
5554
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NbaSettleRecapBody, { sr: ev.settleRecap, ui });
|
|
5555
|
+
foot = [];
|
|
5556
|
+
break;
|
|
5557
|
+
default:
|
|
5558
|
+
return null;
|
|
5361
5559
|
}
|
|
5362
5560
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ss-w-nba-card", "data-kind": ev.kind, children: [
|
|
5363
5561
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Head, { vm, chip, ui, monitor }),
|
|
@@ -12923,6 +13121,28 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
12923
13121
|
.ss-w-nba-nowrow { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; font-size: 13px; }
|
|
12924
13122
|
.ss-w-nba-foot{font-size:11px;color:var(--ss-w-faint);line-height:1.4;border-top:1px solid var(--ss-w-line);padding-top:10px}
|
|
12925
13123
|
.ss-w-nba-card .ss-w-combo-addall { align-self: stretch; }
|
|
13124
|
+
/* matchup, quarter ladder and settle recap (u564 lane B): the same card, ladder grid and figures as above. */
|
|
13125
|
+
.ss-w-nba-ladder--q{grid-template-columns:70px minmax(0,1fr) 62px 74px}
|
|
13126
|
+
.ss-w-nba-mu,.ss-w-nba-sr{display:grid;align-items:start;gap:8px 6px;font-size:13px;font-variant-numeric:tabular-nums}
|
|
13127
|
+
.ss-w-nba-mu{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr)}
|
|
13128
|
+
.ss-w-nba-mu .ss-w-nba-hd{white-space:normal}
|
|
13129
|
+
.ss-w-nba-mu-team { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 14px; color: var(--ss-w-ink); }
|
|
13130
|
+
.ss-w-nba-mu-v { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
13131
|
+
.ss-w-nba-mu-v b { font-size: 15px; font-weight: 700; color: var(--ss-w-ink); }
|
|
13132
|
+
.ss-w-nba-mu-v span, .ss-w-nba-mu-rest { font-size: 10.5px; line-height: 1.3; color: var(--ss-w-faint); }
|
|
13133
|
+
.ss-w-nba-mu-rest { overflow-wrap: anywhere; }
|
|
13134
|
+
.ss-w-nba-b2b { white-space: nowrap; }
|
|
13135
|
+
.ss-w-nba-mu-pos { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ss-w-ink); }
|
|
13136
|
+
.ss-w-nba-small { display: inline-block; font-size: 10px; font-weight: 600; line-height: 1.3; color: var(--ss-w-warn); border: 1px solid var(--ss-w-warn); border-radius: 999px; padding: 0 6px; white-space: nowrap; }
|
|
13137
|
+
.ss-w-nba-mu-pos .ss-w-nba-small { margin-left: 6px; }
|
|
13138
|
+
.ss-w-nba-sr-player { display: flex; flex-direction: column; gap: 6px; }
|
|
13139
|
+
.ss-w-nba-sr{grid-template-columns:minmax(0,1fr) 44px 44px 54px;align-items:center}
|
|
13140
|
+
.ss-w-nba-sr-line { display: contents; }
|
|
13141
|
+
.ss-w-nba-sr .ss-w-nba-n { text-align: right; }
|
|
13142
|
+
.ss-w-nba-res { justify-self: end; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ss-w-ink); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
|
|
13143
|
+
.ss-w-nba-res[data-result="push"], .ss-w-nba-res[data-result="void"] { color: var(--ss-w-faint); }
|
|
13144
|
+
.ss-w-nba-more, .ss-w-nba-sr-sum { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ss-w-faint); }
|
|
13145
|
+
.ss-w-nba-sr-sum { font-weight: 600; color: var(--ss-w-ink); }
|
|
12926
13146
|
|
|
12927
13147
|
/* market odds card */
|
|
12928
13148
|
.ss-w-mocards { display: flex; flex-direction: column; gap: 7px; }
|