@burdenoff/microfe-labsofscience 2026.626.1 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/labsofscience/LabsOfScienceRoot.js +68 -124
  3. package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
  4. package/dist/labsofscience/LabsOfScienceRoutes.js +61 -185
  5. package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
  6. package/dist/labsofscience/components/QueryStates.js +40 -0
  7. package/dist/labsofscience/components/QueryStates.js.map +1 -0
  8. package/dist/labsofscience/components/StatusBadge.js +40 -23
  9. package/dist/labsofscience/components/StatusBadge.js.map +1 -1
  10. package/dist/labsofscience/context/LabsOfScienceContext.js +22 -30
  11. package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
  12. package/dist/labsofscience/hooks/useLabsOfScienceApi.js +500 -172
  13. package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
  14. package/dist/labsofscience/pages/OverviewPage.js +195 -0
  15. package/dist/labsofscience/pages/OverviewPage.js.map +1 -0
  16. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +162 -0
  17. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -0
  18. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +137 -0
  19. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -0
  20. package/dist/labsofscience/pages/datasets/DatasetsListPage.js +155 -0
  21. package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -0
  22. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +220 -0
  23. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -0
  24. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +170 -0
  25. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -0
  26. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +134 -0
  27. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -0
  28. package/dist/labsofscience/pages/experiments/RunDialogs.js +180 -0
  29. package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -0
  30. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +130 -0
  31. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -0
  32. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +132 -0
  33. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -0
  34. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +126 -0
  35. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -0
  36. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +89 -0
  37. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -0
  38. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +138 -0
  39. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -0
  40. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +211 -0
  41. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -0
  42. package/dist/labsofscience/pages/inventory/InventoryListPage.js +178 -0
  43. package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -0
  44. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +118 -0
  45. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -0
  46. package/dist/labsofscience/pages/notebook/NotebookListPage.js +144 -0
  47. package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -0
  48. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +146 -0
  49. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -0
  50. package/dist/labsofscience/pages/pipelines/PipelinesPage.js +212 -0
  51. package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -0
  52. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +109 -0
  53. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -0
  54. package/dist/labsofscience/pages/projects/ProjectDetailPage.js +174 -0
  55. package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -0
  56. package/dist/labsofscience/pages/projects/ProjectFormDialog.js +169 -0
  57. package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -0
  58. package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -0
  59. package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -0
  60. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +133 -0
  61. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -0
  62. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +151 -0
  63. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -0
  64. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +140 -0
  65. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -0
  66. package/dist/labsofscience/pages/shared/DetailComponents.js +64 -0
  67. package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -0
  68. package/dist/labsofscience/pages/shared/tags.js +16 -0
  69. package/dist/labsofscience/pages/shared/tags.js.map +1 -0
  70. package/dist/labsofscience/store/labsofscienceStore.js +6 -11
  71. package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
  72. package/dist/labsofscience/utils/formatters.js +28 -13
  73. package/dist/labsofscience/utils/formatters.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/labsofscience/components/InvestmentCard.js +0 -98
  76. package/dist/labsofscience/components/InvestmentCard.js.map +0 -1
  77. package/dist/labsofscience/components/RatingDisplay.js +0 -35
  78. package/dist/labsofscience/components/RatingDisplay.js.map +0 -1
  79. package/dist/labsofscience/mocks/data.js +0 -1517
  80. package/dist/labsofscience/mocks/data.js.map +0 -1
  81. package/dist/labsofscience/mocks/users.js +0 -34
  82. package/dist/labsofscience/mocks/users.js.map +0 -1
  83. package/dist/labsofscience/pages/HomePage.js +0 -940
  84. package/dist/labsofscience/pages/HomePage.js.map +0 -1
  85. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +0 -651
  86. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +0 -1
  87. package/dist/labsofscience/pages/admin/AdminDashboard.js +0 -672
  88. package/dist/labsofscience/pages/admin/AdminDashboard.js.map +0 -1
  89. package/dist/labsofscience/pages/admin/AdminFinancialPage.js +0 -427
  90. package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +0 -1
  91. package/dist/labsofscience/pages/admin/AdminOrdersPage.js +0 -665
  92. package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +0 -1
  93. package/dist/labsofscience/pages/admin/AdminProfilePage.js +0 -261
  94. package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +0 -1
  95. package/dist/labsofscience/pages/admin/AdminSettingsPage.js +0 -651
  96. package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +0 -1
  97. package/dist/labsofscience/pages/admin/CartManagementPage.js +0 -874
  98. package/dist/labsofscience/pages/admin/CartManagementPage.js.map +0 -1
  99. package/dist/labsofscience/pages/admin/UserManagementPage.js +0 -898
  100. package/dist/labsofscience/pages/admin/UserManagementPage.js.map +0 -1
  101. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +0 -839
  102. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  103. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +0 -705
  104. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  105. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +0 -791
  106. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  107. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  108. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  109. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +0 -636
  110. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  111. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +0 -911
  112. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  113. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +0 -879
  114. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +0 -1
  115. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +0 -839
  116. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +0 -1
  117. package/dist/labsofscience/pages/common/HelpSupportPage.js +0 -1324
  118. package/dist/labsofscience/pages/common/HelpSupportPage.js.map +0 -1
  119. package/dist/labsofscience/pages/common/NotificationCenterPage.js +0 -672
  120. package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +0 -1
  121. package/dist/labsofscience/pages/common/SettingsPage.js +0 -973
  122. package/dist/labsofscience/pages/common/SettingsPage.js.map +0 -1
  123. package/dist/labsofscience/pages/customer/BookingDetailsPage.js +0 -637
  124. package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +0 -1
  125. package/dist/labsofscience/pages/customer/CartDetailPage.js +0 -653
  126. package/dist/labsofscience/pages/customer/CartDetailPage.js.map +0 -1
  127. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +0 -559
  128. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +0 -1
  129. package/dist/labsofscience/pages/customer/CheckoutPage.js +0 -530
  130. package/dist/labsofscience/pages/customer/CheckoutPage.js.map +0 -1
  131. package/dist/labsofscience/pages/customer/CustomerDashboard.js +0 -531
  132. package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +0 -1
  133. package/dist/labsofscience/pages/customer/CustomerProfilePage.js +0 -658
  134. package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +0 -1
  135. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +0 -633
  136. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +0 -1
  137. package/dist/labsofscience/pages/customer/FavoritesPage.js +0 -484
  138. package/dist/labsofscience/pages/customer/FavoritesPage.js.map +0 -1
  139. package/dist/labsofscience/pages/customer/OrderHistoryPage.js +0 -445
  140. package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +0 -1
  141. package/dist/labsofscience/pages/customer/OrderTrackingPage.js +0 -425
  142. package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +0 -1
  143. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +0 -495
  144. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +0 -1
  145. package/dist/labsofscience/pages/customer/ReviewsPage.js +0 -613
  146. package/dist/labsofscience/pages/customer/ReviewsPage.js.map +0 -1
  147. package/dist/labsofscience/pages/customer/SavedAddressesPage.js +0 -450
  148. package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +0 -1
  149. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +0 -881
  150. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +0 -1
  151. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +0 -946
  152. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  153. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +0 -687
  154. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  155. package/dist/labsofscience/pages/investor/InvestorDashboard.js +0 -455
  156. package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +0 -1
  157. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +0 -406
  158. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  159. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +0 -575
  160. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +0 -1
  161. package/dist/labsofscience/pages/investor/InvestorProfilePage.js +0 -1070
  162. package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +0 -1
  163. package/dist/labsofscience/pages/worker/TaskDetailsPage.js +0 -537
  164. package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +0 -1
  165. package/dist/labsofscience/pages/worker/WorkerDashboard.js +0 -665
  166. package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +0 -1
  167. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +0 -681
  168. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +0 -1
  169. package/dist/labsofscience/pages/worker/WorkerProfilePage.js +0 -692
  170. package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +0 -1
  171. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +0 -588
  172. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,687 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useCallback as a, useEffect as o, useState as s } from "react";
7
- import { Activity as c, ArrowDown as l, ArrowUp as u, BarChart3 as d, Calendar as f, Download as p, Lightbulb as m, PieChart as h, Shield as g, Target as _, TrendingUp as v, Wallet as y } from "lucide-react";
8
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
9
- import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
10
- //#region src/labsofscience/pages/investor/InvestorAnalyticsPage.tsx
11
- var w = {
12
- portfolioMetrics: {
13
- totalValue: 283700,
14
- totalInvested: 255e3,
15
- totalReturns: 28700,
16
- averageRoi: 19.6,
17
- portfolioGrowth: 11.3,
18
- bestPerforming: "Biryani House",
19
- worstPerforming: "Healthy Bites"
20
- },
21
- performanceByCart: [
22
- {
23
- cartName: "Biryani House",
24
- investedAmount: 6e4,
25
- currentValue: 72e3,
26
- returns: 12e3,
27
- roi: 20
28
- },
29
- {
30
- cartName: "South Indian Express",
31
- investedAmount: 5e4,
32
- currentValue: 58500,
33
- returns: 8500,
34
- roi: 17
35
- },
36
- {
37
- cartName: "Pizza Corner",
38
- investedAmount: 75e3,
39
- currentValue: 82e3,
40
- returns: 7e3,
41
- roi: 9.3
42
- },
43
- {
44
- cartName: "Healthy Bites",
45
- investedAmount: 3e4,
46
- currentValue: 31200,
47
- returns: 1200,
48
- roi: 4
49
- },
50
- {
51
- cartName: "Street Food Junction",
52
- investedAmount: 4e4,
53
- currentValue: 4e4,
54
- returns: 0,
55
- roi: 0
56
- }
57
- ],
58
- performanceByCategory: [
59
- {
60
- category: "South Indian",
61
- investedAmount: 11e4,
62
- returns: 20500,
63
- percentage: 43.1
64
- },
65
- {
66
- category: "Fast Food",
67
- investedAmount: 75e3,
68
- returns: 7e3,
69
- percentage: 29.4
70
- },
71
- {
72
- category: "Street Food",
73
- investedAmount: 4e4,
74
- returns: 0,
75
- percentage: 15.7
76
- },
77
- {
78
- category: "Healthy Food",
79
- investedAmount: 3e4,
80
- returns: 1200,
81
- percentage: 11.8
82
- }
83
- ],
84
- monthlyPerformance: [
85
- {
86
- month: "Jun 2024",
87
- invested: 195e3,
88
- value: 202e3,
89
- returns: 7e3
90
- },
91
- {
92
- month: "Jul 2024",
93
- invested: 215e3,
94
- value: 228e3,
95
- returns: 13e3
96
- },
97
- {
98
- month: "Aug 2024",
99
- invested: 255e3,
100
- value: 265e3,
101
- returns: 1e4
102
- },
103
- {
104
- month: "Sep 2024",
105
- invested: 255e3,
106
- value: 275e3,
107
- returns: 2e4
108
- },
109
- {
110
- month: "Oct 2024",
111
- invested: 255e3,
112
- value: 28e4,
113
- returns: 25e3
114
- },
115
- {
116
- month: "Nov 2024",
117
- invested: 255e3,
118
- value: 283700,
119
- returns: 28700
120
- }
121
- ],
122
- riskAnalysis: {
123
- riskScore: 3.2,
124
- diversificationScore: 7.8,
125
- volatilityScore: 2.5,
126
- recommendations: [
127
- "Consider diversifying into more food categories",
128
- "Your portfolio shows good risk distribution",
129
- "Consider investing in carts from different locations",
130
- "Monitor underperforming investments closely",
131
- "Explore premium segment opportunities for higher returns"
132
- ]
133
- }
134
- };
135
- function T(e) {
136
- return e <= 2 ? {
137
- label: "Low Risk",
138
- color: "text-status-success-text"
139
- } : e <= 4 ? {
140
- label: "Moderate Risk",
141
- color: "text-status-warning-text"
142
- } : {
143
- label: "High Risk",
144
- color: "text-status-error-text"
145
- };
146
- }
147
- function E(e) {
148
- return e <= 2 ? "bg-status-success-bg" : e <= 4 ? "bg-status-warning-bg" : "bg-status-error-bg";
149
- }
150
- function D(e) {
151
- return e >= 8 ? {
152
- label: "Well Diversified",
153
- color: "text-status-success-text"
154
- } : e >= 6 ? {
155
- label: "Moderately Diversified",
156
- color: "text-status-warning-text"
157
- } : {
158
- label: "Poorly Diversified",
159
- color: "text-status-error-text"
160
- };
161
- }
162
- function O(e) {
163
- return e >= 8 ? "bg-status-success-bg" : e >= 6 ? "bg-status-warning-bg" : "bg-status-error-bg";
164
- }
165
- function k() {
166
- let { navigateTo: k } = e(), [A, j] = s(!0), [M, N] = s("6m"), [P, F] = s(null), [I, L] = s("idle");
167
- o(() => {
168
- j(!0);
169
- let e = setTimeout(() => {
170
- F(w), j(!1);
171
- }, 600);
172
- return () => clearTimeout(e);
173
- }, [M]);
174
- let R = a(() => {
175
- L("exporting"), setTimeout(() => {
176
- L("done"), setTimeout(() => L("idle"), 2e3);
177
- }, 1200);
178
- }, []);
179
- if (A || !P) return /* @__PURE__ */ b(n, {
180
- title: "Investment Analytics",
181
- description: "Loading analytics...",
182
- children: /* @__PURE__ */ b("div", {
183
- className: "flex items-center justify-center py-20",
184
- children: /* @__PURE__ */ x("div", {
185
- className: "text-center",
186
- children: [/* @__PURE__ */ b("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ b("p", {
187
- className: "text-sm text-text-secondary",
188
- children: "Loading analytics data..."
189
- })]
190
- })
191
- })
192
- });
193
- let z = T(P.riskAnalysis.riskScore), B = D(P.riskAnalysis.diversificationScore), V = [...P.performanceByCart].sort((e, t) => t.roi - e.roi);
194
- return /* @__PURE__ */ x(n, {
195
- title: "Investment Analytics",
196
- description: "Comprehensive analysis of your portfolio performance",
197
- actions: /* @__PURE__ */ x("div", {
198
- className: "flex items-center gap-3",
199
- children: [/* @__PURE__ */ x("select", {
200
- value: M,
201
- onChange: (e) => N(e.target.value),
202
- className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
203
- children: [
204
- /* @__PURE__ */ b("option", {
205
- value: "1m",
206
- children: "Last Month"
207
- }),
208
- /* @__PURE__ */ b("option", {
209
- value: "3m",
210
- children: "Last 3 Months"
211
- }),
212
- /* @__PURE__ */ b("option", {
213
- value: "6m",
214
- children: "Last 6 Months"
215
- }),
216
- /* @__PURE__ */ b("option", {
217
- value: "1y",
218
- children: "Last Year"
219
- }),
220
- /* @__PURE__ */ b("option", {
221
- value: "all",
222
- children: "All Time"
223
- })
224
- ]
225
- }), /* @__PURE__ */ x("button", {
226
- type: "button",
227
- onClick: R,
228
- disabled: I === "exporting",
229
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", I === "exporting" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : I === "done" ? "bg-status-success-bg text-white" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
230
- children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), I === "exporting" ? "Exporting..." : I === "done" ? "Exported!" : "Export Report"]
231
- })]
232
- }),
233
- children: [
234
- /* @__PURE__ */ b(C, {
235
- icon: /* @__PURE__ */ b(d, { className: "h-4 w-4" }),
236
- className: "mb-6",
237
- children: "Go deeper than headline numbers. Analyse your portfolio's growth, ROI and risk score, see your best and worst performers, and study return trends over time — then export a report to share or file. This is where you turn investment data into your next decision."
238
- }),
239
- /* @__PURE__ */ x(S, {
240
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
241
- children: [
242
- /* @__PURE__ */ b(r, {
243
- icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
244
- value: i(P.portfolioMetrics.totalValue, { minimumFractionDigits: 0 }),
245
- label: "Portfolio Value",
246
- trend: "up",
247
- trendValue: `+${P.portfolioMetrics.portfolioGrowth}% total growth`
248
- }),
249
- /* @__PURE__ */ b(r, {
250
- icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" }),
251
- value: i(P.portfolioMetrics.totalReturns, { minimumFractionDigits: 0 }),
252
- label: "Total Returns",
253
- trend: "up",
254
- trendValue: "Profit earned so far"
255
- }),
256
- /* @__PURE__ */ b(r, {
257
- icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" }),
258
- value: `${P.portfolioMetrics.averageRoi}%`,
259
- label: "Average ROI",
260
- trend: "up",
261
- trendValue: "Across all investments"
262
- }),
263
- /* @__PURE__ */ b(r, {
264
- icon: /* @__PURE__ */ b(c, { className: "h-5 w-5" }),
265
- value: `${P.riskAnalysis.riskScore}/5`,
266
- label: "Risk Score",
267
- trend: "neutral",
268
- trendValue: z.label
269
- })
270
- ]
271
- }),
272
- /* @__PURE__ */ x("div", {
273
- className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
274
- children: [/* @__PURE__ */ x("div", {
275
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
276
- children: [/* @__PURE__ */ b("div", {
277
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-success-bg-subtle",
278
- children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-status-success-text" })
279
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
280
- className: "text-xs text-text-secondary",
281
- children: "Best Performing"
282
- }), /* @__PURE__ */ b("p", {
283
- className: "text-sm font-semibold text-status-success-text",
284
- children: P.portfolioMetrics.bestPerforming
285
- })] })]
286
- }), /* @__PURE__ */ x("div", {
287
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
288
- children: [/* @__PURE__ */ b("div", {
289
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-error-bg-subtle",
290
- children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-status-error-text" })
291
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
292
- className: "text-xs text-text-secondary",
293
- children: "Worst Performing"
294
- }), /* @__PURE__ */ b("p", {
295
- className: "text-sm font-semibold text-text-primary",
296
- children: P.portfolioMetrics.worstPerforming
297
- })] })]
298
- })]
299
- }),
300
- /* @__PURE__ */ x("div", {
301
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
302
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
303
- className: "mb-4 flex items-center gap-2",
304
- children: [/* @__PURE__ */ b(d, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
305
- className: "text-lg font-semibold text-text-primary",
306
- children: "Performance by Cart"
307
- })]
308
- }), /* @__PURE__ */ b("div", {
309
- className: "space-y-3",
310
- children: V.map((e, n) => /* @__PURE__ */ x("div", {
311
- className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface p-3",
312
- children: [/* @__PURE__ */ x("div", {
313
- className: "flex items-center gap-3",
314
- children: [/* @__PURE__ */ b("div", {
315
- className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
316
- children: n + 1
317
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
318
- className: "text-sm font-medium text-text-primary",
319
- children: e.cartName
320
- }), /* @__PURE__ */ x("p", {
321
- className: "text-xs text-text-secondary",
322
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
323
- })] })]
324
- }), /* @__PURE__ */ x("div", {
325
- className: "text-right",
326
- children: [/* @__PURE__ */ x("p", {
327
- className: t("text-sm font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
328
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
329
- }), /* @__PURE__ */ x("p", {
330
- className: t("text-xs", e.roi >= 0 ? "text-status-success-text" : "text-status-error-text"),
331
- children: [
332
- e.roi >= 0 ? "+" : "",
333
- e.roi,
334
- "% ROI"
335
- ]
336
- })]
337
- })]
338
- }, e.cartName))
339
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
340
- className: "mb-4 flex items-center gap-2",
341
- children: [/* @__PURE__ */ b(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
342
- className: "text-lg font-semibold text-text-primary",
343
- children: "Category Distribution"
344
- })]
345
- }), /* @__PURE__ */ b("div", {
346
- className: "space-y-4",
347
- children: P.performanceByCategory.map((e) => /* @__PURE__ */ x("div", {
348
- className: "rounded-lg border border-border-seam bg-bg-surface p-3",
349
- children: [
350
- /* @__PURE__ */ x("div", {
351
- className: "mb-2 flex items-center justify-between",
352
- children: [/* @__PURE__ */ b("span", {
353
- className: "text-sm font-medium text-text-primary",
354
- children: e.category
355
- }), /* @__PURE__ */ x("span", {
356
- className: "text-sm text-text-secondary",
357
- children: [e.percentage, "%"]
358
- })]
359
- }),
360
- /* @__PURE__ */ b("div", {
361
- className: "mb-2 h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
362
- children: /* @__PURE__ */ b("div", {
363
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
364
- style: { width: `${e.percentage}%` }
365
- })
366
- }),
367
- /* @__PURE__ */ x("div", {
368
- className: "flex items-center justify-between",
369
- children: [/* @__PURE__ */ x("span", {
370
- className: "text-xs text-text-secondary",
371
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
372
- }), /* @__PURE__ */ x("span", {
373
- className: t("text-xs font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
374
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
375
- })]
376
- })
377
- ]
378
- }, e.category))
379
- })] })]
380
- }),
381
- /* @__PURE__ */ x("section", {
382
- className: "mt-8",
383
- children: [/* @__PURE__ */ x("div", {
384
- className: "mb-4 flex items-center gap-2",
385
- children: [/* @__PURE__ */ b(f, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
386
- className: "text-lg font-semibold text-text-primary",
387
- children: "Portfolio Growth Trend"
388
- })]
389
- }), /* @__PURE__ */ b("div", {
390
- className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface",
391
- children: /* @__PURE__ */ b("div", {
392
- className: "overflow-x-auto",
393
- children: /* @__PURE__ */ x("table", {
394
- className: "w-full",
395
- children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
396
- className: "border-b border-border-seam bg-bg-sunken/50",
397
- children: [
398
- /* @__PURE__ */ b("th", {
399
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
400
- children: "Month"
401
- }),
402
- /* @__PURE__ */ b("th", {
403
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
404
- children: "Invested"
405
- }),
406
- /* @__PURE__ */ b("th", {
407
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
408
- children: "Portfolio Value"
409
- }),
410
- /* @__PURE__ */ b("th", {
411
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
412
- children: "Returns"
413
- }),
414
- /* @__PURE__ */ b("th", {
415
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
416
- children: "Growth %"
417
- })
418
- ]
419
- }) }), /* @__PURE__ */ b("tbody", {
420
- className: "divide-y divide-border",
421
- children: P.monthlyPerformance.map((e) => {
422
- let n = e.invested > 0 ? ((e.value - e.invested) / e.invested * 100).toFixed(1) : "0.0";
423
- return /* @__PURE__ */ x("tr", {
424
- className: "hover:bg-accent/50 transition-colors",
425
- children: [
426
- /* @__PURE__ */ b("td", {
427
- className: "whitespace-nowrap px-4 py-4 text-sm font-medium text-text-primary sm:px-6",
428
- children: e.month
429
- }),
430
- /* @__PURE__ */ b("td", {
431
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
432
- children: i(e.invested, { minimumFractionDigits: 0 })
433
- }),
434
- /* @__PURE__ */ b("td", {
435
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
436
- children: i(e.value, { minimumFractionDigits: 0 })
437
- }),
438
- /* @__PURE__ */ b("td", {
439
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
440
- children: /* @__PURE__ */ x("span", {
441
- className: t("font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
442
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
443
- })
444
- }),
445
- /* @__PURE__ */ b("td", {
446
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
447
- children: /* @__PURE__ */ x("span", {
448
- className: t("font-medium", parseFloat(n) >= 0 ? "text-status-success-text" : "text-status-error-text"),
449
- children: [
450
- parseFloat(n) >= 0 ? "+" : "",
451
- n,
452
- "%"
453
- ]
454
- })
455
- })
456
- ]
457
- }, e.month);
458
- })
459
- })]
460
- })
461
- })
462
- })]
463
- }),
464
- /* @__PURE__ */ x("div", {
465
- className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-2",
466
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
467
- className: "mb-4 flex items-center gap-2",
468
- children: [/* @__PURE__ */ b(g, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
469
- className: "text-lg font-semibold text-text-primary",
470
- children: "Risk Analysis"
471
- })]
472
- }), /* @__PURE__ */ b("div", {
473
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
474
- children: /* @__PURE__ */ x("div", {
475
- className: "space-y-5",
476
- children: [
477
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
478
- className: "mb-2 flex items-center justify-between",
479
- children: [/* @__PURE__ */ b("span", {
480
- className: "text-sm text-text-primary",
481
- children: "Risk Score"
482
- }), /* @__PURE__ */ x("span", {
483
- className: t("text-sm font-semibold", z.color),
484
- children: [
485
- P.riskAnalysis.riskScore,
486
- "/5 (",
487
- z.label,
488
- ")"
489
- ]
490
- })]
491
- }), /* @__PURE__ */ b("div", {
492
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
493
- children: /* @__PURE__ */ b("div", {
494
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.riskScore)),
495
- style: { width: `${P.riskAnalysis.riskScore / 5 * 100}%` }
496
- })
497
- })] }),
498
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
499
- className: "mb-2 flex items-center justify-between",
500
- children: [/* @__PURE__ */ b("span", {
501
- className: "text-sm text-text-primary",
502
- children: "Diversification"
503
- }), /* @__PURE__ */ x("span", {
504
- className: t("text-sm font-semibold", B.color),
505
- children: [
506
- P.riskAnalysis.diversificationScore,
507
- "/10 (",
508
- B.label,
509
- ")"
510
- ]
511
- })]
512
- }), /* @__PURE__ */ b("div", {
513
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
514
- children: /* @__PURE__ */ b("div", {
515
- className: t("h-full rounded-full transition-all duration-300", O(P.riskAnalysis.diversificationScore)),
516
- style: { width: `${P.riskAnalysis.diversificationScore / 10 * 100}%` }
517
- })
518
- })] }),
519
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
520
- className: "mb-2 flex items-center justify-between",
521
- children: [/* @__PURE__ */ b("span", {
522
- className: "text-sm text-text-primary",
523
- children: "Volatility"
524
- }), /* @__PURE__ */ x("span", {
525
- className: t("text-sm font-semibold", T(P.riskAnalysis.volatilityScore).color),
526
- children: [P.riskAnalysis.volatilityScore, "/5"]
527
- })]
528
- }), /* @__PURE__ */ b("div", {
529
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
530
- children: /* @__PURE__ */ b("div", {
531
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.volatilityScore)),
532
- style: { width: `${P.riskAnalysis.volatilityScore / 5 * 100}%` }
533
- })
534
- })] }),
535
- /* @__PURE__ */ x("div", {
536
- className: "grid grid-cols-2 gap-3 border-t border-border-seam pt-4",
537
- children: [/* @__PURE__ */ x("div", {
538
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
539
- children: [/* @__PURE__ */ b("p", {
540
- className: "text-lg font-bold text-text-primary",
541
- children: P.performanceByCart.length
542
- }), /* @__PURE__ */ b("p", {
543
- className: "text-xs text-text-secondary",
544
- children: "Active Investments"
545
- })]
546
- }), /* @__PURE__ */ x("div", {
547
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
548
- children: [/* @__PURE__ */ b("p", {
549
- className: "text-lg font-bold text-text-primary",
550
- children: P.performanceByCategory.length
551
- }), /* @__PURE__ */ b("p", {
552
- className: "text-xs text-text-secondary",
553
- children: "Sectors Covered"
554
- })]
555
- })]
556
- })
557
- ]
558
- })
559
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
560
- className: "mb-4 flex items-center gap-2",
561
- children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ b("h2", {
562
- className: "text-lg font-semibold text-text-primary",
563
- children: "Recommendations"
564
- })]
565
- }), /* @__PURE__ */ x("div", {
566
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
567
- children: [/* @__PURE__ */ b("div", {
568
- className: "space-y-3",
569
- children: P.riskAnalysis.recommendations.map((e, t) => /* @__PURE__ */ x("div", {
570
- className: "flex items-start gap-3 rounded-lg border border-border-seam bg-bg-sunken/30 p-3",
571
- children: [/* @__PURE__ */ b("div", {
572
- className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
573
- children: t + 1
574
- }), /* @__PURE__ */ b("p", {
575
- className: "text-sm leading-relaxed text-text-primary",
576
- children: e
577
- })]
578
- }, t))
579
- }), /* @__PURE__ */ x("div", {
580
- className: "mt-5 rounded-lg border border-border-seam bg-bg-sunken/50 p-4",
581
- children: [/* @__PURE__ */ b("h4", {
582
- className: "mb-2 text-sm font-semibold text-text-primary",
583
- children: "Overall Assessment"
584
- }), /* @__PURE__ */ x("div", {
585
- className: "space-y-2",
586
- children: [
587
- /* @__PURE__ */ x("div", {
588
- className: "flex items-center justify-between",
589
- children: [/* @__PURE__ */ b("span", {
590
- className: "text-xs text-text-secondary",
591
- children: "Portfolio Health"
592
- }), /* @__PURE__ */ x("div", {
593
- className: "flex items-center gap-2",
594
- children: [/* @__PURE__ */ b("div", {
595
- className: "flex gap-0.5",
596
- children: [
597
- 1,
598
- 2,
599
- 3,
600
- 4,
601
- 5
602
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-bg" : "bg-bg-sunken") }, e))
603
- }), /* @__PURE__ */ b("span", {
604
- className: "text-xs font-medium text-text-primary",
605
- children: "4/5"
606
- })]
607
- })]
608
- }),
609
- /* @__PURE__ */ x("div", {
610
- className: "flex items-center justify-between",
611
- children: [/* @__PURE__ */ b("span", {
612
- className: "text-xs text-text-secondary",
613
- children: "Growth Potential"
614
- }), /* @__PURE__ */ x("div", {
615
- className: "flex items-center gap-2",
616
- children: [/* @__PURE__ */ b("div", {
617
- className: "flex gap-0.5",
618
- children: [
619
- 1,
620
- 2,
621
- 3,
622
- 4,
623
- 5
624
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-status-warning-bg" : "bg-bg-sunken") }, e))
625
- }), /* @__PURE__ */ b("span", {
626
- className: "text-xs font-medium text-text-primary",
627
- children: "3/5"
628
- })]
629
- })]
630
- }),
631
- /* @__PURE__ */ x("div", {
632
- className: "flex items-center justify-between",
633
- children: [/* @__PURE__ */ b("span", {
634
- className: "text-xs text-text-secondary",
635
- children: "Income Stability"
636
- }), /* @__PURE__ */ x("div", {
637
- className: "flex items-center gap-2",
638
- children: [/* @__PURE__ */ b("div", {
639
- className: "flex gap-0.5",
640
- children: [
641
- 1,
642
- 2,
643
- 3,
644
- 4,
645
- 5
646
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-bg" : "bg-bg-sunken") }, e))
647
- }), /* @__PURE__ */ b("span", {
648
- className: "text-xs font-medium text-text-primary",
649
- children: "4/5"
650
- })]
651
- })]
652
- })
653
- ]
654
- })]
655
- })]
656
- })] })]
657
- }),
658
- /* @__PURE__ */ x("div", {
659
- className: "mt-8 flex flex-wrap gap-3",
660
- children: [
661
- /* @__PURE__ */ x("button", {
662
- type: "button",
663
- onClick: () => k("/investor/portfolio"),
664
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
665
- children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View Portfolio"]
666
- }),
667
- /* @__PURE__ */ x("button", {
668
- type: "button",
669
- onClick: () => k("/investor/opportunities"),
670
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
671
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Browse Opportunities"]
672
- }),
673
- /* @__PURE__ */ x("button", {
674
- type: "button",
675
- onClick: () => k("/investor/investments"),
676
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
677
- children: [/* @__PURE__ */ b(y, { className: "h-4 w-4" }), "My Investments"]
678
- })
679
- ]
680
- })
681
- ]
682
- });
683
- }
684
- //#endregion
685
- export { k as InvestorAnalyticsPage };
686
-
687
- //# sourceMappingURL=InvestorAnalyticsPage.js.map