@agg-market/ui 0.0.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.
Files changed (192) hide show
  1. package/dist/badge.d.mts +26 -0
  2. package/dist/badge.d.ts +26 -0
  3. package/dist/badge.js +70 -0
  4. package/dist/badge.mjs +9 -0
  5. package/dist/button.d.mts +20 -0
  6. package/dist/button.d.ts +20 -0
  7. package/dist/button.js +197 -0
  8. package/dist/button.mjs +8 -0
  9. package/dist/card.d.mts +8 -0
  10. package/dist/card.d.ts +8 -0
  11. package/dist/card.js +84 -0
  12. package/dist/card.mjs +7 -0
  13. package/dist/chart.d.mts +40 -0
  14. package/dist/chart.d.ts +40 -0
  15. package/dist/chart.js +418 -0
  16. package/dist/chart.mjs +8 -0
  17. package/dist/chunk-2PGUPOXY.mjs +285 -0
  18. package/dist/chunk-3DV3D2LH.mjs +155 -0
  19. package/dist/chunk-44UEI6KD.mjs +280 -0
  20. package/dist/chunk-4ADCXJE6.mjs +297 -0
  21. package/dist/chunk-4GSXVVSA.mjs +64 -0
  22. package/dist/chunk-4NK2FNAG.mjs +581 -0
  23. package/dist/chunk-4XWCYUV3.mjs +355 -0
  24. package/dist/chunk-5MN6ZNFA.mjs +355 -0
  25. package/dist/chunk-6RRBINER.mjs +50 -0
  26. package/dist/chunk-765JPQDG.mjs +280 -0
  27. package/dist/chunk-7CD7GIZC.mjs +850 -0
  28. package/dist/chunk-7XRKA6XF.mjs +462 -0
  29. package/dist/chunk-AOFP74IB.mjs +850 -0
  30. package/dist/chunk-BNDFQPHF.mjs +9 -0
  31. package/dist/chunk-C4OI72SM.mjs +14 -0
  32. package/dist/chunk-CB2MLGCJ.mjs +279 -0
  33. package/dist/chunk-CKTAVEW2.mjs +212 -0
  34. package/dist/chunk-DA6KZWSK.mjs +807 -0
  35. package/dist/chunk-DBD5GHHD.mjs +147 -0
  36. package/dist/chunk-DQ6XFBYJ.mjs +37 -0
  37. package/dist/chunk-FACIYUNK.mjs +217 -0
  38. package/dist/chunk-FUJQIYOF.mjs +37 -0
  39. package/dist/chunk-FZTAHWOS.mjs +82 -0
  40. package/dist/chunk-GC3QIIH7.mjs +112 -0
  41. package/dist/chunk-GPBLZGJ2.mjs +136 -0
  42. package/dist/chunk-H4LELROL.mjs +262 -0
  43. package/dist/chunk-H7P6DIX4.mjs +262 -0
  44. package/dist/chunk-H7YEBGYY.mjs +42 -0
  45. package/dist/chunk-HJOBAMDU.mjs +142 -0
  46. package/dist/chunk-IJG5I642.mjs +462 -0
  47. package/dist/chunk-IY2AA3OL.mjs +50 -0
  48. package/dist/chunk-J6L5BLKX.mjs +136 -0
  49. package/dist/chunk-J7OETCZ7.mjs +147 -0
  50. package/dist/chunk-JLLMIPIX.mjs +42 -0
  51. package/dist/chunk-KBRLFTJT.mjs +741 -0
  52. package/dist/chunk-KDBYDMYV.mjs +64 -0
  53. package/dist/chunk-L6E6Q4C4.mjs +217 -0
  54. package/dist/chunk-LY6474C4.mjs +297 -0
  55. package/dist/chunk-M23S2DVV.mjs +581 -0
  56. package/dist/chunk-MG243DSX.mjs +44 -0
  57. package/dist/chunk-MRHSN2B7.mjs +279 -0
  58. package/dist/chunk-MXWRCVRJ.mjs +285 -0
  59. package/dist/chunk-NFYS557L.mjs +481 -0
  60. package/dist/chunk-NNSY462N.mjs +212 -0
  61. package/dist/chunk-OUOIDPGX.mjs +25 -0
  62. package/dist/chunk-P5PFQX75.mjs +31 -0
  63. package/dist/chunk-P674XRDY.mjs +481 -0
  64. package/dist/chunk-PAQ542ER.mjs +170 -0
  65. package/dist/chunk-QE46DVJG.mjs +323 -0
  66. package/dist/chunk-QXFDXXDB.mjs +792 -0
  67. package/dist/chunk-R3DRVI4J.mjs +741 -0
  68. package/dist/chunk-TTOR7JCT.mjs +155 -0
  69. package/dist/chunk-V5WIYMKS.mjs +25 -0
  70. package/dist/chunk-VAZE267Q.mjs +82 -0
  71. package/dist/chunk-VLIJ7PQK.mjs +792 -0
  72. package/dist/chunk-VYNVBJK6.mjs +44 -0
  73. package/dist/chunk-WIWJ6DIE.mjs +323 -0
  74. package/dist/chunk-XDAEEJYR.mjs +142 -0
  75. package/dist/chunk-YUIZZ6XE.mjs +31 -0
  76. package/dist/connect-button.d.mts +40 -0
  77. package/dist/connect-button.d.ts +40 -0
  78. package/dist/connect-button.js +1815 -0
  79. package/dist/connect-button.mjs +14 -0
  80. package/dist/event-list-item-details.d.mts +11 -0
  81. package/dist/event-list-item-details.d.ts +11 -0
  82. package/dist/event-list-item-details.js +2140 -0
  83. package/dist/event-list-item-details.mjs +19 -0
  84. package/dist/event-list-item-details.types-CMbXOrT-.d.ts +53 -0
  85. package/dist/event-list-item-details.types-CxWr4Qn1.d.ts +53 -0
  86. package/dist/event-list-item-details.types-DRi99PZq.d.mts +53 -0
  87. package/dist/event-list-item-details.types-DekJKeMD.d.mts +53 -0
  88. package/dist/event-list-item.d.mts +10 -0
  89. package/dist/event-list-item.d.ts +10 -0
  90. package/dist/event-list-item.js +2097 -0
  91. package/dist/event-list-item.mjs +17 -0
  92. package/dist/event-list-item.types-B1490EQm.d.mts +46 -0
  93. package/dist/event-list-item.types-B1490EQm.d.ts +46 -0
  94. package/dist/event-list-item.types-Y6IeJ4e4.d.mts +46 -0
  95. package/dist/event-list-item.types-Y6IeJ4e4.d.ts +46 -0
  96. package/dist/event-list.d.mts +9 -0
  97. package/dist/event-list.d.ts +9 -0
  98. package/dist/event-list.js +3151 -0
  99. package/dist/event-list.mjs +20 -0
  100. package/dist/event-list.types-Bpp6Vn-t.d.mts +13 -0
  101. package/dist/event-list.types-Bpp6Vn-t.d.ts +13 -0
  102. package/dist/event-list.types-CkAAUqwW.d.mts +13 -0
  103. package/dist/event-list.types-CkAAUqwW.d.ts +13 -0
  104. package/dist/event-market-page.d.mts +52 -0
  105. package/dist/event-market-page.d.ts +52 -0
  106. package/dist/event-market-page.js +5369 -0
  107. package/dist/event-market-page.mjs +29 -0
  108. package/dist/hello-world.d.mts +8 -0
  109. package/dist/hello-world.d.ts +8 -0
  110. package/dist/hello-world.js +80 -0
  111. package/dist/hello-world.mjs +8 -0
  112. package/dist/home-page.d.mts +51 -0
  113. package/dist/home-page.d.ts +51 -0
  114. package/dist/home-page.js +3415 -0
  115. package/dist/home-page.mjs +21 -0
  116. package/dist/icon.d.mts +123 -0
  117. package/dist/icon.d.ts +123 -0
  118. package/dist/icon.js +922 -0
  119. package/dist/icon.mjs +57 -0
  120. package/dist/index.d.mts +70 -0
  121. package/dist/index.d.ts +70 -0
  122. package/dist/index.js +8184 -0
  123. package/dist/index.mjs +307 -0
  124. package/dist/loading-icon.d.mts +14 -0
  125. package/dist/loading-icon.d.ts +14 -0
  126. package/dist/loading-icon.js +115 -0
  127. package/dist/loading-icon.mjs +8 -0
  128. package/dist/market-details.d.mts +73 -0
  129. package/dist/market-details.d.ts +73 -0
  130. package/dist/market-details.js +3923 -0
  131. package/dist/market-details.mjs +22 -0
  132. package/dist/modal.d.mts +66 -0
  133. package/dist/modal.d.ts +66 -0
  134. package/dist/modal.js +317 -0
  135. package/dist/modal.mjs +9 -0
  136. package/dist/number-value.d.mts +14 -0
  137. package/dist/number-value.d.ts +14 -0
  138. package/dist/number-value.js +67 -0
  139. package/dist/number-value.mjs +7 -0
  140. package/dist/onboarding-modal.d.mts +88 -0
  141. package/dist/onboarding-modal.d.ts +88 -0
  142. package/dist/onboarding-modal.js +2242 -0
  143. package/dist/onboarding-modal.mjs +24 -0
  144. package/dist/place-order.d.mts +20 -0
  145. package/dist/place-order.d.ts +20 -0
  146. package/dist/place-order.js +2916 -0
  147. package/dist/place-order.mjs +18 -0
  148. package/dist/registry-CVn79H3I.d.mts +106 -0
  149. package/dist/registry-CVn79H3I.d.ts +106 -0
  150. package/dist/search.d.mts +69 -0
  151. package/dist/search.d.ts +69 -0
  152. package/dist/search.js +1465 -0
  153. package/dist/search.mjs +12 -0
  154. package/dist/select.d.mts +19 -0
  155. package/dist/select.d.ts +19 -0
  156. package/dist/select.js +920 -0
  157. package/dist/select.mjs +11 -0
  158. package/dist/settlement.d.mts +16 -0
  159. package/dist/settlement.d.ts +16 -0
  160. package/dist/settlement.js +1769 -0
  161. package/dist/settlement.mjs +15 -0
  162. package/dist/skeleton.d.mts +22 -0
  163. package/dist/skeleton.d.ts +22 -0
  164. package/dist/skeleton.js +523 -0
  165. package/dist/skeleton.mjs +10 -0
  166. package/dist/styles.css +2 -0
  167. package/dist/switch-button.d.mts +21 -0
  168. package/dist/switch-button.d.ts +21 -0
  169. package/dist/switch-button.js +184 -0
  170. package/dist/switch-button.mjs +7 -0
  171. package/dist/tabs.d.mts +27 -0
  172. package/dist/tabs.d.ts +27 -0
  173. package/dist/tabs.js +1708 -0
  174. package/dist/tabs.mjs +12 -0
  175. package/dist/tailwind.css +2 -0
  176. package/dist/types-8VUuQVZq.d.mts +387 -0
  177. package/dist/types-8VUuQVZq.d.ts +387 -0
  178. package/dist/types-CayJ8tWA.d.mts +3 -0
  179. package/dist/types-CayJ8tWA.d.ts +3 -0
  180. package/dist/typography.d.mts +16 -0
  181. package/dist/typography.d.ts +16 -0
  182. package/dist/typography.js +62 -0
  183. package/dist/typography.mjs +7 -0
  184. package/dist/venue-logo.d.mts +12 -0
  185. package/dist/venue-logo.d.ts +12 -0
  186. package/dist/venue-logo.js +350 -0
  187. package/dist/venue-logo.mjs +10 -0
  188. package/dist/venue-logo.types-4hmCg3D3.d.ts +17 -0
  189. package/dist/venue-logo.types-B1iPJgiD.d.mts +17 -0
  190. package/dist/venue-logo.types-Bg8eXtGp.d.ts +17 -0
  191. package/dist/venue-logo.types-QNDwiQ77.d.mts +17 -0
  192. package/package.json +195 -0
@@ -0,0 +1,3151 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/events/list/index.tsx
60
+ var list_exports = {};
61
+ __export(list_exports, {
62
+ EventList: () => EventList
63
+ });
64
+ module.exports = __toCommonJS(list_exports);
65
+ var import_react3 = require("react");
66
+ var import_hooks12 = require("@agg-market/hooks");
67
+
68
+ // src/constants.ts
69
+ var AGG_ROOT_CLASS_NAME = "agg-root";
70
+
71
+ // src/shared/utils.ts
72
+ var cn = (...values) => values.filter(Boolean).join(" ");
73
+ var getMotionClassName = (enabled, ...values) => {
74
+ if (!enabled)
75
+ return void 0;
76
+ return cn(...values);
77
+ };
78
+ var getScrollBehavior = (enabled) => {
79
+ return enabled ? "smooth" : "auto";
80
+ };
81
+ var toDate = (value) => {
82
+ if (!value)
83
+ return null;
84
+ if (value instanceof Date)
85
+ return value;
86
+ const parsed = new Date(value);
87
+ if (Number.isNaN(parsed.getTime()))
88
+ return null;
89
+ return parsed;
90
+ };
91
+
92
+ // src/primitives/icon/types.ts
93
+ var getIconA11yProps = (title) => ({
94
+ role: title ? "img" : "presentation",
95
+ "aria-hidden": title ? void 0 : true
96
+ });
97
+
98
+ // src/primitives/icon/svg/arrow-trend-up.tsx
99
+ var import_jsx_runtime = require("react/jsx-runtime");
100
+ var ArrowTrendUpIcon = (_a) => {
101
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
102
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
103
+ "svg",
104
+ __spreadProps(__spreadValues(__spreadValues({
105
+ viewBox: "0 0 16 16",
106
+ className,
107
+ fill: "none"
108
+ }, getIconA11yProps(title)), props), {
109
+ children: [
110
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: title }) : null,
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
112
+ "path",
113
+ {
114
+ d: "M2 11.5L6.5 7L9.5 10L14 5.5",
115
+ stroke: "currentColor",
116
+ strokeWidth: "1.5",
117
+ strokeLinecap: "round",
118
+ strokeLinejoin: "round"
119
+ }
120
+ ),
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
+ "path",
123
+ {
124
+ d: "M10.5 5.5H14V9",
125
+ stroke: "currentColor",
126
+ strokeWidth: "1.5",
127
+ strokeLinecap: "round",
128
+ strokeLinejoin: "round"
129
+ }
130
+ )
131
+ ]
132
+ })
133
+ );
134
+ };
135
+ ArrowTrendUpIcon.displayName = "ArrowTrendUpIcon";
136
+
137
+ // src/primitives/icon/svg/arrows-to-dot.tsx
138
+ var import_jsx_runtime2 = require("react/jsx-runtime");
139
+ var ArrowsToDotIcon = (_a) => {
140
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
141
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
142
+ "svg",
143
+ __spreadProps(__spreadValues(__spreadValues({
144
+ viewBox: "0 0 16 16",
145
+ className,
146
+ fill: "none"
147
+ }, getIconA11yProps(title)), props), {
148
+ children: [
149
+ title ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("title", { children: title }) : null,
150
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
151
+ "path",
152
+ {
153
+ d: "M8 2V5M8 11V14M2 8H5M11 8H14M3.76 3.76L5.9 5.9M10.1 10.1L12.24 12.24M12.24 3.76L10.1 5.9M5.9 10.1L3.76 12.24",
154
+ stroke: "currentColor",
155
+ strokeWidth: "1.25",
156
+ strokeLinecap: "round",
157
+ strokeLinejoin: "round"
158
+ }
159
+ ),
160
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "8", cy: "8", r: "1.5", fill: "currentColor" })
161
+ ]
162
+ })
163
+ );
164
+ };
165
+ ArrowsToDotIcon.displayName = "ArrowsToDotIcon";
166
+
167
+ // src/primitives/icon/svg/best-prices.tsx
168
+ var import_jsx_runtime3 = require("react/jsx-runtime");
169
+ var BestPricesIcon = (_a) => {
170
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
171
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
172
+ "svg",
173
+ __spreadProps(__spreadValues(__spreadValues({
174
+ width: "28",
175
+ height: "28",
176
+ viewBox: "0 0 28 28",
177
+ fill: "none",
178
+ xmlns: "http://www.w3.org/2000/svg",
179
+ className
180
+ }, getIconA11yProps(title)), props), {
181
+ children: [
182
+ title ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("title", { children: title }) : null,
183
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { clipPath: "url(#clip0_best_prices)", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
184
+ "path",
185
+ {
186
+ d: "M12.8333 27.4167C12.8333 27.7387 12.572 28 12.25 28H5.25C2.3555 28 0 25.6445 0 22.75V5.25117C0 2.35667 2.35433 0 5.25 0H18.0833C20.9778 0 23.3333 2.35433 23.3333 5.24883V8.74883C23.3333 9.07083 23.0732 9.33217 22.75 9.33217C22.4268 9.33217 22.1667 9.07083 22.1667 8.74883V5.24883C22.1667 2.99717 20.3338 1.1655 18.0833 1.1655H5.25C2.99833 1.1655 1.16667 2.99833 1.16667 5.25V22.7488C1.16667 25.0005 2.9995 26.8322 5.25 26.8322H12.25C12.572 26.8322 12.8333 27.0947 12.8333 27.4167ZM27.8297 27.8297C27.7153 27.944 27.566 28 27.4167 28C27.2673 28 27.118 27.9428 27.0037 27.8297L23.0102 23.8362C21.6837 24.9748 19.964 25.6667 18.0822 25.6667C13.9008 25.6667 10.4988 22.2647 10.4988 18.0833C10.4988 13.902 13.9008 10.5 18.0822 10.5C22.2635 10.5 25.6655 13.902 25.6655 18.0833C25.6655 19.964 24.9725 21.6837 23.835 23.0113L27.8285 27.0048C28.056 27.2323 28.0572 27.6022 27.8297 27.8297ZM24.5 18.0833C24.5 14.546 21.6218 11.6667 18.0833 11.6667C14.5448 11.6667 11.6667 14.546 11.6667 18.0833C11.6667 21.6207 14.5448 24.5 18.0833 24.5C21.6218 24.5 24.5 21.6207 24.5 18.0833ZM7.58333 5.83333H5.25C4.928 5.83333 4.66667 6.09467 4.66667 6.41667C4.66667 6.73867 4.928 7 5.25 7H7.58333C7.90533 7 8.16667 6.73867 8.16667 6.41667C8.16667 6.09467 7.90533 5.83333 7.58333 5.83333ZM7.58333 17.5H5.25C4.928 17.5 4.66667 17.7613 4.66667 18.0833C4.66667 18.4053 4.928 18.6667 5.25 18.6667H7.58333C7.90533 18.6667 8.16667 18.4053 8.16667 18.0833C8.16667 17.7613 7.90533 17.5 7.58333 17.5ZM11.0833 5.83333C10.7613 5.83333 10.5 6.09467 10.5 6.41667C10.5 6.73867 10.7613 7 11.0833 7H18.0833C18.4053 7 18.6667 6.73867 18.6667 6.41667C18.6667 6.09467 18.4053 5.83333 18.0833 5.83333H11.0833ZM7.58333 11.6667H5.25C4.928 11.6667 4.66667 11.928 4.66667 12.25C4.66667 12.572 4.928 12.8333 5.25 12.8333H7.58333C7.90533 12.8333 8.16667 12.572 8.16667 12.25C8.16667 11.928 7.90533 11.6667 7.58333 11.6667ZM21.1668 16.4862L18.0098 19.5405C17.6167 19.9255 16.9762 19.9302 16.583 19.5452L14.9928 17.976C14.7642 17.7497 14.3943 17.752 14.168 17.9807C13.9417 18.2105 13.944 18.5803 14.1738 18.8055L15.7652 20.377C16.1875 20.79 16.7417 20.9965 17.2958 20.9965C17.85 20.9965 18.4053 20.7888 18.8253 20.3747L21.9788 17.325C22.2098 17.101 22.2168 16.7312 21.9928 16.5002C21.77 16.2692 21.399 16.2645 21.1668 16.4862Z",
187
+ fill: "currentColor"
188
+ }
189
+ ) }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("clipPath", { id: "clip0_best_prices", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: "28", height: "28", fill: "white" }) }) })
191
+ ]
192
+ })
193
+ );
194
+ };
195
+ BestPricesIcon.displayName = "BestPricesIcon";
196
+
197
+ // src/primitives/icon/svg/check-circle.tsx
198
+ var import_jsx_runtime4 = require("react/jsx-runtime");
199
+ var CheckCircleIcon = (_a) => {
200
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
201
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
202
+ "svg",
203
+ __spreadProps(__spreadValues(__spreadValues({
204
+ width: "24",
205
+ height: "24",
206
+ viewBox: "0 0 24 24",
207
+ fill: "none",
208
+ xmlns: "http://www.w3.org/2000/svg",
209
+ className
210
+ }, getIconA11yProps(title)), props), {
211
+ children: [
212
+ title ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("title", { children: title }) : null,
213
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("g", { clipPath: "url(#clip0_check_circle)", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
214
+ "path",
215
+ {
216
+ d: "M12 0C5.383 0 0 5.383 0 12C0 18.617 5.383 24 12 24C18.617 24 24 18.617 24 12C24 5.383 18.617 0 12 0ZM18.2 10.512L13.774 14.857C12.991 15.625 11.983 16.008 10.974 16.008C9.976 16.008 8.978 15.632 8.198 14.879L6.299 13.012C5.905 12.625 5.9 11.992 6.287 11.598C6.673 11.203 7.308 11.198 7.701 11.586L9.594 13.447C10.37 14.197 11.595 14.193 12.375 13.429L16.8 9.085C17.193 8.697 17.824 8.704 18.214 9.098C18.601 9.492 18.595 10.125 18.2 10.512Z",
217
+ fill: "currentColor"
218
+ }
219
+ ) }),
220
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("clipPath", { id: "clip0_check_circle", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
221
+ ]
222
+ })
223
+ );
224
+ };
225
+ CheckCircleIcon.displayName = "CheckCircleIcon";
226
+
227
+ // src/primitives/icon/svg/chevron-down.tsx
228
+ var import_jsx_runtime5 = require("react/jsx-runtime");
229
+ var ChevronDownIcon = (_a) => {
230
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
231
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
232
+ "svg",
233
+ __spreadProps(__spreadValues(__spreadValues({
234
+ viewBox: "0 0 14 14",
235
+ className,
236
+ fill: "none"
237
+ }, getIconA11yProps(title)), props), {
238
+ children: [
239
+ title ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("title", { children: title }) : null,
240
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
241
+ "path",
242
+ {
243
+ d: "M3.25 5.25L7 9L10.75 5.25",
244
+ stroke: "currentColor",
245
+ strokeWidth: "1.5",
246
+ strokeLinecap: "round",
247
+ strokeLinejoin: "round"
248
+ }
249
+ )
250
+ ]
251
+ })
252
+ );
253
+ };
254
+ ChevronDownIcon.displayName = "ChevronDownIcon";
255
+
256
+ // src/primitives/icon/svg/chevron-right.tsx
257
+ var import_jsx_runtime6 = require("react/jsx-runtime");
258
+ var ChevronRightIcon = (_a) => {
259
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
260
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
261
+ "svg",
262
+ __spreadProps(__spreadValues(__spreadValues({
263
+ viewBox: "0 0 16 16",
264
+ className,
265
+ fill: "none"
266
+ }, getIconA11yProps(title)), props), {
267
+ children: [
268
+ title ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("title", { children: title }) : null,
269
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
270
+ "path",
271
+ {
272
+ d: "M10.2665 6.56563L7.20654 3.50563C7.08163 3.38146 6.91266 3.31177 6.73653 3.31177C6.56041 3.31177 6.39144 3.38146 6.26653 3.50563C6.20405 3.5676 6.15445 3.64134 6.12061 3.72258C6.08676 3.80382 6.06934 3.89095 6.06934 3.97896C6.06934 4.06697 6.08676 4.15411 6.12061 4.23535C6.15445 4.31659 6.20405 4.39032 6.26653 4.4523L9.3332 7.50563C9.39569 7.5676 9.44528 7.64134 9.47913 7.72258C9.51298 7.80382 9.5304 7.89095 9.5304 7.97896C9.5304 8.06697 9.51298 8.15411 9.47913 8.23535C9.44528 8.31659 9.39569 8.39032 9.3332 8.4523L6.26653 11.5056C6.141 11.6303 6.07012 11.7997 6.0695 11.9766C6.06887 12.1535 6.13855 12.3234 6.2632 12.449C6.38785 12.5745 6.55727 12.6454 6.73418 12.646C6.91109 12.6466 7.081 12.5769 7.20654 12.4523L10.2665 9.3923C10.6411 9.0173 10.8514 8.50896 10.8514 7.97896C10.8514 7.44896 10.6411 6.94063 10.2665 6.56563Z",
273
+ fill: "currentColor"
274
+ }
275
+ )
276
+ ]
277
+ })
278
+ );
279
+ };
280
+ ChevronRightIcon.displayName = "ChevronRightIcon";
281
+
282
+ // src/primitives/icon/svg/chevron-up.tsx
283
+ var import_jsx_runtime7 = require("react/jsx-runtime");
284
+ var ChevronUpIcon = (_a) => {
285
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
286
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
287
+ "svg",
288
+ __spreadProps(__spreadValues(__spreadValues({
289
+ viewBox: "0 0 14 14",
290
+ className,
291
+ fill: "none"
292
+ }, getIconA11yProps(title)), props), {
293
+ children: [
294
+ title ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("title", { children: title }) : null,
295
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
296
+ "path",
297
+ {
298
+ d: "M3.25 8.75L7 5L10.75 8.75",
299
+ stroke: "currentColor",
300
+ strokeWidth: "1.5",
301
+ strokeLinecap: "round",
302
+ strokeLinejoin: "round"
303
+ }
304
+ )
305
+ ]
306
+ })
307
+ );
308
+ };
309
+ ChevronUpIcon.displayName = "ChevronUpIcon";
310
+
311
+ // src/primitives/icon/svg/close.tsx
312
+ var import_jsx_runtime8 = require("react/jsx-runtime");
313
+ var CloseIcon = (_a) => {
314
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
315
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
316
+ "svg",
317
+ __spreadProps(__spreadValues(__spreadValues({
318
+ width: "16",
319
+ height: "16",
320
+ viewBox: "0 0 16 16",
321
+ fill: "none",
322
+ xmlns: "http://www.w3.org/2000/svg",
323
+ className
324
+ }, getIconA11yProps(title)), props), {
325
+ children: [
326
+ title ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("title", { children: title }) : null,
327
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
328
+ "path",
329
+ {
330
+ d: "M12 4L4 12M4 4l8 8",
331
+ stroke: "currentColor",
332
+ strokeWidth: "2",
333
+ strokeLinecap: "round",
334
+ strokeLinejoin: "round"
335
+ }
336
+ )
337
+ ]
338
+ })
339
+ );
340
+ };
341
+ CloseIcon.displayName = "CloseIcon";
342
+
343
+ // src/primitives/icon/svg/create-account.tsx
344
+ var import_jsx_runtime9 = require("react/jsx-runtime");
345
+ var CreateAccountIcon = (_a) => {
346
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
347
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
348
+ "svg",
349
+ __spreadProps(__spreadValues(__spreadValues({
350
+ width: "28",
351
+ height: "28",
352
+ viewBox: "0 0 28 28",
353
+ fill: "none",
354
+ xmlns: "http://www.w3.org/2000/svg",
355
+ className
356
+ }, getIconA11yProps(title)), props), {
357
+ children: [
358
+ title ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("title", { children: title }) : null,
359
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("g", { clipPath: "url(#clip0_create_account)", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
360
+ "path",
361
+ {
362
+ d: "M22.1667 4.66667V0.583333C22.1667 0.261333 22.428 0 22.75 0C23.072 0 23.3333 0.261333 23.3333 0.583333V4.66667H27.4167C27.7387 4.66667 28 4.928 28 5.25C28 5.572 27.7387 5.83333 27.4167 5.83333H23.3333V9.91667C23.3333 10.2387 23.072 10.5 22.75 10.5C22.428 10.5 22.1667 10.2387 22.1667 9.91667V5.83333H18.0833C17.7613 5.83333 17.5 5.572 17.5 5.25C17.5 4.928 17.7613 4.66667 18.0833 4.66667H22.1667ZM18.6667 11.6667C18.6667 14.2403 16.5737 16.3333 14 16.3333C11.4263 16.3333 9.33333 14.2403 9.33333 11.6667C9.33333 9.093 11.4263 7 14 7C16.5737 7 18.6667 9.093 18.6667 11.6667ZM17.5 11.6667C17.5 9.737 15.9297 8.16667 14 8.16667C12.0703 8.16667 10.5 9.737 10.5 11.6667C10.5 13.5963 12.0703 15.1667 14 15.1667C15.9297 15.1667 17.5 13.5963 17.5 11.6667ZM27.3922 9.90617C27.7958 11.2292 28 12.6058 28 14C28 21.7198 21.7198 28 14 28C6.28017 28 0 21.7198 0 14C0 6.28017 6.28017 0 14 0C15.4548 0 16.8898 0.221667 18.2607 0.660333C18.5675 0.758333 18.7367 1.08617 18.6387 1.393C18.5395 1.69983 18.2105 1.87017 17.9048 1.771C16.6483 1.36967 15.3335 1.1655 13.9988 1.1655C6.92417 1.16667 1.16667 6.92417 1.16667 14C1.16667 18.5197 3.521 22.4933 7.063 24.78C7.5005 21.3383 10.4417 18.6667 14 18.6667C17.5583 18.6667 20.4995 21.3383 20.937 24.78C24.4778 22.4933 26.8333 18.5197 26.8333 14C26.8333 12.7213 26.6467 11.459 26.2757 10.2468C26.1823 9.93883 26.355 9.61217 26.6642 9.51883C26.9722 9.422 27.2977 9.59933 27.3922 9.90617ZM14 26.8333C16.0918 26.8333 18.0623 26.32 19.8088 25.4287C19.6805 22.3253 17.1348 19.8333 14 19.8333C10.8652 19.8333 8.31833 22.3242 8.19117 25.4287C9.93767 26.32 11.9082 26.8333 14 26.8333Z",
363
+ fill: "currentColor"
364
+ }
365
+ ) }),
366
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("clipPath", { id: "clip0_create_account", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { width: "28", height: "28", fill: "white" }) }) })
367
+ ]
368
+ })
369
+ );
370
+ };
371
+ CreateAccountIcon.displayName = "CreateAccountIcon";
372
+
373
+ // src/primitives/icon/svg/disconnect.tsx
374
+ var import_jsx_runtime10 = require("react/jsx-runtime");
375
+ var DisconnectIcon = (_a) => {
376
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
377
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
378
+ "svg",
379
+ __spreadProps(__spreadValues(__spreadValues({
380
+ viewBox: "0 0 16 16",
381
+ className,
382
+ fill: "none"
383
+ }, getIconA11yProps(title)), props), {
384
+ children: [
385
+ title ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("title", { children: title }) : null,
386
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
387
+ "path",
388
+ {
389
+ d: "M6.5 3H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.5",
390
+ stroke: "currentColor",
391
+ strokeWidth: "1.5",
392
+ strokeLinecap: "round"
393
+ }
394
+ ),
395
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
396
+ "path",
397
+ {
398
+ d: "M9.5 5.5 12 8m0 0-2.5 2.5M12 8H6",
399
+ stroke: "currentColor",
400
+ strokeWidth: "1.5",
401
+ strokeLinecap: "round",
402
+ strokeLinejoin: "round"
403
+ }
404
+ )
405
+ ]
406
+ })
407
+ );
408
+ };
409
+ DisconnectIcon.displayName = "DisconnectIcon";
410
+
411
+ // src/primitives/icon/svg/download.tsx
412
+ var import_jsx_runtime11 = require("react/jsx-runtime");
413
+ var DownloadIcon = (_a) => {
414
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
415
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
416
+ "svg",
417
+ __spreadProps(__spreadValues(__spreadValues({
418
+ viewBox: "0 0 16 16",
419
+ className,
420
+ fill: "none"
421
+ }, getIconA11yProps(title)), props), {
422
+ children: [
423
+ title ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("title", { children: title }) : null,
424
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
425
+ "path",
426
+ {
427
+ d: "M8 2.5v7m0 0 2.5-2.5M8 9.5 5.5 7",
428
+ stroke: "currentColor",
429
+ strokeWidth: "1.5",
430
+ strokeLinecap: "round",
431
+ strokeLinejoin: "round"
432
+ }
433
+ ),
434
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M2.5 12.5h11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
435
+ ]
436
+ })
437
+ );
438
+ };
439
+ DownloadIcon.displayName = "DownloadIcon";
440
+
441
+ // src/primitives/icon/icon.constants.ts
442
+ var iconSizeClasses = {
443
+ xxs: "h-2 w-2",
444
+ xs: "h-3 w-3",
445
+ s: "h-4 w-4",
446
+ m: "h-6 w-6",
447
+ l: "h-8 w-8",
448
+ xl: "h-10 w-10",
449
+ xxl: "h-12 w-12"
450
+ };
451
+
452
+ // src/primitives/icon/svg/dots-horizontal.tsx
453
+ var import_jsx_runtime12 = require("react/jsx-runtime");
454
+ var DotsHorizontalIcon = (_a) => {
455
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
456
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
457
+ "svg",
458
+ __spreadProps(__spreadValues(__spreadValues({
459
+ viewBox: "0 0 16 16",
460
+ className,
461
+ fill: "none"
462
+ }, getIconA11yProps(title)), props), {
463
+ children: [
464
+ title ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("title", { children: title }) : null,
465
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "3.5", cy: "8", r: "1.25", fill: "currentColor" }),
466
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "8", cy: "8", r: "1.25", fill: "currentColor" }),
467
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "12.5", cy: "8", r: "1.25", fill: "currentColor" })
468
+ ]
469
+ })
470
+ );
471
+ };
472
+ DotsHorizontalIcon.displayName = "DotsHorizontalIcon";
473
+
474
+ // src/primitives/icon/svg/link-accounts.tsx
475
+ var import_jsx_runtime13 = require("react/jsx-runtime");
476
+ var LinkAccountsIcon = (_a) => {
477
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
478
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
479
+ "svg",
480
+ __spreadProps(__spreadValues(__spreadValues({
481
+ width: "28",
482
+ height: "28",
483
+ viewBox: "0 0 28 28",
484
+ fill: "none",
485
+ xmlns: "http://www.w3.org/2000/svg",
486
+ className
487
+ }, getIconA11yProps(title)), props), {
488
+ children: [
489
+ title ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("title", { children: title }) : null,
490
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("g", { clipPath: "url(#clip0_link_accounts)", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
491
+ "path",
492
+ {
493
+ d: "M28 18.0835C28 22.2648 24.598 25.6668 20.4167 25.6668H14.5833C10.402 25.6668 7 22.2648 7 18.0835C7 13.9022 10.402 10.5002 14.5833 10.5002H16.9167C17.2387 10.5002 17.5 10.7615 17.5 11.0835C17.5 11.4055 17.2387 11.6668 16.9167 11.6668H14.5833C11.0448 11.6668 8.16667 14.5462 8.16667 18.0835C8.16667 21.6208 11.0448 24.5002 14.5833 24.5002H20.4167C23.9552 24.5002 26.8333 21.6208 26.8333 18.0835C26.8333 15.7992 25.6037 13.67 23.625 12.5243C23.3462 12.3633 23.2505 12.0063 23.4127 11.7275C23.5725 11.4487 23.9283 11.3507 24.2095 11.514C26.5475 12.8662 28.0012 15.3827 28.0012 18.0823L28 18.0835ZM4.375 15.476C2.39517 14.3315 1.16667 12.2012 1.16667 9.91683C1.16667 6.3795 4.04483 3.50016 7.58333 3.50016H13.4167C16.9552 3.50016 19.8333 6.3795 19.8333 9.91683C19.8333 13.4542 16.9552 16.3335 13.4167 16.3335H11.0833C10.7613 16.3335 10.5 16.5948 10.5 16.9168C10.5 17.2388 10.7613 17.5002 11.0833 17.5002H13.4167C17.598 17.5002 21 14.0982 21 9.91683C21 5.7355 17.598 2.3335 13.4167 2.3335H7.58333C3.402 2.3335 0 5.7355 0 9.91683C0 12.6153 1.4525 15.133 3.79167 16.4852C4.0705 16.6462 4.4275 16.5517 4.5885 16.2717C4.75067 15.994 4.655 15.6358 4.37617 15.4748L4.375 15.476Z",
494
+ fill: "currentColor"
495
+ }
496
+ ) }),
497
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("clipPath", { id: "clip0_link_accounts", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { width: "28", height: "28", fill: "white" }) }) })
498
+ ]
499
+ })
500
+ );
501
+ };
502
+ LinkAccountsIcon.displayName = "LinkAccountsIcon";
503
+
504
+ // src/primitives/icon/svg/profile.tsx
505
+ var import_jsx_runtime14 = require("react/jsx-runtime");
506
+ var ProfileIcon = (_a) => {
507
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
508
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
509
+ "svg",
510
+ __spreadProps(__spreadValues(__spreadValues({
511
+ viewBox: "0 0 16 16",
512
+ className,
513
+ fill: "none"
514
+ }, getIconA11yProps(title)), props), {
515
+ children: [
516
+ title ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("title", { children: title }) : null,
517
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
518
+ "path",
519
+ {
520
+ d: "M8 8.25a2.75 2.75 0 1 0 0-5.5 2.75 2.75 0 0 0 0 5.5Z",
521
+ stroke: "currentColor",
522
+ strokeWidth: "1.5"
523
+ }
524
+ ),
525
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
526
+ "path",
527
+ {
528
+ d: "M3 13.5a5 5 0 0 1 10 0",
529
+ stroke: "currentColor",
530
+ strokeWidth: "1.5",
531
+ strokeLinecap: "round"
532
+ }
533
+ )
534
+ ]
535
+ })
536
+ );
537
+ };
538
+ ProfileIcon.displayName = "ProfileIcon";
539
+
540
+ // src/primitives/icon/svg/revenue-alt.tsx
541
+ var import_jsx_runtime15 = require("react/jsx-runtime");
542
+ var RevenueAltIcon = (_a) => {
543
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
544
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
545
+ "svg",
546
+ __spreadProps(__spreadValues(__spreadValues({
547
+ viewBox: "0 0 20 20",
548
+ className,
549
+ fill: "none"
550
+ }, getIconA11yProps(title)), props), {
551
+ children: [
552
+ title ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("title", { children: title }) : null,
553
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
554
+ "path",
555
+ {
556
+ d: "M3 14V6M3 6L1.5 7.5M3 6L4.5 7.5M17 6V14M17 14L15.5 12.5M17 14L18.5 12.5",
557
+ stroke: "currentColor",
558
+ strokeWidth: "1.5",
559
+ strokeLinecap: "round",
560
+ strokeLinejoin: "round"
561
+ }
562
+ ),
563
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
564
+ "path",
565
+ {
566
+ d: "M10 5.5V14.5M12.5 7.4C12.5 6.55 11.38 5.86 10 5.86C8.62 5.86 7.5 6.55 7.5 7.4C7.5 8.25 8.62 8.94 10 8.94C11.38 8.94 12.5 9.63 12.5 10.48C12.5 11.33 11.38 12.02 10 12.02C8.62 12.02 7.5 11.33 7.5 10.48",
567
+ stroke: "currentColor",
568
+ strokeWidth: "1.5",
569
+ strokeLinecap: "round",
570
+ strokeLinejoin: "round"
571
+ }
572
+ )
573
+ ]
574
+ })
575
+ );
576
+ };
577
+ RevenueAltIcon.displayName = "RevenueAltIcon";
578
+
579
+ // src/primitives/icon/svg/search.tsx
580
+ var import_jsx_runtime16 = require("react/jsx-runtime");
581
+ var SearchIcon = (_a) => {
582
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
583
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
584
+ "svg",
585
+ __spreadProps(__spreadValues(__spreadValues({
586
+ viewBox: "0 0 16 16",
587
+ fill: "none",
588
+ xmlns: "http://www.w3.org/2000/svg",
589
+ className
590
+ }, getIconA11yProps(title)), props), {
591
+ children: [
592
+ title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("title", { children: title }) : null,
593
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
594
+ "path",
595
+ {
596
+ d: "M7.3335 12.3333C10.0949 12.3333 12.3335 10.0947 12.3335 7.33329C12.3335 4.57187 10.0949 2.33329 7.3335 2.33329C4.57208 2.33329 2.3335 4.57187 2.3335 7.33329C2.3335 10.0947 4.57208 12.3333 7.3335 12.3333Z",
597
+ stroke: "currentColor",
598
+ strokeWidth: "1.3",
599
+ strokeLinecap: "round",
600
+ strokeLinejoin: "round"
601
+ }
602
+ ),
603
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
604
+ "path",
605
+ {
606
+ d: "M13.6668 13.6666L11.1667 11.1666",
607
+ stroke: "currentColor",
608
+ strokeWidth: "1.3",
609
+ strokeLinecap: "round",
610
+ strokeLinejoin: "round"
611
+ }
612
+ )
613
+ ]
614
+ })
615
+ );
616
+ };
617
+ SearchIcon.displayName = "SearchIcon";
618
+
619
+ // src/primitives/icon/svg/shield-trust.tsx
620
+ var import_jsx_runtime17 = require("react/jsx-runtime");
621
+ var ShieldTrustIcon = (_a) => {
622
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
623
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
624
+ "svg",
625
+ __spreadProps(__spreadValues(__spreadValues({
626
+ viewBox: "0 0 16 16",
627
+ className,
628
+ fill: "none"
629
+ }, getIconA11yProps(title)), props), {
630
+ children: [
631
+ title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("title", { children: title }) : null,
632
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
633
+ "path",
634
+ {
635
+ d: "M8 1.25L13.5 3.25V7.08C13.5 10.09 11.62 12.74 8 14.75C4.38 12.74 2.5 10.09 2.5 7.08V3.25L8 1.25Z",
636
+ fill: "currentColor"
637
+ }
638
+ ),
639
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
640
+ "path",
641
+ {
642
+ d: "M5.5 8.2L7.2 9.9L10.8 6.3",
643
+ stroke: "white",
644
+ strokeWidth: "1.4",
645
+ strokeLinecap: "round",
646
+ strokeLinejoin: "round"
647
+ }
648
+ )
649
+ ]
650
+ })
651
+ );
652
+ };
653
+ ShieldTrustIcon.displayName = "ShieldTrustIcon";
654
+
655
+ // src/primitives/icon/svg/stay-in-control.tsx
656
+ var import_jsx_runtime18 = require("react/jsx-runtime");
657
+ var StayInControlIcon = (_a) => {
658
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
659
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
660
+ "svg",
661
+ __spreadProps(__spreadValues(__spreadValues({
662
+ width: "28",
663
+ height: "28",
664
+ viewBox: "0 0 28 28",
665
+ fill: "none",
666
+ xmlns: "http://www.w3.org/2000/svg",
667
+ className
668
+ }, getIconA11yProps(title)), props), {
669
+ children: [
670
+ title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("title", { children: title }) : null,
671
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("g", { clipPath: "url(#clip0_stay_in_control)", children: [
672
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
673
+ "path",
674
+ {
675
+ d: "M14 27.9406C13.9102 27.9406 13.8215 27.9196 13.7387 27.8788L13.2428 27.6314C10.6832 26.3504 2.32983 21.5753 2.32983 13.8648L2.33217 7.62776C2.33217 5.36093 3.77767 3.35776 5.93017 2.64493L13.8168 0.0292617C13.9358 -0.010405 14.0653 -0.010405 14.1832 0.0292617L22.0687 2.64376C24.2212 3.35776 25.6667 5.36093 25.6667 7.6266L25.6632 13.8636C25.6632 22.6113 17.2958 26.6584 14.7315 27.6909L14.217 27.8974C14.147 27.9254 14.0723 27.9394 13.9988 27.9394L14 27.9406ZM14 1.19826L6.29767 3.7521C4.6235 4.30743 3.5 5.86493 3.5 7.62776L3.49767 13.8648C3.49767 20.9056 11.3563 25.3844 13.7655 26.5884L14.0268 26.7191L14.2975 26.6106C16.6903 25.6481 24.4977 21.8833 24.4977 13.8659L24.5012 7.62893C24.5012 5.8661 23.3765 4.3086 21.7035 3.75326L14 1.19826Z",
676
+ fill: "currentColor"
677
+ }
678
+ ),
679
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
680
+ "path",
681
+ {
682
+ d: "M12.8112 17.5001C12.0633 17.5001 11.3155 17.2154 10.7462 16.6461L7.18083 13.2569C6.94749 13.0352 6.93816 12.6654 7.15983 12.4321C7.38149 12.1999 7.75016 12.1894 7.98466 12.4111L11.5605 15.8107C12.2535 16.5026 13.363 16.5037 14.0455 15.8212L20.5928 9.49791C20.8262 9.27508 21.196 9.28208 21.4177 9.51308C21.6417 9.74408 21.6358 10.1139 21.4037 10.3379L14.8622 16.6542C14.2987 17.2177 13.5543 17.5012 12.81 17.5012L12.8112 17.5001Z",
683
+ fill: "currentColor"
684
+ }
685
+ )
686
+ ] }),
687
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_stay_in_control", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "28", height: "28", fill: "white" }) }) })
688
+ ]
689
+ })
690
+ );
691
+ };
692
+ StayInControlIcon.displayName = "StayInControlIcon";
693
+
694
+ // src/primitives/icon/svg/triangle-down.tsx
695
+ var import_jsx_runtime19 = require("react/jsx-runtime");
696
+ var TriangleDownIcon = (_a) => {
697
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
698
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
699
+ "svg",
700
+ __spreadProps(__spreadValues(__spreadValues({
701
+ viewBox: "0 0 8 8",
702
+ className,
703
+ fill: "none"
704
+ }, getIconA11yProps(title)), props), {
705
+ children: [
706
+ title ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("title", { children: title }) : null,
707
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("g", { transform: "scale(1,-1) translate(0,-8)", clipPath: "url(#triangle_up)", children: [
708
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
709
+ "path",
710
+ {
711
+ d: "M3.99989 1.6805L6.23917 6.72896H1.76061L3.99989 1.6805ZM3.99989 0.366097C3.87788 0.36535 3.75832 0.400347 3.65596 0.466768C3.55361 0.53319 3.47295 0.628129 3.42393 0.739866L0.362237 7.63838H7.63755L4.57737 0.739866C4.52825 0.62789 4.44735 0.532789 4.3447 0.46635C4.24205 0.39991 4.12216 0.365052 3.99989 0.366097Z",
712
+ fill: "currentColor"
713
+ }
714
+ ),
715
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
716
+ "path",
717
+ {
718
+ d: "M4.00167 0.00284122C4.19344 0.00214978 4.38147 0.0566837 4.54252 0.160923C4.70445 0.265758 4.83154 0.416026 4.90931 0.592539L7.9697 7.4913L8.19705 8.00195H-0.197266L3.09048 0.593427C3.16804 0.41669 3.29625 0.26688 3.45815 0.161811C3.61872 0.0576301 3.80589 0.00261591 3.99723 0.00284122H3.99989L4.00256 0.00195312L4.00167 0.00284122ZM3.99989 0.366097C3.87788 0.36535 3.75832 0.400347 3.65596 0.466768L3.58337 0.521491C3.51516 0.581467 3.46071 0.656022 3.42393 0.739866L0.362237 7.63838H7.63755L4.57737 0.739866C4.54053 0.655873 4.48567 0.581521 4.4173 0.521491L4.3447 0.46635C4.24205 0.39991 4.12216 0.365052 3.99989 0.366097ZM6.23917 6.72896H1.76061L3.99989 1.6805L6.23917 6.72896ZM2.31961 6.36519H5.68018L3.99989 2.57655L2.31961 6.36519Z",
719
+ fill: "currentColor"
720
+ }
721
+ )
722
+ ] }),
723
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("clipPath", { id: "triangle_up", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { width: "8", height: "8", fill: "white" }) }) })
724
+ ]
725
+ })
726
+ );
727
+ };
728
+ TriangleDownIcon.displayName = "TriangleDownIcon";
729
+
730
+ // src/primitives/icon/svg/triangle-up.tsx
731
+ var import_jsx_runtime20 = require("react/jsx-runtime");
732
+ var TriangleUpIcon = (_a) => {
733
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
734
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
735
+ "svg",
736
+ __spreadProps(__spreadValues(__spreadValues({
737
+ viewBox: "0 0 8 8",
738
+ className,
739
+ fill: "none"
740
+ }, getIconA11yProps(title)), props), {
741
+ children: [
742
+ title ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("title", { children: title }) : null,
743
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("g", { clipPath: "url(#triangle_up)", children: [
744
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
745
+ "path",
746
+ {
747
+ d: "M3.99989 1.6805L6.23917 6.72896H1.76061L3.99989 1.6805ZM3.99989 0.366097C3.87788 0.36535 3.75832 0.400347 3.65596 0.466768C3.55361 0.53319 3.47295 0.628129 3.42393 0.739866L0.362237 7.63838H7.63755L4.57737 0.739866C4.52825 0.62789 4.44735 0.532789 4.3447 0.46635C4.24205 0.39991 4.12216 0.365052 3.99989 0.366097Z",
748
+ fill: "currentColor"
749
+ }
750
+ ),
751
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
752
+ "path",
753
+ {
754
+ d: "M4.00167 0.00284122C4.19344 0.00214978 4.38147 0.0566837 4.54252 0.160923C4.70445 0.265758 4.83154 0.416026 4.90931 0.592539L7.9697 7.4913L8.19705 8.00195H-0.197266L3.09048 0.593427C3.16804 0.41669 3.29625 0.26688 3.45815 0.161811C3.61872 0.0576301 3.80589 0.00261591 3.99723 0.00284122H3.99989L4.00256 0.00195312L4.00167 0.00284122ZM3.99989 0.366097C3.87788 0.36535 3.75832 0.400347 3.65596 0.466768L3.58337 0.521491C3.51516 0.581467 3.46071 0.656022 3.42393 0.739866L0.362237 7.63838H7.63755L4.57737 0.739866C4.54053 0.655873 4.48567 0.581521 4.4173 0.521491L4.3447 0.46635C4.24205 0.39991 4.12216 0.365052 3.99989 0.366097ZM6.23917 6.72896H1.76061L3.99989 1.6805L6.23917 6.72896ZM2.31961 6.36519H5.68018L3.99989 2.57655L2.31961 6.36519Z",
755
+ fill: "currentColor"
756
+ }
757
+ )
758
+ ] }),
759
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("clipPath", { id: "triangle_up", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { width: "8", height: "8", fill: "white" }) }) })
760
+ ]
761
+ })
762
+ );
763
+ };
764
+ TriangleUpIcon.displayName = "TriangleUpIcon";
765
+
766
+ // src/primitives/icon/svg/upload.tsx
767
+ var import_jsx_runtime21 = require("react/jsx-runtime");
768
+ var UploadIcon = (_a) => {
769
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
770
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
771
+ "svg",
772
+ __spreadProps(__spreadValues(__spreadValues({
773
+ viewBox: "0 0 16 16",
774
+ className,
775
+ fill: "none"
776
+ }, getIconA11yProps(title)), props), {
777
+ children: [
778
+ title ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("title", { children: title }) : null,
779
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
780
+ "path",
781
+ {
782
+ d: "M8 13.5v-7m0 0 2.5 2.5M8 6.5 5.5 9",
783
+ stroke: "currentColor",
784
+ strokeWidth: "1.5",
785
+ strokeLinecap: "round",
786
+ strokeLinejoin: "round"
787
+ }
788
+ ),
789
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M2.5 3.5h11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
790
+ ]
791
+ })
792
+ );
793
+ };
794
+ UploadIcon.displayName = "UploadIcon";
795
+
796
+ // src/primitives/icon/svg/wallet-avatar.tsx
797
+ var import_jsx_runtime22 = require("react/jsx-runtime");
798
+ function WalletAvatarIcon(_a) {
799
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
800
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
801
+ "svg",
802
+ __spreadProps(__spreadValues(__spreadValues({
803
+ fill: "none",
804
+ className,
805
+ viewBox: "0 0 16 16"
806
+ }, getIconA11yProps(title)), props), {
807
+ children: [
808
+ title ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("title", { children: title }) : null,
809
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "8", cy: "5.25", r: "2.25", fill: "currentColor" }),
810
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M3.75 12.75a4.25 4.25 0 0 1 8.5 0v.25h-8.5v-.25Z", fill: "currentColor" })
811
+ ]
812
+ })
813
+ );
814
+ }
815
+ WalletAvatarIcon.displayName = "WalletAvatarIcon";
816
+
817
+ // src/primitives/icon/svg/warning.tsx
818
+ var import_jsx_runtime23 = require("react/jsx-runtime");
819
+ var WarningIcon = (_a) => {
820
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
821
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
822
+ "svg",
823
+ __spreadProps(__spreadValues(__spreadValues({
824
+ width: "14",
825
+ height: "14",
826
+ viewBox: "0 0 14 14",
827
+ fill: "none",
828
+ xmlns: "http://www.w3.org/2000/svg",
829
+ className
830
+ }, getIconA11yProps(title)), props), {
831
+ children: [
832
+ title ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("title", { children: title }) : null,
833
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("g", { clipPath: "url(#clip0_warning)", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
834
+ "path",
835
+ {
836
+ d: "M6.41665 8.16675V4.66675C6.41665 4.34591 6.67915 4.08341 6.99998 4.08341C7.32082 4.08341 7.58332 4.34591 7.58332 4.66675V8.16675C7.58332 8.48758 7.32082 8.75008 6.99998 8.75008C6.67915 8.75008 6.41665 8.48758 6.41665 8.16675ZM6.99998 9.33341C6.51582 9.33341 6.12498 9.72425 6.12498 10.2084C6.12498 10.6926 6.51582 11.0834 6.99998 11.0834C7.48415 11.0834 7.87498 10.6926 7.87498 10.2084C7.87498 9.72425 7.48415 9.33341 6.99998 9.33341ZM13.755 12.1801C13.3467 12.9676 12.4892 13.4167 11.4158 13.4167H2.58998C1.51082 13.4167 0.659151 12.9676 0.250818 12.1801C-0.163348 11.3867 -0.0466818 10.3717 0.542485 9.52008L5.23248 2.10008C5.64665 1.50508 6.29998 1.16675 6.99998 1.16675C7.69999 1.16675 8.35332 1.50508 8.74998 2.08258L13.4633 9.53175C14.0525 10.3834 14.1633 11.3926 13.7492 12.1801H13.755ZM12.5008 10.1851C12.5008 10.1851 12.4892 10.1734 12.4892 10.1617L7.78165 2.72425C7.61248 2.48508 7.32082 2.33341 6.99998 2.33341C6.67915 2.33341 6.38749 2.48508 6.20665 2.74758L1.51082 10.1617C1.14915 10.6751 1.06748 11.2351 1.27748 11.6376C1.48165 12.0342 1.94832 12.2501 2.58415 12.2501H11.4042C12.04 12.2501 12.5067 12.0342 12.7108 11.6376C12.9208 11.2351 12.8392 10.6751 12.495 10.1851H12.5008Z",
837
+ fill: "currentColor"
838
+ }
839
+ ) }),
840
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("clipPath", { id: "clip0_warning", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
841
+ ]
842
+ })
843
+ );
844
+ };
845
+ WarningIcon.displayName = "WarningIcon";
846
+
847
+ // src/primitives/icon/registry.ts
848
+ var iconRegistry = {
849
+ "arrow-trend-up": ArrowTrendUpIcon,
850
+ "arrows-to-dot": ArrowsToDotIcon,
851
+ "best-prices": BestPricesIcon,
852
+ "check-circle": CheckCircleIcon,
853
+ "chevron-down": ChevronDownIcon,
854
+ "chevron-right": ChevronRightIcon,
855
+ "chevron-up": ChevronUpIcon,
856
+ close: CloseIcon,
857
+ "create-account": CreateAccountIcon,
858
+ disconnect: DisconnectIcon,
859
+ download: DownloadIcon,
860
+ "dots-horizontal": DotsHorizontalIcon,
861
+ "link-accounts": LinkAccountsIcon,
862
+ profile: ProfileIcon,
863
+ "revenue-alt": RevenueAltIcon,
864
+ search: SearchIcon,
865
+ "shield-trust": ShieldTrustIcon,
866
+ "stay-in-control": StayInControlIcon,
867
+ "triangle-down": TriangleDownIcon,
868
+ "triangle-up": TriangleUpIcon,
869
+ upload: UploadIcon,
870
+ "wallet-avatar": WalletAvatarIcon,
871
+ warning: WarningIcon
872
+ };
873
+ var iconNames = Object.keys(iconRegistry);
874
+
875
+ // src/primitives/icon/icon.utils.ts
876
+ var resolveIconStyle = (color, style) => {
877
+ if (!color)
878
+ return style;
879
+ return __spreadProps(__spreadValues({}, style), {
880
+ color
881
+ });
882
+ };
883
+
884
+ // src/primitives/icon/index.tsx
885
+ var import_jsx_runtime24 = require("react/jsx-runtime");
886
+ var Icon = (_a) => {
887
+ var _b = _a, {
888
+ name,
889
+ color,
890
+ size = "m",
891
+ className = "text-agg-primary",
892
+ style
893
+ } = _b, props = __objRest(_b, [
894
+ "name",
895
+ "color",
896
+ "size",
897
+ "className",
898
+ "style"
899
+ ]);
900
+ const Component = iconRegistry[name];
901
+ const resolvedStyle = resolveIconStyle(color, style);
902
+ const resolvedClassName = cn(iconSizeClasses[size], className);
903
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Component, __spreadValues({ color, className: resolvedClassName, style: resolvedStyle }, props));
904
+ };
905
+ Icon.displayName = "Icon";
906
+
907
+ // src/primitives/skeleton/views/event-list-skeleton-view.tsx
908
+ var import_hooks4 = require("@agg-market/hooks");
909
+
910
+ // src/primitives/skeleton/skeleton-block.tsx
911
+ var import_hooks = require("@agg-market/hooks");
912
+ var import_jsx_runtime25 = require("react/jsx-runtime");
913
+ var SkeletonBlock = ({ className }) => {
914
+ const { enableAnimations } = (0, import_hooks.useSdkUiConfig)();
915
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
916
+ "div",
917
+ {
918
+ "aria-hidden": true,
919
+ className: cn(
920
+ "bg-agg-separator",
921
+ getMotionClassName(enableAnimations, "animate-pulse"),
922
+ className
923
+ )
924
+ }
925
+ );
926
+ };
927
+ SkeletonBlock.displayName = "SkeletonBlock";
928
+
929
+ // src/primitives/skeleton/views/event-list-item-skeleton-view.tsx
930
+ var import_hooks3 = require("@agg-market/hooks");
931
+
932
+ // src/primitives/card/index.tsx
933
+ var import_hooks2 = require("@agg-market/hooks");
934
+ var import_jsx_runtime26 = require("react/jsx-runtime");
935
+ var Card = (_a) => {
936
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
937
+ const { enableAnimations } = (0, import_hooks2.useSdkUiConfig)();
938
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
939
+ "div",
940
+ __spreadValues({
941
+ className: cn(
942
+ "flex w-full flex-col font-agg-sans",
943
+ "rounded-agg-xl border border-agg-separator",
944
+ "bg-agg-secondary text-agg-foreground shadow-agg-card",
945
+ getMotionClassName(enableAnimations, "transition-shadow hover:shadow-agg-card-hover"),
946
+ className
947
+ )
948
+ }, props)
949
+ );
950
+ };
951
+ Card.displayName = "Card";
952
+
953
+ // src/events/item/event-list-item.constants.ts
954
+ var baseCardClassName = "gap-3 overflow-hidden p-5 w-full";
955
+
956
+ // src/primitives/skeleton/views/event-list-item-skeleton-view.tsx
957
+ var import_jsx_runtime27 = require("react/jsx-runtime");
958
+ var EventListItemSkeletonView = ({
959
+ className,
960
+ ariaLabel,
961
+ isStandalone = false
962
+ }) => {
963
+ const labels = (0, import_hooks3.useLabels)();
964
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
965
+ Card,
966
+ {
967
+ className: cn(baseCardClassName, className),
968
+ role: isStandalone ? "status" : void 0,
969
+ "aria-label": isStandalone ? ariaLabel != null ? ariaLabel : labels.eventItem.loading : void 0,
970
+ "aria-busy": isStandalone || void 0,
971
+ "aria-hidden": isStandalone ? void 0 : true,
972
+ children: [
973
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex w-full items-start gap-3", children: [
974
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-10 w-10 rounded-agg-lg" }),
975
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
976
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
977
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
978
+ ] })
979
+ ] }),
980
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex flex-col gap-3", children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
981
+ "div",
982
+ {
983
+ className: "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
984
+ children: [
985
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
986
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
987
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
988
+ ]
989
+ },
990
+ index
991
+ )) }),
992
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
993
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
994
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
995
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-1", children: [
996
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
997
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
998
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
999
+ ] })
1000
+ ] }),
1001
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" })
1002
+ ] })
1003
+ ]
1004
+ }
1005
+ );
1006
+ };
1007
+ EventListItemSkeletonView.displayName = "EventListItemSkeletonView";
1008
+
1009
+ // src/primitives/skeleton/views/event-list-skeleton-view.tsx
1010
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1011
+ var EventListSkeletonView = ({ className, ariaLabel }) => {
1012
+ const labels = (0, import_hooks4.useLabels)();
1013
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1014
+ "section",
1015
+ {
1016
+ className: cn("flex w-full flex-col gap-5", className),
1017
+ role: "status",
1018
+ "aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
1019
+ "aria-busy": true,
1020
+ children: [
1021
+ /* @__PURE__ */ (0, import_jsx_runtime28.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: [
1022
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SkeletonBlock, { className: "h-7 w-40 rounded-agg-sm" }),
1023
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex max-w-full gap-2", children: [
1024
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
1025
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
1026
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
1027
+ ] })
1028
+ ] }),
1029
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1030
+ EventListItemSkeletonView,
1031
+ {
1032
+ isStandalone: false,
1033
+ className: "w-full min-w-0 max-w-none"
1034
+ },
1035
+ index
1036
+ )) })
1037
+ ]
1038
+ }
1039
+ );
1040
+ };
1041
+ EventListSkeletonView.displayName = "EventListSkeletonView";
1042
+
1043
+ // src/primitives/skeleton/views/event-list-item-details-skeleton-view.tsx
1044
+ var import_hooks5 = require("@agg-market/hooks");
1045
+
1046
+ // src/events/item-details/event-list-item-details.constants.ts
1047
+ var detailsBaseCardClassName = "w-full overflow-hidden gap-6 p-5 md:gap-8 md:p-10";
1048
+
1049
+ // src/primitives/skeleton/views/event-list-item-details-skeleton-view.tsx
1050
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1051
+ var EventListItemDetailsSkeletonView = ({
1052
+ className,
1053
+ ariaLabel
1054
+ }) => {
1055
+ const labels = (0, import_hooks5.useLabels)();
1056
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1057
+ Card,
1058
+ {
1059
+ className: cn(detailsBaseCardClassName, className),
1060
+ role: "status",
1061
+ "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
1062
+ "aria-busy": true,
1063
+ children: [
1064
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full items-start gap-3 md:gap-4", children: [
1065
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg md:size-[60px]" }),
1066
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
1067
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
1068
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
1069
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
1070
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
1071
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
1072
+ ] })
1073
+ ] })
1074
+ ] }),
1075
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-4", children: [
1076
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-10 w-full rounded-agg-full md:w-[220px]" }),
1077
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
1078
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
1079
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
1080
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
1081
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" })
1082
+ ] })
1083
+ ] }),
1084
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
1085
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between", children: [
1086
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
1087
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
1088
+ ] })
1089
+ ]
1090
+ }
1091
+ );
1092
+ };
1093
+ EventListItemDetailsSkeletonView.displayName = "EventListItemDetailsSkeletonView";
1094
+
1095
+ // src/primitives/skeleton/views/market-details-skeleton-view.tsx
1096
+ var import_hooks6 = require("@agg-market/hooks");
1097
+
1098
+ // src/events/market-details/market-details.constants.ts
1099
+ var marketDetailsBaseCardClassName = "w-full overflow-hidden rounded-agg-lg border border-agg-separator bg-agg-secondary text-agg-foreground shadow-none hover:shadow-none";
1100
+
1101
+ // src/primitives/skeleton/views/market-details-skeleton-view.tsx
1102
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1103
+ var MarketDetailsSkeletonView = ({
1104
+ className,
1105
+ ariaLabel,
1106
+ isDetailed
1107
+ }) => {
1108
+ const labels = (0, import_hooks6.useLabels)();
1109
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1110
+ Card,
1111
+ {
1112
+ className: cn(marketDetailsBaseCardClassName, className),
1113
+ role: "status",
1114
+ "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
1115
+ "aria-busy": true,
1116
+ children: [
1117
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-3 p-4 md:px-5 md:py-4", children: [
1118
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
1119
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
1120
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
1121
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
1122
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
1123
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
1124
+ ] })
1125
+ ] }),
1126
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
1127
+ ] }),
1128
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-2", children: [
1129
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
1130
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
1131
+ ] })
1132
+ ] }),
1133
+ isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
1134
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
1135
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex h-14 items-end", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-full w-full rounded-none" }) }),
1136
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
1137
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-4 p-5", children: [
1138
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-3", children: [
1139
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
1140
+ [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1141
+ "div",
1142
+ {
1143
+ className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
1144
+ children: [
1145
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
1146
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
1147
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
1148
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
1149
+ ]
1150
+ },
1151
+ `ask-${index}`
1152
+ ))
1153
+ ] }),
1154
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-3", children: [
1155
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
1156
+ [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1157
+ "div",
1158
+ {
1159
+ className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
1160
+ children: [
1161
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
1162
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
1163
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
1164
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
1165
+ ]
1166
+ },
1167
+ `bid-${index}`
1168
+ ))
1169
+ ] })
1170
+ ] })
1171
+ ] }) : null
1172
+ ]
1173
+ }
1174
+ );
1175
+ };
1176
+ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
1177
+
1178
+ // src/primitives/skeleton/views/place-order-skeleton-view.tsx
1179
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1180
+ var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
1181
+ var ContentBody = () => {
1182
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-6 p-5", children: [
1183
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-2", children: [
1184
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
1185
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
1186
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-12 w-12 shrink-0 rounded-agg-lg" }),
1187
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
1188
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-[92%] rounded-agg-sm" }),
1189
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-[80%] rounded-agg-sm" })
1190
+ ] })
1191
+ ] }),
1192
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
1193
+ ] }),
1194
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-28 rounded-agg-sm" })
1195
+ ] }),
1196
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-8", children: [
1197
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-2", children: [
1198
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
1199
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
1200
+ ] }),
1201
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
1202
+ ] }) }),
1203
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-4", children: [
1204
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-2", children: [
1205
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
1206
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
1207
+ ] }),
1208
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
1209
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-2", children: [
1210
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
1211
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
1212
+ ] }),
1213
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-9 w-28 rounded-agg-sm" })
1214
+ ] })
1215
+ ] }),
1216
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-2", children: [
1217
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "rounded-agg-lg border border-agg-trade-highlight-border bg-agg-trade-highlight-surface p-3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-3", children: [
1218
+ [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-3", children: [
1219
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
1220
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2", children: [
1221
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
1222
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
1223
+ ] }),
1224
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
1225
+ ] }),
1226
+ index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
1227
+ ] }, `place-order-route-${index}`)),
1228
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
1229
+ ] }) }),
1230
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
1231
+ ] }),
1232
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
1233
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-2", children: [
1234
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
1235
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
1236
+ ] }),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
1238
+ ] }),
1239
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
1240
+ ] });
1241
+ };
1242
+ var PlaceOrderSkeletonView = ({
1243
+ className,
1244
+ ariaLabel
1245
+ }) => {
1246
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1247
+ "div",
1248
+ {
1249
+ className: cn("w-full", className),
1250
+ role: "status",
1251
+ "aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
1252
+ "aria-busy": true,
1253
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1254
+ Card,
1255
+ {
1256
+ className: cn(
1257
+ placeOrderCardClassName,
1258
+ "w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
1259
+ ),
1260
+ children: [
1261
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ContentBody, {}),
1262
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
1263
+ ]
1264
+ }
1265
+ ) })
1266
+ }
1267
+ );
1268
+ };
1269
+ PlaceOrderSkeletonView.displayName = "PlaceOrderSkeletonView";
1270
+
1271
+ // src/primitives/skeleton/views/settlement-skeleton-view.tsx
1272
+ var import_hooks7 = require("@agg-market/hooks");
1273
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1274
+ var SettlementSkeletonView = ({
1275
+ className,
1276
+ ariaLabel
1277
+ }) => {
1278
+ const labels = (0, import_hooks7.useLabels)();
1279
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1280
+ Card,
1281
+ {
1282
+ className: cn(
1283
+ "gap-5 rounded-agg-xl border border-agg-separator bg-agg-secondary p-5 shadow-none hover:shadow-none",
1284
+ className
1285
+ ),
1286
+ role: "status",
1287
+ "aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
1288
+ "aria-busy": true,
1289
+ children: [
1290
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1 md:flex-row md:items-center md:justify-between md:gap-4", children: [
1291
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" }),
1292
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-80 rounded-agg-sm" })
1293
+ ] }),
1294
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-2", children: [
1295
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-5 w-52 rounded-agg-sm" }),
1296
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-2", children: [
1297
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-[88%] rounded-agg-sm" }),
1298
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-[84%] rounded-agg-sm" }),
1299
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
1300
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
1301
+ ] })
1302
+ ] }),
1303
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
1304
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-3", children: [
1305
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-2", children: [
1306
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2", children: [
1307
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
1308
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
1309
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
1310
+ ] }),
1311
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
1312
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
1313
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
1314
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
1315
+ ] })
1316
+ ] }),
1317
+ [0, 1, 2].map((index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2", children: [
1318
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
1319
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-5 w-20 rounded-agg-sm" }),
1320
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
1321
+ ] }, `settlement-venue-${index}`))
1322
+ ] })
1323
+ ]
1324
+ }
1325
+ );
1326
+ };
1327
+ SettlementSkeletonView.displayName = "SettlementSkeletonView";
1328
+
1329
+ // src/primitives/skeleton/skeleton.types.ts
1330
+ var skeletonViews = {
1331
+ eventListItem: "event-list-item",
1332
+ eventListItemDetails: "event-list-item-details",
1333
+ marketDetailsMinified: "market-details-minified",
1334
+ marketDetailsDetailed: "market-details-detailed",
1335
+ eventList: "event-list",
1336
+ settlement: "settlement",
1337
+ placeOrder: "place-order"
1338
+ };
1339
+
1340
+ // src/primitives/skeleton/index.tsx
1341
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1342
+ var Skeleton = ({ view, className, ariaLabel }) => {
1343
+ if (view === skeletonViews.eventListItem) {
1344
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(EventListItemSkeletonView, { className, ariaLabel, isStandalone: true });
1345
+ }
1346
+ if (view === skeletonViews.eventListItemDetails) {
1347
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(EventListItemDetailsSkeletonView, { className, ariaLabel });
1348
+ }
1349
+ if (view === skeletonViews.marketDetailsMinified) {
1350
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MarketDetailsSkeletonView, { className, ariaLabel, isDetailed: false });
1351
+ }
1352
+ if (view === skeletonViews.marketDetailsDetailed) {
1353
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MarketDetailsSkeletonView, { className, ariaLabel, isDetailed: true });
1354
+ }
1355
+ if (view === skeletonViews.settlement) {
1356
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SettlementSkeletonView, { className, ariaLabel });
1357
+ }
1358
+ if (view === skeletonViews.placeOrder) {
1359
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PlaceOrderSkeletonView, { className, ariaLabel });
1360
+ }
1361
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(EventListSkeletonView, { className, ariaLabel });
1362
+ };
1363
+ Skeleton.displayName = "Skeleton";
1364
+
1365
+ // src/primitives/tabs/index.tsx
1366
+ var import_react = require("react");
1367
+ var import_hooks9 = require("@agg-market/hooks");
1368
+ var DropdownMenu = __toESM(require("@radix-ui/react-dropdown-menu"));
1369
+
1370
+ // src/primitives/select/index.tsx
1371
+ var import_hooks8 = require("@agg-market/hooks");
1372
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1373
+ var Select = ({
1374
+ items,
1375
+ value,
1376
+ onChange,
1377
+ ariaLabel,
1378
+ className,
1379
+ disabled = false
1380
+ }) => {
1381
+ const labels = (0, import_hooks8.useLabels)();
1382
+ const { enableAnimations } = (0, import_hooks8.useSdkUiConfig)();
1383
+ const hasEnabledItems = items.some((item) => !item.disabled);
1384
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: cn("relative inline-flex w-full", className), children: [
1385
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1386
+ "select",
1387
+ {
1388
+ "aria-label": ariaLabel != null ? ariaLabel : labels.common.selectAria,
1389
+ className: cn(
1390
+ "w-full appearance-none rounded-agg-md border border-agg-separator bg-agg-secondary px-4 py-2 pr-10 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground outline-none",
1391
+ getMotionClassName(
1392
+ enableAnimations,
1393
+ "transition-[border-color,box-shadow] duration-200 ease-out"
1394
+ ),
1395
+ "focus:border-agg-primary focus:ring-2 focus:ring-agg-primary/15",
1396
+ "disabled:cursor-not-allowed disabled:opacity-60"
1397
+ ),
1398
+ disabled: disabled || !hasEnabledItems,
1399
+ value,
1400
+ onChange: (event) => onChange(event.target.value),
1401
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("option", { value: item.value, disabled: item.disabled, children: item.label }, item.value))
1402
+ }
1403
+ ),
1404
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "pointer-events-none absolute inset-y-0 right-3 inline-flex items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "chevron-down", size: "s", color: "currentColor" }) })
1405
+ ] });
1406
+ };
1407
+ Select.displayName = "Select";
1408
+
1409
+ // src/primitives/tabs/tabs.utils.ts
1410
+ var findNextEnabledIndex = (items, startIndex, direction) => {
1411
+ var _a;
1412
+ if (items.length === 0)
1413
+ return -1;
1414
+ for (let step = 1; step <= items.length; step += 1) {
1415
+ const nextIndex = (startIndex + direction * step + items.length) % items.length;
1416
+ if (!((_a = items[nextIndex]) == null ? void 0 : _a.disabled))
1417
+ return nextIndex;
1418
+ }
1419
+ return -1;
1420
+ };
1421
+ var findEdgeEnabledIndex = (items, direction) => {
1422
+ var _a;
1423
+ if (direction === 1) {
1424
+ return items.findIndex((item) => !item.disabled);
1425
+ }
1426
+ for (let index = items.length - 1; index >= 0; index -= 1) {
1427
+ if (!((_a = items[index]) == null ? void 0 : _a.disabled))
1428
+ return index;
1429
+ }
1430
+ return -1;
1431
+ };
1432
+ var FALLBACK_TAB_WIDTH = 112;
1433
+ var FALLBACK_MORE_WIDTH = 56;
1434
+ var sumWidths = (indices, widths) => {
1435
+ return [...indices].reduce((accumulator, index) => {
1436
+ var _a;
1437
+ return accumulator + ((_a = widths[index]) != null ? _a : 0);
1438
+ }, 0);
1439
+ };
1440
+ var resolveTabsOverflowLayout = ({
1441
+ items,
1442
+ value,
1443
+ containerWidth,
1444
+ moreButtonWidth,
1445
+ itemWidthByValue
1446
+ }) => {
1447
+ var _a;
1448
+ if (items.length === 0) {
1449
+ return {
1450
+ visibleItems: [],
1451
+ hiddenItems: []
1452
+ };
1453
+ }
1454
+ if (!Number.isFinite(containerWidth) || containerWidth <= 0) {
1455
+ return {
1456
+ visibleItems: items,
1457
+ hiddenItems: []
1458
+ };
1459
+ }
1460
+ const resolvedItemWidths = items.map((item) => {
1461
+ var _a2;
1462
+ const measuredWidth = (_a2 = itemWidthByValue.get(item.value)) != null ? _a2 : FALLBACK_TAB_WIDTH;
1463
+ return Math.max(1, measuredWidth);
1464
+ });
1465
+ const totalItemsWidth = resolvedItemWidths.reduce((sum, width) => {
1466
+ return sum + width;
1467
+ }, 0);
1468
+ if (totalItemsWidth <= containerWidth) {
1469
+ return {
1470
+ visibleItems: items,
1471
+ hiddenItems: []
1472
+ };
1473
+ }
1474
+ const reservedMoreWidth = Math.max(1, moreButtonWidth || FALLBACK_MORE_WIDTH);
1475
+ const visibleIndices = /* @__PURE__ */ new Set();
1476
+ let usedWidth = 0;
1477
+ for (let index = 0; index < items.length; index += 1) {
1478
+ const itemWidth = (_a = resolvedItemWidths[index]) != null ? _a : FALLBACK_TAB_WIDTH;
1479
+ const hasRemainingItems = index < items.length - 1;
1480
+ const requiredExtraWidth = hasRemainingItems ? reservedMoreWidth : 0;
1481
+ if (usedWidth + itemWidth + requiredExtraWidth > containerWidth)
1482
+ break;
1483
+ visibleIndices.add(index);
1484
+ usedWidth += itemWidth;
1485
+ }
1486
+ if (visibleIndices.size === 0) {
1487
+ visibleIndices.add(0);
1488
+ }
1489
+ const activeIndex = items.findIndex((item) => item.value === value);
1490
+ const isActiveHidden = activeIndex >= 0 && !visibleIndices.has(activeIndex);
1491
+ if (isActiveHidden && activeIndex >= 0) {
1492
+ visibleIndices.add(activeIndex);
1493
+ while (visibleIndices.size > 1) {
1494
+ const visibleWidth = sumWidths(visibleIndices, resolvedItemWidths);
1495
+ if (visibleWidth + reservedMoreWidth <= containerWidth)
1496
+ break;
1497
+ const removableIndex = [...visibleIndices].sort((left, right) => right - left).find((index) => index !== activeIndex);
1498
+ if (removableIndex == null)
1499
+ break;
1500
+ visibleIndices.delete(removableIndex);
1501
+ }
1502
+ }
1503
+ return {
1504
+ visibleItems: items.filter((_, index) => visibleIndices.has(index)),
1505
+ hiddenItems: items.filter((_, index) => !visibleIndices.has(index))
1506
+ };
1507
+ };
1508
+
1509
+ // src/primitives/tabs/index.tsx
1510
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1511
+ var mobileTabsMediaQuery = "(max-width: 767px)";
1512
+ var getTabButtonClassName = ({
1513
+ enableAnimations,
1514
+ isBarVariant,
1515
+ isActive,
1516
+ isDisabled,
1517
+ size
1518
+ }) => {
1519
+ const isSmall = size === "s";
1520
+ return cn(
1521
+ "cursor-pointer disabled:cursor-not-allowed",
1522
+ "relative inline-flex h-full shrink-0 items-center justify-center gap-2 font-agg-sans",
1523
+ getMotionClassName(enableAnimations, "transition-colors motion-reduce:transition-none"),
1524
+ isBarVariant ? cn(
1525
+ "min-w-20 overflow-hidden border-r border-agg-separator last:border-r-0",
1526
+ isSmall ? "px-3 text-agg-sm leading-agg-5" : "px-4 text-agg-base leading-agg-6"
1527
+ ) : cn(isSmall ? "px-4 text-agg-sm leading-agg-5" : "px-5 text-agg-base leading-agg-6"),
1528
+ isBarVariant && isActive && "font-agg-bold text-agg-primary",
1529
+ isBarVariant && !isActive && "font-agg-normal text-agg-foreground",
1530
+ !isBarVariant && isActive && "font-agg-bold text-agg-primary",
1531
+ !isBarVariant && !isActive && "font-agg-normal text-agg-foreground",
1532
+ isDisabled && "cursor-not-allowed opacity-60"
1533
+ );
1534
+ };
1535
+ var getMeasureTabClassName = ({
1536
+ isBarVariant,
1537
+ size
1538
+ }) => {
1539
+ const isSmall = size === "s";
1540
+ return cn(
1541
+ "relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap font-agg-sans",
1542
+ isBarVariant ? cn(
1543
+ "h-8 min-w-20 border-r border-agg-separator font-agg-bold",
1544
+ isSmall ? "px-3 text-agg-sm leading-agg-5" : "px-4 text-agg-base leading-agg-6"
1545
+ ) : cn(
1546
+ "h-12 font-agg-bold",
1547
+ isSmall ? "px-4 text-agg-sm leading-agg-5" : "px-5 text-agg-base leading-agg-6"
1548
+ )
1549
+ );
1550
+ };
1551
+ var getMoreButtonClassName = ({
1552
+ enableAnimations,
1553
+ isBarVariant,
1554
+ size
1555
+ }) => {
1556
+ const isSmall = size === "s";
1557
+ return cn(
1558
+ "cursor-pointer disabled:cursor-not-allowed",
1559
+ "relative inline-flex shrink-0 items-center justify-center overflow-hidden font-agg-sans text-agg-foreground hover:bg-agg-secondary-hover",
1560
+ getMotionClassName(enableAnimations, "transition-colors motion-reduce:transition-none"),
1561
+ isBarVariant ? "h-8 rounded-r-agg-sm border border-agg-separator bg-agg-secondary px-2" : cn("h-12 bg-agg-secondary", isSmall ? "px-3 text-agg-sm" : "px-4 text-agg-base")
1562
+ );
1563
+ };
1564
+ var Tabs = ({
1565
+ items,
1566
+ value,
1567
+ onChange,
1568
+ variant = "bar",
1569
+ size = "m",
1570
+ overflowBehavior,
1571
+ overflowMenuAriaLabel,
1572
+ ariaLabel,
1573
+ className
1574
+ }) => {
1575
+ const labels = (0, import_hooks9.useLabels)();
1576
+ const { enableAnimations, rootClassName } = (0, import_hooks9.useSdkUiConfig)();
1577
+ const buttonRefs = (0, import_react.useRef)([]);
1578
+ const dragStateRef = (0, import_react.useRef)({
1579
+ isPointerDown: false,
1580
+ isDragging: false,
1581
+ pointerId: null,
1582
+ startClientX: 0,
1583
+ startClientY: 0,
1584
+ startScrollLeft: 0
1585
+ });
1586
+ const suppressClickRef = (0, import_react.useRef)(false);
1587
+ const resolvedAriaLabel = ariaLabel != null ? ariaLabel : labels.common.tabsAria;
1588
+ const resolvedOverflowMenuAriaLabel = overflowMenuAriaLabel != null ? overflowMenuAriaLabel : labels.common.hiddenTabsAria;
1589
+ const [isMoreMenuOpen, setIsMoreMenuOpen] = (0, import_react.useState)(false);
1590
+ const [isMobileViewport, setIsMobileViewport] = (0, import_react.useState)(false);
1591
+ const [isDraggingTabs, setIsDraggingTabs] = (0, import_react.useState)(false);
1592
+ const [activeUnderlineStyle, setActiveUnderlineStyle] = (0, import_react.useState)({
1593
+ transform: "translateX(0px)",
1594
+ width: 0,
1595
+ opacity: 0
1596
+ });
1597
+ const [overflowLayout, setOverflowLayout] = (0, import_react.useState)({
1598
+ visibleItems: items,
1599
+ hiddenItems: []
1600
+ });
1601
+ const [scrollAffordanceState, setScrollAffordanceState] = (0, import_react.useState)({
1602
+ showStart: false,
1603
+ showEnd: false
1604
+ });
1605
+ const containerRef = (0, import_react.useRef)(null);
1606
+ const tabListRef = (0, import_react.useRef)(null);
1607
+ const moreButtonMeasureRef = (0, import_react.useRef)(null);
1608
+ const tabMeasureRefs = (0, import_react.useRef)(/* @__PURE__ */ new Map());
1609
+ const isBarVariant = variant === "bar";
1610
+ const resolvedOverflowBehavior = (0, import_react.useMemo)(() => {
1611
+ if (overflowBehavior)
1612
+ return overflowBehavior;
1613
+ if (!isBarVariant)
1614
+ return "scroll";
1615
+ return isMobileViewport ? "select" : "menu";
1616
+ }, [isBarVariant, isMobileViewport, overflowBehavior]);
1617
+ const shouldUseOverflowMenu = resolvedOverflowBehavior === "menu";
1618
+ const shouldUseOverflowScroll = resolvedOverflowBehavior === "scroll";
1619
+ const shouldUseOverflowSelect = resolvedOverflowBehavior === "select";
1620
+ const handleMeasureTabRef = (0, import_react.useCallback)(
1621
+ (tabValue, tabElement) => {
1622
+ if (!tabElement) {
1623
+ tabMeasureRefs.current.delete(tabValue);
1624
+ return;
1625
+ }
1626
+ tabMeasureRefs.current.set(tabValue, tabElement);
1627
+ },
1628
+ []
1629
+ );
1630
+ (0, import_react.useEffect)(() => {
1631
+ if (typeof window === "undefined")
1632
+ return;
1633
+ const mediaQueryList = window.matchMedia(mobileTabsMediaQuery);
1634
+ const handleMediaQueryChange = (event) => {
1635
+ setIsMobileViewport(event.matches);
1636
+ };
1637
+ handleMediaQueryChange(mediaQueryList);
1638
+ if (typeof mediaQueryList.addEventListener === "function") {
1639
+ mediaQueryList.addEventListener("change", handleMediaQueryChange);
1640
+ return () => {
1641
+ mediaQueryList.removeEventListener("change", handleMediaQueryChange);
1642
+ };
1643
+ }
1644
+ mediaQueryList.addListener(handleMediaQueryChange);
1645
+ return () => {
1646
+ mediaQueryList.removeListener(handleMediaQueryChange);
1647
+ };
1648
+ }, []);
1649
+ const handleRecalculateOverflow = (0, import_react.useCallback)(() => {
1650
+ var _a, _b, _c, _d;
1651
+ if (!shouldUseOverflowMenu) {
1652
+ setOverflowLayout({
1653
+ visibleItems: items,
1654
+ hiddenItems: []
1655
+ });
1656
+ return;
1657
+ }
1658
+ const containerWidth = (_b = (_a = containerRef.current) == null ? void 0 : _a.clientWidth) != null ? _b : 0;
1659
+ const moreButtonWidth = (_d = (_c = moreButtonMeasureRef.current) == null ? void 0 : _c.offsetWidth) != null ? _d : 0;
1660
+ const itemWidthByValue = new Map(
1661
+ items.map((item) => {
1662
+ var _a2, _b2;
1663
+ return [item.value, (_b2 = (_a2 = tabMeasureRefs.current.get(item.value)) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0];
1664
+ })
1665
+ );
1666
+ setOverflowLayout(
1667
+ resolveTabsOverflowLayout({
1668
+ items,
1669
+ value,
1670
+ containerWidth,
1671
+ moreButtonWidth,
1672
+ itemWidthByValue
1673
+ })
1674
+ );
1675
+ }, [items, shouldUseOverflowMenu, value]);
1676
+ (0, import_react.useEffect)(() => {
1677
+ handleRecalculateOverflow();
1678
+ }, [handleRecalculateOverflow]);
1679
+ (0, import_react.useEffect)(() => {
1680
+ if (!shouldUseOverflowMenu)
1681
+ return;
1682
+ const container = containerRef.current;
1683
+ if (!container || typeof ResizeObserver === "undefined")
1684
+ return;
1685
+ const resizeObserver = new ResizeObserver(() => {
1686
+ handleRecalculateOverflow();
1687
+ });
1688
+ resizeObserver.observe(container);
1689
+ return () => {
1690
+ resizeObserver.disconnect();
1691
+ };
1692
+ }, [handleRecalculateOverflow, shouldUseOverflowMenu]);
1693
+ (0, import_react.useEffect)(() => {
1694
+ if (overflowLayout.hiddenItems.length > 0)
1695
+ return;
1696
+ setIsMoreMenuOpen(false);
1697
+ }, [overflowLayout.hiddenItems.length]);
1698
+ const updateScrollAffordances = (0, import_react.useCallback)(() => {
1699
+ if (!shouldUseOverflowScroll) {
1700
+ setScrollAffordanceState({
1701
+ showStart: false,
1702
+ showEnd: false
1703
+ });
1704
+ return;
1705
+ }
1706
+ const tabListElement = tabListRef.current;
1707
+ if (!tabListElement)
1708
+ return;
1709
+ const maxScrollLeft = tabListElement.scrollWidth - tabListElement.clientWidth;
1710
+ setScrollAffordanceState({
1711
+ showStart: tabListElement.scrollLeft > 4,
1712
+ showEnd: maxScrollLeft - tabListElement.scrollLeft > 4
1713
+ });
1714
+ }, [shouldUseOverflowScroll]);
1715
+ const renderedItems = shouldUseOverflowMenu ? overflowLayout.visibleItems : items;
1716
+ const shouldShowMoreButton = shouldUseOverflowMenu && overflowLayout.hiddenItems.length > 0;
1717
+ const selectItems = (0, import_react.useMemo)(() => {
1718
+ return items.map((item) => ({
1719
+ value: item.value,
1720
+ label: item.label,
1721
+ disabled: item.disabled
1722
+ }));
1723
+ }, [items]);
1724
+ const isSelectDisabled = !items.some((item) => !item.disabled);
1725
+ const handleSelect = (nextValue) => {
1726
+ if (nextValue === value)
1727
+ return;
1728
+ onChange(nextValue);
1729
+ };
1730
+ const handleMoveFocus = (index) => {
1731
+ var _a;
1732
+ if (index < 0)
1733
+ return;
1734
+ const nextItem = renderedItems[index];
1735
+ if (!nextItem)
1736
+ return;
1737
+ handleSelect(nextItem.value);
1738
+ (_a = buttonRefs.current[index]) == null ? void 0 : _a.focus();
1739
+ };
1740
+ const handleKeyDown = (event, index) => {
1741
+ switch (event.key) {
1742
+ case "ArrowRight": {
1743
+ event.preventDefault();
1744
+ handleMoveFocus(findNextEnabledIndex(renderedItems, index, 1));
1745
+ return;
1746
+ }
1747
+ case "ArrowLeft": {
1748
+ event.preventDefault();
1749
+ handleMoveFocus(findNextEnabledIndex(renderedItems, index, -1));
1750
+ return;
1751
+ }
1752
+ case "Home": {
1753
+ event.preventDefault();
1754
+ handleMoveFocus(findEdgeEnabledIndex(renderedItems, 1));
1755
+ return;
1756
+ }
1757
+ case "End": {
1758
+ event.preventDefault();
1759
+ handleMoveFocus(findEdgeEnabledIndex(renderedItems, -1));
1760
+ return;
1761
+ }
1762
+ default:
1763
+ return;
1764
+ }
1765
+ };
1766
+ const activeHiddenItem = (0, import_react.useMemo)(() => {
1767
+ if (!shouldUseOverflowMenu)
1768
+ return void 0;
1769
+ return overflowLayout.hiddenItems.find((item) => item.value === value);
1770
+ }, [overflowLayout.hiddenItems, shouldUseOverflowMenu, value]);
1771
+ const tabListClassName = cn(
1772
+ "inline-flex items-stretch bg-agg-secondary",
1773
+ shouldUseOverflowMenu ? "min-w-0 flex-1 overflow-hidden" : shouldUseOverflowScroll ? cn(
1774
+ "overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
1775
+ getMotionClassName(enableAnimations, "scroll-smooth")
1776
+ ) : "overflow-x-auto",
1777
+ isBarVariant ? "h-8 rounded-agg-sm border border-agg-separator" : "h-12 border-b border-agg-separator -mb-[1px]",
1778
+ shouldUseOverflowScroll && "select-none",
1779
+ shouldUseOverflowScroll && !isBarVariant && "snap-x snap-mandatory",
1780
+ shouldUseOverflowScroll && (isDraggingTabs ? "cursor-grabbing" : "cursor-grab"),
1781
+ shouldShowMoreButton && isBarVariant && "rounded-r-none border-r-0"
1782
+ );
1783
+ const handleTabListWheel = (event) => {
1784
+ if (!shouldUseOverflowScroll)
1785
+ return;
1786
+ const tabListElement = event.currentTarget;
1787
+ if (tabListElement.scrollWidth <= tabListElement.clientWidth)
1788
+ return;
1789
+ if (Math.abs(event.deltaX) > Math.abs(event.deltaY))
1790
+ return;
1791
+ event.preventDefault();
1792
+ tabListElement.scrollLeft += event.deltaY;
1793
+ };
1794
+ const handleTabListPointerDown = (event) => {
1795
+ if (!shouldUseOverflowScroll)
1796
+ return;
1797
+ if (event.pointerType !== "mouse")
1798
+ return;
1799
+ if (event.button !== 0)
1800
+ return;
1801
+ const tabListElement = tabListRef.current;
1802
+ if (!tabListElement)
1803
+ return;
1804
+ if (tabListElement.scrollWidth <= tabListElement.clientWidth)
1805
+ return;
1806
+ dragStateRef.current = {
1807
+ isPointerDown: true,
1808
+ isDragging: false,
1809
+ pointerId: event.pointerId,
1810
+ startClientX: event.clientX,
1811
+ startClientY: event.clientY,
1812
+ startScrollLeft: tabListElement.scrollLeft
1813
+ };
1814
+ };
1815
+ const handleTabListPointerMove = (event) => {
1816
+ if (!shouldUseOverflowScroll)
1817
+ return;
1818
+ const dragState = dragStateRef.current;
1819
+ const tabListElement = tabListRef.current;
1820
+ if (!dragState.isPointerDown)
1821
+ return;
1822
+ if (dragState.pointerId !== event.pointerId)
1823
+ return;
1824
+ if (!tabListElement)
1825
+ return;
1826
+ const deltaX = event.clientX - dragState.startClientX;
1827
+ const deltaY = event.clientY - dragState.startClientY;
1828
+ const horizontalDistance = Math.abs(deltaX);
1829
+ const verticalDistance = Math.abs(deltaY);
1830
+ const hasExceededDragThreshold = horizontalDistance > 10 && horizontalDistance > verticalDistance;
1831
+ if (hasExceededDragThreshold && !dragState.isDragging) {
1832
+ dragState.isDragging = true;
1833
+ setIsDraggingTabs(true);
1834
+ tabListElement.setPointerCapture(event.pointerId);
1835
+ }
1836
+ if (!dragState.isDragging)
1837
+ return;
1838
+ event.preventDefault();
1839
+ tabListElement.scrollLeft = dragState.startScrollLeft - deltaX;
1840
+ };
1841
+ const handleEndTabListDrag = (event) => {
1842
+ const dragState = dragStateRef.current;
1843
+ const tabListElement = tabListRef.current;
1844
+ if (!dragState.isPointerDown)
1845
+ return;
1846
+ if (dragState.pointerId !== event.pointerId)
1847
+ return;
1848
+ if (tabListElement == null ? void 0 : tabListElement.hasPointerCapture(event.pointerId)) {
1849
+ tabListElement.releasePointerCapture(event.pointerId);
1850
+ }
1851
+ if (dragState.isDragging) {
1852
+ suppressClickRef.current = true;
1853
+ window.setTimeout(() => {
1854
+ suppressClickRef.current = false;
1855
+ }, 0);
1856
+ }
1857
+ dragStateRef.current = {
1858
+ isPointerDown: false,
1859
+ isDragging: false,
1860
+ pointerId: null,
1861
+ startClientX: 0,
1862
+ startClientY: 0,
1863
+ startScrollLeft: 0
1864
+ };
1865
+ setIsDraggingTabs(false);
1866
+ };
1867
+ const handleTabListClickCapture = (event) => {
1868
+ if (!suppressClickRef.current)
1869
+ return;
1870
+ event.preventDefault();
1871
+ event.stopPropagation();
1872
+ suppressClickRef.current = false;
1873
+ };
1874
+ const handleSelectHiddenItem = (nextValue) => {
1875
+ handleSelect(nextValue);
1876
+ setIsMoreMenuOpen(false);
1877
+ };
1878
+ const updateActiveUnderline = (0, import_react.useCallback)(() => {
1879
+ if (isBarVariant) {
1880
+ setActiveUnderlineStyle({
1881
+ transform: "translateX(0px)",
1882
+ width: 0,
1883
+ opacity: 0
1884
+ });
1885
+ return;
1886
+ }
1887
+ const activeIndex = renderedItems.findIndex((item) => item.value === value);
1888
+ const activeButton = activeIndex >= 0 ? buttonRefs.current[activeIndex] : null;
1889
+ if (!activeButton || !tabListRef.current) {
1890
+ setActiveUnderlineStyle((currentStyle) => __spreadProps(__spreadValues({}, currentStyle), {
1891
+ opacity: 0
1892
+ }));
1893
+ return;
1894
+ }
1895
+ setActiveUnderlineStyle({
1896
+ transform: `translateX(${activeButton.offsetLeft}px)`,
1897
+ width: activeButton.offsetWidth,
1898
+ opacity: 1
1899
+ });
1900
+ }, [isBarVariant, renderedItems, value]);
1901
+ (0, import_react.useLayoutEffect)(() => {
1902
+ updateActiveUnderline();
1903
+ }, [updateActiveUnderline]);
1904
+ (0, import_react.useEffect)(() => {
1905
+ if (isBarVariant || !shouldUseOverflowScroll)
1906
+ return;
1907
+ const tabListElement = tabListRef.current;
1908
+ if (!tabListElement)
1909
+ return;
1910
+ const handleScroll = () => {
1911
+ updateActiveUnderline();
1912
+ updateScrollAffordances();
1913
+ };
1914
+ tabListElement.addEventListener("scroll", handleScroll, { passive: true });
1915
+ updateScrollAffordances();
1916
+ return () => {
1917
+ tabListElement.removeEventListener("scroll", handleScroll);
1918
+ };
1919
+ }, [isBarVariant, shouldUseOverflowScroll, updateActiveUnderline, updateScrollAffordances]);
1920
+ (0, import_react.useEffect)(() => {
1921
+ if (!shouldUseOverflowScroll)
1922
+ return;
1923
+ updateScrollAffordances();
1924
+ }, [renderedItems, shouldUseOverflowScroll, updateScrollAffordances, value]);
1925
+ (0, import_react.useEffect)(() => {
1926
+ if (isBarVariant && !shouldUseOverflowScroll)
1927
+ return;
1928
+ if (typeof ResizeObserver === "undefined")
1929
+ return;
1930
+ const tabListElement = tabListRef.current;
1931
+ if (!tabListElement)
1932
+ return;
1933
+ const resizeObserver = new ResizeObserver(() => {
1934
+ updateActiveUnderline();
1935
+ updateScrollAffordances();
1936
+ });
1937
+ resizeObserver.observe(tabListElement);
1938
+ return () => {
1939
+ resizeObserver.disconnect();
1940
+ };
1941
+ }, [isBarVariant, shouldUseOverflowScroll, updateActiveUnderline, updateScrollAffordances]);
1942
+ (0, import_react.useEffect)(() => {
1943
+ if (!shouldUseOverflowScroll)
1944
+ return;
1945
+ const activeIndex = renderedItems.findIndex((item) => item.value === value);
1946
+ const activeButton = activeIndex >= 0 ? buttonRefs.current[activeIndex] : null;
1947
+ if (!activeButton)
1948
+ return;
1949
+ activeButton.scrollIntoView({
1950
+ behavior: getScrollBehavior(enableAnimations),
1951
+ block: "nearest",
1952
+ inline: "nearest"
1953
+ });
1954
+ }, [enableAnimations, renderedItems, shouldUseOverflowScroll, value]);
1955
+ if (shouldUseOverflowSelect) {
1956
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1957
+ Select,
1958
+ {
1959
+ ariaLabel,
1960
+ className: "w-full",
1961
+ disabled: isSelectDisabled,
1962
+ items: selectItems,
1963
+ onChange: handleSelect,
1964
+ value
1965
+ }
1966
+ ) });
1967
+ }
1968
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1969
+ "div",
1970
+ {
1971
+ ref: containerRef,
1972
+ className: cn(
1973
+ "relative inline-flex max-w-full items-stretch font-agg-sans bg-agg-secondary",
1974
+ className
1975
+ ),
1976
+ children: [
1977
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1978
+ "div",
1979
+ {
1980
+ ref: tabListRef,
1981
+ role: "tablist",
1982
+ "aria-label": resolvedAriaLabel,
1983
+ className: cn("relative", tabListClassName),
1984
+ onClickCapture: handleTabListClickCapture,
1985
+ onPointerCancel: handleEndTabListDrag,
1986
+ onPointerDown: handleTabListPointerDown,
1987
+ onPointerMove: handleTabListPointerMove,
1988
+ onPointerUp: handleEndTabListDrag,
1989
+ onWheel: handleTabListWheel,
1990
+ children: [
1991
+ renderedItems.map((item, index) => {
1992
+ const isActive = item.value === value;
1993
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1994
+ "button",
1995
+ {
1996
+ ref: (buttonElement) => {
1997
+ buttonRefs.current[index] = buttonElement;
1998
+ },
1999
+ type: "button",
2000
+ role: "tab",
2001
+ tabIndex: isActive ? 0 : -1,
2002
+ "aria-selected": isActive,
2003
+ "aria-label": item.label,
2004
+ disabled: item.disabled,
2005
+ onClick: () => handleSelect(item.value),
2006
+ onKeyDown: (event) => handleKeyDown(event, index),
2007
+ className: cn(
2008
+ getTabButtonClassName({
2009
+ enableAnimations,
2010
+ isBarVariant,
2011
+ isActive,
2012
+ isDisabled: !!item.disabled,
2013
+ size
2014
+ }),
2015
+ shouldUseOverflowScroll && !isBarVariant && "snap-start"
2016
+ ),
2017
+ children: [
2018
+ isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2019
+ "span",
2020
+ {
2021
+ "aria-hidden": true,
2022
+ className: cn(
2023
+ "pointer-events-none absolute inset-px origin-bottom rounded-[2px] bg-agg-secondary-hover",
2024
+ getMotionClassName(
2025
+ enableAnimations,
2026
+ "transition-[transform,opacity] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none"
2027
+ ),
2028
+ isActive ? "scale-y-100 opacity-100" : "scale-y-0 opacity-0"
2029
+ )
2030
+ }
2031
+ ) }) : null,
2032
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "relative z-10 inline-flex shrink-0 items-center justify-center", children: item.icon }) : null,
2033
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "relative z-10 truncate whitespace-nowrap [&::first-letter]:uppercase", children: item.label })
2034
+ ]
2035
+ },
2036
+ item.value
2037
+ );
2038
+ }),
2039
+ !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2040
+ "span",
2041
+ {
2042
+ "aria-hidden": true,
2043
+ className: cn(
2044
+ "pointer-events-none absolute bottom-0 left-0 rounded-t-agg-sm bg-agg-primary",
2045
+ getMotionClassName(
2046
+ enableAnimations,
2047
+ "transition-[transform,width,opacity] duration-300 ease-[cubic-bezier(0.4,0,0.2,1)]"
2048
+ ),
2049
+ "h-[3px]"
2050
+ ),
2051
+ style: activeUnderlineStyle
2052
+ }
2053
+ ) : null
2054
+ ]
2055
+ }
2056
+ ),
2057
+ shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
2058
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2059
+ "span",
2060
+ {
2061
+ "aria-hidden": true,
2062
+ className: cn(
2063
+ "pointer-events-none absolute top-0 bottom-0 left-0 z-10 w-12 md:w-18 bg-gradient-to-r from-agg-secondary via-agg-secondary to-transparent",
2064
+ getMotionClassName(enableAnimations, "transition-opacity duration-200"),
2065
+ scrollAffordanceState.showStart ? "opacity-100" : "opacity-0"
2066
+ )
2067
+ }
2068
+ ),
2069
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2070
+ "span",
2071
+ {
2072
+ "aria-hidden": true,
2073
+ className: cn(
2074
+ "pointer-events-none absolute top-0 right-0 bottom-0 z-10 w-12 md:w-18 bg-gradient-to-l from-agg-secondary via-agg-secondary to-transparent",
2075
+ getMotionClassName(enableAnimations, "transition-opacity duration-200"),
2076
+ scrollAffordanceState.showEnd ? "opacity-100" : "opacity-0"
2077
+ )
2078
+ }
2079
+ )
2080
+ ] }) : null,
2081
+ shouldShowMoreButton ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(DropdownMenu.Root, { open: isMoreMenuOpen, onOpenChange: setIsMoreMenuOpen, children: [
2082
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2083
+ "button",
2084
+ {
2085
+ type: "button",
2086
+ "aria-label": resolvedOverflowMenuAriaLabel,
2087
+ className: cn(
2088
+ getMoreButtonClassName({
2089
+ enableAnimations,
2090
+ isBarVariant,
2091
+ size
2092
+ }),
2093
+ activeHiddenItem ? "font-agg-bold text-agg-primary" : "font-agg-normal text-agg-foreground"
2094
+ ),
2095
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { name: "dots-horizontal", size: isBarVariant ? "s" : "m", color: "currentColor" })
2096
+ }
2097
+ ) }),
2098
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2099
+ DropdownMenu.Content,
2100
+ {
2101
+ align: "end",
2102
+ "aria-label": resolvedOverflowMenuAriaLabel,
2103
+ className: cn(
2104
+ AGG_ROOT_CLASS_NAME,
2105
+ rootClassName,
2106
+ "z-agg-dropdown mt-2 min-w-48 overflow-hidden rounded-agg-md border border-agg-separator bg-agg-secondary shadow-agg-popover outline-none"
2107
+ ),
2108
+ "data-agg-animations": enableAnimations ? "true" : "false",
2109
+ sideOffset: 8,
2110
+ children: overflowLayout.hiddenItems.map((item) => {
2111
+ const isSelected = item.value === value;
2112
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2113
+ DropdownMenu.Item,
2114
+ {
2115
+ disabled: item.disabled,
2116
+ onSelect: () => handleSelectHiddenItem(item.value),
2117
+ className: cn(
2118
+ "cursor-pointer disabled:cursor-not-allowed",
2119
+ "flex w-full items-center gap-2 px-4 py-2 text-left text-agg-sm leading-agg-5 outline-none",
2120
+ getMotionClassName(enableAnimations, "transition-colors"),
2121
+ "focus:bg-agg-secondary-hover data-[highlighted]:bg-agg-secondary-hover",
2122
+ isSelected ? "font-agg-bold text-agg-primary" : "font-agg-normal text-agg-foreground",
2123
+ item.disabled && "cursor-not-allowed opacity-60"
2124
+ ),
2125
+ children: [
2126
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: item.icon }) : null,
2127
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "truncate whitespace-nowrap [&::first-letter]:uppercase", children: item.label })
2128
+ ]
2129
+ },
2130
+ item.value
2131
+ );
2132
+ })
2133
+ }
2134
+ ) })
2135
+ ] }) : null,
2136
+ shouldUseOverflowMenu ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2137
+ "div",
2138
+ {
2139
+ "aria-hidden": true,
2140
+ className: "pointer-events-none invisible fixed top-0 left-0 -z-10 h-0 overflow-hidden whitespace-nowrap",
2141
+ children: [
2142
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2143
+ "span",
2144
+ {
2145
+ ref: (tabElement) => handleMeasureTabRef(item.value, tabElement),
2146
+ className: getMeasureTabClassName({
2147
+ isBarVariant,
2148
+ size
2149
+ }),
2150
+ children: [
2151
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: item.icon }) : null,
2152
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: item.label })
2153
+ ]
2154
+ },
2155
+ `measure-${item.value}`
2156
+ )),
2157
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2158
+ "span",
2159
+ {
2160
+ ref: moreButtonMeasureRef,
2161
+ className: getMoreButtonClassName({
2162
+ enableAnimations,
2163
+ isBarVariant,
2164
+ size
2165
+ }),
2166
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { name: "dots-horizontal", size: isBarVariant ? "s" : "m", color: "currentColor" })
2167
+ }
2168
+ )
2169
+ ]
2170
+ }
2171
+ ) : null
2172
+ ]
2173
+ }
2174
+ );
2175
+ };
2176
+ Tabs.displayName = "Tabs";
2177
+
2178
+ // src/primitives/typography/typography.constants.ts
2179
+ var variantClasses = {
2180
+ title: cn("font-agg-sans text-agg-lg leading-agg-7", "font-agg-bold", "text-agg-foreground"),
2181
+ body: cn("font-agg-sans text-agg-base leading-agg-6", "font-agg-normal", "text-agg-foreground"),
2182
+ meta: cn(
2183
+ "font-agg-sans text-agg-sm leading-agg-5",
2184
+ "font-agg-normal",
2185
+ "text-agg-muted-foreground"
2186
+ ),
2187
+ label: cn(
2188
+ "font-agg-sans text-agg-sm leading-agg-5",
2189
+ "font-agg-bold uppercase",
2190
+ "text-agg-foreground"
2191
+ ),
2192
+ value: cn("font-agg-sans text-agg-xl leading-agg-7", "font-agg-normal", "text-agg-foreground"),
2193
+ caption: cn("font-agg-sans text-agg-xs leading-agg-4", "font-agg-normal", "text-agg-foreground")
2194
+ };
2195
+
2196
+ // src/primitives/typography/index.tsx
2197
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2198
+ var Typography = ({
2199
+ as: Component = "p",
2200
+ variant = "body",
2201
+ className,
2202
+ children
2203
+ }) => {
2204
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Component, { className: cn(variantClasses[variant], "truncate", className), children });
2205
+ };
2206
+ Typography.displayName = "Typography";
2207
+
2208
+ // src/primitives/venue-logo/index.tsx
2209
+ var import_hooks10 = require("@agg-market/hooks");
2210
+
2211
+ // src/primitives/venue-logo/logo-props.ts
2212
+ var DEFAULT_MONOCHROME_COLOR = "#000000";
2213
+ var resolveLogoPrimaryColor = ({
2214
+ brandColor,
2215
+ isColor = true,
2216
+ color
2217
+ }) => {
2218
+ if (typeof color === "string" && color.trim())
2219
+ return color;
2220
+ if (!isColor)
2221
+ return DEFAULT_MONOCHROME_COLOR;
2222
+ return brandColor;
2223
+ };
2224
+
2225
+ // src/primitives/venue-logo/svg/logo-kalshi.tsx
2226
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2227
+ var KALSHI_GREEN = "#18C590";
2228
+ var LogoKalshiIcon = (_a) => {
2229
+ var _b = _a, {
2230
+ title,
2231
+ className,
2232
+ isColor = true,
2233
+ color
2234
+ } = _b, props = __objRest(_b, [
2235
+ "title",
2236
+ "className",
2237
+ "isColor",
2238
+ "color"
2239
+ ]);
2240
+ const primaryColor = resolveLogoPrimaryColor({
2241
+ brandColor: KALSHI_GREEN,
2242
+ isColor,
2243
+ color
2244
+ });
2245
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2246
+ "svg",
2247
+ __spreadProps(__spreadValues(__spreadValues({
2248
+ viewBox: "0 0 100 100",
2249
+ className,
2250
+ fill: "none"
2251
+ }, getIconA11yProps(title)), props), {
2252
+ children: [
2253
+ title ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("title", { children: title }) : null,
2254
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { d: "M20 10H36V90H20V10Z", fill: primaryColor }),
2255
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { d: "M44 50L74 10H92L62 50L92 90H74L44 50Z", fill: primaryColor })
2256
+ ]
2257
+ })
2258
+ );
2259
+ };
2260
+ LogoKalshiIcon.displayName = "LogoKalshiIcon";
2261
+
2262
+ // src/primitives/venue-logo/svg/logo-opinion.tsx
2263
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2264
+ var OPINION_BLACK = "#000000";
2265
+ var OPINION_WHITE = "#FFFFFF";
2266
+ var LogoOpinionIcon = (_a) => {
2267
+ var _b = _a, {
2268
+ title,
2269
+ className,
2270
+ isColor = true,
2271
+ color
2272
+ } = _b, props = __objRest(_b, [
2273
+ "title",
2274
+ "className",
2275
+ "isColor",
2276
+ "color"
2277
+ ]);
2278
+ const primaryColor = resolveLogoPrimaryColor({
2279
+ brandColor: OPINION_BLACK,
2280
+ isColor,
2281
+ color
2282
+ });
2283
+ const accentColor = (color == null ? void 0 : color.trim()) ? primaryColor : OPINION_WHITE;
2284
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2285
+ "svg",
2286
+ __spreadProps(__spreadValues(__spreadValues({
2287
+ viewBox: "0 0 100 100",
2288
+ className,
2289
+ fill: "none"
2290
+ }, getIconA11yProps(title)), props), {
2291
+ children: [
2292
+ title ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("title", { children: title }) : null,
2293
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("circle", { cx: "50", cy: "50", r: "40", fill: primaryColor }),
2294
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2295
+ "rect",
2296
+ {
2297
+ x: "21",
2298
+ y: "18",
2299
+ width: "8",
2300
+ height: "64",
2301
+ rx: "4",
2302
+ transform: "rotate(-7 21 18)",
2303
+ fill: accentColor
2304
+ }
2305
+ ),
2306
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2307
+ "rect",
2308
+ {
2309
+ x: "37",
2310
+ y: "12",
2311
+ width: "8",
2312
+ height: "76",
2313
+ rx: "4",
2314
+ transform: "rotate(-4 37 12)",
2315
+ fill: accentColor
2316
+ }
2317
+ ),
2318
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2319
+ "rect",
2320
+ {
2321
+ x: "53",
2322
+ y: "12",
2323
+ width: "8",
2324
+ height: "76",
2325
+ rx: "4",
2326
+ transform: "rotate(-4 53 12)",
2327
+ fill: accentColor
2328
+ }
2329
+ ),
2330
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2331
+ "rect",
2332
+ {
2333
+ x: "69",
2334
+ y: "18",
2335
+ width: "8",
2336
+ height: "64",
2337
+ rx: "4",
2338
+ transform: "rotate(-7 69 18)",
2339
+ fill: accentColor
2340
+ }
2341
+ ),
2342
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("rect", { x: "12", y: "44", width: "76", height: "12", fill: primaryColor })
2343
+ ]
2344
+ })
2345
+ );
2346
+ };
2347
+ LogoOpinionIcon.displayName = "LogoOpinionIcon";
2348
+
2349
+ // src/primitives/venue-logo/svg/logo-polymarket.tsx
2350
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2351
+ var POLYMARKET_BLUE = "#3861FB";
2352
+ var LogoPolymarketIcon = (_a) => {
2353
+ var _b = _a, {
2354
+ title,
2355
+ className,
2356
+ isColor = true,
2357
+ color
2358
+ } = _b, props = __objRest(_b, [
2359
+ "title",
2360
+ "className",
2361
+ "isColor",
2362
+ "color"
2363
+ ]);
2364
+ const primaryColor = resolveLogoPrimaryColor({
2365
+ brandColor: POLYMARKET_BLUE,
2366
+ isColor,
2367
+ color
2368
+ });
2369
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2370
+ "svg",
2371
+ __spreadProps(__spreadValues(__spreadValues({
2372
+ viewBox: "0 0 100 100",
2373
+ className,
2374
+ fill: "none"
2375
+ }, getIconA11yProps(title)), props), {
2376
+ children: [
2377
+ title ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("title", { children: title }) : null,
2378
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2379
+ "path",
2380
+ {
2381
+ d: "M18 10L78 2V98L18 88V10Z",
2382
+ stroke: primaryColor,
2383
+ strokeWidth: "8",
2384
+ strokeLinejoin: "round"
2385
+ }
2386
+ ),
2387
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M18 32L78 44", stroke: primaryColor, strokeWidth: "8", strokeLinecap: "round" }),
2388
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M18 58L78 70", stroke: primaryColor, strokeWidth: "8", strokeLinecap: "round" })
2389
+ ]
2390
+ })
2391
+ );
2392
+ };
2393
+ LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
2394
+
2395
+ // src/primitives/venue-logo/svg/logo-probable.tsx
2396
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2397
+ var PROBABLE_ORANGE = "#F85B22";
2398
+ var LogoProbableIcon = (_a) => {
2399
+ var _b = _a, {
2400
+ title,
2401
+ className,
2402
+ isColor = true,
2403
+ color
2404
+ } = _b, props = __objRest(_b, [
2405
+ "title",
2406
+ "className",
2407
+ "isColor",
2408
+ "color"
2409
+ ]);
2410
+ const primaryColor = resolveLogoPrimaryColor({
2411
+ brandColor: PROBABLE_ORANGE,
2412
+ isColor,
2413
+ color
2414
+ });
2415
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2416
+ "svg",
2417
+ __spreadProps(__spreadValues(__spreadValues({
2418
+ viewBox: "0 0 100 100",
2419
+ className,
2420
+ fill: "none"
2421
+ }, getIconA11yProps(title)), props), {
2422
+ children: [
2423
+ title ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("title", { children: title }) : null,
2424
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("rect", { x: "20", y: "16", width: "60", height: "12", fill: primaryColor }),
2425
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("rect", { x: "18", y: "36", width: "64", height: "46", rx: "23", fill: primaryColor }),
2426
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2427
+ "rect",
2428
+ {
2429
+ x: "32",
2430
+ y: "50",
2431
+ width: "40",
2432
+ height: "18",
2433
+ rx: "9",
2434
+ fill: isColor && !color ? "white" : primaryColor
2435
+ }
2436
+ ),
2437
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("circle", { cx: "61", cy: "59", r: "7", fill: primaryColor })
2438
+ ]
2439
+ })
2440
+ );
2441
+ };
2442
+ LogoProbableIcon.displayName = "LogoProbableIcon";
2443
+
2444
+ // src/primitives/venue-logo/venue-logo.constants.ts
2445
+ var venueLogoRegistry = {
2446
+ kalshi: LogoKalshiIcon,
2447
+ polymarket: LogoPolymarketIcon,
2448
+ opinion: LogoOpinionIcon,
2449
+ probable: LogoProbableIcon
2450
+ };
2451
+ var venueLogoNames = Object.keys(venueLogoRegistry);
2452
+ var sizeClasses = {
2453
+ xxs: "h-2 w-2",
2454
+ xs: "h-3 w-3",
2455
+ s: "h-4 w-4",
2456
+ m: "h-6 w-6",
2457
+ l: "h-8 w-8",
2458
+ xl: "h-10 w-10",
2459
+ xxl: "h-12 w-12"
2460
+ };
2461
+
2462
+ // src/primitives/venue-logo/index.tsx
2463
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2464
+ var VenueLogo = ({
2465
+ venue,
2466
+ isColor = true,
2467
+ isMonochromatic = false,
2468
+ color,
2469
+ size = "m",
2470
+ className,
2471
+ ariaLabel,
2472
+ title
2473
+ }) => {
2474
+ const labels = (0, import_hooks10.useLabels)();
2475
+ const Component = venueLogoRegistry[venue];
2476
+ const sizeClass = sizeClasses[size];
2477
+ const resolvedIsColor = isMonochromatic ? false : isColor;
2478
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2479
+ Component,
2480
+ {
2481
+ className: cn("shrink-0", sizeClass, className),
2482
+ isColor: resolvedIsColor,
2483
+ color,
2484
+ "aria-label": ariaLabel != null ? ariaLabel : labels.venues[venue],
2485
+ title
2486
+ }
2487
+ );
2488
+ };
2489
+ VenueLogo.displayName = "VenueLogo";
2490
+
2491
+ // src/events/item/index.tsx
2492
+ var import_dayjs = __toESM(require("dayjs"));
2493
+ var import_react2 = require("react");
2494
+ var import_hooks11 = require("@agg-market/hooks");
2495
+
2496
+ // src/primitives/badge/badge.constants.ts
2497
+ var badgeSizeClasses = {
2498
+ xxs: cn("h-4 px-1.5 gap-0.5", "text-agg-xs leading-agg-3"),
2499
+ xs: cn("h-5 px-2 gap-1", "text-agg-xs leading-agg-4"),
2500
+ s: cn("h-6 px-2.5 gap-1", "text-agg-sm leading-agg-5"),
2501
+ m: cn("h-7 px-3 gap-1.5", "text-agg-sm leading-agg-5"),
2502
+ l: cn("h-8 px-3.5 gap-1.5", "text-agg-base leading-agg-6"),
2503
+ xl: cn("h-9 px-4 gap-2", "text-agg-lg leading-agg-7"),
2504
+ xxl: cn("h-10 px-5 gap-2", "text-agg-xl leading-agg-7")
2505
+ };
2506
+ var baseBadgeClasses = cn(
2507
+ "inline-flex items-center justify-center rounded-agg-full font-agg-sans",
2508
+ "bg-agg-secondary-hover text-agg-foreground whitespace-nowrap font-agg-normal"
2509
+ );
2510
+
2511
+ // src/primitives/badge/index.tsx
2512
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2513
+ function Badge({ text, prefix, suffix, size = "m", classNames }) {
2514
+ const resolvedText = `${text}`;
2515
+ const resolvedAriaLabel = resolvedText.length > 0 ? resolvedText : void 0;
2516
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2517
+ "span",
2518
+ {
2519
+ "aria-label": resolvedAriaLabel,
2520
+ className: cn(baseBadgeClasses, badgeSizeClasses[size], classNames == null ? void 0 : classNames.root),
2521
+ children: [
2522
+ prefix ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: classNames == null ? void 0 : classNames.prefix, children: prefix }) : null,
2523
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: cn("truncate", classNames == null ? void 0 : classNames.text), children: text }),
2524
+ suffix ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: classNames == null ? void 0 : classNames.suffix, children: suffix }) : null
2525
+ ]
2526
+ }
2527
+ );
2528
+ }
2529
+ Badge.displayName = "Badge";
2530
+
2531
+ // src/events/item/event-list-item.utils.ts
2532
+ var resolveEventListItemEvent = (fetchedEvent) => {
2533
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2534
+ if (!fetchedEvent)
2535
+ return void 0;
2536
+ const fallbackVenueEvent = fetchedEvent.venueEvents[0];
2537
+ if (!fallbackVenueEvent)
2538
+ return void 0;
2539
+ const mergedVenueMarkets = fetchedEvent.markets.flatMap((venueEvent) => venueEvent.venueMarkets);
2540
+ const venueMarkets = mergedVenueMarkets.length > 0 ? mergedVenueMarkets : [];
2541
+ if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
2542
+ return void 0;
2543
+ return __spreadProps(__spreadValues({}, fetchedEvent), {
2544
+ id: fetchedEvent.id,
2545
+ title: fetchedEvent.title || fallbackVenueEvent.title,
2546
+ description: (_b = (_a = fetchedEvent.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
2547
+ volume: (_d = (_c = fetchedEvent.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
2548
+ startDate: (_f = (_e = fetchedEvent.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
2549
+ endDate: (_h = (_g = fetchedEvent.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
2550
+ creationDate: (_j = (_i = fetchedEvent.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
2551
+ });
2552
+ };
2553
+ var normalizeProbability = (value) => {
2554
+ if (typeof value !== "number" || !Number.isFinite(value))
2555
+ return void 0;
2556
+ if (value < 0)
2557
+ return 0;
2558
+ if (value > 1)
2559
+ return 1;
2560
+ return value;
2561
+ };
2562
+ var hasDateLabel = (outcome) => {
2563
+ return !!toDate(outcome.label);
2564
+ };
2565
+ var sortOutcomes = (outcomes) => {
2566
+ if (outcomes.length <= 1)
2567
+ return outcomes;
2568
+ const now = Date.now();
2569
+ if (outcomes.some(hasDateLabel)) {
2570
+ return [...outcomes].sort((a, b) => {
2571
+ var _a, _b, _c, _d;
2572
+ const aDate = (_b = (_a = toDate(a.label)) == null ? void 0 : _a.getTime()) != null ? _b : 0;
2573
+ const bDate = (_d = (_c = toDate(b.label)) == null ? void 0 : _c.getTime()) != null ? _d : 0;
2574
+ return Math.abs(aDate - now) - Math.abs(bDate - now);
2575
+ });
2576
+ }
2577
+ return [...outcomes].sort((a, b) => {
2578
+ var _a, _b;
2579
+ const aPrice = (_a = normalizeProbability(a.price)) != null ? _a : 0;
2580
+ const bPrice = (_b = normalizeProbability(b.price)) != null ? _b : 0;
2581
+ return bPrice - aPrice;
2582
+ });
2583
+ };
2584
+ var compareVisibleOutcomeRows = (left, right) => {
2585
+ var _a, _b;
2586
+ const leftDate = toDate(resolveOutcomeTitle(left.outcome));
2587
+ const rightDate = toDate(resolveOutcomeTitle(right.outcome));
2588
+ if (leftDate && rightDate) {
2589
+ return leftDate.getTime() - rightDate.getTime();
2590
+ }
2591
+ const leftProbability = (_a = normalizeProbability(left.outcome.price)) != null ? _a : -1;
2592
+ const rightProbability = (_b = normalizeProbability(right.outcome.price)) != null ? _b : -1;
2593
+ return rightProbability - leftProbability;
2594
+ };
2595
+ var shouldReplaceVisibleOutcome = (current, next) => {
2596
+ var _a, _b;
2597
+ const currentVolume = typeof current.market.volume === "number" ? current.market.volume : -1;
2598
+ const nextVolume = typeof next.market.volume === "number" ? next.market.volume : -1;
2599
+ if (currentVolume !== nextVolume) {
2600
+ return nextVolume > currentVolume;
2601
+ }
2602
+ const currentProbability = (_a = normalizeProbability(current.outcome.price)) != null ? _a : -1;
2603
+ const nextProbability = (_b = normalizeProbability(next.outcome.price)) != null ? _b : -1;
2604
+ return nextProbability > currentProbability;
2605
+ };
2606
+ var resolveVisibleOutcomes = (venueMarkets, maxOutcomes) => {
2607
+ const visibleOutcomesByLabel = /* @__PURE__ */ new Map();
2608
+ venueMarkets.forEach((market) => {
2609
+ sortOutcomes(market.venueMarketOutcomes).forEach((outcome) => {
2610
+ const title = resolveOutcomeTitle(outcome);
2611
+ const normalizedTitle = title.trim().toLowerCase();
2612
+ const nextVisibleOutcome = {
2613
+ venue: market.venue,
2614
+ market,
2615
+ outcome,
2616
+ title
2617
+ };
2618
+ const currentVisibleOutcome = visibleOutcomesByLabel.get(normalizedTitle);
2619
+ if (!currentVisibleOutcome || shouldReplaceVisibleOutcome(currentVisibleOutcome, nextVisibleOutcome)) {
2620
+ visibleOutcomesByLabel.set(normalizedTitle, nextVisibleOutcome);
2621
+ }
2622
+ });
2623
+ });
2624
+ return [...visibleOutcomesByLabel.values()].sort(compareVisibleOutcomeRows).slice(0, Math.max(1, maxOutcomes));
2625
+ };
2626
+ var resolveOutcomeTitle = (outcome) => {
2627
+ if (outcome.title && outcome.title.trim())
2628
+ return outcome.title;
2629
+ return outcome.label;
2630
+ };
2631
+ var selectPrimaryVenueMarket = (venueMarkets) => {
2632
+ if (venueMarkets.length === 0)
2633
+ return void 0;
2634
+ if (venueMarkets.length === 1)
2635
+ return venueMarkets[0];
2636
+ return [...venueMarkets].sort((a, b) => {
2637
+ const aVolume = typeof a.volume === "number" ? a.volume : -1;
2638
+ const bVolume = typeof b.volume === "number" ? b.volume : -1;
2639
+ return bVolume - aVolume;
2640
+ })[0];
2641
+ };
2642
+ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
2643
+ if (typeof titleOverride === "string" && titleOverride.trim()) {
2644
+ return titleOverride;
2645
+ }
2646
+ if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.question) === "string" && primaryVenueMarket.question.trim()) {
2647
+ return primaryVenueMarket.question;
2648
+ }
2649
+ return event.title;
2650
+ };
2651
+ var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
2652
+ var _a, _b, _c, _d, _e, _f;
2653
+ if (typeof imageOverride === "string" && imageOverride.trim()) {
2654
+ return imageOverride;
2655
+ }
2656
+ if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
2657
+ return primaryVenueMarket.image;
2658
+ }
2659
+ 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())) {
2660
+ return (_f = (_e = event.venueEvents) == null ? void 0 : _e[0]) == null ? void 0 : _f.image;
2661
+ }
2662
+ return void 0;
2663
+ };
2664
+ var formatCountLabel = (count, singular, plural) => {
2665
+ return `${count} ${count === 1 ? singular : plural}`;
2666
+ };
2667
+ var getVenueSummary = (venueMarkets) => {
2668
+ const uniqueVenues = Array.from(new Set(venueMarkets.map((market) => market.venue)));
2669
+ return {
2670
+ marketCount: venueMarkets.length,
2671
+ venueCount: uniqueVenues.length,
2672
+ singleVenue: uniqueVenues.length === 1 ? uniqueVenues[0] : void 0
2673
+ };
2674
+ };
2675
+ var resolveVenueLabel = (venue, venueInfo, labels) => {
2676
+ var _a, _b;
2677
+ if (!venue)
2678
+ return labels.eventItem.venueSingular;
2679
+ return (_b = (_a = venueInfo == null ? void 0 : venueInfo[venue]) == null ? void 0 : _a.label) != null ? _b : labels.venues[venue];
2680
+ };
2681
+
2682
+ // src/events/item/index.tsx
2683
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2684
+ var EventListItemLoadingState = ({
2685
+ classNames,
2686
+ ariaLabel
2687
+ }) => {
2688
+ const labels = (0, import_hooks11.useLabels)();
2689
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2690
+ Skeleton,
2691
+ {
2692
+ view: "event-list-item",
2693
+ className: classNames == null ? void 0 : classNames.root,
2694
+ ariaLabel: ariaLabel != null ? ariaLabel : labels.eventItem.loading
2695
+ }
2696
+ );
2697
+ };
2698
+ var EventListItemUnavailableState = ({
2699
+ classNames,
2700
+ ariaLabel
2701
+ }) => {
2702
+ const labels = (0, import_hooks11.useLabels)();
2703
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2704
+ Card,
2705
+ {
2706
+ className: cn(baseCardClassName, classNames == null ? void 0 : classNames.root),
2707
+ role: "status",
2708
+ "aria-label": ariaLabel != null ? ariaLabel : labels.eventItem.unavailableAria,
2709
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
2710
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { variant: "title", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItem.unavailableTitle }),
2711
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItem.unavailableDescription })
2712
+ ] })
2713
+ }
2714
+ );
2715
+ };
2716
+ var EventListItemContent = ({
2717
+ event,
2718
+ title,
2719
+ image,
2720
+ showVenueLogo = true,
2721
+ maxOutcomes = 2,
2722
+ classNames,
2723
+ venueInfo,
2724
+ arbitrageByOutcomeId,
2725
+ onClick,
2726
+ ariaLabel
2727
+ }) => {
2728
+ var _a;
2729
+ const config = (0, import_hooks11.useSdkUiConfig)();
2730
+ const labels = (0, import_hooks11.useLabels)();
2731
+ const allVenueMarkets = (0, import_react2.useMemo)(() => {
2732
+ return event.markets.flatMap((market) => market.venueMarkets);
2733
+ }, [event.markets]);
2734
+ const primaryVenueMarket = (0, import_react2.useMemo)(() => {
2735
+ return selectPrimaryVenueMarket(allVenueMarkets);
2736
+ }, [allVenueMarkets]);
2737
+ const visibleOutcomes = (0, import_react2.useMemo)(() => {
2738
+ if (allVenueMarkets.length === 0)
2739
+ return [];
2740
+ return resolveVisibleOutcomes(allVenueMarkets, maxOutcomes);
2741
+ }, [allVenueMarkets, maxOutcomes]);
2742
+ const resolvedTitle = resolveTileTitle(event, primaryVenueMarket, title);
2743
+ const resolvedImage = resolveTileImage(event, primaryVenueMarket, image);
2744
+ const { marketCount, venueCount, singleVenue } = getVenueSummary(allVenueMarkets);
2745
+ const venueLabel = resolveVenueLabel(singleVenue, venueInfo, labels);
2746
+ const visibleVenueLogos = (0, import_react2.useMemo)(() => {
2747
+ return Array.from(new Set(allVenueMarkets.map((market) => market.venue))).slice(0, 4);
2748
+ }, [allVenueMarkets]);
2749
+ const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a : void 0;
2750
+ const volumeLabel = typeof resolvedVolume === "number" ? `${config.formatCompactCurrency(resolvedVolume)} ${labels.eventItem.volumeSuffix}` : "";
2751
+ const handleKeyDown = (eventToHandle) => {
2752
+ if (!onClick)
2753
+ return;
2754
+ if (eventToHandle.key === "Enter" || eventToHandle.key === " ") {
2755
+ eventToHandle.preventDefault();
2756
+ onClick();
2757
+ }
2758
+ };
2759
+ const renderArbitrage = (value) => {
2760
+ if (value == null)
2761
+ return null;
2762
+ if (Math.abs(value) < config.arbitrageThreshold)
2763
+ return null;
2764
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex items-baseline gap-1", "text-agg-success"), children: [
2765
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { variant: "label", className: "text-agg-success", children: config.formatPercent(value) }),
2766
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { name: "triangle-up", size: "xxs", title: labels.eventItem.arbitrage })
2767
+ ] });
2768
+ };
2769
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2770
+ Card,
2771
+ {
2772
+ className: cn(baseCardClassName, onClick && "cursor-pointer", classNames == null ? void 0 : classNames.root),
2773
+ role: onClick ? "button" : void 0,
2774
+ tabIndex: onClick ? 0 : void 0,
2775
+ onClick,
2776
+ onKeyDown: handleKeyDown,
2777
+ "aria-label": ariaLabel != null ? ariaLabel : resolvedTitle,
2778
+ children: [
2779
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex items-center gap-3", classNames == null ? void 0 : classNames.header), children: [
2780
+ resolvedImage ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2781
+ "img",
2782
+ {
2783
+ src: resolvedImage,
2784
+ alt: "",
2785
+ className: cn("h-10 w-10", "rounded-agg-lg object-cover")
2786
+ }
2787
+ ) : null,
2788
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2789
+ Typography,
2790
+ {
2791
+ variant: "title",
2792
+ className: cn(
2793
+ "min-w-0 text-agg-base font-agg-bold leading-agg-6 whitespace-normal [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] md:block md:truncate md:whitespace-nowrap",
2794
+ classNames == null ? void 0 : classNames.title
2795
+ ),
2796
+ children: resolvedTitle
2797
+ }
2798
+ )
2799
+ ] }),
2800
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn("flex flex-col gap-3", classNames == null ? void 0 : classNames.outcomes), children: visibleOutcomes.map((visibleOutcome) => {
2801
+ const probability = normalizeProbability(visibleOutcome.outcome.price);
2802
+ const showBadge = typeof probability === "number";
2803
+ const arbitragePercent = arbitrageByOutcomeId == null ? void 0 : arbitrageByOutcomeId[visibleOutcome.outcome.id];
2804
+ const outcomeTitle = resolveOutcomeTitle(visibleOutcome.outcome);
2805
+ const formattedTitle = (0, import_dayjs.default)(outcomeTitle).isValid() ? (0, import_dayjs.default)(outcomeTitle).format("MMMM D, YYYY") : outcomeTitle;
2806
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2807
+ "div",
2808
+ {
2809
+ className: cn(
2810
+ "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
2811
+ classNames == null ? void 0 : classNames.outcomeRow
2812
+ ),
2813
+ children: [
2814
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2815
+ Typography,
2816
+ {
2817
+ variant: "body",
2818
+ className: "min-w-0 truncate text-agg-sm leading-agg-5 md:text-agg-base md:leading-agg-6",
2819
+ children: formattedTitle
2820
+ }
2821
+ ),
2822
+ renderArbitrage(arbitragePercent),
2823
+ showBadge ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2824
+ Badge,
2825
+ {
2826
+ text: config.formatPercent(probability),
2827
+ prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VenueLogo, { venue: visibleOutcome.venue, size: "s" }) : void 0,
2828
+ size: "l",
2829
+ classNames: {
2830
+ root: cn(
2831
+ "h-9 min-w-[101px] justify-center px-4 text-agg-base leading-agg-6",
2832
+ classNames == null ? void 0 : classNames.badge
2833
+ )
2834
+ }
2835
+ }
2836
+ ) : null
2837
+ ]
2838
+ },
2839
+ `${visibleOutcome.market.id}-${visibleOutcome.outcome.id}`
2840
+ );
2841
+ }) }),
2842
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2843
+ "div",
2844
+ {
2845
+ className: cn(
2846
+ "flex items-center justify-between gap-2",
2847
+ "text-agg-muted-foreground",
2848
+ classNames == null ? void 0 : classNames.footer
2849
+ ),
2850
+ children: [
2851
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex items-center gap-2", "text-agg-sm leading-agg-5"), children: [
2852
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "truncate text-agg-muted-foreground", children: formatCountLabel(
2853
+ marketCount,
2854
+ labels.eventItem.marketSingular,
2855
+ labels.eventItem.marketPlural
2856
+ ) }),
2857
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-agg-muted-foreground", children: "\xD7" }),
2858
+ singleVenue ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "flex items-center gap-1 truncate text-agg-muted-foreground", children: [
2859
+ showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VenueLogo, { venue: singleVenue, size: "xs" }) : null,
2860
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: venueLabel })
2861
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "truncate text-agg-muted-foreground", children: formatCountLabel(
2862
+ venueCount,
2863
+ labels.eventItem.venueSingular,
2864
+ labels.eventItem.venuePlural
2865
+ ) }),
2866
+ showVenueLogo && !singleVenue && visibleVenueLogos.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex items-center gap-1 overflow-hidden", children: visibleVenueLogos.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VenueLogo, { venue, size: "xs" }, venue)) }) : null
2867
+ ] }),
2868
+ volumeLabel ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { variant: "meta", className: "text-agg-sm", children: volumeLabel }) : null
2869
+ ]
2870
+ }
2871
+ )
2872
+ ]
2873
+ }
2874
+ );
2875
+ };
2876
+ var EventListItemByEventId = (_a) => {
2877
+ var _b = _a, {
2878
+ eventId
2879
+ } = _b, rest = __objRest(_b, [
2880
+ "eventId"
2881
+ ]);
2882
+ const {
2883
+ event: fetchedEvent,
2884
+ isError,
2885
+ isLoading
2886
+ } = (0, import_hooks11.useEvent)(eventId, {
2887
+ enabled: !!eventId
2888
+ });
2889
+ const resolvedEvent = (0, import_react2.useMemo)(() => {
2890
+ return resolveEventListItemEvent(fetchedEvent);
2891
+ }, [fetchedEvent]);
2892
+ if (!eventId) {
2893
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemUnavailableState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2894
+ }
2895
+ if (isLoading) {
2896
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2897
+ }
2898
+ if (!resolvedEvent && !isError) {
2899
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemLoadingState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2900
+ }
2901
+ if (!resolvedEvent) {
2902
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemUnavailableState, { classNames: rest.classNames, ariaLabel: rest.ariaLabel });
2903
+ }
2904
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemContent, __spreadValues({ event: resolvedEvent }, rest));
2905
+ };
2906
+ var EventListItem = (props) => {
2907
+ if (props.isLoading) {
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemLoadingState, { classNames: props.classNames, ariaLabel: props.ariaLabel });
2909
+ }
2910
+ if ("event" in props && props.event) {
2911
+ const _a = props, { event } = _a, rest = __objRest(_a, ["event"]);
2912
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemContent, __spreadValues({ event }, rest));
2913
+ }
2914
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(EventListItemByEventId, __spreadValues({}, props));
2915
+ };
2916
+ EventListItem.displayName = "EventListItem";
2917
+
2918
+ // src/events/list/event-list.constants.ts
2919
+ var POLYMARKET_VENUE = "polymarket";
2920
+ var KALSHI_VENUE = "kalshi";
2921
+ var POLYMARKET_VENUE_LOGO = "polymarket";
2922
+ var KALSHI_VENUE_LOGO = "kalshi";
2923
+ var getDefaultEventListTabs = (labels) => {
2924
+ return [
2925
+ {
2926
+ value: "matched",
2927
+ label: labels.eventList.matchedTab,
2928
+ iconName: "arrows-to-dot"
2929
+ },
2930
+ {
2931
+ value: "polymarket",
2932
+ label: labels.venues.polymarket,
2933
+ venueLogo: POLYMARKET_VENUE_LOGO,
2934
+ venues: [POLYMARKET_VENUE]
2935
+ },
2936
+ {
2937
+ value: "kalshi",
2938
+ label: labels.venues.kalshi,
2939
+ venueLogo: KALSHI_VENUE_LOGO,
2940
+ venues: [KALSHI_VENUE]
2941
+ }
2942
+ ];
2943
+ };
2944
+
2945
+ // src/events/list/event-list.utils.ts
2946
+ var mapEventToEventListItemEvent = (event) => {
2947
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2948
+ const fallbackVenueEvent = event.venueEvents[0];
2949
+ if (!fallbackVenueEvent)
2950
+ return null;
2951
+ const mergedVenueMarkets = event.markets.flatMap((m) => m.venueMarkets);
2952
+ if ((mergedVenueMarkets == null ? void 0 : mergedVenueMarkets.length) === 0)
2953
+ return null;
2954
+ return __spreadProps(__spreadValues({}, event), {
2955
+ id: event.id,
2956
+ title: event.title || fallbackVenueEvent.title,
2957
+ description: (_b = (_a = event.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
2958
+ volume: (_d = (_c = event.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
2959
+ startDate: (_f = (_e = event.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
2960
+ endDate: (_h = (_g = event.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
2961
+ creationDate: (_j = (_i = event.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
2962
+ });
2963
+ };
2964
+ var filterEventsByTabValue = (events, _tabValue) => {
2965
+ return events;
2966
+ };
2967
+ var resolveTabVenus = (tab) => {
2968
+ if (!tab)
2969
+ return void 0;
2970
+ if (tab.venues && tab.venues.length > 0)
2971
+ return tab.venues;
2972
+ if (tab.value === "polymarket" || tab.value === "kalshi") {
2973
+ return [tab.value];
2974
+ }
2975
+ return void 0;
2976
+ };
2977
+
2978
+ // src/events/list/index.tsx
2979
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2980
+ var renderTabIcon = (tab, isActive) => {
2981
+ if (tab.venueLogo) {
2982
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(VenueLogo, { venue: tab.venueLogo, size: "xs" });
2983
+ }
2984
+ if (!tab.iconName)
2985
+ return null;
2986
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2987
+ Icon,
2988
+ {
2989
+ name: tab.iconName,
2990
+ size: "s",
2991
+ color: isActive ? "var(--agg-color-primary)" : "var(--agg-color-foreground)"
2992
+ }
2993
+ );
2994
+ };
2995
+ var EventList = ({
2996
+ title,
2997
+ maxItemsPerRow = 3,
2998
+ limit = 3,
2999
+ maxVisibleItems,
3000
+ showVenueLogo = true,
3001
+ search,
3002
+ categoryIds
3003
+ }) => {
3004
+ var _a, _b;
3005
+ const labels = (0, import_hooks12.useLabels)();
3006
+ const defaultEventListTabs = (0, import_react3.useMemo)(() => {
3007
+ return getDefaultEventListTabs(labels);
3008
+ }, [labels]);
3009
+ const [activeTabValue, setActiveTabValue] = (0, import_react3.useState)(
3010
+ (_b = (_a = defaultEventListTabs[0]) == null ? void 0 : _a.value) != null ? _b : "matched"
3011
+ );
3012
+ const activeTab = (0, import_react3.useMemo)(() => {
3013
+ return defaultEventListTabs.find((tab) => tab.value === activeTabValue);
3014
+ }, [activeTabValue]);
3015
+ const venues = (0, import_react3.useMemo)(() => {
3016
+ return resolveTabVenus(activeTab);
3017
+ }, [activeTab]);
3018
+ const resolvedMaxVisibleItems = (0, import_react3.useMemo)(() => {
3019
+ if (!Number.isFinite(maxVisibleItems))
3020
+ return void 0;
3021
+ return Math.max(1, Math.floor(maxVisibleItems));
3022
+ }, [maxVisibleItems]);
3023
+ const requestLimit = resolvedMaxVisibleItems != null ? resolvedMaxVisibleItems : limit;
3024
+ const shouldPaginate = resolvedMaxVisibleItems == null;
3025
+ const { events, isLoading, isError, fetchNextPage, hasNextPage, isFetchingNextPage } = (0, import_hooks12.useEvents)({
3026
+ venues,
3027
+ search,
3028
+ categoryIds,
3029
+ limit: requestLimit
3030
+ });
3031
+ const filteredEvents = (0, import_react3.useMemo)(() => {
3032
+ return filterEventsByTabValue(events, activeTabValue);
3033
+ }, [events, activeTabValue]);
3034
+ const tileEvents = (0, import_react3.useMemo)(() => {
3035
+ const normalizedEvents = filteredEvents.map((event) => mapEventToEventListItemEvent(event)).filter((event) => event != null);
3036
+ if (resolvedMaxVisibleItems == null)
3037
+ return normalizedEvents;
3038
+ return normalizedEvents.slice(0, resolvedMaxVisibleItems);
3039
+ }, [filteredEvents, resolvedMaxVisibleItems]);
3040
+ const tabsItems = (0, import_react3.useMemo)(() => {
3041
+ return defaultEventListTabs.map((tab) => {
3042
+ const isActive = tab.value === activeTabValue;
3043
+ return {
3044
+ value: tab.value,
3045
+ label: tab.label,
3046
+ icon: renderTabIcon(tab, isActive),
3047
+ disabled: tab.disabled
3048
+ };
3049
+ });
3050
+ }, [activeTabValue]);
3051
+ const resolvedMaxItemsPerRow = Number.isFinite(maxItemsPerRow) ? Math.max(1, Math.floor(maxItemsPerRow)) : 1;
3052
+ const loadingPlaceholderCount = isFetchingNextPage ? Math.min(resolvedMaxItemsPerRow, resolvedMaxVisibleItems != null ? resolvedMaxVisibleItems : Infinity) : 0;
3053
+ const shouldRenderLoadingState = isLoading && tileEvents.length === 0;
3054
+ const loadMoreRef = (0, import_react3.useRef)(null);
3055
+ (0, import_react3.useEffect)(() => {
3056
+ if (!shouldPaginate)
3057
+ return;
3058
+ if (!hasNextPage)
3059
+ return;
3060
+ const target = loadMoreRef.current;
3061
+ if (!target)
3062
+ return;
3063
+ const observer = new IntersectionObserver(
3064
+ (entries) => {
3065
+ const entry = entries[0];
3066
+ if (!(entry == null ? void 0 : entry.isIntersecting))
3067
+ return;
3068
+ if (isLoading || isFetchingNextPage || !hasNextPage)
3069
+ return;
3070
+ void fetchNextPage();
3071
+ },
3072
+ {
3073
+ rootMargin: "320px 0px"
3074
+ }
3075
+ );
3076
+ observer.observe(target);
3077
+ return () => {
3078
+ observer.disconnect();
3079
+ };
3080
+ }, [fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, shouldPaginate]);
3081
+ const gridStyle = {
3082
+ ["--agg-event-list-columns"]: String(resolvedMaxItemsPerRow)
3083
+ };
3084
+ const gridClassName = cn(
3085
+ "grid grid-cols-1 gap-5",
3086
+ "md:[grid-template-columns:repeat(var(--agg-event-list-columns),minmax(0,1fr))]"
3087
+ );
3088
+ if (shouldRenderLoadingState) {
3089
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Skeleton, { view: "event-list", ariaLabel: labels.eventList.loading(title) });
3090
+ }
3091
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("section", { className: "flex w-full flex-col gap-5", children: [
3092
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("header", { className: "flex flex-col md:flex-row w-full flex-nowrap items-start md:items-center justify-between gap-2 md:gap-4", children: [
3093
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Typography, { as: "h2", variant: "value", className: "truncate [&::first-letter]:uppercase", children: title }),
3094
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3095
+ Tabs,
3096
+ {
3097
+ ariaLabel: labels.eventList.tabsAria(title),
3098
+ className: "max-w-full",
3099
+ items: tabsItems,
3100
+ value: activeTabValue,
3101
+ onChange: setActiveTabValue
3102
+ }
3103
+ )
3104
+ ] }),
3105
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: gridClassName, style: gridStyle, children: [
3106
+ tileEvents.map((event) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3107
+ EventListItem,
3108
+ {
3109
+ event,
3110
+ showVenueLogo,
3111
+ classNames: {
3112
+ root: "w-full min-w-0 max-w-none"
3113
+ }
3114
+ },
3115
+ event.id
3116
+ )),
3117
+ Array.from({ length: loadingPlaceholderCount }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3118
+ EventListItem,
3119
+ {
3120
+ isLoading: true,
3121
+ classNames: {
3122
+ root: "w-full min-w-0 max-w-none"
3123
+ }
3124
+ },
3125
+ `loading-${index}`
3126
+ )),
3127
+ !isLoading && !isError && (tileEvents == null ? void 0 : tileEvents.length) === 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3128
+ Typography,
3129
+ {
3130
+ variant: "body",
3131
+ className: "w-full col-span-full flex flex-col items-center justify-center h-32",
3132
+ children: labels.eventList.empty
3133
+ }
3134
+ ) : null,
3135
+ isError ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3136
+ Typography,
3137
+ {
3138
+ variant: "body",
3139
+ className: "w-full col-span-full flex flex-col items-center justify-center h-32",
3140
+ children: labels.eventList.error
3141
+ }
3142
+ ) : null
3143
+ ] }),
3144
+ shouldPaginate && hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { ref: loadMoreRef, className: "h-px w-full", "aria-hidden": true }) : null
3145
+ ] });
3146
+ };
3147
+ EventList.displayName = "EventList";
3148
+ // Annotate the CommonJS export names for ESM import in node:
3149
+ 0 && (module.exports = {
3150
+ EventList
3151
+ });