@sensiblestats/widget-react 0.139.0 → 0.141.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 +22 -0
- package/dist/index.cjs +614 -475
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +320 -181
- package/dist/index.js.map +1 -1
- package/dist/styles.css +7 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ __export(index_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(index_exports);
|
|
39
39
|
|
|
40
40
|
// src/StatsWidget.tsx
|
|
41
|
-
var
|
|
41
|
+
var import_react112 = require("react");
|
|
42
42
|
var import_widget_sdk38 = require("@sensiblestats/widget-sdk");
|
|
43
43
|
|
|
44
44
|
// src/strings/tag.ts
|
|
@@ -323,6 +323,8 @@ var BUNDLED_EN_GB = {
|
|
|
323
323
|
"widget.presets.moreMatches": "More matches",
|
|
324
324
|
"widget.presets.changeCombo": "Change total or matches",
|
|
325
325
|
"widget.presets.standoutAsk": "Standout matches today",
|
|
326
|
+
"widget.presets.legFactOver": "Went over in {hits} of the last {games} games",
|
|
327
|
+
"widget.presets.legFactUnder": "Went under in {hits} of the last {games} games",
|
|
326
328
|
"widget.nba.with": "With",
|
|
327
329
|
"widget.nba.without": "Without",
|
|
328
330
|
"widget.nba.line": "Line",
|
|
@@ -1160,6 +1162,8 @@ var ROW_LEAVES = {
|
|
|
1160
1162
|
v8Hits: (c) => (hits, window2) => c.t("widget.v8Hits", { hits, window: window2 }),
|
|
1161
1163
|
"presets.comboDisplay": (c) => (legs, total) => c.t("widget.presets.comboDisplay", { legs, total }),
|
|
1162
1164
|
"presets.comboMessage": (c) => (legs, total) => c.t("widget.presets.comboMessage", { legs, total }),
|
|
1165
|
+
"presets.legFactOver": (c) => (hits, games) => c.t("widget.presets.legFactOver", { hits, games }),
|
|
1166
|
+
"presets.legFactUnder": (c) => (hits, games) => c.t("widget.presets.legFactUnder", { hits, games }),
|
|
1163
1167
|
"nba.over": (c) => (line) => c.t("widget.nba.over", { line }),
|
|
1164
1168
|
"nba.under": (c) => (line) => c.t("widget.nba.under", { line }),
|
|
1165
1169
|
"nba.lastN": (c) => (n) => c.t("widget.nba.lastN", { count: n }),
|
|
@@ -1338,7 +1342,7 @@ function parseOddsFormat(value) {
|
|
|
1338
1342
|
}
|
|
1339
1343
|
|
|
1340
1344
|
// src/version.generated.ts
|
|
1341
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1345
|
+
var WIDGET_REACT_VERSION = "0.141.0";
|
|
1342
1346
|
|
|
1343
1347
|
// src/config.ts
|
|
1344
1348
|
function hostTag(cfg) {
|
|
@@ -2181,6 +2185,9 @@ function toComboLegVM(leg) {
|
|
|
2181
2185
|
const hasStat = !!insightId && !!statText;
|
|
2182
2186
|
if (price === void 0 || matchOddsId === void 0 || matchId === void 0 || !home || !away || !selectionLabel) return null;
|
|
2183
2187
|
const line = str(leg.line);
|
|
2188
|
+
const rawFact = leg.fact && typeof leg.fact === "object" ? leg.fact : void 0;
|
|
2189
|
+
const direction2 = leg.direction === "over" || leg.direction === "under" ? leg.direction : void 0;
|
|
2190
|
+
const fact = rawFact && direction2 && Number.isInteger(rawFact.hits) && Number.isInteger(rawFact.games) && Number.isInteger(rawFact.window) && rawFact.games >= 5 && rawFact.hits >= 0 && rawFact.hits <= rawFact.games && rawFact.games <= rawFact.window ? { hits: rawFact.hits, games: rawFact.games, window: rawFact.window, direction: direction2 } : void 0;
|
|
2184
2191
|
return {
|
|
2185
2192
|
key: `${matchOddsId}`,
|
|
2186
2193
|
matchId,
|
|
@@ -2201,6 +2208,7 @@ function toComboLegVM(leg) {
|
|
|
2201
2208
|
matchOddsId,
|
|
2202
2209
|
quotedAtUtc: str(leg.quotedAtUtc),
|
|
2203
2210
|
...hasStat ? { insightId, statText } : {},
|
|
2211
|
+
...fact ? { fact } : {},
|
|
2204
2212
|
pinEnabled: leg.pinEnabled === true
|
|
2205
2213
|
};
|
|
2206
2214
|
}
|
|
@@ -2589,6 +2597,7 @@ var MAX_ODDS = 1e4;
|
|
|
2589
2597
|
function slipPickFields(selection, label, line) {
|
|
2590
2598
|
const fields = {};
|
|
2591
2599
|
if (((0, import_widget_sdk4.sportOf)(selection.sport) === void 0 || (0, import_widget_sdk4.toWireSport)(selection.sport) !== void 0) && Number.isSafeInteger(selection.matchId) && selection.matchId > 0) fields.matchId = selection.matchId;
|
|
2600
|
+
if (Number.isSafeInteger(selection.matchOddsId) && selection.matchOddsId > 0) fields.matchOddsId = selection.matchOddsId;
|
|
2592
2601
|
if (label && label.trim() && label.length <= MAX_SELECTION) fields.selection = label;
|
|
2593
2602
|
if (line && line.trim() && line.length <= MAX_LINE) fields.line = line;
|
|
2594
2603
|
const odds = selection.oddsDecimal;
|
|
@@ -2966,6 +2975,7 @@ function toSlipEvent(name, entry) {
|
|
|
2966
2975
|
entityId: entry.market,
|
|
2967
2976
|
marketDeveloperName: entry.market,
|
|
2968
2977
|
matchId: entry.matchId,
|
|
2978
|
+
matchOddsId: entry.id,
|
|
2969
2979
|
selection: entry.selection,
|
|
2970
2980
|
line: entry.line,
|
|
2971
2981
|
odds: entry.odds,
|
|
@@ -3378,6 +3388,7 @@ function applyEvent(state, event) {
|
|
|
3378
3388
|
greetingDashboard: event.data.dashboard ?? void 0,
|
|
3379
3389
|
greetingDashboards: event.data.dashboards ?? void 0,
|
|
3380
3390
|
defaultSport: event.data.defaultSport ?? void 0,
|
|
3391
|
+
greeting: event.data.greeting,
|
|
3381
3392
|
clubFanDashboard: event.data.clubFanDashboard ?? void 0
|
|
3382
3393
|
}))
|
|
3383
3394
|
};
|
|
@@ -5617,7 +5628,7 @@ function useFavourites({ conversation, sport, operatorUserId, anonymousUserId, e
|
|
|
5617
5628
|
}
|
|
5618
5629
|
|
|
5619
5630
|
// src/components/dashboard/GreetingDashboard.tsx
|
|
5620
|
-
var
|
|
5631
|
+
var import_react44 = require("react");
|
|
5621
5632
|
|
|
5622
5633
|
// src/eventLogContext.ts
|
|
5623
5634
|
var import_react18 = require("react");
|
|
@@ -5633,6 +5644,50 @@ function useSportScope() {
|
|
|
5633
5644
|
return (0, import_react19.useContext)(SportScopeContext);
|
|
5634
5645
|
}
|
|
5635
5646
|
|
|
5647
|
+
// src/greetingEvents.ts
|
|
5648
|
+
var import_react20 = require("react");
|
|
5649
|
+
function latestGreetingMeta(messages) {
|
|
5650
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
5651
|
+
const m = messages[i];
|
|
5652
|
+
if (m && m.role === "assistant" && m.isGreeting) return m.greeting;
|
|
5653
|
+
}
|
|
5654
|
+
return void 0;
|
|
5655
|
+
}
|
|
5656
|
+
var sentByOwner = /* @__PURE__ */ new WeakMap();
|
|
5657
|
+
function sendGreetingOnce(log, owner, meta, surface) {
|
|
5658
|
+
let sent = sentByOwner.get(owner);
|
|
5659
|
+
if (!sent) {
|
|
5660
|
+
sent = /* @__PURE__ */ new Set();
|
|
5661
|
+
sentByOwner.set(owner, sent);
|
|
5662
|
+
}
|
|
5663
|
+
const key = `${meta.greetingId}:${surface}:${meta.sport}`;
|
|
5664
|
+
if (sent.has(key)) return;
|
|
5665
|
+
sent.add(key);
|
|
5666
|
+
log({
|
|
5667
|
+
name: "greeting_shown",
|
|
5668
|
+
greeting: {
|
|
5669
|
+
greetingId: meta.greetingId,
|
|
5670
|
+
surface,
|
|
5671
|
+
case: meta.case,
|
|
5672
|
+
sport: meta.sport,
|
|
5673
|
+
market: meta.market ?? null,
|
|
5674
|
+
marketStep: meta.marketStep,
|
|
5675
|
+
matchStep: meta.matchStep,
|
|
5676
|
+
matchId: meta.matchId ?? null,
|
|
5677
|
+
competitionId: meta.competitionId ?? null,
|
|
5678
|
+
chooserShown: meta.chooserShown
|
|
5679
|
+
}
|
|
5680
|
+
});
|
|
5681
|
+
}
|
|
5682
|
+
function useBubbleGreetingShown(log, owner, popupText, meta, confirmedShown) {
|
|
5683
|
+
(0, import_react20.useEffect)(() => {
|
|
5684
|
+
const text2 = confirmedShown === void 0 || confirmedShown === popupText ? popupText : null;
|
|
5685
|
+
if (!log || !text2 || !meta) return;
|
|
5686
|
+
sendGreetingOnce((e) => log.log(e), owner, meta, "bubble");
|
|
5687
|
+
}, [log, owner, popupText, meta, confirmedShown]);
|
|
5688
|
+
}
|
|
5689
|
+
var GreetingEventsContext = (0, import_react20.createContext)(null);
|
|
5690
|
+
|
|
5636
5691
|
// src/assets/logo.ts
|
|
5637
5692
|
var SS_LOGO_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjoAAAI6CAYAAAAuSOLAAAAAAXNSR0IArs4c6QAAAJplWElmTU0AKgAAAAgAAwESAAMAAAABAAEAAAExAAIAAAA9AAAAModpAAQAAAABAAAAcAAAAABBZG9iZSBQaG90b3Nob3AgMjYuMTAgKDIwMjUwNzMwLm0uMzE2NiAwN2IxMjM0KSAgKE1hY2ludG9zaCkAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAI6oAMABAAAAAEAAAI6AAAAACwGtVwAAAQwaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8v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btbMSekp1Syw9EUDo9ISNTBCAAAQcE2ivhH6MDdi/ycurHXuKaxAonQBCp3TEFAABCECgJgJDdr5WQn+4uiifVJMHFAuB2gkgdGqvAhyAAAQgUCKB9kroB0nsHKFSWAm9RNSY9kkAoeOzXvAKAhCAQLEERu0zMhhWQr+sWMNYg4BvAggd3/WDdxCAAASKI9BeCf0RMnhccUaxBAHfBBA6vusH7yAAAQgUS6C9EvpLZPTF2ieKNY41CPgjgNDxVyd4BAEIQKB8AiP2dZs0VkIvnzQl1EwAoVNzBVA8BCAAgdoI3L0S+qdr84GCIVAyAYROyYAxDwEIQMA1gfZK6EdqYdBnyU9WQnddWTjXCwGETi/UyAMBCEAgNQLD9n0b1Jw7mZ2bWmjE02wCCJ1m1z/RQwACELibQHsl9H005877dZCV0O8mwzsIQAACEIAABJIiMG772bgdk1RMBAMBCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIBAqgT+PwQUc6J1VOHQAAAAAElFTkSuQmCC";
|
|
5638
5693
|
|
|
@@ -5766,10 +5821,10 @@ function DashboardTile({ tile, onTap, oddsLabel, badgePlacement = "meta" }) {
|
|
|
5766
5821
|
}
|
|
5767
5822
|
|
|
5768
5823
|
// src/components/dashboard/SportSwitch.tsx
|
|
5769
|
-
var
|
|
5824
|
+
var import_react21 = require("react");
|
|
5770
5825
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
5771
5826
|
function SportSwitch({ sports, selected, onSelect, liveLabel: liveLabel3, groupLabel, tag: tag2 }) {
|
|
5772
|
-
const refs = (0,
|
|
5827
|
+
const refs = (0, import_react21.useRef)([]);
|
|
5773
5828
|
if (sports.length < 2) return null;
|
|
5774
5829
|
const focusAt = (i) => refs.current[(i + sports.length) % sports.length]?.focus();
|
|
5775
5830
|
const onKeyDown = (e, i) => {
|
|
@@ -5818,36 +5873,41 @@ function SportSwitch({ sports, selected, onSelect, liveLabel: liveLabel3, groupL
|
|
|
5818
5873
|
}
|
|
5819
5874
|
|
|
5820
5875
|
// src/personalGreetingContext.ts
|
|
5821
|
-
var
|
|
5876
|
+
var import_react22 = require("react");
|
|
5822
5877
|
function useSessionHolds() {
|
|
5823
|
-
const [dismissed, setDismissed] = (0,
|
|
5824
|
-
const [followed, setFollowed] = (0,
|
|
5825
|
-
return (0,
|
|
5878
|
+
const [dismissed, setDismissed] = (0, import_react22.useState)(/* @__PURE__ */ new Set());
|
|
5879
|
+
const [followed, setFollowed] = (0, import_react22.useState)(/* @__PURE__ */ new Set());
|
|
5880
|
+
return (0, import_react22.useMemo)(() => ({
|
|
5826
5881
|
dismissed,
|
|
5827
5882
|
followed,
|
|
5828
5883
|
dismiss: (key) => setDismissed((prev) => prev.has(key) ? prev : new Set(prev).add(key)),
|
|
5829
5884
|
follow: (key) => setFollowed((prev) => prev.has(key) ? prev : new Set(prev).add(key))
|
|
5830
5885
|
}), [dismissed, followed]);
|
|
5831
5886
|
}
|
|
5832
|
-
var PersonalGreetingContext = (0,
|
|
5887
|
+
var PersonalGreetingContext = (0, import_react22.createContext)(null);
|
|
5833
5888
|
function usePersonalGreeting() {
|
|
5834
|
-
return (0,
|
|
5889
|
+
return (0, import_react22.useContext)(PersonalGreetingContext);
|
|
5835
5890
|
}
|
|
5836
5891
|
|
|
5837
5892
|
// src/components/dashboard/v8/AskCards.tsx
|
|
5893
|
+
var import_react23 = require("react");
|
|
5838
5894
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
5839
5895
|
function AskCards({ asks, ui, ofYours, onAct }) {
|
|
5896
|
+
const events = (0, import_react23.useContext)(GreetingEventsContext);
|
|
5840
5897
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "ss-w-v8-sec ss-w-v8-asks", children: [
|
|
5841
5898
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "ss-w-v8-sec-title", children: ofYours ? ui.v8AskYours : ui.v8AskOr }),
|
|
5842
|
-
asks.map((ask, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "ss-w-v8-ask", onClick: () =>
|
|
5899
|
+
asks.map((ask, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "ss-w-v8-ask", onClick: () => {
|
|
5900
|
+
events?.askTap(i);
|
|
5901
|
+
onAct?.(toActionVM({ ...ask }));
|
|
5902
|
+
}, children: ask.actionLabel }, `${ask.actionLabel}:${i}`))
|
|
5843
5903
|
] });
|
|
5844
5904
|
}
|
|
5845
5905
|
|
|
5846
5906
|
// src/components/dashboard/v8/CardLine.tsx
|
|
5847
|
-
var
|
|
5907
|
+
var import_react38 = require("react");
|
|
5848
5908
|
|
|
5849
5909
|
// src/useBuilderGrid.ts
|
|
5850
|
-
var
|
|
5910
|
+
var import_react24 = require("react");
|
|
5851
5911
|
|
|
5852
5912
|
// src/builderMemory.ts
|
|
5853
5913
|
var GRID_TTL_MS = 5 * 6e4;
|
|
@@ -5937,18 +5997,18 @@ function forget(memory3, key, flight) {
|
|
|
5937
5997
|
if (flights?.get(key) === flight) flights.delete(key);
|
|
5938
5998
|
}
|
|
5939
5999
|
function useBuilderGrid({ conversation, locale, memory: memory3, initial: initial2 }) {
|
|
5940
|
-
const [seed] = (0,
|
|
5941
|
-
const [grid, setGrid] = (0,
|
|
5942
|
-
const [status2, setStatus] = (0,
|
|
5943
|
-
const [confirmed, setConfirmed] = (0,
|
|
5944
|
-
const [answered, setAnswered] = (0,
|
|
5945
|
-
const seq = (0,
|
|
5946
|
-
const mounted = (0,
|
|
5947
|
-
const hung = (0,
|
|
5948
|
-
const waiting = (0,
|
|
5949
|
-
const memoryRef = (0,
|
|
6000
|
+
const [seed] = (0, import_react24.useState)(() => memory3 && conversation && initial2 ? memory3.cachedGrid(gridKey(locale, initial2)) : void 0);
|
|
6001
|
+
const [grid, setGrid] = (0, import_react24.useState)(seed ?? null);
|
|
6002
|
+
const [status2, setStatus] = (0, import_react24.useState)(seed ? "ready" : "idle");
|
|
6003
|
+
const [confirmed, setConfirmed] = (0, import_react24.useState)(false);
|
|
6004
|
+
const [answered, setAnswered] = (0, import_react24.useState)(seed && initial2 ? { req: initial2, locale } : null);
|
|
6005
|
+
const seq = (0, import_react24.useRef)(0);
|
|
6006
|
+
const mounted = (0, import_react24.useRef)(true);
|
|
6007
|
+
const hung = (0, import_react24.useRef)(void 0);
|
|
6008
|
+
const waiting = (0, import_react24.useRef)(null);
|
|
6009
|
+
const memoryRef = (0, import_react24.useRef)(memory3);
|
|
5950
6010
|
memoryRef.current = memory3;
|
|
5951
|
-
const stopWaiting = (0,
|
|
6011
|
+
const stopWaiting = (0, import_react24.useCallback)((release, keep) => {
|
|
5952
6012
|
window.clearTimeout(hung.current);
|
|
5953
6013
|
const w = waiting.current;
|
|
5954
6014
|
waiting.current = null;
|
|
@@ -5956,14 +6016,14 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial: initia
|
|
|
5956
6016
|
w.flight.waiters -= 1;
|
|
5957
6017
|
if (release && w.key !== keep && w.flight.waiters <= 0 && memoryRef.current) forget(memoryRef.current, w.key, w.flight);
|
|
5958
6018
|
}, []);
|
|
5959
|
-
(0,
|
|
6019
|
+
(0, import_react24.useEffect)(() => {
|
|
5960
6020
|
mounted.current = true;
|
|
5961
6021
|
return () => {
|
|
5962
6022
|
mounted.current = false;
|
|
5963
6023
|
stopWaiting(true);
|
|
5964
6024
|
};
|
|
5965
6025
|
}, [stopWaiting]);
|
|
5966
|
-
const request = (0,
|
|
6026
|
+
const request = (0, import_react24.useCallback)(async (req) => {
|
|
5967
6027
|
if (!conversation) return;
|
|
5968
6028
|
const mine = ++seq.current;
|
|
5969
6029
|
const key = memory3 ? gridKey(locale, req) : null;
|
|
@@ -6039,26 +6099,26 @@ function useBuilderGrid({ conversation, locale, memory: memory3, initial: initia
|
|
|
6039
6099
|
}
|
|
6040
6100
|
|
|
6041
6101
|
// src/components/AddToSlipButton.tsx
|
|
6042
|
-
var
|
|
6102
|
+
var import_react29 = require("react");
|
|
6043
6103
|
|
|
6044
6104
|
// src/slipAdd.ts
|
|
6045
|
-
var
|
|
6105
|
+
var import_react27 = require("react");
|
|
6046
6106
|
var import_widget_sdk16 = require("@sensiblestats/widget-sdk");
|
|
6047
6107
|
|
|
6048
6108
|
// src/trackingContext.ts
|
|
6049
|
-
var
|
|
6109
|
+
var import_react25 = require("react");
|
|
6050
6110
|
var noop = () => {
|
|
6051
6111
|
};
|
|
6052
|
-
var TrackingContext = (0,
|
|
6112
|
+
var TrackingContext = (0, import_react25.createContext)(noop);
|
|
6053
6113
|
function useTrack() {
|
|
6054
|
-
return (0,
|
|
6114
|
+
return (0, import_react25.useContext)(TrackingContext);
|
|
6055
6115
|
}
|
|
6056
6116
|
|
|
6057
6117
|
// src/slipStateContext.ts
|
|
6058
|
-
var
|
|
6059
|
-
var SlipStateContext = (0,
|
|
6118
|
+
var import_react26 = require("react");
|
|
6119
|
+
var SlipStateContext = (0, import_react26.createContext)(null);
|
|
6060
6120
|
function useSlipState() {
|
|
6061
|
-
return (0,
|
|
6121
|
+
return (0, import_react26.useContext)(SlipStateContext);
|
|
6062
6122
|
}
|
|
6063
6123
|
|
|
6064
6124
|
// src/slipAdd.ts
|
|
@@ -6090,7 +6150,7 @@ function useSlipAdd(slip, ui) {
|
|
|
6090
6150
|
const handler = slip.onAddToSlip;
|
|
6091
6151
|
const rawLabels = !!ui?.rawBettingLabels;
|
|
6092
6152
|
const operatorFormat = ui?.oddsFormat ?? "decimal";
|
|
6093
|
-
return (0,
|
|
6153
|
+
return (0, import_react27.useCallback)(async (selection, { marketDeveloperName, selectionLabel, line, fact }) => {
|
|
6094
6154
|
if (!handler) return { kind: "failed" };
|
|
6095
6155
|
const display = slipDisplay({ ...selection.display, market: marketDeveloperName, selection: selectionLabel, line });
|
|
6096
6156
|
const out = toHostSelection(display ? { ...selection, display } : selection, operatorFormat);
|
|
@@ -6148,11 +6208,11 @@ function useSlipAdd(slip, ui) {
|
|
|
6148
6208
|
}
|
|
6149
6209
|
|
|
6150
6210
|
// src/components/Toast.tsx
|
|
6151
|
-
var
|
|
6211
|
+
var import_react28 = require("react");
|
|
6152
6212
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
6153
6213
|
var DISMISS_MS = 4e3;
|
|
6154
6214
|
function Toast({ toast, onDismiss }) {
|
|
6155
|
-
(0,
|
|
6215
|
+
(0, import_react28.useEffect)(() => {
|
|
6156
6216
|
if (!toast) return;
|
|
6157
6217
|
const timer = setTimeout(onDismiss, DISMISS_MS);
|
|
6158
6218
|
return () => clearTimeout(timer);
|
|
@@ -6164,10 +6224,10 @@ function Toast({ toast, onDismiss }) {
|
|
|
6164
6224
|
// src/components/AddToSlipButton.tsx
|
|
6165
6225
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
6166
6226
|
function SlipButton({ selection, marketDeveloperName, selectionLabel, line, slip, ui, price, ariaLabel, hold, fact }) {
|
|
6167
|
-
const [pending, setPending] = (0,
|
|
6168
|
-
const [settledLocal, setSettledLocal] = (0,
|
|
6169
|
-
const [toast, setToast] = (0,
|
|
6170
|
-
const dismiss = (0,
|
|
6227
|
+
const [pending, setPending] = (0, import_react29.useState)(false);
|
|
6228
|
+
const [settledLocal, setSettledLocal] = (0, import_react29.useState)(false);
|
|
6229
|
+
const [toast, setToast] = (0, import_react29.useState)(null);
|
|
6230
|
+
const dismiss = (0, import_react29.useCallback)(() => setToast(null), []);
|
|
6171
6231
|
const add = useSlipAdd(slip, ui);
|
|
6172
6232
|
const slipState = useSlipState();
|
|
6173
6233
|
const { oddsFormat } = useOddsSettings();
|
|
@@ -6273,11 +6333,11 @@ function oldestQuote(legs) {
|
|
|
6273
6333
|
}
|
|
6274
6334
|
|
|
6275
6335
|
// src/components/MarketOddsCardList.tsx
|
|
6276
|
-
var
|
|
6336
|
+
var import_react37 = require("react");
|
|
6277
6337
|
var import_widget_sdk21 = require("@sensiblestats/widget-sdk");
|
|
6278
6338
|
|
|
6279
6339
|
// src/nflKickoff.ts
|
|
6280
|
-
var
|
|
6340
|
+
var import_react30 = require("react");
|
|
6281
6341
|
var import_widget_sdk18 = require("@sensiblestats/widget-sdk");
|
|
6282
6342
|
var MAX_TIMEOUT_MS = 2147483647;
|
|
6283
6343
|
var isNfl = (sport) => (0, import_widget_sdk18.sportOf)(sport) === "americanfootball";
|
|
@@ -6305,9 +6365,9 @@ function guardLegsPreMatch(slip, legs, ui) {
|
|
|
6305
6365
|
};
|
|
6306
6366
|
}
|
|
6307
6367
|
function useNextKickoffRender(kickoffs) {
|
|
6308
|
-
const [tick, setTick] = (0,
|
|
6368
|
+
const [tick, setTick] = (0, import_react30.useState)(0);
|
|
6309
6369
|
const key = kickoffs.map((k) => k ?? "").join("|");
|
|
6310
|
-
(0,
|
|
6370
|
+
(0, import_react30.useEffect)(() => {
|
|
6311
6371
|
const now = Date.now();
|
|
6312
6372
|
const upcoming = key.split("|").map((k) => k ? Date.parse(k) : NaN).filter((ms) => ms > now);
|
|
6313
6373
|
if (upcoming.length === 0) return;
|
|
@@ -6343,14 +6403,14 @@ function OddsMovementBadge({
|
|
|
6343
6403
|
}
|
|
6344
6404
|
|
|
6345
6405
|
// src/components/Crest.tsx
|
|
6346
|
-
var
|
|
6406
|
+
var import_react31 = require("react");
|
|
6347
6407
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
6348
6408
|
function initials(name) {
|
|
6349
6409
|
return (name ?? "").trim().slice(0, 1).toUpperCase() || "?";
|
|
6350
6410
|
}
|
|
6351
6411
|
function Crest({ url, name, kind, abbr }) {
|
|
6352
6412
|
const cls = kind === "comp" ? "ss-w-bi-comp-logo" : "ss-w-bi-crest";
|
|
6353
|
-
const [failed, setFailed] = (0,
|
|
6413
|
+
const [failed, setFailed] = (0, import_react31.useState)(false);
|
|
6354
6414
|
if (url && !failed) {
|
|
6355
6415
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
6356
6416
|
}
|
|
@@ -6359,7 +6419,7 @@ function Crest({ url, name, kind, abbr }) {
|
|
|
6359
6419
|
}
|
|
6360
6420
|
|
|
6361
6421
|
// src/components/PinToggle.tsx
|
|
6362
|
-
var
|
|
6422
|
+
var import_react32 = require("react");
|
|
6363
6423
|
var import_widget_sdk19 = require("@sensiblestats/widget-sdk");
|
|
6364
6424
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
6365
6425
|
var PIN_GLYPHS = {
|
|
@@ -6368,8 +6428,8 @@ var PIN_GLYPHS = {
|
|
|
6368
6428
|
bookmark: { viewBox: "0 0 24 24", strokeWidth: 2, d: "M7 3h10a1.5 1.5 0 0 1 1.5 1.5V21l-6.5-3.6L5.5 21V4.5A1.5 1.5 0 0 1 7 3z" }
|
|
6369
6429
|
};
|
|
6370
6430
|
function PinToggle({ pin, monitor, ui, market }) {
|
|
6371
|
-
const [toast, setToast] = (0,
|
|
6372
|
-
const dismiss = (0,
|
|
6431
|
+
const [toast, setToast] = (0, import_react32.useState)(null);
|
|
6432
|
+
const dismiss = (0, import_react32.useCallback)(() => setToast(null), []);
|
|
6373
6433
|
const log = useEventLog();
|
|
6374
6434
|
if (!monitor || !monitor.enabled) return null;
|
|
6375
6435
|
const key = pinKey(pin);
|
|
@@ -6438,11 +6498,11 @@ function PinToggle({ pin, monitor, ui, market }) {
|
|
|
6438
6498
|
}
|
|
6439
6499
|
|
|
6440
6500
|
// src/components/PriceHistoryButton.tsx
|
|
6441
|
-
var
|
|
6501
|
+
var import_react33 = require("react");
|
|
6442
6502
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
6443
6503
|
function PriceHistoryButton({ selection, monitor, ui, displayLabel }) {
|
|
6444
|
-
const [toast, setToast] = (0,
|
|
6445
|
-
const dismiss = (0,
|
|
6504
|
+
const [toast, setToast] = (0, import_react33.useState)(null);
|
|
6505
|
+
const dismiss = (0, import_react33.useCallback)(() => setToast(null), []);
|
|
6446
6506
|
const log = useEventLog();
|
|
6447
6507
|
if (!monitor || !monitor.enabled) return null;
|
|
6448
6508
|
const name = displayLabel ?? joinSelection(selection.selectionLabel ?? void 0, selection.line ?? void 0);
|
|
@@ -6469,19 +6529,19 @@ function PriceHistoryButton({ selection, monitor, ui, displayLabel }) {
|
|
|
6469
6529
|
}
|
|
6470
6530
|
|
|
6471
6531
|
// src/components/LiveFactBlock.tsx
|
|
6472
|
-
var
|
|
6532
|
+
var import_react35 = require("react");
|
|
6473
6533
|
|
|
6474
6534
|
// src/useFactView.ts
|
|
6475
|
-
var
|
|
6535
|
+
var import_react34 = require("react");
|
|
6476
6536
|
var DWELL_MS = 1e3;
|
|
6477
6537
|
var seen = /* @__PURE__ */ new Set();
|
|
6478
6538
|
function useFactView(ref, fact, entity2) {
|
|
6479
6539
|
const log = useEventLog();
|
|
6480
|
-
const entityRef = (0,
|
|
6540
|
+
const entityRef = (0, import_react34.useRef)(entity2);
|
|
6481
6541
|
entityRef.current = entity2;
|
|
6482
6542
|
const id = fact?.id;
|
|
6483
6543
|
const factKey = fact?.factKey;
|
|
6484
|
-
(0,
|
|
6544
|
+
(0, import_react34.useEffect)(() => {
|
|
6485
6545
|
if (id === void 0 || factKey === void 0 || seen.has(id) || !log) return;
|
|
6486
6546
|
const el = ref.current;
|
|
6487
6547
|
if (!el) return;
|
|
@@ -6529,10 +6589,10 @@ function evidenceText(f, ui) {
|
|
|
6529
6589
|
return parts2.length > 0 ? parts2.join(" \xB7 ") : void 0;
|
|
6530
6590
|
}
|
|
6531
6591
|
function LiveFactBlock({ facts, match, ui, slip, onAsk }) {
|
|
6532
|
-
const [expanded, setExpanded] = (0,
|
|
6592
|
+
const [expanded, setExpanded] = (0, import_react35.useState)(false);
|
|
6533
6593
|
const { oddsFormat } = useOddsSettings();
|
|
6534
6594
|
const log = useEventLog();
|
|
6535
|
-
const sectionRef = (0,
|
|
6595
|
+
const sectionRef = (0, import_react35.useRef)(null);
|
|
6536
6596
|
const current = facts.find((f) => f.marketState);
|
|
6537
6597
|
const earlier = facts.filter((f) => f.marketState && f !== current);
|
|
6538
6598
|
const background = facts.filter((f) => !f.marketState).slice(0, BACKGROUND_MAX);
|
|
@@ -6617,7 +6677,7 @@ function LiveFactBlock({ facts, match, ui, slip, onAsk }) {
|
|
|
6617
6677
|
}
|
|
6618
6678
|
|
|
6619
6679
|
// src/components/AllMarketsButton.tsx
|
|
6620
|
-
var
|
|
6680
|
+
var import_react36 = require("react");
|
|
6621
6681
|
var import_widget_sdk20 = require("@sensiblestats/widget-sdk");
|
|
6622
6682
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
6623
6683
|
function allMarketsCount(vm, monitor) {
|
|
@@ -6626,8 +6686,8 @@ function allMarketsCount(vm, monitor) {
|
|
|
6626
6686
|
}
|
|
6627
6687
|
function AllMarketsButton({ vm, count: count2, monitor, ui, surface }) {
|
|
6628
6688
|
const log = useEventLog();
|
|
6629
|
-
const [toast, setToast] = (0,
|
|
6630
|
-
const dismiss = (0,
|
|
6689
|
+
const [toast, setToast] = (0, import_react36.useState)(null);
|
|
6690
|
+
const dismiss = (0, import_react36.useCallback)(() => setToast(null), []);
|
|
6631
6691
|
const onClick = () => {
|
|
6632
6692
|
if (monitor.pinMatch({ matchId: vm.matchId, marketDeveloperName: vm.marketDeveloperName }) === "match_limit") {
|
|
6633
6693
|
setToast({ kind: "error", text: ui.matchLimitToast });
|
|
@@ -6692,7 +6752,7 @@ function fmtHhMm(iso, tag2, clock3, timeZone) {
|
|
|
6692
6752
|
return formatTime(iso, tag2, clock3, { timeZone });
|
|
6693
6753
|
}
|
|
6694
6754
|
function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }) {
|
|
6695
|
-
const [open, setOpen] = (0,
|
|
6755
|
+
const [open, setOpen] = (0, import_react37.useState)(false);
|
|
6696
6756
|
useNextKickoffRender(isNfl(vm.sport) ? [vm.kickoffUtc] : []);
|
|
6697
6757
|
const kickoffFallback = vm.kickoffUtc ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
|
|
6698
6758
|
const kickoff = vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
@@ -6703,9 +6763,9 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
|
|
|
6703
6763
|
const asOfMs = live ? new Date(live.asOfUtc).getTime() : NaN;
|
|
6704
6764
|
const isStale = live != null && !isClosed && (vm.awaitingLiveUpdate === true || Date.now() - asOfMs > STALE_AFTER_MS);
|
|
6705
6765
|
const staleTime = isStale && live ? fmtHhMm(live.asOfUtc, ui.locale, clockOf(ui), ui.timeZone) : null;
|
|
6706
|
-
const [, setStaleTick] = (0,
|
|
6766
|
+
const [, setStaleTick] = (0, import_react37.useState)(0);
|
|
6707
6767
|
const watchStale = live != null && !isClosed && !isStale;
|
|
6708
|
-
(0,
|
|
6768
|
+
(0, import_react37.useEffect)(() => {
|
|
6709
6769
|
if (!watchStale) return;
|
|
6710
6770
|
const id = window.setTimeout(() => setStaleTick((n) => n + 1), Math.max(0, asOfMs + STALE_AFTER_MS - Date.now()) + 1);
|
|
6711
6771
|
return () => window.clearTimeout(id);
|
|
@@ -6844,7 +6904,7 @@ var asOf = (iso, ui) => {
|
|
|
6844
6904
|
function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId }) {
|
|
6845
6905
|
const matchId = card.matchId;
|
|
6846
6906
|
const canAdd2 = !!slip.onAddToSlip;
|
|
6847
|
-
const ask = (0,
|
|
6907
|
+
const ask = (0, import_react38.useMemo)(() => canAdd2 && marketKey && matchId ? {
|
|
6848
6908
|
sport,
|
|
6849
6909
|
marketKey,
|
|
6850
6910
|
matchIds: [matchId],
|
|
@@ -6855,7 +6915,7 @@ function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUser
|
|
|
6855
6915
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
6856
6916
|
} : null, [canAdd2, sport, marketKey, matchId, operatorUserId, anonymousUserId]);
|
|
6857
6917
|
const { grid, answeredFor, request } = useBuilderGrid({ conversation, locale: ui.hostTag, initial: ask });
|
|
6858
|
-
(0,
|
|
6918
|
+
(0, import_react38.useEffect)(() => {
|
|
6859
6919
|
if (ask) void request(ask);
|
|
6860
6920
|
}, [request, ask]);
|
|
6861
6921
|
useNextKickoffRender([card.startsAtUtc]);
|
|
@@ -6894,16 +6954,16 @@ function CardLine({ card, ui, slip, sport, marketKey, conversation, operatorUser
|
|
|
6894
6954
|
}
|
|
6895
6955
|
|
|
6896
6956
|
// src/components/dashboard/v8/Pic.tsx
|
|
6897
|
-
var
|
|
6957
|
+
var import_react39 = require("react");
|
|
6898
6958
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
6899
6959
|
function Pic({ src, kind = "team" }) {
|
|
6900
|
-
const [failed, setFailed] = (0,
|
|
6960
|
+
const [failed, setFailed] = (0, import_react39.useState)(null);
|
|
6901
6961
|
if (!src || failed === src) return null;
|
|
6902
6962
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { className: kind === "player" ? "ss-w-v8-pic ss-w-v8-pic--player" : "ss-w-v8-pic", src, alt: "", "aria-hidden": "true", onError: () => setFailed(src) });
|
|
6903
6963
|
}
|
|
6904
6964
|
|
|
6905
6965
|
// src/components/dashboard/v8/FactPrice.tsx
|
|
6906
|
-
var
|
|
6966
|
+
var import_react40 = require("react");
|
|
6907
6967
|
|
|
6908
6968
|
// src/components/dashboard/v8/factLeg.ts
|
|
6909
6969
|
var isProp = (key) => key.toLowerCase().startsWith("prop_");
|
|
@@ -6934,7 +6994,7 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
|
6934
6994
|
function FactPrice({ reference, ui, slip, conversation, memory: memory3, stars, enabled, operatorUserId, anonymousUserId }) {
|
|
6935
6995
|
const { sport, marketKey, matchId } = reference;
|
|
6936
6996
|
const canAdd2 = !!slip.onAddToSlip;
|
|
6937
|
-
const ask = (0,
|
|
6997
|
+
const ask = (0, import_react40.useMemo)(() => enabled && canAdd2 && marketKey && matchId ? {
|
|
6938
6998
|
sport,
|
|
6939
6999
|
marketKey,
|
|
6940
7000
|
matchIds: [matchId],
|
|
@@ -6946,7 +7006,7 @@ function FactPrice({ reference, ui, slip, conversation, memory: memory3, stars,
|
|
|
6946
7006
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
6947
7007
|
} : null, [enabled, canAdd2, sport, marketKey, matchId, operatorUserId, anonymousUserId]);
|
|
6948
7008
|
const { grid, answeredFor, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: ask });
|
|
6949
|
-
(0,
|
|
7009
|
+
(0, import_react40.useEffect)(() => {
|
|
6950
7010
|
if (ask) void request(ask);
|
|
6951
7011
|
}, [request, ask]);
|
|
6952
7012
|
const settled = answeredFor === ask;
|
|
@@ -7015,7 +7075,7 @@ function FavouritesInvite({ ui, sport, onOpen }) {
|
|
|
7015
7075
|
}
|
|
7016
7076
|
|
|
7017
7077
|
// src/components/dashboard/v8/useFollow.ts
|
|
7018
|
-
var
|
|
7078
|
+
var import_react41 = require("react");
|
|
7019
7079
|
|
|
7020
7080
|
// src/favouriteKinds.ts
|
|
7021
7081
|
function favouriteKinds(sport) {
|
|
@@ -7034,7 +7094,7 @@ function favouriteKindLabel(ui, sport, kind) {
|
|
|
7034
7094
|
var isFavouriteKind = (kind) => kind === "team" || kind === "player" || kind === "competition";
|
|
7035
7095
|
var keyOf2 = (sport, t) => `${sport}:${t.kind}:${t.id}`;
|
|
7036
7096
|
function useFollow(controller, ui, holds, sport) {
|
|
7037
|
-
const [notice, setNotice] = (0,
|
|
7097
|
+
const [notice, setNotice] = (0, import_react41.useState)(null);
|
|
7038
7098
|
const isOpen = (t) => isFavouriteKind(t.kind) && !holds.followed.has(keyOf2(sport, t)) && !controller.isStarred(t.kind, t.id);
|
|
7039
7099
|
const follow = async (t) => {
|
|
7040
7100
|
if (!isFavouriteKind(t.kind)) return;
|
|
@@ -7201,15 +7261,20 @@ function GuessCard({ guess, ui, controller, holds, sport, conversation, operator
|
|
|
7201
7261
|
}
|
|
7202
7262
|
|
|
7203
7263
|
// src/components/dashboard/v8/IdleTeams.tsx
|
|
7264
|
+
var import_react42 = require("react");
|
|
7204
7265
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
7205
|
-
function IdleTeams({ teams, ui, onAct }) {
|
|
7266
|
+
function IdleTeams({ teams, ui, onAct, slotBase }) {
|
|
7267
|
+
const events = (0, import_react42.useContext)(GreetingEventsContext);
|
|
7206
7268
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: teams.map((t, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ss-w-v8-idle", children: [
|
|
7207
7269
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pic, { src: t.imagePath }),
|
|
7208
7270
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ss-w-v8-idle-text", children: [
|
|
7209
7271
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("b", { children: t.label }),
|
|
7210
7272
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: ui.v8NoGame })
|
|
7211
7273
|
] }),
|
|
7212
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { type: "button", className: "ss-w-v8-idle-ask", "aria-label": `${ui.v8Ask}: ${t.label}`, onClick: () =>
|
|
7274
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("button", { type: "button", className: "ss-w-v8-idle-ask", "aria-label": `${ui.v8Ask}: ${t.label}`, onClick: () => {
|
|
7275
|
+
if (slotBase !== void 0) events?.cardTap(slotBase + i);
|
|
7276
|
+
onAct?.(toActionVM({ actionLabel: t.actionLabel, actionValue: t.actionValue }));
|
|
7277
|
+
}, children: [
|
|
7213
7278
|
ui.v8Ask,
|
|
7214
7279
|
" \u2192"
|
|
7215
7280
|
] })
|
|
@@ -7217,13 +7282,15 @@ function IdleTeams({ teams, ui, onAct }) {
|
|
|
7217
7282
|
}
|
|
7218
7283
|
|
|
7219
7284
|
// src/components/dashboard/v8/MatchCard.tsx
|
|
7285
|
+
var import_react43 = require("react");
|
|
7220
7286
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
7221
|
-
function MatchCard({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId }) {
|
|
7287
|
+
function MatchCard({ card, ui, slip, sport, marketKey, conversation, operatorUserId, anonymousUserId, slot }) {
|
|
7288
|
+
const events = (0, import_react43.useContext)(GreetingEventsContext);
|
|
7222
7289
|
if (!teamCardHasContent(card)) return null;
|
|
7223
7290
|
const pair = !!(card.homeLabel && card.awayLabel);
|
|
7224
7291
|
const title = card.homeLabel && card.awayLabel ? `${card.homeLabel} - ${card.awayLabel}` : card.label;
|
|
7225
7292
|
const sub = [kickoffText(ui, card.startsAtUtc), card.competitionLabel].filter(Boolean).join(" \xB7 ");
|
|
7226
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", { className: "ss-w-v8-card ss-w-v8-team", children: [
|
|
7293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", { className: "ss-w-v8-card ss-w-v8-team", onClickCapture: slot === void 0 ? void 0 : () => events?.cardTap(slot), children: [
|
|
7227
7294
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("header", { className: "ss-w-v8-card-head", children: [
|
|
7228
7295
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("b", { className: "ss-w-v8-card-name", children: [
|
|
7229
7296
|
pair ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pic, { src: card.homeTeamImagePath }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pic, { src: card.imagePath }),
|
|
@@ -7395,6 +7462,7 @@ function PersonalGreeting({ personal, ui, slip, sport, starsElsewhere = false, o
|
|
|
7395
7462
|
teamCards.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7396
7463
|
MatchCard,
|
|
7397
7464
|
{
|
|
7465
|
+
slot: i,
|
|
7398
7466
|
card: c,
|
|
7399
7467
|
ui,
|
|
7400
7468
|
slip,
|
|
@@ -7406,7 +7474,7 @@ function PersonalGreeting({ personal, ui, slip, sport, starsElsewhere = false, o
|
|
|
7406
7474
|
},
|
|
7407
7475
|
`t:${c.teamId}:${i}`
|
|
7408
7476
|
)),
|
|
7409
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IdleTeams, { teams: idleTeams, ui, onAct }),
|
|
7477
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IdleTeams, { teams: idleTeams, ui, onAct, slotBase: teamCards.length }),
|
|
7410
7478
|
playerCards.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className: "ss-w-v8-sec-title", children: ui.v8YourPlayers }) : null,
|
|
7411
7479
|
playerCards.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PlayerCard, { card: c, ui }, `p:${c.playerId}:${i}`))
|
|
7412
7480
|
] }, "cards") : null;
|
|
@@ -7488,16 +7556,28 @@ function switchSets(dashboards) {
|
|
|
7488
7556
|
function initialSport(sets, defaultSport) {
|
|
7489
7557
|
return (sets?.some((s) => s.sport === defaultSport) ? defaultSport : sets?.[0]?.sport) ?? "";
|
|
7490
7558
|
}
|
|
7491
|
-
function GreetingDashboard({ dashboard, dashboards, defaultSport, onTap, onSportChange, ui, slip, onAct }) {
|
|
7559
|
+
function GreetingDashboard({ dashboard, dashboards, defaultSport, greeting, onTap, onSportChange, ui, slip, onAct }) {
|
|
7492
7560
|
const log = useEventLog();
|
|
7493
7561
|
const { oddsFormat } = useOddsSettings();
|
|
7494
7562
|
const scope = useSportScope();
|
|
7495
7563
|
const sets = switchSets(dashboards);
|
|
7496
|
-
const [selected, setSelected] = (0,
|
|
7564
|
+
const [selected, setSelected] = (0, import_react44.useState)(() => initialSport(sets, defaultSport));
|
|
7497
7565
|
const active = sets?.find((s) => s.sport === selected) ?? null;
|
|
7498
7566
|
const shown2 = active ? active.dashboard : dashboard;
|
|
7499
7567
|
const personal = shown2.personal;
|
|
7500
7568
|
const starsElsewhere = (sets ?? []).some((s) => (s.dashboard.personal?.ribbon?.stars.length ?? 0) > 0);
|
|
7569
|
+
const meta = active ? active.greeting ?? (greeting?.sport === active.sport ? greeting : void 0) : greeting;
|
|
7570
|
+
(0, import_react44.useEffect)(() => {
|
|
7571
|
+
if (log && meta) sendGreetingOnce((e) => log.log(e), log, meta, "panel");
|
|
7572
|
+
}, [log, meta]);
|
|
7573
|
+
const events = (0, import_react44.useMemo)(() => {
|
|
7574
|
+
if (!log || !meta) return null;
|
|
7575
|
+
const send = (name, slot) => {
|
|
7576
|
+
if (!Number.isInteger(slot) || slot < 0 || slot > 19) return;
|
|
7577
|
+
log.log({ name, greeting: { greetingId: meta.greetingId, case: meta.case, sport: meta.sport, market: meta.market ?? null, slot } });
|
|
7578
|
+
};
|
|
7579
|
+
return { cardTap: (slot) => send("greeting_card_tap", slot), askTap: (slot) => send("greeting_ask_tap", slot) };
|
|
7580
|
+
}, [log, meta]);
|
|
7501
7581
|
const select = (sport) => {
|
|
7502
7582
|
if (sport === selected) return;
|
|
7503
7583
|
setSelected(sport);
|
|
@@ -7507,7 +7587,7 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, onTap, onSport
|
|
|
7507
7587
|
};
|
|
7508
7588
|
const layout = layoutClass(shown2.layout);
|
|
7509
7589
|
const badgePlacement = layout === LAYOUT_CLASSES.goal ? "end" : "meta";
|
|
7510
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `ss-w-dash ${layout}`, children: [
|
|
7590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GreetingEventsContext.Provider, { value: events, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `ss-w-dash ${layout}`, children: [
|
|
7511
7591
|
sets ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SportSwitch, { sports: sets, selected, onSelect: select, liveLabel: ui.liveLabel, groupLabel: ui.sportGroupLabel, tag: ui.locale }) : null,
|
|
7512
7592
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ss-w-dash-head", children: [
|
|
7513
7593
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ss-w-dash-title", children: shown2.title }),
|
|
@@ -7524,37 +7604,37 @@ function GreetingDashboard({ dashboard, dashboards, defaultSport, onTap, onSport
|
|
|
7524
7604
|
`${t.title}-${i}`
|
|
7525
7605
|
)) }),
|
|
7526
7606
|
shown2.footerTip ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ss-w-dash-foot", children: shown2.footerTip }) : null
|
|
7527
|
-
] });
|
|
7607
|
+
] }) });
|
|
7528
7608
|
}
|
|
7529
7609
|
|
|
7530
7610
|
// src/useScheduleSport.ts
|
|
7531
|
-
var
|
|
7611
|
+
var import_react45 = require("react");
|
|
7532
7612
|
function useScheduleSport(offered) {
|
|
7533
|
-
const [chosen, setChosen] = (0,
|
|
7613
|
+
const [chosen, setChosen] = (0, import_react45.useState)("all");
|
|
7534
7614
|
const sport = chosen === "all" || offered.includes(chosen) ? chosen : "all";
|
|
7535
|
-
(0,
|
|
7615
|
+
(0, import_react45.useEffect)(() => {
|
|
7536
7616
|
if (sport !== chosen) setChosen("all");
|
|
7537
7617
|
}, [sport, chosen]);
|
|
7538
|
-
const setSport = (0,
|
|
7618
|
+
const setSport = (0, import_react45.useCallback)((s) => setChosen(s), []);
|
|
7539
7619
|
return { sport, setSport, offered };
|
|
7540
7620
|
}
|
|
7541
7621
|
|
|
7542
7622
|
// src/useMatchesDay.ts
|
|
7543
|
-
var
|
|
7623
|
+
var import_react47 = require("react");
|
|
7544
7624
|
|
|
7545
7625
|
// src/useScheduleDay.ts
|
|
7546
|
-
var
|
|
7626
|
+
var import_react46 = require("react");
|
|
7547
7627
|
var EMPTY = [];
|
|
7548
7628
|
function useScheduleDay(opts) {
|
|
7549
7629
|
const { localDate, today, todayGroups, enabled, resetKey, timeZone } = opts;
|
|
7550
|
-
const getRef = (0,
|
|
7630
|
+
const getRef = (0, import_react46.useRef)(opts.getSchedule);
|
|
7551
7631
|
getRef.current = opts.getSchedule;
|
|
7552
|
-
const daysRef = (0,
|
|
7553
|
-
const [fetched, setFetched] = (0,
|
|
7554
|
-
const [retryKey, setRetryKey] = (0,
|
|
7555
|
-
const [seenDate, setSeenDate] = (0,
|
|
7556
|
-
const [seenReset, setSeenReset] = (0,
|
|
7557
|
-
const [seenZone, setSeenZone] = (0,
|
|
7632
|
+
const daysRef = (0, import_react46.useRef)(/* @__PURE__ */ new Map());
|
|
7633
|
+
const [fetched, setFetched] = (0, import_react46.useState)({ status: "idle", groups: EMPTY });
|
|
7634
|
+
const [retryKey, setRetryKey] = (0, import_react46.useState)(0);
|
|
7635
|
+
const [seenDate, setSeenDate] = (0, import_react46.useState)(localDate);
|
|
7636
|
+
const [seenReset, setSeenReset] = (0, import_react46.useState)(resetKey);
|
|
7637
|
+
const [seenZone, setSeenZone] = (0, import_react46.useState)(timeZone);
|
|
7558
7638
|
if (seenDate !== localDate) {
|
|
7559
7639
|
setSeenDate(localDate);
|
|
7560
7640
|
setFetched({ status: "idle", groups: EMPTY });
|
|
@@ -7566,7 +7646,7 @@ function useScheduleDay(opts) {
|
|
|
7566
7646
|
setFetched({ status: "idle", groups: EMPTY });
|
|
7567
7647
|
}
|
|
7568
7648
|
const isToday = localDate === today;
|
|
7569
|
-
(0,
|
|
7649
|
+
(0, import_react46.useEffect)(() => {
|
|
7570
7650
|
if (!enabled || isToday || daysRef.current.has(localDate)) return;
|
|
7571
7651
|
let cancelled = false;
|
|
7572
7652
|
setFetched({ status: "loading", groups: EMPTY });
|
|
@@ -7588,7 +7668,7 @@ function useScheduleDay(opts) {
|
|
|
7588
7668
|
cancelled = true;
|
|
7589
7669
|
};
|
|
7590
7670
|
}, [localDate, isToday, enabled, retryKey, resetKey, timeZone]);
|
|
7591
|
-
const retry = (0,
|
|
7671
|
+
const retry = (0, import_react46.useCallback)(() => {
|
|
7592
7672
|
setRetryKey((k) => k + 1);
|
|
7593
7673
|
}, []);
|
|
7594
7674
|
if (isToday) return { status: "ready", groups: todayGroups, retry };
|
|
@@ -7601,7 +7681,7 @@ function useScheduleDay(opts) {
|
|
|
7601
7681
|
// src/useMatchesDay.ts
|
|
7602
7682
|
function useMatchesDay({ discovery, day, sport, getSchedule, enabled, timeZone }) {
|
|
7603
7683
|
const { localDate: today, matchDays } = discovery;
|
|
7604
|
-
const chips = (0,
|
|
7684
|
+
const chips = (0, import_react47.useMemo)(() => buildDayChips(today, matchDays, sport), [today, matchDays, sport]);
|
|
7605
7685
|
const selected = chips.some((c) => c.date === day) ? day : today;
|
|
7606
7686
|
const loaded = useScheduleDay({
|
|
7607
7687
|
localDate: selected,
|
|
@@ -7615,8 +7695,8 @@ function useMatchesDay({ discovery, day, sport, getSchedule, enabled, timeZone }
|
|
|
7615
7695
|
return { ...loaded, chips, selected };
|
|
7616
7696
|
}
|
|
7617
7697
|
function useMatchesDayPick(today) {
|
|
7618
|
-
const [pick, setPick] = (0,
|
|
7619
|
-
const setDay = (0,
|
|
7698
|
+
const [pick, setPick] = (0, import_react47.useState)(null);
|
|
7699
|
+
const setDay = (0, import_react47.useCallback)((d) => setPick({ day: d, madeOn: today }), [today]);
|
|
7620
7700
|
return [pick !== null && pick.madeOn === today ? pick.day : today, setDay];
|
|
7621
7701
|
}
|
|
7622
7702
|
|
|
@@ -7703,15 +7783,19 @@ var WIRE_TO_PUBLIC = {
|
|
|
7703
7783
|
match_view: null,
|
|
7704
7784
|
popup_opened: null,
|
|
7705
7785
|
fact_view: null,
|
|
7706
|
-
fact_ask: null
|
|
7786
|
+
fact_ask: null,
|
|
7787
|
+
greeting_shown: null,
|
|
7788
|
+
greeting_cta_click: null,
|
|
7789
|
+
greeting_card_tap: null,
|
|
7790
|
+
greeting_ask_tap: null
|
|
7707
7791
|
};
|
|
7708
7792
|
|
|
7709
7793
|
// src/popupTelemetry.ts
|
|
7710
|
-
var
|
|
7794
|
+
var import_react48 = require("react");
|
|
7711
7795
|
function usePopupTelemetry(log, isOpen, popupText, dismissPopup, confirmedShown) {
|
|
7712
|
-
const shownRef = (0,
|
|
7713
|
-
const closedTextRef = (0,
|
|
7714
|
-
(0,
|
|
7796
|
+
const shownRef = (0, import_react48.useRef)(/* @__PURE__ */ new Set());
|
|
7797
|
+
const closedTextRef = (0, import_react48.useRef)(null);
|
|
7798
|
+
(0, import_react48.useEffect)(() => {
|
|
7715
7799
|
if (isOpen) {
|
|
7716
7800
|
if (closedTextRef.current) log?.log({ name: "popup_opened" });
|
|
7717
7801
|
closedTextRef.current = null;
|
|
@@ -7724,26 +7808,26 @@ function usePopupTelemetry(log, isOpen, popupText, dismissPopup, confirmedShown)
|
|
|
7724
7808
|
log?.log({ name: "popup_shown" });
|
|
7725
7809
|
}
|
|
7726
7810
|
}, [log, isOpen, popupText, confirmedShown]);
|
|
7727
|
-
return (0,
|
|
7811
|
+
return (0, import_react48.useCallback)(() => {
|
|
7728
7812
|
log?.log({ name: "popup_dismissed" });
|
|
7729
7813
|
dismissPopup();
|
|
7730
7814
|
}, [log, dismissPopup]);
|
|
7731
7815
|
}
|
|
7732
7816
|
|
|
7733
7817
|
// src/mobileBinding.ts
|
|
7734
|
-
var
|
|
7818
|
+
var import_react49 = require("react");
|
|
7735
7819
|
var CLEARED = { text: null, asks: [] };
|
|
7736
7820
|
function useMobileBinding(args) {
|
|
7737
7821
|
const { binding, panelOpen, popupText, asks } = args;
|
|
7738
|
-
const latest = (0,
|
|
7822
|
+
const latest = (0, import_react49.useRef)(args);
|
|
7739
7823
|
latest.current = args;
|
|
7740
|
-
const bindingRef = (0,
|
|
7824
|
+
const bindingRef = (0, import_react49.useRef)(binding);
|
|
7741
7825
|
bindingRef.current = binding;
|
|
7742
|
-
const backRef = (0,
|
|
7743
|
-
const [confirmedShown, setConfirmedShown] = (0,
|
|
7826
|
+
const backRef = (0, import_react49.useRef)(null);
|
|
7827
|
+
const [confirmedShown, setConfirmedShown] = (0, import_react49.useState)(null);
|
|
7744
7828
|
const teaserKey = panelOpen || !popupText ? "" : JSON.stringify([popupText, asks.map((a) => a.label)]);
|
|
7745
|
-
const reported = (0,
|
|
7746
|
-
(0,
|
|
7829
|
+
const reported = (0, import_react49.useRef)({ binding: void 0, key: "" });
|
|
7830
|
+
(0, import_react49.useEffect)(() => {
|
|
7747
7831
|
if (!binding) return;
|
|
7748
7832
|
const prev = reported.current;
|
|
7749
7833
|
if (prev.binding === binding && prev.key === teaserKey) return;
|
|
@@ -7751,7 +7835,7 @@ function useMobileBinding(args) {
|
|
|
7751
7835
|
if (teaserKey === "" && prev.binding !== binding) return;
|
|
7752
7836
|
binding.onTeaser(teaserKey === "" ? CLEARED : { text: popupText, asks: asks.map((a, index) => ({ index, label: a.label })) });
|
|
7753
7837
|
}, [binding, teaserKey]);
|
|
7754
|
-
(0,
|
|
7838
|
+
(0, import_react49.useEffect)(() => {
|
|
7755
7839
|
if (!binding) return;
|
|
7756
7840
|
binding.onHandle({
|
|
7757
7841
|
open: () => latest.current.open(),
|
|
@@ -7768,8 +7852,8 @@ function useMobileBinding(args) {
|
|
|
7768
7852
|
});
|
|
7769
7853
|
return () => binding.onHandle(null);
|
|
7770
7854
|
}, [binding]);
|
|
7771
|
-
const onCloseRequested = (0,
|
|
7772
|
-
const onRegisterBack = (0,
|
|
7855
|
+
const onCloseRequested = (0, import_react49.useCallback)(() => bindingRef.current?.onCloseRequested(), []);
|
|
7856
|
+
const onRegisterBack = (0, import_react49.useCallback)((fn) => {
|
|
7773
7857
|
backRef.current = fn;
|
|
7774
7858
|
}, []);
|
|
7775
7859
|
if (!binding) return { confirmedShown: void 0, onCloseRequested: void 0, onRegisterBack: void 0 };
|
|
@@ -7777,10 +7861,10 @@ function useMobileBinding(args) {
|
|
|
7777
7861
|
}
|
|
7778
7862
|
|
|
7779
7863
|
// src/openTelemetry.ts
|
|
7780
|
-
var
|
|
7864
|
+
var import_react50 = require("react");
|
|
7781
7865
|
function useOpenTelemetry(log, isOpen) {
|
|
7782
|
-
const openLoggedRef = (0,
|
|
7783
|
-
(0,
|
|
7866
|
+
const openLoggedRef = (0, import_react50.useRef)(false);
|
|
7867
|
+
(0, import_react50.useEffect)(() => {
|
|
7784
7868
|
if (!isOpen) {
|
|
7785
7869
|
openLoggedRef.current = false;
|
|
7786
7870
|
return;
|
|
@@ -7792,13 +7876,13 @@ function useOpenTelemetry(log, isOpen) {
|
|
|
7792
7876
|
}
|
|
7793
7877
|
|
|
7794
7878
|
// src/components/ChatFab.tsx
|
|
7795
|
-
var
|
|
7879
|
+
var import_react52 = require("react");
|
|
7796
7880
|
|
|
7797
7881
|
// src/components/BrandMark.tsx
|
|
7798
|
-
var
|
|
7882
|
+
var import_react51 = require("react");
|
|
7799
7883
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
7800
7884
|
function BrandMark({ logoUrl, className }) {
|
|
7801
|
-
const [failed, setFailed] = (0,
|
|
7885
|
+
const [failed, setFailed] = (0, import_react51.useState)(false);
|
|
7802
7886
|
if (!logoUrl || failed) return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SsMark, { className });
|
|
7803
7887
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { className, src: logoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
7804
7888
|
}
|
|
@@ -7832,13 +7916,13 @@ function GreetingBubble({ text: text2, onOpen, onDismiss, dismissLabel, asks })
|
|
|
7832
7916
|
|
|
7833
7917
|
// src/components/ChatFab.tsx
|
|
7834
7918
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
7835
|
-
function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel, introAllowed = false, onIntroStart, asks }) {
|
|
7919
|
+
function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, onDismissPopup, dismissLabel, introAllowed = false, onIntroStart, asks, onBubbleClick }) {
|
|
7836
7920
|
const bubble = popupText ?? greeting;
|
|
7837
7921
|
const hidden = busy && !label;
|
|
7838
7922
|
const track = useTrack();
|
|
7839
|
-
const [intro, setIntro] = (0,
|
|
7840
|
-
const armedRef = (0,
|
|
7841
|
-
(0,
|
|
7923
|
+
const [intro, setIntro] = (0, import_react52.useState)(false);
|
|
7924
|
+
const armedRef = (0, import_react52.useRef)(introAllowed);
|
|
7925
|
+
(0, import_react52.useEffect)(() => {
|
|
7842
7926
|
if (armedRef.current && bubble) {
|
|
7843
7927
|
armedRef.current = false;
|
|
7844
7928
|
setIntro(true);
|
|
@@ -7848,6 +7932,7 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
|
|
|
7848
7932
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: intro ? "ss-w-fab-wrap ss-w-intro" : "ss-w-fab-wrap", children: [
|
|
7849
7933
|
bubble ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(GreetingBubble, { text: bubble, onOpen: () => {
|
|
7850
7934
|
track({ name: "bubble_click" });
|
|
7935
|
+
if (popupText) onBubbleClick?.();
|
|
7851
7936
|
onOpen();
|
|
7852
7937
|
}, onDismiss: popupText ? onDismissPopup : void 0, dismissLabel, asks: popupText ? asks : void 0 }) : null,
|
|
7853
7938
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { type: "button", className: "ss-w-fab", "aria-label": label, "aria-busy": busy || void 0, "aria-hidden": hidden || void 0, tabIndex: hidden ? -1 : void 0, onClick: () => {
|
|
@@ -7858,10 +7943,10 @@ function ChatFab({ label, busy = false, greeting, popupText, logoUrl, onOpen, on
|
|
|
7858
7943
|
}
|
|
7859
7944
|
|
|
7860
7945
|
// src/components/ChatPanel.tsx
|
|
7861
|
-
var
|
|
7946
|
+
var import_react111 = require("react");
|
|
7862
7947
|
|
|
7863
7948
|
// src/components/ChatHeader.tsx
|
|
7864
|
-
var
|
|
7949
|
+
var import_react53 = require("react");
|
|
7865
7950
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
7866
7951
|
function ChatHeader({
|
|
7867
7952
|
onClose,
|
|
@@ -7877,18 +7962,18 @@ function ChatHeader({
|
|
|
7877
7962
|
onOpenFavourites,
|
|
7878
7963
|
favouritesLabel
|
|
7879
7964
|
}) {
|
|
7880
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
7881
|
-
const wrapRef = (0,
|
|
7882
|
-
const kebabRef = (0,
|
|
7883
|
-
const firstItemRef = (0,
|
|
7965
|
+
const [menuOpen, setMenuOpen] = (0, import_react53.useState)(false);
|
|
7966
|
+
const wrapRef = (0, import_react53.useRef)(null);
|
|
7967
|
+
const kebabRef = (0, import_react53.useRef)(null);
|
|
7968
|
+
const firstItemRef = (0, import_react53.useRef)(null);
|
|
7884
7969
|
const hasNew = !!(canReset && onNewConversation);
|
|
7885
7970
|
const hasSettings = !!onOpenSettings;
|
|
7886
7971
|
const hasFavourites = !!onOpenFavourites;
|
|
7887
7972
|
const hasMenu = hasFavourites || hasNew || hasSettings;
|
|
7888
|
-
(0,
|
|
7973
|
+
(0, import_react53.useEffect)(() => {
|
|
7889
7974
|
if (menuOpen) firstItemRef.current?.focus();
|
|
7890
7975
|
}, [menuOpen]);
|
|
7891
|
-
(0,
|
|
7976
|
+
(0, import_react53.useEffect)(() => {
|
|
7892
7977
|
if (!menuOpen) return;
|
|
7893
7978
|
const onPointer = (e) => {
|
|
7894
7979
|
if (!(wrapRef.current && e.composedPath().includes(wrapRef.current))) setMenuOpen(false);
|
|
@@ -7976,10 +8061,10 @@ function ChatHeader({
|
|
|
7976
8061
|
}
|
|
7977
8062
|
|
|
7978
8063
|
// src/components/MessageList.tsx
|
|
7979
|
-
var
|
|
8064
|
+
var import_react67 = require("react");
|
|
7980
8065
|
|
|
7981
8066
|
// src/components/ChatMessage.tsx
|
|
7982
|
-
var
|
|
8067
|
+
var import_react66 = require("react");
|
|
7983
8068
|
|
|
7984
8069
|
// src/components/Markdown.tsx
|
|
7985
8070
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
@@ -7997,7 +8082,7 @@ function Markdown({ text: text2 }) {
|
|
|
7997
8082
|
}
|
|
7998
8083
|
|
|
7999
8084
|
// src/components/EntityCardList.tsx
|
|
8000
|
-
var
|
|
8085
|
+
var import_react54 = require("react");
|
|
8001
8086
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
8002
8087
|
var MAX_VISIBLE = 3;
|
|
8003
8088
|
var RECORD_RE = /^(\d+)-(\d+)-(\d+)$/;
|
|
@@ -8100,7 +8185,7 @@ function ScopeTabs({ scopes, active, onSelect }) {
|
|
|
8100
8185
|
)) });
|
|
8101
8186
|
}
|
|
8102
8187
|
function EntityCardItem({ c }) {
|
|
8103
|
-
const [active, setActive] = (0,
|
|
8188
|
+
const [active, setActive] = (0, import_react54.useState)(0);
|
|
8104
8189
|
const hasBody = c.scopes.length > 0;
|
|
8105
8190
|
if (!hasBody) {
|
|
8106
8191
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CardHeader, { c, showScopeCrest: false }) });
|
|
@@ -8115,7 +8200,7 @@ function EntityCardItem({ c }) {
|
|
|
8115
8200
|
] });
|
|
8116
8201
|
}
|
|
8117
8202
|
function EntityCardList({ cards, disabled, showLessLabel, showMoreLabel }) {
|
|
8118
|
-
const [expanded, setExpanded] = (0,
|
|
8203
|
+
const [expanded, setExpanded] = (0, import_react54.useState)(false);
|
|
8119
8204
|
if (cards.length === 0) return null;
|
|
8120
8205
|
const visible = expanded ? cards : cards.slice(0, MAX_VISIBLE);
|
|
8121
8206
|
const overflow = cards.length - MAX_VISIBLE;
|
|
@@ -8216,17 +8301,17 @@ function BettingInsightList({ insights, ui, slip, monitor }) {
|
|
|
8216
8301
|
}
|
|
8217
8302
|
|
|
8218
8303
|
// src/components/AddAllToSlipButton.tsx
|
|
8219
|
-
var
|
|
8304
|
+
var import_react55 = require("react");
|
|
8220
8305
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
8221
8306
|
function AddAllToSlipButton({ legs, slip, ui, labels, combo, chatCombo, sizeless, hold, onStartedGame }) {
|
|
8222
8307
|
const add = useSlipAdd(slip, ui);
|
|
8223
8308
|
const slipState = useSlipState();
|
|
8224
8309
|
const log = useEventLog();
|
|
8225
8310
|
const track = useTrack();
|
|
8226
|
-
const [pending, setPending] = (0,
|
|
8227
|
-
const [settledLocal, setSettledLocal] = (0,
|
|
8228
|
-
const [toast, setToast] = (0,
|
|
8229
|
-
const dismiss = (0,
|
|
8311
|
+
const [pending, setPending] = (0, import_react55.useState)(false);
|
|
8312
|
+
const [settledLocal, setSettledLocal] = (0, import_react55.useState)({});
|
|
8313
|
+
const [toast, setToast] = (0, import_react55.useState)(null);
|
|
8314
|
+
const dismiss = (0, import_react55.useCallback)(() => setToast(null), []);
|
|
8230
8315
|
if (!slip.onAddToSlip || legs.length < 2) return null;
|
|
8231
8316
|
const settled = slipState ? slipState.settled : settledLocal;
|
|
8232
8317
|
const open = legs.filter((leg) => !settled[slipKey(leg)]);
|
|
@@ -8299,10 +8384,10 @@ function AddAllToSlipButton({ legs, slip, ui, labels, combo, chatCombo, sizeless
|
|
|
8299
8384
|
}
|
|
8300
8385
|
|
|
8301
8386
|
// src/presetToolsContext.ts
|
|
8302
|
-
var
|
|
8303
|
-
var PresetToolsContext = (0,
|
|
8387
|
+
var import_react56 = require("react");
|
|
8388
|
+
var PresetToolsContext = (0, import_react56.createContext)(null);
|
|
8304
8389
|
function usePresetTools() {
|
|
8305
|
-
return (0,
|
|
8390
|
+
return (0, import_react56.useContext)(PresetToolsContext);
|
|
8306
8391
|
}
|
|
8307
8392
|
|
|
8308
8393
|
// src/components/ComboCardList.tsx
|
|
@@ -8314,6 +8399,8 @@ function ComboLegRow({ leg, addToSlipEnabled, ui, slip, monitor, hold, closed })
|
|
|
8314
8399
|
const kickoff = leg.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
8315
8400
|
const selection = addToSlipEnabled ? comboLegToSlipSelection(leg, slip.conversationId) : null;
|
|
8316
8401
|
const showPin = !!monitor && leg.pinEnabled;
|
|
8402
|
+
const factText = leg.fact ? (leg.fact.direction === "over" ? ui.presets.legFactOver : ui.presets.legFactUnder)(leg.fact.hits, leg.fact.games) : void 0;
|
|
8403
|
+
const line = leg.statText ?? factText;
|
|
8317
8404
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("li", { className: "ss-w-combo-leg", children: [
|
|
8318
8405
|
leg.competition || kickoff || showPin ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ss-w-combo-leg-meta", children: [
|
|
8319
8406
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ss-w-bi-comp", children: leg.competition ?? "" }),
|
|
@@ -8349,7 +8436,7 @@ function ComboLegRow({ leg, addToSlipEnabled, ui, slip, monitor, hold, closed })
|
|
|
8349
8436
|
}
|
|
8350
8437
|
)
|
|
8351
8438
|
] }),
|
|
8352
|
-
|
|
8439
|
+
line ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "ss-w-combo-leg-stat", children: line }) : null
|
|
8353
8440
|
] });
|
|
8354
8441
|
}
|
|
8355
8442
|
function ComboCardView({ vm, ui, slip, monitor }) {
|
|
@@ -8928,7 +9015,7 @@ function NbaInsightList({ insights, ui, slip, monitor }) {
|
|
|
8928
9015
|
}
|
|
8929
9016
|
|
|
8930
9017
|
// src/components/NflInsightList.tsx
|
|
8931
|
-
var
|
|
9018
|
+
var import_react57 = require("react");
|
|
8932
9019
|
|
|
8933
9020
|
// src/strings/types.ts
|
|
8934
9021
|
var fillNfl = (template, values) => template.replace(/\{(\w+)\}/g, (whole, key) => key in values ? String(values[key]) : whole);
|
|
@@ -8939,7 +9026,7 @@ var oneDecimal2 = (n, ui) => formatNumber(n, ui.locale, { minimumFractionDigits:
|
|
|
8939
9026
|
var cap = (text2, ui) => text2 ? upperCase(text2.charAt(0), ui.locale) + text2.slice(1) : text2;
|
|
8940
9027
|
var lineNumber = (line) => Number(line.replace("\u2212", "-").replace(",", "."));
|
|
8941
9028
|
function Badge({ abbr, url }) {
|
|
8942
|
-
const [failed, setFailed] = (0,
|
|
9029
|
+
const [failed, setFailed] = (0, import_react57.useState)(false);
|
|
8943
9030
|
if (url && !failed) {
|
|
8944
9031
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("img", { className: "ss-w-nfl-badge ss-w-nfl-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
8945
9032
|
}
|
|
@@ -9550,7 +9637,7 @@ function TennisInsightList({ insights, ui }) {
|
|
|
9550
9637
|
}
|
|
9551
9638
|
|
|
9552
9639
|
// src/components/CompactOddsList.tsx
|
|
9553
|
-
var
|
|
9640
|
+
var import_react58 = require("react");
|
|
9554
9641
|
var import_widget_sdk23 = require("@sensiblestats/widget-sdk");
|
|
9555
9642
|
|
|
9556
9643
|
// src/compactList.ts
|
|
@@ -9672,11 +9759,11 @@ function Row({ row, columns, ui, slip, monitor, rowRef }) {
|
|
|
9672
9759
|
] });
|
|
9673
9760
|
}
|
|
9674
9761
|
function CompactOddsList({ list, ui, slip, monitor }) {
|
|
9675
|
-
const [shown2, setShown] = (0,
|
|
9762
|
+
const [shown2, setShown] = (0, import_react58.useState)(COMPACT_PAGE);
|
|
9676
9763
|
const hidden = list.rowCount - shown2;
|
|
9677
|
-
const [focusIndex, setFocusIndex] = (0,
|
|
9678
|
-
const focusRef = (0,
|
|
9679
|
-
(0,
|
|
9764
|
+
const [focusIndex, setFocusIndex] = (0, import_react58.useState)(null);
|
|
9765
|
+
const focusRef = (0, import_react58.useRef)(null);
|
|
9766
|
+
(0, import_react58.useEffect)(() => {
|
|
9680
9767
|
if (focusIndex !== null) focusRef.current?.focus();
|
|
9681
9768
|
}, [focusIndex]);
|
|
9682
9769
|
let left = shown2;
|
|
@@ -9911,7 +9998,7 @@ function FixtureCard({ card, ui }) {
|
|
|
9911
9998
|
}
|
|
9912
9999
|
|
|
9913
10000
|
// src/components/dashboard/CountdownCard.tsx
|
|
9914
|
-
var
|
|
10001
|
+
var import_react59 = require("react");
|
|
9915
10002
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
9916
10003
|
var DAY_MS3 = 864e5;
|
|
9917
10004
|
function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
@@ -9930,12 +10017,12 @@ function remainingSegments(kickoffUnix, nowMs, withSeconds) {
|
|
|
9930
10017
|
function CountdownCard({ card, ui }) {
|
|
9931
10018
|
const { data } = card;
|
|
9932
10019
|
const unitLabel = { d: data.daysUnit, h: data.hoursUnit, m: data.minutesUnit, s: data.secondsUnit };
|
|
9933
|
-
const [nowMs, setNowMs] = (0,
|
|
9934
|
-
const [reduced] = (0,
|
|
10020
|
+
const [nowMs, setNowMs] = (0, import_react59.useState)(() => Date.now());
|
|
10021
|
+
const [reduced] = (0, import_react59.useState)(
|
|
9935
10022
|
() => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
9936
10023
|
);
|
|
9937
10024
|
const withinDay = data.kickoffUnix * 1e3 - nowMs < DAY_MS3;
|
|
9938
|
-
(0,
|
|
10025
|
+
(0, import_react59.useEffect)(() => {
|
|
9939
10026
|
if (reduced) return;
|
|
9940
10027
|
const id = window.setInterval(() => setNowMs(Date.now()), withinDay ? 1e3 : 6e4);
|
|
9941
10028
|
return () => window.clearInterval(id);
|
|
@@ -9943,7 +10030,7 @@ function CountdownCard({ card, ui }) {
|
|
|
9943
10030
|
const segments = remainingSegments(data.kickoffUnix, nowMs, withinDay && !reduced);
|
|
9944
10031
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "ss-w-fandash-card ss-w-fandash-countdown", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "ss-w-fandash-countdown-top", children: [
|
|
9945
10032
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title ?? ui.countdownTitle }),
|
|
9946
|
-
segments ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
10033
|
+
segments ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-clock", children: segments.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react59.Fragment, { children: [
|
|
9947
10034
|
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-colon", children: ":" }) : null,
|
|
9948
10035
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "ss-w-fandash-countdown-seg", children: [
|
|
9949
10036
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "ss-w-fandash-countdown-value", children: s.value }),
|
|
@@ -9954,7 +10041,7 @@ function CountdownCard({ card, ui }) {
|
|
|
9954
10041
|
}
|
|
9955
10042
|
|
|
9956
10043
|
// src/components/dashboard/InjuriesCard.tsx
|
|
9957
|
-
var
|
|
10044
|
+
var import_react60 = require("react");
|
|
9958
10045
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9959
10046
|
var SHOWN = 3;
|
|
9960
10047
|
function ColHead({ name, crestUrl }) {
|
|
@@ -9977,7 +10064,7 @@ function InjuryList({ rows, emptyLabel, limit }) {
|
|
|
9977
10064
|
}
|
|
9978
10065
|
function InjuriesCard({ card, ui }) {
|
|
9979
10066
|
const { data } = card;
|
|
9980
|
-
const [expanded, setExpanded] = (0,
|
|
10067
|
+
const [expanded, setExpanded] = (0, import_react60.useState)(false);
|
|
9981
10068
|
const hidden = Math.max(0, data.ours.length - SHOWN) + Math.max(0, data.theirs.length - SHOWN);
|
|
9982
10069
|
const limit = expanded ? void 0 : SHOWN;
|
|
9983
10070
|
const { showMore, showLess } = ui;
|
|
@@ -10082,7 +10169,7 @@ function LinksCard({ card }) {
|
|
|
10082
10169
|
}
|
|
10083
10170
|
|
|
10084
10171
|
// src/components/dashboard/PostMatchResultCard.tsx
|
|
10085
|
-
var
|
|
10172
|
+
var import_react61 = require("react");
|
|
10086
10173
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
10087
10174
|
function initials3(name) {
|
|
10088
10175
|
return name.trim().slice(0, 3).toUpperCase();
|
|
@@ -10092,7 +10179,7 @@ function PostMatchCrest({
|
|
|
10092
10179
|
name,
|
|
10093
10180
|
side
|
|
10094
10181
|
}) {
|
|
10095
|
-
const [failed, setFailed] = (0,
|
|
10182
|
+
const [failed, setFailed] = (0, import_react61.useState)(false);
|
|
10096
10183
|
const cls = `ss-w-fandash-postmatch-crest ss-w-fandash-postmatch-crest--${side}`;
|
|
10097
10184
|
if (url && !failed) {
|
|
10098
10185
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -10291,10 +10378,10 @@ function RestingFormCard({ card }) {
|
|
|
10291
10378
|
}
|
|
10292
10379
|
|
|
10293
10380
|
// src/components/dashboard/LiveScoreCard.tsx
|
|
10294
|
-
var
|
|
10381
|
+
var import_react63 = require("react");
|
|
10295
10382
|
|
|
10296
10383
|
// src/useLiveClock.ts
|
|
10297
|
-
var
|
|
10384
|
+
var import_react62 = require("react");
|
|
10298
10385
|
var TICK_MS = 6e4;
|
|
10299
10386
|
var MAX_LIVE_TICK_MINUTES = 15;
|
|
10300
10387
|
function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
@@ -10303,10 +10390,10 @@ function computeDisplayMinute(minute, clockRunning, receivedAtMs) {
|
|
|
10303
10390
|
return minute + Math.min(Math.max(0, elapsedMinutes), MAX_LIVE_TICK_MINUTES);
|
|
10304
10391
|
}
|
|
10305
10392
|
function useLiveClock(minute, clockRunning, receivedAtMs) {
|
|
10306
|
-
const [displayMinute, setDisplayMinute] = (0,
|
|
10393
|
+
const [displayMinute, setDisplayMinute] = (0, import_react62.useState)(
|
|
10307
10394
|
() => computeDisplayMinute(minute, clockRunning, receivedAtMs)
|
|
10308
10395
|
);
|
|
10309
|
-
(0,
|
|
10396
|
+
(0, import_react62.useEffect)(() => {
|
|
10310
10397
|
setDisplayMinute(computeDisplayMinute(minute, clockRunning, receivedAtMs));
|
|
10311
10398
|
if (!clockRunning) return;
|
|
10312
10399
|
const id = window.setInterval(() => {
|
|
@@ -10323,7 +10410,7 @@ function initials5(name) {
|
|
|
10323
10410
|
return name.trim().slice(0, 3).toUpperCase();
|
|
10324
10411
|
}
|
|
10325
10412
|
function LiveCrest({ url, name, side }) {
|
|
10326
|
-
const [failed, setFailed] = (0,
|
|
10413
|
+
const [failed, setFailed] = (0, import_react63.useState)(false);
|
|
10327
10414
|
const cls = `ss-w-fandash-live-crest ss-w-fandash-live-crest--${side}`;
|
|
10328
10415
|
if (url && !failed) {
|
|
10329
10416
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("img", { className: cls, src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -10345,7 +10432,7 @@ function LiveScoreCard({
|
|
|
10345
10432
|
}) {
|
|
10346
10433
|
const { data } = card;
|
|
10347
10434
|
const seedKey = `${data.minute}:${data.homeScore}:${data.awayScore}`;
|
|
10348
|
-
const seedRef = (0,
|
|
10435
|
+
const seedRef = (0, import_react63.useRef)(null);
|
|
10349
10436
|
if (!seedRef.current || seedRef.current.key !== seedKey) {
|
|
10350
10437
|
seedRef.current = { key: seedKey, receivedAtMs: Date.now() };
|
|
10351
10438
|
}
|
|
@@ -10391,7 +10478,7 @@ function LiveScoreCard({
|
|
|
10391
10478
|
}
|
|
10392
10479
|
|
|
10393
10480
|
// src/components/dashboard/LiveTimelineCard.tsx
|
|
10394
|
-
var
|
|
10481
|
+
var import_react64 = require("react");
|
|
10395
10482
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
10396
10483
|
var SHOWN2 = 3;
|
|
10397
10484
|
function EventIcon({ type }) {
|
|
@@ -10433,7 +10520,7 @@ function EventRow({ e }) {
|
|
|
10433
10520
|
] });
|
|
10434
10521
|
}
|
|
10435
10522
|
function LiveTimelineCard({ card, ui }) {
|
|
10436
|
-
const [expanded, setExpanded] = (0,
|
|
10523
|
+
const [expanded, setExpanded] = (0, import_react64.useState)(false);
|
|
10437
10524
|
const events = card.data.events;
|
|
10438
10525
|
if (!events || events.length === 0) return null;
|
|
10439
10526
|
const sorted = [...events].sort((a, b) => b.minute - a.minute);
|
|
@@ -10457,7 +10544,7 @@ function LiveTimelineCard({ card, ui }) {
|
|
|
10457
10544
|
}
|
|
10458
10545
|
|
|
10459
10546
|
// src/components/dashboard/MomentumWave.tsx
|
|
10460
|
-
var
|
|
10547
|
+
var import_react65 = require("react");
|
|
10461
10548
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
10462
10549
|
var WIDTH = 270;
|
|
10463
10550
|
var HEIGHT = 56;
|
|
@@ -10482,7 +10569,7 @@ function MomentumWave({
|
|
|
10482
10569
|
}) {
|
|
10483
10570
|
if (points.length === 0) return null;
|
|
10484
10571
|
const { area, line, lastLeftPct, lastTopPx } = buildPaths(points);
|
|
10485
|
-
const clipId = (0,
|
|
10572
|
+
const clipId = (0, import_react65.useId)();
|
|
10486
10573
|
const topClipId = `${clipId}-top`;
|
|
10487
10574
|
const bottomClipId = `${clipId}-bottom`;
|
|
10488
10575
|
const topClass = clubIsHome ? "ss-w-fandash-live-mom-home" : "ss-w-fandash-live-mom-away";
|
|
@@ -10632,7 +10719,7 @@ function FanDashboardCard({ card, onTap, ui, goalEvents }) {
|
|
|
10632
10719
|
// src/components/ChatMessage.tsx
|
|
10633
10720
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
10634
10721
|
function ChatMessage({ message, disabled, onAct, onTap, ui, slip, monitor, onGreetingSport }) {
|
|
10635
|
-
const [sport, setSport] = (0,
|
|
10722
|
+
const [sport, setSport] = (0, import_react66.useState)(null);
|
|
10636
10723
|
if (message.role === "user") {
|
|
10637
10724
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-msg ss-w-user", "data-msg-id": message.id, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-bubble", children: message.text }) });
|
|
10638
10725
|
}
|
|
@@ -10645,7 +10732,7 @@ function ChatMessage({ message, disabled, onAct, onTap, ui, slip, monitor, onGre
|
|
|
10645
10732
|
const actions = setChips ? setChips.map((c) => toActionVM({ ...c })) : message.actions;
|
|
10646
10733
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "ss-w-msg ss-w-bot", "data-msg-id": message.id, children: [
|
|
10647
10734
|
message.text && !message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Markdown, { text: message.text }) : null,
|
|
10648
|
-
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GreetingDashboard, { dashboard: message.greetingDashboard, dashboards: message.greetingDashboards, defaultSport: message.defaultSport, onTap, onSportChange: (s) => {
|
|
10735
|
+
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GreetingDashboard, { dashboard: message.greetingDashboard, dashboards: message.greetingDashboards, defaultSport: message.defaultSport, greeting: message.greeting, onTap, onSportChange: (s) => {
|
|
10649
10736
|
setSport(s);
|
|
10650
10737
|
onGreetingSport?.(s);
|
|
10651
10738
|
}, ui, slip, onAct }) : null,
|
|
@@ -10686,11 +10773,11 @@ function turnAnchor(messages) {
|
|
|
10686
10773
|
function MessageList({ controller, ui, slip, onDashboardTap, monitor, onGreetingSport }) {
|
|
10687
10774
|
const { state, send } = controller;
|
|
10688
10775
|
const { oddsFormat } = useOddsSettings();
|
|
10689
|
-
const listRef = (0,
|
|
10690
|
-
const endRef = (0,
|
|
10691
|
-
const pinnedRef = (0,
|
|
10692
|
-
const anchoredTurnRef = (0,
|
|
10693
|
-
(0,
|
|
10776
|
+
const listRef = (0, import_react67.useRef)(null);
|
|
10777
|
+
const endRef = (0, import_react67.useRef)(null);
|
|
10778
|
+
const pinnedRef = (0, import_react67.useRef)(true);
|
|
10779
|
+
const anchoredTurnRef = (0, import_react67.useRef)(null);
|
|
10780
|
+
(0, import_react67.useEffect)(() => {
|
|
10694
10781
|
const anchor = turnAnchor(state.messages);
|
|
10695
10782
|
const list = listRef.current;
|
|
10696
10783
|
if (anchor && anchor.turnId !== anchoredTurnRef.current) {
|
|
@@ -10749,13 +10836,13 @@ function MessageList({ controller, ui, slip, onDashboardTap, monitor, onGreeting
|
|
|
10749
10836
|
}
|
|
10750
10837
|
|
|
10751
10838
|
// src/components/ChatInput.tsx
|
|
10752
|
-
var
|
|
10839
|
+
var import_react68 = require("react");
|
|
10753
10840
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
10754
|
-
var ChatInput = (0,
|
|
10755
|
-
const [value, setValue] = (0,
|
|
10756
|
-
const textareaRef = (0,
|
|
10757
|
-
const stopRef = (0,
|
|
10758
|
-
const textBoxWantsFocusRef = (0,
|
|
10841
|
+
var ChatInput = (0, import_react68.forwardRef)(function ChatInput2({ placeholder, streaming, onSend, onStop, stopLabel, sendLabel, disabled = false }, ref) {
|
|
10842
|
+
const [value, setValue] = (0, import_react68.useState)("");
|
|
10843
|
+
const textareaRef = (0, import_react68.useRef)(null);
|
|
10844
|
+
const stopRef = (0, import_react68.useRef)(null);
|
|
10845
|
+
const textBoxWantsFocusRef = (0, import_react68.useRef)(false);
|
|
10759
10846
|
const submit = () => {
|
|
10760
10847
|
if (disabled) return;
|
|
10761
10848
|
const t = value.trim();
|
|
@@ -10769,7 +10856,7 @@ var ChatInput = (0, import_react64.forwardRef)(function ChatInput2({ placeholder
|
|
|
10769
10856
|
submit();
|
|
10770
10857
|
}
|
|
10771
10858
|
};
|
|
10772
|
-
(0,
|
|
10859
|
+
(0, import_react68.useImperativeHandle)(ref, () => ({
|
|
10773
10860
|
focus() {
|
|
10774
10861
|
const box = textareaRef.current;
|
|
10775
10862
|
if (box && !box.disabled) {
|
|
@@ -10781,7 +10868,7 @@ var ChatInput = (0, import_react64.forwardRef)(function ChatInput2({ placeholder
|
|
|
10781
10868
|
stopRef.current?.focus();
|
|
10782
10869
|
}
|
|
10783
10870
|
}), []);
|
|
10784
|
-
(0,
|
|
10871
|
+
(0, import_react68.useEffect)(() => {
|
|
10785
10872
|
if (streaming || disabled || !textBoxWantsFocusRef.current) return;
|
|
10786
10873
|
textBoxWantsFocusRef.current = false;
|
|
10787
10874
|
const box = textareaRef.current;
|
|
@@ -10812,9 +10899,10 @@ var ChatInput = (0, import_react64.forwardRef)(function ChatInput2({ placeholder
|
|
|
10812
10899
|
});
|
|
10813
10900
|
|
|
10814
10901
|
// src/components/TabBar.tsx
|
|
10815
|
-
var
|
|
10902
|
+
var import_react69 = require("react");
|
|
10816
10903
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
10817
|
-
var TIGHT_LEVELS = [0, 1, 2, 3, 4, 5, 6];
|
|
10904
|
+
var TIGHT_LEVELS = [0, 1, 2, 3, 4, 5, 6, 7];
|
|
10905
|
+
var FOCUS_EDGE = 24;
|
|
10818
10906
|
function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule, hasBuilder = false, gamesEnabled, clubEnabled }) {
|
|
10819
10907
|
const tabs = [
|
|
10820
10908
|
{ tab: "chat", label: ui.tabChat, count: 0, dot: monitor.chatDot },
|
|
@@ -10834,24 +10922,28 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10834
10922
|
...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : []
|
|
10835
10923
|
];
|
|
10836
10924
|
const track = useTrack();
|
|
10837
|
-
const listRef = (0,
|
|
10925
|
+
const listRef = (0, import_react69.useRef)(null);
|
|
10838
10926
|
const activeTab = monitor.activeTab;
|
|
10839
|
-
(0,
|
|
10927
|
+
(0, import_react69.useEffect)(() => {
|
|
10840
10928
|
const el = listRef.current?.querySelector("[data-on]");
|
|
10841
10929
|
if (!el || typeof el.scrollIntoView !== "function") return;
|
|
10842
10930
|
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
10843
10931
|
el.scrollIntoView({ block: "nearest", inline: "nearest", behavior: reduce ? "auto" : "smooth" });
|
|
10844
10932
|
}, [activeTab]);
|
|
10845
10933
|
const labelSignature = tabs.map((t) => `${t.tab}:${t.label}:${t.count}`).join("|");
|
|
10846
|
-
(0,
|
|
10934
|
+
(0, import_react69.useLayoutEffect)(() => {
|
|
10847
10935
|
const strip = listRef.current;
|
|
10848
10936
|
if (!strip) return;
|
|
10849
10937
|
const measure = () => {
|
|
10938
|
+
strip.removeAttribute("data-scroll");
|
|
10850
10939
|
for (const tight of TIGHT_LEVELS) {
|
|
10851
10940
|
if (tight === 0) strip.removeAttribute("data-tight");
|
|
10852
10941
|
else strip.setAttribute("data-tight", String(tight));
|
|
10853
10942
|
if (strip.scrollWidth <= strip.clientWidth) return;
|
|
10854
10943
|
}
|
|
10944
|
+
strip.setAttribute("data-scroll", "");
|
|
10945
|
+
const on = strip.querySelector("[data-on]");
|
|
10946
|
+
if (on) strip.scrollLeft = Math.max(0, on.offsetLeft - 16);
|
|
10855
10947
|
};
|
|
10856
10948
|
measure();
|
|
10857
10949
|
const fonts = typeof document !== "undefined" ? document.fonts : void 0;
|
|
@@ -10863,35 +10955,67 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10863
10955
|
fonts?.removeEventListener?.("loadingdone", measure);
|
|
10864
10956
|
};
|
|
10865
10957
|
}, [labelSignature]);
|
|
10958
|
+
const pointerDown = (0, import_react69.useRef)(false);
|
|
10959
|
+
const keepFocusedTabInView = (e) => {
|
|
10960
|
+
const strip = e.currentTarget;
|
|
10961
|
+
const tab = e.target;
|
|
10962
|
+
if (pointerDown.current) {
|
|
10963
|
+
pointerDown.current = false;
|
|
10964
|
+
return;
|
|
10965
|
+
}
|
|
10966
|
+
if (!strip.hasAttribute("data-scroll") || !(tab instanceof HTMLElement) || tab === strip) return;
|
|
10967
|
+
const left = tab.offsetLeft - FOCUS_EDGE;
|
|
10968
|
+
const right = tab.offsetLeft + tab.offsetWidth + FOCUS_EDGE - strip.clientWidth;
|
|
10969
|
+
if (strip.scrollLeft > left) strip.scrollLeft = Math.max(0, left);
|
|
10970
|
+
else if (strip.scrollLeft < right) strip.scrollLeft = right;
|
|
10971
|
+
};
|
|
10866
10972
|
if (tabs.length < 2) return null;
|
|
10867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
"
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
"aria-label": tab === "live" && count2 > 0 ? `${label} \xB7 ${ui.liveCountLabel(count2)}` : void 0,
|
|
10877
|
-
className: "ss-w-tab",
|
|
10878
|
-
onClick: () => {
|
|
10879
|
-
if (tab !== monitor.activeTab) track({ name: "tab_change", from: monitor.activeTab, to: tab });
|
|
10880
|
-
monitor.setActiveTab(tab);
|
|
10881
|
-
},
|
|
10882
|
-
children: [
|
|
10883
|
-
label,
|
|
10884
|
-
count2 > 0 && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-w-tab-count", "aria-hidden": tab === "live" ? true : void 0, children: count2 }),
|
|
10885
|
-
dot && !active && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-w-tab-dot", "aria-hidden": "true" })
|
|
10886
|
-
]
|
|
10973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10974
|
+
"div",
|
|
10975
|
+
{
|
|
10976
|
+
className: "ss-w-tabs",
|
|
10977
|
+
role: "tablist",
|
|
10978
|
+
ref: listRef,
|
|
10979
|
+
onFocus: keepFocusedTabInView,
|
|
10980
|
+
onPointerDown: () => {
|
|
10981
|
+
pointerDown.current = true;
|
|
10887
10982
|
},
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10983
|
+
onClick: () => {
|
|
10984
|
+
pointerDown.current = false;
|
|
10985
|
+
},
|
|
10986
|
+
onPointerCancel: () => {
|
|
10987
|
+
pointerDown.current = false;
|
|
10988
|
+
},
|
|
10989
|
+
children: tabs.map(({ tab, label, count: count2, dot }) => {
|
|
10990
|
+
const active = monitor.activeTab === tab;
|
|
10991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
10992
|
+
"button",
|
|
10993
|
+
{
|
|
10994
|
+
type: "button",
|
|
10995
|
+
role: "tab",
|
|
10996
|
+
"aria-selected": active,
|
|
10997
|
+
"data-on": active ? "" : void 0,
|
|
10998
|
+
"aria-label": tab === "live" && count2 > 0 ? `${label} \xB7 ${ui.liveCountLabel(count2)}` : void 0,
|
|
10999
|
+
className: "ss-w-tab",
|
|
11000
|
+
onClick: () => {
|
|
11001
|
+
if (tab !== monitor.activeTab) track({ name: "tab_change", from: monitor.activeTab, to: tab });
|
|
11002
|
+
monitor.setActiveTab(tab);
|
|
11003
|
+
},
|
|
11004
|
+
children: [
|
|
11005
|
+
label,
|
|
11006
|
+
count2 > 0 && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-w-tab-count", "aria-hidden": tab === "live" ? true : void 0, children: count2 }),
|
|
11007
|
+
dot && !active && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "ss-w-tab-dot", "aria-hidden": "true" })
|
|
11008
|
+
]
|
|
11009
|
+
},
|
|
11010
|
+
tab
|
|
11011
|
+
);
|
|
11012
|
+
})
|
|
11013
|
+
}
|
|
11014
|
+
);
|
|
10891
11015
|
}
|
|
10892
11016
|
|
|
10893
11017
|
// src/components/MonitorTabs.tsx
|
|
10894
|
-
var
|
|
11018
|
+
var import_react81 = require("react");
|
|
10895
11019
|
|
|
10896
11020
|
// src/components/MarketAccordion.tsx
|
|
10897
11021
|
var import_widget_sdk24 = require("@sensiblestats/widget-sdk");
|
|
@@ -10953,7 +11077,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
10953
11077
|
}
|
|
10954
11078
|
|
|
10955
11079
|
// src/components/MonitorFormH2H.tsx
|
|
10956
|
-
var
|
|
11080
|
+
var import_react70 = require("react");
|
|
10957
11081
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
10958
11082
|
function resultClass2(result) {
|
|
10959
11083
|
if (result === "W") return "ss-w-h2h-result--win";
|
|
@@ -10969,7 +11093,7 @@ function FormDots({ form, ui }) {
|
|
|
10969
11093
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "ss-w-h2h-dots", children: form.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: `ss-w-h2h-result ${resultClass2(m.result)}`, children: resultLabel(m.result, ui) }, i)) });
|
|
10970
11094
|
}
|
|
10971
11095
|
function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
10972
|
-
const [expanded, setExpanded] = (0,
|
|
11096
|
+
const [expanded, setExpanded] = (0, import_react70.useState)(false);
|
|
10973
11097
|
const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
|
|
10974
11098
|
if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
|
|
10975
11099
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, {});
|
|
@@ -11196,7 +11320,7 @@ function MonitorSkeleton({ pin, monitor, ui }) {
|
|
|
11196
11320
|
}
|
|
11197
11321
|
|
|
11198
11322
|
// src/components/NbaMonitorCard.tsx
|
|
11199
|
-
var
|
|
11323
|
+
var import_react74 = require("react");
|
|
11200
11324
|
|
|
11201
11325
|
// src/sportLabel.ts
|
|
11202
11326
|
var CODE = { football: "football", basketball: "nba", nba: "nba", americanfootball: "nfl", nfl: "nfl", tennis: "tennis" };
|
|
@@ -11206,7 +11330,7 @@ var sportLabel = (ui, sport) => {
|
|
|
11206
11330
|
};
|
|
11207
11331
|
|
|
11208
11332
|
// src/components/NbaFormSection.tsx
|
|
11209
|
-
var
|
|
11333
|
+
var import_react71 = require("react");
|
|
11210
11334
|
|
|
11211
11335
|
// src/components/NbaFormRest.tsx
|
|
11212
11336
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
@@ -11305,8 +11429,8 @@ function Row2({ game, abbr, tonight, ui }) {
|
|
|
11305
11429
|
] });
|
|
11306
11430
|
}
|
|
11307
11431
|
function NbaFormSection({ match, monitor, ui }) {
|
|
11308
|
-
const [open, setOpen] = (0,
|
|
11309
|
-
const [side, setSide] = (0,
|
|
11432
|
+
const [open, setOpen] = (0, import_react71.useState)(false);
|
|
11433
|
+
const [side, setSide] = (0, import_react71.useState)("away");
|
|
11310
11434
|
const form = useNbaForm(match, monitor);
|
|
11311
11435
|
const b = match.basketball;
|
|
11312
11436
|
if (!form || !b || !form.home && !form.away) return null;
|
|
@@ -11348,10 +11472,10 @@ function NbaFormSection({ match, monitor, ui }) {
|
|
|
11348
11472
|
}
|
|
11349
11473
|
|
|
11350
11474
|
// src/components/NbaPropsSection.tsx
|
|
11351
|
-
var
|
|
11475
|
+
var import_react73 = require("react");
|
|
11352
11476
|
|
|
11353
11477
|
// src/components/PropsPieces.tsx
|
|
11354
|
-
var
|
|
11478
|
+
var import_react72 = require("react");
|
|
11355
11479
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
11356
11480
|
var livePlayer = (bundle, p) => bundle.live === true || !p.live && !p.nflLive ? p : { ...p, live: null, nflLive: null };
|
|
11357
11481
|
var hasLiveLine = (p) => p.live != null || p.nflLive != null;
|
|
@@ -11364,9 +11488,9 @@ function preKickoff(match) {
|
|
|
11364
11488
|
return Number.isFinite(kickoff) && Date.now() < kickoff;
|
|
11365
11489
|
}
|
|
11366
11490
|
function usePreKickoff(match) {
|
|
11367
|
-
const [, setTick] = (0,
|
|
11491
|
+
const [, setTick] = (0, import_react72.useState)(0);
|
|
11368
11492
|
const pre = preKickoff(match);
|
|
11369
|
-
(0,
|
|
11493
|
+
(0, import_react72.useEffect)(() => {
|
|
11370
11494
|
if (!pre || !match.kickoffUtc) return;
|
|
11371
11495
|
const wait = Math.min(Math.max(Date.parse(match.kickoffUtc) - Date.now(), 0), MAX_TIMER_MS);
|
|
11372
11496
|
const id = setTimeout(() => setTick((t) => t + 1), wait);
|
|
@@ -11380,7 +11504,7 @@ function usePropsOpen(match, monitor, descriptor) {
|
|
|
11380
11504
|
const pre = descriptor.sport === "basketball" ? match.phase === "preMatch" : beforeKickoff;
|
|
11381
11505
|
const live = match.phase === "live";
|
|
11382
11506
|
const open = pre || live;
|
|
11383
|
-
(0,
|
|
11507
|
+
(0, import_react72.useEffect)(() => {
|
|
11384
11508
|
if (!open) return;
|
|
11385
11509
|
if (sport) monitor.loadPlayerProps?.(match.matchId, sport);
|
|
11386
11510
|
else monitor.loadPlayerProps?.(match.matchId);
|
|
@@ -11458,7 +11582,7 @@ function PropBars({ bars, line, title, wide, ui, note }) {
|
|
|
11458
11582
|
function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
|
|
11459
11583
|
const player = livePlayer(bundle, given);
|
|
11460
11584
|
const stats = descriptor.stats.map((k) => player.stats.find((s) => s.stat === k)).filter((s) => s != null);
|
|
11461
|
-
const [picked, setPicked] = (0,
|
|
11585
|
+
const [picked, setPicked] = (0, import_react72.useState)(null);
|
|
11462
11586
|
const active = stats.find((s) => s.stat === picked) ?? stats[0];
|
|
11463
11587
|
const sample = active?.games?.length ?? 0;
|
|
11464
11588
|
const hitsOf = (price, text2) => descriptor.showHits && sample > 0 && price.hits != null ? text2(price.hits) : null;
|
|
@@ -11507,8 +11631,8 @@ function PropPlayerPanel({ player: given, bundle, descriptor, ui, slip }) {
|
|
|
11507
11631
|
] });
|
|
11508
11632
|
}
|
|
11509
11633
|
function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
|
|
11510
|
-
const [openId, setOpenId] = (0,
|
|
11511
|
-
const [brokenShots, setBrokenShots] = (0,
|
|
11634
|
+
const [openId, setOpenId] = (0, import_react72.useState)(null);
|
|
11635
|
+
const [brokenShots, setBrokenShots] = (0, import_react72.useState)(/* @__PURE__ */ new Set());
|
|
11512
11636
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ss-w-props-list", children: players.map((given) => {
|
|
11513
11637
|
const p = livePlayer(bundle, given);
|
|
11514
11638
|
const isOpen = openId === p.playerId;
|
|
@@ -11554,12 +11678,12 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
|
|
|
11554
11678
|
}
|
|
11555
11679
|
var BOX_QUIET_MS = 12e4;
|
|
11556
11680
|
function StatsClock({ boxAsOfUtc, match, live, atBreak: atBreak2, ago, ui }) {
|
|
11557
|
-
const [tick, setTick] = (0,
|
|
11681
|
+
const [tick, setTick] = (0, import_react72.useState)(0);
|
|
11558
11682
|
const time = clock2(boxAsOfUtc, ui);
|
|
11559
11683
|
const at2 = time === "" ? Number.NaN : Date.parse(boxAsOfUtc);
|
|
11560
11684
|
const valid = !Number.isNaN(at2);
|
|
11561
11685
|
const onBreak = atBreak(match);
|
|
11562
|
-
(0,
|
|
11686
|
+
(0, import_react72.useEffect)(() => {
|
|
11563
11687
|
if (!valid || onBreak) return;
|
|
11564
11688
|
const age2 = Date.now() - at2;
|
|
11565
11689
|
const wait = age2 < BOX_QUIET_MS ? BOX_QUIET_MS - age2 : 6e4 - age2 % 6e4;
|
|
@@ -11620,12 +11744,12 @@ var nbaDescriptor = (ui, match) => ({
|
|
|
11620
11744
|
tenGameBars: false
|
|
11621
11745
|
});
|
|
11622
11746
|
function StatsClock2({ bundle, match, ui }) {
|
|
11623
|
-
const [tick, setTick] = (0,
|
|
11747
|
+
const [tick, setTick] = (0, import_react73.useState)(0);
|
|
11624
11748
|
const at2 = bundle.live === true && bundle.boxAsOfUtc ? Date.parse(bundle.boxAsOfUtc) : Number.NaN;
|
|
11625
11749
|
const time = clock2(bundle.boxAsOfUtc, ui);
|
|
11626
11750
|
const valid = !Number.isNaN(at2) && time !== "";
|
|
11627
11751
|
const onBreak = atBreak(match);
|
|
11628
|
-
(0,
|
|
11752
|
+
(0, import_react73.useEffect)(() => {
|
|
11629
11753
|
if (!valid || onBreak) return;
|
|
11630
11754
|
const age2 = Date.now() - at2;
|
|
11631
11755
|
const wait = age2 < BOX_QUIET_MS2 ? BOX_QUIET_MS2 - age2 : 6e4 - age2 % 6e4;
|
|
@@ -11639,7 +11763,7 @@ function StatsClock2({ bundle, match, ui }) {
|
|
|
11639
11763
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ss-w-props-asof ss-w-props-asof--live", children: ui.nba.propsStatsLive(time) });
|
|
11640
11764
|
}
|
|
11641
11765
|
function NbaPropsSection({ match, monitor, ui, slip }) {
|
|
11642
|
-
const [side, setSide] = (0,
|
|
11766
|
+
const [side, setSide] = (0, import_react73.useState)("home");
|
|
11643
11767
|
const descriptor = nbaDescriptor(ui, match);
|
|
11644
11768
|
const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
|
|
11645
11769
|
if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
|
|
@@ -11677,7 +11801,7 @@ function city(teamName, nickname) {
|
|
|
11677
11801
|
return name.slice(0, name.length - nickname.length).trim() || null;
|
|
11678
11802
|
}
|
|
11679
11803
|
function BadgeCrest({ url, abbreviation }) {
|
|
11680
|
-
const [failed, setFailed] = (0,
|
|
11804
|
+
const [failed, setFailed] = (0, import_react74.useState)(false);
|
|
11681
11805
|
if (url && !failed) {
|
|
11682
11806
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("img", { className: "ss-w-nbamon-badge ss-w-nbamon-badge--img", src: url, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
11683
11807
|
}
|
|
@@ -11795,7 +11919,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
|
|
|
11795
11919
|
}
|
|
11796
11920
|
|
|
11797
11921
|
// src/components/NflFormSection.tsx
|
|
11798
|
-
var
|
|
11922
|
+
var import_react75 = require("react");
|
|
11799
11923
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
11800
11924
|
var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
|
|
11801
11925
|
var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
|
|
@@ -11847,7 +11971,7 @@ function H2hRow({ game, home, ui }) {
|
|
|
11847
11971
|
] });
|
|
11848
11972
|
}
|
|
11849
11973
|
function NflFormSection({ match, monitor, ui }) {
|
|
11850
|
-
const [segment, setSegment] = (0,
|
|
11974
|
+
const [segment, setSegment] = (0, import_react75.useState)("away");
|
|
11851
11975
|
const { live, open } = usePropsOpen(match, monitor, { sport: "americanfootball" });
|
|
11852
11976
|
const bundle = monitor.playerProps?.[monitorMatchKey("americanfootball", match.matchId)]?.bundle;
|
|
11853
11977
|
const form = bundle?.form;
|
|
@@ -11880,7 +12004,7 @@ function NflFormSection({ match, monitor, ui }) {
|
|
|
11880
12004
|
}
|
|
11881
12005
|
|
|
11882
12006
|
// src/components/NflPropsSection.tsx
|
|
11883
|
-
var
|
|
12007
|
+
var import_react76 = require("react");
|
|
11884
12008
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
11885
12009
|
var TRENDS_SHOWN = 3;
|
|
11886
12010
|
var SCORERS_SHOWN = 8;
|
|
@@ -11953,7 +12077,7 @@ function ShowMore({ label, onClick }) {
|
|
|
11953
12077
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("button", { type: "button", className: "ss-w-props-more", onClick, children: label });
|
|
11954
12078
|
}
|
|
11955
12079
|
function Trends({ bundle, facts, descriptor, ui, slip }) {
|
|
11956
|
-
const [all, setAll] = (0,
|
|
12080
|
+
const [all, setAll] = (0, import_react76.useState)(false);
|
|
11957
12081
|
const shown2 = all ? facts : facts.slice(0, TRENDS_SHOWN);
|
|
11958
12082
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("section", { className: "ss-w-props ss-w-props-trends", lang: ui.locale, children: [
|
|
11959
12083
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ss-w-props-head", children: ui.nfl.propsTrends }),
|
|
@@ -11986,7 +12110,7 @@ function Trends({ bundle, facts, descriptor, ui, slip }) {
|
|
|
11986
12110
|
] });
|
|
11987
12111
|
}
|
|
11988
12112
|
function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
|
|
11989
|
-
const [all, setAll] = (0,
|
|
12113
|
+
const [all, setAll] = (0, import_react76.useState)(false);
|
|
11990
12114
|
const shown2 = all ? scorers : scorers.slice(0, SCORERS_SHOWN);
|
|
11991
12115
|
const cell2 = (name, column, price, stat) => price && stat ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(PropPrice, { price, label: "", ariaName: `${name}, ${column}`, player: name, stat, bundle, descriptor, ui, slip }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "ss-w-props-scorer-none", children: "\u2014" });
|
|
11992
12116
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "ss-w-props-scorers", children: [
|
|
@@ -12016,7 +12140,7 @@ function Scorers({ bundle, scorers, abbreviations, descriptor, ui, slip }) {
|
|
|
12016
12140
|
] });
|
|
12017
12141
|
}
|
|
12018
12142
|
function NflPropsSection({ match, monitor, ui, slip }) {
|
|
12019
|
-
const [tab, setTab] = (0,
|
|
12143
|
+
const [tab, setTab] = (0, import_react76.useState)(null);
|
|
12020
12144
|
const descriptor = nflDescriptor(ui);
|
|
12021
12145
|
const { bundle, live, open } = usePropsOpen(match, monitor, descriptor);
|
|
12022
12146
|
if (!open || !bundle || bundle.players.length === 0 || (bundle.live ?? false) !== live) return null;
|
|
@@ -12202,14 +12326,14 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
12202
12326
|
}
|
|
12203
12327
|
|
|
12204
12328
|
// src/components/TennisMonitorCard.tsx
|
|
12205
|
-
var
|
|
12329
|
+
var import_react79 = require("react");
|
|
12206
12330
|
var import_widget_sdk27 = require("@sensiblestats/widget-sdk");
|
|
12207
12331
|
|
|
12208
12332
|
// src/components/TennisFixtureRow.tsx
|
|
12209
12333
|
var import_widget_sdk26 = require("@sensiblestats/widget-sdk");
|
|
12210
12334
|
|
|
12211
12335
|
// src/components/FixtureRow.tsx
|
|
12212
|
-
var
|
|
12336
|
+
var import_react77 = require("react");
|
|
12213
12337
|
var import_widget_sdk25 = require("@sensiblestats/widget-sdk");
|
|
12214
12338
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
12215
12339
|
function splitAtFirstSpace(label) {
|
|
@@ -12223,7 +12347,7 @@ function kickoffLabel(kickoffUnix, tag2, clock3, timeZone) {
|
|
|
12223
12347
|
return formatTime(kickoffUnix * 1e3, tag2, clock3, { timeZone });
|
|
12224
12348
|
}
|
|
12225
12349
|
function Side2({ name, crest, abbr, away = false }) {
|
|
12226
|
-
const [failed, setFailed] = (0,
|
|
12350
|
+
const [failed, setFailed] = (0, import_react77.useState)(false);
|
|
12227
12351
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: away ? "ss-w-drow-side ss-w-drow-side--away" : "ss-w-drow-side", children: [
|
|
12228
12352
|
crest && !failed ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("img", { className: abbr ? "ss-w-drow-crest ss-w-drow-crest--wide" : "ss-w-drow-crest", src: crest, alt: "", onError: () => setFailed(true) }) : abbr ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-w-drow-crest ss-w-drow-crest--abbr", children: abbr }) : null,
|
|
12229
12353
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "ss-w-drow-nm", children: name })
|
|
@@ -12465,7 +12589,7 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
|
|
|
12465
12589
|
}
|
|
12466
12590
|
|
|
12467
12591
|
// src/components/TennisStatsTables.tsx
|
|
12468
|
-
var
|
|
12592
|
+
var import_react78 = require("react");
|
|
12469
12593
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
12470
12594
|
function formatStat(row, value, locale) {
|
|
12471
12595
|
if (value == null) return "\u2013";
|
|
@@ -12503,8 +12627,8 @@ function Tables({ table, labels, names, locale }) {
|
|
|
12503
12627
|
] });
|
|
12504
12628
|
}
|
|
12505
12629
|
function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey }) {
|
|
12506
|
-
const [tab, setTab] = (0,
|
|
12507
|
-
(0,
|
|
12630
|
+
const [tab, setTab] = (0, import_react78.useState)("match");
|
|
12631
|
+
(0, import_react78.useEffect)(() => {
|
|
12508
12632
|
setTab("match");
|
|
12509
12633
|
}, [resetKey]);
|
|
12510
12634
|
const sets = serveReturn.sets.filter((s) => s.table.serve.length + s.table.return.length > 0);
|
|
@@ -12535,7 +12659,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
|
|
|
12535
12659
|
] }),
|
|
12536
12660
|
today.rows.map((r) => {
|
|
12537
12661
|
const f = (v) => formatStat({ kind: "pct" }, v, locale);
|
|
12538
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
12662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_react78.Fragment, { children: [
|
|
12539
12663
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "ss-w-ts-l", children: r.label }),
|
|
12540
12664
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "ss-w-ts-today-v ss-w-ts-today-v--a", children: [
|
|
12541
12665
|
f(r.p1Today),
|
|
@@ -12670,7 +12794,7 @@ function HeadToHead({ t, ui }) {
|
|
|
12670
12794
|
] });
|
|
12671
12795
|
}
|
|
12672
12796
|
function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
|
|
12673
|
-
const lastTables = (0,
|
|
12797
|
+
const lastTables = (0, import_react79.useRef)(null);
|
|
12674
12798
|
const t = match.tennis;
|
|
12675
12799
|
if (!t) return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UnavailableCard, { match, monitor, ui, sport: "tennis" });
|
|
12676
12800
|
const preMatch = match.phase === "preMatch";
|
|
@@ -12750,7 +12874,7 @@ function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
|
|
|
12750
12874
|
}
|
|
12751
12875
|
|
|
12752
12876
|
// src/components/ScoreboardStrip.tsx
|
|
12753
|
-
var
|
|
12877
|
+
var import_react80 = require("react");
|
|
12754
12878
|
var import_widget_sdk28 = require("@sensiblestats/widget-sdk");
|
|
12755
12879
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
12756
12880
|
function nbaStatus(m, ui) {
|
|
@@ -12845,8 +12969,8 @@ function rowsFor(m) {
|
|
|
12845
12969
|
];
|
|
12846
12970
|
}
|
|
12847
12971
|
function useStripScroll(selectedKey) {
|
|
12848
|
-
const stripRef = (0,
|
|
12849
|
-
(0,
|
|
12972
|
+
const stripRef = (0, import_react80.useRef)(null);
|
|
12973
|
+
(0, import_react80.useEffect)(() => {
|
|
12850
12974
|
const strip = stripRef.current;
|
|
12851
12975
|
const pressed = strip?.querySelector('[aria-pressed="true"]');
|
|
12852
12976
|
if (!strip || !pressed) return;
|
|
@@ -13020,7 +13144,7 @@ function OddsLiveStrip({ m, ui }) {
|
|
|
13020
13144
|
] });
|
|
13021
13145
|
}
|
|
13022
13146
|
function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
13023
|
-
const seedIndex = (0,
|
|
13147
|
+
const seedIndex = (0, import_react81.useMemo)(() => buildSeedIndex(discovery?.groups ?? []), [discovery?.groups]);
|
|
13024
13148
|
const tiles = orderTiles(
|
|
13025
13149
|
monitor.pins,
|
|
13026
13150
|
monitor.snapshot,
|
|
@@ -13092,7 +13216,7 @@ function TrendsPanel({ monitor, ui, slip }) {
|
|
|
13092
13216
|
}
|
|
13093
13217
|
|
|
13094
13218
|
// src/components/LivePanel.tsx
|
|
13095
|
-
var
|
|
13219
|
+
var import_react84 = require("react");
|
|
13096
13220
|
var import_widget_sdk35 = require("@sensiblestats/widget-sdk");
|
|
13097
13221
|
|
|
13098
13222
|
// src/scheduleView.ts
|
|
@@ -13267,20 +13391,20 @@ function LeagueGroup({ view, open, onToggle, disambiguate, rowCap, onShowAll, on
|
|
|
13267
13391
|
}
|
|
13268
13392
|
|
|
13269
13393
|
// src/components/MatchSheet.tsx
|
|
13270
|
-
var
|
|
13394
|
+
var import_react83 = require("react");
|
|
13271
13395
|
var import_widget_sdk33 = require("@sensiblestats/widget-sdk");
|
|
13272
13396
|
|
|
13273
13397
|
// src/useModalDialog.ts
|
|
13274
|
-
var
|
|
13398
|
+
var import_react82 = require("react");
|
|
13275
13399
|
var FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
13276
13400
|
function useModalDialog(onClose, opts = {}) {
|
|
13277
|
-
const dialogRef = (0,
|
|
13278
|
-
const onCloseRef = (0,
|
|
13401
|
+
const dialogRef = (0, import_react82.useRef)(null);
|
|
13402
|
+
const onCloseRef = (0, import_react82.useRef)(onClose);
|
|
13279
13403
|
onCloseRef.current = onClose;
|
|
13280
|
-
const openerRef = (0,
|
|
13404
|
+
const openerRef = (0, import_react82.useRef)(opts.opener);
|
|
13281
13405
|
openerRef.current = opts.opener;
|
|
13282
13406
|
const restore = opts.restoreFocus ?? true;
|
|
13283
|
-
(0,
|
|
13407
|
+
(0, import_react82.useEffect)(() => {
|
|
13284
13408
|
const dialog = dialogRef.current;
|
|
13285
13409
|
const root = dialog?.getRootNode();
|
|
13286
13410
|
const focusedAtMount = root?.activeElement ?? null;
|
|
@@ -13291,7 +13415,7 @@ function useModalDialog(onClose, opts = {}) {
|
|
|
13291
13415
|
if (target instanceof HTMLElement) target.focus({ preventScroll: true });
|
|
13292
13416
|
};
|
|
13293
13417
|
}, []);
|
|
13294
|
-
(0,
|
|
13418
|
+
(0, import_react82.useEffect)(() => {
|
|
13295
13419
|
const onKey = (e) => {
|
|
13296
13420
|
if (e.key !== "Escape") return;
|
|
13297
13421
|
e.stopPropagation();
|
|
@@ -13332,8 +13456,8 @@ function kickoffDate(kickoffUnix, lang, timeZone) {
|
|
|
13332
13456
|
function MatchSheet({ match, league, state, stale, ui, monitor, onAsk, onClose, opener }) {
|
|
13333
13457
|
const { dialogRef, onKeyDown } = useModalDialog(onClose, { opener });
|
|
13334
13458
|
const log = useEventLog();
|
|
13335
|
-
const titleId = (0,
|
|
13336
|
-
const [limitHit, setLimitHit] = (0,
|
|
13459
|
+
const titleId = (0, import_react83.useId)();
|
|
13460
|
+
const [limitHit, setLimitHit] = (0, import_react83.useState)(false);
|
|
13337
13461
|
const pinSport = (0, import_widget_sdk33.slipSportOf)(match.sport);
|
|
13338
13462
|
const tour = pinSport === "tennis" && isKnownTour(match.tour) ? match.tour : void 0;
|
|
13339
13463
|
const followable = pinSport !== "tennis" || tour !== void 0;
|
|
@@ -13434,10 +13558,10 @@ var OPEN_TOP_GROUPS = 2;
|
|
|
13434
13558
|
var QUIET_ROWS = 4;
|
|
13435
13559
|
function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
|
|
13436
13560
|
const { groups, states, stale } = discovery;
|
|
13437
|
-
const [mine, setMine] = (0,
|
|
13438
|
-
const [toggled, setToggled] = (0,
|
|
13439
|
-
const [sheet, setSheet] = (0,
|
|
13440
|
-
const pinnedKeys = (0,
|
|
13561
|
+
const [mine, setMine] = (0, import_react84.useState)(false);
|
|
13562
|
+
const [toggled, setToggled] = (0, import_react84.useState)(/* @__PURE__ */ new Map());
|
|
13563
|
+
const [sheet, setSheet] = (0, import_react84.useState)(null);
|
|
13564
|
+
const pinnedKeys = (0, import_react84.useMemo)(
|
|
13441
13565
|
() => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk35.matchKey)(p.sport, p.matchId, p.tour))),
|
|
13442
13566
|
[monitor.pins]
|
|
13443
13567
|
);
|
|
@@ -13543,20 +13667,20 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
|
|
|
13543
13667
|
}
|
|
13544
13668
|
|
|
13545
13669
|
// src/components/ScheduleMatchesPanel.tsx
|
|
13546
|
-
var
|
|
13670
|
+
var import_react88 = require("react");
|
|
13547
13671
|
var import_widget_sdk37 = require("@sensiblestats/widget-sdk");
|
|
13548
13672
|
|
|
13549
13673
|
// src/useTennisRowPrices.ts
|
|
13550
|
-
var
|
|
13674
|
+
var import_react85 = require("react");
|
|
13551
13675
|
var import_widget_sdk36 = require("@sensiblestats/widget-sdk");
|
|
13552
13676
|
var TENNIS_PRICE_POLL_MS = 6e4;
|
|
13553
13677
|
function useTennisRowPrices(a) {
|
|
13554
|
-
const [state, setState] = (0,
|
|
13555
|
-
const getPricesRef = (0,
|
|
13678
|
+
const [state, setState] = (0, import_react85.useState)({ byId: null, stale: false });
|
|
13679
|
+
const getPricesRef = (0, import_react85.useRef)(a.getPrices);
|
|
13556
13680
|
getPricesRef.current = a.getPrices;
|
|
13557
|
-
const latest = (0,
|
|
13681
|
+
const latest = (0, import_react85.useRef)(0);
|
|
13558
13682
|
const idsKey = a.keys.filter((k) => isKnownTour(k.tour)).slice(0, MAX_TENNIS_KEYS).map((k) => `${k.tour}:${k.matchId}`).sort().join(",");
|
|
13559
|
-
(0,
|
|
13683
|
+
(0, import_react85.useEffect)(() => {
|
|
13560
13684
|
if (!a.enabled || idsKey === "") {
|
|
13561
13685
|
latest.current++;
|
|
13562
13686
|
setState((prev) => prev.byId === null && !prev.stale ? prev : { byId: null, stale: false });
|
|
@@ -13594,11 +13718,11 @@ function useTennisRowPrices(a) {
|
|
|
13594
13718
|
}
|
|
13595
13719
|
|
|
13596
13720
|
// src/components/DayStrip.tsx
|
|
13597
|
-
var
|
|
13721
|
+
var import_react86 = require("react");
|
|
13598
13722
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
13599
13723
|
function DayStrip({ chips, selected, onSelect, ui, locale }) {
|
|
13600
|
-
const listRef = (0,
|
|
13601
|
-
(0,
|
|
13724
|
+
const listRef = (0, import_react86.useRef)(null);
|
|
13725
|
+
(0, import_react86.useEffect)(() => {
|
|
13602
13726
|
const el = listRef.current?.querySelector('[aria-pressed="true"]');
|
|
13603
13727
|
if (!el || typeof el.scrollIntoView !== "function") return;
|
|
13604
13728
|
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -13627,7 +13751,7 @@ function DayStrip({ chips, selected, onSelect, ui, locale }) {
|
|
|
13627
13751
|
}
|
|
13628
13752
|
|
|
13629
13753
|
// src/components/games/ui/SearchField.tsx
|
|
13630
|
-
var
|
|
13754
|
+
var import_react87 = require("react");
|
|
13631
13755
|
|
|
13632
13756
|
// src/components/games/ui/icons.tsx
|
|
13633
13757
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
@@ -13666,8 +13790,8 @@ var IconFlame = ({ size = 16 }) => svg(size, /* @__PURE__ */ (0, import_jsx_runt
|
|
|
13666
13790
|
// src/components/games/ui/SearchField.tsx
|
|
13667
13791
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
13668
13792
|
function SearchField({ id, label, labelHidden = false, placeholder, value, onChange, disabled, inputRef, onKeyDown, clearLabel }) {
|
|
13669
|
-
const localRef = (0,
|
|
13670
|
-
const setInputRef = (0,
|
|
13793
|
+
const localRef = (0, import_react87.useRef)(null);
|
|
13794
|
+
const setInputRef = (0, import_react87.useCallback)((node) => {
|
|
13671
13795
|
localRef.current = node;
|
|
13672
13796
|
if (typeof inputRef === "function") inputRef(node);
|
|
13673
13797
|
else if (inputRef) inputRef.current = node;
|
|
@@ -13713,18 +13837,18 @@ var TOP_ROW_CAP = 3;
|
|
|
13713
13837
|
var SKELETON_ROWS = 3;
|
|
13714
13838
|
function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport, day, onDay, loaded, onOpenLive, onAsk, locale, getTennisPrices, slip }) {
|
|
13715
13839
|
const { localDate: today, states, stale } = discovery;
|
|
13716
|
-
const searchId = (0,
|
|
13717
|
-
const [query, setQuery] = (0,
|
|
13718
|
-
const [toggled, setToggled] = (0,
|
|
13719
|
-
const [expanded, setExpanded] = (0,
|
|
13720
|
-
const listRef = (0,
|
|
13721
|
-
const [sheet, setSheet] = (0,
|
|
13840
|
+
const searchId = (0, import_react88.useId)();
|
|
13841
|
+
const [query, setQuery] = (0, import_react88.useState)("");
|
|
13842
|
+
const [toggled, setToggled] = (0, import_react88.useState)(/* @__PURE__ */ new Map());
|
|
13843
|
+
const [expanded, setExpanded] = (0, import_react88.useState)(/* @__PURE__ */ new Set());
|
|
13844
|
+
const listRef = (0, import_react88.useRef)(null);
|
|
13845
|
+
const [sheet, setSheet] = (0, import_react88.useState)(null);
|
|
13722
13846
|
const { chips, selected } = loaded;
|
|
13723
|
-
(0,
|
|
13847
|
+
(0, import_react88.useEffect)(() => {
|
|
13724
13848
|
if (selected !== day) onDay(selected);
|
|
13725
13849
|
}, [day, selected, onDay]);
|
|
13726
13850
|
const isToday = selected === today;
|
|
13727
|
-
const pinnedKeys = (0,
|
|
13851
|
+
const pinnedKeys = (0, import_react88.useMemo)(
|
|
13728
13852
|
() => new Set(monitor.pins.filter((p) => p.kind === "match").map((p) => (0, import_widget_sdk37.matchKey)(p.sport, p.matchId, p.tour))),
|
|
13729
13853
|
[monitor.pins]
|
|
13730
13854
|
);
|
|
@@ -13862,7 +13986,7 @@ function ScheduleMatchesPanel({ discovery, ui, monitor, sport, offered, onSport,
|
|
|
13862
13986
|
}
|
|
13863
13987
|
|
|
13864
13988
|
// src/components/GamesPanel.tsx
|
|
13865
|
-
var
|
|
13989
|
+
var import_react103 = require("react");
|
|
13866
13990
|
|
|
13867
13991
|
// src/components/GamesLoginWall.tsx
|
|
13868
13992
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
@@ -13871,7 +13995,7 @@ function GamesLoginWall({ ui }) {
|
|
|
13871
13995
|
}
|
|
13872
13996
|
|
|
13873
13997
|
// src/components/GamesHub.tsx
|
|
13874
|
-
var
|
|
13998
|
+
var import_react89 = require("react");
|
|
13875
13999
|
|
|
13876
14000
|
// src/components/games/ui/gameMeta.ts
|
|
13877
14001
|
function prettifyGameId(gameId) {
|
|
@@ -14022,8 +14146,8 @@ function pickHeroGame(games) {
|
|
|
14022
14146
|
}
|
|
14023
14147
|
var tileKey = (g) => `${g.gameId}-${g.gameDay}-${g.fixtureId}`;
|
|
14024
14148
|
function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
14025
|
-
const [, setTick] = (0,
|
|
14026
|
-
(0,
|
|
14149
|
+
const [, setTick] = (0, import_react89.useState)(0);
|
|
14150
|
+
(0, import_react89.useEffect)(() => {
|
|
14027
14151
|
const id = setInterval(() => setTick((t) => t + 1), 6e4);
|
|
14028
14152
|
return () => clearInterval(id);
|
|
14029
14153
|
}, []);
|
|
@@ -14083,10 +14207,10 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
14083
14207
|
}
|
|
14084
14208
|
|
|
14085
14209
|
// src/components/GameScreenHost.tsx
|
|
14086
|
-
var
|
|
14210
|
+
var import_react101 = require("react");
|
|
14087
14211
|
|
|
14088
14212
|
// src/useGamePlay.ts
|
|
14089
|
-
var
|
|
14213
|
+
var import_react90 = require("react");
|
|
14090
14214
|
function toSubmitResult(payload) {
|
|
14091
14215
|
return {
|
|
14092
14216
|
// 'pending' means the play is recorded but awaiting resolution (fixture games)
|
|
@@ -14098,17 +14222,17 @@ function toSubmitResult(payload) {
|
|
|
14098
14222
|
};
|
|
14099
14223
|
}
|
|
14100
14224
|
function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh }) {
|
|
14101
|
-
const [result, setResult] = (0,
|
|
14102
|
-
const [submitting, setSubmitting] = (0,
|
|
14103
|
-
const [rawStatus, setRawStatus] = (0,
|
|
14104
|
-
const inFlightRef = (0,
|
|
14105
|
-
const convRef = (0,
|
|
14225
|
+
const [result, setResult] = (0, import_react90.useState)(null);
|
|
14226
|
+
const [submitting, setSubmitting] = (0, import_react90.useState)(false);
|
|
14227
|
+
const [rawStatus, setRawStatus] = (0, import_react90.useState)(null);
|
|
14228
|
+
const inFlightRef = (0, import_react90.useRef)(false);
|
|
14229
|
+
const convRef = (0, import_react90.useRef)(conversation);
|
|
14106
14230
|
convRef.current = conversation;
|
|
14107
|
-
const optsRef = (0,
|
|
14231
|
+
const optsRef = (0, import_react90.useRef)({ gameId, gameDay, fixtureId, locale, refresh });
|
|
14108
14232
|
optsRef.current = { gameId, gameDay, fixtureId, locale, refresh };
|
|
14109
|
-
const resultRef = (0,
|
|
14233
|
+
const resultRef = (0, import_react90.useRef)(null);
|
|
14110
14234
|
resultRef.current = result;
|
|
14111
|
-
const refetch = (0,
|
|
14235
|
+
const refetch = (0, import_react90.useCallback)(async () => {
|
|
14112
14236
|
const conv = convRef.current;
|
|
14113
14237
|
if (!conv) return;
|
|
14114
14238
|
const opts = optsRef.current;
|
|
@@ -14124,7 +14248,7 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
14124
14248
|
} catch {
|
|
14125
14249
|
}
|
|
14126
14250
|
}, []);
|
|
14127
|
-
const submit = (0,
|
|
14251
|
+
const submit = (0, import_react90.useCallback)(async (answerJson) => {
|
|
14128
14252
|
const conv = convRef.current;
|
|
14129
14253
|
if (!conv || inFlightRef.current) return;
|
|
14130
14254
|
inFlightRef.current = true;
|
|
@@ -14151,14 +14275,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, locale, refresh
|
|
|
14151
14275
|
setSubmitting(false);
|
|
14152
14276
|
}
|
|
14153
14277
|
}, [refetch]);
|
|
14154
|
-
const hydrate = (0,
|
|
14278
|
+
const hydrate = (0, import_react90.useCallback)(() => {
|
|
14155
14279
|
void refetch();
|
|
14156
14280
|
}, [refetch]);
|
|
14157
14281
|
return { result, submitting, submit, hydrate, rawStatus };
|
|
14158
14282
|
}
|
|
14159
14283
|
|
|
14160
14284
|
// src/components/games/MysteryTigerGame.tsx
|
|
14161
|
-
var
|
|
14285
|
+
var import_react92 = require("react");
|
|
14162
14286
|
|
|
14163
14287
|
// src/components/games/nationFlags.ts
|
|
14164
14288
|
var FLAGS = {
|
|
@@ -14369,7 +14493,7 @@ function isNationCode(flag) {
|
|
|
14369
14493
|
}
|
|
14370
14494
|
|
|
14371
14495
|
// src/components/games/PlayerAvatar.tsx
|
|
14372
|
-
var
|
|
14496
|
+
var import_react91 = require("react");
|
|
14373
14497
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
14374
14498
|
function initialsOf(name) {
|
|
14375
14499
|
const parts2 = name.trim().split(/\s+/).filter(Boolean);
|
|
@@ -14387,7 +14511,7 @@ function PlayerAvatar({
|
|
|
14387
14511
|
imagePath,
|
|
14388
14512
|
className
|
|
14389
14513
|
}) {
|
|
14390
|
-
const [failed, setFailed] = (0,
|
|
14514
|
+
const [failed, setFailed] = (0, import_react91.useState)(false);
|
|
14391
14515
|
const showImage = Boolean(imagePath) && !isPlaceholderImage(imagePath) && !failed;
|
|
14392
14516
|
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className, "aria-hidden": "true", children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("img", { src: imagePath, alt: "", loading: "lazy", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "ss-w-av-initials", children: initialsOf(name) }) });
|
|
14393
14517
|
}
|
|
@@ -14631,8 +14755,8 @@ function MysteryTigerGame({
|
|
|
14631
14755
|
onBack
|
|
14632
14756
|
}) {
|
|
14633
14757
|
const t = ui.games.mysteryTiger;
|
|
14634
|
-
const [query, setQuery] = (0,
|
|
14635
|
-
const inputId = (0,
|
|
14758
|
+
const [query, setQuery] = (0, import_react92.useState)("");
|
|
14759
|
+
const inputId = (0, import_react92.useId)();
|
|
14636
14760
|
const clientState = parseClientState(result?.clientStateJson);
|
|
14637
14761
|
const guessResults = clientState?.guessResults ?? [];
|
|
14638
14762
|
const alreadyGuessedIds = new Set(guessResults.map((g) => g.playerId));
|
|
@@ -14893,13 +15017,13 @@ function HigherOrLowerGame({
|
|
|
14893
15017
|
}
|
|
14894
15018
|
|
|
14895
15019
|
// src/components/games/CareerPathGame.tsx
|
|
14896
|
-
var
|
|
15020
|
+
var import_react94 = require("react");
|
|
14897
15021
|
|
|
14898
15022
|
// src/components/games/ui/CrestShield.tsx
|
|
14899
|
-
var
|
|
15023
|
+
var import_react93 = require("react");
|
|
14900
15024
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
14901
15025
|
function CrestShield({ src, name, size = 28 }) {
|
|
14902
|
-
const [failed, setFailed] = (0,
|
|
15026
|
+
const [failed, setFailed] = (0, import_react93.useState)(false);
|
|
14903
15027
|
if (src && !isPlaceholderImage(src) && !failed) {
|
|
14904
15028
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("img", { className: "ss-g-crest", src, alt: name, width: size, height: size, loading: "lazy", onError: () => setFailed(true) });
|
|
14905
15029
|
}
|
|
@@ -14931,8 +15055,8 @@ function CareerPathGame({
|
|
|
14931
15055
|
}) {
|
|
14932
15056
|
const s = ui.games.careerPath;
|
|
14933
15057
|
const title = gameTitle({ gameId: "career-path" }, ui.games.titles);
|
|
14934
|
-
const [query, setQuery] = (0,
|
|
14935
|
-
const inputId = (0,
|
|
15058
|
+
const [query, setQuery] = (0, import_react94.useState)("");
|
|
15059
|
+
const inputId = (0, import_react94.useId)();
|
|
14936
15060
|
const clientState = parseClientState3(result?.clientStateJson);
|
|
14937
15061
|
const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
|
|
14938
15062
|
const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
|
|
@@ -15038,7 +15162,7 @@ function CareerPathGame({
|
|
|
15038
15162
|
}
|
|
15039
15163
|
|
|
15040
15164
|
// src/components/games/BeatTheGridGame.tsx
|
|
15041
|
-
var
|
|
15165
|
+
var import_react95 = __toESM(require("react"), 1);
|
|
15042
15166
|
|
|
15043
15167
|
// src/components/games/ui/OptionList.tsx
|
|
15044
15168
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
@@ -15127,10 +15251,10 @@ function SearchSheet({
|
|
|
15127
15251
|
ui
|
|
15128
15252
|
}) {
|
|
15129
15253
|
const s = ui.games.beatTheGrid;
|
|
15130
|
-
const [query, setQuery] = (0,
|
|
15131
|
-
const inputId = (0,
|
|
15132
|
-
const inputRef = (0,
|
|
15133
|
-
(0,
|
|
15254
|
+
const [query, setQuery] = (0, import_react95.useState)("");
|
|
15255
|
+
const inputId = (0, import_react95.useId)();
|
|
15256
|
+
const inputRef = (0, import_react95.useRef)(null);
|
|
15257
|
+
(0, import_react95.useEffect)(() => {
|
|
15134
15258
|
inputRef.current?.focus();
|
|
15135
15259
|
}, [row, col]);
|
|
15136
15260
|
const filtered = playerPool.filter(
|
|
@@ -15195,7 +15319,7 @@ function BeatTheGridGame({
|
|
|
15195
15319
|
}) {
|
|
15196
15320
|
const s = ui.games.beatTheGrid;
|
|
15197
15321
|
const title = gameTitle({ gameId: "beat-the-grid" }, ui.games.titles);
|
|
15198
|
-
const [activeCell, setActiveCell] = (0,
|
|
15322
|
+
const [activeCell, setActiveCell] = (0, import_react95.useState)(null);
|
|
15199
15323
|
const clientState = parseClientState4(result?.clientStateJson);
|
|
15200
15324
|
const filledCells = clientState?.cells ?? [];
|
|
15201
15325
|
const isLocked2 = result?.alreadyPlayed === true || clientState?.isComplete === true;
|
|
@@ -15269,7 +15393,7 @@ function BeatTheGridGame({
|
|
|
15269
15393
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
15270
15394
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
15271
15395
|
] });
|
|
15272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
15396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_react95.default.Fragment, { children: [
|
|
15273
15397
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
15274
15398
|
cols.map((colLabel, colIdx) => {
|
|
15275
15399
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
@@ -15350,7 +15474,7 @@ function BeatTheGridGame({
|
|
|
15350
15474
|
}
|
|
15351
15475
|
|
|
15352
15476
|
// src/components/games/GuessTheXiGame.tsx
|
|
15353
|
-
var
|
|
15477
|
+
var import_react96 = require("react");
|
|
15354
15478
|
|
|
15355
15479
|
// src/components/games/ui/PitchSvg.tsx
|
|
15356
15480
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
@@ -15439,8 +15563,8 @@ function GuessTheXiGame({
|
|
|
15439
15563
|
onBack
|
|
15440
15564
|
}) {
|
|
15441
15565
|
const t = ui.games.guessTheXi;
|
|
15442
|
-
const [query, setQuery] = (0,
|
|
15443
|
-
const inputId = (0,
|
|
15566
|
+
const [query, setQuery] = (0, import_react96.useState)("");
|
|
15567
|
+
const inputId = (0, import_react96.useId)();
|
|
15444
15568
|
const clientState = parseClientState5(result?.clientStateJson);
|
|
15445
15569
|
const isOver = result?.alreadyPlayed === true || clientState?.status === "solved" || clientState?.status === "failed";
|
|
15446
15570
|
const solved = clientState?.status === "solved";
|
|
@@ -15582,7 +15706,7 @@ function GuessTheXiGame({
|
|
|
15582
15706
|
}
|
|
15583
15707
|
|
|
15584
15708
|
// src/components/games/DailyQuizGame.tsx
|
|
15585
|
-
var
|
|
15709
|
+
var import_react97 = require("react");
|
|
15586
15710
|
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
15587
15711
|
function parseClientState6(json) {
|
|
15588
15712
|
if (!json) return null;
|
|
@@ -15623,8 +15747,8 @@ function DailyQuizGame({
|
|
|
15623
15747
|
}) {
|
|
15624
15748
|
const s = ui.games.dailyQuiz;
|
|
15625
15749
|
const title = gameTitle({ gameId: "daily-quiz" }, ui.games.titles);
|
|
15626
|
-
const [selections, setSelections] = (0,
|
|
15627
|
-
const [page, setPage] = (0,
|
|
15750
|
+
const [selections, setSelections] = (0, import_react97.useState)(/* @__PURE__ */ new Map());
|
|
15751
|
+
const [page, setPage] = (0, import_react97.useState)(0);
|
|
15628
15752
|
const clientState = parseClientState6(result?.clientStateJson);
|
|
15629
15753
|
const results2 = clientState?.results ?? [];
|
|
15630
15754
|
const isRevealed = results2.length > 0 || result?.alreadyPlayed === true;
|
|
@@ -15734,7 +15858,7 @@ function DailyQuizGame({
|
|
|
15734
15858
|
}
|
|
15735
15859
|
|
|
15736
15860
|
// src/components/games/MatchdayPredictorGame.tsx
|
|
15737
|
-
var
|
|
15861
|
+
var import_react98 = require("react");
|
|
15738
15862
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
15739
15863
|
var SCORER_SEARCH_THRESHOLD = 9;
|
|
15740
15864
|
function parseClientState7(json) {
|
|
@@ -15830,12 +15954,12 @@ function MatchdayPredictorGame({
|
|
|
15830
15954
|
onBack
|
|
15831
15955
|
}) {
|
|
15832
15956
|
const t = ui.games.predictor;
|
|
15833
|
-
const [homeScore, setHomeScore] = (0,
|
|
15834
|
-
const [awayScore, setAwayScore] = (0,
|
|
15835
|
-
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0,
|
|
15836
|
-
const [lastEdited, setLastEdited] = (0,
|
|
15837
|
-
const [query, setQuery] = (0,
|
|
15838
|
-
const searchId = (0,
|
|
15957
|
+
const [homeScore, setHomeScore] = (0, import_react98.useState)(0);
|
|
15958
|
+
const [awayScore, setAwayScore] = (0, import_react98.useState)(0);
|
|
15959
|
+
const [firstScorerPlayerId, setFirstScorerPlayerId] = (0, import_react98.useState)(null);
|
|
15960
|
+
const [lastEdited, setLastEdited] = (0, import_react98.useState)("home");
|
|
15961
|
+
const [query, setQuery] = (0, import_react98.useState)("");
|
|
15962
|
+
const searchId = (0, import_react98.useId)();
|
|
15839
15963
|
const clientState = parseClientState7(result?.clientStateJson);
|
|
15840
15964
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
15841
15965
|
const header = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
@@ -16002,7 +16126,7 @@ function MatchdayPredictorGame({
|
|
|
16002
16126
|
}
|
|
16003
16127
|
|
|
16004
16128
|
// src/components/games/StartingXiGame.tsx
|
|
16005
|
-
var
|
|
16129
|
+
var import_react99 = require("react");
|
|
16006
16130
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
16007
16131
|
var POINTS_PER_STARTER = 8;
|
|
16008
16132
|
var XI_SIZE = 11;
|
|
@@ -16046,10 +16170,10 @@ function StartingXiGame({
|
|
|
16046
16170
|
lockAtUtc
|
|
16047
16171
|
}) {
|
|
16048
16172
|
const t = ui.games.startingXi;
|
|
16049
|
-
const [slotPlayers, setSlotPlayers] = (0,
|
|
16050
|
-
const [active, setActive] = (0,
|
|
16051
|
-
const [query, setQuery] = (0,
|
|
16052
|
-
const searchId = (0,
|
|
16173
|
+
const [slotPlayers, setSlotPlayers] = (0, import_react99.useState)(() => Array(XI_SIZE).fill(null));
|
|
16174
|
+
const [active, setActive] = (0, import_react99.useState)(0);
|
|
16175
|
+
const [query, setQuery] = (0, import_react99.useState)("");
|
|
16176
|
+
const searchId = (0, import_react99.useId)();
|
|
16053
16177
|
const clientState = parseClientState8(result?.clientStateJson);
|
|
16054
16178
|
const alreadyPlayed = result?.alreadyPlayed === true;
|
|
16055
16179
|
const header = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
@@ -16188,7 +16312,7 @@ function StartingXiGame({
|
|
|
16188
16312
|
}
|
|
16189
16313
|
|
|
16190
16314
|
// src/components/games/StatLadderGame.tsx
|
|
16191
|
-
var
|
|
16315
|
+
var import_react100 = require("react");
|
|
16192
16316
|
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
16193
16317
|
function ladderClue(ladder) {
|
|
16194
16318
|
const mystery = ladder.find((r) => r.rank === 2);
|
|
@@ -16225,9 +16349,9 @@ function StatLadderGame({
|
|
|
16225
16349
|
onBack
|
|
16226
16350
|
}) {
|
|
16227
16351
|
const t = ui.games.statLadder;
|
|
16228
|
-
const [query, setQuery] = (0,
|
|
16229
|
-
const [selectedId, setSelectedId] = (0,
|
|
16230
|
-
const searchId = (0,
|
|
16352
|
+
const [query, setQuery] = (0, import_react100.useState)("");
|
|
16353
|
+
const [selectedId, setSelectedId] = (0, import_react100.useState)(null);
|
|
16354
|
+
const searchId = (0, import_react100.useId)();
|
|
16231
16355
|
const clientState = parseClientState9(result?.clientStateJson);
|
|
16232
16356
|
const revealed = clientState != null;
|
|
16233
16357
|
const header = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(GameHeader, { title: gameTitle({ gameId: "stat-ladder" }, ui.games.titles), eyebrow: t.eyebrow, onBack, backLabel: ui.back });
|
|
@@ -16433,8 +16557,8 @@ function GameScreenHost({
|
|
|
16433
16557
|
ui
|
|
16434
16558
|
}) {
|
|
16435
16559
|
const { gameId, fixtureId, gameDay = "", lockAtUtc = null } = selected;
|
|
16436
|
-
const [configJson, setConfigJson] = (0,
|
|
16437
|
-
(0,
|
|
16560
|
+
const [configJson, setConfigJson] = (0, import_react101.useState)(null);
|
|
16561
|
+
(0, import_react101.useEffect)(() => {
|
|
16438
16562
|
setConfigJson(null);
|
|
16439
16563
|
if (!conversation) return;
|
|
16440
16564
|
let cancelled = false;
|
|
@@ -16457,12 +16581,12 @@ function GameScreenHost({
|
|
|
16457
16581
|
fixtureId: fixtureId || void 0,
|
|
16458
16582
|
locale: ui.hostTag
|
|
16459
16583
|
});
|
|
16460
|
-
(0,
|
|
16584
|
+
(0, import_react101.useEffect)(() => {
|
|
16461
16585
|
if (conversation) hydrate();
|
|
16462
16586
|
}, [conversation, gameId]);
|
|
16463
|
-
const hydrateRef = (0,
|
|
16587
|
+
const hydrateRef = (0, import_react101.useRef)(hydrate);
|
|
16464
16588
|
hydrateRef.current = hydrate;
|
|
16465
|
-
(0,
|
|
16589
|
+
(0, import_react101.useEffect)(() => {
|
|
16466
16590
|
if (!FIXTURE_GAME_IDS.has(gameId)) return;
|
|
16467
16591
|
if (rawStatus !== "pending") return;
|
|
16468
16592
|
const timerId = setInterval(() => {
|
|
@@ -16575,7 +16699,7 @@ function GameScreenHost({
|
|
|
16575
16699
|
}
|
|
16576
16700
|
|
|
16577
16701
|
// src/components/Leaderboard.tsx
|
|
16578
|
-
var
|
|
16702
|
+
var import_react102 = require("react");
|
|
16579
16703
|
|
|
16580
16704
|
// src/components/LeaderboardRow.tsx
|
|
16581
16705
|
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
@@ -16662,7 +16786,7 @@ function Leaderboard({
|
|
|
16662
16786
|
ui,
|
|
16663
16787
|
onPlay
|
|
16664
16788
|
}) {
|
|
16665
|
-
const [segment, setSegment] = (0,
|
|
16789
|
+
const [segment, setSegment] = (0, import_react102.useState)("weekly");
|
|
16666
16790
|
const myRow = segment === "weekly" ? data.myWeeklyRow : data.myAllTimeRow;
|
|
16667
16791
|
const offBoard = myRow !== null && myRow !== void 0 && myRow.rank === -1;
|
|
16668
16792
|
const isEmpty = segment === "weekly" ? data.weeklyTop.length === 0 : data.allTimeTop.length === 0;
|
|
@@ -16767,9 +16891,9 @@ function GamesPanel({
|
|
|
16767
16891
|
leaderboardLoading,
|
|
16768
16892
|
refreshHub
|
|
16769
16893
|
}) {
|
|
16770
|
-
const [selected, setSelected] = (0,
|
|
16771
|
-
const [segment, setSegment] = (0,
|
|
16772
|
-
(0,
|
|
16894
|
+
const [selected, setSelected] = (0, import_react103.useState)(null);
|
|
16895
|
+
const [segment, setSegment] = (0, import_react103.useState)("play");
|
|
16896
|
+
(0, import_react103.useEffect)(() => {
|
|
16773
16897
|
ensureGamesFonts();
|
|
16774
16898
|
}, []);
|
|
16775
16899
|
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(GamesLoginWall, { ui });
|
|
@@ -16833,10 +16957,10 @@ function GamesPanel({
|
|
|
16833
16957
|
}
|
|
16834
16958
|
|
|
16835
16959
|
// src/components/FavouritesPanel.tsx
|
|
16836
|
-
var
|
|
16960
|
+
var import_react106 = require("react");
|
|
16837
16961
|
|
|
16838
16962
|
// src/components/FavouriteChips.tsx
|
|
16839
|
-
var
|
|
16963
|
+
var import_react104 = require("react");
|
|
16840
16964
|
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
16841
16965
|
async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
16842
16966
|
const outcome = await controller.toggle(kind, id);
|
|
@@ -16883,12 +17007,12 @@ function Group({ title, entities, sport, ui, controller, onNotice }) {
|
|
|
16883
17007
|
] });
|
|
16884
17008
|
}
|
|
16885
17009
|
function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNotice }) {
|
|
16886
|
-
const [confirming, setConfirming] = (0,
|
|
17010
|
+
const [confirming, setConfirming] = (0, import_react104.useState)(false);
|
|
16887
17011
|
const data = controller.data;
|
|
16888
|
-
(0,
|
|
17012
|
+
(0, import_react104.useEffect)(() => {
|
|
16889
17013
|
setConfirming(false);
|
|
16890
17014
|
}, [sport]);
|
|
16891
|
-
(0,
|
|
17015
|
+
(0, import_react104.useEffect)(() => {
|
|
16892
17016
|
if (!confirming) return;
|
|
16893
17017
|
const onPointerDown = (e) => {
|
|
16894
17018
|
if (!(e.target instanceof Element) || !e.target.closest("[data-fav-confirm]")) setConfirming(false);
|
|
@@ -16942,21 +17066,21 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
|
|
|
16942
17066
|
}
|
|
16943
17067
|
|
|
16944
17068
|
// src/components/FavouritesSearch.tsx
|
|
16945
|
-
var
|
|
17069
|
+
var import_react105 = require("react");
|
|
16946
17070
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
16947
17071
|
var MIN_LETTERS = 2;
|
|
16948
17072
|
var MAX_LENGTH = 64;
|
|
16949
17073
|
var DEBOUNCE_MS = 250;
|
|
16950
17074
|
function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
16951
|
-
const [query, setQuery] = (0,
|
|
16952
|
-
const [answer, setAnswer] = (0,
|
|
16953
|
-
const controllerRef = (0,
|
|
17075
|
+
const [query, setQuery] = (0, import_react105.useState)("");
|
|
17076
|
+
const [answer, setAnswer] = (0, import_react105.useState)(null);
|
|
17077
|
+
const controllerRef = (0, import_react105.useRef)(controller);
|
|
16954
17078
|
controllerRef.current = controller;
|
|
16955
17079
|
const trimmed = query.trim();
|
|
16956
17080
|
const queryKey = `${sport}|${trimmed}`;
|
|
16957
17081
|
const results2 = answer?.key === queryKey ? answer.rows : [];
|
|
16958
17082
|
const settled = answer?.key === queryKey;
|
|
16959
|
-
(0,
|
|
17083
|
+
(0, import_react105.useEffect)(() => {
|
|
16960
17084
|
setAnswer(null);
|
|
16961
17085
|
if (trimmed.length < MIN_LETTERS) return;
|
|
16962
17086
|
let cancelled = false;
|
|
@@ -17019,13 +17143,13 @@ function FavouritesSearch({ controller, ui, sport, onNotice }) {
|
|
|
17019
17143
|
// src/components/FavouritesPanel.tsx
|
|
17020
17144
|
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
17021
17145
|
function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
17022
|
-
const [notice, setNotice] = (0,
|
|
17023
|
-
const refreshRef = (0,
|
|
17146
|
+
const [notice, setNotice] = (0, import_react106.useState)(null);
|
|
17147
|
+
const refreshRef = (0, import_react106.useRef)(controller.refresh);
|
|
17024
17148
|
refreshRef.current = controller.refresh;
|
|
17025
|
-
(0,
|
|
17149
|
+
(0, import_react106.useEffect)(() => {
|
|
17026
17150
|
void refreshRef.current();
|
|
17027
17151
|
}, []);
|
|
17028
|
-
(0,
|
|
17152
|
+
(0, import_react106.useEffect)(() => {
|
|
17029
17153
|
setNotice(null);
|
|
17030
17154
|
}, [sport]);
|
|
17031
17155
|
const sportLabel2 = sports.find((s) => s.sport === sport)?.label ?? sportLabel(ui, sport);
|
|
@@ -17051,11 +17175,11 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
17051
17175
|
}
|
|
17052
17176
|
|
|
17053
17177
|
// src/components/PresetTools.tsx
|
|
17054
|
-
var
|
|
17178
|
+
var import_react107 = require("react");
|
|
17055
17179
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
17056
17180
|
function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
|
|
17057
17181
|
const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
|
|
17058
|
-
const titleId = (0,
|
|
17182
|
+
const titleId = (0, import_react107.useId)();
|
|
17059
17183
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
|
|
17060
17184
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "ss-w-tool-head", children: [
|
|
17061
17185
|
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
@@ -17105,9 +17229,9 @@ function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal,
|
|
|
17105
17229
|
const totalOptions = comboTotals(grid);
|
|
17106
17230
|
const totals = totalOptions.map((o) => o.value);
|
|
17107
17231
|
const legChoices = comboLegChoices(grid);
|
|
17108
|
-
const [total, setTotal] = (0,
|
|
17109
|
-
const [legs, setLegs] = (0,
|
|
17110
|
-
const [announcement, setAnnouncement] = (0,
|
|
17232
|
+
const [total, setTotal] = (0, import_react107.useState)(() => nearest(totals, initialTotal));
|
|
17233
|
+
const [legs, setLegs] = (0, import_react107.useState)(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
|
|
17234
|
+
const [announcement, setAnnouncement] = (0, import_react107.useState)("");
|
|
17111
17235
|
const cell2 = findCombo(grid, total, legs);
|
|
17112
17236
|
const minLegs = legChoices[0] ?? legs;
|
|
17113
17237
|
const maxLegs = legChoices[legChoices.length - 1] ?? legs;
|
|
@@ -17146,7 +17270,7 @@ function FavouritesSheet({ ui, controller, sport, sports, onSportChange, onClose
|
|
|
17146
17270
|
}
|
|
17147
17271
|
|
|
17148
17272
|
// src/components/dashboard/v8/SentenceBuilder.tsx
|
|
17149
|
-
var
|
|
17273
|
+
var import_react108 = require("react");
|
|
17150
17274
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
17151
17275
|
var TOTALS = ["any", "3", "5", "10", "20", "50"];
|
|
17152
17276
|
var BASE_LEGS = [1, 2, 3, 4];
|
|
@@ -17172,8 +17296,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17172
17296
|
const opening = openingGames(preset);
|
|
17173
17297
|
const gamesOptions = opening.options;
|
|
17174
17298
|
const marketOptions = usableMarkets(preset);
|
|
17175
|
-
const [fingerprint] = (0,
|
|
17176
|
-
const [saved] = (0,
|
|
17299
|
+
const [fingerprint] = (0, import_react108.useState)(() => JSON.stringify(preset));
|
|
17300
|
+
const [saved] = (0, import_react108.useState)(() => {
|
|
17177
17301
|
const kept = memory3?.savedView(sport);
|
|
17178
17302
|
return kept && kept.fingerprint === fingerprint ? kept : null;
|
|
17179
17303
|
});
|
|
@@ -17187,9 +17311,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17187
17311
|
// The server never widens by itself: an all-games preset with no ids asks for it.
|
|
17188
17312
|
widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
|
|
17189
17313
|
};
|
|
17190
|
-
const [view, setView] = (0,
|
|
17191
|
-
const autoWidened = (0,
|
|
17192
|
-
const [widenedNote, setWidenedNote] = (0,
|
|
17314
|
+
const [view, setView] = (0, import_react108.useState)(() => saved?.view ?? openingView);
|
|
17315
|
+
const autoWidened = (0, import_react108.useRef)(false);
|
|
17316
|
+
const [widenedNote, setWidenedNote] = (0, import_react108.useState)(saved?.widenedNote ?? false);
|
|
17193
17317
|
const requestFor = (v) => ({
|
|
17194
17318
|
sport,
|
|
17195
17319
|
...v.marketKey !== null ? { marketKey: v.marketKey } : {},
|
|
@@ -17201,10 +17325,10 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17201
17325
|
...operatorUserId ? { operatorUserId } : {},
|
|
17202
17326
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
17203
17327
|
});
|
|
17204
|
-
const [first] = (0,
|
|
17328
|
+
const [first] = (0, import_react108.useState)(() => requestFor(view));
|
|
17205
17329
|
const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
|
|
17206
|
-
const lastRequest = (0,
|
|
17207
|
-
(0,
|
|
17330
|
+
const lastRequest = (0, import_react108.useRef)(first);
|
|
17331
|
+
(0, import_react108.useEffect)(() => {
|
|
17208
17332
|
void request(lastRequest.current);
|
|
17209
17333
|
}, [request]);
|
|
17210
17334
|
const send = (req) => {
|
|
@@ -17237,14 +17361,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17237
17361
|
const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
|
|
17238
17362
|
const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
|
|
17239
17363
|
useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
|
|
17240
|
-
const [startedNote, setStartedNote] = (0,
|
|
17364
|
+
const [startedNote, setStartedNote] = (0, import_react108.useState)(false);
|
|
17241
17365
|
const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
|
|
17242
|
-
(0,
|
|
17366
|
+
(0, import_react108.useEffect)(() => {
|
|
17243
17367
|
if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
|
|
17244
17368
|
}, [startedNote, status2, anyStarted]);
|
|
17245
17369
|
const market = rows?.[0]?.market;
|
|
17246
|
-
const [seen2, setSeen] = (0,
|
|
17247
|
-
(0,
|
|
17370
|
+
const [seen2, setSeen] = (0, import_react108.useState)(null);
|
|
17371
|
+
(0, import_react108.useEffect)(() => {
|
|
17248
17372
|
if (market) setSeen(market);
|
|
17249
17373
|
}, [market]);
|
|
17250
17374
|
const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen2;
|
|
@@ -17257,14 +17381,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17257
17381
|
const quotedAt = rows ? oldestQuote(rows) : null;
|
|
17258
17382
|
const combo = ready && grid.total !== null ? { sport, totalChosen: view.total, totalActual: grid.total } : void 0;
|
|
17259
17383
|
const canWiden = gamesOptions === null || allGames !== null;
|
|
17260
|
-
(0,
|
|
17384
|
+
(0, import_react108.useEffect)(() => {
|
|
17261
17385
|
if (!empty2 || !singles || widened || !canWiden || autoWidened.current) return;
|
|
17262
17386
|
autoWidened.current = true;
|
|
17263
17387
|
const next = { ...view, widen: true, matchIds: [], gamesId: allGames ? allGames.id : view.gamesId };
|
|
17264
17388
|
commit(next, true);
|
|
17265
17389
|
send(requestFor(next));
|
|
17266
17390
|
}, [empty2, singles, widened, canWiden, view]);
|
|
17267
|
-
(0,
|
|
17391
|
+
(0, import_react108.useEffect)(() => {
|
|
17268
17392
|
if (coolOff) onCoolOff?.(sport);
|
|
17269
17393
|
}, [coolOff, onCoolOff, sport]);
|
|
17270
17394
|
if (coolOff) return null;
|
|
@@ -17669,10 +17793,10 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
17669
17793
|
}
|
|
17670
17794
|
|
|
17671
17795
|
// src/components/PlayerPhoto.tsx
|
|
17672
|
-
var
|
|
17796
|
+
var import_react109 = require("react");
|
|
17673
17797
|
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
17674
17798
|
function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
|
|
17675
|
-
const [failed, setFailed] = (0,
|
|
17799
|
+
const [failed, setFailed] = (0, import_react109.useState)(false);
|
|
17676
17800
|
const box = { width: size, height: size };
|
|
17677
17801
|
if (photoUrl && !failed) {
|
|
17678
17802
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
@@ -17707,7 +17831,7 @@ function MiniPitch({ positionCode }) {
|
|
|
17707
17831
|
}
|
|
17708
17832
|
|
|
17709
17833
|
// src/components/PerformanceBars.tsx
|
|
17710
|
-
var
|
|
17834
|
+
var import_react110 = require("react");
|
|
17711
17835
|
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
17712
17836
|
var GROUPS = ["shooting", "passing", "possession", "defending"];
|
|
17713
17837
|
function finite4(v) {
|
|
@@ -17753,7 +17877,7 @@ function unrankedLine(ui, reason) {
|
|
|
17753
17877
|
}
|
|
17754
17878
|
}
|
|
17755
17879
|
function PerformanceBars({ performance, competitionName, strings }) {
|
|
17756
|
-
const [mode, setMode] = (0,
|
|
17880
|
+
const [mode, setMode] = (0, import_react110.useState)("total");
|
|
17757
17881
|
const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
|
|
17758
17882
|
if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
|
|
17759
17883
|
const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
|
|
@@ -17962,8 +18086,8 @@ function SettingsSheet({ ui, onClose }) {
|
|
|
17962
18086
|
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
17963
18087
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
17964
18088
|
function useIsModal() {
|
|
17965
|
-
const [modal, setModal] = (0,
|
|
17966
|
-
(0,
|
|
18089
|
+
const [modal, setModal] = (0, import_react111.useState)(false);
|
|
18090
|
+
(0, import_react111.useEffect)(() => {
|
|
17967
18091
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
17968
18092
|
const mql = window.matchMedia(FULLSCREEN_QUERY);
|
|
17969
18093
|
const sync = () => setModal(mql.matches);
|
|
@@ -17977,12 +18101,12 @@ var HIDDEN_LAYER_STYLE = { position: "absolute", inset: 0, visibility: "hidden",
|
|
|
17977
18101
|
var SQUAD_LAYER_STYLE = { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 };
|
|
17978
18102
|
function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, schedule, gamesResult, leaderboardResult, clubFixturesResult, clubStandingsResult, clubSquadResult, clubSquadStatsResult, clubPlayerDetailResult, loggedIn, conversation, presetGrid, favouritesEnabled, favourites, builder, onCloseRequested, onRegisterBack }) {
|
|
17979
18103
|
const { state, close, stop, send, reset } = controller;
|
|
17980
|
-
const [squadView, setSquadView] = (0,
|
|
17981
|
-
const [selectedPlayerId, setSelectedPlayerId] = (0,
|
|
18104
|
+
const [squadView, setSquadView] = (0, import_react111.useState)("roster");
|
|
18105
|
+
const [selectedPlayerId, setSelectedPlayerId] = (0, import_react111.useState)(null);
|
|
17982
18106
|
const clearPlayerDetail = clubPlayerDetailResult?.clear;
|
|
17983
18107
|
const fetchPlayerDetail = clubPlayerDetailResult?.fetch;
|
|
17984
|
-
const squadLayerRef = (0,
|
|
17985
|
-
const squadScrollRef = (0,
|
|
18108
|
+
const squadLayerRef = (0, import_react111.useRef)(null);
|
|
18109
|
+
const squadScrollRef = (0, import_react111.useRef)(null);
|
|
17986
18110
|
const selectPlayer = (playerId) => {
|
|
17987
18111
|
squadScrollRef.current = squadLayerRef.current?.querySelector(".ss-w-mon-list")?.scrollTop ?? null;
|
|
17988
18112
|
setSelectedPlayerId(playerId);
|
|
@@ -17992,7 +18116,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
17992
18116
|
setSelectedPlayerId(null);
|
|
17993
18117
|
clearPlayerDetail?.();
|
|
17994
18118
|
};
|
|
17995
|
-
(0,
|
|
18119
|
+
(0, import_react111.useLayoutEffect)(() => {
|
|
17996
18120
|
if (selectedPlayerId !== null || squadScrollRef.current === null) return;
|
|
17997
18121
|
const list = squadLayerRef.current?.querySelector(".ss-w-mon-list");
|
|
17998
18122
|
if (list) list.scrollTop = squadScrollRef.current;
|
|
@@ -18005,7 +18129,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18005
18129
|
const hasBuilder = !clubBrand && (builderOptions?.length ?? 0) > 0;
|
|
18006
18130
|
const tabs = monitor ?? (hasBuilder ? tabState : void 0);
|
|
18007
18131
|
const activeTab = tabs?.activeTab;
|
|
18008
|
-
(0,
|
|
18132
|
+
(0, import_react111.useEffect)(() => {
|
|
18009
18133
|
if (activeTab === "squad" || selectedPlayerId === null) return;
|
|
18010
18134
|
setSelectedPlayerId(null);
|
|
18011
18135
|
clearPlayerDetail?.();
|
|
@@ -18014,11 +18138,11 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18014
18138
|
const favouritesOpen = favouritesOffered && (favourites?.open ?? false);
|
|
18015
18139
|
const favouritesAskedOpen = favourites?.open ?? false;
|
|
18016
18140
|
const setFavouritesOpen = favourites?.onOpenChange;
|
|
18017
|
-
(0,
|
|
18141
|
+
(0, import_react111.useEffect)(() => {
|
|
18018
18142
|
if (favouritesAskedOpen && !favouritesOffered) setFavouritesOpen?.(false);
|
|
18019
18143
|
}, [favouritesAskedOpen, favouritesOffered, setFavouritesOpen]);
|
|
18020
18144
|
const storedTab = tabState?.activeTab;
|
|
18021
|
-
(0,
|
|
18145
|
+
(0, import_react111.useEffect)(() => {
|
|
18022
18146
|
const unreachable = storedTab === "builder" ? !hasBuilder : !monitor && storedTab !== void 0 && storedTab !== "chat";
|
|
18023
18147
|
if (unreachable) setMonitorTab?.("chat");
|
|
18024
18148
|
}, [storedTab, hasBuilder, monitor, setMonitorTab]);
|
|
@@ -18027,12 +18151,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18027
18151
|
const closeTab = tabs?.activeTab ?? "chat";
|
|
18028
18152
|
const lastMessage = state.messages[state.messages.length - 1];
|
|
18029
18153
|
const answering = state.isStreaming && !(lastMessage?.role === "assistant" && lastMessage.isGreeting);
|
|
18030
|
-
const closeWith = (0,
|
|
18154
|
+
const closeWith = (0, import_react111.useCallback)((method) => {
|
|
18031
18155
|
track({ name: "widget_close", method, tab: closeTab, answering });
|
|
18032
18156
|
if (onCloseRequested) onCloseRequested();
|
|
18033
18157
|
else close();
|
|
18034
18158
|
}, [track, closeTab, answering, close, onCloseRequested]);
|
|
18035
|
-
(0,
|
|
18159
|
+
(0, import_react111.useEffect)(() => {
|
|
18036
18160
|
const onKey = (e) => {
|
|
18037
18161
|
if (e.key === "Escape") closeWith("escape");
|
|
18038
18162
|
};
|
|
@@ -18048,80 +18172,80 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18048
18172
|
tabs?.setActiveTab("chat");
|
|
18049
18173
|
send(text2, { grounding, source });
|
|
18050
18174
|
};
|
|
18051
|
-
(0,
|
|
18175
|
+
(0, import_react111.useEffect)(() => {
|
|
18052
18176
|
if (monitor && monitor.activeTab !== "chat" && state.isStreaming) monitor.markChatActivity();
|
|
18053
18177
|
}, [monitor, state.isStreaming, state.messages.length]);
|
|
18054
18178
|
const onChatTab = !tabs || tabs.activeTab === "chat";
|
|
18055
|
-
const inputRef = (0,
|
|
18056
|
-
const limitRef = (0,
|
|
18057
|
-
const typedSendRef = (0,
|
|
18058
|
-
const focusAfterCloseRef = (0,
|
|
18059
|
-
const [tool, setTool] = (0,
|
|
18060
|
-
const panelRef = (0,
|
|
18179
|
+
const inputRef = (0, import_react111.useRef)(null);
|
|
18180
|
+
const limitRef = (0, import_react111.useRef)(null);
|
|
18181
|
+
const typedSendRef = (0, import_react111.useRef)(false);
|
|
18182
|
+
const focusAfterCloseRef = (0, import_react111.useRef)(null);
|
|
18183
|
+
const [tool, setTool] = (0, import_react111.useState)(null);
|
|
18184
|
+
const panelRef = (0, import_react111.useRef)(null);
|
|
18061
18185
|
const settings = useOddsSettings();
|
|
18062
|
-
const [settingsOpen, setSettingsOpen] = (0,
|
|
18186
|
+
const [settingsOpen, setSettingsOpen] = (0, import_react111.useState)(false);
|
|
18063
18187
|
const hasSettings = settings.oddsOffered || !settings.themeLocked;
|
|
18064
|
-
const openSettings = (0,
|
|
18188
|
+
const openSettings = (0, import_react111.useCallback)(() => {
|
|
18065
18189
|
setTool(null);
|
|
18066
18190
|
setFavouritesOpen?.(false);
|
|
18067
18191
|
setSettingsOpen(true);
|
|
18068
18192
|
}, [setFavouritesOpen]);
|
|
18069
|
-
const closeSettings = (0,
|
|
18193
|
+
const closeSettings = (0, import_react111.useCallback)(() => {
|
|
18070
18194
|
setSettingsOpen(false);
|
|
18071
18195
|
panelRef.current?.querySelector(".ss-w-kebab")?.focus();
|
|
18072
18196
|
}, []);
|
|
18073
|
-
const openFavourites = (0,
|
|
18074
|
-
const closeFavourites = (0,
|
|
18197
|
+
const openFavourites = (0, import_react111.useCallback)(() => setFavouritesOpen?.(true), [setFavouritesOpen]);
|
|
18198
|
+
const closeFavourites = (0, import_react111.useCallback)(() => {
|
|
18075
18199
|
setFavouritesOpen?.(false);
|
|
18076
18200
|
panelRef.current?.querySelector(".ss-w-kebab")?.focus();
|
|
18077
18201
|
}, [setFavouritesOpen]);
|
|
18078
|
-
(0,
|
|
18202
|
+
(0, import_react111.useEffect)(() => {
|
|
18079
18203
|
if (!favouritesOpen) return;
|
|
18080
18204
|
setTool(null);
|
|
18081
18205
|
setSettingsOpen(false);
|
|
18082
18206
|
}, [favouritesOpen]);
|
|
18083
18207
|
const paused = isPaused(state.limit);
|
|
18084
|
-
(0,
|
|
18208
|
+
(0, import_react111.useEffect)(() => {
|
|
18085
18209
|
if (paused) setTool(null);
|
|
18086
18210
|
}, [paused]);
|
|
18087
|
-
(0,
|
|
18211
|
+
(0, import_react111.useEffect)(() => {
|
|
18088
18212
|
if (!paused) return;
|
|
18089
18213
|
if (typedSendRef.current) limitRef.current?.focus();
|
|
18090
18214
|
typedSendRef.current = false;
|
|
18091
18215
|
}, [paused]);
|
|
18092
|
-
const openTool = (0,
|
|
18216
|
+
const openTool = (0, import_react111.useCallback)((next) => {
|
|
18093
18217
|
setTool(next);
|
|
18094
18218
|
}, []);
|
|
18095
|
-
const toolsValue = (0,
|
|
18219
|
+
const toolsValue = (0, import_react111.useMemo)(
|
|
18096
18220
|
() => presetGrid && !paused ? { openBuilder: (total, legs) => openTool({ total, legs }), changeLabel: ui.presets.changeCombo } : null,
|
|
18097
18221
|
[presetGrid, paused, openTool, ui.presets.changeCombo]
|
|
18098
18222
|
);
|
|
18099
|
-
const closeTool = (0,
|
|
18223
|
+
const closeTool = (0, import_react111.useCallback)(() => {
|
|
18100
18224
|
focusAfterCloseRef.current = "composer";
|
|
18101
18225
|
setTool(null);
|
|
18102
18226
|
}, []);
|
|
18103
|
-
const sendAsk = (0,
|
|
18227
|
+
const sendAsk = (0, import_react111.useCallback)((ask) => {
|
|
18104
18228
|
focusAfterCloseRef.current = "composer";
|
|
18105
18229
|
setTool(null);
|
|
18106
18230
|
tabs?.setActiveTab("chat");
|
|
18107
18231
|
send(ask.message, { displayText: ask.displayText, preset: ask.preset, source: "preset" });
|
|
18108
18232
|
}, [tabs, send]);
|
|
18109
|
-
const formatKickoff = (0,
|
|
18233
|
+
const formatKickoff = (0, import_react111.useCallback)((kickoffUtc) => {
|
|
18110
18234
|
const k = ui.bettingKickoff(kickoffUtc);
|
|
18111
18235
|
return `${k.dayLabel} ${k.time}`;
|
|
18112
18236
|
}, [ui]);
|
|
18113
|
-
(0,
|
|
18237
|
+
(0, import_react111.useEffect)(() => {
|
|
18114
18238
|
if (tool) return;
|
|
18115
18239
|
const target = focusAfterCloseRef.current;
|
|
18116
18240
|
focusAfterCloseRef.current = null;
|
|
18117
18241
|
if (target === "composer") inputRef.current?.focus();
|
|
18118
18242
|
}, [tool]);
|
|
18119
|
-
(0,
|
|
18243
|
+
(0, import_react111.useEffect)(() => {
|
|
18120
18244
|
if (!tool || onChatTab && presetGrid) return;
|
|
18121
18245
|
focusAfterCloseRef.current = "composer";
|
|
18122
18246
|
setTool(null);
|
|
18123
18247
|
}, [tool, onChatTab, presetGrid]);
|
|
18124
|
-
const backRef = (0,
|
|
18248
|
+
const backRef = (0, import_react111.useRef)(() => false);
|
|
18125
18249
|
backRef.current = () => {
|
|
18126
18250
|
if (favouritesOpen) {
|
|
18127
18251
|
closeFavourites();
|
|
@@ -18145,7 +18269,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18145
18269
|
}
|
|
18146
18270
|
return false;
|
|
18147
18271
|
};
|
|
18148
|
-
(0,
|
|
18272
|
+
(0, import_react111.useEffect)(() => {
|
|
18149
18273
|
if (!onRegisterBack) return;
|
|
18150
18274
|
onRegisterBack(() => backRef.current());
|
|
18151
18275
|
return () => onRegisterBack(null);
|
|
@@ -19633,6 +19757,13 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
19633
19757
|
.ss-w-tabs[data-tight="5"] .ss-w-tab { font-size: 11px; }
|
|
19634
19758
|
.ss-w-tabs[data-tight="6"] .ss-w-tab { font-size: 11px; padding-left: 2px; padding-right: 2px; gap: 3px; letter-spacing: -.01em; }
|
|
19635
19759
|
.ss-w-tabs[data-tight="6"] .ss-w-tab-count { padding-left: 3px; padding-right: 3px; }
|
|
19760
|
+
.ss-w-tabs[data-tight="7"], .ss-w-tabs[data-scroll] { gap: 0; }
|
|
19761
|
+
.ss-w-tabs[data-tight="7"] .ss-w-tab { font-size: 11px; padding-left: 2px; padding-right: 2px; gap: 3px; letter-spacing: -.01em; }
|
|
19762
|
+
.ss-w-tabs[data-tight="7"] .ss-w-tab-count { background: none; padding: 0; min-width: 0; }
|
|
19763
|
+
.ss-w-tabs[data-scroll] { overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 16px 24px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); }
|
|
19764
|
+
.ss-w-tabs[data-scroll]::-webkit-scrollbar { display: none; }
|
|
19765
|
+
/* A flex item, not padding: WebKit leaves a flex scroller's end padding out of the scroll range, so the fade would cover the last tab. */
|
|
19766
|
+
.ss-w-tabs[data-scroll]::after { content: ''; flex: 0 0 24px; }
|
|
19636
19767
|
.ss-w-tab-count { font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-bubble); border-radius: 999px; padding: 1px 6px; }
|
|
19637
19768
|
.ss-w-tab[data-on] .ss-w-tab-count { color: var(--ss-w-accent); }
|
|
19638
19769
|
/* The dot sits on the tab's corner and takes no width: a poll landing late must not push the last tab out of a strip that already fits to the pixel */
|
|
@@ -21104,6 +21235,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
21104
21235
|
|
|
21105
21236
|
// src/StatsWidget.tsx
|
|
21106
21237
|
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
21238
|
+
var NO_OWNER = {};
|
|
21107
21239
|
function buildClient(props) {
|
|
21108
21240
|
try {
|
|
21109
21241
|
if ("client" in props && props.client) {
|
|
@@ -21128,12 +21260,12 @@ function injectStyles(root) {
|
|
|
21128
21260
|
function StatsWidget(props) {
|
|
21129
21261
|
const injectedClient = "client" in props ? props.client : void 0;
|
|
21130
21262
|
const cfg = props.config;
|
|
21131
|
-
const built = (0,
|
|
21132
|
-
const trackingRef = (0,
|
|
21133
|
-
const track = (0,
|
|
21134
|
-
const eventTextRef = (0,
|
|
21263
|
+
const built = (0, import_react112.useMemo)(() => buildClient(props), [injectedClient, cfg?.operatorId, cfg?.publicKey, cfg?.baseUrl]);
|
|
21264
|
+
const trackingRef = (0, import_react112.useRef)({ envelope: { operatorId: "", widgetVersion: WIDGET_REACT_VERSION } });
|
|
21265
|
+
const track = (0, import_react112.useMemo)(() => createTracker(() => trackingRef.current), []);
|
|
21266
|
+
const eventTextRef = (0, import_react112.useRef)(false);
|
|
21135
21267
|
eventTextRef.current = cfg?.eventText === true;
|
|
21136
|
-
const logger = (0,
|
|
21268
|
+
const logger = (0, import_react112.useMemo)(() => {
|
|
21137
21269
|
if (!built) return null;
|
|
21138
21270
|
const raw = built.client.createEventLogger({
|
|
21139
21271
|
operatorUserId: cfg?.userContext?.operatorUserId,
|
|
@@ -21143,27 +21275,27 @@ function StatsWidget(props) {
|
|
|
21143
21275
|
}, [built?.client, track]);
|
|
21144
21276
|
const widgetStrings = useWidgetStrings(cfg, built?.conversation ?? null);
|
|
21145
21277
|
const stringsPending = widgetStrings.strings === void 0;
|
|
21146
|
-
const ui = (0,
|
|
21278
|
+
const ui = (0, import_react112.useMemo)(
|
|
21147
21279
|
() => normalizeUi(props.config ?? { operatorId: "", publicKey: "" }, widgetStrings.strings ?? BUNDLED),
|
|
21148
21280
|
[props.config, widgetStrings.strings]
|
|
21149
21281
|
);
|
|
21150
21282
|
const oddsSettings = useOddsSettingsState(ui, built?.conversation, cfg?.operatorId || "default");
|
|
21151
|
-
const rootRef = (0,
|
|
21152
|
-
const introDoneRef = (0,
|
|
21153
|
-
const markIntroDone = (0,
|
|
21283
|
+
const rootRef = (0, import_react112.useRef)(null);
|
|
21284
|
+
const introDoneRef = (0, import_react112.useRef)(false);
|
|
21285
|
+
const markIntroDone = (0, import_react112.useCallback)(() => {
|
|
21154
21286
|
introDoneRef.current = true;
|
|
21155
21287
|
}, []);
|
|
21156
21288
|
const language = injectedClient ? void 0 : hostTag(cfg);
|
|
21157
21289
|
const threadLanguage = familyOf(language);
|
|
21158
21290
|
const convStorageKey = `ss-w-conv:${cfg?.operatorId ?? ""}:${cfg?.userContext?.operatorUserId ?? "anon"}${threadLanguage ? `:lang=${threadLanguage}` : ""}`;
|
|
21159
|
-
const sportScope = (0,
|
|
21291
|
+
const sportScope = (0, import_react112.useMemo)(
|
|
21160
21292
|
() => ({ operatorId: cfg?.operatorId ?? "", operatorUserId: cfg?.userContext?.operatorUserId, anonymousUserId: cfg?.userContext?.anonymousUserId }),
|
|
21161
21293
|
[cfg?.operatorId, cfg?.userContext?.operatorUserId, cfg?.userContext?.anonymousUserId]
|
|
21162
21294
|
);
|
|
21163
|
-
const chatTracking = (0,
|
|
21295
|
+
const chatTracking = (0, import_react112.useMemo)(() => ({ track, eventText: () => eventTextRef.current }), [track]);
|
|
21164
21296
|
const controller = useChatStream(built?.conversation ?? emptyConversation(), ui.starters, built ? ui.greetingMessage : void 0, convStorageKey, cfg?.page, sportScope, language, chatTracking, injectedClient ? oddsSettings.userOddsFormat : oddsSettings.oddsFormat);
|
|
21165
21297
|
const panelOpen = controller.state.isOpen && !stringsPending;
|
|
21166
|
-
const liveCardWatches = (0,
|
|
21298
|
+
const liveCardWatches = (0, import_react112.useMemo)(() => {
|
|
21167
21299
|
const seen2 = /* @__PURE__ */ new Set();
|
|
21168
21300
|
const out = [];
|
|
21169
21301
|
for (const msg of controller.state.messages) {
|
|
@@ -21189,19 +21321,19 @@ function StatsWidget(props) {
|
|
|
21189
21321
|
});
|
|
21190
21322
|
const operatorUserId = cfg?.userContext?.operatorUserId;
|
|
21191
21323
|
const anonymousUserId = cfg?.userContext?.anonymousUserId;
|
|
21192
|
-
const getSchedule = (0,
|
|
21324
|
+
const getSchedule = (0, import_react112.useCallback)(
|
|
21193
21325
|
(localDate, utcOffsetMinutes) => built ? built.conversation.getSchedule(localDate, utcOffsetMinutes, operatorUserId, anonymousUserId) : Promise.resolve(null),
|
|
21194
21326
|
[built, operatorUserId, anonymousUserId]
|
|
21195
21327
|
);
|
|
21196
|
-
const getStates = (0,
|
|
21328
|
+
const getStates = (0, import_react112.useCallback)(
|
|
21197
21329
|
(matchIds, nbaGameIds, nflGameIds, tennisMatches) => built ? built.conversation.getStates(matchIds, nbaGameIds, nflGameIds, requestTag, tennisMatches) : Promise.resolve(null),
|
|
21198
21330
|
[built, requestTag]
|
|
21199
21331
|
);
|
|
21200
|
-
const getTennisPrices = (0,
|
|
21332
|
+
const getTennisPrices = (0, import_react112.useCallback)(
|
|
21201
21333
|
(keys) => built ? built.conversation.getStates([], [], [], requestTag, [], keys).then((p) => p?.tennisPrices ?? null) : Promise.resolve(null),
|
|
21202
21334
|
[built, requestTag]
|
|
21203
21335
|
);
|
|
21204
|
-
const pinnedMatchIds = (0,
|
|
21336
|
+
const pinnedMatchIds = (0, import_react112.useMemo)(
|
|
21205
21337
|
() => footballMatchPinIds(monitor.pins),
|
|
21206
21338
|
[monitor.pins]
|
|
21207
21339
|
);
|
|
@@ -21215,13 +21347,13 @@ function StatsWidget(props) {
|
|
|
21215
21347
|
pinnedMatchIds,
|
|
21216
21348
|
timeZone: ui.timeZone
|
|
21217
21349
|
});
|
|
21218
|
-
const offeredSports = (0,
|
|
21350
|
+
const offeredSports = (0, import_react112.useMemo)(() => {
|
|
21219
21351
|
const seen2 = new Set(discovery.matchDays.map((d) => d.sport));
|
|
21220
21352
|
for (const g of discovery.groups) seen2.add(g.sport ?? "football");
|
|
21221
21353
|
return [...seen2];
|
|
21222
21354
|
}, [discovery.matchDays, discovery.groups]);
|
|
21223
21355
|
const scheduleSport = useScheduleSport(offeredSports);
|
|
21224
|
-
const [liveLeague, setLiveLeague] = (0,
|
|
21356
|
+
const [liveLeague, setLiveLeague] = (0, import_react112.useState)(null);
|
|
21225
21357
|
const [matchesDay, setMatchesDay] = useMatchesDayPick(discovery.localDate);
|
|
21226
21358
|
const matchesLoaded = useMatchesDay({
|
|
21227
21359
|
discovery,
|
|
@@ -21231,8 +21363,8 @@ function StatsWidget(props) {
|
|
|
21231
21363
|
enabled: panelOpen && monitor.activeTab === "matches",
|
|
21232
21364
|
timeZone: ui.timeZone
|
|
21233
21365
|
});
|
|
21234
|
-
const prevLiveSnapshotRef = (0,
|
|
21235
|
-
(0,
|
|
21366
|
+
const prevLiveSnapshotRef = (0, import_react112.useRef)(monitor.snapshot);
|
|
21367
|
+
(0, import_react112.useEffect)(() => {
|
|
21236
21368
|
const snap = monitor.snapshot;
|
|
21237
21369
|
if (!snap || snap === prevLiveSnapshotRef.current) return;
|
|
21238
21370
|
prevLiveSnapshotRef.current = snap;
|
|
@@ -21272,14 +21404,14 @@ function StatsWidget(props) {
|
|
|
21272
21404
|
const clubSquadResult = useClubSquad(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
|
|
21273
21405
|
const clubSquadStatsResult = useClubSquadStats(built?.conversation ?? null, { activeTab: monitor.activeTab, enabled: clubFixturesResult.enabled });
|
|
21274
21406
|
const clubPlayerDetailResult = useClubPlayerDetail(built?.conversation ?? null);
|
|
21275
|
-
const [favSportPick, setFavSportPick] = (0,
|
|
21276
|
-
const latestGreeting = (0,
|
|
21407
|
+
const [favSportPick, setFavSportPick] = (0, import_react112.useState)(null);
|
|
21408
|
+
const latestGreeting = (0, import_react112.useMemo)(() => {
|
|
21277
21409
|
for (const m of [...controller.state.messages].reverse()) {
|
|
21278
21410
|
if (m.role === "assistant" && m.defaultSport !== void 0) return m;
|
|
21279
21411
|
}
|
|
21280
21412
|
return null;
|
|
21281
21413
|
}, [controller.state.messages]);
|
|
21282
|
-
const favSportOptions = (0,
|
|
21414
|
+
const favSportOptions = (0, import_react112.useMemo)(
|
|
21283
21415
|
() => (switchSets(latestGreeting?.greetingDashboards) ?? []).map((set) => ({ sport: set.sport, label: set.label })),
|
|
21284
21416
|
[latestGreeting]
|
|
21285
21417
|
);
|
|
@@ -21288,20 +21420,20 @@ function StatsWidget(props) {
|
|
|
21288
21420
|
const favSport = [favSportPick, rememberedSport, latestGreeting?.defaultSport].find(offered) ?? "football";
|
|
21289
21421
|
const favSports = favSportOptions.length > 0 ? favSportOptions : [{ sport: favSport, label: sportLabel(ui, favSport) }];
|
|
21290
21422
|
const hasFavouritesIdentity = !!(operatorUserId || anonymousUserId);
|
|
21291
|
-
const [builderSportPick, setBuilderSportPick] = (0,
|
|
21292
|
-
const builderGreeting = (0,
|
|
21423
|
+
const [builderSportPick, setBuilderSportPick] = (0, import_react112.useState)(null);
|
|
21424
|
+
const builderGreeting = (0, import_react112.useMemo)(
|
|
21293
21425
|
() => [...controller.state.messages].reverse().find((m) => m.role === "assistant" && (m.greetingDashboard !== void 0 || m.greetingDashboards !== void 0)) ?? null,
|
|
21294
21426
|
[controller.state.messages]
|
|
21295
21427
|
);
|
|
21296
|
-
const [coolOff, setCoolOff] = (0,
|
|
21297
|
-
const onBuilderCoolOff = (0,
|
|
21428
|
+
const [coolOff, setCoolOff] = (0, import_react112.useState)(null);
|
|
21429
|
+
const onBuilderCoolOff = (0, import_react112.useCallback)((sport) => {
|
|
21298
21430
|
if (!builderGreeting) return;
|
|
21299
21431
|
setCoolOff((prev) => {
|
|
21300
21432
|
const sports = prev?.greeting === builderGreeting ? prev.sports : [];
|
|
21301
21433
|
return sports.includes(sport) ? prev : { greeting: builderGreeting, sports: [...sports, sport] };
|
|
21302
21434
|
});
|
|
21303
21435
|
}, [builderGreeting]);
|
|
21304
|
-
const builderOptions = (0,
|
|
21436
|
+
const builderOptions = (0, import_react112.useMemo)(() => {
|
|
21305
21437
|
const greeting = builderGreeting;
|
|
21306
21438
|
if (!greeting) return [];
|
|
21307
21439
|
const cooled = coolOff?.greeting === greeting ? coolOff.sports : [];
|
|
@@ -21314,7 +21446,7 @@ function StatsWidget(props) {
|
|
|
21314
21446
|
return options.filter((o) => !cooled.includes(o.sport));
|
|
21315
21447
|
}, [builderGreeting, coolOff, ui]);
|
|
21316
21448
|
const builderSport = [builderSportPick, rememberedSport, latestGreeting?.defaultSport].find((s) => !!s && builderOptions.some((o) => o.sport === s)) ?? builderOptions[0]?.sport ?? "";
|
|
21317
|
-
const [panelEverOpened, setPanelEverOpened] = (0,
|
|
21449
|
+
const [panelEverOpened, setPanelEverOpened] = (0, import_react112.useState)(panelOpen);
|
|
21318
21450
|
if (panelOpen && !panelEverOpened) setPanelEverOpened(true);
|
|
21319
21451
|
const favourites = useFavourites({
|
|
21320
21452
|
conversation: built?.conversation ?? null,
|
|
@@ -21326,16 +21458,16 @@ function StatsWidget(props) {
|
|
|
21326
21458
|
onChanged: discovery.refreshSchedule
|
|
21327
21459
|
});
|
|
21328
21460
|
const favouritesEnabled = hasFavouritesIdentity && favourites.status !== "refused";
|
|
21329
|
-
const [favouritesOpen, setFavouritesOpen] = (0,
|
|
21461
|
+
const [favouritesOpen, setFavouritesOpen] = (0, import_react112.useState)(false);
|
|
21330
21462
|
if (!panelOpen && favouritesOpen) setFavouritesOpen(false);
|
|
21331
|
-
const getPricePresets = (0,
|
|
21463
|
+
const getPricePresets = (0, import_react112.useCallback)(
|
|
21332
21464
|
(locale) => built ? built.conversation.getPricePresets(locale, { pool: "open" }) : Promise.resolve(null),
|
|
21333
21465
|
[built]
|
|
21334
21466
|
);
|
|
21335
21467
|
const presetGrid = usePresetGrid({ getPricePresets, isOpen: panelOpen, locale: ui.hostTag });
|
|
21336
21468
|
const markLiveActivity = monitor.markLiveActivity;
|
|
21337
|
-
const prevLiveCountRef = (0,
|
|
21338
|
-
(0,
|
|
21469
|
+
const prevLiveCountRef = (0, import_react112.useRef)(0);
|
|
21470
|
+
(0, import_react112.useEffect)(() => {
|
|
21339
21471
|
const rose = prevLiveCountRef.current === 0 && discovery.liveCount > 0;
|
|
21340
21472
|
prevLiveCountRef.current = discovery.liveCount;
|
|
21341
21473
|
if (rose) markLiveActivity();
|
|
@@ -21349,7 +21481,7 @@ function StatsWidget(props) {
|
|
|
21349
21481
|
closePanel: controller.close
|
|
21350
21482
|
});
|
|
21351
21483
|
const markAdded = hostEvents.markAdded;
|
|
21352
|
-
const slip = (0,
|
|
21484
|
+
const slip = (0, import_react112.useMemo)(
|
|
21353
21485
|
() => {
|
|
21354
21486
|
const handler = props.config?.onAddToSlip;
|
|
21355
21487
|
return {
|
|
@@ -21369,7 +21501,7 @@ function StatsWidget(props) {
|
|
|
21369
21501
|
},
|
|
21370
21502
|
[props.config?.onAddToSlip, props.config?.slipSports, controller.state.conversationId, markAdded]
|
|
21371
21503
|
);
|
|
21372
|
-
const onDashboardTap = (0,
|
|
21504
|
+
const onDashboardTap = (0, import_react112.useMemo)(
|
|
21373
21505
|
() => built ? createDashboardTapSignal((input) => built.conversation.sendSignal(input), logger) : void 0,
|
|
21374
21506
|
[built, logger]
|
|
21375
21507
|
);
|
|
@@ -21383,7 +21515,7 @@ function StatsWidget(props) {
|
|
|
21383
21515
|
log: logger
|
|
21384
21516
|
})
|
|
21385
21517
|
}));
|
|
21386
|
-
const dismissPopupRef = (0,
|
|
21518
|
+
const dismissPopupRef = (0, import_react112.useRef)(() => {
|
|
21387
21519
|
});
|
|
21388
21520
|
const mobile = useMobileBinding({
|
|
21389
21521
|
binding: props.mobile,
|
|
@@ -21396,11 +21528,17 @@ function StatsWidget(props) {
|
|
|
21396
21528
|
});
|
|
21397
21529
|
const dismissPopup = usePopupTelemetry(logger, panelOpen, controller.state.popupText, controller.dismissPopup, mobile.confirmedShown);
|
|
21398
21530
|
dismissPopupRef.current = dismissPopup;
|
|
21531
|
+
const greetingMeta = latestGreetingMeta(controller.state.messages);
|
|
21532
|
+
useBubbleGreetingShown(logger, logger ?? NO_OWNER, controller.state.popupText, props.mobile ? void 0 : greetingMeta, mobile.confirmedShown);
|
|
21533
|
+
const onBubbleClick = (0, import_react112.useCallback)(() => {
|
|
21534
|
+
if (!logger || !greetingMeta) return;
|
|
21535
|
+
logger.log({ name: "greeting_cta_click", greeting: { greetingId: greetingMeta.greetingId, case: greetingMeta.case, sport: greetingMeta.sport, market: greetingMeta.market ?? null } });
|
|
21536
|
+
}, [logger, greetingMeta]);
|
|
21399
21537
|
useOpenTelemetry(logger, panelOpen);
|
|
21400
|
-
const onControlRef = (0,
|
|
21538
|
+
const onControlRef = (0, import_react112.useRef)(props.onControl);
|
|
21401
21539
|
onControlRef.current = props.onControl;
|
|
21402
21540
|
const { open: openPanel, close: closePanel } = controller;
|
|
21403
|
-
(0,
|
|
21541
|
+
(0, import_react112.useEffect)(() => {
|
|
21404
21542
|
onControlRef.current?.({ open: openPanel, close: closePanel });
|
|
21405
21543
|
return () => onControlRef.current?.(null);
|
|
21406
21544
|
}, [openPanel, closePanel]);
|
|
@@ -21417,11 +21555,11 @@ function StatsWidget(props) {
|
|
|
21417
21555
|
page: cfg?.page
|
|
21418
21556
|
}
|
|
21419
21557
|
};
|
|
21420
|
-
(0,
|
|
21558
|
+
(0, import_react112.useEffect)(() => {
|
|
21421
21559
|
if (!logger) return;
|
|
21422
21560
|
logger.setIdentity({ operatorUserId, anonymousUserId, conversationId });
|
|
21423
21561
|
}, [logger, operatorUserId, anonymousUserId, conversationId]);
|
|
21424
|
-
(0,
|
|
21562
|
+
(0, import_react112.useEffect)(() => {
|
|
21425
21563
|
if (!logger) return;
|
|
21426
21564
|
logger.resume();
|
|
21427
21565
|
const onHide = () => {
|
|
@@ -21439,15 +21577,15 @@ function StatsWidget(props) {
|
|
|
21439
21577
|
logger.dispose();
|
|
21440
21578
|
};
|
|
21441
21579
|
}, [logger]);
|
|
21442
|
-
(0,
|
|
21580
|
+
(0, import_react112.useEffect)(() => {
|
|
21443
21581
|
if (!built || !ui.injectStyles || widgetStrings.state === "unavailable") return;
|
|
21444
21582
|
const node = rootRef.current?.getRootNode();
|
|
21445
21583
|
if (node) injectStyles(node);
|
|
21446
21584
|
}, [built, ui.injectStyles, widgetStrings.state]);
|
|
21447
21585
|
const holds = useSessionHolds();
|
|
21448
21586
|
const builderConversation = built?.conversation ?? null;
|
|
21449
|
-
const builderMemory = (0,
|
|
21450
|
-
const personalGreeting = (0,
|
|
21587
|
+
const builderMemory = (0, import_react112.useMemo)(() => createBuilderMemory(), [builderConversation, controller.state.threadEpoch]);
|
|
21588
|
+
const personalGreeting = (0, import_react112.useMemo)(() => ({
|
|
21451
21589
|
favourites: favouritesEnabled && monitor.enabled ? favourites : null,
|
|
21452
21590
|
conversation: built?.conversation ?? null,
|
|
21453
21591
|
openFavourites: () => setFavouritesOpen(true),
|
|
@@ -21509,7 +21647,8 @@ function StatsWidget(props) {
|
|
|
21509
21647
|
dismissLabel: ui.dismissGreeting,
|
|
21510
21648
|
introAllowed: !introDoneRef.current,
|
|
21511
21649
|
onIntroStart: markIntroDone,
|
|
21512
|
-
asks
|
|
21650
|
+
asks,
|
|
21651
|
+
onBubbleClick
|
|
21513
21652
|
}
|
|
21514
21653
|
) }) }) }) }) }) });
|
|
21515
21654
|
}
|