@agg-market/ui 3.0.1 → 4.0.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.
Files changed (41) hide show
  1. package/dist/chart.js +18 -5
  2. package/dist/chart.mjs +2 -2
  3. package/dist/{chunk-KUWTY4EM.mjs → chunk-3W7NBJLU.mjs} +1 -1
  4. package/dist/{chunk-MVJNQN7P.mjs → chunk-GNSPZ53C.mjs} +86 -85
  5. package/dist/{chunk-422MCIXV.mjs → chunk-HOXTJ742.mjs} +15 -11
  6. package/dist/{chunk-FF3QYU26.mjs → chunk-JNH64AKR.mjs} +31 -24
  7. package/dist/{chunk-RKCVOKE3.mjs → chunk-LA3FBBSJ.mjs} +2 -2
  8. package/dist/{chunk-CTVMT3VL.mjs → chunk-LCZKSITC.mjs} +2 -2
  9. package/dist/chunk-M4RJHRFT.mjs +445 -0
  10. package/dist/{chunk-RGHA4PZH.mjs → chunk-MBHTXNHX.mjs} +4 -4
  11. package/dist/{chunk-KSCSYCEF.mjs → chunk-MJHKBCXQ.mjs} +1 -1
  12. package/dist/{chunk-KRQFVMJE.mjs → chunk-OH56VUYK.mjs} +5 -19
  13. package/dist/{chunk-BN5VVHNV.mjs → chunk-OJVTGNIF.mjs} +17 -4
  14. package/dist/{chunk-ZJJA4I3I.mjs → chunk-P2PJBO5C.mjs} +1 -1
  15. package/dist/{chunk-GHB3GOCW.mjs → chunk-QM7CGMFG.mjs} +5 -21
  16. package/dist/event-list-item-details.js +213 -241
  17. package/dist/event-list-item-details.mjs +6 -6
  18. package/dist/event-list-item.js +156 -208
  19. package/dist/event-list-item.mjs +3 -3
  20. package/dist/event-list.js +159 -223
  21. package/dist/event-list.mjs +4 -4
  22. package/dist/event-market-page.js +476 -574
  23. package/dist/event-market-page.mjs +10 -11
  24. package/dist/home-page.js +159 -223
  25. package/dist/home-page.mjs +5 -5
  26. package/dist/index.js +296 -333
  27. package/dist/index.mjs +13 -13
  28. package/dist/market-details.js +323 -415
  29. package/dist/market-details.mjs +6 -7
  30. package/dist/place-order.js +151 -189
  31. package/dist/place-order.mjs +2 -2
  32. package/dist/settlement.js +151 -189
  33. package/dist/settlement.mjs +2 -2
  34. package/dist/skeleton.js +151 -189
  35. package/dist/skeleton.mjs +1 -1
  36. package/dist/styles.css +1 -1
  37. package/dist/switch-button.js +2 -2
  38. package/dist/switch-button.mjs +1 -1
  39. package/dist/tailwind.css +1 -1
  40. package/package.json +2 -2
  41. package/dist/chunk-V52WSZHQ.mjs +0 -482
@@ -63,7 +63,7 @@ __export(market_details_exports, {
63
63
  });
64
64
  module.exports = __toCommonJS(market_details_exports);
65
65
  var import_react5 = require("react");
66
- var import_hooks14 = require("@agg-market/hooks");
66
+ var import_hooks13 = require("@agg-market/hooks");
67
67
 
68
68
  // src/primitives/card/index.tsx
69
69
  var import_hooks = require("@agg-market/hooks");
@@ -176,10 +176,10 @@ var SwitchButton = ({
176
176
  return null;
177
177
  }
178
178
  const handleKeyDown = (event, optionIndex) => {
179
- if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
179
+ if ((event == null ? void 0 : event.key) !== "ArrowLeft" && (event == null ? void 0 : event.key) !== "ArrowRight") {
180
180
  return;
181
181
  }
182
- event.preventDefault();
182
+ event == null ? void 0 : event.preventDefault();
183
183
  const nextOptionIndex = resolveNextEnabledIndex(
184
184
  options,
185
185
  optionIndex,
@@ -296,8 +296,18 @@ var normalizeSeries = (series) => {
296
296
  var defaultValueFormatter = (value) => {
297
297
  return `${Math.round(value)}%`;
298
298
  };
299
- var defaultTimeFormatter = (timestamp) => {
300
- return import_dayjs.default.unix(timestamp).format("MMM D");
299
+ var resolveTimeFormatter = (windowSeconds) => {
300
+ return (timestamp) => {
301
+ if (!Number.isFinite(timestamp))
302
+ return "";
303
+ if (windowSeconds <= 48 * 60 * 60) {
304
+ return import_dayjs.default.unix(timestamp).format("HH:mm");
305
+ }
306
+ if (windowSeconds <= 14 * 24 * 60 * 60) {
307
+ return import_dayjs.default.unix(timestamp).format("MMM D HH:mm");
308
+ }
309
+ return import_dayjs.default.unix(timestamp).format("MMM D");
310
+ };
301
311
  };
302
312
  var toLivelinePoints = (points) => {
303
313
  return points.map((point) => ({
@@ -420,6 +430,9 @@ var LineChart = ({
420
430
  const windowSeconds = (0, import_react2.useMemo)(() => {
421
431
  return resolveWindowSeconds(normalizedSeries);
422
432
  }, [normalizedSeries]);
433
+ const timeFormatter = (0, import_react2.useMemo)(() => {
434
+ return resolveTimeFormatter(windowSeconds);
435
+ }, [windowSeconds]);
423
436
  const seriesControls = showSeriesControls && normalizedSeries.length > 0 ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
424
437
  series: normalizedSeries,
425
438
  activeSeriesId,
@@ -458,7 +471,7 @@ var LineChart = ({
458
471
  pulse: false,
459
472
  window: windowSeconds,
460
473
  formatValue: defaultValueFormatter,
461
- formatTime: defaultTimeFormatter,
474
+ formatTime: timeFormatter,
462
475
  padding: {
463
476
  top: 12,
464
477
  right: 80,
@@ -510,6 +523,7 @@ var EventListItemSkeletonView = ({
510
523
  isStandalone = false
511
524
  }) => {
512
525
  const labels = (0, import_hooks5.useLabels)();
526
+ const outcomeTitleWidths = ["w-40", "w-[200px]"];
513
527
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
514
528
  Card,
515
529
  {
@@ -519,35 +533,23 @@ var EventListItemSkeletonView = ({
519
533
  "aria-busy": isStandalone || void 0,
520
534
  "aria-hidden": isStandalone ? void 0 : true,
521
535
  children: [
522
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex w-full items-start gap-3", children: [
523
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-10 rounded-agg-lg" }),
524
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
525
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
526
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
527
- ] })
536
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
537
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
538
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
528
539
  ] }),
529
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col gap-3", children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
530
- "div",
531
- {
532
- className: "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
533
- children: [
534
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
535
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
536
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
537
- ]
538
- },
539
- index
540
- )) }),
541
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
542
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2", children: [
543
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
540
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col gap-3", children: outcomeTitleWidths.map((outcomeTitleWidth, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex w-full items-center justify-between gap-3", children: [
541
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: cn("h-5 rounded-agg-sm", outcomeTitleWidth) }),
542
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
543
+ ] }, index)) }),
544
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-between gap-5 text-agg-muted-foreground", children: [
545
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
546
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" }),
544
547
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1", children: [
545
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
546
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
547
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
548
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" }),
549
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" })
548
550
  ] })
549
551
  ] }),
550
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" })
552
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
551
553
  ] })
552
554
  ]
553
555
  }
@@ -567,13 +569,9 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
567
569
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
568
570
  "aria-busy": true,
569
571
  children: [
570
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-2 md:flex-row md:flex-nowrap md:items-center md:gap-4", children: [
571
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-7 w-40 rounded-agg-sm" }),
572
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex max-w-full gap-2", children: [
573
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
574
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
575
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
576
- ] })
572
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-3 md:flex-row md:flex-nowrap md:items-center md:gap-5", children: [
573
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-7 w-[120px] rounded-agg-md" }),
574
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-full rounded-agg-md md:w-[400px]" })
577
575
  ] }),
578
576
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
579
577
  EventListItemSkeletonView,
@@ -625,30 +623,26 @@ var EventListItemDetailsSkeletonView = ({
625
623
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
626
624
  "aria-busy": true,
627
625
  children: [
628
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full items-start gap-3 md:gap-4", children: [
629
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg md:size-[60px]" }),
630
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
631
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
632
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
633
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
634
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
635
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
636
- ] })
637
- ] })
626
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
627
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
628
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
638
629
  ] }),
639
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-4", children: [
640
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-10 w-full rounded-agg-full md:w-[220px]" }),
641
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
642
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
643
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
644
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
645
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" })
630
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full flex-col gap-4 md:gap-6", children: [
631
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
632
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex max-w-full gap-2 overflow-hidden", children: [
633
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
634
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
635
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
636
+ ] }),
637
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-full max-w-[221px] rounded-agg-full md:w-[221px]" })
638
+ ] }),
639
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
640
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-[220px] w-full rounded-agg-xl md:h-[240px]" }),
641
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between", children: [
642
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[59px] rounded-agg-sm" }),
643
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
644
+ ] })
646
645
  ] })
647
- ] }),
648
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
649
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between", children: [
650
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
651
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
652
646
  ] })
653
647
  ]
654
648
  }
@@ -672,6 +666,77 @@ var orderBookRowLimitDefault = 4;
672
666
 
673
667
  // src/primitives/skeleton/views/market-details-skeleton-view.tsx
674
668
  var import_jsx_runtime8 = require("react/jsx-runtime");
669
+ var orderBookAskBarWidths = [
670
+ "w-[52px] md:w-[240px]",
671
+ "w-[48px] md:w-[200px]",
672
+ "w-[40px] md:w-[120px]",
673
+ "w-[36px] md:w-[60px]"
674
+ ];
675
+ var orderBookBidBarWidths = [
676
+ "w-[36px] md:w-[60px]",
677
+ "w-[40px] md:w-[120px]",
678
+ "w-[48px] md:w-[200px]",
679
+ "w-[52px] md:w-[240px]"
680
+ ];
681
+ var MarketDetailsHeaderSkeleton = () => {
682
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3 md:px-5", children: [
683
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:min-w-52 md:gap-4", children: [
684
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
685
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
686
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-[132px] rounded-agg-sm" }),
687
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[141px] rounded-agg-sm" })
688
+ ] })
689
+ ] }),
690
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-9 w-[60px] rounded-agg-md" }),
691
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full gap-2 md:w-auto", children: [
692
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[135px]" }),
693
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[131px]" })
694
+ ] })
695
+ ] });
696
+ };
697
+ var MarketDetailsTabsSkeleton = () => {
698
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex h-14 items-end px-4 md:px-5", children: [
699
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex h-full flex-col items-end justify-end rounded-t-agg-lg", children: [
700
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }) }),
701
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
702
+ ] }),
703
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex h-full flex-col justify-center", children: [
704
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-12 rounded-agg-sm" }) }),
705
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-[3px] w-full" })
706
+ ] })
707
+ ] });
708
+ };
709
+ var MarketDetailsOrderBookRows = ({
710
+ side,
711
+ barWidths
712
+ }) => {
713
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col gap-2", children: barWidths.map((barWidthClassName, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
714
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
715
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
716
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
717
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
718
+ ] }),
719
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
720
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
721
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: cn("h-2 rounded-agg-full", barWidthClassName) }) })
722
+ ] }),
723
+ index < barWidths.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
724
+ ] }, `${side}-row-${index}`)) });
725
+ };
726
+ var MarketDetailsOderbookSkeleton = ({
727
+ className
728
+ }) => {
729
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-5", className), children: [
730
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
731
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
732
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MarketDetailsOrderBookRows, { side: "ask", barWidths: orderBookAskBarWidths })
733
+ ] }),
734
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
735
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
736
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MarketDetailsOrderBookRows, { side: "bid", barWidths: orderBookBidBarWidths })
737
+ ] })
738
+ ] });
739
+ };
675
740
  var MarketDetailsSkeletonView = ({
676
741
  className,
677
742
  ariaLabel,
@@ -686,60 +751,12 @@ var MarketDetailsSkeletonView = ({
686
751
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
687
752
  "aria-busy": true,
688
753
  children: [
689
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3 p-4 md:px-5 md:py-4", children: [
690
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
691
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
692
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
693
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
694
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
695
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
696
- ] })
697
- ] }),
698
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
699
- ] }),
700
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-2", children: [
701
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
702
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
703
- ] })
704
- ] }),
754
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MarketDetailsHeaderSkeleton, {}),
705
755
  isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
706
756
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
707
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-14 items-end", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-full w-full rounded-none" }) }),
757
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MarketDetailsTabsSkeleton, {}),
708
758
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
709
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-4 p-5", children: [
710
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3", children: [
711
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
712
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
713
- "div",
714
- {
715
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
716
- children: [
717
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
718
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
719
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
720
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
721
- ]
722
- },
723
- `ask-${index}`
724
- ))
725
- ] }),
726
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3", children: [
727
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
728
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
729
- "div",
730
- {
731
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
732
- children: [
733
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
734
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
735
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
736
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
737
- ]
738
- },
739
- `bid-${index}`
740
- ))
741
- ] })
742
- ] })
759
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MarketDetailsOderbookSkeleton, { className: "p-5" })
743
760
  ] }) : null
744
761
  ]
745
762
  }
@@ -750,65 +767,46 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
750
767
  // src/primitives/skeleton/views/place-order-skeleton-view.tsx
751
768
  var import_jsx_runtime9 = require("react/jsx-runtime");
752
769
  var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
770
+ var TabsSkeletonBar = () => {
771
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-end border-b border-agg-border", children: [
772
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col rounded-t-agg-lg", children: [
773
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
774
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
775
+ ] }),
776
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col", children: [
777
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
778
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-[3px] w-full" })
779
+ ] })
780
+ ] });
781
+ };
753
782
  var ContentBody = () => {
754
783
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
755
784
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
756
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
757
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
758
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-12 w-12 shrink-0 rounded-agg-lg" }),
759
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
760
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[92%] rounded-agg-sm" }),
761
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[80%] rounded-agg-sm" })
762
- ] })
763
- ] }),
764
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
785
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
786
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-12 shrink-0 rounded-agg-lg" }),
787
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
788
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[92%] max-w-[240px] rounded-agg-sm" }),
789
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[64%] max-w-[160px] rounded-agg-sm" })
790
+ ] })
765
791
  ] }),
766
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-28 rounded-agg-sm" })
792
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-[92px] rounded-agg-sm" }),
793
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TabsSkeletonBar, {})
767
794
  ] }),
768
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-8", children: [
769
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
770
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
771
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
772
- ] }),
773
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
774
- ] }) }),
775
795
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-4", children: [
776
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex gap-2", children: [
796
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full gap-2", children: [
777
797
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
778
798
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
779
799
  ] }),
780
800
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
781
801
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
782
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
783
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
802
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[63px] rounded-agg-sm" }),
803
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[118px] rounded-agg-sm" })
784
804
  ] }),
785
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-28 rounded-agg-sm" })
805
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: cn("text-agg-3xl font-agg-bold leading-agg-9 text-agg-separator"), children: "$0" })
786
806
  ] })
787
807
  ] }),
788
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
789
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "rounded-agg-lg border border-agg-trade-highlight-border bg-agg-trade-highlight-surface p-3", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-3", children: [
790
- [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-3", children: [
791
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
792
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
793
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
794
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
795
- ] }),
796
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
797
- ] }),
798
- index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
799
- ] }, `place-order-route-${index}`)),
800
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
801
- ] }) }),
802
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
803
- ] }),
804
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
805
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
806
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
807
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
808
- ] }),
809
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
810
- ] }),
811
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
808
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }),
809
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[240px] self-center rounded-agg-sm" })
812
810
  ] });
813
811
  };
814
812
  var PlaceOrderSkeletonView = ({
@@ -822,19 +820,7 @@ var PlaceOrderSkeletonView = ({
822
820
  role: "status",
823
821
  "aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
824
822
  "aria-busy": true,
825
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
826
- Card,
827
- {
828
- className: cn(
829
- placeOrderCardClassName,
830
- "w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
831
- ),
832
- children: [
833
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ContentBody, {}),
834
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
835
- ]
836
- }
837
- ) })
823
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Card, { className: cn(placeOrderCardClassName, "w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ContentBody, {}) }) })
838
824
  }
839
825
  );
840
826
  };
@@ -860,38 +846,27 @@ var SettlementSkeletonView = ({
860
846
  "aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
861
847
  "aria-busy": true,
862
848
  children: [
863
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-1 md:flex-row md:items-center md:justify-between md:gap-4", children: [
864
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" }),
865
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-80 rounded-agg-sm" })
849
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
850
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[81px] rounded-agg-sm" }),
851
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-[240px] rounded-agg-sm" })
866
852
  ] }),
867
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
868
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-52 rounded-agg-sm" }),
853
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
854
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-[200px] rounded-agg-sm" }),
869
855
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
870
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[88%] rounded-agg-sm" }),
871
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[84%] rounded-agg-sm" }),
872
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
873
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
856
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[320px] rounded-agg-sm" }),
857
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[280px] rounded-agg-sm" })
874
858
  ] })
875
859
  ] }),
876
860
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
877
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-3", children: [
878
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2", children: [
879
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2", children: [
880
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
881
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
882
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
883
- ] }),
884
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
885
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
886
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
887
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
888
- ] })
861
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
862
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2", children: [
863
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
864
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" })
889
865
  ] }),
890
- [0, 1, 2].map((index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2", children: [
891
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
892
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-20 rounded-agg-sm" }),
893
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
894
- ] }, `settlement-venue-${index}`))
866
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2", children: [
867
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
868
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
869
+ ] })
895
870
  ] })
896
871
  ]
897
872
  }
@@ -3244,79 +3219,6 @@ var VenueLogo = ({
3244
3219
  };
3245
3220
  VenueLogo.displayName = "VenueLogo";
3246
3221
 
3247
- // src/primitives/loading-icon/index.tsx
3248
- var import_hooks13 = require("@agg-market/hooks");
3249
- var import_jsx_runtime62 = require("react/jsx-runtime");
3250
- var LoadingIcon = ({
3251
- size = "medium",
3252
- className,
3253
- ariaLabel
3254
- }) => {
3255
- const labels = (0, import_hooks13.useLabels)();
3256
- const { enableAnimations } = (0, import_hooks13.useSdkUiConfig)();
3257
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3258
- "span",
3259
- {
3260
- role: "status",
3261
- "aria-label": ariaLabel != null ? ariaLabel : labels.common.loading,
3262
- className: cn(
3263
- "group/agg-loading-icon",
3264
- "inline-grid place-items-center text-agg-primary will-change-transform",
3265
- className
3266
- ),
3267
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { viewBox: "0 0 44 44", className: cn("block", iconSizeClasses[size]), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("g", { children: [
3268
- enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3269
- "animateTransform",
3270
- {
3271
- attributeName: "transform",
3272
- attributeType: "XML",
3273
- type: "rotate",
3274
- from: "0 22 22",
3275
- to: "360 22 22",
3276
- dur: "1.4s",
3277
- repeatCount: "indefinite"
3278
- }
3279
- ) : null,
3280
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3281
- "circle",
3282
- {
3283
- cx: "22",
3284
- cy: "22",
3285
- r: "16",
3286
- fill: "none",
3287
- stroke: "currentColor",
3288
- strokeWidth: "6",
3289
- strokeLinecap: "round",
3290
- strokeDasharray: "60 100",
3291
- strokeDashoffset: "0",
3292
- children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
3293
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3294
- "animate",
3295
- {
3296
- attributeName: "stroke-dasharray",
3297
- values: "1 100;60 100;1 100",
3298
- dur: "1.2s",
3299
- repeatCount: "indefinite"
3300
- }
3301
- ),
3302
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3303
- "animate",
3304
- {
3305
- attributeName: "stroke-dashoffset",
3306
- values: "0;-25;-100",
3307
- dur: "1.2s",
3308
- repeatCount: "indefinite"
3309
- }
3310
- )
3311
- ] }) : null
3312
- }
3313
- )
3314
- ] }) }) })
3315
- }
3316
- );
3317
- };
3318
- LoadingIcon.displayName = "LoadingIcon";
3319
-
3320
3222
  // src/events/market-details/market-details.utils.ts
3321
3223
  var import_dayjs3 = __toESM(require("dayjs"));
3322
3224
  var import_zod = require("zod");
@@ -3382,15 +3284,14 @@ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
3382
3284
  return event.title;
3383
3285
  };
3384
3286
  var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
3385
- var _a, _b, _c, _d, _e, _f;
3386
3287
  if (typeof imageOverride === "string" && imageOverride.trim()) {
3387
3288
  return imageOverride;
3388
3289
  }
3389
3290
  if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
3390
3291
  return primaryVenueMarket.image;
3391
3292
  }
3392
- if (typeof ((_b = (_a = event.venueEvents) == null ? void 0 : _a[0]) == null ? void 0 : _b.image) === "string" && ((_d = (_c = event.venueEvents) == null ? void 0 : _c[0]) == null ? void 0 : _d.image.trim())) {
3393
- return (_f = (_e = event.venueEvents) == null ? void 0 : _e[0]) == null ? void 0 : _f.image;
3293
+ if (typeof event.image === "string" && event.image.trim()) {
3294
+ return event.image;
3394
3295
  }
3395
3296
  return void 0;
3396
3297
  };
@@ -3483,18 +3384,22 @@ var resolveOutcomesByVenue = (venueMarkets, selectedOutcomeLabel) => {
3483
3384
  };
3484
3385
  }).filter((item) => item != null);
3485
3386
  };
3486
- var buildPriceHistoryGroups = (selectedOutcomes) => {
3487
- const venueMarketOutcomeIdsByVenue = /* @__PURE__ */ new Map();
3488
- selectedOutcomes.forEach(({ venue, outcome }) => {
3489
- var _a;
3490
- if (!venueMarketOutcomeIdsByVenue.has(venue)) {
3491
- venueMarketOutcomeIdsByVenue.set(venue, []);
3387
+ var buildPriceHistoryGroups = (selectedOutcomes, fallbackMarketId) => {
3388
+ const marketIdByVenue = /* @__PURE__ */ new Map();
3389
+ selectedOutcomes.forEach(({ venue, market }) => {
3390
+ var _a, _b;
3391
+ const marketWithCanonicalId = market;
3392
+ const canonicalMarketId = (_a = marketWithCanonicalId.marketId) != null ? _a : fallbackMarketId;
3393
+ if (!canonicalMarketId)
3394
+ return;
3395
+ if (!marketIdByVenue.has(venue)) {
3396
+ marketIdByVenue.set(venue, /* @__PURE__ */ new Set());
3492
3397
  }
3493
- (_a = venueMarketOutcomeIdsByVenue.get(venue)) == null ? void 0 : _a.push(outcome.id);
3398
+ (_b = marketIdByVenue.get(venue)) == null ? void 0 : _b.add(canonicalMarketId);
3494
3399
  });
3495
- return [...venueMarketOutcomeIdsByVenue.entries()].map(([venue, venueMarketOutcomeIds]) => ({
3400
+ return [...marketIdByVenue.entries()].map(([venue, marketIds]) => ({
3496
3401
  venue,
3497
- venueMarketOutcomeIds
3402
+ venueMarketOutcomeIds: [...marketIds]
3498
3403
  })).filter((group) => group.venueMarketOutcomeIds.length > 0);
3499
3404
  };
3500
3405
  var resolveSeriesColor = (venue, index) => {
@@ -3627,8 +3532,7 @@ var resolveSubtitle = ({
3627
3532
  };
3628
3533
  var resolveOrderBookRows = ({
3629
3534
  data,
3630
- side,
3631
- depth
3535
+ side
3632
3536
  }) => {
3633
3537
  if (!(data == null ? void 0 : data.length))
3634
3538
  return [];
@@ -3659,9 +3563,8 @@ var resolveOrderBookRows = ({
3659
3563
  return left.price - right.price;
3660
3564
  return right.price - left.price;
3661
3565
  });
3662
- const limitedRows = sortedRows.slice(0, Math.max(1, depth));
3663
- const maxTotal = limitedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
3664
- return limitedRows.map((row) => __spreadProps(__spreadValues({}, row), {
3566
+ const maxTotal = sortedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
3567
+ return sortedRows.map((row) => __spreadProps(__spreadValues({}, row), {
3665
3568
  barScale: row.total / maxTotal
3666
3569
  }));
3667
3570
  };
@@ -3736,14 +3639,14 @@ var buildMarketDetailsModel = ({
3736
3639
  };
3737
3640
 
3738
3641
  // src/events/market-details/index.tsx
3739
- var import_jsx_runtime63 = require("react/jsx-runtime");
3642
+ var import_jsx_runtime62 = require("react/jsx-runtime");
3740
3643
  var MarketDetailsLoadingState = ({
3741
3644
  isOpened = marketDetailsDefaultIsOpened,
3742
3645
  ariaLabel,
3743
3646
  classNames
3744
3647
  }) => {
3745
- const labels = (0, import_hooks14.useLabels)();
3746
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3648
+ const labels = (0, import_hooks13.useLabels)();
3649
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3747
3650
  Skeleton,
3748
3651
  {
3749
3652
  view: isOpened ? "market-details-detailed" : "market-details-minified",
@@ -3756,16 +3659,16 @@ var MarketDetailsUnavailableState = ({
3756
3659
  ariaLabel,
3757
3660
  classNames
3758
3661
  }) => {
3759
- const labels = (0, import_hooks14.useLabels)();
3760
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3662
+ const labels = (0, import_hooks13.useLabels)();
3663
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3761
3664
  Card,
3762
3665
  {
3763
3666
  className: cn(marketDetailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
3764
3667
  role: "status",
3765
3668
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.unavailableAria,
3766
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-1 p-5", children: [
3767
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
3768
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
3669
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-1 p-5", children: [
3670
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
3671
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
3769
3672
  ] })
3770
3673
  }
3771
3674
  );
@@ -3774,44 +3677,59 @@ var OrderBookRows = ({
3774
3677
  rows,
3775
3678
  title,
3776
3679
  formatNumber,
3777
- formatCurrency
3680
+ formatCurrency,
3681
+ visibleRows
3778
3682
  }) => {
3779
- const labels = (0, import_hooks14.useLabels)();
3683
+ const labels = (0, import_hooks13.useLabels)();
3780
3684
  const isAsks = title === labels.marketDetails.asks;
3781
3685
  const priceClassName = isAsks ? "text-agg-orderbook-ask" : "text-agg-orderbook-bid";
3782
3686
  const barClassName = isAsks ? "bg-agg-orderbook-ask/10" : "bg-agg-orderbook-bid/10";
3783
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-2", children: [
3784
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "caption-caps", children: title }),
3785
- rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-2", children: [
3786
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
3787
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
3788
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
3789
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3790
- "span",
3791
- {
3792
- className: cn(
3793
- "text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
3794
- priceClassName
3795
- ),
3796
- children: formatProbabilityCents(row.price)
3797
- }
3798
- )
3799
- ] }),
3800
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
3801
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
3802
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3803
- "div",
3804
- {
3805
- "aria-hidden": "true",
3806
- className: cn("h-2 rounded-agg-full", barClassName),
3807
- style: {
3808
- width: `${Math.max(20, Math.round(row.barScale * 100))}%`
3809
- }
3810
- }
3811
- ) })
3812
- ] }),
3813
- index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
3814
- ] }, row.id))
3687
+ const maxVisibleRows = Math.max(1, visibleRows);
3688
+ const orderBookRowHeightPx = 28;
3689
+ const orderBookDividerHeightPx = 1;
3690
+ const orderBookRowGapPx = 8;
3691
+ const orderBookVisibleHeightPx = maxVisibleRows * orderBookRowHeightPx + Math.max(0, maxVisibleRows - 1) * (orderBookDividerHeightPx + orderBookRowGapPx);
3692
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-2", children: [
3693
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "caption-caps", children: title }),
3694
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3695
+ "div",
3696
+ {
3697
+ className: "overflow-y-auto pr-1 flex flex-col gap-2",
3698
+ style: { maxHeight: `${orderBookVisibleHeightPx}px` },
3699
+ role: "region",
3700
+ "aria-label": `${title} order book levels`,
3701
+ children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-2", children: [
3702
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
3703
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
3704
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
3705
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3706
+ "span",
3707
+ {
3708
+ className: cn(
3709
+ "text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
3710
+ priceClassName
3711
+ ),
3712
+ children: formatProbabilityCents(row.price)
3713
+ }
3714
+ )
3715
+ ] }),
3716
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
3717
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
3718
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3719
+ "div",
3720
+ {
3721
+ "aria-hidden": "true",
3722
+ className: cn("h-2 rounded-agg-full", barClassName),
3723
+ style: {
3724
+ width: `${Math.max(20, Math.round(row.barScale * 100))}%`
3725
+ }
3726
+ }
3727
+ ) })
3728
+ ] }),
3729
+ index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
3730
+ ] }, row.id))
3731
+ }
3732
+ )
3815
3733
  ] });
3816
3734
  };
3817
3735
  var getOutcomeButtonClassName = ({
@@ -3845,8 +3763,8 @@ var MarketDetailsContent = ({
3845
3763
  classNames,
3846
3764
  otherContent
3847
3765
  }) => {
3848
- const config = (0, import_hooks14.useSdkUiConfig)();
3849
- const labels = (0, import_hooks14.useLabels)();
3766
+ const config = (0, import_hooks13.useSdkUiConfig)();
3767
+ const labels = (0, import_hooks13.useLabels)();
3850
3768
  const detailsContentId = (0, import_react5.useId)();
3851
3769
  const model = (0, import_react5.useMemo)(() => {
3852
3770
  return buildMarketDetailsModel({
@@ -3929,10 +3847,11 @@ var MarketDetailsContent = ({
3929
3847
  });
3930
3848
  return [...uniqueOutcomesByVenueAndId.values()];
3931
3849
  }, [outcomesByLabel]);
3850
+ const canonicalMarketIdForHistory = model == null ? void 0 : model.market.id;
3932
3851
  const priceHistoryGroups = (0, import_react5.useMemo)(() => {
3933
- return buildPriceHistoryGroups(graphOutcomes);
3934
- }, [graphOutcomes]);
3935
- const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks14.usePriceHistory)(__spreadProps(__spreadValues({
3852
+ return buildPriceHistoryGroups(graphOutcomes, canonicalMarketIdForHistory);
3853
+ }, [canonicalMarketIdForHistory, graphOutcomes]);
3854
+ const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks13.usePriceHistory)(__spreadProps(__spreadValues({
3936
3855
  groups: priceHistoryGroups
3937
3856
  }, timeWindow), {
3938
3857
  enabled: isOpened && selectedTab === "graph" && priceHistoryGroups.length > 0
@@ -3944,24 +3863,22 @@ var MarketDetailsContent = ({
3944
3863
  liveUpdate: true
3945
3864
  }));
3946
3865
  }, [selectedOutcomesByVenue]);
3947
- const { data: orderBookData, isLoading: isOrderBookLoading } = (0, import_hooks14.useOrderBook)({
3866
+ const { data: orderBookData, isLoading: isOrderBookLoading } = (0, import_hooks13.useOrderBook)({
3948
3867
  orderbooks: orderBookInputs,
3949
3868
  enabled: isOpened && selectedTab === "order-book" && orderBookInputs.length > 0
3950
3869
  });
3951
3870
  const askRows = (0, import_react5.useMemo)(() => {
3952
3871
  return resolveOrderBookRows({
3953
3872
  data: orderBookData,
3954
- side: "asks",
3955
- depth: orderBookDepth
3873
+ side: "asks"
3956
3874
  });
3957
- }, [orderBookData, orderBookDepth]);
3875
+ }, [orderBookData]);
3958
3876
  const bidRows = (0, import_react5.useMemo)(() => {
3959
3877
  return resolveOrderBookRows({
3960
3878
  data: orderBookData,
3961
- side: "bids",
3962
- depth: orderBookDepth
3879
+ side: "bids"
3963
3880
  });
3964
- }, [orderBookData, orderBookDepth]);
3881
+ }, [orderBookData]);
3965
3882
  const priceHistoryByVenue = (0, import_react5.useMemo)(() => {
3966
3883
  const historyByVenue = /* @__PURE__ */ new Map();
3967
3884
  if (!(priceHistoryData == null ? void 0 : priceHistoryData.length)) {
@@ -3981,11 +3898,14 @@ var MarketDetailsContent = ({
3981
3898
  const graphSeriesByOutcomeLabel = (0, import_react5.useMemo)(() => {
3982
3899
  const seriesByOutcomeLabel = /* @__PURE__ */ new Map();
3983
3900
  const resolveOutcomeCandidateIds = (outcomeByVenue) => {
3984
- var _a;
3901
+ var _a, _b;
3902
+ const marketWithCanonicalId = outcomeByVenue.market;
3985
3903
  return [
3986
3904
  outcomeByVenue.outcome.id,
3987
3905
  (_a = outcomeByVenue.outcome.externalIdentifier) != null ? _a : void 0,
3988
- outcomeByVenue.market.externalIdentifier
3906
+ outcomeByVenue.market.externalIdentifier,
3907
+ (_b = marketWithCanonicalId.marketId) != null ? _b : void 0,
3908
+ canonicalMarketIdForHistory
3989
3909
  ].filter((value) => typeof value === "string" && value.trim().length > 0);
3990
3910
  };
3991
3911
  headerOutcomeItems.forEach((headerOutcomeItem) => {
@@ -4017,7 +3937,7 @@ var MarketDetailsContent = ({
4017
3937
  seriesByOutcomeLabel.set(headerOutcomeItem.label, graphSeries2);
4018
3938
  });
4019
3939
  return seriesByOutcomeLabel;
4020
- }, [headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
3940
+ }, [canonicalMarketIdForHistory, headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
4021
3941
  const graphSeries = (0, import_react5.useMemo)(() => {
4022
3942
  var _a;
4023
3943
  if (!selectedOutcomeLabel)
@@ -4075,35 +3995,36 @@ var MarketDetailsContent = ({
4075
3995
  setSelectedGraphVenue(null);
4076
3996
  }, [selectedGraphVenue, selectedOutcomesByVenue]);
4077
3997
  if (!model) {
4078
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(MarketDetailsUnavailableState, { ariaLabel, classNames });
3998
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MarketDetailsUnavailableState, { ariaLabel, classNames });
4079
3999
  }
4080
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4000
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4081
4001
  Card,
4082
4002
  {
4083
4003
  className: cn(
4084
- "w-full cursor-pointer rounded-agg-2xl text-left outline-none",
4004
+ "w-full rounded-agg-2xl text-left outline-none",
4085
4005
  marketDetailsBaseCardClassName,
4086
4006
  classNames == null ? void 0 : classNames.root
4087
4007
  ),
4088
- "aria-expanded": isOpened,
4089
- "aria-controls": detailsContentId,
4090
- role: "button",
4091
- tabIndex: 0,
4092
- "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
4093
- onClick: handleToggleExpanded,
4094
- onKeyDown: handleToggleExpanded,
4095
4008
  children: [
4096
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4009
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4097
4010
  "div",
4098
4011
  {
4099
4012
  className: cn(
4100
- "flex flex-row items-center justify-between gap-3 px-5 py-4",
4013
+ "cursor-pointer disabled:cursor-default",
4014
+ "flex flex-wrap flex-row items-center justify-between gap-3 px-5 py-4",
4101
4015
  isOpened && "pb-3",
4102
4016
  classNames == null ? void 0 : classNames.header
4103
4017
  ),
4018
+ "aria-expanded": isOpened,
4019
+ "aria-controls": detailsContentId,
4020
+ role: "button",
4021
+ tabIndex: 0,
4022
+ "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
4023
+ onClick: handleToggleExpanded,
4024
+ onKeyDown: handleToggleExpanded,
4104
4025
  children: [
4105
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
4106
- model.image ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4026
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex min-w-52 items-center gap-3 md:gap-4", children: [
4027
+ model.image ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4107
4028
  "img",
4108
4029
  {
4109
4030
  src: model.image,
@@ -4111,13 +4032,13 @@ var MarketDetailsContent = ({
4111
4032
  className: "size-12 rounded-agg-lg object-cover md:size-[60px]"
4112
4033
  }
4113
4034
  ) : null,
4114
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
4115
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { as: "h3", variant: "body-large-strong", className: "truncate", children: model.title }),
4116
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "label", className: "truncate text-agg-muted-foreground", children: model.subtitle }) })
4035
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
4036
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { as: "h3", variant: "body-large-strong", className: "truncate", children: model.title }),
4037
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "label", className: "truncate text-agg-muted-foreground", children: model.subtitle }) })
4117
4038
  ] })
4118
4039
  ] }),
4119
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { as: "div", variant: "heading", className: "shrink-0", children: formatProbabilityPercent(headlineProbability) }),
4120
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4040
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { as: "div", variant: "heading", className: "shrink-0", children: formatProbabilityPercent(headlineProbability) }),
4041
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4121
4042
  "div",
4122
4043
  {
4123
4044
  className: "flex gap-2",
@@ -4128,7 +4049,7 @@ var MarketDetailsContent = ({
4128
4049
  children: headerOutcomeItems.map((item) => {
4129
4050
  const isPositive = item.tone === "positive";
4130
4051
  const isActiveOutcome = item.label === selectedOutcomeLabel;
4131
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4052
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4132
4053
  "button",
4133
4054
  {
4134
4055
  type: "button",
@@ -4145,8 +4066,8 @@ var MarketDetailsContent = ({
4145
4066
  e.stopPropagation();
4146
4067
  setSelectedOutcomeLabel(item.label);
4147
4068
  },
4148
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
4149
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4069
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
4070
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4150
4071
  VenueLogo,
4151
4072
  {
4152
4073
  venue: isPositive ? "polymarket" : "probable",
@@ -4154,7 +4075,7 @@ var MarketDetailsContent = ({
4154
4075
  color: isActiveOutcome ? "var(--agg-color-on-primary)" : void 0
4155
4076
  }
4156
4077
  ),
4157
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4078
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4158
4079
  Typography,
4159
4080
  {
4160
4081
  variant: isActiveOutcome ? "body-strong" : "body",
@@ -4175,28 +4096,25 @@ var MarketDetailsContent = ({
4175
4096
  ]
4176
4097
  }
4177
4098
  ),
4178
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4099
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4179
4100
  "div",
4180
4101
  {
4181
4102
  id: detailsContentId,
4182
4103
  className: cn(
4183
4104
  "grid overflow-hidden",
4184
- getMotionClassName(
4185
- config.enableAnimations,
4186
- "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
4187
- ),
4105
+ getMotionClassName(config.enableAnimations, "transition-all duration-500 ease-in-out"),
4188
4106
  isOpened ? "grid-rows-[1fr] opacity-100" : "pointer-events-none grid-rows-[0fr] opacity-0"
4189
4107
  ),
4190
4108
  "aria-hidden": !isOpened,
4191
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "min-h-0", children: [
4192
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
4193
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4109
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "min-h-0", children: [
4110
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
4111
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4194
4112
  "div",
4195
4113
  {
4196
4114
  className: cn(
4197
4115
  getMotionClassName(
4198
4116
  config.enableAnimations,
4199
- "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
4117
+ "transition-all duration-500 ease-in-out"
4200
4118
  ),
4201
4119
  isOpened ? cn(
4202
4120
  "translate-y-0 opacity-100",
@@ -4204,7 +4122,7 @@ var MarketDetailsContent = ({
4204
4122
  ) : "translate-y-5 opacity-0"
4205
4123
  ),
4206
4124
  children: [
4207
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4125
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cn("block", classNames == null ? void 0 : classNames.tabs), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4208
4126
  Tabs,
4209
4127
  {
4210
4128
  ariaLabel: labels.marketDetails.tabsAria,
@@ -4215,42 +4133,32 @@ var MarketDetailsContent = ({
4215
4133
  className: "w-full px-5"
4216
4134
  }
4217
4135
  ) }),
4218
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
4219
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("p-5", classNames == null ? void 0 : classNames.content), children: [
4220
- selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4221
- "div",
4222
- {
4223
- className: "flex flex-col gap-2 min-h-40 items-center justify-center",
4224
- role: "status",
4225
- "aria-label": labels.marketDetails.loadingOrderbookAria,
4226
- "aria-busy": true,
4227
- children: [
4228
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(LoadingIcon, {}),
4229
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.loadingOrderbookLabel })
4230
- ]
4231
- }
4232
- ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
4233
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4136
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
4137
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("p-5", classNames == null ? void 0 : classNames.content), children: [
4138
+ selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MarketDetailsOderbookSkeleton, {}) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
4139
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4234
4140
  OrderBookRows,
4235
4141
  {
4236
4142
  rows: askRows,
4237
4143
  title: labels.marketDetails.asks,
4238
4144
  formatNumber: config.formatNumber,
4239
- formatCurrency: config.formatCurrency
4145
+ formatCurrency: config.formatCurrency,
4146
+ visibleRows: orderBookDepth
4240
4147
  }
4241
4148
  ),
4242
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4149
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4243
4150
  OrderBookRows,
4244
4151
  {
4245
4152
  rows: bidRows,
4246
4153
  title: labels.marketDetails.bids,
4247
4154
  formatNumber: config.formatNumber,
4248
- formatCurrency: config.formatCurrency
4155
+ formatCurrency: config.formatCurrency,
4156
+ visibleRows: orderBookDepth
4249
4157
  }
4250
4158
  )
4251
4159
  ] }) }) : null,
4252
- selectedTab === "graph" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.graph), children: [
4253
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4160
+ selectedTab === "graph" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.graph), children: [
4161
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4254
4162
  LineChart,
4255
4163
  {
4256
4164
  series: graphSeries,
@@ -4259,11 +4167,11 @@ var MarketDetailsContent = ({
4259
4167
  classNames: { root: "w-full" },
4260
4168
  showSeriesControls: selectedOutcomesByVenue.length > 0 || headerOutcomeItems.length > 0,
4261
4169
  renderSeriesControls: () => {
4262
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
4263
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex flex-wrap gap-2", children: selectedOutcomesByVenue.map((item) => {
4170
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
4171
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex flex-wrap gap-2", children: selectedOutcomesByVenue.map((item) => {
4264
4172
  const probability = formatProbabilityPercent(item.outcome.price);
4265
4173
  const isActiveVenue = selectedGraphVenue === item.venue;
4266
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4174
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4267
4175
  "button",
4268
4176
  {
4269
4177
  type: "button",
@@ -4280,14 +4188,14 @@ var MarketDetailsContent = ({
4280
4188
  handleGraphVenueToggle(item.venue);
4281
4189
  },
4282
4190
  children: [
4283
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
4284
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
4191
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
4192
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
4285
4193
  ]
4286
4194
  },
4287
4195
  `${item.market.id}-${item.outcome.id}`
4288
4196
  );
4289
4197
  }) }),
4290
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4198
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4291
4199
  SwitchButton,
4292
4200
  {
4293
4201
  ariaLabel: labels.marketDetails.outcomeSelectorAria,
@@ -4305,7 +4213,7 @@ var MarketDetailsContent = ({
4305
4213
  }
4306
4214
  }
4307
4215
  ),
4308
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4216
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4309
4217
  "div",
4310
4218
  {
4311
4219
  className: cn(
@@ -4313,10 +4221,10 @@ var MarketDetailsContent = ({
4313
4221
  classNames == null ? void 0 : classNames.footer
4314
4222
  ),
4315
4223
  children: [
4316
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: typeof model.market.volume === "number" ? `${config.formatCompactCurrency(model.market.volume)} ${labels.marketDetails.meta.volumeSuffix}` : labels.marketDetails.volumeUnavailable }),
4317
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: eventListItemDetailsTimeRanges.map((timeRange) => {
4224
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { children: typeof model.market.volume === "number" ? `${config.formatCompactCurrency(model.market.volume)} ${labels.marketDetails.meta.volumeSuffix}` : labels.marketDetails.volumeUnavailable }),
4225
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex flex-wrap items-center gap-3 md:gap-4", children: eventListItemDetailsTimeRanges.map((timeRange) => {
4318
4226
  const isActive = selectedTimeRange === timeRange;
4319
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4227
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4320
4228
  "button",
4321
4229
  {
4322
4230
  type: "button",
@@ -4339,13 +4247,13 @@ var MarketDetailsContent = ({
4339
4247
  }
4340
4248
  )
4341
4249
  ] }) : null,
4342
- selectedTab === "other" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4250
+ selectedTab === "other" ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex flex-col gap-4", children: otherContent != null ? otherContent : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "grid grid-cols-1 gap-3", children: otherRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4343
4251
  "div",
4344
4252
  {
4345
4253
  className: "flex items-center justify-between rounded-agg-xl bg-agg-secondary-hover px-4 py-3",
4346
4254
  children: [
4347
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
4348
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Typography, { variant: "body", className: "text-right", children: row.value })
4255
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
4256
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Typography, { variant: "body", className: "text-right", children: row.value })
4349
4257
  ]
4350
4258
  },
4351
4259
  row.label
@@ -4380,14 +4288,14 @@ var MarketDetails = (props) => {
4380
4288
  (_a2 = props.onOpenChange) == null ? void 0 : _a2.call(props, nextIsOpened);
4381
4289
  };
4382
4290
  const hasEventProp = "event" in props && !!props.event;
4383
- const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks14.useEvent)(
4291
+ const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks13.useEvent)(
4384
4292
  hasEventProp ? void 0 : props.eventId,
4385
4293
  {
4386
4294
  enabled: !props.isLoading && !hasEventProp && !!props.eventId
4387
4295
  }
4388
4296
  );
4389
4297
  if (props.isLoading) {
4390
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4298
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4391
4299
  MarketDetailsLoadingState,
4392
4300
  {
4393
4301
  isOpened: resolvedIsOpened,
@@ -4397,7 +4305,7 @@ var MarketDetails = (props) => {
4397
4305
  );
4398
4306
  }
4399
4307
  if ("event" in props && props.event) {
4400
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4308
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4401
4309
  MarketDetailsContent,
4402
4310
  __spreadProps(__spreadValues({}, props), {
4403
4311
  isOpened: resolvedIsOpened,
@@ -4407,7 +4315,7 @@ var MarketDetails = (props) => {
4407
4315
  );
4408
4316
  }
4409
4317
  if (isFetchingEvent) {
4410
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4318
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4411
4319
  MarketDetailsLoadingState,
4412
4320
  {
4413
4321
  isOpened: resolvedIsOpened,
@@ -4417,9 +4325,9 @@ var MarketDetails = (props) => {
4417
4325
  );
4418
4326
  }
4419
4327
  if (!fetchedEvent) {
4420
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(MarketDetailsUnavailableState, { ariaLabel: props.ariaLabel, classNames: props.classNames });
4328
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MarketDetailsUnavailableState, { ariaLabel: props.ariaLabel, classNames: props.classNames });
4421
4329
  }
4422
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4330
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4423
4331
  MarketDetailsContent,
4424
4332
  __spreadProps(__spreadValues({}, props), {
4425
4333
  isOpened: resolvedIsOpened,