@agg-build/ui 2.1.1 → 2.1.3

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 (74) hide show
  1. package/dist/{chunk-XHDGSRG7.mjs → chunk-BW7S2YR3.mjs} +1139 -308
  2. package/dist/{chunk-TERG43WW.mjs → chunk-R2YNZJZ3.mjs} +69 -27
  3. package/dist/{chunk-RPXRTXCY.mjs → chunk-T4YZGAYS.mjs} +22 -1
  4. package/dist/{chunk-IQT4I5B4.mjs → chunk-TAGPAADA.mjs} +2108 -767
  5. package/dist/{chunk-NK57KMYN.mjs → chunk-TBZWRUFB.mjs} +752 -589
  6. package/dist/{chunk-YJO6LMRT.mjs → chunk-VP76G6PN.mjs} +87 -25
  7. package/dist/{chunk-WU2C3C6K.mjs → chunk-XHE2VO3S.mjs} +4 -21
  8. package/dist/events.js +1014 -760
  9. package/dist/events.mjs +5 -3
  10. package/dist/index.js +9937 -7880
  11. package/dist/index.mjs +117 -456
  12. package/dist/modals.js +1 -1
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +8513 -6380
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +85 -25
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +979 -402
  21. package/dist/trading.mjs +10 -6
  22. package/dist/types/events/item/event-list-item.utils.d.mts +1 -25
  23. package/dist/types/events/item/event-list-item.utils.d.ts +1 -25
  24. package/dist/types/events/item-details/index.d.mts +2 -1
  25. package/dist/types/events/item-details/index.d.ts +2 -1
  26. package/dist/types/events/market-details/market-details-graph-panel.d.mts +39 -0
  27. package/dist/types/events/market-details/market-details-graph-panel.d.ts +39 -0
  28. package/dist/types/events/market-details/market-details-outcome-button.d.mts +2 -1
  29. package/dist/types/events/market-details/market-details-outcome-button.d.ts +2 -1
  30. package/dist/types/events/market-details/market-details.types.d.mts +31 -0
  31. package/dist/types/events/market-details/market-details.types.d.ts +31 -0
  32. package/dist/types/events/market-details/market-details.utils.d.mts +3 -16
  33. package/dist/types/events/market-details/market-details.utils.d.ts +3 -16
  34. package/dist/types/events/shared/format-event-title.d.mts +24 -0
  35. package/dist/types/events/shared/format-event-title.d.ts +24 -0
  36. package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
  37. package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
  38. package/dist/types/events/shared/select-best-outcome.d.mts +88 -0
  39. package/dist/types/events/shared/select-best-outcome.d.ts +88 -0
  40. package/dist/types/notifications/agg-notification-events-provider.d.mts +10 -1
  41. package/dist/types/notifications/agg-notification-events-provider.d.ts +10 -1
  42. package/dist/types/pages/event-market/event-market.shared.d.mts +30 -0
  43. package/dist/types/pages/event-market/event-market.shared.d.ts +30 -0
  44. package/dist/types/pages/event-market/event-market.types.d.mts +7 -0
  45. package/dist/types/pages/event-market/event-market.types.d.ts +7 -0
  46. package/dist/types/pages/event-market/sports-event-market-page.d.mts +8 -0
  47. package/dist/types/pages/event-market/sports-event-market-page.d.ts +8 -0
  48. package/dist/types/pages/event-market/sports-event-market.fixtures.d.mts +13 -0
  49. package/dist/types/pages/event-market/sports-event-market.fixtures.d.ts +13 -0
  50. package/dist/types/pages/event-market/sports-event-market.utils.d.mts +156 -0
  51. package/dist/types/pages/event-market/sports-event-market.utils.d.ts +156 -0
  52. package/dist/types/pages/event-market/sports-line-rail.d.mts +17 -0
  53. package/dist/types/pages/event-market/sports-line-rail.d.ts +17 -0
  54. package/dist/types/pages/event-market/sports-market-card.d.mts +22 -0
  55. package/dist/types/pages/event-market/sports-market-card.d.ts +22 -0
  56. package/dist/types/pages/event-market/sports-markets.d.mts +13 -0
  57. package/dist/types/pages/event-market/sports-markets.d.ts +13 -0
  58. package/dist/types/primitives/state-message/index.d.mts +1 -1
  59. package/dist/types/primitives/state-message/index.d.ts +1 -1
  60. package/dist/types/primitives/state-message/state-message.types.d.mts +1 -1
  61. package/dist/types/primitives/state-message/state-message.types.d.ts +1 -1
  62. package/dist/types/trading/index.d.mts +2 -0
  63. package/dist/types/trading/index.d.ts +2 -0
  64. package/dist/types/trading/place-order/index.d.mts +1 -1
  65. package/dist/types/trading/place-order/index.d.ts +1 -1
  66. package/dist/types/trading/place-order/index.place-order.types.d.mts +30 -1
  67. package/dist/types/trading/place-order/index.place-order.types.d.ts +30 -1
  68. package/dist/types/trading/settlement/settlement-text.utils.d.mts +5 -2
  69. package/dist/types/trading/settlement/settlement-text.utils.d.ts +5 -2
  70. package/dist/types/trading/use-claim-winnings.d.mts +84 -0
  71. package/dist/types/trading/use-claim-winnings.d.ts +84 -0
  72. package/dist/types/trading/use-resolved-market-claim.d.mts +26 -0
  73. package/dist/types/trading/use-resolved-market-claim.d.ts +26 -0
  74. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  UserProfilePage,
12
12
  buildAggTxExplorerHref,
13
13
  useHomePageModals
14
- } from "./chunk-IQT4I5B4.mjs";
14
+ } from "./chunk-TAGPAADA.mjs";
15
15
  import {
16
16
  EventList,
17
17
  EventListItem,
@@ -26,8 +26,9 @@ import {
26
26
  collectEligibleVenueOutcomes,
27
27
  mergeVenueOutcomeOrderbooks,
28
28
  orderbookRowLimitDefault,
29
+ resolveEventDetailsSyncKey,
29
30
  useCenterOrderbookSpread
30
- } from "./chunk-NK57KMYN.mjs";
31
+ } from "./chunk-TBZWRUFB.mjs";
31
32
  import {
32
33
  CARD_NETWORK_OPTIONS,
33
34
  ConnectAccountsStep,
@@ -42,10 +43,10 @@ import {
42
43
  WithdrawModal,
43
44
  buildTerminalSummary,
44
45
  clearPendingCardSession,
45
- getPendingCardSession,
46
- subscribeAggDepositNotification
47
- } from "./chunk-WU2C3C6K.mjs";
46
+ getPendingCardSession
47
+ } from "./chunk-XHE2VO3S.mjs";
48
48
  import {
49
+ AggNotificationEventsProvider,
49
50
  DEPOSIT_MODAL_OPEN_EVENT,
50
51
  PlaceOrder,
51
52
  PlaceOrderFailureView,
@@ -55,8 +56,10 @@ import {
55
56
  parseAmount,
56
57
  parseVenue,
57
58
  requestAggDepositModalOpen,
58
- requestAggWithdrawModalOpen
59
- } from "./chunk-XHDGSRG7.mjs";
59
+ requestAggWithdrawModalOpen,
60
+ useClaimWinnings,
61
+ useResolvedMarketClaim
62
+ } from "./chunk-BW7S2YR3.mjs";
60
63
  import {
61
64
  SETTLEMENT_SECTION_ID,
62
65
  Settlement,
@@ -74,10 +77,10 @@ import {
74
77
  resolveOrderBookRows,
75
78
  resolveUnifiedOrderBookEntries,
76
79
  useEventTradingContext
77
- } from "./chunk-TERG43WW.mjs";
80
+ } from "./chunk-R2YNZJZ3.mjs";
78
81
  import {
79
82
  GeoBlockBanner
80
- } from "./chunk-RPXRTXCY.mjs";
83
+ } from "./chunk-T4YZGAYS.mjs";
81
84
  import {
82
85
  AGG_DEFAULT_URL,
83
86
  AGG_DOCS_URL,
@@ -197,355 +200,10 @@ import {
197
200
  useOptionalToast,
198
201
  useToast,
199
202
  venueLogoNames
200
- } from "./chunk-YJO6LMRT.mjs";
201
-
202
- // src/notifications/agg-notification-events-provider.tsx
203
- import {
204
- useAggAuthState,
205
- useAggLabels,
206
- useAggUiConfig,
207
- useOnOrderEvent,
208
- useOnWithdrawalLifecycle,
209
- useOptionalAggClient,
210
- useUserActivity
211
- } from "@agg-build/hooks";
212
- import { useCallback, useEffect, useRef } from "react";
213
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
214
- function AggNotificationEventsProvider({
215
- children,
216
- enabled = true,
217
- depositActivityLimit = 25
218
- }) {
219
- const aggClient = useOptionalAggClient();
220
- if (!aggClient) {
221
- return /* @__PURE__ */ jsx(Fragment, { children });
222
- }
223
- return /* @__PURE__ */ jsxs(Fragment, { children: [
224
- /* @__PURE__ */ jsx(AggNotificationEventsBridge, { enabled, depositActivityLimit }),
225
- children
226
- ] });
227
- }
228
- var TERMINAL_ORDER_EVENTS = /* @__PURE__ */ new Set(["filled", "partial_fill", "failed"]);
229
- var TERMINAL_WITHDRAWAL_STATUSES = /* @__PURE__ */ new Set([
230
- "completed",
231
- "partial",
232
- "failed"
233
- ]);
234
- var isTerminalWithdrawalStatus = (value) => TERMINAL_WITHDRAWAL_STATUSES.has(value);
235
- var MICRO_UNITS_SCALE = 1e6;
236
- var formatScaledMicroAmount = (value) => {
237
- if (!value) return void 0;
238
- if (value.includes(".")) {
239
- const parsed = Number(value);
240
- if (!Number.isFinite(parsed)) return void 0;
241
- return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
242
- }
243
- try {
244
- const raw = BigInt(value);
245
- const whole = raw / BigInt(MICRO_UNITS_SCALE);
246
- const remainder = raw % BigInt(MICRO_UNITS_SCALE);
247
- const parsed = Number(whole) + Number(remainder) / MICRO_UNITS_SCALE;
248
- return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
249
- } catch (e) {
250
- const parsed = Number(value);
251
- if (!Number.isFinite(parsed)) return void 0;
252
- return (parsed / MICRO_UNITS_SCALE).toLocaleString("en-US", { maximumFractionDigits: 2 });
253
- }
254
- };
255
- var formatDecimalAmount = (value) => {
256
- if (!value) return void 0;
257
- const parsed = Number(value.replace(/,/g, ""));
258
- if (!Number.isFinite(parsed)) return value;
259
- return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
260
- };
261
- var formatPriceCents = (value) => {
262
- if (!value) return void 0;
263
- const parsed = Number(value);
264
- if (!Number.isFinite(parsed)) return void 0;
265
- const cents = parsed * 100;
266
- const display = cents.toLocaleString("en-US", {
267
- minimumFractionDigits: 0,
268
- maximumFractionDigits: 1
269
- });
270
- return `${display}\xA2`;
271
- };
272
- var formatSharesLabel = (raw) => {
273
- const formatted = formatScaledMicroAmount(raw);
274
- if (!formatted) return void 0;
275
- return `${formatted} shares`;
276
- };
277
- var capitalize = (value) => {
278
- if (!value) return void 0;
279
- return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
280
- };
281
- var venueLabelFor = (venueKey, labels) => {
282
- var _a;
283
- if (!venueKey) return void 0;
284
- const normalized = venueKey.toLowerCase();
285
- const lookup = labels.venues;
286
- return (_a = lookup[normalized]) != null ? _a : capitalize(venueKey);
287
- };
288
- function AggNotificationEventsBridge({ enabled, depositActivityLimit }) {
289
- var _a;
290
- const toastCtx = useOptionalToast();
291
- const { user, isAuthenticated } = useAggAuthState();
292
- const labels = useAggLabels();
293
- const { features } = useAggUiConfig();
294
- const notificationsFeatureEnabled = features.enableNotifications !== false;
295
- const effectivelyEnabled = enabled && notificationsFeatureEnabled;
296
- const currentUserId = (_a = user == null ? void 0 : user.id) != null ? _a : null;
297
- const firedKeysRef = useRef(/* @__PURE__ */ new Set());
298
- const depositStatusesRef = useRef(/* @__PURE__ */ new Map());
299
- const hasSeededDepositStatusesRef = useRef(false);
300
- const recentClientDepositFingerprintsRef = useRef(/* @__PURE__ */ new Map());
301
- const lastUserIdRef = useRef("uninitialized");
302
- useEffect(() => {
303
- if (lastUserIdRef.current === currentUserId) return;
304
- lastUserIdRef.current = currentUserId;
305
- firedKeysRef.current = /* @__PURE__ */ new Set();
306
- depositStatusesRef.current = /* @__PURE__ */ new Map();
307
- hasSeededDepositStatusesRef.current = false;
308
- recentClientDepositFingerprintsRef.current = /* @__PURE__ */ new Map();
309
- }, [currentUserId]);
310
- const fireOnce = useCallback(
311
- (key, tone, title, message, detail) => {
312
- if (!effectivelyEnabled) return;
313
- const toast = toastCtx == null ? void 0 : toastCtx.toast;
314
- if (!toast) return;
315
- if (firedKeysRef.current.has(key)) return;
316
- firedKeysRef.current.add(key);
317
- toast(message, { tone, title, detail });
318
- },
319
- [effectivelyEnabled, toastCtx]
320
- );
321
- const orderEventCallback = useCallback(
322
- (event) => {
323
- if (!effectivelyEnabled || !isAuthenticated) return;
324
- if (!currentUserId || event.userId !== currentUserId) return;
325
- if (!TERMINAL_ORDER_EVENTS.has(event.event)) return;
326
- handleOrderEvent({ event, labels, fireOnce });
327
- },
328
- [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]
329
- );
330
- useOnOrderEvent(orderEventCallback);
331
- const withdrawalCallback = useCallback(
332
- (event) => {
333
- if (!effectivelyEnabled || !isAuthenticated) return;
334
- if (!currentUserId || event.userId !== currentUserId) return;
335
- if (!event.terminal) return;
336
- if (!isTerminalWithdrawalStatus(event.status)) return;
337
- handleWithdrawalEvent({ event, labels, fireOnce });
338
- },
339
- [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]
340
- );
341
- useOnWithdrawalLifecycle(withdrawalCallback);
342
- useEffect(() => {
343
- if (!effectivelyEnabled || !isAuthenticated || !currentUserId) return;
344
- return subscribeAggDepositNotification((event) => {
345
- handleClientDepositNotification({
346
- event,
347
- labels,
348
- fireOnce,
349
- recentClientDepositFingerprints: recentClientDepositFingerprintsRef.current
350
- });
351
- });
352
- }, [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]);
353
- const depositActivity = useUserActivity({
354
- type: "deposit",
355
- limit: depositActivityLimit,
356
- enabled: effectivelyEnabled && isAuthenticated && currentUserId !== null
357
- });
358
- const depositActivities = depositActivity.activities;
359
- useEffect(() => {
360
- if (!effectivelyEnabled || !isAuthenticated || !currentUserId) return;
361
- if (!depositActivity.isSuccess) return;
362
- handleDepositActivities({
363
- deposits: depositActivities,
364
- previousStatuses: depositStatusesRef.current,
365
- hasSeededStatuses: hasSeededDepositStatusesRef.current,
366
- labels,
367
- fireOnce,
368
- shouldSuppressToast: (status, amountLabel, tokenLabel) => hasRecentClientDepositNotification({
369
- recentClientDepositFingerprints: recentClientDepositFingerprintsRef.current,
370
- status,
371
- amountLabel,
372
- tokenLabel
373
- })
374
- });
375
- hasSeededDepositStatusesRef.current = true;
376
- }, [
377
- currentUserId,
378
- depositActivities,
379
- depositActivity.isSuccess,
380
- effectivelyEnabled,
381
- fireOnce,
382
- isAuthenticated,
383
- labels
384
- ]);
385
- return null;
386
- }
387
- function handleOrderEvent({ event, labels, fireOnce }) {
388
- var _a, _b;
389
- const venueLabel = venueLabelFor(event.venue, labels);
390
- const amountLabel = formatSharesLabel((_a = event.actualSharesRaw) != null ? _a : event.filledAmountRaw);
391
- const priceLabel = formatPriceCents((_b = event.executionPriceRaw) != null ? _b : event.quotedPriceRaw);
392
- if (event.event === "filled") {
393
- fireOnce(
394
- `order:${event.orderId}:filled`,
395
- "success",
396
- labels.notifications.order.filledTitle,
397
- labels.notifications.order.filledMessage({ venueLabel, amountLabel, priceLabel })
398
- );
399
- return;
400
- }
401
- if (event.event === "partial_fill") {
402
- fireOnce(
403
- `order:${event.orderId}:partial_fill`,
404
- "warning",
405
- labels.notifications.order.partialFilledTitle,
406
- labels.notifications.order.partialFilledMessage({ venueLabel, amountLabel, priceLabel })
407
- );
408
- return;
409
- }
410
- if (event.event === "failed") {
411
- fireOnce(
412
- `order:${event.orderId}:failed`,
413
- "error",
414
- labels.notifications.order.failedTitle,
415
- labels.notifications.order.failedMessage(event.errorReason),
416
- venueLabel
417
- );
418
- }
419
- }
420
- function handleWithdrawalEvent({ event, labels, fireOnce }) {
421
- var _a;
422
- const amountLabel = formatScaledMicroAmount((_a = event.completedAmountRaw) != null ? _a : event.requestedAmountRaw);
423
- if (event.status === "completed") {
424
- fireOnce(
425
- `withdrawal:${event.withdrawalId}:completed`,
426
- "success",
427
- labels.notifications.withdrawal.completedTitle,
428
- labels.notifications.withdrawal.completedMessage({ amountLabel })
429
- );
430
- return;
431
- }
432
- if (event.status === "partial") {
433
- fireOnce(
434
- `withdrawal:${event.withdrawalId}:partial`,
435
- "warning",
436
- labels.notifications.withdrawal.partialTitle,
437
- labels.notifications.withdrawal.partialMessage({ amountLabel })
438
- );
439
- return;
440
- }
441
- if (event.status === "failed") {
442
- fireOnce(
443
- `withdrawal:${event.withdrawalId}:failed`,
444
- "error",
445
- labels.notifications.withdrawal.failedTitle,
446
- labels.notifications.withdrawal.failedMessage(event.errorMessage)
447
- );
448
- }
449
- }
450
- var DEPOSIT_COMPLETED_STATUSES = /* @__PURE__ */ new Set(["completed", "confirmed", "succeeded", "success"]);
451
- var DEPOSIT_FAILED_STATUSES = /* @__PURE__ */ new Set(["failed", "errored", "rejected"]);
452
- var CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS = 2 * 60 * 1e3;
453
- var isTerminalDepositStatus = (status) => DEPOSIT_COMPLETED_STATUSES.has(status) || DEPOSIT_FAILED_STATUSES.has(status);
454
- var getDepositNotificationFingerprint = ({
455
- status,
456
- amountLabel,
457
- tokenLabel
458
- }) => `${status}:${amountLabel != null ? amountLabel : ""}:${tokenLabel != null ? tokenLabel : ""}`.toLowerCase();
459
- var hasRecentClientDepositNotification = ({
460
- recentClientDepositFingerprints,
461
- status,
462
- amountLabel,
463
- tokenLabel
464
- }) => {
465
- const fingerprint = getDepositNotificationFingerprint({ status, amountLabel, tokenLabel });
466
- const lastNotifiedAt = recentClientDepositFingerprints.get(fingerprint);
467
- if (!lastNotifiedAt) return false;
468
- if (Date.now() - lastNotifiedAt <= CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS) {
469
- return true;
470
- }
471
- recentClientDepositFingerprints.delete(fingerprint);
472
- return false;
473
- };
474
- function handleClientDepositNotification({
475
- event,
476
- labels,
477
- fireOnce,
478
- recentClientDepositFingerprints
479
- }) {
480
- var _a, _b, _c;
481
- const amountLabel = formatDecimalAmount(event.amount);
482
- const tokenLabel = event.tokenSymbol;
483
- const fingerprint = getDepositNotificationFingerprint({
484
- status: event.status,
485
- amountLabel,
486
- tokenLabel
487
- });
488
- recentClientDepositFingerprints.set(fingerprint, Date.now());
489
- if (event.status === "completed") {
490
- fireOnce(
491
- `deposit-client:${(_a = event.id) != null ? _a : fingerprint}:completed`,
492
- "success",
493
- labels.notifications.deposit.completedTitle,
494
- labels.notifications.deposit.completedMessage({ amountLabel, tokenLabel })
495
- );
496
- return;
497
- }
498
- fireOnce(
499
- `deposit-client:${(_b = event.id) != null ? _b : fingerprint}:failed`,
500
- "error",
501
- labels.notifications.deposit.failedTitle,
502
- (_c = event.errorMessage) != null ? _c : labels.notifications.deposit.failedMessage({ amountLabel, tokenLabel })
503
- );
504
- }
505
- function handleDepositActivities({
506
- deposits,
507
- previousStatuses,
508
- hasSeededStatuses,
509
- labels,
510
- fireOnce,
511
- shouldSuppressToast
512
- }) {
513
- for (const item of deposits) {
514
- if (item.type !== "deposit") continue;
515
- const deposit = item;
516
- const status = deposit.status.toLowerCase();
517
- const isCompleted = DEPOSIT_COMPLETED_STATUSES.has(status);
518
- const isFailed = DEPOSIT_FAILED_STATUSES.has(status);
519
- const previousStatus = previousStatuses.get(deposit.id);
520
- previousStatuses.set(deposit.id, status);
521
- if (!hasSeededStatuses) continue;
522
- if (!previousStatus) continue;
523
- if (isTerminalDepositStatus(previousStatus)) continue;
524
- if (!isCompleted && !isFailed) continue;
525
- const amountLabel = formatScaledMicroAmount(deposit.amountRaw);
526
- const tokenLabel = deposit.tokenSymbol;
527
- const terminalStatus = isCompleted ? "completed" : "failed";
528
- if (shouldSuppressToast == null ? void 0 : shouldSuppressToast(terminalStatus, amountLabel, tokenLabel)) continue;
529
- if (isCompleted) {
530
- fireOnce(
531
- `deposit:${deposit.id}:completed`,
532
- "success",
533
- labels.notifications.deposit.completedTitle,
534
- labels.notifications.deposit.completedMessage({ amountLabel, tokenLabel })
535
- );
536
- } else {
537
- fireOnce(
538
- `deposit:${deposit.id}:failed`,
539
- "error",
540
- labels.notifications.deposit.failedTitle,
541
- labels.notifications.deposit.failedMessage({ amountLabel, tokenLabel })
542
- );
543
- }
544
- }
545
- }
203
+ } from "./chunk-VP76G6PN.mjs";
546
204
 
547
205
  // src/notifications/agg-toast-provider.tsx
548
- import { jsx as jsx2 } from "react/jsx-runtime";
206
+ import { jsx } from "react/jsx-runtime";
549
207
  function AggToastProvider(_a) {
550
208
  var _b = _a, {
551
209
  children,
@@ -556,17 +214,17 @@ function AggToastProvider(_a) {
556
214
  "disableAggNotifications",
557
215
  "notificationDepositActivityLimit"
558
216
  ]);
559
- return /* @__PURE__ */ jsx2(ToastProvider, __spreadProps(__spreadValues({}, toastProps), { children: disableAggNotifications ? children : /* @__PURE__ */ jsx2(AggNotificationEventsProvider, { depositActivityLimit: notificationDepositActivityLimit, children }) }));
217
+ return /* @__PURE__ */ jsx(ToastProvider, __spreadProps(__spreadValues({}, toastProps), { children: disableAggNotifications ? children : /* @__PURE__ */ jsx(AggNotificationEventsProvider, { depositActivityLimit: notificationDepositActivityLimit, children }) }));
560
218
  }
561
219
 
562
220
  // src/agg-provider.tsx
563
221
  import {
564
222
  AggProvider as AggSdkProvider
565
223
  } from "@agg-build/hooks";
566
- import { jsx as jsx3 } from "react/jsx-runtime";
224
+ import { jsx as jsx2 } from "react/jsx-runtime";
567
225
  function AggProvider(_a) {
568
226
  var _b = _a, { children, toast } = _b, providerProps = __objRest(_b, ["children", "toast"]);
569
- return /* @__PURE__ */ jsx3(AggSdkProvider, __spreadProps(__spreadValues({}, providerProps), { children: /* @__PURE__ */ jsx3(AggToastProvider, __spreadProps(__spreadValues({}, toast), { children })) }));
227
+ return /* @__PURE__ */ jsx2(AggSdkProvider, __spreadProps(__spreadValues({}, providerProps), { children: /* @__PURE__ */ jsx2(AggToastProvider, __spreadProps(__spreadValues({}, toast), { children })) }));
570
228
  }
571
229
 
572
230
  // src/auth/connect-button-view/index.tsx
@@ -646,11 +304,11 @@ var avatarRootClassName = cn(
646
304
  var avatarIconClassName = cn("h-[66%] w-[66%] text-agg-muted-foreground");
647
305
 
648
306
  // src/auth/connect-button-view/index.tsx
649
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
307
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
650
308
  var WalletAvatar = ({ className }) => {
651
309
  const { isAuthenticated, user } = useAggAuthContext();
652
310
  if (isAuthenticated && (user == null ? void 0 : user.avatarUrl)) {
653
- return /* @__PURE__ */ jsx4(
311
+ return /* @__PURE__ */ jsx3(
654
312
  "img",
655
313
  {
656
314
  src: optimizedImageUrl(user.avatarUrl, 44),
@@ -659,7 +317,7 @@ var WalletAvatar = ({ className }) => {
659
317
  }
660
318
  );
661
319
  }
662
- return /* @__PURE__ */ jsx4(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
320
+ return /* @__PURE__ */ jsx3(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
663
321
  };
664
322
  var AuthMethodActionButton = ({
665
323
  activeMethodId,
@@ -673,7 +331,7 @@ var AuthMethodActionButton = ({
673
331
  const labels = useLabels();
674
332
  const isMethodLoading = activeMethodId === method.id;
675
333
  const isMethodDisabled = disabled || !method.isAvailable || activeMethodId !== null && !isMethodLoading;
676
- return /* @__PURE__ */ jsxs2(
334
+ return /* @__PURE__ */ jsxs(
677
335
  "button",
678
336
  {
679
337
  type: "button",
@@ -683,7 +341,7 @@ var AuthMethodActionButton = ({
683
341
  "aria-label": labels.auth.signInWithMethod(method.label),
684
342
  onClick: () => onSelect(method.id),
685
343
  children: [
686
- isMethodLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx4(
344
+ isMethodLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx3(
687
345
  Icon,
688
346
  {
689
347
  name: (_a = method.iconName) != null ? _a : "profile",
@@ -692,7 +350,7 @@ var AuthMethodActionButton = ({
692
350
  title: renderLabel ? void 0 : method.label
693
351
  }
694
352
  ),
695
- renderLabel ? /* @__PURE__ */ jsx4("span", { children: labels.auth.connect(method.label) }) : null
353
+ renderLabel ? /* @__PURE__ */ jsx3("span", { children: labels.auth.connect(method.label) }) : null
696
354
  ]
697
355
  }
698
356
  );
@@ -721,8 +379,8 @@ var UnauthenticatedConnectView = ({
721
379
  const labels = useLabels();
722
380
  const hasConfiguredMethods = emailMethod !== null || socialMethods.length > 0 || walletMethods.length > 0;
723
381
  const showWalletDivider = walletMethods.length > 0 && (emailMethod !== null || socialMethods.length > 0);
724
- return /* @__PURE__ */ jsxs2("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
725
- /* @__PURE__ */ jsx4(
382
+ return /* @__PURE__ */ jsxs("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
383
+ /* @__PURE__ */ jsx3(
726
384
  Button,
727
385
  __spreadProps(__spreadValues({
728
386
  variant: "primary",
@@ -735,8 +393,8 @@ var UnauthenticatedConnectView = ({
735
393
  children: labels.auth.connect()
736
394
  })
737
395
  ),
738
- notice ? /* @__PURE__ */ jsx4("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
739
- /* @__PURE__ */ jsx4(Modal, { open: isChooserOpen || !!challengeContent, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs2(
396
+ notice ? /* @__PURE__ */ jsx3("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
397
+ /* @__PURE__ */ jsx3(Modal, { open: isChooserOpen || !!challengeContent, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs(
740
398
  Modal.Container,
741
399
  {
742
400
  maxWidth: "400px",
@@ -745,7 +403,7 @@ var UnauthenticatedConnectView = ({
745
403
  },
746
404
  "aria-label": challengeContent ? "Security Check" : labels.auth.signIn,
747
405
  children: [
748
- /* @__PURE__ */ jsx4(
406
+ /* @__PURE__ */ jsx3(
749
407
  Modal.Header,
750
408
  {
751
409
  title: challengeContent ? "Security Check" : labels.auth.signIn,
@@ -757,8 +415,8 @@ var UnauthenticatedConnectView = ({
757
415
  }
758
416
  }
759
417
  ),
760
- /* @__PURE__ */ jsx4(Modal.Body, { classNames: { root: authModalBodyClassName }, children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs2("div", { className: authMethodsListClassName, children: [
761
- emailMethod ? /* @__PURE__ */ jsxs2(
418
+ /* @__PURE__ */ jsx3(Modal.Body, { classNames: { root: authModalBodyClassName }, children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs("div", { className: authMethodsListClassName, children: [
419
+ emailMethod ? /* @__PURE__ */ jsxs(
762
420
  "form",
763
421
  {
764
422
  className: authSectionClassName,
@@ -767,8 +425,8 @@ var UnauthenticatedConnectView = ({
767
425
  onEmailSubmit();
768
426
  },
769
427
  children: [
770
- /* @__PURE__ */ jsxs2("div", { className: authInputFormClassName, children: [
771
- /* @__PURE__ */ jsx4(
428
+ /* @__PURE__ */ jsxs("div", { className: authInputFormClassName, children: [
429
+ /* @__PURE__ */ jsx3(
772
430
  "input",
773
431
  {
774
432
  id: "agg-auth-email",
@@ -781,7 +439,7 @@ var UnauthenticatedConnectView = ({
781
439
  disabled: disabled || isBusy || !emailMethod.isAvailable
782
440
  }
783
441
  ),
784
- /* @__PURE__ */ jsx4(
442
+ /* @__PURE__ */ jsx3(
785
443
  Button,
786
444
  {
787
445
  type: "submit",
@@ -794,8 +452,8 @@ var UnauthenticatedConnectView = ({
794
452
  }
795
453
  )
796
454
  ] }),
797
- emailMethod.isAvailable && ((_e = emailMethod.input) == null ? void 0 : _e.helperText) ? /* @__PURE__ */ jsx4("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: emailMethod.input.helperText }) : null,
798
- !emailMethod.isAvailable ? /* @__PURE__ */ jsx4(
455
+ emailMethod.isAvailable && ((_e = emailMethod.input) == null ? void 0 : _e.helperText) ? /* @__PURE__ */ jsx3("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: emailMethod.input.helperText }) : null,
456
+ !emailMethod.isAvailable ? /* @__PURE__ */ jsx3(
799
457
  InlineAlert,
800
458
  {
801
459
  tone: "warning",
@@ -804,7 +462,7 @@ var UnauthenticatedConnectView = ({
804
462
  className: classNames == null ? void 0 : classNames.authError
805
463
  }
806
464
  ) : null,
807
- emailError ? /* @__PURE__ */ jsx4(
465
+ emailError ? /* @__PURE__ */ jsx3(
808
466
  InlineAlert,
809
467
  {
810
468
  tone: "error",
@@ -815,8 +473,8 @@ var UnauthenticatedConnectView = ({
815
473
  ]
816
474
  }
817
475
  ) : null,
818
- socialMethods.length > 0 ? /* @__PURE__ */ jsxs2("div", { className: authSectionClassName, children: [
819
- /* @__PURE__ */ jsx4("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx4(
476
+ socialMethods.length > 0 ? /* @__PURE__ */ jsxs("div", { className: authSectionClassName, children: [
477
+ /* @__PURE__ */ jsx3("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx3(
820
478
  AuthMethodActionButton,
821
479
  {
822
480
  activeMethodId,
@@ -828,18 +486,18 @@ var UnauthenticatedConnectView = ({
828
486
  },
829
487
  method.id
830
488
  )) }),
831
- /* @__PURE__ */ jsxs2("p", { className: authHelperTextClassName, children: [
489
+ /* @__PURE__ */ jsxs("p", { className: authHelperTextClassName, children: [
832
490
  labels.auth.socialWalletNotice,
833
491
  " ",
834
- /* @__PURE__ */ jsx4("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
492
+ /* @__PURE__ */ jsx3("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
835
493
  ] })
836
494
  ] }) : null,
837
- showWalletDivider ? /* @__PURE__ */ jsxs2("div", { className: authDividerClassName, children: [
838
- /* @__PURE__ */ jsx4("div", { className: authDividerLineClassName }),
839
- /* @__PURE__ */ jsx4("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
840
- /* @__PURE__ */ jsx4("div", { className: authDividerLineClassName })
495
+ showWalletDivider ? /* @__PURE__ */ jsxs("div", { className: authDividerClassName, children: [
496
+ /* @__PURE__ */ jsx3("div", { className: authDividerLineClassName }),
497
+ /* @__PURE__ */ jsx3("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
498
+ /* @__PURE__ */ jsx3("div", { className: authDividerLineClassName })
841
499
  ] }) : null,
842
- walletMethods.length > 0 ? /* @__PURE__ */ jsx4("div", { className: authSectionClassName, children: /* @__PURE__ */ jsx4("div", { className: cn(authWalletMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: walletMethods.map((method) => /* @__PURE__ */ jsx4(
500
+ walletMethods.length > 0 ? /* @__PURE__ */ jsx3("div", { className: authSectionClassName, children: /* @__PURE__ */ jsx3("div", { className: cn(authWalletMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: walletMethods.map((method) => /* @__PURE__ */ jsx3(
843
501
  AuthMethodActionButton,
844
502
  {
845
503
  activeMethodId,
@@ -850,10 +508,10 @@ var UnauthenticatedConnectView = ({
850
508
  },
851
509
  method.id
852
510
  )) }) }) : null,
853
- /* @__PURE__ */ jsxs2("p", { className: authLegalTextClassName, children: [
511
+ /* @__PURE__ */ jsxs("p", { className: authLegalTextClassName, children: [
854
512
  labels.auth.legalNoticePrefix,
855
513
  " ",
856
- /* @__PURE__ */ jsx4(
514
+ /* @__PURE__ */ jsx3(
857
515
  "a",
858
516
  {
859
517
  className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink),
@@ -866,7 +524,7 @@ var UnauthenticatedConnectView = ({
866
524
  " ",
867
525
  labels.auth.legalNoticeSeparator,
868
526
  " ",
869
- /* @__PURE__ */ jsx4(
527
+ /* @__PURE__ */ jsx3(
870
528
  "a",
871
529
  {
872
530
  className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink),
@@ -878,7 +536,7 @@ var UnauthenticatedConnectView = ({
878
536
  ),
879
537
  "."
880
538
  ] }),
881
- errorMessage ? /* @__PURE__ */ jsx4(
539
+ errorMessage ? /* @__PURE__ */ jsx3(
882
540
  InlineAlert,
883
541
  {
884
542
  tone: "error",
@@ -953,7 +611,7 @@ var AuthConnectButtonView = ({
953
611
  classNames == null ? void 0 : classNames.profileMenuActionItem
954
612
  );
955
613
  if (!isAuthenticated) {
956
- return /* @__PURE__ */ jsx4(
614
+ return /* @__PURE__ */ jsx3(
957
615
  UnauthenticatedConnectView,
958
616
  {
959
617
  activeMethodId,
@@ -977,21 +635,21 @@ var AuthConnectButtonView = ({
977
635
  }
978
636
  );
979
637
  }
980
- return /* @__PURE__ */ jsx4("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ jsxs2("div", { className: cn(connectedButtonsRowClassName, classNames == null ? void 0 : classNames.connectedRow), children: [
981
- /* @__PURE__ */ jsxs2("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
982
- /* @__PURE__ */ jsx4("div", { className: "hidden lg:inline-flex", children: /* @__PURE__ */ jsx4(
638
+ return /* @__PURE__ */ jsx3("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ jsxs("div", { className: cn(connectedButtonsRowClassName, classNames == null ? void 0 : classNames.connectedRow), children: [
639
+ /* @__PURE__ */ jsxs("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
640
+ /* @__PURE__ */ jsx3("div", { className: "hidden lg:inline-flex", children: /* @__PURE__ */ jsx3(
983
641
  ConditionalWrapper,
984
642
  {
985
643
  condition: isDepositBlocked,
986
- wrapper: (children) => /* @__PURE__ */ jsx4(
644
+ wrapper: (children) => /* @__PURE__ */ jsx3(
987
645
  Tooltip,
988
646
  {
989
- content: /* @__PURE__ */ jsx4("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
647
+ content: /* @__PURE__ */ jsx3("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
990
648
  sideOffset: 4,
991
649
  children
992
650
  }
993
651
  ),
994
- children: /* @__PURE__ */ jsx4(
652
+ children: /* @__PURE__ */ jsx3(
995
653
  Button,
996
654
  __spreadProps(__spreadValues({
997
655
  variant: "primary",
@@ -1004,17 +662,17 @@ var AuthConnectButtonView = ({
1004
662
  )
1005
663
  }
1006
664
  ) }),
1007
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
1008
- /* @__PURE__ */ jsx4("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx4(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
1009
- /* @__PURE__ */ jsx4("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
1010
- claimReadyCount > 0 ? /* @__PURE__ */ jsx4(
665
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
666
+ /* @__PURE__ */ jsx3("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx3(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
667
+ /* @__PURE__ */ jsx3("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
668
+ claimReadyCount > 0 ? /* @__PURE__ */ jsx3(
1011
669
  Tooltip,
1012
670
  {
1013
671
  size: "medium",
1014
672
  classNames: { content: "px-5 py-4" },
1015
- content: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center gap-2", children: [
1016
- /* @__PURE__ */ jsx4("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
1017
- onClaimWinningsClick ? /* @__PURE__ */ jsxs2(
673
+ content: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
674
+ /* @__PURE__ */ jsx3("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
675
+ onClaimWinningsClick ? /* @__PURE__ */ jsxs(
1018
676
  "button",
1019
677
  {
1020
678
  type: "button",
@@ -1022,7 +680,7 @@ var AuthConnectButtonView = ({
1022
680
  onClick: onClaimWinningsClick,
1023
681
  children: [
1024
682
  claimWinningsLabel,
1025
- /* @__PURE__ */ jsx4(
683
+ /* @__PURE__ */ jsx3(
1026
684
  Icon,
1027
685
  {
1028
686
  name: "arrow-right",
@@ -1035,7 +693,7 @@ var AuthConnectButtonView = ({
1035
693
  }
1036
694
  ) : null
1037
695
  ] }),
1038
- children: /* @__PURE__ */ jsx4(
696
+ children: /* @__PURE__ */ jsx3(
1039
697
  "span",
1040
698
  {
1041
699
  className: cn(
@@ -1052,13 +710,13 @@ var AuthConnectButtonView = ({
1052
710
  }
1053
711
  ) : null
1054
712
  ] }),
1055
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
1056
- /* @__PURE__ */ jsx4("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx4(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
1057
- /* @__PURE__ */ jsx4("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
713
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
714
+ /* @__PURE__ */ jsx3("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx3(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
715
+ /* @__PURE__ */ jsx3("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
1058
716
  ] })
1059
717
  ] }),
1060
- /* @__PURE__ */ jsxs2(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
1061
- /* @__PURE__ */ jsx4(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
718
+ /* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
719
+ /* @__PURE__ */ jsx3(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1062
720
  "button",
1063
721
  {
1064
722
  type: "button",
@@ -1076,8 +734,8 @@ var AuthConnectButtonView = ({
1076
734
  disabled,
1077
735
  "aria-label": labels.auth.walletMenuFor(resolvedProfileLabel),
1078
736
  children: [
1079
- /* @__PURE__ */ jsx4(WalletAvatar, { className: "size-5! md:size-6!" }),
1080
- /* @__PURE__ */ jsx4(
737
+ /* @__PURE__ */ jsx3(WalletAvatar, { className: "size-5! md:size-6!" }),
738
+ /* @__PURE__ */ jsx3(
1081
739
  Typography,
1082
740
  {
1083
741
  variant: "body-strong",
@@ -1088,7 +746,7 @@ var AuthConnectButtonView = ({
1088
746
  children: resolvedProfileLabel
1089
747
  }
1090
748
  ),
1091
- /* @__PURE__ */ jsx4(
749
+ /* @__PURE__ */ jsx3(
1092
750
  Icon,
1093
751
  {
1094
752
  name: isProfileMenuOpen ? "chevron-up" : "chevron-down",
@@ -1100,14 +758,14 @@ var AuthConnectButtonView = ({
1100
758
  ]
1101
759
  }
1102
760
  ) }),
1103
- /* @__PURE__ */ jsx4(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx4(
761
+ /* @__PURE__ */ jsx3(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx3(
1104
762
  DropdownMenu.Content,
1105
763
  {
1106
764
  className: cn(AGG_ROOT_CLASS_NAME, rootClassName, "z-50 outline-none"),
1107
765
  "data-agg-animations": enableAnimations ? "true" : "false",
1108
766
  sideOffset: 4,
1109
767
  align: "end",
1110
- children: /* @__PURE__ */ jsxs2(
768
+ children: /* @__PURE__ */ jsxs(
1111
769
  "div",
1112
770
  {
1113
771
  className: cn(
@@ -1117,7 +775,7 @@ var AuthConnectButtonView = ({
1117
775
  classNames == null ? void 0 : classNames.profileMenuContent
1118
776
  ),
1119
777
  children: [
1120
- /* @__PURE__ */ jsxs2(
778
+ /* @__PURE__ */ jsxs(
1121
779
  "button",
1122
780
  {
1123
781
  type: "button",
@@ -1135,15 +793,15 @@ var AuthConnectButtonView = ({
1135
793
  },
1136
794
  disabled,
1137
795
  children: [
1138
- /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row items-center justify-between gap-3", children: [
1139
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-3", children: [
1140
- /* @__PURE__ */ jsx4(WalletAvatar, { className: "size-11" }),
1141
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-col items-start justify-start gap-0.5", children: [
1142
- /* @__PURE__ */ jsx4("p", { className: "w-full text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left truncate", children: resolvedProfileLabel }),
1143
- addressLabel ? /* @__PURE__ */ jsx4("p", { className: "w-full text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground text-left", children: addressLabel }) : null
796
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row items-center justify-between gap-3", children: [
797
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
798
+ /* @__PURE__ */ jsx3(WalletAvatar, { className: "size-11" }),
799
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start justify-start gap-0.5", children: [
800
+ /* @__PURE__ */ jsx3("p", { className: "w-full text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left truncate", children: resolvedProfileLabel }),
801
+ addressLabel ? /* @__PURE__ */ jsx3("p", { className: "w-full text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground text-left", children: addressLabel }) : null
1144
802
  ] })
1145
803
  ] }),
1146
- /* @__PURE__ */ jsx4(
804
+ /* @__PURE__ */ jsx3(
1147
805
  Icon,
1148
806
  {
1149
807
  name: "arrow-right",
@@ -1153,10 +811,10 @@ var AuthConnectButtonView = ({
1153
811
  }
1154
812
  )
1155
813
  ] }),
1156
- /* @__PURE__ */ jsxs2("div", { className: "md:hidden flex w-full items-start gap-5", children: [
1157
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1158
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2", children: [
1159
- /* @__PURE__ */ jsx4(
814
+ /* @__PURE__ */ jsxs("div", { className: "md:hidden flex w-full items-start gap-5", children: [
815
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
816
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
817
+ /* @__PURE__ */ jsx3(
1160
818
  Icon,
1161
819
  {
1162
820
  name: "wallet-filled",
@@ -1164,13 +822,13 @@ var AuthConnectButtonView = ({
1164
822
  className: "h-4 w-4 shrink-0 text-agg-muted-foreground"
1165
823
  }
1166
824
  ),
1167
- /* @__PURE__ */ jsx4("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Withdrawable Balance" })
825
+ /* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Withdrawable Balance" })
1168
826
  ] }),
1169
- /* @__PURE__ */ jsx4("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
827
+ /* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
1170
828
  ] }),
1171
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1172
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2", children: [
1173
- /* @__PURE__ */ jsx4(
829
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
830
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
831
+ /* @__PURE__ */ jsx3(
1174
832
  Icon,
1175
833
  {
1176
834
  name: "activity-chart",
@@ -1178,85 +836,85 @@ var AuthConnectButtonView = ({
1178
836
  className: "h-4 w-4 shrink-0 text-agg-muted-foreground"
1179
837
  }
1180
838
  ),
1181
- /* @__PURE__ */ jsx4("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
839
+ /* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
1182
840
  ] }),
1183
- /* @__PURE__ */ jsx4("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
841
+ /* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
1184
842
  ] })
1185
843
  ] })
1186
844
  ]
1187
845
  }
1188
846
  ),
1189
- /* @__PURE__ */ jsx4(
847
+ /* @__PURE__ */ jsx3(
1190
848
  "div",
1191
849
  {
1192
850
  className: cn(profileMenuSeparatorClassName, classNames == null ? void 0 : classNames.profileMenuSeparator)
1193
851
  }
1194
852
  ),
1195
- /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-col py-2", children: [
1196
- /* @__PURE__ */ jsxs2(
853
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col py-2", children: [
854
+ /* @__PURE__ */ jsxs(
1197
855
  DropdownMenu.Item,
1198
856
  {
1199
857
  className: dropdownMenuItemClassName,
1200
858
  onSelect: onProfileClick,
1201
859
  disabled,
1202
860
  children: [
1203
- /* @__PURE__ */ jsx4(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
1204
- /* @__PURE__ */ jsx4("span", { children: labels.auth.myProfile })
861
+ /* @__PURE__ */ jsx3(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
862
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.myProfile })
1205
863
  ]
1206
864
  }
1207
865
  ),
1208
- isDepositBlocked ? /* @__PURE__ */ jsx4(
866
+ isDepositBlocked ? /* @__PURE__ */ jsx3(
1209
867
  DropdownMenu.Item,
1210
868
  {
1211
869
  className: cn(dropdownMenuItemClassName, "opacity-50 cursor-not-allowed!"),
1212
870
  onSelect: (e) => e.preventDefault(),
1213
871
  "aria-disabled": "true",
1214
- children: /* @__PURE__ */ jsx4(
872
+ children: /* @__PURE__ */ jsx3(
1215
873
  Tooltip,
1216
874
  {
1217
- content: /* @__PURE__ */ jsx4("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
875
+ content: /* @__PURE__ */ jsx3("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
1218
876
  side: "bottom",
1219
877
  sideOffset: 4,
1220
- children: /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-3", children: [
1221
- /* @__PURE__ */ jsx4(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
1222
- /* @__PURE__ */ jsx4("span", { children: labels.auth.deposit })
878
+ children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-3", children: [
879
+ /* @__PURE__ */ jsx3(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
880
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.deposit })
1223
881
  ] })
1224
882
  }
1225
883
  )
1226
884
  }
1227
- ) : /* @__PURE__ */ jsxs2(
885
+ ) : /* @__PURE__ */ jsxs(
1228
886
  DropdownMenu.Item,
1229
887
  {
1230
888
  className: dropdownMenuItemClassName,
1231
889
  onSelect: onDepositClick,
1232
890
  disabled,
1233
891
  children: [
1234
- /* @__PURE__ */ jsx4(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
1235
- /* @__PURE__ */ jsx4("span", { children: labels.auth.deposit })
892
+ /* @__PURE__ */ jsx3(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
893
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.deposit })
1236
894
  ]
1237
895
  }
1238
896
  ),
1239
- /* @__PURE__ */ jsxs2(
897
+ /* @__PURE__ */ jsxs(
1240
898
  DropdownMenu.Item,
1241
899
  {
1242
900
  className: dropdownMenuItemClassName,
1243
901
  onSelect: onWithdrawClick,
1244
902
  disabled,
1245
903
  children: [
1246
- /* @__PURE__ */ jsx4(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
1247
- /* @__PURE__ */ jsx4("span", { children: labels.auth.withdraw })
904
+ /* @__PURE__ */ jsx3(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
905
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.withdraw })
1248
906
  ]
1249
907
  }
1250
908
  ),
1251
- /* @__PURE__ */ jsxs2(
909
+ /* @__PURE__ */ jsxs(
1252
910
  DropdownMenu.Item,
1253
911
  {
1254
912
  className: dropdownMenuItemClassName,
1255
913
  onSelect: onDisconnectClick,
1256
914
  disabled,
1257
915
  children: [
1258
- /* @__PURE__ */ jsx4(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
1259
- /* @__PURE__ */ jsx4("span", { children: labels.auth.disconnect })
916
+ /* @__PURE__ */ jsx3(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
917
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.disconnect })
1260
918
  ]
1261
919
  }
1262
920
  )
@@ -1442,6 +1100,7 @@ export {
1442
1100
  parseVenue,
1443
1101
  requestAggDepositModalOpen,
1444
1102
  requestAggWithdrawModalOpen,
1103
+ resolveEventDetailsSyncKey,
1445
1104
  resolveOrderBookRows,
1446
1105
  resolveUnifiedOrderBookEntries,
1447
1106
  shortenAddress,
@@ -1449,9 +1108,11 @@ export {
1449
1108
  toDate,
1450
1109
  typographyVariants,
1451
1110
  useCenterOrderbookSpread,
1111
+ useClaimWinnings,
1452
1112
  useEventTradingContext,
1453
1113
  useHomePageModals,
1454
1114
  useOptionalToast,
1115
+ useResolvedMarketClaim,
1455
1116
  useToast,
1456
1117
  venueLogoNames
1457
1118
  };