@agg-build/ui 4.19.1 → 4.21.1

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/dist/events.js CHANGED
@@ -65,6 +65,7 @@ __export(events_exports, {
65
65
  EventListItem: () => EventListItem,
66
66
  EventListItemDetails: () => EventListItemDetails,
67
67
  EventListItemV2: () => EventListItemV2,
68
+ EventListVenueStrip: () => EventListVenueStrip,
68
69
  MarketDetails: () => MarketDetails,
69
70
  MarketDetailsList: () => MarketDetailsList,
70
71
  Orderbook: () => Orderbook,
@@ -12791,64 +12792,32 @@ var formatContractChartTime = (timestamp) => {
12791
12792
 
12792
12793
  // src/events/item-details/event-markets-chart.utils.ts
12793
12794
  var import_hooks49 = require("@agg-build/hooks");
12794
- var EVENT_CHART_SERIES_LIMIT = 8;
12795
- function resolveEventChartSelectedOutcome(markets, venue, selectedOutcomeId) {
12796
- var _a, _b;
12797
- if (!selectedOutcomeId) return null;
12798
- const allMarkets = normalizeVenueMarketCluster(markets);
12799
- const market = allMarkets.find(
12800
- (item) => item.venueMarketOutcomes.some((outcome2) => outcome2.id === selectedOutcomeId)
12801
- );
12802
- const outcome = market == null ? void 0 : market.venueMarketOutcomes.find((item) => item.id === selectedOutcomeId);
12803
- if (!market || !outcome) return null;
12804
- return (_b = (_a = collectEligibleVenueOutcomes({
12805
- venueMarkets: normalizeVenueMarketCluster(markets, market.id),
12806
- selectedOutcomeLabel: outcome.label,
12807
- selectedOutcomeId
12808
- }).find((item) => item.venue === venue)) == null ? void 0 : _a.outcomeId) != null ? _b : null;
12809
- }
12810
- function resolveEventChartPage(outcomes, selectedOutcomeId, requestedPage) {
12795
+ var EVENT_CHART_MARKET_LIMIT = 3;
12796
+ var marketVolume = (market) => {
12811
12797
  var _a;
12812
- const pinned = outcomes.find((outcome) => outcome.id === selectedOutcomeId);
12813
- const remaining = outcomes.filter((outcome) => outcome.id !== (pinned == null ? void 0 : pinned.id));
12814
- const pageSize = EVENT_CHART_SERIES_LIMIT - (pinned ? 1 : 0);
12815
- const pageCount = Math.max(1, Math.ceil(remaining.length / pageSize));
12816
- const page = Math.max(0, Math.min(requestedPage, pageCount - 1));
12817
- return {
12818
- page,
12819
- pageCount,
12820
- pinnedId: (_a = pinned == null ? void 0 : pinned.id) != null ? _a : null,
12821
- outcomes: [
12822
- ...pinned ? [pinned] : [],
12823
- ...remaining.slice(page * pageSize, (page + 1) * pageSize)
12824
- ]
12825
- };
12826
- }
12827
- var resolveEventChartOutcomes = (markets, venue, eventEndDate) => normalizeVenueMarketCluster(markets).filter((market) => market.venue === venue).sort(
12828
- (left, right) => {
12829
- var _a, _b;
12830
- return ((_a = right.volume) != null ? _a : 0) - ((_b = left.volume) != null ? _b : 0) || left.id.localeCompare(right.id);
12831
- }
12832
- ).flatMap((market) => {
12798
+ return Number.isFinite(market.volume) ? Math.max(0, (_a = market.volume) != null ? _a : 0) : 0;
12799
+ };
12800
+ var resolveTopEventChartMarkets = (markets, venue) => normalizeVenueMarketCluster(markets).filter((market) => market.venue === venue && market.venueMarketOutcomes.length > 0).sort(
12801
+ (left, right) => marketVolume(right) - marketVolume(left) || left.id.localeCompare(right.id)
12802
+ ).slice(0, EVENT_CHART_MARKET_LIMIT);
12803
+ var resolveEventChartOutcomes = (markets, venue, eventEndDate) => resolveTopEventChartMarkets(markets, venue).flatMap((market) => {
12833
12804
  var _a, _b, _c;
12834
12805
  const state = (0, import_hooks49.resolveMarketTradingState)(market);
12835
12806
  const hasFinalResult = state.kind === "resolved" && market.venueMarketOutcomes.some((outcome) => outcome.winner === true) && market.venueMarketOutcomes.every((outcome) => outcome.winner != null);
12836
12807
  const settledAt = Date.parse((_c = (_b = (_a = market.resolutionDate) != null ? _a : market.endDate) != null ? _b : eventEndDate) != null ? _c : "") / 1e3;
12837
- const ordered = [...market.venueMarketOutcomes].sort((a, b) => {
12838
- const rank = (label2) => label2.trim().toLowerCase() === "yes" ? 0 : label2.trim().toLowerCase() === "no" ? 1 : 2;
12839
- return rank(a.label) - rank(b.label);
12840
- });
12808
+ const ordered = sortOutcomeSelectorOutcomes(market.venueMarketOutcomes);
12841
12809
  return ordered.map((outcome) => {
12842
- var _a2;
12810
+ var _a2, _b2;
12843
12811
  return {
12844
12812
  id: outcome.id,
12845
12813
  marketId: market.id,
12846
12814
  venue: market.venue,
12847
12815
  side: outcome.label,
12816
+ outcomeLabel: ((_a2 = outcome.title) == null ? void 0 : _a2.trim()) || outcome.label,
12848
12817
  live: !state.isTradingDisabled,
12849
12818
  finalValue: hasFinalResult ? outcome.winner ? 100 : 0 : void 0,
12850
12819
  settledAt: Number.isFinite(settledAt) ? settledAt : void 0,
12851
- label: `${market.question} \xB7 ${((_a2 = outcome.title) == null ? void 0 : _a2.trim()) || outcome.label}`
12820
+ label: `${market.question} \xB7 ${((_b2 = outcome.title) == null ? void 0 : _b2.trim()) || outcome.label}`
12852
12821
  };
12853
12822
  });
12854
12823
  });
@@ -12861,8 +12830,7 @@ var EventMarketsChart = ({
12861
12830
  eventEndDate,
12862
12831
  contractWindow,
12863
12832
  range,
12864
- live,
12865
- selectedOutcomeId
12833
+ live
12866
12834
  }) => {
12867
12835
  var _a, _b, _c, _d, _e, _f, _g;
12868
12836
  const labels = (0, import_hooks50.useLabels)();
@@ -12874,31 +12842,20 @@ var EventMarketsChart = ({
12874
12842
  () => [...new Set(normalizeVenueMarketCluster(markets).map((market) => market.venue))],
12875
12843
  [markets]
12876
12844
  );
12877
- const venue = venues.includes(defaultVenue) ? defaultVenue : (_a = venues[0]) != null ? _a : defaultVenue;
12878
- const outcomes = (0, import_react22.useMemo)(
12879
- () => resolveEventChartOutcomes(markets, venue, eventEndDate),
12880
- [markets, venue, eventEndDate]
12881
- );
12882
12845
  const [selection, setSelection] = (0, import_react22.useState)(() => ({
12883
- venue,
12884
- page: 0,
12846
+ defaultVenue,
12847
+ venue: defaultVenue,
12885
12848
  hidden: /* @__PURE__ */ new Set()
12886
12849
  }));
12887
- const currentSelection = (0, import_react22.useMemo)(
12888
- () => selection.venue === venue ? selection : { venue, page: 0, hidden: /* @__PURE__ */ new Set() },
12889
- [selection, venue]
12890
- );
12891
- const pinnedOutcomeId = (0, import_react22.useMemo)(
12892
- () => resolveEventChartSelectedOutcome(markets, venue, selectedOutcomeId),
12893
- [markets, venue, selectedOutcomeId]
12894
- );
12895
- const page = (0, import_react22.useMemo)(
12896
- () => resolveEventChartPage(outcomes, pinnedOutcomeId, currentSelection.page),
12897
- [outcomes, pinnedOutcomeId, currentSelection.page]
12898
- );
12899
- const activeOutcomes = page.outcomes.filter(
12900
- (outcome) => outcome.id === page.pinnedId || !currentSelection.hidden.has(outcome.id)
12850
+ const requestedVenue = selection.defaultVenue === defaultVenue ? selection.venue : defaultVenue;
12851
+ const venue = venues.includes(requestedVenue) ? requestedVenue : (_a = venues[0]) != null ? _a : defaultVenue;
12852
+ const hidden = selection.defaultVenue === defaultVenue && selection.venue === venue ? selection.hidden : /* @__PURE__ */ new Set();
12853
+ const topMarkets = (0, import_react22.useMemo)(() => resolveTopEventChartMarkets(markets, venue), [markets, venue]);
12854
+ const outcomes = (0, import_react22.useMemo)(
12855
+ () => resolveEventChartOutcomes(topMarkets, venue, eventEndDate),
12856
+ [topMarkets, venue, eventEndDate]
12901
12857
  );
12858
+ const activeOutcomes = outcomes.filter((outcome) => !hidden.has(outcome.id));
12902
12859
  const activeIds = new Set(activeOutcomes.map((outcome) => outcome.id));
12903
12860
  const rollingWindow = (0, import_hooks50.useRollingChartWindow)({
12904
12861
  range,
@@ -12931,10 +12888,10 @@ var EventMarketsChart = ({
12931
12888
  live: live && !windowEnded
12932
12889
  });
12933
12890
  const stableColorIds = (0, import_react22.useMemo)(
12934
- () => [...new Set(outcomes.map((outcome) => outcome.marketId))].sort(),
12935
- [outcomes]
12891
+ () => normalizeVenueMarketCluster(markets).filter((market) => market.venue === venue).map((market) => market.id).sort(),
12892
+ [markets, venue]
12936
12893
  );
12937
- const allSeries = page.outcomes.map((outcome) => {
12894
+ const allSeries = outcomes.map((outcome) => {
12938
12895
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i;
12939
12896
  const settledAt = outcome.settledAt == null ? void 0 : contractWindow ? Math.min(outcome.settledAt, contractWindow.to) : outcome.settledAt;
12940
12897
  const outcomeLive = outcome.live && !windowEnded;
@@ -12970,110 +12927,109 @@ var EventMarketsChart = ({
12970
12927
  });
12971
12928
  const visibleSeries = allSeries.filter((series) => activeIds.has(series.id));
12972
12929
  const hasVisibleHistory = visibleSeries.some((series) => series.points.length > 0);
12973
- const volume = (0, import_react22.useMemo)(
12974
- () => normalizeVenueMarketCluster(markets).filter((market) => market.venue === venue).reduce((sum, market) => {
12930
+ const volume = topMarkets.reduce(
12931
+ (sum, market) => {
12975
12932
  var _a2;
12976
- return sum + ((_a2 = market.volume) != null ? _a2 : 0);
12977
- }, 0),
12978
- [markets, venue]
12933
+ return sum + (Number.isFinite(market.volume) ? Math.max(0, (_a2 = market.volume) != null ? _a2 : 0) : 0);
12934
+ },
12935
+ 0
12979
12936
  );
12980
12937
  const venueLabel = (_g = labels.venues[venue]) != null ? _g : venue;
12981
12938
  return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-event-markets-chart flex flex-col gap-3", children: [
12982
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-2 text-agg-sm text-agg-muted-foreground", children: [
12983
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { role: "status", children: labels.eventItemDetails.comparisonSeriesCount(activeOutcomes.length, outcomes.length) }),
12984
- page.pageCount > 1 ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center gap-2", children: [
12985
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12986
- Button,
12987
- {
12988
- variant: "tertiary",
12989
- size: "small",
12990
- disabled: page.page === 0,
12991
- onClick: (event) => {
12992
- event.stopPropagation();
12993
- setSelection(__spreadProps(__spreadValues({}, currentSelection), { page: page.page - 1 }));
12994
- },
12995
- prefix: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon, { name: "chevron-left", size: "small" }),
12996
- children: labels.eventItemDetails.comparisonPreviousSeries
12997
- }
12998
- ),
12999
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { children: labels.eventItemDetails.comparisonSeriesPage(page.page + 1, page.pageCount) }),
13000
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
13001
- Button,
13002
- {
13003
- variant: "tertiary",
13004
- size: "small",
13005
- disabled: page.page + 1 === page.pageCount,
13006
- onClick: (event) => {
13007
- event.stopPropagation();
13008
- setSelection(__spreadProps(__spreadValues({}, currentSelection), { page: page.page + 1 }));
13009
- },
13010
- suffix: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon, { name: "chevron-right", size: "small" }),
13011
- children: labels.eventItemDetails.comparisonNextSeries
13012
- }
13013
- )
13014
- ] }) : null
13015
- ] }),
13016
- outcomes.length > EVENT_CHART_SERIES_LIMIT ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-xs text-agg-muted-foreground", children: labels.eventItemDetails.comparisonSeriesBudget(EVENT_CHART_SERIES_LIMIT) }) : null,
12939
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "agg-market-badges flex min-w-0 gap-2 overflow-x-auto pb-1 md:flex-wrap", children: venues.map((item) => {
12940
+ var _a2, _b2;
12941
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12942
+ "button",
12943
+ {
12944
+ type: "button",
12945
+ "aria-label": (_a2 = labels.venues[item]) != null ? _a2 : item,
12946
+ "aria-pressed": venue === item,
12947
+ className: "agg-market-badge cursor-pointer rounded-agg-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
12948
+ onClick: (event) => {
12949
+ event.preventDefault();
12950
+ event.stopPropagation();
12951
+ if (item !== venue) setSelection({ defaultVenue, venue: item, hidden: /* @__PURE__ */ new Set() });
12952
+ },
12953
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12954
+ Badge,
12955
+ {
12956
+ text: (_b2 = labels.venues[item]) != null ? _b2 : item,
12957
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(VenueLogo, { venue: item, size: "small", title: item }),
12958
+ size: "large",
12959
+ isActive: venue === item,
12960
+ classNames: { root: "shrink-0 border px-4 h-8 md:h-9" }
12961
+ }
12962
+ )
12963
+ },
12964
+ item
12965
+ );
12966
+ }) }),
13017
12967
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
13018
12968
  "div",
13019
12969
  {
13020
12970
  role: "group",
13021
12971
  "aria-label": labels.eventItemDetails.chartLegend,
13022
- className: "flex flex-wrap gap-x-5 gap-y-2",
13023
- children: allSeries.map((series) => /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
13024
- "button",
13025
- {
13026
- type: "button",
13027
- "data-chart-outcome-id": series.id,
13028
- "aria-pressed": activeIds.has(series.id),
13029
- disabled: series.id === page.pinnedId,
13030
- onClick: (event) => {
13031
- event.stopPropagation();
13032
- setSelection(() => {
13033
- const next = new Set(currentSelection.hidden);
13034
- if (next.has(series.id)) next.delete(series.id);
13035
- else next.add(series.id);
13036
- return __spreadProps(__spreadValues({}, currentSelection), { hidden: next });
13037
- });
12972
+ className: "flex flex-col gap-2",
12973
+ children: topMarkets.map((market) => {
12974
+ var _a2;
12975
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
12976
+ "div",
12977
+ {
12978
+ "data-chart-market-id": market.id,
12979
+ className: "flex min-w-0 flex-wrap items-center justify-between gap-x-4 gap-y-1",
12980
+ children: [
12981
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-agg-sm text-agg-foreground", children: [
12982
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12983
+ "span",
12984
+ {
12985
+ "aria-hidden": "true",
12986
+ className: "h-0 w-4 shrink-0 border-t-2",
12987
+ style: {
12988
+ borderColor: (_a2 = allSeries.find((series) => series.marketId === market.id)) == null ? void 0 : _a2.color
12989
+ }
12990
+ }
12991
+ ),
12992
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "truncate", title: market.question, children: market.question })
12993
+ ] }),
12994
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "agg-outcome-switch flex max-w-full flex-wrap gap-1 rounded-agg-full bg-agg-secondary", children: allSeries.filter((series) => series.marketId === market.id).map((series) => {
12995
+ const value = !activeIds.has(series.id) ? labels.eventItemDetails.comparisonHiddenSeries : series.pending ? labels.common.loading : series.points.length === 0 ? labels.eventItemDetails.marketHistoryUnavailable : formatDefaultChartValue(
12996
+ series.current != null ? series.current * 100 : series.points.at(-1).value
12997
+ );
12998
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12999
+ "button",
13000
+ {
13001
+ type: "button",
13002
+ "data-chart-outcome-id": series.id,
13003
+ "aria-label": `${series.label} ${value}`,
13004
+ "aria-pressed": activeIds.has(series.id),
13005
+ title: `${series.label} ${value}`,
13006
+ className: "cursor-pointer rounded-agg-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
13007
+ onClick: (event) => {
13008
+ event.preventDefault();
13009
+ event.stopPropagation();
13010
+ const next = new Set(hidden);
13011
+ if (next.has(series.id)) next.delete(series.id);
13012
+ else next.add(series.id);
13013
+ setSelection({ defaultVenue, venue, hidden: next });
13014
+ },
13015
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
13016
+ Badge,
13017
+ {
13018
+ text: `${series.outcomeLabel} ${value}`,
13019
+ size: "large",
13020
+ isActive: activeIds.has(series.id),
13021
+ classNames: { root: "h-8 w-36 border px-4 tabular-nums md:h-9" }
13022
+ }
13023
+ )
13024
+ },
13025
+ series.id
13026
+ );
13027
+ }) })
13028
+ ]
13038
13029
  },
13039
- className: "flex max-w-full cursor-pointer items-center gap-2 rounded-agg-sm py-1 text-agg-sm text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-default disabled:opacity-50",
13040
- style: { opacity: activeIds.has(series.id) ? 1 : 0.4 },
13041
- children: [
13042
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
13043
- "span",
13044
- {
13045
- "aria-hidden": "true",
13046
- className: "h-0 w-4 shrink-0 border-t-2",
13047
- style: {
13048
- borderColor: series.color,
13049
- borderTopStyle: series.lineStyle === "dashed" ? "dashed" : "solid"
13050
- }
13051
- }
13052
- ),
13053
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "min-w-0 text-left [overflow-wrap:anywhere]", children: series.label }),
13054
- series.id === page.pinnedId ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { children: labels.eventItemDetails.comparisonSelectedSeries }) : null,
13055
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("span", { className: "inline-grid shrink-0 items-center font-agg-semibold tabular-nums", children: [
13056
- [
13057
- formatDefaultChartValue(100),
13058
- formatDefaultChartValue(99.9),
13059
- labels.common.loading,
13060
- labels.eventItemDetails.comparisonHiddenSeries,
13061
- labels.eventItemDetails.marketHistoryUnavailable
13062
- ].map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
13063
- "span",
13064
- {
13065
- "aria-hidden": "true",
13066
- className: "invisible col-start-1 row-start-1 select-none",
13067
- children: value
13068
- },
13069
- index
13070
- )),
13071
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "col-start-1 row-start-1", children: !activeIds.has(series.id) ? labels.eventItemDetails.comparisonHiddenSeries : series.pending ? labels.common.loading : series.points.length === 0 ? labels.eventItemDetails.marketHistoryUnavailable : series.current != null ? formatDefaultChartValue(series.current * 100) : formatDefaultChartValue(series.points.at(-1).value) })
13072
- ] })
13073
- ]
13074
- },
13075
- series.id
13076
- ))
13030
+ market.id
13031
+ );
13032
+ })
13077
13033
  }
13078
13034
  ),
13079
13035
  visibleSeries.length === 0 && allSeries.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
@@ -13575,7 +13531,7 @@ var EventListItemDetailsContent = ({
13575
13531
  recurringMarkets,
13576
13532
  sportsLiveState
13577
13533
  }) => {
13578
- var _a, _b, _c, _d, _e, _f, _g;
13534
+ var _a, _b, _c, _d, _e, _f;
13579
13535
  const [selectedChartType, setSelectedChartType] = (0, import_react23.useState)("line");
13580
13536
  const [chartView, setChartView] = (0, import_react23.useState)(defaultChartView);
13581
13537
  const lastAppliedEventSyncKeyRef = (0, import_react23.useRef)(null);
@@ -13903,7 +13859,6 @@ var EventListItemDetailsContent = ({
13903
13859
  {
13904
13860
  markets: event.venueMarkets,
13905
13861
  defaultVenue: event.venue,
13906
- selectedOutcomeId: (tradingContext == null ? void 0 : tradingContext.selectedEventId) === event.id ? tradingContext.selectedOutcomeId : (_f = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.venueMarketOutcomes[0]) == null ? void 0 : _f.id,
13907
13862
  eventEndDate: event.endDate,
13908
13863
  contractWindow,
13909
13864
  range: chartRangeOverride != null ? chartRangeOverride : config.chart.selectedChartTimeRange,
@@ -13918,7 +13873,7 @@ var EventListItemDetailsContent = ({
13918
13873
  selectedChartType,
13919
13874
  venueInfo,
13920
13875
  venueMarkets,
13921
- selectedMarketId: (_g = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _g : null,
13876
+ selectedMarketId: (_f = scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id) != null ? _f : null,
13922
13877
  livePrices,
13923
13878
  restMidpoints,
13924
13879
  bestMidpoint,
@@ -16415,10 +16370,10 @@ var MarketDetailsList = ({
16415
16370
  MarketDetailsList.displayName = "MarketDetailsList";
16416
16371
 
16417
16372
  // src/events/list/index.tsx
16418
- var import_hooks58 = require("@agg-build/hooks");
16373
+ var import_hooks59 = require("@agg-build/hooks");
16419
16374
  var import_sdk17 = require("@agg-build/sdk");
16420
16375
  var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
16421
- var import_react31 = require("react");
16376
+ var import_react32 = require("react");
16422
16377
 
16423
16378
  // src/events/list/category-sidebar.tsx
16424
16379
  var import_react29 = require("react");
@@ -16741,8 +16696,327 @@ var EventListTabs = ({
16741
16696
  };
16742
16697
  EventListTabs.displayName = "EventListTabs";
16743
16698
 
16744
- // src/events/list/index.tsx
16699
+ // src/events/list/event-list-venue-strip.tsx
16700
+ var import_hooks58 = require("@agg-build/hooks");
16701
+ var import_react31 = require("react");
16745
16702
  var import_jsx_runtime152 = require("react/jsx-runtime");
16703
+ var TILE = 28;
16704
+ var TILE_GAP = 4;
16705
+ var CHIP = 36;
16706
+ var STRIP_INSET = 7;
16707
+ var FIT_TOLERANCE = 0.5;
16708
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? import_react31.useEffect : import_react31.useLayoutEffect;
16709
+ var isTabUnavailable = (tab) => !!tab.disabled || !!tab.isComingSoon;
16710
+ var resolveTabLabel = (tab) => tab.isComingSoon ? `${tab.label} (soon)` : tab.label;
16711
+ var StripFrame = ({
16712
+ className,
16713
+ children,
16714
+ frameRef
16715
+ }) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16716
+ "div",
16717
+ {
16718
+ ref: frameRef,
16719
+ className: cn(
16720
+ "inline-flex items-center gap-1 rounded-agg-lg border border-agg-separator bg-agg-secondary p-1.5",
16721
+ className
16722
+ ),
16723
+ children
16724
+ }
16725
+ );
16726
+ var StripTile = ({
16727
+ tab,
16728
+ isActive,
16729
+ shape,
16730
+ motionClassName,
16731
+ onSelect,
16732
+ showTooltip = true,
16733
+ isVenue = false
16734
+ }) => {
16735
+ const isUnavailable = isTabUnavailable(tab);
16736
+ const label2 = resolveTabLabel(tab);
16737
+ const isExpanded = shape === "pill" || isActive;
16738
+ const glyphClassName = cn(
16739
+ "shrink-0",
16740
+ motionClassName,
16741
+ !isActive && shape === "tile" && "opacity-70 group-hover:opacity-100"
16742
+ );
16743
+ const glyph = tab.venueLogo ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(VenueLogo, { venue: tab.venueLogo, size: "small", className: glyphClassName }) : tab.iconName ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16744
+ Icon,
16745
+ {
16746
+ name: tab.iconName,
16747
+ size: "small",
16748
+ color: "currentColor",
16749
+ className: cn(tab.iconName === "warning-filled" ? "shrink-0" : glyphClassName)
16750
+ }
16751
+ ) : null;
16752
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
16753
+ "button",
16754
+ {
16755
+ type: "button",
16756
+ "data-venue-tile": isVenue ? "" : void 0,
16757
+ "aria-pressed": isActive,
16758
+ "aria-label": label2,
16759
+ disabled: isUnavailable,
16760
+ onClick: () => onSelect == null ? void 0 : onSelect(tab.value),
16761
+ className: cn(
16762
+ "agg-venue-strip-tile group relative inline-flex h-7 shrink-0 items-center gap-1.5",
16763
+ "rounded-agg-sm font-agg-sans text-agg-sm leading-agg-5 font-agg-normal",
16764
+ "cursor-pointer disabled:cursor-not-allowed",
16765
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary/40",
16766
+ motionClassName,
16767
+ isExpanded ? "px-3" : "w-7 justify-center",
16768
+ isActive ? "bg-agg-primary/10 text-agg-primary" : "bg-transparent text-agg-foreground hover:bg-agg-secondary-hover",
16769
+ isUnavailable && "opacity-50 hover:bg-transparent"
16770
+ ),
16771
+ children: [
16772
+ glyph,
16773
+ isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "whitespace-nowrap", children: tab.label }) : null,
16774
+ !isExpanded && showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16775
+ "span",
16776
+ {
16777
+ role: "tooltip",
16778
+ className: cn(
16779
+ "pointer-events-none absolute left-1/2 top-[calc(100%+6px)] z-10 -translate-x-1/2",
16780
+ "whitespace-nowrap rounded-agg-sm border border-agg-separator bg-agg-secondary px-2 py-1",
16781
+ "text-agg-xs text-agg-foreground shadow-agg-card-hover",
16782
+ "opacity-0 transition-opacity delay-150 group-hover:opacity-100 group-focus-visible:opacity-100"
16783
+ ),
16784
+ children: label2
16785
+ }
16786
+ ) : null
16787
+ ]
16788
+ }
16789
+ );
16790
+ };
16791
+ var EventListVenueStrip = ({
16792
+ tabs,
16793
+ activeTab,
16794
+ onTabChange,
16795
+ ariaLabel,
16796
+ className,
16797
+ fullWidth = false
16798
+ }) => {
16799
+ const labels = (0, import_hooks58.useLabels)();
16800
+ const {
16801
+ features: { enableAnimations }
16802
+ } = (0, import_hooks58.useSdkUiConfig)();
16803
+ const { isLoading: isAppConfigLoading } = (0, import_hooks58.useAppConfig)();
16804
+ const resolvedTabs = useEventListTabs(tabs);
16805
+ const wrapRef = (0, import_react31.useRef)(null);
16806
+ const ghostRef = (0, import_react31.useRef)(null);
16807
+ const [fit, setFit] = (0, import_react31.useState)(null);
16808
+ const [isListOpen, setIsListOpen] = (0, import_react31.useState)(false);
16809
+ const motionClassName = getMotionClassName(
16810
+ enableAnimations,
16811
+ "transition-[color,background-color,opacity] duration-200 motion-reduce:transition-none"
16812
+ );
16813
+ const modeTabs = (0, import_react31.useMemo)(() => resolvedTabs.filter((tab) => !tab.venueLogo), [resolvedTabs]);
16814
+ const venueTabs = (0, import_react31.useMemo)(() => resolvedTabs.filter((tab) => !!tab.venueLogo), [resolvedTabs]);
16815
+ const activeVenueIndex = venueTabs.findIndex((tab) => tab.value === activeTab);
16816
+ (0, import_react31.useEffect)(() => {
16817
+ if (isAppConfigLoading) return;
16818
+ const fallbackTab = resolvedTabs.find((tab) => !isTabUnavailable(tab));
16819
+ if (!fallbackTab) return;
16820
+ if (resolvedTabs.some((tab) => tab.value === activeTab && !isTabUnavailable(tab))) return;
16821
+ onTabChange(fallbackTab.value);
16822
+ }, [activeTab, isAppConfigLoading, onTabChange, resolvedTabs]);
16823
+ useIsomorphicLayoutEffect(() => {
16824
+ const wrap = wrapRef.current;
16825
+ const ghost = ghostRef.current;
16826
+ if (!wrap || !ghost) return;
16827
+ const measure = () => {
16828
+ const available = wrap.getBoundingClientRect().width;
16829
+ const strip = ghost.getBoundingClientRect();
16830
+ if (strip.width <= available + FIT_TOLERANCE) {
16831
+ setFit(null);
16832
+ return;
16833
+ }
16834
+ const firstTile = ghost.querySelector("[data-venue-tile]");
16835
+ if (!firstTile) {
16836
+ setFit(null);
16837
+ return;
16838
+ }
16839
+ const activeTile = ghost.querySelector('[data-venue-tile][aria-pressed="true"]');
16840
+ const room = strip.right - STRIP_INSET - firstTile.getBoundingClientRect().left - (strip.width - available);
16841
+ const activeWidth = activeTile ? activeTile.getBoundingClientRect().width + TILE_GAP : 0;
16842
+ const plain = Math.max(0, Math.floor((room - CHIP - activeWidth) / (TILE + TILE_GAP)));
16843
+ setFit(plain + (activeTile ? 1 : 0));
16844
+ };
16845
+ measure();
16846
+ if (typeof ResizeObserver === "undefined") return;
16847
+ const observer = new ResizeObserver(measure);
16848
+ observer.observe(wrap);
16849
+ observer.observe(ghost);
16850
+ return () => {
16851
+ observer.disconnect();
16852
+ };
16853
+ }, [venueTabs, activeVenueIndex, fullWidth]);
16854
+ (0, import_react31.useEffect)(() => {
16855
+ if (!isListOpen) return;
16856
+ const handlePointerDown = (event) => {
16857
+ var _a;
16858
+ if (!((_a = wrapRef.current) == null ? void 0 : _a.contains(event.target))) setIsListOpen(false);
16859
+ };
16860
+ const handleKeyDown = (event) => {
16861
+ if (event.key === "Escape") setIsListOpen(false);
16862
+ };
16863
+ document.addEventListener("mousedown", handlePointerDown);
16864
+ document.addEventListener("keydown", handleKeyDown);
16865
+ return () => {
16866
+ document.removeEventListener("mousedown", handlePointerDown);
16867
+ document.removeEventListener("keydown", handleKeyDown);
16868
+ };
16869
+ }, [isListOpen]);
16870
+ const shownVenueTabs = (0, import_react31.useMemo)(() => {
16871
+ if (fit === null) return venueTabs;
16872
+ if (activeVenueIndex >= fit) {
16873
+ const activeVenueTab = venueTabs[activeVenueIndex];
16874
+ return activeVenueTab ? [...venueTabs.slice(0, Math.max(0, fit - 1)), activeVenueTab] : venueTabs.slice(0, fit);
16875
+ }
16876
+ return venueTabs.slice(0, fit);
16877
+ }, [activeVenueIndex, fit, venueTabs]);
16878
+ const foldedVenueTabs = (0, import_react31.useMemo)(
16879
+ () => venueTabs.filter((tab) => !shownVenueTabs.includes(tab)),
16880
+ [shownVenueTabs, venueTabs]
16881
+ );
16882
+ const foldedCount = foldedVenueTabs.length;
16883
+ const modeShape = fullWidth ? "tile" : "pill";
16884
+ const separator = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "mx-0.5 h-4 w-px shrink-0 bg-agg-separator", "aria-hidden": true });
16885
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
16886
+ "div",
16887
+ {
16888
+ ref: wrapRef,
16889
+ className: cn(
16890
+ "agg-venue-strip relative flex min-w-0 max-w-full flex-col items-end",
16891
+ fullWidth && "w-full",
16892
+ className
16893
+ ),
16894
+ children: [
16895
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", __spreadProps(__spreadValues({ "aria-hidden": true }, { inert: "" }), { className: "h-0 w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(StripFrame, { frameRef: ghostRef, className: "w-max", children: [
16896
+ modeTabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16897
+ StripTile,
16898
+ {
16899
+ tab,
16900
+ isActive: tab.value === activeTab,
16901
+ shape: modeShape,
16902
+ showTooltip: false
16903
+ },
16904
+ tab.value
16905
+ )),
16906
+ venueTabs.length > 0 && modeTabs.length > 0 ? separator : null,
16907
+ venueTabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16908
+ StripTile,
16909
+ {
16910
+ tab,
16911
+ isActive: tab.value === activeTab,
16912
+ shape: "tile",
16913
+ showTooltip: false,
16914
+ isVenue: true
16915
+ },
16916
+ tab.value
16917
+ ))
16918
+ ] }) })),
16919
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(StripFrame, { className: cn("agg-venue-strip-bar relative", fullWidth && "w-full"), children: [
16920
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { role: "group", "aria-label": ariaLabel, className: "contents", children: [
16921
+ modeTabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16922
+ StripTile,
16923
+ {
16924
+ tab,
16925
+ isActive: tab.value === activeTab,
16926
+ shape: modeShape,
16927
+ motionClassName,
16928
+ showTooltip: false,
16929
+ onSelect: onTabChange
16930
+ },
16931
+ tab.value
16932
+ )),
16933
+ venueTabs.length > 0 && modeTabs.length > 0 ? separator : null,
16934
+ shownVenueTabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16935
+ StripTile,
16936
+ {
16937
+ tab,
16938
+ isActive: tab.value === activeTab,
16939
+ shape: "tile",
16940
+ motionClassName,
16941
+ onSelect: onTabChange,
16942
+ isVenue: true
16943
+ },
16944
+ tab.value
16945
+ ))
16946
+ ] }),
16947
+ foldedCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
16948
+ "button",
16949
+ {
16950
+ type: "button",
16951
+ "aria-haspopup": "listbox",
16952
+ "aria-expanded": isListOpen,
16953
+ "aria-label": labels.eventList.moreVenuesAria(foldedCount),
16954
+ onClick: () => setIsListOpen((open) => !open),
16955
+ className: cn(
16956
+ "agg-venue-strip-more inline-flex h-7 w-9 shrink-0 items-center justify-center",
16957
+ "rounded-agg-sm font-agg-sans text-agg-xs tabular-nums cursor-pointer",
16958
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary/40",
16959
+ motionClassName,
16960
+ fullWidth && "ml-auto",
16961
+ isListOpen ? "bg-agg-secondary-hover text-agg-foreground" : "text-agg-foreground/70 hover:bg-agg-secondary-hover hover:text-agg-foreground"
16962
+ ),
16963
+ children: [
16964
+ "+",
16965
+ foldedCount
16966
+ ]
16967
+ }
16968
+ ) : null
16969
+ ] }),
16970
+ isListOpen ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
16971
+ "div",
16972
+ {
16973
+ role: "listbox",
16974
+ "aria-label": labels.eventList.moreVenuesListAria,
16975
+ className: cn(
16976
+ "agg-venue-strip-list absolute right-0 top-[calc(100%+6px)] z-20 flex flex-col",
16977
+ "rounded-agg-lg border border-agg-separator bg-agg-secondary p-1.5 shadow-agg-card-hover",
16978
+ fullWidth ? "left-0" : "w-[248px]"
16979
+ ),
16980
+ children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "flex max-h-[352px] flex-col overflow-y-auto", children: foldedVenueTabs.map((tab) => {
16981
+ const isActive = tab.value === activeTab;
16982
+ const isUnavailable = isTabUnavailable(tab);
16983
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
16984
+ "button",
16985
+ {
16986
+ type: "button",
16987
+ role: "option",
16988
+ "aria-selected": isActive,
16989
+ "aria-disabled": isUnavailable || void 0,
16990
+ disabled: isUnavailable,
16991
+ onClick: () => {
16992
+ onTabChange(tab.value);
16993
+ setIsListOpen(false);
16994
+ },
16995
+ className: cn(
16996
+ "flex h-8 shrink-0 items-center gap-2.5 rounded-agg-sm px-2.5",
16997
+ "font-agg-sans text-agg-sm leading-agg-5 cursor-pointer disabled:cursor-not-allowed",
16998
+ motionClassName,
16999
+ isActive ? "bg-agg-primary/10 text-agg-primary" : "text-agg-foreground hover:bg-agg-secondary-hover",
17000
+ isUnavailable && "opacity-50 hover:bg-transparent"
17001
+ ),
17002
+ children: [
17003
+ tab.iconName === "warning-filled" ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: "warning-filled", size: "small", color: "currentColor" }) : tab.venueLogo ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(VenueLogo, { venue: tab.venueLogo, size: "small", className: "shrink-0" }) : null,
17004
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "flex-1 truncate text-left", children: resolveTabLabel(tab) })
17005
+ ]
17006
+ },
17007
+ tab.value
17008
+ );
17009
+ }) })
17010
+ }
17011
+ ) : null
17012
+ ]
17013
+ }
17014
+ );
17015
+ };
17016
+ EventListVenueStrip.displayName = "EventListVenueStrip";
17017
+
17018
+ // src/events/list/index.tsx
17019
+ var import_jsx_runtime153 = require("react/jsx-runtime");
16746
17020
  var SORT_ICON_BY_VALUE = {
16747
17021
  volume24hr: "sort-volume-24hr",
16748
17022
  topArbitrage: "sort-top-arbitrage",
@@ -16803,69 +17077,69 @@ var EventList = ({
16803
17077
  stateRef
16804
17078
  }) => {
16805
17079
  var _a, _b, _c, _d, _e, _f;
16806
- const labels = (0, import_hooks58.useLabels)();
16807
- const { disabledVenues } = (0, import_hooks58.useAppConfig)();
17080
+ const labels = (0, import_hooks59.useLabels)();
17081
+ const { disabledVenues } = (0, import_hooks59.useAppConfig)();
16808
17082
  const {
16809
17083
  features: { enableVenueEventDiscoveryFilters, showSportsMarkets }
16810
- } = (0, import_hooks58.useSdkUiConfig)();
17084
+ } = (0, import_hooks59.useSdkUiConfig)();
16811
17085
  const isDiscoveryFiltersEnabled = enableVenueEventDiscoveryFilters && !search;
16812
17086
  const resolvedTabs = useEventListTabs();
16813
- const visibleVenues = (0, import_react31.useMemo)(
16814
- () => disabledVenues.length === 0 ? void 0 : (0, import_hooks58.getVisibleVenueIdsByConfig)(import_sdk17.VENUES, disabledVenues),
17087
+ const visibleVenues = (0, import_react32.useMemo)(
17088
+ () => disabledVenues.length === 0 ? void 0 : (0, import_hooks59.getVisibleVenueIdsByConfig)(import_sdk17.VENUES, disabledVenues),
16815
17089
  [disabledVenues]
16816
17090
  );
16817
- const [internalActiveTabValue, setInternalActiveTabValue] = (0, import_react31.useState)(
17091
+ const [internalActiveTabValue, setInternalActiveTabValue] = (0, import_react32.useState)(
16818
17092
  (_b = initialVenueTab != null ? initialVenueTab : (_a = resolvedTabs[0]) == null ? void 0 : _a.value) != null ? _b : "matched"
16819
17093
  );
16820
17094
  const activeTabValue = controlledActiveVenueTab != null ? controlledActiveVenueTab : internalActiveTabValue;
16821
- const [internalSelectedSort, setInternalSelectedSort] = (0, import_react31.useState)(DEFAULT_EVENT_LIST_SORT);
17095
+ const [internalSelectedSort, setInternalSelectedSort] = (0, import_react32.useState)(DEFAULT_EVENT_LIST_SORT);
16822
17096
  const selectedSort = controlledSelectedSort != null ? controlledSelectedSort : internalSelectedSort;
16823
- const [isSubcategoriesModalOpen, setIsSubcategoriesModalOpen] = (0, import_react31.useState)(false);
16824
- const [internalCategoryPath, setInternalCategoryPath] = (0, import_react31.useState)([]);
17097
+ const [isSubcategoriesModalOpen, setIsSubcategoriesModalOpen] = (0, import_react32.useState)(false);
17098
+ const [internalCategoryPath, setInternalCategoryPath] = (0, import_react32.useState)([]);
16825
17099
  const categoryPath = controlledCategoryPath != null ? controlledCategoryPath : internalCategoryPath;
16826
- const [collapsedCategoryIds, setCollapsedCategoryIds] = (0, import_react31.useState)(() => /* @__PURE__ */ new Set());
16827
- const handleActiveTabChange = (0, import_react31.useCallback)(
17100
+ const [collapsedCategoryIds, setCollapsedCategoryIds] = (0, import_react32.useState)(() => /* @__PURE__ */ new Set());
17101
+ const handleActiveTabChange = (0, import_react32.useCallback)(
16828
17102
  (value) => {
16829
17103
  if (controlledActiveVenueTab == null) setInternalActiveTabValue(value);
16830
17104
  onActiveVenueTabChange == null ? void 0 : onActiveVenueTabChange(value, { history: "push" });
16831
17105
  },
16832
17106
  [controlledActiveVenueTab, onActiveVenueTabChange]
16833
17107
  );
16834
- const handleSelectedSortChange = (0, import_react31.useCallback)(
17108
+ const handleSelectedSortChange = (0, import_react32.useCallback)(
16835
17109
  (value) => {
16836
17110
  if (controlledSelectedSort == null) setInternalSelectedSort(value);
16837
17111
  onSelectedSortChange == null ? void 0 : onSelectedSortChange(value, { history: "push" });
16838
17112
  },
16839
17113
  [controlledSelectedSort, onSelectedSortChange]
16840
17114
  );
16841
- const handleCategoryPathChange = (0, import_react31.useCallback)(
17115
+ const handleCategoryPathChange = (0, import_react32.useCallback)(
16842
17116
  (value, options) => {
16843
17117
  if (controlledCategoryPath == null) setInternalCategoryPath(value);
16844
17118
  onCategoryPathChange == null ? void 0 : onCategoryPathChange(value, options);
16845
17119
  },
16846
17120
  [controlledCategoryPath, onCategoryPathChange]
16847
17121
  );
16848
- const sortItems = (0, import_react31.useMemo)(() => {
17122
+ const sortItems = (0, import_react32.useMemo)(() => {
16849
17123
  return [
16850
17124
  {
16851
17125
  value: "volume24hr",
16852
17126
  label: labels.eventList.sortBy24hVolume,
16853
- icon: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: SORT_ICON_BY_VALUE.volume24hr, size: "small", color: "currentColor" })
17127
+ icon: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: SORT_ICON_BY_VALUE.volume24hr, size: "small", color: "currentColor" })
16854
17128
  },
16855
17129
  {
16856
17130
  value: "topArbitrage",
16857
17131
  label: labels.eventList.sortByTopArbitrage,
16858
- icon: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: SORT_ICON_BY_VALUE.topArbitrage, size: "small", color: "currentColor" })
17132
+ icon: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: SORT_ICON_BY_VALUE.topArbitrage, size: "small", color: "currentColor" })
16859
17133
  },
16860
17134
  {
16861
17135
  value: "volume",
16862
17136
  label: labels.eventList.sortByTotalVolume,
16863
- icon: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: SORT_ICON_BY_VALUE.volume, size: "small", color: "currentColor" })
17137
+ icon: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: SORT_ICON_BY_VALUE.volume, size: "small", color: "currentColor" })
16864
17138
  },
16865
17139
  {
16866
17140
  value: "endDate",
16867
17141
  label: labels.eventList.sortByEndingSoon,
16868
- icon: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: SORT_ICON_BY_VALUE.endDate, size: "small", color: "currentColor" })
17142
+ icon: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: SORT_ICON_BY_VALUE.endDate, size: "small", color: "currentColor" })
16869
17143
  }
16870
17144
  ];
16871
17145
  }, [
@@ -16875,8 +17149,8 @@ var EventList = ({
16875
17149
  labels.eventList.sortByTotalVolume
16876
17150
  ]);
16877
17151
  const baseCategoryId = (_c = categoryIds == null ? void 0 : categoryIds[0]) != null ? _c : null;
16878
- const previousBaseCategoryIdRef = (0, import_react31.useRef)(baseCategoryId);
16879
- (0, import_react31.useEffect)(() => {
17152
+ const previousBaseCategoryIdRef = (0, import_react32.useRef)(baseCategoryId);
17153
+ (0, import_react32.useEffect)(() => {
16880
17154
  var _a2, _b2;
16881
17155
  if (previousBaseCategoryIdRef.current === baseCategoryId) return;
16882
17156
  previousBaseCategoryIdRef.current = baseCategoryId;
@@ -16895,15 +17169,15 @@ var EventList = ({
16895
17169
  isDiscoveryFiltersEnabled,
16896
17170
  resolvedTabs
16897
17171
  ]);
16898
- const { categories: topLevelCategories } = (0, import_hooks58.useCategories)({
17172
+ const { categories: topLevelCategories } = (0, import_hooks59.useCategories)({
16899
17173
  queryKeyScope: "event-list-top-categories",
16900
17174
  enabled: isDiscoveryFiltersEnabled,
16901
17175
  limit: 100
16902
17176
  });
16903
- const sortedTopLevelCategories = (0, import_react31.useMemo)(() => {
17177
+ const sortedTopLevelCategories = (0, import_react32.useMemo)(() => {
16904
17178
  return sortCategoriesForNavigation(topLevelCategories);
16905
17179
  }, [topLevelCategories]);
16906
- const baseCategoryChildPrefetchIds = (0, import_react31.useMemo)(() => {
17180
+ const baseCategoryChildPrefetchIds = (0, import_react32.useMemo)(() => {
16907
17181
  return Array.from(
16908
17182
  /* @__PURE__ */ new Set([
16909
17183
  ...baseCategoryId ? [baseCategoryId] : [],
@@ -16912,13 +17186,13 @@ var EventList = ({
16912
17186
  ])
16913
17187
  );
16914
17188
  }, [baseCategoryId, categoryPath, sortedTopLevelCategories]);
16915
- const { childrenByParentId: baseChildrenByParentId, isLoading: isBaseCategoryChildrenLoading } = (0, import_hooks58.useCategoryChildren)({
17189
+ const { childrenByParentId: baseChildrenByParentId, isLoading: isBaseCategoryChildrenLoading } = (0, import_hooks59.useCategoryChildren)({
16916
17190
  queryKeyScope: "event-list-category-children",
16917
17191
  enabled: isDiscoveryFiltersEnabled,
16918
17192
  parentIds: baseCategoryChildPrefetchIds,
16919
17193
  limit: 100
16920
17194
  });
16921
- const visibleChildPrefetchIds = (0, import_react31.useMemo)(() => {
17195
+ const visibleChildPrefetchIds = (0, import_react32.useMemo)(() => {
16922
17196
  var _a2, _b2;
16923
17197
  const ids = /* @__PURE__ */ new Set();
16924
17198
  if (baseCategoryId) {
@@ -16933,13 +17207,13 @@ var EventList = ({
16933
17207
  }
16934
17208
  return Array.from(ids);
16935
17209
  }, [baseCategoryId, baseChildrenByParentId, categoryPath]);
16936
- const { childrenByParentId: visibleChildrenByParentId } = (0, import_hooks58.useCategoryChildren)({
17210
+ const { childrenByParentId: visibleChildrenByParentId } = (0, import_hooks59.useCategoryChildren)({
16937
17211
  queryKeyScope: "event-list-category-children",
16938
17212
  enabled: isDiscoveryFiltersEnabled,
16939
17213
  parentIds: visibleChildPrefetchIds,
16940
17214
  limit: 100
16941
17215
  });
16942
- const visibleGrandchildPrefetchIds = (0, import_react31.useMemo)(() => {
17216
+ const visibleGrandchildPrefetchIds = (0, import_react32.useMemo)(() => {
16943
17217
  var _a2;
16944
17218
  const ids = /* @__PURE__ */ new Set();
16945
17219
  for (const expandedCategory of categoryPath) {
@@ -16949,13 +17223,13 @@ var EventList = ({
16949
17223
  }
16950
17224
  return Array.from(ids);
16951
17225
  }, [categoryPath, visibleChildrenByParentId]);
16952
- const { childrenByParentId: visibleGrandchildrenByParentId } = (0, import_hooks58.useCategoryChildren)({
17226
+ const { childrenByParentId: visibleGrandchildrenByParentId } = (0, import_hooks59.useCategoryChildren)({
16953
17227
  queryKeyScope: "event-list-category-children",
16954
17228
  enabled: isDiscoveryFiltersEnabled,
16955
17229
  parentIds: visibleGrandchildPrefetchIds,
16956
17230
  limit: 100
16957
17231
  });
16958
- const childrenByParentId = (0, import_react31.useMemo)(() => {
17232
+ const childrenByParentId = (0, import_react32.useMemo)(() => {
16959
17233
  return new Map([
16960
17234
  ...baseChildrenByParentId,
16961
17235
  ...visibleChildrenByParentId,
@@ -16964,10 +17238,10 @@ var EventList = ({
16964
17238
  }, [baseChildrenByParentId, visibleChildrenByParentId, visibleGrandchildrenByParentId]);
16965
17239
  const controlledCategoryPathKey = (_d = controlledCategoryPath == null ? void 0 : controlledCategoryPath.map((entry) => entry.id).join(",")) != null ? _d : "";
16966
17240
  const controlledCategoryPathValidationKey = `${baseCategoryId != null ? baseCategoryId : ""}|${controlledCategoryPathKey}`;
16967
- const [validatedCategoryPathKey, setValidatedCategoryPathKey] = (0, import_react31.useState)(
17241
+ const [validatedCategoryPathKey, setValidatedCategoryPathKey] = (0, import_react32.useState)(
16968
17242
  () => controlledCategoryPath == null || controlledCategoryPath.length === 0 ? controlledCategoryPathValidationKey : ""
16969
17243
  );
16970
- (0, import_react31.useEffect)(() => {
17244
+ (0, import_react32.useEffect)(() => {
16971
17245
  if (controlledCategoryPath == null || controlledCategoryPath.length === 0) {
16972
17246
  setValidatedCategoryPathKey(controlledCategoryPathValidationKey);
16973
17247
  return;
@@ -16992,33 +17266,33 @@ var EventList = ({
16992
17266
  isBaseCategoryChildrenLoading
16993
17267
  ]);
16994
17268
  const shouldRenderSubcategoryFilters = isDiscoveryFiltersEnabled && baseCategoryId !== null && (((_f = (_e = childrenByParentId.get(baseCategoryId)) == null ? void 0 : _e.length) != null ? _f : 0) > 0 || categoryPath.length > 0);
16995
- const baseCategoryEventCount = (0, import_react31.useMemo)(() => {
17269
+ const baseCategoryEventCount = (0, import_react32.useMemo)(() => {
16996
17270
  var _a2, _b2;
16997
17271
  return (_b2 = (_a2 = sortedTopLevelCategories.find((c) => c.id === baseCategoryId)) == null ? void 0 : _a2.eventCount) != null ? _b2 : 0;
16998
17272
  }, [baseCategoryId, sortedTopLevelCategories]);
16999
- const resolvedCategoryIds = (0, import_react31.useMemo)(() => {
17273
+ const resolvedCategoryIds = (0, import_react32.useMemo)(() => {
17000
17274
  if (!isDiscoveryFiltersEnabled) return categoryIds;
17001
17275
  return resolveCategoryIdsFromPath(categoryPath, baseCategoryId ? [baseCategoryId] : void 0);
17002
17276
  }, [baseCategoryId, categoryIds, categoryPath, isDiscoveryFiltersEnabled]);
17003
- const sortQueryParams = (0, import_react31.useMemo)(() => {
17277
+ const sortQueryParams = (0, import_react32.useMemo)(() => {
17004
17278
  return resolveSortQueryParams(selectedSort);
17005
17279
  }, [selectedSort]);
17006
- const activeTab = (0, import_react31.useMemo)(() => {
17280
+ const activeTab = (0, import_react32.useMemo)(() => {
17007
17281
  return resolvedTabs.find((tab) => tab.value === activeTabValue);
17008
17282
  }, [activeTabValue, resolvedTabs]);
17009
- const venues = (0, import_react31.useMemo)(() => {
17283
+ const venues = (0, import_react32.useMemo)(() => {
17010
17284
  return resolveTabVenus(activeTab, visibleVenues);
17011
17285
  }, [activeTab, visibleVenues]);
17012
- const matchStatus = (0, import_react31.useMemo)(() => {
17286
+ const matchStatus = (0, import_react32.useMemo)(() => {
17013
17287
  return activeTabValue === "matched" ? activeTab == null ? void 0 : activeTab.matchStatus : void 0;
17014
17288
  }, [activeTabValue, activeTab]);
17015
- const resolvedMaxVisibleItems = (0, import_react31.useMemo)(() => {
17289
+ const resolvedMaxVisibleItems = (0, import_react32.useMemo)(() => {
17016
17290
  if (!Number.isFinite(maxVisibleItems)) return void 0;
17017
17291
  return Math.max(1, Math.floor(maxVisibleItems));
17018
17292
  }, [maxVisibleItems]);
17019
17293
  const requestLimit = resolvedMaxVisibleItems != null ? resolvedMaxVisibleItems : limit;
17020
17294
  const shouldPaginate = resolvedMaxVisibleItems == null;
17021
- const endDateFrom = (0, import_react31.useMemo)(() => {
17295
+ const endDateFrom = (0, import_react32.useMemo)(() => {
17022
17296
  if (search) return void 0;
17023
17297
  const BUCKET_MINUTES = 5;
17024
17298
  const bucket = /* @__PURE__ */ new Date();
@@ -17034,14 +17308,14 @@ var EventList = ({
17034
17308
  isFetchingNextPage,
17035
17309
  isPlaceholderData,
17036
17310
  loadedPageCount
17037
- } = (0, import_hooks58.useVenueEvents)({
17311
+ } = (0, import_hooks59.useVenueEvents)({
17038
17312
  queryKeyScope: "event-list",
17039
17313
  venues,
17040
17314
  search,
17041
17315
  categoryIds: resolvedCategoryIds,
17042
17316
  matchStatus,
17043
17317
  limit: requestLimit,
17044
- status: [import_hooks58.MarketStatus.open],
17318
+ status: [import_hooks59.MarketStatus.open],
17045
17319
  sortBy: sortQueryParams.sortBy,
17046
17320
  sortDir: sortQueryParams.sortDir,
17047
17321
  endDateFrom,
@@ -17052,32 +17326,32 @@ var EventList = ({
17052
17326
  initialPages: initialLoadedPageCount,
17053
17327
  enabled: controlledCategoryPath == null || validatedCategoryPathKey === controlledCategoryPathValidationKey
17054
17328
  });
17055
- (0, import_react31.useEffect)(() => {
17329
+ (0, import_react32.useEffect)(() => {
17056
17330
  if (stateRef) {
17057
17331
  stateRef.current = { venueTab: activeTabValue, loadedPageCount };
17058
17332
  }
17059
17333
  }, [stateRef, activeTabValue, loadedPageCount]);
17060
- const filteredEvents = (0, import_react31.useMemo)(() => {
17334
+ const filteredEvents = (0, import_react32.useMemo)(() => {
17061
17335
  return filterEventsByTabValue(events, activeTabValue);
17062
17336
  }, [events, activeTabValue]);
17063
- const groupedEvents = (0, import_react31.useMemo)(() => {
17337
+ const groupedEvents = (0, import_react32.useMemo)(() => {
17064
17338
  return splitEventsByLifecycle(filteredEvents);
17065
17339
  }, [filteredEvents]);
17066
- const orderedEvents = (0, import_react31.useMemo)(() => {
17340
+ const orderedEvents = (0, import_react32.useMemo)(() => {
17067
17341
  return groupedEvents.open;
17068
17342
  }, [groupedEvents.open]);
17069
- const tileEvents = (0, import_react31.useMemo)(() => {
17343
+ const tileEvents = (0, import_react32.useMemo)(() => {
17070
17344
  const normalizedEvents = orderedEvents.map((event) => mapEventToEventListItemEvent(event)).filter((event) => event != null);
17071
17345
  if (resolvedMaxVisibleItems == null) return normalizedEvents;
17072
17346
  return normalizedEvents.slice(0, resolvedMaxVisibleItems);
17073
17347
  }, [orderedEvents, resolvedMaxVisibleItems]);
17074
- const visibleVenueMarkets = (0, import_react31.useMemo)(() => {
17348
+ const visibleVenueMarkets = (0, import_react32.useMemo)(() => {
17075
17349
  return collectEventListVenueMarkets(tileEvents);
17076
17350
  }, [tileEvents]);
17077
- const visibleMidpointVenueMarketIds = (0, import_react31.useMemo)(() => {
17351
+ const visibleMidpointVenueMarketIds = (0, import_react32.useMemo)(() => {
17078
17352
  return collectMidpointVenueMarketIds(visibleVenueMarkets);
17079
17353
  }, [visibleVenueMarkets]);
17080
- const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0, import_hooks58.useVenueMarketMidpoints)({
17354
+ const { midpointRows: sharedMidpointRows, isLoading: isSharedMidpointsLoading } = (0, import_hooks59.useVenueMarketMidpoints)({
17081
17355
  venueMarketIds: visibleMidpointVenueMarketIds,
17082
17356
  enabled: visibleMidpointVenueMarketIds.length > 0
17083
17357
  });
@@ -17085,8 +17359,8 @@ var EventList = ({
17085
17359
  const shouldRenderEmptyState = !isLoading && !isError && tileEvents.length === 0;
17086
17360
  const placeholderSkeletonCount = isPlaceholderData ? Math.min(Math.max(tileEvents.length, PLACEHOLDER_SKELETON_MIN_ITEMS), requestLimit) : 0;
17087
17361
  const shouldRenderPaginationLoadingItems = shouldPaginate && hasNextPage && !isPlaceholderData;
17088
- const loadMoreRef = (0, import_react31.useRef)(null);
17089
- (0, import_react31.useEffect)(() => {
17362
+ const loadMoreRef = (0, import_react32.useRef)(null);
17363
+ (0, import_react32.useEffect)(() => {
17090
17364
  if (!shouldPaginate) return;
17091
17365
  if (!hasNextPage) return;
17092
17366
  if (typeof IntersectionObserver === "undefined") return;
@@ -17137,7 +17411,7 @@ var EventList = ({
17137
17411
  onCategoryRootChange == null ? void 0 : onCategoryRootChange(baseCategoryId != null ? baseCategoryId : void 0);
17138
17412
  };
17139
17413
  if (shouldRenderLoadingState) {
17140
- return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17414
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17141
17415
  Skeleton,
17142
17416
  {
17143
17417
  view: "event-list",
@@ -17146,8 +17420,8 @@ var EventList = ({
17146
17420
  }
17147
17421
  );
17148
17422
  }
17149
- return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("section", { className: "agg-event-list flex w-full flex-col gap-2 md:gap-5 t", children: [
17150
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
17423
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("section", { className: "agg-event-list flex w-full flex-col gap-2 md:gap-5 t", children: [
17424
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
17151
17425
  "header",
17152
17426
  {
17153
17427
  className: cn(
@@ -17156,19 +17430,18 @@ var EventList = ({
17156
17430
  "gap-2 sm:flex-row sm:items-center sm:gap-4"
17157
17431
  ),
17158
17432
  children: [
17159
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "agg-event-list-title min-w-32", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Typography, { as: "h2", variant: "title", className: "truncate first-letter:uppercase", children: title2 }) }),
17160
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "hidden min-w-0 max-w-full items-center gap-3 md:flex", children: [
17161
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17162
- EventListTabs,
17433
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "agg-event-list-title min-w-32", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Typography, { as: "h2", variant: "title", className: "truncate first-letter:uppercase", children: title2 }) }),
17434
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "hidden min-w-0 max-w-full items-center gap-3 md:flex", children: [
17435
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17436
+ EventListVenueStrip,
17163
17437
  {
17164
17438
  ariaLabel: labels.eventList.tabsAria(title2),
17165
- className: "agg-event-list-tabs min-w-0 flex-1 max-w-[600px]!",
17439
+ className: "agg-event-list-tabs",
17166
17440
  activeTab: activeTabValue,
17167
- onTabChange: handleActiveTabChange,
17168
- overflowBehavior: "scroll"
17441
+ onTabChange: handleActiveTabChange
17169
17442
  }
17170
17443
  ),
17171
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17444
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17172
17445
  Select,
17173
17446
  {
17174
17447
  ariaLabel: labels.eventList.sortByLabel,
@@ -17184,18 +17457,18 @@ var EventList = ({
17184
17457
  ]
17185
17458
  }
17186
17459
  ),
17187
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "flex w-full gap-2 md:hidden mb-3", children: [
17188
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17189
- EventListTabs,
17190
- {
17191
- ariaLabel: labels.eventList.tabsAria(title2),
17192
- className: "agg-event-list-tabs min-w-0 flex-1",
17193
- activeTab: activeTabValue,
17194
- onTabChange: handleActiveTabChange,
17195
- overflowBehavior: "select"
17196
- }
17197
- ),
17198
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17460
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17461
+ EventListVenueStrip,
17462
+ {
17463
+ ariaLabel: labels.eventList.tabsAria(title2),
17464
+ className: "agg-event-list-tabs md:hidden!",
17465
+ activeTab: activeTabValue,
17466
+ onTabChange: handleActiveTabChange,
17467
+ fullWidth: true
17468
+ }
17469
+ ),
17470
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex w-full gap-2 md:hidden mb-3", children: [
17471
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17199
17472
  Select,
17200
17473
  {
17201
17474
  ariaLabel: labels.eventList.sortByLabel,
@@ -17206,23 +17479,23 @@ var EventList = ({
17206
17479
  contentClassName: "rounded-[12px] py-2 shadow-[0_8px_16px_rgba(0,0,0,0.1)]"
17207
17480
  }
17208
17481
  ),
17209
- shouldRenderSubcategoryFilters ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17482
+ shouldRenderSubcategoryFilters ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17210
17483
  "button",
17211
17484
  {
17212
17485
  type: "button",
17213
17486
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-[8px] border-2 border-agg-primary bg-agg-secondary text-agg-foreground cursor-pointer",
17214
17487
  "aria-label": labels.eventList.subcategoriesOpenAria,
17215
17488
  onClick: () => setIsSubcategoriesModalOpen(true),
17216
- children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: "apps", size: "small", color: "currentColor" })
17489
+ children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: "apps", size: "small", color: "currentColor" })
17217
17490
  }
17218
17491
  ) : null
17219
17492
  ] }),
17220
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
17493
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
17221
17494
  "div",
17222
17495
  {
17223
17496
  className: cn("flex w-full gap-6", shouldRenderSubcategoryFilters ? "md:items-start" : ""),
17224
17497
  children: [
17225
- shouldRenderSubcategoryFilters ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("aside", { className: "hidden w-[200px] shrink-0 md:block self-start sticky top-4", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "agg-sidebar max-h-[calc(100vh-19rem)] overflow-y-auto rounded-[8px] border border-agg-separator bg-agg-secondary p-2", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17498
+ shouldRenderSubcategoryFilters ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("aside", { className: "hidden w-[200px] shrink-0 md:block self-start sticky top-4", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "agg-sidebar max-h-[calc(100vh-19rem)] overflow-y-auto rounded-[8px] border border-agg-separator bg-agg-secondary p-2", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17226
17499
  CategorySidebar,
17227
17500
  {
17228
17501
  baseCategoryId,
@@ -17235,7 +17508,7 @@ var EventList = ({
17235
17508
  onToggleCategory: handleToggleSubcategory
17236
17509
  }
17237
17510
  ) }) }) : null,
17238
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
17511
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
17239
17512
  "div",
17240
17513
  {
17241
17514
  className: cn(
@@ -17245,7 +17518,7 @@ var EventList = ({
17245
17518
  gridClassName
17246
17519
  ),
17247
17520
  children: [
17248
- isPlaceholderData ? Array.from({ length: placeholderSkeletonCount }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17521
+ isPlaceholderData ? Array.from({ length: placeholderSkeletonCount }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17249
17522
  EventListItem,
17250
17523
  {
17251
17524
  isLoading: true,
@@ -17255,7 +17528,7 @@ var EventList = ({
17255
17528
  },
17256
17529
  `placeholder-${index}`
17257
17530
  )) : null,
17258
- (isPlaceholderData ? [] : tileEvents).map((event) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17531
+ (isPlaceholderData ? [] : tileEvents).map((event) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17259
17532
  EventListItem,
17260
17533
  {
17261
17534
  event,
@@ -17268,11 +17541,11 @@ var EventList = ({
17268
17541
  onMarketClick,
17269
17542
  getMarketHref,
17270
17543
  href: getEventHref == null ? void 0 : getEventHref(event),
17271
- marketStatus: import_hooks58.MarketStatus.open
17544
+ marketStatus: import_hooks59.MarketStatus.open
17272
17545
  },
17273
17546
  event.id
17274
17547
  )),
17275
- shouldRenderPaginationLoadingItems ? Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17548
+ shouldRenderPaginationLoadingItems ? Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17276
17549
  EventListItem,
17277
17550
  {
17278
17551
  isLoading: true,
@@ -17282,20 +17555,20 @@ var EventList = ({
17282
17555
  },
17283
17556
  `loading-${index}`
17284
17557
  )) : null,
17285
- shouldRenderEmptyState ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "col-span-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17558
+ shouldRenderEmptyState ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "col-span-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17286
17559
  StateMessage,
17287
17560
  {
17288
17561
  title: labels.eventList.emptyTitle,
17289
17562
  description: labels.eventList.emptyDescription,
17290
- icon: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: "search-empty" })
17563
+ icon: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: "search-empty" })
17291
17564
  }
17292
17565
  ) }) : null,
17293
- isError ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "col-span-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17566
+ isError ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "col-span-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17294
17567
  StateMessage,
17295
17568
  {
17296
17569
  title: labels.eventList.errorTitle,
17297
17570
  description: labels.eventList.errorDescription,
17298
- icon: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon, { name: "warning" })
17571
+ icon: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Icon, { name: "warning" })
17299
17572
  }
17300
17573
  ) }) : null
17301
17574
  ]
@@ -17304,7 +17577,7 @@ var EventList = ({
17304
17577
  ]
17305
17578
  }
17306
17579
  ),
17307
- shouldRenderSubcategoryFilters ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Modal, { open: isSubcategoriesModalOpen, onOpenChange: setIsSubcategoriesModalOpen, children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17580
+ shouldRenderSubcategoryFilters ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Modal, { open: isSubcategoriesModalOpen, onOpenChange: setIsSubcategoriesModalOpen, children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17308
17581
  Modal.Container,
17309
17582
  {
17310
17583
  classNames: {
@@ -17313,20 +17586,20 @@ var EventList = ({
17313
17586
  content: "items-end p-0 pointer-events-none",
17314
17587
  container: "w-full max-w-none border-0 bg-transparent shadow-none"
17315
17588
  },
17316
- children: /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "pointer-events-auto w-full rounded-t-[12px] border border-agg-separator bg-agg-secondary", children: [
17317
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "flex justify-center pb-1 pt-3", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "h-1 w-10 rounded-full bg-agg-muted-foreground/30" }) }),
17318
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "flex items-center justify-between px-4 pb-2 pt-1", children: [
17319
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Dialog2.Title, { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.eventList.subcategoriesLabel }),
17320
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17589
+ children: /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "pointer-events-auto w-full rounded-t-[12px] border border-agg-separator bg-agg-secondary", children: [
17590
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "flex justify-center pb-1 pt-3", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "h-1 w-10 rounded-full bg-agg-muted-foreground/30" }) }),
17591
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex items-center justify-between px-4 pb-2 pt-1", children: [
17592
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(Dialog2.Title, { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.eventList.subcategoriesLabel }),
17593
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17321
17594
  Dialog2.Close,
17322
17595
  {
17323
17596
  className: "flex cursor-pointer items-center justify-center rounded-full p-1 text-agg-muted-foreground hover:bg-agg-secondary-hover",
17324
17597
  "aria-label": labels.common.close,
17325
- children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(CloseIcon, { className: "h-5 w-5" })
17598
+ children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(CloseIcon, { className: "h-5 w-5" })
17326
17599
  }
17327
17600
  )
17328
17601
  ] }),
17329
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "flex flex-col gap-1 px-4 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
17602
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "flex flex-col gap-1 px-4 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
17330
17603
  CategorySidebar,
17331
17604
  {
17332
17605
  baseCategoryId,
@@ -17342,7 +17615,7 @@ var EventList = ({
17342
17615
  ] })
17343
17616
  }
17344
17617
  ) }) : null,
17345
- shouldPaginate && hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { ref: loadMoreRef, className: "agg-event-list-sentinel h-px w-full", "aria-hidden": true }) : null
17618
+ shouldPaginate && hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { ref: loadMoreRef, className: "agg-event-list-sentinel h-px w-full", "aria-hidden": true }) : null
17346
17619
  ] });
17347
17620
  };
17348
17621
  EventList.displayName = "EventList";
@@ -17352,6 +17625,7 @@ EventList.displayName = "EventList";
17352
17625
  EventListItem,
17353
17626
  EventListItemDetails,
17354
17627
  EventListItemV2,
17628
+ EventListVenueStrip,
17355
17629
  MarketDetails,
17356
17630
  MarketDetailsList,
17357
17631
  Orderbook,