@microcosmmoney/portal-react 3.12.7 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. package/dist/components/mcd/mcd-page.js +3 -5
  2. package/dist/components/wallet/wallet-page.js +1 -1
  3. package/dist/index.d.ts +22 -0
  4. package/dist/index.js +48 -1
  5. package/dist/main-portal/components/auctions/AuctionsPage.d.ts +1 -0
  6. package/dist/main-portal/components/auctions/AuctionsPage.js +218 -0
  7. package/dist/main-portal/components/data/asset-stats.d.ts +1 -0
  8. package/dist/main-portal/components/data/asset-stats.js +33 -0
  9. package/dist/main-portal/components/data/charts/MCCSupplyChart.d.ts +7 -0
  10. package/dist/main-portal/components/data/charts/MCCSupplyChart.js +27 -0
  11. package/dist/main-portal/components/data/charts/MiningTrendChart.d.ts +7 -0
  12. package/dist/main-portal/components/data/charts/MiningTrendChart.js +39 -0
  13. package/dist/main-portal/components/data/charts/PriceChart.d.ts +5 -0
  14. package/dist/main-portal/components/data/charts/PriceChart.js +99 -0
  15. package/dist/main-portal/components/data/charts/TeamWalletChart.d.ts +7 -0
  16. package/dist/main-portal/components/data/charts/TeamWalletChart.js +33 -0
  17. package/dist/main-portal/components/data/charts/TerritoryProgressChart.d.ts +7 -0
  18. package/dist/main-portal/components/data/charts/TerritoryProgressChart.js +35 -0
  19. package/dist/main-portal/components/data/charts/UserLevelPieChart.d.ts +7 -0
  20. package/dist/main-portal/components/data/charts/UserLevelPieChart.js +34 -0
  21. package/dist/main-portal/components/data/charts/index.d.ts +5 -0
  22. package/dist/main-portal/components/data/charts/index.js +14 -0
  23. package/dist/main-portal/components/data/data-hero.d.ts +1 -0
  24. package/dist/main-portal/components/data/data-hero.js +81 -0
  25. package/dist/main-portal/components/data/mining-history-stats.d.ts +1 -0
  26. package/dist/main-portal/components/data/mining-history-stats.js +44 -0
  27. package/dist/main-portal/components/data/team-wallet-stats.d.ts +1 -0
  28. package/dist/main-portal/components/data/team-wallet-stats.js +34 -0
  29. package/dist/main-portal/components/data/territory-stats.d.ts +1 -0
  30. package/dist/main-portal/components/data/territory-stats.js +48 -0
  31. package/dist/main-portal/components/data/user-level-stats.d.ts +1 -0
  32. package/dist/main-portal/components/data/user-level-stats.js +36 -0
  33. package/dist/main-portal/components/fragment/FragmentPage.d.ts +1 -0
  34. package/dist/main-portal/components/fragment/FragmentPage.js +13 -0
  35. package/dist/main-portal/components/income/ManagerIncomePage.d.ts +1 -0
  36. package/dist/main-portal/components/income/ManagerIncomePage.js +147 -0
  37. package/dist/main-portal/components/layout/AppSidebar.d.ts +3 -0
  38. package/dist/main-portal/components/layout/AppSidebar.js +88 -0
  39. package/dist/main-portal/components/layout/DashboardHeader.d.ts +1 -0
  40. package/dist/main-portal/components/layout/DashboardHeader.js +121 -0
  41. package/dist/main-portal/components/layout/LocaleSwitcher.d.ts +1 -0
  42. package/dist/main-portal/components/layout/LocaleSwitcher.js +30 -0
  43. package/dist/main-portal/components/layout/MainFooter.d.ts +2 -0
  44. package/dist/main-portal/components/layout/MainFooter.js +50 -0
  45. package/dist/main-portal/components/layout/ShadcnNavbar.d.ts +1 -0
  46. package/dist/main-portal/components/layout/ShadcnNavbar.js +155 -0
  47. package/dist/main-portal/components/layout/TerminalSidebar.d.ts +1 -0
  48. package/dist/main-portal/components/layout/TerminalSidebar.js +110 -0
  49. package/dist/main-portal/components/lending/LendingPage.d.ts +1 -0
  50. package/dist/main-portal/components/lending/LendingPage.js +20 -0
  51. package/dist/main-portal/components/mcd/MCDPage.d.ts +1 -0
  52. package/dist/main-portal/components/mcd/MCDPage.js +125 -0
  53. package/dist/main-portal/components/messages/MessagesPage.d.ts +1 -0
  54. package/dist/main-portal/components/messages/MessagesPage.js +13 -0
  55. package/dist/main-portal/components/mining/MiningDistributionHistory.d.ts +11 -0
  56. package/dist/main-portal/components/mining/MiningDistributionHistory.js +84 -0
  57. package/dist/main-portal/components/mining/MiningModal.d.ts +12 -0
  58. package/dist/main-portal/components/mining/MiningModal.js +302 -0
  59. package/dist/main-portal/components/mining/MiningPage.d.ts +1 -0
  60. package/dist/main-portal/components/mining/MiningPage.js +237 -0
  61. package/dist/main-portal/components/mining/index.d.ts +1 -0
  62. package/dist/main-portal/components/mining/index.js +6 -0
  63. package/dist/main-portal/components/notifications/NotificationsPage.d.ts +1 -0
  64. package/dist/main-portal/components/notifications/NotificationsPage.js +13 -0
  65. package/dist/main-portal/components/organization/OrganizationPage.d.ts +1 -0
  66. package/dist/main-portal/components/organization/OrganizationPage.js +235 -0
  67. package/dist/main-portal/components/organization/connection-line.d.ts +12 -0
  68. package/dist/main-portal/components/organization/connection-line.js +38 -0
  69. package/dist/main-portal/components/organization/diagram-node.d.ts +17 -0
  70. package/dist/main-portal/components/organization/diagram-node.js +105 -0
  71. package/dist/main-portal/components/organization/system-panel.d.ts +11 -0
  72. package/dist/main-portal/components/organization/system-panel.js +72 -0
  73. package/dist/main-portal/components/profile/EmailChangeCard.d.ts +1 -0
  74. package/dist/main-portal/components/profile/EmailChangeCard.js +58 -0
  75. package/dist/main-portal/components/profile/ProfilePage.d.ts +1 -0
  76. package/dist/main-portal/components/profile/ProfilePage.js +263 -0
  77. package/dist/main-portal/components/profile/TwoFactorSettings.d.ts +1 -0
  78. package/dist/main-portal/components/profile/TwoFactorSettings.js +99 -0
  79. package/dist/main-portal/components/providers/ClientProviders.d.ts +6 -0
  80. package/dist/main-portal/components/providers/ClientProviders.js +17 -0
  81. package/dist/main-portal/components/providers/SolanaWalletProvider.d.ts +7 -0
  82. package/dist/main-portal/components/providers/SolanaWalletProvider.js +17 -0
  83. package/dist/main-portal/components/providers/theme-provider.d.ts +5 -0
  84. package/dist/main-portal/components/providers/theme-provider.js +10 -0
  85. package/dist/main-portal/components/queue/QueueStatusPage.d.ts +1 -0
  86. package/dist/main-portal/components/queue/QueueStatusPage.js +245 -0
  87. package/dist/main-portal/components/reincarnation/ReincarnationPage.d.ts +1 -0
  88. package/dist/main-portal/components/reincarnation/ReincarnationPage.js +87 -0
  89. package/dist/main-portal/components/resources/mcc-stats-section.d.ts +1 -0
  90. package/dist/main-portal/components/resources/mcc-stats-section.js +199 -0
  91. package/dist/main-portal/components/resources/mcd-stats-section.d.ts +1 -0
  92. package/dist/main-portal/components/resources/mcd-stats-section.js +76 -0
  93. package/dist/main-portal/components/resources/minting-entry-section.d.ts +1 -0
  94. package/dist/main-portal/components/resources/minting-entry-section.js +70 -0
  95. package/dist/main-portal/components/resources/public-mining-modal.d.ts +7 -0
  96. package/dist/main-portal/components/resources/public-mining-modal.js +239 -0
  97. package/dist/main-portal/components/resources/recycle-pool-section.d.ts +1 -0
  98. package/dist/main-portal/components/resources/recycle-pool-section.js +82 -0
  99. package/dist/main-portal/components/resources/registration-prompt.d.ts +8 -0
  100. package/dist/main-portal/components/resources/registration-prompt.js +13 -0
  101. package/dist/main-portal/components/rewards/RewardsPage.d.ts +1 -0
  102. package/dist/main-portal/components/rewards/RewardsPage.js +149 -0
  103. package/dist/main-portal/components/security/domain-verification-bar.d.ts +1 -0
  104. package/dist/main-portal/components/security/domain-verification-bar.js +32 -0
  105. package/dist/main-portal/components/stations/StationDetailPage.d.ts +5 -0
  106. package/dist/main-portal/components/stations/StationDetailPage.js +232 -0
  107. package/dist/main-portal/components/stations/StationIncomeChart.d.ts +11 -0
  108. package/dist/main-portal/components/stations/StationIncomeChart.js +57 -0
  109. package/dist/main-portal/components/stations/StationKPIHistory.d.ts +1 -0
  110. package/dist/main-portal/components/stations/StationKPIHistory.js +7 -0
  111. package/dist/main-portal/components/stations/StationListPage.d.ts +1 -0
  112. package/dist/main-portal/components/stations/StationListPage.js +341 -0
  113. package/dist/main-portal/components/stations/StationMemberRanking.d.ts +13 -0
  114. package/dist/main-portal/components/stations/StationMemberRanking.js +64 -0
  115. package/dist/main-portal/components/stations/StationSummaryCards.d.ts +13 -0
  116. package/dist/main-portal/components/stations/StationSummaryCards.js +30 -0
  117. package/dist/main-portal/components/stations/StationsPage.d.ts +1 -0
  118. package/dist/main-portal/components/stations/StationsPage.js +239 -0
  119. package/dist/main-portal/components/territory/TerritoryNFTBrowser.d.ts +1 -0
  120. package/dist/main-portal/components/territory/TerritoryNFTBrowser.js +147 -0
  121. package/dist/main-portal/components/ui/accordion.d.ts +7 -0
  122. package/dist/main-portal/components/ui/accordion.js +57 -0
  123. package/dist/main-portal/components/ui/alert-dialog.d.ts +14 -0
  124. package/dist/main-portal/components/ui/alert-dialog.js +85 -0
  125. package/dist/main-portal/components/ui/alert.d.ts +9 -0
  126. package/dist/main-portal/components/ui/alert.js +28 -0
  127. package/dist/main-portal/components/ui/aspect-ratio.d.ts +3 -0
  128. package/dist/main-portal/components/ui/aspect-ratio.js +43 -0
  129. package/dist/main-portal/components/ui/avatar.d.ts +6 -0
  130. package/dist/main-portal/components/ui/avatar.js +52 -0
  131. package/dist/main-portal/components/ui/badge.d.ts +9 -0
  132. package/dist/main-portal/components/ui/badge.js +26 -0
  133. package/dist/main-portal/components/ui/breadcrumb.d.ts +11 -0
  134. package/dist/main-portal/components/ui/breadcrumb.js +35 -0
  135. package/dist/main-portal/components/ui/button-group.d.ts +11 -0
  136. package/dist/main-portal/components/ui/button-group.js +34 -0
  137. package/dist/main-portal/components/ui/button.d.ts +10 -0
  138. package/dist/main-portal/components/ui/button.js +35 -0
  139. package/dist/main-portal/components/ui/calendar.d.ts +8 -0
  140. package/dist/main-portal/components/ui/calendar.js +111 -0
  141. package/dist/main-portal/components/ui/card.d.ts +17 -0
  142. package/dist/main-portal/components/ui/card.js +41 -0
  143. package/dist/main-portal/components/ui/carousel.d.ts +19 -0
  144. package/dist/main-portal/components/ui/carousel.js +134 -0
  145. package/dist/main-portal/components/ui/chart.d.ts +40 -0
  146. package/dist/main-portal/components/ui/chart.js +168 -0
  147. package/dist/main-portal/components/ui/checkbox.d.ts +4 -0
  148. package/dist/main-portal/components/ui/checkbox.js +45 -0
  149. package/dist/main-portal/components/ui/collapsible.d.ts +5 -0
  150. package/dist/main-portal/components/ui/collapsible.js +51 -0
  151. package/dist/main-portal/components/ui/command.d.ts +18 -0
  152. package/dist/main-portal/components/ui/command.js +45 -0
  153. package/dist/main-portal/components/ui/context-menu.d.ts +25 -0
  154. package/dist/main-portal/components/ui/context-menu.js +101 -0
  155. package/dist/main-portal/components/ui/dialog.d.ts +15 -0
  156. package/dist/main-portal/components/ui/dialog.js +81 -0
  157. package/dist/main-portal/components/ui/drawer.d.ts +13 -0
  158. package/dist/main-portal/components/ui/drawer.js +47 -0
  159. package/dist/main-portal/components/ui/dropdown-menu.d.ts +25 -0
  160. package/dist/main-portal/components/ui/dropdown-menu.js +101 -0
  161. package/dist/main-portal/components/ui/empty.d.ts +11 -0
  162. package/dist/main-portal/components/ui/empty.js +41 -0
  163. package/dist/main-portal/components/ui/field.d.ts +24 -0
  164. package/dist/main-portal/components/ui/field.js +85 -0
  165. package/dist/main-portal/components/ui/form.d.ts +24 -0
  166. package/dist/main-portal/components/ui/form.js +103 -0
  167. package/dist/main-portal/components/ui/hover-avatar.d.ts +10 -0
  168. package/dist/main-portal/components/ui/hover-avatar.js +70 -0
  169. package/dist/main-portal/components/ui/hover-card.d.ts +6 -0
  170. package/dist/main-portal/components/ui/hover-card.js +52 -0
  171. package/dist/main-portal/components/ui/input-group.d.ts +15 -0
  172. package/dist/main-portal/components/ui/input-group.js +65 -0
  173. package/dist/main-portal/components/ui/input-otp.d.ts +11 -0
  174. package/dist/main-portal/components/ui/input-otp.js +60 -0
  175. package/dist/main-portal/components/ui/input.d.ts +3 -0
  176. package/dist/main-portal/components/ui/input.js +8 -0
  177. package/dist/main-portal/components/ui/item.d.ts +23 -0
  178. package/dist/main-portal/components/ui/item.js +77 -0
  179. package/dist/main-portal/components/ui/kbd.d.ts +3 -0
  180. package/dist/main-portal/components/ui/kbd.js +13 -0
  181. package/dist/main-portal/components/ui/label.d.ts +4 -0
  182. package/dist/main-portal/components/ui/label.js +44 -0
  183. package/dist/main-portal/components/ui/menubar.d.ts +26 -0
  184. package/dist/main-portal/components/ui/menubar.js +105 -0
  185. package/dist/main-portal/components/ui/navigation-menu.d.ts +14 -0
  186. package/dist/main-portal/components/ui/navigation-menu.js +75 -0
  187. package/dist/main-portal/components/ui/pagination.d.ts +13 -0
  188. package/dist/main-portal/components/ui/pagination.js +37 -0
  189. package/dist/main-portal/components/ui/popover.d.ts +7 -0
  190. package/dist/main-portal/components/ui/popover.js +56 -0
  191. package/dist/main-portal/components/ui/progress.d.ts +4 -0
  192. package/dist/main-portal/components/ui/progress.js +44 -0
  193. package/dist/main-portal/components/ui/radio-group.d.ts +5 -0
  194. package/dist/main-portal/components/ui/radio-group.js +49 -0
  195. package/dist/main-portal/components/ui/resizable.d.ts +8 -0
  196. package/dist/main-portal/components/ui/resizable.js +53 -0
  197. package/dist/main-portal/components/ui/scroll-area.d.ts +5 -0
  198. package/dist/main-portal/components/ui/scroll-area.js +50 -0
  199. package/dist/main-portal/components/ui/select.d.ts +15 -0
  200. package/dist/main-portal/components/ui/select.js +83 -0
  201. package/dist/main-portal/components/ui/separator.d.ts +4 -0
  202. package/dist/main-portal/components/ui/separator.js +44 -0
  203. package/dist/main-portal/components/ui/sheet.d.ts +13 -0
  204. package/dist/main-portal/components/ui/sheet.js +83 -0
  205. package/dist/main-portal/components/ui/sidebar.d.ts +69 -0
  206. package/dist/main-portal/components/ui/sidebar.js +258 -0
  207. package/dist/main-portal/components/ui/skeleton.d.ts +2 -0
  208. package/dist/main-portal/components/ui/skeleton.js +9 -0
  209. package/dist/main-portal/components/ui/slider.d.ts +4 -0
  210. package/dist/main-portal/components/ui/slider.js +50 -0
  211. package/dist/main-portal/components/ui/sonner.d.ts +3 -0
  212. package/dist/main-portal/components/ui/sonner.js +17 -0
  213. package/dist/main-portal/components/ui/spinner.d.ts +2 -0
  214. package/dist/main-portal/components/ui/spinner.js +10 -0
  215. package/dist/main-portal/components/ui/switch.d.ts +4 -0
  216. package/dist/main-portal/components/ui/switch.js +44 -0
  217. package/dist/main-portal/components/ui/table.d.ts +10 -0
  218. package/dist/main-portal/components/ui/table.js +38 -0
  219. package/dist/main-portal/components/ui/tabs.d.ts +7 -0
  220. package/dist/main-portal/components/ui/tabs.js +53 -0
  221. package/dist/main-portal/components/ui/terminal.d.ts +49 -0
  222. package/dist/main-portal/components/ui/terminal.js +56 -0
  223. package/dist/main-portal/components/ui/textarea.d.ts +3 -0
  224. package/dist/main-portal/components/ui/textarea.js +8 -0
  225. package/dist/main-portal/components/ui/time-remaining.d.ts +54 -0
  226. package/dist/main-portal/components/ui/time-remaining.js +223 -0
  227. package/dist/main-portal/components/ui/toast.d.ts +15 -0
  228. package/dist/main-portal/components/ui/toast.js +77 -0
  229. package/dist/main-portal/components/ui/toaster.d.ts +1 -0
  230. package/dist/main-portal/components/ui/toaster.js +14 -0
  231. package/dist/main-portal/components/ui/toggle-group.d.ts +7 -0
  232. package/dist/main-portal/components/ui/toggle-group.js +58 -0
  233. package/dist/main-portal/components/ui/toggle.d.ts +9 -0
  234. package/dist/main-portal/components/ui/toggle.js +64 -0
  235. package/dist/main-portal/components/ui/tooltip.d.ts +7 -0
  236. package/dist/main-portal/components/ui/tooltip.js +56 -0
  237. package/dist/main-portal/components/ui/use-mobile.d.ts +1 -0
  238. package/dist/main-portal/components/ui/use-mobile.js +53 -0
  239. package/dist/main-portal/components/voting/VotingPage.d.ts +1 -0
  240. package/dist/main-portal/components/voting/VotingPage.js +14 -0
  241. package/dist/main-portal/components/wallet/MCCHistory.d.ts +9 -0
  242. package/dist/main-portal/components/wallet/MCCHistory.js +100 -0
  243. package/dist/main-portal/components/wallet/WalletManagement.d.ts +5 -0
  244. package/dist/main-portal/components/wallet/WalletManagement.js +144 -0
  245. package/dist/main-portal/components/wallet/WalletPage.d.ts +1 -0
  246. package/dist/main-portal/components/wallet/WalletPage.js +130 -0
  247. package/dist/main-portal/config/menu-config.d.ts +22 -0
  248. package/dist/main-portal/config/menu-config.js +167 -0
  249. package/dist/main-portal/contexts/MCCPriceContext.d.ts +38 -0
  250. package/dist/main-portal/contexts/MCCPriceContext.js +70 -0
  251. package/dist/main-portal/contexts/WalletContext.d.ts +48 -0
  252. package/dist/main-portal/contexts/WalletContext.js +94 -0
  253. package/dist/main-portal/hooks/index.d.ts +4 -0
  254. package/dist/main-portal/hooks/index.js +11 -0
  255. package/dist/main-portal/hooks/use-breakpoint.d.ts +45 -0
  256. package/dist/main-portal/hooks/use-breakpoint.js +91 -0
  257. package/dist/main-portal/hooks/use-mobile.d.ts +1 -0
  258. package/dist/main-portal/hooks/use-mobile.js +55 -0
  259. package/dist/main-portal/hooks/use-toast.d.ts +44 -0
  260. package/dist/main-portal/hooks/use-toast.js +164 -0
  261. package/dist/main-portal/hooks/useAuth.d.ts +30 -0
  262. package/dist/main-portal/hooks/useAuth.js +135 -0
  263. package/dist/main-portal/hooks/useMCC.d.ts +26 -0
  264. package/dist/main-portal/hooks/useMCC.js +148 -0
  265. package/dist/main-portal/hooks/useMCD.d.ts +17 -0
  266. package/dist/main-portal/hooks/useMCD.js +114 -0
  267. package/dist/main-portal/hooks/useMarketData.d.ts +9 -0
  268. package/dist/main-portal/hooks/useMarketData.js +32 -0
  269. package/dist/main-portal/hooks/useMultiWalletBalance.d.ts +31 -0
  270. package/dist/main-portal/hooks/useMultiWalletBalance.js +65 -0
  271. package/dist/main-portal/hooks/usePriceHistory.d.ts +9 -0
  272. package/dist/main-portal/hooks/usePriceHistory.js +36 -0
  273. package/dist/main-portal/hooks/useSolanaBalance.d.ts +21 -0
  274. package/dist/main-portal/hooks/useSolanaBalance.js +58 -0
  275. package/dist/main-portal/hooks/useSpeechRecognition.d.ts +6 -0
  276. package/dist/main-portal/hooks/useSpeechRecognition.js +82 -0
  277. package/dist/main-portal/hooks/useStats.d.ts +131 -0
  278. package/dist/main-portal/hooks/useStats.js +161 -0
  279. package/dist/main-portal/hooks/useStrategies.d.ts +134 -0
  280. package/dist/main-portal/hooks/useStrategies.js +28 -0
  281. package/dist/main-portal/hooks/useUserRank.d.ts +16 -0
  282. package/dist/main-portal/hooks/useUserRank.js +61 -0
  283. package/dist/main-portal/hooks/useWalletTokenBalances.d.ts +29 -0
  284. package/dist/main-portal/hooks/useWalletTokenBalances.js +106 -0
  285. package/dist/main-portal/i18n/navigation.d.ts +341 -0
  286. package/dist/main-portal/i18n/navigation.js +7 -0
  287. package/dist/main-portal/i18n/request.d.ts +2 -0
  288. package/dist/main-portal/i18n/request.js +47 -0
  289. package/dist/main-portal/i18n/routing.d.ts +18 -0
  290. package/dist/main-portal/i18n/routing.js +10 -0
  291. package/dist/main-portal/lib/ai-chat-config.d.ts +8 -0
  292. package/dist/main-portal/lib/ai-chat-config.js +144 -0
  293. package/dist/main-portal/lib/analytics/hooks.d.ts +139 -0
  294. package/dist/main-portal/lib/analytics/hooks.js +277 -0
  295. package/dist/main-portal/lib/analytics/index.d.ts +2 -0
  296. package/dist/main-portal/lib/analytics/index.js +19 -0
  297. package/dist/main-portal/lib/analytics/types.d.ts +611 -0
  298. package/dist/main-portal/lib/analytics/types.js +2 -0
  299. package/dist/main-portal/lib/api/account.d.ts +39 -0
  300. package/dist/main-portal/lib/api/account.js +86 -0
  301. package/dist/main-portal/lib/api/admin.d.ts +78 -0
  302. package/dist/main-portal/lib/api/admin.js +195 -0
  303. package/dist/main-portal/lib/api/analytics.d.ts +217 -0
  304. package/dist/main-portal/lib/api/analytics.js +55 -0
  305. package/dist/main-portal/lib/api/blockchain.d.ts +178 -0
  306. package/dist/main-portal/lib/api/blockchain.js +302 -0
  307. package/dist/main-portal/lib/api/core.d.ts +3 -0
  308. package/dist/main-portal/lib/api/core.js +47 -0
  309. package/dist/main-portal/lib/api/dexscreener.d.ts +126 -0
  310. package/dist/main-portal/lib/api/dexscreener.js +139 -0
  311. package/dist/main-portal/lib/api/geckoterminal.d.ts +10 -0
  312. package/dist/main-portal/lib/api/geckoterminal.js +43 -0
  313. package/dist/main-portal/lib/api/index.d.ts +16 -0
  314. package/dist/main-portal/lib/api/index.js +230 -0
  315. package/dist/main-portal/lib/api/mcc-holders.d.ts +130 -0
  316. package/dist/main-portal/lib/api/mcc-holders.js +47 -0
  317. package/dist/main-portal/lib/api/org-service-proxy.d.ts +7 -0
  318. package/dist/main-portal/lib/api/org-service-proxy.js +55 -0
  319. package/dist/main-portal/lib/api/services/ai.d.ts +139 -0
  320. package/dist/main-portal/lib/api/services/ai.js +214 -0
  321. package/dist/main-portal/lib/api/services/finance.d.ts +37 -0
  322. package/dist/main-portal/lib/api/services/finance.js +144 -0
  323. package/dist/main-portal/lib/api/services/index.d.ts +5 -0
  324. package/dist/main-portal/lib/api/services/index.js +21 -0
  325. package/dist/main-portal/lib/api/services/mining.d.ts +68 -0
  326. package/dist/main-portal/lib/api/services/mining.js +76 -0
  327. package/dist/main-portal/lib/api/services/organization.d.ts +161 -0
  328. package/dist/main-portal/lib/api/services/organization.js +139 -0
  329. package/dist/main-portal/lib/api/services/user.d.ts +90 -0
  330. package/dist/main-portal/lib/api/services/user.js +78 -0
  331. package/dist/main-portal/lib/api/services.d.ts +1 -0
  332. package/dist/main-portal/lib/api/services.js +17 -0
  333. package/dist/main-portal/lib/api/strategies.d.ts +101 -0
  334. package/dist/main-portal/lib/api/strategies.js +87 -0
  335. package/dist/main-portal/lib/api-service.d.ts +1 -0
  336. package/dist/main-portal/lib/api-service.js +18 -0
  337. package/dist/main-portal/lib/auth-service.d.ts +65 -0
  338. package/dist/main-portal/lib/auth-service.js +382 -0
  339. package/dist/main-portal/lib/config/mainstream-tokens.d.ts +13 -0
  340. package/dist/main-portal/lib/config/mainstream-tokens.js +88 -0
  341. package/dist/main-portal/lib/docs-data.d.ts +36 -0
  342. package/dist/main-portal/lib/docs-data.js +108 -0
  343. package/dist/main-portal/lib/exchanges/config.d.ts +34 -0
  344. package/dist/main-portal/lib/exchanges/config.js +185 -0
  345. package/dist/main-portal/lib/exchanges/hooks/index.d.ts +5 -0
  346. package/dist/main-portal/lib/exchanges/hooks/index.js +10 -0
  347. package/dist/main-portal/lib/exchanges/hooks/useBinanceData.d.ts +15 -0
  348. package/dist/main-portal/lib/exchanges/hooks/useBinanceData.js +216 -0
  349. package/dist/main-portal/lib/exchanges/hooks/useBinanceDialogs.d.ts +32 -0
  350. package/dist/main-portal/lib/exchanges/hooks/useBinanceDialogs.js +395 -0
  351. package/dist/main-portal/lib/exchanges/hooks/useUserExchanges.d.ts +15 -0
  352. package/dist/main-portal/lib/exchanges/hooks/useUserExchanges.js +51 -0
  353. package/dist/main-portal/lib/exchanges/index.d.ts +4 -0
  354. package/dist/main-portal/lib/exchanges/index.js +21 -0
  355. package/dist/main-portal/lib/exchanges/types.d.ts +102 -0
  356. package/dist/main-portal/lib/exchanges/types.js +2 -0
  357. package/dist/main-portal/lib/exchanges/utils.d.ts +1 -0
  358. package/dist/main-portal/lib/exchanges/utils.js +10 -0
  359. package/dist/main-portal/lib/gcp-secrets.d.ts +7 -0
  360. package/dist/main-portal/lib/gcp-secrets.js +45 -0
  361. package/dist/main-portal/lib/mockWallet.d.ts +130 -0
  362. package/dist/main-portal/lib/mockWallet.js +284 -0
  363. package/dist/main-portal/lib/oauth-config.d.ts +12 -0
  364. package/dist/main-portal/lib/oauth-config.js +48 -0
  365. package/dist/main-portal/lib/order-id-generator.d.ts +19 -0
  366. package/dist/main-portal/lib/order-id-generator.js +97 -0
  367. package/dist/main-portal/lib/solana/reincarnation-client.d.ts +28 -0
  368. package/dist/main-portal/lib/solana/reincarnation-client.js +39 -0
  369. package/dist/main-portal/lib/solana/solana-pay.d.ts +31 -0
  370. package/dist/main-portal/lib/solana/solana-pay.js +85 -0
  371. package/dist/main-portal/lib/strategy/defaults.d.ts +2 -0
  372. package/dist/main-portal/lib/strategy/defaults.js +58 -0
  373. package/dist/main-portal/lib/strategy/index.d.ts +3 -0
  374. package/dist/main-portal/lib/strategy/index.js +20 -0
  375. package/dist/main-portal/lib/strategy/tooltips.d.ts +1 -0
  376. package/dist/main-portal/lib/strategy/tooltips.js +50 -0
  377. package/dist/main-portal/lib/strategy/types.d.ts +74 -0
  378. package/dist/main-portal/lib/strategy/types.js +2 -0
  379. package/dist/main-portal/lib/types/ai.types.d.ts +111 -0
  380. package/dist/main-portal/lib/types/ai.types.js +2 -0
  381. package/dist/main-portal/lib/types/api.d.ts +5 -0
  382. package/dist/main-portal/lib/types/api.js +21 -0
  383. package/dist/main-portal/lib/types/common.types.d.ts +168 -0
  384. package/dist/main-portal/lib/types/common.types.js +24 -0
  385. package/dist/main-portal/lib/types/finance.types.d.ts +267 -0
  386. package/dist/main-portal/lib/types/finance.types.js +2 -0
  387. package/dist/main-portal/lib/types/protocol.types.d.ts +216 -0
  388. package/dist/main-portal/lib/types/protocol.types.js +2 -0
  389. package/dist/main-portal/lib/types/user.types.d.ts +243 -0
  390. package/dist/main-portal/lib/types/user.types.js +12 -0
  391. package/dist/main-portal/lib/utils/territoryId.d.ts +75 -0
  392. package/dist/main-portal/lib/utils/territoryId.js +241 -0
  393. package/dist/main-portal/lib/utils.d.ts +4 -0
  394. package/dist/main-portal/lib/utils.js +24 -0
  395. package/dist/main-portal/lib/wallet-auth/api.d.ts +13 -0
  396. package/dist/main-portal/lib/wallet-auth/api.js +132 -0
  397. package/dist/main-portal/lib/wallet-auth/types.d.ts +87 -0
  398. package/dist/main-portal/lib/wallet-auth/types.js +58 -0
  399. package/package.json +55 -5
@@ -107,12 +107,10 @@ function MicrocosmMCDPage({ basePath = '', onNavigate }) {
107
107
  const [showHelp, setShowHelp] = (0, react_1.useState)(false);
108
108
  const [walletsExpanded, setWalletsExpanded] = (0, react_1.useState)(false);
109
109
  const [refreshing, setRefreshing] = (0, react_1.useState)(false);
110
- const mcdAmount = parseFloat(mcdData?.available_balance ?? '0');
111
- const mcdReceived = parseFloat(mcdData?.total_balance ?? '0');
112
- const mcdSpent = parseFloat(mcdData?.frozen_balance ?? '0');
113
110
  const rewardsList = Array.isArray(rewards) ? rewards : [];
114
111
  const txList = Array.isArray(transactions) ? transactions : [];
115
112
  const walletList = Array.isArray(wallets) ? wallets : [];
113
+ const totalOnChainMCD = walletList.reduce((sum, w) => sum + (Number(w.mcd_balance) || 0), 0);
116
114
  const resolvePath = (p) => basePath ? `${basePath.replace(/\/$/, '')}${p}` : p;
117
115
  const handleRefresh = async () => {
118
116
  setRefreshing(true);
@@ -133,9 +131,9 @@ function MicrocosmMCDPage({ basePath = '', onNavigate }) {
133
131
  if (!mcdData && !mcdLoading) {
134
132
  return ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center h-[60vh]", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-8 text-center", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-12 h-12 mx-auto mb-4 text-neutral-500" }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400", children: t('loginRequired', 'Please log in to view your MCD balance') })] }) }));
135
133
  }
136
- return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 xs:px-4 xs:space-y-4 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between flex-wrap gap-1.5 2xs:gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider", children: t('title', 'MCD Credits') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: t('subtitle', 'Microcosm Dollar - Ecosystem consumption credits') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => handleNav('/mcc/wallet'), className: "flex items-center px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), (0, jsx_runtime_1.jsx)("span", { className: "hidden 2xs:inline", children: t('manageWallet', 'Manage Wallet') }), (0, jsx_runtime_1.jsx)("span", { className: "2xs:hidden", children: t('manageWallet', 'Wallet') })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowHelp(!showHelp), className: "flex items-center px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconHelpCircle, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), (0, jsx_runtime_1.jsx)("span", { className: "hidden 2xs:inline", children: t('helpGuide', 'Help Guide') }), (0, jsx_runtime_1.jsx)("span", { className: "2xs:hidden", children: t('helpGuide', 'Help') })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleRefresh, disabled: refreshing, className: "flex items-center px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors disabled:opacity-50 whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconRefresh, { className: `w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2 ${refreshing ? 'animate-spin' : ''}` }), t('refresh', 'Refresh')] })] })] }), showHelp && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-2 2xs:p-3 sm:p-4 md:p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold tracking-wider mb-2 2xs:mb-3 sm:mb-4 text-xs 2xs:text-sm sm:text-base", children: t('mcdGuideTitle', 'MCD Credits Guide') }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2 2xs:space-y-3 sm:space-y-4 text-[10px] 2xs:text-xs sm:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-2 2xs:p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-medium text-white mb-1.5 2xs:mb-2 flex items-center gap-1.5 2xs:gap-2 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white shrink-0" }), t('howToGetMcd', 'How to Earn MCD')] }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Daily distribution from territory vault (1% of vault balance)" }), (0, jsx_runtime_1.jsx)("li", { children: "Companion yield from mining operations" }), (0, jsx_runtime_1.jsx)("li", { children: "Ecosystem service rewards" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-2 2xs:p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-medium text-white mb-1.5 2xs:mb-2 flex items-center gap-1.5 2xs:gap-2 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsx)(IconCoins, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white shrink-0" }), t('mcdUsage', 'MCD Usage')] }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Spend on ecosystem services (Double Helix, xSocial, etc.)" }), (0, jsx_runtime_1.jsx)("li", { children: "Transfer between users" }), (0, jsx_runtime_1.jsx)("li", { children: "Future governance participation" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-2 2xs:p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-medium text-white mb-1.5 2xs:mb-2 flex items-center gap-1.5 2xs:gap-2 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsx)(IconHistory, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white shrink-0" }), t('notes', 'Notes')] }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "MCD is an internal ecosystem token, not tradeable on exchanges" }), (0, jsx_runtime_1.jsx)("li", { children: "Daily distribution happens automatically at 00:15 UTC" }), (0, jsx_runtime_1.jsx)("li", { children: "Check your territory page for vault balance details" })] })] })] })] })), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-2 2xs:p-3 sm:p-4 md:p-6 hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-3 gap-2 2xs:gap-3 sm:gap-4 md:gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-[9px] 2xs:text-[10px] sm:text-xs font-mono tracking-wider mb-1 truncate", children: "available_balance" }), mcdLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2 h-8 2xs:h-10", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl md:text-4xl font-bold font-mono text-cyan-400 truncate", children: fmt(mcdAmount) })), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-[9px] 2xs:text-[10px] sm:text-xs font-mono tracking-wider mb-1 truncate", children: "total_received" }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold font-mono text-white truncate", children: fmt(mcdReceived, 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1", children: "lifetime income" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-400 text-[9px] 2xs:text-[10px] sm:text-xs font-mono tracking-wider mb-1 truncate", children: "total_spent" }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold font-mono text-neutral-400 truncate", children: fmt(mcdSpent, 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1", children: "lifetime spent" })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-2 2xs:p-3 sm:p-4 md:p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 mb-2 2xs:mb-3 sm:mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconCoins, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-white shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm text-neutral-400 tracking-wider truncate", children: t('onChainBalance', 'On-chain MCD Balance') })] }), walletList.length > 1 && ((0, jsx_runtime_1.jsxs)("button", { onClick: () => setWalletsExpanded(!walletsExpanded), className: "flex items-center text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 hover:text-cyan-400 transition-colors whitespace-nowrap shrink-0", children: [walletList.length, " ", t('walletsCount', 'wallets'), walletsExpanded
134
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 xs:px-4 xs:space-y-4 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between flex-wrap gap-1.5 2xs:gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-lg sm:text-xl font-bold text-white tracking-wider", children: t('title', 'MCD Credits') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: t('subtitle', 'Microcosm Dollar - Ecosystem consumption credits') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => handleNav('/mcc/wallet'), className: "flex items-center px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), (0, jsx_runtime_1.jsx)("span", { className: "hidden 2xs:inline", children: t('manageWallet', 'Manage Wallet') }), (0, jsx_runtime_1.jsx)("span", { className: "2xs:hidden", children: t('manageWallet', 'Wallet') })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowHelp(!showHelp), className: "flex items-center px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconHelpCircle, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), (0, jsx_runtime_1.jsx)("span", { className: "hidden 2xs:inline", children: t('helpGuide', 'Help Guide') }), (0, jsx_runtime_1.jsx)("span", { className: "2xs:hidden", children: t('helpGuide', 'Help') })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleRefresh, disabled: refreshing, className: "flex items-center px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors disabled:opacity-50 whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconRefresh, { className: `w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2 ${refreshing ? 'animate-spin' : ''}` }), t('refresh', 'Refresh')] })] })] }), showHelp && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-2 2xs:p-3 sm:p-4 md:p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold tracking-wider mb-2 2xs:mb-3 sm:mb-4 text-xs 2xs:text-sm sm:text-base", children: t('mcdGuideTitle', 'MCD Credits Guide') }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2 2xs:space-y-3 sm:space-y-4 text-[10px] 2xs:text-xs sm:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-2 2xs:p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-medium text-white mb-1.5 2xs:mb-2 flex items-center gap-1.5 2xs:gap-2 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white shrink-0" }), t('howToGetMcd', 'How to Earn MCD')] }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Daily distribution from territory vault (1% of vault balance)" }), (0, jsx_runtime_1.jsx)("li", { children: "Companion yield from mining operations" }), (0, jsx_runtime_1.jsx)("li", { children: "Ecosystem service rewards" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-2 2xs:p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-medium text-white mb-1.5 2xs:mb-2 flex items-center gap-1.5 2xs:gap-2 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsx)(IconCoins, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white shrink-0" }), t('mcdUsage', 'MCD Usage')] }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "Spend on ecosystem services (Double Helix, xSocial, etc.)" }), (0, jsx_runtime_1.jsx)("li", { children: "Transfer between users" }), (0, jsx_runtime_1.jsx)("li", { children: "Future governance participation" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-2 2xs:p-3", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-medium text-white mb-1.5 2xs:mb-2 flex items-center gap-1.5 2xs:gap-2 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsx)(IconHistory, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white shrink-0" }), t('notes', 'Notes')] }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside text-neutral-400 space-y-1", children: [(0, jsx_runtime_1.jsx)("li", { children: "MCD is an internal ecosystem token, not tradeable on exchanges" }), (0, jsx_runtime_1.jsx)("li", { children: "Daily distribution happens automatically at 00:15 UTC" }), (0, jsx_runtime_1.jsx)("li", { children: "Check your territory page for vault balance details" })] })] })] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg p-2 2xs:p-3 sm:p-4 md:p-6 hover:border-cyan-400/50 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 mb-2 2xs:mb-3 sm:mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconCoins, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-white shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm text-neutral-400 tracking-wider truncate", children: t('onChainBalance', 'On-chain MCD Balance') })] }), walletList.length > 1 && ((0, jsx_runtime_1.jsxs)("button", { onClick: () => setWalletsExpanded(!walletsExpanded), className: "flex items-center text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 hover:text-cyan-400 transition-colors whitespace-nowrap shrink-0", children: [walletList.length, " ", t('walletsCount', 'wallets'), walletsExpanded
137
135
  ? (0, jsx_runtime_1.jsx)(IconChevronUp, { className: "w-3 h-3 2xs:w-4 2xs:h-4 ml-1" })
138
- : (0, jsx_runtime_1.jsx)(IconChevronDown, { className: "w-3 h-3 2xs:w-4 2xs:h-4 ml-1" })] }))] }), walletsLoading ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(Spinner, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500 text-[10px] 2xs:text-xs sm:text-sm", children: t('loadingOnChain', 'Loading on-chain balance...') })] })) : walletList.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-3 2xs:py-4", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-neutral-500 mb-2 2xs:mb-3 text-[10px] 2xs:text-xs sm:text-sm", children: t('noWalletBound', 'No Solana wallet bound yet') }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleNav('/mcc/wallet'), className: "flex items-center mx-auto px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), t('connectWallet', 'Connect Wallet')] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [walletList.length === 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-2 text-[10px] 2xs:text-xs text-neutral-500 font-mono flex items-center gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("span", { className: "truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [walletList[0].wallet_address.slice(0, 4), "...", walletList[0].wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [walletList[0].wallet_address.slice(0, 6), "...", walletList[0].wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [walletList[0].wallet_address.slice(0, 8), "...", walletList[0].wallet_address.slice(-8)] })] }), walletList[0].is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "inline-block text-[9px] 2xs:text-[10px] border border-cyan-400/30 text-cyan-400 px-1 2xs:px-1.5 py-0 rounded", children: t('primaryWallet', 'Primary') }))] })), walletsExpanded && walletList.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 space-y-1.5 2xs:space-y-2 border-t border-neutral-700 pt-3 2xs:pt-4", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-1.5 2xs:p-2 bg-neutral-800 rounded hover:bg-neutral-700 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-[10px] 2xs:text-xs font-mono text-neutral-400 truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [w.wallet_address.slice(0, 6), "...", w.wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [w.wallet_address.slice(0, 8), "...", w.wallet_address.slice(-8)] })] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "inline-block text-[9px] 2xs:text-[10px] border border-cyan-400/30 text-cyan-400 px-1 2xs:px-1.5 py-0 rounded shrink-0", children: t('primaryWallet', 'Primary') }))] }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm font-mono text-white shrink-0", children: "MCD" })] }, w.wallet_address))) }))] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-white shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm font-medium text-neutral-300 tracking-wider", children: t('mcdMinting', 'MCD Minting') })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-[10px] 2xs:text-xs sm:text-sm mb-2 2xs:mb-3 sm:mb-4", children: t('mintMccWithMcd', 'Consume MCD to mint MCC Token') }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleNav('/mcc/mining'), className: "w-full flex items-center justify-center gap-1.5 2xs:gap-2 h-9 2xs:h-10 rounded-md bg-cyan-700 hover:bg-cyan-600 transition-all text-white text-xs 2xs:text-sm font-medium cursor-pointer whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconCoins, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4" }), t('useMcdToMintMcc', 'Mint MCC with MCD')] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 2xs:mt-3 p-2 2xs:p-3 bg-neutral-800 rounded", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-cyan-400/70", children: [(0, jsx_runtime_1.jsx)(IconAlertTriangle, { className: "w-3 h-3 2xs:w-3.5 2xs:h-3.5 mt-0.5 shrink-0 text-cyan-400" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-1", children: [(0, jsx_runtime_1.jsx)("p", { children: "MCD mining requires Miner level or above" }), (0, jsx_runtime_1.jsx)("p", { children: "Mining price = Oracle price x 2, MCD companion yield included" })] })] }) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-white shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm font-medium text-neutral-300 tracking-wider", children: t('ecoServices', 'Ecosystem Services') })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-[10px] 2xs:text-xs sm:text-sm mb-2 2xs:mb-3 sm:mb-4", children: t('ecoServicesDesc', 'Use MCD to access ecosystem project services') }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 sm:grid-cols-2 md:grid-cols-3 gap-1.5 2xs:gap-2 sm:gap-3 md:gap-4", children: ECOSYSTEM_SERVICES.map((p) => ((0, jsx_runtime_1.jsxs)("a", { href: p.url, target: "_blank", rel: "noopener noreferrer", className: "block p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded-lg hover:bg-neutral-700 transition-colors group", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 2xs:gap-3 mb-2 2xs:mb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-7 h-7 2xs:w-8 2xs:h-8 sm:w-10 sm:h-10 rounded-lg bg-cyan-400/20 flex items-center justify-center shrink-0", children: (0, jsx_runtime_1.jsx)(p.Icon, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-medium text-white text-xs 2xs:text-sm truncate", children: p.name }), (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3 h-3 text-neutral-600 opacity-0 group-hover:opacity-100 transition-opacity shrink-0" })] }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs text-neutral-500 truncate block", children: p.tagline })] }), (0, jsx_runtime_1.jsx)("span", { className: `text-[9px] 2xs:text-[10px] ${p.statusColor} shrink-0`, children: p.status })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs text-neutral-400 leading-relaxed", children: p.desc })] }, p.name))) })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded-lg p-1 inline-flex flex-wrap", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab('daily'), className: `flex items-center px-2 2xs:px-3 sm:px-4 py-1.5 2xs:py-2 text-[10px] 2xs:text-xs sm:text-sm rounded-md transition-colors whitespace-nowrap ${activeTab === 'daily'
136
+ : (0, jsx_runtime_1.jsx)(IconChevronDown, { className: "w-3 h-3 2xs:w-4 2xs:h-4 ml-1" })] }))] }), walletsLoading ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(Spinner, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500 text-[10px] 2xs:text-xs sm:text-sm", children: t('loadingOnChain', 'Loading on-chain balance...') })] })) : walletList.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-3 2xs:py-4", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-neutral-500 mb-2 2xs:mb-3 text-[10px] 2xs:text-xs sm:text-sm", children: t('noWalletBound', 'No Solana wallet bound yet') }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleNav('/mcc/wallet'), className: "flex items-center mx-auto px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), t('connectWallet', 'Connect Wallet')] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xl 2xs:text-2xl xs:text-2xl sm:text-3xl font-bold text-white font-mono mb-1 truncate", children: [fmt(totalOnChainMCD), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm sm:text-base text-neutral-400 ml-2", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-neutral-500", children: [walletList.length, " ", t('walletsCount', 'wallets')] }), walletList.length === 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-2 text-[10px] 2xs:text-xs text-neutral-500 font-mono flex items-center gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("span", { className: "truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [walletList[0].wallet_address.slice(0, 4), "...", walletList[0].wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [walletList[0].wallet_address.slice(0, 6), "...", walletList[0].wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [walletList[0].wallet_address.slice(0, 8), "...", walletList[0].wallet_address.slice(-8)] })] }), walletList[0].is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "inline-block text-[9px] 2xs:text-[10px] border border-cyan-400/30 text-cyan-400 px-1 2xs:px-1.5 py-0 rounded", children: t('primaryWallet', 'Primary') }))] })), walletsExpanded && walletList.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 space-y-1.5 2xs:space-y-2 border-t border-neutral-700 pt-3 2xs:pt-4", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-1.5 2xs:p-2 bg-neutral-800 rounded hover:bg-neutral-700 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-[10px] 2xs:text-xs font-mono text-neutral-400 truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [w.wallet_address.slice(0, 6), "...", w.wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [w.wallet_address.slice(0, 8), "...", w.wallet_address.slice(-8)] })] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "inline-block text-[9px] 2xs:text-[10px] border border-cyan-400/30 text-cyan-400 px-1 2xs:px-1.5 py-0 rounded shrink-0", children: t('primaryWallet', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-xs 2xs:text-sm font-mono text-white shrink-0", children: [fmt(Number(w.mcd_balance) || 0), " MCD"] })] }, w.wallet_address))) }))] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-white shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm font-medium text-neutral-300 tracking-wider", children: t('mcdMinting', 'MCD Minting') })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-[10px] 2xs:text-xs sm:text-sm mb-2 2xs:mb-3 sm:mb-4", children: t('mintMccWithMcd', 'Consume MCD to mint MCC Token') }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleNav('/mcc/mining'), className: "w-full flex items-center justify-center gap-1.5 2xs:gap-2 h-9 2xs:h-10 rounded-md bg-cyan-700 hover:bg-cyan-600 transition-all text-white text-xs 2xs:text-sm font-medium cursor-pointer whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconCoins, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4" }), t('useMcdToMintMcc', 'Mint MCC with MCD')] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 2xs:mt-3 p-2 2xs:p-3 bg-neutral-800 rounded", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-cyan-400/70", children: [(0, jsx_runtime_1.jsx)(IconAlertTriangle, { className: "w-3 h-3 2xs:w-3.5 2xs:h-3.5 mt-0.5 shrink-0 text-cyan-400" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-1", children: [(0, jsx_runtime_1.jsx)("p", { children: t('whitelistNote1', 'MCD mining is open to all registered miners') }), (0, jsx_runtime_1.jsx)("p", { children: t('whitelistNote2', 'Mining price = base price x 4, MCD companion yield included') })] })] }) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-white shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm font-medium text-neutral-300 tracking-wider", children: t('ecoServices', 'Ecosystem Services') })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 text-[10px] 2xs:text-xs sm:text-sm mb-2 2xs:mb-3 sm:mb-4", children: t('ecoServicesDesc', 'Use MCD to access ecosystem project services') }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 sm:grid-cols-2 md:grid-cols-3 gap-1.5 2xs:gap-2 sm:gap-3 md:gap-4", children: ECOSYSTEM_SERVICES.map((p) => ((0, jsx_runtime_1.jsxs)("a", { href: p.url, target: "_blank", rel: "noopener noreferrer", className: "block p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded-lg hover:bg-neutral-700 transition-colors group", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 2xs:gap-3 mb-2 2xs:mb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-7 h-7 2xs:w-8 2xs:h-8 sm:w-10 sm:h-10 rounded-lg bg-cyan-400/20 flex items-center justify-center shrink-0", children: (0, jsx_runtime_1.jsx)(p.Icon, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "font-medium text-white text-xs 2xs:text-sm truncate", children: p.name }), (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3 h-3 text-neutral-600 opacity-0 group-hover:opacity-100 transition-opacity shrink-0" })] }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs text-neutral-500 truncate block", children: p.tagline })] }), (0, jsx_runtime_1.jsx)("span", { className: `text-[9px] 2xs:text-[10px] ${p.statusColor} shrink-0`, children: p.status })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs text-neutral-400 leading-relaxed", children: p.desc })] }, p.name))) })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded-lg p-1 inline-flex flex-wrap", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab('daily'), className: `flex items-center px-2 2xs:px-3 sm:px-4 py-1.5 2xs:py-2 text-[10px] 2xs:text-xs sm:text-sm rounded-md transition-colors whitespace-nowrap ${activeTab === 'daily'
139
137
  ? 'bg-neutral-700 text-white'
140
138
  : 'text-neutral-400 hover:text-neutral-300'}`, children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3 h-3 2xs:w-4 2xs:h-4 mr-1 2xs:mr-2" }), t('dailyDistribution', 'Daily Distribution')] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab('history'), className: `flex items-center px-2 2xs:px-3 sm:px-4 py-1.5 2xs:py-2 text-[10px] 2xs:text-xs sm:text-sm rounded-md transition-colors whitespace-nowrap ${activeTab === 'history'
141
139
  ? 'bg-neutral-700 text-white'
@@ -208,5 +208,5 @@ function MicrocosmWalletPage({ basePath = '', onNavigate }) {
208
208
  ? 'bg-cyan-700 text-white'
209
209
  : 'bg-neutral-800 text-neutral-400 hover:text-white hover:bg-neutral-700'}`, children: [t('overview', 'Overview'), " (", walletList.length, " ", t('wallets', 'wallets'), ")"] }), walletList.map((w) => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab(w.wallet_address), className: `px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs rounded whitespace-nowrap transition-colors flex items-center gap-1 ${activeTab === w.wallet_address
210
210
  ? 'bg-cyan-700 text-white'
211
- : 'bg-neutral-800 text-neutral-400 hover:text-white hover:bg-neutral-700'}`, children: [(0, jsx_runtime_1.jsxs)("code", { className: "font-mono", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), w.is_primary && (0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 text-[9px] 2xs:text-[10px]", children: t('primary', 'Primary') })] }, w.wallet_address)))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('onChainAssets', 'On-Chain Assets') }), multiLoading && (0, jsx_runtime_1.jsx)(Spinner, { size: "w-3 h-3" })] }), multiLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "py-10", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [(0, jsx_runtime_1.jsx)(Spinner, { size: "w-6 h-6" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400", children: t('syncingOnChainData', 'Syncing on-chain data...') }), (0, jsx_runtime_1.jsx)("div", { className: "w-48 h-1 bg-neutral-800 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-cyan-400/60 rounded-full animate-pulse", style: { width: '60%' } }) })] }) })) : ((0, jsx_runtime_1.jsx)(AssetList, { holdings: activeHoldings, hideBalance: hideBalance, showWalletColumn: showWalletCol, isLoading: multiLoading })), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: isAllTab ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('allWalletsNote', 'Aggregated on-chain balances across {count} wallets. Low-value assets (<$1) are hidden.', { count: walletList.length }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline", children: [t('currentWallet', 'Current wallet'), ":"] }), (0, jsx_runtime_1.jsx)("code", { className: "text-neutral-400 bg-neutral-800 px-1.5 py-0.5 rounded font-mono truncate min-w-0 max-w-[140px] 2xs:max-w-[180px] sm:max-w-none", children: activeTab }), walletList.find((w) => w.wallet_address === activeTab)?.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 bg-cyan-400/20 px-1.5 py-0.5 rounded text-[9px] 2xs:text-[10px] shrink-0", children: t('primary', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${activeTab}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 text-[10px] 2xs:text-xs flex items-center gap-1 whitespace-nowrap", children: [t('viewOnSolscan', 'View on Solscan'), " ", (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3 h-3" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('singleWalletNote', 'Showing on-chain balances for this wallet only. Low-value assets (<$1) are hidden.') })] })] })) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-3 2xs:p-4 sm:p-5 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-3 mb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-2 2xs:p-3 bg-cyan-400/20 rounded-xl border border-cyan-400/30 shrink-0", children: (0, jsx_runtime_1.jsx)(IconWallet, { className: "w-5 h-5 2xs:w-6 2xs:h-6 sm:w-8 sm:h-8 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 tracking-wider mb-1", children: t('mccBalance', 'MCC Balance') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl 2xs:text-2xl xs:text-3xl sm:text-4xl md:text-5xl font-bold text-white font-mono truncate", children: mccLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mccBalance)) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-500 mt-1 truncate", children: [mccLoading ? '' : mask(`${fmtUSD(totalUsd)}`), !mccLoading && price > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "ml-2 text-[10px] 2xs:text-xs text-neutral-600", children: ["@ ", fmtUSD(price), "/MCC"] }))] })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => onNavigate?.(resolvePath('/mcc/mining')), className: "w-full flex items-center justify-center gap-2 px-4 py-2 sm:py-2.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs 2xs:text-sm transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconExternalLink, { className: "h-4 w-4" }), t('mintRecords', 'Mining Records')] }), walletList.length > 1 && mccData?.wallets && mccData.wallets.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 space-y-1.5 2xs:space-y-2", children: mccData.wallets.map((wb) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 font-mono truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [wb.wallet_address.slice(0, 4), "...", wb.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [wb.wallet_address.slice(0, 6), "...", wb.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [wb.wallet_address.slice(0, 8), "...", wb.wallet_address.slice(-8)] })] }), wb.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-[9px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 px-1 2xs:px-1.5 py-0.5 rounded shrink-0", children: "PRIMARY" }))] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-mono font-bold whitespace-nowrap shrink-0", children: [mask(fmt(wb.balance ?? 0, 3)), " MCC"] })] }, wb.wallet_address))) }))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('mcdPoints', 'MCD Points') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('currentBalance', 'Current Balance') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-cyan-400 font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdAmount, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-neutral-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('totalReceived', 'Total Received') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-white font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdTotalReceived, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3 h-3 mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [t('income', 'Income'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: mask(fmt(mcdTotalReceived, 0)) }), ' · ', t('spent', 'Spent'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: mask(fmt(mcdSpent, 0)) }), ' · ', t('mcdDistributionNote', 'MCD is distributed daily to eligible miners.')] })] }) })] }) }), activeLocks.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconLock, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('lockPeriod14Days', 'Lock Period (14 days)') })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-1 gap-1.5 2xs:gap-2 sm:gap-3", children: activeLocks.map((lock) => ((0, jsx_runtime_1.jsx)(LockPeriodCard, { lock: lock, hideBalance: hideBalance }, lock.lock_id))) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 2xs:mt-3 text-[10px] 2xs:text-xs text-neutral-500 font-mono", children: [t('totalLocked', 'Total locked'), ": ", mask(fmt(lockedAmount, 2)), " MCC"] })] }) })), walletList.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('connectedWallets', 'Connected Wallets') })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-1.5 2xs:space-y-2", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsxs)("code", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 font-mono truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline xs:hidden", children: [w.wallet_address.slice(0, 6), "...", w.wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden xs:inline sm:hidden", children: [w.wallet_address.slice(0, 8), "...", w.wallet_address.slice(-8)] }), (0, jsx_runtime_1.jsx)("span", { className: "hidden sm:inline", children: w.wallet_address })] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 border border-cyan-400/30 px-1 2xs:px-1.5 py-0.5 rounded font-mono shrink-0", children: "PRIMARY" }))] }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 transition-colors shrink-0", children: (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4" }) })] }, w.wallet_address))) })] }) }))] }));
211
+ : 'bg-neutral-800 text-neutral-400 hover:text-white hover:bg-neutral-700'}`, children: [(0, jsx_runtime_1.jsxs)("code", { className: "font-mono", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), w.is_primary && (0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 text-[9px] 2xs:text-[10px]", children: t('primary', 'Primary') })] }, w.wallet_address)))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('onChainAssets', 'On-Chain Assets') }), multiLoading && (0, jsx_runtime_1.jsx)(Spinner, { size: "w-3 h-3" })] }), multiLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "py-10", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [(0, jsx_runtime_1.jsx)(Spinner, { size: "w-6 h-6" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400", children: t('syncingOnChainData', 'Syncing on-chain data...') }), (0, jsx_runtime_1.jsx)("div", { className: "w-48 h-1 bg-neutral-800 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-cyan-400/60 rounded-full animate-pulse", style: { width: '60%' } }) })] }) })) : ((0, jsx_runtime_1.jsx)(AssetList, { holdings: activeHoldings, hideBalance: hideBalance, showWalletColumn: showWalletCol, isLoading: multiLoading })), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: isAllTab ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('allWalletsNote', 'Aggregated on-chain balances across {count} wallets. Low-value assets (<$1) are hidden.', { count: walletList.length }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline", children: [t('currentWallet', 'Current wallet'), ":"] }), (0, jsx_runtime_1.jsx)("code", { className: "text-neutral-400 bg-neutral-800 px-1.5 py-0.5 rounded font-mono truncate min-w-0 max-w-[140px] 2xs:max-w-[180px] sm:max-w-none", children: activeTab }), walletList.find((w) => w.wallet_address === activeTab)?.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 bg-cyan-400/20 px-1.5 py-0.5 rounded text-[9px] 2xs:text-[10px] shrink-0", children: t('primary', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${activeTab}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 text-[10px] 2xs:text-xs flex items-center gap-1 whitespace-nowrap", children: [t('viewOnSolscan', 'View on Solscan'), " ", (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3 h-3" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('singleWalletNote', 'Showing on-chain balances for this wallet only. Low-value assets (<$1) are hidden.') })] })] })) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-3 2xs:p-4 sm:p-5 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-3 mb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-2 2xs:p-3 bg-cyan-400/20 rounded-xl border border-cyan-400/30 shrink-0", children: (0, jsx_runtime_1.jsx)(IconWallet, { className: "w-5 h-5 2xs:w-6 2xs:h-6 sm:w-8 sm:h-8 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 tracking-wider mb-1", children: t('mccBalance', 'MCC Balance') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl 2xs:text-2xl xs:text-3xl sm:text-4xl md:text-5xl font-bold text-white font-mono truncate", children: mccLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mccBalance)) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-500 mt-1 truncate", children: [mccLoading ? '' : mask(`${fmtUSD(totalUsd)}`), !mccLoading && price > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "ml-2 text-[10px] 2xs:text-xs text-neutral-600", children: ["@ ", fmtUSD(price), "/MCC"] }))] })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => onNavigate?.(resolvePath('/mcc/mining')), className: "w-full flex items-center justify-center gap-2 px-4 py-2 sm:py-2.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs 2xs:text-sm transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconExternalLink, { className: "h-4 w-4" }), t('mintRecords', 'Mining Records')] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('mcdPoints', 'MCD Points') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('currentBalance', 'Current Balance') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-cyan-400 font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdAmount, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-neutral-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('totalReceived', 'Total Received') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-white font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdTotalReceived, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3 h-3 mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [t('spent', 'Spent'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: mask(fmt(mcdSpent, 0)) }), ' · ', t('mcdDistributionNote', 'MCD is distributed daily to eligible miners.')] })] }) })] }) }), activeLocks.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconLock, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('lockPeriod14Days', 'Lock Period (14 days)') })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-1 gap-1.5 2xs:gap-2 sm:gap-3", children: activeLocks.map((lock) => ((0, jsx_runtime_1.jsx)(LockPeriodCard, { lock: lock, hideBalance: hideBalance }, lock.lock_id))) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 2xs:mt-3 text-[10px] 2xs:text-xs text-neutral-500 font-mono", children: [t('totalLocked', 'Total locked'), ": ", mask(fmt(lockedAmount, 2)), " MCC"] })] }) }))] }));
212
212
  }
package/dist/index.d.ts CHANGED
@@ -85,3 +85,25 @@ export { MicrocosmEmailChangeCard } from './components/profile/email-change-card
85
85
  export type { MicrocosmEmailChangeCardProps } from './components/profile/email-change-card';
86
86
  export { MicrocosmTwoFactorSettings } from './components/profile/two-factor-settings';
87
87
  export type { MicrocosmTwoFactorSettingsProps } from './components/profile/two-factor-settings';
88
+ export { default as MainPortalMiningPage } from './main-portal/components/mining/MiningPage';
89
+ export { default as MainPortalMiningModal } from './main-portal/components/mining/MiningModal';
90
+ export { default as MainPortalWalletPage } from './main-portal/components/wallet/WalletPage';
91
+ export { default as MainPortalWalletManagement } from './main-portal/components/wallet/WalletManagement';
92
+ export { default as MainPortalMCCHistory } from './main-portal/components/wallet/MCCHistory';
93
+ export { default as MainPortalMCDPage } from './main-portal/components/mcd/MCDPage';
94
+ export { default as MainPortalAuctionsPage } from './main-portal/components/auctions/AuctionsPage';
95
+ export { default as MainPortalFragmentPage } from './main-portal/components/fragment/FragmentPage';
96
+ export { default as MainPortalLendingPage } from './main-portal/components/lending/LendingPage';
97
+ export { default as MainPortalVotingPage } from './main-portal/components/voting/VotingPage';
98
+ export { default as MainPortalReincarnationPage } from './main-portal/components/reincarnation/ReincarnationPage';
99
+ export { default as MainPortalOrganizationPage } from './main-portal/components/organization/OrganizationPage';
100
+ export { default as MainPortalTerritoryNFTBrowser } from './main-portal/components/territory/TerritoryNFTBrowser';
101
+ export { default as MainPortalStationListPage } from './main-portal/components/stations/StationListPage';
102
+ export { default as MainPortalStationDetailPage } from './main-portal/components/stations/StationDetailPage';
103
+ export { default as MainPortalStationsPage } from './main-portal/components/stations/StationsPage';
104
+ export { default as MainPortalProfilePage } from './main-portal/components/profile/ProfilePage';
105
+ export { default as MainPortalManagerIncomePage } from './main-portal/components/income/ManagerIncomePage';
106
+ export { default as MainPortalQueueStatusPage } from './main-portal/components/queue/QueueStatusPage';
107
+ export { default as MainPortalRewardsPage } from './main-portal/components/rewards/RewardsPage';
108
+ export { default as MainPortalNotificationsPage } from './main-portal/components/notifications/NotificationsPage';
109
+ export { default as MainPortalMessagesPage } from './main-portal/components/messages/MessagesPage';
package/dist/index.js CHANGED
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.MicrocosmMiningPage = exports.MicrocosmWalletPage = exports.MicrocosmLendingPage = exports.MicrocosmFragmentPage = exports.MicrocosmLockPeriods = exports.MicrocosmMCDStats = exports.MicrocosmMCCTokenStats = exports.MicrocosmEcosystemStats = exports.MicrocosmMyMining = exports.MicrocosmMiningWeight = exports.MicrocosmMintingStats = exports.MicrocosmPriceChart = exports.MicrocosmAssetsSummary = exports.MicrocosmQuickActions = exports.MicrocosmMarketBar = exports.MicrocosmDashboardOverview = exports.KPIRadialChart = exports.VoteResultBar = exports.MiningProgressBar = exports.TerritoryCard = exports.TerminalTooltip = exports.TerminalInput = exports.TerminalCountdown = exports.TerminalDialog = exports.TerminalTabs = exports.TerminalTable = exports.TerminalProgress = exports.TerminalDataRow = exports.TerminalBadge = exports.TerminalEmpty = exports.TerminalError = exports.TerminalLoading = exports.TerminalPageHeader = exports.TerminalCommand = exports.StatBox = exports.TerminalCard = exports.getMenuDescription = exports.getMenuTitle = exports.resolveMenuPath = exports.getAllMenuItems = exports.microcosmMenuGroups = exports.dashboardMenu = exports.web3OsMenu = exports.blockchainMenu = exports.useT = exports.useTranslations = exports.MicrocosmI18nProvider = exports.useLinkComponent = exports.LinkProvider = exports.MicrocosmMenuSection = void 0;
4
- exports.MicrocosmTwoFactorSettings = exports.MicrocosmEmailChangeCard = exports.MicrocosmProfilePage = exports.MicrocosmRewardsPage = exports.MicrocosmStationListPage = exports.MicrocosmQueueStatusPage = exports.MicrocosmManagerIncomePage = exports.MicrocosmReincarnationPage = exports.MicrocosmVotingPage = exports.MicrocosmOrganizationPage = exports.MicrocosmTerritoryPage = exports.MicrocosmAuctionPage = exports.MicrocosmMCDPage = void 0;
7
+ exports.MainPortalMessagesPage = exports.MainPortalNotificationsPage = exports.MainPortalRewardsPage = exports.MainPortalQueueStatusPage = exports.MainPortalManagerIncomePage = exports.MainPortalProfilePage = exports.MainPortalStationsPage = exports.MainPortalStationDetailPage = exports.MainPortalStationListPage = exports.MainPortalTerritoryNFTBrowser = exports.MainPortalOrganizationPage = exports.MainPortalReincarnationPage = exports.MainPortalVotingPage = exports.MainPortalLendingPage = exports.MainPortalFragmentPage = exports.MainPortalAuctionsPage = exports.MainPortalMCDPage = exports.MainPortalMCCHistory = exports.MainPortalWalletManagement = exports.MainPortalWalletPage = exports.MainPortalMiningModal = exports.MainPortalMiningPage = exports.MicrocosmTwoFactorSettings = exports.MicrocosmEmailChangeCard = exports.MicrocosmProfilePage = exports.MicrocosmRewardsPage = exports.MicrocosmStationListPage = exports.MicrocosmQueueStatusPage = exports.MicrocosmManagerIncomePage = exports.MicrocosmReincarnationPage = exports.MicrocosmVotingPage = exports.MicrocosmOrganizationPage = exports.MicrocosmTerritoryPage = exports.MicrocosmAuctionPage = exports.MicrocosmMCDPage = void 0;
5
8
  var menu_section_1 = require("./components/menu-section");
6
9
  Object.defineProperty(exports, "MicrocosmMenuSection", { enumerable: true, get: function () { return menu_section_1.MicrocosmMenuSection; } });
7
10
  var link_context_1 = require("./link-context");
@@ -109,3 +112,47 @@ var email_change_card_1 = require("./components/profile/email-change-card");
109
112
  Object.defineProperty(exports, "MicrocosmEmailChangeCard", { enumerable: true, get: function () { return email_change_card_1.MicrocosmEmailChangeCard; } });
110
113
  var two_factor_settings_1 = require("./components/profile/two-factor-settings");
111
114
  Object.defineProperty(exports, "MicrocosmTwoFactorSettings", { enumerable: true, get: function () { return two_factor_settings_1.MicrocosmTwoFactorSettings; } });
115
+ var MiningPage_1 = require("./main-portal/components/mining/MiningPage");
116
+ Object.defineProperty(exports, "MainPortalMiningPage", { enumerable: true, get: function () { return __importDefault(MiningPage_1).default; } });
117
+ var MiningModal_1 = require("./main-portal/components/mining/MiningModal");
118
+ Object.defineProperty(exports, "MainPortalMiningModal", { enumerable: true, get: function () { return __importDefault(MiningModal_1).default; } });
119
+ var WalletPage_1 = require("./main-portal/components/wallet/WalletPage");
120
+ Object.defineProperty(exports, "MainPortalWalletPage", { enumerable: true, get: function () { return __importDefault(WalletPage_1).default; } });
121
+ var WalletManagement_1 = require("./main-portal/components/wallet/WalletManagement");
122
+ Object.defineProperty(exports, "MainPortalWalletManagement", { enumerable: true, get: function () { return __importDefault(WalletManagement_1).default; } });
123
+ var MCCHistory_1 = require("./main-portal/components/wallet/MCCHistory");
124
+ Object.defineProperty(exports, "MainPortalMCCHistory", { enumerable: true, get: function () { return __importDefault(MCCHistory_1).default; } });
125
+ var MCDPage_1 = require("./main-portal/components/mcd/MCDPage");
126
+ Object.defineProperty(exports, "MainPortalMCDPage", { enumerable: true, get: function () { return __importDefault(MCDPage_1).default; } });
127
+ var AuctionsPage_1 = require("./main-portal/components/auctions/AuctionsPage");
128
+ Object.defineProperty(exports, "MainPortalAuctionsPage", { enumerable: true, get: function () { return __importDefault(AuctionsPage_1).default; } });
129
+ var FragmentPage_1 = require("./main-portal/components/fragment/FragmentPage");
130
+ Object.defineProperty(exports, "MainPortalFragmentPage", { enumerable: true, get: function () { return __importDefault(FragmentPage_1).default; } });
131
+ var LendingPage_1 = require("./main-portal/components/lending/LendingPage");
132
+ Object.defineProperty(exports, "MainPortalLendingPage", { enumerable: true, get: function () { return __importDefault(LendingPage_1).default; } });
133
+ var VotingPage_1 = require("./main-portal/components/voting/VotingPage");
134
+ Object.defineProperty(exports, "MainPortalVotingPage", { enumerable: true, get: function () { return __importDefault(VotingPage_1).default; } });
135
+ var ReincarnationPage_1 = require("./main-portal/components/reincarnation/ReincarnationPage");
136
+ Object.defineProperty(exports, "MainPortalReincarnationPage", { enumerable: true, get: function () { return __importDefault(ReincarnationPage_1).default; } });
137
+ var OrganizationPage_1 = require("./main-portal/components/organization/OrganizationPage");
138
+ Object.defineProperty(exports, "MainPortalOrganizationPage", { enumerable: true, get: function () { return __importDefault(OrganizationPage_1).default; } });
139
+ var TerritoryNFTBrowser_1 = require("./main-portal/components/territory/TerritoryNFTBrowser");
140
+ Object.defineProperty(exports, "MainPortalTerritoryNFTBrowser", { enumerable: true, get: function () { return __importDefault(TerritoryNFTBrowser_1).default; } });
141
+ var StationListPage_1 = require("./main-portal/components/stations/StationListPage");
142
+ Object.defineProperty(exports, "MainPortalStationListPage", { enumerable: true, get: function () { return __importDefault(StationListPage_1).default; } });
143
+ var StationDetailPage_1 = require("./main-portal/components/stations/StationDetailPage");
144
+ Object.defineProperty(exports, "MainPortalStationDetailPage", { enumerable: true, get: function () { return __importDefault(StationDetailPage_1).default; } });
145
+ var StationsPage_1 = require("./main-portal/components/stations/StationsPage");
146
+ Object.defineProperty(exports, "MainPortalStationsPage", { enumerable: true, get: function () { return __importDefault(StationsPage_1).default; } });
147
+ var ProfilePage_1 = require("./main-portal/components/profile/ProfilePage");
148
+ Object.defineProperty(exports, "MainPortalProfilePage", { enumerable: true, get: function () { return __importDefault(ProfilePage_1).default; } });
149
+ var ManagerIncomePage_1 = require("./main-portal/components/income/ManagerIncomePage");
150
+ Object.defineProperty(exports, "MainPortalManagerIncomePage", { enumerable: true, get: function () { return __importDefault(ManagerIncomePage_1).default; } });
151
+ var QueueStatusPage_1 = require("./main-portal/components/queue/QueueStatusPage");
152
+ Object.defineProperty(exports, "MainPortalQueueStatusPage", { enumerable: true, get: function () { return __importDefault(QueueStatusPage_1).default; } });
153
+ var RewardsPage_1 = require("./main-portal/components/rewards/RewardsPage");
154
+ Object.defineProperty(exports, "MainPortalRewardsPage", { enumerable: true, get: function () { return __importDefault(RewardsPage_1).default; } });
155
+ var NotificationsPage_1 = require("./main-portal/components/notifications/NotificationsPage");
156
+ Object.defineProperty(exports, "MainPortalNotificationsPage", { enumerable: true, get: function () { return __importDefault(NotificationsPage_1).default; } });
157
+ var MessagesPage_1 = require("./main-portal/components/messages/MessagesPage");
158
+ Object.defineProperty(exports, "MainPortalMessagesPage", { enumerable: true, get: function () { return __importDefault(MessagesPage_1).default; } });
@@ -0,0 +1 @@
1
+ export default function AuctionsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+ // AI-generated · AI-managed · AI-maintained
3
+ 'use client';
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.default = AuctionsPage;
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const useAuth_1 = require("../../hooks/useAuth");
9
+ const WalletContext_1 = require("../../contexts/WalletContext");
10
+ const api_service_1 = require("../../lib/api-service");
11
+ const card_1 = require("../ui/card");
12
+ const badge_1 = require("../ui/badge");
13
+ const button_1 = require("../ui/button");
14
+ const dialog_1 = require("../ui/dialog");
15
+ const select_1 = require("../ui/select");
16
+ const sonner_1 = require("sonner");
17
+ const lucide_react_1 = require("lucide-react");
18
+ const time_remaining_1 = require("../ui/time-remaining");
19
+ const utils_1 = require("../../lib/utils");
20
+ const next_intl_1 = require("next-intl");
21
+ const UNIT_ICONS = {
22
+ station: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { className: "w-4 h-4" }),
23
+ matrix: (0, jsx_runtime_1.jsx)(lucide_react_1.Grid3x3, { className: "w-4 h-4" }),
24
+ sector: (0, jsx_runtime_1.jsx)(lucide_react_1.Map, { className: "w-4 h-4" }),
25
+ system: (0, jsx_runtime_1.jsx)(lucide_react_1.Globe, { className: "w-4 h-4" }),
26
+ };
27
+ // UNIT_LABELS moved to component scope for i18n
28
+ const BADGE_VARIANTS = {
29
+ success: 'bg-white/20 text-white border border-white/30',
30
+ warning: 'bg-cyan-400/20 text-cyan-400 border border-cyan-400/30',
31
+ error: 'bg-red-500/20 text-red-500 border border-red-500/30',
32
+ info: 'bg-cyan-400/20 text-cyan-400 border border-cyan-400/30',
33
+ default: 'bg-neutral-500/20 text-neutral-300 border border-neutral-600',
34
+ };
35
+ // BID_STATUS_MAP moved to component scope for i18n
36
+ function AuctionsPage() {
37
+ const t = (0, next_intl_1.useTranslations)('auctionsDash');
38
+ const { user, isAdmin } = (0, useAuth_1.useAuth)();
39
+ const UNIT_LABELS = {
40
+ station: t('station'), matrix: t('matrix'), sector: t('sector'), system: t('system'),
41
+ };
42
+ const BID_STATUS_MAP = {
43
+ active: { label: t('bidLeading'), variant: 'success' },
44
+ outbid: { label: t('bidOutbid'), variant: 'warning' },
45
+ won: { label: t('bidWon'), variant: 'success' },
46
+ lost: { label: t('bidLost'), variant: 'error' },
47
+ refunded: { label: t('bidRefunded'), variant: 'default' },
48
+ };
49
+ const { availableBalance, lockedBalance, loading: walletLoading, refreshBalance } = (0, WalletContext_1.useWallet)();
50
+ const [auctions, setAuctions] = (0, react_1.useState)([]);
51
+ const [myBids, setMyBids] = (0, react_1.useState)([]);
52
+ const [historyAuctions, setHistoryAuctions] = (0, react_1.useState)([]);
53
+ const [loading, setLoading] = (0, react_1.useState)(true);
54
+ const [showHistory, setShowHistory] = (0, react_1.useState)(false);
55
+ const [showMyBids, setShowMyBids] = (0, react_1.useState)(false);
56
+ const [isBidDialogOpen, setIsBidDialogOpen] = (0, react_1.useState)(false);
57
+ const [isCreateAuctionDialogOpen, setIsCreateAuctionDialogOpen] = (0, react_1.useState)(false);
58
+ const [selectedAuction, setSelectedAuction] = (0, react_1.useState)(null);
59
+ const [bidAmount, setBidAmount] = (0, react_1.useState)('');
60
+ const [createForm, setCreateForm] = (0, react_1.useState)({
61
+ unit_id: '', unit_type: 'station', auction_type: 'first',
62
+ starting_price: '', reserve_price: '', bid_increment: '', end_time: '',
63
+ });
64
+ const loadAuctions = async () => {
65
+ try {
66
+ const response = await (0, api_service_1.getActiveAuctions)();
67
+ if (response.success && response.data && Array.isArray(response.data))
68
+ setAuctions(response.data);
69
+ else
70
+ setAuctions([]);
71
+ }
72
+ catch {
73
+ setAuctions([]);
74
+ }
75
+ finally {
76
+ setLoading(false);
77
+ }
78
+ };
79
+ const loadMyBids = async () => {
80
+ if (!user)
81
+ return;
82
+ try {
83
+ const response = await (0, api_service_1.getMyBids)();
84
+ if (response.success && response.data && Array.isArray(response.data))
85
+ setMyBids(response.data);
86
+ else
87
+ setMyBids([]);
88
+ }
89
+ catch {
90
+ setMyBids([]);
91
+ }
92
+ };
93
+ const loadHistory = async () => {
94
+ try {
95
+ const response = await (0, api_service_1.getAuctionHistory)({ limit: 10 });
96
+ if (response.success && response.data && Array.isArray(response.data))
97
+ setHistoryAuctions(response.data);
98
+ else
99
+ setHistoryAuctions([]);
100
+ }
101
+ catch {
102
+ setHistoryAuctions([]);
103
+ }
104
+ };
105
+ (0, react_1.useEffect)(() => {
106
+ loadAuctions();
107
+ loadMyBids();
108
+ loadHistory();
109
+ const interval = setInterval(() => { loadAuctions(); loadMyBids(); }, 30000);
110
+ return () => clearInterval(interval);
111
+ }, [user]);
112
+ const stats = (0, react_1.useMemo)(() => {
113
+ const totalBids = auctions.reduce((s, a) => s + (a.bid_count || 0), 0);
114
+ const highestBid = auctions.length > 0 ? Math.max(...auctions.map(a => a.current_price)) : 0;
115
+ const totalVolume = auctions.reduce((s, a) => s + a.current_price, 0);
116
+ const myLeading = myBids.filter(b => b.status === 'active').length;
117
+ return { totalBids, highestBid, totalVolume, myLeading };
118
+ }, [auctions, myBids]);
119
+ const openBidDialog = (auction) => {
120
+ setSelectedAuction(auction);
121
+ setBidAmount((auction.current_price + auction.bid_increment).toString());
122
+ setIsBidDialogOpen(true);
123
+ };
124
+ const handlePlaceBid = async () => {
125
+ if (!selectedAuction || !user) {
126
+ sonner_1.toast.error(t('pleaseLogin'));
127
+ return;
128
+ }
129
+ const amount = parseFloat(bidAmount);
130
+ if (isNaN(amount) || amount <= 0) {
131
+ sonner_1.toast.error(t('invalidBidAmount'));
132
+ return;
133
+ }
134
+ const minBid = selectedAuction.current_price + selectedAuction.bid_increment;
135
+ if (amount < minBid) {
136
+ sonner_1.toast.error(t('minBidError', { amount: minBid.toLocaleString() }));
137
+ return;
138
+ }
139
+ if (availableBalance < amount) {
140
+ sonner_1.toast.error(t('insufficientBalance'));
141
+ return;
142
+ }
143
+ try {
144
+ const response = await (0, api_service_1.placeBid)({
145
+ auction_id: selectedAuction.auction_id, bid_amount: amount, deposit_amount: amount,
146
+ transaction_hash: `mcc_bid_${Date.now()}`,
147
+ });
148
+ if (response.success) {
149
+ sonner_1.toast.success(t('bidSuccess'));
150
+ refreshBalance();
151
+ loadAuctions();
152
+ loadMyBids();
153
+ setIsBidDialogOpen(false);
154
+ setBidAmount('');
155
+ setSelectedAuction(null);
156
+ }
157
+ else
158
+ throw new Error(response.error || t('bidFailed'));
159
+ }
160
+ catch (error) {
161
+ sonner_1.toast.error(error instanceof Error ? error.message : t('bidFailed'));
162
+ }
163
+ };
164
+ const handleCreateAuction = async () => {
165
+ const { unit_id, starting_price, bid_increment, end_time } = createForm;
166
+ if (!unit_id || !starting_price || !bid_increment || !end_time) {
167
+ sonner_1.toast.error(t('fillAllFields'));
168
+ return;
169
+ }
170
+ try {
171
+ const response = await (0, api_service_1.createAuction)({
172
+ unit_id, auction_type: createForm.auction_type, starting_price: parseFloat(starting_price),
173
+ reserve_price: createForm.reserve_price ? parseFloat(createForm.reserve_price) : undefined,
174
+ bid_increment: parseFloat(bid_increment), end_time,
175
+ });
176
+ if (response.success) {
177
+ sonner_1.toast.success(t('auctionCreated'));
178
+ loadAuctions();
179
+ setIsCreateAuctionDialogOpen(false);
180
+ setCreateForm({ unit_id: '', unit_type: 'station', auction_type: 'first', starting_price: '', reserve_price: '', bid_increment: '', end_time: '' });
181
+ }
182
+ else
183
+ throw new Error(response.error || t('createAuctionFailed'));
184
+ }
185
+ catch (error) {
186
+ sonner_1.toast.error(error instanceof Error ? error.message : t('createAuctionFailed'));
187
+ }
188
+ };
189
+ const handleRefundDeposit = async (bid) => {
190
+ try {
191
+ const response = await (0, api_service_1.refundDeposit)(bid.bid_id);
192
+ if (response.success) {
193
+ sonner_1.toast.success(t('depositRefunded'));
194
+ refreshBalance();
195
+ loadMyBids();
196
+ }
197
+ else
198
+ throw new Error(response.error || t('refundFailed'));
199
+ }
200
+ catch (error) {
201
+ sonner_1.toast.error(error instanceof Error ? error.message : t('refundFailed'));
202
+ }
203
+ };
204
+ if (loading)
205
+ return ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center h-[60vh]", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "w-8 h-8 animate-spin text-neutral-400" }) }));
206
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-3 py-4 space-y-3 xs:px-4 xs:space-y-4 sm:px-6 sm:py-6 sm:space-y-6 font-mono", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-lg sm:text-2xl font-bold text-white tracking-wider", children: t('title') }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs sm:text-sm text-neutral-400", children: t('subtitle') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", className: "border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent", onClick: () => { loadAuctions(); loadMyBids(); loadHistory(); sonner_1.toast.success(t('refreshed')); }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: "w-4 h-4 mr-2" }), t('refresh')] }), isAdmin() && ((0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", className: "border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent", onClick: () => setIsCreateAuctionDialogOpen(true), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { className: "w-4 h-4 mr-2" }), t('createAuction')] }))] })] }), (0, jsx_runtime_1.jsx)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 dash-card", children: (0, jsx_runtime_1.jsx)(card_1.CardContent, { className: "p-3 sm:p-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('ongoing') }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-cyan-400 font-mono", children: auctions.length }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: t('auctionsCount') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('totalBids') }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-white font-mono", children: stats.totalBids }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: t('bidsCount') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('highestBid') }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-white font-mono", children: stats.highestBid > 0 ? stats.highestBid : '--' }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: "MCC" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('totalLocked') }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-cyan-400 font-mono", children: stats.totalVolume > 0 ? stats.totalVolume : '--' }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: "MCC" })] })] }) }) }), (0, jsx_runtime_1.jsx)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 dash-card", children: (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "p-3 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Flame, { className: "w-4 h-4 text-cyan-400" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium text-neutral-300 tracking-wider", children: t('activeAuctions') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-xs text-neutral-500", children: ["(", auctions.length, ")"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Clock, { className: "w-3 h-3" }), (0, jsx_runtime_1.jsx)("span", { children: t('autoRefresh') })] })] }), auctions.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-16", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Gavel, { className: "w-10 h-10 text-neutral-700 mx-auto mb-3" }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-sm mb-2", children: t('noActiveAuctions') }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-xs max-w-md mx-auto", children: t('auctionExplainer') })] })) : ((0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: auctions.map((auction) => {
207
+ const unitType = auction.unit_type || 'station';
208
+ const minNextBid = auction.current_price + auction.bid_increment;
209
+ const priceUp = auction.starting_price > 0
210
+ ? ((auction.current_price - auction.starting_price) / auction.starting_price * 100).toFixed(1)
211
+ : '0';
212
+ const isHot = (auction.bid_count || 0) >= 5;
213
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("bg-neutral-800 border rounded p-5 hover:border-cyan-400/50 dash-card", isHot ? "border-cyan-400/30" : "border-neutral-700"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-between mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400", children: UNIT_ICONS[unitType] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white font-bold", children: auction.unit_name || `${t('territory')} #${auction.unit_id}` }), isHot && (0, jsx_runtime_1.jsxs)(badge_1.Badge, { className: BADGE_VARIANTS.warning, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Flame, { className: "w-3 h-3 inline mr-0.5" }), t('hot')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [(0, jsx_runtime_1.jsx)(badge_1.Badge, { className: BADGE_VARIANTS.info, children: UNIT_LABELS[unitType] }), (0, jsx_runtime_1.jsx)(badge_1.Badge, { className: BADGE_VARIANTS.default, children: auction.auction_type === 'first' ? t('firstAuction') : t('secondAuction') }), (0, jsx_runtime_1.jsx)(badge_1.Badge, { className: BADGE_VARIANTS.success, children: t('active') })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 bg-neutral-800 border border-neutral-700 rounded px-3 py-1.5 text-sm", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Clock, { className: "w-3.5 h-3.5 text-cyan-400" }), (0, jsx_runtime_1.jsx)(time_remaining_1.TimeRemaining, { endTime: auction.end_time, className: "text-cyan-400 font-bold font-mono" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-3 mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('startingPrice') }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-300 font-mono", children: auction.starting_price.toLocaleString() }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: "MCC" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-900 border border-neutral-700 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('currentHighest') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl font-bold text-cyan-400 font-mono", children: auction.current_price.toLocaleString() }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 text-xs", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-500", children: "MCC" }), Number(priceUp) > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "text-white flex items-center", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { className: "w-3 h-3" }), "+", priceUp, "%"] }))] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('bidCount') }), (0, jsx_runtime_1.jsx)("div", { className: "text-white font-bold font-mono", children: auction.bid_count || 0 }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: t('bidsCount') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded p-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('minIncrement') }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-300 font-mono", children: auction.bid_increment.toLocaleString() }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: "MCC (\u22655%)" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4 text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Lock, { className: "w-3 h-3" }), t('deposit50')] }), (0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Crown, { className: "w-3 h-3" }), t('winnerMagistrate')] }), (0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Timer, { className: "w-3 h-3" }), t('noNewBid24h')] })] }), auction.status === 'active' && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)(button_1.Button, { onClick: () => openBidDialog(auction), disabled: walletLoading, className: "bg-cyan-700 hover:bg-cyan-600 text-white", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Gavel, { className: "w-4 h-4 mr-2" }), t('placeBid')] }), (0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", onClick: () => openBidDialog(auction), disabled: walletLoading, className: "border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent text-xs", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Zap, { className: "w-3 h-3 mr-1.5" }), minNextBid.toLocaleString(), " MCC"] })] }))] })] }, auction.auction_id));
214
+ }) }))] }) }), (0, jsx_runtime_1.jsx)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 dash-card", children: (0, jsx_runtime_1.jsx)(card_1.CardContent, { className: "p-3 sm:p-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Award, { className: "w-3.5 h-3.5 text-cyan-400" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400 tracking-wider", children: t('auctionTarget') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-neutral-300 mb-1", children: t('auctionTargetDesc') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: t('auctionTargetDetail') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Timer, { className: "w-3.5 h-3.5 text-cyan-400" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400 tracking-wider", children: t('biddingRules') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-neutral-300 mb-1", children: t('biddingRulesDesc') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: t('biddingRulesDetail') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 rounded p-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-3.5 h-3.5 text-cyan-400" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400 tracking-wider", children: t('participationReq') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-neutral-300 mb-1", children: t('participationReqDesc') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500", children: t('participationReqDetail') })] })] }) }) }), user && (myBids.length > 0 || lockedBalance > 0) && ((0, jsx_runtime_1.jsx)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 dash-card", children: (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "p-3 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { onClick: () => setShowMyBids(!showMyBids), className: "flex items-center justify-between cursor-pointer", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Shield, { className: "w-4 h-4 text-cyan-400" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm text-neutral-300 tracking-wider", children: t('myBids') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-xs text-neutral-500", children: [myBids.length, " ", t('bidsCount')] }), stats.myLeading > 0 && (0, jsx_runtime_1.jsxs)(badge_1.Badge, { className: BADGE_VARIANTS.success, children: [stats.myLeading, " ", t('leading')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-xs text-neutral-500", children: [t('available'), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-white font-mono", children: availableBalance.toLocaleString() }), lockedBalance > 0 && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [" \u00B7 ", t('locked'), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 font-mono", children: lockedBalance.toLocaleString() })] }), ' ', "MCC"] }), showMyBids ? (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { className: "w-4 h-4 text-neutral-500" }) : (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "w-4 h-4 text-neutral-500" })] })] }), showMyBids && ((0, jsx_runtime_1.jsx)("div", { className: "mt-4 space-y-2", children: myBids.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-8 text-neutral-500 text-sm", children: t('noBidRecords') })) : myBids.map((bid) => {
215
+ const si = BID_STATUS_MAP[bid.status] || { label: bid.status, variant: 'default' };
216
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between bg-neutral-800 border border-neutral-700 rounded p-3 hover:bg-neutral-700 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)(badge_1.Badge, { className: BADGE_VARIANTS[si.variant], children: si.label }), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-300 text-sm", children: bid.unit_name || `#${bid.auction_id}` }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white text-sm font-bold font-mono", children: [bid.bid_amount.toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)(time_remaining_1.FormattedDateTime, { dateTime: bid.created_at, className: "text-neutral-500 text-xs font-mono" }), (bid.status === 'lost' || bid.status === 'outbid') && ((0, jsx_runtime_1.jsx)(button_1.Button, { variant: "outline", size: "sm", onClick: () => handleRefundDeposit(bid), className: "border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent text-xs", children: t('refund') }))] })] }, bid.bid_id));
217
+ }) }))] }) })), historyAuctions.length > 0 && ((0, jsx_runtime_1.jsx)(card_1.Card, { className: "bg-neutral-900 border-neutral-700 dash-card", children: (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "p-3 sm:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { onClick: () => setShowHistory(!showHistory), className: "flex items-center justify-between cursor-pointer", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.BarChart3, { className: "w-4 h-4 text-neutral-400" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm text-neutral-300 tracking-wider", children: t('auctionHistory') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-xs text-neutral-500", children: [historyAuctions.length, " ", t('auctionsCount')] })] }), showHistory ? (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { className: "w-4 h-4 text-neutral-500" }) : (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "w-4 h-4 text-neutral-500" })] }), showHistory && ((0, jsx_runtime_1.jsx)("div", { className: "mt-4 space-y-2", children: historyAuctions.map((a) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between bg-neutral-800 border border-neutral-700 rounded p-3 hover:bg-neutral-700 transition-colors", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400", children: UNIT_ICONS[a.unit_type || 'station'] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-300 text-sm", children: a.unit_name || `${t('territory')} #${a.unit_id}` }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-xs", children: UNIT_LABELS[a.unit_type || 'station'] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-right", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-white text-sm font-bold font-mono", children: [a.current_price.toLocaleString(), " MCC"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-xs", children: [a.bid_count || 0, " ", t('bidsCount')] })] }), (0, jsx_runtime_1.jsx)(badge_1.Badge, { className: a.status === 'cancelled' ? BADGE_VARIANTS.error : BADGE_VARIANTS.default, children: a.status === 'ended' ? t('ended') : a.status === 'cancelled' ? t('cancelled') : t('sold') })] })] }, a.auction_id))) }))] }) })), (0, jsx_runtime_1.jsx)(dialog_1.Dialog, { open: isBidDialogOpen, onOpenChange: setIsBidDialogOpen, children: (0, jsx_runtime_1.jsxs)(dialog_1.DialogContent, { className: "bg-neutral-900 border-neutral-700 font-mono max-w-md", children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogHeader, { children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogTitle, { className: "text-white font-mono flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Gavel, { className: "w-5 h-5 text-cyan-400" }), t('bidDialog')] }), (0, jsx_runtime_1.jsx)(dialog_1.DialogDescription, { className: "text-neutral-400 font-mono", children: selectedAuction?.unit_name || `${t('territory')} #${selectedAuction?.unit_id}` })] }), selectedAuction && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-4 py-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsx)(badge_1.Badge, { className: BADGE_VARIANTS.info, children: UNIT_LABELS[selectedAuction.unit_type || 'station'] }), (0, jsx_runtime_1.jsx)(badge_1.Badge, { className: BADGE_VARIANTS.default, children: selectedAuction.auction_type === 'first' ? t('firstAuction') : t('secondAuction') }), (0, jsx_runtime_1.jsxs)(badge_1.Badge, { className: BADGE_VARIANTS.warning, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Crown, { className: "w-3 h-3 inline mr-0.5" }), t('winnerMagistrate')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('currentHighest') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-3xl font-bold text-cyan-400 font-mono", children: [selectedAuction.current_price.toLocaleString(), " ", (0, jsx_runtime_1.jsx)("span", { className: "text-base text-neutral-500", children: "MCC" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-500 mt-1", children: [selectedAuction.bid_count || 0, " ", t('bidsCount'), " \u00B7 ", t('startingPrice'), " ", selectedAuction.starting_price.toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('bidAmountLabel'), " (", t('bidAmountMin', { amount: (selectedAuction.current_price + selectedAuction.bid_increment).toLocaleString() }), ")"] }), (0, jsx_runtime_1.jsx)("input", { type: "number", step: selectedAuction.bid_increment, value: bidAmount, onChange: (e) => setBidAmount(e.target.value), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-3 py-2.5 rounded text-sm font-mono focus:border-cyan-400 focus:outline-none" })] }), bidAmount && !isNaN(parseFloat(bidAmount)) && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-2 p-3 bg-neutral-800 rounded border border-neutral-700 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400", children: [t('bidAmountLabel'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-300 font-mono", children: [parseFloat(bidAmount).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400", children: [t('depositLabel'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-mono", children: [(parseFloat(bidAmount) * 0.5).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between border-t border-neutral-700 pt-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400", children: [t('availableBalance'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)("font-mono", availableBalance < parseFloat(bidAmount) ? 'text-red-500' : 'text-white'), children: [availableBalance.toLocaleString(), " MCC"] })] }), availableBalance < parseFloat(bidAmount) && ((0, jsx_runtime_1.jsxs)("div", { className: "text-red-500 text-xs flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Lock, { className: "w-3 h-3" }), t('balanceInsufficient')] }))] }))] })), (0, jsx_runtime_1.jsxs)(dialog_1.DialogFooter, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { variant: "outline", onClick: () => setIsBidDialogOpen(false), className: "border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent", children: t('cancel') }), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handlePlaceBid, className: "bg-cyan-700 hover:bg-cyan-600 text-white", children: t('confirmBid') })] })] }) }), (0, jsx_runtime_1.jsx)(dialog_1.Dialog, { open: isCreateAuctionDialogOpen, onOpenChange: setIsCreateAuctionDialogOpen, children: (0, jsx_runtime_1.jsxs)(dialog_1.DialogContent, { className: "bg-neutral-900 border-neutral-700 font-mono", children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogHeader, { children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogTitle, { className: "text-white font-mono flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { className: "w-5 h-5 text-cyan-400" }), t('createAuctionTitle')] }), (0, jsx_runtime_1.jsx)(dialog_1.DialogDescription, { className: "text-neutral-400 font-mono", children: t('createAuctionDesc') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4 py-2", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('territoryId'), " *"] }), (0, jsx_runtime_1.jsx)("input", { value: createForm.unit_id, onChange: (e) => setCreateForm({ ...createForm, unit_id: e.target.value }), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-3 py-2 rounded text-sm font-mono focus:border-cyan-400 focus:outline-none" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('territoryType'), " *"] }), (0, jsx_runtime_1.jsxs)(select_1.Select, { value: createForm.unit_type, onValueChange: (v) => setCreateForm({ ...createForm, unit_type: v }), children: [(0, jsx_runtime_1.jsx)(select_1.SelectTrigger, { className: "bg-neutral-800 border-neutral-600 text-white", children: (0, jsx_runtime_1.jsx)(select_1.SelectValue, {}) }), (0, jsx_runtime_1.jsx)(select_1.SelectContent, { className: "bg-neutral-900 border-neutral-700", children: (0, jsx_runtime_1.jsx)(select_1.SelectItem, { value: "station", children: t('station') }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('auctionType'), " *"] }), (0, jsx_runtime_1.jsxs)(select_1.Select, { value: createForm.auction_type, onValueChange: (v) => setCreateForm({ ...createForm, auction_type: v }), children: [(0, jsx_runtime_1.jsx)(select_1.SelectTrigger, { className: "bg-neutral-800 border-neutral-600 text-white", children: (0, jsx_runtime_1.jsx)(select_1.SelectValue, {}) }), (0, jsx_runtime_1.jsxs)(select_1.SelectContent, { className: "bg-neutral-900 border-neutral-700", children: [(0, jsx_runtime_1.jsx)(select_1.SelectItem, { value: "first", children: t('firstAuction') }), (0, jsx_runtime_1.jsx)(select_1.SelectItem, { value: "second", children: t('secondAuction') })] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('startPrice'), " *"] }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: createForm.starting_price, onChange: (e) => setCreateForm({ ...createForm, starting_price: e.target.value }), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-3 py-2 rounded text-sm font-mono focus:border-cyan-400 focus:outline-none" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('reservePrice') }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: createForm.reserve_price, onChange: (e) => setCreateForm({ ...createForm, reserve_price: e.target.value }), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-3 py-2 rounded text-sm font-mono focus:border-cyan-400 focus:outline-none" })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('minBidIncrement'), " *"] }), (0, jsx_runtime_1.jsx)("input", { type: "number", value: createForm.bid_increment, onChange: (e) => setCreateForm({ ...createForm, bid_increment: e.target.value }), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-3 py-2 rounded text-sm font-mono focus:border-cyan-400 focus:outline-none" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: [t('endTime'), " *"] }), (0, jsx_runtime_1.jsx)("input", { type: "datetime-local", value: createForm.end_time, onChange: (e) => setCreateForm({ ...createForm, end_time: e.target.value }), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-3 py-2 rounded text-sm font-mono focus:border-cyan-400 focus:outline-none" })] })] }), (0, jsx_runtime_1.jsxs)(dialog_1.DialogFooter, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { variant: "outline", onClick: () => setIsCreateAuctionDialogOpen(false), className: "border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent", children: t('cancel') }), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleCreateAuction, className: "bg-cyan-700 hover:bg-cyan-600 text-white", children: t('createAuction') })] })] }) })] }));
218
+ }
@@ -0,0 +1 @@
1
+ export declare function AssetStats(): import("react/jsx-runtime").JSX.Element;